From 91bdedde39658b0b87f8619da978c9887902c7d7 Mon Sep 17 00:00:00 2001 From: Nicolas Chabra Date: Sat, 13 Feb 2016 16:01:56 -0500 Subject: [PATCH 001/235] Add build definitions commands --- app/exec/build/definitions/create.ts | 55 ++++++++++++++++++++++++ app/exec/build/definitions/default.ts | 17 ++++++++ app/exec/build/definitions/delete.ts | 48 +++++++++++++++++++++ app/exec/build/definitions/export.ts | 57 ++++++++++++++++++++++++ app/exec/build/definitions/list.ts | 49 +++++++++++++++++++++ app/exec/build/definitions/update.ts | 62 +++++++++++++++++++++++++++ 6 files changed, 288 insertions(+) create mode 100644 app/exec/build/definitions/create.ts create mode 100644 app/exec/build/definitions/default.ts create mode 100644 app/exec/build/definitions/delete.ts create mode 100644 app/exec/build/definitions/export.ts create mode 100644 app/exec/build/definitions/list.ts create mode 100644 app/exec/build/definitions/update.ts diff --git a/app/exec/build/definitions/create.ts b/app/exec/build/definitions/create.ts new file mode 100644 index 00000000..d7767321 --- /dev/null +++ b/app/exec/build/definitions/create.ts @@ -0,0 +1,55 @@ +import { TfCommand, CoreArguments } from "../../../lib/tfcommand"; +import buildContracts = require('vso-node-api/interfaces/BuildInterfaces'); +import args = require("../../../lib/arguments"); +import trace = require('../../../lib/trace'); +import Q = require("q"); +import fs = require("fs"); + +export function getCommand(args: string[]): CreateDefinition { + return new CreateDefinition(args); +} + +export interface CreateDefinitionArguments extends CoreArguments { + name: args.StringArgument + definitionPath: args.StringArgument +} + +export class CreateDefinition extends TfCommand { + protected description = "Create a build definition"; + + protected getHelpArgs(): string[] { + return ["project", "definitionPath", "name"]; + } + + protected setCommandArgs(): void { + super.setCommandArgs(); + + this.registerCommandArgument("name", "Name of the Build Definition", "", args.StringArgument); + this.registerCommandArgument("definitionPath", "Definition path", "Local path to a Build Definition.", args.ExistingFilePathsArgument); + } + + public exec(): Q.Promise { + var api = this.webApi.getQBuildApi(this.connection.getCollectionUrl()); + + return Q.all([ + this.commandArgs.project.val(), + this.commandArgs.name.val(), + this.commandArgs.definitionPath.val(), + ]).spread((project, name, definitionPath) => { + let definition: buildContracts.BuildDefinition = JSON.parse(fs.readFileSync(definitionPath.toString(), 'utf-8')); + definition.name = name; + + trace.debug("Updating build definition %s...", name); + return api.createDefinition(definition, project).then((definition) => { + return definition; + }); + }); + } + + public friendlyOutput(definition: buildContracts.BuildDefinition): void { + trace.println(); + trace.info('id : %s', definition.id); + trace.info('name : %s', definition.name); + trace.info('type : %s', definition.type == buildContracts.DefinitionType.Xaml ? "Xaml" : "Build"); + } +} diff --git a/app/exec/build/definitions/default.ts b/app/exec/build/definitions/default.ts new file mode 100644 index 00000000..f90d637f --- /dev/null +++ b/app/exec/build/definitions/default.ts @@ -0,0 +1,17 @@ +import { TfCommand, CoreArguments } from "../../../lib/tfcommand"; + +export function getCommand(args: string[]): HelpCommand { + return new HelpCommand(args); +} + +export class HelpCommand extends TfCommand { + protected description = "Commands for managing Build Definitions."; + + protected setCommandArgs(): void { + super.setCommandArgs(); + } + + public exec(cmd?: any): Q.Promise { + return this.getHelp(cmd); + } +} diff --git a/app/exec/build/definitions/delete.ts b/app/exec/build/definitions/delete.ts new file mode 100644 index 00000000..872d2a1d --- /dev/null +++ b/app/exec/build/definitions/delete.ts @@ -0,0 +1,48 @@ +import { TfCommand, CoreArguments } from "../../../lib/tfcommand"; +import buildContracts = require('vso-node-api/interfaces/BuildInterfaces'); +import args = require("../../../lib/arguments"); +import trace = require('../../../lib/trace'); +import Q = require("q"); +import fs = require("fs"); + +export function getCommand(args: string[]): DeleteDefinition { + return new DeleteDefinition(args); +} + +export interface DeleteDefinitionArguments extends CoreArguments { + definitionId: args.IntArgument +} + +export class DeleteDefinition extends TfCommand { + protected description = "Create a build definition"; + + protected getHelpArgs(): string[] { + return ["project", "definitionId"]; + } + + protected setCommandArgs(): void { + super.setCommandArgs(); + + this.registerCommandArgument("definitionId", "Build Definition ID", "Identifies a build definition.", args.IntArgument, null); + } + + public exec(): Q.Promise { + var api = this.webApi.getQBuildApi(this.connection.getCollectionUrl()); + + return Q.all([ + this.commandArgs.project.val(), + this.commandArgs.definitionId.val(), + ]).spread((project, definitionId) => { + + trace.debug("Deleting build definition %s...", definitionId); + return api.deleteDefinition(definitionId, project).then((definition) => { + return { id: definitionId } + }); + }); + } + + public friendlyOutput(data: buildContracts.BuildDefinition): void { + trace.println(); + trace.success('Build Definition %s deleted successfully!', data.id); + } +} diff --git a/app/exec/build/definitions/export.ts b/app/exec/build/definitions/export.ts new file mode 100644 index 00000000..a503cd48 --- /dev/null +++ b/app/exec/build/definitions/export.ts @@ -0,0 +1,57 @@ +import { TfCommand, CoreArguments } from "../../../lib/tfcommand"; +import buildContracts = require('vso-node-api/interfaces/BuildInterfaces'); +import args = require("../../../lib/arguments"); +import trace = require('../../../lib/trace'); +import Q = require("q"); +import fs = require("fs"); + +export function getCommand(args: string[]): ExportDefinition { + return new ExportDefinition(args); +} + +export interface ExportDefinitionArguments extends CoreArguments { + definitionId: args.IntArgument + definitionPath: args.StringArgument + overwrite: args.BooleanArgument +} + +export class ExportDefinition extends TfCommand { + protected description = "Export a build definition"; + + protected getHelpArgs(): string[] { + return ["project", "definitionId", "definitionPath", "overwrite"]; + } + + protected setCommandArgs(): void { + super.setCommandArgs(); + + this.registerCommandArgument("definitionId", "Build Definition ID", "Identifies a build definition.", args.IntArgument, null); + this.registerCommandArgument("definitionPath", "Definition Path", "Local path to a Build Definition.", args.FilePathsArgument); + this.registerCommandArgument("overwrite", "Overwrite?", "Overwrite existing Build Definition.", args.BooleanArgument, "false"); + } + + public exec(): Q.Promise { + var api = this.webApi.getQBuildApi(this.connection.getCollectionUrl()); + + return Q.all([ + this.commandArgs.project.val(), + this.commandArgs.definitionId.val(), + this.commandArgs.definitionPath.val(), + this.commandArgs.overwrite.val(), + ]).spread((project, definitionId, definitionPath, overwrite) => { + trace.debug("Retrieving build definition %s...", definitionId); + + return api.getDefinition(definitionId, project).then((definition) => { + if (fs.existsSync(definitionPath.toString()) && !overwrite) { + return Q.reject(new Error("Build definition file already exists")); + } + fs.writeFileSync(definitionPath.toString(), JSON.stringify(definition, null, ' ')); + return definition; + }); + }); + } + + public friendlyOutput(data: buildContracts.BuildDefinition): void { + trace.info('Build Definition %s exported successfully', data.id); + } +} diff --git a/app/exec/build/definitions/list.ts b/app/exec/build/definitions/list.ts new file mode 100644 index 00000000..a6756fa1 --- /dev/null +++ b/app/exec/build/definitions/list.ts @@ -0,0 +1,49 @@ +import { TfCommand, CoreArguments } from "../../../lib/tfcommand"; +import buildContracts = require('vso-node-api/interfaces/BuildInterfaces'); +import args = require("../../../lib/arguments"); +import trace = require('../../../lib/trace'); +import Q = require("q"); + +export function getCommand(args: string[]): ListDefinitions { + return new ListDefinitions(args); +} + +export class ListDefinitions extends TfCommand { + + protected description = "Get a list of build definitions"; + + protected getHelpArgs(): string[] { + return ["project"]; + } + + public exec(): Q.Promise { + var api = this.webApi.getQBuildApi(this.connection.getCollectionUrl()); + trace.debug("Searching for build definitions..."); + + return Q.all([ + this.commandArgs.project.val() + ]).spread((project) => { + return api.getDefinitions(project).then((definitions) => { + trace.debug("Retrieved " + definitions.length + " build definitions from server."); + return definitions; + }); + }); + } + + public friendlyOutput(data: buildContracts.BuildDefinition[]): void { + if (!data) { + throw new Error('no definitions supplied'); + } + + if (!(data instanceof Array)) { + throw new Error('expected an array of definitions'); + } + + data.forEach((definition) => { + trace.println(); + trace.info('id : %s', definition.id); + trace.info('name : %s', definition.name); + trace.info('type : %s', definition.type == buildContracts.DefinitionType.Xaml ? "Xaml" : "Build"); + }); + } +} diff --git a/app/exec/build/definitions/update.ts b/app/exec/build/definitions/update.ts new file mode 100644 index 00000000..1f7efeb9 --- /dev/null +++ b/app/exec/build/definitions/update.ts @@ -0,0 +1,62 @@ +import { TfCommand, CoreArguments } from "../../../lib/tfcommand"; +import buildContracts = require('vso-node-api/interfaces/BuildInterfaces'); +import args = require("../../../lib/arguments"); +import trace = require('../../../lib/trace'); +import Q = require("q"); +import fs = require("fs"); + +export function getCommand(args: string[]): UpdateDefinition { + return new UpdateDefinition(args); +} + +export interface UpdateDefinitionArguments extends CoreArguments { + definitionId: args.IntArgument + definitionPath: args.StringArgument +} + +export class UpdateDefinition extends TfCommand { + protected description = "Update build definition"; + + protected getHelpArgs(): string[] { + return ["project", "definitionId", "definitionPath"]; + } + + protected setCommandArgs(): void { + super.setCommandArgs(); + + this.registerCommandArgument("definitionId", "Build Definition ID", "Identifies a build definition.", args.IntArgument, null); + this.registerCommandArgument("definitionPath", "Definition Path", "Local path to a Build Definition.", args.ExistingFilePathsArgument); + } + + public exec(): Q.Promise { + var api = this.webApi.getQBuildApi(this.connection.getCollectionUrl()); + + return Q.all([ + this.commandArgs.project.val(), + this.commandArgs.definitionId.val(), + this.commandArgs.definitionPath.val(), + ]).spread((project, definitionId, definitionPath) => { + + // Get the current definition so we can grab the revision id + trace.debug("Retrieving build definition %s...", definitionId); + return api.getDefinition(definitionId, project).then(currentDefinition => { + trace.debug("Reading build definition from %s...", definitionPath.toString()); + let definition: buildContracts.BuildDefinition = JSON.parse(fs.readFileSync(definitionPath.toString(), 'utf-8')); + definition.id = currentDefinition.id; + definition.revision = currentDefinition.revision; + + trace.debug("Updating build definition %s...", definitionId); + return api.updateDefinition(definition, definitionId, project).then((definition) => { + return definition; + }); + }) + }); + } + + public friendlyOutput(definition: buildContracts.BuildDefinition): void { + trace.println(); + trace.info('id : %s', definition.id); + trace.info('name : %s', definition.name); + trace.info('revision : %s', definition.revision); + } +} From 9e92138765c77d07155f8d9e3b760c1813d84e96 Mon Sep 17 00:00:00 2001 From: sfeldman Date: Sun, 6 Mar 2016 20:57:29 +0200 Subject: [PATCH 002/235] add build details and build delete, restore show to default settings, add respons in login --- .directory | 7 ++++++ app/exec/build/delete.ts | 50 +++++++++++++++++++++++++++++++++++++++ app/exec/build/details.ts | 50 +++++++++++++++++++++++++++++++++++++++ app/exec/login.ts | 3 ++- 4 files changed, 109 insertions(+), 1 deletion(-) create mode 100644 .directory create mode 100644 app/exec/build/delete.ts create mode 100644 app/exec/build/details.ts diff --git a/.directory b/.directory new file mode 100644 index 00000000..662e279c --- /dev/null +++ b/.directory @@ -0,0 +1,7 @@ +[Dolphin] +Timestamp=2016,3,6,20,54,51 +Version=3 +ViewMode=1 + +[Settings] +HiddenFilesShown=true diff --git a/app/exec/build/delete.ts b/app/exec/build/delete.ts new file mode 100644 index 00000000..a9bf2e10 --- /dev/null +++ b/app/exec/build/delete.ts @@ -0,0 +1,50 @@ +import { TfCommand } from "../../lib/tfcommand"; +import args = require("../../lib/arguments"); +import buildBase = require("./default"); +import buildClient = require("vso-node-api/BuildApi"); +import buildContracts = require("vso-node-api/interfaces/BuildInterfaces"); +import trace = require("../../lib/trace"); + +export function describe(): string { + return "delete a build"; +} + +export function getCommand(args: string[]): BuildDelete { + return new BuildDelete(args); +} + +export class BuildDelete extends buildBase.BuildBase { + + protected description = "Delete a build."; + + protected getHelpArgs(): string[] { + return ["project", "buildId"]; + } + + public exec(): Q.Promise { + trace.debug("delete-build.exec"); + var buildapi: buildClient.IQBuildApi = this.webApi.getQBuildApi(); + return this.commandArgs.project.val().then((project) => { + return this.commandArgs.buildId.val().then((buildId) => { + return this._deleteBuild(buildapi, buildId, project); + }); + }); + + } + + public friendlyOutput(build: buildContracts.Build): void { + trace.println(); + } + + private _deleteBuild(buildapi: buildClient.IQBuildApi, buildId: number, project: string) { + trace.info("Deleting build...") + buildapi.deleteBuild(buildId,project) + return buildapi.getBuild(buildId,project).then((build: buildContracts.Build) => { + if (build.deleted) { + trace.info("build deleted") + } else { + trace.error("failed to delete") + } + }); + } +} \ No newline at end of file diff --git a/app/exec/build/details.ts b/app/exec/build/details.ts new file mode 100644 index 00000000..cb26dc20 --- /dev/null +++ b/app/exec/build/details.ts @@ -0,0 +1,50 @@ +import { TfCommand } from "../../lib/tfcommand"; +import args = require("../../lib/arguments"); +import buildBase = require("./default"); +import buildClient = require("vso-node-api/BuildApi"); +import buildContracts = require("vso-node-api/interfaces/BuildInterfaces"); +import trace = require("../../lib/trace"); + +export function getCommand(args: string[]): BuildDetails { + return new BuildDetails(args); +} + +export class BuildDetails extends buildBase.BuildBase { + protected description = "Display extended build details."; + + protected getHelpArgs(): string[] { + return ["project", "buildId"]; + } + + public exec(): Q.Promise { + trace.debug("build-details.exec"); + var buildapi: buildClient.IQBuildApi = this.webApi.getQBuildApi(); + return this.commandArgs.project.val().then((project) => { + return this.commandArgs.buildId.val().then((buildId) => { + return buildapi.getBuild(buildId, project); + }); + }); + + } + + public friendlyOutput(build: buildContracts.Build): void { + if (!build) { + throw new Error("no build supplied"); + } + + trace.println(); + trace.info("id : %s", build.id); + trace.info("number (name) : %s", build.buildNumber); + trace.info("definition name : %s", build.definition ? build.definition.name : "unknown"); + trace.info("requested by : %s", build.requestedBy ? build.requestedBy.displayName : "unknown"); + trace.info("status : %s", buildContracts.BuildStatus[build.status]); + trace.info("result : %s", build.result ? buildContracts.BuildResult[build.result] : "unknown") + trace.info("queue time : %s", build.queueTime ? build.queueTime.toJSON() : "unknown"); + trace.info("start time : %s", build.startTime ? build.startTime.toJSON() : "not started"); + trace.info("finish time : %s", build.finishTime ? build.finishTime.toJSON() : "in progress"); + trace.info("quality : %s", build.quality); + trace.info("reason : %s", buildContracts.BuildReason[build.reason]); + trace.info("version : %s", build.sourceVersion ? build.sourceVersion.replace("C","") : "unknown"); + trace.info("API URL : %s", build.url); + } +} \ No newline at end of file diff --git a/app/exec/login.ts b/app/exec/login.ts index c1581e43..1b43f5f8 100644 --- a/app/exec/login.ts +++ b/app/exec/login.ts @@ -31,7 +31,8 @@ export class Login extends TfCommand { let agentApi = webApi.getTaskAgentApi(); return Q.Promise((resolve, reject) => { agentApi.connect((err, statusCode, obj) => { - if (statusCode && statusCode === 401) { + trace.debug("Response code: %s", statusCode.toString()) + if (statusCode && statusCode === 401) { trace.debug("Connection failed: invalid credentials."); reject("Invalid credentials."); } else if (err) { From d4afc7ff1c11f1dffc988cf75ee67a0051bd2fc7 Mon Sep 17 00:00:00 2001 From: sfeldman Date: Mon, 7 Mar 2016 19:43:58 +0200 Subject: [PATCH 003/235] fix a bug in trace.debug(statusCode.tostring() - remove redundent Tostraing() --- app/exec/login.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/exec/login.ts b/app/exec/login.ts index 1b43f5f8..7a1c5cf2 100644 --- a/app/exec/login.ts +++ b/app/exec/login.ts @@ -31,7 +31,7 @@ export class Login extends TfCommand { let agentApi = webApi.getTaskAgentApi(); return Q.Promise((resolve, reject) => { agentApi.connect((err, statusCode, obj) => { - trace.debug("Response code: %s", statusCode.toString()) + trace.debug("Response code: %s", statusCode) if (statusCode && statusCode === 401) { trace.debug("Connection failed: invalid credentials."); reject("Invalid credentials."); From 8c9420bc2750fca3340accd56c1be7f381e81d8f Mon Sep 17 00:00:00 2001 From: sfeldman Date: Mon, 7 Mar 2016 20:05:53 +0200 Subject: [PATCH 004/235] added a comment to test failure to create new Feature --- app/exec/workitem/create.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/exec/workitem/create.ts b/app/exec/workitem/create.ts index 2c5a98e4..9762e681 100644 --- a/app/exec/workitem/create.ts +++ b/app/exec/workitem/create.ts @@ -54,7 +54,7 @@ export class WorkItemCreate extends witBase.WorkItemBase from: null }); } - + // TODO: Check why this is failing in Feature Create return witapi.updateWorkItemTemplate(null, patchDoc, project, wiType); }); } From 00a06c896b2ae3f61065d4f8444d1665969ea732 Mon Sep 17 00:00:00 2001 From: sfeldman Date: Tue, 8 Mar 2016 12:26:21 +0200 Subject: [PATCH 005/235] add comments for basic login with on premise server --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ee3eb5a3..fe0b87b0 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,10 @@ Copyright Microsoft Corporation > Personal access token: Logged in successfully ``` - +* on premise loggin (basic authentication only): + Collection name is case sensitive (rul should not end with trailing slash) + User name format: Domain\\User or "Domain\User" + passwords with special characters should NOT be escaped ('\') - works with or without parentheses ("") You can alternatively use basic auth by passing `--auth-type basic` (read [Configuring Basic Auth](docs/configureBasicAuth.md)). NTLM will come soon. Note: Using this feature will store your login credentials on disk in plain text. From d9df9fed052d96dea9a6b28c35001d44af858ae2 Mon Sep 17 00:00:00 2001 From: sfeldman Date: Tue, 8 Mar 2016 12:30:29 +0200 Subject: [PATCH 006/235] add comments for basic login with on premise server - proper markdowns --- README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index fe0b87b0..1a9a78ee 100644 --- a/README.md +++ b/README.md @@ -39,14 +39,16 @@ Copyright Microsoft Corporation > Personal access token: Logged in successfully ``` -* on premise loggin (basic authentication only): - Collection name is case sensitive (rul should not end with trailing slash) - User name format: Domain\\User or "Domain\User" - passwords with special characters should NOT be escaped ('\') - works with or without parentheses ("") + You can alternatively use basic auth by passing `--auth-type basic` (read [Configuring Basic Auth](docs/configureBasicAuth.md)). NTLM will come soon. Note: Using this feature will store your login credentials on disk in plain text. +* on premise loggin (basic authentication only):\ + Collection name is case sensitive (rul should not end with trailing slash)\ + User name format: Domain\\User or "Domain\User"\ + passwords with special characters should NOT be escaped ('\') - works with or without parentheses ("")\ + ## Settings Cache To avoid providing other options in every command, you can save options out to a settings file by adding the --save flag. From 9b392f86b0c360d1b64373dc01cbe38d2015773e Mon Sep 17 00:00:00 2001 From: sfeldman Date: Tue, 8 Mar 2016 12:31:55 +0200 Subject: [PATCH 007/235] remove comment - bad markdowns :( --- README.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/README.md b/README.md index 1a9a78ee..92394545 100644 --- a/README.md +++ b/README.md @@ -44,11 +44,6 @@ You can alternatively use basic auth by passing `--auth-type basic` (read [Confi Note: Using this feature will store your login credentials on disk in plain text. -* on premise loggin (basic authentication only):\ - Collection name is case sensitive (rul should not end with trailing slash)\ - User name format: Domain\\User or "Domain\User"\ - passwords with special characters should NOT be escaped ('\') - works with or without parentheses ("")\ - ## Settings Cache To avoid providing other options in every command, you can save options out to a settings file by adding the --save flag. From 3a35092d5b8ca2a967d602a13b91e243045ff81a Mon Sep 17 00:00:00 2001 From: Nicolas Chabra Date: Wed, 16 Mar 2016 10:58:15 -0400 Subject: [PATCH 008/235] Fix typo --- app/exec/build/definitions/delete.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/exec/build/definitions/delete.ts b/app/exec/build/definitions/delete.ts index 872d2a1d..2c8a6d61 100644 --- a/app/exec/build/definitions/delete.ts +++ b/app/exec/build/definitions/delete.ts @@ -14,7 +14,7 @@ export interface DeleteDefinitionArguments extends CoreArguments { } export class DeleteDefinition extends TfCommand { - protected description = "Create a build definition"; + protected description = "Delete a build definition"; protected getHelpArgs(): string[] { return ["project", "definitionId"]; From 32fcef613d129ddb95a62da996585809075de5bd Mon Sep 17 00:00:00 2001 From: sfeldman Date: Sun, 10 Apr 2016 21:50:09 +0300 Subject: [PATCH 009/235] merge with upstream --- .../extension/_lib/vsix-manifest-builder.ts | 10 ++- app/exec/extension/_lib/vsix-writer.ts | 63 +++++++++----- app/exec/workitem/create.ts | 27 +++--- app/exec/workitem/default.ts | 84 ++++++++++++++++++- app/exec/workitem/query.ts | 22 +---- app/exec/workitem/show.ts | 16 +--- app/exec/workitem/update.ts | 39 +++++++++ app/lib/arguments.ts | 1 - package.json | 11 +-- tsconfig.json | 2 +- 10 files changed, 195 insertions(+), 80 deletions(-) create mode 100644 app/exec/workitem/update.ts diff --git a/app/exec/extension/_lib/vsix-manifest-builder.ts b/app/exec/extension/_lib/vsix-manifest-builder.ts index c93be77c..ce761872 100644 --- a/app/exec/extension/_lib/vsix-manifest-builder.ts +++ b/app/exec/extension/_lib/vsix-manifest-builder.ts @@ -285,7 +285,7 @@ export class VsixManifestBuilder extends ManifestBuilder { break; case "public": if (typeof value === "boolean") { - let flags = _.get(this.data, "PackageManifest.Metadata[0].GalleryFlags[0]", "").split(","); + let flags = _.get(this.data, "PackageManifest.Metadata[0].GalleryFlags[0]", "").split(" "); _.remove(flags, v => v === ""); if (value === true) { flags.push("Public"); @@ -293,7 +293,7 @@ export class VsixManifestBuilder extends ManifestBuilder { if (value === false) { _.remove(flags, v => v === "Public"); } - _.set(this.data, "PackageManifest.Metadata[0].GalleryFlags[0]", _.uniq(flags).join(",")); + _.set(this.data, "PackageManifest.Metadata[0].GalleryFlags[0]", _.uniq(flags).join(" ")); } break; case "publisher": @@ -472,7 +472,9 @@ export class VsixManifestBuilder extends ManifestBuilder { let contentTypePromises: Q.Promise[] = []; let extTypeCounter: {[ext: string]: {[type: string]: string[]}} = {}; - Object.keys(this.files).forEach((fileName) => { + Object.keys(this.files).filter((fileName) => { + return !this.files[fileName].contentType; + }).forEach((fileName) => { let extension = path.extname(fileName); let mimePromise; if (typeMap[extension]) { @@ -573,4 +575,4 @@ export class VsixManifestBuilder extends ManifestBuilder { return jsonToXml(contentTypes).replace(/\n/g, os.EOL); }); } -} \ No newline at end of file +} diff --git a/app/exec/extension/_lib/vsix-writer.ts b/app/exec/extension/_lib/vsix-writer.ts index df84f1a0..c6d93dfc 100644 --- a/app/exec/extension/_lib/vsix-writer.ts +++ b/app/exec/extension/_lib/vsix-writer.ts @@ -23,6 +23,7 @@ export class VsixWriter { private manifestBuilders: ManifestBuilder[]; private resources: ResourceSet; + private static VSIX_ADD_FILES_BATCH_SIZE: number = 20; private static VSO_MANIFEST_FILENAME: string = "extension.vsomanifest"; private static VSIX_MANIFEST_FILENAME: string = "extension.vsixmanifest"; private static CONTENT_TYPES_FILENAME: string = "[Content_Types].xml"; @@ -98,27 +99,49 @@ export class VsixWriter { let builderPromises: Q.Promise[] = []; this.manifestBuilders.forEach((builder) => { - // Add the package files - let readFilePromises: Q.Promise[] = []; - Object.keys(builder.files).forEach((path) => { - let itemName = toZipItemName(builder.files[path].partName); - if (!VsixWriter.validatePartName(itemName)) { - let eol = require("os").EOL; - throw "Part Name '" + itemName + "' is invalid. Please check the following: " + eol + "1. No whitespace or any of these characters: #^[]<>?" + eol + "2. Cannot end with a period." + eol + "3. No percent-encoded / or \\ characters. Additionally, % must be followed by two hex characters."; - } - if (itemName.indexOf(" ") ) - if (!builder.files[path].content) { - let readFilePromise = Q.nfcall(fs.readFile, path).then((result) => { - vsix.file(itemName, result); - }); - readFilePromises.push(readFilePromise); - } else { - vsix.file(itemName, builder.files[path].content); - readFilePromises.push(Q.resolve(null)); + // Avoid the error EMFILE: too many open files + const addPackageFilesBatch = (paths: string[], numBatch: number, batchSize: number, deferred?: Q.Deferred): Q.Promise => { + deferred = deferred || Q.defer(); + + let readFilePromises = []; + const start = numBatch * batchSize; + const end = Math.min(paths.length, start + batchSize); + for (let i = start; i < end; i++) { + const path = paths[i]; + let itemName = toZipItemName(builder.files[path].partName); + if (!VsixWriter.validatePartName(itemName)) { + let eol = require("os").EOL; + throw "Part Name '" + itemName + "' is invalid. Please check the following: " + eol + "1. No whitespace or any of these characters: #^[]<>?" + eol + "2. Cannot end with a period." + eol + "3. No percent-encoded / or \\ characters. Additionally, % must be followed by two hex characters."; + } + if (itemName.indexOf(" ") ) + if (!builder.files[path].content) { + let readFilePromise = Q.nfcall(fs.readFile, path).then((result) => { + vsix.file(itemName, result); + }); + readFilePromises.push(readFilePromise); + } else { + vsix.file(itemName, builder.files[path].content); + readFilePromises.push(Q.resolve(null)); + } } - }); - - let builderPromise = Q.all(readFilePromises).then(() => { + + Q.all(readFilePromises).then(function() { + if (end < paths.length) { + // Next batch + addPackageFilesBatch(paths, numBatch + 1, batchSize, deferred); + } else { + deferred.resolve(null); + } + + }).fail(function (err) { + deferred.reject(err); + }); + + return deferred.promise; + } + + // Add the package files in batches + let builderPromise = addPackageFilesBatch(Object.keys(builder.files), 0, VsixWriter.VSIX_ADD_FILES_BATCH_SIZE).then(() => { // Add the manifest itself vsix.file(toZipItemName(builder.getPath()), builder.getResult()); }); diff --git a/app/exec/workitem/create.ts b/app/exec/workitem/create.ts index 9762e681..710b6ee3 100644 --- a/app/exec/workitem/create.ts +++ b/app/exec/workitem/create.ts @@ -2,8 +2,6 @@ import { EOL as eol } from "os"; import { TfCommand } from "../../lib/tfcommand"; import args = require("../../lib/arguments"); import Q = require("q"); -import vssCoreContracts = require("vso-node-api/interfaces/common/VSSInterfaces") -import tfsCoreContracts = require("vso-node-api/interfaces/CoreInterfaces"); import trace = require("../../lib/trace"); import witBase = require("./default"); import witClient = require("vso-node-api/WorkItemTrackingApi"); @@ -16,7 +14,7 @@ export function getCommand(args: string[]): WorkItemCreate { export class WorkItemCreate extends witBase.WorkItemBase { protected getHelpArgs(): string[] { - return ["workItemType", "title", "assignedTo", "description", "project"]; + return ["workItemType", "title", "assignedTo", "description", "project", "values"]; } public exec(): Q.Promise { @@ -24,9 +22,11 @@ export class WorkItemCreate extends witBase.WorkItemBase return Q.all([ this.commandArgs.workItemType.val(), + this.commandArgs.project.val(), + this.commandArgs.title.val(true), this.commandArgs.assignedTo.val(true), - this.commandArgs.title.val(), this.commandArgs.description.val(true), +<<<<<<< HEAD this.commandArgs.project.val() ]).spread((wiType, assignedTo, title, description, project) => { var patchDoc: vssCoreContracts.JsonPatchOperation[] = []; @@ -56,20 +56,17 @@ export class WorkItemCreate extends witBase.WorkItemBase } // TODO: Check why this is failing in Feature Create return witapi.updateWorkItemTemplate(null, patchDoc, project, wiType); +======= + this.commandArgs.values.val(true) + ]).spread((wiType, project, title, assignedTo, description, values) => { + + var patchDoc = witBase.buildWorkItemPatchDoc(title, assignedTo, description, values); + return witapi.createWorkItem(null, patchDoc, project, wiType); +>>>>>>> upstream/master }); } public friendlyOutput(workItem: witContracts.WorkItem): void { - if (!workItem) { - throw new Error("no results"); - } - - trace.success(eol + "Created Work Item @ " + workItem.id + eol); - trace.info("id: " + workItem.id); - trace.info("rev: " + workItem.rev); - trace.info("type: " + workItem.fields["System.WorkItemType"]); - trace.info("state: " + workItem.fields["System.State"]); - trace.info("title: " + workItem.fields["System.Title"]); - trace.info("assigned to: " + workItem.fields["System.AssignedTo"]); + return witBase.friendlyOutput([workItem]); } } \ No newline at end of file diff --git a/app/exec/workitem/default.ts b/app/exec/workitem/default.ts index 3f72a6ed..87c35e7f 100644 --- a/app/exec/workitem/default.ts +++ b/app/exec/workitem/default.ts @@ -1,13 +1,27 @@ import { TfCommand, CoreArguments } from "../../lib/tfcommand"; import args = require("../../lib/arguments"); +import vssCoreContracts = require("vso-node-api/interfaces/common/VSSInterfaces") +import witContracts = require("vso-node-api/interfaces/WorkItemTrackingInterfaces"); +import trace = require("../../lib/trace"); +import { EOL as eol } from "os"; +import _ = require("lodash"); + + +export class WorkItemValuesJsonArgument extends args.JsonArgument {} export interface WorkItemArguments extends CoreArguments { workItemId: args.IntArgument; query: args.StringArgument; workItemType: args.StringArgument; + + // Convienience way to set common work item arguments assignedTo: args.StringArgument; title: args.StringArgument; description: args.StringArgument; + + + // Generic way to assign work item values + values: WorkItemValuesJsonArgument; } export function getCommand(args: string[]): TfCommand { @@ -23,12 +37,78 @@ export class WorkItemBase extends TfCommand { this.registerCommandArgument("workItemId", "Work Item ID", "Identifies a particular Work Item.", args.IntArgument); this.registerCommandArgument("query", "Work Item Query (WIQL)", null, args.StringArgument); this.registerCommandArgument("workItemType", "Work Item Type", "Type of Work Item to create.", args.StringArgument); - this.registerCommandArgument("assignedTo", "Assign To", "Who to assign the Work Item to.", args.StringArgument); + this.registerCommandArgument("assignedTo", "Assigned To", "Who to assign the Work Item to.", args.StringArgument); this.registerCommandArgument("title", "Work Item Title", "Title of the Work Item.", args.StringArgument); this.registerCommandArgument("description", "Work Item Description", "Description of the Work Item.", args.StringArgument); + this.registerCommandArgument("values", "Work Item Values", "Mapping from field reference name to value to set on the workitem. (E.g. {\"system.assignedto\": \"Some Name\"})", WorkItemValuesJsonArgument, "{}"); } public exec(cmd?: any): Q.Promise { return this.getHelp(cmd); } -} \ No newline at end of file +} + + +export function friendlyOutput(data: witContracts.WorkItem[]): void { + if (!data) { + throw new Error("no results"); + } + + let fieldsToIgnore = ["System.AreaLevel1", "System.IterationId", "System.IterationLevel1", "System.ExternalLinkCount", "System.AreaLevel1"]; + + data.forEach((workItem) => { + trace.info(eol); + trace.info("System.Id: " + workItem.id); + trace.info("System.Rev: " + workItem.rev); + Object.keys(workItem.fields).forEach((arg) => { + if(!_.contains(fieldsToIgnore, arg)) { + trace.info(arg + ": " + workItem.fields[arg]); + } + }); + }); +} + + +export function buildWorkItemPatchDoc(title, assignedTo, description, values) { + var patchDoc: vssCoreContracts.JsonPatchOperation[] = []; + + // Check the convienience helpers for wit values + if(title){ + patchDoc.push({ + op: vssCoreContracts.Operation.Add, + path: "/fields/System.Title", + value: title, + from: null + }); + } + + if (assignedTo) { + patchDoc.push({ + op: vssCoreContracts.Operation.Add, + path: "/fields/System.AssignedTo", + value: assignedTo, + from: null + }); + } + + if (description) { + patchDoc.push({ + op: vssCoreContracts.Operation.Add, + path: "/fields/System.Description", + value: description, + from: null + }); + } + + // Set the field reference values + Object.keys(values).forEach((fieldReference) => { + patchDoc.push({ + op: vssCoreContracts.Operation.Add, + path: "/fields/" + fieldReference, + value: values[fieldReference], + from: null + }); + }); + + return patchDoc; +} diff --git a/app/exec/workitem/query.ts b/app/exec/workitem/query.ts index fc89bd7b..840e1566 100644 --- a/app/exec/workitem/query.ts +++ b/app/exec/workitem/query.ts @@ -27,7 +27,9 @@ export class WorkItemQuery extends witBase.WorkItemBase let wiql: witContracts.Wiql = { query: query }; return witApi.queryByWiql(wiql, { project: projectName }).then((result) => { let workItemIds = result.workItems.map(val => val.id).slice(0, Math.min(200, result.workItems.length)); - let fieldRefs = result.columns.map(val => val.referenceName).slice(0, Math.min(20, result.columns.length)); + let fieldRefs = result.columns.map(val => val.referenceName) + + fieldRefs = fieldRefs.slice(0, Math.min(20, result.columns.length)); return witApi.getWorkItems(workItemIds, fieldRefs); }); }); @@ -36,22 +38,6 @@ export class WorkItemQuery extends witBase.WorkItemBase } public friendlyOutput(data: witContracts.WorkItem[]): void { - if (!data) { - throw new Error("no results"); - } - - if (_.isArray(data)) { - throw new Error("expected an array of workitems"); - } - - data.forEach((workItem) => { - trace.info(eol); - trace.info("id: " + workItem.id); - trace.info("rev: " + workItem.rev); - trace.info("type: " + workItem.fields["System.WorkItemType"]); - trace.info("state: " + workItem.fields["System.State"]); - trace.info("title: " + workItem.fields["System.Title"]); - trace.info("assigned to: " + workItem.fields["System.AssignedTo"]); - }); + return witBase.friendlyOutput(data); } } \ No newline at end of file diff --git a/app/exec/workitem/show.ts b/app/exec/workitem/show.ts index 0a488b7f..5a394b6d 100644 --- a/app/exec/workitem/show.ts +++ b/app/exec/workitem/show.ts @@ -24,19 +24,7 @@ export class WorkItemShow extends witBase.WorkItemBase { }); } - public friendlyOutput(data: witContracts.WorkItem): void { - if (!data) { - throw new Error("no results"); - } - - var workItem: witContracts.WorkItem = data; - - trace.info(eol); - trace.info("id: " + workItem.id); - trace.info("rev: " + workItem.rev); - trace.info("type: " + workItem.fields["System.WorkItemType"]); - trace.info("state: " + workItem.fields["System.State"]); - trace.info("title: " + workItem.fields["System.Title"]); - trace.info("assigned to: " + workItem.fields["System.AssignedTo"]); + public friendlyOutput(workItem: witContracts.WorkItem): void { + return witBase.friendlyOutput([workItem]); } } \ No newline at end of file diff --git a/app/exec/workitem/update.ts b/app/exec/workitem/update.ts new file mode 100644 index 00000000..787f45cf --- /dev/null +++ b/app/exec/workitem/update.ts @@ -0,0 +1,39 @@ +import { EOL as eol } from "os"; +import { TfCommand } from "../../lib/tfcommand"; +import args = require("../../lib/arguments"); +import Q = require("q"); +import trace = require("../../lib/trace"); +import witBase = require("./default"); +import witClient = require("vso-node-api/WorkItemTrackingApi"); +import witContracts = require("vso-node-api/interfaces/WorkItemTrackingInterfaces"); + +export function getCommand(args: string[]): WorkItemUpdate { + return new WorkItemUpdate(args); +} + +export class WorkItemUpdate extends witBase.WorkItemBase { + + protected getHelpArgs(): string[] { + return ["workItemId", "title", "assignedTo", "description", "values"]; + } + + public exec(): Q.Promise { + var witapi = this.webApi.getQWorkItemTrackingApi(); + + return Q.all([ + this.commandArgs.workItemId.val(), + this.commandArgs.title.val(true), + this.commandArgs.assignedTo.val(true), + this.commandArgs.description.val(true), + this.commandArgs.values.val(true) + ]).spread((workItemId, title, assignedTo, description, values) => { + + var patchDoc = witBase.buildWorkItemPatchDoc(title, assignedTo, description, values); + return witapi.updateWorkItem(null, patchDoc, workItemId); + }); + } + + public friendlyOutput(workItem: witContracts.WorkItem): void { + return witBase.friendlyOutput([workItem]); + } +} \ No newline at end of file diff --git a/app/lib/arguments.ts b/app/lib/arguments.ts index 8e0aeaf9..866429ad 100644 --- a/app/lib/arguments.ts +++ b/app/lib/arguments.ts @@ -300,7 +300,6 @@ export class BooleanArgument extends Argument { } else { throw new Error("Multiple values provided for Boolean Argument " + this.name + "."); } - return Q.resolve(false); } } diff --git a/package.json b/package.json index 6833db9b..f7ba22e6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tfx-cli", - "version": "0.3.17", + "version": "0.3.19", "description": "TFS Extensions Command Line Utility", "repository": { "type": "git", @@ -37,18 +37,19 @@ "tmp": "0.0.26", "tracer": "0.7.4", "validator": "^3.43.0", - "vso-node-api": "^0.6.0", + "vso-node-api": "^3.0.0", "winreg": "0.0.12", - "xml2js": "0.4.9" + "xml2js": "^0.4.16" }, "devDependencies": { "del": "^1.2.0", "gulp": "^3.9.0", "gulp-filter": "^3.0.1", "gulp-mocha": "2.0.0", - "gulp-tsb": "^1.6.2", + "gulp-tsb": "^1.10.2", "minimatch": "^2.0.8", - "mocha": "^2.2.5" + "mocha": "^2.2.5", + "typescript": "^1.8.9" }, "author": "", "license": "MIT" diff --git a/tsconfig.json b/tsconfig.json index 2ce69083..9d3b1502 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,7 +1,7 @@ { "compilerOptions": { "module": "commonjs", - "target": "ES5", + "target": "es5", "declaration": false, "sourceMap": false, "newLine": "LF" From 3c28a75781d37a5334aa93ff2d5aec5af34ad889 Mon Sep 17 00:00:00 2001 From: sfeldman Date: Sun, 10 Apr 2016 22:07:14 +0300 Subject: [PATCH 010/235] remove merge head markers --- app/exec/workitem/create.ts | 9 --------- 1 file changed, 9 deletions(-) diff --git a/app/exec/workitem/create.ts b/app/exec/workitem/create.ts index ca2995cd..1f6582ba 100644 --- a/app/exec/workitem/create.ts +++ b/app/exec/workitem/create.ts @@ -26,8 +26,6 @@ export class WorkItemCreate extends witBase.WorkItemBase this.commandArgs.title.val(true), this.commandArgs.assignedTo.val(true), this.commandArgs.description.val(true), -<<<<<<< HEAD -<<<<<<< HEAD this.commandArgs.project.val() ]).spread((wiType, assignedTo, title, description, project) => { var patchDoc: vssCoreContracts.JsonPatchOperation[] = []; @@ -57,18 +55,11 @@ export class WorkItemCreate extends witBase.WorkItemBase } // TODO: Check why this is failing in Feature Create return witapi.updateWorkItemTemplate(null, patchDoc, project, wiType); -======= -======= ->>>>>>> upstream/master this.commandArgs.values.val(true) ]).spread((wiType, project, title, assignedTo, description, values) => { var patchDoc = witBase.buildWorkItemPatchDoc(title, assignedTo, description, values); return witapi.createWorkItem(null, patchDoc, project, wiType); -<<<<<<< HEAD ->>>>>>> upstream/master -======= ->>>>>>> upstream/master }); } From d22b998741ed0cec8953a4986989421cab1f83ea Mon Sep 17 00:00:00 2001 From: sfeldman Date: Mon, 18 Apr 2016 13:56:05 +0300 Subject: [PATCH 011/235] add ability to queue new build with params + add definitionID to details --- app/exec/build/default.ts | 2 ++ app/exec/build/details.ts | 1 + app/exec/build/queue.ts | 21 ++++++++++++++------- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/app/exec/build/default.ts b/app/exec/build/default.ts index 3fada9e0..c7a80a5d 100644 --- a/app/exec/build/default.ts +++ b/app/exec/build/default.ts @@ -7,6 +7,7 @@ export interface BuildArguments extends CoreArguments { status: args.StringArgument; top: args.IntArgument; buildId: args.IntArgument; + parameters: args.StringArgument; } export function getCommand(args: string[]): BuildBase { @@ -24,6 +25,7 @@ export class BuildBase extends TfCom this.registerCommandArgument("status", "Build Status", "Build status filter.", args.StringArgument, null); this.registerCommandArgument("top", "Number of builds", "Maximum number of builds to return.", args.IntArgument, null); this.registerCommandArgument("buildId", "Build ID", "Identifies a particular Build.", args.IntArgument); + this.registerCommandArgument("parameters", "parameter file path", "Build process Parameters JSON file.", args.StringArgument,null); } public exec(cmd?: any): Q.Promise { diff --git a/app/exec/build/details.ts b/app/exec/build/details.ts index cb26dc20..234d6edd 100644 --- a/app/exec/build/details.ts +++ b/app/exec/build/details.ts @@ -36,6 +36,7 @@ export class BuildDetails extends buildBase.BuildBase { var buildapi: buildClient.IQBuildApi = this.webApi.getQBuildApi(); - - return this.commandArgs.project.val().then((project) => { + return this.commandArgs.project.val().then((project) => { return this.commandArgs.definitionId.val(true).then((definitionId) => { let definitionPromise: Q.Promise; if (definitionId) { @@ -45,7 +45,10 @@ export class BuildQueue extends buildBase.BuildBase { - return this._queueBuild(buildapi, definition, project); + return this.commandArgs.parameters.val().then((parameters) => { + return this._queueBuild(buildapi, definition, project, parameters); + }) + }); }); }); @@ -64,10 +67,14 @@ export class BuildQueue extends buildBase.BuildBase { - definition: definition + var parameters = fs.readFileSync(parameters,'utf8'); + var build = { + definition: definition, + priority: 1, + parameters: parameters }; return buildapi.queueBuild(build, project); } From 6ceb39495b0f211a151b831509112b47ffce50f0 Mon Sep 17 00:00:00 2001 From: "GER\\sfeldman" Date: Sun, 1 May 2016 14:26:57 +0300 Subject: [PATCH 012/235] handle queue build w/o parameters (bug) --- app/exec/build/queue.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/exec/build/queue.ts b/app/exec/build/queue.ts index c7db32cb..9211966a 100644 --- a/app/exec/build/queue.ts +++ b/app/exec/build/queue.ts @@ -70,7 +70,10 @@ export class BuildQueue extends buildBase.BuildBase { definition: definition, priority: 1, From d15abbdbebf06d225610c4f33f1e8bde309c5506 Mon Sep 17 00:00:00 2001 From: sfeldman Date: Sun, 1 May 2016 14:57:38 +0300 Subject: [PATCH 013/235] revert file exist change --- app/exec/build/queue.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/exec/build/queue.ts b/app/exec/build/queue.ts index 9211966a..0405a5c6 100644 --- a/app/exec/build/queue.ts +++ b/app/exec/build/queue.ts @@ -46,6 +46,7 @@ export class BuildQueue extends buildBase.BuildBase { return this.commandArgs.parameters.val().then((parameters) => { + trace.debug("using file %s for build parameters",parameters); return this._queueBuild(buildapi, definition, project, parameters); }) @@ -70,10 +71,7 @@ export class BuildQueue extends buildBase.BuildBase { definition: definition, priority: 1, From 80ea7ee14210612c78c5d526b5a7ea0795a82023 Mon Sep 17 00:00:00 2001 From: "GER\\sfeldman" Date: Sun, 1 May 2016 15:40:06 +0300 Subject: [PATCH 014/235] fix queue build usage with and without parameters --- app/exec/build/queue.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/exec/build/queue.ts b/app/exec/build/queue.ts index 0405a5c6..4eb1dcc6 100644 --- a/app/exec/build/queue.ts +++ b/app/exec/build/queue.ts @@ -71,7 +71,13 @@ export class BuildQueue extends buildBase.BuildBase { definition: definition, priority: 1, From 7c1f1c4373525774a33eb7ce5e84cc965773fc33 Mon Sep 17 00:00:00 2001 From: sfeldman Date: Sun, 1 May 2016 17:14:06 +0300 Subject: [PATCH 015/235] update version number --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c993527f..c27165b8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tfx-cli", - "version": "0.3.20", + "version": "0.3.20.3", "description": "TFS Extensions Command Line Utility", "repository": { "type": "git", From 14a69837f0e032c3bfbd8d1fe1e60fb40d888870 Mon Sep 17 00:00:00 2001 From: sfeldman Date: Sun, 1 May 2016 22:40:22 +0300 Subject: [PATCH 016/235] add priority as command line argument for build queue --- app/exec/build/default.ts | 2 ++ app/exec/build/queue.ts | 17 ++++++++++------- package.json | 2 +- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/app/exec/build/default.ts b/app/exec/build/default.ts index c7a80a5d..e8594f3c 100644 --- a/app/exec/build/default.ts +++ b/app/exec/build/default.ts @@ -8,6 +8,7 @@ export interface BuildArguments extends CoreArguments { top: args.IntArgument; buildId: args.IntArgument; parameters: args.StringArgument; + priority: args.IntArgument; } export function getCommand(args: string[]): BuildBase { @@ -26,6 +27,7 @@ export class BuildBase extends TfCom this.registerCommandArgument("top", "Number of builds", "Maximum number of builds to return.", args.IntArgument, null); this.registerCommandArgument("buildId", "Build ID", "Identifies a particular Build.", args.IntArgument); this.registerCommandArgument("parameters", "parameter file path", "Build process Parameters JSON file.", args.StringArgument,null); + this.registerCommandArgument("priority", "build queue priority", "Queue a build with priority 1 [High] - 5 [Low] default = 3 [Normal]).", args.IntArgument, null) } public exec(cmd?: any): Q.Promise { diff --git a/app/exec/build/queue.ts b/app/exec/build/queue.ts index 4eb1dcc6..0841c8e7 100644 --- a/app/exec/build/queue.ts +++ b/app/exec/build/queue.ts @@ -19,7 +19,7 @@ export class BuildQueue extends buildBase.BuildBase { @@ -46,10 +46,12 @@ export class BuildQueue extends buildBase.BuildBase { return this.commandArgs.parameters.val().then((parameters) => { - trace.debug("using file %s for build parameters",parameters); - return this._queueBuild(buildapi, definition, project, parameters); - }) - + return this.commandArgs.priority.val(true).then((priority) =>{ + trace.debug("build parameters file : %s",parameters ? parameters: "none"); + trace.debug("build queue priority : %s", priority ? priority: "3") + return this._queueBuild(buildapi, definition, project, parameters, priority); + }); + }); }); }); }); @@ -69,7 +71,7 @@ export class BuildQueue extends buildBase.BuildBase { definition: definition, - priority: 1, + priority: priority ? priority: 3, parameters: parameters + }; return buildapi.queueBuild(build, project); } diff --git a/package.json b/package.json index c27165b8..261b42bd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tfx-cli", - "version": "0.3.20.3", + "version": "0.3.21", "description": "TFS Extensions Command Line Utility", "repository": { "type": "git", From ed53e4f465d6742b3ee1afb4929642e771b93e77 Mon Sep 17 00:00:00 2001 From: sfeldman Date: Mon, 2 May 2016 16:57:41 +0300 Subject: [PATCH 017/235] fix the delete feature (is deleted = true) and add keep feature (api not implemented yet) --- .directory | 5 +--- app/exec/build/delete.ts | 3 ++- app/exec/build/keep.ts | 51 ++++++++++++++++++++++++++++++++++++++++ app/exec/build/queue.ts | 2 +- 4 files changed, 55 insertions(+), 6 deletions(-) create mode 100644 app/exec/build/keep.ts diff --git a/.directory b/.directory index 662e279c..02d44c8c 100644 --- a/.directory +++ b/.directory @@ -1,7 +1,4 @@ [Dolphin] -Timestamp=2016,3,6,20,54,51 +Timestamp=2016,5,2,16,29,3 Version=3 ViewMode=1 - -[Settings] -HiddenFilesShown=true diff --git a/app/exec/build/delete.ts b/app/exec/build/delete.ts index a9bf2e10..34f73074 100644 --- a/app/exec/build/delete.ts +++ b/app/exec/build/delete.ts @@ -39,7 +39,8 @@ export class BuildDelete extends buildBase.BuildBase { + return buildapi.getBuild(buildId,project).then((build: buildContracts.Build) => { + build.deleted = true; if (build.deleted) { trace.info("build deleted") } else { diff --git a/app/exec/build/keep.ts b/app/exec/build/keep.ts new file mode 100644 index 00000000..5b4ead54 --- /dev/null +++ b/app/exec/build/keep.ts @@ -0,0 +1,51 @@ +import { TfCommand } from "../../lib/tfcommand"; +import args = require("../../lib/arguments"); +import buildBase = require("./default"); +import buildClient = require("vso-node-api/BuildApi"); +import buildContracts = require("vso-node-api/interfaces/BuildInterfaces"); +import trace = require("../../lib/trace"); + +export function describe(): string { + return "change build retention policy"; +} + +export function getCommand(args: string[]): BuildKeep { + return new BuildKeep(args); +} + +export class BuildKeep extends buildBase.BuildBase { + + protected description = "change build retention policy."; + + protected getHelpArgs(): string[] { + return ["project", "buildId"]; + } + + public exec(): Q.Promise { + trace.debug("keep-build.exec"); + var buildapi: buildClient.IQBuildApi = this.webApi.getQBuildApi(); + return this.commandArgs.project.val().then((project) => { + return this.commandArgs.buildId.val().then((buildId) => { + return this._keepBuild(buildapi, buildId, project); + }); + }); + + } + + public friendlyOutput(build: buildContracts.Build): void { + trace.println(); + } + + private _keepBuild(buildapi: buildClient.IQBuildApi, buildId: number, project: string) { + trace.info("Searching for build...") + return buildapi.getBuild(buildId,project).then((build: buildContracts.Build) => { + if (build.keepForever) { + trace.warn("Retention unlocked for %s", build.buildNumber); + build.keepForever = false; + } else { + trace.warn("Build %s Retained indefinatly", build.buildNumber); + build.keepForever = true; + } + }); + } +} \ No newline at end of file diff --git a/app/exec/build/queue.ts b/app/exec/build/queue.ts index 0841c8e7..76d7a58b 100644 --- a/app/exec/build/queue.ts +++ b/app/exec/build/queue.ts @@ -84,7 +84,7 @@ export class BuildQueue extends buildBase.BuildBase Date: Wed, 4 May 2016 20:48:21 +0300 Subject: [PATCH 018/235] added the ability to ger build definition details --- app/exec/build/definition.ts | 43 ++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 app/exec/build/definition.ts diff --git a/app/exec/build/definition.ts b/app/exec/build/definition.ts new file mode 100644 index 00000000..0b798144 --- /dev/null +++ b/app/exec/build/definition.ts @@ -0,0 +1,43 @@ +import { TfCommand } from "../../lib/tfcommand"; +import args = require("../../lib/arguments"); +import buildBase = require("./default"); +import buildClient = require("vso-node-api/BuildApi"); +import buildContracts = require("vso-node-api/interfaces/BuildInterfaces"); +import trace = require("../../lib/trace"); + +export function getCommand(args: string[]): BuildDefinition { + return new BuildDefinition(args); +} + +export class BuildDefinition extends buildBase.BuildBase { + protected description = "Display build definition details."; + + protected getHelpArgs(): string[] { + return ["project", "definitionId"]; + } + + public exec(): Q.Promise { + trace.debug("build-definition.exec"); + var buildapi: buildClient.IQBuildApi = this.webApi.getQBuildApi(); + return this.commandArgs.project.val().then((project) => { + return this.commandArgs.definitionId.val().then((definitionId) => { + return buildapi.getDefinition(definitionId,project,null,null); + }); + }); + + } + + public friendlyOutput(definition: buildContracts.DefinitionReference): void { + if (!definition) { + throw new Error("no definition supplied"); + } + + trace.println(); + trace.info("name : %s", definition.name); + trace.info("revision : %s", definition.revision); + trace.info("url : %s", definition.url ? definition.url :"unknown"); + trace.info("requested by : %s", definition.createdDate.toDateString()); + trace.info("queue status : %s", definition.queueStatus); + trace.info("type : %s", buildContracts.DefinitionType[definition.type]); + } +} \ No newline at end of file From c788d6e33d423a108f2120aac28d71bebfd05274 Mon Sep 17 00:00:00 2001 From: sfeldman Date: Wed, 4 May 2016 22:53:30 +0300 Subject: [PATCH 019/235] enable get build definition by name and ID, fix bug of getdefinitions first of default --- app/exec/build/definition.ts | 28 +++++++++++++++++++++------- app/exec/build/queue.ts | 2 +- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/app/exec/build/definition.ts b/app/exec/build/definition.ts index 0b798144..83229c3a 100644 --- a/app/exec/build/definition.ts +++ b/app/exec/build/definition.ts @@ -13,7 +13,7 @@ export class BuildDefinition extends buildBase.BuildBase { @@ -21,10 +21,23 @@ export class BuildDefinition extends buildBase.BuildBase { return this.commandArgs.definitionId.val().then((definitionId) => { - return buildapi.getDefinition(definitionId,project,null,null); + return this.commandArgs.definitionName.val().then((definitionName) => { + if (definitionId){ + return buildapi.getDefinition(definitionId,project,null,null); + } else { + return buildapi.getDefinitions(project, definitionName).then((definitions: buildContracts.DefinitionReference[]) => { + if(definitionName && definitions.length > 0) { + var definition = definitions[0]; + return definition; + } else { + trace.debug("No definition found with name " + definitionName); + throw new Error("No definition found with name " + definitionName); + } + }); + } + }); }); }); - } public friendlyOutput(definition: buildContracts.DefinitionReference): void { @@ -34,10 +47,11 @@ export class BuildDefinition extends buildBase.BuildBase { trace.debug("No definition id provided, Searching for definitions with name: " + definitionName); return buildapi.getDefinitions(project, definitionName).then((definitions: buildContracts.DefinitionReference[]) => { - if(definitions.length > 0) { + if(definitionName && definitions.length > 0) { var definition = definitions[0]; return definition; } From 902b90a2c00ccb6b01630eb8f7283eacfa7a5345 Mon Sep 17 00:00:00 2001 From: sfeldman Date: Mon, 9 May 2016 21:38:10 +0300 Subject: [PATCH 020/235] add *_sample.json to ignore list --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 18b58040..f7234ff0 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,4 @@ node_modules # VS Code Settings .settings +*_sample.json From 68693b1dfe5322696f291406ef68a538d47bcb13 Mon Sep 17 00:00:00 2001 From: "GER\\sfeldman" Date: Sun, 22 May 2016 14:57:14 +0300 Subject: [PATCH 021/235] add queue build with source version (Supports TFVC) --- app/exec/build/default.ts | 4 +++- app/exec/build/queue.ts | 13 ++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/app/exec/build/default.ts b/app/exec/build/default.ts index e8594f3c..830d216e 100644 --- a/app/exec/build/default.ts +++ b/app/exec/build/default.ts @@ -9,6 +9,7 @@ export interface BuildArguments extends CoreArguments { buildId: args.IntArgument; parameters: args.StringArgument; priority: args.IntArgument; + version: args.StringArgument; } export function getCommand(args: string[]): BuildBase { @@ -27,7 +28,8 @@ export class BuildBase extends TfCom this.registerCommandArgument("top", "Number of builds", "Maximum number of builds to return.", args.IntArgument, null); this.registerCommandArgument("buildId", "Build ID", "Identifies a particular Build.", args.IntArgument); this.registerCommandArgument("parameters", "parameter file path", "Build process Parameters JSON file.", args.StringArgument,null); - this.registerCommandArgument("priority", "build queue priority", "Queue a build with priority 1 [High] - 5 [Low] default = 3 [Normal]).", args.IntArgument, null) + this.registerCommandArgument("priority", "build queue priority", "Queue a build with priority 1 [High] - 5 [Low] default = 3 [Normal]).", args.IntArgument, null); + this.registerCommandArgument("version","Build Sources Version", "the source version for the queued build.",args.StringArgument,null); } public exec(cmd?: any): Q.Promise { diff --git a/app/exec/build/queue.ts b/app/exec/build/queue.ts index 32a514d5..3fb837be 100644 --- a/app/exec/build/queue.ts +++ b/app/exec/build/queue.ts @@ -19,7 +19,7 @@ export class BuildQueue extends buildBase.BuildBase { @@ -49,7 +49,10 @@ export class BuildQueue extends buildBase.BuildBase{ trace.debug("build parameters file : %s",parameters ? parameters: "none"); trace.debug("build queue priority : %s", priority ? priority: "3") - return this._queueBuild(buildapi, definition, project, parameters, priority); + return this.commandArgs.version.val().then((version) => { + trace.debug("build source version: %s", version ? version: "Latest") + return this._queueBuild(buildapi, definition, project, parameters, priority, version); + }); }); }); }); @@ -71,7 +74,7 @@ export class BuildQueue extends buildBase.BuildBase { definition: definition, priority: priority ? priority: 3, - parameters: parameters - + parameters: parameters, + sourceVersion: version }; return buildapi.queueBuild(build, project); } From d75f9b10c0933b9dc35d9359e46e0d997f4b83c5 Mon Sep 17 00:00:00 2001 From: sfeldman Date: Mon, 13 Jun 2016 21:33:24 +0300 Subject: [PATCH 022/235] first try to get agent details --- app/exec/build/agent.ts | 44 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 app/exec/build/agent.ts diff --git a/app/exec/build/agent.ts b/app/exec/build/agent.ts new file mode 100644 index 00000000..9421c656 --- /dev/null +++ b/app/exec/build/agent.ts @@ -0,0 +1,44 @@ +import { TfCommand } from "../../lib/tfcommand"; +import args = require("../../lib/arguments"); +import buildBase = require("./default"); +import agentClient = require("vso-node-api/TaskAgentApiBase"); +import taskAgentContracts = require("vso-node-api/interfaces/TaskAgentInterfaces"); +import trace = require("../../lib/trace"); + +export function getCommand(args: string[]): Agent { + return new Agent(args); +} + +export class Agent extends buildBase.BuildBase { + protected description = "Show task agent details."; + + protected getHelpArgs(): string[] { + return ["poolId", "agentId"]; + } + + public exec(): Q.Promise { + trace.debug("agent.exec"); + var agentapi: agentClient.IQTaskAgentApiBase = this.webApi.getQTaskAgentApi(); + return this.commandArgs.poolId.val().then((pool) => { + trace.info("getting agent pool: %s",pool); + return this.commandArgs.agentId.val().then((agent) => { + trace.info("getting agent : %s", agent); + return agentapi.getAgent(pool,agent,true,true,null); + }); + }); + + } + + public friendlyOutput(agent: taskAgentContracts.TaskAgent): void { + //if (!agent) { + // throw new Error("no agent / pool supplied"); + //} + + trace.println(); + trace.info("Agent id : %s", agent.id ? agent.id : "unknown"); + trace.info("Agent name : %s", agent.name ? agent.name : "unknown"); + trace.info("Version : %s", agent.version ? agent.version : "unknown"); + trace.info("status : %s", agent.status[agent.status]); + trace.info("queue time : %s", agent.enabled ? agent.enabled : "unknown"); + } +} \ No newline at end of file From 96adde260bd705fe2d90ffa63f8e419b349b5e81 Mon Sep 17 00:00:00 2001 From: sfeldman Date: Mon, 20 Jun 2016 11:19:49 +0300 Subject: [PATCH 023/235] added the functionality of queue with shelveset/source branch --- app/exec/build/agent.ts | 9 ++++----- app/exec/build/default.ts | 6 ++++++ app/exec/build/queue.ts | 23 ++++++++++++++--------- 3 files changed, 24 insertions(+), 14 deletions(-) diff --git a/app/exec/build/agent.ts b/app/exec/build/agent.ts index 9421c656..4d8e1ec2 100644 --- a/app/exec/build/agent.ts +++ b/app/exec/build/agent.ts @@ -4,6 +4,7 @@ import buildBase = require("./default"); import agentClient = require("vso-node-api/TaskAgentApiBase"); import taskAgentContracts = require("vso-node-api/interfaces/TaskAgentInterfaces"); import trace = require("../../lib/trace"); +import taskAgentApi = require("vso-node-api/TaskAgentApi"); export function getCommand(args: string[]): Agent { return new Agent(args); @@ -20,20 +21,18 @@ export class Agent extends buildBase.BuildBase { - trace.info("getting agent pool: %s",pool); + trace.debug("getting agent pool: %s",pool); return this.commandArgs.agentId.val().then((agent) => { - trace.info("getting agent : %s", agent); + trace.debug("getting agent : %s", agent); return agentapi.getAgent(pool,agent,true,true,null); }); }); - } - + public friendlyOutput(agent: taskAgentContracts.TaskAgent): void { //if (!agent) { // throw new Error("no agent / pool supplied"); //} - trace.println(); trace.info("Agent id : %s", agent.id ? agent.id : "unknown"); trace.info("Agent name : %s", agent.name ? agent.name : "unknown"); diff --git a/app/exec/build/default.ts b/app/exec/build/default.ts index 830d216e..e7c77de4 100644 --- a/app/exec/build/default.ts +++ b/app/exec/build/default.ts @@ -10,6 +10,9 @@ export interface BuildArguments extends CoreArguments { parameters: args.StringArgument; priority: args.IntArgument; version: args.StringArgument; + shelveset: args.StringArgument; + poolId: args.IntArgument; + agentId: args.IntArgument; } export function getCommand(args: string[]): BuildBase { @@ -30,6 +33,9 @@ export class BuildBase extends TfCom this.registerCommandArgument("parameters", "parameter file path", "Build process Parameters JSON file.", args.StringArgument,null); this.registerCommandArgument("priority", "build queue priority", "Queue a build with priority 1 [High] - 5 [Low] default = 3 [Normal]).", args.IntArgument, null); this.registerCommandArgument("version","Build Sources Version", "the source version for the queued build.",args.StringArgument,null); + this.registerCommandArgument("shelveset", "Shelveset to validate", "the shelveset to queue in the build.", args.StringArgument,null ); + this.registerCommandArgument("poolId", "Agent Pool Id", "Required Agent pool ID For Edit.", args.IntArgument,null); + this.registerCommandArgument("agentId", "Agent ID", "Required Agent ID For Edit.", args.IntArgument,null); } public exec(cmd?: any): Q.Promise { diff --git a/app/exec/build/queue.ts b/app/exec/build/queue.ts index 3fb837be..a7cfbec6 100644 --- a/app/exec/build/queue.ts +++ b/app/exec/build/queue.ts @@ -19,7 +19,7 @@ export class BuildQueue extends buildBase.BuildBase { @@ -51,7 +51,9 @@ export class BuildQueue extends buildBase.BuildBase { trace.debug("build source version: %s", version ? version: "Latest") - return this._queueBuild(buildapi, definition, project, parameters, priority, version); + return this.commandArgs.shelveset.val().then((shelveset) => { + return this._queueBuild(buildapi, definition, project, parameters, priority, version, shelveset); + }); }); }); }); @@ -66,15 +68,17 @@ export class BuildQueue extends buildBase.BuildBase Date: Mon, 20 Jun 2016 17:31:03 +0300 Subject: [PATCH 024/235] added functionality to query agent in pool --- app/exec/build/agent.ts | 34 +++++++++++++++++++++------------- app/exec/build/details.ts | 1 + 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/app/exec/build/agent.ts b/app/exec/build/agent.ts index 4d8e1ec2..7063ccef 100644 --- a/app/exec/build/agent.ts +++ b/app/exec/build/agent.ts @@ -1,6 +1,6 @@ import { TfCommand } from "../../lib/tfcommand"; import args = require("../../lib/arguments"); -import buildBase = require("./default"); +import agentBase = require("./Tasks/default"); import agentClient = require("vso-node-api/TaskAgentApiBase"); import taskAgentContracts = require("vso-node-api/interfaces/TaskAgentInterfaces"); import trace = require("../../lib/trace"); @@ -10,7 +10,7 @@ export function getCommand(args: string[]): Agent { return new Agent(args); } -export class Agent extends buildBase.BuildBase { +export class Agent extends agentBase.BuildTaskBase { protected description = "Show task agent details."; protected getHelpArgs(): string[] { @@ -19,25 +19,33 @@ export class Agent extends buildBase.BuildBase { trace.debug("agent.exec"); - var agentapi: agentClient.IQTaskAgentApiBase = this.webApi.getQTaskAgentApi(); + var agentapi: agentClient.IQTaskAgentApiBase = this.webApi.getQTaskAgentApi(this.connection.getCollectionUrl().substring(0,this.connection.getCollectionUrl().lastIndexOf("/"))); return this.commandArgs.poolId.val().then((pool) => { - trace.debug("getting agent pool: %s",pool); + trace.debug("getting pool : %s",pool); return this.commandArgs.agentId.val().then((agent) => { - trace.debug("getting agent : %s", agent); + trace.debug("getting agent : %s", agent); return agentapi.getAgent(pool,agent,true,true,null); }); }); } public friendlyOutput(agent: taskAgentContracts.TaskAgent): void { - //if (!agent) { - // throw new Error("no agent / pool supplied"); - //} + if (!agent) { + throw new Error("agent / pool not supplied or not found"); + } trace.println(); - trace.info("Agent id : %s", agent.id ? agent.id : "unknown"); - trace.info("Agent name : %s", agent.name ? agent.name : "unknown"); - trace.info("Version : %s", agent.version ? agent.version : "unknown"); - trace.info("status : %s", agent.status[agent.status]); - trace.info("queue time : %s", agent.enabled ? agent.enabled : "unknown"); + trace.info("Agent id : %s", agent.id ? agent.id : "unknown"); + trace.info("Agent name : %s", agent.name ? agent.name : "unknown"); + trace.info("Version : %s", agent.version ? agent.version : "unknown"); + trace.info("status : %s", agent.status ? agent.status : "unknown"); + trace.info("enabled : %s", agent.enabled ? agent.enabled : "unknown"); + trace.info("System capabilities : "); + for (var key in agent.systemCapabilities) { + trace.info(" %s : %s",key , agent.systemCapabilities[key]); + } + trace.info("User capabilities : "); + for (var key in agent.userCapabilities) { + trace.info(" %s : %s", key ,agent.userCapabilities[key]); + } } } \ No newline at end of file diff --git a/app/exec/build/details.ts b/app/exec/build/details.ts index 234d6edd..50e416ca 100644 --- a/app/exec/build/details.ts +++ b/app/exec/build/details.ts @@ -4,6 +4,7 @@ import buildBase = require("./default"); import buildClient = require("vso-node-api/BuildApi"); import buildContracts = require("vso-node-api/interfaces/BuildInterfaces"); import trace = require("../../lib/trace"); +import tl = require("vsts-task-lib/task"); export function getCommand(args: string[]): BuildDetails { return new BuildDetails(args); From 2671bf65de3d83f593b589fc3330b425ba5f5d02 Mon Sep 17 00:00:00 2001 From: sfeldman Date: Mon, 20 Jun 2016 17:45:31 +0300 Subject: [PATCH 025/235] added a get agents from pool command --- app/exec/build/agents.ts | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 app/exec/build/agents.ts diff --git a/app/exec/build/agents.ts b/app/exec/build/agents.ts new file mode 100644 index 00000000..0374f9e5 --- /dev/null +++ b/app/exec/build/agents.ts @@ -0,0 +1,39 @@ +import { TfCommand } from "../../lib/tfcommand"; +import args = require("../../lib/arguments"); +import agentBase = require("./Tasks/default"); +import agentClient = require("vso-node-api/TaskAgentApiBase"); +import taskAgentContracts = require("vso-node-api/interfaces/TaskAgentInterfaces"); +import trace = require("../../lib/trace"); +import taskAgentApi = require("vso-node-api/TaskAgentApi"); + +export function getCommand(args: string[]): Agent { + return new Agent(args); +} + +export class Agent extends agentBase.BuildTaskBase { + protected description = "Show task agent details."; + + protected getHelpArgs(): string[] { + return ["poolId"]; + } + + public exec(): Q.Promise { + trace.debug("agent.exec"); + var agentapi: agentClient.IQTaskAgentApiBase = this.webApi.getQTaskAgentApi(this.connection.getCollectionUrl().substring(0,this.connection.getCollectionUrl().lastIndexOf("/"))); + return this.commandArgs.poolId.val().then((pool) => { + trace.debug("getting pool : %s",pool); + return agentapi.getAgents(pool); + }); + } + + public friendlyOutput(agents: taskAgentContracts.TaskAgent[]): void { + if (!agents) { + throw new Error("pool not supplied or not found"); + } + trace.info("Agents in pool:") + trace.println(); + agents.forEach((agent) => { + trace.info(" %s : %s (version: %s)", agent.name,agent.id, agent.version); + }); + } +} From bf3fc92beeeeee925691d7885ade2856539ad59f Mon Sep 17 00:00:00 2001 From: sfeldman Date: Tue, 21 Jun 2016 11:44:03 +0300 Subject: [PATCH 026/235] add ability to update task Agent capabilities --- app/exec/build/agent.ts | 29 +++++++++++++++++++++++------ app/exec/build/agents.ts | 10 +++++----- app/exec/build/default.ts | 4 ++++ app/exec/build/pools.ts | 36 ++++++++++++++++++++++++++++++++++++ 4 files changed, 68 insertions(+), 11 deletions(-) create mode 100644 app/exec/build/pools.ts diff --git a/app/exec/build/agent.ts b/app/exec/build/agent.ts index 7063ccef..7b50750d 100644 --- a/app/exec/build/agent.ts +++ b/app/exec/build/agent.ts @@ -14,7 +14,7 @@ export class Agent extends agentBase.BuildTaskBase protected description = "Show task agent details."; protected getHelpArgs(): string[] { - return ["poolId", "agentId"]; + return ["poolId", "agentId","userCapabilityKey","userCapabilityValue"]; } public exec(): Q.Promise { @@ -22,9 +22,22 @@ export class Agent extends agentBase.BuildTaskBase var agentapi: agentClient.IQTaskAgentApiBase = this.webApi.getQTaskAgentApi(this.connection.getCollectionUrl().substring(0,this.connection.getCollectionUrl().lastIndexOf("/"))); return this.commandArgs.poolId.val().then((pool) => { trace.debug("getting pool : %s",pool); - return this.commandArgs.agentId.val().then((agent) => { - trace.debug("getting agent : %s", agent); - return agentapi.getAgent(pool,agent,true,true,null); + return this.commandArgs.agentId.val().then((agentid) => { + trace.debug("getting agent : %s", agentid); + return this.commandArgs.userCapabilityKey.val().then((newkey) => { + return this.commandArgs.userCapabilityValue.val().then((value) => { + return agentapi.getAgent(pool,agentid,true,true,null).then((agent) => { + var include: boolean = true; + if (newkey) { + include = false; + var capabilities: { [key: string] : string; } = agent.userCapabilities; + capabilities[newkey] = value; + agentapi.updateAgentUserCapabilities(capabilities,pool,agentid); + }; + return agentapi.getAgent(pool,agentid,include,include,null); + }); + }); + }); }); }); } @@ -39,11 +52,15 @@ export class Agent extends agentBase.BuildTaskBase trace.info("Version : %s", agent.version ? agent.version : "unknown"); trace.info("status : %s", agent.status ? agent.status : "unknown"); trace.info("enabled : %s", agent.enabled ? agent.enabled : "unknown"); - trace.info("System capabilities : "); + if (agent.systemCapabilities){ + trace.info("System capabilities : "); + } for (var key in agent.systemCapabilities) { trace.info(" %s : %s",key , agent.systemCapabilities[key]); } - trace.info("User capabilities : "); + if (agent.userCapabilities) { + trace.info("User capabilities : "); + } for (var key in agent.userCapabilities) { trace.info(" %s : %s", key ,agent.userCapabilities[key]); } diff --git a/app/exec/build/agents.ts b/app/exec/build/agents.ts index 0374f9e5..2f5f431f 100644 --- a/app/exec/build/agents.ts +++ b/app/exec/build/agents.ts @@ -6,11 +6,11 @@ import taskAgentContracts = require("vso-node-api/interfaces/TaskAgentInterfaces import trace = require("../../lib/trace"); import taskAgentApi = require("vso-node-api/TaskAgentApi"); -export function getCommand(args: string[]): Agent { - return new Agent(args); +export function getCommand(args: string[]): Agents { + return new Agents(args); } -export class Agent extends agentBase.BuildTaskBase { +export class Agents extends agentBase.BuildTaskBase { protected description = "Show task agent details."; protected getHelpArgs(): string[] { @@ -18,7 +18,7 @@ export class Agent extends agentBase.BuildTaskBase } public exec(): Q.Promise { - trace.debug("agent.exec"); + trace.debug("agents.exec"); var agentapi: agentClient.IQTaskAgentApiBase = this.webApi.getQTaskAgentApi(this.connection.getCollectionUrl().substring(0,this.connection.getCollectionUrl().lastIndexOf("/"))); return this.commandArgs.poolId.val().then((pool) => { trace.debug("getting pool : %s",pool); @@ -33,7 +33,7 @@ export class Agent extends agentBase.BuildTaskBase trace.info("Agents in pool:") trace.println(); agents.forEach((agent) => { - trace.info(" %s : %s (version: %s)", agent.name,agent.id, agent.version); + trace.info(" %s (%s) : %s ", agent.id,agent.version, agent.name); }); } } diff --git a/app/exec/build/default.ts b/app/exec/build/default.ts index e7c77de4..51f6ae60 100644 --- a/app/exec/build/default.ts +++ b/app/exec/build/default.ts @@ -13,6 +13,8 @@ export interface BuildArguments extends CoreArguments { shelveset: args.StringArgument; poolId: args.IntArgument; agentId: args.IntArgument; + userCapabilityKey: args.StringArgument; + userCapabilityValue: args.StringArgument; } export function getCommand(args: string[]): BuildBase { @@ -36,6 +38,8 @@ export class BuildBase extends TfCom this.registerCommandArgument("shelveset", "Shelveset to validate", "the shelveset to queue in the build.", args.StringArgument,null ); this.registerCommandArgument("poolId", "Agent Pool Id", "Required Agent pool ID For Edit.", args.IntArgument,null); this.registerCommandArgument("agentId", "Agent ID", "Required Agent ID For Edit.", args.IntArgument,null); + this.registerCommandArgument("userCapabilityKey", "Capability to add / edit", "Capability to add / edit to the Agent.", args.StringArgument,null); + this.registerCommandArgument("userCapabilityValue", "Value to add / edit", "Value to add / edit to the Agent User Capabilities.", args.StringArgument,null); } public exec(cmd?: any): Q.Promise { diff --git a/app/exec/build/pools.ts b/app/exec/build/pools.ts new file mode 100644 index 00000000..42e60409 --- /dev/null +++ b/app/exec/build/pools.ts @@ -0,0 +1,36 @@ +import { TfCommand } from "../../lib/tfcommand"; +import args = require("../../lib/arguments"); +import agentBase = require("./Tasks/default"); +import agentClient = require("vso-node-api/TaskAgentApiBase"); +import taskAgentContracts = require("vso-node-api/interfaces/TaskAgentInterfaces"); +import trace = require("../../lib/trace"); +import taskAgentApi = require("vso-node-api/TaskAgentApi"); + +export function getCommand(args: string[]): Pools { + return new Pools(args); +} + +export class Pools extends agentBase.BuildTaskBase { + protected description = "Show task agent details."; + + protected getHelpArgs(): string[] { + return []; + } + + public exec(): Q.Promise { + trace.debug("pool.exec"); + var agentapi: agentClient.IQTaskAgentApiBase = this.webApi.getQTaskAgentApi(this.connection.getCollectionUrl().substring(0,this.connection.getCollectionUrl().lastIndexOf("/"))); + return agentapi.getAgentPools(); + } + + public friendlyOutput(pools: taskAgentContracts.TaskAgentPool[]): void { + if (!pools) { + throw new Error("pool not supplied or not found"); + } + trace.info("Pools on server:") + trace.println(); + pools.forEach((pool) => { + trace.info(" %s : %s ", pool.id, pool.name); + }); + } +} From d2b4d2fc2c9652792d50c9dca0ff24f309377d1f Mon Sep 17 00:00:00 2001 From: sfeldman Date: Tue, 21 Jun 2016 12:31:39 +0300 Subject: [PATCH 027/235] change Agent status to value of AgentStatus Enum --- app/exec/build/agent.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/exec/build/agent.ts b/app/exec/build/agent.ts index 7b50750d..a1868da3 100644 --- a/app/exec/build/agent.ts +++ b/app/exec/build/agent.ts @@ -50,7 +50,7 @@ export class Agent extends agentBase.BuildTaskBase trace.info("Agent id : %s", agent.id ? agent.id : "unknown"); trace.info("Agent name : %s", agent.name ? agent.name : "unknown"); trace.info("Version : %s", agent.version ? agent.version : "unknown"); - trace.info("status : %s", agent.status ? agent.status : "unknown"); + trace.info("status : %s", agent.status ? taskAgentContracts.TaskAgentStatus[agent.status] : "unknown"); trace.info("enabled : %s", agent.enabled ? agent.enabled : "unknown"); if (agent.systemCapabilities){ trace.info("System capabilities : "); From b0c4f138c65f5fde5a18ea3d4cc3b4c546986c02 Mon Sep 17 00:00:00 2001 From: sfeldman Date: Tue, 21 Jun 2016 14:09:49 +0300 Subject: [PATCH 028/235] chage some help text --- app/exec/build/agent.ts | 2 +- app/exec/build/agents.ts | 2 +- app/exec/build/pools.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/exec/build/agent.ts b/app/exec/build/agent.ts index a1868da3..f5293475 100644 --- a/app/exec/build/agent.ts +++ b/app/exec/build/agent.ts @@ -11,7 +11,7 @@ export function getCommand(args: string[]): Agent { } export class Agent extends agentBase.BuildTaskBase { - protected description = "Show task agent details."; + protected description = "Show / Update task agent details."; protected getHelpArgs(): string[] { return ["poolId", "agentId","userCapabilityKey","userCapabilityValue"]; diff --git a/app/exec/build/agents.ts b/app/exec/build/agents.ts index 2f5f431f..c719998b 100644 --- a/app/exec/build/agents.ts +++ b/app/exec/build/agents.ts @@ -11,7 +11,7 @@ export function getCommand(args: string[]): Agents { } export class Agents extends agentBase.BuildTaskBase { - protected description = "Show task agent details."; + protected description = "Show task agent list in a pool."; protected getHelpArgs(): string[] { return ["poolId"]; diff --git a/app/exec/build/pools.ts b/app/exec/build/pools.ts index 42e60409..ed4caca5 100644 --- a/app/exec/build/pools.ts +++ b/app/exec/build/pools.ts @@ -11,7 +11,7 @@ export function getCommand(args: string[]): Pools { } export class Pools extends agentBase.BuildTaskBase { - protected description = "Show task agent details."; + protected description = "Show agent pool list."; protected getHelpArgs(): string[] { return []; From 973e05a28247cbbdcca85df91ce68f17df086ad9 Mon Sep 17 00:00:00 2001 From: sfeldman Date: Tue, 21 Jun 2016 18:13:06 +0300 Subject: [PATCH 029/235] add the ability to queue a build with dynamic demand --- app/exec/build/default.ts | 2 ++ app/exec/build/queue.ts | 14 +++++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/app/exec/build/default.ts b/app/exec/build/default.ts index 51f6ae60..2a43bcca 100644 --- a/app/exec/build/default.ts +++ b/app/exec/build/default.ts @@ -15,6 +15,7 @@ export interface BuildArguments extends CoreArguments { agentId: args.IntArgument; userCapabilityKey: args.StringArgument; userCapabilityValue: args.StringArgument; + demand: args.StringArgument; } export function getCommand(args: string[]): BuildBase { @@ -40,6 +41,7 @@ export class BuildBase extends TfCom this.registerCommandArgument("agentId", "Agent ID", "Required Agent ID For Edit.", args.IntArgument,null); this.registerCommandArgument("userCapabilityKey", "Capability to add / edit", "Capability to add / edit to the Agent.", args.StringArgument,null); this.registerCommandArgument("userCapabilityValue", "Value to add / edit", "Value to add / edit to the Agent User Capabilities.", args.StringArgument,null); + this.registerCommandArgument("demand","Build demand key","Demand string for Queued Build ( / -equals ).",args.StringArgument,null); } public exec(cmd?: any): Q.Promise { diff --git a/app/exec/build/queue.ts b/app/exec/build/queue.ts index a7cfbec6..11a88b9d 100644 --- a/app/exec/build/queue.ts +++ b/app/exec/build/queue.ts @@ -19,7 +19,7 @@ export class BuildQueue extends buildBase.BuildBase { @@ -52,8 +52,10 @@ export class BuildQueue extends buildBase.BuildBase { trace.debug("build source version: %s", version ? version: "Latest") return this.commandArgs.shelveset.val().then((shelveset) => { - return this._queueBuild(buildapi, definition, project, parameters, priority, version, shelveset); - }); + return this.commandArgs.demand.val().then((demand) => { + return this._queueBuild(buildapi, definition, project, parameters, priority, version, shelveset,demand); + }); + }); }); }); }); @@ -78,7 +80,7 @@ export class BuildQueue extends buildBase.BuildBase Date: Tue, 21 Jun 2016 20:31:06 +0300 Subject: [PATCH 030/235] remove redundent argument --- app/exec/build/queue.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/exec/build/queue.ts b/app/exec/build/queue.ts index 11a88b9d..80050dae 100644 --- a/app/exec/build/queue.ts +++ b/app/exec/build/queue.ts @@ -19,7 +19,7 @@ export class BuildQueue extends buildBase.BuildBase { From 3b6431973c890c779d20174ca237c7353eb3038d Mon Sep 17 00:00:00 2001 From: sfeldman Date: Tue, 21 Jun 2016 21:06:24 +0300 Subject: [PATCH 031/235] fix broken help context --- app/exec/build/agent.ts | 6 +++--- app/exec/build/agents.ts | 4 ++-- app/exec/build/default.ts | 2 +- app/exec/build/pools.ts | 4 ++-- app/exec/build/tasks/default.ts | 7 +++---- 5 files changed, 11 insertions(+), 12 deletions(-) diff --git a/app/exec/build/agent.ts b/app/exec/build/agent.ts index f5293475..e6b0f387 100644 --- a/app/exec/build/agent.ts +++ b/app/exec/build/agent.ts @@ -1,6 +1,6 @@ import { TfCommand } from "../../lib/tfcommand"; import args = require("../../lib/arguments"); -import agentBase = require("./Tasks/default"); +import agentBase = require("./default"); import agentClient = require("vso-node-api/TaskAgentApiBase"); import taskAgentContracts = require("vso-node-api/interfaces/TaskAgentInterfaces"); import trace = require("../../lib/trace"); @@ -10,11 +10,11 @@ export function getCommand(args: string[]): Agent { return new Agent(args); } -export class Agent extends agentBase.BuildTaskBase { +export class Agent extends agentBase.BuildBase { protected description = "Show / Update task agent details."; protected getHelpArgs(): string[] { - return ["poolId", "agentId","userCapabilityKey","userCapabilityValue"]; + return ["poolId","agentId","userCapabilityKey","userCapabilityValue"]; } public exec(): Q.Promise { diff --git a/app/exec/build/agents.ts b/app/exec/build/agents.ts index c719998b..b2005ac6 100644 --- a/app/exec/build/agents.ts +++ b/app/exec/build/agents.ts @@ -1,6 +1,6 @@ import { TfCommand } from "../../lib/tfcommand"; import args = require("../../lib/arguments"); -import agentBase = require("./Tasks/default"); +import agentBase = require("./default"); import agentClient = require("vso-node-api/TaskAgentApiBase"); import taskAgentContracts = require("vso-node-api/interfaces/TaskAgentInterfaces"); import trace = require("../../lib/trace"); @@ -10,7 +10,7 @@ export function getCommand(args: string[]): Agents { return new Agents(args); } -export class Agents extends agentBase.BuildTaskBase { +export class Agents extends agentBase.BuildBase { protected description = "Show task agent list in a pool."; protected getHelpArgs(): string[] { diff --git a/app/exec/build/default.ts b/app/exec/build/default.ts index 2a43bcca..f50357a0 100644 --- a/app/exec/build/default.ts +++ b/app/exec/build/default.ts @@ -41,7 +41,7 @@ export class BuildBase extends TfCom this.registerCommandArgument("agentId", "Agent ID", "Required Agent ID For Edit.", args.IntArgument,null); this.registerCommandArgument("userCapabilityKey", "Capability to add / edit", "Capability to add / edit to the Agent.", args.StringArgument,null); this.registerCommandArgument("userCapabilityValue", "Value to add / edit", "Value to add / edit to the Agent User Capabilities.", args.StringArgument,null); - this.registerCommandArgument("demand","Build demand key","Demand string for Queued Build ( / -equals ).",args.StringArgument,null); + this.registerCommandArgument("demand","Build demand key","Demand string for Queued Build [key / key -equals value.",args.StringArgument,null); } public exec(cmd?: any): Q.Promise { diff --git a/app/exec/build/pools.ts b/app/exec/build/pools.ts index ed4caca5..519fa6ee 100644 --- a/app/exec/build/pools.ts +++ b/app/exec/build/pools.ts @@ -1,6 +1,6 @@ import { TfCommand } from "../../lib/tfcommand"; import args = require("../../lib/arguments"); -import agentBase = require("./Tasks/default"); +import agentBase = require("./default"); import agentClient = require("vso-node-api/TaskAgentApiBase"); import taskAgentContracts = require("vso-node-api/interfaces/TaskAgentInterfaces"); import trace = require("../../lib/trace"); @@ -10,7 +10,7 @@ export function getCommand(args: string[]): Pools { return new Pools(args); } -export class Pools extends agentBase.BuildTaskBase { +export class Pools extends agentBase.BuildBase { protected description = "Show agent pool list."; protected getHelpArgs(): string[] { diff --git a/app/exec/build/tasks/default.ts b/app/exec/build/tasks/default.ts index 3e150445..a7845795 100644 --- a/app/exec/build/tasks/default.ts +++ b/app/exec/build/tasks/default.ts @@ -28,11 +28,10 @@ export class BuildTaskBase extends buildBase.BuildBase { this.registerCommandArgument("taskId", "Task ID", "Identifies a particular Build Task.", args.StringArgument); this.registerCommandArgument("taskPath", "Task path", "Local path to a Build Task.", args.ExistingDirectoriesArgument); this.registerCommandArgument("overwrite", "Overwrite?", "Overwrite existing Build Task.", args.BooleanArgument, "false"); - this.registerCommandArgument("taskName", "Task Name", "Name of the Build Task.", args.StringArgument); - this.registerCommandArgument("friendlyName", "Friendly Task Name", null, args.StringArgument); - this.registerCommandArgument("description", "Task Description", null, args.StringArgument); - this.registerCommandArgument("author", "Task Author", null, args.StringArgument); + this.registerCommandArgument("friendlyName", "Friendly Task Name.", null, args.StringArgument); + this.registerCommandArgument("description", "Task Description.", null, args.StringArgument); + this.registerCommandArgument("author", "Task Author.", null, args.StringArgument); } public exec(cmd?: any): Q.Promise { From ae42ede346dca57533e913c9b49d2e6730f5969c Mon Sep 17 00:00:00 2001 From: sfeldman Date: Tue, 21 Jun 2016 21:21:20 +0300 Subject: [PATCH 032/235] minor fixes --- app/exec/build/queue.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/exec/build/queue.ts b/app/exec/build/queue.ts index 80050dae..223f9657 100644 --- a/app/exec/build/queue.ts +++ b/app/exec/build/queue.ts @@ -52,6 +52,7 @@ export class BuildQueue extends buildBase.BuildBase { trace.debug("build source version: %s", version ? version: "Latest") return this.commandArgs.shelveset.val().then((shelveset) => { + trace.debug("shelveset name: %s", shelveset ? shelveset: "none") return this.commandArgs.demand.val().then((demand) => { return this._queueBuild(buildapi, definition, project, parameters, priority, version, shelveset,demand); }); @@ -98,6 +99,6 @@ export class BuildQueue extends buildBase.BuildBase Date: Wed, 22 Jun 2016 09:07:05 +0300 Subject: [PATCH 033/235] add the ability to queue build with multiple demands --- app/exec/build/details.ts | 2 +- app/exec/build/queue.ts | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/app/exec/build/details.ts b/app/exec/build/details.ts index 50e416ca..53b77b87 100644 --- a/app/exec/build/details.ts +++ b/app/exec/build/details.ts @@ -47,6 +47,6 @@ export class BuildDetails extends buildBase.BuildBase { + if (demand.indexOf(";") >= 0) { + var demandList: string[] = demand.split(";"); + } + var build = { definition: definition, priority: priority ? priority: 3, parameters: parameters, sourceVersion: version, sourceBranch: shelveset, - demands: [("%s",demand)] + demands: demandList ? demandList : [("%s",demand)] }; return buildapi.queueBuild(build, project); From 474467928124b60e9e69a9d44bf3345a5e9ad716 Mon Sep 17 00:00:00 2001 From: sfeldman Date: Wed, 22 Jun 2016 09:29:49 +0300 Subject: [PATCH 034/235] add some help text and small context changes --- app/exec/build/default.ts | 4 ++-- app/exec/build/queue.ts | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/exec/build/default.ts b/app/exec/build/default.ts index f50357a0..68ecf6b0 100644 --- a/app/exec/build/default.ts +++ b/app/exec/build/default.ts @@ -15,7 +15,7 @@ export interface BuildArguments extends CoreArguments { agentId: args.IntArgument; userCapabilityKey: args.StringArgument; userCapabilityValue: args.StringArgument; - demand: args.StringArgument; + demands: args.StringArgument; } export function getCommand(args: string[]): BuildBase { @@ -41,7 +41,7 @@ export class BuildBase extends TfCom this.registerCommandArgument("agentId", "Agent ID", "Required Agent ID For Edit.", args.IntArgument,null); this.registerCommandArgument("userCapabilityKey", "Capability to add / edit", "Capability to add / edit to the Agent.", args.StringArgument,null); this.registerCommandArgument("userCapabilityValue", "Value to add / edit", "Value to add / edit to the Agent User Capabilities.", args.StringArgument,null); - this.registerCommandArgument("demand","Build demand key","Demand string for Queued Build [key / key -equals value.",args.StringArgument,null); + this.registerCommandArgument("demands","Build demand key","Demands string [semi-colon separator] for Queued Build [key / key -equals value].",args.StringArgument,null); } public exec(cmd?: any): Q.Promise { diff --git a/app/exec/build/queue.ts b/app/exec/build/queue.ts index e8d357be..9762f6f0 100644 --- a/app/exec/build/queue.ts +++ b/app/exec/build/queue.ts @@ -19,7 +19,7 @@ export class BuildQueue extends buildBase.BuildBase { @@ -53,8 +53,8 @@ export class BuildQueue extends buildBase.BuildBase { trace.debug("shelveset name: %s", shelveset ? shelveset: "none") - return this.commandArgs.demand.val().then((demand) => { - return this._queueBuild(buildapi, definition, project, parameters, priority, version, shelveset,demand); + return this.commandArgs.demands.val().then((demands) => { + return this._queueBuild(buildapi, definition, project, parameters, priority, version, shelveset,demands); }); }); }); @@ -87,7 +87,7 @@ export class BuildQueue extends buildBase.BuildBase= 0) { - var demandList: string[] = demand.split(";"); + if (demands.indexOf(";") >= 0) { + var demandList: string[] = demands.split(";"); } var build = { definition: definition, @@ -105,7 +105,7 @@ export class BuildQueue extends buildBase.BuildBase Date: Sun, 3 Jul 2016 12:26:05 +0300 Subject: [PATCH 035/235] add ability to query and edit agent capabilities by agent name and id (not only id) --- app/exec/build/agent.ts | 54 +++++++++++++++++++++++++++++---------- app/exec/build/default.ts | 4 ++- 2 files changed, 44 insertions(+), 14 deletions(-) diff --git a/app/exec/build/agent.ts b/app/exec/build/agent.ts index e6b0f387..2f5e28f0 100644 --- a/app/exec/build/agent.ts +++ b/app/exec/build/agent.ts @@ -5,6 +5,7 @@ import agentClient = require("vso-node-api/TaskAgentApiBase"); import taskAgentContracts = require("vso-node-api/interfaces/TaskAgentInterfaces"); import trace = require("../../lib/trace"); import taskAgentApi = require("vso-node-api/TaskAgentApi"); +import Q = require("q"); export function getCommand(args: string[]): Agent { return new Agent(args); @@ -14,33 +15,60 @@ export class Agent extends agentBase.BuildBase { trace.debug("agent.exec"); var agentapi: agentClient.IQTaskAgentApiBase = this.webApi.getQTaskAgentApi(this.connection.getCollectionUrl().substring(0,this.connection.getCollectionUrl().lastIndexOf("/"))); - return this.commandArgs.poolId.val().then((pool) => { + return Q.all([ + this.commandArgs.agentId.val(), + this.commandArgs.agentName.val(), + this.commandArgs.poolId.val(), + this.commandArgs.userCapabilityKey.val(), + this.commandArgs.userCapabilityValue.val() + ]).spread((agentid, agentname, pool, newkey, value) => { + var agents: number[] = null; trace.debug("getting pool : %s",pool); - return this.commandArgs.agentId.val().then((agentid) => { - trace.debug("getting agent : %s", agentid); - return this.commandArgs.userCapabilityKey.val().then((newkey) => { - return this.commandArgs.userCapabilityValue.val().then((value) => { + trace.debug("getting agent (id) : %s", agentid); + trace.debug("getting agent (name) : %s", agentname); + var include: boolean = true; + if (agentid) { + agents = [agentid]; + } + else if(agentname) { + trace.debug("No agent Id provided, checking for agent with name " + agentname); + return agentapi.getAgents(pool, agentname).then((ao: taskAgentContracts.TaskAgent[]) => { + if(ao.length > 0) { + agentid = ao[0].id; + trace.debug("found, agent id %s for agent name %s",agentid, agentname); return agentapi.getAgent(pool,agentid,true,true,null).then((agent) => { - var include: boolean = true; - if (newkey) { + if (newkey) { include = false; var capabilities: { [key: string] : string; } = agent.userCapabilities; capabilities[newkey] = value; agentapi.updateAgentUserCapabilities(capabilities,pool,agentid); - }; + }; return agentapi.getAgent(pool,agentid,include,include,null); - }); - }); + });; + } + else { + trace.debug("No agents found with name " + agentname); + throw new Error("No agents found with name " + agentname); + } }); + } + return agentapi.getAgent(pool,agentid,true,true,null).then((agent) => { + if (newkey) { + include = false; + var capabilities: { [key: string] : string; } = agent.userCapabilities; + capabilities[newkey] = value; + agentapi.updateAgentUserCapabilities(capabilities,pool,agentid); + }; + return agentapi.getAgent(pool,agentid,include,include,null); + }); }); - }); - } + }; public friendlyOutput(agent: taskAgentContracts.TaskAgent): void { if (!agent) { diff --git a/app/exec/build/default.ts b/app/exec/build/default.ts index 68ecf6b0..93a7eadd 100644 --- a/app/exec/build/default.ts +++ b/app/exec/build/default.ts @@ -13,6 +13,7 @@ export interface BuildArguments extends CoreArguments { shelveset: args.StringArgument; poolId: args.IntArgument; agentId: args.IntArgument; + agentName: args.StringArgument; userCapabilityKey: args.StringArgument; userCapabilityValue: args.StringArgument; demands: args.StringArgument; @@ -38,7 +39,8 @@ export class BuildBase extends TfCom this.registerCommandArgument("version","Build Sources Version", "the source version for the queued build.",args.StringArgument,null); this.registerCommandArgument("shelveset", "Shelveset to validate", "the shelveset to queue in the build.", args.StringArgument,null ); this.registerCommandArgument("poolId", "Agent Pool Id", "Required Agent pool ID For Edit.", args.IntArgument,null); - this.registerCommandArgument("agentId", "Agent ID", "Required Agent ID For Edit.", args.IntArgument,null); + this.registerCommandArgument("agentId", "Agent ID", "Required Agent ID.", args.IntArgument,null); + this.registerCommandArgument("agentName", "Agent Name", "Required Agent Name.", args.StringArgument,null); this.registerCommandArgument("userCapabilityKey", "Capability to add / edit", "Capability to add / edit to the Agent.", args.StringArgument,null); this.registerCommandArgument("userCapabilityValue", "Value to add / edit", "Value to add / edit to the Agent User Capabilities.", args.StringArgument,null); this.registerCommandArgument("demands","Build demand key","Demands string [semi-colon separator] for Queued Build [key / key -equals value].",args.StringArgument,null); From fff62e9e43bfb0780c4459322d3212b9fe35c8d2 Mon Sep 17 00:00:00 2001 From: sfeldman Date: Sun, 3 Jul 2016 14:46:43 +0300 Subject: [PATCH 036/235] remove duplicate code and move it to _getOrUpdateAgent --- app/exec/build/agent.ts | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/app/exec/build/agent.ts b/app/exec/build/agent.ts index 2f5e28f0..57d4d1f3 100644 --- a/app/exec/build/agent.ts +++ b/app/exec/build/agent.ts @@ -42,15 +42,7 @@ export class Agent extends agentBase.BuildBase 0) { agentid = ao[0].id; trace.debug("found, agent id %s for agent name %s",agentid, agentname); - return agentapi.getAgent(pool,agentid,true,true,null).then((agent) => { - if (newkey) { - include = false; - var capabilities: { [key: string] : string; } = agent.userCapabilities; - capabilities[newkey] = value; - agentapi.updateAgentUserCapabilities(capabilities,pool,agentid); - }; - return agentapi.getAgent(pool,agentid,include,include,null); - });; + return this._getOrUpdateAgent(agentapi, pool,agentid,newkey,value,include); } else { trace.debug("No agents found with name " + agentname); @@ -58,15 +50,7 @@ export class Agent extends agentBase.BuildBase { - if (newkey) { - include = false; - var capabilities: { [key: string] : string; } = agent.userCapabilities; - capabilities[newkey] = value; - agentapi.updateAgentUserCapabilities(capabilities,pool,agentid); - }; - return agentapi.getAgent(pool,agentid,include,include,null); - }); + return this._getOrUpdateAgent(agentapi, pool,agentid,newkey,value,include); }); }; @@ -93,4 +77,15 @@ export class Agent extends agentBase.BuildBase { + if (newkey) { + include = false; + var capabilities: { [key: string] : string; } = agent.userCapabilities; + capabilities[newkey] = value; + agentapi.updateAgentUserCapabilities(capabilities,pool,agentid); + }; + return agentapi.getAgent(pool,agentid,include,include,null); + }); + } } \ No newline at end of file From 275ab99621f6ab8c12a918da0d6c17f04751e763 Mon Sep 17 00:00:00 2001 From: sfeldman Date: Mon, 4 Jul 2016 09:30:38 +0300 Subject: [PATCH 037/235] fix queue build with no demands --- app/exec/build/queue.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/exec/build/queue.ts b/app/exec/build/queue.ts index 9762f6f0..47142b2c 100644 --- a/app/exec/build/queue.ts +++ b/app/exec/build/queue.ts @@ -54,7 +54,8 @@ export class BuildQueue extends buildBase.BuildBase { trace.debug("shelveset name: %s", shelveset ? shelveset: "none") return this.commandArgs.demands.val().then((demands) => { - return this._queueBuild(buildapi, definition, project, parameters, priority, version, shelveset,demands); + trace.debug("build demands : %s", demands ? demands: "none") + return this._queueBuild(buildapi, definition, project, parameters, priority, version, shelveset,demands ? demands:""); }); }); }); @@ -96,9 +97,9 @@ export class BuildQueue extends buildBase.BuildBase= 0) { + if (demands && demands.indexOf(";") >= 0) { var demandList: string[] = demands.split(";"); - } + } var build = { definition: definition, priority: priority ? priority: 3, From 5e9747e5ae4551b141af77cfd23c88020963b361 Mon Sep 17 00:00:00 2001 From: sfeldman Date: Wed, 13 Jul 2016 16:19:43 +0300 Subject: [PATCH 038/235] add functionality of enable / disable agent from build agent command --- app/exec/build/agent.ts | 29 +++++++++++++++++++++++------ app/exec/build/default.ts | 2 ++ 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/app/exec/build/agent.ts b/app/exec/build/agent.ts index 57d4d1f3..fa45d580 100644 --- a/app/exec/build/agent.ts +++ b/app/exec/build/agent.ts @@ -15,7 +15,7 @@ export class Agent extends agentBase.BuildBase { @@ -26,8 +26,9 @@ export class Agent extends agentBase.BuildBase { + this.commandArgs.userCapabilityValue.val(), + this.commandArgs.disable.val() + ]).spread((agentid, agentname, pool, newkey, value, disable) => { var agents: number[] = null; trace.debug("getting pool : %s",pool); trace.debug("getting agent (id) : %s", agentid); @@ -42,7 +43,7 @@ export class Agent extends agentBase.BuildBase 0) { agentid = ao[0].id; trace.debug("found, agent id %s for agent name %s",agentid, agentname); - return this._getOrUpdateAgent(agentapi, pool,agentid,newkey,value,include); + return this._getOrUpdateAgent(agentapi, pool,agentid,newkey,value,include,disable); } else { trace.debug("No agents found with name " + agentname); @@ -50,7 +51,8 @@ export class Agent extends agentBase.BuildBase { + trace.debug("disable request: %s",disable); + if (disable == "true") { + include = false; + trace.debug("agent status (enabled): %s",agent.enabled); + agent.enabled = false; + agentapi.updateAgent(agent,pool,agentid); + trace.debug("agent status (enabled): %s",agent.enabled); + } + if (disable == "false") { + include = false; + trace.debug("agent status (enabled): %s",agent.enabled); + agent.enabled = true; + agentapi.updateAgent(agent,pool,agentid); + trace.debug("agent status (enabled): %s",agent.enabled); + } if (newkey) { include = false; var capabilities: { [key: string] : string; } = agent.userCapabilities; diff --git a/app/exec/build/default.ts b/app/exec/build/default.ts index 93a7eadd..b24f79b2 100644 --- a/app/exec/build/default.ts +++ b/app/exec/build/default.ts @@ -17,6 +17,7 @@ export interface BuildArguments extends CoreArguments { userCapabilityKey: args.StringArgument; userCapabilityValue: args.StringArgument; demands: args.StringArgument; + disable: args.StringArgument; } export function getCommand(args: string[]): BuildBase { @@ -44,6 +45,7 @@ export class BuildBase extends TfCom this.registerCommandArgument("userCapabilityKey", "Capability to add / edit", "Capability to add / edit to the Agent.", args.StringArgument,null); this.registerCommandArgument("userCapabilityValue", "Value to add / edit", "Value to add / edit to the Agent User Capabilities.", args.StringArgument,null); this.registerCommandArgument("demands","Build demand key","Demands string [semi-colon separator] for Queued Build [key / key -equals value].",args.StringArgument,null); + this.registerCommandArgument("disable","disable / enable agent","Update the agent status.",args.StringArgument,null); } public exec(cmd?: any): Q.Promise { From d468fbb36c13c901b3e6a8cffeb97f703b575527 Mon Sep 17 00:00:00 2001 From: sfeldman Date: Wed, 13 Jul 2016 16:39:48 +0300 Subject: [PATCH 039/235] add functionality of enable / disable agent from build agent command (add allowed values error) validate capabilities work with disable option --- app/exec/build/agent.ts | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/app/exec/build/agent.ts b/app/exec/build/agent.ts index fa45d580..29c24588 100644 --- a/app/exec/build/agent.ts +++ b/app/exec/build/agent.ts @@ -82,20 +82,25 @@ export class Agent extends agentBase.BuildBase { trace.debug("disable request: %s",disable); - if (disable == "true") { - include = false; - trace.debug("agent status (enabled): %s",agent.enabled); - agent.enabled = false; - agentapi.updateAgent(agent,pool,agentid); - trace.debug("agent status (enabled): %s",agent.enabled); - } - if (disable == "false") { - include = false; - trace.debug("agent status (enabled): %s",agent.enabled); - agent.enabled = true; - agentapi.updateAgent(agent,pool,agentid); - trace.debug("agent status (enabled): %s",agent.enabled); + if (disable) { + if (disable == "true") { + include = false; + trace.debug("agent status (enabled): %s",agent.enabled); + agent.enabled = false; + agentapi.updateAgent(agent,pool,agentid); + trace.debug("agent status (enabled): %s",agent.enabled); + } + if (disable == "false") { + include = false; + trace.debug("agent status (enabled): %s",agent.enabled); + agent.enabled = true; + agentapi.updateAgent(agent,pool,agentid); + trace.debug("agent status (enabled): %s",agent.enabled); + } + if (disable != "true" && disable != "false") { + trace.error("allowed values are [true] or [false]!") } + } if (newkey) { include = false; var capabilities: { [key: string] : string; } = agent.userCapabilities; From 1bbfadabd75171d5cf94faa80214f2ddce557b2d Mon Sep 17 00:00:00 2001 From: sfeldman Date: Fri, 15 Jul 2016 00:02:11 +0300 Subject: [PATCH 040/235] add ability to get task content from the server (with version) as zip archive --- app/exec/build/tasks/default.ts | 2 ++ app/exec/build/tasks/download.ts | 46 ++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 app/exec/build/tasks/download.ts diff --git a/app/exec/build/tasks/default.ts b/app/exec/build/tasks/default.ts index a7845795..6babf941 100644 --- a/app/exec/build/tasks/default.ts +++ b/app/exec/build/tasks/default.ts @@ -12,6 +12,7 @@ export interface TaskArguments extends buildBase.BuildArguments { friendlyName: args.StringArgument; description: args.StringArgument; author: args.StringArgument; + taskVersion :args.StringArgument; } export function getCommand(args: string[]): BuildTaskBase { @@ -32,6 +33,7 @@ export class BuildTaskBase extends buildBase.BuildBase { this.registerCommandArgument("friendlyName", "Friendly Task Name.", null, args.StringArgument); this.registerCommandArgument("description", "Task Description.", null, args.StringArgument); this.registerCommandArgument("author", "Task Author.", null, args.StringArgument); + this.registerCommandArgument("taskVersion", "Task Version", "Build Task version.", args.StringArgument); } public exec(cmd?: any): Q.Promise { diff --git a/app/exec/build/tasks/download.ts b/app/exec/build/tasks/download.ts new file mode 100644 index 00000000..704e6af9 --- /dev/null +++ b/app/exec/build/tasks/download.ts @@ -0,0 +1,46 @@ +import { TfCommand } from "../../../lib/tfcommand"; +import agentContracts = require('vso-node-api/interfaces/TaskAgentInterfaces'); +import archiver = require('archiver'); +import args = require("../../../lib/arguments"); +import fs = require('fs'); +import path = require('path'); +import Q = require('q'); +import tasksBase = require("./default"); +import trace = require('../../../lib/trace'); +import vm = require('../../../lib/jsonvalidate') +import stream = require('ts-stream'); + +export function getCommand(args: string[]): BuildTaskUpload { + return new BuildTaskUpload(args); +} + +var c_taskJsonFile: string = 'task.json'; + +export class BuildTaskUpload extends tasksBase.BuildTaskBase { + protected description = "Download a Build Task."; + + protected getHelpArgs(): string[] { + return ["taskId","taskVersion"]; + } + + public exec(): Q.Promise { + return this.commandArgs.taskId.val().then((Id) => { + return this.commandArgs.taskVersion.val().then((Version) =>{ + let agentApi = this.webApi.getQTaskAgentApi(this.connection.getCollectionUrl()); + return agentApi.getTaskContentZip(Id,Version).then((task) => { + task.pipe(fs.createWriteStream("task.zip")); + trace.info('Downloading ... '); + let archive = archiver('zip'); + return { + id: Id + }; + }); + }); + }); + } + + public friendlyOutput(task: agentContracts.TaskDefinition): void { + trace.println(); + trace.success('[%s] Downloaded successfully!', task.id); + } +} \ No newline at end of file From 2be2de979c8ff96d2a7e52b9fd8fdf8da0936576 Mon Sep 17 00:00:00 2001 From: sfeldman Date: Fri, 15 Jul 2016 00:04:49 +0300 Subject: [PATCH 041/235] add ability to get task content from the server (with version) as zip archive version 0.3.23 --- app/exec/build/tasks/download.ts | 2 -- package.json | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/app/exec/build/tasks/download.ts b/app/exec/build/tasks/download.ts index 704e6af9..0a64e1b7 100644 --- a/app/exec/build/tasks/download.ts +++ b/app/exec/build/tasks/download.ts @@ -8,7 +8,6 @@ import Q = require('q'); import tasksBase = require("./default"); import trace = require('../../../lib/trace'); import vm = require('../../../lib/jsonvalidate') -import stream = require('ts-stream'); export function getCommand(args: string[]): BuildTaskUpload { return new BuildTaskUpload(args); @@ -30,7 +29,6 @@ export class BuildTaskUpload extends tasksBase.BuildTaskBase { task.pipe(fs.createWriteStream("task.zip")); trace.info('Downloading ... '); - let archive = archiver('zip'); return { id: Id }; diff --git a/package.json b/package.json index 31f0cbb7..9433131e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tfx-cli", - "version": "0.3.22", + "version": "0.3.23", "description": "TFS Extensions Command Line Utility", "repository": { "type": "git", From a3968169125204f7b86a9b6c181bcfb5ae2a4450 Mon Sep 17 00:00:00 2001 From: sfeldman Date: Fri, 15 Jul 2016 00:25:06 +0300 Subject: [PATCH 042/235] small fixes to task download filename id-version.zip --- .directory | 3 ++- app/exec/build/tasks/download.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.directory b/.directory index 02d44c8c..9f533015 100644 --- a/.directory +++ b/.directory @@ -1,4 +1,5 @@ [Dolphin] -Timestamp=2016,5,2,16,29,3 +HeaderColumnWidths=469,82,146 +Timestamp=2016,7,15,0,17,26 Version=3 ViewMode=1 diff --git a/app/exec/build/tasks/download.ts b/app/exec/build/tasks/download.ts index 0a64e1b7..ea1cdf5b 100644 --- a/app/exec/build/tasks/download.ts +++ b/app/exec/build/tasks/download.ts @@ -27,7 +27,7 @@ export class BuildTaskUpload extends tasksBase.BuildTaskBase{ let agentApi = this.webApi.getQTaskAgentApi(this.connection.getCollectionUrl()); return agentApi.getTaskContentZip(Id,Version).then((task) => { - task.pipe(fs.createWriteStream("task.zip")); + task.pipe(fs.createWriteStream(Id+"-"+Version+".zip")); trace.info('Downloading ... '); return { id: Id From d285a3e27ad2214c9888903686b2c171b9a5eced Mon Sep 17 00:00:00 2001 From: sfeldman Date: Fri, 15 Jul 2016 00:31:36 +0300 Subject: [PATCH 043/235] add some to do comments --- app/exec/build/tasks/download.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/exec/build/tasks/download.ts b/app/exec/build/tasks/download.ts index ea1cdf5b..ae41fa80 100644 --- a/app/exec/build/tasks/download.ts +++ b/app/exec/build/tasks/download.ts @@ -20,6 +20,8 @@ export class BuildTaskUpload extends tasksBase.BuildTaskBase { @@ -28,6 +30,7 @@ export class BuildTaskUpload extends tasksBase.BuildTaskBase { task.pipe(fs.createWriteStream(Id+"-"+Version+".zip")); + // TO DO: check archive integrity and throw error verion of id not found trace.info('Downloading ... '); return { id: Id From 019f6f19a4b0c225040d104b75cf3e38d502d213 Mon Sep 17 00:00:00 2001 From: sfeldman Date: Sun, 17 Jul 2016 12:59:01 +0300 Subject: [PATCH 044/235] allow download task content with task name and no version (latest) --- app/exec/build/tasks/default.ts | 6 +- app/exec/build/tasks/download.ts | 114 ++++++++++++++++++++++++++----- 2 files changed, 100 insertions(+), 20 deletions(-) diff --git a/app/exec/build/tasks/default.ts b/app/exec/build/tasks/default.ts index 6babf941..69c7ce10 100644 --- a/app/exec/build/tasks/default.ts +++ b/app/exec/build/tasks/default.ts @@ -26,14 +26,14 @@ export class BuildTaskBase extends buildBase.BuildBase { super.setCommandArgs(); this.registerCommandArgument("all", "All Tasks?", "Get all build tasks.", args.BooleanArgument, "false"); - this.registerCommandArgument("taskId", "Task ID", "Identifies a particular Build Task.", args.StringArgument); + this.registerCommandArgument("taskId", "Task ID", "Identifies a particular Build Task.", args.StringArgument,null); this.registerCommandArgument("taskPath", "Task path", "Local path to a Build Task.", args.ExistingDirectoriesArgument); this.registerCommandArgument("overwrite", "Overwrite?", "Overwrite existing Build Task.", args.BooleanArgument, "false"); - this.registerCommandArgument("taskName", "Task Name", "Name of the Build Task.", args.StringArgument); + this.registerCommandArgument("taskName", "Task Name", "Name of the Build Task.", args.StringArgument,null); this.registerCommandArgument("friendlyName", "Friendly Task Name.", null, args.StringArgument); this.registerCommandArgument("description", "Task Description.", null, args.StringArgument); this.registerCommandArgument("author", "Task Author.", null, args.StringArgument); - this.registerCommandArgument("taskVersion", "Task Version", "Build Task version.", args.StringArgument); + this.registerCommandArgument("taskVersion", "Task Version", "Build Task version.", args.StringArgument,null); } public exec(cmd?: any): Q.Promise { diff --git a/app/exec/build/tasks/download.ts b/app/exec/build/tasks/download.ts index ae41fa80..237642c2 100644 --- a/app/exec/build/tasks/download.ts +++ b/app/exec/build/tasks/download.ts @@ -1,6 +1,5 @@ import { TfCommand } from "../../../lib/tfcommand"; import agentContracts = require('vso-node-api/interfaces/TaskAgentInterfaces'); -import archiver = require('archiver'); import args = require("../../../lib/arguments"); import fs = require('fs'); import path = require('path'); @@ -9,39 +8,120 @@ import tasksBase = require("./default"); import trace = require('../../../lib/trace'); import vm = require('../../../lib/jsonvalidate') -export function getCommand(args: string[]): BuildTaskUpload { - return new BuildTaskUpload(args); +export function getCommand(args: string[]): BuildTaskDownload { + return new BuildTaskDownload(args); } var c_taskJsonFile: string = 'task.json'; -export class BuildTaskUpload extends tasksBase.BuildTaskBase { +export class BuildTaskDownload extends tasksBase.BuildTaskBase { protected description = "Download a Build Task."; protected getHelpArgs(): string[] { - return ["taskId","taskVersion"]; - // TO DO: input task name and resolve id - // TO DO: no veriosn input and resolve latest id + return ["taskId","taskVersion","taskName"]; } public exec(): Q.Promise { return this.commandArgs.taskId.val().then((Id) => { + if (!Id) { + Id = ""; + } return this.commandArgs.taskVersion.val().then((Version) =>{ let agentApi = this.webApi.getQTaskAgentApi(this.connection.getCollectionUrl()); - return agentApi.getTaskContentZip(Id,Version).then((task) => { - task.pipe(fs.createWriteStream(Id+"-"+Version+".zip")); - // TO DO: check archive integrity and throw error verion of id not found - trace.info('Downloading ... '); - return { - id: Id - }; + return agentApi.getTaskDefinitions(null, ['build'], null).then((tasks) => { + var taskDictionary = this._getNewestTasks(tasks); + return this.commandArgs.taskName.val().then((Name) => { + if (!Id) { + taskDictionary.forEach(element => { + if (element.name == Name) { + Id = element.id; + if (!Version) { + Version = element.version.major + "." + element.version.minor + "." + element.version.patch;; + } + } + }); + } + else + { + taskDictionary.forEach(element => { + if (element.id == Id) { + Name = element.name; + if (!Version) { + Version = element.version.major + "." + element.version.minor + "." + element.version.patch;; + } + } + }); + } + return agentApi.getTaskContentZip(Id,Version).then((task) => { + var archiveName = Name+"-"+Version+".zip"; + task.pipe(fs.createWriteStream(archiveName)); + trace.info('Downloading ... '); + return { + id: Id, + name: Name, + }; + }); }); }); }); + }); } public friendlyOutput(task: agentContracts.TaskDefinition): void { - trace.println(); - trace.success('[%s] Downloaded successfully!', task.id); + trace.success('[%s] Downloaded successfully!', task.name); } -} \ No newline at end of file + + private _getNewestTasks(allTasks: agentContracts.TaskDefinition[]): agentContracts.TaskDefinition[] { + var taskDictionary: { [id: string]: agentContracts.TaskDefinition; } = {}; + for (var i = 0; i < allTasks.length; i++) { + var currTask: agentContracts.TaskDefinition = allTasks[i]; + if(taskDictionary[currTask.id]) + { + var newVersion: TaskVersion = new TaskVersion(currTask.version); + var knownVersion: TaskVersion = new TaskVersion(taskDictionary[currTask.id].version); + trace.debug("Found additional version of " + currTask.name + " and comparing to the previously encountered version."); + if (this._compareTaskVersion(newVersion, knownVersion) > 0) { + trace.debug("Found newer version of " + currTask.name + ". Previous: " + knownVersion.toString() + "; New: " + newVersion.toString()); + taskDictionary[currTask.id] = currTask; + } + } + else { + trace.debug("Found task " + currTask.name); + taskDictionary[currTask.id] = currTask; + } + } + var newestTasks: agentContracts.TaskDefinition[] = []; + for(var id in taskDictionary) { + newestTasks.push(taskDictionary[id]); + } + return newestTasks; + } + + private _compareTaskVersion(version1: TaskVersion, version2: TaskVersion): number { + if(version1.major != version2.major) { + return version1.major - version2.major; + } + if(version1.minor != version2.minor) { + return version1.minor - version2.minor; + } + if(version1.patch != version2.patch) { + return version1.patch - version2.patch; + } + return 0; + } +} +class TaskVersion { + major: number; + minor: number; + patch: number; + + constructor(versionData: any) { + this.major = versionData.major || 0; + this.minor = versionData.minor || 0; + this.patch = versionData.patch || 0; + } + + public toString(): string { + return this.major + "." + this.minor + "." + this.patch; + } +} From 7bb4de98d141d0ce9458363101b0a7c72278ae87 Mon Sep 17 00:00:00 2001 From: sfeldman Date: Sun, 17 Jul 2016 15:06:08 +0300 Subject: [PATCH 045/235] add retrive and download messages, add list filter option --- app/exec/build/tasks/default.ts | 2 ++ app/exec/build/tasks/download.ts | 5 ++++- app/exec/build/tasks/list.ts | 28 ++++++++++++++++++++-------- 3 files changed, 26 insertions(+), 9 deletions(-) diff --git a/app/exec/build/tasks/default.ts b/app/exec/build/tasks/default.ts index 69c7ce10..140f0981 100644 --- a/app/exec/build/tasks/default.ts +++ b/app/exec/build/tasks/default.ts @@ -13,6 +13,7 @@ export interface TaskArguments extends buildBase.BuildArguments { description: args.StringArgument; author: args.StringArgument; taskVersion :args.StringArgument; + filter :args.StringArgument; } export function getCommand(args: string[]): BuildTaskBase { @@ -34,6 +35,7 @@ export class BuildTaskBase extends buildBase.BuildBase { this.registerCommandArgument("description", "Task Description.", null, args.StringArgument); this.registerCommandArgument("author", "Task Author.", null, args.StringArgument); this.registerCommandArgument("taskVersion", "Task Version", "Build Task version.", args.StringArgument,null); + this.registerCommandArgument("filter", "name filter", "Filter list by name match case.", args.StringArgument,null); } public exec(cmd?: any): Q.Promise { diff --git a/app/exec/build/tasks/download.ts b/app/exec/build/tasks/download.ts index 237642c2..fce83f96 100644 --- a/app/exec/build/tasks/download.ts +++ b/app/exec/build/tasks/download.ts @@ -28,6 +28,7 @@ export class BuildTaskDownload extends tasksBase.BuildTaskBase{ let agentApi = this.webApi.getQTaskAgentApi(this.connection.getCollectionUrl()); + trace.info("retriving tasks from the server ...") return agentApi.getTaskDefinitions(null, ['build'], null).then((tasks) => { var taskDictionary = this._getNewestTasks(tasks); return this.commandArgs.taskName.val().then((Name) => { @@ -40,6 +41,7 @@ export class BuildTaskDownload extends tasksBase.BuildTaskBase { var archiveName = Name+"-"+Version+".zip"; diff --git a/app/exec/build/tasks/list.ts b/app/exec/build/tasks/list.ts index 8e36e036..58e87bda 100644 --- a/app/exec/build/tasks/list.ts +++ b/app/exec/build/tasks/list.ts @@ -13,7 +13,7 @@ export class BuildTaskList extends tasksBase.BuildTaskBase { @@ -23,13 +23,25 @@ export class BuildTaskList extends tasksBase.BuildTaskBase { trace.debug("Retrieved " + tasks.length + " build tasks from server."); return this.commandArgs.all.val().then((all) => { - if (all) { - trace.debug("Listing all build tasks."); - return tasks; - } else { - trace.debug("Filtering build tasks to give only the latest versions."); - return this._getNewestTasks(tasks); - } + return this.commandArgs.filter.val().then((Filter) =>{ + var filteredtasks; + if (Filter) { + filteredtasks = tasks.filter(function _filterTasks(item) { + return item.name.indexOf(Filter) >= 0; + }) + trace.info("Filtering tasks containing: %s", Filter) + } + if (filteredtasks) { + tasks = filteredtasks + } + if (all) { + trace.debug("Listing all build tasks."); + return tasks; + } else { + trace.debug("Filtering build tasks to give only the latest versions."); + return this._getNewestTasks(tasks); + } + }); }); }); } From ef46110f1bce4c47dfd5d68d3a5db984a352f9b0 Mon Sep 17 00:00:00 2001 From: sfeldman Date: Mon, 18 Jul 2016 09:33:40 +0300 Subject: [PATCH 046/235] validate that task with given name exists --- app/exec/build/tasks/download.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/exec/build/tasks/download.ts b/app/exec/build/tasks/download.ts index fce83f96..3bab0b2e 100644 --- a/app/exec/build/tasks/download.ts +++ b/app/exec/build/tasks/download.ts @@ -55,10 +55,14 @@ export class BuildTaskDownload extends tasksBase.BuildTaskBase { var archiveName = Name+"-"+Version+".zip"; - task.pipe(fs.createWriteStream(archiveName)); trace.info('Downloading ... '); + task.pipe(fs.createWriteStream(archiveName)); return { id: Id, name: Name, From 1d0bc98de38821b124f8103a5763ad02fce63346 Mon Sep 17 00:00:00 2001 From: sfeldman Date: Mon, 18 Jul 2016 20:09:05 +0300 Subject: [PATCH 047/235] add create zip installer script --- create_package.sh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 create_package.sh diff --git a/create_package.sh b/create_package.sh new file mode 100755 index 00000000..8c2b3b2c --- /dev/null +++ b/create_package.sh @@ -0,0 +1,8 @@ +#!/bin/bash +version=$(cat package.json|grep version|sed s/\"version\"\:\ \"//g|sed s/\"\,//g|sed s/\ //g) +echo $version +mkdir -p tfx-cli +cp -r node_modules tfx-cli/ +cp -r _build tfx-cli/ +zip -r tfx-cli-$version.zip ./tfx-cli/ +rm -rf ./tfx-cli/ From bb741cfe6270461c59576b8bb232b81cd4eb8db1 Mon Sep 17 00:00:00 2001 From: sfeldman Date: Mon, 18 Jul 2016 20:47:14 +0300 Subject: [PATCH 048/235] add deploy script --- artifactory-deploy.sh | 96 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100755 artifactory-deploy.sh diff --git a/artifactory-deploy.sh b/artifactory-deploy.sh new file mode 100755 index 00000000..45038e71 --- /dev/null +++ b/artifactory-deploy.sh @@ -0,0 +1,96 @@ +#!/bin/bash + +set -e + +# based on https://github.com/JFrogDev/project-examples/blob/master/bash-example/deploy-file.sh + +usage () { + ME=$(basename "$0") + cat>&2< + FAIL=false + eval $1 && FAIL=true + if $FAIL ; then + echo "FAIL: $2">&2 + exit -1 + fi +} + + +while getopts ":g:a:v:d:f:e:u:p:h" opt; do + case $opt in + g) + GROUP=$OPTARG;; + a) + ARTIFACT=$OPTARG;; + v) + VERSION=$OPTARG;; + d) + BASEURL=$OPTARG;; + f) + FILE=$OPTARG;; + e) + EXT=$OPTARG;; + u) + ARTIFACTORY_USER=$OPTARG;; + p) + ARTIFACTORY_PASSWD=$OPTARG;; + h) + usage + exit 0;; + \?) + fail_if "true" "Invalid option: -$OPTARG" + ;; + :) + fail_if "true" "Option -$OPTARG requires an argument" + ;; + esac +done + +fail_if '[[ -z "$GROUP" ]]' 'missing GROUP' +fail_if '[[ -z "$ARTIFACT" ]]' 'missing ARTIFACT' +fail_if '[[ -z "$VERSION" ]]' 'missing VERSION' +fail_if '[[ -z "$BASEURL" ]]' 'missing BASEURL' +fail_if '[[ -z "$FILE" ]]' 'missing FILE' +fail_if '[[ -z "$EXT" ]]' 'missing EXT' +fail_if '[[ -z "$ARTIFACTORY_USER" ]]' 'missing ARTIFACTORY_USER' +fail_if '[[ -z "$ARTIFACTORY_PASSWD" ]]' 'missing ARTIFACTORY_PASSWD' + +#http://chefperc01.iil.intel.com:8081/artifactory/libs-release-local/GROUP/ARTIFACT/VERSION/ + + +md5Value="`md5sum "$FILE"`" +md5Value="${md5Value:0:32}" +sha1Value="`sha1sum "$FILE"`" +sha1Value="${sha1Value:0:40}" + +uploadUrl="$BASEURL/${GROUP//[.]//}/$ARTIFACT/$VERSION/${ARTIFACT}-${VERSION}.${EXT}" + +printf "File: %s\nMD5: %s\nSHA1: %s\nUpload URL: %s\n" "$FILE" "$md5Value" "$sha1Value" "$uploadUrl" + +STATUSCODE=$(curl --progress-bar -i -X PUT -u $ARTIFACTORY_USER:$ARTIFACTORY_PASSWD \ + -H "X-Checksum-Md5: $md5Value" \ + -H "X-Checksum-Sha1: $sha1Value" \ + -T "$FILE" \ + --output /dev/stderr --write-out "%{http_code}" \ + "$uploadUrl" ||:) + +fail_if '[[ "$STATUSCODE" -ne "201" ]]' "Upload failed: http status $STATUSCODE" + +echo "Upload successfull!" From 003a0b6c3ea1a48ac0535f85b1f13c217fb28449 Mon Sep 17 00:00:00 2001 From: sfeldman Date: Mon, 18 Jul 2016 21:00:30 +0300 Subject: [PATCH 049/235] create package saves version to file for artifactore deploy --- create_package.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/create_package.sh b/create_package.sh index 8c2b3b2c..2b401ea9 100755 --- a/create_package.sh +++ b/create_package.sh @@ -1,6 +1,6 @@ #!/bin/bash -version=$(cat package.json|grep version|sed s/\"version\"\:\ \"//g|sed s/\"\,//g|sed s/\ //g) -echo $version +export version=$(cat package.json|grep version|sed s/\"version\"\:\ \"//g|sed s/\"\,//g|sed s/\ //g) +echo $version > ./version.txt mkdir -p tfx-cli cp -r node_modules tfx-cli/ cp -r _build tfx-cli/ From 0c342e10915a95cdb2f12d1e7b22cc93afaab0e9 Mon Sep 17 00:00:00 2001 From: sfeldman Date: Mon, 18 Jul 2016 23:00:45 +0300 Subject: [PATCH 050/235] not sure why curl to artifactofy only works with sudo --- artifactory-deploy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/artifactory-deploy.sh b/artifactory-deploy.sh index 45038e71..5aecf6ee 100755 --- a/artifactory-deploy.sh +++ b/artifactory-deploy.sh @@ -84,7 +84,7 @@ uploadUrl="$BASEURL/${GROUP//[.]//}/$ARTIFACT/$VERSION/${ARTIFACT}-${VERSION}.${ printf "File: %s\nMD5: %s\nSHA1: %s\nUpload URL: %s\n" "$FILE" "$md5Value" "$sha1Value" "$uploadUrl" -STATUSCODE=$(curl --progress-bar -i -X PUT -u $ARTIFACTORY_USER:$ARTIFACTORY_PASSWD \ +STATUSCODE=$(sudo curl --progress-bar -i -X PUT -u $ARTIFACTORY_USER:$ARTIFACTORY_PASSWD \ -H "X-Checksum-Md5: $md5Value" \ -H "X-Checksum-Sha1: $sha1Value" \ -T "$FILE" \ From 75592ff24c69c87de71c6911330877c540ee978a Mon Sep 17 00:00:00 2001 From: sfeldman Date: Mon, 18 Jul 2016 23:33:57 +0300 Subject: [PATCH 051/235] get jfrog user and password from env --- artifactory-deploy.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/artifactory-deploy.sh b/artifactory-deploy.sh index 5aecf6ee..fd839979 100755 --- a/artifactory-deploy.sh +++ b/artifactory-deploy.sh @@ -72,8 +72,6 @@ fail_if '[[ -z "$EXT" ]]' 'missing EXT' fail_if '[[ -z "$ARTIFACTORY_USER" ]]' 'missing ARTIFACTORY_USER' fail_if '[[ -z "$ARTIFACTORY_PASSWD" ]]' 'missing ARTIFACTORY_PASSWD' -#http://chefperc01.iil.intel.com:8081/artifactory/libs-release-local/GROUP/ARTIFACT/VERSION/ - md5Value="`md5sum "$FILE"`" md5Value="${md5Value:0:32}" @@ -84,7 +82,8 @@ uploadUrl="$BASEURL/${GROUP//[.]//}/$ARTIFACT/$VERSION/${ARTIFACT}-${VERSION}.${ printf "File: %s\nMD5: %s\nSHA1: %s\nUpload URL: %s\n" "$FILE" "$md5Value" "$sha1Value" "$uploadUrl" -STATUSCODE=$(sudo curl --progress-bar -i -X PUT -u $ARTIFACTORY_USER:$ARTIFACTORY_PASSWD \ +##$ARTIFACTORY_USER:$ARTIFACTORY_PASSWD \ +STATUSCODE=$(sudo curl --progress-bar -i -X PUT -u $A_USER:$A_PASSWD \ -H "X-Checksum-Md5: $md5Value" \ -H "X-Checksum-Sha1: $sha1Value" \ -T "$FILE" \ From 0f5e194e880263aa7ac5f9f609cf103dac2926eb Mon Sep 17 00:00:00 2001 From: sfeldman Date: Tue, 19 Jul 2016 00:33:42 +0300 Subject: [PATCH 052/235] roll back artifactory tests --- artifactory-deploy.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/artifactory-deploy.sh b/artifactory-deploy.sh index fd839979..0fa70bf5 100755 --- a/artifactory-deploy.sh +++ b/artifactory-deploy.sh @@ -82,13 +82,12 @@ uploadUrl="$BASEURL/${GROUP//[.]//}/$ARTIFACT/$VERSION/${ARTIFACT}-${VERSION}.${ printf "File: %s\nMD5: %s\nSHA1: %s\nUpload URL: %s\n" "$FILE" "$md5Value" "$sha1Value" "$uploadUrl" -##$ARTIFACTORY_USER:$ARTIFACTORY_PASSWD \ -STATUSCODE=$(sudo curl --progress-bar -i -X PUT -u $A_USER:$A_PASSWD \ +STATUSCODE=$(curl --progress-bar -i -X PUT -u $ARTIFACTORY_USER:$ARTIFACTORY_PASSWD \ -H "X-Checksum-Md5: $md5Value" \ -H "X-Checksum-Sha1: $sha1Value" \ -T "$FILE" \ --output /dev/stderr --write-out "%{http_code}" \ - "$uploadUrl" ||:) + "$uploadUrl"||:) fail_if '[[ "$STATUSCODE" -ne "201" ]]' "Upload failed: http status $STATUSCODE" From 3fd57bb1bf00ec8b5450a3fff808aa129289a69f Mon Sep 17 00:00:00 2001 From: sfeldman Date: Tue, 19 Jul 2016 00:54:03 +0300 Subject: [PATCH 053/235] remove set -e from deploy script --- artifactory-deploy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/artifactory-deploy.sh b/artifactory-deploy.sh index 0fa70bf5..4273274e 100755 --- a/artifactory-deploy.sh +++ b/artifactory-deploy.sh @@ -1,6 +1,6 @@ #!/bin/bash -set -e +#set -e # based on https://github.com/JFrogDev/project-examples/blob/master/bash-example/deploy-file.sh From af86259d2e3913286e50c290e0f8554280931d0f Mon Sep 17 00:00:00 2001 From: sfeldman Date: Tue, 19 Jul 2016 10:00:22 +0300 Subject: [PATCH 054/235] fix mandatory task name in create task --- app/exec/build/tasks/default.ts | 4 +++- app/exec/build/tasks/download.ts | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/exec/build/tasks/default.ts b/app/exec/build/tasks/default.ts index 140f0981..446ce9ac 100644 --- a/app/exec/build/tasks/default.ts +++ b/app/exec/build/tasks/default.ts @@ -14,6 +14,7 @@ export interface TaskArguments extends buildBase.BuildArguments { author: args.StringArgument; taskVersion :args.StringArgument; filter :args.StringArgument; + name : args.StringArgument; } export function getCommand(args: string[]): BuildTaskBase { @@ -30,12 +31,13 @@ export class BuildTaskBase extends buildBase.BuildBase { this.registerCommandArgument("taskId", "Task ID", "Identifies a particular Build Task.", args.StringArgument,null); this.registerCommandArgument("taskPath", "Task path", "Local path to a Build Task.", args.ExistingDirectoriesArgument); this.registerCommandArgument("overwrite", "Overwrite?", "Overwrite existing Build Task.", args.BooleanArgument, "false"); - this.registerCommandArgument("taskName", "Task Name", "Name of the Build Task.", args.StringArgument,null); + this.registerCommandArgument("taskName", "Task Name", "Name of the Build Task.", args.StringArgument); this.registerCommandArgument("friendlyName", "Friendly Task Name.", null, args.StringArgument); this.registerCommandArgument("description", "Task Description.", null, args.StringArgument); this.registerCommandArgument("author", "Task Author.", null, args.StringArgument); this.registerCommandArgument("taskVersion", "Task Version", "Build Task version.", args.StringArgument,null); this.registerCommandArgument("filter", "name filter", "Filter list by name match case.", args.StringArgument,null); + this.registerCommandArgument("name", "Task Name", "Name of the Build Task to download.", args.StringArgument,null); } public exec(cmd?: any): Q.Promise { diff --git a/app/exec/build/tasks/download.ts b/app/exec/build/tasks/download.ts index 3bab0b2e..90158265 100644 --- a/app/exec/build/tasks/download.ts +++ b/app/exec/build/tasks/download.ts @@ -18,7 +18,7 @@ export class BuildTaskDownload extends tasksBase.BuildTaskBase { @@ -31,7 +31,7 @@ export class BuildTaskDownload extends tasksBase.BuildTaskBase { var taskDictionary = this._getNewestTasks(tasks); - return this.commandArgs.taskName.val().then((Name) => { + return this.commandArgs.name.val().then((Name) => { if (!Id) { taskDictionary.forEach(element => { if (element.name == Name) { From bccb5f570a0a65abef5a33f63535d0b362513d88 Mon Sep 17 00:00:00 2001 From: sfeldman Date: Tue, 19 Jul 2016 10:46:11 +0300 Subject: [PATCH 055/235] test user passwd version from env --- artifactory-deploy.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/artifactory-deploy.sh b/artifactory-deploy.sh index 4273274e..dd18872c 100755 --- a/artifactory-deploy.sh +++ b/artifactory-deploy.sh @@ -1,6 +1,8 @@ #!/bin/bash - -#set -e +echo $VERSION +echo $ARTIFACTORYUSER +echo $ARTIFACTORYPASSWD +set -e # based on https://github.com/JFrogDev/project-examples/blob/master/bash-example/deploy-file.sh From b104c1de9f4c6c742c6e9248f7a82fa0353d50bb Mon Sep 17 00:00:00 2001 From: sfeldman Date: Tue, 19 Jul 2016 10:55:11 +0300 Subject: [PATCH 056/235] test user passwd version from env roll back --- artifactory-deploy.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/artifactory-deploy.sh b/artifactory-deploy.sh index dd18872c..0fa70bf5 100755 --- a/artifactory-deploy.sh +++ b/artifactory-deploy.sh @@ -1,7 +1,5 @@ #!/bin/bash -echo $VERSION -echo $ARTIFACTORYUSER -echo $ARTIFACTORYPASSWD + set -e # based on https://github.com/JFrogDev/project-examples/blob/master/bash-example/deploy-file.sh From b764a46586713ba80ff905becf68abe9a1ed3b2a Mon Sep 17 00:00:00 2001 From: sfeldman Date: Tue, 19 Jul 2016 15:07:29 +0300 Subject: [PATCH 057/235] desperate attemt to wrap version number in parantheses :( --- artifactory-deploy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/artifactory-deploy.sh b/artifactory-deploy.sh index 0fa70bf5..f3262ab8 100755 --- a/artifactory-deploy.sh +++ b/artifactory-deploy.sh @@ -78,7 +78,7 @@ md5Value="${md5Value:0:32}" sha1Value="`sha1sum "$FILE"`" sha1Value="${sha1Value:0:40}" -uploadUrl="$BASEURL/${GROUP//[.]//}/$ARTIFACT/$VERSION/${ARTIFACT}-${VERSION}.${EXT}" +uploadUrl="$BASEURL/${GROUP//[.]//}/$ARTIFACT/"$VERSION"/${ARTIFACT}-${VERSION}.${EXT}" printf "File: %s\nMD5: %s\nSHA1: %s\nUpload URL: %s\n" "$FILE" "$md5Value" "$sha1Value" "$uploadUrl" From e7d13e3a6d50ffe28dbf52045d75d1db75a50575 Mon Sep 17 00:00:00 2001 From: sfeldman Date: Tue, 19 Jul 2016 18:18:54 +0300 Subject: [PATCH 058/235] unify create and deploy scripts --- artifactory-deploy.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/artifactory-deploy.sh b/artifactory-deploy.sh index f3262ab8..57f590e4 100755 --- a/artifactory-deploy.sh +++ b/artifactory-deploy.sh @@ -2,6 +2,14 @@ set -e +export VERSION=$(cat package.json|grep version|sed s/\"version\"\:\ \"//g|sed s/\"\,//g|sed s/\ //g) +echo $VERSION > ./version.txt +mkdir -p tfx-cli +cp -r node_modules tfx-cli/ +cp -r _build tfx-cli/ +zip -r tfx-cli.zip ./tfx-cli/ +rm -rf ./tfx-cli/ + # based on https://github.com/JFrogDev/project-examples/blob/master/bash-example/deploy-file.sh usage () { @@ -33,14 +41,12 @@ fail_if() { } -while getopts ":g:a:v:d:f:e:u:p:h" opt; do +while getopts ":g:a:d:f:e:u:p:h" opt; do case $opt in g) GROUP=$OPTARG;; a) ARTIFACT=$OPTARG;; - v) - VERSION=$OPTARG;; d) BASEURL=$OPTARG;; f) From 25c51f281ce45e2f0f0078b73ab1e56e0a6c6eaf Mon Sep 17 00:00:00 2001 From: sfeldman Date: Tue, 19 Jul 2016 18:35:46 +0300 Subject: [PATCH 059/235] now deploy error reproducable and should be fixed --- artifactory-deploy.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/artifactory-deploy.sh b/artifactory-deploy.sh index 57f590e4..5446ad57 100755 --- a/artifactory-deploy.sh +++ b/artifactory-deploy.sh @@ -86,9 +86,9 @@ sha1Value="${sha1Value:0:40}" uploadUrl="$BASEURL/${GROUP//[.]//}/$ARTIFACT/"$VERSION"/${ARTIFACT}-${VERSION}.${EXT}" -printf "File: %s\nMD5: %s\nSHA1: %s\nUpload URL: %s\n" "$FILE" "$md5Value" "$sha1Value" "$uploadUrl" - -STATUSCODE=$(curl --progress-bar -i -X PUT -u $ARTIFACTORY_USER:$ARTIFACTORY_PASSWD \ +printf "File: %s\nVersion: %s\nMD5: %s\nSHA1: %s\nUpload URL: %s\n" "$FILE" "$VERSION" "$md5Value" "$sha1Value" "$uploadUrl" +printf "User: %s\n PASSWD: %s\n" "$ARTIFACTORY_USER" "$ARTIFACTORY_PASSWD" +STATUSCODE=$(sudo curl --progress-bar -i -X PUT -u $ARTIFACTORY_USER:$ARTIFACTORY_PASSWD \ -H "X-Checksum-Md5: $md5Value" \ -H "X-Checksum-Sha1: $sha1Value" \ -T "$FILE" \ From bd7c6ee4045c235c45b88195f1053245211d8736 Mon Sep 17 00:00:00 2001 From: sfeldman Date: Tue, 19 Jul 2016 18:44:15 +0300 Subject: [PATCH 060/235] now deploy error reproducable and should be fixed --- artifactory-deploy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/artifactory-deploy.sh b/artifactory-deploy.sh index 5446ad57..371a8184 100755 --- a/artifactory-deploy.sh +++ b/artifactory-deploy.sh @@ -87,7 +87,7 @@ sha1Value="${sha1Value:0:40}" uploadUrl="$BASEURL/${GROUP//[.]//}/$ARTIFACT/"$VERSION"/${ARTIFACT}-${VERSION}.${EXT}" printf "File: %s\nVersion: %s\nMD5: %s\nSHA1: %s\nUpload URL: %s\n" "$FILE" "$VERSION" "$md5Value" "$sha1Value" "$uploadUrl" -printf "User: %s\n PASSWD: %s\n" "$ARTIFACTORY_USER" "$ARTIFACTORY_PASSWD" + STATUSCODE=$(sudo curl --progress-bar -i -X PUT -u $ARTIFACTORY_USER:$ARTIFACTORY_PASSWD \ -H "X-Checksum-Md5: $md5Value" \ -H "X-Checksum-Sha1: $sha1Value" \ From 7a46a5d0c8e2ad11a77273a7660c387ab2982e1a Mon Sep 17 00:00:00 2001 From: sfeldman Date: Wed, 20 Jul 2016 09:52:51 +0300 Subject: [PATCH 061/235] direct upload errors to log not to /dev/stderr --- artifactory-deploy.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/artifactory-deploy.sh b/artifactory-deploy.sh index 371a8184..6bc0293d 100755 --- a/artifactory-deploy.sh +++ b/artifactory-deploy.sh @@ -9,6 +9,7 @@ cp -r node_modules tfx-cli/ cp -r _build tfx-cli/ zip -r tfx-cli.zip ./tfx-cli/ rm -rf ./tfx-cli/ +touch ./upload.log # based on https://github.com/JFrogDev/project-examples/blob/master/bash-example/deploy-file.sh @@ -92,7 +93,7 @@ STATUSCODE=$(sudo curl --progress-bar -i -X PUT -u $ARTIFACTORY_USER:$ARTIFACTOR -H "X-Checksum-Md5: $md5Value" \ -H "X-Checksum-Sha1: $sha1Value" \ -T "$FILE" \ - --output /dev/stderr --write-out "%{http_code}" \ + --output ./upload.log --write-out "%{http_code}" \ "$uploadUrl"||:) fail_if '[[ "$STATUSCODE" -ne "201" ]]' "Upload failed: http status $STATUSCODE" From ba78acb71b13516eadb75750ca42941b6303a3d1 Mon Sep 17 00:00:00 2001 From: sfeldman Date: Tue, 26 Jul 2016 12:19:43 +0300 Subject: [PATCH 062/235] support exporting w/o definition path (default path is name-id.json) --- app/exec/build/definitions/export.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/exec/build/definitions/export.ts b/app/exec/build/definitions/export.ts index a503cd48..99087673 100644 --- a/app/exec/build/definitions/export.ts +++ b/app/exec/build/definitions/export.ts @@ -26,7 +26,7 @@ export class ExportDefinition extends TfCommand { + if (!definitionPath) { + definitionPath = definition.name + '-' + definition.id + '.json'; + } if (fs.existsSync(definitionPath.toString()) && !overwrite) { return Q.reject(new Error("Build definition file already exists")); } From a9e2b1c2691014c06319a8104c1fe6da73d9e5b4 Mon Sep 17 00:00:00 2001 From: sfeldman Date: Tue, 26 Jul 2016 12:22:51 +0300 Subject: [PATCH 063/235] support exporting w/o definition path (default path is name-id.json) --- app/exec/build/definitions/export.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/exec/build/definitions/export.ts b/app/exec/build/definitions/export.ts index 99087673..a0178c6a 100644 --- a/app/exec/build/definitions/export.ts +++ b/app/exec/build/definitions/export.ts @@ -16,7 +16,7 @@ export interface ExportDefinitionArguments extends CoreArguments { } export class ExportDefinition extends TfCommand { - protected description = "Export a build definition"; + protected description = "Export a build definition to a local file"; protected getHelpArgs(): string[] { return ["project", "definitionId", "definitionPath", "overwrite"]; From 5d9aa3509d5e3ffcdc7312aac9440241e07ecee5 Mon Sep 17 00:00:00 2001 From: sfeldman Date: Tue, 26 Jul 2016 12:55:21 +0300 Subject: [PATCH 064/235] test Build.clean=source --- artifactory-deploy.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/artifactory-deploy.sh b/artifactory-deploy.sh index 6bc0293d..2f56e821 100755 --- a/artifactory-deploy.sh +++ b/artifactory-deploy.sh @@ -1,6 +1,5 @@ #!/bin/bash - -set -e +set -e #exit at every exit code different from "0" export VERSION=$(cat package.json|grep version|sed s/\"version\"\:\ \"//g|sed s/\"\,//g|sed s/\ //g) echo $VERSION > ./version.txt From 634a4753c49f37446faa22c4c18cade80ccd9a20 Mon Sep 17 00:00:00 2001 From: sfeldman Date: Tue, 26 Jul 2016 16:35:52 +0300 Subject: [PATCH 065/235] add ability to export definition with revision --- app/exec/build/definitions/export.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/app/exec/build/definitions/export.ts b/app/exec/build/definitions/export.ts index a0178c6a..e791ac92 100644 --- a/app/exec/build/definitions/export.ts +++ b/app/exec/build/definitions/export.ts @@ -13,13 +13,14 @@ export interface ExportDefinitionArguments extends CoreArguments { definitionId: args.IntArgument definitionPath: args.StringArgument overwrite: args.BooleanArgument + revision: args.IntArgument } export class ExportDefinition extends TfCommand { protected description = "Export a build definition to a local file"; protected getHelpArgs(): string[] { - return ["project", "definitionId", "definitionPath", "overwrite"]; + return ["project", "definitionId", "definitionPath", "overwrite","revision"]; } protected setCommandArgs(): void { @@ -28,6 +29,7 @@ export class ExportDefinition extends TfCommand { @@ -38,12 +40,12 @@ export class ExportDefinition extends TfCommand { + this.commandArgs.revision.val() + ]).spread((project, definitionId, definitionPath, overwrite, revision) => { trace.debug("Retrieving build definition %s...", definitionId); - - return api.getDefinition(definitionId, project).then((definition) => { + return api.getDefinition(definitionId, project, revision).then((definition) => { if (!definitionPath) { - definitionPath = definition.name + '-' + definition.id + '.json'; + definitionPath = definition.name + '-' + definition.id + '-' + definition.revision + '.json'; } if (fs.existsSync(definitionPath.toString()) && !overwrite) { return Q.reject(new Error("Build definition file already exists")); From 27976ffb6f902bc8196e35d59afccbeb71295446 Mon Sep 17 00:00:00 2001 From: sfeldman Date: Sun, 31 Jul 2016 17:12:00 +0300 Subject: [PATCH 066/235] add ability to list and export build templates --- app/exec/build/templates/default.ts | 17 +++++++++ app/exec/build/templates/export.ts | 59 +++++++++++++++++++++++++++++ app/exec/build/templates/list.ts | 50 ++++++++++++++++++++++++ 3 files changed, 126 insertions(+) create mode 100644 app/exec/build/templates/default.ts create mode 100644 app/exec/build/templates/export.ts create mode 100644 app/exec/build/templates/list.ts diff --git a/app/exec/build/templates/default.ts b/app/exec/build/templates/default.ts new file mode 100644 index 00000000..fb5bb28d --- /dev/null +++ b/app/exec/build/templates/default.ts @@ -0,0 +1,17 @@ +import { TfCommand, CoreArguments } from "../../../lib/tfcommand"; + +export function getCommand(args: string[]): HelpCommand { + return new HelpCommand(args); +} + +export class HelpCommand extends TfCommand { + protected description = "Commands for managing Build templates."; + + protected setCommandArgs(): void { + super.setCommandArgs(); + } + + public exec(cmd?: any): Q.Promise { + return this.getHelp(cmd); + } +} diff --git a/app/exec/build/templates/export.ts b/app/exec/build/templates/export.ts new file mode 100644 index 00000000..64c64974 --- /dev/null +++ b/app/exec/build/templates/export.ts @@ -0,0 +1,59 @@ +import { TfCommand, CoreArguments } from "../../../lib/tfcommand"; +import buildContracts = require('vso-node-api/interfaces/BuildInterfaces'); +import args = require("../../../lib/arguments"); +import trace = require('../../../lib/trace'); +import Q = require("q"); +import fs = require("fs"); + +export function getCommand(args: string[]): ExportTemplate { + return new ExportTemplate(args); +} + +export interface ExportTemplateArguments extends CoreArguments { + templateId: args.StringArgument + templatePath: args.StringArgument + overwrite: args.BooleanArgument +} + +export class ExportTemplate extends TfCommand { + protected description = "Export a build template to a local file"; + + protected getHelpArgs(): string[] { + return ["project", "templateId", "templatePath", "overwrite"]; + } + + protected setCommandArgs(): void { + super.setCommandArgs(); + + this.registerCommandArgument("templateId", "Build Template ID", "Identifies a Build Template.", args.StringArgument, null); + this.registerCommandArgument("templatePath", "Template Path", "Local path to a Build Template.", args.FilePathsArgument,null); + this.registerCommandArgument("overwrite", "Overwrite?", "Overwrite existing Build Template.", args.BooleanArgument, "false"); + } + + public exec(): Q.Promise { + var api = this.webApi.getQBuildApi(this.connection.getCollectionUrl()); + + return Q.all([ + this.commandArgs.project.val(), + this.commandArgs.templateId.val(), + this.commandArgs.templatePath.val(), + this.commandArgs.overwrite.val(), + ]).spread((project, templateId, templatePath, overwrite, revision) => { + trace.debug("Retrieving build template %s...", templateId); + return api.getTemplate(project, templateId).then((template) => { + if (!templatePath) { + templatePath = template.name + '-' + template.id + '.json'; + } + if (fs.existsSync(templatePath.toString()) && !overwrite) { + return Q.reject(new Error("Build template file already exists")); + } + fs.writeFileSync(templatePath.toString(), JSON.stringify(template, null, ' ')); + return template; + }); + }); + } + + public friendlyOutput(data: buildContracts.BuildDefinitionTemplate): void { + trace.info('Build Template %s exported successfully', data.id); + } +} diff --git a/app/exec/build/templates/list.ts b/app/exec/build/templates/list.ts new file mode 100644 index 00000000..cedd6f2c --- /dev/null +++ b/app/exec/build/templates/list.ts @@ -0,0 +1,50 @@ +import { TfCommand, CoreArguments } from "../../../lib/tfcommand"; +import buildContracts = require('vso-node-api/interfaces/BuildInterfaces'); +import args = require("../../../lib/arguments"); +import trace = require('../../../lib/trace'); +import Q = require("q"); + +export function getCommand(args: string[]): ListTemplates { + return new ListTemplates(args); +} + +export class ListTemplates extends TfCommand { + + protected description = "Get a list of build templates"; + + protected getHelpArgs(): string[] { + return ["project"]; + } + + public exec(): Q.Promise { + var api = this.webApi.getQBuildApi(this.connection.getCollectionUrl()); + trace.debug("Searching for build templates..."); + + return Q.all([ + this.commandArgs.project.val() + ]).spread((project) => { + return api.getTemplates(project).then((templates) => { + trace.debug("Retrieved " + templates.length + " build templates from server."); + return templates; + }); + }); + } + + public friendlyOutput(data: buildContracts.BuildDefinitionTemplate[]): void { + if (!data) { + throw new Error('no templates supplied'); + } + + if (!(data instanceof Array)) { + throw new Error('expected an array of templates'); + } + + data.forEach((template) => { + trace.println(); + trace.info('id : %s', template.id); + trace.info('name : %s', template.name); + trace.info('category : %s', template.category); + trace.info('description : %s', template.description); + }); + } +} From f05da159c2c9f887a2404decffb6b3e6bcf352d3 Mon Sep 17 00:00:00 2001 From: sfeldman Date: Wed, 3 Aug 2016 16:05:32 +0300 Subject: [PATCH 067/235] remove root curl in deploy --- artifactory-deploy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/artifactory-deploy.sh b/artifactory-deploy.sh index 2f56e821..8acbc02e 100755 --- a/artifactory-deploy.sh +++ b/artifactory-deploy.sh @@ -88,7 +88,7 @@ uploadUrl="$BASEURL/${GROUP//[.]//}/$ARTIFACT/"$VERSION"/${ARTIFACT}-${VERSION}. printf "File: %s\nVersion: %s\nMD5: %s\nSHA1: %s\nUpload URL: %s\n" "$FILE" "$VERSION" "$md5Value" "$sha1Value" "$uploadUrl" -STATUSCODE=$(sudo curl --progress-bar -i -X PUT -u $ARTIFACTORY_USER:$ARTIFACTORY_PASSWD \ +STATUSCODE=$(curl --progress-bar -i -X PUT -u $ARTIFACTORY_USER:$ARTIFACTORY_PASSWD \ -H "X-Checksum-Md5: $md5Value" \ -H "X-Checksum-Sha1: $sha1Value" \ -T "$FILE" \ From 073093c6b57eb6679af3bffc73b745504a6f9c94 Mon Sep 17 00:00:00 2001 From: sfeldman Date: Tue, 9 Aug 2016 08:10:32 +0300 Subject: [PATCH 068/235] push version number add .vscode to .gitignore --- .gitignore | 1 + package.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index f7234ff0..6c5a35ee 100644 --- a/.gitignore +++ b/.gitignore @@ -31,4 +31,5 @@ node_modules # VS Code Settings .settings +.vscode *_sample.json diff --git a/package.json b/package.json index 9433131e..0b2509b3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tfx-cli", - "version": "0.3.23", + "version": "0.3.24", "description": "TFS Extensions Command Line Utility", "repository": { "type": "git", From 0500ad2e83ed427fd4106f5347118d9d63fb531c Mon Sep 17 00:00:00 2001 From: sfeldman Date: Thu, 18 Aug 2016 11:55:27 +0300 Subject: [PATCH 069/235] fix task id mandatory value --- app/exec/build/tasks/default.ts | 4 +++- app/exec/build/tasks/download.ts | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/exec/build/tasks/default.ts b/app/exec/build/tasks/default.ts index 446ce9ac..4e3f76ea 100644 --- a/app/exec/build/tasks/default.ts +++ b/app/exec/build/tasks/default.ts @@ -15,6 +15,7 @@ export interface TaskArguments extends buildBase.BuildArguments { taskVersion :args.StringArgument; filter :args.StringArgument; name : args.StringArgument; + id: args.StringArgument; } export function getCommand(args: string[]): BuildTaskBase { @@ -28,7 +29,7 @@ export class BuildTaskBase extends buildBase.BuildBase { super.setCommandArgs(); this.registerCommandArgument("all", "All Tasks?", "Get all build tasks.", args.BooleanArgument, "false"); - this.registerCommandArgument("taskId", "Task ID", "Identifies a particular Build Task.", args.StringArgument,null); + this.registerCommandArgument("taskId", "Task ID", "Identifies a particular Build Task.", args.StringArgument); this.registerCommandArgument("taskPath", "Task path", "Local path to a Build Task.", args.ExistingDirectoriesArgument); this.registerCommandArgument("overwrite", "Overwrite?", "Overwrite existing Build Task.", args.BooleanArgument, "false"); this.registerCommandArgument("taskName", "Task Name", "Name of the Build Task.", args.StringArgument); @@ -38,6 +39,7 @@ export class BuildTaskBase extends buildBase.BuildBase { this.registerCommandArgument("taskVersion", "Task Version", "Build Task version.", args.StringArgument,null); this.registerCommandArgument("filter", "name filter", "Filter list by name match case.", args.StringArgument,null); this.registerCommandArgument("name", "Task Name", "Name of the Build Task to download.", args.StringArgument,null); + this.registerCommandArgument("id", "Task ID", "Identifies a particular Build Task.", args.StringArgument,null); } public exec(cmd?: any): Q.Promise { diff --git a/app/exec/build/tasks/download.ts b/app/exec/build/tasks/download.ts index 90158265..68e3f926 100644 --- a/app/exec/build/tasks/download.ts +++ b/app/exec/build/tasks/download.ts @@ -18,11 +18,11 @@ export class BuildTaskDownload extends tasksBase.BuildTaskBase { - return this.commandArgs.taskId.val().then((Id) => { + return this.commandArgs.id.val().then((Id) => { if (!Id) { Id = ""; } From dcca196f782c2020e16d5e1cccb0ffbd3ace3849 Mon Sep 17 00:00:00 2001 From: grawcho Date: Wed, 7 Sep 2016 20:38:41 +0300 Subject: [PATCH 070/235] refactor a few places with missing q --- app/exec/build/list.ts | 6 +++--- app/exec/build/show.ts | 3 ++- app/exec/build/tasks/list.ts | 3 ++- app/exec/build/tasks/upload.ts | 2 +- app/exec/logout.ts | 11 ++++++----- app/exec/reset.ts | 10 +++++----- app/exec/version.ts | 3 ++- 7 files changed, 21 insertions(+), 17 deletions(-) diff --git a/app/exec/build/list.ts b/app/exec/build/list.ts index 24c8a73b..b638f48e 100644 --- a/app/exec/build/list.ts +++ b/app/exec/build/list.ts @@ -3,7 +3,7 @@ import args = require("../../lib/arguments"); import buildBase = require("./default"); import buildClient = require("vso-node-api/BuildApi"); import buildContracts = require("vso-node-api/interfaces/BuildInterfaces"); - +import Q = require('q'); import trace = require("../../lib/trace"); export function getCommand(args: string[]): BuildGetList { @@ -17,11 +17,11 @@ export class BuildGetList extends buildBase.BuildBase { + public exec(): Q.Promise { trace.debug("build-list.exec"); var buildapi: buildClient.IBuildApi = this.webApi.getBuildApi(); - return Promise.all([ + return Q.Promise.all([ this.commandArgs.project.val(), this.commandArgs.definitionId.val(), this.commandArgs.definitionName.val(), diff --git a/app/exec/build/show.ts b/app/exec/build/show.ts index b323e68b..0705c68f 100644 --- a/app/exec/build/show.ts +++ b/app/exec/build/show.ts @@ -4,6 +4,7 @@ import buildBase = require("./default"); import buildClient = require("vso-node-api/BuildApi"); import buildContracts = require("vso-node-api/interfaces/BuildInterfaces"); import trace = require("../../lib/trace"); +import Q = require('q'); export function getCommand(args: string[]): BuildShow { return new BuildShow(args); @@ -16,7 +17,7 @@ export class BuildShow extends buildBase.BuildBase { + public exec(): Q.Promise { trace.debug("build-show.exec"); var buildapi: buildClient.IBuildApi = this.webApi.getBuildApi(); return this.commandArgs.project.val().then((project) => { diff --git a/app/exec/build/tasks/list.ts b/app/exec/build/tasks/list.ts index 99ca4084..0aec1262 100644 --- a/app/exec/build/tasks/list.ts +++ b/app/exec/build/tasks/list.ts @@ -3,6 +3,7 @@ import agentContracts = require('vso-node-api/interfaces/TaskAgentInterfaces'); import args = require("../../../lib/arguments"); import tasksBase = require("./default"); import trace = require('../../../lib/trace'); +import Q = require('q'); export function getCommand(args: string[]): BuildTaskList { return new BuildTaskList(args); @@ -16,7 +17,7 @@ export class BuildTaskList extends tasksBase.BuildTaskBase { + public exec(): Q.Promise { var agentapi = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl()); trace.debug("Searching for build tasks..."); diff --git a/app/exec/build/tasks/upload.ts b/app/exec/build/tasks/upload.ts index fcf4e3a0..31aae402 100644 --- a/app/exec/build/tasks/upload.ts +++ b/app/exec/build/tasks/upload.ts @@ -22,7 +22,7 @@ export class BuildTaskUpload extends tasksBase.BuildTaskBase { + public exec(): Q.Promise { return this.commandArgs.taskPath.val().then((taskPaths) => { let taskPath = taskPaths[0]; return this.commandArgs.overwrite.val().then((overwrite) => { diff --git a/app/exec/logout.ts b/app/exec/logout.ts index 134d9e0e..21e1e746 100644 --- a/app/exec/logout.ts +++ b/app/exec/logout.ts @@ -5,6 +5,7 @@ import args = require("../lib/arguments"); import common = require("../lib/common"); import credStore = require("../lib/credstore"); import path = require("path"); +import Q = require('q'); import trace = require("../lib/trace"); @@ -20,11 +21,11 @@ export class Reset extends TfCommand { super(args, false); } - public exec(): Promise { - return Promise.resolve(null); + public exec(): Q.Promise { + return Q.Promise.resolve(null); } - public dispose(): Promise { + public dispose(): Q.Promise { let diskCache = new DiskCache("tfx"); return diskCache.itemExists("cache", "connection").then((isCachedConnection) => { if (isCachedConnection) { @@ -34,14 +35,14 @@ export class Reset extends TfCommand { if (isCredential) { return store.clearCredential(cachedConnection, "allusers"); } else { - return Promise.resolve(null); + return Q.Promise.resolve(null); } }); }).then(() => { return diskCache.deleteItem("cache", "connection"); }) } else { - return Promise.resolve(null); + return Q.Promise.resolve(null); } }); } diff --git a/app/exec/reset.ts b/app/exec/reset.ts index c9da3a10..ac715796 100644 --- a/app/exec/reset.ts +++ b/app/exec/reset.ts @@ -4,8 +4,8 @@ import { EOL as eol } from "os"; import args = require("../lib/arguments"); import common = require("../lib/common"); import path = require("path"); - import trace = require("../lib/trace"); +import Q = require('q'); export function getCommand(args: string[]): Reset { return new Reset(args); @@ -28,11 +28,11 @@ export class Reset extends TfCommand { this.registerCommandArgument("all", "All directories", "Pass this option to reset saved options for all directories.", args.BooleanArgument, "false"); } - public exec(): Promise { - return Promise.resolve(null); + public exec(): Q.Promise { + return Q.Promise.resolve(null); } - public dispose(): Promise { + public dispose(): Q.Promise { let currentPath = path.resolve(); return this.commandArgs.all.val().then((allSettings) => { return args.getOptionsCache().then((existingCache) => { @@ -40,7 +40,7 @@ export class Reset extends TfCommand { existingCache[currentPath] = {}; return new DiskCache("tfx").setItem("cache", "command-options", allSettings ? "" : JSON.stringify(existingCache, null, 4).replace(/\n/g, eol)); } else { - return Promise.resolve(null); + return Q.Promise.resolve(null); } }); }); diff --git a/app/exec/version.ts b/app/exec/version.ts index 3c578c8d..4bda3790 100644 --- a/app/exec/version.ts +++ b/app/exec/version.ts @@ -1,6 +1,7 @@ import { TfCommand, CoreArguments } from "../lib/tfcommand"; import version = require("../lib/version"); import trace = require("../lib/trace"); +import Q= require('q'); export function getCommand(args: string[]): TfCommand { return new Version(args); @@ -16,7 +17,7 @@ export class Version extends TfCommand { super(args, false); } - public exec(): Promise { + public exec(): Q.Promise { trace.debug("version.exec"); return version.getTfxVersion(); } From daf8fad6019df2a41d6ec5770ea4eae92246deee Mon Sep 17 00:00:00 2001 From: grawcho Date: Wed, 7 Sep 2016 20:40:18 +0300 Subject: [PATCH 071/235] refactor a few places with missing q --- app/exec/build/agents.ts | 1 + app/exec/build/definition.ts | 2 ++ app/exec/build/delete.ts | 1 + app/exec/build/details.ts | 1 + app/exec/build/keep.ts | 1 + app/exec/build/pools.ts | 1 + app/exec/default.ts | 4 ++-- tsconfig.json | 2 -- 8 files changed, 9 insertions(+), 4 deletions(-) diff --git a/app/exec/build/agents.ts b/app/exec/build/agents.ts index b2005ac6..46f3b7a7 100644 --- a/app/exec/build/agents.ts +++ b/app/exec/build/agents.ts @@ -5,6 +5,7 @@ import agentClient = require("vso-node-api/TaskAgentApiBase"); import taskAgentContracts = require("vso-node-api/interfaces/TaskAgentInterfaces"); import trace = require("../../lib/trace"); import taskAgentApi = require("vso-node-api/TaskAgentApi"); +import Q = require('q'); export function getCommand(args: string[]): Agents { return new Agents(args); diff --git a/app/exec/build/definition.ts b/app/exec/build/definition.ts index 83229c3a..752dac30 100644 --- a/app/exec/build/definition.ts +++ b/app/exec/build/definition.ts @@ -4,6 +4,8 @@ import buildBase = require("./default"); import buildClient = require("vso-node-api/BuildApi"); import buildContracts = require("vso-node-api/interfaces/BuildInterfaces"); import trace = require("../../lib/trace"); +import Q = require('q'); + export function getCommand(args: string[]): BuildDefinition { return new BuildDefinition(args); diff --git a/app/exec/build/delete.ts b/app/exec/build/delete.ts index 34f73074..19f0d82e 100644 --- a/app/exec/build/delete.ts +++ b/app/exec/build/delete.ts @@ -4,6 +4,7 @@ import buildBase = require("./default"); import buildClient = require("vso-node-api/BuildApi"); import buildContracts = require("vso-node-api/interfaces/BuildInterfaces"); import trace = require("../../lib/trace"); +import Q = require('q'); export function describe(): string { return "delete a build"; diff --git a/app/exec/build/details.ts b/app/exec/build/details.ts index 53b77b87..cc9e7c4c 100644 --- a/app/exec/build/details.ts +++ b/app/exec/build/details.ts @@ -5,6 +5,7 @@ import buildClient = require("vso-node-api/BuildApi"); import buildContracts = require("vso-node-api/interfaces/BuildInterfaces"); import trace = require("../../lib/trace"); import tl = require("vsts-task-lib/task"); +import Q = require('q'); export function getCommand(args: string[]): BuildDetails { return new BuildDetails(args); diff --git a/app/exec/build/keep.ts b/app/exec/build/keep.ts index 5b4ead54..a438ef51 100644 --- a/app/exec/build/keep.ts +++ b/app/exec/build/keep.ts @@ -4,6 +4,7 @@ import buildBase = require("./default"); import buildClient = require("vso-node-api/BuildApi"); import buildContracts = require("vso-node-api/interfaces/BuildInterfaces"); import trace = require("../../lib/trace"); +import Q = require('q'); export function describe(): string { return "change build retention policy"; diff --git a/app/exec/build/pools.ts b/app/exec/build/pools.ts index 519fa6ee..f478b845 100644 --- a/app/exec/build/pools.ts +++ b/app/exec/build/pools.ts @@ -5,6 +5,7 @@ import agentClient = require("vso-node-api/TaskAgentApiBase"); import taskAgentContracts = require("vso-node-api/interfaces/TaskAgentInterfaces"); import trace = require("../../lib/trace"); import taskAgentApi = require("vso-node-api/TaskAgentApi"); +import Q = require('q'); export function getCommand(args: string[]): Pools { return new Pools(args); diff --git a/app/exec/default.ts b/app/exec/default.ts index ee8c9992..8874b932 100644 --- a/app/exec/default.ts +++ b/app/exec/default.ts @@ -1,6 +1,6 @@ import { TfCommand } from "../lib/tfcommand"; import args = require("../lib/arguments"); - +import Q = require('q'); export function getCommand(args: string[]): TfCommand { return new DefaultCommand(args); @@ -11,7 +11,7 @@ export class DefaultCommand extends TfCommand { super(passedArgs, false); } - public exec(cmd?: any): Promise { + public exec(cmd?: any): Q.Promise { return this.getHelp(cmd); } } \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index cfbe6e0b..a6c823e4 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -13,7 +13,5 @@ "app/app.ts", "app/exec/**/*.ts", "typings/**/*.d.ts" - /*, - "node_modules/@types/q/index.d.ts" // We augment the definitions with a file under typings, so we need an explicit reference here.*/ ] } \ No newline at end of file From 4b38e26c1a69edaa457c0763ff834bae88bd3b33 Mon Sep 17 00:00:00 2001 From: grawcho Date: Wed, 7 Sep 2016 21:20:50 +0300 Subject: [PATCH 072/235] fix login issue in on-prem --- app/exec/build/tasks/list.ts | 1 - app/exec/login.ts | 25 ++++++++++++++----------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/app/exec/build/tasks/list.ts b/app/exec/build/tasks/list.ts index 0aec1262..daa095c2 100644 --- a/app/exec/build/tasks/list.ts +++ b/app/exec/build/tasks/list.ts @@ -19,7 +19,6 @@ export class BuildTaskList extends tasksBase.BuildTaskBase { var agentapi = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl()); - trace.debug("Searching for build tasks..."); return agentapi.getTaskDefinitions(null, ['build'], null).then((tasks) => { trace.debug("Retrieved " + tasks.length + " build tasks from server."); diff --git a/app/exec/login.ts b/app/exec/login.ts index 0a491050..c1581e43 100644 --- a/app/exec/login.ts +++ b/app/exec/login.ts @@ -30,8 +30,15 @@ export class Login extends TfCommand { }).then((webApi) => { let agentApi = webApi.getTaskAgentApi(); return Q.Promise((resolve, reject) => { - - return agentApi.connect().then((obj) => { let tfxCredStore = getCredentialStore("tfx"); + agentApi.connect((err, statusCode, obj) => { + if (statusCode && statusCode === 401) { + trace.debug("Connection failed: invalid credentials."); + reject("Invalid credentials."); + } else if (err) { + trace.debug("Connection failed."); + reject("Connection failed. Check your internet connection & collection URL." + os.EOL + "Message: " + err.message); + } + let tfxCredStore = getCredentialStore("tfx"); let tfxCache = new DiskCache("tfx"); let credString; if (authHandler.username === "OAuth") { @@ -40,16 +47,12 @@ export class Login extends TfCommand { credString = "basic:" + authHandler.username + ":" + authHandler.password; } return tfxCredStore.storeCredential(collectionUrl, "allusers", credString).then(() => { - return tfxCache.setItem("cache", "connection", collectionUrl); + return tfxCache.setItem("cache", "connection", collectionUrl).then(() => { + resolve({ + success: true + }); + }); }); - }).catch((err) => { - if (err && err.statusCode && err.statusCode === 401) { - trace.debug("Connection failed: invalid credentials."); - throw "Invalid credentials."; - } else if (err) { - trace.debug("Connection failed."); - throw "Connection failed. Check your internet connection & collection URL." + os.EOL + "Message: " + err.message; - } }); }); }); From 2f4764bcdc073f93d541c516d27419dbb4a720d4 Mon Sep 17 00:00:00 2001 From: grawcho Date: Thu, 8 Sep 2016 11:25:15 +0300 Subject: [PATCH 073/235] roll back login to upsteam after update vso-node-api (still missing successfull login message) --- app/exec/login.ts | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/app/exec/login.ts b/app/exec/login.ts index c1581e43..a09aa10a 100644 --- a/app/exec/login.ts +++ b/app/exec/login.ts @@ -30,14 +30,8 @@ export class Login extends TfCommand { }).then((webApi) => { let agentApi = webApi.getTaskAgentApi(); return Q.Promise((resolve, reject) => { - agentApi.connect((err, statusCode, obj) => { - if (statusCode && statusCode === 401) { - trace.debug("Connection failed: invalid credentials."); - reject("Invalid credentials."); - } else if (err) { - trace.debug("Connection failed."); - reject("Connection failed. Check your internet connection & collection URL." + os.EOL + "Message: " + err.message); - } + + return agentApi.connect().then((obj) => { let tfxCredStore = getCredentialStore("tfx"); let tfxCache = new DiskCache("tfx"); let credString; @@ -47,12 +41,16 @@ export class Login extends TfCommand { credString = "basic:" + authHandler.username + ":" + authHandler.password; } return tfxCredStore.storeCredential(collectionUrl, "allusers", credString).then(() => { - return tfxCache.setItem("cache", "connection", collectionUrl).then(() => { - resolve({ - success: true - }); - }); + return tfxCache.setItem("cache", "connection", collectionUrl); }); + }).catch((err) => { + if (err && err.statusCode && err.statusCode === 401) { + trace.debug("Connection failed: invalid credentials."); + throw "Invalid credentials."; + } else if (err) { + trace.debug("Connection failed."); + throw "Connection failed. Check your internet connection & collection URL." + os.EOL + "Message: " + err.message; + } }); }); }); From d763a21e04aedb622d5b67f0dc954cf629afb1a5 Mon Sep 17 00:00:00 2001 From: sfeldman Date: Thu, 8 Sep 2016 11:33:21 +0300 Subject: [PATCH 074/235] refactor IQBuildApit to IBuildApi --- app/exec/build/definition.ts | 2 +- app/exec/build/definitions/create.ts | 2 +- app/exec/build/definitions/delete.ts | 2 +- app/exec/build/definitions/export.ts | 2 +- app/exec/build/definitions/list.ts | 2 +- app/exec/build/definitions/update.ts | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/exec/build/definition.ts b/app/exec/build/definition.ts index 752dac30..86da2ee8 100644 --- a/app/exec/build/definition.ts +++ b/app/exec/build/definition.ts @@ -20,7 +20,7 @@ export class BuildDefinition extends buildBase.BuildBase { trace.debug("build-definition.exec"); - var buildapi: buildClient.IQBuildApi = this.webApi.getQBuildApi(); + var buildapi: buildClient.IBuildApi = this.webApi.getBuildApi(); return this.commandArgs.project.val().then((project) => { return this.commandArgs.definitionId.val().then((definitionId) => { return this.commandArgs.definitionName.val().then((definitionName) => { diff --git a/app/exec/build/definitions/create.ts b/app/exec/build/definitions/create.ts index d7767321..561c1ea7 100644 --- a/app/exec/build/definitions/create.ts +++ b/app/exec/build/definitions/create.ts @@ -29,7 +29,7 @@ export class CreateDefinition extends TfCommand { - var api = this.webApi.getQBuildApi(this.connection.getCollectionUrl()); + var api = this.webApi.getBuildApi(this.connection.getCollectionUrl()); return Q.all([ this.commandArgs.project.val(), diff --git a/app/exec/build/definitions/delete.ts b/app/exec/build/definitions/delete.ts index 2c8a6d61..47f91461 100644 --- a/app/exec/build/definitions/delete.ts +++ b/app/exec/build/definitions/delete.ts @@ -27,7 +27,7 @@ export class DeleteDefinition extends TfCommand { - var api = this.webApi.getQBuildApi(this.connection.getCollectionUrl()); + var api = this.webApi.getBuildApi(this.connection.getCollectionUrl()); return Q.all([ this.commandArgs.project.val(), diff --git a/app/exec/build/definitions/export.ts b/app/exec/build/definitions/export.ts index e791ac92..49d148dc 100644 --- a/app/exec/build/definitions/export.ts +++ b/app/exec/build/definitions/export.ts @@ -33,7 +33,7 @@ export class ExportDefinition extends TfCommand { - var api = this.webApi.getQBuildApi(this.connection.getCollectionUrl()); + var api = this.webApi.getBuildApi(this.connection.getCollectionUrl()); return Q.all([ this.commandArgs.project.val(), diff --git a/app/exec/build/definitions/list.ts b/app/exec/build/definitions/list.ts index a6756fa1..70b0ebdc 100644 --- a/app/exec/build/definitions/list.ts +++ b/app/exec/build/definitions/list.ts @@ -17,7 +17,7 @@ export class ListDefinitions extends TfCommand { - var api = this.webApi.getQBuildApi(this.connection.getCollectionUrl()); + var api = this.webApi.getBuildApi(this.connection.getCollectionUrl()); trace.debug("Searching for build definitions..."); return Q.all([ diff --git a/app/exec/build/definitions/update.ts b/app/exec/build/definitions/update.ts index 1f7efeb9..f48bce48 100644 --- a/app/exec/build/definitions/update.ts +++ b/app/exec/build/definitions/update.ts @@ -29,7 +29,7 @@ export class UpdateDefinition extends TfCommand { - var api = this.webApi.getQBuildApi(this.connection.getCollectionUrl()); + var api = this.webApi.getBuildApi(this.connection.getCollectionUrl()); return Q.all([ this.commandArgs.project.val(), From 8e65c51c9ff199716a751a6eb06436df0ff57176 Mon Sep 17 00:00:00 2001 From: sfeldman Date: Thu, 8 Sep 2016 13:43:23 +0300 Subject: [PATCH 075/235] refactore IQAgentTaskApi to IAgentTaskApi --- app/exec/build/agent.ts | 4 ++-- app/exec/build/agents.ts | 2 +- app/exec/build/pools.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/exec/build/agent.ts b/app/exec/build/agent.ts index 29c24588..b94be038 100644 --- a/app/exec/build/agent.ts +++ b/app/exec/build/agent.ts @@ -20,7 +20,7 @@ export class Agent extends agentBase.BuildBase { trace.debug("agent.exec"); - var agentapi: agentClient.IQTaskAgentApiBase = this.webApi.getQTaskAgentApi(this.connection.getCollectionUrl().substring(0,this.connection.getCollectionUrl().lastIndexOf("/"))); + var agentapi: agentClient.ITaskAgentApiBase = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl().substring(0,this.connection.getCollectionUrl().lastIndexOf("/"))); return Q.all([ this.commandArgs.agentId.val(), this.commandArgs.agentName.val(), @@ -79,7 +79,7 @@ export class Agent extends agentBase.BuildBase { trace.debug("disable request: %s",disable); if (disable) { diff --git a/app/exec/build/agents.ts b/app/exec/build/agents.ts index 46f3b7a7..90fbac4e 100644 --- a/app/exec/build/agents.ts +++ b/app/exec/build/agents.ts @@ -20,7 +20,7 @@ export class Agents extends agentBase.BuildBase { trace.debug("agents.exec"); - var agentapi: agentClient.IQTaskAgentApiBase = this.webApi.getQTaskAgentApi(this.connection.getCollectionUrl().substring(0,this.connection.getCollectionUrl().lastIndexOf("/"))); + var agentapi: agentClient.ITaskAgentApiBase = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl().substring(0,this.connection.getCollectionUrl().lastIndexOf("/"))); return this.commandArgs.poolId.val().then((pool) => { trace.debug("getting pool : %s",pool); return agentapi.getAgents(pool); diff --git a/app/exec/build/pools.ts b/app/exec/build/pools.ts index f478b845..24a4c878 100644 --- a/app/exec/build/pools.ts +++ b/app/exec/build/pools.ts @@ -20,7 +20,7 @@ export class Pools extends agentBase.BuildBase { trace.debug("pool.exec"); - var agentapi: agentClient.IQTaskAgentApiBase = this.webApi.getQTaskAgentApi(this.connection.getCollectionUrl().substring(0,this.connection.getCollectionUrl().lastIndexOf("/"))); + var agentapi: agentClient.ITaskAgentApiBase = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl().substring(0,this.connection.getCollectionUrl().lastIndexOf("/"))); return agentapi.getAgentPools(); } From fd5acdea9b0b9c783ce9d82881c294b067a7148b Mon Sep 17 00:00:00 2001 From: sfeldman Date: Thu, 8 Sep 2016 13:47:41 +0300 Subject: [PATCH 076/235] fix IQBuildApi issues in queue, details and keep --- app/exec/build/delete.ts | 4 ++-- app/exec/build/details.ts | 2 +- app/exec/build/keep.ts | 4 ++-- app/exec/build/queue.ts | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/exec/build/delete.ts b/app/exec/build/delete.ts index 19f0d82e..1330d74f 100644 --- a/app/exec/build/delete.ts +++ b/app/exec/build/delete.ts @@ -24,7 +24,7 @@ export class BuildDelete extends buildBase.BuildBase { trace.debug("delete-build.exec"); - var buildapi: buildClient.IQBuildApi = this.webApi.getQBuildApi(); + var buildapi: buildClient.IBuildApi = this.webApi.getBuildApi(); return this.commandArgs.project.val().then((project) => { return this.commandArgs.buildId.val().then((buildId) => { return this._deleteBuild(buildapi, buildId, project); @@ -37,7 +37,7 @@ export class BuildDelete extends buildBase.BuildBase { diff --git a/app/exec/build/details.ts b/app/exec/build/details.ts index cc9e7c4c..f12e4f43 100644 --- a/app/exec/build/details.ts +++ b/app/exec/build/details.ts @@ -20,7 +20,7 @@ export class BuildDetails extends buildBase.BuildBase { trace.debug("build-details.exec"); - var buildapi: buildClient.IQBuildApi = this.webApi.getQBuildApi(); + var buildapi: buildClient.IBuildApi = this.webApi.getBuildApi(); return this.commandArgs.project.val().then((project) => { return this.commandArgs.buildId.val().then((buildId) => { return buildapi.getBuild(buildId, project); diff --git a/app/exec/build/keep.ts b/app/exec/build/keep.ts index a438ef51..72a98d92 100644 --- a/app/exec/build/keep.ts +++ b/app/exec/build/keep.ts @@ -24,7 +24,7 @@ export class BuildKeep extends buildBase.BuildBase { trace.debug("keep-build.exec"); - var buildapi: buildClient.IQBuildApi = this.webApi.getQBuildApi(); + var buildapi: buildClient.IBuildApi = this.webApi.getBuildApi(); return this.commandArgs.project.val().then((project) => { return this.commandArgs.buildId.val().then((buildId) => { return this._keepBuild(buildapi, buildId, project); @@ -37,7 +37,7 @@ export class BuildKeep extends buildBase.BuildBase { if (build.keepForever) { diff --git a/app/exec/build/queue.ts b/app/exec/build/queue.ts index 61c7498e..1f274179 100644 --- a/app/exec/build/queue.ts +++ b/app/exec/build/queue.ts @@ -24,7 +24,7 @@ export class BuildQueue extends buildBase.BuildBase { - var buildapi: buildClient.IQBuildApi = this.webApi.getQBuildApi(); + var buildapi: buildClient.IBuildApi = this.webApi.getBuildApi(); return this.commandArgs.project.val().then((project) => { return this.commandArgs.definitionId.val(true).then((definitionId) => { let definitionPromise: Q.Promise; @@ -82,7 +82,7 @@ export class BuildQueue extends buildBase.BuildBase Date: Thu, 8 Sep 2016 14:04:07 +0300 Subject: [PATCH 077/235] complete full validation fixes --- app/exec/build/tasks/create.ts | 5 +++-- app/exec/build/tasks/delete.ts | 3 ++- app/exec/build/tasks/download.ts | 2 +- app/exec/build/templates/list.ts | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/app/exec/build/tasks/create.ts b/app/exec/build/tasks/create.ts index 8baa2a35..75348e31 100644 --- a/app/exec/build/tasks/create.ts +++ b/app/exec/build/tasks/create.ts @@ -8,6 +8,7 @@ import shell = require("shelljs"); import tasksBase = require("./default"); import trace = require("../../../lib/trace"); import uuid = require("node-uuid"); +import Q = require('q'); export interface TaskCreateResult { taskPath: string; @@ -44,10 +45,10 @@ export class TaskCreate extends tasksBase.BuildTaskBase { return ["taskName", "friendlyName", "description", "author"]; } - public exec(): Promise { + public exec(): Q.Promise { trace.debug("build-create.exec"); - return Promise.all([ + return Q.Promise.all([ this.commandArgs.taskName.val(), this.commandArgs.friendlyName.val(), this.commandArgs.description.val(), diff --git a/app/exec/build/tasks/delete.ts b/app/exec/build/tasks/delete.ts index f1400c91..b11ff1e3 100644 --- a/app/exec/build/tasks/delete.ts +++ b/app/exec/build/tasks/delete.ts @@ -3,6 +3,7 @@ import agentContracts = require('vso-node-api/interfaces/TaskAgentInterfaces'); import args = require("../../../lib/arguments"); import tasksBase = require("./default"); import trace = require('../../../lib/trace'); +import Q = require('q'); export function getCommand(args: string[]): BuildTaskDelete { return new BuildTaskDelete(args); @@ -15,7 +16,7 @@ export class BuildTaskDelete extends tasksBase.BuildTaskBase { + public exec(): Q.Promise { let agentApi = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl()); return this.commandArgs.taskId.val().then((taskId) => { return agentApi.getTaskDefinitions(taskId).then((tasks) => { diff --git a/app/exec/build/tasks/download.ts b/app/exec/build/tasks/download.ts index 68e3f926..8c21540f 100644 --- a/app/exec/build/tasks/download.ts +++ b/app/exec/build/tasks/download.ts @@ -27,7 +27,7 @@ export class BuildTaskDownload extends tasksBase.BuildTaskBase{ - let agentApi = this.webApi.getQTaskAgentApi(this.connection.getCollectionUrl()); + let agentApi = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl()); trace.info("retriving tasks from the server ...") return agentApi.getTaskDefinitions(null, ['build'], null).then((tasks) => { var taskDictionary = this._getNewestTasks(tasks); diff --git a/app/exec/build/templates/list.ts b/app/exec/build/templates/list.ts index cedd6f2c..0c46ed80 100644 --- a/app/exec/build/templates/list.ts +++ b/app/exec/build/templates/list.ts @@ -17,7 +17,7 @@ export class ListTemplates extends TfCommand { - var api = this.webApi.getQBuildApi(this.connection.getCollectionUrl()); + var api = this.webApi.getBuildApi(this.connection.getCollectionUrl()); trace.debug("Searching for build templates..."); return Q.all([ From 5c7705df9e5fce1595bd2d24d6b204685dc87c5f Mon Sep 17 00:00:00 2001 From: grawcho Date: Thu, 8 Sep 2016 16:30:33 +0300 Subject: [PATCH 078/235] fix login messages to reflect the successful failure to login --- app/exec/login.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/exec/login.ts b/app/exec/login.ts index a09aa10a..63512cc5 100644 --- a/app/exec/login.ts +++ b/app/exec/login.ts @@ -40,15 +40,16 @@ export class Login extends TfCommand { } else { credString = "basic:" + authHandler.username + ":" + authHandler.password; } + trace.info(colors.green("Logged in successfully")); return tfxCredStore.storeCredential(collectionUrl, "allusers", credString).then(() => { return tfxCache.setItem("cache", "connection", collectionUrl); }); }).catch((err) => { if (err && err.statusCode && err.statusCode === 401) { - trace.debug("Connection failed: invalid credentials."); + trace.error("Connection failed: invalid credentials."); throw "Invalid credentials."; } else if (err) { - trace.debug("Connection failed."); + trace.error("Connection failed."); throw "Connection failed. Check your internet connection & collection URL." + os.EOL + "Message: " + err.message; } }); From 0ebad863bb36cf52f233417f38f4db82365ea1a2 Mon Sep 17 00:00:00 2001 From: sfeldman Date: Thu, 8 Sep 2016 16:35:35 +0300 Subject: [PATCH 079/235] update missing refctor in export template --- app/exec/build/templates/export.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/exec/build/templates/export.ts b/app/exec/build/templates/export.ts index 64c64974..623c0489 100644 --- a/app/exec/build/templates/export.ts +++ b/app/exec/build/templates/export.ts @@ -31,7 +31,7 @@ export class ExportTemplate extends TfCommand { - var api = this.webApi.getQBuildApi(this.connection.getCollectionUrl()); + var api = this.webApi.getBuildApi(this.connection.getCollectionUrl()); return Q.all([ this.commandArgs.project.val(), From c9bf57e34881f82a8f5d6fe2b489ef6b2b422b26 Mon Sep 17 00:00:00 2001 From: sfeldman Date: Mon, 12 Sep 2016 10:29:21 +0300 Subject: [PATCH 080/235] fix bad type in Login return --- app/exec/login.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/exec/login.ts b/app/exec/login.ts index 63512cc5..9b99860a 100644 --- a/app/exec/login.ts +++ b/app/exec/login.ts @@ -20,7 +20,7 @@ export interface LoginResult { */ export class Login extends TfCommand { protected description = "Login and cache credentials using a PAT or basic auth."; - public exec(): Q.Promise { + public exec(): Promise { trace.debug('Login.exec'); let authHandler; return this.commandArgs.serviceUrl.val().then((collectionUrl) => { From 86345bc2a1e80d349ba296b88b531c1eb618f9d9 Mon Sep 17 00:00:00 2001 From: grawcho Date: Thu, 6 Oct 2016 13:59:31 +0300 Subject: [PATCH 081/235] modify create WI to comply with upstream --- app/exec/workitem/create.ts | 33 ++------------------------------- 1 file changed, 2 insertions(+), 31 deletions(-) diff --git a/app/exec/workitem/create.ts b/app/exec/workitem/create.ts index 20600e21..a8107b7d 100644 --- a/app/exec/workitem/create.ts +++ b/app/exec/workitem/create.ts @@ -18,44 +18,15 @@ export class WorkItemCreate extends witBase.WorkItemBase return ["workItemType", "title", "assignedTo", "description", "project", "values"]; } - public exec(): Promise { + public exec(): Q.Promise { var witapi = this.webApi.getWorkItemTrackingApi(); - return Promise.all([ + return Q.Promise.all([ this.commandArgs.workItemType.val(), this.commandArgs.project.val(), this.commandArgs.title.val(true), this.commandArgs.assignedTo.val(true), this.commandArgs.description.val(true), - this.commandArgs.project.val() - ]).spread((wiType, assignedTo, title, description, project) => { - var patchDoc: vssCoreContracts.JsonPatchOperation[] = []; - patchDoc.push({ - op: vssCoreContracts.Operation.Add, - path: "/fields/System.Title", - value: title, - from: null - }); - - if (assignedTo) { - patchDoc.push({ - op: vssCoreContracts.Operation.Add, - path: "/fields/System.AssignedTo", - value: assignedTo, - from: null - }); - } - - if (description) { - patchDoc.push({ - op: vssCoreContracts.Operation.Add, - path: "/fields/System.Description", - value: description, - from: null - }); - } - // TODO: Check why this is failing in Feature Create - return witapi.updateWorkItemTemplate(null, patchDoc, project, wiType); this.commandArgs.values.val(true) ]).then((promiseValues) => { const [wiType, project, title, assignedTo, description, values] = promiseValues; From 283765906857b72dbdd3ec155c74cc4d73a4104f Mon Sep 17 00:00:00 2001 From: grawcho Date: Thu, 6 Oct 2016 15:46:39 +0300 Subject: [PATCH 082/235] add missing interpreter statement in app.ts --- app/app.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/app.ts b/app/app.ts index e1e7447a..eceed8e1 100644 --- a/app/app.ts +++ b/app/app.ts @@ -1,3 +1,4 @@ +#!/usr/bin/env node import command = require("./lib/command"); import common = require("./lib/common"); import errHandler = require("./lib/errorhandler"); @@ -26,4 +27,4 @@ Bootstrap.begin().then(() => { }).catch((reason) => { errHandler.errLog(reason); -}); \ No newline at end of file +}); From 5ef5ce635620580ee6abec32949c5197ead57bcf Mon Sep 17 00:00:00 2001 From: sfeldman Date: Mon, 10 Oct 2016 15:08:18 +0300 Subject: [PATCH 083/235] fix compilation issues for npm run build (remaining compilation issues in node modules) - remove usage of Q --- app/exec/build/agent.ts | 21 +++++++++++---------- app/exec/build/agents.ts | 3 +-- app/exec/build/default.ts | 3 +-- app/exec/build/definition.ts | 4 +--- app/exec/build/definitions/create.ts | 14 +++++++------- app/exec/build/definitions/default.ts | 2 +- app/exec/build/definitions/delete.ts | 11 +++++------ app/exec/build/definitions/export.ts | 21 ++++++++++++--------- app/exec/build/definitions/list.ts | 9 +++------ app/exec/build/definitions/update.ts | 13 ++++++------- app/exec/build/delete.ts | 3 +-- app/exec/build/details.ts | 4 +--- app/exec/build/keep.ts | 3 +-- app/exec/build/list.ts | 5 ++--- app/exec/build/pools.ts | 3 +-- app/exec/build/queue.ts | 5 ++--- app/exec/build/show.ts | 3 +-- app/exec/build/tasks/create.ts | 7 +++---- app/exec/build/tasks/default.ts | 3 +-- app/exec/build/tasks/delete.ts | 4 +--- app/exec/build/tasks/download.ts | 3 +-- app/exec/build/tasks/list.ts | 3 +-- app/exec/build/tasks/upload.ts | 3 +-- app/exec/build/templates/default.ts | 2 +- app/exec/build/templates/export.ts | 21 ++++++++++++--------- app/exec/build/templates/list.ts | 6 ++---- app/exec/default.ts | 2 +- app/exec/login.ts | 1 - app/exec/logout.ts | 10 +++++----- app/exec/reset.ts | 9 ++++----- app/exec/version.ts | 3 +-- app/exec/workitem/create.ts | 5 ++--- package.json | 2 +- 33 files changed, 94 insertions(+), 117 deletions(-) diff --git a/app/exec/build/agent.ts b/app/exec/build/agent.ts index b94be038..c0d4a034 100644 --- a/app/exec/build/agent.ts +++ b/app/exec/build/agent.ts @@ -5,7 +5,6 @@ import agentClient = require("vso-node-api/TaskAgentApiBase"); import taskAgentContracts = require("vso-node-api/interfaces/TaskAgentInterfaces"); import trace = require("../../lib/trace"); import taskAgentApi = require("vso-node-api/TaskAgentApi"); -import Q = require("q"); export function getCommand(args: string[]): Agent { return new Agent(args); @@ -18,32 +17,34 @@ export class Agent extends agentBase.BuildBase { + public exec(): Promise { trace.debug("agent.exec"); var agentapi: agentClient.ITaskAgentApiBase = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl().substring(0,this.connection.getCollectionUrl().lastIndexOf("/"))); - return Q.all([ + return Promise.all([ this.commandArgs.agentId.val(), this.commandArgs.agentName.val(), this.commandArgs.poolId.val(), this.commandArgs.userCapabilityKey.val(), this.commandArgs.userCapabilityValue.val(), this.commandArgs.disable.val() - ]).spread((agentid, agentname, pool, newkey, value, disable) => { + ]).then((values) => { + const [agentid, agentname, pool, newkey, value, disable] = values; var agents: number[] = null; trace.debug("getting pool : %s",pool); trace.debug("getting agent (id) : %s", agentid); trace.debug("getting agent (name) : %s", agentname); var include: boolean = true; if (agentid) { - agents = [agentid]; + agents = [agentid as number]; } else if(agentname) { trace.debug("No agent Id provided, checking for agent with name " + agentname); - return agentapi.getAgents(pool, agentname).then((ao: taskAgentContracts.TaskAgent[]) => { + return agentapi.getAgents(pool as number, agentname as string).then((ao: taskAgentContracts.TaskAgent[]) => { if(ao.length > 0) { - agentid = ao[0].id; - trace.debug("found, agent id %s for agent name %s",agentid, agentname); - return this._getOrUpdateAgent(agentapi, pool,agentid,newkey,value,include,disable); + var aid = ao[0].id; + var an = ao[0].name; + trace.debug("found, agent id %s for agent name %s",aid, an); + return this._getOrUpdateAgent(agentapi, pool as number,aid,newkey as string,value as string,include,disable as string); } else { trace.debug("No agents found with name " + agentname); @@ -52,7 +53,7 @@ export class Agent extends agentBase.BuildBase { + public exec(): Promise { trace.debug("agents.exec"); var agentapi: agentClient.ITaskAgentApiBase = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl().substring(0,this.connection.getCollectionUrl().lastIndexOf("/"))); return this.commandArgs.poolId.val().then((pool) => { diff --git a/app/exec/build/default.ts b/app/exec/build/default.ts index f6d473ac..6f4daed7 100644 --- a/app/exec/build/default.ts +++ b/app/exec/build/default.ts @@ -1,6 +1,5 @@ import { TfCommand, CoreArguments } from "../../lib/tfcommand"; import args = require("../../lib/arguments"); -import Q = require('q'); export interface BuildArguments extends CoreArguments { definitionId: args.IntArgument, @@ -49,7 +48,7 @@ export class BuildBase extends TfCom this.registerCommandArgument("disable","disable / enable agent","Update the agent status.",args.StringArgument,null); } - public exec(cmd?: any): Q.Promise { + public exec(cmd?: any): Promise { return this.getHelp(cmd); } } diff --git a/app/exec/build/definition.ts b/app/exec/build/definition.ts index 86da2ee8..1b3553a7 100644 --- a/app/exec/build/definition.ts +++ b/app/exec/build/definition.ts @@ -4,8 +4,6 @@ import buildBase = require("./default"); import buildClient = require("vso-node-api/BuildApi"); import buildContracts = require("vso-node-api/interfaces/BuildInterfaces"); import trace = require("../../lib/trace"); -import Q = require('q'); - export function getCommand(args: string[]): BuildDefinition { return new BuildDefinition(args); @@ -18,7 +16,7 @@ export class BuildDefinition extends buildBase.BuildBase { + public exec(): Promise { trace.debug("build-definition.exec"); var buildapi: buildClient.IBuildApi = this.webApi.getBuildApi(); return this.commandArgs.project.val().then((project) => { diff --git a/app/exec/build/definitions/create.ts b/app/exec/build/definitions/create.ts index 561c1ea7..7182b413 100644 --- a/app/exec/build/definitions/create.ts +++ b/app/exec/build/definitions/create.ts @@ -2,8 +2,7 @@ import { TfCommand, CoreArguments } from "../../../lib/tfcommand"; import buildContracts = require('vso-node-api/interfaces/BuildInterfaces'); import args = require("../../../lib/arguments"); import trace = require('../../../lib/trace'); -import Q = require("q"); -import fs = require("fs"); +import fs = require('fs'); export function getCommand(args: string[]): CreateDefinition { return new CreateDefinition(args); @@ -28,19 +27,20 @@ export class CreateDefinition extends TfCommand { + public exec(): Promise { var api = this.webApi.getBuildApi(this.connection.getCollectionUrl()); - return Q.all([ + return Promise.all([ this.commandArgs.project.val(), this.commandArgs.name.val(), this.commandArgs.definitionPath.val(), - ]).spread((project, name, definitionPath) => { + ]).then((values) => { + const [project, name, definitionPath] = values; let definition: buildContracts.BuildDefinition = JSON.parse(fs.readFileSync(definitionPath.toString(), 'utf-8')); - definition.name = name; + definition.name = name as string; trace.debug("Updating build definition %s...", name); - return api.createDefinition(definition, project).then((definition) => { + return api.createDefinition(definition, project as string).then((definition) => { return definition; }); }); diff --git a/app/exec/build/definitions/default.ts b/app/exec/build/definitions/default.ts index f90d637f..568428cd 100644 --- a/app/exec/build/definitions/default.ts +++ b/app/exec/build/definitions/default.ts @@ -11,7 +11,7 @@ export class HelpCommand extends TfCommand { super.setCommandArgs(); } - public exec(cmd?: any): Q.Promise { + public exec(cmd?: any): Promise { return this.getHelp(cmd); } } diff --git a/app/exec/build/definitions/delete.ts b/app/exec/build/definitions/delete.ts index 47f91461..8d234c30 100644 --- a/app/exec/build/definitions/delete.ts +++ b/app/exec/build/definitions/delete.ts @@ -2,7 +2,6 @@ import { TfCommand, CoreArguments } from "../../../lib/tfcommand"; import buildContracts = require('vso-node-api/interfaces/BuildInterfaces'); import args = require("../../../lib/arguments"); import trace = require('../../../lib/trace'); -import Q = require("q"); import fs = require("fs"); export function getCommand(args: string[]): DeleteDefinition { @@ -26,16 +25,16 @@ export class DeleteDefinition extends TfCommand { + public exec(): Promise { var api = this.webApi.getBuildApi(this.connection.getCollectionUrl()); - return Q.all([ + return Promise.all([ this.commandArgs.project.val(), this.commandArgs.definitionId.val(), - ]).spread((project, definitionId) => { - + ]).then((values) => { + const [project, definitionId] = values; trace.debug("Deleting build definition %s...", definitionId); - return api.deleteDefinition(definitionId, project).then((definition) => { + return api.deleteDefinition(definitionId as number, project as string).then((definition) => { return { id: definitionId } }); }); diff --git a/app/exec/build/definitions/export.ts b/app/exec/build/definitions/export.ts index 49d148dc..e74dada9 100644 --- a/app/exec/build/definitions/export.ts +++ b/app/exec/build/definitions/export.ts @@ -2,7 +2,6 @@ import { TfCommand, CoreArguments } from "../../../lib/tfcommand"; import buildContracts = require('vso-node-api/interfaces/BuildInterfaces'); import args = require("../../../lib/arguments"); import trace = require('../../../lib/trace'); -import Q = require("q"); import fs = require("fs"); export function getCommand(args: string[]): ExportDefinition { @@ -32,25 +31,29 @@ export class ExportDefinition extends TfCommand { + public exec(): Promise { var api = this.webApi.getBuildApi(this.connection.getCollectionUrl()); - return Q.all([ + return Promise.all([ this.commandArgs.project.val(), this.commandArgs.definitionId.val(), this.commandArgs.definitionPath.val(), this.commandArgs.overwrite.val(), this.commandArgs.revision.val() - ]).spread((project, definitionId, definitionPath, overwrite, revision) => { + ]).then((values) => { + const [project, definitionId, definitionPath, overwrite, revision] = values; trace.debug("Retrieving build definition %s...", definitionId); - return api.getDefinition(definitionId, project, revision).then((definition) => { + return api.getDefinition(definitionId as number, project as string, revision as number).then((definition) => { + var defpath = ""; if (!definitionPath) { - definitionPath = definition.name + '-' + definition.id + '-' + definition.revision + '.json'; + defpath = definition.name + '-' + definition.id + '-' + definition.revision + '.json'; + } else { + defpath = definitionPath as string; } - if (fs.existsSync(definitionPath.toString()) && !overwrite) { - return Q.reject(new Error("Build definition file already exists")); + if (fs.existsSync(defpath) && !overwrite) { + return Promise.reject(new Error("Build definition file already exists")); } - fs.writeFileSync(definitionPath.toString(), JSON.stringify(definition, null, ' ')); + fs.writeFileSync(defpath, JSON.stringify(definition, null, ' ')); return definition; }); }); diff --git a/app/exec/build/definitions/list.ts b/app/exec/build/definitions/list.ts index 70b0ebdc..58aba698 100644 --- a/app/exec/build/definitions/list.ts +++ b/app/exec/build/definitions/list.ts @@ -2,7 +2,6 @@ import { TfCommand, CoreArguments } from "../../../lib/tfcommand"; import buildContracts = require('vso-node-api/interfaces/BuildInterfaces'); import args = require("../../../lib/arguments"); import trace = require('../../../lib/trace'); -import Q = require("q"); export function getCommand(args: string[]): ListDefinitions { return new ListDefinitions(args); @@ -16,14 +15,12 @@ export class ListDefinitions extends TfCommand { + public exec(): Promise { var api = this.webApi.getBuildApi(this.connection.getCollectionUrl()); trace.debug("Searching for build definitions..."); - return Q.all([ - this.commandArgs.project.val() - ]).spread((project) => { - return api.getDefinitions(project).then((definitions) => { + return this.commandArgs.project.val().then((project) => { + return api.getDefinitions(project as string).then((definitions) => { trace.debug("Retrieved " + definitions.length + " build definitions from server."); return definitions; }); diff --git a/app/exec/build/definitions/update.ts b/app/exec/build/definitions/update.ts index f48bce48..1117d585 100644 --- a/app/exec/build/definitions/update.ts +++ b/app/exec/build/definitions/update.ts @@ -2,7 +2,6 @@ import { TfCommand, CoreArguments } from "../../../lib/tfcommand"; import buildContracts = require('vso-node-api/interfaces/BuildInterfaces'); import args = require("../../../lib/arguments"); import trace = require('../../../lib/trace'); -import Q = require("q"); import fs = require("fs"); export function getCommand(args: string[]): UpdateDefinition { @@ -28,25 +27,25 @@ export class UpdateDefinition extends TfCommand { + public exec(): Promise { var api = this.webApi.getBuildApi(this.connection.getCollectionUrl()); - return Q.all([ + return Promise.all([ this.commandArgs.project.val(), this.commandArgs.definitionId.val(), this.commandArgs.definitionPath.val(), - ]).spread((project, definitionId, definitionPath) => { - + ]).then((values) => { + const [project, definitionId, definitionPath] = values; // Get the current definition so we can grab the revision id trace.debug("Retrieving build definition %s...", definitionId); - return api.getDefinition(definitionId, project).then(currentDefinition => { + return api.getDefinition(definitionId as number, project as string).then(currentDefinition => { trace.debug("Reading build definition from %s...", definitionPath.toString()); let definition: buildContracts.BuildDefinition = JSON.parse(fs.readFileSync(definitionPath.toString(), 'utf-8')); definition.id = currentDefinition.id; definition.revision = currentDefinition.revision; trace.debug("Updating build definition %s...", definitionId); - return api.updateDefinition(definition, definitionId, project).then((definition) => { + return api.updateDefinition(definition, definitionId as number, project as string).then((definition) => { return definition; }); }) diff --git a/app/exec/build/delete.ts b/app/exec/build/delete.ts index 1330d74f..66429d75 100644 --- a/app/exec/build/delete.ts +++ b/app/exec/build/delete.ts @@ -4,7 +4,6 @@ import buildBase = require("./default"); import buildClient = require("vso-node-api/BuildApi"); import buildContracts = require("vso-node-api/interfaces/BuildInterfaces"); import trace = require("../../lib/trace"); -import Q = require('q'); export function describe(): string { return "delete a build"; @@ -22,7 +21,7 @@ export class BuildDelete extends buildBase.BuildBase { + public exec(): Promise { trace.debug("delete-build.exec"); var buildapi: buildClient.IBuildApi = this.webApi.getBuildApi(); return this.commandArgs.project.val().then((project) => { diff --git a/app/exec/build/details.ts b/app/exec/build/details.ts index f12e4f43..47ad02f3 100644 --- a/app/exec/build/details.ts +++ b/app/exec/build/details.ts @@ -4,8 +4,6 @@ import buildBase = require("./default"); import buildClient = require("vso-node-api/BuildApi"); import buildContracts = require("vso-node-api/interfaces/BuildInterfaces"); import trace = require("../../lib/trace"); -import tl = require("vsts-task-lib/task"); -import Q = require('q'); export function getCommand(args: string[]): BuildDetails { return new BuildDetails(args); @@ -18,7 +16,7 @@ export class BuildDetails extends buildBase.BuildBase { + public exec(): Promise { trace.debug("build-details.exec"); var buildapi: buildClient.IBuildApi = this.webApi.getBuildApi(); return this.commandArgs.project.val().then((project) => { diff --git a/app/exec/build/keep.ts b/app/exec/build/keep.ts index 72a98d92..41f4971d 100644 --- a/app/exec/build/keep.ts +++ b/app/exec/build/keep.ts @@ -4,7 +4,6 @@ import buildBase = require("./default"); import buildClient = require("vso-node-api/BuildApi"); import buildContracts = require("vso-node-api/interfaces/BuildInterfaces"); import trace = require("../../lib/trace"); -import Q = require('q'); export function describe(): string { return "change build retention policy"; @@ -22,7 +21,7 @@ export class BuildKeep extends buildBase.BuildBase { + public exec(): Promise { trace.debug("keep-build.exec"); var buildapi: buildClient.IBuildApi = this.webApi.getBuildApi(); return this.commandArgs.project.val().then((project) => { diff --git a/app/exec/build/list.ts b/app/exec/build/list.ts index b638f48e..cf14bd62 100644 --- a/app/exec/build/list.ts +++ b/app/exec/build/list.ts @@ -3,7 +3,6 @@ import args = require("../../lib/arguments"); import buildBase = require("./default"); import buildClient = require("vso-node-api/BuildApi"); import buildContracts = require("vso-node-api/interfaces/BuildInterfaces"); -import Q = require('q'); import trace = require("../../lib/trace"); export function getCommand(args: string[]): BuildGetList { @@ -17,11 +16,11 @@ export class BuildGetList extends buildBase.BuildBase { + public exec(): Promise { trace.debug("build-list.exec"); var buildapi: buildClient.IBuildApi = this.webApi.getBuildApi(); - return Q.Promise.all([ + return Promise.all([ this.commandArgs.project.val(), this.commandArgs.definitionId.val(), this.commandArgs.definitionName.val(), diff --git a/app/exec/build/pools.ts b/app/exec/build/pools.ts index 24a4c878..b95e951f 100644 --- a/app/exec/build/pools.ts +++ b/app/exec/build/pools.ts @@ -5,7 +5,6 @@ import agentClient = require("vso-node-api/TaskAgentApiBase"); import taskAgentContracts = require("vso-node-api/interfaces/TaskAgentInterfaces"); import trace = require("../../lib/trace"); import taskAgentApi = require("vso-node-api/TaskAgentApi"); -import Q = require('q'); export function getCommand(args: string[]): Pools { return new Pools(args); @@ -18,7 +17,7 @@ export class Pools extends agentBase.BuildBase { + public exec(): Promise { trace.debug("pool.exec"); var agentapi: agentClient.ITaskAgentApiBase = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl().substring(0,this.connection.getCollectionUrl().lastIndexOf("/"))); return agentapi.getAgentPools(); diff --git a/app/exec/build/queue.ts b/app/exec/build/queue.ts index 1f274179..6d47fa77 100644 --- a/app/exec/build/queue.ts +++ b/app/exec/build/queue.ts @@ -5,7 +5,6 @@ import buildClient = require("vso-node-api/BuildApi"); import buildContracts = require("vso-node-api/interfaces/BuildInterfaces"); import trace = require("../../lib/trace"); import fs = require('fs'); -import Q = require('q'); export function describe(): string { return "queue a build"; @@ -23,11 +22,11 @@ export class BuildQueue extends buildBase.BuildBase { + public exec(): Promise { var buildapi: buildClient.IBuildApi = this.webApi.getBuildApi(); return this.commandArgs.project.val().then((project) => { return this.commandArgs.definitionId.val(true).then((definitionId) => { - let definitionPromise: Q.Promise; + let definitionPromise: Promise; if (definitionId) { definitionPromise = buildapi.getDefinition(definitionId, project); } else { diff --git a/app/exec/build/show.ts b/app/exec/build/show.ts index 0705c68f..b323e68b 100644 --- a/app/exec/build/show.ts +++ b/app/exec/build/show.ts @@ -4,7 +4,6 @@ import buildBase = require("./default"); import buildClient = require("vso-node-api/BuildApi"); import buildContracts = require("vso-node-api/interfaces/BuildInterfaces"); import trace = require("../../lib/trace"); -import Q = require('q'); export function getCommand(args: string[]): BuildShow { return new BuildShow(args); @@ -17,7 +16,7 @@ export class BuildShow extends buildBase.BuildBase { + public exec(): Promise { trace.debug("build-show.exec"); var buildapi: buildClient.IBuildApi = this.webApi.getBuildApi(); return this.commandArgs.project.val().then((project) => { diff --git a/app/exec/build/tasks/create.ts b/app/exec/build/tasks/create.ts index 75348e31..7f5e2c34 100644 --- a/app/exec/build/tasks/create.ts +++ b/app/exec/build/tasks/create.ts @@ -2,13 +2,12 @@ import { TfCommand } from "../../../lib/tfcommand"; import check = require("validator"); import common = require("../../../lib/common"); import fs = require("fs"); - import path = require("path"); import shell = require("shelljs"); import tasksBase = require("./default"); import trace = require("../../../lib/trace"); import uuid = require("node-uuid"); -import Q = require('q'); + export interface TaskCreateResult { taskPath: string; @@ -45,10 +44,10 @@ export class TaskCreate extends tasksBase.BuildTaskBase { return ["taskName", "friendlyName", "description", "author"]; } - public exec(): Q.Promise { + public exec(): Promise { trace.debug("build-create.exec"); - return Q.Promise.all([ + return Promise.all([ this.commandArgs.taskName.val(), this.commandArgs.friendlyName.val(), this.commandArgs.description.val(), diff --git a/app/exec/build/tasks/default.ts b/app/exec/build/tasks/default.ts index 02afae3a..40690027 100644 --- a/app/exec/build/tasks/default.ts +++ b/app/exec/build/tasks/default.ts @@ -1,7 +1,6 @@ import { TfCommand, CoreArguments } from "../../../lib/tfcommand"; import args = require("../../../lib/arguments"); import buildBase = require("../default"); -import Q = require('q'); export interface TaskArguments extends buildBase.BuildArguments { all: args.BooleanArgument; @@ -42,7 +41,7 @@ export class BuildTaskBase extends buildBase.BuildBase { this.registerCommandArgument("id", "Task ID", "Identifies a particular Build Task.", args.StringArgument,null); } - public exec(cmd?: any): Q.Promise { + public exec(cmd?: any): Promise { return this.getHelp(cmd); } } \ No newline at end of file diff --git a/app/exec/build/tasks/delete.ts b/app/exec/build/tasks/delete.ts index b11ff1e3..a8805575 100644 --- a/app/exec/build/tasks/delete.ts +++ b/app/exec/build/tasks/delete.ts @@ -3,7 +3,6 @@ import agentContracts = require('vso-node-api/interfaces/TaskAgentInterfaces'); import args = require("../../../lib/arguments"); import tasksBase = require("./default"); import trace = require('../../../lib/trace'); -import Q = require('q'); export function getCommand(args: string[]): BuildTaskDelete { return new BuildTaskDelete(args); @@ -15,8 +14,7 @@ export class BuildTaskDelete extends tasksBase.BuildTaskBase { + public exec(): Promise { let agentApi = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl()); return this.commandArgs.taskId.val().then((taskId) => { return agentApi.getTaskDefinitions(taskId).then((tasks) => { diff --git a/app/exec/build/tasks/download.ts b/app/exec/build/tasks/download.ts index 8c21540f..d105cd6e 100644 --- a/app/exec/build/tasks/download.ts +++ b/app/exec/build/tasks/download.ts @@ -3,7 +3,6 @@ import agentContracts = require('vso-node-api/interfaces/TaskAgentInterfaces'); import args = require("../../../lib/arguments"); import fs = require('fs'); import path = require('path'); -import Q = require('q'); import tasksBase = require("./default"); import trace = require('../../../lib/trace'); import vm = require('../../../lib/jsonvalidate') @@ -21,7 +20,7 @@ export class BuildTaskDownload extends tasksBase.BuildTaskBase { + public exec(): Promise { return this.commandArgs.id.val().then((Id) => { if (!Id) { Id = ""; diff --git a/app/exec/build/tasks/list.ts b/app/exec/build/tasks/list.ts index daa095c2..591e7380 100644 --- a/app/exec/build/tasks/list.ts +++ b/app/exec/build/tasks/list.ts @@ -3,7 +3,6 @@ import agentContracts = require('vso-node-api/interfaces/TaskAgentInterfaces'); import args = require("../../../lib/arguments"); import tasksBase = require("./default"); import trace = require('../../../lib/trace'); -import Q = require('q'); export function getCommand(args: string[]): BuildTaskList { return new BuildTaskList(args); @@ -17,7 +16,7 @@ export class BuildTaskList extends tasksBase.BuildTaskBase { + public exec(): Promise { var agentapi = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl()); trace.debug("Searching for build tasks..."); return agentapi.getTaskDefinitions(null, ['build'], null).then((tasks) => { diff --git a/app/exec/build/tasks/upload.ts b/app/exec/build/tasks/upload.ts index 31aae402..07db5ae5 100644 --- a/app/exec/build/tasks/upload.ts +++ b/app/exec/build/tasks/upload.ts @@ -4,7 +4,6 @@ import archiver = require('archiver'); import args = require("../../../lib/arguments"); import fs = require('fs'); import path = require('path'); -import Q = require('q'); import tasksBase = require("./default"); import trace = require('../../../lib/trace'); import vm = require('../../../lib/jsonvalidate') @@ -22,7 +21,7 @@ export class BuildTaskUpload extends tasksBase.BuildTaskBase { + public exec(): Promise { return this.commandArgs.taskPath.val().then((taskPaths) => { let taskPath = taskPaths[0]; return this.commandArgs.overwrite.val().then((overwrite) => { diff --git a/app/exec/build/templates/default.ts b/app/exec/build/templates/default.ts index fb5bb28d..0967a098 100644 --- a/app/exec/build/templates/default.ts +++ b/app/exec/build/templates/default.ts @@ -11,7 +11,7 @@ export class HelpCommand extends TfCommand { super.setCommandArgs(); } - public exec(cmd?: any): Q.Promise { + public exec(cmd?: any): Promise { return this.getHelp(cmd); } } diff --git a/app/exec/build/templates/export.ts b/app/exec/build/templates/export.ts index 623c0489..7efa4c6f 100644 --- a/app/exec/build/templates/export.ts +++ b/app/exec/build/templates/export.ts @@ -2,7 +2,6 @@ import { TfCommand, CoreArguments } from "../../../lib/tfcommand"; import buildContracts = require('vso-node-api/interfaces/BuildInterfaces'); import args = require("../../../lib/arguments"); import trace = require('../../../lib/trace'); -import Q = require("q"); import fs = require("fs"); export function getCommand(args: string[]): ExportTemplate { @@ -30,24 +29,28 @@ export class ExportTemplate extends TfCommand { + public exec(): Promise { var api = this.webApi.getBuildApi(this.connection.getCollectionUrl()); - return Q.all([ + return Promise.all([ this.commandArgs.project.val(), this.commandArgs.templateId.val(), this.commandArgs.templatePath.val(), this.commandArgs.overwrite.val(), - ]).spread((project, templateId, templatePath, overwrite, revision) => { + ]).then((values) => { + const [project, templateId, templatePath, overwrite, revision] = values; trace.debug("Retrieving build template %s...", templateId); - return api.getTemplate(project, templateId).then((template) => { + return api.getTemplate(project as string, templateId as string).then((template) => { + var tempPath = ""; if (!templatePath) { - templatePath = template.name + '-' + template.id + '.json'; + tempPath = template.name + '-' + template.id + '.json'; + } else { + tempPath = templatePath as string; } - if (fs.existsSync(templatePath.toString()) && !overwrite) { - return Q.reject(new Error("Build template file already exists")); + if (fs.existsSync(tempPath.toString()) && !overwrite) { + return Promise.reject(new Error("Build template file already exists")); } - fs.writeFileSync(templatePath.toString(), JSON.stringify(template, null, ' ')); + fs.writeFileSync(tempPath.toString(), JSON.stringify(template, null, ' ')); return template; }); }); diff --git a/app/exec/build/templates/list.ts b/app/exec/build/templates/list.ts index 0c46ed80..ee560cb2 100644 --- a/app/exec/build/templates/list.ts +++ b/app/exec/build/templates/list.ts @@ -16,13 +16,11 @@ export class ListTemplates extends TfCommand { + public exec(): Promise { var api = this.webApi.getBuildApi(this.connection.getCollectionUrl()); trace.debug("Searching for build templates..."); - return Q.all([ - this.commandArgs.project.val() - ]).spread((project) => { + return this.commandArgs.project.val().then((project) => { return api.getTemplates(project).then((templates) => { trace.debug("Retrieved " + templates.length + " build templates from server."); return templates; diff --git a/app/exec/default.ts b/app/exec/default.ts index 8874b932..64e65a34 100644 --- a/app/exec/default.ts +++ b/app/exec/default.ts @@ -11,7 +11,7 @@ export class DefaultCommand extends TfCommand { super(passedArgs, false); } - public exec(cmd?: any): Q.Promise { + public exec(cmd?: any): Promise { return this.getHelp(cmd); } } \ No newline at end of file diff --git a/app/exec/login.ts b/app/exec/login.ts index 9b99860a..3dd0038b 100644 --- a/app/exec/login.ts +++ b/app/exec/login.ts @@ -2,7 +2,6 @@ import { TfCommand, CoreArguments } from "../lib/tfcommand"; import { DiskCache } from "../lib/diskcache"; import { getCredentialStore } from "../lib/credstore"; import colors = require("colors"); -import Q = require('q'); import os = require('os'); import trace = require('../lib/trace'); diff --git a/app/exec/logout.ts b/app/exec/logout.ts index 21e1e746..744302e9 100644 --- a/app/exec/logout.ts +++ b/app/exec/logout.ts @@ -21,11 +21,11 @@ export class Reset extends TfCommand { super(args, false); } - public exec(): Q.Promise { - return Q.Promise.resolve(null); + public exec(): Promise { + return Promise.resolve(null); } - public dispose(): Q.Promise { + public dispose(): Promise { let diskCache = new DiskCache("tfx"); return diskCache.itemExists("cache", "connection").then((isCachedConnection) => { if (isCachedConnection) { @@ -35,14 +35,14 @@ export class Reset extends TfCommand { if (isCredential) { return store.clearCredential(cachedConnection, "allusers"); } else { - return Q.Promise.resolve(null); + return Promise.resolve(null); } }); }).then(() => { return diskCache.deleteItem("cache", "connection"); }) } else { - return Q.Promise.resolve(null); + return Promise.resolve(null); } }); } diff --git a/app/exec/reset.ts b/app/exec/reset.ts index ac715796..1ff26fb1 100644 --- a/app/exec/reset.ts +++ b/app/exec/reset.ts @@ -5,7 +5,6 @@ import args = require("../lib/arguments"); import common = require("../lib/common"); import path = require("path"); import trace = require("../lib/trace"); -import Q = require('q'); export function getCommand(args: string[]): Reset { return new Reset(args); @@ -28,11 +27,11 @@ export class Reset extends TfCommand { this.registerCommandArgument("all", "All directories", "Pass this option to reset saved options for all directories.", args.BooleanArgument, "false"); } - public exec(): Q.Promise { - return Q.Promise.resolve(null); + public exec(): Promise { + return Promise.resolve(null); } - public dispose(): Q.Promise { + public dispose(): Promise { let currentPath = path.resolve(); return this.commandArgs.all.val().then((allSettings) => { return args.getOptionsCache().then((existingCache) => { @@ -40,7 +39,7 @@ export class Reset extends TfCommand { existingCache[currentPath] = {}; return new DiskCache("tfx").setItem("cache", "command-options", allSettings ? "" : JSON.stringify(existingCache, null, 4).replace(/\n/g, eol)); } else { - return Q.Promise.resolve(null); + return Promise.resolve(null); } }); }); diff --git a/app/exec/version.ts b/app/exec/version.ts index 4bda3790..3c578c8d 100644 --- a/app/exec/version.ts +++ b/app/exec/version.ts @@ -1,7 +1,6 @@ import { TfCommand, CoreArguments } from "../lib/tfcommand"; import version = require("../lib/version"); import trace = require("../lib/trace"); -import Q= require('q'); export function getCommand(args: string[]): TfCommand { return new Version(args); @@ -17,7 +16,7 @@ export class Version extends TfCommand { super(args, false); } - public exec(): Q.Promise { + public exec(): Promise { trace.debug("version.exec"); return version.getTfxVersion(); } diff --git a/app/exec/workitem/create.ts b/app/exec/workitem/create.ts index a8107b7d..485745e8 100644 --- a/app/exec/workitem/create.ts +++ b/app/exec/workitem/create.ts @@ -1,7 +1,6 @@ import { EOL as eol } from "os"; import { TfCommand } from "../../lib/tfcommand"; import args = require("../../lib/arguments"); -import Q = require("q"); import trace = require("../../lib/trace"); import witBase = require("./default"); import witClient = require("vso-node-api/WorkItemTrackingApi"); @@ -18,10 +17,10 @@ export class WorkItemCreate extends witBase.WorkItemBase return ["workItemType", "title", "assignedTo", "description", "project", "values"]; } - public exec(): Q.Promise { + public exec(): Promise { var witapi = this.webApi.getWorkItemTrackingApi(); - return Q.Promise.all([ + return Promise.all([ this.commandArgs.workItemType.val(), this.commandArgs.project.val(), this.commandArgs.title.val(true), diff --git a/package.json b/package.json index c053eea5..b52048cb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tfx-cli", - "version": "0.3.33", + "version": "0.3.34", "description": "CLI for Visual Studio Team Services and Team Foundation Server", "repository": { "type": "git", From 704c65675e01b488151ae48ab3c6db6f81dbe766 Mon Sep 17 00:00:00 2001 From: grawcho Date: Mon, 10 Oct 2016 15:12:05 +0300 Subject: [PATCH 084/235] return to Q in login --- app/exec/login.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/exec/login.ts b/app/exec/login.ts index 3dd0038b..75445bba 100644 --- a/app/exec/login.ts +++ b/app/exec/login.ts @@ -4,6 +4,7 @@ import { getCredentialStore } from "../lib/credstore"; import colors = require("colors"); import os = require('os'); import trace = require('../lib/trace'); +import Q = require('q'); export function getCommand(args: string[]): Login { // this just offers description for help and to offer sub commands @@ -19,7 +20,7 @@ export interface LoginResult { */ export class Login extends TfCommand { protected description = "Login and cache credentials using a PAT or basic auth."; - public exec(): Promise { + public exec(): Q.Promise { trace.debug('Login.exec'); let authHandler; return this.commandArgs.serviceUrl.val().then((collectionUrl) => { From d079e9ed76cae8d3d1092c0a1002ce62684eabdc Mon Sep 17 00:00:00 2001 From: sfeldman Date: Mon, 10 Oct 2016 17:04:29 +0300 Subject: [PATCH 085/235] add typings and modify some file to fix compilation issues --- app/exec/extension/create.ts | 2 +- app/exec/workitem/create.ts | 2 +- app/exec/workitem/default.ts | 4 +- tsd.json | 10 +- typings/colors/colors.d.ts | 137 + typings/copy-paste/copy-paste.d.ts | 46 + typings/lodash/lodash.d.ts | 21038 +++++++++++++++++++++++++++ typings/requirejs/require.d.ts | 417 + typings/tsd.d.ts | 4 + 9 files changed, 21654 insertions(+), 6 deletions(-) create mode 100644 typings/colors/colors.d.ts create mode 100644 typings/copy-paste/copy-paste.d.ts create mode 100644 typings/lodash/lodash.d.ts create mode 100644 typings/requirejs/require.d.ts create mode 100644 typings/tsd.d.ts diff --git a/app/exec/extension/create.ts b/app/exec/extension/create.ts index 5511f454..f47ece38 100644 --- a/app/exec/extension/create.ts +++ b/app/exec/extension/create.ts @@ -3,7 +3,7 @@ import { VsixManifestBuilder } from "./_lib/vsix-manifest-builder"; import { MergeSettings, PackageSettings } from "./_lib/interfaces"; import { VsixWriter } from "./_lib/vsix-writer"; import { TfCommand } from "../../lib/tfcommand"; -import colors = require("colors"); +import colors = require('colors'); import extBase = require("./default"); import trace = require('../../lib/trace'); diff --git a/app/exec/workitem/create.ts b/app/exec/workitem/create.ts index 485745e8..cffffbae 100644 --- a/app/exec/workitem/create.ts +++ b/app/exec/workitem/create.ts @@ -30,7 +30,7 @@ export class WorkItemCreate extends witBase.WorkItemBase ]).then((promiseValues) => { const [wiType, project, title, assignedTo, description, values] = promiseValues; if(!title && !assignedTo && !description && (!values || Object.keys(values).length <= 0)) { - return Q.reject("At least one field value must be specified."); + return Promise.reject("At least one field value must be specified."); } var patchDoc = witBase.buildWorkItemPatchDoc(title, assignedTo, description, values); diff --git a/app/exec/workitem/default.ts b/app/exec/workitem/default.ts index 75813d4d..bb391d85 100644 --- a/app/exec/workitem/default.ts +++ b/app/exec/workitem/default.ts @@ -3,8 +3,8 @@ import args = require("../../lib/arguments"); import vssCoreContracts = require("vso-node-api/interfaces/common/VSSInterfaces") import witContracts = require("vso-node-api/interfaces/WorkItemTrackingInterfaces"); import trace = require("../../lib/trace"); -import { EOL as eol } from "os"; -import _ = require("lodash"); +import { EOL as eol } from 'os'; +import _ = require('lodash'); export class WorkItemValuesJsonArgument extends args.JsonArgument {} diff --git a/tsd.json b/tsd.json index 61d6ed4a..7d75bd9d 100644 --- a/tsd.json +++ b/tsd.json @@ -12,7 +12,7 @@ "commit": "066819c65ff561ca109955e0b725c253e243f0a2" }, "colors/colors.d.ts": { - "commit": "b83eea746f8583a6c9956c19d8b553f2b66ce577" + "commit": "a11d013885ea072e6dba017ec5181eaf1ee152db" }, "glob/glob.d.ts": { "commit": "066819c65ff561ca109955e0b725c253e243f0a2" @@ -27,7 +27,7 @@ "commit": "066819c65ff561ca109955e0b725c253e243f0a2" }, "lodash/lodash.d.ts": { - "commit": "066819c65ff561ca109955e0b725c253e243f0a2" + "commit": "a11d013885ea072e6dba017ec5181eaf1ee152db" }, "tmp/tmp.d.ts": { "commit": "066819c65ff561ca109955e0b725c253e243f0a2" @@ -67,6 +67,12 @@ }, "read/read.d.ts": { "commit": "0dd29bf8253536ae24e61c109524e924ea510046" + }, + "requirejs/require.d.ts": { + "commit": "a11d013885ea072e6dba017ec5181eaf1ee152db" + }, + "copy-paste/copy-paste.d.ts": { + "commit": "f9351fd6d2154b3822444c54e687f1b102827eac" } } } diff --git a/typings/colors/colors.d.ts b/typings/colors/colors.d.ts new file mode 100644 index 00000000..50e960c4 --- /dev/null +++ b/typings/colors/colors.d.ts @@ -0,0 +1,137 @@ +// Type definitions for Colors.js 0.6.0-1 +// Project: https://github.com/Marak/colors.js +// Definitions by: Bart van der Schoor +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare module "colors" { + interface Color { + (text: string): string; + + strip: Color; + stripColors: Color; + + black: Color; + red: Color; + green: Color; + yellow: Color; + blue: Color; + magenta: Color; + cyan: Color; + white: Color; + gray: Color; + grey: Color; + + bgBlack: Color; + bgRed: Color; + bgGreen: Color; + bgYellow: Color; + bgBlue: Color; + bgMagenta: Color; + bgCyan: Color; + bgWhite: Color; + + reset: Color; + bold: Color; + dim: Color; + italic: Color; + underline: Color; + inverse: Color; + hidden: Color; + strikethrough: Color; + + rainbow: Color; + zebra: Color; + america: Color; + trap: Color; + random: Color; + zalgo: Color; + } + + namespace e { + export function setTheme(theme:any): void; + + export var enabled: boolean; + + export var strip: Color; + export var stripColors: Color; + + export var black: Color; + export var red: Color; + export var green: Color; + export var yellow: Color; + export var blue: Color; + export var magenta: Color; + export var cyan: Color; + export var white: Color; + export var gray: Color; + export var grey: Color; + + export var bgBlack: Color; + export var bgRed: Color; + export var bgGreen: Color; + export var bgYellow: Color; + export var bgBlue: Color; + export var bgMagenta: Color; + export var bgCyan: Color; + export var bgWhite: Color; + + export var reset: Color; + export var bold: Color; + export var dim: Color; + export var italic: Color; + export var underline: Color; + export var inverse: Color; + export var hidden: Color; + export var strikethrough: Color; + + export var rainbow: Color; + export var zebra: Color; + export var america: Color; + export var trap: Color; + export var random: Color; + export var zalgo: Color; + } + + export = e; +} + +interface String { + strip: string; + stripColors: string; + + black: string; + red: string; + green: string; + yellow: string; + blue: string; + magenta: string; + cyan: string; + white: string; + gray: string; + grey: string; + + bgBlack: string; + bgRed: string; + bgGreen: string; + bgYellow: string; + bgBlue: string; + bgMagenta: string; + bgCyan: string; + bgWhite: string; + + reset: string; + bold: string; + dim: string; + italic: string; + underline: string; + inverse: string; + hidden: string; + strikethrough: string; + + rainbow: string; + zebra: string; + america: string; + trap: string; + random: string; + zalgo: string; +} diff --git a/typings/copy-paste/copy-paste.d.ts b/typings/copy-paste/copy-paste.d.ts new file mode 100644 index 00000000..a8a844b5 --- /dev/null +++ b/typings/copy-paste/copy-paste.d.ts @@ -0,0 +1,46 @@ +// Type definitions for copy-paste v1.1.3 +// Project: https://github.com/xavi-/node-copy-paste +// Definitions by: Tobias Kahlert +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare module 'copy-paste' { + + export type CopyCallback = (err: Error) => void; + export type PasteCallback = (err: Error, content: string) => void; + + /** + * Asynchronously replaces the current contents of the clip board with text. + * + * @param {T} content Takes either a string, array, object, or readable stream. + * @return {T} Returns the same value passed in. + */ + export function copy(content: T): T; + + /** + * Asynchronously replaces the current contents of the clip board with text. + * + * @param {T} content Takes either a string, array, object, or readable stream. + * @param {CopyCallback} callback will fire when the copy operation is complete. + * @return {T} Returns the same value passed in. + */ + export function copy(content: T, callback: CopyCallback): T; + + + /** + * Synchronously returns the current contents of the system clip board. + * + * Note: The synchronous version of paste is not always availabled. + * An error message is shown if the synchronous version of paste is used on an unsupported platform. + * The asynchronous version of paste is always available. + * + * @return {string} Returns the current contents of the system clip board. + */ + export function paste(): string; + + /** + * Asynchronously returns the current contents of the system clip board. + * + * @param {PasteCallback} callback The contents of the system clip board are passed to the callback as the second parameter. + */ + export function paste(callback: PasteCallback): void; +} \ No newline at end of file diff --git a/typings/lodash/lodash.d.ts b/typings/lodash/lodash.d.ts new file mode 100644 index 00000000..3305528a --- /dev/null +++ b/typings/lodash/lodash.d.ts @@ -0,0 +1,21038 @@ +// Type definitions for Lo-Dash 4.14 +// Project: http://lodash.com/ +// Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + + +/** +### 4.0.0 Changelog (https://github.com/lodash/lodash/wiki/Changelog) + +#### TODO: +removed: +- [x] Removed _.support +- [x] Removed _.findWhere in favor of _.find with iteratee shorthand +- [x] Removed _.where in favor of _.filter with iteratee shorthand +- [x] Removed _.pluck in favor of _.map with iteratee shorthand + +renamed: +- [x] Renamed _.first to _.head +- [x] Renamed _.indexBy to _.keyBy +- [x] Renamed _.invoke to _.invokeMap +- [x] Renamed _.overArgs to _.overArgs +- [x] Renamed _.padLeft & _.padRight to _.padStart & _.padEnd +- [x] Renamed _.pairs to _.toPairs +- [x] Renamed _.rest to _.tail +- [x] Renamed _.restParam to _.rest +- [x] Renamed _.sortByOrder to _.orderBy +- [x] Renamed _.trimLeft & _.trimRight to _.trimStart & _.trimEnd +- [x] Renamed _.trunc to _.truncate + +split: +- [x] Split _.indexOf & _.lastIndexOf into _.sortedIndexOf & _.sortedLastIndexOf +- [x] Split _.max & _.min into _.maxBy & _.minBy +- [x] Split _.omit & _.pick into _.omitBy & _.pickBy +- [x] Split _.sample into _.sampleSize +- [x] Split _.sortedIndex into _.sortedIndexBy +- [x] Split _.sortedLastIndex into _.sortedLastIndexBy +- [x] Split _.uniq into _.sortedUniq, _.sortedUniqBy, & _.uniqBy + +changes: +- [x] Absorbed _.sortByAll into _.sortBy +- [x] Changed the category of _.at to “Object” +- [x] Changed the category of _.bindAll to “Utility” +- [x] Made _.capitalize uppercase the first character & lowercase the rest +- [x] Made _.functions return only own method names + + +added 23 array methods: +- [x] _.concat +- [x] _.differenceBy +- [x] _.differenceWith +- [x] _.flatMap +- [x] _.fromPairs +- [x] _.intersectionBy +- [x] _.intersectionWith +- [x] _.join +- [x] _.pullAll +- [x] _.pullAllBy +- [x] _.reverse +- [x] _.sortedIndexBy +- [x] _.sortedIndexOf +- [x] _.sortedLastIndexBy +- [x] _.sortedLastIndexOf +- [x] _.sortedUniq +- [x] _.sortedUniqBy +- [x] _.unionBy +- [x] _.unionWith +- [x] _.uniqBy +- [x] _.uniqWith +- [x] _.xorBy +- [x] _.xorWith + +added 18 lang methods: +- [x] _.cloneDeepWith +- [x] _.cloneWith +- [x] _.eq +- [x] _.isArrayLike +- [x] _.isArrayLikeObject +- [x] _.isEqualWith +- [x] _.isInteger +- [x] _.isLength +- [x] _.isMatchWith +- [x] _.isNil +- [x] _.isObjectLike +- [x] _.isSafeInteger +- [x] _.isSymbol +- [x] _.toInteger +- [x] _.toLength +- [x] _.toNumber +- [x] _.toSafeInteger +- [x] _.toString + +added 13 object methods: +- [x] _.assignIn +- [x] _.assignInWith +- [x] _.assignWith +- [x] _.functionsIn +- [x] _.hasIn +- [x] _.mergeWith +- [x] _.omitBy +- [x] _.pickBy + + +added 8 string methods: +- [x] _.lowerCase +- [x] _.lowerFirst +- [x] _.upperCase +- [x] _.upperFirst +- [x] _.toLower +- [x] _.toUpper + +added 8 utility methods: +- [x] _.toPath + +added 4 math methods: +- [x] _.maxBy +- [x] _.mean +- [x] _.minBy +- [x] _.sumBy + +added 2 function methods: +- [x] _.flip +- [x] _.unary + +added 2 number methods: +- [x] _.clamp +- [x] _.subtract + +added collection method: +- [x] _.sampleSize + +Added 3 aliases + +- [x] _.first as an alias of _.head + +Removed 17 aliases +- [x] Removed aliase _.all +- [x] Removed aliase _.any +- [x] Removed aliase _.backflow +- [x] Removed aliase _.callback +- [x] Removed aliase _.collect +- [x] Removed aliase _.compose +- [x] Removed aliase _.contains +- [x] Removed aliase _.detect +- [x] Removed aliase _.foldl +- [x] Removed aliase _.foldr +- [x] Removed aliase _.include +- [x] Removed aliase _.inject +- [x] Removed aliase _.methods +- [x] Removed aliase _.object +- [x] Removed aliase _.run +- [x] Removed aliase _.select +- [x] Removed aliase _.unique + +Other changes +- [x] Added support for array buffers to _.isEqual +- [x] Added support for converting iterators to _.toArray +- [x] Added support for deep paths to _.zipObject +- [x] Changed UMD to export to window or self when available regardless of other exports +- [x] Ensured debounce cancel clears args & thisArg references +- [x] Ensured _.add, _.subtract, & _.sum don’t skip NaN values +- [x] Ensured _.clone treats generators like functions +- [x] Ensured _.clone produces clones with the source’s [[Prototype]] +- [x] Ensured _.defaults assigns properties that shadow Object.prototype +- [x] Ensured _.defaultsDeep doesn’t merge a string into an array +- [x] Ensured _.defaultsDeep & _.merge don’t modify sources +- [x] Ensured _.defaultsDeep works with circular references +- [x] Ensured _.keys skips “length” on strict mode arguments objects in Safari 9 +- [x] Ensured _.merge doesn’t convert strings to arrays +- [x] Ensured _.merge merges plain-objects onto non plain-objects +- [x] Ensured _#plant resets iterator data of cloned sequences +- [x] Ensured _.random swaps min & max if min is greater than max +- [x] Ensured _.range preserves the sign of start of -0 +- [x] Ensured _.reduce & _.reduceRight use getIteratee in their array branch +- [x] Fixed rounding issue with the precision param of _.floor +- [x] Added flush method to debounced & throttled functions + +** LATER ** +Misc: +- [ ] Made _.forEach, _.forIn, _.forOwn, & _.times implicitly end a chain sequence +- [ ] Removed thisArg params from most methods +- [ ] Made “By” methods provide a single param to iteratees +- [ ] Made _.words chainable by default +- [ ] Removed isDeep params from _.clone & _.flatten +- [ ] Removed _.bindAll support for binding all methods when no names are provided +- [ ] Removed func-first param signature from _.before & _.after +- [ ] _.extend as an alias of _.assignIn +- [ ] _.extendWith as an alias of _.assignInWith +- [ ] Added clear method to _.memoize.Cache +- [ ] Added support for ES6 maps, sets, & symbols to _.clone, _.isEqual, & _.toArray +- [ ] Enabled _.flow & _.flowRight to accept an array of functions +- [ ] Ensured “Collection” methods treat functions as objects +- [ ] Ensured _.assign, _.defaults, & _.merge coerce object values to objects +- [ ] Ensured _.bindKey bound functions call object[key] when called with the new operator +- [ ] Ensured _.isFunction returns true for generator functions +- [ ] Ensured _.merge assigns typed arrays directly +- [ ] Made _(...) an iterator & iterable +- [ ] Made _.drop, _.take, & right forms coerce n of undefined to 0 + +Methods: +- [ ] _.concat +- [ ] _.differenceBy +- [ ] _.differenceWith +- [ ] _.flatMap +- [ ] _.fromPairs +- [ ] _.intersectionBy +- [ ] _.intersectionWith +- [ ] _.join +- [ ] _.pullAll +- [ ] _.pullAllBy +- [ ] _.reverse +- [ ] _.sortedLastIndexOf +- [ ] _.unionBy +- [ ] _.unionWith +- [ ] _.uniqWith +- [ ] _.xorBy +- [ ] _.xorWith +- [ ] _.toString + +- [ ] _.invoke +- [ ] _.setWith +- [ ] _.toPairs +- [ ] _.toPairsIn +- [ ] _.unset + +- [ ] _.replace +- [ ] _.split + +- [ ] _.cond +- [ ] _.conforms +- [ ] _.nthArg +- [ ] _.over +- [ ] _.overEvery +- [ ] _.overSome +- [ ] _.rangeRight + +- [ ] _.next +*/ + +declare var _: _.LoDashStatic; + +declare module _ { + interface LoDashStatic { + /** + * Creates a lodash object which wraps the given value to enable intuitive method chaining. + * + * In addition to Lo-Dash methods, wrappers also have the following Array methods: + * concat, join, pop, push, reverse, shift, slice, sort, splice, and unshift + * + * Chaining is supported in custom builds as long as the value method is implicitly or + * explicitly included in the build. + * + * The chainable wrapper functions are: + * after, assign, bind, bindAll, bindKey, chain, chunk, compact, compose, concat, countBy, + * createCallback, curry, debounce, defaults, defer, delay, difference, filter, flatten, + * forEach, forEachRight, forIn, forInRight, forOwn, forOwnRight, functions, groupBy, + * keyBy, initial, intersection, invert, invoke, keys, map, max, memoize, merge, min, + * object, omit, once, pairs, partial, partialRight, pick, pluck, pull, push, range, reject, + * remove, rest, reverse, sample, shuffle, slice, sort, sortBy, splice, tap, throttle, times, + * toArray, transform, union, uniq, unset, unshift, unzip, values, where, without, wrap, and zip + * + * The non-chainable wrapper functions are: + * clone, cloneDeep, contains, escape, every, find, findIndex, findKey, findLast, + * findLastIndex, findLastKey, has, identity, indexOf, isArguments, isArray, isBoolean, + * isDate, isElement, isEmpty, isEqual, isFinite, isFunction, isNaN, isNull, isNumber, + * isObject, isPlainObject, isRegExp, isString, isUndefined, join, lastIndexOf, mixin, + * noConflict, parseInt, pop, random, reduce, reduceRight, result, shift, size, some, + * sortedIndex, runInContext, template, unescape, uniqueId, and value + * + * The wrapper functions first and last return wrapped values when n is provided, otherwise + * they return unwrapped values. + * + * Explicit chaining can be enabled by using the _.chain method. + **/ + (value: number): LoDashImplicitWrapper; + (value: string): LoDashImplicitStringWrapper; + (value: boolean): LoDashImplicitWrapper; + (value: Array): LoDashImplicitNumberArrayWrapper; + (value: Array): LoDashImplicitArrayWrapper; + (value: T): LoDashImplicitObjectWrapper; + (value: any): LoDashImplicitWrapper; + + /** + * The semantic version number. + **/ + VERSION: string; + + /** + * By default, the template delimiters used by Lo-Dash are similar to those in embedded Ruby + * (ERB). Change the following template settings to use alternative delimiters. + **/ + templateSettings: TemplateSettings; + } + + /** + * By default, the template delimiters used by Lo-Dash are similar to those in embedded Ruby + * (ERB). Change the following template settings to use alternative delimiters. + **/ + interface TemplateSettings { + /** + * The "escape" delimiter. + **/ + escape?: RegExp; + + /** + * The "evaluate" delimiter. + **/ + evaluate?: RegExp; + + /** + * An object to import into the template as local variables. + **/ + imports?: Dictionary; + + /** + * The "interpolate" delimiter. + **/ + interpolate?: RegExp; + + /** + * Used to reference the data object in the template text. + **/ + variable?: string; + } + + /** + * Creates a cache object to store key/value pairs. + */ + interface MapCache { + /** + * Removes `key` and its value from the cache. + * @param key The key of the value to remove. + * @return Returns `true` if the entry was removed successfully, else `false`. + */ + delete(key: string): boolean; + + /** + * Gets the cached value for `key`. + * @param key The key of the value to get. + * @return Returns the cached value. + */ + get(key: string): any; + + /** + * Checks if a cached value for `key` exists. + * @param key The key of the entry to check. + * @return Returns `true` if an entry for `key` exists, else `false`. + */ + has(key: string): boolean; + + /** + * Sets `value` to `key` of the cache. + * @param key The key of the value to cache. + * @param value The value to cache. + * @return Returns the cache object. + */ + set(key: string, value: any): _.Dictionary; + } + interface MapCacheConstructor { + new (): MapCache; + } + + interface LoDashWrapperBase { } + + interface LoDashImplicitWrapperBase extends LoDashWrapperBase { } + + interface LoDashExplicitWrapperBase extends LoDashWrapperBase { } + + interface LoDashImplicitWrapper extends LoDashImplicitWrapperBase> { } + + interface LoDashExplicitWrapper extends LoDashExplicitWrapperBase> { } + + interface LoDashImplicitStringWrapper extends LoDashImplicitWrapper { } + + interface LoDashExplicitStringWrapper extends LoDashExplicitWrapper { } + + interface LoDashImplicitObjectWrapper extends LoDashImplicitWrapperBase> { } + + interface LoDashExplicitObjectWrapper extends LoDashExplicitWrapperBase> { } + + interface LoDashImplicitArrayWrapper extends LoDashImplicitWrapperBase> { + pop(): T; + push(...items: T[]): LoDashImplicitArrayWrapper; + shift(): T; + sort(compareFn?: (a: T, b: T) => number): LoDashImplicitArrayWrapper; + splice(start: number): LoDashImplicitArrayWrapper; + splice(start: number, deleteCount: number, ...items: any[]): LoDashImplicitArrayWrapper; + unshift(...items: T[]): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper extends LoDashExplicitWrapperBase> { + pop(): LoDashExplicitObjectWrapper; + push(...items: T[]): LoDashExplicitArrayWrapper; + shift(): LoDashExplicitObjectWrapper; + sort(compareFn?: (a: T, b: T) => number): LoDashExplicitArrayWrapper; + splice(start: number): LoDashExplicitArrayWrapper; + splice(start: number, deleteCount: number, ...items: any[]): LoDashExplicitArrayWrapper; + unshift(...items: T[]): LoDashExplicitArrayWrapper; + } + + interface LoDashImplicitNumberArrayWrapper extends LoDashImplicitArrayWrapper { } + + interface LoDashExplicitNumberArrayWrapper extends LoDashExplicitArrayWrapper { } + + /********* + * Array * + *********/ + + //_.chunk + interface LoDashStatic { + /** + * Creates an array of elements split into groups the length of size. If collection can’t be split evenly, the + * final chunk will be the remaining elements. + * + * @param array The array to process. + * @param size The length of each chunk. + * @return Returns the new array containing chunks. + */ + chunk( + array: List, + size?: number + ): T[][]; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.chunk + */ + chunk(size?: number): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.chunk + */ + chunk(size?: number): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.chunk + */ + chunk(size?: number): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.chunk + */ + chunk(size?: number): LoDashExplicitArrayWrapper; + } + + //_.compact + interface LoDashStatic { + /** + * Creates an array with all falsey values removed. The values false, null, 0, "", undefined, and NaN are + * falsey. + * + * @param array The array to compact. + * @return (Array) Returns the new array of filtered values. + */ + compact(array?: List): T[]; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.compact + */ + compact(): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.compact + */ + compact(): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.compact + */ + compact(): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.compact + */ + compact(): LoDashExplicitArrayWrapper; + } + + //_.concat DUMMY + interface LoDashStatic { + /** + * Creates a new array concatenating `array` with any additional arrays + * and/or values. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to concatenate. + * @param {...*} [values] The values to concatenate. + * @returns {Array} Returns the new concatenated array. + * @example + * + * var array = [1]; + * var other = _.concat(array, 2, [3], [[4]]); + * + * console.log(other); + * // => [1, 2, 3, [4]] + * + * console.log(array); + * // => [1] + */ + concat(array: T[]|List, ...values: (T|T[]|List)[]) : T[]; + } + + //_.difference + interface LoDashStatic { + /** + * Creates an array of unique array values not included in the other provided arrays using SameValueZero for + * equality comparisons. + * + * @param array The array to inspect. + * @param values The arrays of values to exclude. + * @return Returns the new array of filtered values. + */ + difference( + array: T[]|List, + ...values: Array> + ): T[]; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.difference + */ + difference(...values: (T[]|List)[]): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.difference + */ + difference(...values: (TValue[]|List)[]): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.difference + */ + difference(...values: (T[]|List)[]): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.difference + */ + difference(...values: (TValue[]|List)[]): LoDashExplicitArrayWrapper; + } + + //_.differenceBy + interface LoDashStatic { + /** + * This method is like _.difference except that it accepts iteratee which is invoked for each element of array + * and values to generate the criterion by which uniqueness is computed. The iteratee is invoked with one + * argument: (value). + * + * @param array The array to inspect. + * @param values The values to exclude. + * @param iteratee The iteratee invoked per element. + * @returns Returns the new array of filtered values. + */ + differenceBy( + array: T[]|List, + values?: T[]|List, + iteratee?: ((value: T) => any)|string + ): T[]; + + /** + * @see _.differenceBy + */ + differenceBy( + array: T[]|List, + values?: T[]|List, + iteratee?: W + ): T[]; + + /** + * @see _.differenceBy + */ + differenceBy( + array: T[]|List, + values1?: T[]|List, + values2?: T[]|List, + iteratee?: ((value: T) => any)|string + ): T[]; + + /** + * @see _.differenceBy + */ + differenceBy( + array: T[]|List, + values1?: T[]|List, + values2?: T[]|List, + iteratee?: W + ): T[]; + + /** + * @see _.differenceBy + */ + differenceBy( + array: T[]|List, + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + iteratee?: ((value: T) => any)|string + ): T[]; + + /** + * @see _.differenceBy + */ + differenceBy( + array: T[]|List, + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + iteratee?: W + ): T[]; + + /** + * @see _.differenceBy + */ + differenceBy( + array: T[]|List, + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + values4?: T[]|List, + iteratee?: W + ): T[]; + + /** + * @see _.differenceBy + */ + differenceBy( + array: T[]|List, + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + values4?: T[]|List, + iteratee?: ((value: T) => any)|string + ): T[]; + + /** + * @see _.differenceBy + */ + differenceBy( + array: T[]|List, + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + values4?: T[]|List, + values5?: T[]|List, + iteratee?: ((value: T) => any)|string + ): T[]; + + /** + * @see _.differenceBy + */ + differenceBy( + array: T[]|List, + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + values4?: T[]|List, + values5?: T[]|List, + iteratee?: W + ): T[]; + + /** + * @see _.differenceBy + */ + differenceBy( + array: T[]|List, + ...values: any[] + ): T[]; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.differenceBy + */ + differenceBy( + values?: T[]|List, + iteratee?: ((value: T) => any)|string + ): LoDashImplicitArrayWrapper; + + /** + * @see _.differenceBy + */ + differenceBy( + values?: T[]|List, + iteratee?: W + ): LoDashImplicitArrayWrapper; + + /** + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + iteratee?: ((value: T) => any)|string + ): LoDashImplicitArrayWrapper; + + /** + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + iteratee?: W + ): LoDashImplicitArrayWrapper; + + /** + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + iteratee?: ((value: T) => any)|string + ): LoDashImplicitArrayWrapper; + + /** + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + iteratee?: W + ): LoDashImplicitArrayWrapper; + + /** + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + values4?: T[]|List, + iteratee?: ((value: T) => any)|string + ): LoDashImplicitArrayWrapper; + + /** + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + values4?: T[]|List, + iteratee?: W + ): LoDashImplicitArrayWrapper; + + /** + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + values4?: T[]|List, + values5?: T[]|List, + iteratee?: ((value: T) => any)|string + ): LoDashImplicitArrayWrapper; + + /** + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + values4?: T[]|List, + values5?: T[]|List, + iteratee?: W + ): LoDashImplicitArrayWrapper; + + /** + * @see _.differenceBy + */ + differenceBy( + ...values: any[] + ): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.differenceBy + */ + differenceBy( + values?: T[]|List, + iteratee?: ((value: T) => any)|string + ): LoDashImplicitArrayWrapper; + + /** + * @see _.differenceBy + */ + differenceBy( + values?: T[]|List, + iteratee?: W + ): LoDashImplicitArrayWrapper; + + /** + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + iteratee?: ((value: T) => any)|string + ): LoDashImplicitArrayWrapper; + + /** + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + iteratee?: W + ): LoDashImplicitArrayWrapper; + + /** + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + iteratee?: ((value: T) => any)|string + ): LoDashImplicitArrayWrapper; + + /** + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + iteratee?: W + ): LoDashImplicitArrayWrapper; + + /** + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + values4?: T[]|List, + iteratee?: ((value: T) => any)|string + ): LoDashImplicitArrayWrapper; + + /** + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + values4?: T[]|List, + iteratee?: W + ): LoDashImplicitArrayWrapper; + + /** + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + values4?: T[]|List, + values5?: T[]|List, + iteratee?: ((value: T) => any)|string + ): LoDashImplicitArrayWrapper; + + /** + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + values4?: T[]|List, + values5?: T[]|List, + iteratee?: W + ): LoDashImplicitArrayWrapper; + + /** + * @see _.differenceBy + */ + differenceBy( + ...values: any[] + ): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.differenceBy + */ + differenceBy( + values?: T[]|List, + iteratee?: ((value: T) => any)|string + ): LoDashExplicitArrayWrapper; + + /** + * @see _.differenceBy + */ + differenceBy( + values?: T[]|List, + iteratee?: W + ): LoDashExplicitArrayWrapper; + + /** + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + iteratee?: ((value: T) => any)|string + ): LoDashExplicitArrayWrapper; + + /** + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + iteratee?: W + ): LoDashExplicitArrayWrapper; + + /** + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + iteratee?: ((value: T) => any)|string + ): LoDashExplicitArrayWrapper; + + /** + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + iteratee?: W + ): LoDashExplicitArrayWrapper; + + /** + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + values4?: T[]|List, + iteratee?: ((value: T) => any)|string + ): LoDashExplicitArrayWrapper; + + /** + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + values4?: T[]|List, + iteratee?: W + ): LoDashExplicitArrayWrapper; + + /** + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + values4?: T[]|List, + values5?: T[]|List, + iteratee?: ((value: T) => any)|string + ): LoDashExplicitArrayWrapper; + + /** + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + values4?: T[]|List, + values5?: T[]|List, + iteratee?: W + ): LoDashExplicitArrayWrapper; + + /** + * @see _.differenceBy + */ + differenceBy( + ...values: any[] + ): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.differenceBy + */ + differenceBy( + values?: T[]|List, + iteratee?: ((value: T) => any)|string + ): LoDashExplicitArrayWrapper; + + /** + * @see _.differenceBy + */ + differenceBy( + values?: T[]|List, + iteratee?: W + ): LoDashExplicitArrayWrapper; + + /** + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + iteratee?: ((value: T) => any)|string + ): LoDashExplicitArrayWrapper; + + /** + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + iteratee?: W + ): LoDashExplicitArrayWrapper; + + /** + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + iteratee?: ((value: T) => any)|string + ): LoDashExplicitArrayWrapper; + + /** + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + iteratee?: W + ): LoDashExplicitArrayWrapper; + + /** + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + values4?: T[]|List, + iteratee?: ((value: T) => any)|string + ): LoDashExplicitArrayWrapper; + + /** + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + values4?: T[]|List, + iteratee?: W + ): LoDashExplicitArrayWrapper; + + /** + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + values4?: T[]|List, + values5?: T[]|List, + iteratee?: ((value: T) => any)|string + ): LoDashExplicitArrayWrapper; + + /** + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + values4?: T[]|List, + values5?: T[]|List, + iteratee?: W + ): LoDashExplicitArrayWrapper; + + /** + * @see _.differenceBy + */ + differenceBy( + ...values: any[] + ): LoDashExplicitArrayWrapper; + } + + //_.differenceWith DUMMY + interface LoDashStatic { + /** + * Creates an array of unique `array` values not included in the other + * provided arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.difference([3, 2, 1], [4, 2]); + * // => [3, 1] + */ + differenceWith( + array: any[]|List, + ...values: any[] + ): any[]; + } + + //_.drop + interface LoDashStatic { + /** + * Creates a slice of array with n elements dropped from the beginning. + * + * @param array The array to query. + * @param n The number of elements to drop. + * @return Returns the slice of array. + */ + drop(array: T[]|List, n?: number): T[]; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.drop + */ + drop(n?: number): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.drop + */ + drop(n?: number): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.drop + */ + drop(n?: number): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.drop + */ + drop(n?: number): LoDashExplicitArrayWrapper; + } + + //_.dropRight + interface LoDashStatic { + /** + * Creates a slice of array with n elements dropped from the end. + * + * @param array The array to query. + * @param n The number of elements to drop. + * @return Returns the slice of array. + */ + dropRight( + array: List, + n?: number + ): T[]; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.dropRight + */ + dropRight(n?: number): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.dropRight + */ + dropRight(n?: number): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.dropRight + */ + dropRight(n?: number): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.dropRight + */ + dropRight(n?: number): LoDashExplicitArrayWrapper; + } + + //_.dropRightWhile + interface LoDashStatic { + /** + * Creates a slice of array excluding elements dropped from the end. Elements are dropped until predicate + * returns falsey. The predicate is bound to thisArg and invoked with three arguments: (value, index, array). + * + * If a property name is provided for predicate the created _.property style callback returns the property + * value of the given element. + * + * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for + * elements that have a matching property value, else false. + * + * If an object is provided for predicate the created _.matches style callback returns true for elements that + * match the properties of the given object, else false. + * + * @param array The array to query. + * @param predicate The function invoked per iteration. + * @param thisArg The this binding of predicate. + * @return Returns the slice of array. + */ + dropRightWhile( + array: List, + predicate?: ListIterator + ): TValue[]; + + /** + * @see _.dropRightWhile + */ + dropRightWhile( + array: List, + predicate?: string + ): TValue[]; + + /** + * @see _.dropRightWhile + */ + dropRightWhile( + array: List, + predicate?: TWhere + ): TValue[]; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.dropRightWhile + */ + dropRightWhile( + predicate?: ListIterator + ): LoDashImplicitArrayWrapper; + + /** + * @see _.dropRightWhile + */ + dropRightWhile( + predicate?: string + ): LoDashImplicitArrayWrapper; + + /** + * @see _.dropRightWhile + */ + dropRightWhile( + predicate?: TWhere + ): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.dropRightWhile + */ + dropRightWhile( + predicate?: ListIterator + ): LoDashImplicitArrayWrapper; + + /** + * @see _.dropRightWhile + */ + dropRightWhile( + predicate?: string + ): LoDashImplicitArrayWrapper; + + /** + * @see _.dropRightWhile + */ + dropRightWhile( + predicate?: TWhere + ): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.dropRightWhile + */ + dropRightWhile( + predicate?: ListIterator + ): LoDashExplicitArrayWrapper; + + /** + * @see _.dropRightWhile + */ + dropRightWhile( + predicate?: string + ): LoDashExplicitArrayWrapper; + + /** + * @see _.dropRightWhile + */ + dropRightWhile( + predicate?: TWhere + ): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.dropRightWhile + */ + dropRightWhile( + predicate?: ListIterator + ): LoDashExplicitArrayWrapper; + + /** + * @see _.dropRightWhile + */ + dropRightWhile( + predicate?: string + ): LoDashExplicitArrayWrapper; + + /** + * @see _.dropRightWhile + */ + dropRightWhile( + predicate?: TWhere + ): LoDashExplicitArrayWrapper; + } + + //_.dropWhile + interface LoDashStatic { + /** + * Creates a slice of array excluding elements dropped from the beginning. Elements are dropped until predicate + * returns falsey. The predicate is bound to thisArg and invoked with three arguments: (value, index, array). + * + * If a property name is provided for predicate the created _.property style callback returns the property + * value of the given element. + * + * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for + * elements that have a matching property value, else false. + * + * If an object is provided for predicate the created _.matches style callback returns true for elements that + * have the properties of the given object, else false. + * + * @param array The array to query. + * @param predicate The function invoked per iteration. + * @param thisArg The this binding of predicate. + * @return Returns the slice of array. + */ + dropWhile( + array: List, + predicate?: ListIterator + ): TValue[]; + + /** + * @see _.dropWhile + */ + dropWhile( + array: List, + predicate?: string + ): TValue[]; + + /** + * @see _.dropWhile + */ + dropWhile( + array: List, + predicate?: TWhere + ): TValue[]; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.dropWhile + */ + dropWhile( + predicate?: ListIterator + ): LoDashImplicitArrayWrapper; + + /** + * @see _.dropWhile + */ + dropWhile( + predicate?: string + ): LoDashImplicitArrayWrapper; + + /** + * @see _.dropWhile + */ + dropWhile( + predicate?: TWhere + ): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.dropWhile + */ + dropWhile( + predicate?: ListIterator + ): LoDashImplicitArrayWrapper; + + /** + * @see _.dropWhile + */ + dropWhile( + predicate?: string + ): LoDashImplicitArrayWrapper; + + /** + * @see _.dropWhile + */ + dropWhile( + predicate?: TWhere + ): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.dropWhile + */ + dropWhile( + predicate?: ListIterator + ): LoDashExplicitArrayWrapper; + + /** + * @see _.dropWhile + */ + dropWhile( + predicate?: string + ): LoDashExplicitArrayWrapper; + + /** + * @see _.dropWhile + */ + dropWhile( + predicate?: TWhere + ): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.dropWhile + */ + dropWhile( + predicate?: ListIterator + ): LoDashExplicitArrayWrapper; + + /** + * @see _.dropWhile + */ + dropWhile( + predicate?: string + ): LoDashExplicitArrayWrapper; + + /** + * @see _.dropWhile + */ + dropWhile( + predicate?: TWhere + ): LoDashExplicitArrayWrapper; + } + + //_.fill + interface LoDashStatic { + /** + * Fills elements of array with value from start up to, but not including, end. + * + * Note: This method mutates array. + * + * @param array The array to fill. + * @param value The value to fill array with. + * @param start The start position. + * @param end The end position. + * @return Returns array. + */ + fill( + array: any[], + value: T, + start?: number, + end?: number + ): T[]; + + /** + * @see _.fill + */ + fill( + array: List, + value: T, + start?: number, + end?: number + ): List; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.fill + */ + fill( + value: T, + start?: number, + end?: number + ): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.fill + */ + fill( + value: T, + start?: number, + end?: number + ): LoDashImplicitObjectWrapper>; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.fill + */ + fill( + value: T, + start?: number, + end?: number + ): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.fill + */ + fill( + value: T, + start?: number, + end?: number + ): LoDashExplicitObjectWrapper>; + } + + //_.findIndex + interface LoDashStatic { + /** + * This method is like _.find except that it returns the index of the first element predicate returns truthy + * for instead of the element itself. + * + * If a property name is provided for predicate the created _.property style callback returns the property + * value of the given element. + * + * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for + * elements that have a matching property value, else false. + * + * If an object is provided for predicate the created _.matches style callback returns true for elements that + * have the properties of the given object, else false. + * + * @param array The array to search. + * @param predicate The function invoked per iteration. + * @param thisArg The this binding of predicate. + * @return Returns the index of the found element, else -1. + */ + findIndex( + array: List, + predicate?: ListIterator + ): number; + + /** + * @see _.findIndex + */ + findIndex( + array: List, + predicate?: string + ): number; + + /** + * @see _.findIndex + */ + findIndex( + array: List, + predicate?: W + ): number; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.findIndex + */ + findIndex( + predicate?: ListIterator + ): number; + + /** + * @see _.findIndex + */ + findIndex( + predicate?: string + ): number; + + /** + * @see _.findIndex + */ + findIndex( + predicate?: W + ): number; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.findIndex + */ + findIndex( + predicate?: ListIterator + ): number; + + /** + * @see _.findIndex + */ + findIndex( + predicate?: string + ): number; + + /** + * @see _.findIndex + */ + findIndex( + predicate?: W + ): number; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.findIndex + */ + findIndex( + predicate?: ListIterator + ): LoDashExplicitWrapper; + + /** + * @see _.findIndex + */ + findIndex( + predicate?: string + ): LoDashExplicitWrapper; + + /** + * @see _.findIndex + */ + findIndex( + predicate?: W + ): LoDashExplicitWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.findIndex + */ + findIndex( + predicate?: ListIterator + ): LoDashExplicitWrapper; + + /** + * @see _.findIndex + */ + findIndex( + predicate?: string + ): LoDashExplicitWrapper; + + /** + * @see _.findIndex + */ + findIndex( + predicate?: W + ): LoDashExplicitWrapper; + } + + //_.findLastIndex + interface LoDashStatic { + /** + * This method is like _.findIndex except that it iterates over elements of collection from right to left. + * + * If a property name is provided for predicate the created _.property style callback returns the property + * value of the given element. + * + * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for + * elements that have a matching property value, else false. + * + * If an object is provided for predicate the created _.matches style callback returns true for elements that + * have the properties of the given object, else false. + * + * @param array The array to search. + * @param predicate The function invoked per iteration. + * @param thisArg The function invoked per iteration. + * @return Returns the index of the found element, else -1. + */ + findLastIndex( + array: List, + predicate?: ListIterator + ): number; + + /** + * @see _.findLastIndex + */ + findLastIndex( + array: List, + predicate?: string + ): number; + + /** + * @see _.findLastIndex + */ + findLastIndex( + array: List, + predicate?: W + ): number; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.findLastIndex + */ + findLastIndex( + predicate?: ListIterator + ): number; + + /** + * @see _.findLastIndex + */ + findLastIndex( + predicate?: string + ): number; + + /** + * @see _.findLastIndex + */ + findLastIndex( + predicate?: W + ): number; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.findLastIndex + */ + findLastIndex( + predicate?: ListIterator + ): number; + + /** + * @see _.findLastIndex + */ + findLastIndex( + predicate?: string + ): number; + + /** + * @see _.findLastIndex + */ + findLastIndex( + predicate?: W + ): number; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.findLastIndex + */ + findLastIndex( + predicate?: ListIterator + ): LoDashExplicitWrapper; + + /** + * @see _.findLastIndex + */ + findLastIndex( + predicate?: string + ): LoDashExplicitWrapper; + + /** + * @see _.findLastIndex + */ + findLastIndex( + predicate?: W + ): LoDashExplicitWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.findLastIndex + */ + findLastIndex( + predicate?: ListIterator + ): LoDashExplicitWrapper; + + /** + * @see _.findLastIndex + */ + findLastIndex( + predicate?: string + ): LoDashExplicitWrapper; + + /** + * @see _.findLastIndex + */ + findLastIndex( + predicate?: W + ): LoDashExplicitWrapper; + } + + //_.first + interface LoDashStatic { + /** + * @see _.head + */ + first(array: List): T; + } + + interface LoDashImplicitWrapper { + /** + * @see _.head + */ + first(): string; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.head + */ + first(): T; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.head + */ + first(): T; + } + + interface LoDashExplicitWrapper { + /** + * @see _.head + */ + first(): LoDashExplicitWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.head + */ + first(): T; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.head + */ + first(): T; + } + + interface RecursiveArray extends Array> {} + interface ListOfRecursiveArraysOrValues extends List> {} + + //_.flatten + interface LoDashStatic { + /** + * Flattens a nested array. If isDeep is true the array is recursively flattened, otherwise it’s only + * flattened a single level. + * + * @param array The array to flatten. + * @param isDeep Specify a deep flatten. + * @return Returns the new flattened array. + */ + flatten(array: ListOfRecursiveArraysOrValues, isDeep: boolean): T[]; + + /** + * @see _.flatten + */ + flatten(array: List): T[]; + + /** + * @see _.flatten + */ + flatten(array: ListOfRecursiveArraysOrValues): RecursiveArray; + } + + interface LoDashImplicitWrapper { + /** + * @see _.flatten + */ + flatten(): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.flatten + */ + flatten(isDeep?: boolean): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.flatten + */ + flatten(isDeep?: boolean): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.flatten + */ + flatten(): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.flatten + */ + flatten(isDeep?: boolean): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.flatten + */ + flatten(isDeep?: boolean): LoDashExplicitArrayWrapper; + } + + //_.flattenDeep + interface LoDashStatic { + /** + * Recursively flattens a nested array. + * + * @param array The array to recursively flatten. + * @return Returns the new flattened array. + */ + flattenDeep(array: ListOfRecursiveArraysOrValues): T[]; + } + + interface LoDashImplicitWrapper { + /** + * @see _.flattenDeep + */ + flattenDeep(): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.flattenDeep + */ + flattenDeep(): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.flattenDeep + */ + flattenDeep(): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.flattenDeep + */ + flattenDeep(): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.flattenDeep + */ + flattenDeep(): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.flattenDeep + */ + flattenDeep(): LoDashExplicitArrayWrapper; + } + + // _.flattenDepth + interface LoDashStatic { + /** + * Recursively flatten array up to depth times. + * + * @param array The array to recursively flatten. + * @param number The maximum recursion depth. + * @return Returns the new flattened array. + */ + flattenDepth(array: ListOfRecursiveArraysOrValues, depth?: number): T[]; + } + + //_.fromPairs + interface LoDashStatic { + /** + * The inverse of `_.toPairs`; this method returns an object composed + * from key-value `pairs`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} pairs The key-value pairs. + * @returns {Object} Returns the new object. + * @example + * + * _.fromPairs([['fred', 30], ['barney', 40]]); + * // => { 'fred': 30, 'barney': 40 } + */ + fromPairs( + array: List<[_.StringRepresentable, T]> + ): Dictionary; + + /** + @see _.fromPairs + */ + fromPairs( + array: List + ): Dictionary; + } + + //_.fromPairs DUMMY + interface LoDashImplicitArrayWrapper { + /** + * @see _.fromPairs + */ + fromPairs(): LoDashImplicitObjectWrapper; + } + + //_.fromPairs DUMMY + interface LoDashExplicitArrayWrapper { + /** + * @see _.fromPairs + */ + fromPairs(): LoDashExplicitObjectWrapper; + } + + //_.head + interface LoDashStatic { + /** + * Gets the first element of array. + * + * @alias _.first + * + * @param array The array to query. + * @return Returns the first element of array. + */ + head(array: List): T; + } + + interface LoDashImplicitWrapper { + /** + * @see _.head + */ + head(): string; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.head + */ + head(): T; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.head + */ + head(): T; + } + + interface LoDashExplicitWrapper { + /** + * @see _.head + */ + head(): LoDashExplicitWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.head + */ + head(): T; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.head + */ + head(): T; + } + + //_.indexOf + interface LoDashStatic { + /** + * Gets the index at which the first occurrence of `value` is found in `array` + * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. If `fromIndex` is negative, it's used as the offset + * from the end of `array`. If `array` is sorted providing `true` for `fromIndex` + * performs a faster binary search. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to search. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.indexOf([1, 2, 1, 2], 2); + * // => 1 + * + * // using `fromIndex` + * _.indexOf([1, 2, 1, 2], 2, 2); + * // => 3 + */ + indexOf( + array: List, + value: T, + fromIndex?: boolean|number + ): number; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.indexOf + */ + indexOf( + value: T, + fromIndex?: boolean|number + ): number; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.indexOf + */ + indexOf( + value: TValue, + fromIndex?: boolean|number + ): number; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.indexOf + */ + indexOf( + value: T, + fromIndex?: boolean|number + ): LoDashExplicitWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.indexOf + */ + indexOf( + value: TValue, + fromIndex?: boolean|number + ): LoDashExplicitWrapper; + } + + //_.intersectionBy DUMMY + interface LoDashStatic { + /** + * This method is like `_.intersection` except that it accepts `iteratee` + * which is invoked for each element of each `arrays` to generate the criterion + * by which uniqueness is computed. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of shared values. + * @example + * + * _.intersectionBy([2.1, 1.2], [4.3, 2.4], Math.floor); + * // => [2.1] + * + * // using the `_.property` iteratee shorthand + * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }] + */ + intersectionBy( + array: any[]|List, + ...values: any[] + ): any[]; + } + + //_.intersectionWith DUMMY + interface LoDashStatic { + /** + * This method is like `_.intersection` except that it accepts `comparator` + * which is invoked to compare elements of `arrays`. The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of shared values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.intersectionWith(objects, others, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }] + */ + intersectionWith( + array: any[]|List, + ...values: any[] + ): any[]; + } + + //_.join + interface LoDashStatic { + /** + * Converts all elements in `array` into a string separated by `separator`. + * + * @param array The array to convert. + * @param separator The element separator. + * @returns Returns the joined string. + */ + join( + array: List, + separator?: string + ): string; + } + + interface LoDashImplicitWrapper { + /** + * @see _.join + */ + join(separator?: string): string; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.join + */ + join(separator?: string): string; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.join + */ + join(separator?: string): string; + } + + interface LoDashExplicitWrapper { + /** + * @see _.join + */ + join(separator?: string): LoDashExplicitWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.join + */ + join(separator?: string): LoDashExplicitWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.join + */ + join(separator?: string): LoDashExplicitWrapper; + } + + //_.pullAll DUMMY + interface LoDashStatic { + /** + * This method is like `_.pull` except that it accepts an array of values to remove. + * + * **Note:** Unlike `_.difference`, this method mutates `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3, 1, 2, 3]; + * + * _.pull(array, [2, 3]); + * console.log(array); + * // => [1, 1] + */ + pullAll( + array: any[]|List, + ...values: any[] + ): any[]; + } + + //_.pullAllBy DUMMY + interface LoDashStatic { + /** + * This method is like `_.pullAll` except that it accepts `iteratee` which is + * invoked for each element of `array` and `values` to to generate the criterion + * by which uniqueness is computed. The iteratee is invoked with one argument: (value). + * + * **Note:** Unlike `_.differenceBy`, this method mutates `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns `array`. + * @example + * + * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }]; + * + * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x'); + * console.log(array); + * // => [{ 'x': 2 }] + */ + pullAllBy( + array: any[]|List, + ...values: any[] + ): any[]; + } + + //_.reverse DUMMY + interface LoDashStatic { + /** + * Reverses `array` so that the first element becomes the last, the second + * element becomes the second to last, and so on. + * + * **Note:** This method mutates `array` and is based on + * [`Array#reverse`](https://mdn.io/Array/reverse). + * + * @memberOf _ + * @category Array + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3]; + * + * _.reverse(array); + * // => [3, 2, 1] + * + * console.log(array); + * // => [3, 2, 1] + */ + reverse( + array: any[]|List, + ...values: any[] + ): any[]; + } + + //_.sortedIndexOf + interface LoDashStatic { + /** + * This method is like `_.indexOf` except that it performs a binary + * search on a sorted `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to search. + * @param {*} value The value to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.sortedIndexOf([1, 1, 2, 2], 2); + * // => 2 + */ + sortedIndexOf( + array: List, + value: T + ): number; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.sortedIndexOf + */ + sortedIndexOf( + value: T + ): number; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.sortedIndexOf + */ + sortedIndexOf( + value: TValue + ): number; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.sortedIndexOf + */ + sortedIndexOf( + value: T + ): LoDashExplicitWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.sortedIndexOf + */ + sortedIndexOf( + value: TValue + ): LoDashExplicitWrapper; + } + + //_.initial + interface LoDashStatic { + /** + * Gets all but the last element of array. + * + * @param array The array to query. + * @return Returns the slice of array. + */ + initial(array: List): T[]; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.initial + */ + initial(): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.initial + */ + initial(): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.initial + */ + initial(): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.initial + */ + initial(): LoDashExplicitArrayWrapper; + } + + //_.intersection + interface LoDashStatic { + /** + * Creates an array of unique values that are included in all of the provided arrays using SameValueZero for + * equality comparisons. + * + * @param arrays The arrays to inspect. + * @return Returns the new array of shared values. + */ + intersection(...arrays: (T[]|List)[]): T[]; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.intersection + */ + intersection(...arrays: (TResult[]|List)[]): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.intersection + */ + intersection(...arrays: (TResult[]|List)[]): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.intersection + */ + intersection(...arrays: (TResult[]|List)[]): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.intersection + */ + intersection(...arrays: (TResult[]|List)[]): LoDashExplicitArrayWrapper; + } + + //_.last + interface LoDashStatic { + /** + * Gets the last element of array. + * + * @param array The array to query. + * @return Returns the last element of array. + */ + last(array: List): T; + } + + interface LoDashImplicitWrapper { + /** + * @see _.last + */ + last(): string; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.last + */ + last(): T; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.last + */ + last(): T; + } + + interface LoDashExplicitWrapper { + /** + * @see _.last + */ + last(): LoDashExplicitWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.last + */ + last(): T; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.last + */ + last(): T; + } + + //_.lastIndexOf + interface LoDashStatic { + /** + * This method is like _.indexOf except that it iterates over elements of array from right to left. + * + * @param array The array to search. + * @param value The value to search for. + * @param fromIndex The index to search from or true to perform a binary search on a sorted array. + * @return Returns the index of the matched value, else -1. + */ + lastIndexOf( + array: List, + value: T, + fromIndex?: boolean|number + ): number; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.lastIndexOf + */ + lastIndexOf( + value: T, + fromIndex?: boolean|number + ): number; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.lastIndexOf + */ + lastIndexOf( + value: TResult, + fromIndex?: boolean|number + ): number; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.lastIndexOf + */ + lastIndexOf( + value: T, + fromIndex?: boolean|number + ): LoDashExplicitWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.lastIndexOf + */ + lastIndexOf( + value: TResult, + fromIndex?: boolean|number + ): LoDashExplicitWrapper; + } + + //_.pull + interface LoDashStatic { + /** + * Removes all provided values from array using SameValueZero for equality comparisons. + * + * Note: Unlike _.without, this method mutates array. + * + * @param array The array to modify. + * @param values The values to remove. + * @return Returns array. + */ + pull( + array: T[], + ...values: T[] + ): T[]; + + /** + * @see _.pull + */ + pull( + array: List, + ...values: T[] + ): List; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.pull + */ + pull(...values: T[]): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.pull + */ + pull(...values: TValue[]): LoDashImplicitObjectWrapper>; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.pull + */ + pull(...values: T[]): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.pull + */ + pull(...values: TValue[]): LoDashExplicitObjectWrapper>; + } + + //_.pullAt + interface LoDashStatic { + /** + * Removes elements from array corresponding to the given indexes and returns an array of the removed elements. + * Indexes may be specified as an array of indexes or as individual arguments. + * + * Note: Unlike _.at, this method mutates array. + * + * @param array The array to modify. + * @param indexes The indexes of elements to remove, specified as individual indexes or arrays of indexes. + * @return Returns the new array of removed elements. + */ + pullAt( + array: List, + ...indexes: (number|number[])[] + ): T[]; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.pullAt + */ + pullAt(...indexes: (number|number[])[]): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.pullAt + */ + pullAt(...indexes: (number|number[])[]): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.pullAt + */ + pullAt(...indexes: (number|number[])[]): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.pullAt + */ + pullAt(...indexes: (number|number[])[]): LoDashExplicitArrayWrapper; + } + + //_.remove + interface LoDashStatic { + /** + * Removes all elements from array that predicate returns truthy for and returns an array of the removed + * elements. The predicate is bound to thisArg and invoked with three arguments: (value, index, array). + * + * If a property name is provided for predicate the created _.property style callback returns the property + * value of the given element. + * + * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for + * elements that have a matching property value, else false. + * + * If an object is provided for predicate the created _.matches style callback returns true for elements that + * have the properties of the given object, else false. + * + * Note: Unlike _.filter, this method mutates array. + * + * @param array The array to modify. + * @param predicate The function invoked per iteration. + * @param thisArg The this binding of predicate. + * @return Returns the new array of removed elements. + */ + remove( + array: List, + predicate?: ListIterator + ): T[]; + + /** + * @see _.remove + */ + remove( + array: List, + predicate?: string + ): T[]; + + /** + * @see _.remove + */ + remove( + array: List, + predicate?: W + ): T[]; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.remove + */ + remove( + predicate?: ListIterator + ): LoDashImplicitArrayWrapper; + + /** + * @see _.remove + */ + remove( + predicate?: string + ): LoDashImplicitArrayWrapper; + + /** + * @see _.remove + */ + remove( + predicate?: W + ): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.remove + */ + remove( + predicate?: ListIterator + ): LoDashImplicitArrayWrapper; + + /** + * @see _.remove + */ + remove( + predicate?: string + ): LoDashImplicitArrayWrapper; + + /** + * @see _.remove + */ + remove( + predicate?: W + ): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.remove + */ + remove( + predicate?: ListIterator + ): LoDashExplicitArrayWrapper; + + /** + * @see _.remove + */ + remove( + predicate?: string + ): LoDashExplicitArrayWrapper; + + /** + * @see _.remove + */ + remove( + predicate?: W + ): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.remove + */ + remove( + predicate?: ListIterator + ): LoDashExplicitArrayWrapper; + + /** + * @see _.remove + */ + remove( + predicate?: string + ): LoDashExplicitArrayWrapper; + + /** + * @see _.remove + */ + remove( + predicate?: W + ): LoDashExplicitArrayWrapper; + } + + //_.tail + interface LoDashStatic { + /** + * Gets all but the first element of array. + * + * @alias _.tail + * + * @param array The array to query. + * @return Returns the slice of array. + */ + tail(array: List): T[]; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.tail + */ + tail(): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.tail + */ + tail(): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.tail + */ + tail(): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.tail + */ + tail(): LoDashExplicitArrayWrapper; + } + + //_.slice + interface LoDashStatic { + /** + * Creates a slice of array from start up to, but not including, end. + * + * @param array The array to slice. + * @param start The start position. + * @param end The end position. + * @return Returns the slice of array. + */ + slice( + array: T[], + start?: number, + end?: number + ): T[]; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.slice + */ + slice( + start?: number, + end?: number + ): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.slice + */ + slice( + start?: number, + end?: number + ): LoDashExplicitArrayWrapper; + } + + //_.sortedIndex + interface LoDashStatic { + /** + * Uses a binary search to determine the lowest index at which `value` should + * be inserted into `array` in order to maintain its sort order. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @returns {number} Returns the index at which `value` should be inserted into `array`. + * @example + * + * _.sortedIndex([30, 50], 40); + * // => 1 + * + * _.sortedIndex([4, 5], 4); + * // => 0 + */ + sortedIndex( + array: List, + value: T + ): number; + + /** + * @see _.sortedIndex + */ + sortedIndex( + array: List, + value: T + ): number; + + /** + * @see _.sortedIndex + */ + sortedIndex( + array: List, + value: T + ): number; + + /** + * @see _.sortedIndex + */ + sortedIndex( + array: List, + value: T + ): number; + + /** + * @see _.sortedIndex + */ + sortedIndex( + array: List, + value: T + ): number; + } + + interface LoDashImplicitWrapper { + /** + * @see _.sortedIndex + */ + sortedIndex( + value: string + ): number; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.sortedIndex + */ + sortedIndex( + value: T + ): number; + + /** + * @see _.sortedIndex + */ + sortedIndex( + value: T + ): number; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.sortedIndex + */ + sortedIndex( + value: T + ): number; + + /** + * @see _.sortedIndex + */ + sortedIndex( + value: T + ): number; + + /** + * @see _.sortedIndex + */ + sortedIndex( + value: T + ): number; + } + + interface LoDashExplicitWrapper { + /** + * @see _.sortedIndex + */ + sortedIndex( + value: string + ): LoDashExplicitWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.sortedIndex + */ + sortedIndex( + value: T + ): LoDashExplicitWrapper; + + /** + * @see _.sortedIndex + */ + sortedIndex( + value: T + ): LoDashExplicitWrapper; + + /** + * @see _.sortedIndex + */ + sortedIndex( + value: T + ): LoDashExplicitWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.sortedIndex + */ + sortedIndex( + value: T + ): LoDashExplicitWrapper; + + /** + * @see _.sortedIndex + */ + sortedIndex( + value: T + ): LoDashExplicitWrapper; + + /** + * @see _.sortedIndex + */ + sortedIndex( + value: T + ): LoDashExplicitWrapper; + + + } + + //_.sortedIndexBy + interface LoDashStatic { + /** + * This method is like `_.sortedIndex` except that it accepts `iteratee` + * which is invoked for `value` and each element of `array` to compute their + * sort ranking. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the index at which `value` should be inserted into `array`. + * @example + * + * var dict = { 'thirty': 30, 'forty': 40, 'fifty': 50 }; + * + * _.sortedIndexBy(['thirty', 'fifty'], 'forty', _.propertyOf(dict)); + * // => 1 + * + * // using the `_.property` iteratee shorthand + * _.sortedIndexBy([{ 'x': 4 }, { 'x': 5 }], { 'x': 4 }, 'x'); + * // => 0 + */ + sortedIndexBy( + array: List, + value: T, + iteratee: (x: T) => TSort + ): number; + + /** + * @see _.sortedIndexBy + */ + sortedIndexBy( + array: List, + value: T, + iteratee: (x: T) => any + ): number; + + /** + * @see _.sortedIndexBy + */ + sortedIndexBy( + array: List, + value: T, + iteratee: string + ): number; + + /** + * @see _.sortedIndexBy + */ + sortedIndexBy( + array: List, + value: T, + iteratee: W + ): number; + + /** + * @see _.sortedIndexBy + */ + sortedIndexBy( + array: List, + value: T, + iteratee: Object + ): number; + } + + interface LoDashImplicitWrapper { + /** + * @see _.sortedIndexBy + */ + sortedIndexBy( + value: string, + iteratee: (x: string) => TSort + ): number; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.sortedIndexBy + */ + sortedIndexBy( + value: T, + iteratee: (x: T) => TSort + ): number; + + /** + * @see _.sortedIndexBy + */ + sortedIndexBy( + value: T, + iteratee: string + ): number; + + /** + * @see _.sortedIndexBy + */ + sortedIndexBy( + value: T, + iteratee: W + ): number; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.sortedIndexBy + */ + sortedIndexBy( + value: T, + iteratee: (x: T) => TSort + ): number; + + /** + * @see _.sortedIndexBy + */ + sortedIndexBy( + value: T, + iteratee: (x: T) => any + ): number; + + /** + * @see _.sortedIndexBy + */ + sortedIndexBy( + value: T, + iteratee: string + ): number; + + /** + * @see _.sortedIndexBy + */ + sortedIndexBy( + value: T, + iteratee: W + ): number; + + /** + * @see _.sortedIndexBy + */ + sortedIndexBy( + value: T, + iteratee: Object + ): number; + } + + interface LoDashExplicitWrapper { + /** + * @see _.sortedIndexBy + */ + sortedIndexBy( + value: string, + iteratee: (x: string) => TSort + ): LoDashExplicitWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.sortedIndexBy + */ + sortedIndexBy( + value: T, + iteratee: (x: T) => TSort + ): LoDashExplicitWrapper; + + /** + * @see _.sortedIndexBy + */ + sortedIndexBy( + value: T, + iteratee: string + ): LoDashExplicitWrapper; + + /** + * @see _.sortedIndexBy + */ + sortedIndexBy( + value: T, + iteratee: W + ): LoDashExplicitWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.sortedIndexBy + */ + sortedIndexBy( + value: T, + iteratee: (x: T) => TSort + ): LoDashExplicitWrapper; + + /** + * @see _.sortedIndexBy + */ + sortedIndexBy( + value: T, + iteratee: (x: T) => any + ): LoDashExplicitWrapper; + + /** + * @see _.sortedIndexBy + */ + sortedIndexBy( + value: T, + iteratee: string + ): LoDashExplicitWrapper; + + /** + * @see _.sortedIndexBy + */ + sortedIndexBy( + value: T, + iteratee: W + ): LoDashExplicitWrapper; + + /** + * @see _.sortedIndexBy + */ + sortedIndexBy( + value: T, + iteratee: Object + ): LoDashExplicitWrapper; + } + + //_.sortedLastIndex + interface LoDashStatic { + /** + * This method is like `_.sortedIndex` except that it returns the highest + * index at which `value` should be inserted into `array` in order to + * maintain its sort order. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @returns {number} Returns the index at which `value` should be inserted into `array`. + * @example + * + * _.sortedLastIndex([4, 5], 4); + * // => 1 + */ + sortedLastIndex( + array: List, + value: T + ): number; + + /** + * @see _.sortedLastIndex + */ + sortedLastIndex( + array: List, + value: T + ): number; + + /** + * @see _.sortedLastIndex + */ + sortedLastIndex( + array: List, + value: T + ): number; + + /** + * @see _.sortedLastIndex + */ + sortedLastIndex( + array: List, + value: T + ): number; + + /** + * @see _.sortedLastIndex + */ + sortedLastIndex( + array: List, + value: T + ): number; + } + + interface LoDashImplicitWrapper { + /** + * @see _.sortedLastIndex + */ + sortedLastIndex( + value: string + ): number; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.sortedLastIndex + */ + sortedLastIndex( + value: T + ): number; + + /** + * @see _.sortedLastIndex + */ + sortedLastIndex( + value: T + ): number; + + /** + * @see _.sortedLastIndex + */ + sortedLastIndex( + value: T + ): number; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.sortedLastIndex + */ + sortedLastIndex( + value: T + ): number; + + /** + * @see _.sortedLastIndex + */ + sortedLastIndex( + value: T + ): number; + + /** + * @see _.sortedLastIndex + */ + sortedLastIndex( + value: T + ): number; + } + + interface LoDashExplicitWrapper { + /** + * @see _.sortedLastIndex + */ + sortedLastIndex( + value: string + ): LoDashExplicitWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.sortedLastIndex + */ + sortedLastIndex( + value: T + ): LoDashExplicitWrapper; + + /** + * @see _.sortedLastIndex + */ + sortedLastIndex( + value: T + ): LoDashExplicitWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.sortedLastIndex + */ + sortedLastIndex( + value: T + ): LoDashExplicitWrapper; + + /** + * @see _.sortedLastIndex + */ + sortedLastIndex( + value: T + ): LoDashExplicitWrapper; + + /** + * @see _.sortedLastIndex + */ + sortedLastIndex( + value: T + ): LoDashExplicitWrapper; + } + + //_.sortedLastIndexBy + interface LoDashStatic { + /** + * This method is like `_.sortedLastIndex` except that it accepts `iteratee` + * which is invoked for `value` and each element of `array` to compute their + * sort ranking. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the index at which `value` should be inserted into `array`. + * @example + * + * // using the `_.property` iteratee shorthand + * _.sortedLastIndexBy([{ 'x': 4 }, { 'x': 5 }], { 'x': 4 }, 'x'); + * // => 1 + */ + sortedLastIndexBy( + array: List, + value: T, + iteratee: (x: T) => TSort + ): number; + + /** + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + array: List, + value: T, + iteratee: (x: T) => any + ): number; + + /** + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + array: List, + value: T, + iteratee: string + ): number; + + /** + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + array: List, + value: T, + iteratee: W + ): number; + + /** + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + array: List, + value: T, + iteratee: Object + ): number; + } + + interface LoDashImplicitWrapper { + /** + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + value: string, + iteratee: (x: string) => TSort + ): number; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + value: T, + iteratee: (x: T) => TSort + ): number; + + /** + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + value: T, + iteratee: string + ): number; + + /** + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + value: T, + iteratee: W + ): number; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + value: T, + iteratee: (x: T) => TSort + ): number; + + /** + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + value: T, + iteratee: (x: T) => any + ): number; + + /** + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + value: T, + iteratee: string + ): number; + + /** + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + value: T, + iteratee: W + ): number; + + /** + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + value: T, + iteratee: Object + ): number; + } + + interface LoDashExplicitWrapper { + /** + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + value: string, + iteratee: (x: string) => TSort + ): LoDashExplicitWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + value: T, + iteratee: (x: T) => TSort + ): LoDashExplicitWrapper; + + /** + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + value: T, + iteratee: string + ): LoDashExplicitWrapper; + + /** + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + value: T, + iteratee: W + ): LoDashExplicitWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + value: T, + iteratee: (x: T) => TSort + ): LoDashExplicitWrapper; + + /** + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + value: T, + iteratee: (x: T) => any + ): LoDashExplicitWrapper; + + /** + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + value: T, + iteratee: string + ): LoDashExplicitWrapper; + + /** + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + value: T, + iteratee: W + ): LoDashExplicitWrapper; + + /** + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + value: T, + iteratee: Object + ): LoDashExplicitWrapper; + } + + //_.sortedLastIndexOf DUMMY + interface LoDashStatic { + /** + * This method is like `_.lastIndexOf` except that it performs a binary + * search on a sorted `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to search. + * @param {*} value The value to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.sortedLastIndexOf([1, 1, 2, 2], 2); + * // => 3 + */ + sortedLastIndexOf( + array: any[]|List, + ...values: any[] + ): any[]; + } + + //_.tail + interface LoDashStatic { + /** + * @see _.rest + */ + tail(array: List): T[]; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.rest + */ + tail(): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.rest + */ + tail(): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.rest + */ + tail(): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.rest + */ + tail(): LoDashExplicitArrayWrapper; + } + + //_.take + interface LoDashStatic { + /** + * Creates a slice of array with n elements taken from the beginning. + * + * @param array The array to query. + * @param n The number of elements to take. + * @return Returns the slice of array. + */ + take( + array: List, + n?: number + ): T[]; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.take + */ + take(n?: number): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.take + */ + take(n?: number): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.take + */ + take(n?: number): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.take + */ + take(n?: number): LoDashExplicitArrayWrapper; + } + + //_.takeRight + interface LoDashStatic { + /** + * Creates a slice of array with n elements taken from the end. + * + * @param array The array to query. + * @param n The number of elements to take. + * @return Returns the slice of array. + */ + takeRight( + array: List, + n?: number + ): T[]; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.takeRight + */ + takeRight(n?: number): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.takeRight + */ + takeRight(n?: number): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.takeRight + */ + takeRight(n?: number): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.takeRight + */ + takeRight(n?: number): LoDashExplicitArrayWrapper; + } + + //_.takeRightWhile + interface LoDashStatic { + /** + * Creates a slice of array with elements taken from the end. Elements are taken until predicate returns + * falsey. The predicate is bound to thisArg and invoked with three arguments: (value, index, array). + * + * If a property name is provided for predicate the created _.property style callback returns the property + * value of the given element. + * + * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for + * elements that have a matching property value, else false. + * + * If an object is provided for predicate the created _.matches style callback returns true for elements that + * have the properties of the given object, else false. + * + * @param array The array to query. + * @param predicate The function invoked per iteration. + * @param thisArg The this binding of predicate. + * @return Returns the slice of array. + */ + takeRightWhile( + array: List, + predicate?: ListIterator + ): TValue[]; + + /** + * @see _.takeRightWhile + */ + takeRightWhile( + array: List, + predicate?: string + ): TValue[]; + + /** + * @see _.takeRightWhile + */ + takeRightWhile( + array: List, + predicate?: TWhere + ): TValue[]; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.takeRightWhile + */ + takeRightWhile( + predicate?: ListIterator + ): LoDashImplicitArrayWrapper; + + /** + * @see _.takeRightWhile + */ + takeRightWhile( + predicate?: string + ): LoDashImplicitArrayWrapper; + + /** + * @see _.takeRightWhile + */ + takeRightWhile( + predicate?: TWhere + ): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.takeRightWhile + */ + takeRightWhile( + predicate?: ListIterator + ): LoDashImplicitArrayWrapper; + + /** + * @see _.takeRightWhile + */ + takeRightWhile( + predicate?: string + ): LoDashImplicitArrayWrapper; + + /** + * @see _.takeRightWhile + */ + takeRightWhile( + predicate?: TWhere + ): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.takeRightWhile + */ + takeRightWhile( + predicate?: ListIterator + ): LoDashExplicitArrayWrapper; + + /** + * @see _.takeRightWhile + */ + takeRightWhile( + predicate?: string + ): LoDashExplicitArrayWrapper; + + /** + * @see _.takeRightWhile + */ + takeRightWhile( + predicate?: TWhere + ): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.takeRightWhile + */ + takeRightWhile( + predicate?: ListIterator + ): LoDashExplicitArrayWrapper; + + /** + * @see _.takeRightWhile + */ + takeRightWhile( + predicate?: string + ): LoDashExplicitArrayWrapper; + + /** + * @see _.takeRightWhile + */ + takeRightWhile( + predicate?: TWhere + ): LoDashExplicitArrayWrapper; + } + + //_.takeWhile + interface LoDashStatic { + /** + * Creates a slice of array with elements taken from the beginning. Elements are taken until predicate returns + * falsey. The predicate is bound to thisArg and invoked with three arguments: (value, index, array). + * + * If a property name is provided for predicate the created _.property style callback returns the property + * value of the given element. + * + * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for + * elements that have a matching property value, else false. + * + * If an object is provided for predicate the created _.matches style callback returns true for elements that + * have the properties of the given object, else false. + * + * @param array The array to query. + * @param predicate The function invoked per iteration. + * @param thisArg The this binding of predicate. + * @return Returns the slice of array. + */ + takeWhile( + array: List, + predicate?: ListIterator + ): TValue[]; + + /** + * @see _.takeWhile + */ + takeWhile( + array: List, + predicate?: string + ): TValue[]; + + /** + * @see _.takeWhile + */ + takeWhile( + array: List, + predicate?: TWhere + ): TValue[]; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.takeWhile + */ + takeWhile( + predicate?: ListIterator + ): LoDashImplicitArrayWrapper; + + /** + * @see _.takeWhile + */ + takeWhile( + predicate?: string + ): LoDashImplicitArrayWrapper; + + /** + * @see _.takeWhile + */ + takeWhile( + predicate?: TWhere + ): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.takeWhile + */ + takeWhile( + predicate?: ListIterator + ): LoDashImplicitArrayWrapper; + + /** + * @see _.takeWhile + */ + takeWhile( + predicate?: string + ): LoDashImplicitArrayWrapper; + + /** + * @see _.takeWhile + */ + takeWhile( + predicate?: TWhere + ): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.takeWhile + */ + takeWhile( + predicate?: ListIterator + ): LoDashExplicitArrayWrapper; + + /** + * @see _.takeWhile + */ + takeWhile( + predicate?: string + ): LoDashExplicitArrayWrapper; + + /** + * @see _.takeWhile + */ + takeWhile( + predicate?: TWhere + ): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.takeWhile + */ + takeWhile( + predicate?: ListIterator + ): LoDashExplicitArrayWrapper; + + /** + * @see _.takeWhile + */ + takeWhile( + predicate?: string + ): LoDashExplicitArrayWrapper; + + /** + * @see _.takeWhile + */ + takeWhile( + predicate?: TWhere + ): LoDashExplicitArrayWrapper; + } + + //_.union + interface LoDashStatic { + /** + * Creates an array of unique values, in order, from all of the provided arrays using SameValueZero for + * equality comparisons. + * + * @param arrays The arrays to inspect. + * @return Returns the new array of combined values. + */ + union(...arrays: List[]): T[]; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.union + */ + union(...arrays: List[]): LoDashImplicitArrayWrapper; + + /** + * @see _.union + */ + union(...arrays: List[]): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.union + */ + union(...arrays: List[]): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.union + */ + union(...arrays: List[]): LoDashExplicitArrayWrapper; + + /** + * @see _.union + */ + union(...arrays: List[]): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.union + */ + union(...arrays: List[]): LoDashExplicitArrayWrapper; + } + + //_.unionBy + interface LoDashStatic { + /** + * This method is like `_.union` except that it accepts `iteratee` which is + * invoked for each element of each `arrays` to generate the criterion by which + * uniqueness is computed. The iteratee is invoked with one argument: (value). + * + * @param arrays The arrays to inspect. + * @param iteratee The iteratee invoked per element. + * @return Returns the new array of combined values. + */ + unionBy( + arrays: T[]|List, + iteratee?: (value: T) => any + ): T[]; + + /** + * @see _.unionBy + */ + unionBy( + arrays: T[]|List, + iteratee?: W + ): T[]; + + /** + * @see _.unionBy + */ + unionBy( + arrays1: T[]|List, + arrays2: T[]|List, + iteratee?: (value: T) => any + ): T[]; + + /** + * @see _.unionBy + */ + unionBy( + arrays1: T[]|List, + arrays2: T[]|List, + iteratee?: W + ): T[]; + + /** + * @see _.unionBy + */ + unionBy( + arrays1: T[]|List, + arrays2: T[]|List, + arrays3: T[]|List, + iteratee?: (value: T) => any + ): T[]; + + /** + * @see _.unionBy + */ + unionBy( + arrays1: T[]|List, + arrays2: T[]|List, + arrays3: T[]|List, + iteratee?: W + ): T[]; + + /** + * @see _.unionBy + */ + unionBy( + arrays1: T[]|List, + arrays2: T[]|List, + arrays3: T[]|List, + arrays4: T[]|List, + iteratee?: (value: T) => any + ): T[]; + + /** + * @see _.unionBy + */ + unionBy( + arrays1: T[]|List, + arrays2: T[]|List, + arrays3: T[]|List, + arrays4: T[]|List, + iteratee?: W + ): T[]; + + /** + * @see _.unionBy + */ + unionBy( + arrays1: T[]|List, + arrays2: T[]|List, + arrays3: T[]|List, + arrays4: T[]|List, + arrays5: T[]|List, + iteratee?: (value: T) => any + ): T[]; + + /** + * @see _.unionBy + */ + unionBy( + arrays1: T[]|List, + arrays2: T[]|List, + arrays3: T[]|List, + arrays4: T[]|List, + arrays5: T[]|List, + iteratee?: W + ): T[]; + + /** + * @see _.unionBy + */ + unionBy( + arrays: T[]|List, + ...iteratee: any[] + ): T[]; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.unionBy + */ + unionBy( + iteratee?: (value: T) => any + ): LoDashImplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + iteratee?: W + ): LoDashImplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + iteratee?: (value: T) => any + ): LoDashImplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + iteratee?: W + ): LoDashImplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + iteratee?: (value: T) => any + ): LoDashImplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + iteratee?: W + ): LoDashImplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + arrays4: T[]|List, + iteratee?: (value: T) => any + ): LoDashImplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + arrays4: T[]|List, + iteratee?: W + ): LoDashImplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + arrays4: T[]|List, + arrays5: T[]|List, + iteratee?: (value: T) => any + ): LoDashImplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + arrays4: T[]|List, + arrays5: T[]|List, + iteratee?: W + ): LoDashImplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + ...iteratee: any[] + ): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.unionBy + */ + unionBy( + iteratee?: (value: T) => any + ): LoDashImplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + iteratee?: W + ): LoDashImplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + iteratee?: (value: T) => any + ): LoDashImplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + iteratee?: W + ): LoDashImplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + iteratee?: (value: T) => any + ): LoDashImplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + iteratee?: W + ): LoDashImplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + arrays4: T[]|List, + iteratee?: (value: T) => any + ): LoDashImplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + arrays4: T[]|List, + iteratee?: W + ): LoDashImplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + arrays4: T[]|List, + arrays5: T[]|List, + iteratee?: (value: T) => any + ): LoDashImplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + arrays4: T[]|List, + arrays5: T[]|List, + iteratee?: W + ): LoDashImplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + ...iteratee: any[] + ): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.unionBy + */ + unionBy( + iteratee?: (value: T) => any + ): LoDashExplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + iteratee?: W + ): LoDashExplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + iteratee?: (value: T) => any + ): LoDashExplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + iteratee?: W + ): LoDashExplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + iteratee?: (value: T) => any + ): LoDashExplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + iteratee?: W + ): LoDashExplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + arrays4: T[]|List, + iteratee?: (value: T) => any + ): LoDashExplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + arrays4: T[]|List, + iteratee?: W + ): LoDashExplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + arrays4: T[]|List, + arrays5: T[]|List, + iteratee?: (value: T) => any + ): LoDashExplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + arrays4: T[]|List, + arrays5: T[]|List, + iteratee?: W + ): LoDashExplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + ...iteratee: any[] + ): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.unionBy + */ + unionBy( + iteratee?: (value: T) => any + ): LoDashExplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + iteratee?: W + ): LoDashExplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + iteratee?: (value: T) => any + ): LoDashExplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + iteratee?: W + ): LoDashExplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + iteratee?: (value: T) => any + ): LoDashExplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + iteratee?: W + ): LoDashExplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + arrays4: T[]|List, + iteratee?: (value: T) => any + ): LoDashExplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + arrays4: T[]|List, + iteratee?: W + ): LoDashExplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + arrays4: T[]|List, + arrays5: T[]|List, + iteratee?: (value: T) => any + ): LoDashExplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + arrays4: T[]|List, + arrays5: T[]|List, + iteratee?: W + ): LoDashExplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + ...iteratee: any[] + ): LoDashExplicitArrayWrapper; + } + + //_.uniq + interface LoDashStatic { + /** + * Creates a duplicate-free version of an array, using + * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons, in which only the first occurrence of each element + * is kept. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to inspect. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.uniq([2, 1, 2]); + * // => [2, 1] + */ + uniq( + array: List + ): T[]; + + /** + * @see _.uniq + */ + uniq( + array: List + ): T[]; + } + + interface LoDashImplicitWrapper { + /** + * @see _.uniq + */ + uniq(): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.uniq + */ + uniq(): LoDashImplicitArrayWrapper; + + /** + * @see _.uniq + */ + uniq(): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + uniq(): LoDashImplicitArrayWrapper; + + /** + * @see _.uniq + */ + uniq(): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.uniq + */ + uniq(): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.uniq + */ + uniq(): LoDashExplicitArrayWrapper; + + /** + * @see _.uniq + */ + uniq(): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.uniq + */ + uniq(): LoDashExplicitArrayWrapper; + + /** + * @see _.uniq + */ + uniq(): LoDashExplicitArrayWrapper; + } + + //_.uniqBy + interface LoDashStatic { + /** + * This method is like `_.uniq` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the criterion by which + * uniqueness is computed. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to inspect. + * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.uniqBy([2.1, 1.2, 2.3], Math.floor); + * // => [2.1, 1.2] + * + * // using the `_.property` iteratee shorthand + * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] + */ + uniqBy( + array: List, + iteratee: ListIterator + ): T[]; + + /** + * @see _.uniqBy + */ + uniqBy( + array: List, + iteratee: ListIterator + ): T[]; + + /** + * @see _.uniqBy + */ + uniqBy( + array: List, + iteratee: string + ): T[]; + + /** + * @see _.uniqBy + */ + uniqBy( + array: List, + iteratee: Object + ): T[]; + + /** + * @see _.uniqBy + */ + uniqBy( + array: List, + iteratee: TWhere + ): T[]; + } + + interface LoDashImplicitWrapper { + /** + * @see _.uniqBy + */ + uniqBy( + iteratee: ListIterator + ): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.uniqBy + */ + uniqBy( + iteratee: ListIterator + ): LoDashImplicitArrayWrapper; + + /** + * @see _.uniqBy + */ + uniqBy( + iteratee: string + ): LoDashImplicitArrayWrapper; + + /** + * @see _.uniqBy + */ + uniqBy( + iteratee: TWhere + ): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.uniqBy + */ + uniqBy( + iteratee: ListIterator + ): LoDashImplicitArrayWrapper; + + /** + * @see _.uniqBy + */ + uniqBy( + iteratee: ListIterator + ): LoDashImplicitArrayWrapper; + + /** + * @see _.uniqBy + */ + uniqBy( + iteratee: string + ): LoDashImplicitArrayWrapper; + + /** + * @see _.uniqBy + */ + uniqBy( + iteratee: Object + ): LoDashImplicitArrayWrapper; + + /** + * @see _.uniqBy + */ + uniqBy( + iteratee: TWhere + ): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.uniqBy + */ + uniqBy( + iteratee: ListIterator + ): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.uniqBy + */ + uniqBy( + iteratee: ListIterator + ): LoDashExplicitArrayWrapper; + + /** + * @see _.uniqBy + */ + uniqBy( + iteratee: string + ): LoDashExplicitArrayWrapper; + + /** + * @see _.uniqBy + */ + uniqBy( + iteratee: TWhere + ): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.uniqBy + */ + uniqBy( + iteratee: ListIterator + ): LoDashExplicitArrayWrapper; + + /** + * @see _.uniqBy + */ + uniqBy( + iteratee: ListIterator + ): LoDashExplicitArrayWrapper; + + /** + * @see _.uniqBy + */ + uniqBy( + iteratee: string + ): LoDashExplicitArrayWrapper; + + /** + * @see _.uniqBy + */ + uniqBy( + iteratee: Object + ): LoDashExplicitArrayWrapper; + + /** + * @see _.uniqBy + */ + uniqBy( + iteratee: TWhere + ): LoDashExplicitArrayWrapper; + } + + //_.sortedUniq + interface LoDashStatic { + /** + * This method is like `_.uniq` except that it's designed and optimized + * for sorted arrays. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to inspect. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.sortedUniq([1, 1, 2]); + * // => [1, 2] + */ + sortedUniq( + array: List + ): T[]; + + /** + * @see _.sortedUniq + */ + sortedUniq( + array: List + ): T[]; + } + + interface LoDashImplicitWrapper { + /** + * @see _.sortedUniq + */ + sortedUniq(): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.sortedUniq + */ + sortedUniq(): LoDashImplicitArrayWrapper; + + /** + * @see _.sortedUniq + */ + sortedUniq(): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + sortedUniq(): LoDashImplicitArrayWrapper; + + /** + * @see _.sortedUniq + */ + sortedUniq(): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.sortedUniq + */ + sortedUniq(): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.sortedUniq + */ + sortedUniq(): LoDashExplicitArrayWrapper; + + /** + * @see _.sortedUniq + */ + sortedUniq(): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.sortedUniq + */ + sortedUniq(): LoDashExplicitArrayWrapper; + + /** + * @see _.sortedUniq + */ + sortedUniq(): LoDashExplicitArrayWrapper; + } + + //_.sortedUniqBy + interface LoDashStatic { + /** + * This method is like `_.uniqBy` except that it's designed and optimized + * for sorted arrays. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor); + * // => [1.1, 2.2] + */ + sortedUniqBy( + array: List, + iteratee: ListIterator + ): T[]; + + /** + * @see _.sortedUniqBy + */ + sortedUniqBy( + array: List, + iteratee: ListIterator + ): T[]; + + /** + * @see _.sortedUniqBy + */ + sortedUniqBy( + array: List, + iteratee: string + ): T[]; + + /** + * @see _.sortedUniqBy + */ + sortedUniqBy( + array: List, + iteratee: Object + ): T[]; + + /** + * @see _.sortedUniqBy + */ + sortedUniqBy( + array: List, + iteratee: TWhere + ): T[]; + } + + interface LoDashImplicitWrapper { + /** + * @see _.sortedUniqBy + */ + sortedUniqBy( + iteratee: ListIterator + ): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.sortedUniqBy + */ + sortedUniqBy( + iteratee: ListIterator + ): LoDashImplicitArrayWrapper; + + /** + * @see _.sortedUniqBy + */ + sortedUniqBy( + iteratee: string + ): LoDashImplicitArrayWrapper; + + /** + * @see _.sortedUniqBy + */ + sortedUniqBy( + iteratee: TWhere + ): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.sortedUniqBy + */ + sortedUniqBy( + iteratee: ListIterator + ): LoDashImplicitArrayWrapper; + + /** + * @see _.sortedUniqBy + */ + sortedUniqBy( + iteratee: ListIterator + ): LoDashImplicitArrayWrapper; + + /** + * @see _.sortedUniqBy + */ + sortedUniqBy( + iteratee: string + ): LoDashImplicitArrayWrapper; + + /** + * @see _.sortedUniqBy + */ + sortedUniqBy( + iteratee: Object + ): LoDashImplicitArrayWrapper; + + /** + * @see _.sortedUniqBy + */ + sortedUniqBy( + iteratee: TWhere + ): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.sortedUniqBy + */ + sortedUniqBy( + iteratee: ListIterator + ): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.sortedUniqBy + */ + sortedUniqBy( + iteratee: ListIterator + ): LoDashExplicitArrayWrapper; + + /** + * @see _.sortedUniqBy + */ + sortedUniqBy( + iteratee: string + ): LoDashExplicitArrayWrapper; + + /** + * @see _.sortedUniqBy + */ + sortedUniqBy( + iteratee: TWhere + ): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.sortedUniqBy + */ + sortedUniqBy( + iteratee: ListIterator + ): LoDashExplicitArrayWrapper; + + /** + * @see _.sortedUniqBy + */ + sortedUniqBy( + iteratee: ListIterator + ): LoDashExplicitArrayWrapper; + + /** + * @see _.sortedUniqBy + */ + sortedUniqBy( + iteratee: string + ): LoDashExplicitArrayWrapper; + + /** + * @see _.sortedUniqBy + */ + sortedUniqBy( + iteratee: Object + ): LoDashExplicitArrayWrapper; + + /** + * @see _.sortedUniqBy + */ + sortedUniqBy( + iteratee: TWhere + ): LoDashExplicitArrayWrapper; + } + + //_.unionWith DUMMY + interface LoDashStatic { + /** + * This method is like `_.union` except that it accepts `comparator` which + * is invoked to compare elements of `arrays`. The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of combined values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.unionWith(objects, others, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] + */ + unionWith( + array: any[]|List, + ...values: any[] + ): any[]; + } + + //_.uniqWith DUMMY + interface LoDashStatic { + /** + * This method is like `_.uniq` except that it accepts `comparator` which + * is invoked to compare elements of `array`. The comparator is invoked with + * two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.uniqWith(objects, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }] + */ + uniqWith( + array: any[]|List, + ...values: any[] + ): any[]; + } + + //_.unzip + interface LoDashStatic { + /** + * This method is like _.zip except that it accepts an array of grouped elements and creates an array + * regrouping the elements to their pre-zip configuration. + * + * @param array The array of grouped elements to process. + * @return Returns the new array of regrouped elements. + */ + unzip(array: List>): T[][]; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.unzip + */ + unzip(): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.unzip + */ + unzip(): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.unzip + */ + unzip(): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.unzip + */ + unzip(): LoDashExplicitArrayWrapper; + } + + //_.unzipWith + interface LoDashStatic { + /** + * This method is like _.unzip except that it accepts an iteratee to specify how regrouped values should be + * combined. The iteratee is bound to thisArg and invoked with four arguments: (accumulator, value, index, + * group). + * + * @param array The array of grouped elements to process. + * @param iteratee The function to combine regrouped values. + * @param thisArg The this binding of iteratee. + * @return Returns the new array of regrouped elements. + */ + unzipWith( + array: List>, + iteratee?: MemoIterator + ): TResult[]; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.unzipWith + */ + unzipWith( + iteratee?: MemoIterator + ): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.unzipWith + */ + unzipWith( + iteratee?: MemoIterator + ): LoDashImplicitArrayWrapper; + } + + //_.without + interface LoDashStatic { + /** + * Creates an array excluding all provided values using SameValueZero for equality comparisons. + * + * @param array The array to filter. + * @param values The values to exclude. + * @return Returns the new array of filtered values. + */ + without( + array: List, + ...values: T[] + ): T[]; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.without + */ + without(...values: T[]): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.without + */ + without(...values: T[]): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.without + */ + without(...values: T[]): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.without + */ + without(...values: T[]): LoDashExplicitArrayWrapper; + } + + //_.xor + interface LoDashStatic { + /** + * Creates an array of unique values that is the symmetric difference of the provided arrays. + * + * @param arrays The arrays to inspect. + * @return Returns the new array of values. + */ + xor(...arrays: List[]): T[]; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.xor + */ + xor(...arrays: List[]): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.xor + */ + xor(...arrays: List[]): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.xor + */ + xor(...arrays: List[]): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.xor + */ + xor(...arrays: List[]): LoDashExplicitArrayWrapper; + } + + //_.xorBy DUMMY + interface LoDashStatic { + /** + * This method is like `_.xor` except that it accepts `iteratee` which is + * invoked for each element of each `arrays` to generate the criterion by which + * uniqueness is computed. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of values. + * @example + * + * _.xorBy([2.1, 1.2], [4.3, 2.4], Math.floor); + * // => [1.2, 4.3] + * + * // using the `_.property` iteratee shorthand + * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 2 }] + */ + xorBy( + array: any[]|List, + ...values: any[] + ): any[]; + } + + //_.xorWith DUMMY + interface LoDashStatic { + /** + * This method is like `_.xor` except that it accepts `comparator` which is + * invoked to compare elements of `arrays`. The comparator is invoked with + * two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.xorWith(objects, others, _.isEqual); + * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] + */ + xorWith( + array: any[]|List, + ...values: any[] + ): any[]; + } + + //_.zip + interface LoDashStatic { + /** + * Creates an array of grouped elements, the first of which contains the first elements of the given arrays, + * the second of which contains the second elements of the given arrays, and so on. + * + * @param arrays The arrays to process. + * @return Returns the new array of grouped elements. + */ + zip(...arrays: List[]): T[][]; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.zip + */ + zip(...arrays: List[]): _.LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.zip + */ + zip(...arrays: List[]): _.LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.zip + */ + zip(...arrays: List[]): _.LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.zip + */ + zip(...arrays: List[]): _.LoDashExplicitArrayWrapper; + } + + //_.zipObject + interface LoDashStatic { + /** + * The inverse of _.pairs; this method returns an object composed from arrays of property names and values. + * Provide either a single two dimensional array, e.g. [[key1, value1], [key2, value2]] or two arrays, one of + * property names and one of corresponding values. + * + * @param props The property names. + * @param values The property values. + * @return Returns the new object. + */ + zipObject( + props: List|List>, + values?: List + ): TResult; + + /** + * @see _.zipObject + */ + zipObject( + props: List|List>, + values?: List + ): TResult; + + /** + * @see _.zipObject + */ + zipObject( + props: List|List>, + values?: List + ): _.Dictionary; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.zipObject + */ + zipObject( + values?: List + ): _.LoDashImplicitObjectWrapper; + + /** + * @see _.zipObject + */ + zipObject( + values?: List + ): _.LoDashImplicitObjectWrapper; + + /** + * @see _.zipObject + */ + zipObject( + values?: List + ): _.LoDashImplicitObjectWrapper<_.Dictionary>; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.zipObject + */ + zipObject( + values?: List + ): _.LoDashImplicitObjectWrapper; + + /** + * @see _.zipObject + */ + zipObject( + values?: List + ): _.LoDashImplicitObjectWrapper; + + /** + * @see _.zipObject + */ + zipObject( + values?: List + ): _.LoDashImplicitObjectWrapper<_.Dictionary>; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.zipObject + */ + zipObject( + values?: List + ): _.LoDashExplicitObjectWrapper; + + /** + * @see _.zipObject + */ + zipObject( + values?: List + ): _.LoDashExplicitObjectWrapper; + + /** + * @see _.zipObject + */ + zipObject( + values?: List + ): _.LoDashExplicitObjectWrapper<_.Dictionary>; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.zipObject + */ + zipObject( + values?: List + ): _.LoDashExplicitObjectWrapper; + + /** + * @see _.zipObject + */ + zipObject( + values?: List + ): _.LoDashExplicitObjectWrapper; + + /** + * @see _.zipObject + */ + zipObject( + values?: List + ): _.LoDashExplicitObjectWrapper<_.Dictionary>; + } + + //_.zipWith + interface LoDashStatic { + /** + * This method is like _.zip except that it accepts an iteratee to specify how grouped values should be + * combined. The iteratee is bound to thisArg and invoked with four arguments: (accumulator, value, index, + * group). + * @param {...Array} [arrays] The arrays to process. + * @param {Function} [iteratee] The function to combine grouped values. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @return Returns the new array of grouped elements. + */ + zipWith(...args: any[]): TResult[]; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.zipWith + */ + zipWith(...args: any[]): LoDashImplicitArrayWrapper; + } + + /********* + * Chain * + *********/ + + //_.chain + interface LoDashStatic { + /** + * Creates a lodash object that wraps value with explicit method chaining enabled. + * + * @param value The value to wrap. + * @return Returns the new lodash wrapper instance. + */ + chain(value: number): LoDashExplicitWrapper; + chain(value: string): LoDashExplicitWrapper; + chain(value: boolean): LoDashExplicitWrapper; + chain(value: T[]): LoDashExplicitArrayWrapper; + chain(value: T): LoDashExplicitObjectWrapper; + chain(value: any): LoDashExplicitWrapper; + } + + interface LoDashImplicitWrapper { + /** + * @see _.chain + */ + chain(): LoDashExplicitWrapper; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.chain + */ + chain(): LoDashExplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.chain + */ + chain(): LoDashExplicitObjectWrapper; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.chain + */ + chain(): TWrapper; + } + + //_.tap + interface LoDashStatic { + /** + * This method invokes interceptor and returns value. The interceptor is bound to thisArg and invoked with one + * argument; (value). The purpose of this method is to "tap into" a method chain in order to perform operations + * on intermediate results within the chain. + * + * @param value The value to provide to interceptor. + * @param interceptor The function to invoke. + * @parem thisArg The this binding of interceptor. + * @return Returns value. + **/ + tap( + value: T, + interceptor: (value: T) => void + ): T; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.tap + */ + tap( + interceptor: (value: T) => void + ): TWrapper; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.tap + */ + tap( + interceptor: (value: T) => void + ): TWrapper; + } + + //_.thru + interface LoDashStatic { + /** + * This method is like _.tap except that it returns the result of interceptor. + * + * @param value The value to provide to interceptor. + * @param interceptor The function to invoke. + * @param thisArg The this binding of interceptor. + * @return Returns the result of interceptor. + */ + thru( + value: T, + interceptor: (value: T) => TResult + ): TResult; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.thru + */ + thru( + interceptor: (value: T) => TResult): LoDashImplicitWrapper; + + /** + * @see _.thru + */ + thru( + interceptor: (value: T) => TResult): LoDashImplicitWrapper; + + /** + * @see _.thru + */ + thru( + interceptor: (value: T) => TResult): LoDashImplicitWrapper; + + /** + * @see _.thru + */ + thru( + interceptor: (value: T) => TResult): LoDashImplicitObjectWrapper; + + /** + * @see _.thru + */ + thru( + interceptor: (value: T) => TResult[]): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.thru + */ + thru( + interceptor: (value: T) => TResult + ): LoDashExplicitWrapper; + + /** + * @see _.thru + */ + thru( + interceptor: (value: T) => TResult + ): LoDashExplicitWrapper; + + /** + * @see _.thru + */ + thru( + interceptor: (value: T) => TResult + ): LoDashExplicitWrapper; + + /** + * @see _.thru + */ + thru( + interceptor: (value: T) => TResult + ): LoDashExplicitObjectWrapper; + + /** + * @see _.thru + */ + thru( + interceptor: (value: T) => TResult[] + ): LoDashExplicitArrayWrapper; + } + + //_.prototype.commit + interface LoDashImplicitWrapperBase { + /** + * Executes the chained sequence and returns the wrapped result. + * + * @return Returns the new lodash wrapper instance. + */ + commit(): TWrapper; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.commit + */ + commit(): TWrapper; + } + + //_.prototype.concat + interface LoDashImplicitWrapperBase { + /** + * Creates a new array joining a wrapped array with any additional arrays and/or values. + * + * @param items + * @return Returns the new concatenated array. + */ + concat(...items: Array>): LoDashImplicitArrayWrapper; + + /** + * @see _.concat + */ + concat(...items: Array>): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.concat + */ + concat(...items: Array>): LoDashExplicitArrayWrapper; + + /** + * @see _.concat + */ + concat(...items: Array>): LoDashExplicitArrayWrapper; + } + + //_.prototype.plant + interface LoDashImplicitWrapperBase { + /** + * Creates a clone of the chained sequence planting value as the wrapped value. + * @param value The value to plant as the wrapped value. + * @return Returns the new lodash wrapper instance. + */ + plant(value: number): LoDashImplicitWrapper; + + /** + * @see _.plant + */ + plant(value: string): LoDashImplicitStringWrapper; + + /** + * @see _.plant + */ + plant(value: boolean): LoDashImplicitWrapper; + + /** + * @see _.plant + */ + plant(value: number[]): LoDashImplicitNumberArrayWrapper; + + /** + * @see _.plant + */ + plant(value: T[]): LoDashImplicitArrayWrapper; + + /** + * @see _.plant + */ + plant(value: T): LoDashImplicitObjectWrapper; + + /** + * @see _.plant + */ + plant(value: any): LoDashImplicitWrapper; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.plant + */ + plant(value: number): LoDashExplicitWrapper; + + /** + * @see _.plant + */ + plant(value: string): LoDashExplicitStringWrapper; + + /** + * @see _.plant + */ + plant(value: boolean): LoDashExplicitWrapper; + + /** + * @see _.plant + */ + plant(value: number[]): LoDashExplicitNumberArrayWrapper; + + /** + * @see _.plant + */ + plant(value: T[]): LoDashExplicitArrayWrapper; + + /** + * @see _.plant + */ + plant(value: T): LoDashExplicitObjectWrapper; + + /** + * @see _.plant + */ + plant(value: any): LoDashExplicitWrapper; + } + + //_.prototype.reverse + interface LoDashImplicitArrayWrapper { + /** + * Reverses the wrapped array so the first element becomes the last, the second element becomes the second to + * last, and so on. + * + * Note: This method mutates the wrapped array. + * + * @return Returns the new reversed lodash wrapper instance. + */ + reverse(): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.reverse + */ + reverse(): LoDashExplicitArrayWrapper; + } + + //_.prototype.toJSON + interface LoDashWrapperBase { + /** + * @see _.value + */ + toJSON(): T; + } + + //_.prototype.toString + interface LoDashWrapperBase { + /** + * Produces the result of coercing the unwrapped value to a string. + * + * @return Returns the coerced string value. + */ + toString(): string; + } + + //_.prototype.value + interface LoDashWrapperBase { + /** + * Executes the chained sequence to extract the unwrapped value. + * + * @alias _.toJSON, _.valueOf + * + * @return Returns the resolved unwrapped value. + */ + value(): T; + } + + //_.valueOf + interface LoDashWrapperBase { + /** + * @see _.value + */ + valueOf(): T; + } + + /************** + * Collection * + **************/ + + //_.at + interface LoDashStatic { + /** + * Creates an array of elements corresponding to the given keys, or indexes, of collection. Keys may be + * specified as individual arguments or as arrays of keys. + * + * @param collection The collection to iterate over. + * @param props The property names or indexes of elements to pick, specified individually or in arrays. + * @return Returns the new array of picked elements. + */ + at( + collection: List|Dictionary, + ...props: (number|string|(number|string)[])[] + ): T[]; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.at + */ + at(...props: (number|string|(number|string)[])[]): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.at + */ + at(...props: (number|string|(number|string)[])[]): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.at + */ + at(...props: (number|string|(number|string)[])[]): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.at + */ + at(...props: (number|string|(number|string)[])[]): LoDashExplicitArrayWrapper; + } + + //_.countBy + interface LoDashStatic { + /** + * Creates an object composed of keys generated from the results of running each element of collection through + * iteratee. The corresponding value of each key is the number of times the key was returned by iteratee. The + * iteratee is bound to thisArg and invoked with three arguments: + * (value, index|key, collection). + * + * If a property name is provided for iteratee the created _.property style callback returns the property + * value of the given element. + * + * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for + * elements that have a matching property value, else false. + * + * If an object is provided for iteratee the created _.matches style callback returns true for elements that + * have the properties of the given object, else false. + * + * @param collection The collection to iterate over. + * @param iteratee The function invoked per iteration. + * @param thisArg The this binding of iteratee. + * @return Returns the composed aggregate object. + */ + countBy( + collection: List, + iteratee?: ListIterator + ): Dictionary; + + /** + * @see _.countBy + */ + countBy( + collection: Dictionary, + iteratee?: DictionaryIterator + ): Dictionary; + + /** + * @see _.countBy + */ + countBy( + collection: NumericDictionary, + iteratee?: NumericDictionaryIterator + ): Dictionary; + + /** + * @see _.countBy + */ + countBy( + collection: List|Dictionary|NumericDictionary, + iteratee?: string + ): Dictionary; + + /** + * @see _.countBy + */ + countBy( + collection: List|Dictionary|NumericDictionary, + iteratee?: W + ): Dictionary; + + /** + * @see _.countBy + */ + countBy( + collection: List|Dictionary|NumericDictionary, + iteratee?: Object + ): Dictionary; + } + + interface LoDashImplicitWrapper { + /** + * @see _.countBy + */ + countBy( + iteratee?: ListIterator + ): LoDashImplicitObjectWrapper>; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.countBy + */ + countBy( + iteratee?: ListIterator + ): LoDashImplicitObjectWrapper>; + + /** + * @see _.countBy + */ + countBy( + iteratee?: string + ): LoDashImplicitObjectWrapper>; + + /** + * @see _.countBy + */ + countBy( + iteratee?: W + ): LoDashImplicitObjectWrapper>; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.countBy + */ + countBy( + iteratee?: ListIterator|DictionaryIterator|NumericDictionaryIterator + ): LoDashImplicitObjectWrapper>; + + /** + * @see _.countBy + */ + countBy( + iteratee?: string + ): LoDashImplicitObjectWrapper>; + + /** + * @see _.countBy + */ + countBy( + iteratee?: W + ): LoDashImplicitObjectWrapper>; + } + + interface LoDashExplicitWrapper { + /** + * @see _.countBy + */ + countBy( + iteratee?: ListIterator + ): LoDashExplicitObjectWrapper>; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.countBy + */ + countBy( + iteratee?: ListIterator + ): LoDashExplicitObjectWrapper>; + + /** + * @see _.countBy + */ + countBy( + iteratee?: string + ): LoDashExplicitObjectWrapper>; + + /** + * @see _.countBy + */ + countBy( + iteratee?: W + ): LoDashExplicitObjectWrapper>; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.countBy + */ + countBy( + iteratee?: ListIterator|DictionaryIterator|NumericDictionaryIterator + ): LoDashExplicitObjectWrapper>; + + /** + * @see _.countBy + */ + countBy( + iteratee?: string + ): LoDashExplicitObjectWrapper>; + + /** + * @see _.countBy + */ + countBy( + iteratee?: W + ): LoDashExplicitObjectWrapper>; + } + + //_.each + interface LoDashStatic { + /** + * @see _.forEach + */ + each( + collection: T[], + iteratee?: ListIterator + ): T[]; + + /** + * @see _.forEach + */ + each( + collection: List, + iteratee?: ListIterator + ): List; + + /** + * @see _.forEach + */ + each( + collection: Dictionary, + iteratee?: DictionaryIterator + ): Dictionary; + + /** + * @see _.forEach + */ + each( + collection: T, + iteratee?: ObjectIterator + ): T; + + /** + * @see _.forEach + */ + each( + collection: T, + iteratee?: ObjectIterator + ): T; + } + + interface LoDashImplicitWrapper { + /** + * @see _.forEach + */ + each( + iteratee: ListIterator + ): LoDashImplicitWrapper; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.forEach + */ + each( + iteratee: ListIterator + ): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.forEach + */ + each( + iteratee?: ListIterator|DictionaryIterator + ): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.forEach + */ + each( + iteratee: ListIterator + ): LoDashExplicitWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.forEach + */ + each( + iteratee: ListIterator + ): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.forEach + */ + each( + iteratee?: ListIterator|DictionaryIterator + ): LoDashExplicitObjectWrapper; + } + + //_.eachRight + interface LoDashStatic { + /** + * @see _.forEachRight + */ + eachRight( + collection: T[], + iteratee?: ListIterator + ): T[]; + + /** + * @see _.forEachRight + */ + eachRight( + collection: List, + iteratee?: ListIterator + ): List; + + /** + * @see _.forEachRight + */ + eachRight( + collection: Dictionary, + iteratee?: DictionaryIterator + ): Dictionary; + + /** + * @see _.forEachRight + */ + eachRight( + collection: T, + iteratee?: ObjectIterator + ): T; + + /** + * @see _.forEachRight + */ + eachRight( + collection: T, + iteratee?: ObjectIterator + ): T; + } + + interface LoDashImplicitWrapper { + /** + * @see _.forEachRight + */ + eachRight( + iteratee: ListIterator + ): LoDashImplicitWrapper; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.forEachRight + */ + eachRight( + iteratee: ListIterator + ): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.forEachRight + */ + eachRight( + iteratee?: ListIterator|DictionaryIterator + ): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.forEachRight + */ + eachRight( + iteratee: ListIterator + ): LoDashExplicitWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.forEachRight + */ + eachRight( + iteratee: ListIterator + ): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.forEachRight + */ + eachRight( + iteratee?: ListIterator|DictionaryIterator + ): LoDashExplicitObjectWrapper; + } + + //_.every + interface LoDashStatic { + /** + * Checks if predicate returns truthy for all elements of collection. Iteration is stopped once predicate + * returns falsey. The predicate is invoked with three arguments: (value, index|key, collection). + * + * @param collection The collection to iterate over. + * @param predicate The function invoked per iteration. + * @return Returns true if all elements pass the predicate check, else false. + */ + every( + collection: List, + predicate?: ListIterator + ): boolean; + + /** + * @see _.every + */ + every( + collection: Dictionary, + predicate?: DictionaryIterator + ): boolean; + + /** + * @see _.every + */ + every( + collection: NumericDictionary, + predicate?: NumericDictionaryIterator + ): boolean; + + /** + * @see _.every + */ + every( + collection: List|Dictionary|NumericDictionary, + predicate?: string|any[] + ): boolean; + + /** + * @see _.every + */ + every( + collection: List|Dictionary|NumericDictionary, + predicate?: TObject + ): boolean; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.every + */ + every( + predicate?: ListIterator|NumericDictionaryIterator + ): boolean; + + /** + * @see _.every + */ + every( + predicate?: string|any[] + ): boolean; + + /** + * @see _.every + */ + every( + predicate?: TObject + ): boolean; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.every + */ + every( + predicate?: ListIterator|DictionaryIterator|NumericDictionaryIterator + ): boolean; + + /** + * @see _.every + */ + every( + predicate?: string|any[] + ): boolean; + + /** + * @see _.every + */ + every( + predicate?: TObject + ): boolean; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.every + */ + every( + predicate?: ListIterator|NumericDictionaryIterator + ): LoDashExplicitWrapper; + + /** + * @see _.every + */ + every( + predicate?: string|any[] + ): LoDashExplicitWrapper; + + /** + * @see _.every + */ + every( + predicate?: TObject + ): LoDashExplicitWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.every + */ + every( + predicate?: ListIterator|DictionaryIterator|NumericDictionaryIterator + ): LoDashExplicitWrapper; + + /** + * @see _.every + */ + every( + predicate?: string|any[] + ): LoDashExplicitWrapper; + + /** + * @see _.every + */ + every( + predicate?: TObject + ): LoDashExplicitWrapper; + } + + //_.filter + interface LoDashStatic { + /** + * Iterates over elements of collection, returning an array of all elements predicate returns truthy for. The + * predicate is bound to thisArg and invoked with three arguments: (value, index|key, collection). + * + * If a property name is provided for predicate the created _.property style callback returns the property + * value of the given element. + * + * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for + * elements that have a matching property value, else false. + * + * If an object is provided for predicate the created _.matches style callback returns true for elements that + * have the properties of the given object, else false. + * + * @param collection The collection to iterate over. + * @param predicate The function invoked per iteration. + * @param thisArg The this binding of predicate. + * @return Returns the new filtered array. + */ + filter( + collection: List, + predicate?: ListIterator + ): T[]; + + /** + * @see _.filter + */ + filter( + collection: Dictionary, + predicate?: DictionaryIterator + ): T[]; + + /** + * @see _.filter + */ + filter( + collection: string, + predicate?: StringIterator + ): string[]; + + /** + * @see _.filter + */ + filter( + collection: List|Dictionary, + predicate: string + ): T[]; + + /** + * @see _.filter + */ + filter( + collection: List|Dictionary, + predicate: W + ): T[]; + } + + interface LoDashImplicitWrapper { + /** + * @see _.filter + */ + filter( + predicate?: StringIterator + ): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.filter + */ + filter( + predicate: ListIterator + ): LoDashImplicitArrayWrapper; + + /** + * @see _.filter + */ + filter( + predicate: string + ): LoDashImplicitArrayWrapper; + + /** + * @see _.filter + */ + filter(predicate: W): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.filter + */ + filter( + predicate: ListIterator|DictionaryIterator + ): LoDashImplicitArrayWrapper; + + /** + * @see _.filter + */ + filter( + predicate: string + ): LoDashImplicitArrayWrapper; + + /** + * @see _.filter + */ + filter(predicate: W): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.filter + */ + filter( + predicate?: StringIterator + ): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.filter + */ + filter( + predicate: ListIterator + ): LoDashExplicitArrayWrapper; + + /** + * @see _.filter + */ + filter( + predicate: string + ): LoDashExplicitArrayWrapper; + + /** + * @see _.filter + */ + filter(predicate: W): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.filter + */ + filter( + predicate: ListIterator|DictionaryIterator + ): LoDashExplicitArrayWrapper; + + /** + * @see _.filter + */ + filter( + predicate: string + ): LoDashExplicitArrayWrapper; + + /** + * @see _.filter + */ + filter(predicate: W): LoDashExplicitArrayWrapper; + } + + //_.find + interface LoDashStatic { + /** + * Iterates over elements of collection, returning the first element predicate returns truthy for. + * The predicate is bound to thisArg and invoked with three arguments: (value, index|key, collection). + * + * If a property name is provided for predicate the created _.property style callback returns the property + * value of the given element. + * + * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for + * elements that have a matching property value, else false. + * + * If an object is provided for predicate the created _.matches style callback returns true for elements that + * have the properties of the given object, else false. + * + * @param collection The collection to search. + * @param predicate The function invoked per iteration. + * @param fromIndex The index to search from. + * @return Returns the matched element, else undefined. + */ + find( + collection: List, + predicate?: ListIterator, + fromIndex?: number + ): T; + + /** + * @see _.find + */ + find( + collection: Dictionary, + predicate?: DictionaryIterator, + fromIndex?: number + ): T; + + /** + * @see _.find + */ + find( + collection: List|Dictionary, + predicate?: string, + fromIndex?: number + ): T; + + /** + * @see _.find + */ + find( + collection: List|Dictionary, + predicate?: TObject, + fromIndex?: number + ): T; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.find + */ + find( + predicate?: ListIterator, + fromIndex?: number + ): T; + + /** + * @see _.find + */ + find( + predicate?: string, + fromIndex?: number + ): T; + + /** + * @see _.find + */ + find( + predicate?: TObject, + fromIndex?: number + ): T; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.find + */ + find( + predicate?: ListIterator|DictionaryIterator, + fromIndex?: number + ): TResult; + + /** + * @see _.find + */ + find( + predicate?: string, + fromIndex?: number + ): TResult; + + /** + * @see _.find + */ + find( + predicate?: TObject, + fromIndex?: number + ): TResult; + } + + //_.findLast + interface LoDashStatic { + /** + * This method is like _.find except that it iterates over elements of a collection from + * right to left. + * @param collection Searches for a value in this list. + * @param callback The function called per iteration. + * @param thisArg The this binding of callback. + * @return The found element, else undefined. + **/ + findLast( + collection: Array, + callback: ListIterator): T; + + /** + * @see _.find + **/ + findLast( + collection: List, + callback: ListIterator): T; + + /** + * @see _.find + **/ + findLast( + collection: Dictionary, + callback: DictionaryIterator): T; + + /** + * @see _.find + * @param _.pluck style callback + **/ + findLast( + collection: Array, + whereValue: W): T; + + /** + * @see _.find + * @param _.pluck style callback + **/ + findLast( + collection: List, + whereValue: W): T; + + /** + * @see _.find + * @param _.pluck style callback + **/ + findLast( + collection: Dictionary, + whereValue: W): T; + + /** + * @see _.find + * @param _.where style callback + **/ + findLast( + collection: Array, + pluckValue: string): T; + + /** + * @see _.find + * @param _.where style callback + **/ + findLast( + collection: List, + pluckValue: string): T; + + /** + * @see _.find + * @param _.where style callback + **/ + findLast( + collection: Dictionary, + pluckValue: string): T; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.findLast + */ + findLast( + callback: ListIterator): T; + /** + * @see _.findLast + * @param _.where style callback + */ + findLast( + whereValue: W): T; + + /** + * @see _.findLast + * @param _.where style callback + */ + findLast( + pluckValue: string): T; + } + + //_.flatMap + interface LoDashStatic { + /** + * Creates an array of flattened values by running each element in collection through iteratee + * and concating its result to the other mapped values. The iteratee is invoked with three arguments: + * (value, index|key, collection). + * + * @param collection The collection to iterate over. + * @param iteratee The function invoked per iteration. + * @return Returns the new flattened array. + */ + flatMap( + collection: List, + iteratee?: ListIterator + ): TResult[]; + + /** + * @see _.flatMap + */ + flatMap( + collection: List, + iteratee?: ListIterator + ): TResult[]; + + /** + * @see _.flatMap + */ + flatMap( + collection: Dictionary, + iteratee?: DictionaryIterator + ): TResult[]; + + /** + * @see _.flatMap + */ + flatMap( + collection: Dictionary, + iteratee?: DictionaryIterator + ): TResult[]; + + /** + * @see _.flatMap + */ + flatMap( + collection: NumericDictionary, + iteratee?: NumericDictionaryIterator + ): TResult[]; + + /** + * @see _.flatMap + */ + flatMap( + collection: NumericDictionary, + iteratee?: NumericDictionaryIterator + ): TResult[]; + + /** + * @see _.flatMap + */ + flatMap( + collection: TObject, + iteratee?: ObjectIterator + ): TResult[]; + + /** + * @see _.flatMap + */ + flatMap( + collection: Object, + iteratee?: ObjectIterator + ): TResult[]; + + /** + * @see _.flatMap + */ + flatMap( + collection: TObject, + iteratee: TWhere + ): boolean[]; + + /** + * @see _.flatMap + */ + flatMap( + collection: TObject, + iteratee: Object|string + ): TResult[]; + + /** + * @see _.flatMap + */ + flatMap( + collection: TObject, + iteratee: [string, any] + ): boolean[]; + + /** + * @see _.flatMap + */ + flatMap( + collection: string + ): string[]; + + /** + * @see _.flatMap + */ + flatMap( + collection: Object, + iteratee?: Object|string + ): TResult[]; + } + + interface LoDashImplicitWrapper { + /** + * @see _.flatMap + */ + flatMap( + iteratee: ListIterator + ): LoDashImplicitArrayWrapper; + + /** + * @see _.flatMap + */ + flatMap(): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.flatMap + */ + flatMap( + iteratee: ListIterator|string + ): LoDashImplicitArrayWrapper; + + /** + * @see _.flatMap + */ + flatMap( + iteratee: TWhere + ): LoDashImplicitArrayWrapper; + + /** + * @see _.flatMap + */ + flatMap( + iteratee: [string, any] + ): LoDashImplicitArrayWrapper; + + /** + * @see _.flatMap + */ + flatMap(): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.flatMap + */ + flatMap( + iteratee: ListIterator|DictionaryIterator|NumericDictionaryIterator + ): LoDashImplicitArrayWrapper; + + /** + * @see _.flatMap + */ + flatMap( + iteratee: ObjectIterator|string + ): LoDashImplicitArrayWrapper; + + /** + * @see _.flatMap + */ + flatMap( + iteratee: TWhere + ): LoDashImplicitArrayWrapper; + + /** + * @see _.flatMap + */ + flatMap( + iteratee: [string, any] + ): LoDashImplicitArrayWrapper; + + /** + * @see _.flatMap + */ + flatMap(): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.flatMap + */ + flatMap( + iteratee: ListIterator + ): LoDashExplicitArrayWrapper; + + /** + * @see _.flatMap + */ + flatMap(): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.flatMap + */ + flatMap( + iteratee: ListIterator|string + ): LoDashExplicitArrayWrapper; + + /** + * @see _.flatMap + */ + flatMap( + iteratee: TWhere + ): LoDashExplicitArrayWrapper; + + /** + * @see _.flatMap + */ + flatMap( + iteratee: [string, any] + ): LoDashExplicitArrayWrapper; + + /** + * @see _.flatMap + */ + flatMap(): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.flatMap + */ + flatMap( + iteratee: ListIterator|DictionaryIterator|NumericDictionaryIterator + ): LoDashExplicitArrayWrapper; + + /** + * @see _.flatMap + */ + flatMap( + iteratee: ObjectIterator|string + ): LoDashExplicitArrayWrapper; + + /** + * @see _.flatMap + */ + flatMap( + iteratee: TWhere + ): LoDashExplicitArrayWrapper; + + /** + * @see _.flatMap + */ + flatMap( + iteratee: [string, any] + ): LoDashExplicitArrayWrapper; + + /** + * @see _.flatMap + */ + flatMap(): LoDashExplicitArrayWrapper; + } + + //_.forEach + interface LoDashStatic { + /** + * Iterates over elements of collection invoking iteratee for each element. The iteratee is bound to thisArg + * and invoked with three arguments: + * (value, index|key, collection). Iteratee functions may exit iteration early by explicitly returning false. + * + * Note: As with other "Collections" methods, objects with a "length" property are iterated like arrays. To + * avoid this behavior _.forIn or _.forOwn may be used for object iteration. + * + * @alias _.each + * + * @param collection The collection to iterate over. + * @param iteratee The function invoked per iteration. + * @param thisArg The this binding of iteratee. + */ + forEach( + collection: T[], + iteratee?: ListIterator + ): T[]; + + /** + * @see _.forEach + */ + forEach( + collection: List, + iteratee?: ListIterator + ): List; + + /** + * @see _.forEach + */ + forEach( + collection: Dictionary, + iteratee?: DictionaryIterator + ): Dictionary; + + /** + * @see _.forEach + */ + forEach( + collection: T, + iteratee?: ObjectIterator + ): T; + + /** + * @see _.forEach + */ + forEach( + collection: T, + iteratee?: ObjectIterator + ): T; + } + + interface LoDashImplicitWrapper { + /** + * @see _.forEach + */ + forEach( + iteratee: ListIterator + ): LoDashImplicitWrapper; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.forEach + */ + forEach( + iteratee: ListIterator + ): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.forEach + */ + forEach( + iteratee?: ListIterator|DictionaryIterator + ): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.forEach + */ + forEach( + iteratee: ListIterator + ): LoDashExplicitWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.forEach + */ + forEach( + iteratee: ListIterator + ): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.forEach + */ + forEach( + iteratee?: ListIterator|DictionaryIterator + ): LoDashExplicitObjectWrapper; + } + + //_.forEachRight + interface LoDashStatic { + /** + * This method is like _.forEach except that it iterates over elements of collection from right to left. + * + * @alias _.eachRight + * + * @param collection The collection to iterate over. + * @param iteratee The function called per iteration. + * @param thisArg The this binding of callback. + */ + forEachRight( + collection: T[], + iteratee?: ListIterator + ): T[]; + + /** + * @see _.forEachRight + */ + forEachRight( + collection: List, + iteratee?: ListIterator + ): List; + + /** + * @see _.forEachRight + */ + forEachRight( + collection: Dictionary, + iteratee?: DictionaryIterator + ): Dictionary; + + /** + * @see _.forEachRight + */ + forEachRight( + collection: T, + iteratee?: ObjectIterator + ): T; + + /** + * @see _.forEachRight + */ + forEachRight( + collection: T, + iteratee?: ObjectIterator + ): T; + } + + interface LoDashImplicitWrapper { + /** + * @see _.forEachRight + */ + forEachRight( + iteratee: ListIterator + ): LoDashImplicitWrapper; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.forEachRight + */ + forEachRight( + iteratee: ListIterator + ): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.forEachRight + */ + forEachRight( + iteratee?: ListIterator|DictionaryIterator + ): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.forEachRight + */ + forEachRight( + iteratee: ListIterator + ): LoDashExplicitWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.forEachRight + */ + forEachRight( + iteratee: ListIterator + ): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.forEachRight + */ + forEachRight( + iteratee?: ListIterator|DictionaryIterator + ): LoDashExplicitObjectWrapper; + } + + //_.groupBy + interface LoDashStatic { + /** + * Creates an object composed of keys generated from the results of running each element of collection through + * iteratee. The corresponding value of each key is an array of the elements responsible for generating the + * key. The iteratee is bound to thisArg and invoked with three arguments: + * (value, index|key, collection). + * + * If a property name is provided for iteratee the created _.property style callback returns the property + * value of the given element. + * + * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for + * elements that have a matching property value, else false. + * + * If an object is provided for iteratee the created _.matches style callback returns true for elements that + * have the properties of the given object, else false. + * + * @param collection The collection to iterate over. + * @param iteratee The function invoked per iteration. + * @param thisArg The this binding of iteratee. + * @return Returns the composed aggregate object. + */ + groupBy( + collection: List, + iteratee?: ListIterator + ): Dictionary; + + /** + * @see _.groupBy + */ + groupBy( + collection: List, + iteratee?: ListIterator + ): Dictionary; + + /** + * @see _.groupBy + */ + groupBy( + collection: Dictionary, + iteratee?: DictionaryIterator + ): Dictionary; + + /** + * @see _.groupBy + */ + groupBy( + collection: Dictionary, + iteratee?: DictionaryIterator + ): Dictionary; + + /** + * @see _.groupBy + */ + groupBy( + collection: List|Dictionary, + iteratee?: string + ): Dictionary; + + /** + * @see _.groupBy + */ + groupBy( + collection: List|Dictionary, + iteratee?: string + ): Dictionary; + + /** + * @see _.groupBy + */ + groupBy( + collection: List|Dictionary, + iteratee?: TWhere + ): Dictionary; + + /** + * @see _.groupBy + */ + groupBy( + collection: List|Dictionary, + iteratee?: Object + ): Dictionary; + } + + interface LoDashImplicitWrapper { + /** + * @see _.groupBy + */ + groupBy( + iteratee?: ListIterator + ): LoDashImplicitObjectWrapper>; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.groupBy + */ + groupBy( + iteratee?: ListIterator + ): LoDashImplicitObjectWrapper>; + + /** + * @see _.groupBy + */ + groupBy( + iteratee?: string + ): LoDashImplicitObjectWrapper>; + + /** + * @see _.groupBy + */ + groupBy( + iteratee?: TWhere + ): LoDashImplicitObjectWrapper>; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.groupBy + */ + groupBy( + iteratee?: ListIterator|DictionaryIterator + ): LoDashImplicitObjectWrapper>; + + /** + * @see _.groupBy + */ + groupBy( + iteratee?: ListIterator|DictionaryIterator + ): LoDashImplicitObjectWrapper>; + + /** + * @see _.groupBy + */ + groupBy( + iteratee?: string + ): LoDashImplicitObjectWrapper>; + + /** + * @see _.groupBy + */ + groupBy( + iteratee?: string + ): LoDashImplicitObjectWrapper>; + + /** + * @see _.groupBy + */ + groupBy( + iteratee?: TWhere + ): LoDashImplicitObjectWrapper>; + + /** + * @see _.groupBy + */ + groupBy( + iteratee?: Object + ): LoDashImplicitObjectWrapper>; + } + + interface LoDashExplicitWrapper { + /** + * @see _.groupBy + */ + groupBy( + iteratee?: ListIterator + ): LoDashExplicitObjectWrapper>; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.groupBy + */ + groupBy( + iteratee?: ListIterator + ): LoDashExplicitObjectWrapper>; + + /** + * @see _.groupBy + */ + groupBy( + iteratee?: string + ): LoDashExplicitObjectWrapper>; + + /** + * @see _.groupBy + */ + groupBy( + iteratee?: TWhere + ): LoDashExplicitObjectWrapper>; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.groupBy + */ + groupBy( + iteratee?: ListIterator|DictionaryIterator + ): LoDashExplicitObjectWrapper>; + + /** + * @see _.groupBy + */ + groupBy( + iteratee?: ListIterator|DictionaryIterator + ): LoDashExplicitObjectWrapper>; + + /** + * @see _.groupBy + */ + groupBy( + iteratee?: string + ): LoDashExplicitObjectWrapper>; + + /** + * @see _.groupBy + */ + groupBy( + iteratee?: string + ): LoDashExplicitObjectWrapper>; + + /** + * @see _.groupBy + */ + groupBy( + iteratee?: TWhere + ): LoDashExplicitObjectWrapper>; + + /** + * @see _.groupBy + */ + groupBy( + iteratee?: Object + ): LoDashExplicitObjectWrapper>; + } + + //_.includes + interface LoDashStatic { + /** + * Checks if target is in collection using SameValueZero for equality comparisons. If fromIndex is negative, + * it’s used as the offset from the end of collection. + * + * @param collection The collection to search. + * @param target The value to search for. + * @param fromIndex The index to search from. + * @return True if the target element is found, else false. + */ + includes( + collection: List|Dictionary, + target: T, + fromIndex?: number + ): boolean; + + /** + * @see _.includes + */ + includes( + collection: string, + target: string, + fromIndex?: number + ): boolean; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.includes + */ + includes( + target: T, + fromIndex?: number + ): boolean; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.includes + */ + includes( + target: TValue, + fromIndex?: number + ): boolean; + } + + interface LoDashImplicitWrapper { + /** + * @see _.includes + */ + includes( + target: string, + fromIndex?: number + ): boolean; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.includes + */ + includes( + target: T, + fromIndex?: number + ): LoDashExplicitWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.includes + */ + includes( + target: TValue, + fromIndex?: number + ): LoDashExplicitWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.includes + */ + includes( + target: string, + fromIndex?: number + ): LoDashExplicitWrapper; + } + + //_.keyBy + interface LoDashStatic { + /** + * Creates an object composed of keys generated from the results of running each element of collection through + * iteratee. The corresponding value of each key is the last element responsible for generating the key. The + * iteratee function is bound to thisArg and invoked with three arguments: + * (value, index|key, collection). + * + * If a property name is provided for iteratee the created _.property style callback returns the property + * value of the given element. + * + * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for + * elements that have a matching property value, else false. + * + * If an object is provided for iteratee the created _.matches style callback returns true for elements that + * have the properties of the given object, else false. + * + * @param collection The collection to iterate over. + * @param iteratee The function invoked per iteration. + * @param thisArg The this binding of iteratee. + * @return Returns the composed aggregate object. + */ + keyBy( + collection: List, + iteratee?: ListIterator + ): Dictionary; + + /** + * @see _.keyBy + */ + keyBy( + collection: NumericDictionary, + iteratee?: NumericDictionaryIterator + ): Dictionary; + + /** + * @see _.keyBy + */ + keyBy( + collection: Dictionary, + iteratee?: DictionaryIterator + ): Dictionary; + + /** + * @see _.keyBy + */ + keyBy( + collection: List|NumericDictionary|Dictionary, + iteratee?: string + ): Dictionary; + + /** + * @see _.keyBy + */ + keyBy( + collection: List|NumericDictionary|Dictionary, + iteratee?: W + ): Dictionary; + + /** + * @see _.keyBy + */ + keyBy( + collection: List|NumericDictionary|Dictionary, + iteratee?: Object + ): Dictionary; + } + + interface LoDashImplicitWrapper { + /** + * @see _.keyBy + */ + keyBy( + iteratee?: ListIterator + ): LoDashImplicitObjectWrapper>; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.keyBy + */ + keyBy( + iteratee?: ListIterator + ): LoDashImplicitObjectWrapper>; + + /** + * @see _.keyBy + */ + keyBy( + iteratee?: string + ): LoDashImplicitObjectWrapper>; + + /** + * @see _.keyBy + */ + keyBy( + iteratee?: W + ): LoDashImplicitObjectWrapper>; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.keyBy + */ + keyBy( + iteratee?: ListIterator|NumericDictionaryIterator|DictionaryIterator + ): LoDashImplicitObjectWrapper>; + + /** + * @see _.keyBy + */ + keyBy( + iteratee?: string + ): LoDashImplicitObjectWrapper>; + + /** + * @see _.keyBy + */ + keyBy( + iteratee?: W + ): LoDashImplicitObjectWrapper>; + + /** + * @see _.keyBy + */ + keyBy( + iteratee?: Object + ): LoDashImplicitObjectWrapper>; + } + + interface LoDashExplicitWrapper { + /** + * @see _.keyBy + */ + keyBy( + iteratee?: ListIterator + ): LoDashExplicitObjectWrapper>; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.keyBy + */ + keyBy( + iteratee?: ListIterator + ): LoDashExplicitObjectWrapper>; + + /** + * @see _.keyBy + */ + keyBy( + iteratee?: string + ): LoDashExplicitObjectWrapper>; + + /** + * @see _.keyBy + */ + keyBy( + iteratee?: W + ): LoDashExplicitObjectWrapper>; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.keyBy + */ + keyBy( + iteratee?: ListIterator|NumericDictionaryIterator|DictionaryIterator + ): LoDashExplicitObjectWrapper>; + + /** + * @see _.keyBy + */ + keyBy( + iteratee?: string + ): LoDashExplicitObjectWrapper>; + + /** + * @see _.keyBy + */ + keyBy( + iteratee?: W + ): LoDashExplicitObjectWrapper>; + + /** + * @see _.keyBy + */ + keyBy( + iteratee?: Object + ): LoDashExplicitObjectWrapper>; + } + + //_.invoke + interface LoDashStatic { + /** + * Invokes the method at path of object. + * @param object The object to query. + * @param path The path of the method to invoke. + * @param args The arguments to invoke the method with. + **/ + invoke( + object: TObject, + path: StringRepresentable|StringRepresentable[], + ...args: any[]): TResult; + + /** + * @see _.invoke + **/ + invoke( + object: Dictionary|TValue[], + path: StringRepresentable|StringRepresentable[], + ...args: any[]): TResult; + + /** + * @see _.invoke + **/ + invoke( + object: any, + path: StringRepresentable|StringRepresentable[], + ...args: any[]): TResult; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.invoke + **/ + invoke( + path: StringRepresentable|StringRepresentable[], + ...args: any[]): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.invoke + **/ + invoke( + path: StringRepresentable|StringRepresentable[], + ...args: any[]): TResult; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.invoke + **/ + invoke( + path: StringRepresentable|StringRepresentable[], + ...args: any[]): TResult; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.invoke + **/ + invoke( + path: StringRepresentable|StringRepresentable[], + ...args: any[]): TResult; + } + + //_.invokeMap + interface LoDashStatic { + /** + * Invokes the method named by methodName on each element in the collection returning + * an array of the results of each invoked method. Additional arguments will be provided + * to each invoked method. If methodName is a function it will be invoked for, and this + * bound to, each element in the collection. + * @param collection The collection to iterate over. + * @param methodName The name of the method to invoke. + * @param args Arguments to invoke the method with. + **/ + invokeMap( + collection: TValue[], + methodName: string, + ...args: any[]): TResult[]; + + /** + * @see _.invokeMap + **/ + invokeMap( + collection: Dictionary, + methodName: string, + ...args: any[]): TResult[]; + + /** + * @see _.invokeMap + **/ + invokeMap( + collection: {}[], + methodName: string, + ...args: any[]): TResult[]; + + /** + * @see _.invokeMap + **/ + invokeMap( + collection: Dictionary<{}>, + methodName: string, + ...args: any[]): TResult[]; + + /** + * @see _.invokeMap + **/ + invokeMap( + collection: TValue[], + method: (...args: any[]) => TResult, + ...args: any[]): TResult[]; + + /** + * @see _.invokeMap + **/ + invokeMap( + collection: Dictionary, + method: (...args: any[]) => TResult, + ...args: any[]): TResult[]; + + /** + * @see _.invokeMap + **/ + invokeMap( + collection: {}[], + method: (...args: any[]) => TResult, + ...args: any[]): TResult[]; + + /** + * @see _.invokeMap + **/ + invokeMap( + collection: Dictionary<{}>, + method: (...args: any[]) => TResult, + ...args: any[]): TResult[]; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.invokeMap + **/ + invokeMap( + methodName: string, + ...args: any[]): LoDashImplicitArrayWrapper; + + /** + * @see _.invokeMap + **/ + invokeMap( + method: (...args: any[]) => TResult, + ...args: any[]): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.invokeMap + **/ + invokeMap( + methodName: string, + ...args: any[]): LoDashImplicitArrayWrapper; + + /** + * @see _.invokeMap + **/ + invokeMap( + method: (...args: any[]) => TResult, + ...args: any[]): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.invokeMap + **/ + invokeMap( + methodName: string, + ...args: any[]): LoDashExplicitArrayWrapper; + + /** + * @see _.invokeMap + **/ + invokeMap( + method: (...args: any[]) => TResult, + ...args: any[]): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.invokeMap + **/ + invokeMap( + methodName: string, + ...args: any[]): LoDashExplicitArrayWrapper; + + /** + * @see _.invokeMap + **/ + invokeMap( + method: (...args: any[]) => TResult, + ...args: any[]): LoDashExplicitArrayWrapper; + } + + //_.map + interface LoDashStatic { + /** + * Creates an array of values by running each element in collection through iteratee. The iteratee is bound to + * thisArg and invoked with three arguments: (value, index|key, collection). + * + * If a property name is provided for iteratee the created _.property style callback returns the property value + * of the given element. + * + * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for + * elements that have a matching property value, else false. + * + * If an object is provided for iteratee the created _.matches style callback returns true for elements that + * have the properties of the given object, else false. + * + * Many lodash methods are guarded to work as iteratees for methods like _.every, _.filter, _.map, _.mapValues, + * _.reject, and _.some. + * + * The guarded methods are: + * ary, callback, chunk, clone, create, curry, curryRight, drop, dropRight, every, fill, flatten, invert, max, + * min, parseInt, slice, sortBy, take, takeRight, template, trim, trimLeft, trimRight, trunc, random, range, + * sample, some, sum, uniq, and words + * + * @param collection The collection to iterate over. + * @param iteratee The function invoked per iteration. + * @param thisArg The this binding of iteratee. + * @return Returns the new mapped array. + */ + map( + collection: List, + iteratee?: ListIterator + ): TResult[]; + + /** + * @see _.map + */ + map( + collection: Dictionary, + iteratee?: DictionaryIterator + ): TResult[]; + + map( + collection: NumericDictionary, + iteratee?: NumericDictionaryIterator + ): TResult[]; + + /** + * @see _.map + */ + map( + collection: List|Dictionary|NumericDictionary, + iteratee?: string + ): TResult[]; + + /** + * @see _.map + */ + map( + collection: List|Dictionary|NumericDictionary, + iteratee?: TObject + ): boolean[]; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.map + */ + map( + iteratee?: ListIterator + ): LoDashImplicitArrayWrapper; + + /** + * @see _.map + */ + map( + iteratee?: string + ): LoDashImplicitArrayWrapper; + + /** + * @see _.map + */ + map( + iteratee?: TObject + ): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.map + */ + map( + iteratee?: ListIterator|DictionaryIterator + ): LoDashImplicitArrayWrapper; + + /** + * @see _.map + */ + map( + iteratee?: string + ): LoDashImplicitArrayWrapper; + + /** + * @see _.map + */ + map( + iteratee?: TObject + ): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.map + */ + map( + iteratee?: ListIterator + ): LoDashExplicitArrayWrapper; + + /** + * @see _.map + */ + map( + iteratee?: string + ): LoDashExplicitArrayWrapper; + + /** + * @see _.map + */ + map( + iteratee?: TObject + ): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.map + */ + map( + iteratee?: ListIterator|DictionaryIterator + ): LoDashExplicitArrayWrapper; + + /** + * @see _.map + */ + map( + iteratee?: string + ): LoDashExplicitArrayWrapper; + + /** + * @see _.map + */ + map( + iteratee?: TObject + ): LoDashExplicitArrayWrapper; + } + + //_.partition + interface LoDashStatic { + /** + * Creates an array of elements split into two groups, the first of which contains elements predicate returns truthy for, + * while the second of which contains elements predicate returns falsey for. + * The predicate is bound to thisArg and invoked with three arguments: (value, index|key, collection). + * + * If a property name is provided for predicate the created _.property style callback + * returns the property value of the given element. + * + * If a value is also provided for thisArg the created _.matchesProperty style callback + * returns true for elements that have a matching property value, else false. + * + * If an object is provided for predicate the created _.matches style callback returns + * true for elements that have the properties of the given object, else false. + * + * @param collection The collection to iterate over. + * @param callback The function called per iteration. + * @param thisArg The this binding of predicate. + * @return Returns the array of grouped elements. + **/ + partition( + collection: List, + callback: ListIterator): T[][]; + + /** + * @see _.partition + **/ + partition( + collection: Dictionary, + callback: DictionaryIterator): T[][]; + + /** + * @see _.partition + **/ + partition( + collection: List, + whereValue: W): T[][]; + + /** + * @see _.partition + **/ + partition( + collection: Dictionary, + whereValue: W): T[][]; + + /** + * @see _.partition + **/ + partition( + collection: List, + path: string, + srcValue: any): T[][]; + + /** + * @see _.partition + **/ + partition( + collection: Dictionary, + path: string, + srcValue: any): T[][]; + + /** + * @see _.partition + **/ + partition( + collection: List, + pluckValue: string): T[][]; + + /** + * @see _.partition + **/ + partition( + collection: Dictionary, + pluckValue: string): T[][]; + } + + interface LoDashImplicitStringWrapper { + /** + * @see _.partition + */ + partition( + callback: ListIterator): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.partition + */ + partition( + callback: ListIterator): LoDashImplicitArrayWrapper; + /** + * @see _.partition + */ + partition( + whereValue: W): LoDashImplicitArrayWrapper; + /** + * @see _.partition + */ + partition( + path: string, + srcValue: any): LoDashImplicitArrayWrapper; + /** + * @see _.partition + */ + partition( + pluckValue: string): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.partition + */ + partition( + callback: ListIterator): LoDashImplicitArrayWrapper; + + /** + * @see _.partition + */ + partition( + callback: DictionaryIterator): LoDashImplicitArrayWrapper; + + /** + * @see _.partition + */ + partition( + whereValue: W): LoDashImplicitArrayWrapper; + + /** + * @see _.partition + */ + partition( + path: string, + srcValue: any): LoDashImplicitArrayWrapper; + + /** + * @see _.partition + */ + partition( + pluckValue: string): LoDashImplicitArrayWrapper; + } + + //_.reduce + interface LoDashStatic { + /** + * Reduces a collection to a value which is the accumulated result of running each + * element in the collection through the callback, where each successive callback execution + * consumes the return value of the previous execution. If accumulator is not provided the + * first element of the collection will be used as the initial accumulator value. The callback + * is bound to thisArg and invoked with four arguments; (accumulator, value, index|key, collection). + * @param collection The collection to iterate over. + * @param callback The function called per iteration. + * @param accumulator Initial value of the accumulator. + * @param thisArg The this binding of callback. + * @return Returns the accumulated value. + **/ + reduce( + collection: Array, + callback: MemoIterator, + accumulator: TResult): TResult; + + /** + * @see _.reduce + **/ + reduce( + collection: List, + callback: MemoIterator, + accumulator: TResult): TResult; + + /** + * @see _.reduce + **/ + reduce( + collection: Dictionary, + callback: MemoIterator, + accumulator: TResult): TResult; + + /** + * @see _.reduce + **/ + reduce( + collection: NumericDictionary, + callback: MemoIterator, + accumulator: TResult): TResult; + + /** + * @see _.reduce + **/ + reduce( + collection: Array, + callback: MemoIterator): TResult; + + /** + * @see _.reduce + **/ + reduce( + collection: List, + callback: MemoIterator): TResult; + + /** + * @see _.reduce + **/ + reduce( + collection: Dictionary, + callback: MemoIterator): TResult; + + /** + * @see _.reduce + **/ + reduce( + collection: NumericDictionary, + callback: MemoIterator): TResult; + + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.reduce + **/ + reduce( + callback: MemoIterator, + accumulator: TResult): TResult; + + /** + * @see _.reduce + **/ + reduce( + callback: MemoIterator): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.reduce + **/ + reduce( + callback: MemoIterator, + accumulator: TResult): TResult; + + /** + * @see _.reduce + **/ + reduce( + callback: MemoIterator): TResult; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.reduce + **/ + reduce( + callback: MemoIterator, + accumulator: TResult): LoDashExplicitObjectWrapper; + + /** + * @see _.reduce + **/ + reduce( + callback: MemoIterator): LoDashExplicitObjectWrapper; + } + + interface LoDashExplicitArrayWrapper { + /**LoDashExplicitWrapper + * @see _.reduce + */ + reduce( + callback: MemoIterator, + accumulator: TResult): LoDashExplicitWrapper; + + /** + * @see _.reduce + */ + reduce( + callback: MemoIterator): LoDashExplicitWrapper; + } + + //_.reduceRight + interface LoDashStatic { + /** + * This method is like _.reduce except that it iterates over elements of a collection from + * right to left. + * @param collection The collection to iterate over. + * @param callback The function called per iteration. + * @param accumulator Initial value of the accumulator. + * @param thisArg The this binding of callback. + * @return The accumulated value. + **/ + reduceRight( + collection: Array, + callback: MemoIterator, + accumulator: TResult): TResult; + + /** + * @see _.reduceRight + **/ + reduceRight( + collection: List, + callback: MemoIterator, + accumulator: TResult): TResult; + + /** + * @see _.reduceRight + **/ + reduceRight( + collection: Dictionary, + callback: MemoIterator, + accumulator: TResult): TResult; + + /** + * @see _.reduceRight + **/ + reduceRight( + collection: Array, + callback: MemoIterator): TResult; + + /** + * @see _.reduceRight + **/ + reduceRight( + collection: List, + callback: MemoIterator): TResult; + + /** + * @see _.reduceRight + **/ + reduceRight( + collection: Dictionary, + callback: MemoIterator): TResult; + } + + //_.reject + interface LoDashStatic { + /** + * The opposite of _.filter; this method returns the elements of collection that predicate does not return + * truthy for. + * + * @param collection The collection to iterate over. + * @param predicate The function invoked per iteration. + * @param thisArg The this binding of predicate. + * @return Returns the new filtered array. + */ + reject( + collection: List, + predicate?: ListIterator + ): T[]; + + /** + * @see _.reject + */ + reject( + collection: Dictionary, + predicate?: DictionaryIterator + ): T[]; + + /** + * @see _.reject + */ + reject( + collection: string, + predicate?: StringIterator + ): string[]; + + /** + * @see _.reject + */ + reject( + collection: List|Dictionary, + predicate: string + ): T[]; + + /** + * @see _.reject + */ + reject( + collection: List|Dictionary, + predicate: W + ): T[]; + } + + interface LoDashImplicitWrapper { + /** + * @see _.reject + */ + reject( + predicate?: StringIterator + ): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.reject + */ + reject( + predicate: ListIterator + ): LoDashImplicitArrayWrapper; + + /** + * @see _.reject + */ + reject( + predicate: string + ): LoDashImplicitArrayWrapper; + + /** + * @see _.reject + */ + reject(predicate: W): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.reject + */ + reject( + predicate: ListIterator|DictionaryIterator + ): LoDashImplicitArrayWrapper; + + /** + * @see _.reject + */ + reject( + predicate: string + ): LoDashImplicitArrayWrapper; + + /** + * @see _.reject + */ + reject(predicate: W): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.reject + */ + reject( + predicate?: StringIterator + ): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.reject + */ + reject( + predicate: ListIterator + ): LoDashExplicitArrayWrapper; + + /** + * @see _.reject + */ + reject( + predicate: string + ): LoDashExplicitArrayWrapper; + + /** + * @see _.reject + */ + reject(predicate: W): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.reject + */ + reject( + predicate: ListIterator|DictionaryIterator + ): LoDashExplicitArrayWrapper; + + /** + * @see _.reject + */ + reject( + predicate: string + ): LoDashExplicitArrayWrapper; + + /** + * @see _.reject + */ + reject(predicate: W): LoDashExplicitArrayWrapper; + } + + //_.sample + interface LoDashStatic { + /** + * Gets a random element from collection. + * + * @param collection The collection to sample. + * @return Returns the random element. + */ + sample( + collection: List|Dictionary|NumericDictionary + ): T; + + /** + * @see _.sample + */ + sample( + collection: O + ): T; + + /** + * @see _.sample + */ + sample( + collection: Object + ): T; + } + + interface LoDashImplicitWrapper { + /** + * @see _.sample + */ + sample(): string; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.sample + */ + sample(): T; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.sample + */ + sample(): T; + } + + interface LoDashExplicitWrapper { + /** + * @see _.sample + */ + sample(): LoDashExplicitWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.sample + */ + sample(): TWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.sample + */ + sample(): TWrapper; + } + + //_.sampleSize + interface LoDashStatic { + /** + * Gets n random elements at unique keys from collection up to the size of collection. + * + * @param collection The collection to sample. + * @param n The number of elements to sample. + * @return Returns the random elements. + */ + sampleSize( + collection: List|Dictionary|NumericDictionary, + n?: number + ): T[]; + + /** + * @see _.sampleSize + */ + sampleSize( + collection: O, + n?: number + ): T[]; + + /** + * @see _.sampleSize + */ + sampleSize( + collection: Object, + n?: number + ): T[]; + } + + interface LoDashImplicitWrapper { + /** + * @see _.sampleSize + */ + sampleSize( + n?: number + ): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.sampleSize + */ + sampleSize( + n?: number + ): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.sampleSize + */ + sampleSize( + n?: number + ): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.sampleSize + */ + sampleSize( + n?: number + ): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.sampleSize + */ + sampleSize( + n?: number + ): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.sampleSize + */ + sampleSize( + n?: number + ): LoDashExplicitArrayWrapper; + } + + //_.shuffle + interface LoDashStatic { + /** + * Creates an array of shuffled values, using a version of the Fisher-Yates shuffle. + * + * @param collection The collection to shuffle. + * @return Returns the new shuffled array. + */ + shuffle(collection: List|Dictionary): T[]; + + /** + * @see _.shuffle + */ + shuffle(collection: string): string[]; + } + + interface LoDashImplicitWrapper { + /** + * @see _.shuffle + */ + shuffle(): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.shuffle + */ + shuffle(): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.shuffle + */ + shuffle(): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.shuffle + */ + shuffle(): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.shuffle + */ + shuffle(): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.shuffle + */ + shuffle(): LoDashExplicitArrayWrapper; + } + + //_.size + interface LoDashStatic { + /** + * Gets the size of collection by returning its length for array-like values or the number of own enumerable + * properties for objects. + * + * @param collection The collection to inspect. + * @return Returns the size of collection. + */ + size(collection: List|Dictionary): number; + + /** + * @see _.size + */ + size(collection: string): number; + } + + interface LoDashImplicitWrapper { + /** + * @see _.size + */ + size(): number; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.size + */ + size(): number; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.size + */ + size(): number; + } + + interface LoDashExplicitWrapper { + /** + * @see _.size + */ + size(): LoDashExplicitWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.size + */ + size(): LoDashExplicitWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.size + */ + size(): LoDashExplicitWrapper; + } + + //_.some + interface LoDashStatic { + /** + * Checks if predicate returns truthy for any element of collection. Iteration is stopped once predicate + * returns truthy. The predicate is invoked with three arguments: (value, index|key, collection). + * + * @param collection The collection to iterate over. + * @param predicate The function invoked per iteration. + * @return Returns true if any element passes the predicate check, else false. + */ + some( + collection: List, + predicate?: ListIterator + ): boolean; + + /** + * @see _.some + */ + some( + collection: Dictionary, + predicate?: DictionaryIterator + ): boolean; + + /** + * @see _.some + */ + some( + collection: NumericDictionary, + predicate?: NumericDictionaryIterator + ): boolean; + + /** + * @see _.some + */ + some( + collection: Object, + predicate?: ObjectIterator + ): boolean; + + /** + * @see _.some + */ + some( + collection: List|Dictionary|NumericDictionary, + predicate?: string|[string, any] + ): boolean; + + + /** + * @see _.some + */ + some( + collection: Object, + predicate?: string|[string, any] + ): boolean; + + /** + * @see _.some + */ + some( + collection: List|Dictionary|NumericDictionary, + predicate?: TObject + ): boolean; + + /** + * @see _.some + */ + some( + collection: List|Dictionary|NumericDictionary, + predicate?: Object + ): boolean; + + /** + * @see _.some + */ + some( + collection: Object, + predicate?: TObject + ): boolean; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.some + */ + some( + predicate?: ListIterator|NumericDictionaryIterator + ): boolean; + + /** + * @see _.some + */ + some( + predicate?: string|[string, any] + ): boolean; + + /** + * @see _.some + */ + some( + predicate?: TObject + ): boolean; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.some + */ + some( + predicate?: ListIterator|DictionaryIterator|NumericDictionaryIterator|ObjectIterator + ): boolean; + + /** + * @see _.some + */ + some( + predicate?: string|[string, any] + ): boolean; + + /** + * @see _.some + */ + some( + predicate?: TObject + ): boolean; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.some + */ + some( + predicate?: ListIterator|NumericDictionaryIterator + ): LoDashExplicitWrapper; + + /** + * @see _.some + */ + some( + predicate?: string|[string, any] + ): LoDashExplicitWrapper; + + /** + * @see _.some + */ + some( + predicate?: TObject + ): LoDashExplicitWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.some + */ + some( + predicate?: ListIterator|DictionaryIterator|NumericDictionaryIterator|ObjectIterator + ): LoDashExplicitWrapper; + + /** + * @see _.some + */ + some( + predicate?: string|[string, any] + ): LoDashExplicitWrapper; + + /** + * @see _.some + */ + some( + predicate?: TObject + ): LoDashExplicitWrapper; + } + + //_.sortBy + interface LoDashStatic { + /** + * Creates an array of elements, sorted in ascending order by the results of + * running each element in a collection through each iteratee. This method + * performs a stable sort, that is, it preserves the original sort order of + * equal elements. The iteratees are invoked with one argument: (value). + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {...(Function|Function[]|Object|Object[]|string|string[])} [iteratees=[_.identity]] + * The iteratees to sort by, specified individually or in arrays. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 42 }, + * { 'user': 'barney', 'age': 34 } + * ]; + * + * _.sortBy(users, function(o) { return o.user; }); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]] + * + * _.sortBy(users, ['user', 'age']); + * // => objects for [['barney', 34], ['barney', 36], ['fred', 42], ['fred', 48]] + * + * _.sortBy(users, 'user', function(o) { + * return Math.floor(o.age / 10); + * }); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]] + */ + sortBy( + collection: List, + iteratee?: ListIterator + ): T[]; + + /** + * @see _.sortBy + */ + sortBy( + collection: Dictionary, + iteratee?: DictionaryIterator + ): T[]; + + /** + * @see _.sortBy + */ + sortBy( + collection: List|Dictionary, + iteratee: string + ): T[]; + + /** + * @see _.sortBy + */ + sortBy( + collection: List|Dictionary, + whereValue: W + ): T[]; + + /** + * @see _.sortBy + */ + sortBy( + collection: List|Dictionary + ): T[]; + + /** + * @see _.sortBy + */ + sortBy( + collection: (Array|List), + iteratees: (ListIterator|string|Object)[]): T[]; + + /** + * @see _.sortBy + */ + sortBy( + collection: (Array|List), + ...iteratees: (ListIterator|Object|string)[]): T[]; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.sortBy + */ + sortBy( + iteratee?: ListIterator + ): LoDashImplicitArrayWrapper; + + /** + * @see _.sortBy + */ + sortBy(iteratee: string): LoDashImplicitArrayWrapper; + + /** + * @see _.sortBy + */ + sortBy(whereValue: W): LoDashImplicitArrayWrapper; + + /** + * @see _.sortBy + */ + sortBy(): LoDashImplicitArrayWrapper; + + /** + * @see _.sortBy + */ + sortBy(...iteratees: (ListIterator|Object|string)[]): LoDashImplicitArrayWrapper; + + /** + * @see _.sortBy + **/ + sortBy(iteratees: (ListIterator|string|Object)[]): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.sortBy + */ + sortBy( + iteratee?: ListIterator|DictionaryIterator + ): LoDashImplicitArrayWrapper; + + /** + * @see _.sortBy + */ + sortBy(iteratee: string): LoDashImplicitArrayWrapper; + + /** + * @see _.sortBy + */ + sortBy(whereValue: W): LoDashImplicitArrayWrapper; + + /** + * @see _.sortBy + */ + sortBy(): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.sortBy + */ + sortBy( + iteratee?: ListIterator + ): LoDashExplicitArrayWrapper; + + /** + * @see _.sortBy + */ + sortBy(iteratee: string): LoDashExplicitArrayWrapper; + + /** + * @see _.sortBy + */ + sortBy(whereValue: W): LoDashExplicitArrayWrapper; + + /** + * @see _.sortBy + */ + sortBy(): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.sortBy + */ + sortBy( + iteratee?: ListIterator|DictionaryIterator + ): LoDashExplicitArrayWrapper; + + /** + * @see _.sortBy + */ + sortBy(iteratee: string): LoDashExplicitArrayWrapper; + + /** + * @see _.sortBy + */ + sortBy(whereValue: W): LoDashExplicitArrayWrapper; + + /** + * @see _.sortBy + */ + sortBy(): LoDashExplicitArrayWrapper; + } + + //_.orderBy + interface LoDashStatic { + /** + * This method is like `_.sortBy` except that it allows specifying the sort + * orders of the iteratees to sort by. If `orders` is unspecified, all values + * are sorted in ascending order. Otherwise, specify an order of "desc" for + * descending or "asc" for ascending sort order of corresponding values. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function[]|Object[]|string[]} [iteratees=[_.identity]] The iteratees to sort by. + * @param {string[]} [orders] The sort orders of `iteratees`. + * @param- {Object} [guard] Enables use as an iteratee for functions like `_.reduce`. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 34 }, + * { 'user': 'fred', 'age': 42 }, + * { 'user': 'barney', 'age': 36 } + * ]; + * + * // sort by `user` in ascending order and by `age` in descending order + * _.orderBy(users, ['user', 'age'], ['asc', 'desc']); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]] + */ + orderBy( + collection: List, + iteratees: ListIterator|string|W|(ListIterator|string|W)[], + orders?: boolean|string|(boolean|string)[] + ): T[]; + + /** + * @see _.orderBy + */ + orderBy( + collection: List, + iteratees: ListIterator|string|Object|(ListIterator|string|Object)[], + orders?: boolean|string|(boolean|string)[] + ): T[]; + + /** + * @see _.orderBy + */ + orderBy( + collection: NumericDictionary, + iteratees: NumericDictionaryIterator|string|W|(NumericDictionaryIterator|string|W)[], + orders?: boolean|string|(boolean|string)[] + ): T[]; + + /** + * @see _.orderBy + */ + orderBy( + collection: NumericDictionary, + iteratees: NumericDictionaryIterator|string|Object|(NumericDictionaryIterator|string|Object)[], + orders?: boolean|string|(boolean|string)[] + ): T[]; + + /** + * @see _.orderBy + */ + orderBy( + collection: Dictionary, + iteratees: DictionaryIterator|string|W|(DictionaryIterator|string|W)[], + orders?: boolean|string|(boolean|string)[] + ): T[]; + + /** + * @see _.orderBy + */ + orderBy( + collection: Dictionary, + iteratees: DictionaryIterator|string|Object|(DictionaryIterator|string|Object)[], + orders?: boolean|string|(boolean|string)[] + ): T[]; + } + + interface LoDashImplicitWrapper { + /** + * @see _.orderBy + */ + orderBy( + iteratees: ListIterator|string|(ListIterator|string)[], + orders?: boolean|string|(boolean|string)[] + ): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.orderBy + */ + orderBy( + iteratees: ListIterator|string|W|(ListIterator|string|W)[], + orders?: boolean|string|(boolean|string)[] + ): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.orderBy + */ + orderBy( + iteratees: ListIterator|string|W|(ListIterator|string|W)[], + orders?: boolean|string|(boolean|string)[] + ): LoDashImplicitArrayWrapper; + + /** + * @see _.orderBy + */ + orderBy( + iteratees: ListIterator|string|Object|(ListIterator|string|Object)[], + orders?: boolean|string|(boolean|string)[] + ): LoDashImplicitArrayWrapper; + + /** + * @see _.orderBy + */ + orderBy( + iteratees: NumericDictionaryIterator|string|W|(NumericDictionaryIterator|string|W)[], + orders?: boolean|string|(boolean|string)[] + ): LoDashImplicitArrayWrapper; + + /** + * @see _.orderBy + */ + orderBy( + iteratees: NumericDictionaryIterator|string|Object|(NumericDictionaryIterator|string|Object)[], + orders?: boolean|string|(boolean|string)[] + ): LoDashImplicitArrayWrapper; + + /** + * @see _.orderBy + */ + orderBy( + iteratees: DictionaryIterator|string|W|(DictionaryIterator|string|W)[], + orders?: boolean|string|(boolean|string)[] + ): LoDashImplicitArrayWrapper; + + /** + * @see _.orderBy + */ + orderBy( + iteratees: DictionaryIterator|string|Object|(DictionaryIterator|string|Object)[], + orders?: boolean|string|(boolean|string)[] + ): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.orderBy + */ + orderBy( + iteratees: ListIterator|string|(ListIterator|string)[], + orders?: boolean|string|(boolean|string)[] + ): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.orderBy + */ + orderBy( + iteratees: ListIterator|string|W|(ListIterator|string|W)[], + orders?: boolean|string|(boolean|string)[] + ): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.orderBy + */ + orderBy( + iteratees: ListIterator|string|W|(ListIterator|string|W)[], + orders?: boolean|string|(boolean|string)[] + ): LoDashExplicitArrayWrapper; + + /** + * @see _.orderBy + */ + orderBy( + iteratees: ListIterator|string|Object|(ListIterator|string|Object)[], + orders?: boolean|string|(boolean|string)[] + ): LoDashExplicitArrayWrapper; + + /** + * @see _.orderBy + */ + orderBy( + iteratees: NumericDictionaryIterator|string|W|(NumericDictionaryIterator|string|W)[], + orders?: boolean|string|(boolean|string)[] + ): LoDashExplicitArrayWrapper; + + /** + * @see _.orderBy + */ + orderBy( + iteratees: NumericDictionaryIterator|string|Object|(NumericDictionaryIterator|string|Object)[], + orders?: boolean|string|(boolean|string)[] + ): LoDashExplicitArrayWrapper; + + /** + * @see _.orderBy + */ + orderBy( + iteratees: DictionaryIterator|string|W|(DictionaryIterator|string|W)[], + orders?: boolean|string|(boolean|string)[] + ): LoDashExplicitArrayWrapper; + + /** + * @see _.orderBy + */ + orderBy( + iteratees: DictionaryIterator|string|Object|(DictionaryIterator|string|Object)[], + orders?: boolean|string|(boolean|string)[] + ): LoDashExplicitArrayWrapper; + } + + /******** + * Date * + ********/ + + //_.now + interface LoDashStatic { + /** + * Gets the number of milliseconds that have elapsed since the Unix epoch (1 January 1970 00:00:00 UTC). + * + * @return The number of milliseconds. + */ + now(): number; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.now + */ + now(): number; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.now + */ + now(): LoDashExplicitWrapper; + } + + /************* + * Functions * + *************/ + + //_.after + interface LoDashStatic { + /** + * The opposite of _.before; this method creates a function that invokes func once it’s called n or more times. + * + * @param n The number of calls before func is invoked. + * @param func The function to restrict. + * @return Returns the new restricted function. + */ + after( + n: number, + func: TFunc + ): TFunc; + } + + interface LoDashImplicitWrapper { + /** + * @see _.after + **/ + after(func: TFunc): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.after + **/ + after(func: TFunc): LoDashExplicitObjectWrapper; + } + + //_.ary + interface LoDashStatic { + /** + * Creates a function that accepts up to n arguments ignoring any additional arguments. + * + * @param func The function to cap arguments for. + * @param n The arity cap. + * @returns Returns the new function. + */ + ary( + func: Function, + n?: number + ): TResult; + + ary( + func: T, + n?: number + ): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.ary + */ + ary(n?: number): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.ary + */ + ary(n?: number): LoDashExplicitObjectWrapper; + } + + //_.before + interface LoDashStatic { + /** + * Creates a function that invokes func, with the this binding and arguments of the created function, while + * it’s called less than n times. Subsequent calls to the created function return the result of the last func + * invocation. + * + * @param n The number of calls at which func is no longer invoked. + * @param func The function to restrict. + * @return Returns the new restricted function. + */ + before( + n: number, + func: TFunc + ): TFunc; + } + + interface LoDashImplicitWrapper { + /** + * @see _.before + **/ + before(func: TFunc): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.before + **/ + before(func: TFunc): LoDashExplicitObjectWrapper; + } + + //_.bind + interface FunctionBind { + placeholder: any; + + ( + func: T, + thisArg: any, + ...partials: any[] + ): TResult; + + ( + func: Function, + thisArg: any, + ...partials: any[] + ): TResult; + } + + interface LoDashStatic { + /** + * Creates a function that invokes func with the this binding of thisArg and prepends any additional _.bind + * arguments to those provided to the bound function. + * + * The _.bind.placeholder value, which defaults to _ in monolithic builds, may be used as a placeholder for + * partially applied arguments. + * + * Note: Unlike native Function#bind this method does not set the "length" property of bound functions. + * + * @param func The function to bind. + * @param thisArg The this binding of func. + * @param partials The arguments to be partially applied. + * @return Returns the new bound function. + */ + bind: FunctionBind; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.bind + */ + bind( + thisArg: any, + ...partials: any[] + ): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.bind + */ + bind( + thisArg: any, + ...partials: any[] + ): LoDashExplicitObjectWrapper; + } + + //_.bindAll + interface LoDashStatic { + /** + * Binds methods of an object to the object itself, overwriting the existing method. Method names may be + * specified as individual arguments or as arrays of method names. If no method names are provided all + * enumerable function properties, own and inherited, of object are bound. + * + * Note: This method does not set the "length" property of bound functions. + * + * @param object The object to bind and assign the bound methods to. + * @param methodNames The object method names to bind, specified as individual method names or arrays of + * method names. + * @return Returns object. + */ + bindAll( + object: T, + ...methodNames: (string|string[])[] + ): T; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.bindAll + */ + bindAll(...methodNames: (string|string[])[]): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.bindAll + */ + bindAll(...methodNames: (string|string[])[]): LoDashExplicitObjectWrapper; + } + + //_.bindKey + interface FunctionBindKey { + placeholder: any; + + ( + object: T, + key: any, + ...partials: any[] + ): TResult; + + ( + object: Object, + key: any, + ...partials: any[] + ): TResult; + } + + interface LoDashStatic { + /** + * Creates a function that invokes the method at object[key] and prepends any additional _.bindKey arguments + * to those provided to the bound function. + * + * This method differs from _.bind by allowing bound functions to reference methods that may be redefined + * or don’t yet exist. See Peter Michaux’s article for more details. + * + * The _.bindKey.placeholder value, which defaults to _ in monolithic builds, may be used as a placeholder + * for partially applied arguments. + * + * @param object The object the method belongs to. + * @param key The key of the method. + * @param partials The arguments to be partially applied. + * @return Returns the new bound function. + */ + bindKey: FunctionBindKey; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.bindKey + */ + bindKey( + key: any, + ...partials: any[] + ): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.bindKey + */ + bindKey( + key: any, + ...partials: any[] + ): LoDashExplicitObjectWrapper; + } + + //_.createCallback + interface LoDashStatic { + /** + * Produces a callback bound to an optional thisArg. If func is a property name the created + * callback will return the property value for a given element. If func is an object the created + * callback will return true for elements that contain the equivalent object properties, + * otherwise it will return false. + * @param func The value to convert to a callback. + * @param thisArg The this binding of the created callback. + * @param argCount The number of arguments the callback accepts. + * @return A callback function. + **/ + createCallback( + func: string, + argCount?: number): () => any; + + /** + * @see _.createCallback + **/ + createCallback( + func: Dictionary, + argCount?: number): () => boolean; + } + + interface LoDashImplicitWrapper { + /** + * @see _.createCallback + **/ + createCallback( + argCount?: number): LoDashImplicitObjectWrapper<() => any>; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.createCallback + **/ + createCallback( + argCount?: number): LoDashImplicitObjectWrapper<() => any>; + } + + //_.curry + interface LoDashStatic { + /** + * Creates a function that accepts one or more arguments of func that when called either invokes func returning + * its result, if all func arguments have been provided, or returns a function that accepts one or more of the + * remaining func arguments, and so on. The arity of func may be specified if func.length is not sufficient. + * @param func The function to curry. + * @return Returns the new curried function. + */ + curry(func: (t1: T1) => R): + CurriedFunction1; + /** + * Creates a function that accepts one or more arguments of func that when called either invokes func returning + * its result, if all func arguments have been provided, or returns a function that accepts one or more of the + * remaining func arguments, and so on. The arity of func may be specified if func.length is not sufficient. + * @param func The function to curry. + * @return Returns the new curried function. + */ + curry(func: (t1: T1, t2: T2) => R): + CurriedFunction2; + /** + * Creates a function that accepts one or more arguments of func that when called either invokes func returning + * its result, if all func arguments have been provided, or returns a function that accepts one or more of the + * remaining func arguments, and so on. The arity of func may be specified if func.length is not sufficient. + * @param func The function to curry. + * @return Returns the new curried function. + */ + curry(func: (t1: T1, t2: T2, t3: T3) => R): + CurriedFunction3; + /** + * Creates a function that accepts one or more arguments of func that when called either invokes func returning + * its result, if all func arguments have been provided, or returns a function that accepts one or more of the + * remaining func arguments, and so on. The arity of func may be specified if func.length is not sufficient. + * @param func The function to curry. + * @return Returns the new curried function. + */ + curry(func: (t1: T1, t2: T2, t3: T3, t4: T4) => R): + CurriedFunction4; + /** + * Creates a function that accepts one or more arguments of func that when called either invokes func returning + * its result, if all func arguments have been provided, or returns a function that accepts one or more of the + * remaining func arguments, and so on. The arity of func may be specified if func.length is not sufficient. + * @param func The function to curry. + * @return Returns the new curried function. + */ + curry(func: (t1: T1, t2: T2, t3: T3, t4: T4, t5: T5) => R): + CurriedFunction5; + /** + * Creates a function that accepts one or more arguments of func that when called either invokes func returning + * its result, if all func arguments have been provided, or returns a function that accepts one or more of the + * remaining func arguments, and so on. The arity of func may be specified if func.length is not sufficient. + * @param func The function to curry. + * @param arity The arity of func. + * @return Returns the new curried function. + */ + curry( + func: Function, + arity?: number): TResult; + } + + interface CurriedFunction1 { + (): CurriedFunction1; + (t1: T1): R; + } + + interface CurriedFunction2 { + (): CurriedFunction2; + (t1: T1): CurriedFunction1; + (t1: T1, t2: T2): R; + } + + interface CurriedFunction3 { + (): CurriedFunction3; + (t1: T1): CurriedFunction2; + (t1: T1, t2: T2): CurriedFunction1; + (t1: T1, t2: T2, t3: T3): R; + } + + interface CurriedFunction4 { + (): CurriedFunction4; + (t1: T1): CurriedFunction3; + (t1: T1, t2: T2): CurriedFunction2; + (t1: T1, t2: T2, t3: T3): CurriedFunction1; + (t1: T1, t2: T2, t3: T3, t4: T4): R; + } + + interface CurriedFunction5 { + (): CurriedFunction5; + (t1: T1): CurriedFunction4; + (t1: T1, t2: T2): CurriedFunction3; + (t1: T1, t2: T2, t3: T3): CurriedFunction2; + (t1: T1, t2: T2, t3: T3, t4: T4): CurriedFunction1; + (t1: T1, t2: T2, t3: T3, t4: T4, t5: T5): R; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.curry + **/ + curry(arity?: number): LoDashImplicitObjectWrapper; + } + + //_.curryRight + interface LoDashStatic { + /** + * This method is like _.curry except that arguments are applied to func in the manner of _.partialRight + * instead of _.partial. + * @param func The function to curry. + * @return Returns the new curried function. + */ + curryRight(func: (t1: T1) => R): + CurriedFunction1; + /** + * This method is like _.curry except that arguments are applied to func in the manner of _.partialRight + * instead of _.partial. + * @param func The function to curry. + * @return Returns the new curried function. + */ + curryRight(func: (t1: T1, t2: T2) => R): + CurriedFunction2; + /** + * This method is like _.curry except that arguments are applied to func in the manner of _.partialRight + * instead of _.partial. + * @param func The function to curry. + * @return Returns the new curried function. + */ + curryRight(func: (t1: T1, t2: T2, t3: T3) => R): + CurriedFunction3; + /** + * This method is like _.curry except that arguments are applied to func in the manner of _.partialRight + * instead of _.partial. + * @param func The function to curry. + * @return Returns the new curried function. + */ + curryRight(func: (t1: T1, t2: T2, t3: T3, t4: T4) => R): + CurriedFunction4; + /** + * This method is like _.curry except that arguments are applied to func in the manner of _.partialRight + * instead of _.partial. + * @param func The function to curry. + * @return Returns the new curried function. + */ + curryRight(func: (t1: T1, t2: T2, t3: T3, t4: T4, t5: T5) => R): + CurriedFunction5; + /** + * This method is like _.curry except that arguments are applied to func in the manner of _.partialRight + * instead of _.partial. + * @param func The function to curry. + * @param arity The arity of func. + * @return Returns the new curried function. + */ + curryRight( + func: Function, + arity?: number): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.curryRight + **/ + curryRight(arity?: number): LoDashImplicitObjectWrapper; + } + + //_.debounce + interface DebounceSettings { + /** + * Specify invoking on the leading edge of the timeout. + */ + leading?: boolean; + + /** + * The maximum time func is allowed to be delayed before it’s invoked. + */ + maxWait?: number; + + /** + * Specify invoking on the trailing edge of the timeout. + */ + trailing?: boolean; + } + + interface LoDashStatic { + /** + * Creates a debounced function that delays invoking func until after wait milliseconds have elapsed since + * the last time the debounced function was invoked. The debounced function comes with a cancel method to + * cancel delayed invocations and a flush method to immediately invoke them. Provide an options object to + * indicate that func should be invoked on the leading and/or trailing edge of the wait timeout. Subsequent + * calls to the debounced function return the result of the last func invocation. + * + * Note: If leading and trailing options are true, func is invoked on the trailing edge of the timeout only + * if the the debounced function is invoked more than once during the wait timeout. + * + * See David Corbacho’s article for details over the differences between _.debounce and _.throttle. + * + * @param func The function to debounce. + * @param wait The number of milliseconds to delay. + * @param options The options object. + * @param options.leading Specify invoking on the leading edge of the timeout. + * @param options.maxWait The maximum time func is allowed to be delayed before it’s invoked. + * @param options.trailing Specify invoking on the trailing edge of the timeout. + * @return Returns the new debounced function. + */ + debounce( + func: T, + wait?: number, + options?: DebounceSettings + ): T & Cancelable; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.debounce + */ + debounce( + wait?: number, + options?: DebounceSettings + ): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.debounce + */ + debounce( + wait?: number, + options?: DebounceSettings + ): LoDashExplicitObjectWrapper; + } + + //_.defer + interface LoDashStatic { + /** + * Defers invoking the func until the current call stack has cleared. Any additional arguments are provided to + * func when it’s invoked. + * + * @param func The function to defer. + * @param args The arguments to invoke the function with. + * @return Returns the timer id. + */ + defer( + func: T, + ...args: any[] + ): number; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.defer + */ + defer(...args: any[]): LoDashImplicitWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.defer + */ + defer(...args: any[]): LoDashExplicitWrapper; + } + + //_.delay + interface LoDashStatic { + /** + * Invokes func after wait milliseconds. Any additional arguments are provided to func when it’s invoked. + * + * @param func The function to delay. + * @param wait The number of milliseconds to delay invocation. + * @param args The arguments to invoke the function with. + * @return Returns the timer id. + */ + delay( + func: T, + wait: number, + ...args: any[] + ): number; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.delay + */ + delay( + wait: number, + ...args: any[] + ): LoDashImplicitWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.delay + */ + delay( + wait: number, + ...args: any[] + ): LoDashExplicitWrapper; + } + + interface LoDashStatic { + /** + * Creates a function that invokes `func` with arguments reversed. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to flip arguments for. + * @returns {Function} Returns the new function. + * @example + * + * var flipped = _.flip(function() { + * return _.toArray(arguments); + * }); + * + * flipped('a', 'b', 'c', 'd'); + * // => ['d', 'c', 'b', 'a'] + */ + flip(func: T): T; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.flip + */ + flip(): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.flip + */ + flip(): LoDashExplicitObjectWrapper; + } + + //_.flow + interface LoDashStatic { + /** + * Creates a function that returns the result of invoking the provided functions with the this binding of the + * created function, where each successive invocation is supplied the return value of the previous. + * + * @param funcs Functions to invoke. + * @return Returns the new function. + */ + // 1-argument first function + flow(f1: (a1: A1) => R1, f2: (a: R1) => R2): (a1: A1) => R2; + flow(f1: (a1: A1) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3): (a1: A1) => R3; + flow(f1: (a1: A1) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4): (a1: A1) => R4; + flow(f1: (a1: A1) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5): (a1: A1) => R5; + flow(f1: (a1: A1) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6): (a1: A1) => R6; + flow(f1: (a1: A1) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6, f7: (a: R6) => R7): (a1: A1) => R7; + // 2-argument first function + flow(f1: (a1: A1, a2: A2) => R1, f2: (a: R1) => R2): (a1: A1, a2: A2) => R2; + flow(f1: (a1: A1, a2: A2) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3): (a1: A1, a2: A2) => R3; + flow(f1: (a1: A1, a2: A2) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4): (a1: A1, a2: A2) => R4; + flow(f1: (a1: A1, a2: A2) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5): (a1: A1, a2: A2) => R5; + flow(f1: (a1: A1, a2: A2) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6): (a1: A1, a2: A2) => R6; + flow(f1: (a1: A1, a2: A2) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6, f7: (a: R6) => R7): (a1: A1, a2: A2) => R7; + // 3-argument first function + flow(f1: (a1: A1, a2: A2, a3: A3) => R1, f2: (a: R1) => R2): (a1: A1, a2: A2, a3: A3) => R2; + flow(f1: (a1: A1, a2: A2, a3: A3) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3): (a1: A1, a2: A2, a3: A3) => R3; + flow(f1: (a1: A1, a2: A2, a3: A3) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4): (a1: A1, a2: A2, a3: A3) => R4; + flow(f1: (a1: A1, a2: A2, a3: A3) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5): (a1: A1, a2: A2, a3: A3) => R5; + flow(f1: (a1: A1, a2: A2, a3: A3) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6): (a1: A1, a2: A2, a3: A3) => R6; + flow(f1: (a1: A1, a2: A2, a3: A3) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6, f7: (a: R6) => R7): (a1: A1, a2: A2, a3: A3) => R7; + // 4-argument first function + flow(f1: (a1: A1, a2: A2, a3: A3, a4: A4) => R1, f2: (a: R1) => R2): (a1: A1, a2: A2, a3: A3, a4: A4) => R2; + flow(f1: (a1: A1, a2: A2, a3: A3, a4: A4) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3): (a1: A1, a2: A2, a3: A3, a4: A4) => R3; + flow(f1: (a1: A1, a2: A2, a3: A3, a4: A4) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4): (a1: A1, a2: A2, a3: A3, a4: A4) => R4; + flow(f1: (a1: A1, a2: A2, a3: A3, a4: A4) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5): (a1: A1, a2: A2, a3: A3, a4: A4) => R5; + flow(f1: (a1: A1, a2: A2, a3: A3, a4: A4) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6): (a1: A1, a2: A2, a3: A3, a4: A4) => R6; + flow(f1: (a1: A1, a2: A2, a3: A3, a4: A4) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6, f7: (a: R6) => R7): (a1: A1, a2: A2, a3: A3, a4: A4) => R7; + // generic function + flow(...funcs: Function[]): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.flow + */ + flow(...funcs: Function[]): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.flow + */ + flow(...funcs: Function[]): LoDashExplicitObjectWrapper; + } + + //_.flowRight + interface LoDashStatic { + /** + * This method is like _.flow except that it creates a function that invokes the provided functions from right + * to left. + * + * @param funcs Functions to invoke. + * @return Returns the new function. + */ + flowRight(...funcs: Function[]): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.flowRight + */ + flowRight(...funcs: Function[]): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.flowRight + */ + flowRight(...funcs: Function[]): LoDashExplicitObjectWrapper; + } + + + //_.memoize + interface MemoizedFunction extends Function { + cache: MapCache; + } + + interface LoDashStatic { + /** + * Creates a function that memoizes the result of func. If resolver is provided it determines the cache key for + * storing the result based on the arguments provided to the memoized function. By default, the first argument + * provided to the memoized function is coerced to a string and used as the cache key. The func is invoked with + * the this binding of the memoized function. + * + * @param func The function to have its output memoized. + * @param resolver The function to resolve the cache key. + * @return Returns the new memoizing function. + */ + memoize: { + (func: T, resolver?: Function): T & MemoizedFunction; + Cache: MapCacheConstructor; + } + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.memoize + */ + memoize(resolver?: Function): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.memoize + */ + memoize(resolver?: Function): LoDashExplicitObjectWrapper; + } + + //_.overArgs (was _.modArgs) + interface LoDashStatic { + /** + * Creates a function that runs each argument through a corresponding transform function. + * + * @param func The function to wrap. + * @param transforms The functions to transform arguments, specified as individual functions or arrays + * of functions. + * @return Returns the new function. + */ + overArgs( + func: T, + ...transforms: Function[] + ): TResult; + + /** + * @see _.overArgs + */ + overArgs( + func: T, + transforms: Function[] + ): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.overArgs + */ + overArgs(...transforms: Function[]): LoDashImplicitObjectWrapper; + + /** + * @see _.overArgs + */ + overArgs(transforms: Function[]): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.overArgs + */ + overArgs(...transforms: Function[]): LoDashExplicitObjectWrapper; + + /** + * @see _.overArgs + */ + overArgs(transforms: Function[]): LoDashExplicitObjectWrapper; + } + + //_.negate + interface LoDashStatic { + /** + * Creates a function that negates the result of the predicate func. The func predicate is invoked with + * the this binding and arguments of the created function. + * + * @param predicate The predicate to negate. + * @return Returns the new function. + */ + negate(predicate: T): (...args: any[]) => boolean; + + /** + * @see _.negate + */ + negate(predicate: T): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.negate + */ + negate(): LoDashImplicitObjectWrapper<(...args: any[]) => boolean>; + + /** + * @see _.negate + */ + negate(): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.negate + */ + negate(): LoDashExplicitObjectWrapper<(...args: any[]) => boolean>; + + /** + * @see _.negate + */ + negate(): LoDashExplicitObjectWrapper; + } + + //_.once + interface LoDashStatic { + /** + * Creates a function that is restricted to invoking func once. Repeat calls to the function return the value + * of the first call. The func is invoked with the this binding and arguments of the created function. + * + * @param func The function to restrict. + * @return Returns the new restricted function. + */ + once(func: T): T; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.once + */ + once(): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.once + */ + once(): LoDashExplicitObjectWrapper; + } + + //_.partial + interface LoDashStatic { + /** + * Creates a function that, when called, invokes func with any additional partial arguments + * prepended to those provided to the new function. This method is similar to _.bind except + * it does not alter the this binding. + * @param func The function to partially apply arguments to. + * @param args Arguments to be partially applied. + * @return The new partially applied function. + **/ + partial: Partial; + } + + type PH = LoDashStatic; + + interface Function0 { + (): R; + } + interface Function1 { + (t1: T1): R; + } + interface Function2 { + (t1: T1, t2: T2): R; + } + interface Function3 { + (t1: T1, t2: T2, t3: T3): R; + } + interface Function4 { + (t1: T1, t2: T2, t3: T3, t4: T4): R; + } + + interface Partial { + // arity 0 + (func: Function0): Function0; + // arity 1 + (func: Function1): Function1; + (func: Function1, arg1: T1): Function0; + // arity 2 + (func: Function2): Function2; + (func: Function2, arg1: T1): Function1< T2, R>; + (func: Function2, plc1: PH, arg2: T2): Function1; + (func: Function2, arg1: T1, arg2: T2): Function0< R>; + // arity 3 + (func: Function3): Function3; + (func: Function3, arg1: T1): Function2< T2, T3, R>; + (func: Function3, plc1: PH, arg2: T2): Function2; + (func: Function3, arg1: T1, arg2: T2): Function1< T3, R>; + (func: Function3, plc1: PH, plc2: PH, arg3: T3): Function2; + (func: Function3, arg1: T1, plc2: PH, arg3: T3): Function1< T2, R>; + (func: Function3, plc1: PH, arg2: T2, arg3: T3): Function1; + (func: Function3, arg1: T1, arg2: T2, arg3: T3): Function0< R>; + // arity 4 + (func: Function4): Function4; + (func: Function4, arg1: T1): Function3< T2, T3, T4, R>; + (func: Function4, plc1: PH, arg2: T2): Function3; + (func: Function4, arg1: T1, arg2: T2): Function2< T3, T4, R>; + (func: Function4, plc1: PH, plc2: PH, arg3: T3): Function3; + (func: Function4, arg1: T1, plc2: PH, arg3: T3): Function2< T2, T4, R>; + (func: Function4, plc1: PH, arg2: T2, arg3: T3): Function2; + (func: Function4, arg1: T1, arg2: T2, arg3: T3): Function1< T4, R>; + (func: Function4, plc1: PH, plc2: PH, plc3: PH, arg4: T4): Function3; + (func: Function4, arg1: T1, plc2: PH, plc3: PH, arg4: T4): Function2< T2, T3, R>; + (func: Function4, plc1: PH, arg2: T2, plc3: PH, arg4: T4): Function2; + (func: Function4, arg1: T1, arg2: T2, plc3: PH, arg4: T4): Function1< T3, R>; + (func: Function4, plc1: PH, plc2: PH, arg3: T3, arg4: T4): Function2; + (func: Function4, arg1: T1, plc2: PH, arg3: T3, arg4: T4): Function1< T2, R>; + (func: Function4, plc1: PH, arg2: T2, arg3: T3, arg4: T4): Function1; + (func: Function4, arg1: T1, arg2: T2, arg3: T3, arg4: T4): Function0< R>; + // catch-all + (func: Function, ...args: any[]): Function; + } + + //_.partialRight + interface LoDashStatic { + /** + * This method is like _.partial except that partial arguments are appended to those provided + * to the new function. + * @param func The function to partially apply arguments to. + * @param args Arguments to be partially applied. + * @return The new partially applied function. + **/ + partialRight: PartialRight + } + + interface PartialRight { + // arity 0 + (func: Function0): Function0; + // arity 1 + (func: Function1): Function1; + (func: Function1, arg1: T1): Function0; + // arity 2 + (func: Function2): Function2; + (func: Function2, arg1: T1, plc2: PH): Function1< T2, R>; + (func: Function2, arg2: T2): Function1; + (func: Function2, arg1: T1, arg2: T2): Function0< R>; + // arity 3 + (func: Function3): Function3; + (func: Function3, arg1: T1, plc2: PH, plc3: PH): Function2< T2, T3, R>; + (func: Function3, arg2: T2, plc3: PH): Function2; + (func: Function3, arg1: T1, arg2: T2, plc3: PH): Function1< T3, R>; + (func: Function3, arg3: T3): Function2; + (func: Function3, arg1: T1, plc2: PH, arg3: T3): Function1< T2, R>; + (func: Function3, arg2: T2, arg3: T3): Function1; + (func: Function3, arg1: T1, arg2: T2, arg3: T3): Function0< R>; + // arity 4 + (func: Function4): Function4; + (func: Function4, arg1: T1, plc2: PH, plc3: PH, plc4: PH): Function3< T2, T3, T4, R>; + (func: Function4, arg2: T2, plc3: PH, plc4: PH): Function3; + (func: Function4, arg1: T1, arg2: T2, plc3: PH, plc4: PH): Function2< T3, T4, R>; + (func: Function4, arg3: T3, plc4: PH): Function3; + (func: Function4, arg1: T1, plc2: PH, arg3: T3, plc4: PH): Function2< T2, T4, R>; + (func: Function4, arg2: T2, arg3: T3, plc4: PH): Function2; + (func: Function4, arg1: T1, arg2: T2, arg3: T3, plc4: PH): Function1< T4, R>; + (func: Function4, arg4: T4): Function3; + (func: Function4, arg1: T1, plc2: PH, plc3: PH, arg4: T4): Function2< T2, T3, R>; + (func: Function4, arg2: T2, plc3: PH, arg4: T4): Function2; + (func: Function4, arg1: T1, arg2: T2, plc3: PH, arg4: T4): Function1< T3, R>; + (func: Function4, arg3: T3, arg4: T4): Function2; + (func: Function4, arg1: T1, plc2: PH, arg3: T3, arg4: T4): Function1< T2, R>; + (func: Function4, arg2: T2, arg3: T3, arg4: T4): Function1; + (func: Function4, arg1: T1, arg2: T2, arg3: T3, arg4: T4): Function0< R>; + // catch-all + (func: Function, ...args: any[]): Function; + } + + //_.rearg + interface LoDashStatic { + /** + * Creates a function that invokes func with arguments arranged according to the specified indexes where the + * argument value at the first index is provided as the first argument, the argument value at the second index + * is provided as the second argument, and so on. + * @param func The function to rearrange arguments for. + * @param indexes The arranged argument indexes, specified as individual indexes or arrays of indexes. + * @return Returns the new function. + */ + rearg(func: Function, indexes: number[]): TResult; + + /** + * @see _.rearg + */ + rearg(func: Function, ...indexes: number[]): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.rearg + */ + rearg(indexes: number[]): LoDashImplicitObjectWrapper; + + /** + * @see _.rearg + */ + rearg(...indexes: number[]): LoDashImplicitObjectWrapper; + } + + //_.rest + interface LoDashStatic { + /** + * Creates a function that invokes func with the this binding of the created function and arguments from start + * and beyond provided as an array. + * + * Note: This method is based on the rest parameter. + * + * @param func The function to apply a rest parameter to. + * @param start The start position of the rest parameter. + * @return Returns the new function. + */ + rest( + func: Function, + start?: number + ): TResult; + + /** + * @see _.rest + */ + rest( + func: TFunc, + start?: number + ): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.rest + */ + rest(start?: number): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.rest + */ + rest(start?: number): LoDashExplicitObjectWrapper; + } + + //_.spread + interface LoDashStatic { + /** + * Creates a function that invokes func with the this binding of the created function and an array of arguments + * much like Function#apply. + * + * Note: This method is based on the spread operator. + * + * @param func The function to spread arguments over. + * @return Returns the new function. + */ + spread(func: F): T; + + /** + * @see _.spread + */ + spread(func: Function): T; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.spread + */ + spread(): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.spread + */ + spread(): LoDashExplicitObjectWrapper; + } + + //_.throttle + interface ThrottleSettings { + /** + * If you'd like to disable the leading-edge call, pass this as false. + */ + leading?: boolean; + + /** + * If you'd like to disable the execution on the trailing-edge, pass false. + */ + trailing?: boolean; + } + + interface LoDashStatic { + /** + * Creates a throttled function that only invokes func at most once per every wait milliseconds. The throttled + * function comes with a cancel method to cancel delayed invocations and a flush method to immediately invoke + * them. Provide an options object to indicate that func should be invoked on the leading and/or trailing edge + * of the wait timeout. Subsequent calls to the throttled function return the result of the last func call. + * + * Note: If leading and trailing options are true, func is invoked on the trailing edge of the timeout only if + * the the throttled function is invoked more than once during the wait timeout. + * + * @param func The function to throttle. + * @param wait The number of milliseconds to throttle invocations to. + * @param options The options object. + * @param options.leading Specify invoking on the leading edge of the timeout. + * @param options.trailing Specify invoking on the trailing edge of the timeout. + * @return Returns the new throttled function. + */ + throttle( + func: T, + wait?: number, + options?: ThrottleSettings + ): T & Cancelable; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.throttle + */ + throttle( + wait?: number, + options?: ThrottleSettings + ): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.throttle + */ + throttle( + wait?: number, + options?: ThrottleSettings + ): LoDashExplicitObjectWrapper; + } + + //_.unary + interface LoDashStatic { + /** + * Creates a function that accepts up to one argument, ignoring any + * additional arguments. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new function. + * @example + * + * _.map(['6', '8', '10'], _.unary(parseInt)); + * // => [6, 8, 10] + */ + unary(func: T): T; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.unary + */ + unary(): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.unary + */ + unary(): LoDashExplicitObjectWrapper; + } + + //_.wrap + interface LoDashStatic { + /** + * Creates a function that provides value to the wrapper function as its first argument. Any additional + * arguments provided to the function are appended to those provided to the wrapper function. The wrapper is + * invoked with the this binding of the created function. + * + * @param value The value to wrap. + * @param wrapper The wrapper function. + * @return Returns the new function. + */ + wrap( + value: V, + wrapper: W + ): R; + + /** + * @see _.wrap + */ + wrap( + value: V, + wrapper: Function + ): R; + + /** + * @see _.wrap + */ + wrap( + value: any, + wrapper: Function + ): R; + } + + interface LoDashImplicitWrapper { + /** + * @see _.wrap + */ + wrap(wrapper: W): LoDashImplicitObjectWrapper; + + /** + * @see _.wrap + */ + wrap(wrapper: Function): LoDashImplicitObjectWrapper; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.wrap + */ + wrap(wrapper: W): LoDashImplicitObjectWrapper; + + /** + * @see _.wrap + */ + wrap(wrapper: Function): LoDashImplicitObjectWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.wrap + */ + wrap(wrapper: W): LoDashImplicitObjectWrapper; + + /** + * @see _.wrap + */ + wrap(wrapper: Function): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.wrap + */ + wrap(wrapper: W): LoDashExplicitObjectWrapper; + + /** + * @see _.wrap + */ + wrap(wrapper: Function): LoDashExplicitObjectWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.wrap + */ + wrap(wrapper: W): LoDashExplicitObjectWrapper; + + /** + * @see _.wrap + */ + wrap(wrapper: Function): LoDashExplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.wrap + */ + wrap(wrapper: W): LoDashExplicitObjectWrapper; + + /** + * @see _.wrap + */ + wrap(wrapper: Function): LoDashExplicitObjectWrapper; + } + + /******** + * Lang * + ********/ + + //_.castArray + interface LoDashStatic { + /** + * Casts value as an array if it’s not one. + * + * @param value The value to inspect. + * @return Returns the cast array. + */ + castArray(value: T): T[]; + } + + interface LoDashImplicitWrapper { + /** + * @see _.castArray + */ + castArray(): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.castArray + */ + castArray(): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.castArray + */ + castArray(): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.castArray + */ + castArray(): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.castArray + */ + castArray(): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.castArray + */ + castArray(): LoDashExplicitArrayWrapper; + } + + //_.clone + interface LoDashStatic { + /** + * Creates a shallow clone of value. + * + * Note: This method is loosely based on the structured clone algorithm and supports cloning arrays, + * array buffers, booleans, date objects, maps, numbers, Object objects, regexes, sets, strings, symbols, + * and typed arrays. The own enumerable properties of arguments objects are cloned as plain objects. An empty + * object is returned for uncloneable values such as error objects, functions, DOM nodes, and WeakMaps. + * + * @param value The value to clone. + * @return Returns the cloned value. + */ + clone(value: T): T; + } + + interface LoDashImplicitWrapper { + /** + * @see _.clone + */ + clone(): T; + } + + interface LoDashImplicitArrayWrapper { + + /** + * @see _.clone + */ + clone(): T[]; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.clone + */ + clone(): T; + } + + interface LoDashExplicitWrapper { + /** + * @see _.clone + */ + clone(): LoDashExplicitWrapper; + } + + interface LoDashExplicitArrayWrapper { + + /** + * @see _.clone + */ + clone(): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.clone + */ + clone(): LoDashExplicitObjectWrapper; + } + + //_.cloneDeep + interface LoDashStatic { + /** + * This method is like _.clone except that it recursively clones value. + * + * @param value The value to recursively clone. + * @return Returns the deep cloned value. + */ + cloneDeep(value: T): T; + } + + interface LoDashImplicitWrapper { + /** + * @see _.cloneDeep + */ + cloneDeep(): T; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.cloneDeep + */ + cloneDeep(): T[]; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.cloneDeep + */ + cloneDeep(): T; + } + + interface LoDashExplicitWrapper { + /** + * @see _.cloneDeep + */ + cloneDeep(): LoDashExplicitWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.cloneDeep + */ + cloneDeep(): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.cloneDeep + */ + cloneDeep(): LoDashExplicitObjectWrapper; + } + + //_.cloneDeepWith + interface CloneDeepWithCustomizer { + (value: TValue): TResult; + } + + interface LoDashStatic { + /** + * This method is like _.cloneWith except that it recursively clones value. + * + * @param value The value to recursively clone. + * @param customizer The function to customize cloning. + * @return Returns the deep cloned value. + */ + cloneDeepWith( + value: any, + customizer?: CloneDeepWithCustomizer + ): TResult; + + /** + * @see _.clonDeepeWith + */ + cloneDeepWith( + value: T, + customizer?: CloneDeepWithCustomizer + ): TResult; + } + + interface LoDashImplicitWrapper { + /** + * @see _.cloneDeepWith + */ + cloneDeepWith( + customizer?: CloneDeepWithCustomizer + ): TResult; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.cloneDeepWith + */ + cloneDeepWith( + customizer?: CloneDeepWithCustomizer + ): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.cloneDeepWith + */ + cloneDeepWith( + customizer?: CloneDeepWithCustomizer + ): TResult; + } + + interface LoDashExplicitWrapper { + /** + * @see _.cloneDeepWith + */ + cloneDeepWith( + customizer?: CloneDeepWithCustomizer + ): LoDashExplicitWrapper; + + /** + * @see _.cloneDeepWith + */ + cloneDeepWith( + customizer?: CloneDeepWithCustomizer + ): LoDashExplicitArrayWrapper; + + /** + * @see _.cloneDeepWith + */ + cloneDeepWith( + customizer?: CloneDeepWithCustomizer + ): LoDashExplicitObjectWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.cloneDeepWith + */ + cloneDeepWith( + customizer?: CloneDeepWithCustomizer + ): LoDashExplicitWrapper; + + /** + * @see _.cloneDeepWith + */ + cloneDeepWith( + customizer?: CloneDeepWithCustomizer + ): LoDashExplicitArrayWrapper; + + /** + * @see _.cloneDeepWith + */ + cloneDeepWith( + customizer?: CloneDeepWithCustomizer + ): LoDashExplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.cloneDeepWith + */ + cloneDeepWith( + customizer?: CloneDeepWithCustomizer + ): LoDashExplicitWrapper; + + /** + * @see _.cloneDeepWith + */ + cloneDeepWith( + customizer?: CloneDeepWithCustomizer + ): LoDashExplicitArrayWrapper; + + /** + * @see _.cloneDeepWith + */ + cloneDeepWith( + customizer?: CloneDeepWithCustomizer + ): LoDashExplicitObjectWrapper; + } + + //_.cloneWith + interface CloneWithCustomizer { + (value: TValue): TResult; + } + + interface LoDashStatic { + /** + * This method is like _.clone except that it accepts customizer which is invoked to produce the cloned value. + * If customizer returns undefined cloning is handled by the method instead. + * + * @param value The value to clone. + * @param customizer The function to customize cloning. + * @return Returns the cloned value. + */ + cloneWith( + value: any, + customizer?: CloneWithCustomizer + ): TResult; + + /** + * @see _.cloneWith + */ + cloneWith( + value: T, + customizer?: CloneWithCustomizer + ): TResult; + } + + interface LoDashImplicitWrapper { + /** + * @see _.cloneWith + */ + cloneWith( + customizer?: CloneWithCustomizer + ): TResult; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.cloneWith + */ + cloneWith( + customizer?: CloneWithCustomizer + ): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.cloneWith + */ + cloneWith( + customizer?: CloneWithCustomizer + ): TResult; + } + + interface LoDashExplicitWrapper { + /** + * @see _.cloneWith + */ + cloneWith( + customizer?: CloneWithCustomizer + ): LoDashExplicitWrapper; + + /** + * @see _.cloneWith + */ + cloneWith( + customizer?: CloneWithCustomizer + ): LoDashExplicitArrayWrapper; + + /** + * @see _.cloneWith + */ + cloneWith( + customizer?: CloneWithCustomizer + ): LoDashExplicitObjectWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.cloneWith + */ + cloneWith( + customizer?: CloneWithCustomizer + ): LoDashExplicitWrapper; + + /** + * @see _.cloneWith + */ + cloneWith( + customizer?: CloneWithCustomizer + ): LoDashExplicitArrayWrapper; + + /** + * @see _.cloneWith + */ + cloneWith( + customizer?: CloneWithCustomizer + ): LoDashExplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.cloneWith + */ + cloneWith( + customizer?: CloneWithCustomizer + ): LoDashExplicitWrapper; + + /** + * @see _.cloneWith + */ + cloneWith( + customizer?: CloneWithCustomizer + ): LoDashExplicitArrayWrapper; + + /** + * @see _.cloneWith + */ + cloneWith( + customizer?: CloneWithCustomizer + ): LoDashExplicitObjectWrapper; + } + + //_.eq + interface LoDashStatic { + /** + * Performs a [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'user': 'fred' }; + * var other = { 'user': 'fred' }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ + eq( + value: any, + other: any + ): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isEqual + */ + eq( + other: any + ): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isEqual + */ + eq( + other: any + ): LoDashExplicitWrapper; + } + + //_.gt + interface LoDashStatic { + /** + * Checks if value is greater than other. + * + * @param value The value to compare. + * @param other The other value to compare. + * @return Returns true if value is greater than other, else false. + */ + gt( + value: any, + other: any + ): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.gt + */ + gt(other: any): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.gt + */ + gt(other: any): LoDashExplicitWrapper; + } + + //_.gte + interface LoDashStatic { + /** + * Checks if value is greater than or equal to other. + * + * @param value The value to compare. + * @param other The other value to compare. + * @return Returns true if value is greater than or equal to other, else false. + */ + gte( + value: any, + other: any + ): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.gte + */ + gte(other: any): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.gte + */ + gte(other: any): LoDashExplicitWrapper; + } + + //_.isArguments + interface LoDashStatic { + /** + * Checks if value is classified as an arguments object. + * + * @param value The value to check. + * @return Returns true if value is correctly classified, else false. + */ + isArguments(value?: any): value is IArguments; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isArguments + */ + isArguments(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isArguments + */ + isArguments(): LoDashExplicitWrapper; + } + + //_.isArray + interface LoDashStatic { + /** + * Checks if value is classified as an Array object. + * @param value The value to check. + * + * @return Returns true if value is correctly classified, else false. + */ + isArray(value?: any): value is T[]; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isArray + */ + isArray(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isArray + */ + isArray(): LoDashExplicitWrapper; + } + + //_.isArrayBuffer + interface LoDashStatic { + /** + * Checks if value is classified as an ArrayBuffer object. + * + * @param value The value to check. + * @return Returns true if value is correctly classified, else false. + */ + isArrayBuffer(value?: any): value is ArrayBuffer; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isArrayBuffer + */ + isArrayBuffer(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isArrayBuffer + */ + isArrayBuffer(): LoDashExplicitWrapper; + } + + //_.isArrayLike + interface LoDashStatic { + /** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @type Function + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ + isArrayLike(value?: any): value is T[]; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isArrayLike + */ + isArrayLike(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isArrayLike + */ + isArrayLike(): LoDashExplicitWrapper; + } + + //_.isArrayLikeObject + interface LoDashStatic { + /** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @type Function + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ + isArrayLikeObject(value?: any): value is T[]; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isArrayLikeObject + */ + isArrayLikeObject(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isArrayLikeObject + */ + isArrayLikeObject(): LoDashExplicitWrapper; + } + + //_.isBoolean + interface LoDashStatic { + /** + * Checks if value is classified as a boolean primitive or object. + * + * @param value The value to check. + * @return Returns true if value is correctly classified, else false. + */ + isBoolean(value?: any): value is boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isBoolean + */ + isBoolean(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isBoolean + */ + isBoolean(): LoDashExplicitWrapper; + } + + //_.isBuffer + interface LoDashStatic { + /** + * Checks if value is a buffer. + * + * @param value The value to check. + * @return Returns true if value is a buffer, else false. + */ + isBuffer(value?: any): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isBuffer + */ + isBuffer(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isBuffer + */ + isBuffer(): LoDashExplicitWrapper; + } + + //_.isDate + interface LoDashStatic { + /** + * Checks if value is classified as a Date object. + * @param value The value to check. + * + * @return Returns true if value is correctly classified, else false. + */ + isDate(value?: any): value is Date; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isDate + */ + isDate(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isDate + */ + isDate(): LoDashExplicitWrapper; + } + + //_.isElement + interface LoDashStatic { + /** + * Checks if value is a DOM element. + * + * @param value The value to check. + * @return Returns true if value is a DOM element, else false. + */ + isElement(value?: any): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isElement + */ + isElement(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isElement + */ + isElement(): LoDashExplicitWrapper; + } + + //_.isEmpty + interface LoDashStatic { + /** + * Checks if value is empty. A value is considered empty unless it’s an arguments object, array, string, or + * jQuery-like collection with a length greater than 0 or an object with own enumerable properties. + * + * @param value The value to inspect. + * @return Returns true if value is empty, else false. + */ + isEmpty(value?: any): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isEmpty + */ + isEmpty(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isEmpty + */ + isEmpty(): LoDashExplicitWrapper; + } + + //_.isEqual + interface LoDashStatic { + /** + * Performs a deep comparison between two values to determine if they are + * equivalent. + * + * **Note:** This method supports comparing arrays, array buffers, booleans, + * date objects, error objects, maps, numbers, `Object` objects, regexes, + * sets, strings, symbols, and typed arrays. `Object` objects are compared + * by their own, not inherited, enumerable properties. Functions and DOM + * nodes are **not** supported. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'user': 'fred' }; + * var other = { 'user': 'fred' }; + * + * _.isEqual(object, other); + * // => true + * + * object === other; + * // => false + */ + isEqual( + value: any, + other: any + ): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isEqual + */ + isEqual( + other: any + ): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isEqual + */ + isEqual( + other: any + ): LoDashExplicitWrapper; + } + + // _.isEqualWith + interface IsEqualCustomizer { + (value: any, other: any, indexOrKey?: number|string): boolean; + } + + interface LoDashStatic { + /** + * This method is like `_.isEqual` except that it accepts `customizer` which is + * invoked to compare values. If `customizer` returns `undefined` comparisons are + * handled by the method instead. The `customizer` is invoked with up to seven arguments: + * (objValue, othValue [, index|key, object, other, stack]). + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); + * } + * + * function customizer(objValue, othValue) { + * if (isGreeting(objValue) && isGreeting(othValue)) { + * return true; + * } + * } + * + * var array = ['hello', 'goodbye']; + * var other = ['hi', 'goodbye']; + * + * _.isEqualWith(array, other, customizer); + * // => true + */ + isEqualWith( + value: any, + other: any, + customizer: IsEqualCustomizer + ): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isEqualWith + */ + isEqualWith( + other: any, + customizer: IsEqualCustomizer + ): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isEqualWith + */ + isEqualWith( + other: any, + customizer: IsEqualCustomizer + ): LoDashExplicitWrapper; + } + + //_.isError + interface LoDashStatic { + /** + * Checks if value is an Error, EvalError, RangeError, ReferenceError, SyntaxError, TypeError, or URIError + * object. + * + * @param value The value to check. + * @return Returns true if value is an error object, else false. + */ + isError(value: any): value is Error; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isError + */ + isError(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isError + */ + isError(): LoDashExplicitWrapper; + } + + //_.isFinite + interface LoDashStatic { + /** + * Checks if value is a finite primitive number. + * + * Note: This method is based on Number.isFinite. + * + * @param value The value to check. + * @return Returns true if value is a finite number, else false. + */ + isFinite(value?: any): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isFinite + */ + isFinite(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isFinite + */ + isFinite(): LoDashExplicitWrapper; + } + + //_.isFunction + interface LoDashStatic { + /** + * Checks if value is classified as a Function object. + * + * @param value The value to check. + * @return Returns true if value is correctly classified, else false. + */ + isFunction(value?: any): value is Function; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isFunction + */ + isFunction(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isFunction + */ + isFunction(): LoDashExplicitWrapper; + } + + //_.isInteger + interface LoDashStatic { + /** + * Checks if `value` is an integer. + * + * **Note:** This method is based on [`Number.isInteger`](https://mdn.io/Number/isInteger). + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an integer, else `false`. + * @example + * + * _.isInteger(3); + * // => true + * + * _.isInteger(Number.MIN_VALUE); + * // => false + * + * _.isInteger(Infinity); + * // => false + * + * _.isInteger('3'); + * // => false + */ + isInteger(value?: any): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isInteger + */ + isInteger(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isInteger + */ + isInteger(): LoDashExplicitWrapper; + } + + //_.isLength + interface LoDashStatic { + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This function is loosely based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ + isLength(value?: any): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isLength + */ + isLength(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isLength + */ + isLength(): LoDashExplicitWrapper; + } + + //_.isMap + interface LoDashStatic { + /** + * Checks if value is classified as a Map object. + * + * @param value The value to check. + * @returns Returns true if value is correctly classified, else false. + */ + isMap(value?: any): value is Map; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isMap + */ + isMap(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isMap + */ + isMap(): LoDashExplicitWrapper; + } + + //_.isMatch + interface isMatchCustomizer { + (value: any, other: any, indexOrKey?: number|string): boolean; + } + + interface LoDashStatic { + /** + * Performs a deep comparison between `object` and `source` to determine if + * `object` contains equivalent property values. + * + * **Note:** This method supports comparing the same values as `_.isEqual`. + * + * @static + * @memberOf _ + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @example + * + * var object = { 'user': 'fred', 'age': 40 }; + * + * _.isMatch(object, { 'age': 40 }); + * // => true + * + * _.isMatch(object, { 'age': 36 }); + * // => false + */ + isMatch(object: Object, source: Object): boolean; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.isMatch + */ + isMatch(source: Object): boolean; + } + + //_.isMatchWith + interface isMatchWithCustomizer { + (value: any, other: any, indexOrKey?: number|string): boolean; + } + + interface LoDashStatic { + /** + * This method is like `_.isMatch` except that it accepts `customizer` which + * is invoked to compare values. If `customizer` returns `undefined` comparisons + * are handled by the method instead. The `customizer` is invoked with three + * arguments: (objValue, srcValue, index|key, object, source). + * + * @static + * @memberOf _ + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @example + * + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); + * } + * + * function customizer(objValue, srcValue) { + * if (isGreeting(objValue) && isGreeting(srcValue)) { + * return true; + * } + * } + * + * var object = { 'greeting': 'hello' }; + * var source = { 'greeting': 'hi' }; + * + * _.isMatchWith(object, source, customizer); + * // => true + */ + isMatchWith(object: Object, source: Object, customizer: isMatchWithCustomizer): boolean; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.isMatchWith + */ + isMatchWith(source: Object, customizer: isMatchWithCustomizer): boolean; + } + + //_.isNaN + interface LoDashStatic { + /** + * Checks if value is NaN. + * + * Note: This method is not the same as isNaN which returns true for undefined and other non-numeric values. + * + * @param value The value to check. + * @return Returns true if value is NaN, else false. + */ + isNaN(value?: any): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isNaN + */ + isNaN(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isNaN + */ + isNaN(): LoDashExplicitWrapper; + } + + //_.isNative + interface LoDashStatic { + /** + * Checks if value is a native function. + * @param value The value to check. + * + * @retrun Returns true if value is a native function, else false. + */ + isNative(value: any): value is Function; + } + + interface LoDashImplicitWrapperBase { + /** + * see _.isNative + */ + isNative(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * see _.isNative + */ + isNative(): LoDashExplicitWrapper; + } + + //_.isNil + interface LoDashStatic { + /** + * Checks if `value` is `null` or `undefined`. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is nullish, else `false`. + * @example + * + * _.isNil(null); + * // => true + * + * _.isNil(void 0); + * // => true + * + * _.isNil(NaN); + * // => false + */ + isNil(value?: any): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * see _.isNil + */ + isNil(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * see _.isNil + */ + isNil(): LoDashExplicitWrapper; + } + + //_.isNull + interface LoDashStatic { + /** + * Checks if value is null. + * + * @param value The value to check. + * @return Returns true if value is null, else false. + */ + isNull(value?: any): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * see _.isNull + */ + isNull(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * see _.isNull + */ + isNull(): LoDashExplicitWrapper; + } + + //_.isNumber + interface LoDashStatic { + /** + * Checks if value is classified as a Number primitive or object. + * + * Note: To exclude Infinity, -Infinity, and NaN, which are classified as numbers, use the _.isFinite method. + * + * @param value The value to check. + * @return Returns true if value is correctly classified, else false. + */ + isNumber(value?: any): value is number; + } + + interface LoDashImplicitWrapperBase { + /** + * see _.isNumber + */ + isNumber(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * see _.isNumber + */ + isNumber(): LoDashExplicitWrapper; + } + + //_.isObject + interface LoDashStatic { + /** + * Checks if value is the language type of Object. (e.g. arrays, functions, objects, regexes, new Number(0), + * and new String('')) + * + * @param value The value to check. + * @return Returns true if value is an object, else false. + */ + isObject(value?: any): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * see _.isObject + */ + isObject(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * see _.isObject + */ + isObject(): LoDashExplicitWrapper; + } + + //_.isObjectLike + interface LoDashStatic { + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + isObjectLike(value?: any): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * see _.isObjectLike + */ + isObjectLike(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * see _.isObjectLike + */ + isObjectLike(): LoDashExplicitWrapper; + } + + //_.isPlainObject + interface LoDashStatic { + /** + * Checks if value is a plain object, that is, an object created by the Object constructor or one with a + * [[Prototype]] of null. + * + * Note: This method assumes objects created by the Object constructor have no inherited enumerable properties. + * + * @param value The value to check. + * @return Returns true if value is a plain object, else false. + */ + isPlainObject(value?: any): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * see _.isPlainObject + */ + isPlainObject(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * see _.isPlainObject + */ + isPlainObject(): LoDashExplicitWrapper; + } + + //_.isRegExp + interface LoDashStatic { + /** + * Checks if value is classified as a RegExp object. + * @param value The value to check. + * + * @return Returns true if value is correctly classified, else false. + */ + isRegExp(value?: any): value is RegExp; + } + + interface LoDashImplicitWrapperBase { + /** + * see _.isRegExp + */ + isRegExp(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * see _.isRegExp + */ + isRegExp(): LoDashExplicitWrapper; + } + + //_.isSafeInteger + interface LoDashStatic { + /** + * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754 + * double precision number which isn't the result of a rounded unsafe integer. + * + * **Note:** This method is based on [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger). + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`. + * @example + * + * _.isSafeInteger(3); + * // => true + * + * _.isSafeInteger(Number.MIN_VALUE); + * // => false + * + * _.isSafeInteger(Infinity); + * // => false + * + * _.isSafeInteger('3'); + * // => false + */ + isSafeInteger(value: any): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * see _.isSafeInteger + */ + isSafeInteger(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * see _.isSafeInteger + */ + isSafeInteger(): LoDashExplicitWrapper; + } + + //_.isSet + interface LoDashStatic { + /** + * Checks if value is classified as a Set object. + * + * @param value The value to check. + * @returns Returns true if value is correctly classified, else false. + */ + isSet(value?: any): value is Set; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isSet + */ + isSet(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isSet + */ + isSet(): LoDashExplicitWrapper; + } + + //_.isString + interface LoDashStatic { + /** + * Checks if value is classified as a String primitive or object. + * + * @param value The value to check. + * @return Returns true if value is correctly classified, else false. + */ + isString(value?: any): value is string; + } + + interface LoDashImplicitWrapperBase { + /** + * see _.isString + */ + isString(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * see _.isString + */ + isString(): LoDashExplicitWrapper; + } + + //_.isSymbol + interface LoDashStatic { + /** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ + isSymbol(value: any): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * see _.isSymbol + */ + isSymbol(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * see _.isSymbol + */ + isSymbol(): LoDashExplicitWrapper; + } + + //_.isTypedArray + interface LoDashStatic { + /** + * Checks if value is classified as a typed array. + * + * @param value The value to check. + * @return Returns true if value is correctly classified, else false. + */ + isTypedArray(value: any): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * see _.isTypedArray + */ + isTypedArray(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * see _.isTypedArray + */ + isTypedArray(): LoDashExplicitWrapper; + } + + //_.isUndefined + interface LoDashStatic { + /** + * Checks if value is undefined. + * + * @param value The value to check. + * @return Returns true if value is undefined, else false. + */ + isUndefined(value: any): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * see _.isUndefined + */ + isUndefined(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * see _.isUndefined + */ + isUndefined(): LoDashExplicitWrapper; + } + + //_.isWeakMap + interface LoDashStatic { + /** + * Checks if value is classified as a WeakMap object. + * + * @param value The value to check. + * @returns Returns true if value is correctly classified, else false. + */ + isWeakMap(value?: any): value is WeakMap; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isSet + */ + isWeakMap(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isSet + */ + isWeakMap(): LoDashExplicitWrapper; + } + + //_.isWeakSet + interface LoDashStatic { + /** + * Checks if value is classified as a WeakSet object. + * + * @param value The value to check. + * @returns Returns true if value is correctly classified, else false. + */ + isWeakSet(value?: any): value is WeakSet; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isWeakSet + */ + isWeakSet(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isWeakSet + */ + isWeakSet(): LoDashExplicitWrapper; + } + + //_.lt + interface LoDashStatic { + /** + * Checks if value is less than other. + * + * @param value The value to compare. + * @param other The other value to compare. + * @return Returns true if value is less than other, else false. + */ + lt( + value: any, + other: any + ): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.lt + */ + lt(other: any): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.lt + */ + lt(other: any): LoDashExplicitWrapper; + } + + //_.lte + interface LoDashStatic { + /** + * Checks if value is less than or equal to other. + * + * @param value The value to compare. + * @param other The other value to compare. + * @return Returns true if value is less than or equal to other, else false. + */ + lte( + value: any, + other: any + ): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.lte + */ + lte(other: any): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.lte + */ + lte(other: any): LoDashExplicitWrapper; + } + + //_.toArray + interface LoDashStatic { + /** + * Converts value to an array. + * + * @param value The value to convert. + * @return Returns the converted array. + */ + toArray(value: List|Dictionary|NumericDictionary): T[]; + + /** + * @see _.toArray + */ + toArray(value: TValue): TResult[]; + + /** + * @see _.toArray + */ + toArray(value?: any): TResult[]; + } + + interface LoDashImplicitWrapper { + /** + * @see _.toArray + */ + toArray(): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.toArray + */ + toArray(): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.toArray + */ + toArray(): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.toArray + */ + toArray(): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.toArray + */ + toArray(): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.toArray + */ + toArray(): LoDashExplicitArrayWrapper; + } + + //_.toPlainObject + interface LoDashStatic { + /** + * Converts value to a plain object flattening inherited enumerable properties of value to own properties + * of the plain object. + * + * @param value The value to convert. + * @return Returns the converted plain object. + */ + toPlainObject(value?: any): TResult; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.toPlainObject + */ + toPlainObject(): LoDashImplicitObjectWrapper; + } + + //_.toInteger + interface LoDashStatic { + /** + * Converts `value` to an integer. + * + * **Note:** This function is loosely based on [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger). + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toInteger(3); + * // => 3 + * + * _.toInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toInteger(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toInteger('3'); + * // => 3 + */ + toInteger(value: any): number; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.toInteger + */ + toInteger(): LoDashImplicitWrapper; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.toInteger + */ + toInteger(): LoDashExplicitWrapper; + } + + //_.toLength + interface LoDashStatic { + /** + * Converts `value` to an integer suitable for use as the length of an + * array-like object. + * + * **Note:** This method is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to convert. + * @return {number} Returns the converted integer. + * @example + * + * _.toLength(3); + * // => 3 + * + * _.toLength(Number.MIN_VALUE); + * // => 0 + * + * _.toLength(Infinity); + * // => 4294967295 + * + * _.toLength('3'); + * // => 3 + */ + toLength(value: any): number; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.toLength + */ + toLength(): LoDashImplicitWrapper; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.toLength + */ + toLength(): LoDashExplicitWrapper; + } + + //_.toNumber + interface LoDashStatic { + /** + * Converts `value` to a number. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to process. + * @returns {number} Returns the number. + * @example + * + * _.toNumber(3); + * // => 3 + * + * _.toNumber(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toNumber(Infinity); + * // => Infinity + * + * _.toNumber('3'); + * // => 3 + */ + toNumber(value: any): number; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.toNumber + */ + toNumber(): LoDashImplicitWrapper; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.toNumber + */ + toNumber(): LoDashExplicitWrapper; + } + + //_.toSafeInteger + interface LoDashStatic { + /** + * Converts `value` to a safe integer. A safe integer can be compared and + * represented correctly. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toSafeInteger(3); + * // => 3 + * + * _.toSafeInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toSafeInteger(Infinity); + * // => 9007199254740991 + * + * _.toSafeInteger('3'); + * // => 3 + */ + toSafeInteger(value: any): number; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.toSafeInteger + */ + toSafeInteger(): LoDashImplicitWrapper; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.toSafeInteger + */ + toSafeInteger(): LoDashExplicitWrapper; + } + + //_.toString DUMMY + interface LoDashStatic { + /** + * Converts `value` to a string if it's not one. An empty string is returned + * for `null` and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to process. + * @returns {string} Returns the string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ + toString(value: any): string; + } + + /******** + * Math * + ********/ + + //_.add + interface LoDashStatic { + /** + * Adds two numbers. + * + * @param augend The first number to add. + * @param addend The second number to add. + * @return Returns the sum. + */ + add( + augend: number, + addend: number + ): number; + } + + interface LoDashImplicitWrapper { + /** + * @see _.add + */ + add(addend: number): number; + } + + interface LoDashExplicitWrapper { + /** + * @see _.add + */ + add(addend: number): LoDashExplicitWrapper; + } + + //_.ceil + interface LoDashStatic { + /** + * Calculates n rounded up to precision. + * + * @param n The number to round up. + * @param precision The precision to round up to. + * @return Returns the rounded up number. + */ + ceil( + n: number, + precision?: number + ): number; + } + + interface LoDashImplicitWrapper { + /** + * @see _.ceil + */ + ceil(precision?: number): number; + } + + interface LoDashExplicitWrapper { + /** + * @see _.ceil + */ + ceil(precision?: number): LoDashExplicitWrapper; + } + + //_.floor + interface LoDashStatic { + /** + * Calculates n rounded down to precision. + * + * @param n The number to round down. + * @param precision The precision to round down to. + * @return Returns the rounded down number. + */ + floor( + n: number, + precision?: number + ): number; + } + + interface LoDashImplicitWrapper { + /** + * @see _.floor + */ + floor(precision?: number): number; + } + + interface LoDashExplicitWrapper { + /** + * @see _.floor + */ + floor(precision?: number): LoDashExplicitWrapper; + } + + //_.max + interface LoDashStatic { + /** + * Computes the maximum value of `array`. If `array` is empty or falsey + * `undefined` is returned. + * + * @static + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @returns {*} Returns the maximum value. + */ + max( + collection: List + ): T; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.max + */ + max(): T; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.max + */ + max(): T; + } + + //_.maxBy + interface LoDashStatic { + /** + * This method is like `_.max` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the criterion by which + * the value is ranked. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element. + * @returns {*} Returns the maximum value. + * @example + * + * var objects = [{ 'n': 1 }, { 'n': 2 }]; + * + * _.maxBy(objects, function(o) { return o.a; }); + * // => { 'n': 2 } + * + * // using the `_.property` iteratee shorthand + * _.maxBy(objects, 'n'); + * // => { 'n': 2 } + */ + maxBy( + collection: List, + iteratee?: ListIterator + ): T; + + /** + * @see _.maxBy + */ + maxBy( + collection: Dictionary, + iteratee?: DictionaryIterator + ): T; + + /** + * @see _.maxBy + */ + maxBy( + collection: List|Dictionary, + iteratee?: string + ): T; + + /** + * @see _.maxBy + */ + maxBy( + collection: List|Dictionary, + whereValue?: TObject + ): T; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.maxBy + */ + maxBy( + iteratee?: ListIterator + ): T; + + /** + * @see _.maxBy + */ + maxBy( + iteratee?: string + ): T; + + /** + * @see _.maxBy + */ + maxBy( + whereValue?: TObject + ): T; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.maxBy + */ + maxBy( + iteratee?: ListIterator|DictionaryIterator + ): T; + + /** + * @see _.maxBy + */ + maxBy( + iteratee?: string + ): T; + + /** + * @see _.maxBy + */ + maxBy( + whereValue?: TObject + ): T; + } + + //_.mean + interface LoDashStatic { + /** + * Computes the mean of the values in `array`. + * + * @static + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @returns {number} Returns the mean. + * @example + * + * _.mean([4, 2, 8, 6]); + * // => 5 + */ + mean( + collection: List + ): number; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.mean + */ + mean(): number; + + /** + * @see _.mean + */ + mean(): number; + } + + //_.min + interface LoDashStatic { + /** + * Computes the minimum value of `array`. If `array` is empty or falsey + * `undefined` is returned. + * + * @static + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @returns {*} Returns the minimum value. + */ + min( + collection: List + ): T; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.min + */ + min(): T; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.min + */ + min(): T; + } + + //_.minBy + interface LoDashStatic { + /** + * This method is like `_.min` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the criterion by which + * the value is ranked. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element. + * @returns {*} Returns the minimum value. + * @example + * + * var objects = [{ 'n': 1 }, { 'n': 2 }]; + * + * _.minBy(objects, function(o) { return o.a; }); + * // => { 'n': 1 } + * + * // using the `_.property` iteratee shorthand + * _.minBy(objects, 'n'); + * // => { 'n': 1 } + */ + minBy( + collection: List, + iteratee?: ListIterator + ): T; + + /** + * @see _.minBy + */ + minBy( + collection: Dictionary, + iteratee?: DictionaryIterator + ): T; + + /** + * @see _.minBy + */ + minBy( + collection: List|Dictionary, + iteratee?: string + ): T; + + /** + * @see _.minBy + */ + minBy( + collection: List|Dictionary, + whereValue?: TObject + ): T; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.minBy + */ + minBy( + iteratee?: ListIterator + ): T; + + /** + * @see _.minBy + */ + minBy( + iteratee?: string + ): T; + + /** + * @see _.minBy + */ + minBy( + whereValue?: TObject + ): T; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.minBy + */ + minBy( + iteratee?: ListIterator|DictionaryIterator + ): T; + + /** + * @see _.minBy + */ + minBy( + iteratee?: string + ): T; + + /** + * @see _.minBy + */ + minBy( + whereValue?: TObject + ): T; + } + + //_.round + interface LoDashStatic { + /** + * Calculates n rounded to precision. + * + * @param n The number to round. + * @param precision The precision to round to. + * @return Returns the rounded number. + */ + round( + n: number, + precision?: number + ): number; + } + + interface LoDashImplicitWrapper { + /** + * @see _.round + */ + round(precision?: number): number; + } + + interface LoDashExplicitWrapper { + /** + * @see _.round + */ + round(precision?: number): LoDashExplicitWrapper; + } + + //_.sum + interface LoDashStatic { + /** + * Computes the sum of the values in `array`. + * + * @static + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @returns {number} Returns the sum. + * @example + * + * _.sum([4, 2, 8, 6]); + * // => 20 + */ + sum(collection: List): number; + + /** + * @see _.sum + */ + sum(collection: List|Dictionary): number; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.sum + */ + sum(): number; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.sum + **/ + sum(): number; + + /** + * @see _.sum + */ + sum(): number; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.sum + */ + sum(): LoDashExplicitWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.sum + */ + sum(): LoDashExplicitWrapper; + + /** + * @see _.sum + */ + sum(): LoDashExplicitWrapper; + } + + //_.sumBy + interface LoDashStatic { + /** + * This method is like `_.sum` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the value to be summed. + * The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the sum. + * @example + * + * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }]; + * + * _.sumBy(objects, function(o) { return o.n; }); + * // => 20 + * + * // using the `_.property` iteratee shorthand + * _.sumBy(objects, 'n'); + * // => 20 + */ + sumBy( + collection: List, + iteratee: ListIterator + ): number; + + /** + * @see _.sumBy + */ + sumBy( + collection: List<{}>, + iteratee: string + ): number; + + /** + * @see _.sumBy + */ + sumBy( + collection: List + ): number; + + /** + * @see _.sumBy + */ + sumBy( + collection: List<{}>, + iteratee: Dictionary<{}> + ): number; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.sumBy + */ + sumBy( + iteratee: ListIterator + ): number; + + /** + * @see _.sumBy + */ + sumBy(iteratee: string): number; + + /** + * @see _.sumBy + */ + sumBy(iteratee: Dictionary<{}>): number; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.sumBy + */ + sumBy( + iteratee: ListIterator<{}, number> + ): number; + + /** + * @see _.sumBy + */ + sumBy(iteratee: string): number; + + /** + * @see _.sumBy + */ + sumBy(iteratee: Dictionary<{}>): number; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.sumBy + */ + sumBy( + iteratee: ListIterator + ): LoDashExplicitWrapper; + + /** + * @see _.sumBy + */ + sumBy(iteratee: string): LoDashExplicitWrapper; + + /** + * @see _.sumBy + */ + sumBy(): LoDashExplicitWrapper; + + /** + * @see _.sumBy + */ + sumBy(iteratee: Dictionary<{}>): LoDashExplicitWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.sumBy + */ + sumBy( + iteratee: ListIterator<{}, number> + ): LoDashExplicitWrapper; + + /** + * @see _.sumBy + */ + sumBy(iteratee: string): LoDashExplicitWrapper; + + /** + * @see _.sumBy + */ + sumBy(iteratee: Dictionary<{}>): LoDashExplicitWrapper; + } + + /********** + * Number * + **********/ + + //_.subtract + interface LoDashStatic { + /** + * Subtract two numbers. + * + * @static + * @memberOf _ + * @category Math + * @param {number} minuend The first number in a subtraction. + * @param {number} subtrahend The second number in a subtraction. + * @returns {number} Returns the difference. + * @example + * + * _.subtract(6, 4); + * // => 2 + */ + subtract( + minuend: number, + subtrahend: number + ): number; + } + + interface LoDashImplicitWrapper { + /** + * @see _.subtract + */ + subtract( + subtrahend: number + ): number; + } + + interface LoDashExplicitWrapper { + /** + * @see _.subtract + */ + subtract( + subtrahend: number + ): LoDashExplicitWrapper; + } + + //_.clamp + interface LoDashStatic { + /** + * Clamps `number` within the inclusive `lower` and `upper` bounds. + * + * @static + * @memberOf _ + * @category Number + * @param {number} number The number to clamp. + * @param {number} [lower] The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the clamped number. + * @example + * + * _.clamp(-10, -5, 5); + * // => -5 + * + * _.clamp(10, -5, 5); + * // => 5 + */ + clamp( + number: number, + lower: number, + upper: number + ): number; + } + + interface LoDashImplicitWrapper { + /** + * @see _.clamp + */ + clamp( + lower: number, + upper: number + ): number; + } + + interface LoDashExplicitWrapper { + /** + * @see _.clamp + */ + clamp( + lower: number, + upper: number + ): LoDashExplicitWrapper; + } + + //_.inRange + interface LoDashStatic { + /** + * Checks if n is between start and up to but not including, end. If end is not specified it’s set to start + * with start then set to 0. + * + * @param n The number to check. + * @param start The start of the range. + * @param end The end of the range. + * @return Returns true if n is in the range, else false. + */ + inRange( + n: number, + start: number, + end: number + ): boolean; + + + /** + * @see _.inRange + */ + inRange( + n: number, + end: number + ): boolean; + } + + interface LoDashImplicitWrapper { + /** + * @see _.inRange + */ + inRange( + start: number, + end: number + ): boolean; + + /** + * @see _.inRange + */ + inRange(end: number): boolean; + } + + interface LoDashExplicitWrapper { + /** + * @see _.inRange + */ + inRange( + start: number, + end: number + ): LoDashExplicitWrapper; + + /** + * @see _.inRange + */ + inRange(end: number): LoDashExplicitWrapper; + } + + //_.random + interface LoDashStatic { + /** + * Produces a random number between min and max (inclusive). If only one argument is provided a number between + * 0 and the given number is returned. If floating is true, or either min or max are floats, a floating-point + * number is returned instead of an integer. + * + * @param min The minimum possible value. + * @param max The maximum possible value. + * @param floating Specify returning a floating-point number. + * @return Returns the random number. + */ + random( + min?: number, + max?: number, + floating?: boolean + ): number; + + /** + * @see _.random + */ + random( + min?: number, + floating?: boolean + ): number; + + /** + * @see _.random + */ + random(floating?: boolean): number; + } + + interface LoDashImplicitWrapper { + /** + * @see _.random + */ + random( + max?: number, + floating?: boolean + ): number; + + /** + * @see _.random + */ + random(floating?: boolean): number; + } + + interface LoDashExplicitWrapper { + /** + * @see _.random + */ + random( + max?: number, + floating?: boolean + ): LoDashExplicitWrapper; + + /** + * @see _.random + */ + random(floating?: boolean): LoDashExplicitWrapper; + } + + /********** + * Object * + **********/ + + //_.assign + interface LoDashStatic { + /** + * Assigns own enumerable properties of source objects to the destination + * object. Source objects are applied from left to right. Subsequent sources + * overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object` and is loosely based on + * [`Object.assign`](https://mdn.io/Object/assign). + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @example + * + * function Foo() { + * this.c = 3; + * } + * + * function Bar() { + * this.e = 5; + * } + * + * Foo.prototype.d = 4; + * Bar.prototype.f = 6; + * + * _.assign({ 'a': 1 }, new Foo, new Bar); + * // => { 'a': 1, 'c': 3, 'e': 5 } + */ + assign( + object: TObject, + source: TSource + ): TObject & TSource; + + /** + * @see assign + */ + assign( + object: TObject, + source1: TSource1, + source2: TSource2 + ): TObject & TSource1 & TSource2; + + /** + * @see assign + */ + assign( + object: TObject, + source1: TSource1, + source2: TSource2, + source3: TSource3 + ): TObject & TSource1 & TSource2 & TSource3; + + /** + * @see assign + */ + assign( + object: TObject, + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4 + ): TObject & TSource1 & TSource2 & TSource3 & TSource4; + + /** + * @see _.assign + */ + assign(object: TObject): TObject; + + /** + * @see _.assign + */ + assign( + object: any, + ...otherArgs: any[] + ): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.assign + */ + assign( + source: TSource + ): LoDashImplicitObjectWrapper; + + /** + * @see assign + */ + assign( + source1: TSource1, + source2: TSource2 + ): LoDashImplicitObjectWrapper; + + /** + * @see assign + */ + assign( + source1: TSource1, + source2: TSource2, + source3: TSource3 + ): LoDashImplicitObjectWrapper; + + /** + * @see assign + */ + assign( + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4 + ): LoDashImplicitObjectWrapper; + + /** + * @see _.assign + */ + assign(): LoDashImplicitObjectWrapper; + + /** + * @see _.assign + */ + assign(...otherArgs: any[]): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.assign + */ + assign( + source: TSource + ): LoDashExplicitObjectWrapper; + + /** + * @see assign + */ + assign( + source1: TSource1, + source2: TSource2 + ): LoDashExplicitObjectWrapper; + + /** + * @see assign + */ + assign( + source1: TSource1, + source2: TSource2, + source3: TSource3 + ): LoDashExplicitObjectWrapper; + + /** + * @see assign + */ + assign( + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4 + ): LoDashExplicitObjectWrapper; + + /** + * @see _.assign + */ + assign(): LoDashExplicitObjectWrapper; + + /** + * @see _.assign + */ + assign(...otherArgs: any[]): LoDashExplicitObjectWrapper; + } + + //_.assignWith + interface AssignCustomizer { + (objectValue: any, sourceValue: any, key?: string, object?: {}, source?: {}): any; + } + + interface LoDashStatic { + /** + * This method is like `_.assign` except that it accepts `customizer` which + * is invoked to produce the assigned values. If `customizer` returns `undefined` + * assignment is handled by the method instead. The `customizer` is invoked + * with five arguments: (objValue, srcValue, key, object, source). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; + * } + * + * var defaults = _.partialRight(_.assignWith, customizer); + * + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + assignWith( + object: TObject, + source: TSource, + customizer: AssignCustomizer + ): TObject & TSource; + + /** + * @see assignWith + */ + assignWith( + object: TObject, + source1: TSource1, + source2: TSource2, + customizer: AssignCustomizer + ): TObject & TSource1 & TSource2; + + /** + * @see assignWith + */ + assignWith( + object: TObject, + source1: TSource1, + source2: TSource2, + source3: TSource3, + customizer: AssignCustomizer + ): TObject & TSource1 & TSource2 & TSource3; + + /** + * @see assignWith + */ + assignWith( + object: TObject, + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4, + customizer: AssignCustomizer + ): TObject & TSource1 & TSource2 & TSource3 & TSource4; + + /** + * @see _.assignWith + */ + assignWith(object: TObject): TObject; + + /** + * @see _.assignWith + */ + assignWith( + object: any, + ...otherArgs: any[] + ): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.assignWith + */ + assignWith( + source: TSource, + customizer: AssignCustomizer + ): LoDashImplicitObjectWrapper; + + /** + * @see assignWith + */ + assignWith( + source1: TSource1, + source2: TSource2, + customizer: AssignCustomizer + ): LoDashImplicitObjectWrapper; + + /** + * @see assignWith + */ + assignWith( + source1: TSource1, + source2: TSource2, + source3: TSource3, + customizer: AssignCustomizer + ): LoDashImplicitObjectWrapper; + + /** + * @see assignWith + */ + assignWith( + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4, + customizer: AssignCustomizer + ): LoDashImplicitObjectWrapper; + + /** + * @see _.assignWith + */ + assignWith(): LoDashImplicitObjectWrapper; + + /** + * @see _.assignWith + */ + assignWith(...otherArgs: any[]): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.assignWith + */ + assignWith( + source: TSource, + customizer: AssignCustomizer + ): LoDashExplicitObjectWrapper; + + /** + * @see assignWith + */ + assignWith( + source1: TSource1, + source2: TSource2, + customizer: AssignCustomizer + ): LoDashExplicitObjectWrapper; + + /** + * @see assignWith + */ + assignWith( + source1: TSource1, + source2: TSource2, + source3: TSource3, + customizer: AssignCustomizer + ): LoDashExplicitObjectWrapper; + + /** + * @see assignWith + */ + assignWith( + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4, + customizer: AssignCustomizer + ): LoDashExplicitObjectWrapper; + + /** + * @see _.assignWith + */ + assignWith(): LoDashExplicitObjectWrapper; + + /** + * @see _.assignWith + */ + assignWith(...otherArgs: any[]): LoDashExplicitObjectWrapper; + } + + //_.assignIn + interface LoDashStatic { + /** + * This method is like `_.assign` except that it iterates over own and + * inherited source properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @alias extend + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @example + * + * function Foo() { + * this.b = 2; + * } + * + * function Bar() { + * this.d = 4; + * } + * + * Foo.prototype.c = 3; + * Bar.prototype.e = 5; + * + * _.assignIn({ 'a': 1 }, new Foo, new Bar); + * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5 } + */ + assignIn( + object: TObject, + source: TSource + ): TObject & TSource; + + /** + * @see assignIn + */ + assignIn( + object: TObject, + source1: TSource1, + source2: TSource2 + ): TObject & TSource1 & TSource2; + + /** + * @see assignIn + */ + assignIn( + object: TObject, + source1: TSource1, + source2: TSource2, + source3: TSource3 + ): TObject & TSource1 & TSource2 & TSource3; + + /** + * @see assignIn + */ + assignIn( + object: TObject, + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4 + ): TObject & TSource1 & TSource2 & TSource3 & TSource4; + + /** + * @see _.assignIn + */ + assignIn(object: TObject): TObject; + + /** + * @see _.assignIn + */ + assignIn( + object: any, + ...otherArgs: any[] + ): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.assignIn + */ + assignIn( + source: TSource + ): LoDashImplicitObjectWrapper; + + /** + * @see assignIn + */ + assignIn( + source1: TSource1, + source2: TSource2 + ): LoDashImplicitObjectWrapper; + + /** + * @see assignIn + */ + assignIn( + source1: TSource1, + source2: TSource2, + source3: TSource3 + ): LoDashImplicitObjectWrapper; + + /** + * @see assignIn + */ + assignIn( + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4 + ): LoDashImplicitObjectWrapper; + + /** + * @see _.assignIn + */ + assignIn(): LoDashImplicitObjectWrapper; + + /** + * @see _.assignIn + */ + assignIn(...otherArgs: any[]): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.assignIn + */ + assignIn( + source: TSource + ): LoDashExplicitObjectWrapper; + + /** + * @see assignIn + */ + assignIn( + source1: TSource1, + source2: TSource2 + ): LoDashExplicitObjectWrapper; + + /** + * @see assignIn + */ + assignIn( + source1: TSource1, + source2: TSource2, + source3: TSource3 + ): LoDashExplicitObjectWrapper; + + /** + * @see assignIn + */ + assignIn( + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4 + ): LoDashExplicitObjectWrapper; + + /** + * @see _.assignIn + */ + assignIn(): LoDashExplicitObjectWrapper; + + /** + * @see _.assignIn + */ + assignIn(...otherArgs: any[]): LoDashExplicitObjectWrapper; + } + + //_.assignInWith + interface AssignCustomizer { + (objectValue: any, sourceValue: any, key?: string, object?: {}, source?: {}): any; + } + + interface LoDashStatic { + /** + * This method is like `_.assignIn` except that it accepts `customizer` which + * is invoked to produce the assigned values. If `customizer` returns `undefined` + * assignment is handled by the method instead. The `customizer` is invoked + * with five arguments: (objValue, srcValue, key, object, source). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @alias extendWith + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; + * } + * + * var defaults = _.partialRight(_.assignInWith, customizer); + * + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + assignInWith( + object: TObject, + source: TSource, + customizer: AssignCustomizer + ): TObject & TSource; + + /** + * @see assignInWith + */ + assignInWith( + object: TObject, + source1: TSource1, + source2: TSource2, + customizer: AssignCustomizer + ): TObject & TSource1 & TSource2; + + /** + * @see assignInWith + */ + assignInWith( + object: TObject, + source1: TSource1, + source2: TSource2, + source3: TSource3, + customizer: AssignCustomizer + ): TObject & TSource1 & TSource2 & TSource3; + + /** + * @see assignInWith + */ + assignInWith( + object: TObject, + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4, + customizer: AssignCustomizer + ): TObject & TSource1 & TSource2 & TSource3 & TSource4; + + /** + * @see _.assignInWith + */ + assignInWith(object: TObject): TObject; + + /** + * @see _.assignInWith + */ + assignInWith( + object: any, + ...otherArgs: any[] + ): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.assignInWith + */ + assignInWith( + source: TSource, + customizer: AssignCustomizer + ): LoDashImplicitObjectWrapper; + + /** + * @see assignInWith + */ + assignInWith( + source1: TSource1, + source2: TSource2, + customizer: AssignCustomizer + ): LoDashImplicitObjectWrapper; + + /** + * @see assignInWith + */ + assignInWith( + source1: TSource1, + source2: TSource2, + source3: TSource3, + customizer: AssignCustomizer + ): LoDashImplicitObjectWrapper; + + /** + * @see assignInWith + */ + assignInWith( + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4, + customizer: AssignCustomizer + ): LoDashImplicitObjectWrapper; + + /** + * @see _.assignInWith + */ + assignInWith(): LoDashImplicitObjectWrapper; + + /** + * @see _.assignInWith + */ + assignInWith(...otherArgs: any[]): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.assignInWith + */ + assignInWith( + source: TSource, + customizer: AssignCustomizer + ): LoDashExplicitObjectWrapper; + + /** + * @see assignInWith + */ + assignInWith( + source1: TSource1, + source2: TSource2, + customizer: AssignCustomizer + ): LoDashExplicitObjectWrapper; + + /** + * @see assignInWith + */ + assignInWith( + source1: TSource1, + source2: TSource2, + source3: TSource3, + customizer: AssignCustomizer + ): LoDashExplicitObjectWrapper; + + /** + * @see assignInWith + */ + assignInWith( + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4, + customizer: AssignCustomizer + ): LoDashExplicitObjectWrapper; + + /** + * @see _.assignInWith + */ + assignInWith(): LoDashExplicitObjectWrapper; + + /** + * @see _.assignInWith + */ + assignInWith(...otherArgs: any[]): LoDashExplicitObjectWrapper; + } + + //_.create + interface LoDashStatic { + /** + * Creates an object that inherits from the given prototype object. If a properties object is provided its own + * enumerable properties are assigned to the created object. + * + * @param prototype The object to inherit from. + * @param properties The properties to assign to the object. + * @return Returns the new object. + */ + create( + prototype: T, + properties?: U + ): T & U; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.create + */ + create(properties?: U): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.create + */ + create(properties?: U): LoDashExplicitObjectWrapper; + } + + + //_.defaults + interface LoDashStatic { + /** + * Assigns own enumerable properties of source object(s) to the destination object for all destination + * properties that resolve to undefined. Once a property is set, additional values of the same property are + * ignored. + * + * Note: This method mutates object. + * + * @param object The destination object. + * @param sources The source objects. + * @return The destination object. + */ + defaults( + object: TObject, + source: TSource + ): TSource & TObject; + + /** + * @see _.defaults + */ + defaults( + object: TObject, + source1: TSource1, + source2: TSource2 + ): TSource2 & TSource1 & TObject; + + /** + * @see _.defaults + */ + defaults( + object: TObject, + source1: TSource1, + source2: TSource2, + source3: TSource3 + ): TSource3 & TSource2 & TSource1 & TObject; + + /** + * @see _.defaults + */ + defaults( + object: TObject, + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4 + ): TSource4 & TSource3 & TSource2 & TSource1 & TObject; + + /** + * @see _.defaults + */ + defaults(object: TObject): TObject; + + /** + * @see _.defaults + */ + defaults( + object: any, + ...sources: any[] + ): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.defaults + */ + defaults( + source: TSource + ): LoDashImplicitObjectWrapper; + + /** + * @see _.defaults + */ + defaults( + source1: TSource1, + source2: TSource2 + ): LoDashImplicitObjectWrapper; + + /** + * @see _.defaults + */ + defaults( + source1: TSource1, + source2: TSource2, + source3: TSource3 + ): LoDashImplicitObjectWrapper; + + /** + * @see _.defaults + */ + defaults( + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4 + ): LoDashImplicitObjectWrapper; + + /** + * @see _.defaults + */ + defaults(): LoDashImplicitObjectWrapper; + + /** + * @see _.defaults + */ + defaults(...sources: any[]): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.defaults + */ + defaults( + source: TSource + ): LoDashExplicitObjectWrapper; + + /** + * @see _.defaults + */ + defaults( + source1: TSource1, + source2: TSource2 + ): LoDashExplicitObjectWrapper; + + /** + * @see _.defaults + */ + defaults( + source1: TSource1, + source2: TSource2, + source3: TSource3 + ): LoDashExplicitObjectWrapper; + + /** + * @see _.defaults + */ + defaults( + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4 + ): LoDashExplicitObjectWrapper; + + /** + * @see _.defaults + */ + defaults(): LoDashExplicitObjectWrapper; + + /** + * @see _.defaults + */ + defaults(...sources: any[]): LoDashExplicitObjectWrapper; + } + + //_.defaultsDeep + interface LoDashStatic { + /** + * This method is like _.defaults except that it recursively assigns default properties. + * @param object The destination object. + * @param sources The source objects. + * @return Returns object. + **/ + defaultsDeep( + object: T, + ...sources: any[]): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.defaultsDeep + **/ + defaultsDeep(...sources: any[]): LoDashImplicitObjectWrapper + } + + // _.extend + interface LoDashStatic { + /** + * @see _.assignIn + */ + extend( + object: TObject, + source: TSource + ): TObject & TSource; + + /** + * @see _.assignIn + */ + extend( + object: TObject, + source1: TSource1, + source2: TSource2 + ): TObject & TSource1 & TSource2; + + /** + * @see _.assignIn + */ + extend( + object: TObject, + source1: TSource1, + source2: TSource2, + source3: TSource3 + ): TObject & TSource1 & TSource2 & TSource3; + + /** + * @see _.assignIn + */ + extend( + object: TObject, + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4 + ): TObject & TSource1 & TSource2 & TSource3 & TSource4; + + /** + * @see _.assignIn + */ + extend(object: TObject): TObject; + + /** + * @see _.assignIn + */ + extend( + object: any, + ...otherArgs: any[] + ): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.assignIn + */ + extend( + source: TSource + ): LoDashImplicitObjectWrapper; + + /** + * @see _.assignIn + */ + extend( + source1: TSource1, + source2: TSource2 + ): LoDashImplicitObjectWrapper; + + /** + * @see _.assignIn + */ + extend( + source1: TSource1, + source2: TSource2, + source3: TSource3 + ): LoDashImplicitObjectWrapper; + + /** + * @see _.assignIn + */ + extend( + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4 + ): LoDashImplicitObjectWrapper; + + /** + * @see _.assignIn + */ + extend(): LoDashImplicitObjectWrapper; + + /** + * @see _.assignIn + */ + extend(...otherArgs: any[]): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.assignIn + */ + extend( + source: TSource + ): LoDashExplicitObjectWrapper; + + /** + * @see _.assignIn + */ + extend( + source1: TSource1, + source2: TSource2 + ): LoDashExplicitObjectWrapper; + + /** + * @see _.assignIn + */ + extend( + source1: TSource1, + source2: TSource2, + source3: TSource3 + ): LoDashExplicitObjectWrapper; + + /** + * @see _.assignIn + */ + extend( + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4 + ): LoDashExplicitObjectWrapper; + + /** + * @see _.assignIn + */ + extend(): LoDashExplicitObjectWrapper; + + /** + * @see _.assignIn + */ + extend(...otherArgs: any[]): LoDashExplicitObjectWrapper; + } + + interface LoDashStatic { + /** + * @see _.assignInWith + */ + extendWith( + object: TObject, + source: TSource, + customizer: AssignCustomizer + ): TObject & TSource; + + /** + * @see _.assignInWith + */ + extendWith( + object: TObject, + source1: TSource1, + source2: TSource2, + customizer: AssignCustomizer + ): TObject & TSource1 & TSource2; + + /** + * @see _.assignInWith + */ + extendWith( + object: TObject, + source1: TSource1, + source2: TSource2, + source3: TSource3, + customizer: AssignCustomizer + ): TObject & TSource1 & TSource2 & TSource3; + + /** + * @see _.assignInWith + */ + extendWith( + object: TObject, + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4, + customizer: AssignCustomizer + ): TObject & TSource1 & TSource2 & TSource3 & TSource4; + + /** + * @see _.assignInWith + */ + extendWith(object: TObject): TObject; + + /** + * @see _.assignInWith + */ + extendWith( + object: any, + ...otherArgs: any[] + ): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.assignInWith + */ + extendWith( + source: TSource, + customizer: AssignCustomizer + ): LoDashImplicitObjectWrapper; + + /** + * @see _.assignInWith + */ + extendWith( + source1: TSource1, + source2: TSource2, + customizer: AssignCustomizer + ): LoDashImplicitObjectWrapper; + + /** + * @see _.assignInWith + */ + extendWith( + source1: TSource1, + source2: TSource2, + source3: TSource3, + customizer: AssignCustomizer + ): LoDashImplicitObjectWrapper; + + /** + * @see _.assignInWith + */ + extendWith( + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4, + customizer: AssignCustomizer + ): LoDashImplicitObjectWrapper; + + /** + * @see _.assignInWith + */ + extendWith(): LoDashImplicitObjectWrapper; + + /** + * @see _.assignInWith + */ + extendWith(...otherArgs: any[]): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.assignInWith + */ + extendWith( + source: TSource, + customizer: AssignCustomizer + ): LoDashExplicitObjectWrapper; + + /** + * @see _.assignInWith + */ + extendWith( + source1: TSource1, + source2: TSource2, + customizer: AssignCustomizer + ): LoDashExplicitObjectWrapper; + + /** + * @see _.assignInWith + */ + extendWith( + source1: TSource1, + source2: TSource2, + source3: TSource3, + customizer: AssignCustomizer + ): LoDashExplicitObjectWrapper; + + /** + * @see _.assignInWith + */ + extendWith( + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4, + customizer: AssignCustomizer + ): LoDashExplicitObjectWrapper; + + /** + * @see _.assignInWith + */ + extendWith(): LoDashExplicitObjectWrapper; + + /** + * @see _.assignInWith + */ + extendWith(...otherArgs: any[]): LoDashExplicitObjectWrapper; + } + + //_.findKey + interface LoDashStatic { + /** + * This method is like _.find except that it returns the key of the first element predicate returns truthy for + * instead of the element itself. + * + * If a property name is provided for predicate the created _.property style callback returns the property + * value of the given element. + * + * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for + * elements that have a matching property value, else false. + * + * If an object is provided for predicate the created _.matches style callback returns true for elements that + * have the properties of the given object, else false. + * + * @param object The object to search. + * @param predicate The function invoked per iteration. + * @param thisArg The this binding of predicate. + * @return Returns the key of the matched element, else undefined. + */ + findKey( + object: TObject, + predicate?: DictionaryIterator + ): string; + + /** + * @see _.findKey + */ + findKey( + object: TObject, + predicate?: ObjectIterator + ): string; + + /** + * @see _.findKey + */ + findKey( + object: TObject, + predicate?: string + ): string; + + /** + * @see _.findKey + */ + findKey, TObject>( + object: TObject, + predicate?: TWhere + ): string; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.findKey + */ + findKey( + predicate?: DictionaryIterator + ): string; + + /** + * @see _.findKey + */ + findKey( + predicate?: ObjectIterator + ): string; + + /** + * @see _.findKey + */ + findKey( + predicate?: string + ): string; + + /** + * @see _.findKey + */ + findKey>( + predicate?: TWhere + ): string; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.findKey + */ + findKey( + predicate?: DictionaryIterator + ): LoDashExplicitWrapper; + + /** + * @see _.findKey + */ + findKey( + predicate?: ObjectIterator + ): LoDashExplicitWrapper; + + /** + * @see _.findKey + */ + findKey( + predicate?: string + ): LoDashExplicitWrapper; + + /** + * @see _.findKey + */ + findKey>( + predicate?: TWhere + ): LoDashExplicitWrapper; + } + + //_.findLastKey + interface LoDashStatic { + /** + * This method is like _.findKey except that it iterates over elements of a collection in the opposite order. + * + * If a property name is provided for predicate the created _.property style callback returns the property + * value of the given element. + * + * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for + * elements that have a matching property value, else false. + * + * If an object is provided for predicate the created _.matches style callback returns true for elements that + * have the properties of the given object, else false. + * + * @param object The object to search. + * @param predicate The function invoked per iteration. + * @param thisArg The this binding of predicate. + * @return Returns the key of the matched element, else undefined. + */ + findLastKey( + object: TObject, + predicate?: DictionaryIterator + ): string; + + /** + * @see _.findLastKey + */ + findLastKey( + object: TObject, + predicate?: ObjectIterator + ): string; + + /** + * @see _.findLastKey + */ + findLastKey( + object: TObject, + predicate?: string + ): string; + + /** + * @see _.findLastKey + */ + findLastKey, TObject>( + object: TObject, + predicate?: TWhere + ): string; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.findLastKey + */ + findLastKey( + predicate?: DictionaryIterator + ): string; + + /** + * @see _.findLastKey + */ + findLastKey( + predicate?: ObjectIterator + ): string; + + /** + * @see _.findLastKey + */ + findLastKey( + predicate?: string + ): string; + + /** + * @see _.findLastKey + */ + findLastKey>( + predicate?: TWhere + ): string; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.findLastKey + */ + findLastKey( + predicate?: DictionaryIterator + ): LoDashExplicitWrapper; + + /** + * @see _.findLastKey + */ + findLastKey( + predicate?: ObjectIterator + ): LoDashExplicitWrapper; + + /** + * @see _.findLastKey + */ + findLastKey( + predicate?: string + ): LoDashExplicitWrapper; + + /** + * @see _.findLastKey + */ + findLastKey>( + predicate?: TWhere + ): LoDashExplicitWrapper; + } + + //_.forIn + interface LoDashStatic { + /** + * Iterates over own and inherited enumerable properties of an object invoking iteratee for each property. The + * iteratee is bound to thisArg and invoked with three arguments: (value, key, object). Iteratee functions may + * exit iteration early by explicitly returning false. + * + * @param object The object to iterate over. + * @param iteratee The function invoked per iteration. + * @param thisArg The this binding of iteratee. + * @return Returns object. + */ + forIn( + object: Dictionary, + iteratee?: DictionaryIterator + ): Dictionary; + + /** + * @see _.forIn + */ + forIn( + object: T, + iteratee?: ObjectIterator + ): T; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.forIn + */ + forIn( + iteratee?: DictionaryIterator + ): _.LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.forIn + */ + forIn( + iteratee?: DictionaryIterator + ): _.LoDashExplicitObjectWrapper; + } + + //_.forInRight + interface LoDashStatic { + /** + * This method is like _.forIn except that it iterates over properties of object in the opposite order. + * + * @param object The object to iterate over. + * @param iteratee The function invoked per iteration. + * @param thisArg The this binding of iteratee. + * @return Returns object. + */ + forInRight( + object: Dictionary, + iteratee?: DictionaryIterator + ): Dictionary; + + /** + * @see _.forInRight + */ + forInRight( + object: T, + iteratee?: ObjectIterator + ): T; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.forInRight + */ + forInRight( + iteratee?: DictionaryIterator + ): _.LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.forInRight + */ + forInRight( + iteratee?: DictionaryIterator + ): _.LoDashExplicitObjectWrapper; + } + + //_.forOwn + interface LoDashStatic { + /** + * Iterates over own enumerable properties of an object invoking iteratee for each property. The iteratee is + * bound to thisArg and invoked with three arguments: (value, key, object). Iteratee functions may exit + * iteration early by explicitly returning false. + * + * @param object The object to iterate over. + * @param iteratee The function invoked per iteration. + * @param thisArg The this binding of iteratee. + * @return Returns object. + */ + forOwn( + object: Dictionary, + iteratee?: DictionaryIterator + ): Dictionary; + + /** + * @see _.forOwn + */ + forOwn( + object: T, + iteratee?: ObjectIterator + ): T; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.forOwn + */ + forOwn( + iteratee?: DictionaryIterator + ): _.LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.forOwn + */ + forOwn( + iteratee?: DictionaryIterator + ): _.LoDashExplicitObjectWrapper; + } + + //_.forOwnRight + interface LoDashStatic { + /** + * This method is like _.forOwn except that it iterates over properties of object in the opposite order. + * + * @param object The object to iterate over. + * @param iteratee The function invoked per iteration. + * @param thisArg The this binding of iteratee. + * @return Returns object. + */ + forOwnRight( + object: Dictionary, + iteratee?: DictionaryIterator + ): Dictionary; + + /** + * @see _.forOwnRight + */ + forOwnRight( + object: T, + iteratee?: ObjectIterator + ): T; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.forOwnRight + */ + forOwnRight( + iteratee?: DictionaryIterator + ): _.LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.forOwnRight + */ + forOwnRight( + iteratee?: DictionaryIterator + ): _.LoDashExplicitObjectWrapper; + } + + //_.functions + interface LoDashStatic { + /** + * Creates an array of function property names from own enumerable properties + * of `object`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to inspect. + * @returns {Array} Returns the new array of property names. + * @example + * + * function Foo() { + * this.a = _.constant('a'); + * this.b = _.constant('b'); + * } + * + * Foo.prototype.c = _.constant('c'); + * + * _.functions(new Foo); + * // => ['a', 'b'] + */ + functions(object: any): string[]; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.functions + */ + functions(): _.LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.functions + */ + functions(): _.LoDashExplicitArrayWrapper; + } + + //_.functionsIn + interface LoDashStatic { + /** + * Creates an array of function property names from own and inherited + * enumerable properties of `object`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to inspect. + * @returns {Array} Returns the new array of property names. + * @example + * + * function Foo() { + * this.a = _.constant('a'); + * this.b = _.constant('b'); + * } + * + * Foo.prototype.c = _.constant('c'); + * + * _.functionsIn(new Foo); + * // => ['a', 'b', 'c'] + */ + functionsIn(object: any): string[]; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.functionsIn + */ + functionsIn(): _.LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.functionsIn + */ + functionsIn(): _.LoDashExplicitArrayWrapper; + } + + //_.get + interface LoDashStatic { + /** + * Gets the property value at path of object. If the resolved value is undefined the defaultValue is used + * in its place. + * + * @param object The object to query. + * @param path The path of the property to get. + * @param defaultValue The value returned if the resolved value is undefined. + * @return Returns the resolved value. + */ + get( + object: TObject, + path: StringRepresentable|StringRepresentable[], + defaultValue?: TResult + ): TResult; + + /** + * @see _.get + */ + get( + object: any, + path: StringRepresentable|StringRepresentable[], + defaultValue?: TResult + ): TResult; + } + + interface LoDashImplicitWrapper { + /** + * @see _.get + */ + get( + path: StringRepresentable|StringRepresentable[], + defaultValue?: TResult + ): TResult; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.get + */ + get( + path: StringRepresentable|StringRepresentable[], + defaultValue?: TResult + ): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.get + */ + get( + path: StringRepresentable|StringRepresentable[], + defaultValue?: TResult + ): TResult; + } + + interface LoDashExplicitWrapper { + /** + * @see _.get + */ + get( + path: StringRepresentable|StringRepresentable[], + defaultValue?: any + ): TResultWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.get + */ + get( + path: StringRepresentable|StringRepresentable[], + defaultValue?: any + ): TResultWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.get + */ + get( + path: StringRepresentable|StringRepresentable[], + defaultValue?: any + ): TResultWrapper; + } + + //_.has + interface LoDashStatic { + /** + * Checks if `path` is a direct property of `object`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = { 'a': { 'b': { 'c': 3 } } }; + * var other = _.create({ 'a': _.create({ 'b': _.create({ 'c': 3 }) }) }); + * + * _.has(object, 'a'); + * // => true + * + * _.has(object, 'a.b.c'); + * // => true + * + * _.has(object, ['a', 'b', 'c']); + * // => true + * + * _.has(other, 'a'); + * // => false + */ + has( + object: T, + path: StringRepresentable|StringRepresentable[] + ): boolean; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.has + */ + has(path: StringRepresentable|StringRepresentable[]): boolean; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.has + */ + has(path: StringRepresentable|StringRepresentable[]): LoDashExplicitWrapper; + } + + //_.hasIn + interface LoDashStatic { + /** + * Checks if `path` is a direct or inherited property of `object`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = _.create({ 'a': _.create({ 'b': _.create({ 'c': 3 }) }) }); + * + * _.hasIn(object, 'a'); + * // => true + * + * _.hasIn(object, 'a.b.c'); + * // => true + * + * _.hasIn(object, ['a', 'b', 'c']); + * // => true + * + * _.hasIn(object, 'b'); + * // => false + */ + hasIn( + object: T, + path: StringRepresentable|StringRepresentable[] + ): boolean; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.hasIn + */ + hasIn(path: StringRepresentable|StringRepresentable[]): boolean; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.hasIn + */ + hasIn(path: StringRepresentable|StringRepresentable[]): LoDashExplicitWrapper; + } + + //_.invert + interface LoDashStatic { + /** + * Creates an object composed of the inverted keys and values of object. If object contains duplicate values, + * subsequent values overwrite property assignments of previous values unless multiValue is true. + * + * @param object The object to invert. + * @param multiValue Allow multiple values per key. + * @return Returns the new inverted object. + */ + invert( + object: T, + multiValue?: boolean + ): TResult; + + /** + * @see _.invert + */ + invert( + object: Object, + multiValue?: boolean + ): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.invert + */ + invert(multiValue?: boolean): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.invert + */ + invert(multiValue?: boolean): LoDashExplicitObjectWrapper; + } + + //_.inverBy + interface InvertByIterator { + (value: T): any; + } + + interface LoDashStatic { + /** + * This method is like _.invert except that the inverted object is generated from the results of running each + * element of object through iteratee. The corresponding inverted value of each inverted key is an array of + * keys responsible for generating the inverted value. The iteratee is invoked with one argument: (value). + * + * @param object The object to invert. + * @param interatee The iteratee invoked per element. + * @return Returns the new inverted object. + */ + invertBy( + object: Object, + interatee?: InvertByIterator|string + ): Dictionary; + + /** + * @see _.invertBy + */ + invertBy( + object: _.Dictionary|_.NumericDictionary, + interatee?: InvertByIterator|string + ): Dictionary; + + /** + * @see _.invertBy + */ + invertBy( + object: Object, + interatee?: W + ): Dictionary; + + /** + * @see _.invertBy + */ + invertBy( + object: _.Dictionary, + interatee?: W + ): Dictionary; + } + + interface LoDashImplicitWrapper { + /** + * @see _.invertBy + */ + invertBy( + interatee?: InvertByIterator + ): LoDashImplicitObjectWrapper>; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.invertBy + */ + invertBy( + interatee?: InvertByIterator|string + ): LoDashImplicitObjectWrapper>; + + /** + * @see _.invertBy + */ + invertBy( + interatee?: W + ): LoDashImplicitObjectWrapper>; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.invertBy + */ + invertBy( + interatee?: InvertByIterator|string + ): LoDashImplicitObjectWrapper>; + + /** + * @see _.invertBy + */ + invertBy( + interatee?: W + ): LoDashImplicitObjectWrapper>; + } + + interface LoDashExplicitWrapper { + /** + * @see _.invertBy + */ + invertBy( + interatee?: InvertByIterator + ): LoDashExplicitObjectWrapper>; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.invertBy + */ + invertBy( + interatee?: InvertByIterator|string + ): LoDashExplicitObjectWrapper>; + + /** + * @see _.invertBy + */ + invertBy( + interatee?: W + ): LoDashExplicitObjectWrapper>; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.invertBy + */ + invertBy( + interatee?: InvertByIterator|string + ): LoDashExplicitObjectWrapper>; + + /** + * @see _.invertBy + */ + invertBy( + interatee?: W + ): LoDashExplicitObjectWrapper>; + } + + //_.keys + interface LoDashStatic { + /** + * Creates an array of the own enumerable property names of object. + * + * Note: Non-object values are coerced to objects. See the ES spec for more details. + * + * @param object The object to query. + * @return Returns the array of property names. + */ + keys(object?: any): string[]; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.keys + */ + keys(): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.keys + */ + keys(): LoDashExplicitArrayWrapper; + } + + //_.keysIn + interface LoDashStatic { + /** + * Creates an array of the own and inherited enumerable property names of object. + * + * Note: Non-object values are coerced to objects. + * + * @param object The object to query. + * @return An array of property names. + */ + keysIn(object?: any): string[]; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.keysIn + */ + keysIn(): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.keysIn + */ + keysIn(): LoDashExplicitArrayWrapper; + } + + //_.mapKeys + interface LoDashStatic { + /** + * The opposite of _.mapValues; this method creates an object with the same values as object and keys generated + * by running each own enumerable property of object through iteratee. + * + * @param object The object to iterate over. + * @param iteratee The function invoked per iteration. + * @param thisArg The this binding of iteratee. + * @return Returns the new mapped object. + */ + mapKeys( + object: List, + iteratee?: ListIterator + ): Dictionary; + + /** + * @see _.mapKeys + */ + mapKeys( + object: Dictionary, + iteratee?: DictionaryIterator + ): Dictionary; + + /** + * @see _.mapKeys + */ + mapKeys( + object: List|Dictionary, + iteratee?: TObject + ): Dictionary; + + /** + * @see _.mapKeys + */ + mapKeys( + object: List|Dictionary, + iteratee?: string + ): Dictionary; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.mapKeys + */ + mapKeys( + iteratee?: ListIterator + ): LoDashImplicitObjectWrapper>; + + /** + * @see _.mapKeys + */ + mapKeys( + iteratee?: TObject + ): LoDashImplicitObjectWrapper>; + + /** + * @see _.mapKeys + */ + mapKeys( + iteratee?: string + ): LoDashImplicitObjectWrapper>; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.mapKeys + */ + mapKeys( + iteratee?: ListIterator|DictionaryIterator + ): LoDashImplicitObjectWrapper>; + + /** + * @see _.mapKeys + */ + mapKeys( + iteratee?: TObject + ): LoDashImplicitObjectWrapper>; + + /** + * @see _.mapKeys + */ + mapKeys( + iteratee?: string + ): LoDashImplicitObjectWrapper>; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.mapKeys + */ + mapKeys( + iteratee?: ListIterator + ): LoDashExplicitObjectWrapper>; + + /** + * @see _.mapKeys + */ + mapKeys( + iteratee?: TObject + ): LoDashExplicitObjectWrapper>; + + /** + * @see _.mapKeys + */ + mapKeys( + iteratee?: string + ): LoDashExplicitObjectWrapper>; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.mapKeys + */ + mapKeys( + iteratee?: ListIterator|DictionaryIterator + ): LoDashExplicitObjectWrapper>; + + /** + * @see _.mapKeys + */ + mapKeys( + iteratee?: TObject + ): LoDashExplicitObjectWrapper>; + + /** + * @see _.mapKeys + */ + mapKeys( + iteratee?: string + ): LoDashExplicitObjectWrapper>; + } + + //_.mapValues + interface LoDashStatic { + /** + * Creates an object with the same keys as object and values generated by running each own + * enumerable property of object through iteratee. The iteratee function is bound to thisArg + * and invoked with three arguments: (value, key, object). + * + * If a property name is provided iteratee the created "_.property" style callback returns + * the property value of the given element. + * + * If a value is also provided for thisArg the creted "_.matchesProperty" style callback returns + * true for elements that have a matching property value, else false;. + * + * If an object is provided for iteratee the created "_.matches" style callback returns true + * for elements that have the properties of the given object, else false. + * + * @param {Object} object The object to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked per iteration. + * @param {Object} [thisArg] The `this` binding of `iteratee`. + * @return {Object} Returns the new mapped object. + */ + mapValues(obj: Dictionary, callback: ObjectIterator): Dictionary; + mapValues(obj: Dictionary, where: Dictionary): Dictionary; + mapValues(obj: T, pluck: string): TMapped; + mapValues(obj: T, callback: ObjectIterator): T; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.mapValues + * TValue is the type of the property values of T. + * TResult is the type output by the ObjectIterator function + */ + mapValues(callback: ObjectIterator): LoDashImplicitObjectWrapper>; + + /** + * @see _.mapValues + * TResult is the type of the property specified by pluck. + * T should be a Dictionary> + */ + mapValues(pluck: string): LoDashImplicitObjectWrapper>; + + /** + * @see _.mapValues + * TResult is the type of the properties of each object in the values of T + * T should be a Dictionary> + */ + mapValues(where: Dictionary): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.mapValues + * TValue is the type of the property values of T. + * TResult is the type output by the ObjectIterator function + */ + mapValues(callback: ObjectIterator): LoDashExplicitObjectWrapper>; + + /** + * @see _.mapValues + * TResult is the type of the property specified by pluck. + * T should be a Dictionary> + */ + mapValues(pluck: string): LoDashExplicitObjectWrapper>; + + /** + * @see _.mapValues + * TResult is the type of the properties of each object in the values of T + * T should be a Dictionary> + */ + mapValues(where: Dictionary): LoDashExplicitObjectWrapper; + } + + //_.merge + interface LoDashStatic { + /** + * Recursively merges own and inherited enumerable properties of source + * objects into the destination object, skipping source properties that resolve + * to `undefined`. Array and plain object properties are merged recursively. + * Other objects and value types are overridden by assignment. Source objects + * are applied from left to right. Subsequent sources overwrite property + * assignments of previous sources. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @example + * + * var users = { + * 'data': [{ 'user': 'barney' }, { 'user': 'fred' }] + * }; + * + * var ages = { + * 'data': [{ 'age': 36 }, { 'age': 40 }] + * }; + * + * _.merge(users, ages); + * // => { 'data': [{ 'user': 'barney', 'age': 36 }, { 'user': 'fred', 'age': 40 }] } + */ + merge( + object: TObject, + source: TSource + ): TObject & TSource; + + /** + * @see _.merge + */ + merge( + object: TObject, + source1: TSource1, + source2: TSource2 + ): TObject & TSource1 & TSource2; + + /** + * @see _.merge + */ + merge( + object: TObject, + source1: TSource1, + source2: TSource2, + source3: TSource3 + ): TObject & TSource1 & TSource2 & TSource3; + + /** + * @see _.merge + */ + merge( + object: TObject, + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4 + ): TObject & TSource1 & TSource2 & TSource3 & TSource4; + + /** + * @see _.merge + */ + merge( + object: any, + ...otherArgs: any[] + ): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.merge + */ + merge( + source: TSource + ): LoDashImplicitObjectWrapper; + + /** + * @see _.merge + */ + merge( + source1: TSource1, + source2: TSource2 + ): LoDashImplicitObjectWrapper; + + /** + * @see _.merge + */ + merge( + source1: TSource1, + source2: TSource2, + source3: TSource3 + ): LoDashImplicitObjectWrapper; + + /** + * @see _.merge + */ + merge( + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4 + ): LoDashImplicitObjectWrapper; + + /** + * @see _.merge + */ + merge( + ...otherArgs: any[] + ): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.merge + */ + merge( + source: TSource + ): LoDashExplicitObjectWrapper; + + /** + * @see _.merge + */ + merge( + source1: TSource1, + source2: TSource2 + ): LoDashExplicitObjectWrapper; + + /** + * @see _.merge + */ + merge( + source1: TSource1, + source2: TSource2, + source3: TSource3 + ): LoDashExplicitObjectWrapper; + + /** + * @see _.merge + */ + merge( + ): LoDashExplicitObjectWrapper; + + /** + * @see _.merge + */ + merge( + ...otherArgs: any[] + ): LoDashExplicitObjectWrapper; + } + + //_.mergeWith + interface MergeWithCustomizer { + (value: any, srcValue: any, key?: string, object?: Object, source?: Object): any; + } + + interface LoDashStatic { + /** + * This method is like `_.merge` except that it accepts `customizer` which + * is invoked to produce the merged values of the destination and source + * properties. If `customizer` returns `undefined` merging is handled by the + * method instead. The `customizer` is invoked with seven arguments: + * (objValue, srcValue, key, object, source, stack). + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} customizer The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * function customizer(objValue, srcValue) { + * if (_.isArray(objValue)) { + * return objValue.concat(srcValue); + * } + * } + * + * var object = { + * 'fruits': ['apple'], + * 'vegetables': ['beet'] + * }; + * + * var other = { + * 'fruits': ['banana'], + * 'vegetables': ['carrot'] + * }; + * + * _.merge(object, other, customizer); + * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot'] } + */ + mergeWith( + object: TObject, + source: TSource, + customizer: MergeWithCustomizer + ): TObject & TSource; + + /** + * @see _.mergeWith + */ + mergeWith( + object: TObject, + source1: TSource1, + source2: TSource2, + customizer: MergeWithCustomizer + ): TObject & TSource1 & TSource2; + + /** + * @see _.mergeWith + */ + mergeWith( + object: TObject, + source1: TSource1, + source2: TSource2, + source3: TSource3, + customizer: MergeWithCustomizer + ): TObject & TSource1 & TSource2 & TSource3; + + /** + * @see _.mergeWith + */ + mergeWith( + object: TObject, + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4, + customizer: MergeWithCustomizer + ): TObject & TSource1 & TSource2 & TSource3 & TSource4; + + /** + * @see _.mergeWith + */ + mergeWith( + object: any, + ...otherArgs: any[] + ): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.mergeWith + */ + mergeWith( + source: TSource, + customizer: MergeWithCustomizer + ): LoDashImplicitObjectWrapper; + + /** + * @see _.mergeWith + */ + mergeWith( + source1: TSource1, + source2: TSource2, + customizer: MergeWithCustomizer + ): LoDashImplicitObjectWrapper; + + /** + * @see _.mergeWith + */ + mergeWith( + source1: TSource1, + source2: TSource2, + source3: TSource3, + customizer: MergeWithCustomizer + ): LoDashImplicitObjectWrapper; + + /** + * @see _.mergeWith + */ + mergeWith( + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4, + customizer: MergeWithCustomizer + ): LoDashImplicitObjectWrapper; + + /** + * @see _.mergeWith + */ + mergeWith( + ...otherArgs: any[] + ): LoDashImplicitObjectWrapper; + } + + //_.omit + interface LoDashStatic { + /** + * The opposite of `_.pick`; this method creates an object composed of the + * own and inherited enumerable properties of `object` that are not omitted. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [props] The property names to omit, specified + * individually or in arrays.. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.omit(object, ['a', 'c']); + * // => { 'b': '2' } + */ + + omit( + object: T, + ...predicate: (StringRepresentable|StringRepresentable[])[] + ): TResult; + } + + interface LoDashImplicitObjectWrapper { + + /** + * @see _.omit + */ + omit( + ...predicate: (StringRepresentable|StringRepresentable[])[] + ): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + + /** + * @see _.omit + */ + omit( + ...predicate: (StringRepresentable|StringRepresentable[])[] + ): LoDashExplicitObjectWrapper; + } + + //_.omitBy + interface LoDashStatic { + /** + * The opposite of `_.pickBy`; this method creates an object composed of the + * own and inherited enumerable properties of `object` that `predicate` + * doesn't return truthy for. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {Function|Object|string} [predicate=_.identity] The function invoked per property. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.omitBy(object, _.isNumber); + * // => { 'b': '2' } + */ + omitBy( + object: T, + predicate: ObjectIterator + ): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.omitBy + */ + omitBy( + predicate: ObjectIterator + ): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.omitBy + */ + omitBy( + predicate: ObjectIterator + ): LoDashExplicitObjectWrapper; + } + + //_.pick + interface LoDashStatic { + /** + * Creates an object composed of the picked `object` properties. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [props] The property names to pick, specified + * individually or in arrays. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pick(object, ['a', 'c']); + * // => { 'a': 1, 'c': 3 } + */ + pick( + object: T, + ...predicate: (StringRepresentable|StringRepresentable[])[] + ): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.pick + */ + pick( + ...predicate: (StringRepresentable|StringRepresentable[])[] + ): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.pick + */ + pick( + ...predicate: (StringRepresentable|StringRepresentable[])[] + ): LoDashExplicitObjectWrapper; + } + + //_.pickBy + interface LoDashStatic { + /** + * Creates an object composed of the `object` properties `predicate` returns + * truthy for. The predicate is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {Function|Object|string} [predicate=_.identity] The function invoked per property. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pickBy(object, _.isNumber); + * // => { 'a': 1, 'c': 3 } + */ + pickBy( + object: T, + predicate?: ObjectIterator + ): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.pickBy + */ + pickBy( + predicate?: ObjectIterator + ): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.pickBy + */ + pickBy( + predicate?: ObjectIterator + ): LoDashExplicitObjectWrapper; + } + + //_.result + interface LoDashStatic { + /** + * This method is like _.get except that if the resolved value is a function it’s invoked with the this binding + * of its parent object and its result is returned. + * + * @param object The object to query. + * @param path The path of the property to resolve. + * @param defaultValue The value returned if the resolved value is undefined. + * @return Returns the resolved value. + */ + result( + object: TObject, + path: StringRepresentable|StringRepresentable[], + defaultValue?: TResult|((...args: any[]) => TResult) + ): TResult; + + /** + * @see _.result + */ + result( + object: any, + path: StringRepresentable|StringRepresentable[], + defaultValue?: TResult|((...args: any[]) => TResult) + ): TResult; + } + + interface LoDashImplicitWrapper { + /** + * @see _.result + */ + result( + path: StringRepresentable|StringRepresentable[], + defaultValue?: TResult|((...args: any[]) => TResult) + ): TResult; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.result + */ + result( + path: StringRepresentable|StringRepresentable[], + defaultValue?: TResult|((...args: any[]) => TResult) + ): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.result + */ + result( + path: StringRepresentable|StringRepresentable[], + defaultValue?: TResult|((...args: any[]) => TResult) + ): TResult; + } + + interface LoDashExplicitWrapper { + /** + * @see _.result + */ + result( + path: StringRepresentable|StringRepresentable[], + defaultValue?: any + ): TResultWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.result + */ + result( + path: StringRepresentable|StringRepresentable[], + defaultValue?: any + ): TResultWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.result + */ + result( + path: StringRepresentable|StringRepresentable[], + defaultValue?: any + ): TResultWrapper; + } + + //_.set + interface LoDashStatic { + /** + * Sets the value at path of object. If a portion of path doesn’t exist it’s created. Arrays are created for + * missing index properties while objects are created for all other missing properties. Use _.setWith to + * customize path creation. + * + * @param object The object to modify. + * @param path The path of the property to set. + * @param value The value to set. + * @return Returns object. + */ + set( + object: Object, + path: StringRepresentable|StringRepresentable[], + value: any + ): TResult; + + /** + * @see _.set + */ + set( + object: Object, + path: StringRepresentable|StringRepresentable[], + value: V + ): TResult; + + /** + * @see _.set + */ + set( + object: O, + path: StringRepresentable|StringRepresentable[], + value: V + ): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.set + */ + set( + path: StringRepresentable|StringRepresentable[], + value: any + ): LoDashImplicitObjectWrapper; + + /** + * @see _.set + */ + set( + path: StringRepresentable|StringRepresentable[], + value: V + ): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.set + */ + set( + path: StringRepresentable|StringRepresentable[], + value: any + ): LoDashExplicitObjectWrapper; + + /** + * @see _.set + */ + set( + path: StringRepresentable|StringRepresentable[], + value: V + ): LoDashExplicitObjectWrapper; + } + + //_.setWith + interface SetWithCustomizer { + (nsValue: any, key: string, nsObject: T): any; + } + + interface LoDashStatic { + /** + * This method is like _.set except that it accepts customizer which is invoked to produce the objects of + * path. If customizer returns undefined path creation is handled by the method instead. The customizer is + * invoked with three arguments: (nsValue, key, nsObject). + * + * @param object The object to modify. + * @param path The path of the property to set. + * @param value The value to set. + * @parem customizer The function to customize assigned values. + * @return Returns object. + */ + setWith( + object: Object, + path: StringRepresentable|StringRepresentable[], + value: any, + customizer?: SetWithCustomizer + ): TResult; + + /** + * @see _.setWith + */ + setWith( + object: Object, + path: StringRepresentable|StringRepresentable[], + value: V, + customizer?: SetWithCustomizer + ): TResult; + + /** + * @see _.setWith + */ + setWith( + object: O, + path: StringRepresentable|StringRepresentable[], + value: V, + customizer?: SetWithCustomizer + ): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.setWith + */ + setWith( + path: StringRepresentable|StringRepresentable[], + value: any, + customizer?: SetWithCustomizer + ): LoDashImplicitObjectWrapper; + + /** + * @see _.setWith + */ + setWith( + path: StringRepresentable|StringRepresentable[], + value: V, + customizer?: SetWithCustomizer + ): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.setWith + */ + setWith( + path: StringRepresentable|StringRepresentable[], + value: any, + customizer?: SetWithCustomizer + ): LoDashExplicitObjectWrapper; + + /** + * @see _.setWith + */ + setWith( + path: StringRepresentable|StringRepresentable[], + value: V, + customizer?: SetWithCustomizer + ): LoDashExplicitObjectWrapper; + } + + //_.toPairs + interface LoDashStatic { + /** + * Creates an array of own enumerable key-value pairs for object. + * + * @param object The object to query. + * @return Returns the new array of key-value pairs. + */ + toPairs(object?: T): any[][]; + + toPairs(object?: T): TResult[][]; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.toPairs + */ + toPairs(): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.toPairs + */ + toPairs(): LoDashExplicitArrayWrapper; + } + + //_.toPairsIn + interface LoDashStatic { + /** + * Creates an array of own and inherited enumerable key-value pairs for object. + * + * @param object The object to query. + * @return Returns the new array of key-value pairs. + */ + toPairsIn(object?: T): any[][]; + + toPairsIn(object?: T): TResult[][]; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.toPairsIn + */ + toPairsIn(): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.toPairsIn + */ + toPairsIn(): LoDashExplicitArrayWrapper; + } + + //_.transform + interface LoDashStatic { + /** + * An alternative to _.reduce; this method transforms object to a new accumulator object which is the result of + * running each of its own enumerable properties through iteratee, with each invocation potentially mutating + * the accumulator object. The iteratee is bound to thisArg and invoked with four arguments: (accumulator, + * value, key, object). Iteratee functions may exit iteration early by explicitly returning false. + * + * @param object The object to iterate over. + * @param iteratee The function invoked per iteration. + * @param accumulator The custom accumulator value. + * @param thisArg The this binding of iteratee. + * @return Returns the accumulated value. + */ + transform( + object: T[], + iteratee?: MemoVoidArrayIterator, + accumulator?: TResult[] + ): TResult[]; + + /** + * @see _.transform + */ + transform( + object: T[], + iteratee?: MemoVoidArrayIterator>, + accumulator?: Dictionary + ): Dictionary; + + /** + * @see _.transform + */ + transform( + object: Dictionary, + iteratee?: MemoVoidDictionaryIterator>, + accumulator?: Dictionary + ): Dictionary; + + /** + * @see _.transform + */ + transform( + object: Dictionary, + iteratee?: MemoVoidDictionaryIterator, + accumulator?: TResult[] + ): TResult[]; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.transform + */ + transform( + iteratee?: MemoVoidArrayIterator, + accumulator?: TResult[] + ): LoDashImplicitArrayWrapper; + + /** + * @see _.transform + */ + transform( + iteratee?: MemoVoidArrayIterator>, + accumulator?: Dictionary + ): LoDashImplicitObjectWrapper>; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.transform + */ + transform( + iteratee?: MemoVoidDictionaryIterator>, + accumulator?: Dictionary + ): LoDashImplicitObjectWrapper>; + + /** + * @see _.transform + */ + transform( + iteratee?: MemoVoidDictionaryIterator, + accumulator?: TResult[] + ): LoDashImplicitArrayWrapper; + } + + //_.unset + interface LoDashStatic { + /** + * Removes the property at path of object. + * + * Note: This method mutates object. + * + * @param object The object to modify. + * @param path The path of the property to unset. + * @return Returns true if the property is deleted, else false. + */ + unset( + object: T, + path: StringRepresentable|StringRepresentable[] + ): boolean; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.unset + */ + unset(path: StringRepresentable|StringRepresentable[]): LoDashImplicitWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.unset + */ + unset(path: StringRepresentable|StringRepresentable[]): LoDashExplicitWrapper; + } + + //_.update + interface LoDashStatic { + /** + * This method is like _.set except that accepts updater to produce the value to set. Use _.updateWith to + * customize path creation. The updater is invoked with one argument: (value). + * + * @param object The object to modify. + * @param path The path of the property to set. + * @param updater The function to produce the updated value. + * @return Returns object. + */ + update( + object: Object, + path: StringRepresentable|StringRepresentable[], + updater: Function + ): TResult; + + /** + * @see _.update + */ + update( + object: Object, + path: StringRepresentable|StringRepresentable[], + updater: U + ): TResult; + + /** + * @see _.update + */ + update( + object: O, + path: StringRepresentable|StringRepresentable[], + updater: Function + ): TResult; + + /** + * @see _.update + */ + update( + object: O, + path: StringRepresentable|StringRepresentable[], + updater: U + ): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.update + */ + update( + path: StringRepresentable|StringRepresentable[], + updater: any + ): LoDashImplicitObjectWrapper; + + /** + * @see _.update + */ + update( + path: StringRepresentable|StringRepresentable[], + updater: U + ): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.update + */ + update( + path: StringRepresentable|StringRepresentable[], + updater: any + ): LoDashExplicitObjectWrapper; + + /** + * @see _.update + */ + update( + path: StringRepresentable|StringRepresentable[], + updater: U + ): LoDashExplicitObjectWrapper; + } + + //_.values + interface LoDashStatic { + /** + * Creates an array of the own enumerable property values of object. + * + * @param object The object to query. + * @return Returns an array of property values. + */ + values(object?: Dictionary): T[]; + + /** + * @see _.values + */ + values(object?: any): T[]; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.values + */ + values(): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.values + */ + values(): LoDashExplicitArrayWrapper; + } + + //_.valuesIn + interface LoDashStatic { + /** + * Creates an array of the own and inherited enumerable property values of object. + * + * @param object The object to query. + * @return Returns the array of property values. + */ + valuesIn(object?: Dictionary): T[]; + + /** + * @see _.valuesIn + */ + valuesIn(object?: any): T[]; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.valuesIn + */ + valuesIn(): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.valuesIn + */ + valuesIn(): LoDashExplicitArrayWrapper; + } + + /********** + * String * + **********/ + + //_.camelCase + interface LoDashStatic { + /** + * Converts string to camel case. + * + * @param string The string to convert. + * @return Returns the camel cased string. + */ + camelCase(string?: string): string; + } + + interface LoDashImplicitWrapper { + /** + * @see _.camelCase + */ + camelCase(): string; + } + + interface LoDashExplicitWrapper { + /** + * @see _.camelCase + */ + camelCase(): LoDashExplicitWrapper; + } + + //_.capitalize + interface LoDashStatic { + /** + * Converts the first character of string to upper case and the remaining to lower case. + * + * @param string The string to capitalize. + * @return Returns the capitalized string. + */ + capitalize(string?: string): string; + } + + interface LoDashImplicitWrapper { + /** + * @see _.capitalize + */ + capitalize(): string; + } + + interface LoDashExplicitWrapper { + /** + * @see _.capitalize + */ + capitalize(): LoDashExplicitWrapper; + } + + //_.deburr + interface LoDashStatic { + /** + * Deburrs string by converting latin-1 supplementary letters to basic latin letters and removing combining + * diacritical marks. + * + * @param string The string to deburr. + * @return Returns the deburred string. + */ + deburr(string?: string): string; + } + + interface LoDashImplicitWrapper { + /** + * @see _.deburr + */ + deburr(): string; + } + + interface LoDashExplicitWrapper { + /** + * @see _.deburr + */ + deburr(): LoDashExplicitWrapper; + } + + //_.endsWith + interface LoDashStatic { + /** + * Checks if string ends with the given target string. + * + * @param string The string to search. + * @param target The string to search for. + * @param position The position to search from. + * @return Returns true if string ends with target, else false. + */ + endsWith( + string?: string, + target?: string, + position?: number + ): boolean; + } + + interface LoDashImplicitWrapper { + /** + * @see _.endsWith + */ + endsWith( + target?: string, + position?: number + ): boolean; + } + + interface LoDashExplicitWrapper { + /** + * @see _.endsWith + */ + endsWith( + target?: string, + position?: number + ): LoDashExplicitWrapper; + } + + // _.escape + interface LoDashStatic { + /** + * Converts the characters "&", "<", ">", '"', "'", and "`" in string to their corresponding HTML entities. + * + * Note: No other characters are escaped. To escape additional characters use a third-party library like he. + * + * hough the ">" character is escaped for symmetry, characters like ">" and "/" don’t need escaping in HTML + * and have no special meaning unless they're part of a tag or unquoted attribute value. See Mathias Bynens’s + * article (under "semi-related fun fact") for more details. + * + * Backticks are escaped because in IE < 9, they can break out of attribute values or HTML comments. See #59, + * #102, #108, and #133 of the HTML5 Security Cheatsheet for more details. + * + * When working with HTML you should always quote attribute values to reduce XSS vectors. + * + * @param string The string to escape. + * @return Returns the escaped string. + */ + escape(string?: string): string; + } + + interface LoDashImplicitWrapper { + /** + * @see _.escape + */ + escape(): string; + } + + interface LoDashExplicitWrapper { + /** + * @see _.escape + */ + escape(): LoDashExplicitWrapper; + } + + // _.escapeRegExp + interface LoDashStatic { + /** + * Escapes the RegExp special characters "^", "$", "\", ".", "*", "+", "?", "(", ")", "[", "]", + * "{", "}", and "|" in string. + * + * @param string The string to escape. + * @return Returns the escaped string. + */ + escapeRegExp(string?: string): string; + } + + interface LoDashImplicitWrapper { + /** + * @see _.escapeRegExp + */ + escapeRegExp(): string; + } + + interface LoDashExplicitWrapper { + /** + * @see _.escapeRegExp + */ + escapeRegExp(): LoDashExplicitWrapper; + } + + //_.kebabCase + interface LoDashStatic { + /** + * Converts string to kebab case. + * + * @param string The string to convert. + * @return Returns the kebab cased string. + */ + kebabCase(string?: string): string; + } + + interface LoDashImplicitWrapper { + /** + * @see _.kebabCase + */ + kebabCase(): string; + } + + interface LoDashExplicitWrapper { + /** + * @see _.kebabCase + */ + kebabCase(): LoDashExplicitWrapper; + } + + //_.lowerCase + interface LoDashStatic { + /** + * Converts `string`, as space separated words, to lower case. + * + * @param string The string to convert. + * @return Returns the lower cased string. + */ + lowerCase(string?: string): string; + } + + interface LoDashImplicitWrapper { + /** + * @see _.lowerCase + */ + lowerCase(): string; + } + + interface LoDashExplicitWrapper { + /** + * @see _.lowerCase + */ + lowerCase(): LoDashExplicitWrapper; + } + + //_.lowerFirst + interface LoDashStatic { + /** + * Converts the first character of `string` to lower case. + * + * @param string The string to convert. + * @return Returns the converted string. + */ + lowerFirst(string?: string): string; + } + + interface LoDashImplicitWrapper { + /** + * @see _.lowerFirst + */ + lowerFirst(): string; + } + + interface LoDashExplicitWrapper { + /** + * @see _.lowerFirst + */ + lowerFirst(): LoDashExplicitWrapper; + } + + //_.pad + interface LoDashStatic { + /** + * Pads string on the left and right sides if it’s shorter than length. Padding characters are truncated if + * they can’t be evenly divided by length. + * + * @param string The string to pad. + * @param length The padding length. + * @param chars The string used as padding. + * @return Returns the padded string. + */ + pad( + string?: string, + length?: number, + chars?: string + ): string; + } + + interface LoDashImplicitWrapper { + /** + * @see _.pad + */ + pad( + length?: number, + chars?: string + ): string; + } + + interface LoDashExplicitWrapper { + /** + * @see _.pad + */ + pad( + length?: number, + chars?: string + ): LoDashExplicitWrapper; + } + + //_.padEnd + interface LoDashStatic { + /** + * Pads string on the right side if it’s shorter than length. Padding characters are truncated if they exceed + * length. + * + * @param string The string to pad. + * @param length The padding length. + * @param chars The string used as padding. + * @return Returns the padded string. + */ + padEnd( + string?: string, + length?: number, + chars?: string + ): string; + } + + interface LoDashImplicitWrapper { + /** + * @see _.padEnd + */ + padEnd( + length?: number, + chars?: string + ): string; + } + + interface LoDashExplicitWrapper { + /** + * @see _.padEnd + */ + padEnd( + length?: number, + chars?: string + ): LoDashExplicitWrapper; + } + + //_.padStart + interface LoDashStatic { + /** + * Pads string on the left side if it’s shorter than length. Padding characters are truncated if they exceed + * length. + * + * @param string The string to pad. + * @param length The padding length. + * @param chars The string used as padding. + * @return Returns the padded string. + */ + padStart( + string?: string, + length?: number, + chars?: string + ): string; + } + + interface LoDashImplicitWrapper { + /** + * @see _.padStart + */ + padStart( + length?: number, + chars?: string + ): string; + } + + interface LoDashExplicitWrapper { + /** + * @see _.padStart + */ + padStart( + length?: number, + chars?: string + ): LoDashExplicitWrapper; + } + + //_.parseInt + interface LoDashStatic { + /** + * Converts string to an integer of the specified radix. If radix is undefined or 0, a radix of 10 is used + * unless value is a hexadecimal, in which case a radix of 16 is used. + * + * Note: This method aligns with the ES5 implementation of parseInt. + * + * @param string The string to convert. + * @param radix The radix to interpret value by. + * @return Returns the converted integer. + */ + parseInt( + string: string, + radix?: number + ): number; + } + + interface LoDashImplicitWrapper { + /** + * @see _.parseInt + */ + parseInt(radix?: number): number; + } + + interface LoDashExplicitWrapper { + /** + * @see _.parseInt + */ + parseInt(radix?: number): LoDashExplicitWrapper; + } + + //_.repeat + interface LoDashStatic { + /** + * Repeats the given string n times. + * + * @param string The string to repeat. + * @param n The number of times to repeat the string. + * @return Returns the repeated string. + */ + repeat( + string?: string, + n?: number + ): string; + } + + interface LoDashImplicitWrapper { + /** + * @see _.repeat + */ + repeat(n?: number): string; + } + + interface LoDashExplicitWrapper { + /** + * @see _.repeat + */ + repeat(n?: number): LoDashExplicitWrapper; + } + + //_.replace + interface LoDashStatic { + /** + * Replaces matches for pattern in string with replacement. + * + * Note: This method is based on String#replace. + * + * @param string + * @param pattern + * @param replacement + * @return Returns the modified string. + */ + replace( + string: string, + pattern: RegExp|string, + replacement: Function|string + ): string; + + /** + * @see _.replace + */ + replace( + pattern?: RegExp|string, + replacement?: Function|string + ): string; + } + + interface LoDashImplicitWrapper { + /** + * @see _.replace + */ + replace( + pattern?: RegExp|string, + replacement?: Function|string + ): string; + + /** + * @see _.replace + */ + replace( + replacement?: Function|string + ): string; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.replace + */ + replace( + pattern?: RegExp|string, + replacement?: Function|string + ): string; + + /** + * @see _.replace + */ + replace( + replacement?: Function|string + ): string; + } + + interface LoDashExplicitWrapper { + /** + * @see _.replace + */ + replace( + pattern?: RegExp|string, + replacement?: Function|string + ): LoDashExplicitWrapper; + + /** + * @see _.replace + */ + replace( + replacement?: Function|string + ): LoDashExplicitWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.replace + */ + replace( + pattern?: RegExp|string, + replacement?: Function|string + ): LoDashExplicitWrapper; + + /** + * @see _.replace + */ + replace( + replacement?: Function|string + ): LoDashExplicitWrapper; + } + + //_.snakeCase + interface LoDashStatic { + /** + * Converts string to snake case. + * + * @param string The string to convert. + * @return Returns the snake cased string. + */ + snakeCase(string?: string): string; + } + + interface LoDashImplicitWrapper { + /** + * @see _.snakeCase + */ + snakeCase(): string; + } + + interface LoDashExplicitWrapper { + /** + * @see _.snakeCase + */ + snakeCase(): LoDashExplicitWrapper; + } + + //_.split + interface LoDashStatic { + /** + * Splits string by separator. + * + * Note: This method is based on String#split. + * + * @param string + * @param separator + * @param limit + * @return Returns the new array of string segments. + */ + split( + string: string, + separator?: RegExp|string, + limit?: number + ): string[]; + } + + interface LoDashImplicitWrapper { + /** + * @see _.split + */ + split( + separator?: RegExp|string, + limit?: number + ): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.split + */ + split( + separator?: RegExp|string, + limit?: number + ): LoDashExplicitArrayWrapper; + } + + //_.startCase + interface LoDashStatic { + /** + * Converts string to start case. + * + * @param string The string to convert. + * @return Returns the start cased string. + */ + startCase(string?: string): string; + } + + interface LoDashImplicitWrapper { + /** + * @see _.startCase + */ + startCase(): string; + } + + interface LoDashExplicitWrapper { + /** + * @see _.startCase + */ + startCase(): LoDashExplicitWrapper; + } + + //_.startsWith + interface LoDashStatic { + /** + * Checks if string starts with the given target string. + * + * @param string The string to search. + * @param target The string to search for. + * @param position The position to search from. + * @return Returns true if string starts with target, else false. + */ + startsWith( + string?: string, + target?: string, + position?: number + ): boolean; + } + + interface LoDashImplicitWrapper { + /** + * @see _.startsWith + */ + startsWith( + target?: string, + position?: number + ): boolean; + } + + interface LoDashExplicitWrapper { + /** + * @see _.startsWith + */ + startsWith( + target?: string, + position?: number + ): LoDashExplicitWrapper; + } + + //_.template + interface TemplateOptions extends TemplateSettings { + /** + * The sourceURL of the template's compiled source. + */ + sourceURL?: string; + } + + interface TemplateExecutor { + (data?: Object): string; + source: string; + } + + interface LoDashStatic { + /** + * Creates a compiled template function that can interpolate data properties in "interpolate" delimiters, + * HTML-escape interpolated data properties in "escape" delimiters, and execute JavaScript in "evaluate" + * delimiters. Data properties may be accessed as free variables in the template. If a setting object is + * provided it takes precedence over _.templateSettings values. + * + * Note: In the development build _.template utilizes + * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl) for easier + * debugging. + * + * For more information on precompiling templates see + * [lodash's custom builds documentation](https://lodash.com/custom-builds). + * + * For more information on Chrome extension sandboxes see + * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval). + * + * @param string The template string. + * @param options The options object. + * @param options.escape The HTML "escape" delimiter. + * @param options.evaluate The "evaluate" delimiter. + * @param options.imports An object to import into the template as free variables. + * @param options.interpolate The "interpolate" delimiter. + * @param options.sourceURL The sourceURL of the template's compiled source. + * @param options.variable The data object variable name. + * @return Returns the compiled template function. + */ + template( + string: string, + options?: TemplateOptions + ): TemplateExecutor; + } + + interface LoDashImplicitWrapper { + /** + * @see _.template + */ + template(options?: TemplateOptions): TemplateExecutor; + } + + interface LoDashExplicitWrapper { + /** + * @see _.template + */ + template(options?: TemplateOptions): LoDashExplicitObjectWrapper; + } + + //_.toLower + interface LoDashStatic { + /** + * Converts `string`, as a whole, to lower case. + * + * @param string The string to convert. + * @return Returns the lower cased string. + */ + toLower(string?: string): string; + } + + interface LoDashImplicitWrapper { + /** + * @see _.toLower + */ + toLower(): string; + } + + interface LoDashExplicitWrapper { + /** + * @see _.toLower + */ + toLower(): LoDashExplicitWrapper; + } + + //_.toUpper + interface LoDashStatic { + /** + * Converts `string`, as a whole, to upper case. + * + * @param string The string to convert. + * @return Returns the upper cased string. + */ + toUpper(string?: string): string; + } + + interface LoDashImplicitWrapper { + /** + * @see _.toUpper + */ + toUpper(): string; + } + + interface LoDashExplicitWrapper { + /** + * @see _.toUpper + */ + toUpper(): LoDashExplicitWrapper; + } + + //_.trim + interface LoDashStatic { + /** + * Removes leading and trailing whitespace or specified characters from string. + * + * @param string The string to trim. + * @param chars The characters to trim. + * @return Returns the trimmed string. + */ + trim( + string?: string, + chars?: string + ): string; + } + + interface LoDashImplicitWrapper { + /** + * @see _.trim + */ + trim(chars?: string): string; + } + + interface LoDashExplicitWrapper { + /** + * @see _.trim + */ + trim(chars?: string): LoDashExplicitWrapper; + } + + //_.trimEnd + interface LoDashStatic { + /** + * Removes trailing whitespace or specified characters from string. + * + * @param string The string to trim. + * @param chars The characters to trim. + * @return Returns the trimmed string. + */ + trimEnd( + string?: string, + chars?: string + ): string; + } + + interface LoDashImplicitWrapper { + /** + * @see _.trimEnd + */ + trimEnd(chars?: string): string; + } + + interface LoDashExplicitWrapper { + /** + * @see _.trimEnd + */ + trimEnd(chars?: string): LoDashExplicitWrapper; + } + + //_.trimStart + interface LoDashStatic { + /** + * Removes leading whitespace or specified characters from string. + * + * @param string The string to trim. + * @param chars The characters to trim. + * @return Returns the trimmed string. + */ + trimStart( + string?: string, + chars?: string + ): string; + } + + interface LoDashImplicitWrapper { + /** + * @see _.trimStart + */ + trimStart(chars?: string): string; + } + + interface LoDashExplicitWrapper { + /** + * @see _.trimStart + */ + trimStart(chars?: string): LoDashExplicitWrapper; + } + + //_.truncate + interface TruncateOptions { + /** The maximum string length. */ + length?: number; + /** The string to indicate text is omitted. */ + omission?: string; + /** The separator pattern to truncate to. */ + separator?: string|RegExp; + } + + interface LoDashStatic { + /** + * Truncates string if it’s longer than the given maximum string length. The last characters of the truncated + * string are replaced with the omission string which defaults to "…". + * + * @param string The string to truncate. + * @param options The options object or maximum string length. + * @return Returns the truncated string. + */ + truncate( + string?: string, + options?: TruncateOptions + ): string; + } + + interface LoDashImplicitWrapper { + /** + * @see _.truncate + */ + truncate(options?: TruncateOptions): string; + } + + interface LoDashExplicitWrapper { + /** + * @see _.truncate + */ + truncate(options?: TruncateOptions): LoDashExplicitWrapper; + } + + //_.unescape + interface LoDashStatic { + /** + * The inverse of _.escape; this method converts the HTML entities &, <, >, ", ', and ` + * in string to their corresponding characters. + * + * Note: No other HTML entities are unescaped. To unescape additional HTML entities use a third-party library + * like he. + * + * @param string The string to unescape. + * @return Returns the unescaped string. + */ + unescape(string?: string): string; + } + + interface LoDashImplicitWrapper { + /** + * @see _.unescape + */ + unescape(): string; + } + + interface LoDashExplicitWrapper { + /** + * @see _.unescape + */ + unescape(): LoDashExplicitWrapper; + } + + //_.upperCase + interface LoDashStatic { + /** + * Converts `string`, as space separated words, to upper case. + * + * @param string The string to convert. + * @return Returns the upper cased string. + */ + upperCase(string?: string): string; + } + + interface LoDashImplicitWrapper { + /** + * @see _.upperCase + */ + upperCase(): string; + } + + interface LoDashExplicitWrapper { + /** + * @see _.upperCase + */ + upperCase(): LoDashExplicitWrapper; + } + + //_.upperFirst + interface LoDashStatic { + /** + * Converts the first character of `string` to upper case. + * + * @param string The string to convert. + * @return Returns the converted string. + */ + upperFirst(string?: string): string; + } + + interface LoDashImplicitWrapper { + /** + * @see _.upperFirst + */ + upperFirst(): string; + } + + interface LoDashExplicitWrapper { + /** + * @see _.upperFirst + */ + upperFirst(): LoDashExplicitWrapper; + } + + //_.words + interface LoDashStatic { + /** + * Splits `string` into an array of its words. + * + * @param string The string to inspect. + * @param pattern The pattern to match words. + * @return Returns the words of `string`. + */ + words( + string?: string, + pattern?: string|RegExp + ): string[]; + } + + interface LoDashImplicitWrapper { + /** + * @see _.words + */ + words(pattern?: string|RegExp): string[]; + } + + interface LoDashExplicitWrapper { + /** + * @see _.words + */ + words(pattern?: string|RegExp): LoDashExplicitArrayWrapper; + } + + /*********** + * Utility * + ***********/ + + //_.attempt + interface LoDashStatic { + /** + * Attempts to invoke func, returning either the result or the caught error object. Any additional arguments + * are provided to func when it’s invoked. + * + * @param func The function to attempt. + * @return Returns the func result or error object. + */ + attempt(func: (...args: any[]) => TResult, ...args: any[]): TResult|Error; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.attempt + */ + attempt(...args: any[]): TResult|Error; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.attempt + */ + attempt(...args: any[]): LoDashExplicitObjectWrapper; + } + + //_.constant + interface LoDashStatic { + /** + * Creates a function that returns value. + * + * @param value The value to return from the new function. + * @return Returns the new function. + */ + constant(value: T): () => T; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.constant + */ + constant(): LoDashImplicitObjectWrapper<() => TResult>; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.constant + */ + constant(): LoDashExplicitObjectWrapper<() => TResult>; + } + + //_.identity + interface LoDashStatic { + /** + * This method returns the first argument provided to it. + * + * @param value Any value. + * @return Returns value. + */ + identity(value?: T): T; + } + + interface LoDashImplicitWrapper { + /** + * @see _.identity + */ + identity(): T; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.identity + */ + identity(): T[]; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.identity + */ + identity(): T; + } + + interface LoDashExplicitWrapper { + /** + * @see _.identity + */ + identity(): LoDashExplicitWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.identity + */ + identity(): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.identity + */ + identity(): LoDashExplicitObjectWrapper; + } + + //_.iteratee + interface LoDashStatic { + /** + * Creates a function that invokes `func` with the arguments of the created + * function. If `func` is a property name the created callback returns the + * property value for a given element. If `func` is an object the created + * callback returns `true` for elements that contain the equivalent object properties, otherwise it returns `false`. + * + * @static + * @memberOf _ + * @category Util + * @param {*} [func=_.identity] The value to convert to a callback. + * @returns {Function} Returns the callback. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 } + * ]; + * + * // create custom iteratee shorthands + * _.iteratee = _.wrap(_.iteratee, function(callback, func) { + * var p = /^(\S+)\s*([<>])\s*(\S+)$/.exec(func); + * return !p ? callback(func) : function(object) { + * return (p[2] == '>' ? object[p[1]] > p[3] : object[p[1]] < p[3]); + * }; + * }); + * + * _.filter(users, 'age > 36'); + * // => [{ 'user': 'fred', 'age': 40 }] + */ + iteratee( + func: Function + ): (...args: any[]) => TResult; + + /** + * @see _.iteratee + */ + iteratee( + func: string + ): (object: any) => TResult; + + /** + * @see _.iteratee + */ + iteratee( + func: Object + ): (object: any) => boolean; + + /** + * @see _.iteratee + */ + iteratee(): (value: TResult) => TResult; + } + + interface LoDashImplicitWrapper { + /** + * @see _.iteratee + */ + iteratee(): LoDashImplicitObjectWrapper<(object: any) => TResult>; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.iteratee + */ + iteratee(): LoDashImplicitObjectWrapper<(object: any) => boolean>; + + /** + * @see _.iteratee + */ + iteratee(): LoDashImplicitObjectWrapper<(...args: any[]) => TResult>; + } + + interface LoDashExplicitWrapper { + /** + * @see _.iteratee + */ + iteratee(): LoDashExplicitObjectWrapper<(object: any) => TResult>; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.iteratee + */ + iteratee(): LoDashExplicitObjectWrapper<(object: any) => boolean>; + + /** + * @see _.iteratee + */ + iteratee(): LoDashExplicitObjectWrapper<(...args: any[]) => TResult>; + } + + //_.matches + interface LoDashStatic { + /** + * Creates a function that performs a deep comparison between a given object and source, returning true if the + * given object has equivalent property values, else false. + * + * Note: This method supports comparing arrays, booleans, Date objects, numbers, Object objects, regexes, and + * strings. Objects are compared by their own, not inherited, enumerable properties. For comparing a single own + * or inherited property value see _.matchesProperty. + * + * @param source The object of property values to match. + * @return Returns the new function. + */ + matches(source: T): (value: any) => boolean; + + /** + * @see _.matches + */ + matches(source: T): (value: V) => boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.matches + */ + matches(): LoDashImplicitObjectWrapper<(value: V) => boolean>; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.matches + */ + matches(): LoDashExplicitObjectWrapper<(value: V) => boolean>; + } + + //_.matchesProperty + interface LoDashStatic { + /** + * Creates a function that compares the property value of path on a given object to value. + * + * Note: This method supports comparing arrays, booleans, Date objects, numbers, Object objects, regexes, and + * strings. Objects are compared by their own, not inherited, enumerable properties. + * + * @param path The path of the property to get. + * @param srcValue The value to match. + * @return Returns the new function. + */ + matchesProperty( + path: StringRepresentable|StringRepresentable[], + srcValue: T + ): (value: any) => boolean; + + /** + * @see _.matchesProperty + */ + matchesProperty( + path: StringRepresentable|StringRepresentable[], + srcValue: T + ): (value: V) => boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.matchesProperty + */ + matchesProperty( + srcValue: SrcValue + ): LoDashImplicitObjectWrapper<(value: any) => boolean>; + + /** + * @see _.matchesProperty + */ + matchesProperty( + srcValue: SrcValue + ): LoDashImplicitObjectWrapper<(value: Value) => boolean>; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.matchesProperty + */ + matchesProperty( + srcValue: SrcValue + ): LoDashExplicitObjectWrapper<(value: any) => boolean>; + + /** + * @see _.matchesProperty + */ + matchesProperty( + srcValue: SrcValue + ): LoDashExplicitObjectWrapper<(value: Value) => boolean>; + } + + //_.method + interface LoDashStatic { + /** + * Creates a function that invokes the method at path on a given object. Any additional arguments are provided + * to the invoked method. + * + * @param path The path of the method to invoke. + * @param args The arguments to invoke the method with. + * @return Returns the new function. + */ + method( + path: string|StringRepresentable[], + ...args: any[] + ): (object: TObject) => TResult; + + /** + * @see _.method + */ + method( + path: string|StringRepresentable[], + ...args: any[] + ): (object: any) => TResult; + } + + interface LoDashImplicitWrapper { + /** + * @see _.method + */ + method(...args: any[]): LoDashImplicitObjectWrapper<(object: TObject) => TResult>; + + /** + * @see _.method + */ + method(...args: any[]): LoDashImplicitObjectWrapper<(object: any) => TResult>; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.method + */ + method(...args: any[]): LoDashImplicitObjectWrapper<(object: TObject) => TResult>; + + /** + * @see _.method + */ + method(...args: any[]): LoDashImplicitObjectWrapper<(object: any) => TResult>; + } + + interface LoDashExplicitWrapper { + /** + * @see _.method + */ + method(...args: any[]): LoDashExplicitObjectWrapper<(object: TObject) => TResult>; + + /** + * @see _.method + */ + method(...args: any[]): LoDashExplicitObjectWrapper<(object: any) => TResult>; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.method + */ + method(...args: any[]): LoDashExplicitObjectWrapper<(object: TObject) => TResult>; + + /** + * @see _.method + */ + method(...args: any[]): LoDashExplicitObjectWrapper<(object: any) => TResult>; + } + + //_.methodOf + interface LoDashStatic { + /** + * The opposite of _.method; this method creates a function that invokes the method at a given path on object. + * Any additional arguments are provided to the invoked method. + * + * @param object The object to query. + * @param args The arguments to invoke the method with. + * @return Returns the new function. + */ + methodOf( + object: TObject, + ...args: any[] + ): (path: StringRepresentable|StringRepresentable[]) => TResult; + + /** + * @see _.methodOf + */ + methodOf( + object: {}, + ...args: any[] + ): (path: StringRepresentable|StringRepresentable[]) => TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.methodOf + */ + methodOf( + ...args: any[] + ): LoDashImplicitObjectWrapper<(path: StringRepresentable|StringRepresentable[]) => TResult>; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.methodOf + */ + methodOf( + ...args: any[] + ): LoDashExplicitObjectWrapper<(path: StringRepresentable|StringRepresentable[]) => TResult>; + } + + //_.mixin + interface MixinOptions { + chain?: boolean; + } + + interface LoDashStatic { + /** + * Adds all own enumerable function properties of a source object to the destination object. If object is a + * function then methods are added to its prototype as well. + * + * Note: Use _.runInContext to create a pristine lodash function to avoid conflicts caused by modifying + * the original. + * + * @param object The destination object. + * @param source The object of functions to add. + * @param options The options object. + * @param options.chain Specify whether the functions added are chainable. + * @return Returns object. + */ + mixin( + object: TObject, + source: Dictionary, + options?: MixinOptions + ): TResult; + + /** + * @see _.mixin + */ + mixin( + source: Dictionary, + options?: MixinOptions + ): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.mixin + */ + mixin( + source: Dictionary, + options?: MixinOptions + ): LoDashImplicitObjectWrapper; + + /** + * @see _.mixin + */ + mixin( + options?: MixinOptions + ): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.mixin + */ + mixin( + source: Dictionary, + options?: MixinOptions + ): LoDashExplicitObjectWrapper; + + /** + * @see _.mixin + */ + mixin( + options?: MixinOptions + ): LoDashExplicitObjectWrapper; + } + + //_.noConflict + interface LoDashStatic { + /** + * Reverts the _ variable to its previous value and returns a reference to the lodash function. + * + * @return Returns the lodash function. + */ + noConflict(): typeof _; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.noConflict + */ + noConflict(): typeof _; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.noConflict + */ + noConflict(): LoDashExplicitObjectWrapper; + } + + //_.noop + interface LoDashStatic { + /** + * A no-operation function that returns undefined regardless of the arguments it receives. + * + * @return undefined + */ + noop(...args: any[]): void; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.noop + */ + noop(...args: any[]): void; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.noop + */ + noop(...args: any[]): _.LoDashExplicitWrapper; + } + + //_.nthArg + interface LoDashStatic { + /** + * Creates a function that returns its nth argument. + * + * @param n The index of the argument to return. + * @return Returns the new function. + */ + nthArg(n?: number): TResult; + } + + interface LoDashImplicitWrapper { + /** + * @see _.nthArg + */ + nthArg(): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.nthArg + */ + nthArg(): LoDashExplicitObjectWrapper; + } + + //_.over + interface LoDashStatic { + /** + * Creates a function that invokes iteratees with the arguments provided to the created function and returns + * their results. + * + * @param iteratees The iteratees to invoke. + * @return Returns the new function. + */ + over(...iteratees: (Function|Function[])[]): (...args: any[]) => TResult[]; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.over + */ + over(...iteratees: (Function|Function[])[]): LoDashImplicitObjectWrapper<(...args: any[]) => TResult[]>; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.over + */ + over(...iteratees: (Function|Function[])[]): LoDashImplicitObjectWrapper<(...args: any[]) => TResult[]>; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.over + */ + over(...iteratees: (Function|Function[])[]): LoDashExplicitObjectWrapper<(...args: any[]) => TResult[]>; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.over + */ + over(...iteratees: (Function|Function[])[]): LoDashExplicitObjectWrapper<(...args: any[]) => TResult[]>; + } + + //_.overEvery + interface LoDashStatic { + /** + * Creates a function that checks if all of the predicates return truthy when invoked with the arguments + * provided to the created function. + * + * @param predicates The predicates to check. + * @return Returns the new function. + */ + overEvery(...predicates: (Function|Function[])[]): (...args: any[]) => boolean; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.overEvery + */ + overEvery(...predicates: (Function|Function[])[]): LoDashImplicitObjectWrapper<(...args: any[]) => boolean>; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.overEvery + */ + overEvery(...predicates: (Function|Function[])[]): LoDashImplicitObjectWrapper<(...args: any[]) => boolean>; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.overEvery + */ + overEvery(...predicates: (Function|Function[])[]): LoDashExplicitObjectWrapper<(...args: any[]) => boolean>; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.overEvery + */ + overEvery(...predicates: (Function|Function[])[]): LoDashExplicitObjectWrapper<(...args: any[]) => boolean>; + } + + //_.overSome + interface LoDashStatic { + /** + * Creates a function that checks if any of the predicates return truthy when invoked with the arguments + * provided to the created function. + * + * @param predicates The predicates to check. + * @return Returns the new function. + */ + overSome(...predicates: (Function|Function[])[]): (...args: any[]) => boolean; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.overSome + */ + overSome(...predicates: (Function|Function[])[]): LoDashImplicitObjectWrapper<(...args: any[]) => boolean>; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.overSome + */ + overSome(...predicates: (Function|Function[])[]): LoDashImplicitObjectWrapper<(...args: any[]) => boolean>; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.overSome + */ + overSome(...predicates: (Function|Function[])[]): LoDashExplicitObjectWrapper<(...args: any[]) => boolean>; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.overSome + */ + overSome(...predicates: (Function|Function[])[]): LoDashExplicitObjectWrapper<(...args: any[]) => boolean>; + } + + //_.property + interface LoDashStatic { + /** + * Creates a function that returns the property value at path on a given object. + * + * @param path The path of the property to get. + * @return Returns the new function. + */ + property(path: StringRepresentable|StringRepresentable[]): (obj: TObj) => TResult; + } + + interface LoDashImplicitWrapper { + /** + * @see _.property + */ + property(): LoDashImplicitObjectWrapper<(obj: TObj) => TResult>; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.property + */ + property(): LoDashImplicitObjectWrapper<(obj: TObj) => TResult>; + } + + interface LoDashExplicitWrapper { + /** + * @see _.property + */ + property(): LoDashExplicitObjectWrapper<(obj: TObj) => TResult>; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.property + */ + property(): LoDashExplicitObjectWrapper<(obj: TObj) => TResult>; + } + + //_.propertyOf + interface LoDashStatic { + /** + * The opposite of _.property; this method creates a function that returns the property value at a given path + * on object. + * + * @param object The object to query. + * @return Returns the new function. + */ + propertyOf(object: T): (path: string|string[]) => any; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.propertyOf + */ + propertyOf(): LoDashImplicitObjectWrapper<(path: string|string[]) => any>; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.propertyOf + */ + propertyOf(): LoDashExplicitObjectWrapper<(path: string|string[]) => any>; + } + + //_.range + interface LoDashStatic { + /** + * Creates an array of numbers (positive and/or negative) progressing from start up to, but not including, end. + * If end is not specified it’s set to start with start then set to 0. If end is less than start a zero-length + * range is created unless a negative step is specified. + * + * @param start The start of the range. + * @param end The end of the range. + * @param step The value to increment or decrement by. + * @return Returns a new range array. + */ + range( + start: number, + end: number, + step?: number + ): number[]; + + /** + * @see _.range + */ + range( + end: number, + step?: number + ): number[]; + } + + interface LoDashImplicitWrapper { + /** + * @see _.range + */ + range( + end?: number, + step?: number + ): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.range + */ + range( + end?: number, + step?: number + ): LoDashExplicitArrayWrapper; + } + + //_.rangeRight + interface LoDashStatic { + /** + * This method is like `_.range` except that it populates values in + * descending order. + * + * @static + * @memberOf _ + * @category Util + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @param {number} [step=1] The value to increment or decrement by. + * @returns {Array} Returns the new array of numbers. + * @example + * + * _.rangeRight(4); + * // => [3, 2, 1, 0] + * + * _.rangeRight(-4); + * // => [-3, -2, -1, 0] + * + * _.rangeRight(1, 5); + * // => [4, 3, 2, 1] + * + * _.rangeRight(0, 20, 5); + * // => [15, 10, 5, 0] + * + * _.rangeRight(0, -4, -1); + * // => [-3, -2, -1, 0] + * + * _.rangeRight(1, 4, 0); + * // => [1, 1, 1] + * + * _.rangeRight(0); + * // => [] + */ + rangeRight( + start: number, + end: number, + step?: number + ): number[]; + + /** + * @see _.rangeRight + */ + rangeRight( + end: number, + step?: number + ): number[]; + } + + interface LoDashImplicitWrapper { + /** + * @see _.rangeRight + */ + rangeRight( + end?: number, + step?: number + ): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.rangeRight + */ + rangeRight( + end?: number, + step?: number + ): LoDashExplicitArrayWrapper; + } + + //_.runInContext + interface LoDashStatic { + /** + * Create a new pristine lodash function using the given context object. + * + * @param context The context object. + * @return Returns a new lodash function. + */ + runInContext(context?: Object): typeof _; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.runInContext + */ + runInContext(): typeof _; + } + + //_.times + interface LoDashStatic { + /** + * Invokes the iteratee function n times, returning an array of the results of each invocation. The iteratee + * is invoked with one argument; (index). + * + * @param n The number of times to invoke iteratee. + * @param iteratee The function invoked per iteration. + * @return Returns the array of results. + */ + times( + n: number, + iteratee: (num: number) => TResult + ): TResult[]; + + /** + * @see _.times + */ + times(n: number): number[]; + } + + interface LoDashImplicitWrapper { + /** + * @see _.times + */ + times( + iteratee: (num: number) => TResult + ): TResult[]; + + /** + * @see _.times + */ + times(): number[]; + } + + interface LoDashExplicitWrapper { + /** + * @see _.times + */ + times( + iteratee: (num: number) => TResult + ): LoDashExplicitArrayWrapper; + + /** + * @see _.times + */ + times(): LoDashExplicitArrayWrapper; + } + + //_.toPath + interface LoDashStatic { + /** + * Converts `value` to a property path array. + * + * @static + * @memberOf _ + * @category Util + * @param {*} value The value to convert. + * @returns {Array} Returns the new property path array. + * @example + * + * _.toPath('a.b.c'); + * // => ['a', 'b', 'c'] + * + * _.toPath('a[0].b.c'); + * // => ['a', '0', 'b', 'c'] + * + * var path = ['a', 'b', 'c'], + * newPath = _.toPath(path); + * + * console.log(newPath); + * // => ['a', 'b', 'c'] + * + * console.log(path === newPath); + * // => false + */ + toPath(value: any): string[]; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.toPath + */ + toPath(): LoDashImplicitWrapper; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.toPath + */ + toPath(): LoDashExplicitWrapper; + } + + //_.uniqueId + interface LoDashStatic { + /** + * Generates a unique ID. If prefix is provided the ID is appended to it. + * + * @param prefix The value to prefix the ID with. + * @return Returns the unique ID. + */ + uniqueId(prefix?: string): string; + } + + interface LoDashImplicitWrapper { + /** + * @see _.uniqueId + */ + uniqueId(): string; + } + + interface LoDashExplicitWrapper { + /** + * @see _.uniqueId + */ + uniqueId(): LoDashExplicitWrapper; + } + + interface ListIterator { + (value: T, index: number, collection: List): TResult; + } + + interface DictionaryIterator { + (value: T, key?: string, collection?: Dictionary): TResult; + } + + interface NumericDictionaryIterator { + (value: T, key?: number, collection?: Dictionary): TResult; + } + + interface ObjectIterator { + (element: T, key?: string, collection?: any): TResult; + } + + interface StringIterator { + (char: string, index?: number, string?: string): TResult; + } + + interface MemoVoidIterator { + (prev: TResult, curr: T, indexOrKey?: any, list?: T[]): void; + } + interface MemoIterator { + (prev: TResult, curr: T, indexOrKey?: any, list?: T[]): TResult; + } + + interface MemoVoidArrayIterator { + (acc: TResult, curr: T, index?: number, arr?: T[]): void; + } + interface MemoVoidDictionaryIterator { + (acc: TResult, curr: T, key?: string, dict?: Dictionary): void; + } + + //interface Collection {} + + // Common interface between Arrays and jQuery objects + interface List { + [index: number]: T; + length: number; + } + + interface Dictionary { + [index: string]: T; + } + + interface NumericDictionary { + [index: number]: T; + } + + interface StringRepresentable { + toString(): string; + } + + interface Cancelable { + cancel(): void; + flush(): void; + } +} + +// Named exports + +declare module "lodash/after" { + const after: typeof _.after; + export = after; +} + + +declare module "lodash/ary" { + const ary: typeof _.ary; + export = ary; +} + + +declare module "lodash/assign" { + const assign: typeof _.assign; + export = assign; +} + + +declare module "lodash/assignIn" { + const assignIn: typeof _.assignIn; + export = assignIn; +} + + +declare module "lodash/assignInWith" { + const assignInWith: typeof _.assignInWith; + export = assignInWith; +} + + +declare module "lodash/assignWith" { + const assignWith: typeof _.assignWith; + export = assignWith; +} + + +declare module "lodash/at" { + const at: typeof _.at; + export = at; +} + + +declare module "lodash/before" { + const before: typeof _.before; + export = before; +} + + +declare module "lodash/bind" { + const bind: typeof _.bind; + export = bind; +} + + +declare module "lodash/bindAll" { + const bindAll: typeof _.bindAll; + export = bindAll; +} + + +declare module "lodash/bindKey" { + const bindKey: typeof _.bindKey; + export = bindKey; +} + + +declare module "lodash/castArray" { + const castArray: typeof _.castArray; + export = castArray; +} + + +declare module "lodash/chain" { + const chain: typeof _.chain; + export = chain; +} + + +declare module "lodash/chunk" { + const chunk: typeof _.chunk; + export = chunk; +} + + +declare module "lodash/compact" { + const compact: typeof _.compact; + export = compact; +} + + +declare module "lodash/concat" { + const concat: typeof _.concat; + export = concat; +} + +/** +* uncoment it if definition exists +*/ +/* +declare module "lodash/cond" { + const cond: typeof _.cond; + export = cond; +} +*/ + +/** +* uncoment it if definition exists +*/ +/* +declare module "lodash/conforms" { + const conforms: typeof _.conforms; + export = conforms; +} +*/ + +declare module "lodash/constant" { + const constant: typeof _.constant; + export = constant; +} + + +declare module "lodash/countBy" { + const countBy: typeof _.countBy; + export = countBy; +} + + +declare module "lodash/create" { + const create: typeof _.create; + export = create; +} + + +declare module "lodash/curry" { + const curry: typeof _.curry; + export = curry; +} + + +declare module "lodash/curryRight" { + const curryRight: typeof _.curryRight; + export = curryRight; +} + + +declare module "lodash/debounce" { + const debounce: typeof _.debounce; + export = debounce; +} + + +declare module "lodash/defaults" { + const defaults: typeof _.defaults; + export = defaults; +} + + +declare module "lodash/defaultsDeep" { + const defaultsDeep: typeof _.defaultsDeep; + export = defaultsDeep; +} + + +declare module "lodash/defer" { + const defer: typeof _.defer; + export = defer; +} + + +declare module "lodash/delay" { + const delay: typeof _.delay; + export = delay; +} + + +declare module "lodash/difference" { + const difference: typeof _.difference; + export = difference; +} + + +declare module "lodash/differenceBy" { + const differenceBy: typeof _.differenceBy; + export = differenceBy; +} + + +declare module "lodash/differenceWith" { + const differenceWith: typeof _.differenceWith; + export = differenceWith; +} + + +declare module "lodash/drop" { + const drop: typeof _.drop; + export = drop; +} + + +declare module "lodash/dropRight" { + const dropRight: typeof _.dropRight; + export = dropRight; +} + + +declare module "lodash/dropRightWhile" { + const dropRightWhile: typeof _.dropRightWhile; + export = dropRightWhile; +} + + +declare module "lodash/dropWhile" { + const dropWhile: typeof _.dropWhile; + export = dropWhile; +} + + +declare module "lodash/fill" { + const fill: typeof _.fill; + export = fill; +} + + +declare module "lodash/filter" { + const filter: typeof _.filter; + export = filter; +} + + +declare module "lodash/flatMap" { + const flatMap: typeof _.flatMap; + export = flatMap; +} + +/** +* uncoment it if definition exists +*/ +/* +declare module "lodash/flatMapDeep" { + const flatMapDeep: typeof _.flatMapDeep; + export = flatMapDeep; +} +*/ +/** +* uncoment it if definition exists +*/ +/* +declare module "lodash/flatMapDepth" { + const flatMapDepth: typeof _.flatMapDepth; + export = flatMapDepth; +} +*/ + +declare module "lodash/flatten" { + const flatten: typeof _.flatten; + export = flatten; +} + + +declare module "lodash/flattenDeep" { + const flattenDeep: typeof _.flattenDeep; + export = flattenDeep; +} + +declare module "lodash/flattenDepth" { + const flattenDepth: typeof _.flattenDepth; + export = flattenDepth; +} + +declare module "lodash/flip" { + const flip: typeof _.flip; + export = flip; +} + + +declare module "lodash/flow" { + const flow: typeof _.flow; + export = flow; +} + + +declare module "lodash/flowRight" { + const flowRight: typeof _.flowRight; + export = flowRight; +} + + +declare module "lodash/fromPairs" { + const fromPairs: typeof _.fromPairs; + export = fromPairs; +} + + +declare module "lodash/functions" { + const functions: typeof _.functions; + export = functions; +} + + +declare module "lodash/functionsIn" { + const functionsIn: typeof _.functionsIn; + export = functionsIn; +} + + +declare module "lodash/groupBy" { + const groupBy: typeof _.groupBy; + export = groupBy; +} + + +declare module "lodash/initial" { + const initial: typeof _.initial; + export = initial; +} + + +declare module "lodash/intersection" { + const intersection: typeof _.intersection; + export = intersection; +} + + +declare module "lodash/intersectionBy" { + const intersectionBy: typeof _.intersectionBy; + export = intersectionBy; +} + + +declare module "lodash/intersectionWith" { + const intersectionWith: typeof _.intersectionWith; + export = intersectionWith; +} + + +declare module "lodash/invert" { + const invert: typeof _.invert; + export = invert; +} + + +declare module "lodash/invertBy" { + const invertBy: typeof _.invertBy; + export = invertBy; +} + + +declare module "lodash/invokeMap" { + const invokeMap: typeof _.invokeMap; + export = invokeMap; +} + + +declare module "lodash/iteratee" { + const iteratee: typeof _.iteratee; + export = iteratee; +} + + +declare module "lodash/keyBy" { + const keyBy: typeof _.keyBy; + export = keyBy; +} + + +declare module "lodash/keys" { + const keys: typeof _.keys; + export = keys; +} + + +declare module "lodash/keysIn" { + const keysIn: typeof _.keysIn; + export = keysIn; +} + + +declare module "lodash/map" { + const map: typeof _.map; + export = map; +} + + +declare module "lodash/mapKeys" { + const mapKeys: typeof _.mapKeys; + export = mapKeys; +} + + +declare module "lodash/mapValues" { + const mapValues: typeof _.mapValues; + export = mapValues; +} + + +declare module "lodash/matches" { + const matches: typeof _.matches; + export = matches; +} + + +declare module "lodash/matchesProperty" { + const matchesProperty: typeof _.matchesProperty; + export = matchesProperty; +} + + +declare module "lodash/memoize" { + const memoize: typeof _.memoize; + export = memoize; +} + + +declare module "lodash/merge" { + const merge: typeof _.merge; + export = merge; +} + + +declare module "lodash/mergeWith" { + const mergeWith: typeof _.mergeWith; + export = mergeWith; +} + + +declare module "lodash/method" { + const method: typeof _.method; + export = method; +} + + +declare module "lodash/methodOf" { + const methodOf: typeof _.methodOf; + export = methodOf; +} + + +declare module "lodash/mixin" { + const mixin: typeof _.mixin; + export = mixin; +} + + +declare module "lodash/negate" { + const negate: typeof _.negate; + export = negate; +} + + +declare module "lodash/nthArg" { + const nthArg: typeof _.nthArg; + export = nthArg; +} + + +declare module "lodash/omit" { + const omit: typeof _.omit; + export = omit; +} + + +declare module "lodash/omitBy" { + const omitBy: typeof _.omitBy; + export = omitBy; +} + + +declare module "lodash/once" { + const once: typeof _.once; + export = once; +} + + +declare module "lodash/orderBy" { + const orderBy: typeof _.orderBy; + export = orderBy; +} + + +declare module "lodash/over" { + const over: typeof _.over; + export = over; +} + + +declare module "lodash/overArgs" { + const overArgs: typeof _.overArgs; + export = overArgs; +} + + +declare module "lodash/overEvery" { + const overEvery: typeof _.overEvery; + export = overEvery; +} + + +declare module "lodash/overSome" { + const overSome: typeof _.overSome; + export = overSome; +} + + +declare module "lodash/partial" { + const partial: typeof _.partial; + export = partial; +} + + +declare module "lodash/partialRight" { + const partialRight: typeof _.partialRight; + export = partialRight; +} + + +declare module "lodash/partition" { + const partition: typeof _.partition; + export = partition; +} + + +declare module "lodash/pick" { + const pick: typeof _.pick; + export = pick; +} + + +declare module "lodash/pickBy" { + const pickBy: typeof _.pickBy; + export = pickBy; +} + + +declare module "lodash/property" { + const property: typeof _.property; + export = property; +} + + +declare module "lodash/propertyOf" { + const propertyOf: typeof _.propertyOf; + export = propertyOf; +} + + +declare module "lodash/pull" { + const pull: typeof _.pull; + export = pull; +} + + +declare module "lodash/pullAll" { + const pullAll: typeof _.pullAll; + export = pullAll; +} + + +declare module "lodash/pullAllBy" { + const pullAllBy: typeof _.pullAllBy; + export = pullAllBy; +} + +/** +* uncoment it if definition exists +*/ +/* +declare module "lodash/pullAllWith" { + const pullAllWith: typeof _.pullAllWith; + export = pullAllWith; +} +*/ + +declare module "lodash/pullAt" { + const pullAt: typeof _.pullAt; + export = pullAt; +} + + +declare module "lodash/range" { + const range: typeof _.range; + export = range; +} + + +declare module "lodash/rangeRight" { + const rangeRight: typeof _.rangeRight; + export = rangeRight; +} + + +declare module "lodash/rearg" { + const rearg: typeof _.rearg; + export = rearg; +} + + +declare module "lodash/reject" { + const reject: typeof _.reject; + export = reject; +} + + +declare module "lodash/remove" { + const remove: typeof _.remove; + export = remove; +} + + +declare module "lodash/rest" { + const rest: typeof _.rest; + export = rest; +} + + +declare module "lodash/reverse" { + const reverse: typeof _.reverse; + export = reverse; +} + + +declare module "lodash/sampleSize" { + const sampleSize: typeof _.sampleSize; + export = sampleSize; +} + + +declare module "lodash/set" { + const set: typeof _.set; + export = set; +} + + +declare module "lodash/setWith" { + const setWith: typeof _.setWith; + export = setWith; +} + + +declare module "lodash/shuffle" { + const shuffle: typeof _.shuffle; + export = shuffle; +} + + +declare module "lodash/slice" { + const slice: typeof _.slice; + export = slice; +} + + +declare module "lodash/sortBy" { + const sortBy: typeof _.sortBy; + export = sortBy; +} + + +declare module "lodash/sortedUniq" { + const sortedUniq: typeof _.sortedUniq; + export = sortedUniq; +} + + +declare module "lodash/sortedUniqBy" { + const sortedUniqBy: typeof _.sortedUniqBy; + export = sortedUniqBy; +} + + +declare module "lodash/split" { + const split: typeof _.split; + export = split; +} + + +declare module "lodash/spread" { + const spread: typeof _.spread; + export = spread; +} + + +declare module "lodash/tail" { + const tail: typeof _.tail; + export = tail; +} + + +declare module "lodash/take" { + const take: typeof _.take; + export = take; +} + + +declare module "lodash/takeRight" { + const takeRight: typeof _.takeRight; + export = takeRight; +} + + +declare module "lodash/takeRightWhile" { + const takeRightWhile: typeof _.takeRightWhile; + export = takeRightWhile; +} + + +declare module "lodash/takeWhile" { + const takeWhile: typeof _.takeWhile; + export = takeWhile; +} + + +declare module "lodash/tap" { + const tap: typeof _.tap; + export = tap; +} + + +declare module "lodash/throttle" { + const throttle: typeof _.throttle; + export = throttle; +} + + +declare module "lodash/thru" { + const thru: typeof _.thru; + export = thru; +} + + +declare module "lodash/toArray" { + const toArray: typeof _.toArray; + export = toArray; +} + + +declare module "lodash/toPairs" { + const toPairs: typeof _.toPairs; + export = toPairs; +} + + +declare module "lodash/toPairsIn" { + const toPairsIn: typeof _.toPairsIn; + export = toPairsIn; +} + + +declare module "lodash/toPath" { + const toPath: typeof _.toPath; + export = toPath; +} + + +declare module "lodash/toPlainObject" { + const toPlainObject: typeof _.toPlainObject; + export = toPlainObject; +} + + +declare module "lodash/transform" { + const transform: typeof _.transform; + export = transform; +} + + +declare module "lodash/unary" { + const unary: typeof _.unary; + export = unary; +} + + +declare module "lodash/union" { + const union: typeof _.union; + export = union; +} + + +declare module "lodash/unionBy" { + const unionBy: typeof _.unionBy; + export = unionBy; +} + + +declare module "lodash/unionWith" { + const unionWith: typeof _.unionWith; + export = unionWith; +} + + +declare module "lodash/uniq" { + const uniq: typeof _.uniq; + export = uniq; +} + + +declare module "lodash/uniqBy" { + const uniqBy: typeof _.uniqBy; + export = uniqBy; +} + + +declare module "lodash/uniqWith" { + const uniqWith: typeof _.uniqWith; + export = uniqWith; +} + + +declare module "lodash/unset" { + const unset: typeof _.unset; + export = unset; +} + + +declare module "lodash/unzip" { + const unzip: typeof _.unzip; + export = unzip; +} + + +declare module "lodash/unzipWith" { + const unzipWith: typeof _.unzipWith; + export = unzipWith; +} + + +declare module "lodash/update" { + const update: typeof _.update; + export = update; +} + +/** +* uncoment it if definition exists +*/ +/* +declare module "lodash/updateWith" { + const updateWith: typeof _.updateWith; + export = updateWith; +} +*/ + +declare module "lodash/values" { + const values: typeof _.values; + export = values; +} + + +declare module "lodash/valuesIn" { + const valuesIn: typeof _.valuesIn; + export = valuesIn; +} + + +declare module "lodash/without" { + const without: typeof _.without; + export = without; +} + + +declare module "lodash/words" { + const words: typeof _.words; + export = words; +} + + +declare module "lodash/wrap" { + const wrap: typeof _.wrap; + export = wrap; +} + + +declare module "lodash/xor" { + const xor: typeof _.xor; + export = xor; +} + + +declare module "lodash/xorBy" { + const xorBy: typeof _.xorBy; + export = xorBy; +} + + +declare module "lodash/xorWith" { + const xorWith: typeof _.xorWith; + export = xorWith; +} + + +declare module "lodash/zip" { + const zip: typeof _.zip; + export = zip; +} + + +declare module "lodash/zipObject" { + const zipObject: typeof _.zipObject; + export = zipObject; +} + +/** +* uncoment it if definition exists +*/ +/* +declare module "lodash/zipObjectDeep" { + const zipObjectDeep: typeof _.zipObjectDeep; + export = zipObjectDeep; +} +*/ + + +declare module "lodash/zipWith" { + const zipWith: typeof _.zipWith; + export = zipWith; +} + +/** +* uncoment it if definition exists +*/ +/* +declare module "lodash/entries" { + const entries: typeof _.entries; + export = entries; +} +*/ +/** +* uncoment it if definition exists +*/ +/* +declare module "lodash/entriesIn" { + const entriesIn: typeof _.entriesIn; + export = entriesIn; +} +*/ + + +declare module "lodash/extend" { + const extend: typeof _.extend; + export = extend; +} + + +declare module "lodash/extendWith" { + const extendWith: typeof _.extendWith; + export = extendWith; +} + + +declare module "lodash/add" { + const add: typeof _.add; + export = add; +} + + +declare module "lodash/attempt" { + const attempt: typeof _.attempt; + export = attempt; +} + + +declare module "lodash/camelCase" { + const camelCase: typeof _.camelCase; + export = camelCase; +} + + +declare module "lodash/capitalize" { + const capitalize: typeof _.capitalize; + export = capitalize; +} + + +declare module "lodash/ceil" { + const ceil: typeof _.ceil; + export = ceil; +} + + +declare module "lodash/clamp" { + const clamp: typeof _.clamp; + export = clamp; +} + + +declare module "lodash/clone" { + const clone: typeof _.clone; + export = clone; +} + + +declare module "lodash/cloneDeep" { + const cloneDeep: typeof _.cloneDeep; + export = cloneDeep; +} + + +declare module "lodash/cloneDeepWith" { + const cloneDeepWith: typeof _.cloneDeepWith; + export = cloneDeepWith; +} + + +declare module "lodash/cloneWith" { + const cloneWith: typeof _.cloneWith; + export = cloneWith; +} + + +declare module "lodash/deburr" { + const deburr: typeof _.deburr; + export = deburr; +} + +/** +* uncoment it if definition exists +*/ +/* +declare module "lodash/divide" { + const divide: typeof _.divide; + export = divide; +} +*/ + +declare module "lodash/endsWith" { + const endsWith: typeof _.endsWith; + export = endsWith; +} + + +declare module "lodash/eq" { + const eq: typeof _.eq; + export = eq; +} + + +declare module "lodash/escape" { + const escape: typeof _.escape; + export = escape; +} + + +declare module "lodash/escapeRegExp" { + const escapeRegExp: typeof _.escapeRegExp; + export = escapeRegExp; +} + + +declare module "lodash/every" { + const every: typeof _.every; + export = every; +} + + +declare module "lodash/find" { + const find: typeof _.find; + export = find; +} + + +declare module "lodash/findIndex" { + const findIndex: typeof _.findIndex; + export = findIndex; +} + + +declare module "lodash/findKey" { + const findKey: typeof _.findKey; + export = findKey; +} + + +declare module "lodash/findLast" { + const findLast: typeof _.findLast; + export = findLast; +} + + +declare module "lodash/findLastIndex" { + const findLastIndex: typeof _.findLastIndex; + export = findLastIndex; +} + + +declare module "lodash/findLastKey" { + const findLastKey: typeof _.findLastKey; + export = findLastKey; +} + + +declare module "lodash/floor" { + const floor: typeof _.floor; + export = floor; +} + + +declare module "lodash/forEach" { + const forEach: typeof _.forEach; + export = forEach; +} + + +declare module "lodash/forEachRight" { + const forEachRight: typeof _.forEachRight; + export = forEachRight; +} + + +declare module "lodash/forIn" { + const forIn: typeof _.forIn; + export = forIn; +} + + +declare module "lodash/forInRight" { + const forInRight: typeof _.forInRight; + export = forInRight; +} + + +declare module "lodash/forOwn" { + const forOwn: typeof _.forOwn; + export = forOwn; +} + + +declare module "lodash/forOwnRight" { + const forOwnRight: typeof _.forOwnRight; + export = forOwnRight; +} + + +declare module "lodash/get" { + const get: typeof _.get; + export = get; +} + + +declare module "lodash/gt" { + const gt: typeof _.gt; + export = gt; +} + + +declare module "lodash/gte" { + const gte: typeof _.gte; + export = gte; +} + + +declare module "lodash/has" { + const has: typeof _.has; + export = has; +} + + +declare module "lodash/hasIn" { + const hasIn: typeof _.hasIn; + export = hasIn; +} + + +declare module "lodash/head" { + const head: typeof _.head; + export = head; +} + + +declare module "lodash/identity" { + const identity: typeof _.identity; + export = identity; +} + + +declare module "lodash/includes" { + const includes: typeof _.includes; + export = includes; +} + + +declare module "lodash/indexOf" { + const indexOf: typeof _.indexOf; + export = indexOf; +} + + +declare module "lodash/inRange" { + const inRange: typeof _.inRange; + export = inRange; +} + + +declare module "lodash/invoke" { + const invoke: typeof _.invoke; + export = invoke; +} + + +declare module "lodash/isArguments" { + const isArguments: typeof _.isArguments; + export = isArguments; +} + + +declare module "lodash/isArray" { + const isArray: typeof _.isArray; + export = isArray; +} + + +declare module "lodash/isArrayBuffer" { + const isArrayBuffer: typeof _.isArrayBuffer; + export = isArrayBuffer; +} + + +declare module "lodash/isArrayLike" { + const isArrayLike: typeof _.isArrayLike; + export = isArrayLike; +} + + +declare module "lodash/isArrayLikeObject" { + const isArrayLikeObject: typeof _.isArrayLikeObject; + export = isArrayLikeObject; +} + + +declare module "lodash/isBoolean" { + const isBoolean: typeof _.isBoolean; + export = isBoolean; +} + + +declare module "lodash/isBuffer" { + const isBuffer: typeof _.isBuffer; + export = isBuffer; +} + + +declare module "lodash/isDate" { + const isDate: typeof _.isDate; + export = isDate; +} + + +declare module "lodash/isElement" { + const isElement: typeof _.isElement; + export = isElement; +} + + +declare module "lodash/isEmpty" { + const isEmpty: typeof _.isEmpty; + export = isEmpty; +} + + +declare module "lodash/isEqual" { + const isEqual: typeof _.isEqual; + export = isEqual; +} + + +declare module "lodash/isEqualWith" { + const isEqualWith: typeof _.isEqualWith; + export = isEqualWith; +} + + +declare module "lodash/isError" { + const isError: typeof _.isError; + export = isError; +} + + +declare module "lodash/isFinite" { + const isFinite: typeof _.isFinite; + export = isFinite; +} + + +declare module "lodash/isFunction" { + const isFunction: typeof _.isFunction; + export = isFunction; +} + + +declare module "lodash/isInteger" { + const isInteger: typeof _.isInteger; + export = isInteger; +} + + +declare module "lodash/isLength" { + const isLength: typeof _.isLength; + export = isLength; +} + + +declare module "lodash/isMap" { + const isMap: typeof _.isMap; + export = isMap; +} + + +declare module "lodash/isMatch" { + const isMatch: typeof _.isMatch; + export = isMatch; +} + + +declare module "lodash/isMatchWith" { + const isMatchWith: typeof _.isMatchWith; + export = isMatchWith; +} + + +declare module "lodash/isNaN" { + const isNaN: typeof _.isNaN; + export = isNaN; +} + + +declare module "lodash/isNative" { + const isNative: typeof _.isNative; + export = isNative; +} + + +declare module "lodash/isNil" { + const isNil: typeof _.isNil; + export = isNil; +} + + +declare module "lodash/isNull" { + const isNull: typeof _.isNull; + export = isNull; +} + + +declare module "lodash/isNumber" { + const isNumber: typeof _.isNumber; + export = isNumber; +} + + +declare module "lodash/isObject" { + const isObject: typeof _.isObject; + export = isObject; +} + + +declare module "lodash/isObjectLike" { + const isObjectLike: typeof _.isObjectLike; + export = isObjectLike; +} + + +declare module "lodash/isPlainObject" { + const isPlainObject: typeof _.isPlainObject; + export = isPlainObject; +} + + +declare module "lodash/isRegExp" { + const isRegExp: typeof _.isRegExp; + export = isRegExp; +} + + +declare module "lodash/isSafeInteger" { + const isSafeInteger: typeof _.isSafeInteger; + export = isSafeInteger; +} + + +declare module "lodash/isSet" { + const isSet: typeof _.isSet; + export = isSet; +} + + +declare module "lodash/isString" { + const isString: typeof _.isString; + export = isString; +} + + +declare module "lodash/isSymbol" { + const isSymbol: typeof _.isSymbol; + export = isSymbol; +} + + +declare module "lodash/isTypedArray" { + const isTypedArray: typeof _.isTypedArray; + export = isTypedArray; +} + + +declare module "lodash/isUndefined" { + const isUndefined: typeof _.isUndefined; + export = isUndefined; +} + + +declare module "lodash/isWeakMap" { + const isWeakMap: typeof _.isWeakMap; + export = isWeakMap; +} + + +declare module "lodash/isWeakSet" { + const isWeakSet: typeof _.isWeakSet; + export = isWeakSet; +} + + +declare module "lodash/join" { + const join: typeof _.join; + export = join; +} + + +declare module "lodash/kebabCase" { + const kebabCase: typeof _.kebabCase; + export = kebabCase; +} + + +declare module "lodash/last" { + const last: typeof _.last; + export = last; +} + + +declare module "lodash/lastIndexOf" { + const lastIndexOf: typeof _.lastIndexOf; + export = lastIndexOf; +} + + +declare module "lodash/lowerCase" { + const lowerCase: typeof _.lowerCase; + export = lowerCase; +} + + +declare module "lodash/lowerFirst" { + const lowerFirst: typeof _.lowerFirst; + export = lowerFirst; +} + + +declare module "lodash/lt" { + const lt: typeof _.lt; + export = lt; +} + + +declare module "lodash/lte" { + const lte: typeof _.lte; + export = lte; +} + + +declare module "lodash/max" { + const max: typeof _.max; + export = max; +} + + +declare module "lodash/maxBy" { + const maxBy: typeof _.maxBy; + export = maxBy; +} + + +declare module "lodash/mean" { + const mean: typeof _.mean; + export = mean; +} + +/** +* uncoment it if definition exists +*/ +/* +declare module "lodash/meanBy" { + const meanBy: typeof _.meanBy; + export = meanBy; +} +*/ + +declare module "lodash/min" { + const min: typeof _.min; + export = min; +} + + +declare module "lodash/minBy" { + const minBy: typeof _.minBy; + export = minBy; +} + +/** +* uncoment it if definition exists +*/ +/* +declare module "lodash/multiply" { + const multiply: typeof _.multiply; + export = multiply; +} +*/ + +/** +* uncoment it if definition exists +*/ +/* +declare module "lodash/nth" { + const nth: typeof _.nth; + export = nth; +} +*/ + +declare module "lodash/noConflict" { + const noConflict: typeof _.noConflict; + export = noConflict; +} + + +declare module "lodash/noop" { + const noop: typeof _.noop; + export = noop; +} + + +declare module "lodash/now" { + const now: typeof _.now; + export = now; +} + + +declare module "lodash/pad" { + const pad: typeof _.pad; + export = pad; +} + + +declare module "lodash/padEnd" { + const padEnd: typeof _.padEnd; + export = padEnd; +} + + +declare module "lodash/padStart" { + const padStart: typeof _.padStart; + export = padStart; +} + + +declare module "lodash/parseInt" { + const parseInt: typeof _.parseInt; + export = parseInt; +} + + +declare module "lodash/random" { + const random: typeof _.random; + export = random; +} + + +declare module "lodash/reduce" { + const reduce: typeof _.reduce; + export = reduce; +} + + +declare module "lodash/reduceRight" { + const reduceRight: typeof _.reduceRight; + export = reduceRight; +} + + +declare module "lodash/repeat" { + const repeat: typeof _.repeat; + export = repeat; +} + + +declare module "lodash/replace" { + const replace: typeof _.replace; + export = replace; +} + + +declare module "lodash/result" { + const result: typeof _.result; + export = result; +} + + +declare module "lodash/round" { + const round: typeof _.round; + export = round; +} + + +declare module "lodash/runInContext" { + const runInContext: typeof _.runInContext; + export = runInContext; +} + + +declare module "lodash/sample" { + const sample: typeof _.sample; + export = sample; +} + + +declare module "lodash/size" { + const size: typeof _.size; + export = size; +} + + +declare module "lodash/snakeCase" { + const snakeCase: typeof _.snakeCase; + export = snakeCase; +} + + +declare module "lodash/some" { + const some: typeof _.some; + export = some; +} + + +declare module "lodash/sortedIndex" { + const sortedIndex: typeof _.sortedIndex; + export = sortedIndex; +} + + +declare module "lodash/sortedIndexBy" { + const sortedIndexBy: typeof _.sortedIndexBy; + export = sortedIndexBy; +} + + +declare module "lodash/sortedIndexOf" { + const sortedIndexOf: typeof _.sortedIndexOf; + export = sortedIndexOf; +} + + +declare module "lodash/sortedLastIndex" { + const sortedLastIndex: typeof _.sortedLastIndex; + export = sortedLastIndex; +} + + +declare module "lodash/sortedLastIndexBy" { + const sortedLastIndexBy: typeof _.sortedLastIndexBy; + export = sortedLastIndexBy; +} + + +declare module "lodash/sortedLastIndexOf" { + const sortedLastIndexOf: typeof _.sortedLastIndexOf; + export = sortedLastIndexOf; +} + + +declare module "lodash/startCase" { + const startCase: typeof _.startCase; + export = startCase; +} + + +declare module "lodash/startsWith" { + const startsWith: typeof _.startsWith; + export = startsWith; +} + + +declare module "lodash/subtract" { + const subtract: typeof _.subtract; + export = subtract; +} + + +declare module "lodash/sum" { + const sum: typeof _.sum; + export = sum; +} + + +declare module "lodash/sumBy" { + const sumBy: typeof _.sumBy; + export = sumBy; +} + + +declare module "lodash/template" { + const template: typeof _.template; + export = template; +} + + +declare module "lodash/times" { + const times: typeof _.times; + export = times; +} + + +declare module "lodash/toInteger" { + const toInteger: typeof _.toInteger; + export = toInteger; +} + + +declare module "lodash/toLength" { + const toLength: typeof _.toLength; + export = toLength; +} + + +declare module "lodash/toLower" { + const toLower: typeof _.toLower; + export = toLower; +} + + +declare module "lodash/toNumber" { + const toNumber: typeof _.toNumber; + export = toNumber; +} + + +declare module "lodash/toSafeInteger" { + const toSafeInteger: typeof _.toSafeInteger; + export = toSafeInteger; +} + + +declare module "lodash/toString" { + const toString: typeof _.toString; + export = toString; +} + + +declare module "lodash/toUpper" { + const toUpper: typeof _.toUpper; + export = toUpper; +} + + +declare module "lodash/trim" { + const trim: typeof _.trim; + export = trim; +} + + +declare module "lodash/trimEnd" { + const trimEnd: typeof _.trimEnd; + export = trimEnd; +} + + +declare module "lodash/trimStart" { + const trimStart: typeof _.trimStart; + export = trimStart; +} + + +declare module "lodash/truncate" { + const truncate: typeof _.truncate; + export = truncate; +} + + +declare module "lodash/unescape" { + const unescape: typeof _.unescape; + export = unescape; +} + + +declare module "lodash/uniqueId" { + const uniqueId: typeof _.uniqueId; + export = uniqueId; +} + + +declare module "lodash/upperCase" { + const upperCase: typeof _.upperCase; + export = upperCase; +} + + +declare module "lodash/upperFirst" { + const upperFirst: typeof _.upperFirst; + export = upperFirst; +} + + +declare module "lodash/each" { + const each: typeof _.each; + export = each; +} + + +declare module "lodash/eachRight" { + const eachRight: typeof _.eachRight; + export = eachRight; +} + + +declare module "lodash/first" { + const first: typeof _.first; + export = first; +} + +declare module "lodash/fp" { + export = _; +} + +declare module "lodash" { + export = _; +} + +// Backward compatibility with --target es5 +interface Set {} +interface Map {} +interface WeakSet {} +interface WeakMap {} diff --git a/typings/requirejs/require.d.ts b/typings/requirejs/require.d.ts new file mode 100644 index 00000000..ac116494 --- /dev/null +++ b/typings/requirejs/require.d.ts @@ -0,0 +1,417 @@ +// Type definitions for RequireJS 2.1.20 +// Project: http://requirejs.org/ +// Definitions by: Josh Baldwin +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/* +require-2.1.8.d.ts may be freely distributed under the MIT license. + +Copyright (c) 2013 Josh Baldwin https://github.com/jbaldwin/require.d.ts + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. +*/ + +declare module 'module' { + var mod: { + config: () => any; + id: string; + uri: string; + } + export = mod; +} + +interface RequireError extends Error { + + /** + * The error ID that maps to an ID on a web page. + **/ + requireType: string; + + /** + * Required modules. + **/ + requireModules: string[]; + + /** + * The original error, if there is one (might be null). + **/ + originalError: Error; +} + +interface RequireShim { + + /** + * List of dependencies. + **/ + deps?: string[]; + + /** + * Name the module will be exported as. + **/ + exports?: string; + + /** + * Initialize function with all dependcies passed in, + * if the function returns a value then that value is used + * as the module export value instead of the object + * found via the 'exports' string. + * @param dependencies + * @return + **/ + init?: (...dependencies: any[]) => any; +} + +interface RequireConfig { + + // The root path to use for all module lookups. + baseUrl?: string; + + // Path mappings for module names not found directly under + // baseUrl. + paths?: { [key: string]: any; }; + + + // Dictionary of Shim's. + // does not cover case of key->string[] + shim?: { [key: string]: RequireShim; }; + + /** + * For the given module prefix, instead of loading the + * module with the given ID, substitude a different + * module ID. + * + * @example + * requirejs.config({ + * map: { + * 'some/newmodule': { + * 'foo': 'foo1.2' + * }, + * 'some/oldmodule': { + * 'foo': 'foo1.0' + * } + * } + * }); + **/ + map?: { + [id: string]: { + [id: string]: string; + }; + }; + + /** + * Allows pointing multiple module IDs to a module ID that contains a bundle of modules. + * + * @example + * requirejs.config({ + * bundles: { + * 'primary': ['main', 'util', 'text', 'text!template.html'], + * 'secondary': ['text!secondary.html'] + * } + * }); + **/ + bundles?: { [key: string]: string[]; }; + + /** + * AMD configurations, use module.config() to access in + * define() functions + **/ + config?: { [id: string]: {}; }; + + /** + * Configures loading modules from CommonJS packages. + **/ + packages?: {}; + + /** + * The number of seconds to wait before giving up on loading + * a script. The default is 7 seconds. + **/ + waitSeconds?: number; + + /** + * A name to give to a loading context. This allows require.js + * to load multiple versions of modules in a page, as long as + * each top-level require call specifies a unique context string. + **/ + context?: string; + + /** + * An array of dependencies to load. + **/ + deps?: string[]; + + /** + * A function to pass to require that should be require after + * deps have been loaded. + * @param modules + **/ + callback?: (...modules: any[]) => void; + + /** + * If set to true, an error will be thrown if a script loads + * that does not call define() or have shim exports string + * value that can be checked. + **/ + enforceDefine?: boolean; + + /** + * If set to true, document.createElementNS() will be used + * to create script elements. + **/ + xhtml?: boolean; + + /** + * Extra query string arguments appended to URLs that RequireJS + * uses to fetch resources. Most useful to cache bust when + * the browser or server is not configured correctly. + * + * @example + * urlArgs: "bust= + (new Date()).getTime() + * + * As of RequireJS 2.2.0, urlArgs can be a function. If a + * function, it will receive the module ID and the URL as + * parameters, and it should return a string that will be added + * to the end of the URL. Return an empty string if no args. + * Be sure to take care of adding the '?' or '&' depending on + * the existing state of the URL. + * + * @example + + * requirejs.config({ + * urlArgs: function(id, url) { + * var args = 'v=1'; + * if (url.indexOf('view.html') !== -1) { + * args = 'v=2' + * } + * + * return (url.indexOf('?') === -1 ? '?' : '&') + args; + * } + * }); + **/ + urlArgs?: string | ((id: string, url: string) => string); + + /** + * Specify the value for the type="" attribute used for script + * tags inserted into the document by RequireJS. Default is + * "text/javascript". To use Firefox's JavasScript 1.8 + * features, use "text/javascript;version=1.8". + **/ + scriptType?: string; + + /** + * If set to true, skips the data-main attribute scanning done + * to start module loading. Useful if RequireJS is embedded in + * a utility library that may interact with other RequireJS + * library on the page, and the embedded version should not do + * data-main loading. + **/ + skipDataMain?: boolean; + + /** + * Allow extending requirejs to support Subresource Integrity + * (SRI). + **/ + onNodeCreated?: (node: HTMLScriptElement, config: RequireConfig, moduleName: string, url: string) => void; +} + +// todo: not sure what to do with this guy +interface RequireModule { + + /** + * + **/ + config(): {}; + +} + +/** +* +**/ +interface RequireMap { + + /** + * + **/ + prefix: string; + + /** + * + **/ + name: string; + + /** + * + **/ + parentMap: RequireMap; + + /** + * + **/ + url: string; + + /** + * + **/ + originalName: string; + + /** + * + **/ + fullName: string; +} + +interface Require { + + /** + * Configure require.js + **/ + config(config: RequireConfig): Require; + + /** + * CommonJS require call + * @param module Module to load + * @return The loaded module + */ + (module: string): any; + + /** + * Start the main app logic. + * Callback is optional. + * Can alternatively use deps and callback. + * @param modules Required modules to load. + **/ + (modules: string[]): void; + + /** + * @see Require() + * @param ready Called when required modules are ready. + **/ + (modules: string[], ready: Function): void; + + /** + * @see http://requirejs.org/docs/api.html#errbacks + * @param ready Called when required modules are ready. + **/ + (modules: string[], ready: Function, errback: Function): void; + + /** + * Generate URLs from require module + * @param module Module to URL + * @return URL string + **/ + toUrl(module: string): string; + + /** + * Returns true if the module has already been loaded and defined. + * @param module Module to check + **/ + defined(module: string): boolean; + + /** + * Returns true if the module has already been requested or is in the process of loading and should be available at some point. + * @param module Module to check + **/ + specified(module: string): boolean; + + /** + * On Error override + * @param err + **/ + onError(err: RequireError, errback?: (err: RequireError) => void): void; + + /** + * Undefine a module + * @param module Module to undefine. + **/ + undef(module: string): void; + + /** + * Semi-private function, overload in special instance of undef() + **/ + onResourceLoad(context: Object, map: RequireMap, depArray: RequireMap[]): void; +} + +interface RequireDefine { + + /** + * Define Simple Name/Value Pairs + * @param config Dictionary of Named/Value pairs for the config. + **/ + (config: { [key: string]: any; }): void; + + /** + * Define function. + * @param func: The function module. + **/ + (func: () => any): void; + + /** + * Define function with dependencies. + * @param deps List of dependencies module IDs. + * @param ready Callback function when the dependencies are loaded. + * callback param deps module dependencies + * callback return module definition + **/ + (deps: string[], ready: Function): void; + + /** + * Define module with simplified CommonJS wrapper. + * @param ready + * callback require requirejs instance + * callback exports exports object + * callback module module + * callback return module definition + **/ + (ready: (require: Require, exports: { [key: string]: any; }, module: RequireModule) => any): void; + + /** + * Define a module with a name and dependencies. + * @param name The name of the module. + * @param deps List of dependencies module IDs. + * @param ready Callback function when the dependencies are loaded. + * callback deps module dependencies + * callback return module definition + **/ + (name: string, deps: string[], ready: Function): void; + + /** + * Define a module with a name. + * @param name The name of the module. + * @param ready Callback function when the dependencies are loaded. + * callback return module definition + **/ + (name: string, ready: Function): void; + + /** + * Used to allow a clear indicator that a global define function (as needed for script src browser loading) conforms + * to the AMD API, any global define function SHOULD have a property called "amd" whose value is an object. + * This helps avoid conflict with any other existing JavaScript code that could have defined a define() function + * that does not conform to the AMD API. + * define.amd.jQuery is specific to jQuery and indicates that the loader is able to account for multiple version + * of jQuery being loaded simultaneously. + */ + amd: Object; +} + +// Ambient declarations for 'require' and 'define' +declare var requirejs: Require; +declare var require: Require; +declare var define: RequireDefine; diff --git a/typings/tsd.d.ts b/typings/tsd.d.ts new file mode 100644 index 00000000..805f316b --- /dev/null +++ b/typings/tsd.d.ts @@ -0,0 +1,4 @@ +/// +/// +/// +/// From 8cbc7b22e9e1860e2d011c503529469ba98c3853 Mon Sep 17 00:00:00 2001 From: sfeldman Date: Mon, 10 Oct 2016 17:52:34 +0300 Subject: [PATCH 086/235] fix missing typings for npm build compilation --- app/exec/login.ts | 2 +- app/lib/tfcommand.ts | 1 + app/lib/trace.ts | 4 +- tsd.json | 29 +- typings/archiver/archiver.d.ts | 12 +- typings/console/console.d.ts | 31 + typings/glob/glob.d.ts | 112 + typings/jszip/jszip.d.ts | 222 ++ typings/minimatch/minimatch.d.ts | 64 + typings/mkdirp/mkdirp.d.ts | 15 + typings/node-uuid/node-uuid-base.d.ts | 46 + typings/node-uuid/node-uuid-cjs.d.ts | 15 + typings/node-uuid/node-uuid.d.ts | 36 + typings/node/node.d.ts | 3735 +++++++++++++++++++++++++ typings/requirejs/require.d.ts | 417 --- typings/shelljs/shelljs.d.ts | 557 ++++ typings/tsd.d.ts | 15 +- typings/validator/validator.d.ts | 315 +++ typings/winreg/winreg.d.ts | 338 +++ typings/xml2js/xml2js.d.ts | 99 + 20 files changed, 5628 insertions(+), 437 deletions(-) create mode 100644 typings/console/console.d.ts create mode 100644 typings/glob/glob.d.ts create mode 100644 typings/jszip/jszip.d.ts create mode 100644 typings/minimatch/minimatch.d.ts create mode 100644 typings/mkdirp/mkdirp.d.ts create mode 100644 typings/node-uuid/node-uuid-base.d.ts create mode 100644 typings/node-uuid/node-uuid-cjs.d.ts create mode 100644 typings/node-uuid/node-uuid.d.ts create mode 100644 typings/node/node.d.ts delete mode 100644 typings/requirejs/require.d.ts create mode 100644 typings/shelljs/shelljs.d.ts create mode 100644 typings/validator/validator.d.ts create mode 100644 typings/winreg/winreg.d.ts create mode 100644 typings/xml2js/xml2js.d.ts diff --git a/app/exec/login.ts b/app/exec/login.ts index 75445bba..1fa5b244 100644 --- a/app/exec/login.ts +++ b/app/exec/login.ts @@ -20,7 +20,7 @@ export interface LoginResult { */ export class Login extends TfCommand { protected description = "Login and cache credentials using a PAT or basic auth."; - public exec(): Q.Promise { + public exec(): Promise { trace.debug('Login.exec'); let authHandler; return this.commandArgs.serviceUrl.val().then((collectionUrl) => { diff --git a/app/lib/tfcommand.ts b/app/lib/tfcommand.ts index 0877c503..d4c5df5d 100644 --- a/app/lib/tfcommand.ts +++ b/app/lib/tfcommand.ts @@ -17,6 +17,7 @@ import Q = require("q"); import qfs = require("./qfs"); import trace = require("./trace"); import version = require("./version"); +import console = require('console'); export interface CoreArguments { project: args.StringArgument; diff --git a/app/lib/trace.ts b/app/lib/trace.ts index adfe5495..bb91b391 100644 --- a/app/lib/trace.ts +++ b/app/lib/trace.ts @@ -1,7 +1,7 @@ - - import colors = require("colors"); import os = require('os'); +import console = require('console'); + let traceEnabled = process.env['TFX_TRACE']; export let outputType; diff --git a/tsd.json b/tsd.json index 7d75bd9d..9c5c6a71 100644 --- a/tsd.json +++ b/tsd.json @@ -6,7 +6,7 @@ "bundle": "typings/tsd.d.ts", "installed": { "node/node.d.ts": { - "commit": "f0aa5507070dc74859b636bd2dac37f3e8cab8d1" + "commit": "f9351fd6d2154b3822444c54e687f1b102827eac" }, "q/Q.d.ts": { "commit": "066819c65ff561ca109955e0b725c253e243f0a2" @@ -15,16 +15,16 @@ "commit": "a11d013885ea072e6dba017ec5181eaf1ee152db" }, "glob/glob.d.ts": { - "commit": "066819c65ff561ca109955e0b725c253e243f0a2" + "commit": "f9351fd6d2154b3822444c54e687f1b102827eac" }, "xml2js/xml2js.d.ts": { - "commit": "066819c65ff561ca109955e0b725c253e243f0a2" + "commit": "f9351fd6d2154b3822444c54e687f1b102827eac" }, "mocha/mocha.d.ts": { "commit": "9cf502e3c1a8532f92ee0114e46509175e790938" }, "minimatch/minimatch.d.ts": { - "commit": "066819c65ff561ca109955e0b725c253e243f0a2" + "commit": "f9351fd6d2154b3822444c54e687f1b102827eac" }, "lodash/lodash.d.ts": { "commit": "a11d013885ea072e6dba017ec5181eaf1ee152db" @@ -36,7 +36,7 @@ "commit": "230b346dad577c91af8db9f0a1db26697d2dd5bd" }, "jszip/jszip.d.ts": { - "commit": "e18e130e2188348070f98d92b98c0ea481c4a086" + "commit": "f9351fd6d2154b3822444c54e687f1b102827eac" }, "request/request.d.ts": { "commit": "43b6bf88758852b9ab713a9b011487f047f94f4e" @@ -48,22 +48,22 @@ "commit": "b9c534a52a50547c61c5f80519aaed285eb3e8b8" }, "mkdirp/mkdirp.d.ts": { - "commit": "76ed26e95e91f1c91f2d11819c44b55b617e859a" + "commit": "f9351fd6d2154b3822444c54e687f1b102827eac" }, "minimist/minimist.d.ts": { "commit": "eb59a40d3c2f3257e34ec2ede181046230814a41" }, "shelljs/shelljs.d.ts": { - "commit": "eb59a40d3c2f3257e34ec2ede181046230814a41" + "commit": "f9351fd6d2154b3822444c54e687f1b102827eac" }, "node-uuid/node-uuid.d.ts": { - "commit": "eb59a40d3c2f3257e34ec2ede181046230814a41" + "commit": "f9351fd6d2154b3822444c54e687f1b102827eac" }, "validator/validator.d.ts": { - "commit": "eb59a40d3c2f3257e34ec2ede181046230814a41" + "commit": "f9351fd6d2154b3822444c54e687f1b102827eac" }, "archiver/archiver.d.ts": { - "commit": "eb59a40d3c2f3257e34ec2ede181046230814a41" + "commit": "f9351fd6d2154b3822444c54e687f1b102827eac" }, "read/read.d.ts": { "commit": "0dd29bf8253536ae24e61c109524e924ea510046" @@ -73,6 +73,15 @@ }, "copy-paste/copy-paste.d.ts": { "commit": "f9351fd6d2154b3822444c54e687f1b102827eac" + }, + "winreg/winreg.d.ts": { + "commit": "f9351fd6d2154b3822444c54e687f1b102827eac" + }, + "node-uuid/node-uuid-cjs.d.ts": { + "commit": "f9351fd6d2154b3822444c54e687f1b102827eac" + }, + "node-uuid/node-uuid-base.d.ts": { + "commit": "f9351fd6d2154b3822444c54e687f1b102827eac" } } } diff --git a/typings/archiver/archiver.d.ts b/typings/archiver/archiver.d.ts index e39fe426..33b26062 100644 --- a/typings/archiver/archiver.d.ts +++ b/typings/archiver/archiver.d.ts @@ -1,7 +1,7 @@ // Type definitions for archiver v0.15.0 // Project: https://github.com/archiverjs/node-archiver // Definitions by: Esri -// Definitions: https://github.com/borisyankov/DefinitelyTyped +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /* =================== USAGE =================== @@ -13,18 +13,18 @@ =============================================== */ - +/// declare module "archiver" { import * as FS from 'fs'; - import * as Stream from "stream"; + import * as STREAM from 'stream'; interface nameInterface { name?: string; } - interface Archiver extends Stream.Transform { + interface Archiver extends STREAM.Transform { pipe(writeStream: FS.WriteStream): void; - append(readStream: FS.ReadStream, name: nameInterface): void; + append(source: FS.ReadStream | Buffer | string, name: nameInterface): void; finalize(): void; directory(dirpath: string, destpath?: string | boolean, data?: any) } @@ -40,4 +40,4 @@ declare module "archiver" { } export = archiver; -} \ No newline at end of file +} diff --git a/typings/console/console.d.ts b/typings/console/console.d.ts new file mode 100644 index 00000000..b7a07ff7 --- /dev/null +++ b/typings/console/console.d.ts @@ -0,0 +1,31 @@ +// see vertx-js/util/console.js + +/** + * A simple console object that can be used to print log messages + * errors, and warnings. + * @example + * + * console.log('Hello standard out'); + * console.warn('Warning standard error'); + * console.error('Alert! Alert!'); + * + */ +interface Console { + /** + * Log the msg to STDOUT. + * @param msg The message to log to standard out. + */ + log(msg: any); + + /** + * Log the msg to STDERR + * @param msg The message to log with a warning to standard error. + */ + warn(msg: any); + + /** + * Log the msg to STDERR + * @param msg The message to log with a warning alert to standard error. + */ + error(msg: any); +} \ No newline at end of file diff --git a/typings/glob/glob.d.ts b/typings/glob/glob.d.ts new file mode 100644 index 00000000..2957204f --- /dev/null +++ b/typings/glob/glob.d.ts @@ -0,0 +1,112 @@ +// Type definitions for Glob 5.0.10 +// Project: https://github.com/isaacs/node-glob +// Definitions by: vvakame +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// +/// + +declare module "glob" { + + import events = require("events"); + import fs = require('fs'); + import minimatch = require("minimatch"); + + function G(pattern: string, cb: (err: Error, matches: string[]) => void): void; + function G(pattern: string, options: G.IOptions, cb: (err: Error, matches: string[]) => void): void; + + namespace G { + function sync(pattern: string, options?: IOptions): string[]; + + function hasMagic(pattern: string, options?: IOptions): boolean; + + var Glob: IGlobStatic; + var GlobSync: IGlobSyncStatic; + + interface IOptions extends minimatch.IOptions { + cwd?: string; + root?: string; + dot?: boolean; + nomount?: boolean; + mark?: boolean; + nosort?: boolean; + stat?: boolean; + silent?: boolean; + strict?: boolean; + cache?: { [path: string]: any /* boolean | string | string[] */ }; + statCache?: { [path: string]: fs.Stats }; + symlinks?: any; + sync?: boolean; + nounique?: boolean; + nonull?: boolean; + debug?: boolean; + nobrace?: boolean; + noglobstar?: boolean; + noext?: boolean; + nocase?: boolean; + matchBase?: any; + nodir?: boolean; + ignore?: any; /* string | string[] */ + follow?: boolean; + realpath?: boolean; + nonegate?: boolean; + nocomment?: boolean; + + /** Deprecated. */ + globDebug?: boolean; + } + + interface IGlobStatic extends events.EventEmitter { + new (pattern: string, cb?: (err: Error, matches: string[]) => void): IGlob; + new (pattern: string, options: IOptions, cb?: (err: Error, matches: string[]) => void): IGlob; + prototype: IGlob; + } + + interface IGlobSyncStatic { + new (pattern: string, options?: IOptions): IGlobBase + prototype: IGlobBase; + } + + interface IGlobBase { + minimatch: minimatch.IMinimatch; + options: IOptions; + aborted: boolean; + cache: { [path: string]: any /* boolean | string | string[] */ }; + statCache: { [path: string]: fs.Stats }; + symlinks: { [path: string]: boolean }; + realpathCache: { [path: string]: string }; + found: string[]; + } + + interface IGlob extends IGlobBase, events.EventEmitter { + pause(): void; + resume(): void; + abort(): void; + + /** Deprecated. */ + EOF: any; + /** Deprecated. */ + paused: boolean; + /** Deprecated. */ + maxDepth: number; + /** Deprecated. */ + maxLength: number; + /** Deprecated. */ + changedCwd: boolean; + /** Deprecated. */ + cwd: string; + /** Deprecated. */ + root: string; + /** Deprecated. */ + error: any; + /** Deprecated. */ + matches: string[]; + /** Deprecated. */ + log(...args: any[]): void; + /** Deprecated. */ + emitMatch(m: any): void; + } + } + + export = G; +} diff --git a/typings/jszip/jszip.d.ts b/typings/jszip/jszip.d.ts new file mode 100644 index 00000000..46fe0f87 --- /dev/null +++ b/typings/jszip/jszip.d.ts @@ -0,0 +1,222 @@ +// Type definitions for JSZip +// Project: http://stuk.github.com/jszip/ +// Definitions by: mzeiher +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +interface JSZip { + files: {[key: string]: JSZipObject}; + + /** + * Get a file from the archive + * + * @param Path relative path to file + * @return File matching path, null if no file found + */ + file(path: string): JSZipObject; + + /** + * Get files matching a RegExp from archive + * + * @param path RegExp to match + * @return Return all matching files or an empty array + */ + file(path: RegExp): JSZipObject[]; + + /** + * Add a file to the archive + * + * @param path Relative path to file + * @param content Content of the file + * @param options Optional information about the file + * @return JSZip object + */ + file(path: string, data: any, options?: JSZipFileOptions): JSZip; + + /** + * Return an new JSZip instance with the given folder as root + * + * @param name Name of the folder + * @return New JSZip object with the given folder as root or null + */ + folder(name: string): JSZip; + + /** + * Returns new JSZip instances with the matching folders as root + * + * @param name RegExp to match + * @return New array of JSZipFile objects which match the RegExp + */ + folder(name: RegExp): JSZipObject[]; + + /** + * Call a callback function for each entry at this folder level. + * + * @param callback function + */ + forEach(callback: (relativePath: string, file: JSZipObject) => void): void; + + /** + * Get all files wchich match the given filter function + * + * @param predicate Filter function + * @return Array of matched elements + */ + filter(predicate: (relativePath: string, file: JSZipObject) => boolean): JSZipObject[]; + + /** + * Removes the file or folder from the archive + * + * @param path Relative path of file or folder + * @return Returns the JSZip instance + */ + remove(path: string): JSZip; + + /** + * @deprecated since version 3.0 + * @see {@link generateAsync} + * http://stuk.github.io/jszip/documentation/upgrade_guide.html + */ + generate(options?: JSZipGeneratorOptions): any; + + /** + * Generates a new archive asynchronously + * + * @param options Optional options for the generator + * @return The serialized archive + */ + generateAsync(options?: JSZipGeneratorOptions, onUpdate?: Function): Promise; + + /** + * @deprecated since version 3.0 + * @see {@link loadAsync} + * http://stuk.github.io/jszip/documentation/upgrade_guide.html + */ + load(): void; + + /** + * Deserialize zip file asynchronously + * + * @param data Serialized zip file + * @param options Options for deserializing + * @return Returns promise + */ + loadAsync(data: any, options?: JSZipLoadOptions): Promise; +} + +type Serialization = ("string" | "text" | "base64" | "binarystring" | "uint8array" | + "arraybuffer" | "blob" | "nodebuffer"); + +interface JSZipObject { + name: string; + dir: boolean; + date: Date; + comment: string; + options: JSZipObjectOptions; + + /** + * Prepare the content in the asked type. + * @param {String} type the type of the result. + * @param {Function} onUpdate a function to call on each internal update. + * @return Promise the promise of the result. + */ + async(type: Serialization, onUpdate?: Function): Promise; + + /** + * @deprecated since version 3.0 + */ + asText(): void; + /** + * @deprecated since version 3.0 + */ + asBinary(): void; + /** + * @deprecated since version 3.0 + */ + asArrayBuffer(): void; + /** + * @deprecated since version 3.0 + */ + asUint8Array(): void; + //asNodeBuffer(): void; +} + +interface JSZipFileOptions { + base64?: boolean; + binary?: boolean; + date?: Date; + compression?: string; + comment?: string; + optimizedBinaryString?: boolean; + createFolders?: boolean; +} + +interface JSZipObjectOptions { + /** deprecated */ + base64: boolean; + /** deprecated */ + binary: boolean; + /** deprecated */ + dir: boolean; + /** deprecated */ + date: Date; + compression: string; +} + +interface JSZipGeneratorOptions { + /** deprecated */ + base64?: boolean; + /** DEFLATE or STORE */ + compression?: string; + /** base64 (default), string, uint8array, blob */ + type?: string; + comment?: string; +} + +interface JSZipLoadOptions { + base64?: boolean; + checkCRC32?: boolean; + optimizedBinaryString?: boolean; + createFolders?: boolean; +} + +interface JSZipSupport { + arraybuffer: boolean; + uint8array: boolean; + blob: boolean; + nodebuffer: boolean; +} + +declare var JSZip: { + /** + * Create JSZip instance + */ + (): JSZip; + /** + * Create JSZip instance + * If no parameters given an empty zip archive will be created + * + * @param data Serialized zip archive + * @param options Description of the serialized zip archive + */ + (data: any, options?: JSZipLoadOptions): JSZip; + + /** + * Create JSZip instance + */ + new (): JSZip; + /** + * Create JSZip instance + * If no parameters given an empty zip archive will be created + * + * @param data Serialized zip archive + * @param options Description of the serialized zip archive + */ + new (data: any, options?: JSZipLoadOptions): JSZip; + + prototype: JSZip; + support: JSZipSupport; +} + +declare module "jszip" { + export = JSZip; +} diff --git a/typings/minimatch/minimatch.d.ts b/typings/minimatch/minimatch.d.ts new file mode 100644 index 00000000..5a6c7215 --- /dev/null +++ b/typings/minimatch/minimatch.d.ts @@ -0,0 +1,64 @@ +// Type definitions for Minimatch 2.0.8 +// Project: https://github.com/isaacs/minimatch +// Definitions by: vvakame +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare module "minimatch" { + + function M(target: string, pattern: string, options?: M.IOptions): boolean; + + namespace M { + function match(list: string[], pattern: string, options?: IOptions): string[]; + function filter(pattern: string, options?: IOptions): (element: string, indexed: number, array: string[]) => boolean; + function makeRe(pattern: string, options?: IOptions): RegExp; + + var Minimatch: IMinimatchStatic; + + interface IOptions { + debug?: boolean; + nobrace?: boolean; + noglobstar?: boolean; + dot?: boolean; + noext?: boolean; + nocase?: boolean; + nonull?: boolean; + matchBase?: boolean; + nocomment?: boolean; + nonegate?: boolean; + flipNegate?: boolean; + } + + interface IMinimatchStatic { + new (pattern: string, options?: IOptions): IMinimatch; + prototype: IMinimatch; + } + + interface IMinimatch { + pattern: string; + options: IOptions; + /** 2-dimensional array of regexp or string expressions. */ + set: any[][]; // (RegExp | string)[][] + regexp: RegExp; + negate: boolean; + comment: boolean; + empty: boolean; + + makeRe(): RegExp; // regexp or boolean + match(fname: string): boolean; + matchOne(files: string[], pattern: string[], partial: boolean): boolean; + + /** Deprecated. For internal use. */ + debug(): void; + /** Deprecated. For internal use. */ + make(): void; + /** Deprecated. For internal use. */ + parseNegate(): void; + /** Deprecated. For internal use. */ + braceExpand(pattern: string, options: IOptions): void; + /** Deprecated. For internal use. */ + parse(pattern: string, isSub?: boolean): void; + } + } + + export = M; +} diff --git a/typings/mkdirp/mkdirp.d.ts b/typings/mkdirp/mkdirp.d.ts new file mode 100644 index 00000000..cd635ab4 --- /dev/null +++ b/typings/mkdirp/mkdirp.d.ts @@ -0,0 +1,15 @@ +// Type definitions for mkdirp 0.3.0 +// Project: http://github.com/substack/node-mkdirp +// Definitions by: Bart van der Schoor +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare module 'mkdirp' { + + function mkdirp(dir: string, cb: (err: any, made: string) => void): void; + function mkdirp(dir: string, flags: any, cb: (err: any, made: string) => void): void; + + namespace mkdirp { + function sync(dir: string, flags?: any): string; + } + export = mkdirp; +} diff --git a/typings/node-uuid/node-uuid-base.d.ts b/typings/node-uuid/node-uuid-base.d.ts new file mode 100644 index 00000000..fc59e9c7 --- /dev/null +++ b/typings/node-uuid/node-uuid-base.d.ts @@ -0,0 +1,46 @@ +// Type definitions for node-uuid.js +// Project: https://github.com/broofa/node-uuid +// Definitions by: Jeff May +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/** Common definitions for all environments */ +declare namespace __NodeUUID { + interface UUIDOptions { + + /** + * Node id as Array of 6 bytes (per 4.1.6). + * Default: Randomly generated ID. See note 1. + */ + node?: any[]; + + /** + * (Number between 0 - 0x3fff) RFC clock sequence. + * Default: An internally maintained clockseq is used. + */ + clockseq?: number; + + /** + * (Number | Date) Time in milliseconds since unix Epoch. + * Default: The current time is used. + */ + msecs?: number|Date; + + /** + * (Number between 0-9999) additional time, in 100-nanosecond units. Ignored if msecs is unspecified. + * Default: internal uuid counter is used, as per 4.2.1.2. + */ + nsecs?: number; + } + + interface UUID { + v1(options?: UUIDOptions): string; + v1(options?: UUIDOptions, buffer?: number[], offset?: number): number[]; + + v4(options?: UUIDOptions): string; + v4(options?: UUIDOptions, buffer?: number[], offset?: number): number[]; + + parse(id: string, buffer?: number[], offset?: number): number[]; + + unparse(buffer: number[], offset?: number): string; + } +} diff --git a/typings/node-uuid/node-uuid-cjs.d.ts b/typings/node-uuid/node-uuid-cjs.d.ts new file mode 100644 index 00000000..78f75354 --- /dev/null +++ b/typings/node-uuid/node-uuid-cjs.d.ts @@ -0,0 +1,15 @@ +// Type definitions for node-uuid.js +// Project: https://github.com/broofa/node-uuid +// Definitions by: Jeff May +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +/** + * Expose as CommonJS module + * For use in node environment or browser environment (using webpack or other module loaders) + */ +declare module "node-uuid" { + var uuid: __NodeUUID.UUID; + export = uuid; +} \ No newline at end of file diff --git a/typings/node-uuid/node-uuid.d.ts b/typings/node-uuid/node-uuid.d.ts new file mode 100644 index 00000000..a6737053 --- /dev/null +++ b/typings/node-uuid/node-uuid.d.ts @@ -0,0 +1,36 @@ +// Type definitions for node-uuid.js +// Project: https://github.com/broofa/node-uuid +// Definitions by: Jeff May +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// +/// +/// + +/** + * Definitions for use in node environment + * + * !! For browser enviroments, use node-uuid-global or node-uuid-cjs + */ +declare module __NodeUUID { + /** + * Overloads for node environment + * We need to duplicate some declarations because + * interface merging doesn't work with overloads + */ + interface UUID { + v1(options?: UUIDOptions): string; + v1(options?: UUIDOptions, buffer?: number[], offset?: number): number[]; + v1(options?: UUIDOptions, buffer?: Buffer, offset?: number): Buffer; + + v4(options?: UUIDOptions): string; + v4(options?: UUIDOptions, buffer?: number[], offset?: number): number[]; + v4(options?: UUIDOptions, buffer?: Buffer, offset?: number): Buffer; + + parse(id: string, buffer?: number[], offset?: number): number[]; + parse(id: string, buffer?: Buffer, offset?: number): Buffer; + + unparse(buffer: number[], offset?: number): string; + unparse(buffer: Buffer, offset?: number): string; + } +} diff --git a/typings/node/node.d.ts b/typings/node/node.d.ts new file mode 100644 index 00000000..c3d9d2e1 --- /dev/null +++ b/typings/node/node.d.ts @@ -0,0 +1,3735 @@ +// Type definitions for Node.js v6.x +// Project: http://nodejs.org/ +// Definitions by: Microsoft TypeScript , DefinitelyTyped +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/************************************************ +* * +* Node.js v6.x API * +* * +************************************************/ + +interface Error { + stack?: string; +} + +interface ErrorConstructor { + captureStackTrace(targetObject: Object, constructorOpt?: Function): void; + stackTraceLimit: number; +} + +// compat for TypeScript 1.8 +// if you use with --target es3 or --target es5 and use below definitions, +// use the lib.es6.d.ts that is bundled with TypeScript 1.8. +interface MapConstructor { } +interface WeakMapConstructor { } +interface SetConstructor { } +interface WeakSetConstructor { } + +/************************************************ +* * +* GLOBAL * +* * +************************************************/ +declare var process: NodeJS.Process; +declare var global: NodeJS.Global; + +declare var __filename: string; +declare var __dirname: string; +declare var console: any; + +declare function setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timer; +declare function clearTimeout(timeoutId: NodeJS.Timer): void; +declare function setInterval(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timer; +declare function clearInterval(intervalId: NodeJS.Timer): void; +declare function setImmediate(callback: (...args: any[]) => void, ...args: any[]): any; +declare function clearImmediate(immediateId: any): void; + +interface NodeRequireFunction { + (id: string): any; +} + +interface NodeRequire extends NodeRequireFunction { + resolve(id: string): string; + cache: any; + extensions: any; + main: any; +} + +declare var require: NodeRequire; + +interface NodeModule { + exports: any; + require: NodeRequireFunction; + id: string; + filename: string; + loaded: boolean; + parent: any; + children: any[]; +} + +declare var module: NodeModule; + +// Same as module.exports +declare var exports: any; +declare var SlowBuffer: { + new (str: string, encoding?: string): Buffer; + new (size: number): Buffer; + new (size: Uint8Array): Buffer; + new (array: any[]): Buffer; + prototype: Buffer; + isBuffer(obj: any): boolean; + byteLength(string: string, encoding?: string): number; + concat(list: Buffer[], totalLength?: number): Buffer; +}; + + +// Buffer class +type BufferEncoding = "ascii" | "utf8" | "utf16le" | "ucs2" | "binary" | "hex"; +interface Buffer extends NodeBuffer { } + +/** + * Raw data is stored in instances of the Buffer class. + * A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized. + * Valid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex' + */ +declare var Buffer: { + /** + * Allocates a new buffer containing the given {str}. + * + * @param str String to store in buffer. + * @param encoding encoding to use, optional. Default is 'utf8' + */ + new (str: string, encoding?: string): Buffer; + /** + * Allocates a new buffer of {size} octets. + * + * @param size count of octets to allocate. + */ + new (size: number): Buffer; + /** + * Allocates a new buffer containing the given {array} of octets. + * + * @param array The octets to store. + */ + new (array: Uint8Array): Buffer; + /** + * Produces a Buffer backed by the same allocated memory as + * the given {ArrayBuffer}. + * + * + * @param arrayBuffer The ArrayBuffer with which to share memory. + */ + new (arrayBuffer: ArrayBuffer): Buffer; + /** + * Allocates a new buffer containing the given {array} of octets. + * + * @param array The octets to store. + */ + new (array: any[]): Buffer; + /** + * Copies the passed {buffer} data onto a new {Buffer} instance. + * + * @param buffer The buffer to copy. + */ + new (buffer: Buffer): Buffer; + prototype: Buffer; + /** + * Allocates a new Buffer using an {array} of octets. + * + * @param array + */ + from(array: any[]): Buffer; + /** + * When passed a reference to the .buffer property of a TypedArray instance, + * the newly created Buffer will share the same allocated memory as the TypedArray. + * The optional {byteOffset} and {length} arguments specify a memory range + * within the {arrayBuffer} that will be shared by the Buffer. + * + * @param arrayBuffer The .buffer property of a TypedArray or a new ArrayBuffer() + * @param byteOffset + * @param length + */ + from(arrayBuffer: ArrayBuffer, byteOffset?: number, length?: number): Buffer; + /** + * Copies the passed {buffer} data onto a new Buffer instance. + * + * @param buffer + */ + from(buffer: Buffer): Buffer; + /** + * Creates a new Buffer containing the given JavaScript string {str}. + * If provided, the {encoding} parameter identifies the character encoding. + * If not provided, {encoding} defaults to 'utf8'. + * + * @param str + */ + from(str: string, encoding?: string): Buffer; + /** + * Returns true if {obj} is a Buffer + * + * @param obj object to test. + */ + isBuffer(obj: any): obj is Buffer; + /** + * Returns true if {encoding} is a valid encoding argument. + * Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex' + * + * @param encoding string to test. + */ + isEncoding(encoding: string): boolean; + /** + * Gives the actual byte length of a string. encoding defaults to 'utf8'. + * This is not the same as String.prototype.length since that returns the number of characters in a string. + * + * @param string string to test. + * @param encoding encoding used to evaluate (defaults to 'utf8') + */ + byteLength(string: string, encoding?: string): number; + /** + * Returns a buffer which is the result of concatenating all the buffers in the list together. + * + * If the list has no items, or if the totalLength is 0, then it returns a zero-length buffer. + * If the list has exactly one item, then the first item of the list is returned. + * If the list has more than one item, then a new Buffer is created. + * + * @param list An array of Buffer objects to concatenate + * @param totalLength Total length of the buffers when concatenated. + * If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly. + */ + concat(list: Buffer[], totalLength?: number): Buffer; + /** + * The same as buf1.compare(buf2). + */ + compare(buf1: Buffer, buf2: Buffer): number; + /** + * Allocates a new buffer of {size} octets. + * + * @param size count of octets to allocate. + * @param fill if specified, buffer will be initialized by calling buf.fill(fill). + * If parameter is omitted, buffer will be filled with zeros. + * @param encoding encoding used for call to buf.fill while initalizing + */ + alloc(size: number, fill?: string | Buffer | number, encoding?: string): Buffer; + /** + * Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents + * of the newly created Buffer are unknown and may contain sensitive data. + * + * @param size count of octets to allocate + */ + allocUnsafe(size: number): Buffer; + /** + * Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents + * of the newly created Buffer are unknown and may contain sensitive data. + * + * @param size count of octets to allocate + */ + allocUnsafeSlow(size: number): Buffer; +}; + +/************************************************ +* * +* GLOBAL INTERFACES * +* * +************************************************/ +declare namespace NodeJS { + export interface ErrnoException extends Error { + errno?: string; + code?: string; + path?: string; + syscall?: string; + stack?: string; + } + + export class EventEmitter { + addListener(event: string | symbol, listener: Function): this; + on(event: string | symbol, listener: Function): this; + once(event: string | symbol, listener: Function): this; + removeListener(event: string | symbol, listener: Function): this; + removeAllListeners(event?: string | symbol): this; + setMaxListeners(n: number): this; + getMaxListeners(): number; + listeners(event: string | symbol): Function[]; + emit(event: string | symbol, ...args: any[]): boolean; + listenerCount(type: string | symbol): number; + // Added in Node 6... + prependListener(event: string | symbol, listener: Function): this; + prependOnceListener(event: string | symbol, listener: Function): this; + eventNames(): (string | symbol)[]; + } + + export interface ReadableStream extends EventEmitter { + readable: boolean; + read(size?: number): string | Buffer; + setEncoding(encoding: string): void; + pause(): ReadableStream; + resume(): ReadableStream; + pipe(destination: T, options?: { end?: boolean; }): T; + unpipe(destination?: T): void; + unshift(chunk: string): void; + unshift(chunk: Buffer): void; + wrap(oldStream: ReadableStream): ReadableStream; + } + + export interface WritableStream extends EventEmitter { + writable: boolean; + write(buffer: Buffer | string, cb?: Function): boolean; + write(str: string, encoding?: string, cb?: Function): boolean; + end(): void; + end(buffer: Buffer, cb?: Function): void; + end(str: string, cb?: Function): void; + end(str: string, encoding?: string, cb?: Function): void; + } + + export interface ReadWriteStream extends ReadableStream, WritableStream { + pause(): ReadWriteStream; + resume(): ReadWriteStream; + } + + export interface Events extends EventEmitter { } + + export interface Domain extends Events { + run(fn: Function): void; + add(emitter: Events): void; + remove(emitter: Events): void; + bind(cb: (err: Error, data: any) => any): any; + intercept(cb: (data: any) => any): any; + dispose(): void; + + addListener(event: string, listener: Function): this; + on(event: string, listener: Function): this; + once(event: string, listener: Function): this; + removeListener(event: string, listener: Function): this; + removeAllListeners(event?: string): this; + } + + export interface MemoryUsage { + rss: number; + heapTotal: number; + heapUsed: number; + } + + export interface ProcessVersions { + http_parser: string; + node: string; + v8: string; + ares: string; + uv: string; + zlib: string; + modules: string; + openssl: string; + } + + export interface Process extends EventEmitter { + stdout: WritableStream; + stderr: WritableStream; + stdin: ReadableStream; + argv: string[]; + execArgv: string[]; + execPath: string; + abort(): void; + chdir(directory: string): void; + cwd(): string; + env: any; + exit(code?: number): void; + exitCode: number; + getgid(): number; + setgid(id: number): void; + setgid(id: string): void; + getuid(): number; + setuid(id: number): void; + setuid(id: string): void; + version: string; + versions: ProcessVersions; + config: { + target_defaults: { + cflags: any[]; + default_configuration: string; + defines: string[]; + include_dirs: string[]; + libraries: string[]; + }; + variables: { + clang: number; + host_arch: string; + node_install_npm: boolean; + node_install_waf: boolean; + node_prefix: string; + node_shared_openssl: boolean; + node_shared_v8: boolean; + node_shared_zlib: boolean; + node_use_dtrace: boolean; + node_use_etw: boolean; + node_use_openssl: boolean; + target_arch: string; + v8_no_strict_aliasing: number; + v8_use_snapshot: boolean; + visibility: string; + }; + }; + kill(pid: number, signal?: string | number): void; + pid: number; + title: string; + arch: string; + platform: string; + memoryUsage(): MemoryUsage; + nextTick(callback: Function, ...args: any[]): void; + umask(mask?: number): number; + uptime(): number; + hrtime(time?: number[]): number[]; + domain: Domain; + + // Worker + send?(message: any, sendHandle?: any): void; + disconnect(): void; + connected: boolean; + } + + export interface Global { + Array: typeof Array; + ArrayBuffer: typeof ArrayBuffer; + Boolean: typeof Boolean; + Buffer: typeof Buffer; + DataView: typeof DataView; + Date: typeof Date; + Error: typeof Error; + EvalError: typeof EvalError; + Float32Array: typeof Float32Array; + Float64Array: typeof Float64Array; + Function: typeof Function; + GLOBAL: Global; + Infinity: typeof Infinity; + Int16Array: typeof Int16Array; + Int32Array: typeof Int32Array; + Int8Array: typeof Int8Array; + Intl: typeof Intl; + JSON: typeof JSON; + Map: MapConstructor; + Math: typeof Math; + NaN: typeof NaN; + Number: typeof Number; + Object: typeof Object; + Promise: Function; + RangeError: typeof RangeError; + ReferenceError: typeof ReferenceError; + RegExp: typeof RegExp; + Set: SetConstructor; + String: typeof String; + Symbol: Function; + SyntaxError: typeof SyntaxError; + TypeError: typeof TypeError; + URIError: typeof URIError; + Uint16Array: typeof Uint16Array; + Uint32Array: typeof Uint32Array; + Uint8Array: typeof Uint8Array; + Uint8ClampedArray: Function; + WeakMap: WeakMapConstructor; + WeakSet: WeakSetConstructor; + clearImmediate: (immediateId: any) => void; + clearInterval: (intervalId: NodeJS.Timer) => void; + clearTimeout: (timeoutId: NodeJS.Timer) => void; + console: typeof console; + decodeURI: typeof decodeURI; + decodeURIComponent: typeof decodeURIComponent; + encodeURI: typeof encodeURI; + encodeURIComponent: typeof encodeURIComponent; + escape: (str: string) => string; + eval: typeof eval; + global: Global; + isFinite: typeof isFinite; + isNaN: typeof isNaN; + parseFloat: typeof parseFloat; + parseInt: typeof parseInt; + process: Process; + root: Global; + setImmediate: (callback: (...args: any[]) => void, ...args: any[]) => any; + setInterval: (callback: (...args: any[]) => void, ms: number, ...args: any[]) => NodeJS.Timer; + setTimeout: (callback: (...args: any[]) => void, ms: number, ...args: any[]) => NodeJS.Timer; + undefined: typeof undefined; + unescape: (str: string) => string; + gc: () => void; + v8debug?: any; + } + + export interface Timer { + ref(): void; + unref(): void; + } +} + +interface IterableIterator { } + +/** + * @deprecated + */ +interface NodeBuffer extends Uint8Array { + write(string: string, offset?: number, length?: number, encoding?: string): number; + toString(encoding?: string, start?: number, end?: number): string; + toJSON(): { type: 'Buffer', data: any[] }; + equals(otherBuffer: Buffer): boolean; + compare(otherBuffer: Buffer, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number; + copy(targetBuffer: Buffer, targetStart?: number, sourceStart?: number, sourceEnd?: number): number; + slice(start?: number, end?: number): Buffer; + writeUIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; + writeUIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; + writeIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; + writeIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; + readUIntLE(offset: number, byteLength: number, noAssert?: boolean): number; + readUIntBE(offset: number, byteLength: number, noAssert?: boolean): number; + readIntLE(offset: number, byteLength: number, noAssert?: boolean): number; + readIntBE(offset: number, byteLength: number, noAssert?: boolean): number; + readUInt8(offset: number, noAssert?: boolean): number; + readUInt16LE(offset: number, noAssert?: boolean): number; + readUInt16BE(offset: number, noAssert?: boolean): number; + readUInt32LE(offset: number, noAssert?: boolean): number; + readUInt32BE(offset: number, noAssert?: boolean): number; + readInt8(offset: number, noAssert?: boolean): number; + readInt16LE(offset: number, noAssert?: boolean): number; + readInt16BE(offset: number, noAssert?: boolean): number; + readInt32LE(offset: number, noAssert?: boolean): number; + readInt32BE(offset: number, noAssert?: boolean): number; + readFloatLE(offset: number, noAssert?: boolean): number; + readFloatBE(offset: number, noAssert?: boolean): number; + readDoubleLE(offset: number, noAssert?: boolean): number; + readDoubleBE(offset: number, noAssert?: boolean): number; + swap16(): Buffer; + swap32(): Buffer; + swap64(): Buffer; + writeUInt8(value: number, offset: number, noAssert?: boolean): number; + writeUInt16LE(value: number, offset: number, noAssert?: boolean): number; + writeUInt16BE(value: number, offset: number, noAssert?: boolean): number; + writeUInt32LE(value: number, offset: number, noAssert?: boolean): number; + writeUInt32BE(value: number, offset: number, noAssert?: boolean): number; + writeInt8(value: number, offset: number, noAssert?: boolean): number; + writeInt16LE(value: number, offset: number, noAssert?: boolean): number; + writeInt16BE(value: number, offset: number, noAssert?: boolean): number; + writeInt32LE(value: number, offset: number, noAssert?: boolean): number; + writeInt32BE(value: number, offset: number, noAssert?: boolean): number; + writeFloatLE(value: number, offset: number, noAssert?: boolean): number; + writeFloatBE(value: number, offset: number, noAssert?: boolean): number; + writeDoubleLE(value: number, offset: number, noAssert?: boolean): number; + writeDoubleBE(value: number, offset: number, noAssert?: boolean): number; + fill(value: any, offset?: number, end?: number): this; + indexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; + lastIndexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; + entries(): IterableIterator<[number, number]>; + includes(value: string | number | Buffer, byteOffset?: number, encoding?: string): boolean; + keys(): IterableIterator; + values(): IterableIterator; +} + +/************************************************ +* * +* MODULES * +* * +************************************************/ +declare module "buffer" { + export var INSPECT_MAX_BYTES: number; + var BuffType: typeof Buffer; + var SlowBuffType: typeof SlowBuffer; + export { BuffType as Buffer, SlowBuffType as SlowBuffer }; +} + +declare module "querystring" { + export interface StringifyOptions { + encodeURIComponent?: Function; + } + + export interface ParseOptions { + maxKeys?: number; + decodeURIComponent?: Function; + } + + export function stringify(obj: T, sep?: string, eq?: string, options?: StringifyOptions): string; + export function parse(str: string, sep?: string, eq?: string, options?: ParseOptions): any; + export function parse(str: string, sep?: string, eq?: string, options?: ParseOptions): T; + export function escape(str: string): string; + export function unescape(str: string): string; +} + +declare module "events" { + export class EventEmitter extends NodeJS.EventEmitter { + static EventEmitter: EventEmitter; + static listenerCount(emitter: EventEmitter, event: string | symbol): number; // deprecated + static defaultMaxListeners: number; + + addListener(event: string | symbol, listener: Function): this; + on(event: string | symbol, listener: Function): this; + once(event: string | symbol, listener: Function): this; + prependListener(event: string | symbol, listener: Function): this; + prependOnceListener(event: string | symbol, listener: Function): this; + removeListener(event: string | symbol, listener: Function): this; + removeAllListeners(event?: string | symbol): this; + setMaxListeners(n: number): this; + getMaxListeners(): number; + listeners(event: string | symbol): Function[]; + emit(event: string | symbol, ...args: any[]): boolean; + eventNames(): (string | symbol)[]; + listenerCount(type: string | symbol): number; + } +} + +declare module "http" { + import * as events from "events"; + import * as net from "net"; + import * as stream from "stream"; + + export interface RequestOptions { + protocol?: string; + host?: string; + hostname?: string; + family?: number; + port?: number; + localAddress?: string; + socketPath?: string; + method?: string; + path?: string; + headers?: { [key: string]: any }; + auth?: string; + agent?: Agent | boolean; + } + + export interface Server extends net.Server { + setTimeout(msecs: number, callback: Function): void; + maxHeadersCount: number; + timeout: number; + listening: boolean; + } + /** + * @deprecated Use IncomingMessage + */ + export interface ServerRequest extends IncomingMessage { + connection: net.Socket; + } + export interface ServerResponse extends stream.Writable { + // Extended base methods + write(buffer: Buffer): boolean; + write(buffer: Buffer, cb?: Function): boolean; + write(str: string, cb?: Function): boolean; + write(str: string, encoding?: string, cb?: Function): boolean; + write(str: string, encoding?: string, fd?: string): boolean; + + writeContinue(): void; + writeHead(statusCode: number, reasonPhrase?: string, headers?: any): void; + writeHead(statusCode: number, headers?: any): void; + statusCode: number; + statusMessage: string; + headersSent: boolean; + setHeader(name: string, value: string | string[]): void; + setTimeout(msecs: number, callback: Function): ServerResponse; + sendDate: boolean; + getHeader(name: string): string; + removeHeader(name: string): void; + write(chunk: any, encoding?: string): any; + addTrailers(headers: any): void; + finished: boolean; + + // Extended base methods + end(): void; + end(buffer: Buffer, cb?: Function): void; + end(str: string, cb?: Function): void; + end(str: string, encoding?: string, cb?: Function): void; + end(data?: any, encoding?: string): void; + } + export interface ClientRequest extends stream.Writable { + // Extended base methods + write(buffer: Buffer): boolean; + write(buffer: Buffer, cb?: Function): boolean; + write(str: string, cb?: Function): boolean; + write(str: string, encoding?: string, cb?: Function): boolean; + write(str: string, encoding?: string, fd?: string): boolean; + + write(chunk: any, encoding?: string): void; + abort(): void; + setTimeout(timeout: number, callback?: Function): void; + setNoDelay(noDelay?: boolean): void; + setSocketKeepAlive(enable?: boolean, initialDelay?: number): void; + + setHeader(name: string, value: string | string[]): void; + getHeader(name: string): string; + removeHeader(name: string): void; + addTrailers(headers: any): void; + + // Extended base methods + end(): void; + end(buffer: Buffer, cb?: Function): void; + end(str: string, cb?: Function): void; + end(str: string, encoding?: string, cb?: Function): void; + end(data?: any, encoding?: string): void; + } + export interface IncomingMessage extends stream.Readable { + httpVersion: string; + httpVersionMajor: number; + httpVersionMinor: number; + connection: net.Socket; + headers: any; + rawHeaders: string[]; + trailers: any; + rawTrailers: any; + setTimeout(msecs: number, callback: Function): NodeJS.Timer; + /** + * Only valid for request obtained from http.Server. + */ + method?: string; + /** + * Only valid for request obtained from http.Server. + */ + url?: string; + /** + * Only valid for response obtained from http.ClientRequest. + */ + statusCode?: number; + /** + * Only valid for response obtained from http.ClientRequest. + */ + statusMessage?: string; + socket: net.Socket; + destroy(error?: Error): void; + } + /** + * @deprecated Use IncomingMessage + */ + export interface ClientResponse extends IncomingMessage { } + + export interface AgentOptions { + /** + * Keep sockets around in a pool to be used by other requests in the future. Default = false + */ + keepAlive?: boolean; + /** + * When using HTTP KeepAlive, how often to send TCP KeepAlive packets over sockets being kept alive. Default = 1000. + * Only relevant if keepAlive is set to true. + */ + keepAliveMsecs?: number; + /** + * Maximum number of sockets to allow per host. Default for Node 0.10 is 5, default for Node 0.12 is Infinity + */ + maxSockets?: number; + /** + * Maximum number of sockets to leave open in a free state. Only relevant if keepAlive is set to true. Default = 256. + */ + maxFreeSockets?: number; + } + + export class Agent { + maxSockets: number; + sockets: any; + requests: any; + + constructor(opts?: AgentOptions); + + /** + * Destroy any sockets that are currently in use by the agent. + * It is usually not necessary to do this. However, if you are using an agent with KeepAlive enabled, + * then it is best to explicitly shut down the agent when you know that it will no longer be used. Otherwise, + * sockets may hang open for quite a long time before the server terminates them. + */ + destroy(): void; + } + + export var METHODS: string[]; + + export var STATUS_CODES: { + [errorCode: number]: string; + [errorCode: string]: string; + }; + export function createServer(requestListener?: (request: IncomingMessage, response: ServerResponse) => void): Server; + export function createClient(port?: number, host?: string): any; + export function request(options: RequestOptions, callback?: (res: IncomingMessage) => void): ClientRequest; + export function get(options: any, callback?: (res: IncomingMessage) => void): ClientRequest; + export var globalAgent: Agent; +} + +declare module "cluster" { + import * as child from "child_process"; + import * as events from "events"; + import * as net from "net"; + + // interfaces + export interface ClusterSettings { + execArgv?: string[]; // default: process.execArgv + exec?: string; + args?: string[]; + silent?: boolean; + stdio?: any[]; + uid?: number; + gid?: number; + } + + export interface ClusterSetupMasterSettings { + exec?: string; // default: process.argv[1] + args?: string[]; // default: process.argv.slice(2) + silent?: boolean; // default: false + stdio?: any[]; + } + + export interface Address { + address: string; + port: number; + addressType: number | "udp4" | "udp6"; // 4, 6, -1, "udp4", "udp6" + } + + export class Worker extends events.EventEmitter { + id: string; + process: child.ChildProcess; + suicide: boolean; + send(message: any, sendHandle?: any): boolean; + kill(signal?: string): void; + destroy(signal?: string): void; + disconnect(): void; + isConnected(): boolean; + isDead(): boolean; + exitedAfterDisconnect: boolean; + + /** + * events.EventEmitter + * 1. disconnect + * 2. error + * 3. exit + * 4. listening + * 5. message + * 6. online + */ + addListener(event: string, listener: Function): this; + addListener(event: "disconnect", listener: () => void): this; + addListener(event: "error", listener: (code: number, signal: string) => void): this; + addListener(event: "exit", listener: (code: number, signal: string) => void): this; + addListener(event: "listening", listener: (address: Address) => void): this; + addListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + addListener(event: "online", listener: () => void): this; + + emit(event: string, listener: Function): boolean + emit(event: "disconnect", listener: () => void): boolean + emit(event: "error", listener: (code: number, signal: string) => void): boolean + emit(event: "exit", listener: (code: number, signal: string) => void): boolean + emit(event: "listening", listener: (address: Address) => void): boolean + emit(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): boolean + emit(event: "online", listener: () => void): boolean + + on(event: string, listener: Function): this; + on(event: "disconnect", listener: () => void): this; + on(event: "error", listener: (code: number, signal: string) => void): this; + on(event: "exit", listener: (code: number, signal: string) => void): this; + on(event: "listening", listener: (address: Address) => void): this; + on(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + on(event: "online", listener: () => void): this; + + once(event: string, listener: Function): this; + once(event: "disconnect", listener: () => void): this; + once(event: "error", listener: (code: number, signal: string) => void): this; + once(event: "exit", listener: (code: number, signal: string) => void): this; + once(event: "listening", listener: (address: Address) => void): this; + once(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + once(event: "online", listener: () => void): this; + + prependListener(event: string, listener: Function): this; + prependListener(event: "disconnect", listener: () => void): this; + prependListener(event: "error", listener: (code: number, signal: string) => void): this; + prependListener(event: "exit", listener: (code: number, signal: string) => void): this; + prependListener(event: "listening", listener: (address: Address) => void): this; + prependListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + prependListener(event: "online", listener: () => void): this; + + prependOnceListener(event: string, listener: Function): this; + prependOnceListener(event: "disconnect", listener: () => void): this; + prependOnceListener(event: "error", listener: (code: number, signal: string) => void): this; + prependOnceListener(event: "exit", listener: (code: number, signal: string) => void): this; + prependOnceListener(event: "listening", listener: (address: Address) => void): this; + prependOnceListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + prependOnceListener(event: "online", listener: () => void): this; + } + + export interface Cluster extends events.EventEmitter { + Worker: Worker; + disconnect(callback?: Function): void; + fork(env?: any): Worker; + isMaster: boolean; + isWorker: boolean; + // TODO: cluster.schedulingPolicy + settings: ClusterSettings; + setupMaster(settings?: ClusterSetupMasterSettings): void; + worker: Worker; + workers: { + [index: string]: Worker + }; + + /** + * events.EventEmitter + * 1. disconnect + * 2. exit + * 3. fork + * 4. listening + * 5. message + * 6. online + * 7. setup + */ + addListener(event: string, listener: Function): this; + addListener(event: "disconnect", listener: (worker: Worker) => void): this; + addListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; + addListener(event: "fork", listener: (worker: Worker) => void): this; + addListener(event: "listening", listener: (worker: Worker, address: Address) => void): this; + addListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + addListener(event: "online", listener: (worker: Worker) => void): this; + addListener(event: "setup", listener: (settings: any) => void): this; + + emit(event: string, listener: Function): boolean; + emit(event: "disconnect", listener: (worker: Worker) => void): boolean; + emit(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): boolean; + emit(event: "fork", listener: (worker: Worker) => void): boolean; + emit(event: "listening", listener: (worker: Worker, address: Address) => void): boolean; + emit(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): boolean; + emit(event: "online", listener: (worker: Worker) => void): boolean; + emit(event: "setup", listener: (settings: any) => void): boolean; + + on(event: string, listener: Function): this; + on(event: "disconnect", listener: (worker: Worker) => void): this; + on(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; + on(event: "fork", listener: (worker: Worker) => void): this; + on(event: "listening", listener: (worker: Worker, address: Address) => void): this; + on(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + on(event: "online", listener: (worker: Worker) => void): this; + on(event: "setup", listener: (settings: any) => void): this; + + once(event: string, listener: Function): this; + once(event: "disconnect", listener: (worker: Worker) => void): this; + once(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; + once(event: "fork", listener: (worker: Worker) => void): this; + once(event: "listening", listener: (worker: Worker, address: Address) => void): this; + once(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + once(event: "online", listener: (worker: Worker) => void): this; + once(event: "setup", listener: (settings: any) => void): this; + + prependListener(event: string, listener: Function): this; + prependListener(event: "disconnect", listener: (worker: Worker) => void): this; + prependListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; + prependListener(event: "fork", listener: (worker: Worker) => void): this; + prependListener(event: "listening", listener: (worker: Worker, address: Address) => void): this; + prependListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + prependListener(event: "online", listener: (worker: Worker) => void): this; + prependListener(event: "setup", listener: (settings: any) => void): this; + + prependOnceListener(event: string, listener: Function): this; + prependOnceListener(event: "disconnect", listener: (worker: Worker) => void): this; + prependOnceListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; + prependOnceListener(event: "fork", listener: (worker: Worker) => void): this; + prependOnceListener(event: "listening", listener: (worker: Worker, address: Address) => void): this; + prependOnceListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + prependOnceListener(event: "online", listener: (worker: Worker) => void): this; + prependOnceListener(event: "setup", listener: (settings: any) => void): this; + + } + + export function disconnect(callback?: Function): void; + export function fork(env?: any): Worker; + export var isMaster: boolean; + export var isWorker: boolean; + // TODO: cluster.schedulingPolicy + export var settings: ClusterSettings; + export function setupMaster(settings?: ClusterSetupMasterSettings): void; + export var worker: Worker; + export var workers: { + [index: string]: Worker + }; + + /** + * events.EventEmitter + * 1. disconnect + * 2. exit + * 3. fork + * 4. listening + * 5. message + * 6. online + * 7. setup + */ + export function addListener(event: string, listener: Function): Cluster; + export function addListener(event: "disconnect", listener: (worker: Worker) => void): Cluster; + export function addListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster; + export function addListener(event: "fork", listener: (worker: Worker) => void): Cluster; + export function addListener(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster; + export function addListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; // the handle is a net.Socket or net.Server object, or undefined. + export function addListener(event: "online", listener: (worker: Worker) => void): Cluster; + export function addListener(event: "setup", listener: (settings: any) => void): Cluster; + + export function emit(event: string, listener: Function): boolean; + export function emit(event: "disconnect", listener: (worker: Worker) => void): boolean; + export function emit(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): boolean; + export function emit(event: "fork", listener: (worker: Worker) => void): boolean; + export function emit(event: "listening", listener: (worker: Worker, address: Address) => void): boolean; + export function emit(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): boolean; + export function emit(event: "online", listener: (worker: Worker) => void): boolean; + export function emit(event: "setup", listener: (settings: any) => void): boolean; + + export function on(event: string, listener: Function): Cluster; + export function on(event: "disconnect", listener: (worker: Worker) => void): Cluster; + export function on(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster; + export function on(event: "fork", listener: (worker: Worker) => void): Cluster; + export function on(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster; + export function on(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; // the handle is a net.Socket or net.Server object, or undefined. + export function on(event: "online", listener: (worker: Worker) => void): Cluster; + export function on(event: "setup", listener: (settings: any) => void): Cluster; + + export function once(event: string, listener: Function): Cluster; + export function once(event: "disconnect", listener: (worker: Worker) => void): Cluster; + export function once(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster; + export function once(event: "fork", listener: (worker: Worker) => void): Cluster; + export function once(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster; + export function once(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; // the handle is a net.Socket or net.Server object, or undefined. + export function once(event: "online", listener: (worker: Worker) => void): Cluster; + export function once(event: "setup", listener: (settings: any) => void): Cluster; + + export function removeListener(event: string, listener: Function): Cluster; + export function removeAllListeners(event?: string): Cluster; + export function setMaxListeners(n: number): Cluster; + export function getMaxListeners(): number; + export function listeners(event: string): Function[]; + export function listenerCount(type: string): number; + + export function prependListener(event: string, listener: Function): Cluster; + export function prependListener(event: "disconnect", listener: (worker: Worker) => void): Cluster; + export function prependListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster; + export function prependListener(event: "fork", listener: (worker: Worker) => void): Cluster; + export function prependListener(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster; + export function prependListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; // the handle is a net.Socket or net.Server object, or undefined. + export function prependListener(event: "online", listener: (worker: Worker) => void): Cluster; + export function prependListener(event: "setup", listener: (settings: any) => void): Cluster; + + export function prependOnceListener(event: string, listener: Function): Cluster; + export function prependOnceListener(event: "disconnect", listener: (worker: Worker) => void): Cluster; + export function prependOnceListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster; + export function prependOnceListener(event: "fork", listener: (worker: Worker) => void): Cluster; + export function prependOnceListener(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster; + export function prependOnceListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; // the handle is a net.Socket or net.Server object, or undefined. + export function prependOnceListener(event: "online", listener: (worker: Worker) => void): Cluster; + export function prependOnceListener(event: "setup", listener: (settings: any) => void): Cluster; + + export function eventNames(): string[]; +} + +declare module "zlib" { + import * as stream from "stream"; + export interface ZlibOptions { chunkSize?: number; windowBits?: number; level?: number; memLevel?: number; strategy?: number; dictionary?: any; } + + export interface Gzip extends stream.Transform { } + export interface Gunzip extends stream.Transform { } + export interface Deflate extends stream.Transform { } + export interface Inflate extends stream.Transform { } + export interface DeflateRaw extends stream.Transform { } + export interface InflateRaw extends stream.Transform { } + export interface Unzip extends stream.Transform { } + + export function createGzip(options?: ZlibOptions): Gzip; + export function createGunzip(options?: ZlibOptions): Gunzip; + export function createDeflate(options?: ZlibOptions): Deflate; + export function createInflate(options?: ZlibOptions): Inflate; + export function createDeflateRaw(options?: ZlibOptions): DeflateRaw; + export function createInflateRaw(options?: ZlibOptions): InflateRaw; + export function createUnzip(options?: ZlibOptions): Unzip; + + export function deflate(buf: Buffer, callback: (error: Error, result: any) => void): void; + export function deflateSync(buf: Buffer, options?: ZlibOptions): any; + export function deflateRaw(buf: Buffer, callback: (error: Error, result: any) => void): void; + export function deflateRawSync(buf: Buffer, options?: ZlibOptions): any; + export function gzip(buf: Buffer, callback: (error: Error, result: any) => void): void; + export function gzipSync(buf: Buffer, options?: ZlibOptions): any; + export function gunzip(buf: Buffer, callback: (error: Error, result: any) => void): void; + export function gunzipSync(buf: Buffer, options?: ZlibOptions): any; + export function inflate(buf: Buffer, callback: (error: Error, result: any) => void): void; + export function inflateSync(buf: Buffer, options?: ZlibOptions): any; + export function inflateRaw(buf: Buffer, callback: (error: Error, result: any) => void): void; + export function inflateRawSync(buf: Buffer, options?: ZlibOptions): any; + export function unzip(buf: Buffer, callback: (error: Error, result: any) => void): void; + export function unzipSync(buf: Buffer, options?: ZlibOptions): any; + + // Constants + export var Z_NO_FLUSH: number; + export var Z_PARTIAL_FLUSH: number; + export var Z_SYNC_FLUSH: number; + export var Z_FULL_FLUSH: number; + export var Z_FINISH: number; + export var Z_BLOCK: number; + export var Z_TREES: number; + export var Z_OK: number; + export var Z_STREAM_END: number; + export var Z_NEED_DICT: number; + export var Z_ERRNO: number; + export var Z_STREAM_ERROR: number; + export var Z_DATA_ERROR: number; + export var Z_MEM_ERROR: number; + export var Z_BUF_ERROR: number; + export var Z_VERSION_ERROR: number; + export var Z_NO_COMPRESSION: number; + export var Z_BEST_SPEED: number; + export var Z_BEST_COMPRESSION: number; + export var Z_DEFAULT_COMPRESSION: number; + export var Z_FILTERED: number; + export var Z_HUFFMAN_ONLY: number; + export var Z_RLE: number; + export var Z_FIXED: number; + export var Z_DEFAULT_STRATEGY: number; + export var Z_BINARY: number; + export var Z_TEXT: number; + export var Z_ASCII: number; + export var Z_UNKNOWN: number; + export var Z_DEFLATED: number; + export var Z_NULL: number; +} + +declare module "os" { + export interface CpuInfo { + model: string; + speed: number; + times: { + user: number; + nice: number; + sys: number; + idle: number; + irq: number; + }; + } + + export interface NetworkInterfaceInfo { + address: string; + netmask: string; + family: string; + mac: string; + internal: boolean; + } + + export function hostname(): string; + export function loadavg(): number[]; + export function uptime(): number; + export function freemem(): number; + export function totalmem(): number; + export function cpus(): CpuInfo[]; + export function type(): string; + export function release(): string; + export function networkInterfaces(): { [index: string]: NetworkInterfaceInfo[] }; + export function homedir(): string; + export function userInfo(options?: { encoding: string }): { username: string, uid: number, gid: number, shell: any, homedir: string } + export var constants: { + UV_UDP_REUSEADDR: number, + errno: { + SIGHUP: number; + SIGINT: number; + SIGQUIT: number; + SIGILL: number; + SIGTRAP: number; + SIGABRT: number; + SIGIOT: number; + SIGBUS: number; + SIGFPE: number; + SIGKILL: number; + SIGUSR1: number; + SIGSEGV: number; + SIGUSR2: number; + SIGPIPE: number; + SIGALRM: number; + SIGTERM: number; + SIGCHLD: number; + SIGSTKFLT: number; + SIGCONT: number; + SIGSTOP: number; + SIGTSTP: number; + SIGTTIN: number; + SIGTTOU: number; + SIGURG: number; + SIGXCPU: number; + SIGXFSZ: number; + SIGVTALRM: number; + SIGPROF: number; + SIGWINCH: number; + SIGIO: number; + SIGPOLL: number; + SIGPWR: number; + SIGSYS: number; + SIGUNUSED: number; + }, + signals: { + E2BIG: number; + EACCES: number; + EADDRINUSE: number; + EADDRNOTAVAIL: number; + EAFNOSUPPORT: number; + EAGAIN: number; + EALREADY: number; + EBADF: number; + EBADMSG: number; + EBUSY: number; + ECANCELED: number; + ECHILD: number; + ECONNABORTED: number; + ECONNREFUSED: number; + ECONNRESET: number; + EDEADLK: number; + EDESTADDRREQ: number; + EDOM: number; + EDQUOT: number; + EEXIST: number; + EFAULT: number; + EFBIG: number; + EHOSTUNREACH: number; + EIDRM: number; + EILSEQ: number; + EINPROGRESS: number; + EINTR: number; + EINVAL: number; + EIO: number; + EISCONN: number; + EISDIR: number; + ELOOP: number; + EMFILE: number; + EMLINK: number; + EMSGSIZE: number; + EMULTIHOP: number; + ENAMETOOLONG: number; + ENETDOWN: number; + ENETRESET: number; + ENETUNREACH: number; + ENFILE: number; + ENOBUFS: number; + ENODATA: number; + ENODEV: number; + ENOENT: number; + ENOEXEC: number; + ENOLCK: number; + ENOLINK: number; + ENOMEM: number; + ENOMSG: number; + ENOPROTOOPT: number; + ENOSPC: number; + ENOSR: number; + ENOSTR: number; + ENOSYS: number; + ENOTCONN: number; + ENOTDIR: number; + ENOTEMPTY: number; + ENOTSOCK: number; + ENOTSUP: number; + ENOTTY: number; + ENXIO: number; + EOPNOTSUPP: number; + EOVERFLOW: number; + EPERM: number; + EPIPE: number; + EPROTO: number; + EPROTONOSUPPORT: number; + EPROTOTYPE: number; + ERANGE: number; + EROFS: number; + ESPIPE: number; + ESRCH: number; + ESTALE: number; + ETIME: number; + ETIMEDOUT: number; + ETXTBSY: number; + EWOULDBLOCK: number; + EXDEV: number; + }, + }; + export function arch(): string; + export function platform(): string; + export function tmpdir(): string; + export var EOL: string; + export function endianness(): "BE" | "LE"; +} + +declare module "https" { + import * as tls from "tls"; + import * as events from "events"; + import * as http from "http"; + + export interface ServerOptions { + pfx?: any; + key?: any; + passphrase?: string; + cert?: any; + ca?: any; + crl?: any; + ciphers?: string; + honorCipherOrder?: boolean; + requestCert?: boolean; + rejectUnauthorized?: boolean; + NPNProtocols?: any; + SNICallback?: (servername: string, cb: (err: Error, ctx: tls.SecureContext) => any) => any; + } + + export interface RequestOptions extends http.RequestOptions { + pfx?: any; + key?: any; + passphrase?: string; + cert?: any; + ca?: any; + ciphers?: string; + rejectUnauthorized?: boolean; + secureProtocol?: string; + } + + export interface Agent extends http.Agent { } + + export interface AgentOptions extends http.AgentOptions { + pfx?: any; + key?: any; + passphrase?: string; + cert?: any; + ca?: any; + ciphers?: string; + rejectUnauthorized?: boolean; + secureProtocol?: string; + maxCachedSessions?: number; + } + + export var Agent: { + new (options?: AgentOptions): Agent; + }; + export interface Server extends tls.Server { } + export function createServer(options: ServerOptions, requestListener?: Function): Server; + export function request(options: RequestOptions, callback?: (res: http.IncomingMessage) => void): http.ClientRequest; + export function get(options: RequestOptions, callback?: (res: http.IncomingMessage) => void): http.ClientRequest; + export var globalAgent: Agent; +} + +declare module "punycode" { + export function decode(string: string): string; + export function encode(string: string): string; + export function toUnicode(domain: string): string; + export function toASCII(domain: string): string; + export var ucs2: ucs2; + interface ucs2 { + decode(string: string): number[]; + encode(codePoints: number[]): string; + } + export var version: any; +} + +declare module "repl" { + import * as stream from "stream"; + import * as readline from "readline"; + + export interface ReplOptions { + prompt?: string; + input?: NodeJS.ReadableStream; + output?: NodeJS.WritableStream; + terminal?: boolean; + eval?: Function; + useColors?: boolean; + useGlobal?: boolean; + ignoreUndefined?: boolean; + writer?: Function; + completer?: Function; + replMode?: any; + breakEvalOnSigint?: any; + } + + export interface REPLServer extends readline.ReadLine { + defineCommand(keyword: string, cmd: Function | { help: string, action: Function }): void; + displayPrompt(preserveCursor?: boolean): void + } + + export function start(options: ReplOptions): REPLServer; +} + +declare module "readline" { + import * as events from "events"; + import * as stream from "stream"; + + export interface Key { + sequence?: string; + name?: string; + ctrl?: boolean; + meta?: boolean; + shift?: boolean; + } + + export interface ReadLine extends events.EventEmitter { + setPrompt(prompt: string): void; + prompt(preserveCursor?: boolean): void; + question(query: string, callback: (answer: string) => void): void; + pause(): ReadLine; + resume(): ReadLine; + close(): void; + write(data: string | Buffer, key?: Key): void; + } + + export interface Completer { + (line: string): CompleterResult; + (line: string, callback: (err: any, result: CompleterResult) => void): any; + } + + export interface CompleterResult { + completions: string[]; + line: string; + } + + export interface ReadLineOptions { + input: NodeJS.ReadableStream; + output?: NodeJS.WritableStream; + completer?: Completer; + terminal?: boolean; + historySize?: number; + } + + export function createInterface(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer, terminal?: boolean): ReadLine; + export function createInterface(options: ReadLineOptions): ReadLine; + + export function cursorTo(stream: NodeJS.WritableStream, x: number, y: number): void; + export function moveCursor(stream: NodeJS.WritableStream, dx: number | string, dy: number | string): void; + export function clearLine(stream: NodeJS.WritableStream, dir: number): void; + export function clearScreenDown(stream: NodeJS.WritableStream): void; +} + +declare module "vm" { + export interface Context { } + export interface ScriptOptions { + filename?: string; + lineOffset?: number; + columnOffset?: number; + displayErrors?: boolean; + timeout?: number; + cachedData?: Buffer; + produceCachedData?: boolean; + } + export interface RunningScriptOptions { + filename?: string; + lineOffset?: number; + columnOffset?: number; + displayErrors?: boolean; + timeout?: number; + } + export class Script { + constructor(code: string, options?: ScriptOptions); + runInContext(contextifiedSandbox: Context, options?: RunningScriptOptions): any; + runInNewContext(sandbox?: Context, options?: RunningScriptOptions): any; + runInThisContext(options?: RunningScriptOptions): any; + } + export function createContext(sandbox?: Context): Context; + export function isContext(sandbox: Context): boolean; + export function runInContext(code: string, contextifiedSandbox: Context, options?: RunningScriptOptions): any; + export function runInDebugContext(code: string): any; + export function runInNewContext(code: string, sandbox?: Context, options?: RunningScriptOptions): any; + export function runInThisContext(code: string, options?: RunningScriptOptions): any; +} + +declare module "child_process" { + import * as events from "events"; + import * as stream from "stream"; + + export interface ChildProcess extends events.EventEmitter { + stdin: stream.Writable; + stdout: stream.Readable; + stderr: stream.Readable; + stdio: [stream.Writable, stream.Readable, stream.Readable]; + pid: number; + kill(signal?: string): void; + send(message: any, sendHandle?: any): boolean; + connected: boolean; + disconnect(): void; + unref(): void; + ref(): void; + } + + export interface SpawnOptions { + cwd?: string; + env?: any; + stdio?: any; + detached?: boolean; + uid?: number; + gid?: number; + shell?: boolean | string; + } + export function spawn(command: string, args?: string[], options?: SpawnOptions): ChildProcess; + + export interface ExecOptions { + cwd?: string; + env?: any; + shell?: string; + timeout?: number; + maxBuffer?: number; + killSignal?: string; + uid?: number; + gid?: number; + } + export interface ExecOptionsWithStringEncoding extends ExecOptions { + encoding: BufferEncoding; + } + export interface ExecOptionsWithBufferEncoding extends ExecOptions { + encoding: string; // specify `null`. + } + export function exec(command: string, callback?: (error: Error, stdout: string, stderr: string) => void): ChildProcess; + export function exec(command: string, options: ExecOptionsWithStringEncoding, callback?: (error: Error, stdout: string, stderr: string) => void): ChildProcess; + // usage. child_process.exec("tsc", {encoding: null as string}, (err, stdout, stderr) => {}); + export function exec(command: string, options: ExecOptionsWithBufferEncoding, callback?: (error: Error, stdout: Buffer, stderr: Buffer) => void): ChildProcess; + export function exec(command: string, options: ExecOptions, callback?: (error: Error, stdout: string, stderr: string) => void): ChildProcess; + + export interface ExecFileOptions { + cwd?: string; + env?: any; + timeout?: number; + maxBuffer?: number; + killSignal?: string; + uid?: number; + gid?: number; + } + export interface ExecFileOptionsWithStringEncoding extends ExecFileOptions { + encoding: BufferEncoding; + } + export interface ExecFileOptionsWithBufferEncoding extends ExecFileOptions { + encoding: string; // specify `null`. + } + export function execFile(file: string, callback?: (error: Error, stdout: string, stderr: string) => void): ChildProcess; + export function execFile(file: string, options?: ExecFileOptionsWithStringEncoding, callback?: (error: Error, stdout: string, stderr: string) => void): ChildProcess; + // usage. child_process.execFile("file.sh", {encoding: null as string}, (err, stdout, stderr) => {}); + export function execFile(file: string, options?: ExecFileOptionsWithBufferEncoding, callback?: (error: Error, stdout: Buffer, stderr: Buffer) => void): ChildProcess; + export function execFile(file: string, options?: ExecFileOptions, callback?: (error: Error, stdout: string, stderr: string) => void): ChildProcess; + export function execFile(file: string, args?: string[], callback?: (error: Error, stdout: string, stderr: string) => void): ChildProcess; + export function execFile(file: string, args?: string[], options?: ExecFileOptionsWithStringEncoding, callback?: (error: Error, stdout: string, stderr: string) => void): ChildProcess; + // usage. child_process.execFile("file.sh", ["foo"], {encoding: null as string}, (err, stdout, stderr) => {}); + export function execFile(file: string, args?: string[], options?: ExecFileOptionsWithBufferEncoding, callback?: (error: Error, stdout: Buffer, stderr: Buffer) => void): ChildProcess; + export function execFile(file: string, args?: string[], options?: ExecFileOptions, callback?: (error: Error, stdout: string, stderr: string) => void): ChildProcess; + + export interface ForkOptions { + cwd?: string; + env?: any; + execPath?: string; + execArgv?: string[]; + silent?: boolean; + uid?: number; + gid?: number; + } + export function fork(modulePath: string, args?: string[], options?: ForkOptions): ChildProcess; + + export interface SpawnSyncOptions { + cwd?: string; + input?: string | Buffer; + stdio?: any; + env?: any; + uid?: number; + gid?: number; + timeout?: number; + killSignal?: string; + maxBuffer?: number; + encoding?: string; + shell?: boolean | string; + } + export interface SpawnSyncOptionsWithStringEncoding extends SpawnSyncOptions { + encoding: BufferEncoding; + } + export interface SpawnSyncOptionsWithBufferEncoding extends SpawnSyncOptions { + encoding: string; // specify `null`. + } + export interface SpawnSyncReturns { + pid: number; + output: string[]; + stdout: T; + stderr: T; + status: number; + signal: string; + error: Error; + } + export function spawnSync(command: string): SpawnSyncReturns; + export function spawnSync(command: string, options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns; + export function spawnSync(command: string, options?: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns; + export function spawnSync(command: string, options?: SpawnSyncOptions): SpawnSyncReturns; + export function spawnSync(command: string, args?: string[], options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns; + export function spawnSync(command: string, args?: string[], options?: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns; + export function spawnSync(command: string, args?: string[], options?: SpawnSyncOptions): SpawnSyncReturns; + + export interface ExecSyncOptions { + cwd?: string; + input?: string | Buffer; + stdio?: any; + env?: any; + shell?: string; + uid?: number; + gid?: number; + timeout?: number; + killSignal?: string; + maxBuffer?: number; + encoding?: string; + } + export interface ExecSyncOptionsWithStringEncoding extends ExecSyncOptions { + encoding: BufferEncoding; + } + export interface ExecSyncOptionsWithBufferEncoding extends ExecSyncOptions { + encoding: string; // specify `null`. + } + export function execSync(command: string): Buffer; + export function execSync(command: string, options?: ExecSyncOptionsWithStringEncoding): string; + export function execSync(command: string, options?: ExecSyncOptionsWithBufferEncoding): Buffer; + export function execSync(command: string, options?: ExecSyncOptions): Buffer; + + export interface ExecFileSyncOptions { + cwd?: string; + input?: string | Buffer; + stdio?: any; + env?: any; + uid?: number; + gid?: number; + timeout?: number; + killSignal?: string; + maxBuffer?: number; + encoding?: string; + } + export interface ExecFileSyncOptionsWithStringEncoding extends ExecFileSyncOptions { + encoding: BufferEncoding; + } + export interface ExecFileSyncOptionsWithBufferEncoding extends ExecFileSyncOptions { + encoding: string; // specify `null`. + } + export function execFileSync(command: string): Buffer; + export function execFileSync(command: string, options?: ExecFileSyncOptionsWithStringEncoding): string; + export function execFileSync(command: string, options?: ExecFileSyncOptionsWithBufferEncoding): Buffer; + export function execFileSync(command: string, options?: ExecFileSyncOptions): Buffer; + export function execFileSync(command: string, args?: string[], options?: ExecFileSyncOptionsWithStringEncoding): string; + export function execFileSync(command: string, args?: string[], options?: ExecFileSyncOptionsWithBufferEncoding): Buffer; + export function execFileSync(command: string, args?: string[], options?: ExecFileSyncOptions): Buffer; +} + +declare module "url" { + export interface Url { + href?: string; + protocol?: string; + auth?: string; + hostname?: string; + port?: string; + host?: string; + pathname?: string; + search?: string; + query?: string | any; + slashes?: boolean; + hash?: string; + path?: string; + } + + export function parse(urlStr: string, parseQueryString?: boolean, slashesDenoteHost?: boolean): Url; + export function format(url: Url): string; + export function resolve(from: string, to: string): string; +} + +declare module "dns" { + export interface MxRecord { + exchange: string, + priority: number + } + + export function lookup(domain: string, family: number, callback: (err: Error, address: string, family: number) => void): string; + export function lookup(domain: string, callback: (err: Error, address: string, family: number) => void): string; + export function resolve(domain: string, rrtype: string, callback: (err: Error, addresses: string[]) => void): string[]; + export function resolve(domain: string, callback: (err: Error, addresses: string[]) => void): string[]; + export function resolve4(domain: string, callback: (err: Error, addresses: string[]) => void): string[]; + export function resolve6(domain: string, callback: (err: Error, addresses: string[]) => void): string[]; + export function resolveMx(domain: string, callback: (err: Error, addresses: MxRecord[]) => void): string[]; + export function resolveTxt(domain: string, callback: (err: Error, addresses: string[]) => void): string[]; + export function resolveSrv(domain: string, callback: (err: Error, addresses: string[]) => void): string[]; + export function resolveNs(domain: string, callback: (err: Error, addresses: string[]) => void): string[]; + export function resolveCname(domain: string, callback: (err: Error, addresses: string[]) => void): string[]; + export function reverse(ip: string, callback: (err: Error, domains: string[]) => void): string[]; + export function setServers(servers: string[]): void; + + //Error codes + export var NODATA: string; + export var FORMERR: string; + export var SERVFAIL: string; + export var NOTFOUND: string; + export var NOTIMP: string; + export var REFUSED: string; + export var BADQUERY: string; + export var BADNAME: string; + export var BADFAMILY: string; + export var BADRESP: string; + export var CONNREFUSED: string; + export var TIMEOUT: string; + export var EOF: string; + export var FILE: string; + export var NOMEM: string; + export var DESTRUCTION: string; + export var BADSTR: string; + export var BADFLAGS: string; + export var NONAME: string; + export var BADHINTS: string; + export var NOTINITIALIZED: string; + export var LOADIPHLPAPI: string; + export var ADDRGETNETWORKPARAMS: string; + export var CANCELLED: string; +} + +declare module "net" { + import * as stream from "stream"; + + export interface Socket extends stream.Duplex { + // Extended base methods + write(buffer: Buffer): boolean; + write(buffer: Buffer, cb?: Function): boolean; + write(str: string, cb?: Function): boolean; + write(str: string, encoding?: string, cb?: Function): boolean; + write(str: string, encoding?: string, fd?: string): boolean; + + connect(port: number, host?: string, connectionListener?: Function): void; + connect(path: string, connectionListener?: Function): void; + bufferSize: number; + setEncoding(encoding?: string): void; + write(data: any, encoding?: string, callback?: Function): void; + destroy(): void; + pause(): Socket; + resume(): Socket; + setTimeout(timeout: number, callback?: Function): void; + setNoDelay(noDelay?: boolean): void; + setKeepAlive(enable?: boolean, initialDelay?: number): void; + address(): { port: number; family: string; address: string; }; + unref(): void; + ref(): void; + + remoteAddress: string; + remoteFamily: string; + remotePort: number; + localAddress: string; + localPort: number; + bytesRead: number; + bytesWritten: number; + + // Extended base methods + end(): void; + end(buffer: Buffer, cb?: Function): void; + end(str: string, cb?: Function): void; + end(str: string, encoding?: string, cb?: Function): void; + end(data?: any, encoding?: string): void; + + /** + * events.EventEmitter + * 1. close + * 2. connect + * 3. data + * 4. drain + * 5. end + * 6. error + * 7. lookup + * 8. timeout + */ + addListener(event: string, listener: Function): this; + addListener(event: "close", listener: (had_error: boolean) => void): this; + addListener(event: "connect", listener: () => void): this; + addListener(event: "data", listener: (data: Buffer) => void): this; + addListener(event: "drain", listener: () => void): this; + addListener(event: "end", listener: () => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this; + addListener(event: "timeout", listener: () => void): this; + + emit(event: string, ...args: any[]): boolean; + emit(event: "close", had_error: boolean): boolean; + emit(event: "connect"): boolean; + emit(event: "data", data: Buffer): boolean; + emit(event: "drain"): boolean; + emit(event: "end"): boolean; + emit(event: "error", err: Error): boolean; + emit(event: "lookup", err: Error, address: string, family: string | number, host: string): boolean; + emit(event: "timeout"): boolean; + + on(event: string, listener: Function): this; + on(event: "close", listener: (had_error: boolean) => void): this; + on(event: "connect", listener: () => void): this; + on(event: "data", listener: (data: Buffer) => void): this; + on(event: "drain", listener: () => void): this; + on(event: "end", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this; + on(event: "timeout", listener: () => void): this; + + once(event: string, listener: Function): this; + once(event: "close", listener: (had_error: boolean) => void): this; + once(event: "connect", listener: () => void): this; + once(event: "data", listener: (data: Buffer) => void): this; + once(event: "drain", listener: () => void): this; + once(event: "end", listener: () => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this; + once(event: "timeout", listener: () => void): this; + + prependListener(event: string, listener: Function): this; + prependListener(event: "close", listener: (had_error: boolean) => void): this; + prependListener(event: "connect", listener: () => void): this; + prependListener(event: "data", listener: (data: Buffer) => void): this; + prependListener(event: "drain", listener: () => void): this; + prependListener(event: "end", listener: () => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this; + prependListener(event: "timeout", listener: () => void): this; + + prependOnceListener(event: string, listener: Function): this; + prependOnceListener(event: "close", listener: (had_error: boolean) => void): this; + prependOnceListener(event: "connect", listener: () => void): this; + prependOnceListener(event: "data", listener: (data: Buffer) => void): this; + prependOnceListener(event: "drain", listener: () => void): this; + prependOnceListener(event: "end", listener: () => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this; + prependOnceListener(event: "timeout", listener: () => void): this; + } + + export var Socket: { + new (options?: { fd?: string; type?: string; allowHalfOpen?: boolean; }): Socket; + }; + + export interface ListenOptions { + port?: number; + host?: string; + backlog?: number; + path?: string; + exclusive?: boolean; + } + + export interface Server extends Socket { + listen(port: number, hostname?: string, backlog?: number, listeningListener?: Function): Server; + listen(port: number, hostname?: string, listeningListener?: Function): Server; + listen(port: number, backlog?: number, listeningListener?: Function): Server; + listen(port: number, listeningListener?: Function): Server; + listen(path: string, backlog?: number, listeningListener?: Function): Server; + listen(path: string, listeningListener?: Function): Server; + listen(handle: any, backlog?: number, listeningListener?: Function): Server; + listen(handle: any, listeningListener?: Function): Server; + listen(options: ListenOptions, listeningListener?: Function): Server; + close(callback?: Function): Server; + address(): { port: number; family: string; address: string; }; + getConnections(cb: (error: Error, count: number) => void): void; + ref(): Server; + unref(): Server; + maxConnections: number; + connections: number; + + /** + * events.EventEmitter + * 1. close + * 2. connection + * 3. error + * 4. listening + */ + addListener(event: string, listener: Function): this; + addListener(event: "close", listener: () => void): this; + addListener(event: "connection", listener: (socket: Socket) => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: "listening", listener: () => void): this; + + emit(event: string, ...args: any[]): boolean; + emit(event: "close"): boolean; + emit(event: "connection", socket: Socket): boolean; + emit(event: "error", err: Error): boolean; + emit(event: "listening"): boolean; + + on(event: string, listener: Function): this; + on(event: "close", listener: () => void): this; + on(event: "connection", listener: (socket: Socket) => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: "listening", listener: () => void): this; + + once(event: string, listener: Function): this; + once(event: "close", listener: () => void): this; + once(event: "connection", listener: (socket: Socket) => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: "listening", listener: () => void): this; + + prependListener(event: string, listener: Function): this; + prependListener(event: "close", listener: () => void): this; + prependListener(event: "connection", listener: (socket: Socket) => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: "listening", listener: () => void): this; + + prependOnceListener(event: string, listener: Function): this; + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "connection", listener: (socket: Socket) => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: "listening", listener: () => void): this; + } + export function createServer(connectionListener?: (socket: Socket) => void): Server; + export function createServer(options?: { allowHalfOpen?: boolean; }, connectionListener?: (socket: Socket) => void): Server; + export function connect(options: { port: number, host?: string, localAddress?: string, localPort?: string, family?: number, allowHalfOpen?: boolean; }, connectionListener?: Function): Socket; + export function connect(port: number, host?: string, connectionListener?: Function): Socket; + export function connect(path: string, connectionListener?: Function): Socket; + export function createConnection(options: { port: number, host?: string, localAddress?: string, localPort?: string, family?: number, allowHalfOpen?: boolean; }, connectionListener?: Function): Socket; + export function createConnection(port: number, host?: string, connectionListener?: Function): Socket; + export function createConnection(path: string, connectionListener?: Function): Socket; + export function isIP(input: string): number; + export function isIPv4(input: string): boolean; + export function isIPv6(input: string): boolean; +} + +declare module "dgram" { + import * as events from "events"; + + interface RemoteInfo { + address: string; + family: string; + port: number; + } + + interface AddressInfo { + address: string; + family: string; + port: number; + } + + interface BindOptions { + port: number; + address?: string; + exclusive?: boolean; + } + + interface SocketOptions { + type: "udp4" | "udp6"; + reuseAddr?: boolean; + } + + export function createSocket(type: string, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket; + export function createSocket(options: SocketOptions, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket; + + export interface Socket extends events.EventEmitter { + send(msg: Buffer | String | any[], port: number, address: string, callback?: (error: Error, bytes: number) => void): void; + send(msg: Buffer | String | any[], offset: number, length: number, port: number, address: string, callback?: (error: Error, bytes: number) => void): void; + bind(port?: number, address?: string, callback?: () => void): void; + bind(options: BindOptions, callback?: Function): void; + close(callback?: any): void; + address(): AddressInfo; + setBroadcast(flag: boolean): void; + setTTL(ttl: number): void; + setMulticastTTL(ttl: number): void; + setMulticastLoopback(flag: boolean): void; + addMembership(multicastAddress: string, multicastInterface?: string): void; + dropMembership(multicastAddress: string, multicastInterface?: string): void; + ref(): void; + unref(): void; + + /** + * events.EventEmitter + * 1. close + * 2. error + * 3. listening + * 4. message + **/ + addListener(event: string, listener: Function): this; + addListener(event: "close", listener: () => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: "listening", listener: () => void): this; + addListener(event: "message", listener: (msg: string, rinfo: AddressInfo) => void): this; + + emit(event: string, ...args: any[]): boolean; + emit(event: "close"): boolean; + emit(event: "error", err: Error): boolean; + emit(event: "listening"): boolean; + emit(event: "message", msg: string, rinfo: AddressInfo): boolean; + + on(event: string, listener: Function): this; + on(event: "close", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: "listening", listener: () => void): this; + on(event: "message", listener: (msg: string, rinfo: AddressInfo) => void): this; + + once(event: string, listener: Function): this; + once(event: "close", listener: () => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: "listening", listener: () => void): this; + once(event: "message", listener: (msg: string, rinfo: AddressInfo) => void): this; + + prependListener(event: string, listener: Function): this; + prependListener(event: "close", listener: () => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: "listening", listener: () => void): this; + prependListener(event: "message", listener: (msg: string, rinfo: AddressInfo) => void): this; + + prependOnceListener(event: string, listener: Function): this; + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: "listening", listener: () => void): this; + prependOnceListener(event: "message", listener: (msg: string, rinfo: AddressInfo) => void): this; + } +} + +declare module "fs" { + import * as stream from "stream"; + import * as events from "events"; + + interface Stats { + isFile(): boolean; + isDirectory(): boolean; + isBlockDevice(): boolean; + isCharacterDevice(): boolean; + isSymbolicLink(): boolean; + isFIFO(): boolean; + isSocket(): boolean; + dev: number; + ino: number; + mode: number; + nlink: number; + uid: number; + gid: number; + rdev: number; + size: number; + blksize: number; + blocks: number; + atime: Date; + mtime: Date; + ctime: Date; + birthtime: Date; + } + + interface FSWatcher extends events.EventEmitter { + close(): void; + + /** + * events.EventEmitter + * 1. change + * 2. error + */ + addListener(event: string, listener: Function): this; + addListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; + addListener(event: "error", listener: (code: number, signal: string) => void): this; + + on(event: string, listener: Function): this; + on(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; + on(event: "error", listener: (code: number, signal: string) => void): this; + + once(event: string, listener: Function): this; + once(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; + once(event: "error", listener: (code: number, signal: string) => void): this; + + prependListener(event: string, listener: Function): this; + prependListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; + prependListener(event: "error", listener: (code: number, signal: string) => void): this; + + prependOnceListener(event: string, listener: Function): this; + prependOnceListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; + prependOnceListener(event: "error", listener: (code: number, signal: string) => void): this; + } + + export interface ReadStream extends stream.Readable { + close(): void; + destroy(): void; + + /** + * events.EventEmitter + * 1. open + * 2. close + */ + addListener(event: string, listener: Function): this; + addListener(event: "open", listener: (fd: number) => void): this; + addListener(event: "close", listener: () => void): this; + + on(event: string, listener: Function): this; + on(event: "open", listener: (fd: number) => void): this; + on(event: "close", listener: () => void): this; + + once(event: string, listener: Function): this; + once(event: "open", listener: (fd: number) => void): this; + once(event: "close", listener: () => void): this; + + prependListener(event: string, listener: Function): this; + prependListener(event: "open", listener: (fd: number) => void): this; + prependListener(event: "close", listener: () => void): this; + + prependOnceListener(event: string, listener: Function): this; + prependOnceListener(event: "open", listener: (fd: number) => void): this; + prependOnceListener(event: "close", listener: () => void): this; + } + + export interface WriteStream extends stream.Writable { + close(): void; + bytesWritten: number; + path: string | Buffer; + + /** + * events.EventEmitter + * 1. open + * 2. close + */ + addListener(event: string, listener: Function): this; + addListener(event: "open", listener: (fd: number) => void): this; + addListener(event: "close", listener: () => void): this; + + on(event: string, listener: Function): this; + on(event: "open", listener: (fd: number) => void): this; + on(event: "close", listener: () => void): this; + + once(event: string, listener: Function): this; + once(event: "open", listener: (fd: number) => void): this; + once(event: "close", listener: () => void): this; + + prependListener(event: string, listener: Function): this; + prependListener(event: "open", listener: (fd: number) => void): this; + prependListener(event: "close", listener: () => void): this; + + prependOnceListener(event: string, listener: Function): this; + prependOnceListener(event: "open", listener: (fd: number) => void): this; + prependOnceListener(event: "close", listener: () => void): this; + } + + /** + * Asynchronous rename. + * @param oldPath + * @param newPath + * @param callback No arguments other than a possible exception are given to the completion callback. + */ + export function rename(oldPath: string, newPath: string, callback?: (err?: NodeJS.ErrnoException) => void): void; + /** + * Synchronous rename + * @param oldPath + * @param newPath + */ + export function renameSync(oldPath: string, newPath: string): void; + export function truncate(path: string | Buffer, callback?: (err?: NodeJS.ErrnoException) => void): void; + export function truncate(path: string | Buffer, len: number, callback?: (err?: NodeJS.ErrnoException) => void): void; + export function truncateSync(path: string | Buffer, len?: number): void; + export function ftruncate(fd: number, callback?: (err?: NodeJS.ErrnoException) => void): void; + export function ftruncate(fd: number, len: number, callback?: (err?: NodeJS.ErrnoException) => void): void; + export function ftruncateSync(fd: number, len?: number): void; + export function chown(path: string | Buffer, uid: number, gid: number, callback?: (err?: NodeJS.ErrnoException) => void): void; + export function chownSync(path: string | Buffer, uid: number, gid: number): void; + export function fchown(fd: number, uid: number, gid: number, callback?: (err?: NodeJS.ErrnoException) => void): void; + export function fchownSync(fd: number, uid: number, gid: number): void; + export function lchown(path: string | Buffer, uid: number, gid: number, callback?: (err?: NodeJS.ErrnoException) => void): void; + export function lchownSync(path: string | Buffer, uid: number, gid: number): void; + export function chmod(path: string | Buffer, mode: number, callback?: (err?: NodeJS.ErrnoException) => void): void; + export function chmod(path: string | Buffer, mode: string, callback?: (err?: NodeJS.ErrnoException) => void): void; + export function chmodSync(path: string | Buffer, mode: number): void; + export function chmodSync(path: string | Buffer, mode: string): void; + export function fchmod(fd: number, mode: number, callback?: (err?: NodeJS.ErrnoException) => void): void; + export function fchmod(fd: number, mode: string, callback?: (err?: NodeJS.ErrnoException) => void): void; + export function fchmodSync(fd: number, mode: number): void; + export function fchmodSync(fd: number, mode: string): void; + export function lchmod(path: string | Buffer, mode: number, callback?: (err?: NodeJS.ErrnoException) => void): void; + export function lchmod(path: string | Buffer, mode: string, callback?: (err?: NodeJS.ErrnoException) => void): void; + export function lchmodSync(path: string | Buffer, mode: number): void; + export function lchmodSync(path: string | Buffer, mode: string): void; + export function stat(path: string | Buffer, callback?: (err: NodeJS.ErrnoException, stats: Stats) => any): void; + export function lstat(path: string | Buffer, callback?: (err: NodeJS.ErrnoException, stats: Stats) => any): void; + export function fstat(fd: number, callback?: (err: NodeJS.ErrnoException, stats: Stats) => any): void; + export function statSync(path: string | Buffer): Stats; + export function lstatSync(path: string | Buffer): Stats; + export function fstatSync(fd: number): Stats; + export function link(srcpath: string | Buffer, dstpath: string | Buffer, callback?: (err?: NodeJS.ErrnoException) => void): void; + export function linkSync(srcpath: string | Buffer, dstpath: string | Buffer): void; + export function symlink(srcpath: string | Buffer, dstpath: string | Buffer, type?: string, callback?: (err?: NodeJS.ErrnoException) => void): void; + export function symlinkSync(srcpath: string | Buffer, dstpath: string | Buffer, type?: string): void; + export function readlink(path: string | Buffer, callback?: (err: NodeJS.ErrnoException, linkString: string) => any): void; + export function readlinkSync(path: string | Buffer): string; + export function realpath(path: string | Buffer, callback?: (err: NodeJS.ErrnoException, resolvedPath: string) => any): void; + export function realpath(path: string | Buffer, cache: { [path: string]: string }, callback: (err: NodeJS.ErrnoException, resolvedPath: string) => any): void; + export function realpathSync(path: string | Buffer, cache?: { [path: string]: string }): string; + /* + * Asynchronous unlink - deletes the file specified in {path} + * + * @param path + * @param callback No arguments other than a possible exception are given to the completion callback. + */ + export function unlink(path: string | Buffer, callback?: (err?: NodeJS.ErrnoException) => void): void; + /* + * Synchronous unlink - deletes the file specified in {path} + * + * @param path + */ + export function unlinkSync(path: string | Buffer): void; + /* + * Asynchronous rmdir - removes the directory specified in {path} + * + * @param path + * @param callback No arguments other than a possible exception are given to the completion callback. + */ + export function rmdir(path: string | Buffer, callback?: (err?: NodeJS.ErrnoException) => void): void; + /* + * Synchronous rmdir - removes the directory specified in {path} + * + * @param path + */ + export function rmdirSync(path: string | Buffer): void; + /* + * Asynchronous mkdir - creates the directory specified in {path}. Parameter {mode} defaults to 0777. + * + * @param path + * @param callback No arguments other than a possible exception are given to the completion callback. + */ + export function mkdir(path: string | Buffer, callback?: (err?: NodeJS.ErrnoException) => void): void; + /* + * Asynchronous mkdir - creates the directory specified in {path}. Parameter {mode} defaults to 0777. + * + * @param path + * @param mode + * @param callback No arguments other than a possible exception are given to the completion callback. + */ + export function mkdir(path: string | Buffer, mode: number, callback?: (err?: NodeJS.ErrnoException) => void): void; + /* + * Asynchronous mkdir - creates the directory specified in {path}. Parameter {mode} defaults to 0777. + * + * @param path + * @param mode + * @param callback No arguments other than a possible exception are given to the completion callback. + */ + export function mkdir(path: string | Buffer, mode: string, callback?: (err?: NodeJS.ErrnoException) => void): void; + /* + * Synchronous mkdir - creates the directory specified in {path}. Parameter {mode} defaults to 0777. + * + * @param path + * @param mode + * @param callback No arguments other than a possible exception are given to the completion callback. + */ + export function mkdirSync(path: string | Buffer, mode?: number): void; + /* + * Synchronous mkdir - creates the directory specified in {path}. Parameter {mode} defaults to 0777. + * + * @param path + * @param mode + * @param callback No arguments other than a possible exception are given to the completion callback. + */ + export function mkdirSync(path: string | Buffer, mode?: string): void; + /* + * Asynchronous mkdtemp - Creates a unique temporary directory. Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * + * @param prefix + * @param callback The created folder path is passed as a string to the callback's second parameter. + */ + export function mkdtemp(prefix: string, callback?: (err: NodeJS.ErrnoException, folder: string) => void): void; + /* + * Synchronous mkdtemp - Creates a unique temporary directory. Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * + * @param prefix + * @returns Returns the created folder path. + */ + export function mkdtempSync(prefix: string): string; + export function readdir(path: string | Buffer, callback?: (err: NodeJS.ErrnoException, files: string[]) => void): void; + export function readdirSync(path: string | Buffer): string[]; + export function close(fd: number, callback?: (err?: NodeJS.ErrnoException) => void): void; + export function closeSync(fd: number): void; + export function open(path: string | Buffer, flags: string | number, callback: (err: NodeJS.ErrnoException, fd: number) => void): void; + export function open(path: string | Buffer, flags: string | number, mode: number, callback: (err: NodeJS.ErrnoException, fd: number) => void): void; + export function openSync(path: string | Buffer, flags: string | number, mode?: number): number; + export function utimes(path: string | Buffer, atime: number, mtime: number, callback?: (err?: NodeJS.ErrnoException) => void): void; + export function utimes(path: string | Buffer, atime: Date, mtime: Date, callback?: (err?: NodeJS.ErrnoException) => void): void; + export function utimesSync(path: string | Buffer, atime: number, mtime: number): void; + export function utimesSync(path: string | Buffer, atime: Date, mtime: Date): void; + export function futimes(fd: number, atime: number, mtime: number, callback?: (err?: NodeJS.ErrnoException) => void): void; + export function futimes(fd: number, atime: Date, mtime: Date, callback?: (err?: NodeJS.ErrnoException) => void): void; + export function futimesSync(fd: number, atime: number, mtime: number): void; + export function futimesSync(fd: number, atime: Date, mtime: Date): void; + export function fsync(fd: number, callback?: (err?: NodeJS.ErrnoException) => void): void; + export function fsyncSync(fd: number): void; + export function write(fd: number, buffer: Buffer, offset: number, length: number, position: number, callback?: (err: NodeJS.ErrnoException, written: number, buffer: Buffer) => void): void; + export function write(fd: number, buffer: Buffer, offset: number, length: number, callback?: (err: NodeJS.ErrnoException, written: number, buffer: Buffer) => void): void; + export function write(fd: number, data: any, callback?: (err: NodeJS.ErrnoException, written: number, str: string) => void): void; + export function write(fd: number, data: any, offset: number, callback?: (err: NodeJS.ErrnoException, written: number, str: string) => void): void; + export function write(fd: number, data: any, offset: number, encoding: string, callback?: (err: NodeJS.ErrnoException, written: number, str: string) => void): void; + export function writeSync(fd: number, buffer: Buffer, offset: number, length: number, position?: number): number; + export function writeSync(fd: number, data: any, position?: number, enconding?: string): number; + export function read(fd: number, buffer: Buffer, offset: number, length: number, position: number, callback?: (err: NodeJS.ErrnoException, bytesRead: number, buffer: Buffer) => void): void; + export function readSync(fd: number, buffer: Buffer, offset: number, length: number, position: number): number; + /* + * Asynchronous readFile - Asynchronously reads the entire contents of a file. + * + * @param fileName + * @param encoding + * @param callback - The callback is passed two arguments (err, data), where data is the contents of the file. + */ + export function readFile(filename: string, encoding: string, callback: (err: NodeJS.ErrnoException, data: string) => void): void; + /* + * Asynchronous readFile - Asynchronously reads the entire contents of a file. + * + * @param fileName + * @param options An object with optional {encoding} and {flag} properties. If {encoding} is specified, readFile returns a string; otherwise it returns a Buffer. + * @param callback - The callback is passed two arguments (err, data), where data is the contents of the file. + */ + export function readFile(filename: string, options: { encoding: string; flag?: string; }, callback: (err: NodeJS.ErrnoException, data: string) => void): void; + /* + * Asynchronous readFile - Asynchronously reads the entire contents of a file. + * + * @param fileName + * @param options An object with optional {encoding} and {flag} properties. If {encoding} is specified, readFile returns a string; otherwise it returns a Buffer. + * @param callback - The callback is passed two arguments (err, data), where data is the contents of the file. + */ + export function readFile(filename: string, options: { flag?: string; }, callback: (err: NodeJS.ErrnoException, data: Buffer) => void): void; + /* + * Asynchronous readFile - Asynchronously reads the entire contents of a file. + * + * @param fileName + * @param callback - The callback is passed two arguments (err, data), where data is the contents of the file. + */ + export function readFile(filename: string, callback: (err: NodeJS.ErrnoException, data: Buffer) => void): void; + /* + * Synchronous readFile - Synchronously reads the entire contents of a file. + * + * @param fileName + * @param encoding + */ + export function readFileSync(filename: string, encoding: string): string; + /* + * Synchronous readFile - Synchronously reads the entire contents of a file. + * + * @param fileName + * @param options An object with optional {encoding} and {flag} properties. If {encoding} is specified, readFileSync returns a string; otherwise it returns a Buffer. + */ + export function readFileSync(filename: string, options: { encoding: string; flag?: string; }): string; + /* + * Synchronous readFile - Synchronously reads the entire contents of a file. + * + * @param fileName + * @param options An object with optional {encoding} and {flag} properties. If {encoding} is specified, readFileSync returns a string; otherwise it returns a Buffer. + */ + export function readFileSync(filename: string, options?: { flag?: string; }): Buffer; + export function writeFile(filename: string, data: any, callback?: (err: NodeJS.ErrnoException) => void): void; + export function writeFile(filename: string, data: any, options: { encoding?: string; mode?: number; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void): void; + export function writeFile(filename: string, data: any, options: { encoding?: string; mode?: string; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void): void; + export function writeFileSync(filename: string, data: any, options?: { encoding?: string; mode?: number; flag?: string; }): void; + export function writeFileSync(filename: string, data: any, options?: { encoding?: string; mode?: string; flag?: string; }): void; + export function appendFile(filename: string, data: any, options: { encoding?: string; mode?: number; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void): void; + export function appendFile(filename: string, data: any, options: { encoding?: string; mode?: string; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void): void; + export function appendFile(filename: string, data: any, callback?: (err: NodeJS.ErrnoException) => void): void; + export function appendFileSync(filename: string, data: any, options?: { encoding?: string; mode?: number; flag?: string; }): void; + export function appendFileSync(filename: string, data: any, options?: { encoding?: string; mode?: string; flag?: string; }): void; + export function watchFile(filename: string, listener: (curr: Stats, prev: Stats) => void): void; + export function watchFile(filename: string, options: { persistent?: boolean; interval?: number; }, listener: (curr: Stats, prev: Stats) => void): void; + export function unwatchFile(filename: string, listener?: (curr: Stats, prev: Stats) => void): void; + export function watch(filename: string, listener?: (event: string, filename: string) => any): FSWatcher; + export function watch(filename: string, encoding: string, listener?: (event: string, filename: string | Buffer) => any): FSWatcher; + export function watch(filename: string, options: { persistent?: boolean; recursive?: boolean; encoding?: string }, listener?: (event: string, filename: string | Buffer) => any): FSWatcher; + export function exists(path: string | Buffer, callback?: (exists: boolean) => void): void; + export function existsSync(path: string | Buffer): boolean; + + export namespace constants { + // File Access Constants + + /** Constant for fs.access(). File is visible to the calling process. */ + export const F_OK: number; + + /** Constant for fs.access(). File can be read by the calling process. */ + export const R_OK: number; + + /** Constant for fs.access(). File can be written by the calling process. */ + export const W_OK: number; + + /** Constant for fs.access(). File can be executed by the calling process. */ + export const X_OK: number; + + // File Open Constants + + /** Constant for fs.open(). Flag indicating to open a file for read-only access. */ + export const O_RDONLY: number; + + /** Constant for fs.open(). Flag indicating to open a file for write-only access. */ + export const O_WRONLY: number; + + /** Constant for fs.open(). Flag indicating to open a file for read-write access. */ + export const O_RDWR: number; + + /** Constant for fs.open(). Flag indicating to create the file if it does not already exist. */ + export const O_CREAT: number; + + /** Constant for fs.open(). Flag indicating that opening a file should fail if the O_CREAT flag is set and the file already exists. */ + export const O_EXCL: number; + + /** Constant for fs.open(). Flag indicating that if path identifies a terminal device, opening the path shall not cause that terminal to become the controlling terminal for the process (if the process does not already have one). */ + export const O_NOCTTY: number; + + /** Constant for fs.open(). Flag indicating that if the file exists and is a regular file, and the file is opened successfully for write access, its length shall be truncated to zero. */ + export const O_TRUNC: number; + + /** Constant for fs.open(). Flag indicating that data will be appended to the end of the file. */ + export const O_APPEND: number; + + /** Constant for fs.open(). Flag indicating that the open should fail if the path is not a directory. */ + export const O_DIRECTORY: number; + + /** Constant for fs.open(). Flag indicating reading accesses to the file system will no longer result in an update to the atime information associated with the file. This flag is available on Linux operating systems only. */ + export const O_NOATIME: number; + + /** Constant for fs.open(). Flag indicating that the open should fail if the path is a symbolic link. */ + export const O_NOFOLLOW: number; + + /** Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O. */ + export const O_SYNC: number; + + /** Constant for fs.open(). Flag indicating to open the symbolic link itself rather than the resource it is pointing to. */ + export const O_SYMLINK: number; + + /** Constant for fs.open(). When set, an attempt will be made to minimize caching effects of file I/O. */ + export const O_DIRECT: number; + + /** Constant for fs.open(). Flag indicating to open the file in nonblocking mode when possible. */ + export const O_NONBLOCK: number; + + // File Type Constants + + /** Constant for fs.Stats mode property for determining a file's type. Bit mask used to extract the file type code. */ + export const S_IFMT: number; + + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a regular file. */ + export const S_IFREG: number; + + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a directory. */ + export const S_IFDIR: number; + + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a character-oriented device file. */ + export const S_IFCHR: number; + + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a block-oriented device file. */ + export const S_IFBLK: number; + + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a FIFO/pipe. */ + export const S_IFIFO: number; + + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a symbolic link. */ + export const S_IFLNK: number; + + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a socket. */ + export const S_IFSOCK: number; + + // File Mode Constants + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by owner. */ + export const S_IRWXU: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by owner. */ + export const S_IRUSR: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by owner. */ + export const S_IWUSR: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by owner. */ + export const S_IXUSR: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by group. */ + export const S_IRWXG: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by group. */ + export const S_IRGRP: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by group. */ + export const S_IWGRP: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by group. */ + export const S_IXGRP: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by others. */ + export const S_IRWXO: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by others. */ + export const S_IROTH: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by others. */ + export const S_IWOTH: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by others. */ + export const S_IXOTH: number; + } + + /** Tests a user's permissions for the file specified by path. */ + export function access(path: string | Buffer, callback: (err: NodeJS.ErrnoException) => void): void; + export function access(path: string | Buffer, mode: number, callback: (err: NodeJS.ErrnoException) => void): void; + /** Synchronous version of fs.access. This throws if any accessibility checks fail, and does nothing otherwise. */ + export function accessSync(path: string | Buffer, mode?: number): void; + export function createReadStream(path: string | Buffer, options?: { + flags?: string; + encoding?: string; + fd?: number; + mode?: number; + autoClose?: boolean; + start?: number; + end?: number; + }): ReadStream; + export function createWriteStream(path: string | Buffer, options?: { + flags?: string; + encoding?: string; + fd?: number; + mode?: number; + autoClose?: boolean; + start?: number; + }): WriteStream; + export function fdatasync(fd: number, callback: Function): void; + export function fdatasyncSync(fd: number): void; +} + +declare module "path" { + + /** + * A parsed path object generated by path.parse() or consumed by path.format(). + */ + export interface ParsedPath { + /** + * The root of the path such as '/' or 'c:\' + */ + root: string; + /** + * The full directory path such as '/home/user/dir' or 'c:\path\dir' + */ + dir: string; + /** + * The file name including extension (if any) such as 'index.html' + */ + base: string; + /** + * The file extension (if any) such as '.html' + */ + ext: string; + /** + * The file name without extension (if any) such as 'index' + */ + name: string; + } + + /** + * Normalize a string path, reducing '..' and '.' parts. + * When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used. + * + * @param p string path to normalize. + */ + export function normalize(p: string): string; + /** + * Join all arguments together and normalize the resulting path. + * Arguments must be strings. In v0.8, non-string arguments were silently ignored. In v0.10 and up, an exception is thrown. + * + * @param paths string paths to join. + */ + export function join(...paths: any[]): string; + /** + * Join all arguments together and normalize the resulting path. + * Arguments must be strings. In v0.8, non-string arguments were silently ignored. In v0.10 and up, an exception is thrown. + * + * @param paths string paths to join. + */ + export function join(...paths: string[]): string; + /** + * The right-most parameter is considered {to}. Other parameters are considered an array of {from}. + * + * Starting from leftmost {from} paramter, resolves {to} to an absolute path. + * + * If {to} isn't already absolute, {from} arguments are prepended in right to left order, until an absolute path is found. If after using all {from} paths still no absolute path is found, the current working directory is used as well. The resulting path is normalized, and trailing slashes are removed unless the path gets resolved to the root directory. + * + * @param pathSegments string paths to join. Non-string arguments are ignored. + */ + export function resolve(...pathSegments: any[]): string; + /** + * Determines whether {path} is an absolute path. An absolute path will always resolve to the same location, regardless of the working directory. + * + * @param path path to test. + */ + export function isAbsolute(path: string): boolean; + /** + * Solve the relative path from {from} to {to}. + * At times we have two absolute paths, and we need to derive the relative path from one to the other. This is actually the reverse transform of path.resolve. + * + * @param from + * @param to + */ + export function relative(from: string, to: string): string; + /** + * Return the directory name of a path. Similar to the Unix dirname command. + * + * @param p the path to evaluate. + */ + export function dirname(p: string): string; + /** + * Return the last portion of a path. Similar to the Unix basename command. + * Often used to extract the file name from a fully qualified path. + * + * @param p the path to evaluate. + * @param ext optionally, an extension to remove from the result. + */ + export function basename(p: string, ext?: string): string; + /** + * Return the extension of the path, from the last '.' to end of string in the last portion of the path. + * If there is no '.' in the last portion of the path or the first character of it is '.', then it returns an empty string + * + * @param p the path to evaluate. + */ + export function extname(p: string): string; + /** + * The platform-specific file separator. '\\' or '/'. + */ + export var sep: string; + /** + * The platform-specific file delimiter. ';' or ':'. + */ + export var delimiter: string; + /** + * Returns an object from a path string - the opposite of format(). + * + * @param pathString path to evaluate. + */ + export function parse(pathString: string): ParsedPath; + /** + * Returns a path string from an object - the opposite of parse(). + * + * @param pathString path to evaluate. + */ + export function format(pathObject: ParsedPath): string; + + export module posix { + export function normalize(p: string): string; + export function join(...paths: any[]): string; + export function resolve(...pathSegments: any[]): string; + export function isAbsolute(p: string): boolean; + export function relative(from: string, to: string): string; + export function dirname(p: string): string; + export function basename(p: string, ext?: string): string; + export function extname(p: string): string; + export var sep: string; + export var delimiter: string; + export function parse(p: string): ParsedPath; + export function format(pP: ParsedPath): string; + } + + export module win32 { + export function normalize(p: string): string; + export function join(...paths: any[]): string; + export function resolve(...pathSegments: any[]): string; + export function isAbsolute(p: string): boolean; + export function relative(from: string, to: string): string; + export function dirname(p: string): string; + export function basename(p: string, ext?: string): string; + export function extname(p: string): string; + export var sep: string; + export var delimiter: string; + export function parse(p: string): ParsedPath; + export function format(pP: ParsedPath): string; + } +} + +declare module "string_decoder" { + export interface NodeStringDecoder { + write(buffer: Buffer): string; + end(buffer?: Buffer): string; + } + export var StringDecoder: { + new (encoding?: string): NodeStringDecoder; + }; +} + +declare module "tls" { + import * as crypto from "crypto"; + import * as net from "net"; + import * as stream from "stream"; + + var CLIENT_RENEG_LIMIT: number; + var CLIENT_RENEG_WINDOW: number; + + export interface Certificate { + /** + * Country code. + */ + C: string; + /** + * Street. + */ + ST: string; + /** + * Locality. + */ + L: string; + /** + * Organization. + */ + O: string; + /** + * Organizational unit. + */ + OU: string; + /** + * Common name. + */ + CN: string; + } + + export interface CipherNameAndProtocol { + /** + * The cipher name. + */ + name: string; + /** + * SSL/TLS protocol version. + */ + version: string; + } + + export class TLSSocket extends stream.Duplex { + /** + * Returns the bound address, the address family name and port of the underlying socket as reported by + * the operating system. + * @returns {any} - An object with three properties, e.g. { port: 12346, family: 'IPv4', address: '127.0.0.1' }. + */ + address(): { port: number; family: string; address: string }; + /** + * A boolean that is true if the peer certificate was signed by one of the specified CAs, otherwise false. + */ + authorized: boolean; + /** + * The reason why the peer's certificate has not been verified. + * This property becomes available only when tlsSocket.authorized === false. + */ + authorizationError: Error; + /** + * Static boolean value, always true. + * May be used to distinguish TLS sockets from regular ones. + */ + encrypted: boolean; + /** + * Returns an object representing the cipher name and the SSL/TLS protocol version of the current connection. + * @returns {CipherNameAndProtocol} - Returns an object representing the cipher name + * and the SSL/TLS protocol version of the current connection. + */ + getCipher(): CipherNameAndProtocol; + /** + * Returns an object representing the peer's certificate. + * The returned object has some properties corresponding to the field of the certificate. + * If detailed argument is true the full chain with issuer property will be returned, + * if false only the top certificate without issuer property. + * If the peer does not provide a certificate, it returns null or an empty object. + * @param {boolean} detailed - If true; the full chain with issuer property will be returned. + * @returns {any} - An object representing the peer's certificate. + */ + getPeerCertificate(detailed?: boolean): { + subject: Certificate; + issuerInfo: Certificate; + issuer: Certificate; + raw: any; + valid_from: string; + valid_to: string; + fingerprint: string; + serialNumber: string; + }; + /** + * Could be used to speed up handshake establishment when reconnecting to the server. + * @returns {any} - ASN.1 encoded TLS session or undefined if none was negotiated. + */ + getSession(): any; + /** + * NOTE: Works only with client TLS sockets. + * Useful only for debugging, for session reuse provide session option to tls.connect(). + * @returns {any} - TLS session ticket or undefined if none was negotiated. + */ + getTLSTicket(): any; + /** + * The string representation of the local IP address. + */ + localAddress: string; + /** + * The numeric representation of the local port. + */ + localPort: string; + /** + * The string representation of the remote IP address. + * For example, '74.125.127.100' or '2001:4860:a005::68'. + */ + remoteAddress: string; + /** + * The string representation of the remote IP family. 'IPv4' or 'IPv6'. + */ + remoteFamily: string; + /** + * The numeric representation of the remote port. For example, 443. + */ + remotePort: number; + /** + * Initiate TLS renegotiation process. + * + * NOTE: Can be used to request peer's certificate after the secure connection has been established. + * ANOTHER NOTE: When running as the server, socket will be destroyed with an error after handshakeTimeout timeout. + * @param {TlsOptions} options - The options may contain the following fields: rejectUnauthorized, + * requestCert (See tls.createServer() for details). + * @param {Function} callback - callback(err) will be executed with null as err, once the renegotiation + * is successfully completed. + */ + renegotiate(options: TlsOptions, callback: (err: Error) => any): any; + /** + * Set maximum TLS fragment size (default and maximum value is: 16384, minimum is: 512). + * Smaller fragment size decreases buffering latency on the client: large fragments are buffered by + * the TLS layer until the entire fragment is received and its integrity is verified; + * large fragments can span multiple roundtrips, and their processing can be delayed due to packet + * loss or reordering. However, smaller fragments add extra TLS framing bytes and CPU overhead, + * which may decrease overall server throughput. + * @param {number} size - TLS fragment size (default and maximum value is: 16384, minimum is: 512). + * @returns {boolean} - Returns true on success, false otherwise. + */ + setMaxSendFragment(size: number): boolean; + + /** + * events.EventEmitter + * 1. OCSPResponse + * 2. secureConnect + **/ + addListener(event: string, listener: Function): this; + addListener(event: "OCSPResponse", listener: (response: Buffer) => void): this; + addListener(event: "secureConnect", listener: () => void): this; + + emit(event: string, ...args: any[]): boolean; + emit(event: "OCSPResponse", response: Buffer): boolean; + emit(event: "secureConnect"): boolean; + + on(event: string, listener: Function): this; + on(event: "OCSPResponse", listener: (response: Buffer) => void): this; + on(event: "secureConnect", listener: () => void): this; + + once(event: string, listener: Function): this; + once(event: "OCSPResponse", listener: (response: Buffer) => void): this; + once(event: "secureConnect", listener: () => void): this; + + prependListener(event: string, listener: Function): this; + prependListener(event: "OCSPResponse", listener: (response: Buffer) => void): this; + prependListener(event: "secureConnect", listener: () => void): this; + + prependOnceListener(event: string, listener: Function): this; + prependOnceListener(event: "OCSPResponse", listener: (response: Buffer) => void): this; + prependOnceListener(event: "secureConnect", listener: () => void): this; + } + + export interface TlsOptions { + host?: string; + port?: number; + pfx?: string | Buffer[]; + key?: string | string[] | Buffer | any[]; + passphrase?: string; + cert?: string | string[] | Buffer | Buffer[]; + ca?: string | string[] | Buffer | Buffer[]; + crl?: string | string[]; + ciphers?: string; + honorCipherOrder?: boolean; + requestCert?: boolean; + rejectUnauthorized?: boolean; + NPNProtocols?: string[] | Buffer; + SNICallback?: (servername: string, cb: (err: Error, ctx: SecureContext) => any) => any; + ecdhCurve?: string; + dhparam?: string | Buffer; + handshakeTimeout?: number; + ALPNProtocols?: string[] | Buffer; + sessionTimeout?: number; + ticketKeys?: any; + sessionIdContext?: string; + secureProtocol?: string; + } + + export interface ConnectionOptions { + host?: string; + port?: number; + socket?: net.Socket; + pfx?: string | Buffer + key?: string | string[] | Buffer | Buffer[]; + passphrase?: string; + cert?: string | string[] | Buffer | Buffer[]; + ca?: string | Buffer | (string | Buffer)[]; + rejectUnauthorized?: boolean; + NPNProtocols?: (string | Buffer)[]; + servername?: string; + path?: string; + ALPNProtocols?: (string | Buffer)[]; + checkServerIdentity?: (servername: string, cert: string | Buffer | (string | Buffer)[]) => any; + secureProtocol?: string; + secureContext?: Object; + session?: Buffer; + minDHSize?: number; + } + + export interface Server extends net.Server { + close(): Server; + address(): { port: number; family: string; address: string; }; + addContext(hostName: string, credentials: { + key: string; + cert: string; + ca: string; + }): void; + maxConnections: number; + connections: number; + + /** + * events.EventEmitter + * 1. tlsClientError + * 2. newSession + * 3. OCSPRequest + * 4. resumeSession + * 5. secureConnection + **/ + addListener(event: string, listener: Function): this; + addListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; + addListener(event: "newSession", listener: (sessionId: any, sessionData: any, callback: (err: Error, resp: Buffer) => void) => void): this; + addListener(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: Function) => void): this; + addListener(event: "resumeSession", listener: (sessionId: any, callback: (err: Error, sessionData: any) => void) => void): this; + addListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; + + emit(event: string, ...args: any[]): boolean; + emit(event: "tlsClientError", err: Error, tlsSocket: TLSSocket): boolean; + emit(event: "newSession", sessionId: any, sessionData: any, callback: (err: Error, resp: Buffer) => void): boolean; + emit(event: "OCSPRequest", certificate: Buffer, issuer: Buffer, callback: Function): boolean; + emit(event: "resumeSession", sessionId: any, callback: (err: Error, sessionData: any) => void): boolean; + emit(event: "secureConnection", tlsSocket: TLSSocket): boolean; + + on(event: string, listener: Function): this; + on(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; + on(event: "newSession", listener: (sessionId: any, sessionData: any, callback: (err: Error, resp: Buffer) => void) => void): this; + on(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: Function) => void): this; + on(event: "resumeSession", listener: (sessionId: any, callback: (err: Error, sessionData: any) => void) => void): this; + on(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; + + once(event: string, listener: Function): this; + once(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; + once(event: "newSession", listener: (sessionId: any, sessionData: any, callback: (err: Error, resp: Buffer) => void) => void): this; + once(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: Function) => void): this; + once(event: "resumeSession", listener: (sessionId: any, callback: (err: Error, sessionData: any) => void) => void): this; + once(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; + + prependListener(event: string, listener: Function): this; + prependListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; + prependListener(event: "newSession", listener: (sessionId: any, sessionData: any, callback: (err: Error, resp: Buffer) => void) => void): this; + prependListener(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: Function) => void): this; + prependListener(event: "resumeSession", listener: (sessionId: any, callback: (err: Error, sessionData: any) => void) => void): this; + prependListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; + + prependOnceListener(event: string, listener: Function): this; + prependOnceListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; + prependOnceListener(event: "newSession", listener: (sessionId: any, sessionData: any, callback: (err: Error, resp: Buffer) => void) => void): this; + prependOnceListener(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: Function) => void): this; + prependOnceListener(event: "resumeSession", listener: (sessionId: any, callback: (err: Error, sessionData: any) => void) => void): this; + prependOnceListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; + } + + export interface ClearTextStream extends stream.Duplex { + authorized: boolean; + authorizationError: Error; + getPeerCertificate(): any; + getCipher: { + name: string; + version: string; + }; + address: { + port: number; + family: string; + address: string; + }; + remoteAddress: string; + remotePort: number; + } + + export interface SecurePair { + encrypted: any; + cleartext: any; + } + + export interface SecureContextOptions { + pfx?: string | Buffer; + key?: string | Buffer; + passphrase?: string; + cert?: string | Buffer; + ca?: string | Buffer; + crl?: string | string[] + ciphers?: string; + honorCipherOrder?: boolean; + } + + export interface SecureContext { + context: any; + } + + export function createServer(options: TlsOptions, secureConnectionListener?: (cleartextStream: ClearTextStream) => void): Server; + export function connect(options: ConnectionOptions, secureConnectionListener?: () => void): ClearTextStream; + export function connect(port: number, host?: string, options?: ConnectionOptions, secureConnectListener?: () => void): ClearTextStream; + export function connect(port: number, options?: ConnectionOptions, secureConnectListener?: () => void): ClearTextStream; + export function createSecurePair(credentials?: crypto.Credentials, isServer?: boolean, requestCert?: boolean, rejectUnauthorized?: boolean): SecurePair; + export function createSecureContext(details: SecureContextOptions): SecureContext; +} + +declare module "crypto" { + export interface Certificate { + exportChallenge(spkac: string | Buffer): Buffer; + exportPublicKey(spkac: string | Buffer): Buffer; + verifySpkac(spkac: Buffer): boolean; + } + export var Certificate: { + new (): Certificate; + (): Certificate; + } + + export var fips: boolean; + + export interface CredentialDetails { + pfx: string; + key: string; + passphrase: string; + cert: string; + ca: string | string[]; + crl: string | string[]; + ciphers: string; + } + export interface Credentials { context?: any; } + export function createCredentials(details: CredentialDetails): Credentials; + export function createHash(algorithm: string): Hash; + export function createHmac(algorithm: string, key: string | Buffer): Hmac; + + type Utf8AsciiLatin1Encoding = "utf8" | "ascii" | "latin1"; + type HexBase64Latin1Encoding = "latin1" | "hex" | "base64"; + type Utf8AsciiBinaryEncoding = "utf8" | "ascii" | "binary"; + type HexBase64BinaryEncoding = "binary" | "base64" | "hex"; + type ECDHKeyFormat = "compressed" | "uncompressed" | "hybrid"; + + export interface Hash extends NodeJS.ReadWriteStream { + update(data: string | Buffer): Hash; + update(data: string | Buffer, input_encoding: Utf8AsciiLatin1Encoding): Hash; + digest(): Buffer; + digest(encoding: HexBase64Latin1Encoding): string; + } + export interface Hmac extends NodeJS.ReadWriteStream { + update(data: string | Buffer): Hmac; + update(data: string | Buffer, input_encoding: Utf8AsciiLatin1Encoding): Hmac; + digest(): Buffer; + digest(encoding: HexBase64Latin1Encoding): string; + } + export function createCipher(algorithm: string, password: any): Cipher; + export function createCipheriv(algorithm: string, key: any, iv: any): Cipher; + export interface Cipher extends NodeJS.ReadWriteStream { + update(data: Buffer): Buffer; + update(data: string, input_encoding: Utf8AsciiBinaryEncoding): Buffer; + update(data: Buffer, input_encoding: any, output_encoding: HexBase64BinaryEncoding): string; + update(data: string, input_encoding: Utf8AsciiBinaryEncoding, output_encoding: HexBase64BinaryEncoding): string; + final(): Buffer; + final(output_encoding: string): string; + setAutoPadding(auto_padding?: boolean): void; + getAuthTag(): Buffer; + setAAD(buffer: Buffer): void; + } + export function createDecipher(algorithm: string, password: any): Decipher; + export function createDecipheriv(algorithm: string, key: any, iv: any): Decipher; + export interface Decipher extends NodeJS.ReadWriteStream { + update(data: Buffer): Buffer; + update(data: string, input_encoding: HexBase64BinaryEncoding): Buffer; + update(data: Buffer, input_encoding: any, output_encoding: Utf8AsciiBinaryEncoding): string; + update(data: string, input_encoding: HexBase64BinaryEncoding, output_encoding: Utf8AsciiBinaryEncoding): string; + final(): Buffer; + final(output_encoding: string): string; + setAutoPadding(auto_padding?: boolean): void; + setAuthTag(tag: Buffer): void; + setAAD(buffer: Buffer): void; + } + export function createSign(algorithm: string): Signer; + export interface Signer extends NodeJS.WritableStream { + update(data: string | Buffer): Signer; + update(data: string | Buffer, input_encoding: Utf8AsciiLatin1Encoding): Signer; + sign(private_key: string | { key: string; passphrase: string }): Buffer; + sign(private_key: string | { key: string; passphrase: string }, output_format: HexBase64Latin1Encoding): string; + } + export function createVerify(algorith: string): Verify; + export interface Verify extends NodeJS.WritableStream { + update(data: string | Buffer): Verify; + update(data: string | Buffer, input_encoding: Utf8AsciiLatin1Encoding): Verify; + verify(object: string, signature: Buffer): boolean; + verify(object: string, signature: string, signature_format: HexBase64Latin1Encoding): boolean; + } + export function createDiffieHellman(prime_length: number, generator?: number): DiffieHellman; + export function createDiffieHellman(prime: Buffer): DiffieHellman; + export function createDiffieHellman(prime: string, prime_encoding: HexBase64Latin1Encoding): DiffieHellman; + export function createDiffieHellman(prime: string, prime_encoding: HexBase64Latin1Encoding, generator: number | Buffer): DiffieHellman; + export function createDiffieHellman(prime: string, prime_encoding: HexBase64Latin1Encoding, generator: string, generator_encoding: HexBase64Latin1Encoding): DiffieHellman; + export interface DiffieHellman { + generateKeys(): Buffer; + generateKeys(encoding: HexBase64Latin1Encoding): string; + computeSecret(other_public_key: Buffer): Buffer; + computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding): Buffer; + computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding, output_encoding: HexBase64Latin1Encoding): string; + getPrime(): Buffer; + getPrime(encoding: HexBase64Latin1Encoding): string; + getGenerator(): Buffer; + getGenerator(encoding: HexBase64Latin1Encoding): string; + getPublicKey(): Buffer; + getPublicKey(encoding: HexBase64Latin1Encoding): string; + getPrivateKey(): Buffer; + getPrivateKey(encoding: HexBase64Latin1Encoding): string; + setPublicKey(public_key: Buffer): void; + setPublicKey(public_key: string, encoding: string): void; + setPrivateKey(private_key: Buffer): void; + setPrivateKey(private_key: string, encoding: string): void; + verifyError: number; + } + export function getDiffieHellman(group_name: string): DiffieHellman; + export function pbkdf2(password: string | Buffer, salt: string | Buffer, iterations: number, keylen: number, digest: string, callback: (err: Error, derivedKey: Buffer) => any): void; + export function pbkdf2Sync(password: string | Buffer, salt: string | Buffer, iterations: number, keylen: number, digest: string): Buffer; + export function randomBytes(size: number): Buffer; + export function randomBytes(size: number, callback: (err: Error, buf: Buffer) => void): void; + export function pseudoRandomBytes(size: number): Buffer; + export function pseudoRandomBytes(size: number, callback: (err: Error, buf: Buffer) => void): void; + export interface RsaPublicKey { + key: string; + padding?: number; + } + export interface RsaPrivateKey { + key: string; + passphrase?: string, + padding?: number; + } + export function publicEncrypt(public_key: string | RsaPublicKey, buffer: Buffer): Buffer + export function privateDecrypt(private_key: string | RsaPrivateKey, buffer: Buffer): Buffer + export function privateEncrypt(private_key: string | RsaPrivateKey, buffer: Buffer): Buffer + export function publicDecrypt(public_key: string | RsaPublicKey, buffer: Buffer): Buffer + export function getCiphers(): string[]; + export function getCurves(): string[]; + export function getHashes(): string[]; + export interface ECDH { + generateKeys(): Buffer; + generateKeys(encoding: HexBase64Latin1Encoding): string; + generateKeys(encoding: HexBase64Latin1Encoding, format: ECDHKeyFormat): string; + computeSecret(other_public_key: Buffer): Buffer; + computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding): Buffer; + computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding, output_encoding: HexBase64Latin1Encoding): string; + getPrivateKey(): Buffer; + getPrivateKey(encoding: HexBase64Latin1Encoding): string; + getPublicKey(): Buffer; + getPublicKey(encoding: HexBase64Latin1Encoding): string; + getPublicKey(encoding: HexBase64Latin1Encoding, format: ECDHKeyFormat): string; + setPrivateKey(private_key: Buffer): void; + setPrivateKey(private_key: string, encoding: HexBase64Latin1Encoding): void; + } + export function createECDH(curve_name: string): ECDH; + export function timingSafeEqual(a: Buffer, b: Buffer): boolean; + export var DEFAULT_ENCODING: string; +} + +declare module "stream" { + import * as events from "events"; + + class internal extends events.EventEmitter { + pipe(destination: T, options?: { end?: boolean; }): T; + } + namespace internal { + + export class Stream extends internal { } + + export interface ReadableOptions { + highWaterMark?: number; + encoding?: string; + objectMode?: boolean; + read?: (size?: number) => any; + } + + export class Readable extends events.EventEmitter implements NodeJS.ReadableStream { + readable: boolean; + constructor(opts?: ReadableOptions); + protected _read(size: number): void; + read(size?: number): any; + setEncoding(encoding: string): void; + pause(): Readable; + resume(): Readable; + pipe(destination: T, options?: { end?: boolean; }): T; + unpipe(destination?: T): void; + unshift(chunk: any): void; + wrap(oldStream: NodeJS.ReadableStream): NodeJS.ReadableStream; + push(chunk: any, encoding?: string): boolean; + + /** + * Event emitter + * The defined events on documents including: + * 1. close + * 2. data + * 3. end + * 4. readable + * 5. error + **/ + addListener(event: string, listener: Function): this; + addListener(event: string, listener: Function): this; + addListener(event: "close", listener: () => void): this; + addListener(event: "data", listener: (chunk: Buffer | string) => void): this; + addListener(event: "end", listener: () => void): this; + addListener(event: "readable", listener: () => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + + emit(event: string, ...args: any[]): boolean; + emit(event: "close"): boolean; + emit(event: "data", chunk: Buffer | string): boolean; + emit(event: "end"): boolean; + emit(event: "readable"): boolean; + emit(event: "error", err: Error): boolean; + + on(event: string, listener: Function): this; + on(event: "close", listener: () => void): this; + on(event: "data", listener: (chunk: Buffer | string) => void): this; + on(event: "end", listener: () => void): this; + on(event: "readable", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + + once(event: string, listener: Function): this; + once(event: "close", listener: () => void): this; + once(event: "data", listener: (chunk: Buffer | string) => void): this; + once(event: "end", listener: () => void): this; + once(event: "readable", listener: () => void): this; + once(event: "error", listener: (err: Error) => void): this; + + prependListener(event: string, listener: Function): this; + prependListener(event: "close", listener: () => void): this; + prependListener(event: "data", listener: (chunk: Buffer | string) => void): this; + prependListener(event: "end", listener: () => void): this; + prependListener(event: "readable", listener: () => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + + prependOnceListener(event: string, listener: Function): this; + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "data", listener: (chunk: Buffer | string) => void): this; + prependOnceListener(event: "end", listener: () => void): this; + prependOnceListener(event: "readable", listener: () => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + + removeListener(event: string, listener: Function): this; + removeListener(event: "close", listener: () => void): this; + removeListener(event: "data", listener: (chunk: Buffer | string) => void): this; + removeListener(event: "end", listener: () => void): this; + removeListener(event: "readable", listener: () => void): this; + removeListener(event: "error", listener: (err: Error) => void): this; + } + + export interface WritableOptions { + highWaterMark?: number; + decodeStrings?: boolean; + objectMode?: boolean; + write?: (chunk: string | Buffer, encoding: string, callback: Function) => any; + writev?: (chunks: { chunk: string | Buffer, encoding: string }[], callback: Function) => any; + } + + export class Writable extends events.EventEmitter implements NodeJS.WritableStream { + writable: boolean; + constructor(opts?: WritableOptions); + protected _write(chunk: any, encoding: string, callback: Function): void; + write(chunk: any, cb?: Function): boolean; + write(chunk: any, encoding?: string, cb?: Function): boolean; + end(): void; + end(chunk: any, cb?: Function): void; + end(chunk: any, encoding?: string, cb?: Function): void; + + /** + * Event emitter + * The defined events on documents including: + * 1. close + * 2. drain + * 3. error + * 4. finish + * 5. pipe + * 6. unpipe + **/ + addListener(event: string, listener: Function): this; + addListener(event: "close", listener: () => void): this; + addListener(event: "drain", listener: () => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: "finish", listener: () => void): this; + addListener(event: "pipe", listener: (src: Readable) => void): this; + addListener(event: "unpipe", listener: (src: Readable) => void): this; + + emit(event: string, ...args: any[]): boolean; + emit(event: "close"): boolean; + emit(event: "drain", chunk: Buffer | string): boolean; + emit(event: "error", err: Error): boolean; + emit(event: "finish"): boolean; + emit(event: "pipe", src: Readable): boolean; + emit(event: "unpipe", src: Readable): boolean; + + on(event: string, listener: Function): this; + on(event: "close", listener: () => void): this; + on(event: "drain", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: "finish", listener: () => void): this; + on(event: "pipe", listener: (src: Readable) => void): this; + on(event: "unpipe", listener: (src: Readable) => void): this; + + once(event: string, listener: Function): this; + once(event: "close", listener: () => void): this; + once(event: "drain", listener: () => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: "finish", listener: () => void): this; + once(event: "pipe", listener: (src: Readable) => void): this; + once(event: "unpipe", listener: (src: Readable) => void): this; + + prependListener(event: string, listener: Function): this; + prependListener(event: "close", listener: () => void): this; + prependListener(event: "drain", listener: () => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: "finish", listener: () => void): this; + prependListener(event: "pipe", listener: (src: Readable) => void): this; + prependListener(event: "unpipe", listener: (src: Readable) => void): this; + + prependOnceListener(event: string, listener: Function): this; + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "drain", listener: () => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: "finish", listener: () => void): this; + prependOnceListener(event: "pipe", listener: (src: Readable) => void): this; + prependOnceListener(event: "unpipe", listener: (src: Readable) => void): this; + + removeListener(event: string, listener: Function): this; + removeListener(event: "close", listener: () => void): this; + removeListener(event: "drain", listener: () => void): this; + removeListener(event: "error", listener: (err: Error) => void): this; + removeListener(event: "finish", listener: () => void): this; + removeListener(event: "pipe", listener: (src: Readable) => void): this; + removeListener(event: "unpipe", listener: (src: Readable) => void): this; + } + + export interface DuplexOptions extends ReadableOptions, WritableOptions { + allowHalfOpen?: boolean; + readableObjectMode?: boolean; + writableObjectMode?: boolean; + } + + // Note: Duplex extends both Readable and Writable. + export class Duplex extends Readable implements NodeJS.ReadWriteStream { + // Readable + pause(): Duplex; + resume(): Duplex; + // Writeable + writable: boolean; + constructor(opts?: DuplexOptions); + protected _write(chunk: any, encoding: string, callback: Function): void; + write(chunk: any, cb?: Function): boolean; + write(chunk: any, encoding?: string, cb?: Function): boolean; + end(): void; + end(chunk: any, cb?: Function): void; + end(chunk: any, encoding?: string, cb?: Function): void; + } + + export interface TransformOptions extends DuplexOptions { + transform?: (chunk: string | Buffer, encoding: string, callback: Function) => any; + flush?: (callback: Function) => any; + } + + // Note: Transform lacks the _read and _write methods of Readable/Writable. + export class Transform extends events.EventEmitter implements NodeJS.ReadWriteStream { + readable: boolean; + writable: boolean; + constructor(opts?: TransformOptions); + protected _transform(chunk: any, encoding: string, callback: Function): void; + protected _flush(callback: Function): void; + read(size?: number): any; + setEncoding(encoding: string): void; + pause(): Transform; + resume(): Transform; + pipe(destination: T, options?: { end?: boolean; }): T; + unpipe(destination?: T): void; + unshift(chunk: any): void; + wrap(oldStream: NodeJS.ReadableStream): NodeJS.ReadableStream; + push(chunk: any, encoding?: string): boolean; + write(chunk: any, cb?: Function): boolean; + write(chunk: any, encoding?: string, cb?: Function): boolean; + end(): void; + end(chunk: any, cb?: Function): void; + end(chunk: any, encoding?: string, cb?: Function): void; + } + + export class PassThrough extends Transform { } + } + + export = internal; +} + +declare module "util" { + export interface InspectOptions { + showHidden?: boolean; + depth?: number; + colors?: boolean; + customInspect?: boolean; + } + + export function format(format: any, ...param: any[]): string; + export function debug(string: string): void; + export function error(...param: any[]): void; + export function puts(...param: any[]): void; + export function print(...param: any[]): void; + export function log(string: string): void; + export function inspect(object: any, showHidden?: boolean, depth?: number, color?: boolean): string; + export function inspect(object: any, options: InspectOptions): string; + export function isArray(object: any): boolean; + export function isRegExp(object: any): boolean; + export function isDate(object: any): boolean; + export function isError(object: any): boolean; + export function inherits(constructor: any, superConstructor: any): void; + export function debuglog(key: string): (msg: string, ...param: any[]) => void; + export function isBoolean(object: any): boolean; + export function isBuffer(object: any): boolean; + export function isFunction(object: any): boolean; + export function isNull(object: any): boolean; + export function isNullOrUndefined(object: any): boolean; + export function isNumber(object: any): boolean; + export function isObject(object: any): boolean; + export function isPrimitive(object: any): boolean; + export function isString(object: any): boolean; + export function isSymbol(object: any): boolean; + export function isUndefined(object: any): boolean; + export function deprecate(fn: Function, message: string): Function; +} + +declare module "assert" { + function internal(value: any, message?: string): void; + namespace internal { + export class AssertionError implements Error { + name: string; + message: string; + actual: any; + expected: any; + operator: string; + generatedMessage: boolean; + + constructor(options?: { + message?: string; actual?: any; expected?: any; + operator?: string; stackStartFunction?: Function + }); + } + + export function fail(actual: any, expected: any, message: string, operator: string): void; + export function ok(value: any, message?: string): void; + export function equal(actual: any, expected: any, message?: string): void; + export function notEqual(actual: any, expected: any, message?: string): void; + export function deepEqual(actual: any, expected: any, message?: string): void; + export function notDeepEqual(acutal: any, expected: any, message?: string): void; + export function strictEqual(actual: any, expected: any, message?: string): void; + export function notStrictEqual(actual: any, expected: any, message?: string): void; + export function deepStrictEqual(actual: any, expected: any, message?: string): void; + export function notDeepStrictEqual(actual: any, expected: any, message?: string): void; + export var throws: { + (block: Function, message?: string): void; + (block: Function, error: Function, message?: string): void; + (block: Function, error: RegExp, message?: string): void; + (block: Function, error: (err: any) => boolean, message?: string): void; + }; + + export var doesNotThrow: { + (block: Function, message?: string): void; + (block: Function, error: Function, message?: string): void; + (block: Function, error: RegExp, message?: string): void; + (block: Function, error: (err: any) => boolean, message?: string): void; + }; + + export function ifError(value: any): void; + } + + export = internal; +} + +declare module "tty" { + import * as net from "net"; + + export function isatty(fd: number): boolean; + export interface ReadStream extends net.Socket { + isRaw: boolean; + setRawMode(mode: boolean): void; + isTTY: boolean; + } + export interface WriteStream extends net.Socket { + columns: number; + rows: number; + isTTY: boolean; + } +} + +declare module "domain" { + import * as events from "events"; + + export class Domain extends events.EventEmitter implements NodeJS.Domain { + run(fn: Function): void; + add(emitter: events.EventEmitter): void; + remove(emitter: events.EventEmitter): void; + bind(cb: (err: Error, data: any) => any): any; + intercept(cb: (data: any) => any): any; + dispose(): void; + members: any[]; + enter(): void; + exit(): void; + } + + export function create(): Domain; +} + +declare module "constants" { + export var E2BIG: number; + export var EACCES: number; + export var EADDRINUSE: number; + export var EADDRNOTAVAIL: number; + export var EAFNOSUPPORT: number; + export var EAGAIN: number; + export var EALREADY: number; + export var EBADF: number; + export var EBADMSG: number; + export var EBUSY: number; + export var ECANCELED: number; + export var ECHILD: number; + export var ECONNABORTED: number; + export var ECONNREFUSED: number; + export var ECONNRESET: number; + export var EDEADLK: number; + export var EDESTADDRREQ: number; + export var EDOM: number; + export var EEXIST: number; + export var EFAULT: number; + export var EFBIG: number; + export var EHOSTUNREACH: number; + export var EIDRM: number; + export var EILSEQ: number; + export var EINPROGRESS: number; + export var EINTR: number; + export var EINVAL: number; + export var EIO: number; + export var EISCONN: number; + export var EISDIR: number; + export var ELOOP: number; + export var EMFILE: number; + export var EMLINK: number; + export var EMSGSIZE: number; + export var ENAMETOOLONG: number; + export var ENETDOWN: number; + export var ENETRESET: number; + export var ENETUNREACH: number; + export var ENFILE: number; + export var ENOBUFS: number; + export var ENODATA: number; + export var ENODEV: number; + export var ENOENT: number; + export var ENOEXEC: number; + export var ENOLCK: number; + export var ENOLINK: number; + export var ENOMEM: number; + export var ENOMSG: number; + export var ENOPROTOOPT: number; + export var ENOSPC: number; + export var ENOSR: number; + export var ENOSTR: number; + export var ENOSYS: number; + export var ENOTCONN: number; + export var ENOTDIR: number; + export var ENOTEMPTY: number; + export var ENOTSOCK: number; + export var ENOTSUP: number; + export var ENOTTY: number; + export var ENXIO: number; + export var EOPNOTSUPP: number; + export var EOVERFLOW: number; + export var EPERM: number; + export var EPIPE: number; + export var EPROTO: number; + export var EPROTONOSUPPORT: number; + export var EPROTOTYPE: number; + export var ERANGE: number; + export var EROFS: number; + export var ESPIPE: number; + export var ESRCH: number; + export var ETIME: number; + export var ETIMEDOUT: number; + export var ETXTBSY: number; + export var EWOULDBLOCK: number; + export var EXDEV: number; + export var WSAEINTR: number; + export var WSAEBADF: number; + export var WSAEACCES: number; + export var WSAEFAULT: number; + export var WSAEINVAL: number; + export var WSAEMFILE: number; + export var WSAEWOULDBLOCK: number; + export var WSAEINPROGRESS: number; + export var WSAEALREADY: number; + export var WSAENOTSOCK: number; + export var WSAEDESTADDRREQ: number; + export var WSAEMSGSIZE: number; + export var WSAEPROTOTYPE: number; + export var WSAENOPROTOOPT: number; + export var WSAEPROTONOSUPPORT: number; + export var WSAESOCKTNOSUPPORT: number; + export var WSAEOPNOTSUPP: number; + export var WSAEPFNOSUPPORT: number; + export var WSAEAFNOSUPPORT: number; + export var WSAEADDRINUSE: number; + export var WSAEADDRNOTAVAIL: number; + export var WSAENETDOWN: number; + export var WSAENETUNREACH: number; + export var WSAENETRESET: number; + export var WSAECONNABORTED: number; + export var WSAECONNRESET: number; + export var WSAENOBUFS: number; + export var WSAEISCONN: number; + export var WSAENOTCONN: number; + export var WSAESHUTDOWN: number; + export var WSAETOOMANYREFS: number; + export var WSAETIMEDOUT: number; + export var WSAECONNREFUSED: number; + export var WSAELOOP: number; + export var WSAENAMETOOLONG: number; + export var WSAEHOSTDOWN: number; + export var WSAEHOSTUNREACH: number; + export var WSAENOTEMPTY: number; + export var WSAEPROCLIM: number; + export var WSAEUSERS: number; + export var WSAEDQUOT: number; + export var WSAESTALE: number; + export var WSAEREMOTE: number; + export var WSASYSNOTREADY: number; + export var WSAVERNOTSUPPORTED: number; + export var WSANOTINITIALISED: number; + export var WSAEDISCON: number; + export var WSAENOMORE: number; + export var WSAECANCELLED: number; + export var WSAEINVALIDPROCTABLE: number; + export var WSAEINVALIDPROVIDER: number; + export var WSAEPROVIDERFAILEDINIT: number; + export var WSASYSCALLFAILURE: number; + export var WSASERVICE_NOT_FOUND: number; + export var WSATYPE_NOT_FOUND: number; + export var WSA_E_NO_MORE: number; + export var WSA_E_CANCELLED: number; + export var WSAEREFUSED: number; + export var SIGHUP: number; + export var SIGINT: number; + export var SIGILL: number; + export var SIGABRT: number; + export var SIGFPE: number; + export var SIGKILL: number; + export var SIGSEGV: number; + export var SIGTERM: number; + export var SIGBREAK: number; + export var SIGWINCH: number; + export var SSL_OP_ALL: number; + export var SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: number; + export var SSL_OP_CIPHER_SERVER_PREFERENCE: number; + export var SSL_OP_CISCO_ANYCONNECT: number; + export var SSL_OP_COOKIE_EXCHANGE: number; + export var SSL_OP_CRYPTOPRO_TLSEXT_BUG: number; + export var SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS: number; + export var SSL_OP_EPHEMERAL_RSA: number; + export var SSL_OP_LEGACY_SERVER_CONNECT: number; + export var SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER: number; + export var SSL_OP_MICROSOFT_SESS_ID_BUG: number; + export var SSL_OP_MSIE_SSLV2_RSA_PADDING: number; + export var SSL_OP_NETSCAPE_CA_DN_BUG: number; + export var SSL_OP_NETSCAPE_CHALLENGE_BUG: number; + export var SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG: number; + export var SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG: number; + export var SSL_OP_NO_COMPRESSION: number; + export var SSL_OP_NO_QUERY_MTU: number; + export var SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION: number; + export var SSL_OP_NO_SSLv2: number; + export var SSL_OP_NO_SSLv3: number; + export var SSL_OP_NO_TICKET: number; + export var SSL_OP_NO_TLSv1: number; + export var SSL_OP_NO_TLSv1_1: number; + export var SSL_OP_NO_TLSv1_2: number; + export var SSL_OP_PKCS1_CHECK_1: number; + export var SSL_OP_PKCS1_CHECK_2: number; + export var SSL_OP_SINGLE_DH_USE: number; + export var SSL_OP_SINGLE_ECDH_USE: number; + export var SSL_OP_SSLEAY_080_CLIENT_DH_BUG: number; + export var SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG: number; + export var SSL_OP_TLS_BLOCK_PADDING_BUG: number; + export var SSL_OP_TLS_D5_BUG: number; + export var SSL_OP_TLS_ROLLBACK_BUG: number; + export var ENGINE_METHOD_DSA: number; + export var ENGINE_METHOD_DH: number; + export var ENGINE_METHOD_RAND: number; + export var ENGINE_METHOD_ECDH: number; + export var ENGINE_METHOD_ECDSA: number; + export var ENGINE_METHOD_CIPHERS: number; + export var ENGINE_METHOD_DIGESTS: number; + export var ENGINE_METHOD_STORE: number; + export var ENGINE_METHOD_PKEY_METHS: number; + export var ENGINE_METHOD_PKEY_ASN1_METHS: number; + export var ENGINE_METHOD_ALL: number; + export var ENGINE_METHOD_NONE: number; + export var DH_CHECK_P_NOT_SAFE_PRIME: number; + export var DH_CHECK_P_NOT_PRIME: number; + export var DH_UNABLE_TO_CHECK_GENERATOR: number; + export var DH_NOT_SUITABLE_GENERATOR: number; + export var NPN_ENABLED: number; + export var RSA_PKCS1_PADDING: number; + export var RSA_SSLV23_PADDING: number; + export var RSA_NO_PADDING: number; + export var RSA_PKCS1_OAEP_PADDING: number; + export var RSA_X931_PADDING: number; + export var RSA_PKCS1_PSS_PADDING: number; + export var POINT_CONVERSION_COMPRESSED: number; + export var POINT_CONVERSION_UNCOMPRESSED: number; + export var POINT_CONVERSION_HYBRID: number; + export var O_RDONLY: number; + export var O_WRONLY: number; + export var O_RDWR: number; + export var S_IFMT: number; + export var S_IFREG: number; + export var S_IFDIR: number; + export var S_IFCHR: number; + export var S_IFBLK: number; + export var S_IFIFO: number; + export var S_IFSOCK: number; + export var S_IRWXU: number; + export var S_IRUSR: number; + export var S_IWUSR: number; + export var S_IXUSR: number; + export var S_IRWXG: number; + export var S_IRGRP: number; + export var S_IWGRP: number; + export var S_IXGRP: number; + export var S_IRWXO: number; + export var S_IROTH: number; + export var S_IWOTH: number; + export var S_IXOTH: number; + export var S_IFLNK: number; + export var O_CREAT: number; + export var O_EXCL: number; + export var O_NOCTTY: number; + export var O_DIRECTORY: number; + export var O_NOATIME: number; + export var O_NOFOLLOW: number; + export var O_SYNC: number; + export var O_SYMLINK: number; + export var O_DIRECT: number; + export var O_NONBLOCK: number; + export var O_TRUNC: number; + export var O_APPEND: number; + export var F_OK: number; + export var R_OK: number; + export var W_OK: number; + export var X_OK: number; + export var UV_UDP_REUSEADDR: number; + export var SIGQUIT: number; + export var SIGTRAP: number; + export var SIGIOT: number; + export var SIGBUS: number; + export var SIGUSR1: number; + export var SIGUSR2: number; + export var SIGPIPE: number; + export var SIGALRM: number; + export var SIGCHLD: number; + export var SIGSTKFLT: number; + export var SIGCONT: number; + export var SIGSTOP: number; + export var SIGTSTP: number; + export var SIGTTIN: number; + export var SIGTTOU: number; + export var SIGURG: number; + export var SIGXCPU: number; + export var SIGXFSZ: number; + export var SIGVTALRM: number; + export var SIGPROF: number; + export var SIGIO: number; + export var SIGPOLL: number; + export var SIGPWR: number; + export var SIGSYS: number; + export var SIGUNUSED: number; + export var defaultCoreCipherList: string; + export var defaultCipherList: string; + export var ENGINE_METHOD_RSA: number; + export var ALPN_ENABLED: number; +} + +declare module "process" { + export = process; +} + +declare module "v8" { + interface HeapSpaceInfo { + space_name: string; + space_size: number; + space_used_size: number; + space_available_size: number; + physical_space_size: number; + } + export function getHeapStatistics(): { total_heap_size: number, total_heap_size_executable: number, total_physical_size: number, total_avaialble_size: number, used_heap_size: number, heap_size_limit: number }; + export function getHeapSpaceStatistics(): HeapSpaceInfo[]; + export function setFlagsFromString(flags: string): void; +} + +declare module "timers" { + export function setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timer; + export function clearTimeout(timeoutId: NodeJS.Timer): void; + export function setInterval(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timer; + export function clearInterval(intervalId: NodeJS.Timer): void; + export function setImmediate(callback: (...args: any[]) => void, ...args: any[]): any; + export function clearImmediate(immediateId: any): void; +} + +declare module "console" { + export = console; +} diff --git a/typings/requirejs/require.d.ts b/typings/requirejs/require.d.ts deleted file mode 100644 index ac116494..00000000 --- a/typings/requirejs/require.d.ts +++ /dev/null @@ -1,417 +0,0 @@ -// Type definitions for RequireJS 2.1.20 -// Project: http://requirejs.org/ -// Definitions by: Josh Baldwin -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -/* -require-2.1.8.d.ts may be freely distributed under the MIT license. - -Copyright (c) 2013 Josh Baldwin https://github.com/jbaldwin/require.d.ts - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. -*/ - -declare module 'module' { - var mod: { - config: () => any; - id: string; - uri: string; - } - export = mod; -} - -interface RequireError extends Error { - - /** - * The error ID that maps to an ID on a web page. - **/ - requireType: string; - - /** - * Required modules. - **/ - requireModules: string[]; - - /** - * The original error, if there is one (might be null). - **/ - originalError: Error; -} - -interface RequireShim { - - /** - * List of dependencies. - **/ - deps?: string[]; - - /** - * Name the module will be exported as. - **/ - exports?: string; - - /** - * Initialize function with all dependcies passed in, - * if the function returns a value then that value is used - * as the module export value instead of the object - * found via the 'exports' string. - * @param dependencies - * @return - **/ - init?: (...dependencies: any[]) => any; -} - -interface RequireConfig { - - // The root path to use for all module lookups. - baseUrl?: string; - - // Path mappings for module names not found directly under - // baseUrl. - paths?: { [key: string]: any; }; - - - // Dictionary of Shim's. - // does not cover case of key->string[] - shim?: { [key: string]: RequireShim; }; - - /** - * For the given module prefix, instead of loading the - * module with the given ID, substitude a different - * module ID. - * - * @example - * requirejs.config({ - * map: { - * 'some/newmodule': { - * 'foo': 'foo1.2' - * }, - * 'some/oldmodule': { - * 'foo': 'foo1.0' - * } - * } - * }); - **/ - map?: { - [id: string]: { - [id: string]: string; - }; - }; - - /** - * Allows pointing multiple module IDs to a module ID that contains a bundle of modules. - * - * @example - * requirejs.config({ - * bundles: { - * 'primary': ['main', 'util', 'text', 'text!template.html'], - * 'secondary': ['text!secondary.html'] - * } - * }); - **/ - bundles?: { [key: string]: string[]; }; - - /** - * AMD configurations, use module.config() to access in - * define() functions - **/ - config?: { [id: string]: {}; }; - - /** - * Configures loading modules from CommonJS packages. - **/ - packages?: {}; - - /** - * The number of seconds to wait before giving up on loading - * a script. The default is 7 seconds. - **/ - waitSeconds?: number; - - /** - * A name to give to a loading context. This allows require.js - * to load multiple versions of modules in a page, as long as - * each top-level require call specifies a unique context string. - **/ - context?: string; - - /** - * An array of dependencies to load. - **/ - deps?: string[]; - - /** - * A function to pass to require that should be require after - * deps have been loaded. - * @param modules - **/ - callback?: (...modules: any[]) => void; - - /** - * If set to true, an error will be thrown if a script loads - * that does not call define() or have shim exports string - * value that can be checked. - **/ - enforceDefine?: boolean; - - /** - * If set to true, document.createElementNS() will be used - * to create script elements. - **/ - xhtml?: boolean; - - /** - * Extra query string arguments appended to URLs that RequireJS - * uses to fetch resources. Most useful to cache bust when - * the browser or server is not configured correctly. - * - * @example - * urlArgs: "bust= + (new Date()).getTime() - * - * As of RequireJS 2.2.0, urlArgs can be a function. If a - * function, it will receive the module ID and the URL as - * parameters, and it should return a string that will be added - * to the end of the URL. Return an empty string if no args. - * Be sure to take care of adding the '?' or '&' depending on - * the existing state of the URL. - * - * @example - - * requirejs.config({ - * urlArgs: function(id, url) { - * var args = 'v=1'; - * if (url.indexOf('view.html') !== -1) { - * args = 'v=2' - * } - * - * return (url.indexOf('?') === -1 ? '?' : '&') + args; - * } - * }); - **/ - urlArgs?: string | ((id: string, url: string) => string); - - /** - * Specify the value for the type="" attribute used for script - * tags inserted into the document by RequireJS. Default is - * "text/javascript". To use Firefox's JavasScript 1.8 - * features, use "text/javascript;version=1.8". - **/ - scriptType?: string; - - /** - * If set to true, skips the data-main attribute scanning done - * to start module loading. Useful if RequireJS is embedded in - * a utility library that may interact with other RequireJS - * library on the page, and the embedded version should not do - * data-main loading. - **/ - skipDataMain?: boolean; - - /** - * Allow extending requirejs to support Subresource Integrity - * (SRI). - **/ - onNodeCreated?: (node: HTMLScriptElement, config: RequireConfig, moduleName: string, url: string) => void; -} - -// todo: not sure what to do with this guy -interface RequireModule { - - /** - * - **/ - config(): {}; - -} - -/** -* -**/ -interface RequireMap { - - /** - * - **/ - prefix: string; - - /** - * - **/ - name: string; - - /** - * - **/ - parentMap: RequireMap; - - /** - * - **/ - url: string; - - /** - * - **/ - originalName: string; - - /** - * - **/ - fullName: string; -} - -interface Require { - - /** - * Configure require.js - **/ - config(config: RequireConfig): Require; - - /** - * CommonJS require call - * @param module Module to load - * @return The loaded module - */ - (module: string): any; - - /** - * Start the main app logic. - * Callback is optional. - * Can alternatively use deps and callback. - * @param modules Required modules to load. - **/ - (modules: string[]): void; - - /** - * @see Require() - * @param ready Called when required modules are ready. - **/ - (modules: string[], ready: Function): void; - - /** - * @see http://requirejs.org/docs/api.html#errbacks - * @param ready Called when required modules are ready. - **/ - (modules: string[], ready: Function, errback: Function): void; - - /** - * Generate URLs from require module - * @param module Module to URL - * @return URL string - **/ - toUrl(module: string): string; - - /** - * Returns true if the module has already been loaded and defined. - * @param module Module to check - **/ - defined(module: string): boolean; - - /** - * Returns true if the module has already been requested or is in the process of loading and should be available at some point. - * @param module Module to check - **/ - specified(module: string): boolean; - - /** - * On Error override - * @param err - **/ - onError(err: RequireError, errback?: (err: RequireError) => void): void; - - /** - * Undefine a module - * @param module Module to undefine. - **/ - undef(module: string): void; - - /** - * Semi-private function, overload in special instance of undef() - **/ - onResourceLoad(context: Object, map: RequireMap, depArray: RequireMap[]): void; -} - -interface RequireDefine { - - /** - * Define Simple Name/Value Pairs - * @param config Dictionary of Named/Value pairs for the config. - **/ - (config: { [key: string]: any; }): void; - - /** - * Define function. - * @param func: The function module. - **/ - (func: () => any): void; - - /** - * Define function with dependencies. - * @param deps List of dependencies module IDs. - * @param ready Callback function when the dependencies are loaded. - * callback param deps module dependencies - * callback return module definition - **/ - (deps: string[], ready: Function): void; - - /** - * Define module with simplified CommonJS wrapper. - * @param ready - * callback require requirejs instance - * callback exports exports object - * callback module module - * callback return module definition - **/ - (ready: (require: Require, exports: { [key: string]: any; }, module: RequireModule) => any): void; - - /** - * Define a module with a name and dependencies. - * @param name The name of the module. - * @param deps List of dependencies module IDs. - * @param ready Callback function when the dependencies are loaded. - * callback deps module dependencies - * callback return module definition - **/ - (name: string, deps: string[], ready: Function): void; - - /** - * Define a module with a name. - * @param name The name of the module. - * @param ready Callback function when the dependencies are loaded. - * callback return module definition - **/ - (name: string, ready: Function): void; - - /** - * Used to allow a clear indicator that a global define function (as needed for script src browser loading) conforms - * to the AMD API, any global define function SHOULD have a property called "amd" whose value is an object. - * This helps avoid conflict with any other existing JavaScript code that could have defined a define() function - * that does not conform to the AMD API. - * define.amd.jQuery is specific to jQuery and indicates that the loader is able to account for multiple version - * of jQuery being loaded simultaneously. - */ - amd: Object; -} - -// Ambient declarations for 'require' and 'define' -declare var requirejs: Require; -declare var require: Require; -declare var define: RequireDefine; diff --git a/typings/shelljs/shelljs.d.ts b/typings/shelljs/shelljs.d.ts new file mode 100644 index 00000000..5d33833e --- /dev/null +++ b/typings/shelljs/shelljs.d.ts @@ -0,0 +1,557 @@ +// Type definitions for ShellJS v0.3.0 +// Project: http://shelljs.org +// Definitions by: Niklas Mollenhauer +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + + +/// + +declare module "shelljs" +{ + import child = require("child_process"); + + /** + * Changes to directory dir for the duration of the script + * @param {string} dir Directory to change in. + */ + export function cd(dir: string): void; + + /** + * Returns the current directory. + * @return {string} The current directory. + */ + export function pwd(): string; + + /** + * Returns array of files in the given path, or in current directory if no path provided. + * @param {string[]} ...paths Paths to search. + * @return {string[]} An array of files in the given path(s). + */ + export function ls(...paths: string[]): string[]; + + /** + * Returns array of files in the given path, or in current directory if no path provided. + * @param {string} options Available options: -R (recursive), -A (all files, include files beginning with ., except for . and ..) + * @param {string[]} ...paths Paths to search. + * @return {string[]} An array of files in the given path(s). + */ + export function ls(options: string, ...paths: string[]): string[]; + + /** + * Returns array of files in the given path, or in current directory if no path provided. + * @param {string[]} paths Paths to search. + * @return {string[]} An array of files in the given path(s). + */ + export function ls(paths: string[]): string[]; + + /** + * Returns array of files in the given path, or in current directory if no path provided. + * @param {string} options Available options: -R (recursive), -A (all files, include files beginning with ., except for . and ..) + * @param {string[]} paths Paths to search. + * @return {string[]} An array of files in the given path(s). + */ + export function ls(options: string, paths: string[]): string[]; + + /** + * Returns array of all files (however deep) in the given paths. + * @param {string[]} ...path The path(s) to search. + * @return {string[]} An array of all files (however deep) in the given path(s). + */ + export function find(...path: string[]): string[]; + + /** + * Returns array of all files (however deep) in the given paths. + * @param {string[]} path The path(s) to search. + * @return {string[]} An array of all files (however deep) in the given path(s). + */ + export function find(path: string[]): string[]; + + /** + * Copies files. The wildcard * is accepted. + * @param {string} source The source. + * @param {string} dest The destination. + */ + export function cp(source: string, dest: string): void; + + /** + * Copies files. The wildcard * is accepted. + * @param {string[]} source The source. + * @param {string} dest The destination. + */ + export function cp(source: string[], dest: string): void; + + /** + * Copies files. The wildcard * is accepted. + * @param {string} options Available options: -f (force), -r, -R (recursive) + * @param {strin]} source The source. + * @param {string} dest The destination. + */ + export function cp(options: string, source: string, dest: string): void; + + /** + * Copies files. The wildcard * is accepted. + * @param {string} options Available options: -f (force), -r, -R (recursive) + * @param {string[]} source The source. + * @param {string} dest The destination. + */ + export function cp(options: string, source: string[], dest: string): void; + + /** + * Removes files. The wildcard * is accepted. + * @param {string[]} ...files Files to remove. + */ + export function rm(...files: string[]): void; + + /** + * Removes files. The wildcard * is accepted. + * @param {string[]} files Files to remove. + */ + export function rm(files: string[]): void; + + /** + * Removes files. The wildcard * is accepted. + * @param {string} options Available options: -f (force), -r, -R (recursive) + * @param {string[]} ...files Files to remove. + */ + export function rm(options: string, ...files: string[]): void; + + /** + * Removes files. The wildcard * is accepted. + * @param {string} options Available options: -f (force), -r, -R (recursive) + * @param {string[]} ...files Files to remove. + */ + export function rm(options: string, files: string[]): void; + + /** + * Moves files. The wildcard * is accepted. + * @param {string} source The source. + * @param {string} dest The destination. + */ + export function mv(source: string, dest: string): void; + + /** + * Moves files. The wildcard * is accepted. + * @param {string[]} source The source. + * @param {string} dest The destination. + */ + export function mv(source: string[], dest: string): void; + + /** + * Creates directories. + * @param {string[]} ...dir Directories to create. + */ + export function mkdir(...dir: string[]): void; + + /** + * Creates directories. + * @param {string[]} dir Directories to create. + */ + export function mkdir(dir: string[]): void; + + /** + * Creates directories. + * @param {string} options Available options: p (full paths, will create intermediate dirs if necessary) + * @param {string[]} ...dir The directories to create. + */ + export function mkdir(options: string, ...dir: string[]): void; + + /** + * Creates directories. + * @param {string} options Available options: p (full paths, will create intermediate dirs if necessary) + * @param {string[]} dir The directories to create. + */ + export function mkdir(options: string, dir: string[]): void; + + /** + * Evaluates expression using the available primaries and returns corresponding value. + * @param {string} option '-b': true if path is a block device; '-c': true if path is a character device; '-d': true if path is a directory; '-e': true if path exists; '-f': true if path is a regular file; '-L': true if path is a symboilc link; '-p': true if path is a pipe (FIFO); '-S': true if path is a socket + * @param {string} path The path. + * @return {boolean} See option parameter. + */ + export function test(option: string, path: string): boolean; + + /** + * Returns a string containing the given file, or a concatenated string containing the files if more than one file is given (a new line character is introduced between each file). Wildcard * accepted. + * @param {string[]} ...files Files to use. + * @return {string} A string containing the given file, or a concatenated string containing the files if more than one file is given (a new line character is introduced between each file). + */ + export function cat(...files: string[]): string; + + /** + * Returns a string containing the given file, or a concatenated string containing the files if more than one file is given (a new line character is introduced between each file). Wildcard * accepted. + * @param {string[]} files Files to use. + * @return {string} A string containing the given file, or a concatenated string containing the files if more than one file is given (a new line character is introduced between each file). + */ + export function cat(files: string[]): string; + + + // Does not work yet. + export interface String + { + /** + * Analogous to the redirection operator > in Unix, but works with JavaScript strings (such as those returned by cat, grep, etc). Like Unix redirections, to() will overwrite any existing file! + * @param {string} file The file to use. + */ + to(file: string): void; + + /** + * Analogous to the redirect-and-append operator >> in Unix, but works with JavaScript strings (such as those returned by cat, grep, etc). + * @param {string} file The file to append to. + */ + toEnd(file: string): void; + } + + /** + * Reads an input string from file and performs a JavaScript replace() on the input using the given search regex and replacement string or function. Returns the new string after replacement. + * @param {RegExp} searchRegex The regular expression to use for search. + * @param {string} replacement The replacement. + * @param {string} file The file to process. + * @return {string} The new string after replacement. + */ + export function sed(searchRegex: RegExp, replacement: string, file: string): string; + + /** + * Reads an input string from file and performs a JavaScript replace() on the input using the given search regex and replacement string or function. Returns the new string after replacement. + * @param {string} searchRegex The regular expression to use for search. + * @param {string} replacement The replacement. + * @param {string} file The file to process. + * @return {string} The new string after replacement. + */ + export function sed(searchRegex: string, replacement: string, file: string): string; + + /** + * Reads an input string from file and performs a JavaScript replace() on the input using the given search regex and replacement string or function. Returns the new string after replacement. + * @param {string} options Available options: -i (Replace contents of 'file' in-place. Note that no backups will be created!) + * @param {RegExp} searchRegex The regular expression to use for search. + * @param {string} replacement The replacement. + * @param {string} file The file to process. + * @return {string} The new string after replacement. + */ + export function sed(options: string, searchRegex: RegExp, replacement: string, file: string): string; + + /** + * Reads an input string from file and performs a JavaScript replace() on the input using the given search regex and replacement string or function. Returns the new string after replacement. + * @param {string} options Available options: -i (Replace contents of 'file' in-place. Note that no backups will be created!) + * @param {string} searchRegex The regular expression to use for search. + * @param {string} replacement The replacement. + * @param {string} file The file to process. + * @return {string} The new string after replacement. + */ + export function sed(options: string, searchRegex: string, replacement: string, file: string): string; + + /** + * Reads input string from given files and returns a string containing all lines of the file that match the given regex_filter. Wildcard * accepted. + * @param {RegExp} regex_filter The regular expression to use. + * @param {string[]} ...files The files to process. + * @return {string} Returns a string containing all lines of the file that match the given regex_filter. + */ + export function grep(regex_filter: RegExp, ...files: string[]): string; + + /** + * Reads input string from given files and returns a string containing all lines of the file that match the given regex_filter. Wildcard * accepted. + * @param {RegExp} regex_filter The regular expression to use. + * @param {string[]} ...files The files to process. + * @return {string} Returns a string containing all lines of the file that match the given regex_filter. + */ + export function grep(regex_filter: RegExp, files: string[]): string; + + /** + * Reads input string from given files and returns a string containing all lines of the file that match the given regex_filter. Wildcard * accepted. + * @param {string} options Available options: -v (Inverse the sense of the regex and print the lines not matching the criteria.) + * @param {string} regex_filter The regular expression to use. + * @param {string[]} ...files The files to process. + * @return {string} Returns a string containing all lines of the file that match the given regex_filter. + */ + export function grep(options: string, regex_filter: string, ...files: string[]): string; + + /** + * Reads input string from given files and returns a string containing all lines of the file that match the given regex_filter. Wildcard * accepted. + * @param {string} options Available options: -v (Inverse the sense of the regex and print the lines not matching the criteria.) + * @param {string} regex_filter The regular expression to use. + * @param {string[]} files The files to process. + * @return {string} Returns a string containing all lines of the file that match the given regex_filter. + */ + export function grep(options: string, regex_filter: string, files: string[]): string; + + /** + * Searches for command in the system's PATH. On Windows looks for .exe, .cmd, and .bat extensions. + * @param {string} command The command to search for. + * @return {string} Returns string containing the absolute path to the command. + */ + export function which(command: string): string; + + /** + * Prints string to stdout, and returns string with additional utility methods like .to(). + * @param {string[]} ...text The text to print. + * @return {string} Returns the string that was passed as argument. + */ + export function echo(...text: string[]): string; + + /** + * Save the current directory on the top of the directory stack and then cd to dir. With no arguments, pushd exchanges the top two directories. Returns an array of paths in the stack. + * @param {"+N"} dir Brings the Nth directory (counting from the left of the list printed by dirs, starting with zero) to the top of the list by rotating the stack. + * @return {string[]} Returns an array of paths in the stack. + */ + export function pushd(dir: "+N"): string[]; + + /** + * Save the current directory on the top of the directory stack and then cd to dir. With no arguments, pushd exchanges the top two directories. Returns an array of paths in the stack. + * @param {"-N"} dir Brings the Nth directory (counting from the right of the list printed by dirs, starting with zero) to the top of the list by rotating the stack. + * @return {string[]} Returns an array of paths in the stack. + */ + export function pushd(dir: "-N"): string[]; + + /** + * Save the current directory on the top of the directory stack and then cd to dir. With no arguments, pushd exchanges the top two directories. Returns an array of paths in the stack. + * @param {string} dir Makes the current working directory be the top of the stack, and then executes the equivalent of cd dir. + * @return {string[]} Returns an array of paths in the stack. + */ + export function pushd(dir: string): string[]; + + /** + * Save the current directory on the top of the directory stack and then cd to dir. With no arguments, pushd exchanges the top two directories. Returns an array of paths in the stack. + * @param {string} options Available options: -n (Suppresses the normal change of directory when adding directories to the stack, so that only the stack is manipulated) + * @param {"+N"} dir Brings the Nth directory (counting from the left of the list printed by dirs, starting with zero) to the top of the list by rotating the stack. + * @return {string[]} Returns an array of paths in the stack. + */ + export function pushd(options: string, dir: "+N"): string[]; + + /** + * Save the current directory on the top of the directory stack and then cd to dir. With no arguments, pushd exchanges the top two directories. Returns an array of paths in the stack. + * @param {string} options Available options: -n (Suppresses the normal change of directory when adding directories to the stack, so that only the stack is manipulated) + * @param {"-N"} dir Brings the Nth directory (counting from the right of the list printed by dirs, starting with zero) to the top of the list by rotating the stack. + * @return {string[]} Returns an array of paths in the stack. + */ + export function pushd(options: string, dir: "-N"): string[]; + + /** + * Save the current directory on the top of the directory stack and then cd to dir. With no arguments, pushd exchanges the top two directories. Returns an array of paths in the stack. + * @param {string} options Available options: -n (Suppresses the normal change of directory when adding directories to the stack, so that only the stack is manipulated) + * @param {string} dir Makes the current working directory be the top of the stack, and then executes the equivalent of cd dir. + * @return {string[]} Returns an array of paths in the stack. + */ + export function pushd(options: string, dir: string): string[]; + + /** + * When no arguments are given, popd removes the top directory from the stack and performs a cd to the new top directory. The elements are numbered from 0 starting at the first directory listed with dirs; i.e., popd is equivalent to popd +0. Returns an array of paths in the stack. + * @param {"+N"} dir Removes the Nth directory (counting from the left of the list printed by dirs), starting with zero. + * @return {string[]} Returns an array of paths in the stack. + */ + export function popd(dir: "+N"): string[]; + + /** + * When no arguments are given, popd removes the top directory from the stack and performs a cd to the new top directory. The elements are numbered from 0 starting at the first directory listed with dirs; i.e., popd is equivalent to popd +0. Returns an array of paths in the stack. + * @return {string[]} Returns an array of paths in the stack. + */ + export function popd(): string[]; + + /** + * When no arguments are given, popd removes the top directory from the stack and performs a cd to the new top directory. The elements are numbered from 0 starting at the first directory listed with dirs; i.e., popd is equivalent to popd +0. Returns an array of paths in the stack. + * @param {"-N"} dir Removes the Nth directory (counting from the right of the list printed by dirs), starting with zero. + * @return {string[]} Returns an array of paths in the stack. + */ + export function popd(dir: "-N"): string[]; + + /** + * When no arguments are given, popd removes the top directory from the stack and performs a cd to the new top directory. The elements are numbered from 0 starting at the first directory listed with dirs; i.e., popd is equivalent to popd +0. Returns an array of paths in the stack. + * @param {string} dir You can only use -N and +N. + * @return {string[]} Returns an array of paths in the stack. + */ + export function popd(dir: string): string[]; + + /** + * When no arguments are given, popd removes the top directory from the stack and performs a cd to the new top directory. The elements are numbered from 0 starting at the first directory listed with dirs; i.e., popd is equivalent to popd +0. Returns an array of paths in the stack. + * @param {string} options Available options: -n (Suppresses the normal change of directory when removing directories from the stack, so that only the stack is manipulated) + * @param {"+N"} dir Removes the Nth directory (counting from the left of the list printed by dirs), starting with zero. + * @return {string[]} Returns an array of paths in the stack. + */ + export function popd(options: string, dir: "+N"): string[]; + + /** + * When no arguments are given, popd removes the top directory from the stack and performs a cd to the new top directory. The elements are numbered from 0 starting at the first directory listed with dirs; i.e., popd is equivalent to popd +0. Returns an array of paths in the stack. + * @param {string} options Available options: -n (Suppresses the normal change of directory when removing directories from the stack, so that only the stack is manipulated) + * @param {"-N"} dir Removes the Nth directory (counting from the right of the list printed by dirs), starting with zero. + * @return {string[]} Returns an array of paths in the stack. + */ + export function popd(options: string, dir: "-N"): string[]; + + /** + * When no arguments are given, popd removes the top directory from the stack and performs a cd to the new top directory. The elements are numbered from 0 starting at the first directory listed with dirs; i.e., popd is equivalent to popd +0. Returns an array of paths in the stack. + * @param {string} options Available options: -n (Suppresses the normal change of directory when removing directories from the stack, so that only the stack is manipulated) + * @param {string} dir You can only use -N and +N. + * @return {string[]} Returns an array of paths in the stack. + */ + export function popd(options: string, dir: string): string[]; + + /** + * Clears the directory stack by deleting all of the elements. + * @param {"-c"} options Clears the directory stack by deleting all of the elements. + * @return {string[]} Returns an array of paths in the stack, or a single path if +N or -N was specified. + */ + export function dirs(options: "-c"): string[]; + + /** + * Display the list of currently remembered directories. Returns an array of paths in the stack, or a single path if +N or -N was specified. + * @param {"+N"} options Displays the Nth directory (counting from the left of the list printed by dirs when invoked without options), starting with zero. + * @return {string[]} Returns an array of paths in the stack, or a single path if +N or -N was specified. + */ + export function dirs(options: "+N"): string; + + /** + * Display the list of currently remembered directories. Returns an array of paths in the stack, or a single path if +N or -N was specified. + * @param {"-N"} options Displays the Nth directory (counting from the right of the list printed by dirs when invoked without options), starting with zero. + * @return {string[]} Returns an array of paths in the stack, or a single path if +N or -N was specified. + */ + export function dirs(options: "-N"): string; + + /** + * Display the list of currently remembered directories. Returns an array of paths in the stack, or a single path if +N or -N was specified. + * @param {string} options Available options: -c, -N, +N. You can only use those. + * @return {any} Returns an array of paths in the stack, or a single path if +N or -N was specified. + */ + export function dirs(options: string): any; + + /** + * Links source to dest. Use -f to force the link, should dest already exist. + * @param {string} source The source. + * @param {string} dest The destination. + */ + export function ln(source: string, dest: string): void; + + /** + * Links source to dest. Use -f to force the link, should dest already exist. + * @param {string} options Available options: s (symlink), f (force) + * @param {string} source The source. + * @param {string} dest The destination. + */ + export function ln(options: string, source: string, dest: string): void; + + /** + * Exits the current process with the given exit code. + * @param {number} code The exit code. + */ + export function exit(code: number): void; + + /** + * Object containing environment variables (both getter and setter). Shortcut to process.env. + */ + export var env: { [key: string]: string }; + + /** + * Executes the given command synchronously. + * @param {string} command The command to execute. + * @return {ExecOutputReturnValue} Returns an object containing the return code and output as string. + */ + export function exec(command: string): ExecOutputReturnValue; + /** + * Executes the given command synchronously. + * @param {string} command The command to execute. + * @param {ExecOptions} options Silence and synchronous options. + * @return {ExecOutputReturnValue | child.ChildProcess} Returns an object containing the return code and output as string, or if {async:true} was passed, a ChildProcess. + */ + export function exec(command: string, options: ExecOptions): ExecOutputReturnValue | child.ChildProcess; + /** + * Executes the given command synchronously. + * @param {string} command The command to execute. + * @param {ExecOptions} options Silence and synchronous options. + * @param {ExecCallback} callback Receives code and output asynchronously. + */ + export function exec(command: string, options: ExecOptions, callback: ExecCallback): child.ChildProcess; + /** + * Executes the given command synchronously. + * @param {string} command The command to execute. + * @param {ExecCallback} callback Receives code and output asynchronously. + */ + export function exec(command: string, callback: ExecCallback): child.ChildProcess; + + export interface ExecCallback { + (code: number, output: string, error?: string): any; + } + + export interface ExecOptions { + silent?: boolean; + async?: boolean; + } + + export interface ExecOutputReturnValue + { + code: number; + output: string; + } + + /** + * Alters the permissions of a file or directory by either specifying the absolute permissions in octal form or expressing the changes in symbols. This command tries to mimic the POSIX behavior as much as possible. Notable exceptions: + * - In symbolic modes, 'a-r' and '-r' are identical. No consideration is given to the umask. + * - There is no "quiet" option since default behavior is to run silent. + * @param {number} octalMode The access mode. Octal. + * @param {string} file The file to use. + */ + export function chmod(octalMode: number, file: string): void; + + /** + * Alters the permissions of a file or directory by either specifying the absolute permissions in octal form or expressing the changes in symbols. This command tries to mimic the POSIX behavior as much as possible. Notable exceptions: + * - In symbolic modes, 'a-r' and '-r' are identical. No consideration is given to the umask. + * - There is no "quiet" option since default behavior is to run silent. + * @param {string} mode The access mode. Can be an octal string or a symbolic mode string. + * @param {string} file The file to use. + */ + export function chmod(mode: string, file: string): void; + + // Non-Unix commands + + /** + * Searches and returns string containing a writeable, platform-dependent temporary directory. Follows Python's tempfile algorithm. + * @return {string} The temp file path. + */ + export function tempdir(): string; + + /** + * Tests if error occurred in the last command. + * @return {string} Returns null if no error occurred, otherwise returns string explaining the error + */ + export function error(): string; + + + + export function touch(...files: string[]): void; + export function touch(files: string[]): void; + + type TouchOptionsLiteral = "-a" | "-c" | "-m" | "-d" | "-r"; + + export function touch(options: TouchOptionsLiteral, ...files: string[]): void; + export function touch(options: TouchOptionsLiteral, files: string[]): void; + + /** + * Update the access and modification times of each FILE to the current time. A FILE argument that does not exist is created empty, unless -c is supplied + */ + type touchOptionsArray = { + '-d'?: string; + '-r'?: string; + }; + + export function touch(options: touchOptionsArray, ...files: string[]): void; + export function touch(options: touchOptionsArray, files: string[]): void; + + // Configuration + + interface ShellConfig + { + /** + * Suppresses all command output if true, except for echo() calls. Default is false. + * @type {boolean} + */ + silent: boolean; + + /** + * If true the script will die on errors. Default is false. + * @type {boolean} + */ + fatal: boolean; + } + + /** + * The shelljs configuration. + * @type {ShellConfig} + */ + export var config: ShellConfig; +} diff --git a/typings/tsd.d.ts b/typings/tsd.d.ts index 805f316b..5e1b4d3d 100644 --- a/typings/tsd.d.ts +++ b/typings/tsd.d.ts @@ -1,4 +1,17 @@ /// /// -/// /// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// diff --git a/typings/validator/validator.d.ts b/typings/validator/validator.d.ts new file mode 100644 index 00000000..02e8eba7 --- /dev/null +++ b/typings/validator/validator.d.ts @@ -0,0 +1,315 @@ +// Type definitions for validator.js v5.7.0 +// Project: https://github.com/chriso/validator.js +// Definitions by: tgfjt , Ilya Mochalov , Ayman Nedjmeddine , Louy Alakkad +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace ValidatorJS { + type AlphaLocale = "ar" | "ar-AE" | "ar-BH" | "ar-DZ" | "ar-EG" | "ar-IQ" | "ar-JO" | "ar-KW" | "ar-LB" | "ar-LY" | "ar-MA" | "ar-QA" | "ar-QM" | "ar-SA" | "ar-SD" | "ar-SY" | "ar-TN" | "ar-YE" | "cs-CZ" | "de-DE" | "en-AU" | "en-GB" | "en-HK" | "en-IN" | "en-NZ" | "en-US" | "en-ZA" | "en-ZM" | "es-ES" | "fr-FR" | "hu-HU" | "nl-NL" | "pl-PL" | "pt-BR" | "pt-PT" | "ru-RU" | "sr-RS" | "sr-RS@latin" | "tr-TR"; + type AlphanumericLocale = "ar" | "ar-AE" | "ar-BH" | "ar-DZ" | "ar-EG" | "ar-IQ" | "ar-JO" | "ar-KW" | "ar-LB" | "ar-LY" | "ar-MA" | "ar-QA" | "ar-QM" | "ar-SA" | "ar-SD" | "ar-SY" | "ar-TN" | "ar-YE" | "cs-CZ" | "de-DE" | "en-AU" | "en-GB" | "en-HK" | "en-IN" | "en-NZ" | "en-US" | "en-ZA" | "en-ZM" | "es-ES" | "fr-FR" | "fr-BE" | "hu-HU" | "nl-BE" | "nl-NL" | "pl-PL" | "pt-BR" | "pt-PT" | "ru-RU" | "sr-RS" | "sr-RS@latin" | "tr-TR"; + type MobilePhoneLocale = "ar-DZ" | "ar-SA" | "ar-SY" | "cs-CZ" | "de-DE" | "da-DK" | "el-GR" | "en-AU" | "en-GB" | "en-HK" | "en-IN" | "en-NZ" | "en-US" | "en-CA" | "en-ZA" | "en-ZM" | "es-ES" | "fi-FI" | "fr-FR" | "hu-HU" | "it-IT" | "ja-JP" | "ms-MY" | "nb-NO" | "nn-NO" | "pl-PL" | "pt-PT" | "ru-RU" | "sr-RS" | "tr-TR" | "vi-VN" | "zh-CN" | "zh-TW" + + interface ValidatorStatic { + + // ************** + // * Validators * + // ************** + + // check if the string contains the seed. + contains(str: string, elem: any): boolean; + + // check if the string matches the comparison. + equals(str: string, comparison: string): boolean; + + // check if the string is a date that's after the specified date (defaults to now). + isAfter(str: string, date?: string): boolean; + + // check if the string contains only letters (a-zA-Z). Locale is one of ['ar', 'ar-AE', 'ar-BH', 'ar-DZ', 'ar-EG', + // 'ar-IQ', 'ar-JO', 'ar-KW', 'ar-LB', 'ar-LY', 'ar-MA', 'ar-QA', 'ar-QM', 'ar-SA', 'ar-SD', 'ar-SY', 'ar-TN', 'ar-YE', + // 'cs-CZ', 'de-DE', 'en-AU', 'en-GB', 'en-HK', 'en-IN', 'en-NZ', 'en-US', 'en-ZA', 'en-ZM', 'es-ES', 'fr-FR', 'hu-HU', + // 'nl-NL', 'pl-PL', 'pt-BR', 'pt-PT', 'ru-RU', 'sr-RS', 'sr-RS@latin', 'tr-TR']) and defaults to en-US + isAlpha(str: string, locale?: AlphaLocale): boolean; + + // check if the string contains only letters and numbers. Locale is one of ['ar', 'ar-AE', 'ar-BH', 'ar-DZ', 'ar-EG', + // 'ar-IQ', 'ar-JO', 'ar-KW', 'ar-LB', 'ar-LY', 'ar-MA', 'ar-QA', 'ar-QM', 'ar-SA', 'ar-SD', 'ar-SY', 'ar-TN', 'ar-YE', + // 'cs-CZ', 'de-DE', 'en-AU', 'en-GB', 'en-HK', 'en-IN', 'en-NZ', 'en-US', 'en-ZA', 'en-ZM', 'es-ES', 'fr-FR', 'hu-HU', + // 'nl-NL', 'pl-PL', 'pt-BR', 'pt-PT', 'ru-RU', 'sr-RS', 'sr-RS@latin', 'tr-TR']) and defaults to en-US + isAlphanumeric(str: string, locale?: AlphanumericLocale): boolean; + + // check if the string contains ASCII chars only. + isAscii(str: string): boolean; + + // check if a string is base64 encoded. + isBase64(str: string): boolean; + + // check if the string is a date that's before the specified date. + isBefore(str: string, date?: string): boolean; + + // check if a string is a boolean. + isBoolean(str: string): boolean; + + // check if the string's length (in bytes) falls in a range. + isByteLength(str: string, options: IsByteLengthOptions): boolean; + isByteLength(str: string, min: number, max?: number): boolean; + + // check if the string is a credit card. + isCreditCard(str: string): boolean; + + // check if the string is a valid currency amount. + isCurrency(str: string, options?: IsCurrencyOptions): boolean; + + // check if the string is a data uri format (https://developer.mozilla.org/en-US/docs/Web/HTTP/data_URIs) + isDataURI(str: string): boolean; + + // check if the string is a date. + isDate(str: string): boolean; + + // check if the string represents a decimal number, such as 0.1, .3, 1.1, 1.00003, 4.0, etc. + isDecimal(str: string): boolean; + + // check if the string is a number that's divisible by another. + isDivisibleBy(str: string, number: number): boolean; + + // check if the string is an email. + isEmail(str: string, options?: IsEmailOptions): boolean; + + // check if the string is a fully qualified domain name (e.g. domain.com). + isFQDN(str: string, options?: IsFQDNOptions): boolean; + + // check if the string is a float. + isFloat(str: string, options?: IsFloatOptions): boolean; + + // check if the string contains any full-width chars. + isFullWidth(str: string): boolean; + + // check if the string contains any half-width chars. + isHalfWidth(str: string): boolean; + + // check if the string is a hexadecimal color. + isHexColor(str: string): boolean; + + // check if the string is a hexadecimal number. + isHexadecimal(str: string): boolean; + + // check if the string is an IP (version 4 or 6). + isIP(str: string, version?: number): boolean; + + // check if the string is an ISBN (version 10 or 13). + isISBN(str: string, version?: number): boolean; + + // check if the string is an ISIN (https://en.wikipedia.org/wiki/International_Securities_Identification_Number) + // (stock/security identifier). + isISIN(str: string): boolean; + + // check if the string is a valid ISO 8601 (https://en.wikipedia.org/wiki/ISO_8601) date. + isISO8601(str: string): boolean; + + // check if the string is in a array of allowed values. + isIn(str: string, values: any[]): boolean; + + // check if the string is an integer. + isInt(str: string, options?: IsIntOptions): boolean; + + // check if the string is valid JSON (note: uses JSON.parse). + isJSON(str: string): boolean; + + // check if the string's length falls in a range. + // Note: this function takes into account surrogate pairs. + isLength(str: string, options: IsLengthOptions): boolean; + isLength(str: string, min: number, max?: number): boolean; + + // check if the string is lowercase. + isLowercase(str: string): boolean; + + // check if the string is a MAC address. + isMACAddress(str: string): boolean; + + // check if the string is a MD5 hash. + isMD5(str: string): boolean; + + // check if the string is a mobile phone number, (locale is one of + // ['ar-DZ', 'ar-SA', 'ar-SY', 'cs-CZ', 'de-DE', 'da-DK', 'el-GR', 'en-AU', 'en-GB', 'en-HK', + // 'en-IN', 'en-NZ', 'en-US', 'en-CA', 'en-ZA', 'en-ZM', 'es-ES', 'fi-FI', 'fr-FR', 'hu-HU', + // 'it-IT', 'ja-JP', 'ms-MY', 'nb-NO', 'nn-NO', 'pl-PL', 'pt-PT', 'ru-RU', 'sr-RS', 'tr-TR', + // 'vi-VN', 'zh-CN', 'zh-TW']). + isMobilePhone(str: string, locale: MobilePhoneLocale): boolean; + + // check if the string is a valid hex-encoded representation of a MongoDB ObjectId + // (http://docs.mongodb.org/manual/reference/object-id/). + isMongoId(str: string): boolean; + + // check if the string contains one or more multibyte chars. + isMultibyte(str: string): boolean; + + // check if the string is null. + isNull(str: string): boolean; + + // check if the string contains only numbers. + isNumeric(str: string): boolean; + + // check if the string contains any surrogate pairs chars. + isSurrogatePair(str: string): boolean; + + // check if the string is an URL. + isURL(str: string, options?: IsURLOptions): boolean; + + // check if the string is a UUID. Must be one of ['3', '4', '5', 'all'], default is all. + isUUID(str: string, version?: string | number): boolean; + + // check if the string is uppercase. + isUppercase(str: string): boolean; + + // check if the string contains a mixture of full and half-width chars. + isVariableWidth(str: string): boolean; + + // checks characters if they appear in the whitelist. + isWhitelisted(str: string, chars: string | string[]): boolean; + + // check if string matches the pattern. + matches(str: string, pattern: RegExp | string, modifiers?: string): boolean; + + // ************** + // * Sanitizers * + // ************** + + // remove characters that appear in the blacklist. The characters are used in a RegExp and so you will need + // to escape some chars, e.g. blacklist(input, '\\[\\]'). + blacklist(input: string, chars: string): string; + + // replace <, >, &, ', " and / with HTML entities. + escape(input: string): string; + + // replaces HTML encoded entities with <, >, &, ', " and /. + unescape(input: string): string; + + // trim characters from the left-side of the input. + ltrim(input: string, chars?: string): string; + + // canonicalize an email address. + normalizeEmail(email: string, options?: NormalizeEmailOptions): string; + + // trim characters from the right-side of the input. + rtrim(input: string, chars?: string): string; + + // remove characters with a numerical value < 32 and 127, mostly control characters. If keep_new_lines is true, + // newline characters are preserved (\n and \r, hex 0xA and 0xD). Unicode-safe in JavaScript. + stripLow(input: string, keep_new_lines?: boolean): string; + + // convert the input to a boolean. Everything except for '0', 'false' and '' returns true. In strict mode only '1' + // and 'true' return true. + toBoolean(input: string, strict?: boolean): boolean; + + // convert the input to a date, or null if the input is not a date. + toDate(input: string): Date; // Date or null + + // convert the input to a float, or NaN if the input is not a float. + toFloat(input: string): number; // number or NaN + + // convert the input to an integer, or NaN if the input is not an integer. + toInt(input: string, radix?: number): number; // number or NaN + + // trim characters (whitespace by default) from both sides of the input. + trim(input: string, chars?: string): string; + + // remove characters that do not appear in the whitelist. The characters are used in a RegExp and so you will + // need to escape some chars, e.g. whitelist(input, '\\[\\]'). + whitelist(input: string, chars: string): string; + + toString(input: any | any[]): string; + + version: string; + + // ************** + // * Extensions * + // ************** + + // add your own validators. + // Note: that the first argument will be automatically coerced to a string. + extend(name: string, fn: T): void; + } + + // options for IsByteLength + interface IsByteLengthOptions { + min?: number; + max?: number; + } + + // options for IsCurrency + interface IsCurrencyOptions { + symbol?: string; + require_symbol?: boolean; + allow_space_after_symbol?: boolean; + symbol_after_digits?: boolean; + allow_negatives?: boolean; + parens_for_negatives?: boolean; + negative_sign_before_digits?: boolean; + negative_sign_after_digits?: boolean; + allow_negative_sign_placeholder?: boolean; + thousands_separator?: string; + decimal_separator?: string; + allow_space_after_digits?: boolean; + } + + // options for isEmail + interface IsEmailOptions { + allow_display_name?: boolean; + allow_utf8_local_part?: boolean; + require_tld?: boolean; + } + + // options for isFQDN + interface IsFQDNOptions { + require_tld?: boolean; + allow_underscores?: boolean; + allow_trailing_dot?: boolean; + } + + // options for IsFloat + interface IsFloatOptions { + min?: number; + max?: number; + } + + // options for IsInt + interface IsIntOptions { + min?: number; + max?: number; + } + + // options for IsLength + interface IsLengthOptions { + min?: number; + max?: number; + } + + // options for isURL + interface IsURLOptions { + protocols?: string[]; + require_tld?: boolean; + require_protocol?: boolean; + require_host: boolean; + require_valid_protocol?: boolean; + allow_underscores?: boolean; + host_whitelist?: (string | RegExp)[]; + host_blacklist?: (string | RegExp)[]; + allow_trailing_dot?: boolean; + allow_protocol_relative_urls?: boolean; + } + + // options for normalizeEmail + interface NormalizeEmailOptions { + lowercase?: boolean; + remove_dots?: boolean; + remove_extension?: boolean; + } +} + +declare module "validator" { + const validator: ValidatorJS.ValidatorStatic; + export = validator; +} + +// deprecated interfaces for backward compatibility, please use ValidatorJS.* instead the ones +interface IValidatorStatic extends ValidatorJS.ValidatorStatic { } +interface IURLoptions extends ValidatorJS.IsURLOptions { } +interface IFQDNoptions extends ValidatorJS.IsFQDNOptions { } +interface IEmailoptions extends ValidatorJS.NormalizeEmailOptions { } diff --git a/typings/winreg/winreg.d.ts b/typings/winreg/winreg.d.ts new file mode 100644 index 00000000..3860bc23 --- /dev/null +++ b/typings/winreg/winreg.d.ts @@ -0,0 +1,338 @@ +// Type definitions for Winreg v1.2.0 +// Project: http://fresc81.github.io/node-winreg/ +// Definitions by: RX14 , BobBuehler +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare var Winreg: WinregStatic; + +interface WinregStatic { + /** + * Creates a registry object, which provides access to a single registry key. + * Note: This class is returned by a call to ```require('winreg')```. + * + * @public + * @class + * + * @param {@link Options} options - the options + * + * @example + * var Registry = require('winreg') + * , autoStartCurrentUser = new Registry({ + * hive: Registry.HKCU, + * key: '\\Software\\Microsoft\\Windows\\CurrentVersion\\Run' + * }); + */ + new (options: Winreg.Options): Winreg.Registry; + + /** + * Registry hive key HKEY_LOCAL_MACHINE. + * Note: For writing to this hive your program has to run with admin privileges. + */ + HKLM: string; + + /** + * Registry hive key HKEY_CURRENT_USER. + */ + HKCU: string; + + /** + * Registry hive key HKEY_CLASSES_ROOT. + * Note: For writing to this hive your program has to run with admin privileges. + */ + HKCR: string; + + /** + * Registry hive key HKEY_USERS. + * Note: For writing to this hive your program has to run with admin privileges. + */ + HKU: string; + + /** + * Registry hive key HKEY_CURRENT_CONFIG. + * Note: For writing to this hive your program has to run with admin privileges. + */ + HKCC: string; + + /** + * Collection of available registry hive keys. + */ + HIVES: Array; + + /** + * Registry value type STRING. + * + * Values of this type contain a string. + */ + REG_SZ: string; + + /** + * Registry value type MULTILINE_STRING. + * + * Values of this type contain a multiline string. + */ + REG_MULTI_SZ: string; + + /** + * Registry value type EXPANDABLE_STRING. + * + * Values of this type contain an expandable string. + */ + REG_EXPAND_SZ: string; + + /** + * Registry value type DOUBLE_WORD. + * + * Values of this type contain a double word (32 bit integer). + */ + REG_DWORD: string; + + /** + * Registry value type QUAD_WORD. + * + * Values of this type contain a quad word (64 bit integer). + */ + REG_QWORD: string; + + /** + * Registry value type BINARY. + * + * Values of this type contain a binary value. + */ + REG_BINARY: string; + + /** + * Registry value type UNKNOWN. + * + * Values of this type contain a value of an unknown type. + */ + REG_NONE: string; + + /** + * Collection of available registry value types. + */ + REG_TYPES: Array; + + /** + * The name of the default value. May be used instead of the empty string literal for better readability. + */ + DEFAULT_VALUE: string; +} + +declare namespace Winreg { + export interface Options { + /** + * Optional hostname, must start with '\\' sequence. + */ + host?: string; + + /** + * Optional hive ID, default is HKLM. + */ + hive?: string; + + /** + * Optional key, default is the root key. + */ + key?: string; + + /** + * Optional registry hive architecture ('x86' or 'x64'; only valid on Windows 64 Bit Operating Systems). + */ + arch?: string; + } + + /** + * A registry object, which provides access to a single registry key. + */ + export interface Registry { + /** + * The hostname. + * @readonly + */ + host: string; + + /** + * The hive id. + * @readonly + */ + hive: string; + + /** + * The registry key name. + * @readonly + */ + key: string; + + /** + * The full path to the registry key. + * @readonly + */ + path: string; + + /** + * The registry hive architecture ('x86' or 'x64'). + * @readonly + */ + arch: string; + + /** + * Creates a new {@link Registry} instance that points to the parent registry key. + * @readonly + */ + parent: Registry; + + /** + * Retrieve all values from this registry key. + * @param {valuesCallback} cb - callback function + * @param {error=} cb.err - error object or null if successful + * @param {array=} cb.items - an array of {@link RegistryItem} objects + * @returns {Registry} this registry key object + */ + values(cb: (err: Error, result: Array) => void): Registry; + + /** + * Retrieve all subkeys from this registry key. + * @param {function (err, items)} cb - callback function + * @param {error=} cb.err - error object or null if successful + * @param {array=} cb.items - an array of {@link Registry} objects + * @returns {Registry} this registry key object + */ + keys(cb: (err: Error, result: Array) => void): Registry; + + /** + * Gets a named value from this registry key. + * @param {string} name - the value name, use {@link Registry.DEFAULT_VALUE} or an empty string for the default value + * @param {function (err, item)} cb - callback function + * @param {error=} cb.err - error object or null if successful + * @param {RegistryItem=} cb.item - the retrieved registry item + * @returns {Registry} this registry key object + */ + get(name: string, cb: (err: Error, result: Winreg.RegistryItem) => void): Registry; + + /** + * Sets a named value in this registry key, overwriting an already existing value. + * @param {string} name - the value name, use {@link Registry.DEFAULT_VALUE} or an empty string for the default value + * @param {string} type - the value type + * @param {string} value - the value + * @param {function (err)} cb - callback function + * @param {error=} cb.err - error object or null if successful + * @returns {Registry} this registry key object + */ + set(name: string, type: string, value: string, cb: (err: Error) => void): Registry; + + /** + * Remove a named value from this registry key. If name is empty, sets the default value of this key. + * Note: This key must be already existing. + * @param {string} name - the value name, use {@link Registry.DEFAULT_VALUE} or an empty string for the default value + * @param {function (err)} cb - callback function + * @param {error=} cb.err - error object or null if successful + * @returns {Registry} this registry key object + */ + remove(name: string, cb: (err: Error) => void): Registry; + + /** + * Remove all subkeys and values (including the default value) from this registry key. + * @param {function (err)} cb - callback function + * @param {error=} cb.err - error object or null if successful + * @returns {Registry} this registry key object + */ + clear(cb: (err: Error) => void): Registry; + + /** + * Alias for the clear method to keep it backward compatible. + * @method + * @deprecated Use {@link Registry#clear} or {@link Registry#destroy} in favour of this method. + * @param {function (err)} cb - callback function + * @param {error=} cb.err - error object or null if successful + * @returns {Registry} this registry key object + */ + erase(cb: (err: Error) => void): Registry; + + /** + * Delete this key and all subkeys from the registry. + * @param {function (err)} cb - callback function + * @param {error=} cb.err - error object or null if successful + * @returns {Registry} this registry key object + */ + destroy(cb: (err: Error) => void): Registry; + + /** + * Create this registry key. Note that this is a no-op if the key already exists. + * @param {function (err)} cb - callback function + * @param {error=} cb.err - error object or null if successful + * @returns {Registry} this registry key object + */ + create(cb: (err: Error) => void): Registry; + + /** + * Checks if this key already exists. + * @param {function (err, exists)} cb - callback function + * @param {error=} cb.err - error object or null if successful + * @param {boolean=} cb.exists - true if a registry key with this name already exists + * @returns {Registry} this registry key object + */ + keyExists(cb: (err: Error, exists: boolean) => void): Registry; + + /** + * Checks if a value with the given name already exists within this key. + * @param {string} name - the value name, use {@link Registry.DEFAULT_VALUE} or an empty string for the default value + * @param {function (err, exists)} cb - callback function + * @param {error=} cb.err - error object or null if successful + * @param {boolean=} cb.exists - true if a value with the given name was found in this key + * @returns {Registry} this registry key object + */ + valueExists(name: string, cb: (err: Error, exists: boolean) => void): Registry; + } + + /** + * A single registry value record. + * Objects of this type are created internally and returned by methods of {@link Registry} objects. + */ + export interface RegistryItem { + /** + * The hostname. + * @readonly + */ + host: string; + + /** + * The hive id. + * @readonly + */ + hive: string; + + /** + * The registry key. + * @readonly + */ + key: string; + + /** + * The value name. + * @readonly + */ + name: string; + + /** + * The value type. + * @readonly + */ + type: string; + + /** + * The value. + * @readonly + */ + value: string; + + /** + * The hive architecture. + * @readonly + */ + arch: string; + } +} + +declare module "winreg" { + export = Winreg; +} diff --git a/typings/xml2js/xml2js.d.ts b/typings/xml2js/xml2js.d.ts new file mode 100644 index 00000000..5fb4542d --- /dev/null +++ b/typings/xml2js/xml2js.d.ts @@ -0,0 +1,99 @@ +// Type definitions for node-xml2js +// Project: https://github.com/Leonidas-from-XIV/node-xml2js +// Definitions by: Michel Salib , Jason McNeil , Christopher Currens +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare module 'xml2js' { + + export = xml2js; + + namespace xml2js { + function parseString(xml: string, callback: (err: any, result: any) => void): void; + function parseString(xml: string, options: Options, callback: (err: any, result: any) => void): void; + + var defaults: { + '0.1': Options; + '0.2': OptionsV2; + } + + class Builder { + constructor(options?: BuilderOptions); + buildObject(rootObj: any): string; + } + + class Parser { + constructor(options?: Options); + processAsync(): any; + assignOrPush(obj: any, key: string, newValue: any): any; + reset(): any; + parseString(str: string , cb?: Function): void; + } + + interface RenderOptions { + indent?: string; + newline?: string; + pretty?: boolean; + } + + interface XMLDeclarationOptions { + encoding?: string; + standalone?: boolean; + version?: string; + } + + interface BuilderOptions { + doctype?: any; + headless?: boolean; + indent?: string; + newline?: string; + pretty?: boolean; + renderOpts?: RenderOptions; + rootName?: string; + xmldec?: XMLDeclarationOptions; + } + + interface Options { + async?: boolean; + attrkey?: string; + attrNameProcessors?: [(name: string) => string]; + attrValueProcessors?: [(name: string) => string]; + charkey?: string; + charsAsChildren?: boolean; + childkey?: string; + emptyTag?: any; + explicitArray?: boolean; + explicitCharkey?: boolean; + explicitChildren?: boolean; + explicitRoot?: boolean; + ignoreAttrs?: boolean; + mergeAttrs?: boolean; + normalize?: boolean; + normalizeTags?: boolean; + strict?: boolean; + tagNameProcessors?: [(name: string) => string]; + trim?: boolean; + validator?: Function; + valueProcessors?: [(name: string) => string]; + xmlns?: boolean; + } + + interface OptionsV2 extends Options { + preserveChildrenOrder?: boolean; + rootName?: string; + xmldec?: { + version: string; + encoding?: string; + standalone?: boolean; + }; + doctype?: any; + renderOpts?: { + pretty?: boolean; + indent?: string; + newline?: string; + }; + headless?: boolean; + chunkSize?: number; + cdata?: boolean; + } + } +} From 830d077ddf71a2ace64e539e3208a89b1ad19d3f Mon Sep 17 00:00:00 2001 From: grawcho Date: Mon, 10 Oct 2016 19:22:42 +0300 Subject: [PATCH 087/235] remove resource create - replaced --- app/exec/extension/resources/create.ts | 47 -------------------------- 1 file changed, 47 deletions(-) delete mode 100644 app/exec/extension/resources/create.ts diff --git a/app/exec/extension/resources/create.ts b/app/exec/extension/resources/create.ts deleted file mode 100644 index 52166ea9..00000000 --- a/app/exec/extension/resources/create.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { Merger } from "../_lib/merger"; -import { TfCommand } from "../../../lib/tfcommand"; -import { VsixWriter } from "../_lib/vsix-writer"; -import * as Loc from "../_lib/loc"; -import colors = require("colors"); -import extBase = require("../default"); -import trace = require('../../../lib/trace'); - -export function getCommand(args: string[]): TfCommand { - return new GenerateExtensionResources(args); -} - -export interface GenResourcesResult { - resjsonPath: string; -} - -export class GenerateExtensionResources extends extBase.ExtensionBase { - protected description = "Create a vsix package for an extension."; - - constructor(passedArgs: string[]) { - super(passedArgs, false); - } - - protected getHelpArgs(): string[] { - return ["root", "manifests", "manifestGlobs", "override", "overridesFile", "revVersion", "bypassValidation", "publisher", "extensionId", "outputPath", "locRoot"]; - } - - public exec(): Promise { - return this.getMergeSettings().then(mergeSettings => { - return this.getPackageSettings().then(packageSettings => { - return new Merger(mergeSettings).merge().then(components => { - const writer = new VsixWriter(packageSettings, components); - const resjsonPath = writer.getOutputPath(packageSettings.outputPath, "resjson"); - Loc.LocPrep.writeResourceFile(resjsonPath, components.resources.combined); - return { - resjsonPath: writer.getOutputPath(packageSettings.outputPath, "resjson") - }; - }); - }); - }); - } - - protected friendlyOutput(data: GenResourcesResult): void { - trace.info(colors.green("\n=== Completed operation: generate extension resources ===")); - trace.info(" - .resjson: %s", data.resjsonPath); - } -} \ No newline at end of file From dc5b79b5ae99e9a83a01f4bc2791cef74dcbd9cf Mon Sep 17 00:00:00 2001 From: grawcho Date: Tue, 11 Oct 2016 12:44:56 +0300 Subject: [PATCH 088/235] add manual installation instructions for developers --- README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/README.md b/README.md index 78162658..5aafbc56 100644 --- a/README.md +++ b/README.md @@ -124,3 +124,27 @@ We take contributions and fixes via Pull Request. [Read here](docs/contributions ## Code of Conduct This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. + +## Manual installation (from sources) +refer to installation for your OS +clone the repository +run: "npm run build" from the repository root +### Linux (bash) +```bash +sudo ln -s \app.js /usr/bin/tfx +``` +### windows +replace the content of `%appdata%\npm\tfx.cmd` with the following: +```bash +@IF EXIST "%~dp0\node.exe" ( + "%~dp0\node.exe" "%~dp0\node_modules\tfx-cli\_build\app.js" %* +) ELSE ( + @SETLOCAL + @SET PATHEXT=%PATHEXT:;.JS;=;% + node "%~dp0\node_modules\tfx-cli\_build\app.js" %* +) +``` +### additional node modules +```bash +npm install archiver colors graceful-fs gulp-filter gulp-mocha gulp-tsb gulp-util is-utf8 pug jszip node-uuid prompt q readable-stream ts-promise typescript unique-stream user-home validator vso-node-api xml2js del os-homedir copy-paste shelljs lodash minimatch@3.0.2 pretty-hrtime liftoff tildify interpret v8flags minimist onecolor winreg glob json-in-place mkdirp +``` From 0c04901a884c203d1fe6e2807928eaf48eb0c0a0 Mon Sep 17 00:00:00 2001 From: grawcho Date: Tue, 11 Oct 2016 12:50:08 +0300 Subject: [PATCH 089/235] add manual installation instructions for developers (fixes) --- README.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5aafbc56..886d4072 100644 --- a/README.md +++ b/README.md @@ -126,9 +126,14 @@ We take contributions and fixes via Pull Request. [Read here](docs/contributions This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. ## Manual installation (from sources) -refer to installation for your OS -clone the repository -run: "npm run build" from the repository root +* refer to installation for your OS (and follow the installation steps). +* clone the repository. +* to compile the sources run: +```bash +npm run build `(from the repository root)` +``` +`link the executable` + ### Linux (bash) ```bash sudo ln -s \app.js /usr/bin/tfx @@ -145,6 +150,7 @@ replace the content of `%appdata%\npm\tfx.cmd` with the following: ) ``` ### additional node modules +`install the following modules (this may need to happen befor compilation)` ```bash npm install archiver colors graceful-fs gulp-filter gulp-mocha gulp-tsb gulp-util is-utf8 pug jszip node-uuid prompt q readable-stream ts-promise typescript unique-stream user-home validator vso-node-api xml2js del os-homedir copy-paste shelljs lodash minimatch@3.0.2 pretty-hrtime liftoff tildify interpret v8flags minimist onecolor winreg glob json-in-place mkdirp ``` From a967b1205603a7d9a0f3124a0c59897e97dbc202 Mon Sep 17 00:00:00 2001 From: grawcho Date: Tue, 11 Oct 2016 21:03:25 +0300 Subject: [PATCH 090/235] add queue status options to build definitions and definitions task docs --- README.md | 1 + app/exec/build/definition.ts | 4 +- app/exec/build/definitions/queuestatus.ts | 69 ++++++++++ docs/definitions.md | 158 ++++++++++++++++++++++ 4 files changed, 230 insertions(+), 2 deletions(-) create mode 100644 app/exec/build/definitions/queuestatus.ts create mode 100644 docs/definitions.md diff --git a/README.md b/README.md index 886d4072..0a41055c 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,7 @@ tfx --help * `tfx build` ([builds](docs/builds.md)): Queue, view, and get details for builds * `tfx build tasks` ([build tasks](docs/buildtasks.md)): Create, list, upload and delete build tasks +* `tfx build definition` ([build definition/definitions](docs/definitions.md)): Create, manage, show, list, export, upload and delete build definitions * `tfx extension` ([extensions](docs/extensions.md)): Package, manage, publisher Team Foundation Server / Team Services extensions * `tfx workitem` ([work items](docs/workitems.md)): Create, query and view work items. diff --git a/app/exec/build/definition.ts b/app/exec/build/definition.ts index 1b3553a7..9ec83701 100644 --- a/app/exec/build/definition.ts +++ b/app/exec/build/definition.ts @@ -49,8 +49,8 @@ export class BuildDefinition extends buildBase.BuildBase { + protected description = "Manage a build definition queue status"; + + protected getHelpArgs(): string[] { + return ["project", "definitionId", "status"]; + } + + protected setCommandArgs(): void { + super.setCommandArgs(); + this.registerCommandArgument("definitionId", "Build Definition ID", "Identifies a build definition.", args.IntArgument, null); + this.registerCommandArgument("status", "Build Definition queue status", "definition queue status (enabled / paused / disabled).", args.StringArgument, null); + } + + public exec(): Promise { + var api = this.webApi.getBuildApi(this.connection.getCollectionUrl()); + + return Promise.all([ + this.commandArgs.project.val(), + this.commandArgs.definitionId.val(), + this.commandArgs.status.val(), + ]).then((values) => { + const [project, definitionId, status] = values; + return api.getDefinition(definitionId as number, project as string).then((definition) => { + var currentStatus = buildContracts.DefinitionQueueStatus[definition.queueStatus]; + if (!currentStatus){ + currentStatus = buildContracts.DefinitionQueueStatus[0] + } + trace.info("build definition %s (current status is: %s)", definition.name, currentStatus); + switch (status as string) + { + case "enable" : + definition.queueStatus = 0; + trace.info("setting definition %s to %s",definition.name, buildContracts.DefinitionQueueStatus[definition.queueStatus]) + break; + case "pause" : + definition.queueStatus = 1; + trace.info("setting definition %s to %s",definition.name, buildContracts.DefinitionQueueStatus[definition.queueStatus]) + break; + case "disable" : + definition.queueStatus = 2; + trace.info("setting definition %s to %s",definition.name, buildContracts.DefinitionQueueStatus[definition.queueStatus]) + break; + default : trace.error("queue status allowd values are: enable / pause / disable"); + } + return api.updateDefinition(definition,definition.id,definition.project.name); + }); + }); + } + + public friendlyOutput(data: buildContracts.BuildDefinition): void { + trace.println(); + trace.success('Build Definition %s %s successfully!',data.name, buildContracts.DefinitionQueueStatus[data.queueStatus]); + } +} \ No newline at end of file diff --git a/docs/definitions.md b/docs/definitions.md new file mode 100644 index 00000000..34d4172d --- /dev/null +++ b/docs/definitions.md @@ -0,0 +1,158 @@ +# Build definitions tasks + +You can queue, show, and list builds using tfx. + +## Queue Status + +Queues a build for a given project with a given definition. + +####Options +```txt +--project - Required. The name of the project to queue a build for. +AND +--definition-id - The id of the build definition to build against. +AND +--status - desired queue status (Enabled / Disabled / Paused). +``` + +####Example +```bash +~$ tfx build definitions queuestatus --project MyProject --definition-id 123 --status "paused" +build definition TestDefinition (current status is: Disabled) +setting definition TestDefinition to Paused + +Build Definition TestDefinition successfully! +``` + +## definition + +Shows information for a given build. + +####Options +```txt +--project - Required. The name of the project to queue a build for. +--id - Required. The id of the build to show. +``` + +####Example +```bash +$ tfx build definition --project MyProject --id 1 +Copyright Microsoft Corporation + + +name : TestDefinition +id : 1 +revision : 123 +Created Date : dd-mm-yyyy +Queue Status : Enabled +type : Build +url : https://:/MyProject>//_apis/build/Definitions/1 +``` + +## List + +Queries for a list of builds. + +####Options +```txt +--project - Required. The name of the project to queue a build for. +``` + +####Example +```bash +~$ tfx build definitions list + +Copyright Microsoft Corporation + +... + +id : 1 +name : TestDefinition +type : Build + +id : 2 +name : XamlTestDefinition +type : Xaml + +``` +## export + +export a build definition to Json file. + +####Options +```txt +--project Project name. +--definition-id Identifies a build definition. +--definition-path Local path to a Build Definition Json (default file name is --.json). +--overwrite Overwrite existing Build Definition Json. +--revision Get specific definition revision. + +``` + +####Example +```bash +~$ tfx build definitions export --project MyProject --definition-id 1 + +Copyright Microsoft Corporation +Build Definition 1 exported successfully + +``` +## update + +update a build definition from Json file. + +####Options +```txt +--project - Required, Project name. +--definition-id - Required, Identifies a build definition. +--definition-path - Required, Local path to a Build Definition. + +``` +####Example +```bash +~$ tfx build definitions update --project MyProject --definition-id 1 --definition-path ./TestDefinition-1-123.json +Copyright Microsoft Corporation + +id : 1 +name : TestDefinition +revision : 124 + +``` + +## create + +create a new Build definition from Json file. + +####Options +```txt +--project - Required, Project name. +--definition-path - Required, Local path to a Build Definition. +--name - Required, Name of the Build Definition. + +``` +###Example +```bash +~$ tfx build definitions create --project MyProject --definition-path ./TestDefinition-1-123.json --name NewBuildDefinition +Copyright Microsoft Corporation + +id : 2 +name : NewBuildDefinition +type : Build + +``` +## delete + +delete a build definition. + +#### Options +```txt +--project - Required, Project name. +--definition-id - Required, Identifies a build definition. + +####Example +```bash +~$ tfx build definitions delete --project MyProject --definition-id 2 +Copyright Microsoft Corporation + +Build Definition 2 deleted successfully! +``` \ No newline at end of file From 3530c8296e390516a53147b8eacb7d00a04e2534 Mon Sep 17 00:00:00 2001 From: grawcho Date: Tue, 11 Oct 2016 21:10:39 +0300 Subject: [PATCH 091/235] fix typoes in definitions docs.md --- docs/definitions.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/definitions.md b/docs/definitions.md index 34d4172d..8e7fa0dd 100644 --- a/docs/definitions.md +++ b/docs/definitions.md @@ -21,7 +21,7 @@ AND build definition TestDefinition (current status is: Disabled) setting definition TestDefinition to Paused -Build Definition TestDefinition successfully! +Build Definition TestDefinition Paused successfully! ``` ## definition @@ -130,7 +130,7 @@ create a new Build definition from Json file. --name - Required, Name of the Build Definition. ``` -###Example +####Example ```bash ~$ tfx build definitions create --project MyProject --definition-path ./TestDefinition-1-123.json --name NewBuildDefinition Copyright Microsoft Corporation @@ -144,10 +144,11 @@ type : Build delete a build definition. -#### Options +####Options ```txt --project - Required, Project name. --definition-id - Required, Identifies a build definition. +``` ####Example ```bash From 2aef932c52ed640634b2a47449fd1b2e19fe1756 Mon Sep 17 00:00:00 2001 From: sfeldman Date: Sun, 30 Oct 2016 10:21:45 +0200 Subject: [PATCH 092/235] upstream sync 0.3.38 --- .vscode/settings.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index e8fd1ee8..4aa8b9b2 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -7,5 +7,6 @@ "**/.DS_Store": true, "tmp/": true }, - "editor.insertSpaces": false + "editor.insertSpaces": false, + "typescript.check.workspaceVersion": false } \ No newline at end of file From 5498a4e47f891d558df14acc56d11c317e670cc7 Mon Sep 17 00:00:00 2001 From: grawcho Date: Tue, 15 Nov 2016 12:27:34 +0200 Subject: [PATCH 093/235] fix compilation command (missing serverCommand definition from upstream) --- app/exec/build/definitions/create.ts | 1 + app/exec/build/definitions/default.ts | 1 + app/exec/build/definitions/delete.ts | 1 + app/exec/build/definitions/export.ts | 1 + app/exec/build/definitions/list.ts | 2 +- app/exec/build/definitions/queuestatus.ts | 1 + app/exec/build/definitions/update.ts | 2 +- app/exec/build/tasks/default.ts | 2 ++ app/exec/build/templates/default.ts | 1 + app/exec/build/templates/export.ts | 1 + app/exec/build/templates/list.ts | 2 +- 11 files changed, 12 insertions(+), 3 deletions(-) diff --git a/app/exec/build/definitions/create.ts b/app/exec/build/definitions/create.ts index 7182b413..0c92b927 100644 --- a/app/exec/build/definitions/create.ts +++ b/app/exec/build/definitions/create.ts @@ -14,6 +14,7 @@ export interface CreateDefinitionArguments extends CoreArguments { } export class CreateDefinition extends TfCommand { + protected serverCommand = false; protected description = "Create a build definition"; protected getHelpArgs(): string[] { diff --git a/app/exec/build/definitions/default.ts b/app/exec/build/definitions/default.ts index 568428cd..4d1d0b7e 100644 --- a/app/exec/build/definitions/default.ts +++ b/app/exec/build/definitions/default.ts @@ -5,6 +5,7 @@ export function getCommand(args: string[]): HelpCommand { } export class HelpCommand extends TfCommand { + protected serverCommand = false; protected description = "Commands for managing Build Definitions."; protected setCommandArgs(): void { diff --git a/app/exec/build/definitions/delete.ts b/app/exec/build/definitions/delete.ts index 8d234c30..29bf3df6 100644 --- a/app/exec/build/definitions/delete.ts +++ b/app/exec/build/definitions/delete.ts @@ -13,6 +13,7 @@ export interface DeleteDefinitionArguments extends CoreArguments { } export class DeleteDefinition extends TfCommand { + protected serverCommand = false; protected description = "Delete a build definition"; protected getHelpArgs(): string[] { diff --git a/app/exec/build/definitions/export.ts b/app/exec/build/definitions/export.ts index e74dada9..6f90f18a 100644 --- a/app/exec/build/definitions/export.ts +++ b/app/exec/build/definitions/export.ts @@ -16,6 +16,7 @@ export interface ExportDefinitionArguments extends CoreArguments { } export class ExportDefinition extends TfCommand { + protected serverCommand = false; protected description = "Export a build definition to a local file"; protected getHelpArgs(): string[] { diff --git a/app/exec/build/definitions/list.ts b/app/exec/build/definitions/list.ts index 58aba698..61fe80ca 100644 --- a/app/exec/build/definitions/list.ts +++ b/app/exec/build/definitions/list.ts @@ -8,7 +8,7 @@ export function getCommand(args: string[]): ListDefinitions { } export class ListDefinitions extends TfCommand { - + protected serverCommand = false; protected description = "Get a list of build definitions"; protected getHelpArgs(): string[] { diff --git a/app/exec/build/definitions/queuestatus.ts b/app/exec/build/definitions/queuestatus.ts index 11b05825..8a8abd1d 100644 --- a/app/exec/build/definitions/queuestatus.ts +++ b/app/exec/build/definitions/queuestatus.ts @@ -14,6 +14,7 @@ export interface DefinitionQueueStatusArguments extends CoreArguments { } export class DefinitionQueueStatus extends TfCommand { + protected serverCommand = false; protected description = "Manage a build definition queue status"; protected getHelpArgs(): string[] { diff --git a/app/exec/build/definitions/update.ts b/app/exec/build/definitions/update.ts index 1117d585..57b64104 100644 --- a/app/exec/build/definitions/update.ts +++ b/app/exec/build/definitions/update.ts @@ -14,8 +14,8 @@ export interface UpdateDefinitionArguments extends CoreArguments { } export class UpdateDefinition extends TfCommand { + protected serverCommand = false; protected description = "Update build definition"; - protected getHelpArgs(): string[] { return ["project", "definitionId", "definitionPath"]; } diff --git a/app/exec/build/tasks/default.ts b/app/exec/build/tasks/default.ts index 40690027..d23b21d9 100644 --- a/app/exec/build/tasks/default.ts +++ b/app/exec/build/tasks/default.ts @@ -2,6 +2,7 @@ import { TfCommand, CoreArguments } from "../../../lib/tfcommand"; import args = require("../../../lib/arguments"); import buildBase = require("../default"); + export interface TaskArguments extends buildBase.BuildArguments { all: args.BooleanArgument; taskId: args.StringArgument; @@ -23,6 +24,7 @@ export function getCommand(args: string[]): BuildTaskBase { export class BuildTaskBase extends buildBase.BuildBase { protected description = "Commands for managing Build Tasks."; + protected serverCommand = false; protected setCommandArgs(): void { super.setCommandArgs(); diff --git a/app/exec/build/templates/default.ts b/app/exec/build/templates/default.ts index 0967a098..bfa3bb85 100644 --- a/app/exec/build/templates/default.ts +++ b/app/exec/build/templates/default.ts @@ -5,6 +5,7 @@ export function getCommand(args: string[]): HelpCommand { } export class HelpCommand extends TfCommand { + protected serverCommand = false; protected description = "Commands for managing Build templates."; protected setCommandArgs(): void { diff --git a/app/exec/build/templates/export.ts b/app/exec/build/templates/export.ts index 7efa4c6f..05536c06 100644 --- a/app/exec/build/templates/export.ts +++ b/app/exec/build/templates/export.ts @@ -15,6 +15,7 @@ export interface ExportTemplateArguments extends CoreArguments { } export class ExportTemplate extends TfCommand { + protected serverCommand = false; protected description = "Export a build template to a local file"; protected getHelpArgs(): string[] { diff --git a/app/exec/build/templates/list.ts b/app/exec/build/templates/list.ts index ee560cb2..c32d8777 100644 --- a/app/exec/build/templates/list.ts +++ b/app/exec/build/templates/list.ts @@ -9,7 +9,7 @@ export function getCommand(args: string[]): ListTemplates { } export class ListTemplates extends TfCommand { - + protected serverCommand = false; protected description = "Get a list of build templates"; protected getHelpArgs(): string[] { From 8ea2fec432ad207e5c75a68c065efbcbb47b76fb Mon Sep 17 00:00:00 2001 From: grawcho Date: Tue, 15 Nov 2016 12:50:30 +0200 Subject: [PATCH 094/235] change server command to true on acctual server commands --- app/exec/build/definitions/create.ts | 4 ++-- app/exec/build/definitions/delete.ts | 4 ++-- app/exec/build/definitions/export.ts | 4 ++-- app/exec/build/definitions/list.ts | 5 +++-- app/exec/build/definitions/queuestatus.ts | 4 ++-- app/exec/build/definitions/update.ts | 4 ++-- 6 files changed, 13 insertions(+), 12 deletions(-) diff --git a/app/exec/build/definitions/create.ts b/app/exec/build/definitions/create.ts index 0c92b927..62d42b34 100644 --- a/app/exec/build/definitions/create.ts +++ b/app/exec/build/definitions/create.ts @@ -14,7 +14,7 @@ export interface CreateDefinitionArguments extends CoreArguments { } export class CreateDefinition extends TfCommand { - protected serverCommand = false; + protected serverCommand = true; protected description = "Create a build definition"; protected getHelpArgs(): string[] { @@ -29,7 +29,7 @@ export class CreateDefinition extends TfCommand { - var api = this.webApi.getBuildApi(this.connection.getCollectionUrl()); + var api = this.webApi.getBuildApi(); return Promise.all([ this.commandArgs.project.val(), diff --git a/app/exec/build/definitions/delete.ts b/app/exec/build/definitions/delete.ts index 29bf3df6..f4072486 100644 --- a/app/exec/build/definitions/delete.ts +++ b/app/exec/build/definitions/delete.ts @@ -13,7 +13,7 @@ export interface DeleteDefinitionArguments extends CoreArguments { } export class DeleteDefinition extends TfCommand { - protected serverCommand = false; + protected serverCommand = true; protected description = "Delete a build definition"; protected getHelpArgs(): string[] { @@ -27,7 +27,7 @@ export class DeleteDefinition extends TfCommand { - var api = this.webApi.getBuildApi(this.connection.getCollectionUrl()); + var api = this.webApi.getBuildApi(); return Promise.all([ this.commandArgs.project.val(), diff --git a/app/exec/build/definitions/export.ts b/app/exec/build/definitions/export.ts index 6f90f18a..066a2dc0 100644 --- a/app/exec/build/definitions/export.ts +++ b/app/exec/build/definitions/export.ts @@ -16,7 +16,7 @@ export interface ExportDefinitionArguments extends CoreArguments { } export class ExportDefinition extends TfCommand { - protected serverCommand = false; + protected serverCommand = true; protected description = "Export a build definition to a local file"; protected getHelpArgs(): string[] { @@ -33,7 +33,7 @@ export class ExportDefinition extends TfCommand { - var api = this.webApi.getBuildApi(this.connection.getCollectionUrl()); + var api = this.webApi.getBuildApi(); return Promise.all([ this.commandArgs.project.val(), diff --git a/app/exec/build/definitions/list.ts b/app/exec/build/definitions/list.ts index 61fe80ca..7b599485 100644 --- a/app/exec/build/definitions/list.ts +++ b/app/exec/build/definitions/list.ts @@ -1,5 +1,6 @@ import { TfCommand, CoreArguments } from "../../../lib/tfcommand"; import buildContracts = require('vso-node-api/interfaces/BuildInterfaces'); +import buildClient = require("vso-node-api/BuildApi"); import args = require("../../../lib/arguments"); import trace = require('../../../lib/trace'); @@ -8,7 +9,7 @@ export function getCommand(args: string[]): ListDefinitions { } export class ListDefinitions extends TfCommand { - protected serverCommand = false; + protected serverCommand = true; protected description = "Get a list of build definitions"; protected getHelpArgs(): string[] { @@ -16,7 +17,7 @@ export class ListDefinitions extends TfCommand { - var api = this.webApi.getBuildApi(this.connection.getCollectionUrl()); + var api: buildClient.IBuildApi = this.webApi.getBuildApi(this.connection.getCollectionUrl()); trace.debug("Searching for build definitions..."); return this.commandArgs.project.val().then((project) => { diff --git a/app/exec/build/definitions/queuestatus.ts b/app/exec/build/definitions/queuestatus.ts index 8a8abd1d..d668ef66 100644 --- a/app/exec/build/definitions/queuestatus.ts +++ b/app/exec/build/definitions/queuestatus.ts @@ -14,7 +14,7 @@ export interface DefinitionQueueStatusArguments extends CoreArguments { } export class DefinitionQueueStatus extends TfCommand { - protected serverCommand = false; + protected serverCommand = true; protected description = "Manage a build definition queue status"; protected getHelpArgs(): string[] { @@ -28,7 +28,7 @@ export class DefinitionQueueStatus extends TfCommand { - var api = this.webApi.getBuildApi(this.connection.getCollectionUrl()); + var api = this.webApi.getBuildApi(); return Promise.all([ this.commandArgs.project.val(), diff --git a/app/exec/build/definitions/update.ts b/app/exec/build/definitions/update.ts index 57b64104..c65d9605 100644 --- a/app/exec/build/definitions/update.ts +++ b/app/exec/build/definitions/update.ts @@ -14,7 +14,7 @@ export interface UpdateDefinitionArguments extends CoreArguments { } export class UpdateDefinition extends TfCommand { - protected serverCommand = false; + protected serverCommand = true; protected description = "Update build definition"; protected getHelpArgs(): string[] { return ["project", "definitionId", "definitionPath"]; @@ -28,7 +28,7 @@ export class UpdateDefinition extends TfCommand { - var api = this.webApi.getBuildApi(this.connection.getCollectionUrl()); + var api = this.webApi.getBuildApi(); return Promise.all([ this.commandArgs.project.val(), From 241cacdb547160e3a4c414b1125e6a839fed63c0 Mon Sep 17 00:00:00 2001 From: grawcho Date: Tue, 15 Nov 2016 15:23:35 +0200 Subject: [PATCH 095/235] add serverCommand=true in template list and export --- app/exec/build/templates/export.ts | 2 +- app/exec/build/templates/list.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/exec/build/templates/export.ts b/app/exec/build/templates/export.ts index 05536c06..9642e75b 100644 --- a/app/exec/build/templates/export.ts +++ b/app/exec/build/templates/export.ts @@ -15,7 +15,7 @@ export interface ExportTemplateArguments extends CoreArguments { } export class ExportTemplate extends TfCommand { - protected serverCommand = false; + protected serverCommand = true; protected description = "Export a build template to a local file"; protected getHelpArgs(): string[] { diff --git a/app/exec/build/templates/list.ts b/app/exec/build/templates/list.ts index c32d8777..654cec21 100644 --- a/app/exec/build/templates/list.ts +++ b/app/exec/build/templates/list.ts @@ -9,7 +9,7 @@ export function getCommand(args: string[]): ListTemplates { } export class ListTemplates extends TfCommand { - protected serverCommand = false; + protected serverCommand = true; protected description = "Get a list of build templates"; protected getHelpArgs(): string[] { From 17d95ff25beb579c105c8d45105e270e56994fca Mon Sep 17 00:00:00 2001 From: grawcho Date: Tue, 15 Nov 2016 15:37:12 +0200 Subject: [PATCH 096/235] refactor all custom features to include appropriate severCommand --- app/exec/build/agent.ts | 1 + app/exec/build/agents.ts | 2 +- app/exec/build/definition.ts | 1 + app/exec/build/delete.ts | 2 +- app/exec/build/details.ts | 2 +- app/exec/build/keep.ts | 2 +- app/exec/build/pools.ts | 2 +- app/exec/build/tasks/download.ts | 1 + 8 files changed, 8 insertions(+), 5 deletions(-) diff --git a/app/exec/build/agent.ts b/app/exec/build/agent.ts index c0d4a034..af556ba1 100644 --- a/app/exec/build/agent.ts +++ b/app/exec/build/agent.ts @@ -11,6 +11,7 @@ export function getCommand(args: string[]): Agent { } export class Agent extends agentBase.BuildBase { + protected serverCommand = true; protected description = "Show / Update task agent details."; protected getHelpArgs(): string[] { diff --git a/app/exec/build/agents.ts b/app/exec/build/agents.ts index 442086f3..69a68f47 100644 --- a/app/exec/build/agents.ts +++ b/app/exec/build/agents.ts @@ -11,8 +11,8 @@ export function getCommand(args: string[]): Agents { } export class Agents extends agentBase.BuildBase { + protected serverCommand = true; protected description = "Show task agent list in a pool."; - protected getHelpArgs(): string[] { return ["poolId"]; } diff --git a/app/exec/build/definition.ts b/app/exec/build/definition.ts index 9ec83701..8652996a 100644 --- a/app/exec/build/definition.ts +++ b/app/exec/build/definition.ts @@ -10,6 +10,7 @@ export function getCommand(args: string[]): BuildDefinition { } export class BuildDefinition extends buildBase.BuildBase { + protected serverCommand = true; protected description = "Display build definition details."; protected getHelpArgs(): string[] { diff --git a/app/exec/build/delete.ts b/app/exec/build/delete.ts index 66429d75..bfc22f2e 100644 --- a/app/exec/build/delete.ts +++ b/app/exec/build/delete.ts @@ -14,7 +14,7 @@ export function getCommand(args: string[]): BuildDelete { } export class BuildDelete extends buildBase.BuildBase { - + protected serverCommand = true; protected description = "Delete a build."; protected getHelpArgs(): string[] { diff --git a/app/exec/build/details.ts b/app/exec/build/details.ts index 47ad02f3..986ea52a 100644 --- a/app/exec/build/details.ts +++ b/app/exec/build/details.ts @@ -10,8 +10,8 @@ export function getCommand(args: string[]): BuildDetails { } export class BuildDetails extends buildBase.BuildBase { + protected serverCommand = true; protected description = "Display extended build details."; - protected getHelpArgs(): string[] { return ["project", "buildId"]; } diff --git a/app/exec/build/keep.ts b/app/exec/build/keep.ts index 41f4971d..8dda2a5b 100644 --- a/app/exec/build/keep.ts +++ b/app/exec/build/keep.ts @@ -14,7 +14,7 @@ export function getCommand(args: string[]): BuildKeep { } export class BuildKeep extends buildBase.BuildBase { - + protected serverCommand = true; protected description = "change build retention policy."; protected getHelpArgs(): string[] { diff --git a/app/exec/build/pools.ts b/app/exec/build/pools.ts index b95e951f..fb027c1b 100644 --- a/app/exec/build/pools.ts +++ b/app/exec/build/pools.ts @@ -11,8 +11,8 @@ export function getCommand(args: string[]): Pools { } export class Pools extends agentBase.BuildBase { + protected serverCommand = true; protected description = "Show agent pool list."; - protected getHelpArgs(): string[] { return []; } diff --git a/app/exec/build/tasks/download.ts b/app/exec/build/tasks/download.ts index d105cd6e..d6586c47 100644 --- a/app/exec/build/tasks/download.ts +++ b/app/exec/build/tasks/download.ts @@ -14,6 +14,7 @@ export function getCommand(args: string[]): BuildTaskDownload { var c_taskJsonFile: string = 'task.json'; export class BuildTaskDownload extends tasksBase.BuildTaskBase { + protected serverCommand = true; protected description = "Download a Build Task."; protected getHelpArgs(): string[] { From bd1197b391973a3efa03b2af86e2a8eeea088758 Mon Sep 17 00:00:00 2001 From: grawcho Date: Mon, 28 Nov 2016 12:15:13 +0200 Subject: [PATCH 097/235] add ability to queue with params from string JSON --- app/exec/build/queue.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/app/exec/build/queue.ts b/app/exec/build/queue.ts index 9cb4c555..0334928d 100644 --- a/app/exec/build/queue.ts +++ b/app/exec/build/queue.ts @@ -91,12 +91,13 @@ export class BuildQueue extends buildBase.BuildBase= 0) { var demandList: string[] = demands.split(";"); } From d16835338447532f6a5846dd2f6f3f1db905fe1e Mon Sep 17 00:00:00 2001 From: grawcho Date: Mon, 28 Nov 2016 12:17:20 +0200 Subject: [PATCH 098/235] roll version to 0.3.41 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6a5880b9..efcba26e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tfx-cli", - "version": "0.3.40", + "version": "0.3.41", "description": "CLI for Visual Studio Team Services and Team Foundation Server", "repository": { "type": "git", From d05f59f1ae85f225de1aba85afee8a59e8a26907 Mon Sep 17 00:00:00 2001 From: grawcho Date: Mon, 28 Nov 2016 14:24:32 +0200 Subject: [PATCH 099/235] add help text to explain queue with JSON string params --- app/exec/build/default.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/exec/build/default.ts b/app/exec/build/default.ts index 62eca3f9..548902db 100644 --- a/app/exec/build/default.ts +++ b/app/exec/build/default.ts @@ -36,7 +36,7 @@ export class BuildBase extends TfCom this.registerCommandArgument("status", "Build Status", "Build status filter.", args.StringArgument, null); this.registerCommandArgument("top", "Number of builds", "Maximum number of builds to return.", args.IntArgument, null); this.registerCommandArgument("buildId", "Build ID", "Identifies a particular Build.", args.IntArgument); - this.registerCommandArgument("parameters", "parameter file path", "Build process Parameters JSON file.", args.StringArgument,null); + this.registerCommandArgument("parameters", "parameter file path or JSON string ", "Build process Parameters JSON file / string.", args.StringArgument,null); this.registerCommandArgument("priority", "build queue priority", "Queue a build with priority 1 [High] - 5 [Low] default = 3 [Normal]).", args.IntArgument, null); this.registerCommandArgument("version","Build Sources Version", "the source version for the queued build.",args.StringArgument,null); this.registerCommandArgument("shelveset", "Shelveset to validate", "the shelveset to queue in the build.", args.StringArgument,null ); From a760ff6b730dc04c2c2e42c4b1ae234ce03192bf Mon Sep 17 00:00:00 2001 From: grawcho Date: Tue, 29 Nov 2016 16:31:24 +0200 Subject: [PATCH 100/235] supress parameters message on null parameters --- app/exec/build/queue.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/app/exec/build/queue.ts b/app/exec/build/queue.ts index 0334928d..6bee97e1 100644 --- a/app/exec/build/queue.ts +++ b/app/exec/build/queue.ts @@ -90,12 +90,14 @@ export class BuildQueue extends buildBase.BuildBase= 0) { From 1645e053c564f5022815192baa5a47281c3bd9d0 Mon Sep 17 00:00:00 2001 From: grawcho Date: Tue, 29 Nov 2016 16:33:23 +0200 Subject: [PATCH 101/235] fix location of version parameter in output --- app/exec/build/queue.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/exec/build/queue.ts b/app/exec/build/queue.ts index 6bee97e1..845d3bcd 100644 --- a/app/exec/build/queue.ts +++ b/app/exec/build/queue.ts @@ -78,7 +78,7 @@ export class BuildQueue extends buildBase.BuildBase Date: Tue, 29 Nov 2016 16:38:03 +0200 Subject: [PATCH 102/235] send parameters message to debug log --- app/exec/build/queue.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/exec/build/queue.ts b/app/exec/build/queue.ts index 845d3bcd..bd5de6d9 100644 --- a/app/exec/build/queue.ts +++ b/app/exec/build/queue.ts @@ -93,10 +93,10 @@ export class BuildQueue extends buildBase.BuildBase Date: Wed, 30 Nov 2016 10:42:07 +0200 Subject: [PATCH 103/235] test CI --- artifactory-deploy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/artifactory-deploy.sh b/artifactory-deploy.sh index 8acbc02e..d6dc7e69 100755 --- a/artifactory-deploy.sh +++ b/artifactory-deploy.sh @@ -94,7 +94,7 @@ STATUSCODE=$(curl --progress-bar -i -X PUT -u $ARTIFACTORY_USER:$ARTIFACTORY_PAS -T "$FILE" \ --output ./upload.log --write-out "%{http_code}" \ "$uploadUrl"||:) - +## comment test fail_if '[[ "$STATUSCODE" -ne "201" ]]' "Upload failed: http status $STATUSCODE" echo "Upload successfull!" From d17e3b9979083392008cca4f108c519ac48dbe17 Mon Sep 17 00:00:00 2001 From: sfeldman Date: Tue, 20 Dec 2016 13:55:33 +0200 Subject: [PATCH 104/235] temporary state after API change --- app/exec/build/agent.ts | 37 +- app/exec/build/agents.ts | 2 +- app/exec/build/list.ts | 2 +- app/exec/build/pools.ts | 4 +- app/exec/build/tasks/delete.ts | 8 +- typings/archiver/archiver.d.ts | 12 +- typings/colors/colors.d.ts | 21 +- typings/copy-paste/copy-paste.d.ts | 57 +- typings/form-data/form-data.d.ts | 15 + typings/form-data/form-data2.d.ts | 1 + typings/fs-extra/fs-extra.d.ts | 195 + typings/glob/glob.d.ts | 125 +- typings/jszip/jszip.d.ts | 95 +- typings/lodash/lodash.d.ts | 24407 +++++------------------ typings/minimatch/minimatch.d.ts | 73 +- typings/minimist/minimist.d.ts | 38 + typings/mkdirp/mkdirp.d.ts | 4 +- typings/mocha/mocha.d.ts | 214 + typings/node-uuid/node-uuid-base.d.ts | 8 +- typings/node-uuid/node-uuid-cjs.d.ts | 4 +- typings/node-uuid/node-uuid.d.ts | 16 +- typings/node/node.d.ts | 2721 +-- typings/q/Q.d.ts | 330 + typings/read/read.d.ts | 24 + typings/request/request.d.ts | 182 + typings/shelljs/shelljs.d.ts | 29 +- typings/validator/validator.d.ts | 387 +- typings/vso-node-api/vso-node-api.d.ts | 18339 +++++++++++++++++ typings/winreg/winreg.d.ts | 379 +- typings/xml2js/xml2js.d.ts | 36 +- 30 files changed, 25274 insertions(+), 22491 deletions(-) create mode 100644 typings/form-data/form-data.d.ts create mode 100644 typings/form-data/form-data2.d.ts create mode 100644 typings/fs-extra/fs-extra.d.ts create mode 100644 typings/minimist/minimist.d.ts create mode 100644 typings/mocha/mocha.d.ts create mode 100644 typings/q/Q.d.ts create mode 100644 typings/read/read.d.ts create mode 100644 typings/request/request.d.ts create mode 100644 typings/vso-node-api/vso-node-api.d.ts diff --git a/app/exec/build/agent.ts b/app/exec/build/agent.ts index af556ba1..ad72c6ae 100644 --- a/app/exec/build/agent.ts +++ b/app/exec/build/agent.ts @@ -40,18 +40,18 @@ export class Agent extends agentBase.BuildBase { - if(ao.length > 0) { - var aid = ao[0].id; - var an = ao[0].name; - trace.debug("found, agent id %s for agent name %s",aid, an); - return this._getOrUpdateAgent(agentapi, pool as number,aid,newkey as string,value as string,include,disable as string); - } - else { - trace.debug("No agents found with name " + agentname); - throw new Error("No agents found with name " + agentname); - } - }); + var ao: taskAgentContracts.TaskAgent[] = null; + agentapi.getAgents(pool as number, agentname as string,true,null,null,null,(err: any, statusCode: number, ao:taskAgentContracts.TaskAgent[]) => ao) + if(ao.length > 0) { + var aid = ao[0].id; + var an = ao[0].name; + trace.debug("found, agent id %s for agent name %s",aid, an); + return this._getOrUpdateAgent(agentapi, pool as number,aid,newkey as string,value as string,include,disable as string); + } + else { + trace.debug("No agents found with name " + agentname); + throw new Error("No agents found with name " + agentname); + } } trace.debug("disable request: %s",disable); return this._getOrUpdateAgent(agentapi, pool as number,agentid as number,newkey as string,value as string,include,disable as string); @@ -82,21 +82,22 @@ export class Agent extends agentBase.BuildBase { + var agent:taskAgentContracts.TaskAgent; + agentapi.getAgent(pool,agentid,true,true,null,(err: any, statusCode: number, agent:taskAgentContracts.TaskAgent) => agent); trace.debug("disable request: %s",disable); if (disable) { if (disable == "true") { include = false; trace.debug("agent status (enabled): %s",agent.enabled); agent.enabled = false; - agentapi.updateAgent(agent,pool,agentid); + agentapi.updateAgent(agent,pool,agentid,(err: any, statusCode: number, agent:taskAgentContracts.TaskAgent) => agent); trace.debug("agent status (enabled): %s",agent.enabled); } if (disable == "false") { include = false; trace.debug("agent status (enabled): %s",agent.enabled); agent.enabled = true; - agentapi.updateAgent(agent,pool,agentid); + agentapi.updateAgent(agent,pool,agentid,(err: any, statusCode: number, agent:taskAgentContracts.TaskAgent) => agent); trace.debug("agent status (enabled): %s",agent.enabled); } if (disable != "true" && disable != "false") { @@ -107,9 +108,9 @@ export class Agent extends agentBase.BuildBase agent); }; - return agentapi.getAgent(pool,agentid,include,include,null); - }); + agentapi.getAgent(pool,agentid,include,include,null,(err: any, statusCode: number, agent:taskAgentContracts.TaskAgent) => agent); + return agent; } } \ No newline at end of file diff --git a/app/exec/build/agents.ts b/app/exec/build/agents.ts index 69a68f47..3d257530 100644 --- a/app/exec/build/agents.ts +++ b/app/exec/build/agents.ts @@ -22,7 +22,7 @@ export class Agents extends agentBase.BuildBase { trace.debug("getting pool : %s",pool); - return agentapi.getAgents(pool); + return agentapi.getAgents(pool,"",true,null,null,null,(err: any, statusCode: number, ao:taskAgentContracts.TaskAgent[]) => ao); }); } diff --git a/app/exec/build/list.ts b/app/exec/build/list.ts index 3ea288fc..3bdc13b4 100644 --- a/app/exec/build/list.ts +++ b/app/exec/build/list.ts @@ -71,6 +71,6 @@ export class BuildGetList extends buildBase.BuildBase { trace.debug("pool.exec"); var agentapi: agentClient.ITaskAgentApiBase = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl().substring(0,this.connection.getCollectionUrl().lastIndexOf("/"))); - return agentapi.getAgentPools(); + var pools: taskAgentContracts.TaskAgentPool[] = null; + agentapi.getAgentPools(null,null,(err: any,statusCode: number, pools: taskAgentContracts.TaskAgentPool[]) => pools); + return Promise.resolve(pools); } public friendlyOutput(pools: taskAgentContracts.TaskAgentPool[]): void { diff --git a/app/exec/build/tasks/delete.ts b/app/exec/build/tasks/delete.ts index 5ae8d0ca..aa432cbc 100644 --- a/app/exec/build/tasks/delete.ts +++ b/app/exec/build/tasks/delete.ts @@ -18,20 +18,20 @@ export class BuildTaskDelete extends tasksBase.BuildTaskBase { let agentApi = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl()); return this.commandArgs.taskId.val().then((taskId) => { - return agentApi.getTaskDefinitions(taskId).then((tasks) => { + var tasks: agentContracts.TaskDefinition[] = null; + agentApi.getTaskDefinitions(taskId,null,false,(err: any, statusCode: number, tasks:agentContracts.TaskDefinition[]) => tasks) if (tasks && tasks.length > 0) { trace.debug("Deleting task(s)..."); - return agentApi.deleteTaskDefinition(taskId).then(() => { + var task:agentContracts.TaskDefinition = null; + agentApi.deleteTaskDefinition(taskId,(err: any, statusCode: number) => task); return { id: taskId }; - }); } else { trace.debug("No such task."); throw new Error("No task found with provided ID: " + taskId); } }); - }); } public friendlyOutput(data: agentContracts.TaskDefinition): void { diff --git a/typings/archiver/archiver.d.ts b/typings/archiver/archiver.d.ts index 33b26062..e39fe426 100644 --- a/typings/archiver/archiver.d.ts +++ b/typings/archiver/archiver.d.ts @@ -1,7 +1,7 @@ // Type definitions for archiver v0.15.0 // Project: https://github.com/archiverjs/node-archiver // Definitions by: Esri -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// Definitions: https://github.com/borisyankov/DefinitelyTyped /* =================== USAGE =================== @@ -13,18 +13,18 @@ =============================================== */ -/// + declare module "archiver" { import * as FS from 'fs'; - import * as STREAM from 'stream'; + import * as Stream from "stream"; interface nameInterface { name?: string; } - interface Archiver extends STREAM.Transform { + interface Archiver extends Stream.Transform { pipe(writeStream: FS.WriteStream): void; - append(source: FS.ReadStream | Buffer | string, name: nameInterface): void; + append(readStream: FS.ReadStream, name: nameInterface): void; finalize(): void; directory(dirpath: string, destpath?: string | boolean, data?: any) } @@ -40,4 +40,4 @@ declare module "archiver" { } export = archiver; -} +} \ No newline at end of file diff --git a/typings/colors/colors.d.ts b/typings/colors/colors.d.ts index 50e960c4..c7e3abf2 100644 --- a/typings/colors/colors.d.ts +++ b/typings/colors/colors.d.ts @@ -1,15 +1,13 @@ + // Type definitions for Colors.js 0.6.0-1 // Project: https://github.com/Marak/colors.js // Definitions by: Bart van der Schoor -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// Definitions: https://github.com/borisyankov/DefinitelyTyped declare module "colors" { interface Color { (text: string): string; - strip: Color; - stripColors: Color; - black: Color; red: Color; green: Color; @@ -44,17 +42,11 @@ declare module "colors" { america: Color; trap: Color; random: Color; - zalgo: Color; } - namespace e { + module e { export function setTheme(theme:any): void; - export var enabled: boolean; - - export var strip: Color; - export var stripColors: Color; - export var black: Color; export var red: Color; export var green: Color; @@ -89,16 +81,12 @@ declare module "colors" { export var america: Color; export var trap: Color; export var random: Color; - export var zalgo: Color; } export = e; } interface String { - strip: string; - stripColors: string; - black: string; red: string; green: string; @@ -133,5 +121,4 @@ interface String { america: string; trap: string; random: string; - zalgo: string; -} +} \ No newline at end of file diff --git a/typings/copy-paste/copy-paste.d.ts b/typings/copy-paste/copy-paste.d.ts index a8a844b5..9ed43567 100644 --- a/typings/copy-paste/copy-paste.d.ts +++ b/typings/copy-paste/copy-paste.d.ts @@ -1,46 +1,19 @@ -// Type definitions for copy-paste v1.1.3 +// Type definitions for copy-paste // Project: https://github.com/xavi-/node-copy-paste -// Definitions by: Tobias Kahlert -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare module 'copy-paste' { - - export type CopyCallback = (err: Error) => void; - export type PasteCallback = (err: Error, content: string) => void; - /** - * Asynchronously replaces the current contents of the clip board with text. - * - * @param {T} content Takes either a string, array, object, or readable stream. - * @return {T} Returns the same value passed in. - */ - export function copy(content: T): T; - - /** - * Asynchronously replaces the current contents of the clip board with text. - * - * @param {T} content Takes either a string, array, object, or readable stream. - * @param {CopyCallback} callback will fire when the copy operation is complete. - * @return {T} Returns the same value passed in. - */ - export function copy(content: T, callback: CopyCallback): T; - - - /** - * Synchronously returns the current contents of the system clip board. - * - * Note: The synchronous version of paste is not always availabled. - * An error message is shown if the synchronous version of paste is used on an unsupported platform. - * The asynchronous version of paste is always available. - * - * @return {string} Returns the current contents of the system clip board. - */ - export function paste(): string; - - /** - * Asynchronously returns the current contents of the system clip board. - * - * @param {PasteCallback} callback The contents of the system clip board are passed to the callback as the second parameter. - */ - export function paste(callback: PasteCallback): void; -} \ No newline at end of file + interface ClipboardFunctions { + copy: (text: string, callback?: (err: NodeJS.ErrnoException, text: string) => void) => void; + paste: ((callback: (err: NodeJS.ErrnoException, text: string) => void) => void | + (() => string)); + } + + interface CopyPaste extends ClipboardFunctions { + global: () => ClipboardFunctions; + } + + var copyPaste: CopyPaste; + + export = copyPaste; +} diff --git a/typings/form-data/form-data.d.ts b/typings/form-data/form-data.d.ts new file mode 100644 index 00000000..0f22b8ff --- /dev/null +++ b/typings/form-data/form-data.d.ts @@ -0,0 +1,15 @@ +// Type definitions for form-data +// Project: https://github.com/felixge/node-form-data +// Definitions by: Carlos Ballesteros Velasco +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +// Imported from: https://github.com/soywiz/typescript-node-definitions/form-data.d.ts + +declare module "form-data" { + export class FormData { + append(key: string, value: any): FormData; + getHeaders(): Object; + // TODO expand pipe + pipe(to: any): any; + } +} diff --git a/typings/form-data/form-data2.d.ts b/typings/form-data/form-data2.d.ts new file mode 100644 index 00000000..bab077f0 --- /dev/null +++ b/typings/form-data/form-data2.d.ts @@ -0,0 +1 @@ +//type definitions for form-data diff --git a/typings/fs-extra/fs-extra.d.ts b/typings/fs-extra/fs-extra.d.ts new file mode 100644 index 00000000..852956a7 --- /dev/null +++ b/typings/fs-extra/fs-extra.d.ts @@ -0,0 +1,195 @@ +// Type definitions for fs-extra +// Project: https://github.com/jprichardson/node-fs-extra +// Definitions by: midknight41 +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +// Imported from: https://github.com/soywiz/typescript-node-definitions/fs-extra.d.ts + +/// + +declare module "fs-extra" { + import stream = require("stream"); + + export interface Stats { + isFile(): boolean; + isDirectory(): boolean; + isBlockDevice(): boolean; + isCharacterDevice(): boolean; + isSymbolicLink(): boolean; + isFIFO(): boolean; + isSocket(): boolean; + dev: number; + ino: number; + mode: number; + nlink: number; + uid: number; + gid: number; + rdev: number; + size: number; + blksize: number; + blocks: number; + atime: Date; + mtime: Date; + ctime: Date; + } + + export interface FSWatcher { + close(): void; + } + + export class ReadStream extends stream.Readable { } + export class WriteStream extends stream.Writable { } + + //extended methods + export function copy(src: string, dest: string, callback?: (err: Error) => void): void; + export function copy(src: string, dest: string, filter: (src: string) => boolean, callback?: (err: Error) => void): void; + + export function copySync(src: string, dest: string): void; + export function copySync(src: string, dest: string, filter: (src: string) => boolean): void; + + export function createFile(file: string, callback?: (err: Error) => void): void; + export function createFileSync(file: string): void; + + export function mkdirs(dir: string, callback?: (err: Error) => void): void; + export function mkdirp(dir: string, callback?: (err: Error) => void): void; + export function mkdirs(dir: string, options?: MkdirOptions, callback?: (err: Error) => void): void; + export function mkdirp(dir: string, options?: MkdirOptions, callback?: (err: Error) => void): void; + export function mkdirsSync(dir: string, options?: MkdirOptions): void; + export function mkdirpSync(dir: string, options?: MkdirOptions): void; + + export function outputFile(file: string, data: any, callback?: (err: Error) => void): void; + export function outputFileSync(file: string, data: any): void; + + export function outputJson(file: string, data: any, callback?: (err: Error) => void): void; + export function outputJSON(file: string, data: any, callback?: (err: Error) => void): void; + export function outputJsonSync(file: string, data: any): void; + export function outputJSONSync(file: string, data: any): void; + + export function readJson(file: string, callback?: (err: Error) => void): void; + export function readJson(file: string, options?: OpenOptions, callback?: (err: Error) => void): void; + export function readJSON(file: string, callback?: (err: Error) => void): void; + export function readJSON(file: string, options?: OpenOptions, callback?: (err: Error) => void): void; + + export function readJsonSync(file: string, options?: OpenOptions): void; + export function readJSONSync(file: string, options?: OpenOptions): void; + + export function remove(dir: string, callback?: (err: Error) => void): void; + export function removeSync(dir: string): void; + // export function delete(dir: string, callback?: (err: Error) => void): void; + // export function deleteSync(dir: string): void; + + export function writeJson(file: string, object: any, callback?: (err: Error) => void): void; + export function writeJson(file: string, object: any, options?: OpenOptions, callback?: (err: Error) => void): void; + export function writeJSON(file: string, object: any, callback?: (err: Error) => void): void; + export function writeJSON(file: string, object: any, options?: OpenOptions, callback?: (err: Error) => void): void; + + export function writeJsonSync(file: string, object: any, options?: OpenOptions): void; + export function writeJSONSync(file: string, object: any, options?: OpenOptions): void; + + export function rename(oldPath: string, newPath: string, callback?: (err: Error) => void): void; + export function renameSync(oldPath: string, newPath: string): void; + export function truncate(fd: number, len: number, callback?: (err: Error) => void): void; + export function truncateSync(fd: number, len: number): void; + export function chown(path: string, uid: number, gid: number, callback?: (err: Error) => void): void; + export function chownSync(path: string, uid: number, gid: number): void; + export function fchown(fd: number, uid: number, gid: number, callback?: (err: Error) => void): void; + export function fchownSync(fd: number, uid: number, gid: number): void; + export function lchown(path: string, uid: number, gid: number, callback?: (err: Error) => void): void; + export function lchownSync(path: string, uid: number, gid: number): void; + export function chmod(path: string, mode: number, callback?: (err: Error) => void): void; + export function chmod(path: string, mode: string, callback?: (err: Error) => void): void; + export function chmodSync(path: string, mode: number): void; + export function chmodSync(path: string, mode: string): void; + export function fchmod(fd: number, mode: number, callback?: (err: Error) => void): void; + export function fchmod(fd: number, mode: string, callback?: (err: Error) => void): void; + export function fchmodSync(fd: number, mode: number): void; + export function fchmodSync(fd: number, mode: string): void; + export function lchmod(path: string, mode: string, callback?: (err: Error) => void): void; + export function lchmod(path: string, mode: number, callback?: (err: Error) => void): void; + export function lchmodSync(path: string, mode: number): void; + export function lchmodSync(path: string, mode: string): void; + export function stat(path: string, callback?: (err: Error, stats: Stats) => void): void; + export function lstat(path: string, callback?: (err: Error, stats: Stats) => void): void; + export function fstat(fd: number, callback?: (err: Error, stats: Stats) => void): void; + export function statSync(path: string): Stats; + export function lstatSync(path: string): Stats; + export function fstatSync(fd: number): Stats; + export function link(srcpath: string, dstpath: string, callback?: (err: Error) => void): void; + export function linkSync(srcpath: string, dstpath: string): void; + export function symlink(srcpath: string, dstpath: string, type?: string, callback?: (err: Error) => void): void; + export function symlinkSync(srcpath: string, dstpath: string, type?: string): void; + export function readlink(path: string, callback?: (err: Error, linkString: string) => void): void; + export function realpath(path: string, callback?: (err: Error, resolvedPath: string) => void): void; + export function realpath(path: string, cache: string, callback: (err: Error, resolvedPath: string) => void): void; + export function realpathSync(path: string, cache?: boolean): string; + export function unlink(path: string, callback?: (err: Error) => void): void; + export function unlinkSync(path: string): void; + export function rmdir(path: string, callback?: (err: Error) => void): void; + export function rmdirSync(path: string): void; + export function mkdir(path: string, mode?: number, callback?: (err: Error) => void): void; + export function mkdir(path: string, mode?: string, callback?: (err: Error) => void): void; + export function mkdirSync(path: string, mode?: number): void; + export function mkdirSync(path: string, mode?: string): void; + export function readdir(path: string, callback?: (err: Error, files: string[]) => void ): void; + export function readdirSync(path: string): string[]; + export function close(fd: number, callback?: (err: Error) => void): void; + export function closeSync(fd: number): void; + export function open(path: string, flags: string, mode?: string, callback?: (err: Error, fs: number) => void): void; + export function openSync(path: string, flags: string, mode?: string): number; + export function utimes(path: string, atime: number, mtime: number, callback?: (err: Error) => void): void; + export function utimesSync(path: string, atime: number, mtime: number): void; + export function futimes(fd: number, atime: number, mtime: number, callback?: (err: Error) => void): void; + export function futimesSync(fd: number, atime: number, mtime: number): void; + export function fsync(fd: number, callback?: (err: Error) => void): void; + export function fsyncSync(fd: number): void; + export function write(fd: number, buffer: NodeBuffer, offset: number, length: number, position: number, callback?: (err: Error, written: number, buffer: NodeBuffer) => void): void; + export function writeSync(fd: number, buffer: NodeBuffer, offset: number, length: number, position: number): number; + export function read(fd: number, buffer: NodeBuffer, offset: number, length: number, position: number, callback?: (err: Error, bytesRead: number, buffer: NodeBuffer) => void ): void; + export function readSync(fd: number, buffer: NodeBuffer, offset: number, length: number, position: number): number; + export function readFile(filename: string, encoding: string, callback: (err: Error, data: string) => void ): void; + export function readFile(filename: string, options: OpenOptions, callback: (err: Error, data: string) => void ): void; + export function readFile(filename: string, callback: (err: Error, data: NodeBuffer) => void ): void; + export function readFileSync(filename: string): NodeBuffer; + export function readFileSync(filename: string, encoding: string): string; + export function readFileSync(filename: string, options: OpenOptions): string; + export function writeFile(filename: string, data: any, encoding?: string, callback?: (err: Error) => void): void; + export function writeFile(filename: string, data: any, options?: OpenOptions, callback?: (err: Error) => void): void; + export function writeFileSync(filename: string, data: any, encoding?: string): void; + export function writeFileSync(filename: string, data: any, option?: OpenOptions): void; + export function appendFile(filename: string, data: any, encoding?: string, callback?: (err: Error) => void): void; + export function appendFile(filename: string, data: any,option?: OpenOptions, callback?: (err: Error) => void): void; + export function appendFileSync(filename: string, data: any, encoding?: string): void; + export function appendFileSync(filename: string, data: any, option?: OpenOptions): void; + export function watchFile(filename: string, listener: { curr: Stats; prev: Stats; }): void; + export function watchFile(filename: string, options: { persistent?: boolean; interval?: number; }, listener: { curr: Stats; prev: Stats; }): void; + export function unwatchFile(filename: string, listener?: Stats): void; + export function watch(filename: string, options?: { persistent?: boolean; }, listener?: (event: string, filename: string) => any): FSWatcher; + export function exists(path: string, callback?: (exists: boolean) => void ): void; + export function existsSync(path: string): boolean; + export function ensureDir(path: string, cb: (err: Error) => void): void; + + export interface OpenOptions { + encoding?: string; + flag?: string; + } + + export interface MkdirOptions { + fs?: any; + mode?: number; + } + + export interface ReadStreamOptions { + flags?: string; + encoding?: string; + fd?: number; + mode?: number; + bufferSize?: number; + } + export interface WriteStreamOptions { + flags?: string; + encoding?: string; + string?: string; + } + export function createReadStream(path: string, options?: ReadStreamOptions): ReadStream; + export function createWriteStream(path: string, options?: WriteStreamOptions): WriteStream; +} diff --git a/typings/glob/glob.d.ts b/typings/glob/glob.d.ts index 2957204f..c5ab0047 100644 --- a/typings/glob/glob.d.ts +++ b/typings/glob/glob.d.ts @@ -1,112 +1,71 @@ -// Type definitions for Glob 5.0.10 +// Type definitions for Glob // Project: https://github.com/isaacs/node-glob // Definitions by: vvakame -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// Definitions: https://github.com/borisyankov/DefinitelyTyped + + -/// -/// declare module "glob" { import events = require("events"); - import fs = require('fs'); import minimatch = require("minimatch"); - function G(pattern: string, cb: (err: Error, matches: string[]) => void): void; - function G(pattern: string, options: G.IOptions, cb: (err: Error, matches: string[]) => void): void; + function G(pattern:string, cb:(err:Error, matches:string[])=>void):void; - namespace G { - function sync(pattern: string, options?: IOptions): string[]; + function G(pattern:string, options:G.IOptions, cb:(err:Error, matches:string[])=>void):void; - function hasMagic(pattern: string, options?: IOptions): boolean; + module G { + function sync(pattern:string, options?:IOptions):string[]; - var Glob: IGlobStatic; - var GlobSync: IGlobSyncStatic; + var Glob:IGlobStatic; interface IOptions extends minimatch.IOptions { cwd?: string; - root?: string; - dot?: boolean; + sync?: boolean; nomount?: boolean; - mark?: boolean; - nosort?: boolean; - stat?: boolean; - silent?: boolean; + matchBase?:any; + noglobstar?:any; strict?: boolean; - cache?: { [path: string]: any /* boolean | string | string[] */ }; - statCache?: { [path: string]: fs.Stats }; - symlinks?: any; - sync?: boolean; - nounique?: boolean; - nonull?: boolean; - debug?: boolean; - nobrace?: boolean; - noglobstar?: boolean; - noext?: boolean; - nocase?: boolean; - matchBase?: any; - nodir?: boolean; - ignore?: any; /* string | string[] */ - follow?: boolean; - realpath?: boolean; - nonegate?: boolean; - nocomment?: boolean; - - /** Deprecated. */ - globDebug?: boolean; + dot?:boolean; + mark?:boolean; + nounique?:boolean; + nonull?:boolean; + nosort?:boolean; + nocase?:boolean; + stat?:boolean; + debug?:boolean; + globDebug?:boolean; + silent?:boolean; } interface IGlobStatic extends events.EventEmitter { - new (pattern: string, cb?: (err: Error, matches: string[]) => void): IGlob; - new (pattern: string, options: IOptions, cb?: (err: Error, matches: string[]) => void): IGlob; - prototype: IGlob; - } - - interface IGlobSyncStatic { - new (pattern: string, options?: IOptions): IGlobBase - prototype: IGlobBase; + new (pattern:string, cb?:(err:Error, matches:string[])=>void):IGlob; + new (pattern:string, options:any, cb?:(err:Error, matches:string[])=>void):IGlob; } - interface IGlobBase { - minimatch: minimatch.IMinimatch; - options: IOptions; - aborted: boolean; - cache: { [path: string]: any /* boolean | string | string[] */ }; - statCache: { [path: string]: fs.Stats }; - symlinks: { [path: string]: boolean }; - realpathCache: { [path: string]: string }; - found: string[]; - } - - interface IGlob extends IGlobBase, events.EventEmitter { - pause(): void; - resume(): void; - abort(): void; - - /** Deprecated. */ - EOF: any; - /** Deprecated. */ - paused: boolean; - /** Deprecated. */ - maxDepth: number; - /** Deprecated. */ - maxLength: number; - /** Deprecated. */ - changedCwd: boolean; - /** Deprecated. */ + interface IGlob { + EOF:any; + paused:boolean; + maxDepth:number; + maxLength:number; + cache:any; + statCache:any; + changedCwd:boolean; cwd: string; - /** Deprecated. */ root: string; - /** Deprecated. */ error: any; - /** Deprecated. */ - matches: string[]; - /** Deprecated. */ - log(...args: any[]): void; - /** Deprecated. */ - emitMatch(m: any): void; + aborted: boolean; + minimatch: minimatch.IMinimatch; + matches:string[]; + + log(...args:any[]):void; + abort():void; + pause():void; + resume():void; + emitMatch(m:any):void; } } - export = G; +export = G; } diff --git a/typings/jszip/jszip.d.ts b/typings/jszip/jszip.d.ts index 46fe0f87..ce3376b5 100644 --- a/typings/jszip/jszip.d.ts +++ b/typings/jszip/jszip.d.ts @@ -1,11 +1,19 @@ // Type definitions for JSZip // Project: http://stuk.github.com/jszip/ // Definitions by: mzeiher -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// Definitions: https://github.com/borisyankov/DefinitelyTyped interface JSZip { - files: {[key: string]: JSZipObject}; - + /** + * List of files in the archive + */ + files: {[name: string]: JSZipObject}; + + /** + * The comment of the archive + */ + comment: string; + /** * Get a file from the archive * @@ -48,13 +56,6 @@ interface JSZip { */ folder(name: RegExp): JSZipObject[]; - /** - * Call a callback function for each entry at this folder level. - * - * @param callback function - */ - forEach(callback: (relativePath: string, file: JSZipObject) => void): void; - /** * Get all files wchich match the given filter function * @@ -72,40 +73,23 @@ interface JSZip { remove(path: string): JSZip; /** - * @deprecated since version 3.0 - * @see {@link generateAsync} - * http://stuk.github.io/jszip/documentation/upgrade_guide.html - */ - generate(options?: JSZipGeneratorOptions): any; - - /** - * Generates a new archive asynchronously + * Generates a new archive * * @param options Optional options for the generator * @return The serialized archive */ - generateAsync(options?: JSZipGeneratorOptions, onUpdate?: Function): Promise; - - /** - * @deprecated since version 3.0 - * @see {@link loadAsync} - * http://stuk.github.io/jszip/documentation/upgrade_guide.html - */ - load(): void; + generate(options?: JSZipGeneratorOptions): any; /** - * Deserialize zip file asynchronously + * Deserialize zip file * * @param data Serialized zip file * @param options Options for deserializing - * @return Returns promise + * @return Returns the JSZip instance */ - loadAsync(data: any, options?: JSZipLoadOptions): Promise; + load(data: any, options: JSZipLoadOptions): JSZip; } -type Serialization = ("string" | "text" | "base64" | "binarystring" | "uint8array" | - "arraybuffer" | "blob" | "nodebuffer"); - interface JSZipObject { name: string; dir: boolean; @@ -113,31 +97,11 @@ interface JSZipObject { comment: string; options: JSZipObjectOptions; - /** - * Prepare the content in the asked type. - * @param {String} type the type of the result. - * @param {Function} onUpdate a function to call on each internal update. - * @return Promise the promise of the result. - */ - async(type: Serialization, onUpdate?: Function): Promise; - - /** - * @deprecated since version 3.0 - */ - asText(): void; - /** - * @deprecated since version 3.0 - */ - asBinary(): void; - /** - * @deprecated since version 3.0 - */ - asArrayBuffer(): void; - /** - * @deprecated since version 3.0 - */ - asUint8Array(): void; - //asNodeBuffer(): void; + asText(): string; + asBinary(): string; + asArrayBuffer(): ArrayBuffer; + asUint8Array(): Uint8Array; + //asNodeBuffer(): Buffer; } interface JSZipFileOptions { @@ -167,9 +131,11 @@ interface JSZipGeneratorOptions { base64?: boolean; /** DEFLATE or STORE */ compression?: string; + compressionOptions?: any; /** base64 (default), string, uint8array, blob */ type?: string; comment?: string; + platform?: string; } interface JSZipLoadOptions { @@ -186,6 +152,18 @@ interface JSZipSupport { nodebuffer: boolean; } +interface DEFLATE { + /** pako.deflateRaw, level:0-9 */ + compress(input: string, compressionOptions: {level:number}): Uint8Array; + compress(input: number[], compressionOptions: {level:number}): Uint8Array; + compress(input: Uint8Array, compressionOptions: {level:number}): Uint8Array; + + /** pako.inflateRaw */ + uncompress(input: string): Uint8Array; + uncompress(input: number[]): Uint8Array; + uncompress(input: Uint8Array): Uint8Array; +} + declare var JSZip: { /** * Create JSZip instance @@ -215,6 +193,9 @@ declare var JSZip: { prototype: JSZip; support: JSZipSupport; + compressions: { + DEFLATE: DEFLATE; + } } declare module "jszip" { diff --git a/typings/lodash/lodash.d.ts b/typings/lodash/lodash.d.ts index 3305528a..a28ce877 100644 --- a/typings/lodash/lodash.d.ts +++ b/typings/lodash/lodash.d.ts @@ -1,240 +1,7 @@ -// Type definitions for Lo-Dash 4.14 +// Type definitions for Lo-Dash // Project: http://lodash.com/ -// Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - - -/** -### 4.0.0 Changelog (https://github.com/lodash/lodash/wiki/Changelog) - -#### TODO: -removed: -- [x] Removed _.support -- [x] Removed _.findWhere in favor of _.find with iteratee shorthand -- [x] Removed _.where in favor of _.filter with iteratee shorthand -- [x] Removed _.pluck in favor of _.map with iteratee shorthand - -renamed: -- [x] Renamed _.first to _.head -- [x] Renamed _.indexBy to _.keyBy -- [x] Renamed _.invoke to _.invokeMap -- [x] Renamed _.overArgs to _.overArgs -- [x] Renamed _.padLeft & _.padRight to _.padStart & _.padEnd -- [x] Renamed _.pairs to _.toPairs -- [x] Renamed _.rest to _.tail -- [x] Renamed _.restParam to _.rest -- [x] Renamed _.sortByOrder to _.orderBy -- [x] Renamed _.trimLeft & _.trimRight to _.trimStart & _.trimEnd -- [x] Renamed _.trunc to _.truncate - -split: -- [x] Split _.indexOf & _.lastIndexOf into _.sortedIndexOf & _.sortedLastIndexOf -- [x] Split _.max & _.min into _.maxBy & _.minBy -- [x] Split _.omit & _.pick into _.omitBy & _.pickBy -- [x] Split _.sample into _.sampleSize -- [x] Split _.sortedIndex into _.sortedIndexBy -- [x] Split _.sortedLastIndex into _.sortedLastIndexBy -- [x] Split _.uniq into _.sortedUniq, _.sortedUniqBy, & _.uniqBy - -changes: -- [x] Absorbed _.sortByAll into _.sortBy -- [x] Changed the category of _.at to “Object” -- [x] Changed the category of _.bindAll to “Utility” -- [x] Made _.capitalize uppercase the first character & lowercase the rest -- [x] Made _.functions return only own method names - - -added 23 array methods: -- [x] _.concat -- [x] _.differenceBy -- [x] _.differenceWith -- [x] _.flatMap -- [x] _.fromPairs -- [x] _.intersectionBy -- [x] _.intersectionWith -- [x] _.join -- [x] _.pullAll -- [x] _.pullAllBy -- [x] _.reverse -- [x] _.sortedIndexBy -- [x] _.sortedIndexOf -- [x] _.sortedLastIndexBy -- [x] _.sortedLastIndexOf -- [x] _.sortedUniq -- [x] _.sortedUniqBy -- [x] _.unionBy -- [x] _.unionWith -- [x] _.uniqBy -- [x] _.uniqWith -- [x] _.xorBy -- [x] _.xorWith - -added 18 lang methods: -- [x] _.cloneDeepWith -- [x] _.cloneWith -- [x] _.eq -- [x] _.isArrayLike -- [x] _.isArrayLikeObject -- [x] _.isEqualWith -- [x] _.isInteger -- [x] _.isLength -- [x] _.isMatchWith -- [x] _.isNil -- [x] _.isObjectLike -- [x] _.isSafeInteger -- [x] _.isSymbol -- [x] _.toInteger -- [x] _.toLength -- [x] _.toNumber -- [x] _.toSafeInteger -- [x] _.toString - -added 13 object methods: -- [x] _.assignIn -- [x] _.assignInWith -- [x] _.assignWith -- [x] _.functionsIn -- [x] _.hasIn -- [x] _.mergeWith -- [x] _.omitBy -- [x] _.pickBy - - -added 8 string methods: -- [x] _.lowerCase -- [x] _.lowerFirst -- [x] _.upperCase -- [x] _.upperFirst -- [x] _.toLower -- [x] _.toUpper - -added 8 utility methods: -- [x] _.toPath - -added 4 math methods: -- [x] _.maxBy -- [x] _.mean -- [x] _.minBy -- [x] _.sumBy - -added 2 function methods: -- [x] _.flip -- [x] _.unary - -added 2 number methods: -- [x] _.clamp -- [x] _.subtract - -added collection method: -- [x] _.sampleSize - -Added 3 aliases - -- [x] _.first as an alias of _.head - -Removed 17 aliases -- [x] Removed aliase _.all -- [x] Removed aliase _.any -- [x] Removed aliase _.backflow -- [x] Removed aliase _.callback -- [x] Removed aliase _.collect -- [x] Removed aliase _.compose -- [x] Removed aliase _.contains -- [x] Removed aliase _.detect -- [x] Removed aliase _.foldl -- [x] Removed aliase _.foldr -- [x] Removed aliase _.include -- [x] Removed aliase _.inject -- [x] Removed aliase _.methods -- [x] Removed aliase _.object -- [x] Removed aliase _.run -- [x] Removed aliase _.select -- [x] Removed aliase _.unique - -Other changes -- [x] Added support for array buffers to _.isEqual -- [x] Added support for converting iterators to _.toArray -- [x] Added support for deep paths to _.zipObject -- [x] Changed UMD to export to window or self when available regardless of other exports -- [x] Ensured debounce cancel clears args & thisArg references -- [x] Ensured _.add, _.subtract, & _.sum don’t skip NaN values -- [x] Ensured _.clone treats generators like functions -- [x] Ensured _.clone produces clones with the source’s [[Prototype]] -- [x] Ensured _.defaults assigns properties that shadow Object.prototype -- [x] Ensured _.defaultsDeep doesn’t merge a string into an array -- [x] Ensured _.defaultsDeep & _.merge don’t modify sources -- [x] Ensured _.defaultsDeep works with circular references -- [x] Ensured _.keys skips “length” on strict mode arguments objects in Safari 9 -- [x] Ensured _.merge doesn’t convert strings to arrays -- [x] Ensured _.merge merges plain-objects onto non plain-objects -- [x] Ensured _#plant resets iterator data of cloned sequences -- [x] Ensured _.random swaps min & max if min is greater than max -- [x] Ensured _.range preserves the sign of start of -0 -- [x] Ensured _.reduce & _.reduceRight use getIteratee in their array branch -- [x] Fixed rounding issue with the precision param of _.floor -- [x] Added flush method to debounced & throttled functions - -** LATER ** -Misc: -- [ ] Made _.forEach, _.forIn, _.forOwn, & _.times implicitly end a chain sequence -- [ ] Removed thisArg params from most methods -- [ ] Made “By” methods provide a single param to iteratees -- [ ] Made _.words chainable by default -- [ ] Removed isDeep params from _.clone & _.flatten -- [ ] Removed _.bindAll support for binding all methods when no names are provided -- [ ] Removed func-first param signature from _.before & _.after -- [ ] _.extend as an alias of _.assignIn -- [ ] _.extendWith as an alias of _.assignInWith -- [ ] Added clear method to _.memoize.Cache -- [ ] Added support for ES6 maps, sets, & symbols to _.clone, _.isEqual, & _.toArray -- [ ] Enabled _.flow & _.flowRight to accept an array of functions -- [ ] Ensured “Collection” methods treat functions as objects -- [ ] Ensured _.assign, _.defaults, & _.merge coerce object values to objects -- [ ] Ensured _.bindKey bound functions call object[key] when called with the new operator -- [ ] Ensured _.isFunction returns true for generator functions -- [ ] Ensured _.merge assigns typed arrays directly -- [ ] Made _(...) an iterator & iterable -- [ ] Made _.drop, _.take, & right forms coerce n of undefined to 0 - -Methods: -- [ ] _.concat -- [ ] _.differenceBy -- [ ] _.differenceWith -- [ ] _.flatMap -- [ ] _.fromPairs -- [ ] _.intersectionBy -- [ ] _.intersectionWith -- [ ] _.join -- [ ] _.pullAll -- [ ] _.pullAllBy -- [ ] _.reverse -- [ ] _.sortedLastIndexOf -- [ ] _.unionBy -- [ ] _.unionWith -- [ ] _.uniqWith -- [ ] _.xorBy -- [ ] _.xorWith -- [ ] _.toString - -- [ ] _.invoke -- [ ] _.setWith -- [ ] _.toPairs -- [ ] _.toPairsIn -- [ ] _.unset - -- [ ] _.replace -- [ ] _.split - -- [ ] _.cond -- [ ] _.conforms -- [ ] _.nthArg -- [ ] _.over -- [ ] _.overEvery -- [ ] _.overSome -- [ ] _.rangeRight - -- [ ] _.next -*/ +// Definitions by: Brian Zengel +// Definitions: https://github.com/borisyankov/DefinitelyTyped declare var _: _.LoDashStatic; @@ -253,10 +20,10 @@ declare module _ { * after, assign, bind, bindAll, bindKey, chain, chunk, compact, compose, concat, countBy, * createCallback, curry, debounce, defaults, defer, delay, difference, filter, flatten, * forEach, forEachRight, forIn, forInRight, forOwn, forOwnRight, functions, groupBy, - * keyBy, initial, intersection, invert, invoke, keys, map, max, memoize, merge, min, + * indexBy, initial, intersection, invert, invoke, keys, map, max, memoize, merge, min, * object, omit, once, pairs, partial, partialRight, pick, pluck, pull, push, range, reject, - * remove, rest, reverse, sample, shuffle, slice, sort, sortBy, splice, tap, throttle, times, - * toArray, transform, union, uniq, unset, unshift, unzip, values, where, without, wrap, and zip + * remove, rest, reverse, shuffle, slice, sort, sortBy, splice, tap, throttle, times, + * toArray, transform, union, uniq, unshift, unzip, values, where, without, wrap, and zip * * The non-chainable wrapper functions are: * clone, cloneDeep, contains, escape, every, find, findIndex, findKey, findLast, @@ -271,19 +38,24 @@ declare module _ { * * Explicit chaining can be enabled by using the _.chain method. **/ - (value: number): LoDashImplicitWrapper; - (value: string): LoDashImplicitStringWrapper; - (value: boolean): LoDashImplicitWrapper; - (value: Array): LoDashImplicitNumberArrayWrapper; - (value: Array): LoDashImplicitArrayWrapper; - (value: T): LoDashImplicitObjectWrapper; - (value: any): LoDashImplicitWrapper; + (value: number): LoDashWrapper; + (value: string): LoDashWrapper; + (value: boolean): LoDashWrapper; + (value: Array): LoDashNumberArrayWrapper; + (value: Array): LoDashArrayWrapper; + (value: T): LoDashObjectWrapper; + (value: any): LoDashWrapper; /** * The semantic version number. **/ VERSION: string; + /** + * An object used to flag environments features. + **/ + support: Support; + /** * By default, the template delimiters used by Lo-Dash are similar to those in embedded Ruby * (ERB). Change the following template settings to use alternative delimiters. @@ -323,20716 +95,6599 @@ declare module _ { } /** - * Creates a cache object to store key/value pairs. - */ - interface MapCache { + * An object used to flag environments features. + **/ + interface Support { /** - * Removes `key` and its value from the cache. - * @param key The key of the value to remove. - * @return Returns `true` if the entry was removed successfully, else `false`. - */ - delete(key: string): boolean; + * Detect if an arguments object's [[Class]] is resolvable (all but Firefox < 4, IE < 9). + **/ + argsClass: boolean; /** - * Gets the cached value for `key`. - * @param key The key of the value to get. - * @return Returns the cached value. - */ - get(key: string): any; + * Detect if arguments objects are Object objects (all but Narwhal and Opera < 10.5). + **/ + argsObject: boolean; /** - * Checks if a cached value for `key` exists. - * @param key The key of the entry to check. - * @return Returns `true` if an entry for `key` exists, else `false`. - */ - has(key: string): boolean; + * Detect if name or message properties of Error.prototype are enumerable by default. + * (IE < 9, Safari < 5.1) + **/ + enumErrorProps: boolean; /** - * Sets `value` to `key` of the cache. - * @param key The key of the value to cache. - * @param value The value to cache. - * @return Returns the cache object. - */ - set(key: string, value: any): _.Dictionary; - } - interface MapCacheConstructor { - new (): MapCache; - } + * Detect if Function#bind exists and is inferred to be fast (all but V8). + **/ + fastBind: boolean; - interface LoDashWrapperBase { } + /** + * Detect if functions can be decompiled by Function#toString (all but PS3 and older Opera + * mobile browsers & avoided in Windows 8 apps). + **/ + funcDecomp: boolean; - interface LoDashImplicitWrapperBase extends LoDashWrapperBase { } + /** + * Detect if Function#name is supported (all but IE). + **/ + funcNames: boolean; - interface LoDashExplicitWrapperBase extends LoDashWrapperBase { } + /** + * Detect if arguments object indexes are non-enumerable (Firefox < 4, IE < 9, PhantomJS, + * Safari < 5.1). + **/ + nonEnumArgs: boolean; - interface LoDashImplicitWrapper extends LoDashImplicitWrapperBase> { } + /** + * Detect if properties shadowing those on Object.prototype are non-enumerable. + * + * In IE < 9 an objects own properties, shadowing non-enumerable ones, are made + * non-enumerable as well (a.k.a the JScript [[DontEnum]] bug). + **/ + nonEnumShadows: boolean; - interface LoDashExplicitWrapper extends LoDashExplicitWrapperBase> { } + /** + * Detect if own properties are iterated after inherited properties (all but IE < 9). + **/ + ownLast: boolean; - interface LoDashImplicitStringWrapper extends LoDashImplicitWrapper { } + /** + * Detect if Array#shift and Array#splice augment array-like objects correctly. + * + * Firefox < 10, IE compatibility mode, and IE < 9 have buggy Array shift() and splice() + * functions that fail to remove the last element, value[0], of array-like objects even + * though the length property is set to 0. The shift() method is buggy in IE 8 compatibility + * mode, while splice() is buggy regardless of mode in IE < 9 and buggy in compatibility mode + * in IE 9. + **/ + spliceObjects: boolean; - interface LoDashExplicitStringWrapper extends LoDashExplicitWrapper { } + /** + * Detect lack of support for accessing string characters by index. + * + * IE < 8 can't access characters by index and IE 8 can only access characters by index on + * string literals. + **/ + unindexedChars: boolean; + } - interface LoDashImplicitObjectWrapper extends LoDashImplicitWrapperBase> { } + interface LoDashWrapperBase { + /** + * Produces the toString result of the wrapped value. + * @return Returns the string result. + **/ + toString(): string; - interface LoDashExplicitObjectWrapper extends LoDashExplicitWrapperBase> { } + /** + * Extracts the wrapped value. + * @return The wrapped value. + **/ + valueOf(): T; - interface LoDashImplicitArrayWrapper extends LoDashImplicitWrapperBase> { - pop(): T; - push(...items: T[]): LoDashImplicitArrayWrapper; - shift(): T; - sort(compareFn?: (a: T, b: T) => number): LoDashImplicitArrayWrapper; - splice(start: number): LoDashImplicitArrayWrapper; - splice(start: number, deleteCount: number, ...items: any[]): LoDashImplicitArrayWrapper; - unshift(...items: T[]): LoDashImplicitArrayWrapper; + /** + * @see valueOf + **/ + value(): T; } - interface LoDashExplicitArrayWrapper extends LoDashExplicitWrapperBase> { - pop(): LoDashExplicitObjectWrapper; - push(...items: T[]): LoDashExplicitArrayWrapper; - shift(): LoDashExplicitObjectWrapper; - sort(compareFn?: (a: T, b: T) => number): LoDashExplicitArrayWrapper; - splice(start: number): LoDashExplicitArrayWrapper; - splice(start: number, deleteCount: number, ...items: any[]): LoDashExplicitArrayWrapper; - unshift(...items: T[]): LoDashExplicitArrayWrapper; - } + interface LoDashWrapper extends LoDashWrapperBase> { } - interface LoDashImplicitNumberArrayWrapper extends LoDashImplicitArrayWrapper { } + interface LoDashObjectWrapper extends LoDashWrapperBase> { } - interface LoDashExplicitNumberArrayWrapper extends LoDashExplicitArrayWrapper { } + interface LoDashArrayWrapper extends LoDashWrapperBase> { + concat(...items: T[]): LoDashArrayWrapper; + join(seperator?: string): LoDashWrapper; + pop(): LoDashWrapper; + push(...items: T[]): void; + reverse(): LoDashArrayWrapper; + shift(): LoDashWrapper; + slice(start: number, end?: number): LoDashArrayWrapper; + sort(compareFn?: (a: T, b: T) => number): LoDashArrayWrapper; + splice(start: number): LoDashArrayWrapper; + splice(start: number, deleteCount: number, ...items: any[]): LoDashArrayWrapper; + unshift(...items: any[]): LoDashWrapper; + } - /********* - * Array * - *********/ + interface LoDashNumberArrayWrapper extends LoDashArrayWrapper { } - //_.chunk + //_.chain interface LoDashStatic { /** - * Creates an array of elements split into groups the length of size. If collection can’t be split evenly, the - * final chunk will be the remaining elements. - * - * @param array The array to process. - * @param size The length of each chunk. - * @return Returns the new array containing chunks. - */ - chunk( - array: List, - size?: number - ): T[][]; + * Creates a lodash object that wraps the given value with explicit method chaining enabled. + * @param value The value to wrap. + * @return The wrapper object. + **/ + chain(value: number): LoDashWrapper; + chain(value: string): LoDashWrapper; + chain(value: boolean): LoDashWrapper; + chain(value: Array): LoDashArrayWrapper; + chain(value: T): LoDashObjectWrapper; + chain(value: any): LoDashWrapper; } - interface LoDashImplicitArrayWrapper { + interface LoDashWrapperBase { /** - * @see _.chunk - */ - chunk(size?: number): LoDashImplicitArrayWrapper; + * Enables explicit method chaining on the wrapper object. + * @see _.chain + * @return The wrapper object. + **/ + chain(): TWrapper; } - interface LoDashImplicitObjectWrapper { + //_.tap + interface LoDashStatic { /** - * @see _.chunk - */ - chunk(size?: number): LoDashImplicitArrayWrapper; + * Invokes interceptor with the value as the first argument and then returns value. The + * purpose of this method is to "tap into" a method chain in order to perform operations on + * intermediate results within the chain. + * @param value The value to provide to interceptor + * @param interceptor The function to invoke. + * @return value + **/ + tap( + value: T, + interceptor: (value: T) => void): T; } - interface LoDashExplicitArrayWrapper { + interface LoDashWrapperBase { /** - * @see _.chunk - */ - chunk(size?: number): LoDashExplicitArrayWrapper; + * @see _.tap + **/ + tap(interceptor: (value: T) => void): TWrapper; } - interface LoDashExplicitObjectWrapper { - /** - * @see _.chunk - */ - chunk(size?: number): LoDashExplicitArrayWrapper; - } + /********* + * Arrays * + **********/ - //_.compact + //_.chunk interface LoDashStatic { /** - * Creates an array with all falsey values removed. The values false, null, 0, "", undefined, and NaN are - * falsey. - * - * @param array The array to compact. - * @return (Array) Returns the new array of filtered values. - */ - compact(array?: List): T[]; - } + * Creates an array of elements split into groups the length of size. If collection can't be + * split evenly, the final chunk will be the remaining elements. + * @param array The array to process. + * @param size The length of each chunk. + * @return Returns the new array containing chunks. + **/ + chunk(array: Array, size?: number): T[][]; - interface LoDashImplicitArrayWrapper { /** - * @see _.compact - */ - compact(): LoDashImplicitArrayWrapper; + * @see _.chunk + **/ + chunk(array: List, size?: number): T[][]; } - interface LoDashImplicitObjectWrapper { + interface LoDashArrayWrapper { /** - * @see _.compact - */ - compact(): LoDashImplicitArrayWrapper; + * @see _.chunk + **/ + chunk(size?: number): LoDashArrayWrapper; } - interface LoDashExplicitArrayWrapper { + //_.compact + interface LoDashStatic { /** - * @see _.compact - */ - compact(): LoDashExplicitArrayWrapper; - } + * Returns a copy of the array with all falsy values removed. In JavaScript, false, null, 0, "", + * undefined and NaN are all falsy. + * @param array Array to compact. + * @return (Array) Returns a new array of filtered values. + **/ + compact(array?: Array): T[]; - interface LoDashExplicitObjectWrapper { /** - * @see _.compact - */ - compact(): LoDashExplicitArrayWrapper; + * @see _.compact + **/ + compact(array?: List): T[]; } - //_.concat DUMMY - interface LoDashStatic { + interface LoDashArrayWrapper { /** - * Creates a new array concatenating `array` with any additional arrays - * and/or values. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to concatenate. - * @param {...*} [values] The values to concatenate. - * @returns {Array} Returns the new concatenated array. - * @example - * - * var array = [1]; - * var other = _.concat(array, 2, [3], [[4]]); - * - * console.log(other); - * // => [1, 2, 3, [4]] - * - * console.log(array); - * // => [1] - */ - concat(array: T[]|List, ...values: (T|T[]|List)[]) : T[]; + * @see _.compact + **/ + compact(): LoDashArrayWrapper; } //_.difference interface LoDashStatic { /** - * Creates an array of unique array values not included in the other provided arrays using SameValueZero for - * equality comparisons. - * - * @param array The array to inspect. - * @param values The arrays of values to exclude. - * @return Returns the new array of filtered values. - */ + * Creates an array excluding all values of the provided arrays using strict equality for comparisons + * , i.e. ===. + * @param array The array to process + * @param others The arrays of values to exclude. + * @return Returns a new array of filtered values. + **/ + difference( + array?: Array, + ...others: Array[]): T[]; + /** + * @see _.difference + **/ difference( - array: T[]|List, - ...values: Array> - ): T[]; + array?: List, + ...others: List[]): T[]; } - interface LoDashImplicitArrayWrapper { + interface LoDashArrayWrapper { /** - * @see _.difference - */ - difference(...values: (T[]|List)[]): LoDashImplicitArrayWrapper; + * @see _.difference + **/ + difference( + ...others: Array[]): LoDashArrayWrapper; + /** + * @see _.difference + **/ + difference( + ...others: List[]): LoDashArrayWrapper; } - interface LoDashImplicitObjectWrapper { + //_.findIndex + interface LoDashStatic { /** - * @see _.difference - */ - difference(...values: (TValue[]|List)[]): LoDashImplicitArrayWrapper; - } + * This method is like _.find except that it returns the index of the first element that passes + * the callback check, instead of the element itself. + * @param array The array to search. + * @param {(Function|Object|string)} callback The function called per iteration. If a property name or object is provided it will be + * used to create a ".pluck" or ".where" style callback, respectively. + * @param thisArg The this binding of callback. + * @return Returns the index of the found element, else -1. + **/ + findIndex( + array: Array, + callback: ListIterator, + thisArg?: any): number; - interface LoDashExplicitArrayWrapper { /** - * @see _.difference - */ - difference(...values: (T[]|List)[]): LoDashExplicitArrayWrapper; - } + * @see _.findIndex + **/ + findIndex( + array: List, + callback: ListIterator, + thisArg?: any): number; - interface LoDashExplicitObjectWrapper { /** - * @see _.difference - */ - difference(...values: (TValue[]|List)[]): LoDashExplicitArrayWrapper; - } + * @see _.findIndex + **/ + findIndex( + array: Array, + pluckValue: string): number; - //_.differenceBy - interface LoDashStatic { /** - * This method is like _.difference except that it accepts iteratee which is invoked for each element of array - * and values to generate the criterion by which uniqueness is computed. The iteratee is invoked with one - * argument: (value). - * - * @param array The array to inspect. - * @param values The values to exclude. - * @param iteratee The iteratee invoked per element. - * @returns Returns the new array of filtered values. - */ - differenceBy( - array: T[]|List, - values?: T[]|List, - iteratee?: ((value: T) => any)|string - ): T[]; + * @see _.findIndex + **/ + findIndex( + array: List, + pluckValue: string): number; /** - * @see _.differenceBy - */ - differenceBy( - array: T[]|List, - values?: T[]|List, - iteratee?: W - ): T[]; + * @see _.findIndex + **/ + findIndex( + array: Array, + whereDictionary: W): number; /** - * @see _.differenceBy - */ - differenceBy( - array: T[]|List, - values1?: T[]|List, - values2?: T[]|List, - iteratee?: ((value: T) => any)|string - ): T[]; + * @see _.findIndex + **/ + findIndex( + array: List, + whereDictionary: W): number; + } + //_.findLastIndex + interface LoDashStatic { /** - * @see _.differenceBy - */ - differenceBy( - array: T[]|List, - values1?: T[]|List, - values2?: T[]|List, - iteratee?: W - ): T[]; + * This method is like _.findIndex except that it iterates over elements of a collection from right to left. + * @param array The array to search. + * @param {(Function|Object|string)} callback The function called per iteration. If a property name or object is provided it will be + * used to create a ".pluck" or ".where" style callback, respectively. + * @param thisArg The this binding of callback. + * @return Returns the index of the found element, else -1. + **/ + findLastIndex( + array: Array, + callback: ListIterator, + thisArg?: any): number; /** - * @see _.differenceBy - */ - differenceBy( - array: T[]|List, - values1?: T[]|List, - values2?: T[]|List, - values3?: T[]|List, - iteratee?: ((value: T) => any)|string - ): T[]; + * @see _.findLastIndex + **/ + findLastIndex( + array: List, + callback: ListIterator, + thisArg?: any): number; /** - * @see _.differenceBy - */ - differenceBy( - array: T[]|List, - values1?: T[]|List, - values2?: T[]|List, - values3?: T[]|List, - iteratee?: W - ): T[]; + * @see _.findLastIndex + **/ + findLastIndex( + array: Array, + pluckValue: string): number; /** - * @see _.differenceBy - */ - differenceBy( - array: T[]|List, - values1?: T[]|List, - values2?: T[]|List, - values3?: T[]|List, - values4?: T[]|List, - iteratee?: W - ): T[]; + * @see _.findLastIndex + **/ + findLastIndex( + array: List, + pluckValue: string): number; /** - * @see _.differenceBy - */ - differenceBy( - array: T[]|List, - values1?: T[]|List, - values2?: T[]|List, - values3?: T[]|List, - values4?: T[]|List, - iteratee?: ((value: T) => any)|string - ): T[]; + * @see _.findLastIndex + **/ + findLastIndex( + array: Array, + whereDictionary: Dictionary): number; /** - * @see _.differenceBy - */ - differenceBy( - array: T[]|List, - values1?: T[]|List, - values2?: T[]|List, - values3?: T[]|List, - values4?: T[]|List, - values5?: T[]|List, - iteratee?: ((value: T) => any)|string - ): T[]; - - /** - * @see _.differenceBy - */ - differenceBy( - array: T[]|List, - values1?: T[]|List, - values2?: T[]|List, - values3?: T[]|List, - values4?: T[]|List, - values5?: T[]|List, - iteratee?: W - ): T[]; - - /** - * @see _.differenceBy - */ - differenceBy( - array: T[]|List, - ...values: any[] - ): T[]; + * @see _.findLastIndex + **/ + findLastIndex( + array: List, + whereDictionary: Dictionary): number; } - interface LoDashImplicitArrayWrapper { + //_.first + interface LoDashStatic { /** - * @see _.differenceBy - */ - differenceBy( - values?: T[]|List, - iteratee?: ((value: T) => any)|string - ): LoDashImplicitArrayWrapper; + * Gets the first element or first n elements of an array. If a callback is provided + * elements at the beginning of the array are returned as long as the callback returns + * truey. The callback is bound to thisArg and invoked with three arguments; (value, + * index, array). + * + * If a property name is provided for callback the created "_.pluck" style callback + * will return the property value of the given element. + * + * If an object is provided for callback the created "_.where" style callback will return ] + * true for elements that have the properties of the given object, else false. + * @param array Retrieves the first element of this array. + * @return Returns the first element of `array`. + **/ + first(array?: Array): T; /** - * @see _.differenceBy - */ - differenceBy( - values?: T[]|List, - iteratee?: W - ): LoDashImplicitArrayWrapper; + * @see _.first + **/ + first(array?: List): T; /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - iteratee?: ((value: T) => any)|string - ): LoDashImplicitArrayWrapper; + * @see _.first + * @param n The number of elements to return. + **/ + first( + array: Array, + n: number): T[]; /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - iteratee?: W - ): LoDashImplicitArrayWrapper; + * @see _.first + * @param n The number of elements to return. + **/ + first( + array: List, + n: number): T[]; /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - values3?: T[]|List, - iteratee?: ((value: T) => any)|string - ): LoDashImplicitArrayWrapper; + * @see _.first + * @param callback The function called per element. + * @param [thisArg] The this binding of callback. + **/ + first( + array: Array, + callback: ListIterator, + thisArg?: any): T[]; /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - values3?: T[]|List, - iteratee?: W - ): LoDashImplicitArrayWrapper; + * @see _.first + * @param callback The function called per element. + * @param [thisArg] The this binding of callback. + **/ + first( + array: List, + callback: ListIterator, + thisArg?: any): T[]; /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - values3?: T[]|List, - values4?: T[]|List, - iteratee?: ((value: T) => any)|string - ): LoDashImplicitArrayWrapper; + * @see _.first + * @param pluckValue "_.pluck" style callback value + **/ + first( + array: Array, + pluckValue: string): T[]; /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - values3?: T[]|List, - values4?: T[]|List, - iteratee?: W - ): LoDashImplicitArrayWrapper; + * @see _.first + * @param pluckValue "_.pluck" style callback value + **/ + first( + array: List, + pluckValue: string): T[]; /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - values3?: T[]|List, - values4?: T[]|List, - values5?: T[]|List, - iteratee?: ((value: T) => any)|string - ): LoDashImplicitArrayWrapper; + * @see _.first + * @param whereValue "_.where" style callback value + **/ + first( + array: Array, + whereValue: W): T[]; /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - values3?: T[]|List, - values4?: T[]|List, - values5?: T[]|List, - iteratee?: W - ): LoDashImplicitArrayWrapper; + * @see _.first + * @param whereValue "_.where" style callback value + **/ + first( + array: List, + whereValue: W): T[]; /** - * @see _.differenceBy - */ - differenceBy( - ...values: any[] - ): LoDashImplicitArrayWrapper; - } + * @see _.first + **/ + head(array: Array): T; - interface LoDashImplicitObjectWrapper { /** - * @see _.differenceBy - */ - differenceBy( - values?: T[]|List, - iteratee?: ((value: T) => any)|string - ): LoDashImplicitArrayWrapper; + * @see _.first + **/ + head(array: List): T; /** - * @see _.differenceBy - */ - differenceBy( - values?: T[]|List, - iteratee?: W - ): LoDashImplicitArrayWrapper; + * @see _.first + **/ + head( + array: Array, + n: number): T[]; /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - iteratee?: ((value: T) => any)|string - ): LoDashImplicitArrayWrapper; + * @see _.first + **/ + head( + array: List, + n: number): T[]; /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - iteratee?: W - ): LoDashImplicitArrayWrapper; + * @see _.first + **/ + head( + array: Array, + callback: ListIterator, + thisArg?: any): T[]; /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - values3?: T[]|List, - iteratee?: ((value: T) => any)|string - ): LoDashImplicitArrayWrapper; + * @see _.first + **/ + head( + array: List, + callback: ListIterator, + thisArg?: any): T[]; /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - values3?: T[]|List, - iteratee?: W - ): LoDashImplicitArrayWrapper; + * @see _.first + **/ + head( + array: Array, + pluckValue: string): T[]; /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - values3?: T[]|List, - values4?: T[]|List, - iteratee?: ((value: T) => any)|string - ): LoDashImplicitArrayWrapper; + * @see _.first + **/ + head( + array: List, + pluckValue: string): T[]; /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - values3?: T[]|List, - values4?: T[]|List, - iteratee?: W - ): LoDashImplicitArrayWrapper; + * @see _.first + **/ + head( + array: Array, + whereValue: W): T[]; /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - values3?: T[]|List, - values4?: T[]|List, - values5?: T[]|List, - iteratee?: ((value: T) => any)|string - ): LoDashImplicitArrayWrapper; + * @see _.first + **/ + head( + array: List, + whereValue: W): T[]; /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - values3?: T[]|List, - values4?: T[]|List, - values5?: T[]|List, - iteratee?: W - ): LoDashImplicitArrayWrapper; + * @see _.first + **/ + take(array: Array): T; /** - * @see _.differenceBy - */ - differenceBy( - ...values: any[] - ): LoDashImplicitArrayWrapper; - } + * @see _.first + **/ + take(array: List): T; - interface LoDashExplicitArrayWrapper { /** - * @see _.differenceBy - */ - differenceBy( - values?: T[]|List, - iteratee?: ((value: T) => any)|string - ): LoDashExplicitArrayWrapper; + * @see _.first + **/ + take( + array: Array, + n: number): T[]; /** - * @see _.differenceBy - */ - differenceBy( - values?: T[]|List, - iteratee?: W - ): LoDashExplicitArrayWrapper; + * @see _.first + **/ + take( + array: List, + n: number): T[]; /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - iteratee?: ((value: T) => any)|string - ): LoDashExplicitArrayWrapper; + * @see _.first + **/ + take( + array: Array, + callback: ListIterator, + thisArg?: any): T[]; /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - iteratee?: W - ): LoDashExplicitArrayWrapper; + * @see _.first + **/ + take( + array: List, + callback: ListIterator, + thisArg?: any): T[]; /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - values3?: T[]|List, - iteratee?: ((value: T) => any)|string - ): LoDashExplicitArrayWrapper; + * @see _.first + **/ + take( + array: Array, + pluckValue: string): T[]; /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - values3?: T[]|List, - iteratee?: W - ): LoDashExplicitArrayWrapper; + * @see _.first + **/ + take( + array: List, + pluckValue: string): T[]; /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - values3?: T[]|List, - values4?: T[]|List, - iteratee?: ((value: T) => any)|string - ): LoDashExplicitArrayWrapper; + * @see _.first + **/ + take( + array: Array, + whereValue: W): T[]; /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - values3?: T[]|List, - values4?: T[]|List, - iteratee?: W - ): LoDashExplicitArrayWrapper; + * @see _.first + **/ + take( + array: List, + whereValue: W): T[]; + } + interface LoDashArrayWrapper { /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - values3?: T[]|List, - values4?: T[]|List, - values5?: T[]|List, - iteratee?: ((value: T) => any)|string - ): LoDashExplicitArrayWrapper; + * @see _.first + **/ + first(): T; /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - values3?: T[]|List, - values4?: T[]|List, - values5?: T[]|List, - iteratee?: W - ): LoDashExplicitArrayWrapper; + * @see _.first + * @param n The number of elements to return. + **/ + first(n: number): LoDashArrayWrapper; /** - * @see _.differenceBy - */ - differenceBy( - ...values: any[] - ): LoDashExplicitArrayWrapper; - } + * @see _.first + * @param callback The function called per element. + * @param [thisArg] The this binding of callback. + **/ + first( + callback: ListIterator, + thisArg?: any): LoDashArrayWrapper; - interface LoDashExplicitObjectWrapper { /** - * @see _.differenceBy - */ - differenceBy( - values?: T[]|List, - iteratee?: ((value: T) => any)|string - ): LoDashExplicitArrayWrapper; + * @see _.first + * @param pluckValue "_.pluck" style callback value + **/ + first(pluckValue: string): LoDashArrayWrapper; /** - * @see _.differenceBy - */ - differenceBy( - values?: T[]|List, - iteratee?: W - ): LoDashExplicitArrayWrapper; + * @see _.first + * @param whereValue "_.where" style callback value + **/ + first(whereValue: W): LoDashArrayWrapper; /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - iteratee?: ((value: T) => any)|string - ): LoDashExplicitArrayWrapper; + * @see _.first + **/ + head(): T; /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - iteratee?: W - ): LoDashExplicitArrayWrapper; + * @see _.first + * @param n The number of elements to return. + **/ + head(n: number): LoDashArrayWrapper; /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - values3?: T[]|List, - iteratee?: ((value: T) => any)|string - ): LoDashExplicitArrayWrapper; + * @see _.first + * @param callback The function called per element. + * @param [thisArg] The this binding of callback. + **/ + head( + callback: ListIterator, + thisArg?: any): LoDashArrayWrapper; /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - values3?: T[]|List, - iteratee?: W - ): LoDashExplicitArrayWrapper; + * @see _.first + * @param pluckValue "_.pluck" style callback value + **/ + head(pluckValue: string): LoDashArrayWrapper; /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - values3?: T[]|List, - values4?: T[]|List, - iteratee?: ((value: T) => any)|string - ): LoDashExplicitArrayWrapper; + * @see _.first + * @param whereValue "_.where" style callback value + **/ + head(whereValue: W): LoDashArrayWrapper; /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - values3?: T[]|List, - values4?: T[]|List, - iteratee?: W - ): LoDashExplicitArrayWrapper; + * @see _.first + **/ + take(): T; /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - values3?: T[]|List, - values4?: T[]|List, - values5?: T[]|List, - iteratee?: ((value: T) => any)|string - ): LoDashExplicitArrayWrapper; + * @see _.first + * @param n The number of elements to return. + **/ + take(n: number): LoDashArrayWrapper; /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - values3?: T[]|List, - values4?: T[]|List, - values5?: T[]|List, - iteratee?: W - ): LoDashExplicitArrayWrapper; + * @see _.first + * @param callback The function called per element. + * @param [thisArg] The this binding of callback. + **/ + take( + callback: ListIterator, + thisArg?: any): LoDashArrayWrapper; /** - * @see _.differenceBy - */ - differenceBy( - ...values: any[] - ): LoDashExplicitArrayWrapper; - } + * @see _.first + * @param pluckValue "_.pluck" style callback value + **/ + take(pluckValue: string): LoDashArrayWrapper; - //_.differenceWith DUMMY - interface LoDashStatic { /** - * Creates an array of unique `array` values not included in the other - * provided arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) - * for equality comparisons. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to inspect. - * @param {...Array} [values] The values to exclude. - * @returns {Array} Returns the new array of filtered values. - * @example - * - * _.difference([3, 2, 1], [4, 2]); - * // => [3, 1] - */ - differenceWith( - array: any[]|List, - ...values: any[] - ): any[]; + * @see _.first + * @param whereValue "_.where" style callback value + **/ + take(whereValue: W): LoDashArrayWrapper; } - //_.drop + //_.flatten interface LoDashStatic { /** - * Creates a slice of array with n elements dropped from the beginning. - * - * @param array The array to query. - * @param n The number of elements to drop. - * @return Returns the slice of array. - */ - drop(array: T[]|List, n?: number): T[]; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.drop - */ - drop(n?: number): LoDashImplicitArrayWrapper; - } + * Flattens a nested array (the nesting can be to any depth). If isShallow is truey, the + * array will only be flattened a single level. If a callback is provided each element of + * the array is passed through the callback before flattening. The callback is bound to + * thisArg and invoked with three arguments; (value, index, array). + * + * If a property name is provided for callback the created "_.pluck" style callback will + * return the property value of the given element. + * + * If an object is provided for callback the created "_.where" style callback will return + * true for elements that have the properties of the given object, else false. + * @param array The array to flatten. + * @param shallow If true then only flatten one level, optional, default = false. + * @return `array` flattened. + **/ + flatten(array: Array, isShallow?: boolean): T[]; - interface LoDashImplicitObjectWrapper { /** - * @see _.drop - */ - drop(n?: number): LoDashImplicitArrayWrapper; - } + * @see _.flatten + **/ + flatten(array: List, isShallow?: boolean): T[]; - interface LoDashExplicitArrayWrapper { /** - * @see _.drop - */ - drop(n?: number): LoDashExplicitArrayWrapper; - } + * @see _.flatten + **/ + flatten( + array: Array, + isShallow: boolean, + callback: ListIterator, + thisArg?: any): T[]; - interface LoDashExplicitObjectWrapper { /** - * @see _.drop - */ - drop(n?: number): LoDashExplicitArrayWrapper; - } + * @see _.flatten + **/ + flatten( + array: List, + isShallow: boolean, + callback: ListIterator, + thisArg?: any): T[]; - //_.dropRight - interface LoDashStatic { /** - * Creates a slice of array with n elements dropped from the end. - * - * @param array The array to query. - * @param n The number of elements to drop. - * @return Returns the slice of array. - */ - dropRight( - array: List, - n?: number - ): T[]; - } + * @see _.flatten + **/ + flatten( + array: Array, + callback: ListIterator, + thisArg?: any): T[]; - interface LoDashImplicitArrayWrapper { /** - * @see _.dropRight - */ - dropRight(n?: number): LoDashImplicitArrayWrapper; - } + * @see _.flatten + **/ + flatten( + array: List, + callback: ListIterator, + thisArg?: any): T[]; - interface LoDashImplicitObjectWrapper { /** - * @see _.dropRight - */ - dropRight(n?: number): LoDashImplicitArrayWrapper; - } + * @see _.flatten + **/ + flatten( + array: Array, + isShallow: boolean, + whereValue: W): T[]; - interface LoDashExplicitArrayWrapper { /** - * @see _.dropRight - */ - dropRight(n?: number): LoDashExplicitArrayWrapper; - } + * @see _.flatten + **/ + flatten( + array: List, + isShallow: boolean, + whereValue: W): T[]; - interface LoDashExplicitObjectWrapper { /** - * @see _.dropRight - */ - dropRight(n?: number): LoDashExplicitArrayWrapper; - } + * @see _.flatten + **/ + flatten( + array: Array, + whereValue: W): T[]; - //_.dropRightWhile - interface LoDashStatic { /** - * Creates a slice of array excluding elements dropped from the end. Elements are dropped until predicate - * returns falsey. The predicate is bound to thisArg and invoked with three arguments: (value, index, array). - * - * If a property name is provided for predicate the created _.property style callback returns the property - * value of the given element. - * - * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for - * elements that have a matching property value, else false. - * - * If an object is provided for predicate the created _.matches style callback returns true for elements that - * match the properties of the given object, else false. - * - * @param array The array to query. - * @param predicate The function invoked per iteration. - * @param thisArg The this binding of predicate. - * @return Returns the slice of array. - */ - dropRightWhile( - array: List, - predicate?: ListIterator - ): TValue[]; + * @see _.flatten + **/ + flatten( + array: List, + whereValue: W): T[]; /** - * @see _.dropRightWhile - */ - dropRightWhile( - array: List, - predicate?: string - ): TValue[]; + * @see _.flatten + **/ + flatten( + array: Array, + isShallow: boolean, + pluckValue: string): T[]; /** - * @see _.dropRightWhile - */ - dropRightWhile( - array: List, - predicate?: TWhere - ): TValue[]; - } + * @see _.flatten + **/ + flatten( + array: List, + isShallow: boolean, + pluckValue: string): T[]; - interface LoDashImplicitArrayWrapper { /** - * @see _.dropRightWhile - */ - dropRightWhile( - predicate?: ListIterator - ): LoDashImplicitArrayWrapper; + * @see _.flatten + **/ + flatten( + array: Array, + pluckValue: string): T[]; /** - * @see _.dropRightWhile - */ - dropRightWhile( - predicate?: string - ): LoDashImplicitArrayWrapper; + * @see _.flatten + **/ + flatten( + array: List, + pluckValue: string): T[]; + } + interface LoDashArrayWrapper { /** - * @see _.dropRightWhile - */ - dropRightWhile( - predicate?: TWhere - ): LoDashImplicitArrayWrapper; - } + * @see _.flatten + **/ + flatten(isShallow?: boolean): LoDashArrayWrapper; - interface LoDashImplicitObjectWrapper { /** - * @see _.dropRightWhile - */ - dropRightWhile( - predicate?: ListIterator - ): LoDashImplicitArrayWrapper; + * @see _.flatten + **/ + flatten( + isShallow: boolean, + callback: ListIterator, + thisArg?: any): LoDashArrayWrapper; /** - * @see _.dropRightWhile - */ - dropRightWhile( - predicate?: string - ): LoDashImplicitArrayWrapper; + * @see _.flatten + **/ + flatten( + callback: ListIterator, + thisArg?: any): LoDashArrayWrapper; /** - * @see _.dropRightWhile - */ - dropRightWhile( - predicate?: TWhere - ): LoDashImplicitArrayWrapper; - } + * @see _.flatten + **/ + flatten( + isShallow: boolean, + pluckValue: string): LoDashArrayWrapper; - interface LoDashExplicitArrayWrapper { /** - * @see _.dropRightWhile - */ - dropRightWhile( - predicate?: ListIterator - ): LoDashExplicitArrayWrapper; + * @see _.flatten + **/ + flatten( + pluckValue: string): LoDashArrayWrapper; /** - * @see _.dropRightWhile - */ - dropRightWhile( - predicate?: string - ): LoDashExplicitArrayWrapper; + * @see _.flatten + **/ + flatten( + isShallow: boolean, + whereValue: W): LoDashArrayWrapper; /** - * @see _.dropRightWhile - */ - dropRightWhile( - predicate?: TWhere - ): LoDashExplicitArrayWrapper; + * @see _.flatten + **/ + flatten( + whereValue: W): LoDashArrayWrapper; } - interface LoDashExplicitObjectWrapper { + //_.indexOf + interface LoDashStatic { /** - * @see _.dropRightWhile - */ - dropRightWhile( - predicate?: ListIterator - ): LoDashExplicitArrayWrapper; + * Gets the index at which the first occurrence of value is found using strict equality + * for comparisons, i.e. ===. If the array is already sorted providing true for fromIndex + * will run a faster binary search. + * @param array The array to search. + * @param value The value to search for. + * @param fromIndex The index to search from. + * @return The index of `value` within `array`. + **/ + indexOf( + array: Array, + value: T): number; /** - * @see _.dropRightWhile - */ - dropRightWhile( - predicate?: string - ): LoDashExplicitArrayWrapper; + * @see _.indexOf + **/ + indexOf( + array: List, + value: T): number; /** - * @see _.dropRightWhile - */ - dropRightWhile( - predicate?: TWhere - ): LoDashExplicitArrayWrapper; - } + * @see _.indexOf + * @param fromIndex The index to search from + **/ + indexOf( + array: Array, + value: T, + fromIndex: number): number; - //_.dropWhile - interface LoDashStatic { /** - * Creates a slice of array excluding elements dropped from the beginning. Elements are dropped until predicate - * returns falsey. The predicate is bound to thisArg and invoked with three arguments: (value, index, array). - * - * If a property name is provided for predicate the created _.property style callback returns the property - * value of the given element. - * - * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for - * elements that have a matching property value, else false. - * - * If an object is provided for predicate the created _.matches style callback returns true for elements that - * have the properties of the given object, else false. - * - * @param array The array to query. - * @param predicate The function invoked per iteration. - * @param thisArg The this binding of predicate. - * @return Returns the slice of array. - */ - dropWhile( - array: List, - predicate?: ListIterator - ): TValue[]; + * @see _.indexOf + * @param fromIndex The index to search from + **/ + indexOf( + array: List, + value: T, + fromIndex: number): number; /** - * @see _.dropWhile - */ - dropWhile( - array: List, - predicate?: string - ): TValue[]; + * @see _.indexOf + * @param isSorted True to perform a binary search on a sorted array. + **/ + indexOf( + array: Array, + value: T, + isSorted: boolean): number; /** - * @see _.dropWhile - */ - dropWhile( - array: List, - predicate?: TWhere - ): TValue[]; + * @see _.indexOf + * @param isSorted True to perform a binary search on a sorted array. + **/ + indexOf( + array: List, + value: T, + isSorted: boolean): number; } - interface LoDashImplicitArrayWrapper { + //_.initial + interface LoDashStatic { /** - * @see _.dropWhile - */ - dropWhile( - predicate?: ListIterator - ): LoDashImplicitArrayWrapper; + * Gets all but the last element or last n elements of an array. If a callback is provided + * elements at the end of the array are excluded from the result as long as the callback + * returns truey. The callback is bound to thisArg and invoked with three arguments; + * (value, index, array). + * + * If a property name is provided for callback the created "_.pluck" style callback will + * return the property value of the given element. + * + * If an object is provided for callback the created "_.where" style callback will return + * true for elements that have the properties of the given object, else false. + * @param array The array to query. + * @param n Leaves this many elements behind, optional. + * @return Returns everything but the last `n` elements of `array`. + **/ + initial( + array: Array): T[]; /** - * @see _.dropWhile - */ - dropWhile( - predicate?: string - ): LoDashImplicitArrayWrapper; + * @see _.initial + **/ + initial( + array: List): T[]; /** - * @see _.dropWhile - */ - dropWhile( - predicate?: TWhere - ): LoDashImplicitArrayWrapper; - } + * @see _.initial + * @param n The number of elements to exclude. + **/ + initial( + array: Array, + n: number): T[]; - interface LoDashImplicitObjectWrapper { /** - * @see _.dropWhile - */ - dropWhile( - predicate?: ListIterator - ): LoDashImplicitArrayWrapper; + * @see _.initial + * @param n The number of elements to exclude. + **/ + initial( + array: List, + n: number): T[]; /** - * @see _.dropWhile - */ - dropWhile( - predicate?: string - ): LoDashImplicitArrayWrapper; + * @see _.initial + * @param callback The function called per element + **/ + initial( + array: Array, + callback: ListIterator): T[]; /** - * @see _.dropWhile - */ - dropWhile( - predicate?: TWhere - ): LoDashImplicitArrayWrapper; - } + * @see _.initial + * @param callback The function called per element + **/ + initial( + array: List, + callback: ListIterator): T[]; - interface LoDashExplicitArrayWrapper { /** - * @see _.dropWhile - */ - dropWhile( - predicate?: ListIterator - ): LoDashExplicitArrayWrapper; + * @see _.initial + * @param pluckValue _.pluck style callback + **/ + initial( + array: Array, + pluckValue: string): T[]; /** - * @see _.dropWhile - */ - dropWhile( - predicate?: string - ): LoDashExplicitArrayWrapper; + * @see _.initial + * @param pluckValue _.pluck style callback + **/ + initial( + array: List, + pluckValue: string): T[]; /** - * @see _.dropWhile - */ - dropWhile( - predicate?: TWhere - ): LoDashExplicitArrayWrapper; - } + * @see _.initial + * @param whereValue _.where style callback + **/ + initial( + array: Array, + whereValue: W): T[]; - interface LoDashExplicitObjectWrapper { /** - * @see _.dropWhile - */ - dropWhile( - predicate?: ListIterator - ): LoDashExplicitArrayWrapper; + * @see _.initial + * @param whereValue _.where style callback + **/ + initial( + array: List, + whereValue: W): T[]; + } + //_.intersection + interface LoDashStatic { /** - * @see _.dropWhile - */ - dropWhile( - predicate?: string - ): LoDashExplicitArrayWrapper; + * Creates an array of unique values present in all provided arrays using strict + * equality for comparisons, i.e. ===. + * @param arrays The arrays to inspect. + * @return Returns an array of composite values. + **/ + intersection(...arrays: Array[]): T[]; /** - * @see _.dropWhile - */ - dropWhile( - predicate?: TWhere - ): LoDashExplicitArrayWrapper; + * @see _.intersection + **/ + intersection(...arrays: List[]): T[]; } - //_.fill + //_.last interface LoDashStatic { /** - * Fills elements of array with value from start up to, but not including, end. - * - * Note: This method mutates array. - * - * @param array The array to fill. - * @param value The value to fill array with. - * @param start The start position. - * @param end The end position. - * @return Returns array. - */ - fill( - array: any[], - value: T, - start?: number, - end?: number - ): T[]; + * Gets the last element or last n elements of an array. If a callback is provided + * elements at the end of the array are returned as long as the callback returns truey. + * The callback is bound to thisArg and invoked with three arguments; (value, index, array). + * + * If a property name is provided for callback the created "_.pluck" style callback will + * return the property value of the given element. + * + * If an object is provided for callback the created "_.where" style callback will return + * true for elements that have the properties of the given object, else false. + * @param array The array to query. + * @return Returns the last element(s) of array. + **/ + last(array: Array): T; /** - * @see _.fill - */ - fill( - array: List, - value: T, - start?: number, - end?: number - ): List; - } + * @see _.last + **/ + last(array: List): T; - interface LoDashImplicitArrayWrapper { /** - * @see _.fill - */ - fill( - value: T, - start?: number, - end?: number - ): LoDashImplicitArrayWrapper; - } + * @see _.last + * @param n The number of elements to return + **/ + last( + array: Array, + n: number): T[]; - interface LoDashImplicitObjectWrapper { /** - * @see _.fill - */ - fill( - value: T, - start?: number, - end?: number - ): LoDashImplicitObjectWrapper>; - } + * @see _.last + * @param n The number of elements to return + **/ + last( + array: List, + n: number): T[]; - interface LoDashExplicitArrayWrapper { /** - * @see _.fill - */ - fill( - value: T, - start?: number, - end?: number - ): LoDashExplicitArrayWrapper; - } + * @see _.last + * @param callback The function called per element + **/ + last( + array: Array, + callback: ListIterator, + thisArg?: any): T[]; - interface LoDashExplicitObjectWrapper { /** - * @see _.fill - */ - fill( - value: T, - start?: number, - end?: number - ): LoDashExplicitObjectWrapper>; - } + * @see _.last + * @param callback The function called per element + **/ + last( + array: List, + callback: ListIterator, + thisArg?: any): T[]; - //_.findIndex - interface LoDashStatic { /** - * This method is like _.find except that it returns the index of the first element predicate returns truthy - * for instead of the element itself. - * - * If a property name is provided for predicate the created _.property style callback returns the property - * value of the given element. - * - * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for - * elements that have a matching property value, else false. - * - * If an object is provided for predicate the created _.matches style callback returns true for elements that - * have the properties of the given object, else false. - * - * @param array The array to search. - * @param predicate The function invoked per iteration. - * @param thisArg The this binding of predicate. - * @return Returns the index of the found element, else -1. - */ - findIndex( - array: List, - predicate?: ListIterator - ): number; + * @see _.last + * @param pluckValue _.pluck style callback + **/ + last( + array: Array, + pluckValue: string): T[]; /** - * @see _.findIndex - */ - findIndex( + * @see _.last + * @param pluckValue _.pluck style callback + **/ + last( array: List, - predicate?: string - ): number; + pluckValue: string): T[]; /** - * @see _.findIndex - */ - findIndex( + * @see _.last + * @param whereValue _.where style callback + **/ + last( + array: Array, + whereValue: W): T[]; + + /** + * @see _.last + * @param whereValue _.where style callback + **/ + last( array: List, - predicate?: W - ): number; + whereValue: W): T[]; } - interface LoDashImplicitArrayWrapper { + //_.lastIndexOf + interface LoDashStatic { /** - * @see _.findIndex - */ - findIndex( - predicate?: ListIterator - ): number; + * Gets the index at which the last occurrence of value is found using strict equality + * for comparisons, i.e. ===. If fromIndex is negative, it is used as the offset from the + * end of the collection. + * @param array The array to search. + * @param value The value to search for. + * @param fromIndex The index to search from. + * @return The index of the matched value or -1. + **/ + lastIndexOf( + array: Array, + value: T, + fromIndex?: number): number; /** - * @see _.findIndex - */ - findIndex( - predicate?: string - ): number; + * @see _.lastIndexOf + **/ + lastIndexOf( + array: List, + value: T, + fromIndex?: number): number; + } + //_.pull + interface LoDashStatic { /** - * @see _.findIndex - */ - findIndex( - predicate?: W - ): number; - } + * Removes all provided values from the given array using strict equality for comparisons, + * i.e. ===. + * @param array The array to modify. + * @param values The values to remove. + * @return array. + **/ + pull( + array: Array, + ...values: any[]): any[]; - interface LoDashImplicitObjectWrapper { /** - * @see _.findIndex - */ - findIndex( - predicate?: ListIterator - ): number; + * @see _.pull + **/ + pull( + array: List, + ...values: any[]): any[]; + } + //_.range + interface LoDashStatic { /** - * @see _.findIndex - */ - findIndex( - predicate?: string - ): number; + * Creates an array of numbers (positive and/or negative) progressing from start up + * to but not including end. If start is less than stop a zero-length range is created + * unless a negative step is specified. + * @param start The start of the range. + * @param end The end of the range. + * @param step The value to increment or decrement by. + * @return Returns a new range array. + **/ + range( + start: number, + stop: number, + step?: number): number[]; /** - * @see _.findIndex - */ - findIndex( - predicate?: W - ): number; + * @see _.range + * @param end The end of the range. + * @return Returns a new range array. + * @note If start is not specified the implementation will never pull the step (step = arguments[2] || 0) + **/ + range(stop: number): number[]; } - interface LoDashExplicitArrayWrapper { + //_.remove + interface LoDashStatic { /** - * @see _.findIndex - */ - findIndex( - predicate?: ListIterator - ): LoDashExplicitWrapper; + * Removes all elements from an array that the callback returns truey for and returns + * an array of removed elements. The callback is bound to thisArg and invoked with three + * arguments; (value, index, array). + * + * If a property name is provided for callback the created "_.pluck" style callback will + * return the property value of the given element. + * + * If an object is provided for callback the created "_.where" style callback will return + * true for elements that have the properties of the given object, else false. + * @param array The array to modify. + * @param callback The function called per iteration. + * @param thisArg The this binding of callback. + * @return A new array of removed elements. + **/ + remove( + array: Array, + callback?: ListIterator, + thisArg?: any): any[]; /** - * @see _.findIndex - */ - findIndex( - predicate?: string - ): LoDashExplicitWrapper; + * @see _.remove + **/ + remove( + array: List, + callback?: ListIterator, + thisArg?: any): any[]; /** - * @see _.findIndex - */ - findIndex( - predicate?: W - ): LoDashExplicitWrapper; - } + * @see _.remove + * @param pluckValue _.pluck style callback + **/ + remove( + array: Array, + pluckValue?: string): any[]; - interface LoDashExplicitObjectWrapper { /** - * @see _.findIndex - */ - findIndex( - predicate?: ListIterator - ): LoDashExplicitWrapper; + * @see _.remove + * @param pluckValue _.pluck style callback + **/ + remove( + array: List, + pluckValue?: string): any[]; /** - * @see _.findIndex - */ - findIndex( - predicate?: string - ): LoDashExplicitWrapper; + * @see _.remove + * @param whereValue _.where style callback + **/ + remove( + array: Array, + wherealue?: Dictionary): any[]; /** - * @see _.findIndex - */ - findIndex( - predicate?: W - ): LoDashExplicitWrapper; + * @see _.remove + * @param whereValue _.where style callback + **/ + remove( + array: List, + wherealue?: Dictionary): any[]; + + /** + * @see _.remove + * @param item The item to remove + **/ + remove( + array:Array, + item:T): T[]; } - //_.findLastIndex + //_.rest interface LoDashStatic { /** - * This method is like _.findIndex except that it iterates over elements of collection from right to left. - * - * If a property name is provided for predicate the created _.property style callback returns the property - * value of the given element. - * - * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for - * elements that have a matching property value, else false. - * - * If an object is provided for predicate the created _.matches style callback returns true for elements that - * have the properties of the given object, else false. - * - * @param array The array to search. - * @param predicate The function invoked per iteration. - * @param thisArg The function invoked per iteration. - * @return Returns the index of the found element, else -1. - */ - findLastIndex( - array: List, - predicate?: ListIterator - ): number; + * The opposite of _.initial this method gets all but the first element or first n elements of + * an array. If a callback function is provided elements at the beginning of the array are excluded + * from the result as long as the callback returns truey. The callback is bound to thisArg and + * invoked with three arguments; (value, index, array). + * + * If a property name is provided for callback the created "_.pluck" style callback will return + * the property value of the given element. + * + * If an object is provided for callback the created "_.where" style callback will return true + * for elements that have the properties of the given object, else false. + * @param array The array to query. + * @param {(Function|Object|number|string)} [callback=1] The function called per element or the number + * of elements to exclude. If a property name or object is provided it will be used to create a + * ".pluck" or ".where" style callback, respectively. + * @param {*} [thisArg] The this binding of callback. + * @return Returns a slice of array. + **/ + rest(array: Array): T[]; /** - * @see _.findLastIndex - */ - findLastIndex( - array: List, - predicate?: string - ): number; + * @see _.rest + **/ + rest(array: List): T[]; /** - * @see _.findLastIndex - */ - findLastIndex( - array: List, - predicate?: W - ): number; - } + * @see _.rest + **/ + rest( + array: Array, + callback: ListIterator, + thisArg?: any): T[]; - interface LoDashImplicitArrayWrapper { /** - * @see _.findLastIndex - */ - findLastIndex( - predicate?: ListIterator - ): number; + * @see _.rest + **/ + rest( + array: List, + callback: ListIterator, + thisArg?: any): T[]; /** - * @see _.findLastIndex - */ - findLastIndex( - predicate?: string - ): number; + * @see _.rest + **/ + rest( + array: Array, + n: number): T[]; /** - * @see _.findLastIndex - */ - findLastIndex( - predicate?: W - ): number; - } + * @see _.rest + **/ + rest( + array: List, + n: number): T[]; - interface LoDashImplicitObjectWrapper { /** - * @see _.findLastIndex - */ - findLastIndex( - predicate?: ListIterator - ): number; + * @see _.rest + **/ + rest( + array: Array, + pluckValue: string): T[]; /** - * @see _.findLastIndex - */ - findLastIndex( - predicate?: string - ): number; + * @see _.rest + **/ + rest( + array: List, + pluckValue: string): T[]; /** - * @see _.findLastIndex - */ - findLastIndex( - predicate?: W - ): number; - } + * @see _.rest + **/ + rest( + array: Array, + whereValue: W): T[]; - interface LoDashExplicitArrayWrapper { /** - * @see _.findLastIndex - */ - findLastIndex( - predicate?: ListIterator - ): LoDashExplicitWrapper; + * @see _.rest + **/ + rest( + array: List, + whereValue: W): T[]; /** - * @see _.findLastIndex - */ - findLastIndex( - predicate?: string - ): LoDashExplicitWrapper; + * @see _.rest + **/ + drop(array: Array): T[]; /** - * @see _.findLastIndex - */ - findLastIndex( - predicate?: W - ): LoDashExplicitWrapper; - } + * @see _.rest + **/ + drop(array: List): T[]; - interface LoDashExplicitObjectWrapper { /** - * @see _.findLastIndex - */ - findLastIndex( - predicate?: ListIterator - ): LoDashExplicitWrapper; + * @see _.rest + **/ + drop( + array: Array, + callback: ListIterator, + thisArg?: any): T[]; /** - * @see _.findLastIndex - */ - findLastIndex( - predicate?: string - ): LoDashExplicitWrapper; + * @see _.rest + **/ + drop( + array: List, + callback: ListIterator, + thisArg?: any): T[]; /** - * @see _.findLastIndex - */ - findLastIndex( - predicate?: W - ): LoDashExplicitWrapper; - } + * @see _.rest + **/ + drop( + array: Array, + n: number): T[]; - //_.first - interface LoDashStatic { /** - * @see _.head - */ - first(array: List): T; - } + * @see _.rest + **/ + drop( + array: List, + n: number): T[]; - interface LoDashImplicitWrapper { /** - * @see _.head - */ - first(): string; - } + * @see _.rest + **/ + drop( + array: Array, + pluckValue: string): T[]; - interface LoDashImplicitArrayWrapper { /** - * @see _.head - */ - first(): T; - } + * @see _.rest + **/ + drop( + array: List, + pluckValue: string): T[]; - interface LoDashImplicitObjectWrapper { /** - * @see _.head - */ - first(): T; - } + * @see _.rest + **/ + drop( + array: Array, + whereValue: W): T[]; - interface LoDashExplicitWrapper { /** - * @see _.head - */ - first(): LoDashExplicitWrapper; - } + * @see _.rest + **/ + drop( + array: List, + whereValue: W): T[]; - interface LoDashExplicitArrayWrapper { /** - * @see _.head - */ - first(): T; - } + * @see _.rest + **/ + tail(array: Array): T[]; - interface LoDashExplicitObjectWrapper { /** - * @see _.head - */ - first(): T; - } - - interface RecursiveArray extends Array> {} - interface ListOfRecursiveArraysOrValues extends List> {} + * @see _.rest + **/ + tail(array: List): T[]; - //_.flatten - interface LoDashStatic { /** - * Flattens a nested array. If isDeep is true the array is recursively flattened, otherwise it’s only - * flattened a single level. - * - * @param array The array to flatten. - * @param isDeep Specify a deep flatten. - * @return Returns the new flattened array. - */ - flatten(array: ListOfRecursiveArraysOrValues, isDeep: boolean): T[]; + * @see _.rest + **/ + tail( + array: Array, + callback: ListIterator, + thisArg?: any): T[]; /** - * @see _.flatten - */ - flatten(array: List): T[]; + * @see _.rest + **/ + tail( + array: List, + callback: ListIterator, + thisArg?: any): T[]; /** - * @see _.flatten - */ - flatten(array: ListOfRecursiveArraysOrValues): RecursiveArray; - } + * @see _.rest + **/ + tail( + array: Array, + n: number): T[]; - interface LoDashImplicitWrapper { /** - * @see _.flatten - */ - flatten(): LoDashImplicitArrayWrapper; - } + * @see _.rest + **/ + tail( + array: List, + n: number): T[]; - interface LoDashImplicitArrayWrapper { /** - * @see _.flatten - */ - flatten(isDeep?: boolean): LoDashImplicitArrayWrapper; - } + * @see _.rest + **/ + tail( + array: Array, + pluckValue: string): T[]; - interface LoDashImplicitObjectWrapper { /** - * @see _.flatten - */ - flatten(isDeep?: boolean): LoDashImplicitArrayWrapper; - } + * @see _.rest + **/ + tail( + array: List, + pluckValue: string): T[]; - interface LoDashExplicitWrapper { /** - * @see _.flatten - */ - flatten(): LoDashExplicitArrayWrapper; - } + * @see _.rest + **/ + tail( + array: Array, + whereValue: W): T[]; - interface LoDashExplicitArrayWrapper { /** - * @see _.flatten - */ - flatten(isDeep?: boolean): LoDashExplicitArrayWrapper; + * @see _.rest + **/ + tail( + array: List, + whereValue: W): T[]; } - interface LoDashExplicitObjectWrapper { + //_.sortedIndex + interface LoDashStatic { /** - * @see _.flatten - */ - flatten(isDeep?: boolean): LoDashExplicitArrayWrapper; - } + * Uses a binary search to determine the smallest index at which a value should be inserted + * into a given sorted array in order to maintain the sort order of the array. If a callback + * is provided it will be executed for value and each element of array to compute their sort + * ranking. The callback is bound to thisArg and invoked with one argument; (value). + * + * If a property name is provided for callback the created "_.pluck" style callback will + * return the property value of the given element. + * + * If an object is provided for callback the created "_.where" style callback will return + * true for elements that have the properties of the given object, else false. + * @param array The sorted list. + * @param value The value to determine its index within `list`. + * @param callback Iterator to compute the sort ranking of each value, optional. + * @return The index at which value should be inserted into array. + **/ + sortedIndex( + array: Array, + value: T, + callback?: (x: T) => TSort, + thisArg?: any): number; - //_.flattenDeep - interface LoDashStatic { /** - * Recursively flattens a nested array. - * - * @param array The array to recursively flatten. - * @return Returns the new flattened array. - */ - flattenDeep(array: ListOfRecursiveArraysOrValues): T[]; - } + * @see _.sortedIndex + **/ + sortedIndex( + array: List, + value: T, + callback?: (x: T) => TSort, + thisArg?: any): number; - interface LoDashImplicitWrapper { /** - * @see _.flattenDeep - */ - flattenDeep(): LoDashImplicitArrayWrapper; - } + * @see _.sortedIndex + * @param pluckValue the _.pluck style callback + **/ + sortedIndex( + array: Array, + value: T, + pluckValue: string): number; - interface LoDashImplicitArrayWrapper { /** - * @see _.flattenDeep - */ - flattenDeep(): LoDashImplicitArrayWrapper; - } + * @see _.sortedIndex + * @param pluckValue the _.pluck style callback + **/ + sortedIndex( + array: List, + value: T, + pluckValue: string): number; - interface LoDashImplicitObjectWrapper { /** - * @see _.flattenDeep - */ - flattenDeep(): LoDashImplicitArrayWrapper; - } + * @see _.sortedIndex + * @param pluckValue the _.where style callback + **/ + sortedIndex( + array: Array, + value: T, + whereValue: W): number; - interface LoDashExplicitWrapper { /** - * @see _.flattenDeep - */ - flattenDeep(): LoDashExplicitArrayWrapper; + * @see _.sortedIndex + * @param pluckValue the _.where style callback + **/ + sortedIndex( + array: List, + value: T, + whereValue: W): number; } - interface LoDashExplicitArrayWrapper { + //_.union + interface LoDashStatic { /** - * @see _.flattenDeep - */ - flattenDeep(): LoDashExplicitArrayWrapper; - } + * Creates an array of unique values, in order, of the provided arrays using strict + * equality for comparisons, i.e. ===. + * @param arrays The arrays to inspect. + * @return Returns an array of composite values. + **/ + union(...arrays: Array[]): T[]; - interface LoDashExplicitObjectWrapper { /** - * @see _.flattenDeep - */ - flattenDeep(): LoDashExplicitArrayWrapper; + * @see _.union + **/ + union(...arrays: List[]): T[]; } - // _.flattenDepth + //_.uniq interface LoDashStatic { /** - * Recursively flatten array up to depth times. + * Creates a duplicate-value-free version of an array using strict equality for comparisons, + * i.e. ===. If the array is sorted, providing true for isSorted will use a faster algorithm. + * If a callback is provided each element of array is passed through the callback before + * uniqueness is computed. The callback is bound to thisArg and invoked with three arguments; + * (value, index, array). * - * @param array The array to recursively flatten. - * @param number The maximum recursion depth. - * @return Returns the new flattened array. - */ - flattenDepth(array: ListOfRecursiveArraysOrValues, depth?: number): T[]; - } + * If a property name is provided for callback the created "_.pluck" style callback will + * return the property value of the given element. + * + * If an object is provided for callback the created "_.where" style callback will return + * true for elements that have the properties of the given object, else false. + * @param array Array to remove duplicates from. + * @param isSorted True if `array` is already sorted, optiona, default = false. + * @param iterator Transform the elements of `array` before comparisons for uniqueness. + * @param context 'this' object in `iterator`, optional. + * @return Copy of `array` where all elements are unique. + **/ + uniq(array: Array, isSorted?: boolean): T[]; - //_.fromPairs - interface LoDashStatic { /** - * The inverse of `_.toPairs`; this method returns an object composed - * from key-value `pairs`. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} pairs The key-value pairs. - * @returns {Object} Returns the new object. - * @example - * - * _.fromPairs([['fred', 30], ['barney', 40]]); - * // => { 'fred': 30, 'barney': 40 } - */ - fromPairs( - array: List<[_.StringRepresentable, T]> - ): Dictionary; + * @see _.uniq + **/ + uniq(array: List, isSorted?: boolean): T[]; /** - @see _.fromPairs - */ - fromPairs( - array: List - ): Dictionary; - } + * @see _.uniq + **/ + uniq( + array: Array, + isSorted: boolean, + callback: ListIterator, + thisArg?: any): T[]; - //_.fromPairs DUMMY - interface LoDashImplicitArrayWrapper { /** - * @see _.fromPairs - */ - fromPairs(): LoDashImplicitObjectWrapper; - } + * @see _.uniq + **/ + uniq( + array: List, + isSorted: boolean, + callback: ListIterator, + thisArg?: any): T[]; - //_.fromPairs DUMMY - interface LoDashExplicitArrayWrapper { /** - * @see _.fromPairs - */ - fromPairs(): LoDashExplicitObjectWrapper; - } + * @see _.uniq + **/ + uniq( + array: Array, + callback: ListIterator, + thisArg?: any): T[]; - //_.head - interface LoDashStatic { /** - * Gets the first element of array. - * - * @alias _.first - * - * @param array The array to query. - * @return Returns the first element of array. - */ - head(array: List): T; - } + * @see _.uniq + **/ + uniq( + array: List, + callback: ListIterator, + thisArg?: any): T[]; - interface LoDashImplicitWrapper { /** - * @see _.head - */ - head(): string; - } + * @see _.uniq + * @param pluckValue _.pluck style callback + **/ + uniq( + array: Array, + isSorted: boolean, + pluckValue: string): T[]; - interface LoDashImplicitArrayWrapper { /** - * @see _.head - */ - head(): T; - } + * @see _.uniq + * @param pluckValue _.pluck style callback + **/ + uniq( + array: List, + isSorted: boolean, + pluckValue: string): T[]; - interface LoDashImplicitObjectWrapper { /** - * @see _.head - */ - head(): T; - } + * @see _.uniq + * @param pluckValue _.pluck style callback + **/ + uniq( + array: Array, + pluckValue: string): T[]; - interface LoDashExplicitWrapper { /** - * @see _.head - */ - head(): LoDashExplicitWrapper; - } + * @see _.uniq + * @param pluckValue _.pluck style callback + **/ + uniq( + array: List, + pluckValue: string): T[]; - interface LoDashExplicitArrayWrapper { /** - * @see _.head - */ - head(): T; - } + * @see _.uniq + * @param whereValue _.where style callback + **/ + uniq( + array: Array, + isSorted: boolean, + whereValue: W): T[]; - interface LoDashExplicitObjectWrapper { /** - * @see _.head - */ - head(): T; - } + * @see _.uniq + * @param whereValue _.where style callback + **/ + uniq( + array: List, + isSorted: boolean, + whereValue: W): T[]; - //_.indexOf - interface LoDashStatic { /** - * Gets the index at which the first occurrence of `value` is found in `array` - * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) - * for equality comparisons. If `fromIndex` is negative, it's used as the offset - * from the end of `array`. If `array` is sorted providing `true` for `fromIndex` - * performs a faster binary search. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to search. - * @param {*} value The value to search for. - * @param {number} [fromIndex=0] The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - * @example - * - * _.indexOf([1, 2, 1, 2], 2); - * // => 1 - * - * // using `fromIndex` - * _.indexOf([1, 2, 1, 2], 2, 2); - * // => 3 - */ - indexOf( - array: List, - value: T, - fromIndex?: boolean|number - ): number; - } + * @see _.uniq + * @param whereValue _.where style callback + **/ + uniq( + array: Array, + whereValue: W): T[]; - interface LoDashImplicitArrayWrapper { /** - * @see _.indexOf - */ - indexOf( - value: T, - fromIndex?: boolean|number - ): number; - } + * @see _.uniq + * @param whereValue _.where style callback + **/ + uniq( + array: List, + whereValue: W): T[]; - interface LoDashImplicitObjectWrapper { /** - * @see _.indexOf - */ - indexOf( - value: TValue, - fromIndex?: boolean|number - ): number; - } + * @see _.uniq + **/ + unique(array: Array, isSorted?: boolean): T[]; - interface LoDashExplicitArrayWrapper { /** - * @see _.indexOf - */ - indexOf( - value: T, - fromIndex?: boolean|number - ): LoDashExplicitWrapper; - } + * @see _.uniq + **/ + unique(array: List, isSorted?: boolean): T[]; - interface LoDashExplicitObjectWrapper { /** - * @see _.indexOf - */ - indexOf( - value: TValue, - fromIndex?: boolean|number - ): LoDashExplicitWrapper; - } + * @see _.uniq + **/ + unique( + array: Array, + callback: ListIterator, + thisArg?: any): T[]; - //_.intersectionBy DUMMY - interface LoDashStatic { /** - * This method is like `_.intersection` except that it accepts `iteratee` - * which is invoked for each element of each `arrays` to generate the criterion - * by which uniqueness is computed. The iteratee is invoked with one argument: (value). - * - * @static - * @memberOf _ - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element. - * @returns {Array} Returns the new array of shared values. - * @example - * - * _.intersectionBy([2.1, 1.2], [4.3, 2.4], Math.floor); - * // => [2.1] - * - * // using the `_.property` iteratee shorthand - * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); - * // => [{ 'x': 1 }] - */ - intersectionBy( - array: any[]|List, - ...values: any[] - ): any[]; - } + * @see _.uniq + **/ + unique( + array: List, + callback: ListIterator, + thisArg?: any): T[]; - //_.intersectionWith DUMMY - interface LoDashStatic { /** - * This method is like `_.intersection` except that it accepts `comparator` - * which is invoked to compare elements of `arrays`. The comparator is invoked - * with two arguments: (arrVal, othVal). - * - * @static - * @memberOf _ - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new array of shared values. - * @example - * - * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; - * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; - * - * _.intersectionWith(objects, others, _.isEqual); - * // => [{ 'x': 1, 'y': 2 }] - */ - intersectionWith( - array: any[]|List, - ...values: any[] - ): any[]; - } + * @see _.uniq + **/ + unique( + array: Array, + isSorted: boolean, + callback: ListIterator, + thisArg?: any): T[]; - //_.join - interface LoDashStatic { /** - * Converts all elements in `array` into a string separated by `separator`. - * - * @param array The array to convert. - * @param separator The element separator. - * @returns Returns the joined string. - */ - join( - array: List, - separator?: string - ): string; - } + * @see _.uniq + **/ + unique( + array: List, + isSorted: boolean, + callback: ListIterator, + thisArg?: any): T[]; - interface LoDashImplicitWrapper { /** - * @see _.join - */ - join(separator?: string): string; - } + * @see _.uniq + * @param pluckValue _.pluck style callback + **/ + unique( + array: Array, + isSorted: boolean, + pluckValue: string): T[]; - interface LoDashImplicitArrayWrapper { /** - * @see _.join - */ - join(separator?: string): string; - } + * @see _.uniq + * @param pluckValue _.pluck style callback + **/ + unique( + array: List, + isSorted: boolean, + pluckValue: string): T[]; - interface LoDashImplicitObjectWrapper { /** - * @see _.join - */ - join(separator?: string): string; - } + * @see _.uniq + * @param pluckValue _.pluck style callback + **/ + unique( + array: Array, + pluckValue: string): T[]; - interface LoDashExplicitWrapper { /** - * @see _.join - */ - join(separator?: string): LoDashExplicitWrapper; - } + * @see _.uniq + * @param pluckValue _.pluck style callback + **/ + unique( + array: List, + pluckValue: string): T[]; - interface LoDashExplicitArrayWrapper { /** - * @see _.join - */ - join(separator?: string): LoDashExplicitWrapper; - } + * @see _.uniq + * @param whereValue _.where style callback + **/ + unique( + array: Array, + whereValue?: W): T[]; - interface LoDashExplicitObjectWrapper { /** - * @see _.join - */ - join(separator?: string): LoDashExplicitWrapper; - } + * @see _.uniq + * @param whereValue _.where style callback + **/ + unique( + array: List, + whereValue?: W): T[]; - //_.pullAll DUMMY - interface LoDashStatic { /** - * This method is like `_.pull` except that it accepts an array of values to remove. - * - * **Note:** Unlike `_.difference`, this method mutates `array`. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to modify. - * @param {Array} values The values to remove. - * @returns {Array} Returns `array`. - * @example - * - * var array = [1, 2, 3, 1, 2, 3]; - * - * _.pull(array, [2, 3]); - * console.log(array); - * // => [1, 1] - */ - pullAll( - array: any[]|List, - ...values: any[] - ): any[]; - } + * @see _.uniq + * @param whereValue _.where style callback + **/ + unique( + array: Array, + isSorted: boolean, + whereValue?: W): T[]; - //_.pullAllBy DUMMY - interface LoDashStatic { /** - * This method is like `_.pullAll` except that it accepts `iteratee` which is - * invoked for each element of `array` and `values` to to generate the criterion - * by which uniqueness is computed. The iteratee is invoked with one argument: (value). - * - * **Note:** Unlike `_.differenceBy`, this method mutates `array`. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to modify. - * @param {Array} values The values to remove. - * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element. - * @returns {Array} Returns `array`. - * @example - * - * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }]; - * - * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x'); - * console.log(array); - * // => [{ 'x': 2 }] - */ - pullAllBy( - array: any[]|List, - ...values: any[] - ): any[]; + * @see _.uniq + * @param whereValue _.where style callback + **/ + unique( + array: List, + isSorted: boolean, + whereValue?: W): T[]; } - //_.reverse DUMMY - interface LoDashStatic { + interface LoDashArrayWrapper { /** - * Reverses `array` so that the first element becomes the last, the second - * element becomes the second to last, and so on. - * - * **Note:** This method mutates `array` and is based on - * [`Array#reverse`](https://mdn.io/Array/reverse). - * - * @memberOf _ - * @category Array - * @returns {Array} Returns `array`. - * @example - * - * var array = [1, 2, 3]; - * - * _.reverse(array); - * // => [3, 2, 1] - * - * console.log(array); - * // => [3, 2, 1] - */ - reverse( - array: any[]|List, - ...values: any[] - ): any[]; - } + * @see _.uniq + **/ + uniq(isSorted?: boolean): LoDashArrayWrapper; - //_.sortedIndexOf - interface LoDashStatic { /** - * This method is like `_.indexOf` except that it performs a binary - * search on a sorted `array`. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to search. - * @param {*} value The value to search for. - * @returns {number} Returns the index of the matched value, else `-1`. - * @example - * - * _.sortedIndexOf([1, 1, 2, 2], 2); - * // => 2 - */ - sortedIndexOf( - array: List, - value: T - ): number; - } + * @see _.uniq + **/ + uniq( + isSorted: boolean, + callback: ListIterator, + thisArg?: any): LoDashArrayWrapper; - interface LoDashImplicitArrayWrapper { /** - * @see _.sortedIndexOf - */ - sortedIndexOf( - value: T - ): number; - } + * @see _.uniq + **/ + uniq( + callback: ListIterator, + thisArg?: any): LoDashArrayWrapper; - interface LoDashImplicitObjectWrapper { /** - * @see _.sortedIndexOf - */ - sortedIndexOf( - value: TValue - ): number; - } + * @see _.uniq + * @param pluckValue _.pluck style callback + **/ + uniq( + isSorted: boolean, + pluckValue: string): LoDashArrayWrapper; - interface LoDashExplicitArrayWrapper { /** - * @see _.sortedIndexOf - */ - sortedIndexOf( - value: T - ): LoDashExplicitWrapper; - } + * @see _.uniq + * @param pluckValue _.pluck style callback + **/ + uniq(pluckValue: string): LoDashArrayWrapper; - interface LoDashExplicitObjectWrapper { /** - * @see _.sortedIndexOf - */ - sortedIndexOf( - value: TValue - ): LoDashExplicitWrapper; - } + * @see _.uniq + * @param whereValue _.where style callback + **/ + uniq( + isSorted: boolean, + whereValue: W): LoDashArrayWrapper; - //_.initial - interface LoDashStatic { /** - * Gets all but the last element of array. - * - * @param array The array to query. - * @return Returns the slice of array. - */ - initial(array: List): T[]; - } + * @see _.uniq + * @param whereValue _.where style callback + **/ + uniq( + whereValue: W): LoDashArrayWrapper; - interface LoDashImplicitArrayWrapper { /** - * @see _.initial - */ - initial(): LoDashImplicitArrayWrapper; - } + * @see _.uniq + **/ + unique(isSorted?: boolean): LoDashArrayWrapper; - interface LoDashImplicitObjectWrapper { /** - * @see _.initial - */ - initial(): LoDashImplicitArrayWrapper; - } + * @see _.uniq + **/ + unique( + isSorted: boolean, + callback: ListIterator, + thisArg?: any): LoDashArrayWrapper; - interface LoDashExplicitArrayWrapper { /** - * @see _.initial - */ - initial(): LoDashExplicitArrayWrapper; - } + * @see _.uniq + **/ + unique( + callback: ListIterator, + thisArg?: any): LoDashArrayWrapper; - interface LoDashExplicitObjectWrapper { /** - * @see _.initial - */ - initial(): LoDashExplicitArrayWrapper; - } + * @see _.uniq + * @param pluckValue _.pluck style callback + **/ + unique( + isSorted: boolean, + pluckValue: string): LoDashArrayWrapper; - //_.intersection - interface LoDashStatic { /** - * Creates an array of unique values that are included in all of the provided arrays using SameValueZero for - * equality comparisons. - * - * @param arrays The arrays to inspect. - * @return Returns the new array of shared values. - */ - intersection(...arrays: (T[]|List)[]): T[]; - } + * @see _.uniq + * @param pluckValue _.pluck style callback + **/ + unique(pluckValue: string): LoDashArrayWrapper; - interface LoDashImplicitArrayWrapper { /** - * @see _.intersection - */ - intersection(...arrays: (TResult[]|List)[]): LoDashImplicitArrayWrapper; - } + * @see _.uniq + * @param whereValue _.where style callback + **/ + unique( + isSorted: boolean, + whereValue: W): LoDashArrayWrapper; - interface LoDashImplicitObjectWrapper { /** - * @see _.intersection - */ - intersection(...arrays: (TResult[]|List)[]): LoDashImplicitArrayWrapper; + * @see _.uniq + * @param whereValue _.where style callback + **/ + unique( + whereValue: W): LoDashArrayWrapper; } - interface LoDashExplicitArrayWrapper { + //_.without + interface LoDashStatic { /** - * @see _.intersection - */ - intersection(...arrays: (TResult[]|List)[]): LoDashExplicitArrayWrapper; - } + * Creates an array excluding all provided values using strict equality for comparisons, i.e. ===. + * @param array The array to filter. + * @param values The value(s) to exclude. + * @return A new array of filtered values. + **/ + without( + array: Array, + ...values: T[]): T[]; - interface LoDashExplicitObjectWrapper { /** - * @see _.intersection - */ - intersection(...arrays: (TResult[]|List)[]): LoDashExplicitArrayWrapper; + * @see _.without + **/ + without( + array: List, + ...values: T[]): T[]; } - //_.last + //_.xor interface LoDashStatic { /** - * Gets the last element of array. - * - * @param array The array to query. - * @return Returns the last element of array. - */ - last(array: List): T; + * Creates an array that is the symmetric difference of the provided arrays. + * @param array The array to process + * @param others The arrays of values to calculate the symmetric difference. + * @return Returns a new array of filtered values. + **/ + xor( + array: Array, + ...others: Array[]): T[]; + /** + * @see _.xor + **/ + xor( + array: List, + ...others: List[]): T[]; } - interface LoDashImplicitWrapper { + interface LoDashArrayWrapper { /** - * @see _.last - */ - last(): string; + * @see _.xor + **/ + xor( + ...others: Array[]): LoDashArrayWrapper; + /** + * @see _.xor + **/ + xor( + ...others: List[]): LoDashArrayWrapper; } - interface LoDashImplicitArrayWrapper { + //_.zip + interface LoDashStatic { /** - * @see _.last - */ - last(): T; - } + * Creates an array of grouped elements, the first of which contains the first + * elements of the given arrays, the second of which contains the second elements + * of the given arrays, and so on. + * @param arrays Arrays to process. + * @return A new array of grouped elements. + **/ + zip(...arrays: any[][]): any[][]; - interface LoDashImplicitObjectWrapper { /** - * @see _.last - */ - last(): T; - } + * @see _.zip + **/ + zip(...arrays: any[]): any[]; - interface LoDashExplicitWrapper { /** - * @see _.last - */ - last(): LoDashExplicitWrapper; - } + * @see _.zip + **/ + unzip(...arrays: any[][]): any[][]; - interface LoDashExplicitArrayWrapper { /** - * @see _.last - */ - last(): T; + * @see _.zip + **/ + unzip(...arrays: any[]): any[]; } - interface LoDashExplicitObjectWrapper { + interface LoDashArrayWrapper { /** - * @see _.last - */ - last(): T; + * @see _.zip + **/ + zip(...arrays: any[][]): _.LoDashArrayWrapper; + + /** + * @see _.zip + **/ + unzip(...arrays: any[]): _.LoDashArrayWrapper; } - //_.lastIndexOf + //_.zipObject interface LoDashStatic { /** - * This method is like _.indexOf except that it iterates over elements of array from right to left. - * - * @param array The array to search. - * @param value The value to search for. - * @param fromIndex The index to search from or true to perform a binary search on a sorted array. - * @return Returns the index of the matched value, else -1. - */ - lastIndexOf( - array: List, - value: T, - fromIndex?: boolean|number - ): number; - } + * The inverse of _.pairs; this method returns an object composed from arrays of property + * names and values. Provide either a single two dimensional array, e.g. [[key1, value1], + * [key2, value2]] or two arrays, one of property names and one of corresponding values. + * @param props The property names. + * @param values The property values. + * @return Returns the new object. + **/ + zipObject( + props: List, + values?: List): TResult; - interface LoDashImplicitArrayWrapper { /** - * @see _.lastIndexOf - */ - lastIndexOf( - value: T, - fromIndex?: boolean|number - ): number; - } + * @see _.zipObject + **/ + zipObject(props: List>): Dictionary; - interface LoDashImplicitObjectWrapper { /** - * @see _.lastIndexOf - */ - lastIndexOf( - value: TResult, - fromIndex?: boolean|number - ): number; - } + * @see _.zipObject + **/ + object( + props: List, + values?: List): TResult; - interface LoDashExplicitArrayWrapper { /** - * @see _.lastIndexOf - */ - lastIndexOf( - value: T, - fromIndex?: boolean|number - ): LoDashExplicitWrapper; + * @see _.zipObject + **/ + object(props: List>): Dictionary; } - interface LoDashExplicitObjectWrapper { + interface LoDashArrayWrapper { /** - * @see _.lastIndexOf - */ - lastIndexOf( - value: TResult, - fromIndex?: boolean|number - ): LoDashExplicitWrapper; + * @see _.zipObject + **/ + zipObject(values?: List): _.LoDashObjectWrapper>; + + /** + * @see _.zipObject + **/ + object(values?: List): _.LoDashObjectWrapper>; } - //_.pull + /* ************* + * Collections * + ************* */ + + //_.at interface LoDashStatic { /** - * Removes all provided values from array using SameValueZero for equality comparisons. - * - * Note: Unlike _.without, this method mutates array. - * - * @param array The array to modify. - * @param values The values to remove. - * @return Returns array. - */ - pull( - array: T[], - ...values: T[] - ): T[]; + * Creates an array of elements from the specified indexes, or keys, of the collection. + * Indexes may be specified as individual arguments or as arrays of indexes. + * @param collection The collection to iterate over. + * @param indexes The indexes of collection to retrieve, specified as individual indexes or + * arrays of indexes. + * @return A new array of elements corresponding to the provided indexes. + **/ + at( + collection: Array, + indexes: number[]): T[]; /** - * @see _.pull - */ - pull( - array: List, - ...values: T[] - ): List; - } + * @see _.at + **/ + at( + collection: List, + indexes: number[]): T[]; - interface LoDashImplicitArrayWrapper { /** - * @see _.pull - */ - pull(...values: T[]): LoDashImplicitArrayWrapper; - } + * @see _.at + **/ + at( + collection: Dictionary, + indexes: number[]): T[]; - interface LoDashImplicitObjectWrapper { /** - * @see _.pull - */ - pull(...values: TValue[]): LoDashImplicitObjectWrapper>; - } + * @see _.at + **/ + at( + collection: Array, + ...indexes: number[]): T[]; - interface LoDashExplicitArrayWrapper { /** - * @see _.pull - */ - pull(...values: T[]): LoDashExplicitArrayWrapper; - } + * @see _.at + **/ + at( + collection: List, + ...indexes: number[]): T[]; - interface LoDashExplicitObjectWrapper { /** - * @see _.pull - */ - pull(...values: TValue[]): LoDashExplicitObjectWrapper>; + * @see _.at + **/ + at( + collection: Dictionary, + ...indexes: number[]): T[]; } - //_.pullAt + //_.contains interface LoDashStatic { /** - * Removes elements from array corresponding to the given indexes and returns an array of the removed elements. - * Indexes may be specified as an array of indexes or as individual arguments. - * - * Note: Unlike _.at, this method mutates array. - * - * @param array The array to modify. - * @param indexes The indexes of elements to remove, specified as individual indexes or arrays of indexes. - * @return Returns the new array of removed elements. - */ - pullAt( - array: List, - ...indexes: (number|number[])[] - ): T[]; - } + * Checks if a given value is present in a collection using strict equality for comparisons, + * i.e. ===. If fromIndex is negative, it is used as the offset from the end of the collection. + * @param collection The collection to iterate over. + * @param target The value to check for. + * @param fromIndex The index to search from. + * @return True if the target element is found, else false. + **/ + contains( + collection: Array, + target: T, + fromIndex?: number): boolean; - interface LoDashImplicitArrayWrapper { /** - * @see _.pullAt - */ - pullAt(...indexes: (number|number[])[]): LoDashImplicitArrayWrapper; - } + * @see _.contains + **/ + contains( + collection: List, + target: T, + fromIndex?: number): boolean; - interface LoDashImplicitObjectWrapper { /** - * @see _.pullAt - */ - pullAt(...indexes: (number|number[])[]): LoDashImplicitArrayWrapper; - } + * @see _.contains + * @param dictionary The dictionary to iterate over. + * @param key The key in the dictionary to search for. + **/ + contains( + dictionary: Dictionary, + key: string, + fromIndex?: number): boolean; - interface LoDashExplicitArrayWrapper { /** - * @see _.pullAt - */ - pullAt(...indexes: (number|number[])[]): LoDashExplicitArrayWrapper; - } + * @see _.contains + * @param searchString the string to search + * @param targetString the string to search for + **/ + contains( + searchString: string, + targetString: string, + fromIndex?: number): boolean; - interface LoDashExplicitObjectWrapper { /** - * @see _.pullAt - */ - pullAt(...indexes: (number|number[])[]): LoDashExplicitArrayWrapper; - } + * @see _.contains + **/ + include( + collection: Array, + target: T, + fromIndex?: number): boolean; - //_.remove - interface LoDashStatic { /** - * Removes all elements from array that predicate returns truthy for and returns an array of the removed - * elements. The predicate is bound to thisArg and invoked with three arguments: (value, index, array). - * - * If a property name is provided for predicate the created _.property style callback returns the property - * value of the given element. - * - * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for - * elements that have a matching property value, else false. - * - * If an object is provided for predicate the created _.matches style callback returns true for elements that - * have the properties of the given object, else false. - * - * Note: Unlike _.filter, this method mutates array. - * - * @param array The array to modify. - * @param predicate The function invoked per iteration. - * @param thisArg The this binding of predicate. - * @return Returns the new array of removed elements. - */ - remove( - array: List, - predicate?: ListIterator - ): T[]; + * @see _.contains + **/ + include( + collection: List, + target: T, + fromIndex?: number): boolean; /** - * @see _.remove - */ - remove( - array: List, - predicate?: string - ): T[]; + * @see _.contains + **/ + include( + dictionary: Dictionary, + key: string, + fromIndex?: number): boolean; /** - * @see _.remove - */ - remove( - array: List, - predicate?: W - ): T[]; + * @see _.contains + **/ + include( + searchString: string, + targetString: string, + fromIndex?: number): boolean; } - interface LoDashImplicitArrayWrapper { + //_.countBy + interface LoDashStatic { /** - * @see _.remove - */ - remove( - predicate?: ListIterator - ): LoDashImplicitArrayWrapper; + * Creates an object composed of keys generated from the results of running each element + * of collection through the callback. The corresponding value of each key is the number + * of times the key was returned by the callback. The callback is bound to thisArg and + * invoked with three arguments; (value, index|key, collection). + * + * If a property name is provided for callback the created "_.pluck" style callback will + * return the property value of the given element. + * + * If an object is provided for callback the created "_.where" style callback will return + * true for elements that have the properties of the given object, else false. + * @param collection The collection to iterate over. + * @param callback The function called per iteration. + * @param thisArg The this binding of callback. + * @return Returns the composed aggregate object. + **/ + countBy( + collection: Array, + callback?: ListIterator, + thisArg?: any): Dictionary; /** - * @see _.remove - */ - remove( - predicate?: string - ): LoDashImplicitArrayWrapper; + * @see _.countBy + * @param callback Function name + **/ + countBy( + collection: List, + callback?: ListIterator, + thisArg?: any): Dictionary; /** - * @see _.remove - */ - remove( - predicate?: W - ): LoDashImplicitArrayWrapper; - } + * @see _.countBy + * @param callback Function name + **/ + countBy( + collection: Dictionary, + callback?: DictionaryIterator, + thisArg?: any): Dictionary; - interface LoDashImplicitObjectWrapper { /** - * @see _.remove - */ - remove( - predicate?: ListIterator - ): LoDashImplicitArrayWrapper; + * @see _.countBy + * @param callback Function name + **/ + countBy( + collection: Array, + callback: string, + thisArg?: any): Dictionary; /** - * @see _.remove - */ - remove( - predicate?: string - ): LoDashImplicitArrayWrapper; + * @see _.countBy + * @param callback Function name + **/ + countBy( + collection: List, + callback: string, + thisArg?: any): Dictionary; /** - * @see _.remove - */ - remove( - predicate?: W - ): LoDashImplicitArrayWrapper; + * @see _.countBy + * @param callback Function name + **/ + countBy( + collection: Dictionary, + callback: string, + thisArg?: any): Dictionary; } - interface LoDashExplicitArrayWrapper { + interface LoDashArrayWrapper { /** - * @see _.remove - */ - remove( - predicate?: ListIterator - ): LoDashExplicitArrayWrapper; + * @see _.countBy + **/ + countBy( + callback?: ListIterator, + thisArg?: any): LoDashObjectWrapper>; /** - * @see _.remove - */ - remove( - predicate?: string - ): LoDashExplicitArrayWrapper; + * @see _.countBy + * @param callback Function name + **/ + countBy( + callback: string, + thisArg?: any): LoDashObjectWrapper>; + } + //_.every + interface LoDashStatic { /** - * @see _.remove - */ - remove( - predicate?: W - ): LoDashExplicitArrayWrapper; - } + * Checks if the given callback returns truey value for all elements of a collection. + * The callback is bound to thisArg and invoked with three arguments; (value, index|key, + * collection). + * + * If a property name is provided for callback the created "_.pluck" style callback will + * return the property value of the given element. + * + * If an object is provided for callback the created "_.where" style callback will return + * true for elements that have the properties of the given object, else false. + * @param collection The collection to iterate over. + * @param callback The function called per iteration. + * @param thisArg The this binding of callback. + * @return True if all elements passed the callback check, else false. + **/ + every( + collection: Array, + callback?: ListIterator, + thisArg?: any): boolean; - interface LoDashExplicitObjectWrapper { /** - * @see _.remove - */ - remove( - predicate?: ListIterator - ): LoDashExplicitArrayWrapper; + * @see _.every + * @param pluckValue _.pluck style callback + **/ + every( + collection: List, + callback?: ListIterator, + thisArg?: any): boolean; /** - * @see _.remove - */ - remove( - predicate?: string - ): LoDashExplicitArrayWrapper; + * @see _.every + * @param pluckValue _.pluck style callback + **/ + every( + collection: Dictionary, + callback?: DictionaryIterator, + thisArg?: any): boolean; /** - * @see _.remove - */ - remove( - predicate?: W - ): LoDashExplicitArrayWrapper; - } + * @see _.every + * @param pluckValue _.pluck style callback + **/ + every( + collection: Array, + pluckValue: string): boolean; - //_.tail - interface LoDashStatic { /** - * Gets all but the first element of array. - * - * @alias _.tail - * - * @param array The array to query. - * @return Returns the slice of array. - */ - tail(array: List): T[]; - } + * @see _.every + * @param pluckValue _.pluck style callback + **/ + every( + collection: List, + pluckValue: string): boolean; - interface LoDashImplicitArrayWrapper { /** - * @see _.tail - */ - tail(): LoDashImplicitArrayWrapper; - } + * @see _.every + * @param pluckValue _.pluck style callback + **/ + every( + collection: Dictionary, + pluckValue: string): boolean; - interface LoDashImplicitObjectWrapper { /** - * @see _.tail - */ - tail(): LoDashImplicitArrayWrapper; - } + * @see _.every + * @param whereValue _.where style callback + **/ + every( + collection: Array, + whereValue: W): boolean; - interface LoDashExplicitArrayWrapper { /** - * @see _.tail - */ - tail(): LoDashExplicitArrayWrapper; - } + * @see _.every + * @param whereValue _.where style callback + **/ + every( + collection: List, + whereValue: W): boolean; - interface LoDashExplicitObjectWrapper { /** - * @see _.tail - */ - tail(): LoDashExplicitArrayWrapper; - } + * @see _.every + * @param whereValue _.where style callback + **/ + every( + collection: Dictionary, + whereValue: W): boolean; - //_.slice - interface LoDashStatic { /** - * Creates a slice of array from start up to, but not including, end. - * - * @param array The array to slice. - * @param start The start position. - * @param end The end position. - * @return Returns the slice of array. - */ - slice( - array: T[], - start?: number, - end?: number - ): T[]; - } + * @see _.every + **/ + all( + collection: Array, + callback?: ListIterator, + thisArg?: any): boolean; - interface LoDashImplicitArrayWrapper { /** - * @see _.slice - */ - slice( - start?: number, - end?: number - ): LoDashImplicitArrayWrapper; - } + * @see _.every + **/ + all( + collection: List, + callback?: ListIterator, + thisArg?: any): boolean; - interface LoDashExplicitArrayWrapper { /** - * @see _.slice - */ - slice( - start?: number, - end?: number - ): LoDashExplicitArrayWrapper; - } + * @see _.every + **/ + all( + collection: Dictionary, + callback?: DictionaryIterator, + thisArg?: any): boolean; - //_.sortedIndex - interface LoDashStatic { /** - * Uses a binary search to determine the lowest index at which `value` should - * be inserted into `array` in order to maintain its sort order. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The sorted array to inspect. - * @param {*} value The value to evaluate. - * @returns {number} Returns the index at which `value` should be inserted into `array`. - * @example - * - * _.sortedIndex([30, 50], 40); - * // => 1 - * - * _.sortedIndex([4, 5], 4); - * // => 0 - */ - sortedIndex( - array: List, - value: T - ): number; + * @see _.every + * @param pluckValue _.pluck style callback + **/ + all( + collection: Array, + pluckValue: string): boolean; /** - * @see _.sortedIndex - */ - sortedIndex( - array: List, - value: T - ): number; + * @see _.every + * @param pluckValue _.pluck style callback + **/ + all( + collection: List, + pluckValue: string): boolean; /** - * @see _.sortedIndex - */ - sortedIndex( - array: List, - value: T - ): number; + * @see _.every + * @param pluckValue _.pluck style callback + **/ + all( + collection: Dictionary, + pluckValue: string): boolean; /** - * @see _.sortedIndex - */ - sortedIndex( - array: List, - value: T - ): number; + * @see _.every + * @param whereValue _.where style callback + **/ + all( + collection: Array, + whereValue: W): boolean; /** - * @see _.sortedIndex - */ - sortedIndex( - array: List, - value: T - ): number; - } + * @see _.every + * @param whereValue _.where style callback + **/ + all( + collection: List, + whereValue: W): boolean; - interface LoDashImplicitWrapper { /** - * @see _.sortedIndex - */ - sortedIndex( - value: string - ): number; + * @see _.every + * @param whereValue _.where style callback + **/ + all( + collection: Dictionary, + whereValue: W): boolean; } - interface LoDashImplicitArrayWrapper { + //_.filter + interface LoDashStatic { /** - * @see _.sortedIndex - */ - sortedIndex( - value: T - ): number; + * Iterates over elements of a collection, returning an array of all elements the + * callback returns truey for. The callback is bound to thisArg and invoked with three + * arguments; (value, index|key, collection). + * + * If a property name is provided for callback the created "_.pluck" style callback will + * return the property value of the given element. + * + * If an object is provided for callback the created "_.where" style callback will return + * true for elements that have the properties of the given object, else false. + * @param collection The collection to iterate over. + * @param callback The function called per iteration. + * @param context The this binding of callback. + * @return Returns a new array of elements that passed the callback check. + **/ + filter( + collection: Array, + callback: ListIterator, + thisArg?: any): T[]; /** - * @see _.sortedIndex - */ - sortedIndex( - value: T - ): number; - } + * @see _.filter + **/ + filter( + collection: List, + callback: ListIterator, + thisArg?: any): T[]; - interface LoDashImplicitObjectWrapper { /** - * @see _.sortedIndex - */ - sortedIndex( - value: T - ): number; + * @see _.filter + **/ + filter( + collection: Dictionary, + callback: DictionaryIterator, + thisArg?: any): T[]; /** - * @see _.sortedIndex - */ - sortedIndex( - value: T - ): number; + * @see _.filter + * @param pluckValue _.pluck style callback + **/ + filter( + collection: Array, + pluckValue: string): T[]; /** - * @see _.sortedIndex - */ - sortedIndex( - value: T - ): number; - } + * @see _.filter + * @param pluckValue _.pluck style callback + **/ + filter( + collection: List, + pluckValue: string): T[]; - interface LoDashExplicitWrapper { /** - * @see _.sortedIndex - */ - sortedIndex( - value: string - ): LoDashExplicitWrapper; - } + * @see _.filter + * @param pluckValue _.pluck style callback + **/ + filter( + collection: Dictionary, + pluckValue: string): T[]; - interface LoDashExplicitArrayWrapper { /** - * @see _.sortedIndex - */ - sortedIndex( - value: T - ): LoDashExplicitWrapper; + * @see _.filter + * @param pluckValue _.pluck style callback + **/ + filter( + collection: Array, + whereValue: W): T[]; /** - * @see _.sortedIndex - */ - sortedIndex( - value: T - ): LoDashExplicitWrapper; + * @see _.filter + * @param pluckValue _.pluck style callback + **/ + filter( + collection: List, + whereValue: W): T[]; /** - * @see _.sortedIndex - */ - sortedIndex( - value: T - ): LoDashExplicitWrapper; - } + * @see _.filter + * @param pluckValue _.pluck style callback + **/ + filter( + collection: Dictionary, + whereValue: W): T[]; - interface LoDashExplicitObjectWrapper { /** - * @see _.sortedIndex - */ - sortedIndex( - value: T - ): LoDashExplicitWrapper; + * @see _.filter + **/ + select( + collection: Array, + callback: ListIterator, + thisArg?: any): T[]; /** - * @see _.sortedIndex - */ - sortedIndex( - value: T - ): LoDashExplicitWrapper; + * @see _.filter + **/ + select( + collection: List, + callback: ListIterator, + thisArg?: any): T[]; /** - * @see _.sortedIndex - */ - sortedIndex( - value: T - ): LoDashExplicitWrapper; - - - } + * @see _.filter + **/ + select( + collection: Dictionary, + callback: DictionaryIterator, + thisArg?: any): T[]; - //_.sortedIndexBy - interface LoDashStatic { /** - * This method is like `_.sortedIndex` except that it accepts `iteratee` - * which is invoked for `value` and each element of `array` to compute their - * sort ranking. The iteratee is invoked with one argument: (value). - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The sorted array to inspect. - * @param {*} value The value to evaluate. - * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element. - * @returns {number} Returns the index at which `value` should be inserted into `array`. - * @example - * - * var dict = { 'thirty': 30, 'forty': 40, 'fifty': 50 }; - * - * _.sortedIndexBy(['thirty', 'fifty'], 'forty', _.propertyOf(dict)); - * // => 1 - * - * // using the `_.property` iteratee shorthand - * _.sortedIndexBy([{ 'x': 4 }, { 'x': 5 }], { 'x': 4 }, 'x'); - * // => 0 - */ - sortedIndexBy( - array: List, - value: T, - iteratee: (x: T) => TSort - ): number; + * @see _.filter + * @param pluckValue _.pluck style callback + **/ + select( + collection: Array, + pluckValue: string): T[]; /** - * @see _.sortedIndexBy - */ - sortedIndexBy( - array: List, - value: T, - iteratee: (x: T) => any - ): number; + * @see _.filter + * @param pluckValue _.pluck style callback + **/ + select( + collection: List, + pluckValue: string): T[]; /** - * @see _.sortedIndexBy - */ - sortedIndexBy( - array: List, - value: T, - iteratee: string - ): number; + * @see _.filter + * @param pluckValue _.pluck style callback + **/ + select( + collection: Dictionary, + pluckValue: string): T[]; /** - * @see _.sortedIndexBy - */ - sortedIndexBy( - array: List, - value: T, - iteratee: W - ): number; + * @see _.filter + * @param pluckValue _.pluck style callback + **/ + select( + collection: Array, + whereValue: W): T[]; /** - * @see _.sortedIndexBy - */ - sortedIndexBy( - array: List, - value: T, - iteratee: Object - ): number; - } + * @see _.filter + * @param pluckValue _.pluck style callback + **/ + select( + collection: List, + whereValue: W): T[]; - interface LoDashImplicitWrapper { /** - * @see _.sortedIndexBy - */ - sortedIndexBy( - value: string, - iteratee: (x: string) => TSort - ): number; + * @see _.filter + * @param pluckValue _.pluck style callback + **/ + select( + collection: Dictionary, + whereValue: W): T[]; } - interface LoDashImplicitArrayWrapper { + interface LoDashArrayWrapper { /** - * @see _.sortedIndexBy - */ - sortedIndexBy( - value: T, - iteratee: (x: T) => TSort - ): number; - - /** - * @see _.sortedIndexBy - */ - sortedIndexBy( - value: T, - iteratee: string - ): number; + * @see _.filter + **/ + filter( + callback: ListIterator, + thisArg?: any): LoDashArrayWrapper; /** - * @see _.sortedIndexBy - */ - sortedIndexBy( - value: T, - iteratee: W - ): number; - } + * @see _.filter + * @param pluckValue _.pluck style callback + **/ + filter( + pluckValue: string): LoDashArrayWrapper; - interface LoDashImplicitObjectWrapper { /** - * @see _.sortedIndexBy - */ - sortedIndexBy( - value: T, - iteratee: (x: T) => TSort - ): number; + * @see _.filter + * @param pluckValue _.pluck style callback + **/ + filter( + whereValue: W): LoDashArrayWrapper; /** - * @see _.sortedIndexBy - */ - sortedIndexBy( - value: T, - iteratee: (x: T) => any - ): number; + * @see _.filter + **/ + select( + callback: ListIterator, + thisArg?: any): LoDashArrayWrapper; /** - * @see _.sortedIndexBy - */ - sortedIndexBy( - value: T, - iteratee: string - ): number; + * @see _.filter + * @param pluckValue _.pluck style callback + **/ + select( + pluckValue: string): LoDashArrayWrapper; /** - * @see _.sortedIndexBy - */ - sortedIndexBy( - value: T, - iteratee: W - ): number; + * @see _.filter + * @param pluckValue _.pluck style callback + **/ + select( + whereValue: W): LoDashArrayWrapper; + } + interface LoDashObjectWrapper { /** - * @see _.sortedIndexBy - */ - sortedIndexBy( - value: T, - iteratee: Object - ): number; + * @see _.filter + **/ + filter( + callback: ObjectIterator, + thisArg?: any): LoDashObjectWrapper; } - interface LoDashExplicitWrapper { + //_.find + interface LoDashStatic { /** - * @see _.sortedIndexBy - */ - sortedIndexBy( - value: string, - iteratee: (x: string) => TSort - ): LoDashExplicitWrapper; - } + * Iterates over elements of a collection, returning the first element that the callback + * returns truey for. The callback is bound to thisArg and invoked with three arguments; + * (value, index|key, collection). + * + * If a property name is provided for callback the created "_.pluck" style callback will + * return the property value of the given element. + * + * If an object is provided for callback the created "_.where" style callback will return + * true for elements that have the properties of the given object, else false. + * @param collection Searches for a value in this list. + * @param callback The function called per iteration. + * @param thisArg The this binding of callback. + * @return The found element, else undefined. + **/ + find( + collection: Array, + callback: ListIterator, + thisArg?: any): T; - interface LoDashExplicitArrayWrapper { /** - * @see _.sortedIndexBy - */ - sortedIndexBy( - value: T, - iteratee: (x: T) => TSort - ): LoDashExplicitWrapper; + * @see _.find + **/ + find( + collection: List, + callback: ListIterator, + thisArg?: any): T; /** - * @see _.sortedIndexBy - */ - sortedIndexBy( - value: T, - iteratee: string - ): LoDashExplicitWrapper; + * @see _.find + **/ + find( + collection: Dictionary, + callback: DictionaryIterator, + thisArg?: any): T; /** - * @see _.sortedIndexBy - */ - sortedIndexBy( - value: T, - iteratee: W - ): LoDashExplicitWrapper; - } + * @see _.find + * @param _.pluck style callback + **/ + find( + collection: Array, + whereValue: W): T; - interface LoDashExplicitObjectWrapper { /** - * @see _.sortedIndexBy - */ - sortedIndexBy( - value: T, - iteratee: (x: T) => TSort - ): LoDashExplicitWrapper; + * @see _.find + * @param _.pluck style callback + **/ + find( + collection: List, + whereValue: W): T; /** - * @see _.sortedIndexBy - */ - sortedIndexBy( - value: T, - iteratee: (x: T) => any - ): LoDashExplicitWrapper; + * @see _.find + * @param _.pluck style callback + **/ + find( + collection: Dictionary, + whereValue: W): T; /** - * @see _.sortedIndexBy - */ - sortedIndexBy( - value: T, - iteratee: string - ): LoDashExplicitWrapper; + * @see _.find + * @param _.where style callback + **/ + find( + collection: Array, + pluckValue: string): T; /** - * @see _.sortedIndexBy - */ - sortedIndexBy( - value: T, - iteratee: W - ): LoDashExplicitWrapper; + * @see _.find + * @param _.where style callback + **/ + find( + collection: List, + pluckValue: string): T; /** - * @see _.sortedIndexBy - */ - sortedIndexBy( - value: T, - iteratee: Object - ): LoDashExplicitWrapper; - } + * @see _.find + * @param _.where style callback + **/ + find( + collection: Dictionary, + pluckValue: string): T; - //_.sortedLastIndex - interface LoDashStatic { /** - * This method is like `_.sortedIndex` except that it returns the highest - * index at which `value` should be inserted into `array` in order to - * maintain its sort order. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The sorted array to inspect. - * @param {*} value The value to evaluate. - * @returns {number} Returns the index at which `value` should be inserted into `array`. - * @example - * - * _.sortedLastIndex([4, 5], 4); - * // => 1 - */ - sortedLastIndex( - array: List, - value: T - ): number; + * @see _.find + **/ + detect( + collection: Array, + callback: ListIterator, + thisArg?: any): T; /** - * @see _.sortedLastIndex - */ - sortedLastIndex( - array: List, - value: T - ): number; + * @see _.find + **/ + detect( + collection: List, + callback: ListIterator, + thisArg?: any): T; /** - * @see _.sortedLastIndex - */ - sortedLastIndex( - array: List, - value: T - ): number; + * @see _.find + **/ + detect( + collection: Dictionary, + callback: DictionaryIterator, + thisArg?: any): T; /** - * @see _.sortedLastIndex - */ - sortedLastIndex( - array: List, - value: T - ): number; + * @see _.find + * @param _.pluck style callback + **/ + detect( + collection: Array, + whereValue: W): T; /** - * @see _.sortedLastIndex - */ - sortedLastIndex( - array: List, - value: T - ): number; - } + * @see _.find + * @param _.pluck style callback + **/ + detect( + collection: List, + whereValue: W): T; - interface LoDashImplicitWrapper { /** - * @see _.sortedLastIndex - */ - sortedLastIndex( - value: string - ): number; - } + * @see _.find + * @param _.pluck style callback + **/ + detect( + collection: Dictionary, + whereValue: W): T; - interface LoDashImplicitArrayWrapper { /** - * @see _.sortedLastIndex - */ - sortedLastIndex( - value: T - ): number; + * @see _.find + * @param _.where style callback + **/ + detect( + collection: Array, + pluckValue: string): T; /** - * @see _.sortedLastIndex - */ - sortedLastIndex( - value: T - ): number; + * @see _.find + * @param _.where style callback + **/ + detect( + collection: List, + pluckValue: string): T; /** - * @see _.sortedLastIndex - */ - sortedLastIndex( - value: T - ): number; - } + * @see _.find + * @param _.where style callback + **/ + detect( + collection: Dictionary, + pluckValue: string): T; - interface LoDashImplicitObjectWrapper { /** - * @see _.sortedLastIndex - */ - sortedLastIndex( - value: T - ): number; + * @see _.find + **/ + findWhere( + collection: Array, + callback: ListIterator, + thisArg?: any): T; /** - * @see _.sortedLastIndex - */ - sortedLastIndex( - value: T - ): number; + * @see _.find + **/ + findWhere( + collection: List, + callback: ListIterator, + thisArg?: any): T; /** - * @see _.sortedLastIndex - */ - sortedLastIndex( - value: T - ): number; - } + * @see _.find + **/ + findWhere( + collection: Dictionary, + callback: DictionaryIterator, + thisArg?: any): T; - interface LoDashExplicitWrapper { /** - * @see _.sortedLastIndex - */ - sortedLastIndex( - value: string - ): LoDashExplicitWrapper; - } + * @see _.find + * @param _.pluck style callback + **/ + findWhere( + collection: Array, + whereValue: W): T; - interface LoDashExplicitArrayWrapper { /** - * @see _.sortedLastIndex - */ - sortedLastIndex( - value: T - ): LoDashExplicitWrapper; + * @see _.find + * @param _.pluck style callback + **/ + findWhere( + collection: List, + whereValue: W): T; /** - * @see _.sortedLastIndex - */ - sortedLastIndex( - value: T - ): LoDashExplicitWrapper; - } + * @see _.find + * @param _.pluck style callback + **/ + findWhere( + collection: Dictionary, + whereValue: W): T; - interface LoDashExplicitObjectWrapper { /** - * @see _.sortedLastIndex - */ - sortedLastIndex( - value: T - ): LoDashExplicitWrapper; + * @see _.find + * @param _.where style callback + **/ + findWhere( + collection: Array, + pluckValue: string): T; /** - * @see _.sortedLastIndex - */ - sortedLastIndex( - value: T - ): LoDashExplicitWrapper; + * @see _.find + * @param _.where style callback + **/ + findWhere( + collection: List, + pluckValue: string): T; /** - * @see _.sortedLastIndex - */ - sortedLastIndex( - value: T - ): LoDashExplicitWrapper; + * @see _.find + * @param _.where style callback + **/ + findWhere( + collection: Dictionary, + pluckValue: string): T; } - //_.sortedLastIndexBy - interface LoDashStatic { + interface LoDashArrayWrapper { /** - * This method is like `_.sortedLastIndex` except that it accepts `iteratee` - * which is invoked for `value` and each element of `array` to compute their - * sort ranking. The iteratee is invoked with one argument: (value). - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The sorted array to inspect. - * @param {*} value The value to evaluate. - * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element. - * @returns {number} Returns the index at which `value` should be inserted into `array`. - * @example - * - * // using the `_.property` iteratee shorthand - * _.sortedLastIndexBy([{ 'x': 4 }, { 'x': 5 }], { 'x': 4 }, 'x'); - * // => 1 - */ - sortedLastIndexBy( - array: List, - value: T, - iteratee: (x: T) => TSort - ): number; - + * @see _.find + */ + find( + callback: ListIterator, + thisArg?: any): T; /** - * @see _.sortedLastIndexBy - */ - sortedLastIndexBy( - array: List, - value: T, - iteratee: (x: T) => any - ): number; + * @see _.find + * @param _.where style callback + */ + find( + whereValue: W): T; /** - * @see _.sortedLastIndexBy - */ - sortedLastIndexBy( - array: List, - value: T, - iteratee: string - ): number; + * @see _.find + * @param _.where style callback + */ + find( + pluckValue: string): T; + } + //_.findLast + interface LoDashStatic { /** - * @see _.sortedLastIndexBy - */ - sortedLastIndexBy( - array: List, - value: T, - iteratee: W - ): number; + * This method is like _.find except that it iterates over elements of a collection from + * right to left. + * @param collection Searches for a value in this list. + * @param callback The function called per iteration. + * @param thisArg The this binding of callback. + * @return The found element, else undefined. + **/ + findLast( + collection: Array, + callback: ListIterator, + thisArg?: any): T; /** - * @see _.sortedLastIndexBy - */ - sortedLastIndexBy( - array: List, - value: T, - iteratee: Object - ): number; - } + * @see _.find + **/ + findLast( + collection: List, + callback: ListIterator, + thisArg?: any): T; - interface LoDashImplicitWrapper { /** - * @see _.sortedLastIndexBy - */ - sortedLastIndexBy( - value: string, - iteratee: (x: string) => TSort - ): number; - } + * @see _.find + **/ + findLast( + collection: Dictionary, + callback: DictionaryIterator, + thisArg?: any): T; - interface LoDashImplicitArrayWrapper { /** - * @see _.sortedLastIndexBy - */ - sortedLastIndexBy( - value: T, - iteratee: (x: T) => TSort - ): number; + * @see _.find + * @param _.pluck style callback + **/ + findLast( + collection: Array, + whereValue: W): T; /** - * @see _.sortedLastIndexBy - */ - sortedLastIndexBy( - value: T, - iteratee: string - ): number; + * @see _.find + * @param _.pluck style callback + **/ + findLast( + collection: List, + whereValue: W): T; /** - * @see _.sortedLastIndexBy - */ - sortedLastIndexBy( - value: T, - iteratee: W - ): number; - } + * @see _.find + * @param _.pluck style callback + **/ + findLast( + collection: Dictionary, + whereValue: W): T; - interface LoDashImplicitObjectWrapper { /** - * @see _.sortedLastIndexBy - */ - sortedLastIndexBy( - value: T, - iteratee: (x: T) => TSort - ): number; + * @see _.find + * @param _.where style callback + **/ + findLast( + collection: Array, + pluckValue: string): T; /** - * @see _.sortedLastIndexBy - */ - sortedLastIndexBy( - value: T, - iteratee: (x: T) => any - ): number; + * @see _.find + * @param _.where style callback + **/ + findLast( + collection: List, + pluckValue: string): T; /** - * @see _.sortedLastIndexBy - */ - sortedLastIndexBy( - value: T, - iteratee: string - ): number; + * @see _.find + * @param _.where style callback + **/ + findLast( + collection: Dictionary, + pluckValue: string): T; + } + interface LoDashArrayWrapper { /** - * @see _.sortedLastIndexBy - */ - sortedLastIndexBy( - value: T, - iteratee: W - ): number; - + * @see _.findLast + */ + findLast( + callback: ListIterator, + thisArg?: any): T; /** - * @see _.sortedLastIndexBy - */ - sortedLastIndexBy( - value: T, - iteratee: Object - ): number; - } + * @see _.findLast + * @param _.where style callback + */ + findLast( + whereValue: W): T; - interface LoDashExplicitWrapper { /** - * @see _.sortedLastIndexBy - */ - sortedLastIndexBy( - value: string, - iteratee: (x: string) => TSort - ): LoDashExplicitWrapper; + * @see _.findLast + * @param _.where style callback + */ + findLast( + pluckValue: string): T; } - interface LoDashExplicitArrayWrapper { - /** - * @see _.sortedLastIndexBy - */ - sortedLastIndexBy( - value: T, - iteratee: (x: T) => TSort - ): LoDashExplicitWrapper; - - /** - * @see _.sortedLastIndexBy - */ - sortedLastIndexBy( - value: T, - iteratee: string - ): LoDashExplicitWrapper; - + //_.forEach + interface LoDashStatic { /** - * @see _.sortedLastIndexBy - */ - sortedLastIndexBy( - value: T, - iteratee: W - ): LoDashExplicitWrapper; - } + * Iterates over elements of a collection, executing the callback for each element. + * The callback is bound to thisArg and invoked with three arguments; (value, index|key, + * collection). Callbacks may exit iteration early by explicitly returning false. + * @param collection The collection to iterate over. + * @param callback The function called per iteration. + * @param thisArg The this binding of callback. + **/ + forEach( + collection: Array, + callback: ListIterator, + thisArg?: any): Array; - interface LoDashExplicitObjectWrapper { /** - * @see _.sortedLastIndexBy - */ - sortedLastIndexBy( - value: T, - iteratee: (x: T) => TSort - ): LoDashExplicitWrapper; + * @see _.forEach + **/ + forEach( + collection: List, + callback: ListIterator, + thisArg?: any): List; /** - * @see _.sortedLastIndexBy - */ - sortedLastIndexBy( - value: T, - iteratee: (x: T) => any - ): LoDashExplicitWrapper; + * @see _.forEach + **/ + forEach( + object: Dictionary, + callback: DictionaryIterator, + thisArg?: any): Dictionary; /** - * @see _.sortedLastIndexBy - */ - sortedLastIndexBy( - value: T, - iteratee: string - ): LoDashExplicitWrapper; + * @see _.each + **/ + forEach( + object: T, + callback: ObjectIterator, + thisArg?: any): T /** - * @see _.sortedLastIndexBy - */ - sortedLastIndexBy( - value: T, - iteratee: W - ): LoDashExplicitWrapper; + * @see _.forEach + **/ + each( + collection: Array, + callback: ListIterator, + thisArg?: any): Array; /** - * @see _.sortedLastIndexBy - */ - sortedLastIndexBy( - value: T, - iteratee: Object - ): LoDashExplicitWrapper; - } + * @see _.forEach + **/ + each( + collection: List, + callback: ListIterator, + thisArg?: any): List; - //_.sortedLastIndexOf DUMMY - interface LoDashStatic { /** - * This method is like `_.lastIndexOf` except that it performs a binary - * search on a sorted `array`. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to search. - * @param {*} value The value to search for. - * @returns {number} Returns the index of the matched value, else `-1`. - * @example - * - * _.sortedLastIndexOf([1, 1, 2, 2], 2); - * // => 3 - */ - sortedLastIndexOf( - array: any[]|List, - ...values: any[] - ): any[]; - } + * @see _.forEach + * @param object The object to iterate over + * @param callback The function called per iteration. + * @param thisArg The this binding of callback. + **/ + each( + object: Dictionary, + callback: DictionaryIterator, + thisArg?: any): Dictionary; - //_.tail - interface LoDashStatic { /** - * @see _.rest - */ - tail(array: List): T[]; + * @see _.each + **/ + each( + object: T, + callback: ObjectIterator, + thisArg?: any): T } - interface LoDashImplicitArrayWrapper { + interface LoDashArrayWrapper { /** - * @see _.rest - */ - tail(): LoDashImplicitArrayWrapper; - } + * @see _.forEach + **/ + forEach( + callback: ListIterator, + thisArg?: any): LoDashArrayWrapper; - interface LoDashImplicitObjectWrapper { /** - * @see _.rest - */ - tail(): LoDashImplicitArrayWrapper; + * @see _.forEach + **/ + each( + callback: ListIterator, + thisArg?: any): LoDashArrayWrapper; } - interface LoDashExplicitArrayWrapper { + interface LoDashObjectWrapper { /** - * @see _.rest - */ - tail(): LoDashExplicitArrayWrapper; - } + * @see _.forEach + **/ + forEach( + callback: ObjectIterator, + thisArg?: any): LoDashObjectWrapper; - interface LoDashExplicitObjectWrapper { /** - * @see _.rest - */ - tail(): LoDashExplicitArrayWrapper; + * @see _.forEach + **/ + each( + callback: ObjectIterator, + thisArg?: any): LoDashObjectWrapper; } - //_.take + //_.forEachRight interface LoDashStatic { /** - * Creates a slice of array with n elements taken from the beginning. - * - * @param array The array to query. - * @param n The number of elements to take. - * @return Returns the slice of array. - */ - take( - array: List, - n?: number - ): T[]; - } + * This method is like _.forEach except that it iterates over elements of a + * collection from right to left. + * @param collection The collection to iterate over. + * @param callback The function called per iteration. + * @param thisArg The this binding of callback. + **/ + forEachRight( + collection: Array, + callback: ListIterator, + thisArg?: any): Array; - interface LoDashImplicitArrayWrapper { /** - * @see _.take - */ - take(n?: number): LoDashImplicitArrayWrapper; - } + * @see _.forEachRight + **/ + forEachRight( + collection: List, + callback: ListIterator, + thisArg?: any): List; - interface LoDashImplicitObjectWrapper { /** - * @see _.take - */ - take(n?: number): LoDashImplicitArrayWrapper; - } + * @see _.forEachRight + **/ + forEachRight( + object: Dictionary, + callback: DictionaryIterator, + thisArg?: any): Dictionary; - interface LoDashExplicitArrayWrapper { /** - * @see _.take - */ - take(n?: number): LoDashExplicitArrayWrapper; - } + * @see _.forEachRight + **/ + eachRight( + collection: Array, + callback: ListIterator, + thisArg?: any): Array; - interface LoDashExplicitObjectWrapper { /** - * @see _.take - */ - take(n?: number): LoDashExplicitArrayWrapper; - } + * @see _.forEachRight + **/ + eachRight( + collection: List, + callback: ListIterator, + thisArg?: any): List; - //_.takeRight - interface LoDashStatic { /** - * Creates a slice of array with n elements taken from the end. - * - * @param array The array to query. - * @param n The number of elements to take. - * @return Returns the slice of array. - */ - takeRight( - array: List, - n?: number - ): T[]; + * @see _.forEachRight + * @param object The object to iterate over + * @param callback The function called per iteration. + * @param thisArg The this binding of callback. + **/ + eachRight( + object: Dictionary, + callback: DictionaryIterator, + thisArg?: any): Dictionary; } - interface LoDashImplicitArrayWrapper { + interface LoDashArrayWrapper { /** - * @see _.takeRight - */ - takeRight(n?: number): LoDashImplicitArrayWrapper; - } + * @see _.forEachRight + **/ + forEachRight( + callback: ListIterator, + thisArg?: any): LoDashArrayWrapper; - interface LoDashImplicitObjectWrapper { /** - * @see _.takeRight - */ - takeRight(n?: number): LoDashImplicitArrayWrapper; + * @see _.forEachRight + **/ + eachRight( + callback: ListIterator, + thisArg?: any): LoDashArrayWrapper; } - interface LoDashExplicitArrayWrapper { + interface LoDashObjectWrapper { /** - * @see _.takeRight - */ - takeRight(n?: number): LoDashExplicitArrayWrapper; - } + * @see _.forEachRight + **/ + forEachRight( + callback: ObjectIterator, + thisArg?: any): LoDashObjectWrapper>; - interface LoDashExplicitObjectWrapper { /** - * @see _.takeRight - */ - takeRight(n?: number): LoDashExplicitArrayWrapper; + * @see _.forEachRight + * @param object The object to iterate over + * @param callback The function called per iteration. + * @param thisArg The this binding of callback. + **/ + eachRight( + callback: ObjectIterator, + thisArg?: any): LoDashObjectWrapper>; } - //_.takeRightWhile + //_.groupBy interface LoDashStatic { /** - * Creates a slice of array with elements taken from the end. Elements are taken until predicate returns - * falsey. The predicate is bound to thisArg and invoked with three arguments: (value, index, array). - * - * If a property name is provided for predicate the created _.property style callback returns the property - * value of the given element. - * - * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for - * elements that have a matching property value, else false. - * - * If an object is provided for predicate the created _.matches style callback returns true for elements that - * have the properties of the given object, else false. - * - * @param array The array to query. - * @param predicate The function invoked per iteration. - * @param thisArg The this binding of predicate. - * @return Returns the slice of array. - */ - takeRightWhile( - array: List, - predicate?: ListIterator - ): TValue[]; + * Creates an object composed of keys generated from the results of running each element + * of a collection through the callback. The corresponding value of each key is an array + * of the elements responsible for generating the key. The callback is bound to thisArg + * and invoked with three arguments; (value, index|key, collection). + * + * If a property name is provided for callback the created "_.pluck" style callback will + * return the property value of the given element. + * If an object is provided for callback the created "_.where" style callback will return + * true for elements that have the properties of the given object, else false + * @param collection The collection to iterate over. + * @param callback The function called per iteration. + * @param thisArg The this binding of callback. + * @return Returns the composed aggregate object. + **/ + groupBy( + collection: Array, + callback?: ListIterator, + thisArg?: any): Dictionary; /** - * @see _.takeRightWhile - */ - takeRightWhile( - array: List, - predicate?: string - ): TValue[]; + * @see _.groupBy + **/ + groupBy( + collection: List, + callback?: ListIterator, + thisArg?: any): Dictionary; /** - * @see _.takeRightWhile - */ - takeRightWhile( - array: List, - predicate?: TWhere - ): TValue[]; - } + * @see _.groupBy + * @param pluckValue _.pluck style callback + **/ + groupBy( + collection: Array, + pluckValue: string): Dictionary; - interface LoDashImplicitArrayWrapper { /** - * @see _.takeRightWhile - */ - takeRightWhile( - predicate?: ListIterator - ): LoDashImplicitArrayWrapper; + * @see _.groupBy + * @param pluckValue _.pluck style callback + **/ + groupBy( + collection: List, + pluckValue: string): Dictionary; /** - * @see _.takeRightWhile - */ - takeRightWhile( - predicate?: string - ): LoDashImplicitArrayWrapper; + * @see _.groupBy + * @param whereValue _.where style callback + **/ + groupBy( + collection: Array, + whereValue: W): Dictionary; /** - * @see _.takeRightWhile - */ - takeRightWhile( - predicate?: TWhere - ): LoDashImplicitArrayWrapper; - } + * @see _.groupBy + * @param whereValue _.where style callback + **/ + groupBy( + collection: List, + whereValue: W): Dictionary; - interface LoDashImplicitObjectWrapper { /** - * @see _.takeRightWhile - */ - takeRightWhile( - predicate?: ListIterator - ): LoDashImplicitArrayWrapper; + * @see _.groupBy + **/ + groupBy( + collection: Dictionary, + callback?: DictionaryIterator, + thisArg?: any): Dictionary; /** - * @see _.takeRightWhile - */ - takeRightWhile( - predicate?: string - ): LoDashImplicitArrayWrapper; + * @see _.groupBy + * @param pluckValue _.pluck style callback + **/ + groupBy( + collection: Dictionary, + pluckValue: string): Dictionary; /** - * @see _.takeRightWhile - */ - takeRightWhile( - predicate?: TWhere - ): LoDashImplicitArrayWrapper; + * @see _.groupBy + * @param whereValue _.where style callback + **/ + groupBy( + collection: Dictionary, + whereValue: W): Dictionary; } - interface LoDashExplicitArrayWrapper { + interface LoDashArrayWrapper { /** - * @see _.takeRightWhile - */ - takeRightWhile( - predicate?: ListIterator - ): LoDashExplicitArrayWrapper; + * @see _.groupBy + **/ + groupBy( + callback: ListIterator, + thisArg?: any): _.LoDashObjectWrapper<_.Dictionary>; /** - * @see _.takeRightWhile - */ - takeRightWhile( - predicate?: string - ): LoDashExplicitArrayWrapper; + * @see _.groupBy + **/ + groupBy( + pluckValue: string): _.LoDashObjectWrapper<_.Dictionary>; /** - * @see _.takeRightWhile - */ - takeRightWhile( - predicate?: TWhere - ): LoDashExplicitArrayWrapper; + * @see _.groupBy + **/ + groupBy( + whereValue: W): _.LoDashObjectWrapper<_.Dictionary>; } - interface LoDashExplicitObjectWrapper { + interface LoDashObjectWrapper { /** - * @see _.takeRightWhile - */ - takeRightWhile( - predicate?: ListIterator - ): LoDashExplicitArrayWrapper; + * @see _.groupBy + **/ + groupBy( + callback: ListIterator, + thisArg?: any): _.LoDashObjectWrapper<_.Dictionary>; /** - * @see _.takeRightWhile - */ - takeRightWhile( - predicate?: string - ): LoDashExplicitArrayWrapper; + * @see _.groupBy + **/ + groupBy( + pluckValue: string): _.LoDashObjectWrapper<_.Dictionary>; /** - * @see _.takeRightWhile - */ - takeRightWhile( - predicate?: TWhere - ): LoDashExplicitArrayWrapper; + * @see _.groupBy + **/ + groupBy( + whereValue: W): _.LoDashObjectWrapper<_.Dictionary>; } - //_.takeWhile + //_.indexBy interface LoDashStatic { /** - * Creates a slice of array with elements taken from the beginning. Elements are taken until predicate returns - * falsey. The predicate is bound to thisArg and invoked with three arguments: (value, index, array). - * - * If a property name is provided for predicate the created _.property style callback returns the property - * value of the given element. - * - * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for - * elements that have a matching property value, else false. - * - * If an object is provided for predicate the created _.matches style callback returns true for elements that - * have the properties of the given object, else false. - * - * @param array The array to query. - * @param predicate The function invoked per iteration. - * @param thisArg The this binding of predicate. - * @return Returns the slice of array. - */ - takeWhile( - array: List, - predicate?: ListIterator - ): TValue[]; + * Creates an object composed of keys generated from the results of running each element + * of the collection through the given callback. The corresponding value of each key is + * the last element responsible for generating the key. The callback is bound to thisArg + * and invoked with three arguments; (value, index|key, collection). + * + * If a property name is provided for callback the created "_.pluck" style callback will + * return the property value of the given element. + * + * If an object is provided for callback the created "_.where" style callback will return + * true for elements that have the properties of the given object, else false. + * @param collection The collection to iterate over. + * @param callback The function called per iteration. + * @param thisArg The this binding of callback. + * @return Returns the composed aggregate object. + **/ + indexBy( + list: Array, + iterator: ListIterator, + context?: any): Dictionary; /** - * @see _.takeWhile - */ - takeWhile( - array: List, - predicate?: string - ): TValue[]; + * @see _.indexBy + **/ + indexBy( + list: List, + iterator: ListIterator, + context?: any): Dictionary; /** - * @see _.takeWhile - */ - takeWhile( - array: List, - predicate?: TWhere - ): TValue[]; - } + * @see _.indexBy + * @param pluckValue _.pluck style callback + **/ + indexBy( + collection: Array, + pluckValue: string): Dictionary; - interface LoDashImplicitArrayWrapper { /** - * @see _.takeWhile - */ - takeWhile( - predicate?: ListIterator - ): LoDashImplicitArrayWrapper; + * @see _.indexBy + * @param pluckValue _.pluck style callback + **/ + indexBy( + collection: List, + pluckValue: string): Dictionary; /** - * @see _.takeWhile - */ - takeWhile( - predicate?: string - ): LoDashImplicitArrayWrapper; + * @see _.indexBy + * @param whereValue _.where style callback + **/ + indexBy( + collection: Array, + whereValue: W): Dictionary; /** - * @see _.takeWhile - */ - takeWhile( - predicate?: TWhere - ): LoDashImplicitArrayWrapper; + * @see _.indexBy + * @param whereValue _.where style callback + **/ + indexBy( + collection: List, + whereValue: W): Dictionary; } - interface LoDashImplicitObjectWrapper { - /** - * @see _.takeWhile - */ - takeWhile( - predicate?: ListIterator - ): LoDashImplicitArrayWrapper; - + //_.invoke + interface LoDashStatic { /** - * @see _.takeWhile - */ - takeWhile( - predicate?: string - ): LoDashImplicitArrayWrapper; + * Invokes the method named by methodName on each element in the collection returning + * an array of the results of each invoked method. Additional arguments will be provided + * to each invoked method. If methodName is a function it will be invoked for, and this + * bound to, each element in the collection. + * @param collection The collection to iterate over. + * @param methodName The name of the method to invoke. + * @param args Arguments to invoke the method with. + **/ + invoke( + collection: Array, + methodName: string, + ...args: any[]): any; /** - * @see _.takeWhile - */ - takeWhile( - predicate?: TWhere - ): LoDashImplicitArrayWrapper; - } + * @see _.invoke + **/ + invoke( + collection: List, + methodName: string, + ...args: any[]): any; - interface LoDashExplicitArrayWrapper { /** - * @see _.takeWhile - */ - takeWhile( - predicate?: ListIterator - ): LoDashExplicitArrayWrapper; + * @see _.invoke + **/ + invoke( + collection: Dictionary, + methodName: string, + ...args: any[]): any; /** - * @see _.takeWhile - */ - takeWhile( - predicate?: string - ): LoDashExplicitArrayWrapper; + * @see _.invoke + **/ + invoke( + collection: Array, + method: Function, + ...args: any[]): any; /** - * @see _.takeWhile - */ - takeWhile( - predicate?: TWhere - ): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.takeWhile - */ - takeWhile( - predicate?: ListIterator - ): LoDashExplicitArrayWrapper; - - /** - * @see _.takeWhile - */ - takeWhile( - predicate?: string - ): LoDashExplicitArrayWrapper; + * @see _.invoke + **/ + invoke( + collection: List, + method: Function, + ...args: any[]): any; /** - * @see _.takeWhile - */ - takeWhile( - predicate?: TWhere - ): LoDashExplicitArrayWrapper; + * @see _.invoke + **/ + invoke( + collection: Dictionary, + method: Function, + ...args: any[]): any; } - //_.union + //_.map interface LoDashStatic { /** - * Creates an array of unique values, in order, from all of the provided arrays using SameValueZero for - * equality comparisons. - * - * @param arrays The arrays to inspect. - * @return Returns the new array of combined values. - */ - union(...arrays: List[]): T[]; - } + * Creates an array of values by running each element in the collection through the callback. + * The callback is bound to thisArg and invoked with three arguments; (value, index|key, + * collection). + * + * If a property name is provided for callback the created "_.pluck" style callback will return + * the property value of the given element. + * + * If an object is provided for callback the created "_.where" style callback will return true + * for elements that have the properties of the given object, else false. + * @param collection The collection to iterate over. + * @param callback The function called per iteration. + * @param theArg The this binding of callback. + * @return The mapped array result. + **/ + map( + collection: Array, + callback: ListIterator, + thisArg?: any): TResult[]; - interface LoDashImplicitArrayWrapper { /** - * @see _.union - */ - union(...arrays: List[]): LoDashImplicitArrayWrapper; + * @see _.map + **/ + map( + collection: List, + callback: ListIterator, + thisArg?: any): TResult[]; /** - * @see _.union - */ - union(...arrays: List[]): LoDashImplicitArrayWrapper; - } + * @see _.map + * @param object The object to iterate over. + * @param callback The function called per iteration. + * @param thisArg `this` object in `iterator`, optional. + * @return The mapped object result. + **/ + map( + object: Dictionary, + callback: DictionaryIterator, + thisArg?: any): TResult[]; - interface LoDashImplicitObjectWrapper { /** - * @see _.union - */ - union(...arrays: List[]): LoDashImplicitArrayWrapper; - } + * @see _.map + * @param pluckValue _.pluck style callback + **/ + map( + collection: Array, + pluckValue: string): TResult[]; - interface LoDashExplicitArrayWrapper { /** - * @see _.union - */ - union(...arrays: List[]): LoDashExplicitArrayWrapper; + * @see _.map + * @param pluckValue _.pluck style callback + **/ + map( + collection: List, + pluckValue: string): TResult[]; /** - * @see _.union - */ - union(...arrays: List[]): LoDashExplicitArrayWrapper; - } + * @see _.map + **/ + collect( + collection: Array, + callback: ListIterator, + thisArg?: any): TResult[]; - interface LoDashExplicitObjectWrapper { /** - * @see _.union - */ - union(...arrays: List[]): LoDashExplicitArrayWrapper; - } + * @see _.map + **/ + collect( + collection: List, + callback: ListIterator, + thisArg?: any): TResult[]; - //_.unionBy - interface LoDashStatic { /** - * This method is like `_.union` except that it accepts `iteratee` which is - * invoked for each element of each `arrays` to generate the criterion by which - * uniqueness is computed. The iteratee is invoked with one argument: (value). - * - * @param arrays The arrays to inspect. - * @param iteratee The iteratee invoked per element. - * @return Returns the new array of combined values. - */ - unionBy( - arrays: T[]|List, - iteratee?: (value: T) => any - ): T[]; + * @see _.map + **/ + collect( + object: Dictionary, + callback: DictionaryIterator, + thisArg?: any): TResult[]; /** - * @see _.unionBy - */ - unionBy( - arrays: T[]|List, - iteratee?: W - ): T[]; + * @see _.map + **/ + collect( + collection: Array, + pluckValue: string): TResult[]; /** - * @see _.unionBy - */ - unionBy( - arrays1: T[]|List, - arrays2: T[]|List, - iteratee?: (value: T) => any - ): T[]; + * @see _.map + **/ + collect( + collection: List, + pluckValue: string): TResult[]; + } + interface LoDashArrayWrapper { /** - * @see _.unionBy - */ - unionBy( - arrays1: T[]|List, - arrays2: T[]|List, - iteratee?: W - ): T[]; + * @see _.map + **/ + map( + callback: ListIterator, + thisArg?: any): LoDashArrayWrapper; /** - * @see _.unionBy - */ - unionBy( - arrays1: T[]|List, - arrays2: T[]|List, - arrays3: T[]|List, - iteratee?: (value: T) => any - ): T[]; + * @see _.map + * @param pluckValue _.pluck style callback + **/ + map( + pluckValue: string): LoDashArrayWrapper; /** - * @see _.unionBy - */ - unionBy( - arrays1: T[]|List, - arrays2: T[]|List, - arrays3: T[]|List, - iteratee?: W - ): T[]; + * @see _.map + **/ + collect( + callback: ListIterator, + thisArg?: any): LoDashArrayWrapper; /** - * @see _.unionBy - */ - unionBy( - arrays1: T[]|List, - arrays2: T[]|List, - arrays3: T[]|List, - arrays4: T[]|List, - iteratee?: (value: T) => any - ): T[]; + * @see _.map + **/ + collect( + pluckValue: string): LoDashArrayWrapper; + } + interface LoDashObjectWrapper { /** - * @see _.unionBy - */ - unionBy( - arrays1: T[]|List, - arrays2: T[]|List, - arrays3: T[]|List, - arrays4: T[]|List, - iteratee?: W - ): T[]; + * @see _.map + **/ + map( + callback: ObjectIterator, + thisArg?: any): LoDashArrayWrapper; /** - * @see _.unionBy - */ - unionBy( - arrays1: T[]|List, - arrays2: T[]|List, - arrays3: T[]|List, - arrays4: T[]|List, - arrays5: T[]|List, - iteratee?: (value: T) => any - ): T[]; + * @see _.map + **/ + collect( + callback: ObjectIterator, + thisArg?: any): LoDashArrayWrapper; + } + //_.max + interface LoDashStatic { /** - * @see _.unionBy - */ - unionBy( - arrays1: T[]|List, - arrays2: T[]|List, - arrays3: T[]|List, - arrays4: T[]|List, - arrays5: T[]|List, - iteratee?: W - ): T[]; + * Retrieves the maximum value of a collection. If the collection is empty or falsey -Infinity is + * returned. If a callback is provided it will be executed for each value in the collection to + * generate the criterion by which the value is ranked. The callback is bound to thisArg and invoked + * with three arguments; (value, index, collection). + * + * If a property name is provided for callback the created "_.pluck" style callback will return the + * property value of the given element. + * + * If an object is provided for callback the created "_.where" style callback will return true for + * elements that have the properties of the given object, else false. + * @param collection The collection to iterate over. + * @param callback The function called per iteration. + * @param thisArg The this binding of callback. + * @return Returns the maximum value. + **/ + max( + collection: Array, + callback?: ListIterator, + thisArg?: any): T; /** - * @see _.unionBy - */ - unionBy( - arrays: T[]|List, - ...iteratee: any[] - ): T[]; - } + * @see _.max + **/ + max( + collection: List, + callback?: ListIterator, + thisArg?: any): T; - interface LoDashImplicitArrayWrapper { /** - * @see _.unionBy - */ - unionBy( - iteratee?: (value: T) => any - ): LoDashImplicitArrayWrapper; + * @see _.max + **/ + max( + collection: Dictionary, + callback?: DictionaryIterator, + thisArg?: any): T; /** - * @see _.unionBy - */ - unionBy( - iteratee?: W - ): LoDashImplicitArrayWrapper; + * @see _.max + * @param pluckValue _.pluck style callback + **/ + max( + collection: Array, + pluckValue: string): T; /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - iteratee?: (value: T) => any - ): LoDashImplicitArrayWrapper; + * @see _.max + * @param pluckValue _.pluck style callback + **/ + max( + collection: List, + pluckValue: string): T; /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - iteratee?: W - ): LoDashImplicitArrayWrapper; + * @see _.max + * @param pluckValue _.pluck style callback + **/ + max( + collection: Dictionary, + pluckValue: string): T; /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - arrays3: T[]|List, - iteratee?: (value: T) => any - ): LoDashImplicitArrayWrapper; + * @see _.max + * @param whereValue _.where style callback + **/ + max( + collection: Array, + whereValue: W): T; /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - arrays3: T[]|List, - iteratee?: W - ): LoDashImplicitArrayWrapper; + * @see _.max + * @param whereValue _.where style callback + **/ + max( + collection: List, + whereValue: W): T; /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - arrays3: T[]|List, - arrays4: T[]|List, - iteratee?: (value: T) => any - ): LoDashImplicitArrayWrapper; + * @see _.max + * @param whereValue _.where style callback + **/ + max( + collection: Dictionary, + whereValue: W): T; + } + interface LoDashArrayWrapper { /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - arrays3: T[]|List, - arrays4: T[]|List, - iteratee?: W - ): LoDashImplicitArrayWrapper; + * @see _.max + **/ + max( + callback?: ListIterator, + thisArg?: any): LoDashWrapper; /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - arrays3: T[]|List, - arrays4: T[]|List, - arrays5: T[]|List, - iteratee?: (value: T) => any - ): LoDashImplicitArrayWrapper; + * @see _.max + * @param pluckValue _.pluck style callback + **/ + max( + pluckValue: string): LoDashWrapper; /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - arrays3: T[]|List, - arrays4: T[]|List, - arrays5: T[]|List, - iteratee?: W - ): LoDashImplicitArrayWrapper; + * @see _.max + * @param whereValue _.where style callback + **/ + max( + whereValue: W): LoDashWrapper; + } + //_.min + interface LoDashStatic { /** - * @see _.unionBy - */ - unionBy( - ...iteratee: any[] - ): LoDashImplicitArrayWrapper; - } + * Retrieves the minimum value of a collection. If the collection is empty or falsey + * Infinity is returned. If a callback is provided it will be executed for each value + * in the collection to generate the criterion by which the value is ranked. The callback + * is bound to thisArg and invoked with three arguments; (value, index, collection). + * + * If a property name is provided for callback the created "_.pluck" style callback + * will return the property value of the given element. + * + * If an object is provided for callback the created "_.where" style callback will + * return true for elements that have the properties of the given object, else false. + * @param collection The collection to iterate over. + * @param callback The function called per iteration. + * @param thisArg The this binding of callback. + * @return Returns the maximum value. + **/ + min( + collection: Array, + callback?: ListIterator, + thisArg?: any): T; - interface LoDashImplicitObjectWrapper { /** - * @see _.unionBy - */ - unionBy( - iteratee?: (value: T) => any - ): LoDashImplicitArrayWrapper; + * @see _.min + **/ + min( + collection: List, + callback?: ListIterator, + thisArg?: any): T; /** - * @see _.unionBy - */ - unionBy( - iteratee?: W - ): LoDashImplicitArrayWrapper; + * @see _.min + **/ + min( + collection: Dictionary, + callback?: ListIterator, + thisArg?: any): T; /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - iteratee?: (value: T) => any - ): LoDashImplicitArrayWrapper; + * @see _.min + * @param pluckValue _.pluck style callback + **/ + min( + collection: Array, + pluckValue: string): T; /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - iteratee?: W - ): LoDashImplicitArrayWrapper; + * @see _.min + * @param pluckValue _.pluck style callback + **/ + min( + collection: List, + pluckValue: string): T; /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - arrays3: T[]|List, - iteratee?: (value: T) => any - ): LoDashImplicitArrayWrapper; + * @see _.min + * @param pluckValue _.pluck style callback + **/ + min( + collection: Dictionary, + pluckValue: string): T; /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - arrays3: T[]|List, - iteratee?: W - ): LoDashImplicitArrayWrapper; + * @see _.min + * @param whereValue _.where style callback + **/ + min( + collection: Array, + whereValue: W): T; /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - arrays3: T[]|List, - arrays4: T[]|List, - iteratee?: (value: T) => any - ): LoDashImplicitArrayWrapper; + * @see _.min + * @param whereValue _.where style callback + **/ + min( + collection: List, + whereValue: W): T; /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - arrays3: T[]|List, - arrays4: T[]|List, - iteratee?: W - ): LoDashImplicitArrayWrapper; + * @see _.min + * @param whereValue _.where style callback + **/ + min( + collection: Dictionary, + whereValue: W): T; + } + interface LoDashArrayWrapper { /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - arrays3: T[]|List, - arrays4: T[]|List, - arrays5: T[]|List, - iteratee?: (value: T) => any - ): LoDashImplicitArrayWrapper; + * @see _.min + **/ + min( + callback?: ListIterator, + thisArg?: any): LoDashWrapper; /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - arrays3: T[]|List, - arrays4: T[]|List, - arrays5: T[]|List, - iteratee?: W - ): LoDashImplicitArrayWrapper; + * @see _.min + * @param pluckValue _.pluck style callback + **/ + min( + pluckValue: string): LoDashWrapper; /** - * @see _.unionBy - */ - unionBy( - ...iteratee: any[] - ): LoDashImplicitArrayWrapper; + * @see _.min + * @param whereValue _.where style callback + **/ + min( + whereValue: W): LoDashWrapper; } - interface LoDashExplicitArrayWrapper { + //_.sum + interface LoDashStatic { /** - * @see _.unionBy - */ - unionBy( - iteratee?: (value: T) => any - ): LoDashExplicitArrayWrapper; + * Gets the sum of the values in collection. + * + * @param collection The collection to iterate over. + * @param iteratee The function invoked per iteration. + * @param thisArg The this binding of iteratee. + * @return Returns the sum. + **/ + sum( + collection: Array): number; /** - * @see _.unionBy - */ - unionBy( - iteratee?: W - ): LoDashExplicitArrayWrapper; + * @see _.sum + **/ + sum( + collection: List): number; /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - iteratee?: (value: T) => any - ): LoDashExplicitArrayWrapper; + * @see _.sum + **/ + sum( + collection: Dictionary): number; /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - iteratee?: W - ): LoDashExplicitArrayWrapper; + * @see _.sum + **/ + sum( + collection: Array, + iteratee: ListIterator, + thisArg?: any): number; /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - arrays3: T[]|List, - iteratee?: (value: T) => any - ): LoDashExplicitArrayWrapper; + * @see _.sum + **/ + sum( + collection: List, + iteratee: ListIterator, + thisArg?: any): number; /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - arrays3: T[]|List, - iteratee?: W - ): LoDashExplicitArrayWrapper; + * @see _.sum + **/ + sum( + collection: Dictionary, + iteratee: ObjectIterator, + thisArg?: any): number; /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - arrays3: T[]|List, - arrays4: T[]|List, - iteratee?: (value: T) => any - ): LoDashExplicitArrayWrapper; + * @see _.sum + * @param property _.property callback shorthand. + **/ + sum( + collection: Array, + property: string): number; /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - arrays3: T[]|List, - arrays4: T[]|List, - iteratee?: W - ): LoDashExplicitArrayWrapper; + * @see _.sum + * @param property _.property callback shorthand. + **/ + sum( + collection: List, + property: string): number; /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - arrays3: T[]|List, - arrays4: T[]|List, - arrays5: T[]|List, - iteratee?: (value: T) => any - ): LoDashExplicitArrayWrapper; + * @see _.sum + * @param property _.property callback shorthand. + **/ + sum( + collection: Dictionary, + property: string): number; + } + interface LoDashNumberArrayWrapper { /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - arrays3: T[]|List, - arrays4: T[]|List, - arrays5: T[]|List, - iteratee?: W - ): LoDashExplicitArrayWrapper; + * @see _.sum + **/ + sum(): number /** - * @see _.unionBy - */ - unionBy( - ...iteratee: any[] - ): LoDashExplicitArrayWrapper; + * @see _.sum + **/ + sum( + iteratee: ListIterator, + thisArg?: any): number; } - interface LoDashExplicitObjectWrapper { + interface LoDashArrayWrapper { /** - * @see _.unionBy - */ - unionBy( - iteratee?: (value: T) => any - ): LoDashExplicitArrayWrapper; + * @see _.sum + **/ + sum( + iteratee: ListIterator, + thisArg?: any): number; /** - * @see _.unionBy - */ - unionBy( - iteratee?: W - ): LoDashExplicitArrayWrapper; + * @see _.sum + * @param property _.property callback shorthand. + **/ + sum( + property: string): number; + } + interface LoDashObjectWrapper { /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - iteratee?: (value: T) => any - ): LoDashExplicitArrayWrapper; + * @see _.sum + **/ + sum(): number /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - iteratee?: W - ): LoDashExplicitArrayWrapper; + * @see _.sum + **/ + sum( + iteratee: ObjectIterator, + thisArg?: any): number; /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - arrays3: T[]|List, - iteratee?: (value: T) => any - ): LoDashExplicitArrayWrapper; + * @see _.sum + * @param property _.property callback shorthand. + **/ + sum( + property: string): number; + } + //_.pluck + interface LoDashStatic { /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - arrays3: T[]|List, - iteratee?: W - ): LoDashExplicitArrayWrapper; + * Retrieves the value of a specified property from all elements in the collection. + * @param collection The collection to iterate over. + * @param property The property to pluck. + * @return A new array of property values. + **/ + pluck( + collection: Array, + property: string): any[]; /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - arrays3: T[]|List, - arrays4: T[]|List, - iteratee?: (value: T) => any - ): LoDashExplicitArrayWrapper; + * @see _.pluck + **/ + pluck( + collection: List, + property: string): any[]; /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - arrays3: T[]|List, - arrays4: T[]|List, - iteratee?: W - ): LoDashExplicitArrayWrapper; + * @see _.pluck + **/ + pluck( + collection: Dictionary, + property: string): any[]; + } + interface LoDashArrayWrapper { /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - arrays3: T[]|List, - arrays4: T[]|List, - arrays5: T[]|List, - iteratee?: (value: T) => any - ): LoDashExplicitArrayWrapper; + * @see _.pluck + **/ + pluck( + property: string): LoDashArrayWrapper; + } + interface LoDashObjectWrapper { /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - arrays3: T[]|List, - arrays4: T[]|List, - arrays5: T[]|List, - iteratee?: W - ): LoDashExplicitArrayWrapper; + * @see _.pluck + **/ + pluck( + property: string): LoDashArrayWrapper; + } - /** - * @see _.unionBy - */ - unionBy( - ...iteratee: any[] - ): LoDashExplicitArrayWrapper; - } - - //_.uniq + //_.reduce interface LoDashStatic { /** - * Creates a duplicate-free version of an array, using - * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) - * for equality comparisons, in which only the first occurrence of each element - * is kept. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to inspect. - * @returns {Array} Returns the new duplicate free array. - * @example - * - * _.uniq([2, 1, 2]); - * // => [2, 1] - */ - uniq( - array: List - ): T[]; + * Reduces a collection to a value which is the accumulated result of running each + * element in the collection through the callback, where each successive callback execution + * consumes the return value of the previous execution. If accumulator is not provided the + * first element of the collection will be used as the initial accumulator value. The callback + * is bound to thisArg and invoked with four arguments; (accumulator, value, index|key, collection). + * @param collection The collection to iterate over. + * @param callback The function called per iteration. + * @param accumulator Initial value of the accumulator. + * @param thisArg The this binding of callback. + * @return Returns the accumulated value. + **/ + reduce( + collection: Array, + callback: MemoIterator, + accumulator: TResult, + thisArg?: any): TResult; /** - * @see _.uniq - */ - uniq( - array: List - ): T[]; - } + * @see _.reduce + **/ + reduce( + collection: List, + callback: MemoIterator, + accumulator: TResult, + thisArg?: any): TResult; - interface LoDashImplicitWrapper { /** - * @see _.uniq - */ - uniq(): LoDashImplicitArrayWrapper; - } + * @see _.reduce + **/ + reduce( + collection: Dictionary, + callback: MemoIterator, + accumulator: TResult, + thisArg?: any): TResult; - interface LoDashImplicitArrayWrapper { /** - * @see _.uniq - */ - uniq(): LoDashImplicitArrayWrapper; + * @see _.reduce + **/ + reduce( + collection: Array, + callback: MemoIterator, + thisArg?: any): TResult; /** - * @see _.uniq - */ - uniq(): LoDashImplicitArrayWrapper; - } + * @see _.reduce + **/ + reduce( + collection: List, + callback: MemoIterator, + thisArg?: any): TResult; - interface LoDashImplicitObjectWrapper { - uniq(): LoDashImplicitArrayWrapper; + /** + * @see _.reduce + **/ + reduce( + collection: Dictionary, + callback: MemoIterator, + thisArg?: any): TResult; /** - * @see _.uniq - */ - uniq(): LoDashImplicitArrayWrapper; - } + * @see _.reduce + **/ + inject( + collection: Array, + callback: MemoIterator, + accumulator: TResult, + thisArg?: any): TResult; - interface LoDashExplicitWrapper { /** - * @see _.uniq - */ - uniq(): LoDashExplicitArrayWrapper; - } + * @see _.reduce + **/ + inject( + collection: List, + callback: MemoIterator, + accumulator: TResult, + thisArg?: any): TResult; - interface LoDashExplicitArrayWrapper { /** - * @see _.uniq - */ - uniq(): LoDashExplicitArrayWrapper; + * @see _.reduce + **/ + inject( + collection: Dictionary, + callback: MemoIterator, + accumulator: TResult, + thisArg?: any): TResult; /** - * @see _.uniq - */ - uniq(): LoDashExplicitArrayWrapper; - } + * @see _.reduce + **/ + inject( + collection: Array, + callback: MemoIterator, + thisArg?: any): TResult; - interface LoDashExplicitObjectWrapper { /** - * @see _.uniq - */ - uniq(): LoDashExplicitArrayWrapper; + * @see _.reduce + **/ + inject( + collection: List, + callback: MemoIterator, + thisArg?: any): TResult; /** - * @see _.uniq - */ - uniq(): LoDashExplicitArrayWrapper; - } + * @see _.reduce + **/ + inject( + collection: Dictionary, + callback: MemoIterator, + thisArg?: any): TResult; - //_.uniqBy - interface LoDashStatic { /** - * This method is like `_.uniq` except that it accepts `iteratee` which is - * invoked for each element in `array` to generate the criterion by which - * uniqueness is computed. The iteratee is invoked with one argument: (value). - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to inspect. - * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element. - * @returns {Array} Returns the new duplicate free array. - * @example - * - * _.uniqBy([2.1, 1.2, 2.3], Math.floor); - * // => [2.1, 1.2] - * - * // using the `_.property` iteratee shorthand - * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); - * // => [{ 'x': 1 }, { 'x': 2 }] - */ - uniqBy( - array: List, - iteratee: ListIterator - ): T[]; + * @see _.reduce + **/ + foldl( + collection: Array, + callback: MemoIterator, + accumulator: TResult, + thisArg?: any): TResult; /** - * @see _.uniqBy - */ - uniqBy( - array: List, - iteratee: ListIterator - ): T[]; + * @see _.reduce + **/ + foldl( + collection: List, + callback: MemoIterator, + accumulator: TResult, + thisArg?: any): TResult; /** - * @see _.uniqBy - */ - uniqBy( - array: List, - iteratee: string - ): T[]; + * @see _.reduce + **/ + foldl( + collection: Dictionary, + callback: MemoIterator, + accumulator: TResult, + thisArg?: any): TResult; /** - * @see _.uniqBy - */ - uniqBy( - array: List, - iteratee: Object - ): T[]; + * @see _.reduce + **/ + foldl( + collection: Array, + callback: MemoIterator, + thisArg?: any): TResult; /** - * @see _.uniqBy - */ - uniqBy( - array: List, - iteratee: TWhere - ): T[]; - } + * @see _.reduce + **/ + foldl( + collection: List, + callback: MemoIterator, + thisArg?: any): TResult; - interface LoDashImplicitWrapper { /** - * @see _.uniqBy - */ - uniqBy( - iteratee: ListIterator - ): LoDashImplicitArrayWrapper; + * @see _.reduce + **/ + foldl( + collection: Dictionary, + callback: MemoIterator, + thisArg?: any): TResult; } - interface LoDashImplicitArrayWrapper { - /** - * @see _.uniqBy - */ - uniqBy( - iteratee: ListIterator - ): LoDashImplicitArrayWrapper; + interface LoDashArrayWrapper { + /** + * @see _.reduce + **/ + reduce( + callback: MemoIterator, + accumulator: TResult, + thisArg?: any): TResult; /** - * @see _.uniqBy - */ - uniqBy( - iteratee: string - ): LoDashImplicitArrayWrapper; + * @see _.reduce + **/ + reduce( + callback: MemoIterator, + thisArg?: any): TResult; /** - * @see _.uniqBy - */ - uniqBy( - iteratee: TWhere - ): LoDashImplicitArrayWrapper; - } + * @see _.reduce + **/ + inject( + callback: MemoIterator, + accumulator: TResult, + thisArg?: any): TResult; - interface LoDashImplicitObjectWrapper { /** - * @see _.uniqBy - */ - uniqBy( - iteratee: ListIterator - ): LoDashImplicitArrayWrapper; + * @see _.reduce + **/ + inject( + callback: MemoIterator, + thisArg?: any): TResult; /** - * @see _.uniqBy - */ - uniqBy( - iteratee: ListIterator - ): LoDashImplicitArrayWrapper; + * @see _.reduce + **/ + foldl( + callback: MemoIterator, + accumulator: TResult, + thisArg?: any): TResult; /** - * @see _.uniqBy - */ - uniqBy( - iteratee: string - ): LoDashImplicitArrayWrapper; + * @see _.reduce + **/ + foldl( + callback: MemoIterator, + thisArg?: any): TResult; + } - /** - * @see _.uniqBy - */ - uniqBy( - iteratee: Object - ): LoDashImplicitArrayWrapper; + interface LoDashObjectWrapper { + /** + * @see _.reduce + **/ + reduce( + callback: MemoIterator, + accumulator: TResult, + thisArg?: any): TResult; /** - * @see _.uniqBy - */ - uniqBy( - iteratee: TWhere - ): LoDashImplicitArrayWrapper; - } + * @see _.reduce + **/ + reduce( + callback: MemoIterator, + thisArg?: any): TResult; - interface LoDashExplicitWrapper { /** - * @see _.uniqBy - */ - uniqBy( - iteratee: ListIterator - ): LoDashExplicitArrayWrapper; - } + * @see _.reduce + **/ + inject( + callback: MemoIterator, + accumulator: TResult, + thisArg?: any): TResult; - interface LoDashExplicitArrayWrapper { /** - * @see _.uniqBy - */ - uniqBy( - iteratee: ListIterator - ): LoDashExplicitArrayWrapper; + * @see _.reduce + **/ + inject( + callback: MemoIterator, + thisArg?: any): TResult; /** - * @see _.uniqBy - */ - uniqBy( - iteratee: string - ): LoDashExplicitArrayWrapper; + * @see _.reduce + **/ + foldl( + callback: MemoIterator, + accumulator: TResult, + thisArg?: any): TResult; /** - * @see _.uniqBy - */ - uniqBy( - iteratee: TWhere - ): LoDashExplicitArrayWrapper; + * @see _.reduce + **/ + foldl( + callback: MemoIterator, + thisArg?: any): TResult; } - interface LoDashExplicitObjectWrapper { + //_.reduceRight + interface LoDashStatic { /** - * @see _.uniqBy - */ - uniqBy( - iteratee: ListIterator - ): LoDashExplicitArrayWrapper; + * This method is like _.reduce except that it iterates over elements of a collection from + * right to left. + * @param collection The collection to iterate over. + * @param callback The function called per iteration. + * @param accumulator Initial value of the accumulator. + * @param thisArg The this binding of callback. + * @return The accumulated value. + **/ + reduceRight( + collection: Array, + callback: MemoIterator, + accumulator: TResult, + thisArg?: any): TResult; /** - * @see _.uniqBy - */ - uniqBy( - iteratee: ListIterator - ): LoDashExplicitArrayWrapper; + * @see _.reduceRight + **/ + reduceRight( + collection: List, + callback: MemoIterator, + accumulator: TResult, + thisArg?: any): TResult; /** - * @see _.uniqBy - */ - uniqBy( - iteratee: string - ): LoDashExplicitArrayWrapper; + * @see _.reduceRight + **/ + reduceRight( + collection: Dictionary, + callback: MemoIterator, + accumulator: TResult, + thisArg?: any): TResult; /** - * @see _.uniqBy - */ - uniqBy( - iteratee: Object - ): LoDashExplicitArrayWrapper; + * @see _.reduceRight + **/ + reduceRight( + collection: Array, + callback: MemoIterator, + thisArg?: any): TResult; /** - * @see _.uniqBy - */ - uniqBy( - iteratee: TWhere - ): LoDashExplicitArrayWrapper; - } + * @see _.reduceRight + **/ + reduceRight( + collection: List, + callback: MemoIterator, + thisArg?: any): TResult; - //_.sortedUniq - interface LoDashStatic { /** - * This method is like `_.uniq` except that it's designed and optimized - * for sorted arrays. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to inspect. - * @returns {Array} Returns the new duplicate free array. - * @example - * - * _.sortedUniq([1, 1, 2]); - * // => [1, 2] - */ - sortedUniq( - array: List - ): T[]; + * @see _.reduceRight + **/ + reduceRight( + collection: Dictionary, + callback: MemoIterator, + thisArg?: any): TResult; /** - * @see _.sortedUniq - */ - sortedUniq( - array: List - ): T[]; - } + * @see _.reduceRight + **/ + foldr( + collection: Array, + callback: MemoIterator, + accumulator: TResult, + thisArg?: any): TResult; - interface LoDashImplicitWrapper { /** - * @see _.sortedUniq - */ - sortedUniq(): LoDashImplicitArrayWrapper; - } + * @see _.reduceRight + **/ + foldr( + collection: List, + callback: MemoIterator, + accumulator: TResult, + thisArg?: any): TResult; - interface LoDashImplicitArrayWrapper { /** - * @see _.sortedUniq - */ - sortedUniq(): LoDashImplicitArrayWrapper; + * @see _.reduceRight + **/ + foldr( + collection: Dictionary, + callback: MemoIterator, + accumulator: TResult, + thisArg?: any): TResult; /** - * @see _.sortedUniq - */ - sortedUniq(): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - sortedUniq(): LoDashImplicitArrayWrapper; + * @see _.reduceRight + **/ + foldr( + collection: Array, + callback: MemoIterator, + thisArg?: any): TResult; /** - * @see _.sortedUniq - */ - sortedUniq(): LoDashImplicitArrayWrapper; - } + * @see _.reduceRight + **/ + foldr( + collection: List, + callback: MemoIterator, + thisArg?: any): TResult; - interface LoDashExplicitWrapper { /** - * @see _.sortedUniq - */ - sortedUniq(): LoDashExplicitArrayWrapper; + * @see _.reduceRight + **/ + foldr( + collection: Dictionary, + callback: MemoIterator, + thisArg?: any): TResult; } - interface LoDashExplicitArrayWrapper { + //_.reject + interface LoDashStatic { /** - * @see _.sortedUniq - */ - sortedUniq(): LoDashExplicitArrayWrapper; + * The opposite of _.filter this method returns the elements of a collection that + * the callback does not return truey for. + * + * If a property name is provided for callback the created "_.pluck" style callback + * will return the property value of the given element. + * + * If an object is provided for callback the created "_.where" style callback will + * return true for elements that have the properties of the given object, else false. + * @param collection The collection to iterate over. + * @param callback The function called per iteration. + * @param thisArg The this binding of callback. + * @return A new array of elements that failed the callback check. + **/ + reject( + collection: Array, + callback: ListIterator, + thisArg?: any): T[]; /** - * @see _.sortedUniq - */ - sortedUniq(): LoDashExplicitArrayWrapper; - } + * @see _.reject + **/ + reject( + collection: List, + callback: ListIterator, + thisArg?: any): T[]; - interface LoDashExplicitObjectWrapper { /** - * @see _.sortedUniq - */ - sortedUniq(): LoDashExplicitArrayWrapper; + * @see _.reject + **/ + reject( + collection: Dictionary, + callback: DictionaryIterator, + thisArg?: any): T[]; /** - * @see _.sortedUniq - */ - sortedUniq(): LoDashExplicitArrayWrapper; - } + * @see _.reject + * @param pluckValue _.pluck style callback + **/ + reject( + collection: Array, + pluckValue: string): T[]; - //_.sortedUniqBy - interface LoDashStatic { /** - * This method is like `_.uniqBy` except that it's designed and optimized - * for sorted arrays. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to inspect. - * @param {Function} [iteratee] The iteratee invoked per element. - * @returns {Array} Returns the new duplicate free array. - * @example - * - * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor); - * // => [1.1, 2.2] - */ - sortedUniqBy( - array: List, - iteratee: ListIterator - ): T[]; + * @see _.reject + * @param pluckValue _.pluck style callback + **/ + reject( + collection: List, + pluckValue: string): T[]; /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - array: List, - iteratee: ListIterator - ): T[]; + * @see _.reject + * @param pluckValue _.pluck style callback + **/ + reject( + collection: Dictionary, + pluckValue: string): T[]; /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - array: List, - iteratee: string - ): T[]; + * @see _.reject + * @param whereValue _.where style callback + **/ + reject( + collection: Array, + whereValue: W): T[]; /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - array: List, - iteratee: Object - ): T[]; + * @see _.reject + * @param whereValue _.where style callback + **/ + reject( + collection: List, + whereValue: W): T[]; /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - array: List, - iteratee: TWhere - ): T[]; + * @see _.reject + * @param whereValue _.where style callback + **/ + reject( + collection: Dictionary, + whereValue: W): T[]; } - interface LoDashImplicitWrapper { + interface LoDashArrayWrapper { /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - iteratee: ListIterator - ): LoDashImplicitArrayWrapper; - } + * @see _.reject + **/ + reject( + callback: ListIterator, + thisArg?: any): LoDashArrayWrapper; - interface LoDashImplicitArrayWrapper { /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - iteratee: ListIterator - ): LoDashImplicitArrayWrapper; + * @see _.reject + * @param pluckValue _.pluck style callback + **/ + reject(pluckValue: string): LoDashArrayWrapper; /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - iteratee: string - ): LoDashImplicitArrayWrapper; + * @see _.reject + * @param whereValue _.where style callback + **/ + reject(whereValue: W): LoDashArrayWrapper; + } + //_.sample + interface LoDashStatic { /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - iteratee: TWhere - ): LoDashImplicitArrayWrapper; - } + * Retrieves a random element or n random elements from a collection. + * @param collection The collection to sample. + * @return Returns the random sample(s) of collection. + **/ + sample(collection: Array): T; - interface LoDashImplicitObjectWrapper { /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - iteratee: ListIterator - ): LoDashImplicitArrayWrapper; + * @see _.sample + **/ + sample(collection: List): T; /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - iteratee: ListIterator - ): LoDashImplicitArrayWrapper; + * @see _.sample + **/ + sample(collection: Dictionary): T; /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - iteratee: string - ): LoDashImplicitArrayWrapper; + * @see _.sample + * @param n The number of elements to sample. + **/ + sample(collection: Array, n: number): T[]; /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - iteratee: Object - ): LoDashImplicitArrayWrapper; + * @see _.sample + * @param n The number of elements to sample. + **/ + sample(collection: List, n: number): T[]; /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - iteratee: TWhere - ): LoDashImplicitArrayWrapper; + * @see _.sample + * @param n The number of elements to sample. + **/ + sample(collection: Dictionary, n: number): T[]; } - interface LoDashExplicitWrapper { + //_.shuffle + interface LoDashStatic { /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - iteratee: ListIterator - ): LoDashExplicitArrayWrapper; - } + * Creates an array of shuffled values, using a version of the Fisher-Yates shuffle. + * See http://en.wikipedia.org/wiki/Fisher-Yates_shuffle. + * @param collection The collection to shuffle. + * @return Returns a new shuffled collection. + **/ + shuffle(collection: Array): T[]; - interface LoDashExplicitArrayWrapper { /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - iteratee: ListIterator - ): LoDashExplicitArrayWrapper; + * @see _.shuffle + **/ + shuffle(collection: List): T[]; /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - iteratee: string - ): LoDashExplicitArrayWrapper; + * @see _.shuffle + **/ + shuffle(collection: Dictionary): T[]; + } + interface LoDashArrayWrapper { /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - iteratee: TWhere - ): LoDashExplicitArrayWrapper; + * @see _.shuffle + **/ + shuffle(): LoDashArrayWrapper; } - interface LoDashExplicitObjectWrapper { + interface LoDashObjectWrapper { /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - iteratee: ListIterator - ): LoDashExplicitArrayWrapper; + * @see _.shuffle + **/ + shuffle(): LoDashArrayWrapper; + } + //_.size + interface LoDashStatic { /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - iteratee: ListIterator - ): LoDashExplicitArrayWrapper; + * Gets the size of the collection by returning collection.length for arrays and array-like + * objects or the number of own enumerable properties for objects. + * @param collection The collection to inspect. + * @return collection.length + **/ + size(collection: Array): number; /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - iteratee: string - ): LoDashExplicitArrayWrapper; + * @see _.size + **/ + size(collection: List): number; /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - iteratee: Object - ): LoDashExplicitArrayWrapper; + * @see _.size + * @param object The object to inspect + * @return The number of own enumerable properties. + **/ + size(object: T): number; /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - iteratee: TWhere - ): LoDashExplicitArrayWrapper; + * @see _.size + * @param aString The string to inspect + * @return The length of aString + **/ + size(aString: string): number; } - //_.unionWith DUMMY + //_.some interface LoDashStatic { /** - * This method is like `_.union` except that it accepts `comparator` which - * is invoked to compare elements of `arrays`. The comparator is invoked - * with two arguments: (arrVal, othVal). - * - * @static - * @memberOf _ - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new array of combined values. - * @example - * - * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; - * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; - * - * _.unionWith(objects, others, _.isEqual); - * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] - */ - unionWith( - array: any[]|List, - ...values: any[] - ): any[]; - } + * Checks if the callback returns a truey value for any element of a collection. The function + * returns as soon as it finds a passing value and does not iterate over the entire collection. + * The callback is bound to thisArg and invoked with three arguments; (value, index|key, collection). + * + * If a property name is provided for callback the created "_.pluck" style callback will return + * the property value of the given element. + * + * If an object is provided for callback the created "_.where" style callback will return true for + * elements that have the properties of the given object, else false. + * @param collection The collection to iterate over. + * @param callback The function called per iteration. + * @param thisArg The this binding of callback. + * @return True if any element passed the callback check, else false. + **/ + some( + collection: Array, + callback?: ListIterator, + thisArg?: any): boolean; - //_.uniqWith DUMMY - interface LoDashStatic { /** - * This method is like `_.uniq` except that it accepts `comparator` which - * is invoked to compare elements of `array`. The comparator is invoked with - * two arguments: (arrVal, othVal). - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to inspect. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new duplicate free array. - * @example - * - * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }]; - * - * _.uniqWith(objects, _.isEqual); - * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }] - */ - uniqWith( - array: any[]|List, - ...values: any[] - ): any[]; - } + * @see _.some + **/ + some( + collection: List, + callback?: ListIterator, + thisArg?: any): boolean; - //_.unzip - interface LoDashStatic { /** - * This method is like _.zip except that it accepts an array of grouped elements and creates an array - * regrouping the elements to their pre-zip configuration. - * - * @param array The array of grouped elements to process. - * @return Returns the new array of regrouped elements. - */ - unzip(array: List>): T[][]; - } + * @see _.some + **/ + some( + collection: Dictionary, + callback?: DictionaryIterator, + thisArg?: any): boolean; - interface LoDashImplicitArrayWrapper { /** - * @see _.unzip - */ - unzip(): LoDashImplicitArrayWrapper; - } + * @see _.some + **/ + some( + collection: {}, + callback?: ListIterator<{}, boolean>, + thisArg?: any): boolean; - interface LoDashImplicitObjectWrapper { /** - * @see _.unzip - */ - unzip(): LoDashImplicitArrayWrapper; - } + * @see _.some + * @param pluckValue _.pluck style callback + **/ + some( + collection: Array, + pluckValue: string): boolean; - interface LoDashExplicitArrayWrapper { /** - * @see _.unzip - */ - unzip(): LoDashExplicitArrayWrapper; - } + * @see _.some + * @param pluckValue _.pluck style callback + **/ + some( + collection: List, + pluckValue: string): boolean; - interface LoDashExplicitObjectWrapper { /** - * @see _.unzip - */ - unzip(): LoDashExplicitArrayWrapper; - } + * @see _.some + * @param pluckValue _.pluck style callback + **/ + some( + collection: Dictionary, + pluckValue: string): boolean; - //_.unzipWith - interface LoDashStatic { /** - * This method is like _.unzip except that it accepts an iteratee to specify how regrouped values should be - * combined. The iteratee is bound to thisArg and invoked with four arguments: (accumulator, value, index, - * group). - * - * @param array The array of grouped elements to process. - * @param iteratee The function to combine regrouped values. - * @param thisArg The this binding of iteratee. - * @return Returns the new array of regrouped elements. - */ - unzipWith( - array: List>, - iteratee?: MemoIterator - ): TResult[]; - } + * @see _.some + * @param whereValue _.where style callback + **/ + some( + collection: Array, + whereValue: W): boolean; - interface LoDashImplicitArrayWrapper { /** - * @see _.unzipWith - */ - unzipWith( - iteratee?: MemoIterator - ): LoDashImplicitArrayWrapper; - } + * @see _.some + * @param whereValue _.where style callback + **/ + some( + collection: List, + whereValue: W): boolean; - interface LoDashImplicitObjectWrapper { /** - * @see _.unzipWith - */ - unzipWith( - iteratee?: MemoIterator - ): LoDashImplicitArrayWrapper; - } + * @see _.some + * @param whereValue _.where style callback + **/ + some( + collection: Dictionary, + whereValue: W): boolean; - //_.without - interface LoDashStatic { /** - * Creates an array excluding all provided values using SameValueZero for equality comparisons. - * - * @param array The array to filter. - * @param values The values to exclude. - * @return Returns the new array of filtered values. - */ - without( - array: List, - ...values: T[] - ): T[]; - } + * @see _.some + **/ + any( + collection: Array, + callback?: ListIterator, + thisArg?: any): boolean; - interface LoDashImplicitArrayWrapper { /** - * @see _.without - */ - without(...values: T[]): LoDashImplicitArrayWrapper; - } + * @see _.some + **/ + any( + collection: List, + callback?: ListIterator, + thisArg?: any): boolean; - interface LoDashImplicitObjectWrapper { /** - * @see _.without - */ - without(...values: T[]): LoDashImplicitArrayWrapper; - } + * @see _.some + **/ + any( + collection: Dictionary, + callback?: DictionaryIterator, + thisArg?: any): boolean; - interface LoDashExplicitArrayWrapper { /** - * @see _.without - */ - without(...values: T[]): LoDashExplicitArrayWrapper; - } + * @see _.some + **/ + any( + collection: {}, + callback?: ListIterator<{}, boolean>, + thisArg?: any): boolean; - interface LoDashExplicitObjectWrapper { /** - * @see _.without - */ - without(...values: T[]): LoDashExplicitArrayWrapper; - } + * @see _.some + * @param pluckValue _.pluck style callback + **/ + any( + collection: Array, + pluckValue: string): boolean; - //_.xor - interface LoDashStatic { /** - * Creates an array of unique values that is the symmetric difference of the provided arrays. - * - * @param arrays The arrays to inspect. - * @return Returns the new array of values. - */ - xor(...arrays: List[]): T[]; - } + * @see _.some + * @param pluckValue _.pluck style callback + **/ + any( + collection: List, + pluckValue: string): boolean; - interface LoDashImplicitArrayWrapper { /** - * @see _.xor - */ - xor(...arrays: List[]): LoDashImplicitArrayWrapper; - } + * @see _.some + * @param pluckValue _.pluck style callback + **/ + any( + collection: Dictionary, + pluckValue: string): boolean; - interface LoDashImplicitObjectWrapper { /** - * @see _.xor - */ - xor(...arrays: List[]): LoDashImplicitArrayWrapper; - } + * @see _.some + * @param whereValue _.where style callback + **/ + any( + collection: Array, + whereValue: W): boolean; - interface LoDashExplicitArrayWrapper { /** - * @see _.xor - */ - xor(...arrays: List[]): LoDashExplicitArrayWrapper; - } + * @see _.some + * @param whereValue _.where style callback + **/ + any( + collection: List, + whereValue: W): boolean; - interface LoDashExplicitObjectWrapper { /** - * @see _.xor - */ - xor(...arrays: List[]): LoDashExplicitArrayWrapper; + * @see _.some + * @param whereValue _.where style callback + **/ + any( + collection: Dictionary, + whereValue: W): boolean; } - //_.xorBy DUMMY + //_.sortBy interface LoDashStatic { /** - * This method is like `_.xor` except that it accepts `iteratee` which is - * invoked for each element of each `arrays` to generate the criterion by which - * uniqueness is computed. The iteratee is invoked with one argument: (value). - * - * @static - * @memberOf _ - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element. - * @returns {Array} Returns the new array of values. - * @example - * - * _.xorBy([2.1, 1.2], [4.3, 2.4], Math.floor); - * // => [1.2, 4.3] - * - * // using the `_.property` iteratee shorthand - * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); - * // => [{ 'x': 2 }] - */ - xorBy( - array: any[]|List, - ...values: any[] - ): any[]; - } + * Creates an array of elements, sorted in ascending order by the results of running each + * element in a collection through the callback. This method performs a stable sort, that + * is, it will preserve the original sort order of equal elements. The callback is bound + * to thisArg and invoked with three arguments; (value, index|key, collection). + * + * If a property name is provided for callback the created "_.pluck" style callback will + * return the property value of the given element. + * + * If an object is provided for callback the created "_.where" style callback will return + * true for elements that have the properties of the given object, else false. + * @param collection The collection to iterate over. + * @param callback The function called per iteration. + * @param thisArg The this binding of callback. + * @return A new array of sorted elements. + **/ + sortBy( + collection: Array, + callback?: ListIterator, + thisArg?: any): T[]; - //_.xorWith DUMMY - interface LoDashStatic { /** - * This method is like `_.xor` except that it accepts `comparator` which is - * invoked to compare elements of `arrays`. The comparator is invoked with - * two arguments: (arrVal, othVal). - * - * @static - * @memberOf _ - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new array of values. - * @example - * - * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; - * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; - * - * _.xorWith(objects, others, _.isEqual); - * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] - */ - xorWith( - array: any[]|List, - ...values: any[] - ): any[]; - } + * @see _.sortBy + **/ + sortBy( + collection: List, + callback?: ListIterator, + thisArg?: any): T[]; - //_.zip - interface LoDashStatic { /** - * Creates an array of grouped elements, the first of which contains the first elements of the given arrays, - * the second of which contains the second elements of the given arrays, and so on. - * - * @param arrays The arrays to process. - * @return Returns the new array of grouped elements. - */ - zip(...arrays: List[]): T[][]; - } + * @see _.sortBy + * @param pluckValue _.pluck style callback + **/ + sortBy( + collection: Array, + pluckValue: string): T[]; - interface LoDashImplicitArrayWrapper { /** - * @see _.zip - */ - zip(...arrays: List[]): _.LoDashImplicitArrayWrapper; - } + * @see _.sortBy + * @param pluckValue _.pluck style callback + **/ + sortBy( + collection: List, + pluckValue: string): T[]; - interface LoDashImplicitObjectWrapper { /** - * @see _.zip - */ - zip(...arrays: List[]): _.LoDashImplicitArrayWrapper; - } + * @see _.sortBy + * @param whereValue _.where style callback + **/ + sortBy( + collection: Array, + whereValue: W): T[]; - interface LoDashExplicitArrayWrapper { /** - * @see _.zip - */ - zip(...arrays: List[]): _.LoDashExplicitArrayWrapper; + * @see _.sortBy + * @param whereValue _.where style callback + **/ + sortBy( + collection: List, + whereValue: W): T[]; } - interface LoDashExplicitObjectWrapper { + interface LoDashArrayWrapper { /** - * @see _.zip - */ - zip(...arrays: List[]): _.LoDashExplicitArrayWrapper; - } - - //_.zipObject - interface LoDashStatic { - /** - * The inverse of _.pairs; this method returns an object composed from arrays of property names and values. - * Provide either a single two dimensional array, e.g. [[key1, value1], [key2, value2]] or two arrays, one of - * property names and one of corresponding values. - * - * @param props The property names. - * @param values The property values. - * @return Returns the new object. - */ - zipObject( - props: List|List>, - values?: List - ): TResult; + * @see _.sortBy + **/ + sortBy( + callback?: ListIterator, + thisArg?: any): LoDashArrayWrapper; /** - * @see _.zipObject - */ - zipObject( - props: List|List>, - values?: List - ): TResult; + * @see _.sortBy + * @param pluckValue _.pluck style callback + **/ + sortBy(pluckValue: string): LoDashArrayWrapper; /** - * @see _.zipObject - */ - zipObject( - props: List|List>, - values?: List - ): _.Dictionary; + * @see _.sortBy + * @param whereValue _.where style callback + **/ + sortBy(whereValue: W): LoDashArrayWrapper; } - interface LoDashImplicitArrayWrapper { + //_.toArray + interface LoDashStatic { /** - * @see _.zipObject - */ - zipObject( - values?: List - ): _.LoDashImplicitObjectWrapper; + * Converts the collection to an array. + * @param collection The collection to convert. + * @return The new converted array. + **/ + toArray(collection: Array): T[]; /** - * @see _.zipObject - */ - zipObject( - values?: List - ): _.LoDashImplicitObjectWrapper; + * @see _.toArray + **/ + toArray(collection: List): T[]; /** - * @see _.zipObject - */ - zipObject( - values?: List - ): _.LoDashImplicitObjectWrapper<_.Dictionary>; + * @see _.toArray + **/ + toArray(collection: Dictionary): T[]; } - interface LoDashImplicitObjectWrapper { - /** - * @see _.zipObject - */ - zipObject( - values?: List - ): _.LoDashImplicitObjectWrapper; - + interface LoDashArrayWrapper { /** - * @see _.zipObject - */ - zipObject( - values?: List - ): _.LoDashImplicitObjectWrapper; + * @see _.toArray + **/ + toArray(): LoDashArrayWrapper; + } + interface LoDashObjectWrapper { /** - * @see _.zipObject - */ - zipObject( - values?: List - ): _.LoDashImplicitObjectWrapper<_.Dictionary>; + * @see _.toArray + **/ + toArray(): LoDashArrayWrapper; } - interface LoDashExplicitArrayWrapper { + //_.where + interface LoDashStatic { /** - * @see _.zipObject - */ - zipObject( - values?: List - ): _.LoDashExplicitObjectWrapper; + * Performs a deep comparison of each element in a collection to the given properties + * object, returning an array of all elements that have equivalent property values. + * @param collection The collection to iterate over. + * @param properties The object of property values to filter by. + * @return A new array of elements that have the given properties. + **/ + where( + list: Array, + properties: U): T[]; /** - * @see _.zipObject - */ - zipObject( - values?: List - ): _.LoDashExplicitObjectWrapper; + * @see _.where + **/ + where( + list: List, + properties: U): T[]; /** - * @see _.zipObject - */ - zipObject( - values?: List - ): _.LoDashExplicitObjectWrapper<_.Dictionary>; + * @see _.where + **/ + where( + list: Dictionary, + properties: U): T[]; } - interface LoDashExplicitObjectWrapper { + interface LoDashArrayWrapper { /** - * @see _.zipObject - */ - zipObject( - values?: List - ): _.LoDashExplicitObjectWrapper; + * @see _.where + **/ + where(properties: U): LoDashArrayWrapper; + } - /** - * @see _.zipObject - */ - zipObject( - values?: List - ): _.LoDashExplicitObjectWrapper; + /******** + * Date * + ********/ + //_.now + interface LoDashStatic { /** - * @see _.zipObject - */ - zipObject( - values?: List - ): _.LoDashExplicitObjectWrapper<_.Dictionary>; + * Gets the number of milliseconds that have elapsed since the Unix epoch + * (1 January 1970 00:00:00 UTC). + * @return The number of milliseconds. + **/ + now(): number; } - //_.zipWith + /************* + * Functions * + *************/ + + //_.after interface LoDashStatic { /** - * This method is like _.zip except that it accepts an iteratee to specify how grouped values should be - * combined. The iteratee is bound to thisArg and invoked with four arguments: (accumulator, value, index, - * group). - * @param {...Array} [arrays] The arrays to process. - * @param {Function} [iteratee] The function to combine grouped values. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @return Returns the new array of grouped elements. - */ - zipWith(...args: any[]): TResult[]; + * Creates a function that executes func, with the this binding and arguments of the + * created function, only after being called n times. + * @param n The number of times the function must be called before func is executed. + * @param func The function to restrict. + * @return The new restricted function. + **/ + after( + n: number, + func: Function): Function; } - interface LoDashImplicitArrayWrapper { + interface LoDashWrapper { /** - * @see _.zipWith - */ - zipWith(...args: any[]): LoDashImplicitArrayWrapper; + * @see _.after + **/ + after(func: Function): LoDashObjectWrapper; } - /********* - * Chain * - *********/ - - //_.chain + //_.bind interface LoDashStatic { /** - * Creates a lodash object that wraps value with explicit method chaining enabled. - * - * @param value The value to wrap. - * @return Returns the new lodash wrapper instance. - */ - chain(value: number): LoDashExplicitWrapper; - chain(value: string): LoDashExplicitWrapper; - chain(value: boolean): LoDashExplicitWrapper; - chain(value: T[]): LoDashExplicitArrayWrapper; - chain(value: T): LoDashExplicitObjectWrapper; - chain(value: any): LoDashExplicitWrapper; + * Creates a function that, when called, invokes func with the this binding of thisArg + * and prepends any additional bind arguments to those provided to the bound function. + * @param func The function to bind. + * @param thisArg The this binding of func. + * @param args Arguments to be partially applied. + * @return The new bound function. + **/ + bind( + func: Function, + thisArg: any, + ...args: any[]): (...args: any[]) => any; } - interface LoDashImplicitWrapper { + interface LoDashObjectWrapper { /** - * @see _.chain - */ - chain(): LoDashExplicitWrapper; + * @see _.bind + **/ + bind( + thisArg: any, + ...args: any[]): LoDashObjectWrapper<(...args: any[]) => any>; } - interface LoDashImplicitArrayWrapper { + //_.bindAll + interface LoDashStatic { /** - * @see _.chain - */ - chain(): LoDashExplicitArrayWrapper; + * Binds methods of an object to the object itself, overwriting the existing method. Method + * names may be specified as individual arguments or as arrays of method names. If no method + * names are provided all the function properties of object will be bound. + * @param object The object to bind and assign the bound methods to. + * @param methodNames The object method names to bind, specified as individual method names + * or arrays of method names. + * @return object + **/ + bindAll( + object: T, + ...methodNames: string[]): T; } - interface LoDashImplicitObjectWrapper { + interface LoDashObjectWrapper { /** - * @see _.chain - */ - chain(): LoDashExplicitObjectWrapper; + * @see _.bindAll + **/ + bindAll(...methodNames: string[]): LoDashWrapper; } - interface LoDashExplicitWrapperBase { + //_.bindKey + interface LoDashStatic { /** - * @see _.chain - */ - chain(): TWrapper; + * Creates a function that, when called, invokes the method at object[key] and prepends any + * additional bindKey arguments to those provided to the bound function. This method differs + * from _.bind by allowing bound functions to reference methods that will be redefined or don't + * yet exist. See http://michaux.ca/articles/lazy-function-definition-pattern. + * @param object The object the method belongs to. + * @param key The key of the method. + * @param args Arguments to be partially applied. + * @return The new bound function. + **/ + bindKey( + object: T, + key: string, + ...args: any[]): Function; } - //_.tap - interface LoDashStatic { + interface LoDashObjectWrapper { /** - * This method invokes interceptor and returns value. The interceptor is bound to thisArg and invoked with one - * argument; (value). The purpose of this method is to "tap into" a method chain in order to perform operations - * on intermediate results within the chain. - * - * @param value The value to provide to interceptor. - * @param interceptor The function to invoke. - * @parem thisArg The this binding of interceptor. - * @return Returns value. - **/ - tap( - value: T, - interceptor: (value: T) => void - ): T; + * @see _.bindKey + **/ + bindKey( + key: string, + ...args: any[]): LoDashObjectWrapper; } - interface LoDashImplicitWrapperBase { + //_.compose + interface LoDashStatic { /** - * @see _.tap - */ - tap( - interceptor: (value: T) => void - ): TWrapper; + * Creates a function that is the composition of the provided functions, where each function + * consumes the return value of the function that follows. For example, composing the functions + * f(), g(), and h() produces f(g(h())). Each function is executed with the this binding of the + * composed function. + * @param funcs Functions to compose. + * @return The new composed function. + **/ + compose(...funcs: Function[]): Function; } - interface LoDashExplicitWrapperBase { + interface LoDashObjectWrapper { /** - * @see _.tap - */ - tap( - interceptor: (value: T) => void - ): TWrapper; + * @see _.compose + **/ + compose(...funcs: Function[]): LoDashObjectWrapper; } - //_.thru + //_.createCallback interface LoDashStatic { /** - * This method is like _.tap except that it returns the result of interceptor. - * - * @param value The value to provide to interceptor. - * @param interceptor The function to invoke. - * @param thisArg The this binding of interceptor. - * @return Returns the result of interceptor. - */ - thru( - value: T, - interceptor: (value: T) => TResult - ): TResult; - } + * Produces a callback bound to an optional thisArg. If func is a property name the created + * callback will return the property value for a given element. If func is an object the created + * callback will return true for elements that contain the equivalent object properties, + * otherwise it will return false. + * @param func The value to convert to a callback. + * @param thisArg The this binding of the created callback. + * @param argCount The number of arguments the callback accepts. + * @return A callback function. + **/ + createCallback( + func: string, + thisArg?: any, + argCount?: number): () => any; - interface LoDashImplicitWrapperBase { /** - * @see _.thru - */ - thru( - interceptor: (value: T) => TResult): LoDashImplicitWrapper; + * @see _.createCallback + **/ + createCallback( + func: Dictionary, + thisArg?: any, + argCount?: number): () => boolean; + } + interface LoDashWrapper { /** - * @see _.thru - */ - thru( - interceptor: (value: T) => TResult): LoDashImplicitWrapper; + * @see _.createCallback + **/ + createCallback( + thisArg?: any, + argCount?: number): LoDashObjectWrapper<() => any>; + } + interface LoDashObjectWrapper { /** - * @see _.thru - */ - thru( - interceptor: (value: T) => TResult): LoDashImplicitWrapper; + * @see _.createCallback + **/ + createCallback( + thisArg?: any, + argCount?: number): LoDashObjectWrapper<() => any>; + } + //_.curry + interface LoDashStatic { /** - * @see _.thru - */ - thru( - interceptor: (value: T) => TResult): LoDashImplicitObjectWrapper; + * Creates a function which accepts one or more arguments of func that when invoked either + * executes func returning its result, if all func arguments have been provided, or returns + * a function that accepts one or more of the remaining func arguments, and so on. The arity + * of func can be specified if func.length is not sufficient. + * @param func The function to curry. + * @param arity The arity of func. + * @return The new curried function. + **/ + curry( + func: Function, + arity?: number): Function; + } + interface LoDashObjectWrapper { /** - * @see _.thru - */ - thru( - interceptor: (value: T) => TResult[]): LoDashImplicitArrayWrapper; + * @see _.curry + **/ + curry(arity?: number): LoDashObjectWrapper; } - interface LoDashExplicitWrapperBase { + //_.debounce + interface LoDashStatic { /** - * @see _.thru - */ - thru( - interceptor: (value: T) => TResult - ): LoDashExplicitWrapper; + * Creates a function that will delay the execution of func until after wait milliseconds have + * elapsed since the last time it was invoked. Provide an options object to indicate that func + * should be invoked on the leading and/or trailing edge of the wait timeout. Subsequent calls + * to the debounced function will return the result of the last func call. + * + * Note: If leading and trailing options are true func will be called on the trailing edge of + * the timeout only if the the debounced function is invoked more than once during the wait + * timeout. + * @param func The function to debounce. + * @param wait The number of milliseconds to delay. + * @param options The options object. + * @param options.leading Specify execution on the leading edge of the timeout. + * @param options.maxWait The maximum time func is allowed to be delayed before it's called. + * @param options.trailing Specify execution on the trailing edge of the timeout. + * @return The new debounced function. + **/ + debounce( + func: T, + wait: number, + options?: DebounceSettings): T; + } + interface LoDashObjectWrapper { /** - * @see _.thru - */ - thru( - interceptor: (value: T) => TResult - ): LoDashExplicitWrapper; + * @see _.debounce + **/ + debounce( + wait: number, + options?: DebounceSettings): LoDashObjectWrapper; + } + interface DebounceSettings { /** - * @see _.thru - */ - thru( - interceptor: (value: T) => TResult - ): LoDashExplicitWrapper; + * Specify execution on the leading edge of the timeout. + **/ + leading?: boolean; /** - * @see _.thru - */ - thru( - interceptor: (value: T) => TResult - ): LoDashExplicitObjectWrapper; + * The maximum time func is allowed to be delayed before it's called. + **/ + maxWait?: number; /** - * @see _.thru - */ - thru( - interceptor: (value: T) => TResult[] - ): LoDashExplicitArrayWrapper; + * Specify execution on the trailing edge of the timeout. + **/ + trailing?: boolean; } - //_.prototype.commit - interface LoDashImplicitWrapperBase { + //_.defer + interface LoDashStatic { /** - * Executes the chained sequence and returns the wrapped result. - * - * @return Returns the new lodash wrapper instance. - */ - commit(): TWrapper; + * Defers executing the func function until the current call stack has cleared. Additional + * arguments will be provided to func when it is invoked. + * @param func The function to defer. + * @param args Arguments to invoke the function with. + * @return The timer id. + **/ + defer( + func: Function, + ...args: any[]): number; } - interface LoDashExplicitWrapperBase { + interface LoDashObjectWrapper { /** - * @see _.commit - */ - commit(): TWrapper; + * @see _.defer + **/ + defer(...args: any[]): LoDashWrapper; } - //_.prototype.concat - interface LoDashImplicitWrapperBase { + //_.delay + interface LoDashStatic { /** - * Creates a new array joining a wrapped array with any additional arrays and/or values. - * - * @param items - * @return Returns the new concatenated array. - */ - concat(...items: Array>): LoDashImplicitArrayWrapper; + * Executes the func function after wait milliseconds. Additional arguments will be provided + * to func when it is invoked. + * @param func The function to delay. + * @param wait The number of milliseconds to delay execution. + * @param args Arguments to invoke the function with. + * @return The timer id. + **/ + delay( + func: Function, + wait: number, + ...args: any[]): number; + } + interface LoDashObjectWrapper { /** - * @see _.concat - */ - concat(...items: Array>): LoDashImplicitArrayWrapper; + * @see _.delay + **/ + delay( + wait: number, + ...args: any[]): LoDashWrapper; } - interface LoDashExplicitWrapperBase { + //_.memoize + interface LoDashStatic { /** - * @see _.concat - */ - concat(...items: Array>): LoDashExplicitArrayWrapper; + * Creates a function that memoizes the result of func. If resolver is provided it will be + * used to determine the cache key for storing the result based on the arguments provided to + * the memoized function. By default, the first argument provided to the memoized function is + * used as the cache key. The func is executed with the this binding of the memoized function. + * The result cache is exposed as the cache property on the memoized function. + * @param func Computationally expensive function that will now memoized results. + * @param resolver Hash function for storing the result of `fn`. + * @return Returns the new memoizing function. + **/ + memoize( + func: T, + resolver?: Function): T; + } + //_.once + interface LoDashStatic { /** - * @see _.concat - */ - concat(...items: Array>): LoDashExplicitArrayWrapper; + * Creates a function that is restricted to execute func once. Repeat calls to the function + * will return the value of the first call. The func is executed with the this binding of the + * created function. + * @param func Function to only execute once. + * @return The new restricted function. + **/ + once(func: T): T; } - //_.prototype.plant - interface LoDashImplicitWrapperBase { + //_.partial + interface LoDashStatic { /** - * Creates a clone of the chained sequence planting value as the wrapped value. - * @param value The value to plant as the wrapped value. - * @return Returns the new lodash wrapper instance. - */ - plant(value: number): LoDashImplicitWrapper; + * Creates a function that, when called, invokes func with any additional partial arguments + * prepended to those provided to the new function. This method is similar to _.bind except + * it does not alter the this binding. + * @param func The function to partially apply arguments to. + * @param args Arguments to be partially applied. + * @return The new partially applied function. + **/ + partial( + func: Function, + ...args: any[]): Function; + } + //_.partialRight + interface LoDashStatic { /** - * @see _.plant - */ - plant(value: string): LoDashImplicitStringWrapper; + * This method is like _.partial except that partial arguments are appended to those provided + * to the new function. + * @param func The function to partially apply arguments to. + * @param args Arguments to be partially applied. + * @return The new partially applied function. + **/ + partialRight( + func: Function, + ...args: any[]): Function; + } + //_.throttle + interface LoDashStatic { /** - * @see _.plant - */ - plant(value: boolean): LoDashImplicitWrapper; + * Creates a function that, when executed, will only call the func function at most once per + * every wait milliseconds. Provide an options object to indicate that func should be invoked + * on the leading and/or trailing edge of the wait timeout. Subsequent calls to the throttled + * function will return the result of the last func call. + * + * Note: If leading and trailing options are true func will be called on the trailing edge of + * the timeout only if the the throttled function is invoked more than once during the wait timeout. + * @param func The function to throttle. + * @param wait The number of milliseconds to throttle executions to. + * @param options The options object. + * @param options.leading Specify execution on the leading edge of the timeout. + * @param options.trailing Specify execution on the trailing edge of the timeout. + * @return The new throttled function. + **/ + throttle( + func: T, + wait: number, + options?: ThrottleSettings): T; + } - /** - * @see _.plant - */ - plant(value: number[]): LoDashImplicitNumberArrayWrapper; + interface ThrottleSettings { /** - * @see _.plant - */ - plant(value: T[]): LoDashImplicitArrayWrapper; + * If you'd like to disable the leading-edge call, pass this as false. + **/ + leading?: boolean; /** - * @see _.plant - */ - plant(value: T): LoDashImplicitObjectWrapper; + * If you'd like to disable the execution on the trailing-edge, pass false. + **/ + trailing?: boolean; + } + //_.wrap + interface LoDashStatic { /** - * @see _.plant - */ - plant(value: any): LoDashImplicitWrapper; + * Creates a function that provides value to the wrapper function as its first argument. + * Additional arguments provided to the function are appended to those provided to the + * wrapper function. The wrapper is executed with the this binding of the created function. + * @param value The value to wrap. + * @param wrapper The wrapper function. + * @return The new function. + **/ + wrap( + value: any, + wrapper: (func: Function, ...args: any[]) => any): Function; } - interface LoDashExplicitWrapperBase { - /** - * @see _.plant - */ - plant(value: number): LoDashExplicitWrapper; + /************* + * Objects * + *************/ + //_.assign + interface LoDashStatic { /** - * @see _.plant - */ - plant(value: string): LoDashExplicitStringWrapper; + * Assigns own enumerable properties of source object(s) to the destination object. Subsequent + * sources will overwrite property assignments of previous sources. If a callback is provided + * it will be executed to produce the assigned values. The callback is bound to thisArg and + * invoked with two arguments; (objectValue, sourceValue). + * @param object The destination object. + * @param s1-8 The source object(s) + * @param callback The function to customize merging properties. + * @param thisArg The this binding of callback. + * @return The destination object. + **/ + assign( + object: T, + s1: S1, + callback?: (objectValue: Value, sourceValue: Value) => Value, + thisArg?: any): Result; /** - * @see _.plant - */ - plant(value: boolean): LoDashExplicitWrapper; + * @see _.assign + **/ + assign( + object: T, + s1: S1, + s2: S2, + callback?: (objectValue: Value, sourceValue: Value) => Value, + thisArg?: any): Result; /** - * @see _.plant - */ - plant(value: number[]): LoDashExplicitNumberArrayWrapper; + * @see _.assign + **/ + assign( + object: T, + s1: S1, + s2: S2, + s3: S3, + callback?: (objectValue: Value, sourceValue: Value) => Value, + thisArg?: any): Result; /** - * @see _.plant - */ - plant(value: T[]): LoDashExplicitArrayWrapper; + * @see _.assign + **/ + assign( + object: T, + s1: S1, + s2: S2, + s3: S3, + s4: S4, + callback?: (objectValue: Value, sourceValue: Value) => Value, + thisArg?: any): Result; /** - * @see _.plant - */ - plant(value: T): LoDashExplicitObjectWrapper; + * @see _.assign + **/ + extend( + object: T, + s1: S1, + callback?: (objectValue: Value, sourceValue: Value) => Value, + thisArg?: any): Result; /** - * @see _.plant - */ - plant(value: any): LoDashExplicitWrapper; - } + * @see _.assign + **/ + extend( + object: T, + s1: S1, + s2: S2, + callback?: (objectValue: Value, sourceValue: Value) => Value, + thisArg?: any): Result; - //_.prototype.reverse - interface LoDashImplicitArrayWrapper { /** - * Reverses the wrapped array so the first element becomes the last, the second element becomes the second to - * last, and so on. - * - * Note: This method mutates the wrapped array. - * - * @return Returns the new reversed lodash wrapper instance. - */ - reverse(): LoDashImplicitArrayWrapper; - } + * @see _.assign + **/ + extend( + object: T, + s1: S1, + s2: S2, + s3: S3, + callback?: (objectValue: Value, sourceValue: Value) => Value, + thisArg?: any): Result; - interface LoDashExplicitArrayWrapper { /** - * @see _.reverse - */ - reverse(): LoDashExplicitArrayWrapper; + * @see _.assign + **/ + extend( + object: T, + s1: S1, + s2: S2, + s3: S3, + s4: S4, + callback?: (objectValue: Value, sourceValue: Value) => Value, + thisArg?: any): Result; } - //_.prototype.toJSON - interface LoDashWrapperBase { + interface LoDashObjectWrapper { /** - * @see _.value - */ - toJSON(): T; - } + * @see _.assign + **/ + assign( + s1: S1, + callback?: (objectValue: Value, sourceValue: Value) => Value, + thisArg?: any): TResult; - //_.prototype.toString - interface LoDashWrapperBase { /** - * Produces the result of coercing the unwrapped value to a string. - * - * @return Returns the coerced string value. - */ - toString(): string; - } - - //_.prototype.value - interface LoDashWrapperBase { + * @see _.assign + **/ + assign( + s1: S1, + s2: S2, + callback?: (objectValue: Value, sourceValue: Value) => Value, + thisArg?: any): TResult; /** - * Executes the chained sequence to extract the unwrapped value. - * - * @alias _.toJSON, _.valueOf - * - * @return Returns the resolved unwrapped value. - */ - value(): T; - } + * @see _.assign + **/ + assign( + s1: S1, + s2: S2, + s3: S3, + callback?: (objectValue: Value, sourceValue: Value) => Value, + thisArg?: any): TResult; + /** + * @see _.assign + **/ + assign( + s1: S1, + s2: S2, + s3: S3, + s4: S4, + callback?: (objectValue: Value, sourceValue: Value) => Value, + thisArg?: any): TResult; + /** + * @see _.assign + **/ + assign( + s1: S1, + s2: S2, + s3: S3, + s4: S4, + s5: S5, + callback?: (objectValue: Value, sourceValue: Value) => Value, + thisArg?: any): TResult; - //_.valueOf - interface LoDashWrapperBase { /** - * @see _.value - */ - valueOf(): T; - } - - /************** - * Collection * - **************/ + * @see _.assign + **/ + extend( + s1: S1, + callback?: (objectValue: Value, sourceValue: Value) => Value, + thisArg?: any): TResult; - //_.at - interface LoDashStatic { /** - * Creates an array of elements corresponding to the given keys, or indexes, of collection. Keys may be - * specified as individual arguments or as arrays of keys. - * - * @param collection The collection to iterate over. - * @param props The property names or indexes of elements to pick, specified individually or in arrays. - * @return Returns the new array of picked elements. - */ - at( - collection: List|Dictionary, - ...props: (number|string|(number|string)[])[] - ): T[]; + * @see _.assign + **/ + extend( + s1: S1, + s2: S2, + callback?: (objectValue: Value, sourceValue: Value) => Value, + thisArg?: any): TResult; + /** + * @see _.assign + **/ + extend( + s1: S1, + s2: S2, + s3: S3, + callback?: (objectValue: Value, sourceValue: Value) => Value, + thisArg?: any): TResult; + /** + * @see _.assign + **/ + extend( + s1: S1, + s2: S2, + s3: S3, + s4: S4, + callback?: (objectValue: Value, sourceValue: Value) => Value, + thisArg?: any): TResult; + /** + * @see _.assign + **/ + extend( + s1: S1, + s2: S2, + s3: S3, + s4: S4, + s5: S5, + callback?: (objectValue: Value, sourceValue: Value) => Value, + thisArg?: any): TResult; + } - interface LoDashImplicitArrayWrapper { + //_.clone + interface LoDashStatic { /** - * @see _.at - */ - at(...props: (number|string|(number|string)[])[]): LoDashImplicitArrayWrapper; + * Creates a clone of value. If deep is true nested objects will also be cloned, otherwise + * they will be assigned by reference. If a callback is provided it will be executed to produce + * the cloned values. If the callback returns undefined cloning will be handled by the method + * instead. The callback is bound to thisArg and invoked with one argument; (value). + * @param value The value to clone. + * @param deep Specify a deep clone. + * @param callback The function to customize cloning values. + * @param thisArg The this binding of callback. + * @return The cloned value. + **/ + clone( + value: T, + deep?: boolean, + callback?: (value: any) => any, + thisArg?: any): T; } - interface LoDashImplicitObjectWrapper { + //_.cloneDeep + interface LoDashStatic { /** - * @see _.at - */ - at(...props: (number|string|(number|string)[])[]): LoDashImplicitArrayWrapper; + * Creates a deep clone of value. If a callback is provided it will be executed to produce the + * cloned values. If the callback returns undefined cloning will be handled by the method instead. + * The callback is bound to thisArg and invoked with one argument; (value). + * + * Note: This method is loosely based on the structured clone algorithm. Functions and DOM nodes + * are not cloned. The enumerable properties of arguments objects and objects created by constructors + * other than Object are cloned to plain Object objects. + * See http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm. + * @param value The value to clone. + * @param callback The function to customize cloning values. + * @param thisArg The this binding of callback. + * @return The cloned value. + **/ + cloneDeep( + value: T, + callback?: (value: any) => any, + thisArg?: any): T; } - interface LoDashExplicitArrayWrapper { + //_.defaults + interface LoDashStatic { /** - * @see _.at - */ - at(...props: (number|string|(number|string)[])[]): LoDashExplicitArrayWrapper; + * Assigns own enumerable properties of source object(s) to the destination object for all + * destination properties that resolve to undefined. Once a property is set, additional defaults + * of the same property will be ignored. + * @param object The destination object. + * @param sources The source objects. + * @return The destination object. + **/ + defaults( + object: T, + ...sources: any[]): TResult; } - interface LoDashExplicitObjectWrapper { + interface LoDashObjectWrapper { /** - * @see _.at - */ - at(...props: (number|string|(number|string)[])[]): LoDashExplicitArrayWrapper; + * @see _.defaults + **/ + defaults(...sources: any[]): LoDashObjectWrapper } - //_.countBy + //_.findKey interface LoDashStatic { /** - * Creates an object composed of keys generated from the results of running each element of collection through - * iteratee. The corresponding value of each key is the number of times the key was returned by iteratee. The - * iteratee is bound to thisArg and invoked with three arguments: - * (value, index|key, collection). - * - * If a property name is provided for iteratee the created _.property style callback returns the property - * value of the given element. - * - * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for - * elements that have a matching property value, else false. - * - * If an object is provided for iteratee the created _.matches style callback returns true for elements that - * have the properties of the given object, else false. - * - * @param collection The collection to iterate over. - * @param iteratee The function invoked per iteration. - * @param thisArg The this binding of iteratee. - * @return Returns the composed aggregate object. - */ - countBy( - collection: List, - iteratee?: ListIterator - ): Dictionary; - - /** - * @see _.countBy - */ - countBy( - collection: Dictionary, - iteratee?: DictionaryIterator - ): Dictionary; + * This method is like _.findIndex except that it returns the key of the first element that + * passes the callback check, instead of the element itself. + * @param object The object to search. + * @param callback The function called per iteration. + * @param thisArg The this binding of callback. + * @return The key of the found element, else undefined. + **/ + findKey( + object: any, + callback: (value: any) => boolean, + thisArg?: any): string; /** - * @see _.countBy - */ - countBy( - collection: NumericDictionary, - iteratee?: NumericDictionaryIterator - ): Dictionary; + * @see _.findKey + * @param pluckValue _.pluck style callback + **/ + findKey( + object: any, + pluckValue: string): string; /** - * @see _.countBy - */ - countBy( - collection: List|Dictionary|NumericDictionary, - iteratee?: string - ): Dictionary; + * @see _.findKey + * @param whereValue _.where style callback + **/ + findKey, T>( + object: T, + whereValue: W): string; + } + //_.findLastKey + interface LoDashStatic { /** - * @see _.countBy - */ - countBy( - collection: List|Dictionary|NumericDictionary, - iteratee?: W - ): Dictionary; + * This method is like _.findKey except that it iterates over elements of a collection in the opposite order. + * @param object The object to search. + * @param callback The function called per iteration. + * @param thisArg The this binding of callback. + * @return The key of the found element, else undefined. + **/ + findLastKey( + object: any, + callback: (value: any) => boolean, + thisArg?: any): string; /** - * @see _.countBy - */ - countBy( - collection: List|Dictionary|NumericDictionary, - iteratee?: Object - ): Dictionary; - } + * @see _.findLastKey + * @param pluckValue _.pluck style callback + **/ + findLastKey( + object: any, + pluckValue: string): string; - interface LoDashImplicitWrapper { /** - * @see _.countBy - */ - countBy( - iteratee?: ListIterator - ): LoDashImplicitObjectWrapper>; + * @see _.findLastKey + * @param whereValue _.where style callback + **/ + findLastKey, T>( + object: T, + whereValue: W): string; } - interface LoDashImplicitArrayWrapper { - /** - * @see _.countBy - */ - countBy( - iteratee?: ListIterator - ): LoDashImplicitObjectWrapper>; - + //_.forIn + interface LoDashStatic { /** - * @see _.countBy - */ - countBy( - iteratee?: string - ): LoDashImplicitObjectWrapper>; + * Iterates over own and inherited enumerable properties of an object, executing the callback for + * each property. The callback is bound to thisArg and invoked with three arguments; (value, key, + * object). Callbacks may exit iteration early by explicitly returning false. + * @param object The object to iterate over. + * @param callback The function called per iteration. + * @param thisArg The this binding of callback. + * @return object + **/ + forIn( + object: Dictionary, + callback?: DictionaryIterator, + thisArg?: any): Dictionary; /** - * @see _.countBy - */ - countBy( - iteratee?: W - ): LoDashImplicitObjectWrapper>; + * @see _.forIn + **/ + forIn( + object: T, + callback?: ObjectIterator, + thisArg?: any): T; } - interface LoDashImplicitObjectWrapper { + interface LoDashObjectWrapper { /** - * @see _.countBy - */ - countBy( - iteratee?: ListIterator|DictionaryIterator|NumericDictionaryIterator - ): LoDashImplicitObjectWrapper>; + * @see _.forIn + **/ + forIn( + callback: ObjectIterator, + thisArg?: any): _.LoDashObjectWrapper; + } + //_.forInRight + interface LoDashStatic { /** - * @see _.countBy - */ - countBy( - iteratee?: string - ): LoDashImplicitObjectWrapper>; + * This method is like _.forIn except that it iterates over elements of a collection in the + * opposite order. + * @param object The object to iterate over. + * @param callback The function called per iteration. + * @param thisArg The this binding of callback. + * @return object + **/ + forInRight( + object: Dictionary, + callback?: DictionaryIterator, + thisArg?: any): Dictionary; /** - * @see _.countBy - */ - countBy( - iteratee?: W - ): LoDashImplicitObjectWrapper>; + * @see _.forInRight + **/ + forInRight( + object: T, + callback?: ObjectIterator, + thisArg?: any): T; } - interface LoDashExplicitWrapper { + interface LoDashObjectWrapper { /** - * @see _.countBy - */ - countBy( - iteratee?: ListIterator - ): LoDashExplicitObjectWrapper>; + * @see _.forInRight + **/ + forInRight( + callback: ObjectIterator, + thisArg?: any): _.LoDashObjectWrapper; } - interface LoDashExplicitArrayWrapper { + //_.forOwn + interface LoDashStatic { /** - * @see _.countBy - */ - countBy( - iteratee?: ListIterator - ): LoDashExplicitObjectWrapper>; + * Iterates over own enumerable properties of an object, executing the callback for each + * property. The callback is bound to thisArg and invoked with three arguments; (value, key, + * object). Callbacks may exit iteration early by explicitly returning false. + * @param object The object to iterate over. + * @param callback The function called per iteration. + * @param thisArg The this binding of callback. + * @return object + **/ + forOwn( + object: Dictionary, + callback?: DictionaryIterator, + thisArg?: any): Dictionary; /** - * @see _.countBy - */ - countBy( - iteratee?: string - ): LoDashExplicitObjectWrapper>; + * @see _.forOwn + **/ + forOwn( + object: T, + callback?: ObjectIterator, + thisArg?: any): T; + } + interface LoDashObjectWrapper { /** - * @see _.countBy - */ - countBy( - iteratee?: W - ): LoDashExplicitObjectWrapper>; + * @see _.forOwn + **/ + forOwn( + callback: ObjectIterator, + thisArg?: any): _.LoDashObjectWrapper; } - interface LoDashExplicitObjectWrapper { + //_.forOwnRight + interface LoDashStatic { /** - * @see _.countBy - */ - countBy( - iteratee?: ListIterator|DictionaryIterator|NumericDictionaryIterator - ): LoDashExplicitObjectWrapper>; - + * This method is like _.forOwn except that it iterates over elements of a collection in the + * opposite order. + * @param object The object to iterate over. + * @param callback The function called per iteration. + * @param thisArg The this binding of callback. + * @return object + **/ + forOwnRight( + object: Dictionary, + callback?: DictionaryIterator, + thisArg?: any): Dictionary; /** - * @see _.countBy - */ - countBy( - iteratee?: string - ): LoDashExplicitObjectWrapper>; + * @see _.forOwnRight + **/ + forOwnRight( + object: T, + callback?: ObjectIterator, + thisArg?: any): T; + } + interface LoDashObjectWrapper { /** - * @see _.countBy - */ - countBy( - iteratee?: W - ): LoDashExplicitObjectWrapper>; + * @see _.forOwnRight + **/ + forOwnRight( + callback: ObjectIterator, + thisArg?: any): _.LoDashObjectWrapper; } - //_.each + //_.functions interface LoDashStatic { /** - * @see _.forEach - */ - each( - collection: T[], - iteratee?: ListIterator - ): T[]; + * Creates a sorted array of property names of all enumerable properties, own and inherited, of + * object that have function values. + * @param object The object to inspect. + * @return An array of property names that have function values. + **/ + functions(object: any): string[]; /** - * @see _.forEach - */ - each( - collection: List, - iteratee?: ListIterator - ): List; + * @see _functions + **/ + methods(object: any): string[]; + } + interface LoDashObjectWrapper { /** - * @see _.forEach - */ - each( - collection: Dictionary, - iteratee?: DictionaryIterator - ): Dictionary; + * @see _.functions + **/ + functions(): _.LoDashArrayWrapper; /** - * @see _.forEach - */ - each( - collection: T, - iteratee?: ObjectIterator - ): T; + * @see _.functions + **/ + methods(): _.LoDashArrayWrapper; + } + //_.get + interface LoDashStatic { /** - * @see _.forEach - */ - each( - collection: T, - iteratee?: ObjectIterator + * Gets the property value at path of object. If the resolved + * value is undefined the defaultValue is used in its place. + * @param object The object to query. + * @param path The path of the property to get. + * @param defaultValue The value returned if the resolved value is undefined. + * @return Returns the resolved value. + **/ + get(object : Object, + path:string|string[], + defaultValue?:T ): T; } - interface LoDashImplicitWrapper { + //_.has + interface LoDashStatic { /** - * @see _.forEach - */ - each( - iteratee: ListIterator - ): LoDashImplicitWrapper; + * Checks if the specified object property exists and is a direct property, instead of an + * inherited property. + * @param object The object to check. + * @param property The property to check for. + * @return True if key is a direct property, else false. + **/ + has(object: any, property: string): boolean; } - interface LoDashImplicitArrayWrapper { + //_.invert + interface LoDashStatic { /** - * @see _.forEach - */ - each( - iteratee: ListIterator - ): LoDashImplicitArrayWrapper; + * Creates an object composed of the inverted keys and values of the given object. + * @param object The object to invert. + * @return The created inverted object. + **/ + invert(object: any): any; } - interface LoDashImplicitObjectWrapper { + //_.isArguments + interface LoDashStatic { /** - * @see _.forEach - */ - each( - iteratee?: ListIterator|DictionaryIterator - ): LoDashImplicitObjectWrapper; + * Checks if value is an arguments object. + * @param value The value to check. + * @return True if the value is an arguments object, else false. + **/ + isArguments(value?: any): boolean; } - interface LoDashExplicitWrapper { + //_.isArray + interface LoDashStatic { /** - * @see _.forEach - */ - each( - iteratee: ListIterator - ): LoDashExplicitWrapper; + * Checks if value is an array. + * @param value The value to check. + * @return True if the value is an array, else false. + **/ + isArray(value?: any): boolean; } - interface LoDashExplicitArrayWrapper { + //_.isBoolean + interface LoDashStatic { /** - * @see _.forEach - */ - each( - iteratee: ListIterator - ): LoDashExplicitArrayWrapper; + * Checks if value is a boolean value. + * @param value The value to check. + * @return True if the value is a boolean value, else false. + **/ + isBoolean(value?: any): boolean; } - interface LoDashExplicitObjectWrapper { + //_.isDate + interface LoDashStatic { /** - * @see _.forEach - */ - each( - iteratee?: ListIterator|DictionaryIterator - ): LoDashExplicitObjectWrapper; + * Checks if value is a date. + * @param value The value to check. + * @return True if the value is a date, else false. + **/ + isDate(value?: any): boolean; } - //_.eachRight + //_.isElement interface LoDashStatic { /** - * @see _.forEachRight - */ - eachRight( - collection: T[], - iteratee?: ListIterator - ): T[]; + * Checks if value is a DOM element. + * @param value The value to check. + * @return True if the value is a DOM element, else false. + **/ + isElement(value?: any): boolean; + } + //_.isEmpty + interface LoDashStatic { /** - * @see _.forEachRight - */ - eachRight( - collection: List, - iteratee?: ListIterator - ): List; + * Checks if value is empty. Arrays, strings, or arguments objects with a length of 0 and objects + * with no own enumerable properties are considered "empty". + * @param value The value to inspect. + * @return True if the value is empty, else false. + **/ + isEmpty(value?: any[]|Dictionary|string|any): boolean; + } + //_.isError + interface LoDashStatic { /** - * @see _.forEachRight - */ - eachRight( - collection: Dictionary, - iteratee?: DictionaryIterator - ): Dictionary; + * Checks if value is an Error, EvalError, RangeError, ReferenceError, SyntaxError, TypeError, + * or URIError object. + * @param value The value to check. + * @return True if value is an error object, else false. + */ + isError(value: any): boolean; + } - /** - * @see _.forEachRight - */ - eachRight( - collection: T, - iteratee?: ObjectIterator - ): T; + //_.isEqual + interface LoDashStatic { /** - * @see _.forEachRight - */ - eachRight( - collection: T, - iteratee?: ObjectIterator - ): T; + * Performs a deep comparison between two values to determine if they are equivalent to each + * other. If a callback is provided it will be executed to compare values. If the callback + * returns undefined comparisons will be handled by the method instead. The callback is bound to + * thisArg and invoked with two arguments; (a, b). + * @param a The value to compare. + * @param b The other value to compare. + * @param callback The function to customize comparing values. + * @param thisArg The this binding of callback. + * @return True if the values are equivalent, else false. + **/ + isEqual( + a?: any, + b?: any, + callback?: (a: any, b: any) => boolean, + thisArg?: any): boolean; } - interface LoDashImplicitWrapper { + //_.isFinite + interface LoDashStatic { /** - * @see _.forEachRight - */ - eachRight( - iteratee: ListIterator - ): LoDashImplicitWrapper; + * Checks if value is, or can be coerced to, a finite number. + * + * Note: This is not the same as native isFinite which will return true for booleans and empty + * strings. See http://es5.github.io/#x15.1.2.5. + * @param value The value to check. + * @return True if the value is finite, else false. + **/ + isFinite(value?: any): boolean; } - interface LoDashImplicitArrayWrapper { + //_.isFunction + interface LoDashStatic { /** - * @see _.forEachRight - */ - eachRight( - iteratee: ListIterator - ): LoDashImplicitArrayWrapper; + * Checks if value is a function. + * @param value The value to check. + * @return True if the value is a function, else false. + **/ + isFunction(value?: any): boolean; } - interface LoDashImplicitObjectWrapper { + //_.isNaN + interface LoDashStatic { /** - * @see _.forEachRight - */ - eachRight( - iteratee?: ListIterator|DictionaryIterator - ): LoDashImplicitObjectWrapper; + * Checks if value is NaN. + * + * Note: This is not the same as native isNaN which will return true for undefined and other + * non-numeric values. See http://es5.github.io/#x15.1.2.4. + * @param value The value to check. + * @return True if the value is NaN, else false. + **/ + isNaN(value?: any): boolean; } - interface LoDashExplicitWrapper { + //_.isNull + interface LoDashStatic { /** - * @see _.forEachRight - */ - eachRight( - iteratee: ListIterator - ): LoDashExplicitWrapper; + * Checks if value is null. + * @param value The value to check. + * @return True if the value is null, else false. + **/ + isNull(value?: any): boolean; } - interface LoDashExplicitArrayWrapper { + //_.isNumber + interface LoDashStatic { /** - * @see _.forEachRight - */ - eachRight( - iteratee: ListIterator - ): LoDashExplicitArrayWrapper; + * Checks if value is a number. + * + * Note: NaN is considered a number. See http://es5.github.io/#x8.5. + * @param value The value to check. + * @return True if the value is a number, else false. + **/ + isNumber(value?: any): boolean; } - interface LoDashExplicitObjectWrapper { + //_.isObject + interface LoDashStatic { /** - * @see _.forEachRight - */ - eachRight( - iteratee?: ListIterator|DictionaryIterator - ): LoDashExplicitObjectWrapper; + * Checks if value is the language type of Object. (e.g. arrays, functions, objects, regexes, + * new Number(0), and new String('')) + * @param value The value to check. + * @return True if the value is an object, else false. + **/ + isObject(value?: any): boolean; } - //_.every + //_.isPlainObject interface LoDashStatic { /** - * Checks if predicate returns truthy for all elements of collection. Iteration is stopped once predicate - * returns falsey. The predicate is invoked with three arguments: (value, index|key, collection). - * - * @param collection The collection to iterate over. - * @param predicate The function invoked per iteration. - * @return Returns true if all elements pass the predicate check, else false. - */ - every( - collection: List, - predicate?: ListIterator - ): boolean; + * Checks if value is an object created by the Object constructor. + * @param value The value to check. + * @return True if value is a plain object, else false. + **/ + isPlainObject(value?: any): boolean; + } + //_.isRegExp + interface LoDashStatic { /** - * @see _.every - */ - every( - collection: Dictionary, - predicate?: DictionaryIterator - ): boolean; + * Checks if value is a regular expression. + * @param value The value to check. + * @return True if the value is a regular expression, else false. + **/ + isRegExp(value?: any): boolean; + } + //_.isString + interface LoDashStatic { /** - * @see _.every - */ - every( - collection: NumericDictionary, - predicate?: NumericDictionaryIterator - ): boolean; + * Checks if value is a string. + * @param value The value to check. + * @return True if the value is a string, else false. + **/ + isString(value?: any): boolean; + } + //_.isUndefined + interface LoDashStatic { /** - * @see _.every - */ - every( - collection: List|Dictionary|NumericDictionary, - predicate?: string|any[] - ): boolean; + * Checks if value is undefined. + * @param value The value to check. + * @return True if the value is undefined, else false. + **/ + isUndefined(value?: any): boolean; + } + //_.keys + interface LoDashStatic { /** - * @see _.every - */ - every( - collection: List|Dictionary|NumericDictionary, - predicate?: TObject - ): boolean; + * Creates an array composed of the own enumerable property names of an object. + * @param object The object to inspect. + * @return An array of property names. + **/ + keys(object?: any): string[]; } - interface LoDashImplicitArrayWrapper { + interface LoDashObjectWrapper { /** - * @see _.every - */ - every( - predicate?: ListIterator|NumericDictionaryIterator - ): boolean; + * @see _.keys + **/ + keys(): LoDashArrayWrapper + } + //_.mapValues + interface LoDashStatic { /** - * @see _.every - */ - every( - predicate?: string|any[] - ): boolean; + * Creates an object with the same keys as object and values generated by running each own + * enumerable property of object through iteratee. The iteratee function is bound to thisArg + * and invoked with three arguments: (value, key, object). + * + * If a property name is provided iteratee the created "_.property" style callback returns + * the property value of the given element. + * + * If a value is also provided for thisArg the creted "_.matchesProperty" style callback returns + * true for elements that have a matching property value, else false;. + * + * If an object is provided for iteratee the created "_.matches" style callback returns true + * for elements that have the properties of the given object, else false. + * + * @param {Object} object The object to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked per iteration. + * @param {Object} [thisArg] The `this` binding of `iteratee`. + * @return {Object} Returns the new mapped object. + */ + mapValues(obj: Dictionary, callback: ObjectIterator, thisArg?: any): Dictionary; + mapValues(obj: Dictionary, where: Dictionary): Dictionary; + mapValues(obj: T, pluck: string): TMapped; + mapValues(obj: T, callback: ObjectIterator, thisArg?: any): T; + } + interface LoDashObjectWrapper { /** - * @see _.every + * @see _.mapValues + * TValue is the type of the property values of T. + * TResult is the type output by the ObjectIterator function */ - every( - predicate?: TObject - ): boolean; - } + mapValues(callback: ObjectIterator, thisArg?: any): LoDashObjectWrapper>; - interface LoDashImplicitObjectWrapper { /** - * @see _.every + * @see _.mapValues + * TResult is the type of the property specified by pluck. + * T should be a Dictionary> */ - every( - predicate?: ListIterator|DictionaryIterator|NumericDictionaryIterator - ): boolean; + mapValues(pluck: string): LoDashObjectWrapper>; /** - * @see _.every + * @see _.mapValues + * TResult is the type of the properties on the object specified by pluck. + * T should be a Dictionary>> */ - every( - predicate?: string|any[] - ): boolean; + mapValues(pluck: string, where: Dictionary): LoDashArrayWrapper>; /** - * @see _.every + * @see _.mapValues + * TResult is the type of the properties of each object in the values of T + * T should be a Dictionary> */ - every( - predicate?: TObject - ): boolean; + mapValues(where: Dictionary): LoDashArrayWrapper; } - interface LoDashExplicitArrayWrapper { + //_.merge + interface LoDashStatic { /** - * @see _.every - */ - every( - predicate?: ListIterator|NumericDictionaryIterator - ): LoDashExplicitWrapper; + * Recursively merges own enumerable properties of the source object(s), that don't resolve + * to undefined into the destination object. Subsequent sources will overwrite property + * assignments of previous sources. If a callback is provided it will be executed to produce + * the merged values of the destination and source properties. If the callback returns undefined + * merging will be handled by the method instead. The callback is bound to thisArg and invoked + * with two arguments; (objectValue, sourceValue). + * @param object The destination object. + * @param s1-8 The source object(s) + * @param callback The function to customize merging properties. + * @param thisArg The this binding of callback. + * @return The destination object. + **/ + merge( + object: T, + s1: S1, + callback?: (objectValue: Value, sourceValue: Value) => Value, + thisArg?: any): Result; /** - * @see _.every - */ - every( - predicate?: string|any[] - ): LoDashExplicitWrapper; + * @see _.merge + **/ + merge( + object: T, + s1: S1, + s2: S2, + callback?: (objectValue: Value, sourceValue: Value) => Value, + thisArg?: any): Result; /** - * @see _.every - */ - every( - predicate?: TObject - ): LoDashExplicitWrapper; - } + * @see _.merge + **/ + merge( + object: T, + s1: S1, + s2: S2, + s3: S3, + callback?: (objectValue: Value, sourceValue: Value) => Value, + thisArg?: any): Result; - interface LoDashExplicitObjectWrapper { /** - * @see _.every - */ - every( - predicate?: ListIterator|DictionaryIterator|NumericDictionaryIterator - ): LoDashExplicitWrapper; + * @see _.merge + **/ + merge( + object: T, + s1: S1, + s2: S2, + s3: S3, + s4: S4, + callback?: (objectValue: Value, sourceValue: Value) => Value, + thisArg?: any): Result; + } + //_.omit + interface LoDashStatic { /** - * @see _.every - */ - every( - predicate?: string|any[] - ): LoDashExplicitWrapper; + * Creates a shallow clone of object excluding the specified properties. Property names may be + * specified as individual arguments or as arrays of property names. If a callback is provided + * it will be executed for each property of object omitting the properties the callback returns + * truey for. The callback is bound to thisArg and invoked with three arguments; (value, key, + * object). + * @param object The source object. + * @param keys The properties to omit. + * @return An object without the omitted properties. + **/ + omit( + object: T, + ...keys: string[]): Omitted; /** - * @see _.every - */ - every( - predicate?: TObject - ): LoDashExplicitWrapper; - } + * @see _.omit + **/ + omit( + object: T, + keys: string[]): Omitted; - //_.filter - interface LoDashStatic { /** - * Iterates over elements of collection, returning an array of all elements predicate returns truthy for. The - * predicate is bound to thisArg and invoked with three arguments: (value, index|key, collection). - * - * If a property name is provided for predicate the created _.property style callback returns the property - * value of the given element. - * - * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for - * elements that have a matching property value, else false. - * - * If an object is provided for predicate the created _.matches style callback returns true for elements that - * have the properties of the given object, else false. - * - * @param collection The collection to iterate over. - * @param predicate The function invoked per iteration. - * @param thisArg The this binding of predicate. - * @return Returns the new filtered array. - */ - filter( - collection: List, - predicate?: ListIterator - ): T[]; + * @see _.omit + **/ + omit( + object: T, + callback: ObjectIterator, + thisArg?: any): Omitted; + } + interface LoDashObjectWrapper { /** - * @see _.filter - */ - filter( - collection: Dictionary, - predicate?: DictionaryIterator - ): T[]; + * @see _.omit + **/ + omit( + ...keys: string[]): LoDashObjectWrapper; /** - * @see _.filter - */ - filter( - collection: string, - predicate?: StringIterator - ): string[]; + * @see _.omit + **/ + omit( + keys: string[]): LoDashObjectWrapper; /** - * @see _.filter - */ - filter( - collection: List|Dictionary, - predicate: string - ): T[]; + * @see _.omit + **/ + omit( + callback: ObjectIterator, + thisArg?: any): LoDashObjectWrapper; + } + //_.pairs + interface LoDashStatic { /** - * @see _.filter - */ - filter( - collection: List|Dictionary, - predicate: W - ): T[]; + * Creates a two dimensional array of an object's key-value pairs, + * i.e. [[key1, value1], [key2, value2]]. + * @param object The object to inspect. + * @return Aew array of key-value pairs. + **/ + pairs(object?: any): any[][]; } - interface LoDashImplicitWrapper { + interface LoDashObjectWrapper { /** - * @see _.filter - */ - filter( - predicate?: StringIterator - ): LoDashImplicitArrayWrapper; + * @see _.pairs + **/ + pairs(): LoDashArrayWrapper; } - interface LoDashImplicitArrayWrapper { + //_.picks + interface LoDashStatic { /** - * @see _.filter - */ - filter( - predicate: ListIterator - ): LoDashImplicitArrayWrapper; + * Creates a shallow clone of object composed of the specified properties. Property names may be + * specified as individual arguments or as arrays of property names. If a callback is provided + * it will be executed for each property of object picking the properties the callback returns + * truey for. The callback is bound to thisArg and invoked with three arguments; (value, key, + * object). + * @param object Object to strip unwanted key/value pairs. + * @param keys Property names to pick + * @return An object composed of the picked properties. + **/ + pick( + object: T, + ...keys: string[]): Picked; /** - * @see _.filter - */ - filter( - predicate: string - ): LoDashImplicitArrayWrapper; + * @see _.pick + **/ + pick( + object: T, + keys: string[]): Picked; /** - * @see _.filter - */ - filter(predicate: W): LoDashImplicitArrayWrapper; + * @see _.pick + **/ + pick( + object: T, + callback: ObjectIterator, + thisArg?: any): Picked; + } + + //_.set + interface LoDashStatic { + /** + * Sets the property value of path on object. If a portion of path does not exist it is created. + * @param object The object to augment. + * @param path The path of the property to set. + * @param value The value to set + **/ + set( + object: Augmented, + path: Array | string, + value: T + ): Augmented; } - interface LoDashImplicitObjectWrapper { - /** - * @see _.filter - */ - filter( - predicate: ListIterator|DictionaryIterator - ): LoDashImplicitArrayWrapper; - + //_.transform + interface LoDashStatic { /** - * @see _.filter - */ - filter( - predicate: string - ): LoDashImplicitArrayWrapper; + * An alternative to _.reduce this method transforms object to a new accumulator object which is + * the result of running each of its elements through a callback, with each callback execution + * potentially mutating the accumulator object. The callback is bound to thisArg and invoked with + * four arguments; (accumulator, value, key, object). Callbacks may exit iteration early by + * explicitly returning false. + * @param collection The collection to iterate over. + * @param callback The function called per iteration. + * @param accumulator The custom accumulator value. + * @param thisArg The this binding of callback. + * @return The accumulated value. + **/ + transform( + collection: Array, + callback: MemoVoidIterator, + accumulator: Acc, + thisArg?: any): Acc; /** - * @see _.filter - */ - filter(predicate: W): LoDashImplicitArrayWrapper; - } + * @see _.transform + **/ + transform( + collection: List, + callback: MemoVoidIterator, + accumulator: Acc, + thisArg?: any): Acc; - interface LoDashExplicitWrapper { /** - * @see _.filter - */ - filter( - predicate?: StringIterator - ): LoDashExplicitArrayWrapper; - } + * @see _.transform + **/ + transform( + collection: Dictionary, + callback: MemoVoidIterator, + accumulator: Acc, + thisArg?: any): Acc; - interface LoDashExplicitArrayWrapper { /** - * @see _.filter - */ - filter( - predicate: ListIterator - ): LoDashExplicitArrayWrapper; + * @see _.transform + **/ + transform( + collection: Array, + callback?: MemoVoidIterator, + thisArg?: any): Acc; /** - * @see _.filter - */ - filter( - predicate: string - ): LoDashExplicitArrayWrapper; + * @see _.transform + **/ + transform( + collection: List, + callback?: MemoVoidIterator, + thisArg?: any): Acc; /** - * @see _.filter - */ - filter(predicate: W): LoDashExplicitArrayWrapper; + * @see _.transform + **/ + transform( + collection: Dictionary, + callback?: MemoVoidIterator, + thisArg?: any): Acc; } - interface LoDashExplicitObjectWrapper { + //_.values + interface LoDashStatic { /** - * @see _.filter - */ - filter( - predicate: ListIterator|DictionaryIterator - ): LoDashExplicitArrayWrapper; + * Creates an array composed of the own enumerable property values of object. + * @param object The object to inspect. + * @return Returns an array of property values. + **/ + values(object?: any): any[]; + } - /** - * @see _.filter - */ - filter( - predicate: string - ): LoDashExplicitArrayWrapper; + /********** + * String * + **********/ - /** - * @see _.filter - */ - filter(predicate: W): LoDashExplicitArrayWrapper; + interface LoDashStatic { + camelCase(str?: string): string; + capitalize(str?: string): string; + deburr(str?: string): string; + endsWith(str?: string, target?: string, position?: number): boolean; + escape(str?: string): string; + escapeRegExp(str?: string): string; + kebabCase(str?: string): string; + pad(str?: string, length?: number, chars?: string): string; + padLeft(str?: string, length?: number, chars?: string): string; + padRight(str?: string, length?: number, chars?: string): string; + repeat(str?: string, n?: number): string; + snakeCase(str?: string): string; + startCase(str?: string): string; + startsWith(str?: string, target?: string, position?: number): boolean; + trim(str?: string, chars?: string): string; + trimLeft(str?: string, chars?: string): string; + trimRight(str?: string, chars?: string): string; + trunc(str?: string, len?: number): string; + trunc(str?: string, options?: { length?: number; omission?: string; separator?: string|RegExp }): string; + words(str?: string, pattern?: string|RegExp): string[]; } - //_.find + //_.parseInt interface LoDashStatic { /** - * Iterates over elements of collection, returning the first element predicate returns truthy for. - * The predicate is bound to thisArg and invoked with three arguments: (value, index|key, collection). - * - * If a property name is provided for predicate the created _.property style callback returns the property - * value of the given element. - * - * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for - * elements that have a matching property value, else false. - * - * If an object is provided for predicate the created _.matches style callback returns true for elements that - * have the properties of the given object, else false. - * - * @param collection The collection to search. - * @param predicate The function invoked per iteration. - * @param fromIndex The index to search from. - * @return Returns the matched element, else undefined. - */ - find( - collection: List, - predicate?: ListIterator, - fromIndex?: number - ): T; - - /** - * @see _.find - */ - find( - collection: Dictionary, - predicate?: DictionaryIterator, - fromIndex?: number - ): T; - - /** - * @see _.find - */ - find( - collection: List|Dictionary, - predicate?: string, - fromIndex?: number - ): T; - - /** - * @see _.find - */ - find( - collection: List|Dictionary, - predicate?: TObject, - fromIndex?: number - ): T; + * Converts the given value into an integer of the specified radix. If radix is undefined or 0 a + * radix of 10 is used unless the value is a hexadecimal, in which case a radix of 16 is used. + * + * Note: This method avoids differences in native ES3 and ES5 parseInt implementations. See + * http://es5.github.io/#E. + * @param value The value to parse. + * @param radix The radix used to interpret the value to parse. + * @return The new integer value. + **/ + parseInt(value?: string, radix?: number): number; } - interface LoDashImplicitArrayWrapper { - /** - * @see _.find - */ - find( - predicate?: ListIterator, - fromIndex?: number - ): T; - - /** - * @see _.find - */ - find( - predicate?: string, - fromIndex?: number - ): T; - + /************* + * Utilities * + *************/ + //_.escape + interface LoDashStatic { /** - * @see _.find - */ - find( - predicate?: TObject, - fromIndex?: number - ): T; + * Converts the characters &, <, >, ", and ' in string to their corresponding HTML entities. + * @param string The string to escape. + * @return The escaped string. + **/ + escape(str?: string): string; } - interface LoDashImplicitObjectWrapper { - /** - * @see _.find - */ - find( - predicate?: ListIterator|DictionaryIterator, - fromIndex?: number - ): TResult; - - /** - * @see _.find - */ - find( - predicate?: string, - fromIndex?: number - ): TResult; - + //_.identity + interface LoDashStatic { /** - * @see _.find - */ - find( - predicate?: TObject, - fromIndex?: number - ): TResult; + * This method returns the first argument provided to it. + * @param value Any value. + * @return value. + **/ + identity(value?: T): T; } - //_.findLast + //_.mixin interface LoDashStatic { /** - * This method is like _.find except that it iterates over elements of a collection from - * right to left. - * @param collection Searches for a value in this list. - * @param callback The function called per iteration. - * @param thisArg The this binding of callback. - * @return The found element, else undefined. + * Adds function properties of a source object to the lodash function and chainable wrapper. + * @param object The object of function properties to add to lodash. **/ - findLast( - collection: Array, - callback: ListIterator): T; + mixin(object?: Dictionary<(value: any) => any>): void; + } + //_.noConflict + interface LoDashStatic { /** - * @see _.find + * Reverts the '_' variable to its previous value and returns a reference to the lodash function. + * @return The lodash function. **/ - findLast( - collection: List, - callback: ListIterator): T; + noConflict(): typeof _; + } + //_.property + interface LoDashStatic { /** - * @see _.find - **/ - findLast( - collection: Dictionary, - callback: DictionaryIterator): T; + * # S + * Creates a "_.pluck" style function, which returns the key value of a given object. + * @param key (string) + * @return the value of that key on the object + **/ + property(key: string): (obj: T) => RT; + } + //_.random + interface LoDashStatic { /** - * @see _.find - * @param _.pluck style callback + * Produces a random number between min and max (inclusive). If only one argument is provided a + * number between 0 and the given number will be returned. If floating is truey or either min or + * max are floats a floating-point number will be returned instead of an integer. + * @param max The maximum possible value. + * @param floating Specify returning a floating-point number. + * @return A random number. **/ - findLast( - collection: Array, - whereValue: W): T; + random(max: number, floating?: boolean): number; /** - * @see _.find - * @param _.pluck style callback + * @see _.random + * @param min The minimum possible value. + * @return A random number between `min` and `max`. **/ - findLast( - collection: List, - whereValue: W): T; + random(min: number, max: number, floating?: boolean): number; + } + //_.result + interface LoDashStatic { /** - * @see _.find - * @param _.pluck style callback + * Resolves the value of property on object. If property is a function it will be invoked with + * the this binding of object and its result returned, else the property value is returned. If + * object is falsey then undefined is returned. + * @param object The object to inspect. + * @param property The property to get the value of. + * @return The resolved value. **/ - findLast( - collection: Dictionary, - whereValue: W): T; + result(object: any, property: string): any; + } + //_.runInContext + interface LoDashStatic { /** - * @see _.find - * @param _.where style callback + * Create a new lodash function using the given context object. + * @param context The context object + * @returns The lodash function. **/ - findLast( - collection: Array, - pluckValue: string): T; + runInContext(context: any): typeof _; + } + //_.template + interface LoDashStatic { /** - * @see _.find - * @param _.where style callback + * A micro-templating method that handles arbitrary delimiters, preserves whitespace, and + * correctly escapes quotes within interpolated code. + * + * Note: In the development build, _.template utilizes sourceURLs for easier debugging. See + * http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl + * + * For more information on precompiling templates see: + * http://lodash.com/#custom-builds + * + * For more information on Chrome extension sandboxes see: + * http://developer.chrome.com/stable/extensions/sandboxingEval.html + * @param text The template text. + * @param data The data object used to populate the text. + * @param options The options object. + * @param options.escape The "escape" delimiter. + * @param options.evaluate The "evaluate" delimiter. + * @param options.import An object to import into the template as local variables. + * @param options.interpolate The "interpolate" delimiter. + * @param sourceURL The sourceURL of the template's compiled source. + * @param variable The data object variable name. + * @return Returns the compiled Lo-Dash HTML template or a TemplateExecutor if no data is passed. **/ - findLast( - collection: List, - pluckValue: string): T; + template( + text: string): TemplateExecutor; /** - * @see _.find - * @param _.where style callback + * @see _.template **/ - findLast( - collection: Dictionary, - pluckValue: string): T; + template( + text: string, + data: any, + options?: TemplateSettings, + sourceURL?: string, + variable?: string): any /* string or TemplateExecutor*/; } - interface LoDashImplicitArrayWrapper { - /** - * @see _.findLast - */ - findLast( - callback: ListIterator): T; - /** - * @see _.findLast - * @param _.where style callback - */ - findLast( - whereValue: W): T; - - /** - * @see _.findLast - * @param _.where style callback - */ - findLast( - pluckValue: string): T; + interface TemplateExecutor { + (...data: any[]): string; + source: string; } - //_.flatMap + //_.times interface LoDashStatic { /** - * Creates an array of flattened values by running each element in collection through iteratee - * and concating its result to the other mapped values. The iteratee is invoked with three arguments: - * (value, index|key, collection). - * - * @param collection The collection to iterate over. - * @param iteratee The function invoked per iteration. - * @return Returns the new flattened array. - */ - flatMap( - collection: List, - iteratee?: ListIterator - ): TResult[]; - - /** - * @see _.flatMap - */ - flatMap( - collection: List, - iteratee?: ListIterator - ): TResult[]; - - /** - * @see _.flatMap - */ - flatMap( - collection: Dictionary, - iteratee?: DictionaryIterator - ): TResult[]; - - /** - * @see _.flatMap - */ - flatMap( - collection: Dictionary, - iteratee?: DictionaryIterator - ): TResult[]; - - /** - * @see _.flatMap - */ - flatMap( - collection: NumericDictionary, - iteratee?: NumericDictionaryIterator - ): TResult[]; - - /** - * @see _.flatMap - */ - flatMap( - collection: NumericDictionary, - iteratee?: NumericDictionaryIterator - ): TResult[]; - - /** - * @see _.flatMap - */ - flatMap( - collection: TObject, - iteratee?: ObjectIterator - ): TResult[]; - - /** - * @see _.flatMap - */ - flatMap( - collection: Object, - iteratee?: ObjectIterator - ): TResult[]; - - /** - * @see _.flatMap - */ - flatMap( - collection: TObject, - iteratee: TWhere - ): boolean[]; - - /** - * @see _.flatMap - */ - flatMap( - collection: TObject, - iteratee: Object|string - ): TResult[]; - - /** - * @see _.flatMap - */ - flatMap( - collection: TObject, - iteratee: [string, any] - ): boolean[]; - - /** - * @see _.flatMap - */ - flatMap( - collection: string - ): string[]; - - /** - * @see _.flatMap - */ - flatMap( - collection: Object, - iteratee?: Object|string - ): TResult[]; + * Executes the callback n times, returning an array of the results of each callback execution. + * The callback is bound to thisArg and invoked with one argument; (index). + * @param n The number of times to execute the callback. + * @param callback The function called per iteration. + * @param thisArg The this binding of callback. + **/ + times( + n: number, + callback: (num: number) => TResult, + context?: any): TResult[]; } - interface LoDashImplicitWrapper { - /** - * @see _.flatMap - */ - flatMap( - iteratee: ListIterator - ): LoDashImplicitArrayWrapper; - + //_.unescape + interface LoDashStatic { /** - * @see _.flatMap - */ - flatMap(): LoDashImplicitArrayWrapper; + * The inverse of _.escape this method converts the HTML entities &, <, >, ", and + * ' in string to their corresponding characters. + * @param string The string to unescape. + * @return The unescaped string. + **/ + unescape( + string: string): string; } - interface LoDashImplicitArrayWrapper { - /** - * @see _.flatMap - */ - flatMap( - iteratee: ListIterator|string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.flatMap - */ - flatMap( - iteratee: TWhere - ): LoDashImplicitArrayWrapper; - - /** - * @see _.flatMap - */ - flatMap( - iteratee: [string, any] - ): LoDashImplicitArrayWrapper; - + //_.uniqueId + interface LoDashStatic { /** - * @see _.flatMap - */ - flatMap(): LoDashImplicitArrayWrapper; + * Generates a unique ID. If prefix is provided the ID will be appended to it. + * @param prefix The value to prefix the ID with. + * @return Returns the unique ID. + **/ + uniqueId(prefix?: string): string; } - interface LoDashImplicitObjectWrapper { - /** - * @see _.flatMap - */ - flatMap( - iteratee: ListIterator|DictionaryIterator|NumericDictionaryIterator - ): LoDashImplicitArrayWrapper; - + //_.noop + interface LoDashStatic { /** - * @see _.flatMap - */ - flatMap( - iteratee: ObjectIterator|string - ): LoDashImplicitArrayWrapper; + * A no-operation function. + **/ + noop(): void; + } + //_.constant + interface LoDashStatic { /** - * @see _.flatMap - */ - flatMap( - iteratee: TWhere - ): LoDashImplicitArrayWrapper; + * Creates a function that returns value.. + **/ + constant(value: T): () => T; + } + //_.create + interface LoDashStatic { /** - * @see _.flatMap + * Creates an object that inherits from the given prototype object. If a properties object is provided its own enumerable properties are assigned to the created object. + * @param prototype The object to inherit from. + * @param properties The properties to assign to the object. */ - flatMap( - iteratee: [string, any] - ): LoDashImplicitArrayWrapper; + create(prototype: Object, properties?: Object): Object; + } - /** - * @see _.flatMap - */ - flatMap(): LoDashImplicitArrayWrapper; + interface ListIterator { + (value: T, index: number, collection: T[]): TResult; } - interface LoDashExplicitWrapper { - /** - * @see _.flatMap - */ - flatMap( - iteratee: ListIterator - ): LoDashExplicitArrayWrapper; + interface DictionaryIterator { + (value: T, key: string, collection: Dictionary): TResult; + } - /** - * @see _.flatMap - */ - flatMap(): LoDashExplicitArrayWrapper; + interface ObjectIterator { + (element: T, key: string, collection: any): TResult; } - interface LoDashExplicitArrayWrapper { - /** - * @see _.flatMap - */ - flatMap( - iteratee: ListIterator|string - ): LoDashExplicitArrayWrapper; + interface MemoVoidIterator { + (prev: TResult, curr: T, indexOrKey: any, list?: T[]): void; + } + interface MemoIterator { + (prev: TResult, curr: T, indexOrKey: any, list?: T[]): TResult; + } + /* + interface MemoListIterator { + (prev: TResult, curr: T, index: number, list?: T[]): TResult; + } + interface MemoObjectIterator { + (prev: TResult, curr: T, index: string, object?: Dictionary): TResult; + } + */ - /** - * @see _.flatMap - */ - flatMap( - iteratee: TWhere - ): LoDashExplicitArrayWrapper; + //interface Collection {} - /** - * @see _.flatMap - */ - flatMap( - iteratee: [string, any] - ): LoDashExplicitArrayWrapper; + // Common interface between Arrays and jQuery objects + interface List { + [index: number]: T; + length: number; + } - /** - * @see _.flatMap - */ - flatMap(): LoDashExplicitArrayWrapper; + interface Dictionary { + [index: string]: T; } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.flatMap - */ - flatMap( - iteratee: ListIterator|DictionaryIterator|NumericDictionaryIterator - ): LoDashExplicitArrayWrapper; - - /** - * @see _.flatMap - */ - flatMap( - iteratee: ObjectIterator|string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.flatMap - */ - flatMap( - iteratee: TWhere - ): LoDashExplicitArrayWrapper; - - /** - * @see _.flatMap - */ - flatMap( - iteratee: [string, any] - ): LoDashExplicitArrayWrapper; - - /** - * @see _.flatMap - */ - flatMap(): LoDashExplicitArrayWrapper; - } - - //_.forEach - interface LoDashStatic { - /** - * Iterates over elements of collection invoking iteratee for each element. The iteratee is bound to thisArg - * and invoked with three arguments: - * (value, index|key, collection). Iteratee functions may exit iteration early by explicitly returning false. - * - * Note: As with other "Collections" methods, objects with a "length" property are iterated like arrays. To - * avoid this behavior _.forIn or _.forOwn may be used for object iteration. - * - * @alias _.each - * - * @param collection The collection to iterate over. - * @param iteratee The function invoked per iteration. - * @param thisArg The this binding of iteratee. - */ - forEach( - collection: T[], - iteratee?: ListIterator - ): T[]; - - /** - * @see _.forEach - */ - forEach( - collection: List, - iteratee?: ListIterator - ): List; - - /** - * @see _.forEach - */ - forEach( - collection: Dictionary, - iteratee?: DictionaryIterator - ): Dictionary; - - /** - * @see _.forEach - */ - forEach( - collection: T, - iteratee?: ObjectIterator - ): T; - - /** - * @see _.forEach - */ - forEach( - collection: T, - iteratee?: ObjectIterator - ): T; - } - - interface LoDashImplicitWrapper { - /** - * @see _.forEach - */ - forEach( - iteratee: ListIterator - ): LoDashImplicitWrapper; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.forEach - */ - forEach( - iteratee: ListIterator - ): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.forEach - */ - forEach( - iteratee?: ListIterator|DictionaryIterator - ): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitWrapper { - /** - * @see _.forEach - */ - forEach( - iteratee: ListIterator - ): LoDashExplicitWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.forEach - */ - forEach( - iteratee: ListIterator - ): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.forEach - */ - forEach( - iteratee?: ListIterator|DictionaryIterator - ): LoDashExplicitObjectWrapper; - } - - //_.forEachRight - interface LoDashStatic { - /** - * This method is like _.forEach except that it iterates over elements of collection from right to left. - * - * @alias _.eachRight - * - * @param collection The collection to iterate over. - * @param iteratee The function called per iteration. - * @param thisArg The this binding of callback. - */ - forEachRight( - collection: T[], - iteratee?: ListIterator - ): T[]; - - /** - * @see _.forEachRight - */ - forEachRight( - collection: List, - iteratee?: ListIterator - ): List; - - /** - * @see _.forEachRight - */ - forEachRight( - collection: Dictionary, - iteratee?: DictionaryIterator - ): Dictionary; - - /** - * @see _.forEachRight - */ - forEachRight( - collection: T, - iteratee?: ObjectIterator - ): T; - - /** - * @see _.forEachRight - */ - forEachRight( - collection: T, - iteratee?: ObjectIterator - ): T; - } - - interface LoDashImplicitWrapper { - /** - * @see _.forEachRight - */ - forEachRight( - iteratee: ListIterator - ): LoDashImplicitWrapper; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.forEachRight - */ - forEachRight( - iteratee: ListIterator - ): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.forEachRight - */ - forEachRight( - iteratee?: ListIterator|DictionaryIterator - ): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitWrapper { - /** - * @see _.forEachRight - */ - forEachRight( - iteratee: ListIterator - ): LoDashExplicitWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.forEachRight - */ - forEachRight( - iteratee: ListIterator - ): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.forEachRight - */ - forEachRight( - iteratee?: ListIterator|DictionaryIterator - ): LoDashExplicitObjectWrapper; - } - - //_.groupBy - interface LoDashStatic { - /** - * Creates an object composed of keys generated from the results of running each element of collection through - * iteratee. The corresponding value of each key is an array of the elements responsible for generating the - * key. The iteratee is bound to thisArg and invoked with three arguments: - * (value, index|key, collection). - * - * If a property name is provided for iteratee the created _.property style callback returns the property - * value of the given element. - * - * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for - * elements that have a matching property value, else false. - * - * If an object is provided for iteratee the created _.matches style callback returns true for elements that - * have the properties of the given object, else false. - * - * @param collection The collection to iterate over. - * @param iteratee The function invoked per iteration. - * @param thisArg The this binding of iteratee. - * @return Returns the composed aggregate object. - */ - groupBy( - collection: List, - iteratee?: ListIterator - ): Dictionary; - - /** - * @see _.groupBy - */ - groupBy( - collection: List, - iteratee?: ListIterator - ): Dictionary; - - /** - * @see _.groupBy - */ - groupBy( - collection: Dictionary, - iteratee?: DictionaryIterator - ): Dictionary; - - /** - * @see _.groupBy - */ - groupBy( - collection: Dictionary, - iteratee?: DictionaryIterator - ): Dictionary; - - /** - * @see _.groupBy - */ - groupBy( - collection: List|Dictionary, - iteratee?: string - ): Dictionary; - - /** - * @see _.groupBy - */ - groupBy( - collection: List|Dictionary, - iteratee?: string - ): Dictionary; - - /** - * @see _.groupBy - */ - groupBy( - collection: List|Dictionary, - iteratee?: TWhere - ): Dictionary; - - /** - * @see _.groupBy - */ - groupBy( - collection: List|Dictionary, - iteratee?: Object - ): Dictionary; - } - - interface LoDashImplicitWrapper { - /** - * @see _.groupBy - */ - groupBy( - iteratee?: ListIterator - ): LoDashImplicitObjectWrapper>; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.groupBy - */ - groupBy( - iteratee?: ListIterator - ): LoDashImplicitObjectWrapper>; - - /** - * @see _.groupBy - */ - groupBy( - iteratee?: string - ): LoDashImplicitObjectWrapper>; - - /** - * @see _.groupBy - */ - groupBy( - iteratee?: TWhere - ): LoDashImplicitObjectWrapper>; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.groupBy - */ - groupBy( - iteratee?: ListIterator|DictionaryIterator - ): LoDashImplicitObjectWrapper>; - - /** - * @see _.groupBy - */ - groupBy( - iteratee?: ListIterator|DictionaryIterator - ): LoDashImplicitObjectWrapper>; - - /** - * @see _.groupBy - */ - groupBy( - iteratee?: string - ): LoDashImplicitObjectWrapper>; - - /** - * @see _.groupBy - */ - groupBy( - iteratee?: string - ): LoDashImplicitObjectWrapper>; - - /** - * @see _.groupBy - */ - groupBy( - iteratee?: TWhere - ): LoDashImplicitObjectWrapper>; - - /** - * @see _.groupBy - */ - groupBy( - iteratee?: Object - ): LoDashImplicitObjectWrapper>; - } - - interface LoDashExplicitWrapper { - /** - * @see _.groupBy - */ - groupBy( - iteratee?: ListIterator - ): LoDashExplicitObjectWrapper>; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.groupBy - */ - groupBy( - iteratee?: ListIterator - ): LoDashExplicitObjectWrapper>; - - /** - * @see _.groupBy - */ - groupBy( - iteratee?: string - ): LoDashExplicitObjectWrapper>; - - /** - * @see _.groupBy - */ - groupBy( - iteratee?: TWhere - ): LoDashExplicitObjectWrapper>; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.groupBy - */ - groupBy( - iteratee?: ListIterator|DictionaryIterator - ): LoDashExplicitObjectWrapper>; - - /** - * @see _.groupBy - */ - groupBy( - iteratee?: ListIterator|DictionaryIterator - ): LoDashExplicitObjectWrapper>; - - /** - * @see _.groupBy - */ - groupBy( - iteratee?: string - ): LoDashExplicitObjectWrapper>; - - /** - * @see _.groupBy - */ - groupBy( - iteratee?: string - ): LoDashExplicitObjectWrapper>; - - /** - * @see _.groupBy - */ - groupBy( - iteratee?: TWhere - ): LoDashExplicitObjectWrapper>; - - /** - * @see _.groupBy - */ - groupBy( - iteratee?: Object - ): LoDashExplicitObjectWrapper>; - } - - //_.includes - interface LoDashStatic { - /** - * Checks if target is in collection using SameValueZero for equality comparisons. If fromIndex is negative, - * it’s used as the offset from the end of collection. - * - * @param collection The collection to search. - * @param target The value to search for. - * @param fromIndex The index to search from. - * @return True if the target element is found, else false. - */ - includes( - collection: List|Dictionary, - target: T, - fromIndex?: number - ): boolean; - - /** - * @see _.includes - */ - includes( - collection: string, - target: string, - fromIndex?: number - ): boolean; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.includes - */ - includes( - target: T, - fromIndex?: number - ): boolean; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.includes - */ - includes( - target: TValue, - fromIndex?: number - ): boolean; - } - - interface LoDashImplicitWrapper { - /** - * @see _.includes - */ - includes( - target: string, - fromIndex?: number - ): boolean; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.includes - */ - includes( - target: T, - fromIndex?: number - ): LoDashExplicitWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.includes - */ - includes( - target: TValue, - fromIndex?: number - ): LoDashExplicitWrapper; - } - - interface LoDashExplicitWrapper { - /** - * @see _.includes - */ - includes( - target: string, - fromIndex?: number - ): LoDashExplicitWrapper; - } - - //_.keyBy - interface LoDashStatic { - /** - * Creates an object composed of keys generated from the results of running each element of collection through - * iteratee. The corresponding value of each key is the last element responsible for generating the key. The - * iteratee function is bound to thisArg and invoked with three arguments: - * (value, index|key, collection). - * - * If a property name is provided for iteratee the created _.property style callback returns the property - * value of the given element. - * - * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for - * elements that have a matching property value, else false. - * - * If an object is provided for iteratee the created _.matches style callback returns true for elements that - * have the properties of the given object, else false. - * - * @param collection The collection to iterate over. - * @param iteratee The function invoked per iteration. - * @param thisArg The this binding of iteratee. - * @return Returns the composed aggregate object. - */ - keyBy( - collection: List, - iteratee?: ListIterator - ): Dictionary; - - /** - * @see _.keyBy - */ - keyBy( - collection: NumericDictionary, - iteratee?: NumericDictionaryIterator - ): Dictionary; - - /** - * @see _.keyBy - */ - keyBy( - collection: Dictionary, - iteratee?: DictionaryIterator - ): Dictionary; - - /** - * @see _.keyBy - */ - keyBy( - collection: List|NumericDictionary|Dictionary, - iteratee?: string - ): Dictionary; - - /** - * @see _.keyBy - */ - keyBy( - collection: List|NumericDictionary|Dictionary, - iteratee?: W - ): Dictionary; - - /** - * @see _.keyBy - */ - keyBy( - collection: List|NumericDictionary|Dictionary, - iteratee?: Object - ): Dictionary; - } - - interface LoDashImplicitWrapper { - /** - * @see _.keyBy - */ - keyBy( - iteratee?: ListIterator - ): LoDashImplicitObjectWrapper>; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.keyBy - */ - keyBy( - iteratee?: ListIterator - ): LoDashImplicitObjectWrapper>; - - /** - * @see _.keyBy - */ - keyBy( - iteratee?: string - ): LoDashImplicitObjectWrapper>; - - /** - * @see _.keyBy - */ - keyBy( - iteratee?: W - ): LoDashImplicitObjectWrapper>; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.keyBy - */ - keyBy( - iteratee?: ListIterator|NumericDictionaryIterator|DictionaryIterator - ): LoDashImplicitObjectWrapper>; - - /** - * @see _.keyBy - */ - keyBy( - iteratee?: string - ): LoDashImplicitObjectWrapper>; - - /** - * @see _.keyBy - */ - keyBy( - iteratee?: W - ): LoDashImplicitObjectWrapper>; - - /** - * @see _.keyBy - */ - keyBy( - iteratee?: Object - ): LoDashImplicitObjectWrapper>; - } - - interface LoDashExplicitWrapper { - /** - * @see _.keyBy - */ - keyBy( - iteratee?: ListIterator - ): LoDashExplicitObjectWrapper>; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.keyBy - */ - keyBy( - iteratee?: ListIterator - ): LoDashExplicitObjectWrapper>; - - /** - * @see _.keyBy - */ - keyBy( - iteratee?: string - ): LoDashExplicitObjectWrapper>; - - /** - * @see _.keyBy - */ - keyBy( - iteratee?: W - ): LoDashExplicitObjectWrapper>; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.keyBy - */ - keyBy( - iteratee?: ListIterator|NumericDictionaryIterator|DictionaryIterator - ): LoDashExplicitObjectWrapper>; - - /** - * @see _.keyBy - */ - keyBy( - iteratee?: string - ): LoDashExplicitObjectWrapper>; - - /** - * @see _.keyBy - */ - keyBy( - iteratee?: W - ): LoDashExplicitObjectWrapper>; - - /** - * @see _.keyBy - */ - keyBy( - iteratee?: Object - ): LoDashExplicitObjectWrapper>; - } - - //_.invoke - interface LoDashStatic { - /** - * Invokes the method at path of object. - * @param object The object to query. - * @param path The path of the method to invoke. - * @param args The arguments to invoke the method with. - **/ - invoke( - object: TObject, - path: StringRepresentable|StringRepresentable[], - ...args: any[]): TResult; - - /** - * @see _.invoke - **/ - invoke( - object: Dictionary|TValue[], - path: StringRepresentable|StringRepresentable[], - ...args: any[]): TResult; - - /** - * @see _.invoke - **/ - invoke( - object: any, - path: StringRepresentable|StringRepresentable[], - ...args: any[]): TResult; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.invoke - **/ - invoke( - path: StringRepresentable|StringRepresentable[], - ...args: any[]): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.invoke - **/ - invoke( - path: StringRepresentable|StringRepresentable[], - ...args: any[]): TResult; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.invoke - **/ - invoke( - path: StringRepresentable|StringRepresentable[], - ...args: any[]): TResult; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.invoke - **/ - invoke( - path: StringRepresentable|StringRepresentable[], - ...args: any[]): TResult; - } - - //_.invokeMap - interface LoDashStatic { - /** - * Invokes the method named by methodName on each element in the collection returning - * an array of the results of each invoked method. Additional arguments will be provided - * to each invoked method. If methodName is a function it will be invoked for, and this - * bound to, each element in the collection. - * @param collection The collection to iterate over. - * @param methodName The name of the method to invoke. - * @param args Arguments to invoke the method with. - **/ - invokeMap( - collection: TValue[], - methodName: string, - ...args: any[]): TResult[]; - - /** - * @see _.invokeMap - **/ - invokeMap( - collection: Dictionary, - methodName: string, - ...args: any[]): TResult[]; - - /** - * @see _.invokeMap - **/ - invokeMap( - collection: {}[], - methodName: string, - ...args: any[]): TResult[]; - - /** - * @see _.invokeMap - **/ - invokeMap( - collection: Dictionary<{}>, - methodName: string, - ...args: any[]): TResult[]; - - /** - * @see _.invokeMap - **/ - invokeMap( - collection: TValue[], - method: (...args: any[]) => TResult, - ...args: any[]): TResult[]; - - /** - * @see _.invokeMap - **/ - invokeMap( - collection: Dictionary, - method: (...args: any[]) => TResult, - ...args: any[]): TResult[]; - - /** - * @see _.invokeMap - **/ - invokeMap( - collection: {}[], - method: (...args: any[]) => TResult, - ...args: any[]): TResult[]; - - /** - * @see _.invokeMap - **/ - invokeMap( - collection: Dictionary<{}>, - method: (...args: any[]) => TResult, - ...args: any[]): TResult[]; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.invokeMap - **/ - invokeMap( - methodName: string, - ...args: any[]): LoDashImplicitArrayWrapper; - - /** - * @see _.invokeMap - **/ - invokeMap( - method: (...args: any[]) => TResult, - ...args: any[]): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.invokeMap - **/ - invokeMap( - methodName: string, - ...args: any[]): LoDashImplicitArrayWrapper; - - /** - * @see _.invokeMap - **/ - invokeMap( - method: (...args: any[]) => TResult, - ...args: any[]): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.invokeMap - **/ - invokeMap( - methodName: string, - ...args: any[]): LoDashExplicitArrayWrapper; - - /** - * @see _.invokeMap - **/ - invokeMap( - method: (...args: any[]) => TResult, - ...args: any[]): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.invokeMap - **/ - invokeMap( - methodName: string, - ...args: any[]): LoDashExplicitArrayWrapper; - - /** - * @see _.invokeMap - **/ - invokeMap( - method: (...args: any[]) => TResult, - ...args: any[]): LoDashExplicitArrayWrapper; - } - - //_.map - interface LoDashStatic { - /** - * Creates an array of values by running each element in collection through iteratee. The iteratee is bound to - * thisArg and invoked with three arguments: (value, index|key, collection). - * - * If a property name is provided for iteratee the created _.property style callback returns the property value - * of the given element. - * - * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for - * elements that have a matching property value, else false. - * - * If an object is provided for iteratee the created _.matches style callback returns true for elements that - * have the properties of the given object, else false. - * - * Many lodash methods are guarded to work as iteratees for methods like _.every, _.filter, _.map, _.mapValues, - * _.reject, and _.some. - * - * The guarded methods are: - * ary, callback, chunk, clone, create, curry, curryRight, drop, dropRight, every, fill, flatten, invert, max, - * min, parseInt, slice, sortBy, take, takeRight, template, trim, trimLeft, trimRight, trunc, random, range, - * sample, some, sum, uniq, and words - * - * @param collection The collection to iterate over. - * @param iteratee The function invoked per iteration. - * @param thisArg The this binding of iteratee. - * @return Returns the new mapped array. - */ - map( - collection: List, - iteratee?: ListIterator - ): TResult[]; - - /** - * @see _.map - */ - map( - collection: Dictionary, - iteratee?: DictionaryIterator - ): TResult[]; - - map( - collection: NumericDictionary, - iteratee?: NumericDictionaryIterator - ): TResult[]; - - /** - * @see _.map - */ - map( - collection: List|Dictionary|NumericDictionary, - iteratee?: string - ): TResult[]; - - /** - * @see _.map - */ - map( - collection: List|Dictionary|NumericDictionary, - iteratee?: TObject - ): boolean[]; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.map - */ - map( - iteratee?: ListIterator - ): LoDashImplicitArrayWrapper; - - /** - * @see _.map - */ - map( - iteratee?: string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.map - */ - map( - iteratee?: TObject - ): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.map - */ - map( - iteratee?: ListIterator|DictionaryIterator - ): LoDashImplicitArrayWrapper; - - /** - * @see _.map - */ - map( - iteratee?: string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.map - */ - map( - iteratee?: TObject - ): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.map - */ - map( - iteratee?: ListIterator - ): LoDashExplicitArrayWrapper; - - /** - * @see _.map - */ - map( - iteratee?: string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.map - */ - map( - iteratee?: TObject - ): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.map - */ - map( - iteratee?: ListIterator|DictionaryIterator - ): LoDashExplicitArrayWrapper; - - /** - * @see _.map - */ - map( - iteratee?: string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.map - */ - map( - iteratee?: TObject - ): LoDashExplicitArrayWrapper; - } - - //_.partition - interface LoDashStatic { - /** - * Creates an array of elements split into two groups, the first of which contains elements predicate returns truthy for, - * while the second of which contains elements predicate returns falsey for. - * The predicate is bound to thisArg and invoked with three arguments: (value, index|key, collection). - * - * If a property name is provided for predicate the created _.property style callback - * returns the property value of the given element. - * - * If a value is also provided for thisArg the created _.matchesProperty style callback - * returns true for elements that have a matching property value, else false. - * - * If an object is provided for predicate the created _.matches style callback returns - * true for elements that have the properties of the given object, else false. - * - * @param collection The collection to iterate over. - * @param callback The function called per iteration. - * @param thisArg The this binding of predicate. - * @return Returns the array of grouped elements. - **/ - partition( - collection: List, - callback: ListIterator): T[][]; - - /** - * @see _.partition - **/ - partition( - collection: Dictionary, - callback: DictionaryIterator): T[][]; - - /** - * @see _.partition - **/ - partition( - collection: List, - whereValue: W): T[][]; - - /** - * @see _.partition - **/ - partition( - collection: Dictionary, - whereValue: W): T[][]; - - /** - * @see _.partition - **/ - partition( - collection: List, - path: string, - srcValue: any): T[][]; - - /** - * @see _.partition - **/ - partition( - collection: Dictionary, - path: string, - srcValue: any): T[][]; - - /** - * @see _.partition - **/ - partition( - collection: List, - pluckValue: string): T[][]; - - /** - * @see _.partition - **/ - partition( - collection: Dictionary, - pluckValue: string): T[][]; - } - - interface LoDashImplicitStringWrapper { - /** - * @see _.partition - */ - partition( - callback: ListIterator): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.partition - */ - partition( - callback: ListIterator): LoDashImplicitArrayWrapper; - /** - * @see _.partition - */ - partition( - whereValue: W): LoDashImplicitArrayWrapper; - /** - * @see _.partition - */ - partition( - path: string, - srcValue: any): LoDashImplicitArrayWrapper; - /** - * @see _.partition - */ - partition( - pluckValue: string): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.partition - */ - partition( - callback: ListIterator): LoDashImplicitArrayWrapper; - - /** - * @see _.partition - */ - partition( - callback: DictionaryIterator): LoDashImplicitArrayWrapper; - - /** - * @see _.partition - */ - partition( - whereValue: W): LoDashImplicitArrayWrapper; - - /** - * @see _.partition - */ - partition( - path: string, - srcValue: any): LoDashImplicitArrayWrapper; - - /** - * @see _.partition - */ - partition( - pluckValue: string): LoDashImplicitArrayWrapper; - } - - //_.reduce - interface LoDashStatic { - /** - * Reduces a collection to a value which is the accumulated result of running each - * element in the collection through the callback, where each successive callback execution - * consumes the return value of the previous execution. If accumulator is not provided the - * first element of the collection will be used as the initial accumulator value. The callback - * is bound to thisArg and invoked with four arguments; (accumulator, value, index|key, collection). - * @param collection The collection to iterate over. - * @param callback The function called per iteration. - * @param accumulator Initial value of the accumulator. - * @param thisArg The this binding of callback. - * @return Returns the accumulated value. - **/ - reduce( - collection: Array, - callback: MemoIterator, - accumulator: TResult): TResult; - - /** - * @see _.reduce - **/ - reduce( - collection: List, - callback: MemoIterator, - accumulator: TResult): TResult; - - /** - * @see _.reduce - **/ - reduce( - collection: Dictionary, - callback: MemoIterator, - accumulator: TResult): TResult; - - /** - * @see _.reduce - **/ - reduce( - collection: NumericDictionary, - callback: MemoIterator, - accumulator: TResult): TResult; - - /** - * @see _.reduce - **/ - reduce( - collection: Array, - callback: MemoIterator): TResult; - - /** - * @see _.reduce - **/ - reduce( - collection: List, - callback: MemoIterator): TResult; - - /** - * @see _.reduce - **/ - reduce( - collection: Dictionary, - callback: MemoIterator): TResult; - - /** - * @see _.reduce - **/ - reduce( - collection: NumericDictionary, - callback: MemoIterator): TResult; - - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.reduce - **/ - reduce( - callback: MemoIterator, - accumulator: TResult): TResult; - - /** - * @see _.reduce - **/ - reduce( - callback: MemoIterator): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.reduce - **/ - reduce( - callback: MemoIterator, - accumulator: TResult): TResult; - - /** - * @see _.reduce - **/ - reduce( - callback: MemoIterator): TResult; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.reduce - **/ - reduce( - callback: MemoIterator, - accumulator: TResult): LoDashExplicitObjectWrapper; - - /** - * @see _.reduce - **/ - reduce( - callback: MemoIterator): LoDashExplicitObjectWrapper; - } - - interface LoDashExplicitArrayWrapper { - /**LoDashExplicitWrapper - * @see _.reduce - */ - reduce( - callback: MemoIterator, - accumulator: TResult): LoDashExplicitWrapper; - - /** - * @see _.reduce - */ - reduce( - callback: MemoIterator): LoDashExplicitWrapper; - } - - //_.reduceRight - interface LoDashStatic { - /** - * This method is like _.reduce except that it iterates over elements of a collection from - * right to left. - * @param collection The collection to iterate over. - * @param callback The function called per iteration. - * @param accumulator Initial value of the accumulator. - * @param thisArg The this binding of callback. - * @return The accumulated value. - **/ - reduceRight( - collection: Array, - callback: MemoIterator, - accumulator: TResult): TResult; - - /** - * @see _.reduceRight - **/ - reduceRight( - collection: List, - callback: MemoIterator, - accumulator: TResult): TResult; - - /** - * @see _.reduceRight - **/ - reduceRight( - collection: Dictionary, - callback: MemoIterator, - accumulator: TResult): TResult; - - /** - * @see _.reduceRight - **/ - reduceRight( - collection: Array, - callback: MemoIterator): TResult; - - /** - * @see _.reduceRight - **/ - reduceRight( - collection: List, - callback: MemoIterator): TResult; - - /** - * @see _.reduceRight - **/ - reduceRight( - collection: Dictionary, - callback: MemoIterator): TResult; - } - - //_.reject - interface LoDashStatic { - /** - * The opposite of _.filter; this method returns the elements of collection that predicate does not return - * truthy for. - * - * @param collection The collection to iterate over. - * @param predicate The function invoked per iteration. - * @param thisArg The this binding of predicate. - * @return Returns the new filtered array. - */ - reject( - collection: List, - predicate?: ListIterator - ): T[]; - - /** - * @see _.reject - */ - reject( - collection: Dictionary, - predicate?: DictionaryIterator - ): T[]; - - /** - * @see _.reject - */ - reject( - collection: string, - predicate?: StringIterator - ): string[]; - - /** - * @see _.reject - */ - reject( - collection: List|Dictionary, - predicate: string - ): T[]; - - /** - * @see _.reject - */ - reject( - collection: List|Dictionary, - predicate: W - ): T[]; - } - - interface LoDashImplicitWrapper { - /** - * @see _.reject - */ - reject( - predicate?: StringIterator - ): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.reject - */ - reject( - predicate: ListIterator - ): LoDashImplicitArrayWrapper; - - /** - * @see _.reject - */ - reject( - predicate: string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.reject - */ - reject(predicate: W): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.reject - */ - reject( - predicate: ListIterator|DictionaryIterator - ): LoDashImplicitArrayWrapper; - - /** - * @see _.reject - */ - reject( - predicate: string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.reject - */ - reject(predicate: W): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitWrapper { - /** - * @see _.reject - */ - reject( - predicate?: StringIterator - ): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.reject - */ - reject( - predicate: ListIterator - ): LoDashExplicitArrayWrapper; - - /** - * @see _.reject - */ - reject( - predicate: string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.reject - */ - reject(predicate: W): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.reject - */ - reject( - predicate: ListIterator|DictionaryIterator - ): LoDashExplicitArrayWrapper; - - /** - * @see _.reject - */ - reject( - predicate: string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.reject - */ - reject(predicate: W): LoDashExplicitArrayWrapper; - } - - //_.sample - interface LoDashStatic { - /** - * Gets a random element from collection. - * - * @param collection The collection to sample. - * @return Returns the random element. - */ - sample( - collection: List|Dictionary|NumericDictionary - ): T; - - /** - * @see _.sample - */ - sample( - collection: O - ): T; - - /** - * @see _.sample - */ - sample( - collection: Object - ): T; - } - - interface LoDashImplicitWrapper { - /** - * @see _.sample - */ - sample(): string; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.sample - */ - sample(): T; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.sample - */ - sample(): T; - } - - interface LoDashExplicitWrapper { - /** - * @see _.sample - */ - sample(): LoDashExplicitWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.sample - */ - sample(): TWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.sample - */ - sample(): TWrapper; - } - - //_.sampleSize - interface LoDashStatic { - /** - * Gets n random elements at unique keys from collection up to the size of collection. - * - * @param collection The collection to sample. - * @param n The number of elements to sample. - * @return Returns the random elements. - */ - sampleSize( - collection: List|Dictionary|NumericDictionary, - n?: number - ): T[]; - - /** - * @see _.sampleSize - */ - sampleSize( - collection: O, - n?: number - ): T[]; - - /** - * @see _.sampleSize - */ - sampleSize( - collection: Object, - n?: number - ): T[]; - } - - interface LoDashImplicitWrapper { - /** - * @see _.sampleSize - */ - sampleSize( - n?: number - ): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.sampleSize - */ - sampleSize( - n?: number - ): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.sampleSize - */ - sampleSize( - n?: number - ): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitWrapper { - /** - * @see _.sampleSize - */ - sampleSize( - n?: number - ): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.sampleSize - */ - sampleSize( - n?: number - ): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.sampleSize - */ - sampleSize( - n?: number - ): LoDashExplicitArrayWrapper; - } - - //_.shuffle - interface LoDashStatic { - /** - * Creates an array of shuffled values, using a version of the Fisher-Yates shuffle. - * - * @param collection The collection to shuffle. - * @return Returns the new shuffled array. - */ - shuffle(collection: List|Dictionary): T[]; - - /** - * @see _.shuffle - */ - shuffle(collection: string): string[]; - } - - interface LoDashImplicitWrapper { - /** - * @see _.shuffle - */ - shuffle(): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.shuffle - */ - shuffle(): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.shuffle - */ - shuffle(): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitWrapper { - /** - * @see _.shuffle - */ - shuffle(): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.shuffle - */ - shuffle(): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.shuffle - */ - shuffle(): LoDashExplicitArrayWrapper; - } - - //_.size - interface LoDashStatic { - /** - * Gets the size of collection by returning its length for array-like values or the number of own enumerable - * properties for objects. - * - * @param collection The collection to inspect. - * @return Returns the size of collection. - */ - size(collection: List|Dictionary): number; - - /** - * @see _.size - */ - size(collection: string): number; - } - - interface LoDashImplicitWrapper { - /** - * @see _.size - */ - size(): number; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.size - */ - size(): number; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.size - */ - size(): number; - } - - interface LoDashExplicitWrapper { - /** - * @see _.size - */ - size(): LoDashExplicitWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.size - */ - size(): LoDashExplicitWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.size - */ - size(): LoDashExplicitWrapper; - } - - //_.some - interface LoDashStatic { - /** - * Checks if predicate returns truthy for any element of collection. Iteration is stopped once predicate - * returns truthy. The predicate is invoked with three arguments: (value, index|key, collection). - * - * @param collection The collection to iterate over. - * @param predicate The function invoked per iteration. - * @return Returns true if any element passes the predicate check, else false. - */ - some( - collection: List, - predicate?: ListIterator - ): boolean; - - /** - * @see _.some - */ - some( - collection: Dictionary, - predicate?: DictionaryIterator - ): boolean; - - /** - * @see _.some - */ - some( - collection: NumericDictionary, - predicate?: NumericDictionaryIterator - ): boolean; - - /** - * @see _.some - */ - some( - collection: Object, - predicate?: ObjectIterator - ): boolean; - - /** - * @see _.some - */ - some( - collection: List|Dictionary|NumericDictionary, - predicate?: string|[string, any] - ): boolean; - - - /** - * @see _.some - */ - some( - collection: Object, - predicate?: string|[string, any] - ): boolean; - - /** - * @see _.some - */ - some( - collection: List|Dictionary|NumericDictionary, - predicate?: TObject - ): boolean; - - /** - * @see _.some - */ - some( - collection: List|Dictionary|NumericDictionary, - predicate?: Object - ): boolean; - - /** - * @see _.some - */ - some( - collection: Object, - predicate?: TObject - ): boolean; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.some - */ - some( - predicate?: ListIterator|NumericDictionaryIterator - ): boolean; - - /** - * @see _.some - */ - some( - predicate?: string|[string, any] - ): boolean; - - /** - * @see _.some - */ - some( - predicate?: TObject - ): boolean; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.some - */ - some( - predicate?: ListIterator|DictionaryIterator|NumericDictionaryIterator|ObjectIterator - ): boolean; - - /** - * @see _.some - */ - some( - predicate?: string|[string, any] - ): boolean; - - /** - * @see _.some - */ - some( - predicate?: TObject - ): boolean; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.some - */ - some( - predicate?: ListIterator|NumericDictionaryIterator - ): LoDashExplicitWrapper; - - /** - * @see _.some - */ - some( - predicate?: string|[string, any] - ): LoDashExplicitWrapper; - - /** - * @see _.some - */ - some( - predicate?: TObject - ): LoDashExplicitWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.some - */ - some( - predicate?: ListIterator|DictionaryIterator|NumericDictionaryIterator|ObjectIterator - ): LoDashExplicitWrapper; - - /** - * @see _.some - */ - some( - predicate?: string|[string, any] - ): LoDashExplicitWrapper; - - /** - * @see _.some - */ - some( - predicate?: TObject - ): LoDashExplicitWrapper; - } - - //_.sortBy - interface LoDashStatic { - /** - * Creates an array of elements, sorted in ascending order by the results of - * running each element in a collection through each iteratee. This method - * performs a stable sort, that is, it preserves the original sort order of - * equal elements. The iteratees are invoked with one argument: (value). - * - * @static - * @memberOf _ - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {...(Function|Function[]|Object|Object[]|string|string[])} [iteratees=[_.identity]] - * The iteratees to sort by, specified individually or in arrays. - * @returns {Array} Returns the new sorted array. - * @example - * - * var users = [ - * { 'user': 'fred', 'age': 48 }, - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 42 }, - * { 'user': 'barney', 'age': 34 } - * ]; - * - * _.sortBy(users, function(o) { return o.user; }); - * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]] - * - * _.sortBy(users, ['user', 'age']); - * // => objects for [['barney', 34], ['barney', 36], ['fred', 42], ['fred', 48]] - * - * _.sortBy(users, 'user', function(o) { - * return Math.floor(o.age / 10); - * }); - * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]] - */ - sortBy( - collection: List, - iteratee?: ListIterator - ): T[]; - - /** - * @see _.sortBy - */ - sortBy( - collection: Dictionary, - iteratee?: DictionaryIterator - ): T[]; - - /** - * @see _.sortBy - */ - sortBy( - collection: List|Dictionary, - iteratee: string - ): T[]; - - /** - * @see _.sortBy - */ - sortBy( - collection: List|Dictionary, - whereValue: W - ): T[]; - - /** - * @see _.sortBy - */ - sortBy( - collection: List|Dictionary - ): T[]; - - /** - * @see _.sortBy - */ - sortBy( - collection: (Array|List), - iteratees: (ListIterator|string|Object)[]): T[]; - - /** - * @see _.sortBy - */ - sortBy( - collection: (Array|List), - ...iteratees: (ListIterator|Object|string)[]): T[]; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.sortBy - */ - sortBy( - iteratee?: ListIterator - ): LoDashImplicitArrayWrapper; - - /** - * @see _.sortBy - */ - sortBy(iteratee: string): LoDashImplicitArrayWrapper; - - /** - * @see _.sortBy - */ - sortBy(whereValue: W): LoDashImplicitArrayWrapper; - - /** - * @see _.sortBy - */ - sortBy(): LoDashImplicitArrayWrapper; - - /** - * @see _.sortBy - */ - sortBy(...iteratees: (ListIterator|Object|string)[]): LoDashImplicitArrayWrapper; - - /** - * @see _.sortBy - **/ - sortBy(iteratees: (ListIterator|string|Object)[]): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.sortBy - */ - sortBy( - iteratee?: ListIterator|DictionaryIterator - ): LoDashImplicitArrayWrapper; - - /** - * @see _.sortBy - */ - sortBy(iteratee: string): LoDashImplicitArrayWrapper; - - /** - * @see _.sortBy - */ - sortBy(whereValue: W): LoDashImplicitArrayWrapper; - - /** - * @see _.sortBy - */ - sortBy(): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.sortBy - */ - sortBy( - iteratee?: ListIterator - ): LoDashExplicitArrayWrapper; - - /** - * @see _.sortBy - */ - sortBy(iteratee: string): LoDashExplicitArrayWrapper; - - /** - * @see _.sortBy - */ - sortBy(whereValue: W): LoDashExplicitArrayWrapper; - - /** - * @see _.sortBy - */ - sortBy(): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.sortBy - */ - sortBy( - iteratee?: ListIterator|DictionaryIterator - ): LoDashExplicitArrayWrapper; - - /** - * @see _.sortBy - */ - sortBy(iteratee: string): LoDashExplicitArrayWrapper; - - /** - * @see _.sortBy - */ - sortBy(whereValue: W): LoDashExplicitArrayWrapper; - - /** - * @see _.sortBy - */ - sortBy(): LoDashExplicitArrayWrapper; - } - - //_.orderBy - interface LoDashStatic { - /** - * This method is like `_.sortBy` except that it allows specifying the sort - * orders of the iteratees to sort by. If `orders` is unspecified, all values - * are sorted in ascending order. Otherwise, specify an order of "desc" for - * descending or "asc" for ascending sort order of corresponding values. - * - * @static - * @memberOf _ - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function[]|Object[]|string[]} [iteratees=[_.identity]] The iteratees to sort by. - * @param {string[]} [orders] The sort orders of `iteratees`. - * @param- {Object} [guard] Enables use as an iteratee for functions like `_.reduce`. - * @returns {Array} Returns the new sorted array. - * @example - * - * var users = [ - * { 'user': 'fred', 'age': 48 }, - * { 'user': 'barney', 'age': 34 }, - * { 'user': 'fred', 'age': 42 }, - * { 'user': 'barney', 'age': 36 } - * ]; - * - * // sort by `user` in ascending order and by `age` in descending order - * _.orderBy(users, ['user', 'age'], ['asc', 'desc']); - * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]] - */ - orderBy( - collection: List, - iteratees: ListIterator|string|W|(ListIterator|string|W)[], - orders?: boolean|string|(boolean|string)[] - ): T[]; - - /** - * @see _.orderBy - */ - orderBy( - collection: List, - iteratees: ListIterator|string|Object|(ListIterator|string|Object)[], - orders?: boolean|string|(boolean|string)[] - ): T[]; - - /** - * @see _.orderBy - */ - orderBy( - collection: NumericDictionary, - iteratees: NumericDictionaryIterator|string|W|(NumericDictionaryIterator|string|W)[], - orders?: boolean|string|(boolean|string)[] - ): T[]; - - /** - * @see _.orderBy - */ - orderBy( - collection: NumericDictionary, - iteratees: NumericDictionaryIterator|string|Object|(NumericDictionaryIterator|string|Object)[], - orders?: boolean|string|(boolean|string)[] - ): T[]; - - /** - * @see _.orderBy - */ - orderBy( - collection: Dictionary, - iteratees: DictionaryIterator|string|W|(DictionaryIterator|string|W)[], - orders?: boolean|string|(boolean|string)[] - ): T[]; - - /** - * @see _.orderBy - */ - orderBy( - collection: Dictionary, - iteratees: DictionaryIterator|string|Object|(DictionaryIterator|string|Object)[], - orders?: boolean|string|(boolean|string)[] - ): T[]; - } - - interface LoDashImplicitWrapper { - /** - * @see _.orderBy - */ - orderBy( - iteratees: ListIterator|string|(ListIterator|string)[], - orders?: boolean|string|(boolean|string)[] - ): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.orderBy - */ - orderBy( - iteratees: ListIterator|string|W|(ListIterator|string|W)[], - orders?: boolean|string|(boolean|string)[] - ): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.orderBy - */ - orderBy( - iteratees: ListIterator|string|W|(ListIterator|string|W)[], - orders?: boolean|string|(boolean|string)[] - ): LoDashImplicitArrayWrapper; - - /** - * @see _.orderBy - */ - orderBy( - iteratees: ListIterator|string|Object|(ListIterator|string|Object)[], - orders?: boolean|string|(boolean|string)[] - ): LoDashImplicitArrayWrapper; - - /** - * @see _.orderBy - */ - orderBy( - iteratees: NumericDictionaryIterator|string|W|(NumericDictionaryIterator|string|W)[], - orders?: boolean|string|(boolean|string)[] - ): LoDashImplicitArrayWrapper; - - /** - * @see _.orderBy - */ - orderBy( - iteratees: NumericDictionaryIterator|string|Object|(NumericDictionaryIterator|string|Object)[], - orders?: boolean|string|(boolean|string)[] - ): LoDashImplicitArrayWrapper; - - /** - * @see _.orderBy - */ - orderBy( - iteratees: DictionaryIterator|string|W|(DictionaryIterator|string|W)[], - orders?: boolean|string|(boolean|string)[] - ): LoDashImplicitArrayWrapper; - - /** - * @see _.orderBy - */ - orderBy( - iteratees: DictionaryIterator|string|Object|(DictionaryIterator|string|Object)[], - orders?: boolean|string|(boolean|string)[] - ): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitWrapper { - /** - * @see _.orderBy - */ - orderBy( - iteratees: ListIterator|string|(ListIterator|string)[], - orders?: boolean|string|(boolean|string)[] - ): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.orderBy - */ - orderBy( - iteratees: ListIterator|string|W|(ListIterator|string|W)[], - orders?: boolean|string|(boolean|string)[] - ): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.orderBy - */ - orderBy( - iteratees: ListIterator|string|W|(ListIterator|string|W)[], - orders?: boolean|string|(boolean|string)[] - ): LoDashExplicitArrayWrapper; - - /** - * @see _.orderBy - */ - orderBy( - iteratees: ListIterator|string|Object|(ListIterator|string|Object)[], - orders?: boolean|string|(boolean|string)[] - ): LoDashExplicitArrayWrapper; - - /** - * @see _.orderBy - */ - orderBy( - iteratees: NumericDictionaryIterator|string|W|(NumericDictionaryIterator|string|W)[], - orders?: boolean|string|(boolean|string)[] - ): LoDashExplicitArrayWrapper; - - /** - * @see _.orderBy - */ - orderBy( - iteratees: NumericDictionaryIterator|string|Object|(NumericDictionaryIterator|string|Object)[], - orders?: boolean|string|(boolean|string)[] - ): LoDashExplicitArrayWrapper; - - /** - * @see _.orderBy - */ - orderBy( - iteratees: DictionaryIterator|string|W|(DictionaryIterator|string|W)[], - orders?: boolean|string|(boolean|string)[] - ): LoDashExplicitArrayWrapper; - - /** - * @see _.orderBy - */ - orderBy( - iteratees: DictionaryIterator|string|Object|(DictionaryIterator|string|Object)[], - orders?: boolean|string|(boolean|string)[] - ): LoDashExplicitArrayWrapper; - } - - /******** - * Date * - ********/ - - //_.now - interface LoDashStatic { - /** - * Gets the number of milliseconds that have elapsed since the Unix epoch (1 January 1970 00:00:00 UTC). - * - * @return The number of milliseconds. - */ - now(): number; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.now - */ - now(): number; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.now - */ - now(): LoDashExplicitWrapper; - } - - /************* - * Functions * - *************/ - - //_.after - interface LoDashStatic { - /** - * The opposite of _.before; this method creates a function that invokes func once it’s called n or more times. - * - * @param n The number of calls before func is invoked. - * @param func The function to restrict. - * @return Returns the new restricted function. - */ - after( - n: number, - func: TFunc - ): TFunc; - } - - interface LoDashImplicitWrapper { - /** - * @see _.after - **/ - after(func: TFunc): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitWrapper { - /** - * @see _.after - **/ - after(func: TFunc): LoDashExplicitObjectWrapper; - } - - //_.ary - interface LoDashStatic { - /** - * Creates a function that accepts up to n arguments ignoring any additional arguments. - * - * @param func The function to cap arguments for. - * @param n The arity cap. - * @returns Returns the new function. - */ - ary( - func: Function, - n?: number - ): TResult; - - ary( - func: T, - n?: number - ): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.ary - */ - ary(n?: number): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.ary - */ - ary(n?: number): LoDashExplicitObjectWrapper; - } - - //_.before - interface LoDashStatic { - /** - * Creates a function that invokes func, with the this binding and arguments of the created function, while - * it’s called less than n times. Subsequent calls to the created function return the result of the last func - * invocation. - * - * @param n The number of calls at which func is no longer invoked. - * @param func The function to restrict. - * @return Returns the new restricted function. - */ - before( - n: number, - func: TFunc - ): TFunc; - } - - interface LoDashImplicitWrapper { - /** - * @see _.before - **/ - before(func: TFunc): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitWrapper { - /** - * @see _.before - **/ - before(func: TFunc): LoDashExplicitObjectWrapper; - } - - //_.bind - interface FunctionBind { - placeholder: any; - - ( - func: T, - thisArg: any, - ...partials: any[] - ): TResult; - - ( - func: Function, - thisArg: any, - ...partials: any[] - ): TResult; - } - - interface LoDashStatic { - /** - * Creates a function that invokes func with the this binding of thisArg and prepends any additional _.bind - * arguments to those provided to the bound function. - * - * The _.bind.placeholder value, which defaults to _ in monolithic builds, may be used as a placeholder for - * partially applied arguments. - * - * Note: Unlike native Function#bind this method does not set the "length" property of bound functions. - * - * @param func The function to bind. - * @param thisArg The this binding of func. - * @param partials The arguments to be partially applied. - * @return Returns the new bound function. - */ - bind: FunctionBind; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.bind - */ - bind( - thisArg: any, - ...partials: any[] - ): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.bind - */ - bind( - thisArg: any, - ...partials: any[] - ): LoDashExplicitObjectWrapper; - } - - //_.bindAll - interface LoDashStatic { - /** - * Binds methods of an object to the object itself, overwriting the existing method. Method names may be - * specified as individual arguments or as arrays of method names. If no method names are provided all - * enumerable function properties, own and inherited, of object are bound. - * - * Note: This method does not set the "length" property of bound functions. - * - * @param object The object to bind and assign the bound methods to. - * @param methodNames The object method names to bind, specified as individual method names or arrays of - * method names. - * @return Returns object. - */ - bindAll( - object: T, - ...methodNames: (string|string[])[] - ): T; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.bindAll - */ - bindAll(...methodNames: (string|string[])[]): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.bindAll - */ - bindAll(...methodNames: (string|string[])[]): LoDashExplicitObjectWrapper; - } - - //_.bindKey - interface FunctionBindKey { - placeholder: any; - - ( - object: T, - key: any, - ...partials: any[] - ): TResult; - - ( - object: Object, - key: any, - ...partials: any[] - ): TResult; - } - - interface LoDashStatic { - /** - * Creates a function that invokes the method at object[key] and prepends any additional _.bindKey arguments - * to those provided to the bound function. - * - * This method differs from _.bind by allowing bound functions to reference methods that may be redefined - * or don’t yet exist. See Peter Michaux’s article for more details. - * - * The _.bindKey.placeholder value, which defaults to _ in monolithic builds, may be used as a placeholder - * for partially applied arguments. - * - * @param object The object the method belongs to. - * @param key The key of the method. - * @param partials The arguments to be partially applied. - * @return Returns the new bound function. - */ - bindKey: FunctionBindKey; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.bindKey - */ - bindKey( - key: any, - ...partials: any[] - ): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.bindKey - */ - bindKey( - key: any, - ...partials: any[] - ): LoDashExplicitObjectWrapper; - } - - //_.createCallback - interface LoDashStatic { - /** - * Produces a callback bound to an optional thisArg. If func is a property name the created - * callback will return the property value for a given element. If func is an object the created - * callback will return true for elements that contain the equivalent object properties, - * otherwise it will return false. - * @param func The value to convert to a callback. - * @param thisArg The this binding of the created callback. - * @param argCount The number of arguments the callback accepts. - * @return A callback function. - **/ - createCallback( - func: string, - argCount?: number): () => any; - - /** - * @see _.createCallback - **/ - createCallback( - func: Dictionary, - argCount?: number): () => boolean; - } - - interface LoDashImplicitWrapper { - /** - * @see _.createCallback - **/ - createCallback( - argCount?: number): LoDashImplicitObjectWrapper<() => any>; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.createCallback - **/ - createCallback( - argCount?: number): LoDashImplicitObjectWrapper<() => any>; - } - - //_.curry - interface LoDashStatic { - /** - * Creates a function that accepts one or more arguments of func that when called either invokes func returning - * its result, if all func arguments have been provided, or returns a function that accepts one or more of the - * remaining func arguments, and so on. The arity of func may be specified if func.length is not sufficient. - * @param func The function to curry. - * @return Returns the new curried function. - */ - curry(func: (t1: T1) => R): - CurriedFunction1; - /** - * Creates a function that accepts one or more arguments of func that when called either invokes func returning - * its result, if all func arguments have been provided, or returns a function that accepts one or more of the - * remaining func arguments, and so on. The arity of func may be specified if func.length is not sufficient. - * @param func The function to curry. - * @return Returns the new curried function. - */ - curry(func: (t1: T1, t2: T2) => R): - CurriedFunction2; - /** - * Creates a function that accepts one or more arguments of func that when called either invokes func returning - * its result, if all func arguments have been provided, or returns a function that accepts one or more of the - * remaining func arguments, and so on. The arity of func may be specified if func.length is not sufficient. - * @param func The function to curry. - * @return Returns the new curried function. - */ - curry(func: (t1: T1, t2: T2, t3: T3) => R): - CurriedFunction3; - /** - * Creates a function that accepts one or more arguments of func that when called either invokes func returning - * its result, if all func arguments have been provided, or returns a function that accepts one or more of the - * remaining func arguments, and so on. The arity of func may be specified if func.length is not sufficient. - * @param func The function to curry. - * @return Returns the new curried function. - */ - curry(func: (t1: T1, t2: T2, t3: T3, t4: T4) => R): - CurriedFunction4; - /** - * Creates a function that accepts one or more arguments of func that when called either invokes func returning - * its result, if all func arguments have been provided, or returns a function that accepts one or more of the - * remaining func arguments, and so on. The arity of func may be specified if func.length is not sufficient. - * @param func The function to curry. - * @return Returns the new curried function. - */ - curry(func: (t1: T1, t2: T2, t3: T3, t4: T4, t5: T5) => R): - CurriedFunction5; - /** - * Creates a function that accepts one or more arguments of func that when called either invokes func returning - * its result, if all func arguments have been provided, or returns a function that accepts one or more of the - * remaining func arguments, and so on. The arity of func may be specified if func.length is not sufficient. - * @param func The function to curry. - * @param arity The arity of func. - * @return Returns the new curried function. - */ - curry( - func: Function, - arity?: number): TResult; - } - - interface CurriedFunction1 { - (): CurriedFunction1; - (t1: T1): R; - } - - interface CurriedFunction2 { - (): CurriedFunction2; - (t1: T1): CurriedFunction1; - (t1: T1, t2: T2): R; - } - - interface CurriedFunction3 { - (): CurriedFunction3; - (t1: T1): CurriedFunction2; - (t1: T1, t2: T2): CurriedFunction1; - (t1: T1, t2: T2, t3: T3): R; - } - - interface CurriedFunction4 { - (): CurriedFunction4; - (t1: T1): CurriedFunction3; - (t1: T1, t2: T2): CurriedFunction2; - (t1: T1, t2: T2, t3: T3): CurriedFunction1; - (t1: T1, t2: T2, t3: T3, t4: T4): R; - } - - interface CurriedFunction5 { - (): CurriedFunction5; - (t1: T1): CurriedFunction4; - (t1: T1, t2: T2): CurriedFunction3; - (t1: T1, t2: T2, t3: T3): CurriedFunction2; - (t1: T1, t2: T2, t3: T3, t4: T4): CurriedFunction1; - (t1: T1, t2: T2, t3: T3, t4: T4, t5: T5): R; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.curry - **/ - curry(arity?: number): LoDashImplicitObjectWrapper; - } - - //_.curryRight - interface LoDashStatic { - /** - * This method is like _.curry except that arguments are applied to func in the manner of _.partialRight - * instead of _.partial. - * @param func The function to curry. - * @return Returns the new curried function. - */ - curryRight(func: (t1: T1) => R): - CurriedFunction1; - /** - * This method is like _.curry except that arguments are applied to func in the manner of _.partialRight - * instead of _.partial. - * @param func The function to curry. - * @return Returns the new curried function. - */ - curryRight(func: (t1: T1, t2: T2) => R): - CurriedFunction2; - /** - * This method is like _.curry except that arguments are applied to func in the manner of _.partialRight - * instead of _.partial. - * @param func The function to curry. - * @return Returns the new curried function. - */ - curryRight(func: (t1: T1, t2: T2, t3: T3) => R): - CurriedFunction3; - /** - * This method is like _.curry except that arguments are applied to func in the manner of _.partialRight - * instead of _.partial. - * @param func The function to curry. - * @return Returns the new curried function. - */ - curryRight(func: (t1: T1, t2: T2, t3: T3, t4: T4) => R): - CurriedFunction4; - /** - * This method is like _.curry except that arguments are applied to func in the manner of _.partialRight - * instead of _.partial. - * @param func The function to curry. - * @return Returns the new curried function. - */ - curryRight(func: (t1: T1, t2: T2, t3: T3, t4: T4, t5: T5) => R): - CurriedFunction5; - /** - * This method is like _.curry except that arguments are applied to func in the manner of _.partialRight - * instead of _.partial. - * @param func The function to curry. - * @param arity The arity of func. - * @return Returns the new curried function. - */ - curryRight( - func: Function, - arity?: number): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.curryRight - **/ - curryRight(arity?: number): LoDashImplicitObjectWrapper; - } - - //_.debounce - interface DebounceSettings { - /** - * Specify invoking on the leading edge of the timeout. - */ - leading?: boolean; - - /** - * The maximum time func is allowed to be delayed before it’s invoked. - */ - maxWait?: number; - - /** - * Specify invoking on the trailing edge of the timeout. - */ - trailing?: boolean; - } - - interface LoDashStatic { - /** - * Creates a debounced function that delays invoking func until after wait milliseconds have elapsed since - * the last time the debounced function was invoked. The debounced function comes with a cancel method to - * cancel delayed invocations and a flush method to immediately invoke them. Provide an options object to - * indicate that func should be invoked on the leading and/or trailing edge of the wait timeout. Subsequent - * calls to the debounced function return the result of the last func invocation. - * - * Note: If leading and trailing options are true, func is invoked on the trailing edge of the timeout only - * if the the debounced function is invoked more than once during the wait timeout. - * - * See David Corbacho’s article for details over the differences between _.debounce and _.throttle. - * - * @param func The function to debounce. - * @param wait The number of milliseconds to delay. - * @param options The options object. - * @param options.leading Specify invoking on the leading edge of the timeout. - * @param options.maxWait The maximum time func is allowed to be delayed before it’s invoked. - * @param options.trailing Specify invoking on the trailing edge of the timeout. - * @return Returns the new debounced function. - */ - debounce( - func: T, - wait?: number, - options?: DebounceSettings - ): T & Cancelable; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.debounce - */ - debounce( - wait?: number, - options?: DebounceSettings - ): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.debounce - */ - debounce( - wait?: number, - options?: DebounceSettings - ): LoDashExplicitObjectWrapper; - } - - //_.defer - interface LoDashStatic { - /** - * Defers invoking the func until the current call stack has cleared. Any additional arguments are provided to - * func when it’s invoked. - * - * @param func The function to defer. - * @param args The arguments to invoke the function with. - * @return Returns the timer id. - */ - defer( - func: T, - ...args: any[] - ): number; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.defer - */ - defer(...args: any[]): LoDashImplicitWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.defer - */ - defer(...args: any[]): LoDashExplicitWrapper; - } - - //_.delay - interface LoDashStatic { - /** - * Invokes func after wait milliseconds. Any additional arguments are provided to func when it’s invoked. - * - * @param func The function to delay. - * @param wait The number of milliseconds to delay invocation. - * @param args The arguments to invoke the function with. - * @return Returns the timer id. - */ - delay( - func: T, - wait: number, - ...args: any[] - ): number; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.delay - */ - delay( - wait: number, - ...args: any[] - ): LoDashImplicitWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.delay - */ - delay( - wait: number, - ...args: any[] - ): LoDashExplicitWrapper; - } - - interface LoDashStatic { - /** - * Creates a function that invokes `func` with arguments reversed. - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to flip arguments for. - * @returns {Function} Returns the new function. - * @example - * - * var flipped = _.flip(function() { - * return _.toArray(arguments); - * }); - * - * flipped('a', 'b', 'c', 'd'); - * // => ['d', 'c', 'b', 'a'] - */ - flip(func: T): T; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.flip - */ - flip(): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.flip - */ - flip(): LoDashExplicitObjectWrapper; - } - - //_.flow - interface LoDashStatic { - /** - * Creates a function that returns the result of invoking the provided functions with the this binding of the - * created function, where each successive invocation is supplied the return value of the previous. - * - * @param funcs Functions to invoke. - * @return Returns the new function. - */ - // 1-argument first function - flow(f1: (a1: A1) => R1, f2: (a: R1) => R2): (a1: A1) => R2; - flow(f1: (a1: A1) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3): (a1: A1) => R3; - flow(f1: (a1: A1) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4): (a1: A1) => R4; - flow(f1: (a1: A1) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5): (a1: A1) => R5; - flow(f1: (a1: A1) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6): (a1: A1) => R6; - flow(f1: (a1: A1) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6, f7: (a: R6) => R7): (a1: A1) => R7; - // 2-argument first function - flow(f1: (a1: A1, a2: A2) => R1, f2: (a: R1) => R2): (a1: A1, a2: A2) => R2; - flow(f1: (a1: A1, a2: A2) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3): (a1: A1, a2: A2) => R3; - flow(f1: (a1: A1, a2: A2) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4): (a1: A1, a2: A2) => R4; - flow(f1: (a1: A1, a2: A2) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5): (a1: A1, a2: A2) => R5; - flow(f1: (a1: A1, a2: A2) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6): (a1: A1, a2: A2) => R6; - flow(f1: (a1: A1, a2: A2) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6, f7: (a: R6) => R7): (a1: A1, a2: A2) => R7; - // 3-argument first function - flow(f1: (a1: A1, a2: A2, a3: A3) => R1, f2: (a: R1) => R2): (a1: A1, a2: A2, a3: A3) => R2; - flow(f1: (a1: A1, a2: A2, a3: A3) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3): (a1: A1, a2: A2, a3: A3) => R3; - flow(f1: (a1: A1, a2: A2, a3: A3) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4): (a1: A1, a2: A2, a3: A3) => R4; - flow(f1: (a1: A1, a2: A2, a3: A3) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5): (a1: A1, a2: A2, a3: A3) => R5; - flow(f1: (a1: A1, a2: A2, a3: A3) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6): (a1: A1, a2: A2, a3: A3) => R6; - flow(f1: (a1: A1, a2: A2, a3: A3) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6, f7: (a: R6) => R7): (a1: A1, a2: A2, a3: A3) => R7; - // 4-argument first function - flow(f1: (a1: A1, a2: A2, a3: A3, a4: A4) => R1, f2: (a: R1) => R2): (a1: A1, a2: A2, a3: A3, a4: A4) => R2; - flow(f1: (a1: A1, a2: A2, a3: A3, a4: A4) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3): (a1: A1, a2: A2, a3: A3, a4: A4) => R3; - flow(f1: (a1: A1, a2: A2, a3: A3, a4: A4) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4): (a1: A1, a2: A2, a3: A3, a4: A4) => R4; - flow(f1: (a1: A1, a2: A2, a3: A3, a4: A4) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5): (a1: A1, a2: A2, a3: A3, a4: A4) => R5; - flow(f1: (a1: A1, a2: A2, a3: A3, a4: A4) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6): (a1: A1, a2: A2, a3: A3, a4: A4) => R6; - flow(f1: (a1: A1, a2: A2, a3: A3, a4: A4) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6, f7: (a: R6) => R7): (a1: A1, a2: A2, a3: A3, a4: A4) => R7; - // generic function - flow(...funcs: Function[]): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.flow - */ - flow(...funcs: Function[]): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.flow - */ - flow(...funcs: Function[]): LoDashExplicitObjectWrapper; - } - - //_.flowRight - interface LoDashStatic { - /** - * This method is like _.flow except that it creates a function that invokes the provided functions from right - * to left. - * - * @param funcs Functions to invoke. - * @return Returns the new function. - */ - flowRight(...funcs: Function[]): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.flowRight - */ - flowRight(...funcs: Function[]): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.flowRight - */ - flowRight(...funcs: Function[]): LoDashExplicitObjectWrapper; - } - - - //_.memoize - interface MemoizedFunction extends Function { - cache: MapCache; - } - - interface LoDashStatic { - /** - * Creates a function that memoizes the result of func. If resolver is provided it determines the cache key for - * storing the result based on the arguments provided to the memoized function. By default, the first argument - * provided to the memoized function is coerced to a string and used as the cache key. The func is invoked with - * the this binding of the memoized function. - * - * @param func The function to have its output memoized. - * @param resolver The function to resolve the cache key. - * @return Returns the new memoizing function. - */ - memoize: { - (func: T, resolver?: Function): T & MemoizedFunction; - Cache: MapCacheConstructor; - } - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.memoize - */ - memoize(resolver?: Function): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.memoize - */ - memoize(resolver?: Function): LoDashExplicitObjectWrapper; - } - - //_.overArgs (was _.modArgs) - interface LoDashStatic { - /** - * Creates a function that runs each argument through a corresponding transform function. - * - * @param func The function to wrap. - * @param transforms The functions to transform arguments, specified as individual functions or arrays - * of functions. - * @return Returns the new function. - */ - overArgs( - func: T, - ...transforms: Function[] - ): TResult; - - /** - * @see _.overArgs - */ - overArgs( - func: T, - transforms: Function[] - ): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.overArgs - */ - overArgs(...transforms: Function[]): LoDashImplicitObjectWrapper; - - /** - * @see _.overArgs - */ - overArgs(transforms: Function[]): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.overArgs - */ - overArgs(...transforms: Function[]): LoDashExplicitObjectWrapper; - - /** - * @see _.overArgs - */ - overArgs(transforms: Function[]): LoDashExplicitObjectWrapper; - } - - //_.negate - interface LoDashStatic { - /** - * Creates a function that negates the result of the predicate func. The func predicate is invoked with - * the this binding and arguments of the created function. - * - * @param predicate The predicate to negate. - * @return Returns the new function. - */ - negate(predicate: T): (...args: any[]) => boolean; - - /** - * @see _.negate - */ - negate(predicate: T): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.negate - */ - negate(): LoDashImplicitObjectWrapper<(...args: any[]) => boolean>; - - /** - * @see _.negate - */ - negate(): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.negate - */ - negate(): LoDashExplicitObjectWrapper<(...args: any[]) => boolean>; - - /** - * @see _.negate - */ - negate(): LoDashExplicitObjectWrapper; - } - - //_.once - interface LoDashStatic { - /** - * Creates a function that is restricted to invoking func once. Repeat calls to the function return the value - * of the first call. The func is invoked with the this binding and arguments of the created function. - * - * @param func The function to restrict. - * @return Returns the new restricted function. - */ - once(func: T): T; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.once - */ - once(): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.once - */ - once(): LoDashExplicitObjectWrapper; - } - - //_.partial - interface LoDashStatic { - /** - * Creates a function that, when called, invokes func with any additional partial arguments - * prepended to those provided to the new function. This method is similar to _.bind except - * it does not alter the this binding. - * @param func The function to partially apply arguments to. - * @param args Arguments to be partially applied. - * @return The new partially applied function. - **/ - partial: Partial; - } - - type PH = LoDashStatic; - - interface Function0 { - (): R; - } - interface Function1 { - (t1: T1): R; - } - interface Function2 { - (t1: T1, t2: T2): R; - } - interface Function3 { - (t1: T1, t2: T2, t3: T3): R; - } - interface Function4 { - (t1: T1, t2: T2, t3: T3, t4: T4): R; - } - - interface Partial { - // arity 0 - (func: Function0): Function0; - // arity 1 - (func: Function1): Function1; - (func: Function1, arg1: T1): Function0; - // arity 2 - (func: Function2): Function2; - (func: Function2, arg1: T1): Function1< T2, R>; - (func: Function2, plc1: PH, arg2: T2): Function1; - (func: Function2, arg1: T1, arg2: T2): Function0< R>; - // arity 3 - (func: Function3): Function3; - (func: Function3, arg1: T1): Function2< T2, T3, R>; - (func: Function3, plc1: PH, arg2: T2): Function2; - (func: Function3, arg1: T1, arg2: T2): Function1< T3, R>; - (func: Function3, plc1: PH, plc2: PH, arg3: T3): Function2; - (func: Function3, arg1: T1, plc2: PH, arg3: T3): Function1< T2, R>; - (func: Function3, plc1: PH, arg2: T2, arg3: T3): Function1; - (func: Function3, arg1: T1, arg2: T2, arg3: T3): Function0< R>; - // arity 4 - (func: Function4): Function4; - (func: Function4, arg1: T1): Function3< T2, T3, T4, R>; - (func: Function4, plc1: PH, arg2: T2): Function3; - (func: Function4, arg1: T1, arg2: T2): Function2< T3, T4, R>; - (func: Function4, plc1: PH, plc2: PH, arg3: T3): Function3; - (func: Function4, arg1: T1, plc2: PH, arg3: T3): Function2< T2, T4, R>; - (func: Function4, plc1: PH, arg2: T2, arg3: T3): Function2; - (func: Function4, arg1: T1, arg2: T2, arg3: T3): Function1< T4, R>; - (func: Function4, plc1: PH, plc2: PH, plc3: PH, arg4: T4): Function3; - (func: Function4, arg1: T1, plc2: PH, plc3: PH, arg4: T4): Function2< T2, T3, R>; - (func: Function4, plc1: PH, arg2: T2, plc3: PH, arg4: T4): Function2; - (func: Function4, arg1: T1, arg2: T2, plc3: PH, arg4: T4): Function1< T3, R>; - (func: Function4, plc1: PH, plc2: PH, arg3: T3, arg4: T4): Function2; - (func: Function4, arg1: T1, plc2: PH, arg3: T3, arg4: T4): Function1< T2, R>; - (func: Function4, plc1: PH, arg2: T2, arg3: T3, arg4: T4): Function1; - (func: Function4, arg1: T1, arg2: T2, arg3: T3, arg4: T4): Function0< R>; - // catch-all - (func: Function, ...args: any[]): Function; - } - - //_.partialRight - interface LoDashStatic { - /** - * This method is like _.partial except that partial arguments are appended to those provided - * to the new function. - * @param func The function to partially apply arguments to. - * @param args Arguments to be partially applied. - * @return The new partially applied function. - **/ - partialRight: PartialRight - } - - interface PartialRight { - // arity 0 - (func: Function0): Function0; - // arity 1 - (func: Function1): Function1; - (func: Function1, arg1: T1): Function0; - // arity 2 - (func: Function2): Function2; - (func: Function2, arg1: T1, plc2: PH): Function1< T2, R>; - (func: Function2, arg2: T2): Function1; - (func: Function2, arg1: T1, arg2: T2): Function0< R>; - // arity 3 - (func: Function3): Function3; - (func: Function3, arg1: T1, plc2: PH, plc3: PH): Function2< T2, T3, R>; - (func: Function3, arg2: T2, plc3: PH): Function2; - (func: Function3, arg1: T1, arg2: T2, plc3: PH): Function1< T3, R>; - (func: Function3, arg3: T3): Function2; - (func: Function3, arg1: T1, plc2: PH, arg3: T3): Function1< T2, R>; - (func: Function3, arg2: T2, arg3: T3): Function1; - (func: Function3, arg1: T1, arg2: T2, arg3: T3): Function0< R>; - // arity 4 - (func: Function4): Function4; - (func: Function4, arg1: T1, plc2: PH, plc3: PH, plc4: PH): Function3< T2, T3, T4, R>; - (func: Function4, arg2: T2, plc3: PH, plc4: PH): Function3; - (func: Function4, arg1: T1, arg2: T2, plc3: PH, plc4: PH): Function2< T3, T4, R>; - (func: Function4, arg3: T3, plc4: PH): Function3; - (func: Function4, arg1: T1, plc2: PH, arg3: T3, plc4: PH): Function2< T2, T4, R>; - (func: Function4, arg2: T2, arg3: T3, plc4: PH): Function2; - (func: Function4, arg1: T1, arg2: T2, arg3: T3, plc4: PH): Function1< T4, R>; - (func: Function4, arg4: T4): Function3; - (func: Function4, arg1: T1, plc2: PH, plc3: PH, arg4: T4): Function2< T2, T3, R>; - (func: Function4, arg2: T2, plc3: PH, arg4: T4): Function2; - (func: Function4, arg1: T1, arg2: T2, plc3: PH, arg4: T4): Function1< T3, R>; - (func: Function4, arg3: T3, arg4: T4): Function2; - (func: Function4, arg1: T1, plc2: PH, arg3: T3, arg4: T4): Function1< T2, R>; - (func: Function4, arg2: T2, arg3: T3, arg4: T4): Function1; - (func: Function4, arg1: T1, arg2: T2, arg3: T3, arg4: T4): Function0< R>; - // catch-all - (func: Function, ...args: any[]): Function; - } - - //_.rearg - interface LoDashStatic { - /** - * Creates a function that invokes func with arguments arranged according to the specified indexes where the - * argument value at the first index is provided as the first argument, the argument value at the second index - * is provided as the second argument, and so on. - * @param func The function to rearrange arguments for. - * @param indexes The arranged argument indexes, specified as individual indexes or arrays of indexes. - * @return Returns the new function. - */ - rearg(func: Function, indexes: number[]): TResult; - - /** - * @see _.rearg - */ - rearg(func: Function, ...indexes: number[]): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.rearg - */ - rearg(indexes: number[]): LoDashImplicitObjectWrapper; - - /** - * @see _.rearg - */ - rearg(...indexes: number[]): LoDashImplicitObjectWrapper; - } - - //_.rest - interface LoDashStatic { - /** - * Creates a function that invokes func with the this binding of the created function and arguments from start - * and beyond provided as an array. - * - * Note: This method is based on the rest parameter. - * - * @param func The function to apply a rest parameter to. - * @param start The start position of the rest parameter. - * @return Returns the new function. - */ - rest( - func: Function, - start?: number - ): TResult; - - /** - * @see _.rest - */ - rest( - func: TFunc, - start?: number - ): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.rest - */ - rest(start?: number): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.rest - */ - rest(start?: number): LoDashExplicitObjectWrapper; - } - - //_.spread - interface LoDashStatic { - /** - * Creates a function that invokes func with the this binding of the created function and an array of arguments - * much like Function#apply. - * - * Note: This method is based on the spread operator. - * - * @param func The function to spread arguments over. - * @return Returns the new function. - */ - spread(func: F): T; - - /** - * @see _.spread - */ - spread(func: Function): T; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.spread - */ - spread(): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.spread - */ - spread(): LoDashExplicitObjectWrapper; - } - - //_.throttle - interface ThrottleSettings { - /** - * If you'd like to disable the leading-edge call, pass this as false. - */ - leading?: boolean; - - /** - * If you'd like to disable the execution on the trailing-edge, pass false. - */ - trailing?: boolean; - } - - interface LoDashStatic { - /** - * Creates a throttled function that only invokes func at most once per every wait milliseconds. The throttled - * function comes with a cancel method to cancel delayed invocations and a flush method to immediately invoke - * them. Provide an options object to indicate that func should be invoked on the leading and/or trailing edge - * of the wait timeout. Subsequent calls to the throttled function return the result of the last func call. - * - * Note: If leading and trailing options are true, func is invoked on the trailing edge of the timeout only if - * the the throttled function is invoked more than once during the wait timeout. - * - * @param func The function to throttle. - * @param wait The number of milliseconds to throttle invocations to. - * @param options The options object. - * @param options.leading Specify invoking on the leading edge of the timeout. - * @param options.trailing Specify invoking on the trailing edge of the timeout. - * @return Returns the new throttled function. - */ - throttle( - func: T, - wait?: number, - options?: ThrottleSettings - ): T & Cancelable; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.throttle - */ - throttle( - wait?: number, - options?: ThrottleSettings - ): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.throttle - */ - throttle( - wait?: number, - options?: ThrottleSettings - ): LoDashExplicitObjectWrapper; - } - - //_.unary - interface LoDashStatic { - /** - * Creates a function that accepts up to one argument, ignoring any - * additional arguments. - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to cap arguments for. - * @returns {Function} Returns the new function. - * @example - * - * _.map(['6', '8', '10'], _.unary(parseInt)); - * // => [6, 8, 10] - */ - unary(func: T): T; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.unary - */ - unary(): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.unary - */ - unary(): LoDashExplicitObjectWrapper; - } - - //_.wrap - interface LoDashStatic { - /** - * Creates a function that provides value to the wrapper function as its first argument. Any additional - * arguments provided to the function are appended to those provided to the wrapper function. The wrapper is - * invoked with the this binding of the created function. - * - * @param value The value to wrap. - * @param wrapper The wrapper function. - * @return Returns the new function. - */ - wrap( - value: V, - wrapper: W - ): R; - - /** - * @see _.wrap - */ - wrap( - value: V, - wrapper: Function - ): R; - - /** - * @see _.wrap - */ - wrap( - value: any, - wrapper: Function - ): R; - } - - interface LoDashImplicitWrapper { - /** - * @see _.wrap - */ - wrap(wrapper: W): LoDashImplicitObjectWrapper; - - /** - * @see _.wrap - */ - wrap(wrapper: Function): LoDashImplicitObjectWrapper; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.wrap - */ - wrap(wrapper: W): LoDashImplicitObjectWrapper; - - /** - * @see _.wrap - */ - wrap(wrapper: Function): LoDashImplicitObjectWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.wrap - */ - wrap(wrapper: W): LoDashImplicitObjectWrapper; - - /** - * @see _.wrap - */ - wrap(wrapper: Function): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitWrapper { - /** - * @see _.wrap - */ - wrap(wrapper: W): LoDashExplicitObjectWrapper; - - /** - * @see _.wrap - */ - wrap(wrapper: Function): LoDashExplicitObjectWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.wrap - */ - wrap(wrapper: W): LoDashExplicitObjectWrapper; - - /** - * @see _.wrap - */ - wrap(wrapper: Function): LoDashExplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.wrap - */ - wrap(wrapper: W): LoDashExplicitObjectWrapper; - - /** - * @see _.wrap - */ - wrap(wrapper: Function): LoDashExplicitObjectWrapper; - } - - /******** - * Lang * - ********/ - - //_.castArray - interface LoDashStatic { - /** - * Casts value as an array if it’s not one. - * - * @param value The value to inspect. - * @return Returns the cast array. - */ - castArray(value: T): T[]; - } - - interface LoDashImplicitWrapper { - /** - * @see _.castArray - */ - castArray(): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.castArray - */ - castArray(): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.castArray - */ - castArray(): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitWrapper { - /** - * @see _.castArray - */ - castArray(): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.castArray - */ - castArray(): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.castArray - */ - castArray(): LoDashExplicitArrayWrapper; - } - - //_.clone - interface LoDashStatic { - /** - * Creates a shallow clone of value. - * - * Note: This method is loosely based on the structured clone algorithm and supports cloning arrays, - * array buffers, booleans, date objects, maps, numbers, Object objects, regexes, sets, strings, symbols, - * and typed arrays. The own enumerable properties of arguments objects are cloned as plain objects. An empty - * object is returned for uncloneable values such as error objects, functions, DOM nodes, and WeakMaps. - * - * @param value The value to clone. - * @return Returns the cloned value. - */ - clone(value: T): T; - } - - interface LoDashImplicitWrapper { - /** - * @see _.clone - */ - clone(): T; - } - - interface LoDashImplicitArrayWrapper { - - /** - * @see _.clone - */ - clone(): T[]; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.clone - */ - clone(): T; - } - - interface LoDashExplicitWrapper { - /** - * @see _.clone - */ - clone(): LoDashExplicitWrapper; - } - - interface LoDashExplicitArrayWrapper { - - /** - * @see _.clone - */ - clone(): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.clone - */ - clone(): LoDashExplicitObjectWrapper; - } - - //_.cloneDeep - interface LoDashStatic { - /** - * This method is like _.clone except that it recursively clones value. - * - * @param value The value to recursively clone. - * @return Returns the deep cloned value. - */ - cloneDeep(value: T): T; - } - - interface LoDashImplicitWrapper { - /** - * @see _.cloneDeep - */ - cloneDeep(): T; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.cloneDeep - */ - cloneDeep(): T[]; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.cloneDeep - */ - cloneDeep(): T; - } - - interface LoDashExplicitWrapper { - /** - * @see _.cloneDeep - */ - cloneDeep(): LoDashExplicitWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.cloneDeep - */ - cloneDeep(): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.cloneDeep - */ - cloneDeep(): LoDashExplicitObjectWrapper; - } - - //_.cloneDeepWith - interface CloneDeepWithCustomizer { - (value: TValue): TResult; - } - - interface LoDashStatic { - /** - * This method is like _.cloneWith except that it recursively clones value. - * - * @param value The value to recursively clone. - * @param customizer The function to customize cloning. - * @return Returns the deep cloned value. - */ - cloneDeepWith( - value: any, - customizer?: CloneDeepWithCustomizer - ): TResult; - - /** - * @see _.clonDeepeWith - */ - cloneDeepWith( - value: T, - customizer?: CloneDeepWithCustomizer - ): TResult; - } - - interface LoDashImplicitWrapper { - /** - * @see _.cloneDeepWith - */ - cloneDeepWith( - customizer?: CloneDeepWithCustomizer - ): TResult; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.cloneDeepWith - */ - cloneDeepWith( - customizer?: CloneDeepWithCustomizer - ): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.cloneDeepWith - */ - cloneDeepWith( - customizer?: CloneDeepWithCustomizer - ): TResult; - } - - interface LoDashExplicitWrapper { - /** - * @see _.cloneDeepWith - */ - cloneDeepWith( - customizer?: CloneDeepWithCustomizer - ): LoDashExplicitWrapper; - - /** - * @see _.cloneDeepWith - */ - cloneDeepWith( - customizer?: CloneDeepWithCustomizer - ): LoDashExplicitArrayWrapper; - - /** - * @see _.cloneDeepWith - */ - cloneDeepWith( - customizer?: CloneDeepWithCustomizer - ): LoDashExplicitObjectWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.cloneDeepWith - */ - cloneDeepWith( - customizer?: CloneDeepWithCustomizer - ): LoDashExplicitWrapper; - - /** - * @see _.cloneDeepWith - */ - cloneDeepWith( - customizer?: CloneDeepWithCustomizer - ): LoDashExplicitArrayWrapper; - - /** - * @see _.cloneDeepWith - */ - cloneDeepWith( - customizer?: CloneDeepWithCustomizer - ): LoDashExplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.cloneDeepWith - */ - cloneDeepWith( - customizer?: CloneDeepWithCustomizer - ): LoDashExplicitWrapper; - - /** - * @see _.cloneDeepWith - */ - cloneDeepWith( - customizer?: CloneDeepWithCustomizer - ): LoDashExplicitArrayWrapper; - - /** - * @see _.cloneDeepWith - */ - cloneDeepWith( - customizer?: CloneDeepWithCustomizer - ): LoDashExplicitObjectWrapper; - } - - //_.cloneWith - interface CloneWithCustomizer { - (value: TValue): TResult; - } - - interface LoDashStatic { - /** - * This method is like _.clone except that it accepts customizer which is invoked to produce the cloned value. - * If customizer returns undefined cloning is handled by the method instead. - * - * @param value The value to clone. - * @param customizer The function to customize cloning. - * @return Returns the cloned value. - */ - cloneWith( - value: any, - customizer?: CloneWithCustomizer - ): TResult; - - /** - * @see _.cloneWith - */ - cloneWith( - value: T, - customizer?: CloneWithCustomizer - ): TResult; - } - - interface LoDashImplicitWrapper { - /** - * @see _.cloneWith - */ - cloneWith( - customizer?: CloneWithCustomizer - ): TResult; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.cloneWith - */ - cloneWith( - customizer?: CloneWithCustomizer - ): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.cloneWith - */ - cloneWith( - customizer?: CloneWithCustomizer - ): TResult; - } - - interface LoDashExplicitWrapper { - /** - * @see _.cloneWith - */ - cloneWith( - customizer?: CloneWithCustomizer - ): LoDashExplicitWrapper; - - /** - * @see _.cloneWith - */ - cloneWith( - customizer?: CloneWithCustomizer - ): LoDashExplicitArrayWrapper; - - /** - * @see _.cloneWith - */ - cloneWith( - customizer?: CloneWithCustomizer - ): LoDashExplicitObjectWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.cloneWith - */ - cloneWith( - customizer?: CloneWithCustomizer - ): LoDashExplicitWrapper; - - /** - * @see _.cloneWith - */ - cloneWith( - customizer?: CloneWithCustomizer - ): LoDashExplicitArrayWrapper; - - /** - * @see _.cloneWith - */ - cloneWith( - customizer?: CloneWithCustomizer - ): LoDashExplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.cloneWith - */ - cloneWith( - customizer?: CloneWithCustomizer - ): LoDashExplicitWrapper; - - /** - * @see _.cloneWith - */ - cloneWith( - customizer?: CloneWithCustomizer - ): LoDashExplicitArrayWrapper; - - /** - * @see _.cloneWith - */ - cloneWith( - customizer?: CloneWithCustomizer - ): LoDashExplicitObjectWrapper; - } - - //_.eq - interface LoDashStatic { - /** - * Performs a [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) - * comparison between two values to determine if they are equivalent. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - * @example - * - * var object = { 'user': 'fred' }; - * var other = { 'user': 'fred' }; - * - * _.eq(object, object); - * // => true - * - * _.eq(object, other); - * // => false - * - * _.eq('a', 'a'); - * // => true - * - * _.eq('a', Object('a')); - * // => false - * - * _.eq(NaN, NaN); - * // => true - */ - eq( - value: any, - other: any - ): boolean; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.isEqual - */ - eq( - other: any - ): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.isEqual - */ - eq( - other: any - ): LoDashExplicitWrapper; - } - - //_.gt - interface LoDashStatic { - /** - * Checks if value is greater than other. - * - * @param value The value to compare. - * @param other The other value to compare. - * @return Returns true if value is greater than other, else false. - */ - gt( - value: any, - other: any - ): boolean; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.gt - */ - gt(other: any): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.gt - */ - gt(other: any): LoDashExplicitWrapper; - } - - //_.gte - interface LoDashStatic { - /** - * Checks if value is greater than or equal to other. - * - * @param value The value to compare. - * @param other The other value to compare. - * @return Returns true if value is greater than or equal to other, else false. - */ - gte( - value: any, - other: any - ): boolean; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.gte - */ - gte(other: any): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.gte - */ - gte(other: any): LoDashExplicitWrapper; - } - - //_.isArguments - interface LoDashStatic { - /** - * Checks if value is classified as an arguments object. - * - * @param value The value to check. - * @return Returns true if value is correctly classified, else false. - */ - isArguments(value?: any): value is IArguments; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.isArguments - */ - isArguments(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.isArguments - */ - isArguments(): LoDashExplicitWrapper; - } - - //_.isArray - interface LoDashStatic { - /** - * Checks if value is classified as an Array object. - * @param value The value to check. - * - * @return Returns true if value is correctly classified, else false. - */ - isArray(value?: any): value is T[]; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.isArray - */ - isArray(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.isArray - */ - isArray(): LoDashExplicitWrapper; - } - - //_.isArrayBuffer - interface LoDashStatic { - /** - * Checks if value is classified as an ArrayBuffer object. - * - * @param value The value to check. - * @return Returns true if value is correctly classified, else false. - */ - isArrayBuffer(value?: any): value is ArrayBuffer; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.isArrayBuffer - */ - isArrayBuffer(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.isArrayBuffer - */ - isArrayBuffer(): LoDashExplicitWrapper; - } - - //_.isArrayLike - interface LoDashStatic { - /** - * Checks if `value` is array-like. A value is considered array-like if it's - * not a function and has a `value.length` that's an integer greater than or - * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. - * - * @static - * @memberOf _ - * @type Function - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is array-like, else `false`. - * @example - * - * _.isArrayLike([1, 2, 3]); - * // => true - * - * _.isArrayLike(document.body.children); - * // => true - * - * _.isArrayLike('abc'); - * // => true - * - * _.isArrayLike(_.noop); - * // => false - */ - isArrayLike(value?: any): value is T[]; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.isArrayLike - */ - isArrayLike(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.isArrayLike - */ - isArrayLike(): LoDashExplicitWrapper; - } - - //_.isArrayLikeObject - interface LoDashStatic { - /** - * This method is like `_.isArrayLike` except that it also checks if `value` - * is an object. - * - * @static - * @memberOf _ - * @type Function - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array-like object, else `false`. - * @example - * - * _.isArrayLikeObject([1, 2, 3]); - * // => true - * - * _.isArrayLikeObject(document.body.children); - * // => true - * - * _.isArrayLikeObject('abc'); - * // => false - * - * _.isArrayLikeObject(_.noop); - * // => false - */ - isArrayLikeObject(value?: any): value is T[]; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.isArrayLikeObject - */ - isArrayLikeObject(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.isArrayLikeObject - */ - isArrayLikeObject(): LoDashExplicitWrapper; - } - - //_.isBoolean - interface LoDashStatic { - /** - * Checks if value is classified as a boolean primitive or object. - * - * @param value The value to check. - * @return Returns true if value is correctly classified, else false. - */ - isBoolean(value?: any): value is boolean; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.isBoolean - */ - isBoolean(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.isBoolean - */ - isBoolean(): LoDashExplicitWrapper; - } - - //_.isBuffer - interface LoDashStatic { - /** - * Checks if value is a buffer. - * - * @param value The value to check. - * @return Returns true if value is a buffer, else false. - */ - isBuffer(value?: any): boolean; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.isBuffer - */ - isBuffer(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.isBuffer - */ - isBuffer(): LoDashExplicitWrapper; - } - - //_.isDate - interface LoDashStatic { - /** - * Checks if value is classified as a Date object. - * @param value The value to check. - * - * @return Returns true if value is correctly classified, else false. - */ - isDate(value?: any): value is Date; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.isDate - */ - isDate(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.isDate - */ - isDate(): LoDashExplicitWrapper; - } - - //_.isElement - interface LoDashStatic { - /** - * Checks if value is a DOM element. - * - * @param value The value to check. - * @return Returns true if value is a DOM element, else false. - */ - isElement(value?: any): boolean; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.isElement - */ - isElement(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.isElement - */ - isElement(): LoDashExplicitWrapper; - } - - //_.isEmpty - interface LoDashStatic { - /** - * Checks if value is empty. A value is considered empty unless it’s an arguments object, array, string, or - * jQuery-like collection with a length greater than 0 or an object with own enumerable properties. - * - * @param value The value to inspect. - * @return Returns true if value is empty, else false. - */ - isEmpty(value?: any): boolean; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.isEmpty - */ - isEmpty(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.isEmpty - */ - isEmpty(): LoDashExplicitWrapper; - } - - //_.isEqual - interface LoDashStatic { - /** - * Performs a deep comparison between two values to determine if they are - * equivalent. - * - * **Note:** This method supports comparing arrays, array buffers, booleans, - * date objects, error objects, maps, numbers, `Object` objects, regexes, - * sets, strings, symbols, and typed arrays. `Object` objects are compared - * by their own, not inherited, enumerable properties. Functions and DOM - * nodes are **not** supported. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - * @example - * - * var object = { 'user': 'fred' }; - * var other = { 'user': 'fred' }; - * - * _.isEqual(object, other); - * // => true - * - * object === other; - * // => false - */ - isEqual( - value: any, - other: any - ): boolean; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.isEqual - */ - isEqual( - other: any - ): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.isEqual - */ - isEqual( - other: any - ): LoDashExplicitWrapper; - } - - // _.isEqualWith - interface IsEqualCustomizer { - (value: any, other: any, indexOrKey?: number|string): boolean; - } - - interface LoDashStatic { - /** - * This method is like `_.isEqual` except that it accepts `customizer` which is - * invoked to compare values. If `customizer` returns `undefined` comparisons are - * handled by the method instead. The `customizer` is invoked with up to seven arguments: - * (objValue, othValue [, index|key, object, other, stack]). - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @param {Function} [customizer] The function to customize comparisons. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - * @example - * - * function isGreeting(value) { - * return /^h(?:i|ello)$/.test(value); - * } - * - * function customizer(objValue, othValue) { - * if (isGreeting(objValue) && isGreeting(othValue)) { - * return true; - * } - * } - * - * var array = ['hello', 'goodbye']; - * var other = ['hi', 'goodbye']; - * - * _.isEqualWith(array, other, customizer); - * // => true - */ - isEqualWith( - value: any, - other: any, - customizer: IsEqualCustomizer - ): boolean; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.isEqualWith - */ - isEqualWith( - other: any, - customizer: IsEqualCustomizer - ): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.isEqualWith - */ - isEqualWith( - other: any, - customizer: IsEqualCustomizer - ): LoDashExplicitWrapper; - } - - //_.isError - interface LoDashStatic { - /** - * Checks if value is an Error, EvalError, RangeError, ReferenceError, SyntaxError, TypeError, or URIError - * object. - * - * @param value The value to check. - * @return Returns true if value is an error object, else false. - */ - isError(value: any): value is Error; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.isError - */ - isError(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.isError - */ - isError(): LoDashExplicitWrapper; - } - - //_.isFinite - interface LoDashStatic { - /** - * Checks if value is a finite primitive number. - * - * Note: This method is based on Number.isFinite. - * - * @param value The value to check. - * @return Returns true if value is a finite number, else false. - */ - isFinite(value?: any): boolean; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.isFinite - */ - isFinite(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.isFinite - */ - isFinite(): LoDashExplicitWrapper; - } - - //_.isFunction - interface LoDashStatic { - /** - * Checks if value is classified as a Function object. - * - * @param value The value to check. - * @return Returns true if value is correctly classified, else false. - */ - isFunction(value?: any): value is Function; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.isFunction - */ - isFunction(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.isFunction - */ - isFunction(): LoDashExplicitWrapper; - } - - //_.isInteger - interface LoDashStatic { - /** - * Checks if `value` is an integer. - * - * **Note:** This method is based on [`Number.isInteger`](https://mdn.io/Number/isInteger). - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an integer, else `false`. - * @example - * - * _.isInteger(3); - * // => true - * - * _.isInteger(Number.MIN_VALUE); - * // => false - * - * _.isInteger(Infinity); - * // => false - * - * _.isInteger('3'); - * // => false - */ - isInteger(value?: any): boolean; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.isInteger - */ - isInteger(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.isInteger - */ - isInteger(): LoDashExplicitWrapper; - } - - //_.isLength - interface LoDashStatic { - /** - * Checks if `value` is a valid array-like length. - * - * **Note:** This function is loosely based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. - * @example - * - * _.isLength(3); - * // => true - * - * _.isLength(Number.MIN_VALUE); - * // => false - * - * _.isLength(Infinity); - * // => false - * - * _.isLength('3'); - * // => false - */ - isLength(value?: any): boolean; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.isLength - */ - isLength(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.isLength - */ - isLength(): LoDashExplicitWrapper; - } - - //_.isMap - interface LoDashStatic { - /** - * Checks if value is classified as a Map object. - * - * @param value The value to check. - * @returns Returns true if value is correctly classified, else false. - */ - isMap(value?: any): value is Map; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.isMap - */ - isMap(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.isMap - */ - isMap(): LoDashExplicitWrapper; - } - - //_.isMatch - interface isMatchCustomizer { - (value: any, other: any, indexOrKey?: number|string): boolean; - } - - interface LoDashStatic { - /** - * Performs a deep comparison between `object` and `source` to determine if - * `object` contains equivalent property values. - * - * **Note:** This method supports comparing the same values as `_.isEqual`. - * - * @static - * @memberOf _ - * @category Lang - * @param {Object} object The object to inspect. - * @param {Object} source The object of property values to match. - * @returns {boolean} Returns `true` if `object` is a match, else `false`. - * @example - * - * var object = { 'user': 'fred', 'age': 40 }; - * - * _.isMatch(object, { 'age': 40 }); - * // => true - * - * _.isMatch(object, { 'age': 36 }); - * // => false - */ - isMatch(object: Object, source: Object): boolean; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.isMatch - */ - isMatch(source: Object): boolean; - } - - //_.isMatchWith - interface isMatchWithCustomizer { - (value: any, other: any, indexOrKey?: number|string): boolean; - } - - interface LoDashStatic { - /** - * This method is like `_.isMatch` except that it accepts `customizer` which - * is invoked to compare values. If `customizer` returns `undefined` comparisons - * are handled by the method instead. The `customizer` is invoked with three - * arguments: (objValue, srcValue, index|key, object, source). - * - * @static - * @memberOf _ - * @category Lang - * @param {Object} object The object to inspect. - * @param {Object} source The object of property values to match. - * @param {Function} [customizer] The function to customize comparisons. - * @returns {boolean} Returns `true` if `object` is a match, else `false`. - * @example - * - * function isGreeting(value) { - * return /^h(?:i|ello)$/.test(value); - * } - * - * function customizer(objValue, srcValue) { - * if (isGreeting(objValue) && isGreeting(srcValue)) { - * return true; - * } - * } - * - * var object = { 'greeting': 'hello' }; - * var source = { 'greeting': 'hi' }; - * - * _.isMatchWith(object, source, customizer); - * // => true - */ - isMatchWith(object: Object, source: Object, customizer: isMatchWithCustomizer): boolean; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.isMatchWith - */ - isMatchWith(source: Object, customizer: isMatchWithCustomizer): boolean; - } - - //_.isNaN - interface LoDashStatic { - /** - * Checks if value is NaN. - * - * Note: This method is not the same as isNaN which returns true for undefined and other non-numeric values. - * - * @param value The value to check. - * @return Returns true if value is NaN, else false. - */ - isNaN(value?: any): boolean; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.isNaN - */ - isNaN(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.isNaN - */ - isNaN(): LoDashExplicitWrapper; - } - - //_.isNative - interface LoDashStatic { - /** - * Checks if value is a native function. - * @param value The value to check. - * - * @retrun Returns true if value is a native function, else false. - */ - isNative(value: any): value is Function; - } - - interface LoDashImplicitWrapperBase { - /** - * see _.isNative - */ - isNative(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * see _.isNative - */ - isNative(): LoDashExplicitWrapper; - } - - //_.isNil - interface LoDashStatic { - /** - * Checks if `value` is `null` or `undefined`. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is nullish, else `false`. - * @example - * - * _.isNil(null); - * // => true - * - * _.isNil(void 0); - * // => true - * - * _.isNil(NaN); - * // => false - */ - isNil(value?: any): boolean; - } - - interface LoDashImplicitWrapperBase { - /** - * see _.isNil - */ - isNil(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * see _.isNil - */ - isNil(): LoDashExplicitWrapper; - } - - //_.isNull - interface LoDashStatic { - /** - * Checks if value is null. - * - * @param value The value to check. - * @return Returns true if value is null, else false. - */ - isNull(value?: any): boolean; - } - - interface LoDashImplicitWrapperBase { - /** - * see _.isNull - */ - isNull(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * see _.isNull - */ - isNull(): LoDashExplicitWrapper; - } - - //_.isNumber - interface LoDashStatic { - /** - * Checks if value is classified as a Number primitive or object. - * - * Note: To exclude Infinity, -Infinity, and NaN, which are classified as numbers, use the _.isFinite method. - * - * @param value The value to check. - * @return Returns true if value is correctly classified, else false. - */ - isNumber(value?: any): value is number; - } - - interface LoDashImplicitWrapperBase { - /** - * see _.isNumber - */ - isNumber(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * see _.isNumber - */ - isNumber(): LoDashExplicitWrapper; - } - - //_.isObject - interface LoDashStatic { - /** - * Checks if value is the language type of Object. (e.g. arrays, functions, objects, regexes, new Number(0), - * and new String('')) - * - * @param value The value to check. - * @return Returns true if value is an object, else false. - */ - isObject(value?: any): boolean; - } - - interface LoDashImplicitWrapperBase { - /** - * see _.isObject - */ - isObject(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * see _.isObject - */ - isObject(): LoDashExplicitWrapper; - } - - //_.isObjectLike - interface LoDashStatic { - /** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ - isObjectLike(value?: any): boolean; - } - - interface LoDashImplicitWrapperBase { - /** - * see _.isObjectLike - */ - isObjectLike(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * see _.isObjectLike - */ - isObjectLike(): LoDashExplicitWrapper; - } - - //_.isPlainObject - interface LoDashStatic { - /** - * Checks if value is a plain object, that is, an object created by the Object constructor or one with a - * [[Prototype]] of null. - * - * Note: This method assumes objects created by the Object constructor have no inherited enumerable properties. - * - * @param value The value to check. - * @return Returns true if value is a plain object, else false. - */ - isPlainObject(value?: any): boolean; - } - - interface LoDashImplicitWrapperBase { - /** - * see _.isPlainObject - */ - isPlainObject(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * see _.isPlainObject - */ - isPlainObject(): LoDashExplicitWrapper; - } - - //_.isRegExp - interface LoDashStatic { - /** - * Checks if value is classified as a RegExp object. - * @param value The value to check. - * - * @return Returns true if value is correctly classified, else false. - */ - isRegExp(value?: any): value is RegExp; - } - - interface LoDashImplicitWrapperBase { - /** - * see _.isRegExp - */ - isRegExp(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * see _.isRegExp - */ - isRegExp(): LoDashExplicitWrapper; - } - - //_.isSafeInteger - interface LoDashStatic { - /** - * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754 - * double precision number which isn't the result of a rounded unsafe integer. - * - * **Note:** This method is based on [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger). - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`. - * @example - * - * _.isSafeInteger(3); - * // => true - * - * _.isSafeInteger(Number.MIN_VALUE); - * // => false - * - * _.isSafeInteger(Infinity); - * // => false - * - * _.isSafeInteger('3'); - * // => false - */ - isSafeInteger(value: any): boolean; - } - - interface LoDashImplicitWrapperBase { - /** - * see _.isSafeInteger - */ - isSafeInteger(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * see _.isSafeInteger - */ - isSafeInteger(): LoDashExplicitWrapper; - } - - //_.isSet - interface LoDashStatic { - /** - * Checks if value is classified as a Set object. - * - * @param value The value to check. - * @returns Returns true if value is correctly classified, else false. - */ - isSet(value?: any): value is Set; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.isSet - */ - isSet(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.isSet - */ - isSet(): LoDashExplicitWrapper; - } - - //_.isString - interface LoDashStatic { - /** - * Checks if value is classified as a String primitive or object. - * - * @param value The value to check. - * @return Returns true if value is correctly classified, else false. - */ - isString(value?: any): value is string; - } - - interface LoDashImplicitWrapperBase { - /** - * see _.isString - */ - isString(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * see _.isString - */ - isString(): LoDashExplicitWrapper; - } - - //_.isSymbol - interface LoDashStatic { - /** - * Checks if `value` is classified as a `Symbol` primitive or object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isSymbol(Symbol.iterator); - * // => true - * - * _.isSymbol('abc'); - * // => false - */ - isSymbol(value: any): boolean; - } - - interface LoDashImplicitWrapperBase { - /** - * see _.isSymbol - */ - isSymbol(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * see _.isSymbol - */ - isSymbol(): LoDashExplicitWrapper; - } - - //_.isTypedArray - interface LoDashStatic { - /** - * Checks if value is classified as a typed array. - * - * @param value The value to check. - * @return Returns true if value is correctly classified, else false. - */ - isTypedArray(value: any): boolean; - } - - interface LoDashImplicitWrapperBase { - /** - * see _.isTypedArray - */ - isTypedArray(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * see _.isTypedArray - */ - isTypedArray(): LoDashExplicitWrapper; - } - - //_.isUndefined - interface LoDashStatic { - /** - * Checks if value is undefined. - * - * @param value The value to check. - * @return Returns true if value is undefined, else false. - */ - isUndefined(value: any): boolean; - } - - interface LoDashImplicitWrapperBase { - /** - * see _.isUndefined - */ - isUndefined(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * see _.isUndefined - */ - isUndefined(): LoDashExplicitWrapper; - } - - //_.isWeakMap - interface LoDashStatic { - /** - * Checks if value is classified as a WeakMap object. - * - * @param value The value to check. - * @returns Returns true if value is correctly classified, else false. - */ - isWeakMap(value?: any): value is WeakMap; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.isSet - */ - isWeakMap(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.isSet - */ - isWeakMap(): LoDashExplicitWrapper; - } - - //_.isWeakSet - interface LoDashStatic { - /** - * Checks if value is classified as a WeakSet object. - * - * @param value The value to check. - * @returns Returns true if value is correctly classified, else false. - */ - isWeakSet(value?: any): value is WeakSet; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.isWeakSet - */ - isWeakSet(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.isWeakSet - */ - isWeakSet(): LoDashExplicitWrapper; - } - - //_.lt - interface LoDashStatic { - /** - * Checks if value is less than other. - * - * @param value The value to compare. - * @param other The other value to compare. - * @return Returns true if value is less than other, else false. - */ - lt( - value: any, - other: any - ): boolean; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.lt - */ - lt(other: any): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.lt - */ - lt(other: any): LoDashExplicitWrapper; - } - - //_.lte - interface LoDashStatic { - /** - * Checks if value is less than or equal to other. - * - * @param value The value to compare. - * @param other The other value to compare. - * @return Returns true if value is less than or equal to other, else false. - */ - lte( - value: any, - other: any - ): boolean; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.lte - */ - lte(other: any): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.lte - */ - lte(other: any): LoDashExplicitWrapper; - } - - //_.toArray - interface LoDashStatic { - /** - * Converts value to an array. - * - * @param value The value to convert. - * @return Returns the converted array. - */ - toArray(value: List|Dictionary|NumericDictionary): T[]; - - /** - * @see _.toArray - */ - toArray(value: TValue): TResult[]; - - /** - * @see _.toArray - */ - toArray(value?: any): TResult[]; - } - - interface LoDashImplicitWrapper { - /** - * @see _.toArray - */ - toArray(): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.toArray - */ - toArray(): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.toArray - */ - toArray(): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitWrapper { - /** - * @see _.toArray - */ - toArray(): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.toArray - */ - toArray(): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.toArray - */ - toArray(): LoDashExplicitArrayWrapper; - } - - //_.toPlainObject - interface LoDashStatic { - /** - * Converts value to a plain object flattening inherited enumerable properties of value to own properties - * of the plain object. - * - * @param value The value to convert. - * @return Returns the converted plain object. - */ - toPlainObject(value?: any): TResult; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.toPlainObject - */ - toPlainObject(): LoDashImplicitObjectWrapper; - } - - //_.toInteger - interface LoDashStatic { - /** - * Converts `value` to an integer. - * - * **Note:** This function is loosely based on [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger). - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted integer. - * @example - * - * _.toInteger(3); - * // => 3 - * - * _.toInteger(Number.MIN_VALUE); - * // => 0 - * - * _.toInteger(Infinity); - * // => 1.7976931348623157e+308 - * - * _.toInteger('3'); - * // => 3 - */ - toInteger(value: any): number; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.toInteger - */ - toInteger(): LoDashImplicitWrapper; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.toInteger - */ - toInteger(): LoDashExplicitWrapper; - } - - //_.toLength - interface LoDashStatic { - /** - * Converts `value` to an integer suitable for use as the length of an - * array-like object. - * - * **Note:** This method is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to convert. - * @return {number} Returns the converted integer. - * @example - * - * _.toLength(3); - * // => 3 - * - * _.toLength(Number.MIN_VALUE); - * // => 0 - * - * _.toLength(Infinity); - * // => 4294967295 - * - * _.toLength('3'); - * // => 3 - */ - toLength(value: any): number; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.toLength - */ - toLength(): LoDashImplicitWrapper; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.toLength - */ - toLength(): LoDashExplicitWrapper; - } - - //_.toNumber - interface LoDashStatic { - /** - * Converts `value` to a number. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to process. - * @returns {number} Returns the number. - * @example - * - * _.toNumber(3); - * // => 3 - * - * _.toNumber(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toNumber(Infinity); - * // => Infinity - * - * _.toNumber('3'); - * // => 3 - */ - toNumber(value: any): number; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.toNumber - */ - toNumber(): LoDashImplicitWrapper; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.toNumber - */ - toNumber(): LoDashExplicitWrapper; - } - - //_.toSafeInteger - interface LoDashStatic { - /** - * Converts `value` to a safe integer. A safe integer can be compared and - * represented correctly. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted integer. - * @example - * - * _.toSafeInteger(3); - * // => 3 - * - * _.toSafeInteger(Number.MIN_VALUE); - * // => 0 - * - * _.toSafeInteger(Infinity); - * // => 9007199254740991 - * - * _.toSafeInteger('3'); - * // => 3 - */ - toSafeInteger(value: any): number; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.toSafeInteger - */ - toSafeInteger(): LoDashImplicitWrapper; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.toSafeInteger - */ - toSafeInteger(): LoDashExplicitWrapper; - } - - //_.toString DUMMY - interface LoDashStatic { - /** - * Converts `value` to a string if it's not one. An empty string is returned - * for `null` and `undefined` values. The sign of `-0` is preserved. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to process. - * @returns {string} Returns the string. - * @example - * - * _.toString(null); - * // => '' - * - * _.toString(-0); - * // => '-0' - * - * _.toString([1, 2, 3]); - * // => '1,2,3' - */ - toString(value: any): string; - } - - /******** - * Math * - ********/ - - //_.add - interface LoDashStatic { - /** - * Adds two numbers. - * - * @param augend The first number to add. - * @param addend The second number to add. - * @return Returns the sum. - */ - add( - augend: number, - addend: number - ): number; - } - - interface LoDashImplicitWrapper { - /** - * @see _.add - */ - add(addend: number): number; - } - - interface LoDashExplicitWrapper { - /** - * @see _.add - */ - add(addend: number): LoDashExplicitWrapper; - } - - //_.ceil - interface LoDashStatic { - /** - * Calculates n rounded up to precision. - * - * @param n The number to round up. - * @param precision The precision to round up to. - * @return Returns the rounded up number. - */ - ceil( - n: number, - precision?: number - ): number; - } - - interface LoDashImplicitWrapper { - /** - * @see _.ceil - */ - ceil(precision?: number): number; - } - - interface LoDashExplicitWrapper { - /** - * @see _.ceil - */ - ceil(precision?: number): LoDashExplicitWrapper; - } - - //_.floor - interface LoDashStatic { - /** - * Calculates n rounded down to precision. - * - * @param n The number to round down. - * @param precision The precision to round down to. - * @return Returns the rounded down number. - */ - floor( - n: number, - precision?: number - ): number; - } - - interface LoDashImplicitWrapper { - /** - * @see _.floor - */ - floor(precision?: number): number; - } - - interface LoDashExplicitWrapper { - /** - * @see _.floor - */ - floor(precision?: number): LoDashExplicitWrapper; - } - - //_.max - interface LoDashStatic { - /** - * Computes the maximum value of `array`. If `array` is empty or falsey - * `undefined` is returned. - * - * @static - * @memberOf _ - * @category Math - * @param {Array} array The array to iterate over. - * @returns {*} Returns the maximum value. - */ - max( - collection: List - ): T; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.max - */ - max(): T; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.max - */ - max(): T; - } - - //_.maxBy - interface LoDashStatic { - /** - * This method is like `_.max` except that it accepts `iteratee` which is - * invoked for each element in `array` to generate the criterion by which - * the value is ranked. The iteratee is invoked with one argument: (value). - * - * @static - * @memberOf _ - * @category Math - * @param {Array} array The array to iterate over. - * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element. - * @returns {*} Returns the maximum value. - * @example - * - * var objects = [{ 'n': 1 }, { 'n': 2 }]; - * - * _.maxBy(objects, function(o) { return o.a; }); - * // => { 'n': 2 } - * - * // using the `_.property` iteratee shorthand - * _.maxBy(objects, 'n'); - * // => { 'n': 2 } - */ - maxBy( - collection: List, - iteratee?: ListIterator - ): T; - - /** - * @see _.maxBy - */ - maxBy( - collection: Dictionary, - iteratee?: DictionaryIterator - ): T; - - /** - * @see _.maxBy - */ - maxBy( - collection: List|Dictionary, - iteratee?: string - ): T; - - /** - * @see _.maxBy - */ - maxBy( - collection: List|Dictionary, - whereValue?: TObject - ): T; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.maxBy - */ - maxBy( - iteratee?: ListIterator - ): T; - - /** - * @see _.maxBy - */ - maxBy( - iteratee?: string - ): T; - - /** - * @see _.maxBy - */ - maxBy( - whereValue?: TObject - ): T; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.maxBy - */ - maxBy( - iteratee?: ListIterator|DictionaryIterator - ): T; - - /** - * @see _.maxBy - */ - maxBy( - iteratee?: string - ): T; - - /** - * @see _.maxBy - */ - maxBy( - whereValue?: TObject - ): T; - } - - //_.mean - interface LoDashStatic { - /** - * Computes the mean of the values in `array`. - * - * @static - * @memberOf _ - * @category Math - * @param {Array} array The array to iterate over. - * @returns {number} Returns the mean. - * @example - * - * _.mean([4, 2, 8, 6]); - * // => 5 - */ - mean( - collection: List - ): number; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.mean - */ - mean(): number; - - /** - * @see _.mean - */ - mean(): number; - } - - //_.min - interface LoDashStatic { - /** - * Computes the minimum value of `array`. If `array` is empty or falsey - * `undefined` is returned. - * - * @static - * @memberOf _ - * @category Math - * @param {Array} array The array to iterate over. - * @returns {*} Returns the minimum value. - */ - min( - collection: List - ): T; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.min - */ - min(): T; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.min - */ - min(): T; - } - - //_.minBy - interface LoDashStatic { - /** - * This method is like `_.min` except that it accepts `iteratee` which is - * invoked for each element in `array` to generate the criterion by which - * the value is ranked. The iteratee is invoked with one argument: (value). - * - * @static - * @memberOf _ - * @category Math - * @param {Array} array The array to iterate over. - * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element. - * @returns {*} Returns the minimum value. - * @example - * - * var objects = [{ 'n': 1 }, { 'n': 2 }]; - * - * _.minBy(objects, function(o) { return o.a; }); - * // => { 'n': 1 } - * - * // using the `_.property` iteratee shorthand - * _.minBy(objects, 'n'); - * // => { 'n': 1 } - */ - minBy( - collection: List, - iteratee?: ListIterator - ): T; - - /** - * @see _.minBy - */ - minBy( - collection: Dictionary, - iteratee?: DictionaryIterator - ): T; - - /** - * @see _.minBy - */ - minBy( - collection: List|Dictionary, - iteratee?: string - ): T; - - /** - * @see _.minBy - */ - minBy( - collection: List|Dictionary, - whereValue?: TObject - ): T; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.minBy - */ - minBy( - iteratee?: ListIterator - ): T; - - /** - * @see _.minBy - */ - minBy( - iteratee?: string - ): T; - - /** - * @see _.minBy - */ - minBy( - whereValue?: TObject - ): T; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.minBy - */ - minBy( - iteratee?: ListIterator|DictionaryIterator - ): T; - - /** - * @see _.minBy - */ - minBy( - iteratee?: string - ): T; - - /** - * @see _.minBy - */ - minBy( - whereValue?: TObject - ): T; - } - - //_.round - interface LoDashStatic { - /** - * Calculates n rounded to precision. - * - * @param n The number to round. - * @param precision The precision to round to. - * @return Returns the rounded number. - */ - round( - n: number, - precision?: number - ): number; - } - - interface LoDashImplicitWrapper { - /** - * @see _.round - */ - round(precision?: number): number; - } - - interface LoDashExplicitWrapper { - /** - * @see _.round - */ - round(precision?: number): LoDashExplicitWrapper; - } - - //_.sum - interface LoDashStatic { - /** - * Computes the sum of the values in `array`. - * - * @static - * @memberOf _ - * @category Math - * @param {Array} array The array to iterate over. - * @returns {number} Returns the sum. - * @example - * - * _.sum([4, 2, 8, 6]); - * // => 20 - */ - sum(collection: List): number; - - /** - * @see _.sum - */ - sum(collection: List|Dictionary): number; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.sum - */ - sum(): number; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.sum - **/ - sum(): number; - - /** - * @see _.sum - */ - sum(): number; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.sum - */ - sum(): LoDashExplicitWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.sum - */ - sum(): LoDashExplicitWrapper; - - /** - * @see _.sum - */ - sum(): LoDashExplicitWrapper; - } - - //_.sumBy - interface LoDashStatic { - /** - * This method is like `_.sum` except that it accepts `iteratee` which is - * invoked for each element in `array` to generate the value to be summed. - * The iteratee is invoked with one argument: (value). - * - * @static - * @memberOf _ - * @category Math - * @param {Array} array The array to iterate over. - * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element. - * @returns {number} Returns the sum. - * @example - * - * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }]; - * - * _.sumBy(objects, function(o) { return o.n; }); - * // => 20 - * - * // using the `_.property` iteratee shorthand - * _.sumBy(objects, 'n'); - * // => 20 - */ - sumBy( - collection: List, - iteratee: ListIterator - ): number; - - /** - * @see _.sumBy - */ - sumBy( - collection: List<{}>, - iteratee: string - ): number; - - /** - * @see _.sumBy - */ - sumBy( - collection: List - ): number; - - /** - * @see _.sumBy - */ - sumBy( - collection: List<{}>, - iteratee: Dictionary<{}> - ): number; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.sumBy - */ - sumBy( - iteratee: ListIterator - ): number; - - /** - * @see _.sumBy - */ - sumBy(iteratee: string): number; - - /** - * @see _.sumBy - */ - sumBy(iteratee: Dictionary<{}>): number; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.sumBy - */ - sumBy( - iteratee: ListIterator<{}, number> - ): number; - - /** - * @see _.sumBy - */ - sumBy(iteratee: string): number; - - /** - * @see _.sumBy - */ - sumBy(iteratee: Dictionary<{}>): number; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.sumBy - */ - sumBy( - iteratee: ListIterator - ): LoDashExplicitWrapper; - - /** - * @see _.sumBy - */ - sumBy(iteratee: string): LoDashExplicitWrapper; - - /** - * @see _.sumBy - */ - sumBy(): LoDashExplicitWrapper; - - /** - * @see _.sumBy - */ - sumBy(iteratee: Dictionary<{}>): LoDashExplicitWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.sumBy - */ - sumBy( - iteratee: ListIterator<{}, number> - ): LoDashExplicitWrapper; - - /** - * @see _.sumBy - */ - sumBy(iteratee: string): LoDashExplicitWrapper; - - /** - * @see _.sumBy - */ - sumBy(iteratee: Dictionary<{}>): LoDashExplicitWrapper; - } - - /********** - * Number * - **********/ - - //_.subtract - interface LoDashStatic { - /** - * Subtract two numbers. - * - * @static - * @memberOf _ - * @category Math - * @param {number} minuend The first number in a subtraction. - * @param {number} subtrahend The second number in a subtraction. - * @returns {number} Returns the difference. - * @example - * - * _.subtract(6, 4); - * // => 2 - */ - subtract( - minuend: number, - subtrahend: number - ): number; - } - - interface LoDashImplicitWrapper { - /** - * @see _.subtract - */ - subtract( - subtrahend: number - ): number; - } - - interface LoDashExplicitWrapper { - /** - * @see _.subtract - */ - subtract( - subtrahend: number - ): LoDashExplicitWrapper; - } - - //_.clamp - interface LoDashStatic { - /** - * Clamps `number` within the inclusive `lower` and `upper` bounds. - * - * @static - * @memberOf _ - * @category Number - * @param {number} number The number to clamp. - * @param {number} [lower] The lower bound. - * @param {number} upper The upper bound. - * @returns {number} Returns the clamped number. - * @example - * - * _.clamp(-10, -5, 5); - * // => -5 - * - * _.clamp(10, -5, 5); - * // => 5 - */ - clamp( - number: number, - lower: number, - upper: number - ): number; - } - - interface LoDashImplicitWrapper { - /** - * @see _.clamp - */ - clamp( - lower: number, - upper: number - ): number; - } - - interface LoDashExplicitWrapper { - /** - * @see _.clamp - */ - clamp( - lower: number, - upper: number - ): LoDashExplicitWrapper; - } - - //_.inRange - interface LoDashStatic { - /** - * Checks if n is between start and up to but not including, end. If end is not specified it’s set to start - * with start then set to 0. - * - * @param n The number to check. - * @param start The start of the range. - * @param end The end of the range. - * @return Returns true if n is in the range, else false. - */ - inRange( - n: number, - start: number, - end: number - ): boolean; - - - /** - * @see _.inRange - */ - inRange( - n: number, - end: number - ): boolean; - } - - interface LoDashImplicitWrapper { - /** - * @see _.inRange - */ - inRange( - start: number, - end: number - ): boolean; - - /** - * @see _.inRange - */ - inRange(end: number): boolean; - } - - interface LoDashExplicitWrapper { - /** - * @see _.inRange - */ - inRange( - start: number, - end: number - ): LoDashExplicitWrapper; - - /** - * @see _.inRange - */ - inRange(end: number): LoDashExplicitWrapper; - } - - //_.random - interface LoDashStatic { - /** - * Produces a random number between min and max (inclusive). If only one argument is provided a number between - * 0 and the given number is returned. If floating is true, or either min or max are floats, a floating-point - * number is returned instead of an integer. - * - * @param min The minimum possible value. - * @param max The maximum possible value. - * @param floating Specify returning a floating-point number. - * @return Returns the random number. - */ - random( - min?: number, - max?: number, - floating?: boolean - ): number; - - /** - * @see _.random - */ - random( - min?: number, - floating?: boolean - ): number; - - /** - * @see _.random - */ - random(floating?: boolean): number; - } - - interface LoDashImplicitWrapper { - /** - * @see _.random - */ - random( - max?: number, - floating?: boolean - ): number; - - /** - * @see _.random - */ - random(floating?: boolean): number; - } - - interface LoDashExplicitWrapper { - /** - * @see _.random - */ - random( - max?: number, - floating?: boolean - ): LoDashExplicitWrapper; - - /** - * @see _.random - */ - random(floating?: boolean): LoDashExplicitWrapper; - } - - /********** - * Object * - **********/ - - //_.assign - interface LoDashStatic { - /** - * Assigns own enumerable properties of source objects to the destination - * object. Source objects are applied from left to right. Subsequent sources - * overwrite property assignments of previous sources. - * - * **Note:** This method mutates `object` and is loosely based on - * [`Object.assign`](https://mdn.io/Object/assign). - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @example - * - * function Foo() { - * this.c = 3; - * } - * - * function Bar() { - * this.e = 5; - * } - * - * Foo.prototype.d = 4; - * Bar.prototype.f = 6; - * - * _.assign({ 'a': 1 }, new Foo, new Bar); - * // => { 'a': 1, 'c': 3, 'e': 5 } - */ - assign( - object: TObject, - source: TSource - ): TObject & TSource; - - /** - * @see assign - */ - assign( - object: TObject, - source1: TSource1, - source2: TSource2 - ): TObject & TSource1 & TSource2; - - /** - * @see assign - */ - assign( - object: TObject, - source1: TSource1, - source2: TSource2, - source3: TSource3 - ): TObject & TSource1 & TSource2 & TSource3; - - /** - * @see assign - */ - assign( - object: TObject, - source1: TSource1, - source2: TSource2, - source3: TSource3, - source4: TSource4 - ): TObject & TSource1 & TSource2 & TSource3 & TSource4; - - /** - * @see _.assign - */ - assign(object: TObject): TObject; - - /** - * @see _.assign - */ - assign( - object: any, - ...otherArgs: any[] - ): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.assign - */ - assign( - source: TSource - ): LoDashImplicitObjectWrapper; - - /** - * @see assign - */ - assign( - source1: TSource1, - source2: TSource2 - ): LoDashImplicitObjectWrapper; - - /** - * @see assign - */ - assign( - source1: TSource1, - source2: TSource2, - source3: TSource3 - ): LoDashImplicitObjectWrapper; - - /** - * @see assign - */ - assign( - source1: TSource1, - source2: TSource2, - source3: TSource3, - source4: TSource4 - ): LoDashImplicitObjectWrapper; - - /** - * @see _.assign - */ - assign(): LoDashImplicitObjectWrapper; - - /** - * @see _.assign - */ - assign(...otherArgs: any[]): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.assign - */ - assign( - source: TSource - ): LoDashExplicitObjectWrapper; - - /** - * @see assign - */ - assign( - source1: TSource1, - source2: TSource2 - ): LoDashExplicitObjectWrapper; - - /** - * @see assign - */ - assign( - source1: TSource1, - source2: TSource2, - source3: TSource3 - ): LoDashExplicitObjectWrapper; - - /** - * @see assign - */ - assign( - source1: TSource1, - source2: TSource2, - source3: TSource3, - source4: TSource4 - ): LoDashExplicitObjectWrapper; - - /** - * @see _.assign - */ - assign(): LoDashExplicitObjectWrapper; - - /** - * @see _.assign - */ - assign(...otherArgs: any[]): LoDashExplicitObjectWrapper; - } - - //_.assignWith - interface AssignCustomizer { - (objectValue: any, sourceValue: any, key?: string, object?: {}, source?: {}): any; - } - - interface LoDashStatic { - /** - * This method is like `_.assign` except that it accepts `customizer` which - * is invoked to produce the assigned values. If `customizer` returns `undefined` - * assignment is handled by the method instead. The `customizer` is invoked - * with five arguments: (objValue, srcValue, key, object, source). - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The destination object. - * @param {...Object} sources The source objects. - * @param {Function} [customizer] The function to customize assigned values. - * @returns {Object} Returns `object`. - * @example - * - * function customizer(objValue, srcValue) { - * return _.isUndefined(objValue) ? srcValue : objValue; - * } - * - * var defaults = _.partialRight(_.assignWith, customizer); - * - * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); - * // => { 'a': 1, 'b': 2 } - */ - assignWith( - object: TObject, - source: TSource, - customizer: AssignCustomizer - ): TObject & TSource; - - /** - * @see assignWith - */ - assignWith( - object: TObject, - source1: TSource1, - source2: TSource2, - customizer: AssignCustomizer - ): TObject & TSource1 & TSource2; - - /** - * @see assignWith - */ - assignWith( - object: TObject, - source1: TSource1, - source2: TSource2, - source3: TSource3, - customizer: AssignCustomizer - ): TObject & TSource1 & TSource2 & TSource3; - - /** - * @see assignWith - */ - assignWith( - object: TObject, - source1: TSource1, - source2: TSource2, - source3: TSource3, - source4: TSource4, - customizer: AssignCustomizer - ): TObject & TSource1 & TSource2 & TSource3 & TSource4; - - /** - * @see _.assignWith - */ - assignWith(object: TObject): TObject; - - /** - * @see _.assignWith - */ - assignWith( - object: any, - ...otherArgs: any[] - ): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.assignWith - */ - assignWith( - source: TSource, - customizer: AssignCustomizer - ): LoDashImplicitObjectWrapper; - - /** - * @see assignWith - */ - assignWith( - source1: TSource1, - source2: TSource2, - customizer: AssignCustomizer - ): LoDashImplicitObjectWrapper; - - /** - * @see assignWith - */ - assignWith( - source1: TSource1, - source2: TSource2, - source3: TSource3, - customizer: AssignCustomizer - ): LoDashImplicitObjectWrapper; - - /** - * @see assignWith - */ - assignWith( - source1: TSource1, - source2: TSource2, - source3: TSource3, - source4: TSource4, - customizer: AssignCustomizer - ): LoDashImplicitObjectWrapper; - - /** - * @see _.assignWith - */ - assignWith(): LoDashImplicitObjectWrapper; - - /** - * @see _.assignWith - */ - assignWith(...otherArgs: any[]): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.assignWith - */ - assignWith( - source: TSource, - customizer: AssignCustomizer - ): LoDashExplicitObjectWrapper; - - /** - * @see assignWith - */ - assignWith( - source1: TSource1, - source2: TSource2, - customizer: AssignCustomizer - ): LoDashExplicitObjectWrapper; - - /** - * @see assignWith - */ - assignWith( - source1: TSource1, - source2: TSource2, - source3: TSource3, - customizer: AssignCustomizer - ): LoDashExplicitObjectWrapper; - - /** - * @see assignWith - */ - assignWith( - source1: TSource1, - source2: TSource2, - source3: TSource3, - source4: TSource4, - customizer: AssignCustomizer - ): LoDashExplicitObjectWrapper; - - /** - * @see _.assignWith - */ - assignWith(): LoDashExplicitObjectWrapper; - - /** - * @see _.assignWith - */ - assignWith(...otherArgs: any[]): LoDashExplicitObjectWrapper; - } - - //_.assignIn - interface LoDashStatic { - /** - * This method is like `_.assign` except that it iterates over own and - * inherited source properties. - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @alias extend - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @example - * - * function Foo() { - * this.b = 2; - * } - * - * function Bar() { - * this.d = 4; - * } - * - * Foo.prototype.c = 3; - * Bar.prototype.e = 5; - * - * _.assignIn({ 'a': 1 }, new Foo, new Bar); - * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5 } - */ - assignIn( - object: TObject, - source: TSource - ): TObject & TSource; - - /** - * @see assignIn - */ - assignIn( - object: TObject, - source1: TSource1, - source2: TSource2 - ): TObject & TSource1 & TSource2; - - /** - * @see assignIn - */ - assignIn( - object: TObject, - source1: TSource1, - source2: TSource2, - source3: TSource3 - ): TObject & TSource1 & TSource2 & TSource3; - - /** - * @see assignIn - */ - assignIn( - object: TObject, - source1: TSource1, - source2: TSource2, - source3: TSource3, - source4: TSource4 - ): TObject & TSource1 & TSource2 & TSource3 & TSource4; - - /** - * @see _.assignIn - */ - assignIn(object: TObject): TObject; - - /** - * @see _.assignIn - */ - assignIn( - object: any, - ...otherArgs: any[] - ): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.assignIn - */ - assignIn( - source: TSource - ): LoDashImplicitObjectWrapper; - - /** - * @see assignIn - */ - assignIn( - source1: TSource1, - source2: TSource2 - ): LoDashImplicitObjectWrapper; - - /** - * @see assignIn - */ - assignIn( - source1: TSource1, - source2: TSource2, - source3: TSource3 - ): LoDashImplicitObjectWrapper; - - /** - * @see assignIn - */ - assignIn( - source1: TSource1, - source2: TSource2, - source3: TSource3, - source4: TSource4 - ): LoDashImplicitObjectWrapper; - - /** - * @see _.assignIn - */ - assignIn(): LoDashImplicitObjectWrapper; - - /** - * @see _.assignIn - */ - assignIn(...otherArgs: any[]): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.assignIn - */ - assignIn( - source: TSource - ): LoDashExplicitObjectWrapper; - - /** - * @see assignIn - */ - assignIn( - source1: TSource1, - source2: TSource2 - ): LoDashExplicitObjectWrapper; - - /** - * @see assignIn - */ - assignIn( - source1: TSource1, - source2: TSource2, - source3: TSource3 - ): LoDashExplicitObjectWrapper; - - /** - * @see assignIn - */ - assignIn( - source1: TSource1, - source2: TSource2, - source3: TSource3, - source4: TSource4 - ): LoDashExplicitObjectWrapper; - - /** - * @see _.assignIn - */ - assignIn(): LoDashExplicitObjectWrapper; - - /** - * @see _.assignIn - */ - assignIn(...otherArgs: any[]): LoDashExplicitObjectWrapper; - } - - //_.assignInWith - interface AssignCustomizer { - (objectValue: any, sourceValue: any, key?: string, object?: {}, source?: {}): any; - } - - interface LoDashStatic { - /** - * This method is like `_.assignIn` except that it accepts `customizer` which - * is invoked to produce the assigned values. If `customizer` returns `undefined` - * assignment is handled by the method instead. The `customizer` is invoked - * with five arguments: (objValue, srcValue, key, object, source). - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @alias extendWith - * @category Object - * @param {Object} object The destination object. - * @param {...Object} sources The source objects. - * @param {Function} [customizer] The function to customize assigned values. - * @returns {Object} Returns `object`. - * @example - * - * function customizer(objValue, srcValue) { - * return _.isUndefined(objValue) ? srcValue : objValue; - * } - * - * var defaults = _.partialRight(_.assignInWith, customizer); - * - * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); - * // => { 'a': 1, 'b': 2 } - */ - assignInWith( - object: TObject, - source: TSource, - customizer: AssignCustomizer - ): TObject & TSource; - - /** - * @see assignInWith - */ - assignInWith( - object: TObject, - source1: TSource1, - source2: TSource2, - customizer: AssignCustomizer - ): TObject & TSource1 & TSource2; - - /** - * @see assignInWith - */ - assignInWith( - object: TObject, - source1: TSource1, - source2: TSource2, - source3: TSource3, - customizer: AssignCustomizer - ): TObject & TSource1 & TSource2 & TSource3; - - /** - * @see assignInWith - */ - assignInWith( - object: TObject, - source1: TSource1, - source2: TSource2, - source3: TSource3, - source4: TSource4, - customizer: AssignCustomizer - ): TObject & TSource1 & TSource2 & TSource3 & TSource4; - - /** - * @see _.assignInWith - */ - assignInWith(object: TObject): TObject; - - /** - * @see _.assignInWith - */ - assignInWith( - object: any, - ...otherArgs: any[] - ): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.assignInWith - */ - assignInWith( - source: TSource, - customizer: AssignCustomizer - ): LoDashImplicitObjectWrapper; - - /** - * @see assignInWith - */ - assignInWith( - source1: TSource1, - source2: TSource2, - customizer: AssignCustomizer - ): LoDashImplicitObjectWrapper; - - /** - * @see assignInWith - */ - assignInWith( - source1: TSource1, - source2: TSource2, - source3: TSource3, - customizer: AssignCustomizer - ): LoDashImplicitObjectWrapper; - - /** - * @see assignInWith - */ - assignInWith( - source1: TSource1, - source2: TSource2, - source3: TSource3, - source4: TSource4, - customizer: AssignCustomizer - ): LoDashImplicitObjectWrapper; - - /** - * @see _.assignInWith - */ - assignInWith(): LoDashImplicitObjectWrapper; - - /** - * @see _.assignInWith - */ - assignInWith(...otherArgs: any[]): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.assignInWith - */ - assignInWith( - source: TSource, - customizer: AssignCustomizer - ): LoDashExplicitObjectWrapper; - - /** - * @see assignInWith - */ - assignInWith( - source1: TSource1, - source2: TSource2, - customizer: AssignCustomizer - ): LoDashExplicitObjectWrapper; - - /** - * @see assignInWith - */ - assignInWith( - source1: TSource1, - source2: TSource2, - source3: TSource3, - customizer: AssignCustomizer - ): LoDashExplicitObjectWrapper; - - /** - * @see assignInWith - */ - assignInWith( - source1: TSource1, - source2: TSource2, - source3: TSource3, - source4: TSource4, - customizer: AssignCustomizer - ): LoDashExplicitObjectWrapper; - - /** - * @see _.assignInWith - */ - assignInWith(): LoDashExplicitObjectWrapper; - - /** - * @see _.assignInWith - */ - assignInWith(...otherArgs: any[]): LoDashExplicitObjectWrapper; - } - - //_.create - interface LoDashStatic { - /** - * Creates an object that inherits from the given prototype object. If a properties object is provided its own - * enumerable properties are assigned to the created object. - * - * @param prototype The object to inherit from. - * @param properties The properties to assign to the object. - * @return Returns the new object. - */ - create( - prototype: T, - properties?: U - ): T & U; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.create - */ - create(properties?: U): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.create - */ - create(properties?: U): LoDashExplicitObjectWrapper; - } - - - //_.defaults - interface LoDashStatic { - /** - * Assigns own enumerable properties of source object(s) to the destination object for all destination - * properties that resolve to undefined. Once a property is set, additional values of the same property are - * ignored. - * - * Note: This method mutates object. - * - * @param object The destination object. - * @param sources The source objects. - * @return The destination object. - */ - defaults( - object: TObject, - source: TSource - ): TSource & TObject; - - /** - * @see _.defaults - */ - defaults( - object: TObject, - source1: TSource1, - source2: TSource2 - ): TSource2 & TSource1 & TObject; - - /** - * @see _.defaults - */ - defaults( - object: TObject, - source1: TSource1, - source2: TSource2, - source3: TSource3 - ): TSource3 & TSource2 & TSource1 & TObject; - - /** - * @see _.defaults - */ - defaults( - object: TObject, - source1: TSource1, - source2: TSource2, - source3: TSource3, - source4: TSource4 - ): TSource4 & TSource3 & TSource2 & TSource1 & TObject; - - /** - * @see _.defaults - */ - defaults(object: TObject): TObject; - - /** - * @see _.defaults - */ - defaults( - object: any, - ...sources: any[] - ): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.defaults - */ - defaults( - source: TSource - ): LoDashImplicitObjectWrapper; - - /** - * @see _.defaults - */ - defaults( - source1: TSource1, - source2: TSource2 - ): LoDashImplicitObjectWrapper; - - /** - * @see _.defaults - */ - defaults( - source1: TSource1, - source2: TSource2, - source3: TSource3 - ): LoDashImplicitObjectWrapper; - - /** - * @see _.defaults - */ - defaults( - source1: TSource1, - source2: TSource2, - source3: TSource3, - source4: TSource4 - ): LoDashImplicitObjectWrapper; - - /** - * @see _.defaults - */ - defaults(): LoDashImplicitObjectWrapper; - - /** - * @see _.defaults - */ - defaults(...sources: any[]): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.defaults - */ - defaults( - source: TSource - ): LoDashExplicitObjectWrapper; - - /** - * @see _.defaults - */ - defaults( - source1: TSource1, - source2: TSource2 - ): LoDashExplicitObjectWrapper; - - /** - * @see _.defaults - */ - defaults( - source1: TSource1, - source2: TSource2, - source3: TSource3 - ): LoDashExplicitObjectWrapper; - - /** - * @see _.defaults - */ - defaults( - source1: TSource1, - source2: TSource2, - source3: TSource3, - source4: TSource4 - ): LoDashExplicitObjectWrapper; - - /** - * @see _.defaults - */ - defaults(): LoDashExplicitObjectWrapper; - - /** - * @see _.defaults - */ - defaults(...sources: any[]): LoDashExplicitObjectWrapper; - } - - //_.defaultsDeep - interface LoDashStatic { - /** - * This method is like _.defaults except that it recursively assigns default properties. - * @param object The destination object. - * @param sources The source objects. - * @return Returns object. - **/ - defaultsDeep( - object: T, - ...sources: any[]): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.defaultsDeep - **/ - defaultsDeep(...sources: any[]): LoDashImplicitObjectWrapper - } - - // _.extend - interface LoDashStatic { - /** - * @see _.assignIn - */ - extend( - object: TObject, - source: TSource - ): TObject & TSource; - - /** - * @see _.assignIn - */ - extend( - object: TObject, - source1: TSource1, - source2: TSource2 - ): TObject & TSource1 & TSource2; - - /** - * @see _.assignIn - */ - extend( - object: TObject, - source1: TSource1, - source2: TSource2, - source3: TSource3 - ): TObject & TSource1 & TSource2 & TSource3; - - /** - * @see _.assignIn - */ - extend( - object: TObject, - source1: TSource1, - source2: TSource2, - source3: TSource3, - source4: TSource4 - ): TObject & TSource1 & TSource2 & TSource3 & TSource4; - - /** - * @see _.assignIn - */ - extend(object: TObject): TObject; - - /** - * @see _.assignIn - */ - extend( - object: any, - ...otherArgs: any[] - ): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.assignIn - */ - extend( - source: TSource - ): LoDashImplicitObjectWrapper; - - /** - * @see _.assignIn - */ - extend( - source1: TSource1, - source2: TSource2 - ): LoDashImplicitObjectWrapper; - - /** - * @see _.assignIn - */ - extend( - source1: TSource1, - source2: TSource2, - source3: TSource3 - ): LoDashImplicitObjectWrapper; - - /** - * @see _.assignIn - */ - extend( - source1: TSource1, - source2: TSource2, - source3: TSource3, - source4: TSource4 - ): LoDashImplicitObjectWrapper; - - /** - * @see _.assignIn - */ - extend(): LoDashImplicitObjectWrapper; - - /** - * @see _.assignIn - */ - extend(...otherArgs: any[]): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.assignIn - */ - extend( - source: TSource - ): LoDashExplicitObjectWrapper; - - /** - * @see _.assignIn - */ - extend( - source1: TSource1, - source2: TSource2 - ): LoDashExplicitObjectWrapper; - - /** - * @see _.assignIn - */ - extend( - source1: TSource1, - source2: TSource2, - source3: TSource3 - ): LoDashExplicitObjectWrapper; - - /** - * @see _.assignIn - */ - extend( - source1: TSource1, - source2: TSource2, - source3: TSource3, - source4: TSource4 - ): LoDashExplicitObjectWrapper; - - /** - * @see _.assignIn - */ - extend(): LoDashExplicitObjectWrapper; - - /** - * @see _.assignIn - */ - extend(...otherArgs: any[]): LoDashExplicitObjectWrapper; - } - - interface LoDashStatic { - /** - * @see _.assignInWith - */ - extendWith( - object: TObject, - source: TSource, - customizer: AssignCustomizer - ): TObject & TSource; - - /** - * @see _.assignInWith - */ - extendWith( - object: TObject, - source1: TSource1, - source2: TSource2, - customizer: AssignCustomizer - ): TObject & TSource1 & TSource2; - - /** - * @see _.assignInWith - */ - extendWith( - object: TObject, - source1: TSource1, - source2: TSource2, - source3: TSource3, - customizer: AssignCustomizer - ): TObject & TSource1 & TSource2 & TSource3; - - /** - * @see _.assignInWith - */ - extendWith( - object: TObject, - source1: TSource1, - source2: TSource2, - source3: TSource3, - source4: TSource4, - customizer: AssignCustomizer - ): TObject & TSource1 & TSource2 & TSource3 & TSource4; - - /** - * @see _.assignInWith - */ - extendWith(object: TObject): TObject; - - /** - * @see _.assignInWith - */ - extendWith( - object: any, - ...otherArgs: any[] - ): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.assignInWith - */ - extendWith( - source: TSource, - customizer: AssignCustomizer - ): LoDashImplicitObjectWrapper; - - /** - * @see _.assignInWith - */ - extendWith( - source1: TSource1, - source2: TSource2, - customizer: AssignCustomizer - ): LoDashImplicitObjectWrapper; - - /** - * @see _.assignInWith - */ - extendWith( - source1: TSource1, - source2: TSource2, - source3: TSource3, - customizer: AssignCustomizer - ): LoDashImplicitObjectWrapper; - - /** - * @see _.assignInWith - */ - extendWith( - source1: TSource1, - source2: TSource2, - source3: TSource3, - source4: TSource4, - customizer: AssignCustomizer - ): LoDashImplicitObjectWrapper; - - /** - * @see _.assignInWith - */ - extendWith(): LoDashImplicitObjectWrapper; - - /** - * @see _.assignInWith - */ - extendWith(...otherArgs: any[]): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.assignInWith - */ - extendWith( - source: TSource, - customizer: AssignCustomizer - ): LoDashExplicitObjectWrapper; - - /** - * @see _.assignInWith - */ - extendWith( - source1: TSource1, - source2: TSource2, - customizer: AssignCustomizer - ): LoDashExplicitObjectWrapper; - - /** - * @see _.assignInWith - */ - extendWith( - source1: TSource1, - source2: TSource2, - source3: TSource3, - customizer: AssignCustomizer - ): LoDashExplicitObjectWrapper; - - /** - * @see _.assignInWith - */ - extendWith( - source1: TSource1, - source2: TSource2, - source3: TSource3, - source4: TSource4, - customizer: AssignCustomizer - ): LoDashExplicitObjectWrapper; - - /** - * @see _.assignInWith - */ - extendWith(): LoDashExplicitObjectWrapper; - - /** - * @see _.assignInWith - */ - extendWith(...otherArgs: any[]): LoDashExplicitObjectWrapper; - } - - //_.findKey - interface LoDashStatic { - /** - * This method is like _.find except that it returns the key of the first element predicate returns truthy for - * instead of the element itself. - * - * If a property name is provided for predicate the created _.property style callback returns the property - * value of the given element. - * - * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for - * elements that have a matching property value, else false. - * - * If an object is provided for predicate the created _.matches style callback returns true for elements that - * have the properties of the given object, else false. - * - * @param object The object to search. - * @param predicate The function invoked per iteration. - * @param thisArg The this binding of predicate. - * @return Returns the key of the matched element, else undefined. - */ - findKey( - object: TObject, - predicate?: DictionaryIterator - ): string; - - /** - * @see _.findKey - */ - findKey( - object: TObject, - predicate?: ObjectIterator - ): string; - - /** - * @see _.findKey - */ - findKey( - object: TObject, - predicate?: string - ): string; - - /** - * @see _.findKey - */ - findKey, TObject>( - object: TObject, - predicate?: TWhere - ): string; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.findKey - */ - findKey( - predicate?: DictionaryIterator - ): string; - - /** - * @see _.findKey - */ - findKey( - predicate?: ObjectIterator - ): string; - - /** - * @see _.findKey - */ - findKey( - predicate?: string - ): string; - - /** - * @see _.findKey - */ - findKey>( - predicate?: TWhere - ): string; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.findKey - */ - findKey( - predicate?: DictionaryIterator - ): LoDashExplicitWrapper; - - /** - * @see _.findKey - */ - findKey( - predicate?: ObjectIterator - ): LoDashExplicitWrapper; - - /** - * @see _.findKey - */ - findKey( - predicate?: string - ): LoDashExplicitWrapper; - - /** - * @see _.findKey - */ - findKey>( - predicate?: TWhere - ): LoDashExplicitWrapper; - } - - //_.findLastKey - interface LoDashStatic { - /** - * This method is like _.findKey except that it iterates over elements of a collection in the opposite order. - * - * If a property name is provided for predicate the created _.property style callback returns the property - * value of the given element. - * - * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for - * elements that have a matching property value, else false. - * - * If an object is provided for predicate the created _.matches style callback returns true for elements that - * have the properties of the given object, else false. - * - * @param object The object to search. - * @param predicate The function invoked per iteration. - * @param thisArg The this binding of predicate. - * @return Returns the key of the matched element, else undefined. - */ - findLastKey( - object: TObject, - predicate?: DictionaryIterator - ): string; - - /** - * @see _.findLastKey - */ - findLastKey( - object: TObject, - predicate?: ObjectIterator - ): string; - - /** - * @see _.findLastKey - */ - findLastKey( - object: TObject, - predicate?: string - ): string; - - /** - * @see _.findLastKey - */ - findLastKey, TObject>( - object: TObject, - predicate?: TWhere - ): string; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.findLastKey - */ - findLastKey( - predicate?: DictionaryIterator - ): string; - - /** - * @see _.findLastKey - */ - findLastKey( - predicate?: ObjectIterator - ): string; - - /** - * @see _.findLastKey - */ - findLastKey( - predicate?: string - ): string; - - /** - * @see _.findLastKey - */ - findLastKey>( - predicate?: TWhere - ): string; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.findLastKey - */ - findLastKey( - predicate?: DictionaryIterator - ): LoDashExplicitWrapper; - - /** - * @see _.findLastKey - */ - findLastKey( - predicate?: ObjectIterator - ): LoDashExplicitWrapper; - - /** - * @see _.findLastKey - */ - findLastKey( - predicate?: string - ): LoDashExplicitWrapper; - - /** - * @see _.findLastKey - */ - findLastKey>( - predicate?: TWhere - ): LoDashExplicitWrapper; - } - - //_.forIn - interface LoDashStatic { - /** - * Iterates over own and inherited enumerable properties of an object invoking iteratee for each property. The - * iteratee is bound to thisArg and invoked with three arguments: (value, key, object). Iteratee functions may - * exit iteration early by explicitly returning false. - * - * @param object The object to iterate over. - * @param iteratee The function invoked per iteration. - * @param thisArg The this binding of iteratee. - * @return Returns object. - */ - forIn( - object: Dictionary, - iteratee?: DictionaryIterator - ): Dictionary; - - /** - * @see _.forIn - */ - forIn( - object: T, - iteratee?: ObjectIterator - ): T; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.forIn - */ - forIn( - iteratee?: DictionaryIterator - ): _.LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.forIn - */ - forIn( - iteratee?: DictionaryIterator - ): _.LoDashExplicitObjectWrapper; - } - - //_.forInRight - interface LoDashStatic { - /** - * This method is like _.forIn except that it iterates over properties of object in the opposite order. - * - * @param object The object to iterate over. - * @param iteratee The function invoked per iteration. - * @param thisArg The this binding of iteratee. - * @return Returns object. - */ - forInRight( - object: Dictionary, - iteratee?: DictionaryIterator - ): Dictionary; - - /** - * @see _.forInRight - */ - forInRight( - object: T, - iteratee?: ObjectIterator - ): T; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.forInRight - */ - forInRight( - iteratee?: DictionaryIterator - ): _.LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.forInRight - */ - forInRight( - iteratee?: DictionaryIterator - ): _.LoDashExplicitObjectWrapper; - } - - //_.forOwn - interface LoDashStatic { - /** - * Iterates over own enumerable properties of an object invoking iteratee for each property. The iteratee is - * bound to thisArg and invoked with three arguments: (value, key, object). Iteratee functions may exit - * iteration early by explicitly returning false. - * - * @param object The object to iterate over. - * @param iteratee The function invoked per iteration. - * @param thisArg The this binding of iteratee. - * @return Returns object. - */ - forOwn( - object: Dictionary, - iteratee?: DictionaryIterator - ): Dictionary; - - /** - * @see _.forOwn - */ - forOwn( - object: T, - iteratee?: ObjectIterator - ): T; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.forOwn - */ - forOwn( - iteratee?: DictionaryIterator - ): _.LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.forOwn - */ - forOwn( - iteratee?: DictionaryIterator - ): _.LoDashExplicitObjectWrapper; - } - - //_.forOwnRight - interface LoDashStatic { - /** - * This method is like _.forOwn except that it iterates over properties of object in the opposite order. - * - * @param object The object to iterate over. - * @param iteratee The function invoked per iteration. - * @param thisArg The this binding of iteratee. - * @return Returns object. - */ - forOwnRight( - object: Dictionary, - iteratee?: DictionaryIterator - ): Dictionary; - - /** - * @see _.forOwnRight - */ - forOwnRight( - object: T, - iteratee?: ObjectIterator - ): T; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.forOwnRight - */ - forOwnRight( - iteratee?: DictionaryIterator - ): _.LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.forOwnRight - */ - forOwnRight( - iteratee?: DictionaryIterator - ): _.LoDashExplicitObjectWrapper; - } - - //_.functions - interface LoDashStatic { - /** - * Creates an array of function property names from own enumerable properties - * of `object`. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to inspect. - * @returns {Array} Returns the new array of property names. - * @example - * - * function Foo() { - * this.a = _.constant('a'); - * this.b = _.constant('b'); - * } - * - * Foo.prototype.c = _.constant('c'); - * - * _.functions(new Foo); - * // => ['a', 'b'] - */ - functions(object: any): string[]; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.functions - */ - functions(): _.LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.functions - */ - functions(): _.LoDashExplicitArrayWrapper; - } - - //_.functionsIn - interface LoDashStatic { - /** - * Creates an array of function property names from own and inherited - * enumerable properties of `object`. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to inspect. - * @returns {Array} Returns the new array of property names. - * @example - * - * function Foo() { - * this.a = _.constant('a'); - * this.b = _.constant('b'); - * } - * - * Foo.prototype.c = _.constant('c'); - * - * _.functionsIn(new Foo); - * // => ['a', 'b', 'c'] - */ - functionsIn(object: any): string[]; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.functionsIn - */ - functionsIn(): _.LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.functionsIn - */ - functionsIn(): _.LoDashExplicitArrayWrapper; - } - - //_.get - interface LoDashStatic { - /** - * Gets the property value at path of object. If the resolved value is undefined the defaultValue is used - * in its place. - * - * @param object The object to query. - * @param path The path of the property to get. - * @param defaultValue The value returned if the resolved value is undefined. - * @return Returns the resolved value. - */ - get( - object: TObject, - path: StringRepresentable|StringRepresentable[], - defaultValue?: TResult - ): TResult; - - /** - * @see _.get - */ - get( - object: any, - path: StringRepresentable|StringRepresentable[], - defaultValue?: TResult - ): TResult; - } - - interface LoDashImplicitWrapper { - /** - * @see _.get - */ - get( - path: StringRepresentable|StringRepresentable[], - defaultValue?: TResult - ): TResult; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.get - */ - get( - path: StringRepresentable|StringRepresentable[], - defaultValue?: TResult - ): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.get - */ - get( - path: StringRepresentable|StringRepresentable[], - defaultValue?: TResult - ): TResult; - } - - interface LoDashExplicitWrapper { - /** - * @see _.get - */ - get( - path: StringRepresentable|StringRepresentable[], - defaultValue?: any - ): TResultWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.get - */ - get( - path: StringRepresentable|StringRepresentable[], - defaultValue?: any - ): TResultWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.get - */ - get( - path: StringRepresentable|StringRepresentable[], - defaultValue?: any - ): TResultWrapper; - } - - //_.has - interface LoDashStatic { - /** - * Checks if `path` is a direct property of `object`. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @returns {boolean} Returns `true` if `path` exists, else `false`. - * @example - * - * var object = { 'a': { 'b': { 'c': 3 } } }; - * var other = _.create({ 'a': _.create({ 'b': _.create({ 'c': 3 }) }) }); - * - * _.has(object, 'a'); - * // => true - * - * _.has(object, 'a.b.c'); - * // => true - * - * _.has(object, ['a', 'b', 'c']); - * // => true - * - * _.has(other, 'a'); - * // => false - */ - has( - object: T, - path: StringRepresentable|StringRepresentable[] - ): boolean; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.has - */ - has(path: StringRepresentable|StringRepresentable[]): boolean; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.has - */ - has(path: StringRepresentable|StringRepresentable[]): LoDashExplicitWrapper; - } - - //_.hasIn - interface LoDashStatic { - /** - * Checks if `path` is a direct or inherited property of `object`. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @returns {boolean} Returns `true` if `path` exists, else `false`. - * @example - * - * var object = _.create({ 'a': _.create({ 'b': _.create({ 'c': 3 }) }) }); - * - * _.hasIn(object, 'a'); - * // => true - * - * _.hasIn(object, 'a.b.c'); - * // => true - * - * _.hasIn(object, ['a', 'b', 'c']); - * // => true - * - * _.hasIn(object, 'b'); - * // => false - */ - hasIn( - object: T, - path: StringRepresentable|StringRepresentable[] - ): boolean; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.hasIn - */ - hasIn(path: StringRepresentable|StringRepresentable[]): boolean; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.hasIn - */ - hasIn(path: StringRepresentable|StringRepresentable[]): LoDashExplicitWrapper; - } - - //_.invert - interface LoDashStatic { - /** - * Creates an object composed of the inverted keys and values of object. If object contains duplicate values, - * subsequent values overwrite property assignments of previous values unless multiValue is true. - * - * @param object The object to invert. - * @param multiValue Allow multiple values per key. - * @return Returns the new inverted object. - */ - invert( - object: T, - multiValue?: boolean - ): TResult; - - /** - * @see _.invert - */ - invert( - object: Object, - multiValue?: boolean - ): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.invert - */ - invert(multiValue?: boolean): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.invert - */ - invert(multiValue?: boolean): LoDashExplicitObjectWrapper; - } - - //_.inverBy - interface InvertByIterator { - (value: T): any; - } - - interface LoDashStatic { - /** - * This method is like _.invert except that the inverted object is generated from the results of running each - * element of object through iteratee. The corresponding inverted value of each inverted key is an array of - * keys responsible for generating the inverted value. The iteratee is invoked with one argument: (value). - * - * @param object The object to invert. - * @param interatee The iteratee invoked per element. - * @return Returns the new inverted object. - */ - invertBy( - object: Object, - interatee?: InvertByIterator|string - ): Dictionary; - - /** - * @see _.invertBy - */ - invertBy( - object: _.Dictionary|_.NumericDictionary, - interatee?: InvertByIterator|string - ): Dictionary; - - /** - * @see _.invertBy - */ - invertBy( - object: Object, - interatee?: W - ): Dictionary; - - /** - * @see _.invertBy - */ - invertBy( - object: _.Dictionary, - interatee?: W - ): Dictionary; - } - - interface LoDashImplicitWrapper { - /** - * @see _.invertBy - */ - invertBy( - interatee?: InvertByIterator - ): LoDashImplicitObjectWrapper>; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.invertBy - */ - invertBy( - interatee?: InvertByIterator|string - ): LoDashImplicitObjectWrapper>; - - /** - * @see _.invertBy - */ - invertBy( - interatee?: W - ): LoDashImplicitObjectWrapper>; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.invertBy - */ - invertBy( - interatee?: InvertByIterator|string - ): LoDashImplicitObjectWrapper>; - - /** - * @see _.invertBy - */ - invertBy( - interatee?: W - ): LoDashImplicitObjectWrapper>; - } - - interface LoDashExplicitWrapper { - /** - * @see _.invertBy - */ - invertBy( - interatee?: InvertByIterator - ): LoDashExplicitObjectWrapper>; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.invertBy - */ - invertBy( - interatee?: InvertByIterator|string - ): LoDashExplicitObjectWrapper>; - - /** - * @see _.invertBy - */ - invertBy( - interatee?: W - ): LoDashExplicitObjectWrapper>; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.invertBy - */ - invertBy( - interatee?: InvertByIterator|string - ): LoDashExplicitObjectWrapper>; - - /** - * @see _.invertBy - */ - invertBy( - interatee?: W - ): LoDashExplicitObjectWrapper>; - } - - //_.keys - interface LoDashStatic { - /** - * Creates an array of the own enumerable property names of object. - * - * Note: Non-object values are coerced to objects. See the ES spec for more details. - * - * @param object The object to query. - * @return Returns the array of property names. - */ - keys(object?: any): string[]; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.keys - */ - keys(): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.keys - */ - keys(): LoDashExplicitArrayWrapper; - } - - //_.keysIn - interface LoDashStatic { - /** - * Creates an array of the own and inherited enumerable property names of object. - * - * Note: Non-object values are coerced to objects. - * - * @param object The object to query. - * @return An array of property names. - */ - keysIn(object?: any): string[]; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.keysIn - */ - keysIn(): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.keysIn - */ - keysIn(): LoDashExplicitArrayWrapper; - } - - //_.mapKeys - interface LoDashStatic { - /** - * The opposite of _.mapValues; this method creates an object with the same values as object and keys generated - * by running each own enumerable property of object through iteratee. - * - * @param object The object to iterate over. - * @param iteratee The function invoked per iteration. - * @param thisArg The this binding of iteratee. - * @return Returns the new mapped object. - */ - mapKeys( - object: List, - iteratee?: ListIterator - ): Dictionary; - - /** - * @see _.mapKeys - */ - mapKeys( - object: Dictionary, - iteratee?: DictionaryIterator - ): Dictionary; - - /** - * @see _.mapKeys - */ - mapKeys( - object: List|Dictionary, - iteratee?: TObject - ): Dictionary; - - /** - * @see _.mapKeys - */ - mapKeys( - object: List|Dictionary, - iteratee?: string - ): Dictionary; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.mapKeys - */ - mapKeys( - iteratee?: ListIterator - ): LoDashImplicitObjectWrapper>; - - /** - * @see _.mapKeys - */ - mapKeys( - iteratee?: TObject - ): LoDashImplicitObjectWrapper>; - - /** - * @see _.mapKeys - */ - mapKeys( - iteratee?: string - ): LoDashImplicitObjectWrapper>; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.mapKeys - */ - mapKeys( - iteratee?: ListIterator|DictionaryIterator - ): LoDashImplicitObjectWrapper>; - - /** - * @see _.mapKeys - */ - mapKeys( - iteratee?: TObject - ): LoDashImplicitObjectWrapper>; - - /** - * @see _.mapKeys - */ - mapKeys( - iteratee?: string - ): LoDashImplicitObjectWrapper>; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.mapKeys - */ - mapKeys( - iteratee?: ListIterator - ): LoDashExplicitObjectWrapper>; - - /** - * @see _.mapKeys - */ - mapKeys( - iteratee?: TObject - ): LoDashExplicitObjectWrapper>; - - /** - * @see _.mapKeys - */ - mapKeys( - iteratee?: string - ): LoDashExplicitObjectWrapper>; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.mapKeys - */ - mapKeys( - iteratee?: ListIterator|DictionaryIterator - ): LoDashExplicitObjectWrapper>; - - /** - * @see _.mapKeys - */ - mapKeys( - iteratee?: TObject - ): LoDashExplicitObjectWrapper>; - - /** - * @see _.mapKeys - */ - mapKeys( - iteratee?: string - ): LoDashExplicitObjectWrapper>; - } - - //_.mapValues - interface LoDashStatic { - /** - * Creates an object with the same keys as object and values generated by running each own - * enumerable property of object through iteratee. The iteratee function is bound to thisArg - * and invoked with three arguments: (value, key, object). - * - * If a property name is provided iteratee the created "_.property" style callback returns - * the property value of the given element. - * - * If a value is also provided for thisArg the creted "_.matchesProperty" style callback returns - * true for elements that have a matching property value, else false;. - * - * If an object is provided for iteratee the created "_.matches" style callback returns true - * for elements that have the properties of the given object, else false. - * - * @param {Object} object The object to iterate over. - * @param {Function|Object|string} [iteratee=_.identity] The function invoked per iteration. - * @param {Object} [thisArg] The `this` binding of `iteratee`. - * @return {Object} Returns the new mapped object. - */ - mapValues(obj: Dictionary, callback: ObjectIterator): Dictionary; - mapValues(obj: Dictionary, where: Dictionary): Dictionary; - mapValues(obj: T, pluck: string): TMapped; - mapValues(obj: T, callback: ObjectIterator): T; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.mapValues - * TValue is the type of the property values of T. - * TResult is the type output by the ObjectIterator function - */ - mapValues(callback: ObjectIterator): LoDashImplicitObjectWrapper>; - - /** - * @see _.mapValues - * TResult is the type of the property specified by pluck. - * T should be a Dictionary> - */ - mapValues(pluck: string): LoDashImplicitObjectWrapper>; - - /** - * @see _.mapValues - * TResult is the type of the properties of each object in the values of T - * T should be a Dictionary> - */ - mapValues(where: Dictionary): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.mapValues - * TValue is the type of the property values of T. - * TResult is the type output by the ObjectIterator function - */ - mapValues(callback: ObjectIterator): LoDashExplicitObjectWrapper>; - - /** - * @see _.mapValues - * TResult is the type of the property specified by pluck. - * T should be a Dictionary> - */ - mapValues(pluck: string): LoDashExplicitObjectWrapper>; - - /** - * @see _.mapValues - * TResult is the type of the properties of each object in the values of T - * T should be a Dictionary> - */ - mapValues(where: Dictionary): LoDashExplicitObjectWrapper; - } - - //_.merge - interface LoDashStatic { - /** - * Recursively merges own and inherited enumerable properties of source - * objects into the destination object, skipping source properties that resolve - * to `undefined`. Array and plain object properties are merged recursively. - * Other objects and value types are overridden by assignment. Source objects - * are applied from left to right. Subsequent sources overwrite property - * assignments of previous sources. - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @example - * - * var users = { - * 'data': [{ 'user': 'barney' }, { 'user': 'fred' }] - * }; - * - * var ages = { - * 'data': [{ 'age': 36 }, { 'age': 40 }] - * }; - * - * _.merge(users, ages); - * // => { 'data': [{ 'user': 'barney', 'age': 36 }, { 'user': 'fred', 'age': 40 }] } - */ - merge( - object: TObject, - source: TSource - ): TObject & TSource; - - /** - * @see _.merge - */ - merge( - object: TObject, - source1: TSource1, - source2: TSource2 - ): TObject & TSource1 & TSource2; - - /** - * @see _.merge - */ - merge( - object: TObject, - source1: TSource1, - source2: TSource2, - source3: TSource3 - ): TObject & TSource1 & TSource2 & TSource3; - - /** - * @see _.merge - */ - merge( - object: TObject, - source1: TSource1, - source2: TSource2, - source3: TSource3, - source4: TSource4 - ): TObject & TSource1 & TSource2 & TSource3 & TSource4; - - /** - * @see _.merge - */ - merge( - object: any, - ...otherArgs: any[] - ): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.merge - */ - merge( - source: TSource - ): LoDashImplicitObjectWrapper; - - /** - * @see _.merge - */ - merge( - source1: TSource1, - source2: TSource2 - ): LoDashImplicitObjectWrapper; - - /** - * @see _.merge - */ - merge( - source1: TSource1, - source2: TSource2, - source3: TSource3 - ): LoDashImplicitObjectWrapper; - - /** - * @see _.merge - */ - merge( - source1: TSource1, - source2: TSource2, - source3: TSource3, - source4: TSource4 - ): LoDashImplicitObjectWrapper; - - /** - * @see _.merge - */ - merge( - ...otherArgs: any[] - ): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.merge - */ - merge( - source: TSource - ): LoDashExplicitObjectWrapper; - - /** - * @see _.merge - */ - merge( - source1: TSource1, - source2: TSource2 - ): LoDashExplicitObjectWrapper; - - /** - * @see _.merge - */ - merge( - source1: TSource1, - source2: TSource2, - source3: TSource3 - ): LoDashExplicitObjectWrapper; - - /** - * @see _.merge - */ - merge( - ): LoDashExplicitObjectWrapper; - - /** - * @see _.merge - */ - merge( - ...otherArgs: any[] - ): LoDashExplicitObjectWrapper; - } - - //_.mergeWith - interface MergeWithCustomizer { - (value: any, srcValue: any, key?: string, object?: Object, source?: Object): any; - } - - interface LoDashStatic { - /** - * This method is like `_.merge` except that it accepts `customizer` which - * is invoked to produce the merged values of the destination and source - * properties. If `customizer` returns `undefined` merging is handled by the - * method instead. The `customizer` is invoked with seven arguments: - * (objValue, srcValue, key, object, source, stack). - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The destination object. - * @param {...Object} sources The source objects. - * @param {Function} customizer The function to customize assigned values. - * @returns {Object} Returns `object`. - * @example - * - * function customizer(objValue, srcValue) { - * if (_.isArray(objValue)) { - * return objValue.concat(srcValue); - * } - * } - * - * var object = { - * 'fruits': ['apple'], - * 'vegetables': ['beet'] - * }; - * - * var other = { - * 'fruits': ['banana'], - * 'vegetables': ['carrot'] - * }; - * - * _.merge(object, other, customizer); - * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot'] } - */ - mergeWith( - object: TObject, - source: TSource, - customizer: MergeWithCustomizer - ): TObject & TSource; - - /** - * @see _.mergeWith - */ - mergeWith( - object: TObject, - source1: TSource1, - source2: TSource2, - customizer: MergeWithCustomizer - ): TObject & TSource1 & TSource2; - - /** - * @see _.mergeWith - */ - mergeWith( - object: TObject, - source1: TSource1, - source2: TSource2, - source3: TSource3, - customizer: MergeWithCustomizer - ): TObject & TSource1 & TSource2 & TSource3; - - /** - * @see _.mergeWith - */ - mergeWith( - object: TObject, - source1: TSource1, - source2: TSource2, - source3: TSource3, - source4: TSource4, - customizer: MergeWithCustomizer - ): TObject & TSource1 & TSource2 & TSource3 & TSource4; - - /** - * @see _.mergeWith - */ - mergeWith( - object: any, - ...otherArgs: any[] - ): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.mergeWith - */ - mergeWith( - source: TSource, - customizer: MergeWithCustomizer - ): LoDashImplicitObjectWrapper; - - /** - * @see _.mergeWith - */ - mergeWith( - source1: TSource1, - source2: TSource2, - customizer: MergeWithCustomizer - ): LoDashImplicitObjectWrapper; - - /** - * @see _.mergeWith - */ - mergeWith( - source1: TSource1, - source2: TSource2, - source3: TSource3, - customizer: MergeWithCustomizer - ): LoDashImplicitObjectWrapper; - - /** - * @see _.mergeWith - */ - mergeWith( - source1: TSource1, - source2: TSource2, - source3: TSource3, - source4: TSource4, - customizer: MergeWithCustomizer - ): LoDashImplicitObjectWrapper; - - /** - * @see _.mergeWith - */ - mergeWith( - ...otherArgs: any[] - ): LoDashImplicitObjectWrapper; - } - - //_.omit - interface LoDashStatic { - /** - * The opposite of `_.pick`; this method creates an object composed of the - * own and inherited enumerable properties of `object` that are not omitted. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The source object. - * @param {...(string|string[])} [props] The property names to omit, specified - * individually or in arrays.. - * @returns {Object} Returns the new object. - * @example - * - * var object = { 'a': 1, 'b': '2', 'c': 3 }; - * - * _.omit(object, ['a', 'c']); - * // => { 'b': '2' } - */ - - omit( - object: T, - ...predicate: (StringRepresentable|StringRepresentable[])[] - ): TResult; - } - - interface LoDashImplicitObjectWrapper { - - /** - * @see _.omit - */ - omit( - ...predicate: (StringRepresentable|StringRepresentable[])[] - ): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - - /** - * @see _.omit - */ - omit( - ...predicate: (StringRepresentable|StringRepresentable[])[] - ): LoDashExplicitObjectWrapper; - } - - //_.omitBy - interface LoDashStatic { - /** - * The opposite of `_.pickBy`; this method creates an object composed of the - * own and inherited enumerable properties of `object` that `predicate` - * doesn't return truthy for. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The source object. - * @param {Function|Object|string} [predicate=_.identity] The function invoked per property. - * @returns {Object} Returns the new object. - * @example - * - * var object = { 'a': 1, 'b': '2', 'c': 3 }; - * - * _.omitBy(object, _.isNumber); - * // => { 'b': '2' } - */ - omitBy( - object: T, - predicate: ObjectIterator - ): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.omitBy - */ - omitBy( - predicate: ObjectIterator - ): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.omitBy - */ - omitBy( - predicate: ObjectIterator - ): LoDashExplicitObjectWrapper; - } - - //_.pick - interface LoDashStatic { - /** - * Creates an object composed of the picked `object` properties. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The source object. - * @param {...(string|string[])} [props] The property names to pick, specified - * individually or in arrays. - * @returns {Object} Returns the new object. - * @example - * - * var object = { 'a': 1, 'b': '2', 'c': 3 }; - * - * _.pick(object, ['a', 'c']); - * // => { 'a': 1, 'c': 3 } - */ - pick( - object: T, - ...predicate: (StringRepresentable|StringRepresentable[])[] - ): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.pick - */ - pick( - ...predicate: (StringRepresentable|StringRepresentable[])[] - ): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.pick - */ - pick( - ...predicate: (StringRepresentable|StringRepresentable[])[] - ): LoDashExplicitObjectWrapper; - } - - //_.pickBy - interface LoDashStatic { - /** - * Creates an object composed of the `object` properties `predicate` returns - * truthy for. The predicate is invoked with one argument: (value). - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The source object. - * @param {Function|Object|string} [predicate=_.identity] The function invoked per property. - * @returns {Object} Returns the new object. - * @example - * - * var object = { 'a': 1, 'b': '2', 'c': 3 }; - * - * _.pickBy(object, _.isNumber); - * // => { 'a': 1, 'c': 3 } - */ - pickBy( - object: T, - predicate?: ObjectIterator - ): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.pickBy - */ - pickBy( - predicate?: ObjectIterator - ): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.pickBy - */ - pickBy( - predicate?: ObjectIterator - ): LoDashExplicitObjectWrapper; - } - - //_.result - interface LoDashStatic { - /** - * This method is like _.get except that if the resolved value is a function it’s invoked with the this binding - * of its parent object and its result is returned. - * - * @param object The object to query. - * @param path The path of the property to resolve. - * @param defaultValue The value returned if the resolved value is undefined. - * @return Returns the resolved value. - */ - result( - object: TObject, - path: StringRepresentable|StringRepresentable[], - defaultValue?: TResult|((...args: any[]) => TResult) - ): TResult; - - /** - * @see _.result - */ - result( - object: any, - path: StringRepresentable|StringRepresentable[], - defaultValue?: TResult|((...args: any[]) => TResult) - ): TResult; - } - - interface LoDashImplicitWrapper { - /** - * @see _.result - */ - result( - path: StringRepresentable|StringRepresentable[], - defaultValue?: TResult|((...args: any[]) => TResult) - ): TResult; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.result - */ - result( - path: StringRepresentable|StringRepresentable[], - defaultValue?: TResult|((...args: any[]) => TResult) - ): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.result - */ - result( - path: StringRepresentable|StringRepresentable[], - defaultValue?: TResult|((...args: any[]) => TResult) - ): TResult; - } - - interface LoDashExplicitWrapper { - /** - * @see _.result - */ - result( - path: StringRepresentable|StringRepresentable[], - defaultValue?: any - ): TResultWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.result - */ - result( - path: StringRepresentable|StringRepresentable[], - defaultValue?: any - ): TResultWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.result - */ - result( - path: StringRepresentable|StringRepresentable[], - defaultValue?: any - ): TResultWrapper; - } - - //_.set - interface LoDashStatic { - /** - * Sets the value at path of object. If a portion of path doesn’t exist it’s created. Arrays are created for - * missing index properties while objects are created for all other missing properties. Use _.setWith to - * customize path creation. - * - * @param object The object to modify. - * @param path The path of the property to set. - * @param value The value to set. - * @return Returns object. - */ - set( - object: Object, - path: StringRepresentable|StringRepresentable[], - value: any - ): TResult; - - /** - * @see _.set - */ - set( - object: Object, - path: StringRepresentable|StringRepresentable[], - value: V - ): TResult; - - /** - * @see _.set - */ - set( - object: O, - path: StringRepresentable|StringRepresentable[], - value: V - ): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.set - */ - set( - path: StringRepresentable|StringRepresentable[], - value: any - ): LoDashImplicitObjectWrapper; - - /** - * @see _.set - */ - set( - path: StringRepresentable|StringRepresentable[], - value: V - ): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.set - */ - set( - path: StringRepresentable|StringRepresentable[], - value: any - ): LoDashExplicitObjectWrapper; - - /** - * @see _.set - */ - set( - path: StringRepresentable|StringRepresentable[], - value: V - ): LoDashExplicitObjectWrapper; - } - - //_.setWith - interface SetWithCustomizer { - (nsValue: any, key: string, nsObject: T): any; - } - - interface LoDashStatic { - /** - * This method is like _.set except that it accepts customizer which is invoked to produce the objects of - * path. If customizer returns undefined path creation is handled by the method instead. The customizer is - * invoked with three arguments: (nsValue, key, nsObject). - * - * @param object The object to modify. - * @param path The path of the property to set. - * @param value The value to set. - * @parem customizer The function to customize assigned values. - * @return Returns object. - */ - setWith( - object: Object, - path: StringRepresentable|StringRepresentable[], - value: any, - customizer?: SetWithCustomizer - ): TResult; - - /** - * @see _.setWith - */ - setWith( - object: Object, - path: StringRepresentable|StringRepresentable[], - value: V, - customizer?: SetWithCustomizer - ): TResult; - - /** - * @see _.setWith - */ - setWith( - object: O, - path: StringRepresentable|StringRepresentable[], - value: V, - customizer?: SetWithCustomizer - ): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.setWith - */ - setWith( - path: StringRepresentable|StringRepresentable[], - value: any, - customizer?: SetWithCustomizer - ): LoDashImplicitObjectWrapper; - - /** - * @see _.setWith - */ - setWith( - path: StringRepresentable|StringRepresentable[], - value: V, - customizer?: SetWithCustomizer - ): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.setWith - */ - setWith( - path: StringRepresentable|StringRepresentable[], - value: any, - customizer?: SetWithCustomizer - ): LoDashExplicitObjectWrapper; - - /** - * @see _.setWith - */ - setWith( - path: StringRepresentable|StringRepresentable[], - value: V, - customizer?: SetWithCustomizer - ): LoDashExplicitObjectWrapper; - } - - //_.toPairs - interface LoDashStatic { - /** - * Creates an array of own enumerable key-value pairs for object. - * - * @param object The object to query. - * @return Returns the new array of key-value pairs. - */ - toPairs(object?: T): any[][]; - - toPairs(object?: T): TResult[][]; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.toPairs - */ - toPairs(): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.toPairs - */ - toPairs(): LoDashExplicitArrayWrapper; - } - - //_.toPairsIn - interface LoDashStatic { - /** - * Creates an array of own and inherited enumerable key-value pairs for object. - * - * @param object The object to query. - * @return Returns the new array of key-value pairs. - */ - toPairsIn(object?: T): any[][]; - - toPairsIn(object?: T): TResult[][]; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.toPairsIn - */ - toPairsIn(): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.toPairsIn - */ - toPairsIn(): LoDashExplicitArrayWrapper; - } - - //_.transform - interface LoDashStatic { - /** - * An alternative to _.reduce; this method transforms object to a new accumulator object which is the result of - * running each of its own enumerable properties through iteratee, with each invocation potentially mutating - * the accumulator object. The iteratee is bound to thisArg and invoked with four arguments: (accumulator, - * value, key, object). Iteratee functions may exit iteration early by explicitly returning false. - * - * @param object The object to iterate over. - * @param iteratee The function invoked per iteration. - * @param accumulator The custom accumulator value. - * @param thisArg The this binding of iteratee. - * @return Returns the accumulated value. - */ - transform( - object: T[], - iteratee?: MemoVoidArrayIterator, - accumulator?: TResult[] - ): TResult[]; - - /** - * @see _.transform - */ - transform( - object: T[], - iteratee?: MemoVoidArrayIterator>, - accumulator?: Dictionary - ): Dictionary; - - /** - * @see _.transform - */ - transform( - object: Dictionary, - iteratee?: MemoVoidDictionaryIterator>, - accumulator?: Dictionary - ): Dictionary; - - /** - * @see _.transform - */ - transform( - object: Dictionary, - iteratee?: MemoVoidDictionaryIterator, - accumulator?: TResult[] - ): TResult[]; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.transform - */ - transform( - iteratee?: MemoVoidArrayIterator, - accumulator?: TResult[] - ): LoDashImplicitArrayWrapper; - - /** - * @see _.transform - */ - transform( - iteratee?: MemoVoidArrayIterator>, - accumulator?: Dictionary - ): LoDashImplicitObjectWrapper>; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.transform - */ - transform( - iteratee?: MemoVoidDictionaryIterator>, - accumulator?: Dictionary - ): LoDashImplicitObjectWrapper>; - - /** - * @see _.transform - */ - transform( - iteratee?: MemoVoidDictionaryIterator, - accumulator?: TResult[] - ): LoDashImplicitArrayWrapper; - } - - //_.unset - interface LoDashStatic { - /** - * Removes the property at path of object. - * - * Note: This method mutates object. - * - * @param object The object to modify. - * @param path The path of the property to unset. - * @return Returns true if the property is deleted, else false. - */ - unset( - object: T, - path: StringRepresentable|StringRepresentable[] - ): boolean; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.unset - */ - unset(path: StringRepresentable|StringRepresentable[]): LoDashImplicitWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.unset - */ - unset(path: StringRepresentable|StringRepresentable[]): LoDashExplicitWrapper; - } - - //_.update - interface LoDashStatic { - /** - * This method is like _.set except that accepts updater to produce the value to set. Use _.updateWith to - * customize path creation. The updater is invoked with one argument: (value). - * - * @param object The object to modify. - * @param path The path of the property to set. - * @param updater The function to produce the updated value. - * @return Returns object. - */ - update( - object: Object, - path: StringRepresentable|StringRepresentable[], - updater: Function - ): TResult; - - /** - * @see _.update - */ - update( - object: Object, - path: StringRepresentable|StringRepresentable[], - updater: U - ): TResult; - - /** - * @see _.update - */ - update( - object: O, - path: StringRepresentable|StringRepresentable[], - updater: Function - ): TResult; - - /** - * @see _.update - */ - update( - object: O, - path: StringRepresentable|StringRepresentable[], - updater: U - ): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.update - */ - update( - path: StringRepresentable|StringRepresentable[], - updater: any - ): LoDashImplicitObjectWrapper; - - /** - * @see _.update - */ - update( - path: StringRepresentable|StringRepresentable[], - updater: U - ): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.update - */ - update( - path: StringRepresentable|StringRepresentable[], - updater: any - ): LoDashExplicitObjectWrapper; - - /** - * @see _.update - */ - update( - path: StringRepresentable|StringRepresentable[], - updater: U - ): LoDashExplicitObjectWrapper; - } - - //_.values - interface LoDashStatic { - /** - * Creates an array of the own enumerable property values of object. - * - * @param object The object to query. - * @return Returns an array of property values. - */ - values(object?: Dictionary): T[]; - - /** - * @see _.values - */ - values(object?: any): T[]; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.values - */ - values(): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.values - */ - values(): LoDashExplicitArrayWrapper; - } - - //_.valuesIn - interface LoDashStatic { - /** - * Creates an array of the own and inherited enumerable property values of object. - * - * @param object The object to query. - * @return Returns the array of property values. - */ - valuesIn(object?: Dictionary): T[]; - - /** - * @see _.valuesIn - */ - valuesIn(object?: any): T[]; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.valuesIn - */ - valuesIn(): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.valuesIn - */ - valuesIn(): LoDashExplicitArrayWrapper; - } - - /********** - * String * - **********/ - - //_.camelCase - interface LoDashStatic { - /** - * Converts string to camel case. - * - * @param string The string to convert. - * @return Returns the camel cased string. - */ - camelCase(string?: string): string; - } - - interface LoDashImplicitWrapper { - /** - * @see _.camelCase - */ - camelCase(): string; - } - - interface LoDashExplicitWrapper { - /** - * @see _.camelCase - */ - camelCase(): LoDashExplicitWrapper; - } - - //_.capitalize - interface LoDashStatic { - /** - * Converts the first character of string to upper case and the remaining to lower case. - * - * @param string The string to capitalize. - * @return Returns the capitalized string. - */ - capitalize(string?: string): string; - } - - interface LoDashImplicitWrapper { - /** - * @see _.capitalize - */ - capitalize(): string; - } - - interface LoDashExplicitWrapper { - /** - * @see _.capitalize - */ - capitalize(): LoDashExplicitWrapper; - } - - //_.deburr - interface LoDashStatic { - /** - * Deburrs string by converting latin-1 supplementary letters to basic latin letters and removing combining - * diacritical marks. - * - * @param string The string to deburr. - * @return Returns the deburred string. - */ - deburr(string?: string): string; - } - - interface LoDashImplicitWrapper { - /** - * @see _.deburr - */ - deburr(): string; - } - - interface LoDashExplicitWrapper { - /** - * @see _.deburr - */ - deburr(): LoDashExplicitWrapper; - } - - //_.endsWith - interface LoDashStatic { - /** - * Checks if string ends with the given target string. - * - * @param string The string to search. - * @param target The string to search for. - * @param position The position to search from. - * @return Returns true if string ends with target, else false. - */ - endsWith( - string?: string, - target?: string, - position?: number - ): boolean; - } - - interface LoDashImplicitWrapper { - /** - * @see _.endsWith - */ - endsWith( - target?: string, - position?: number - ): boolean; - } - - interface LoDashExplicitWrapper { - /** - * @see _.endsWith - */ - endsWith( - target?: string, - position?: number - ): LoDashExplicitWrapper; - } - - // _.escape - interface LoDashStatic { - /** - * Converts the characters "&", "<", ">", '"', "'", and "`" in string to their corresponding HTML entities. - * - * Note: No other characters are escaped. To escape additional characters use a third-party library like he. - * - * hough the ">" character is escaped for symmetry, characters like ">" and "/" don’t need escaping in HTML - * and have no special meaning unless they're part of a tag or unquoted attribute value. See Mathias Bynens’s - * article (under "semi-related fun fact") for more details. - * - * Backticks are escaped because in IE < 9, they can break out of attribute values or HTML comments. See #59, - * #102, #108, and #133 of the HTML5 Security Cheatsheet for more details. - * - * When working with HTML you should always quote attribute values to reduce XSS vectors. - * - * @param string The string to escape. - * @return Returns the escaped string. - */ - escape(string?: string): string; - } - - interface LoDashImplicitWrapper { - /** - * @see _.escape - */ - escape(): string; - } - - interface LoDashExplicitWrapper { - /** - * @see _.escape - */ - escape(): LoDashExplicitWrapper; - } - - // _.escapeRegExp - interface LoDashStatic { - /** - * Escapes the RegExp special characters "^", "$", "\", ".", "*", "+", "?", "(", ")", "[", "]", - * "{", "}", and "|" in string. - * - * @param string The string to escape. - * @return Returns the escaped string. - */ - escapeRegExp(string?: string): string; - } - - interface LoDashImplicitWrapper { - /** - * @see _.escapeRegExp - */ - escapeRegExp(): string; - } - - interface LoDashExplicitWrapper { - /** - * @see _.escapeRegExp - */ - escapeRegExp(): LoDashExplicitWrapper; - } - - //_.kebabCase - interface LoDashStatic { - /** - * Converts string to kebab case. - * - * @param string The string to convert. - * @return Returns the kebab cased string. - */ - kebabCase(string?: string): string; - } - - interface LoDashImplicitWrapper { - /** - * @see _.kebabCase - */ - kebabCase(): string; - } - - interface LoDashExplicitWrapper { - /** - * @see _.kebabCase - */ - kebabCase(): LoDashExplicitWrapper; - } - - //_.lowerCase - interface LoDashStatic { - /** - * Converts `string`, as space separated words, to lower case. - * - * @param string The string to convert. - * @return Returns the lower cased string. - */ - lowerCase(string?: string): string; - } - - interface LoDashImplicitWrapper { - /** - * @see _.lowerCase - */ - lowerCase(): string; - } - - interface LoDashExplicitWrapper { - /** - * @see _.lowerCase - */ - lowerCase(): LoDashExplicitWrapper; - } - - //_.lowerFirst - interface LoDashStatic { - /** - * Converts the first character of `string` to lower case. - * - * @param string The string to convert. - * @return Returns the converted string. - */ - lowerFirst(string?: string): string; - } - - interface LoDashImplicitWrapper { - /** - * @see _.lowerFirst - */ - lowerFirst(): string; - } - - interface LoDashExplicitWrapper { - /** - * @see _.lowerFirst - */ - lowerFirst(): LoDashExplicitWrapper; - } - - //_.pad - interface LoDashStatic { - /** - * Pads string on the left and right sides if it’s shorter than length. Padding characters are truncated if - * they can’t be evenly divided by length. - * - * @param string The string to pad. - * @param length The padding length. - * @param chars The string used as padding. - * @return Returns the padded string. - */ - pad( - string?: string, - length?: number, - chars?: string - ): string; - } - - interface LoDashImplicitWrapper { - /** - * @see _.pad - */ - pad( - length?: number, - chars?: string - ): string; - } - - interface LoDashExplicitWrapper { - /** - * @see _.pad - */ - pad( - length?: number, - chars?: string - ): LoDashExplicitWrapper; - } - - //_.padEnd - interface LoDashStatic { - /** - * Pads string on the right side if it’s shorter than length. Padding characters are truncated if they exceed - * length. - * - * @param string The string to pad. - * @param length The padding length. - * @param chars The string used as padding. - * @return Returns the padded string. - */ - padEnd( - string?: string, - length?: number, - chars?: string - ): string; - } - - interface LoDashImplicitWrapper { - /** - * @see _.padEnd - */ - padEnd( - length?: number, - chars?: string - ): string; - } - - interface LoDashExplicitWrapper { - /** - * @see _.padEnd - */ - padEnd( - length?: number, - chars?: string - ): LoDashExplicitWrapper; - } - - //_.padStart - interface LoDashStatic { - /** - * Pads string on the left side if it’s shorter than length. Padding characters are truncated if they exceed - * length. - * - * @param string The string to pad. - * @param length The padding length. - * @param chars The string used as padding. - * @return Returns the padded string. - */ - padStart( - string?: string, - length?: number, - chars?: string - ): string; - } - - interface LoDashImplicitWrapper { - /** - * @see _.padStart - */ - padStart( - length?: number, - chars?: string - ): string; - } - - interface LoDashExplicitWrapper { - /** - * @see _.padStart - */ - padStart( - length?: number, - chars?: string - ): LoDashExplicitWrapper; - } - - //_.parseInt - interface LoDashStatic { - /** - * Converts string to an integer of the specified radix. If radix is undefined or 0, a radix of 10 is used - * unless value is a hexadecimal, in which case a radix of 16 is used. - * - * Note: This method aligns with the ES5 implementation of parseInt. - * - * @param string The string to convert. - * @param radix The radix to interpret value by. - * @return Returns the converted integer. - */ - parseInt( - string: string, - radix?: number - ): number; - } - - interface LoDashImplicitWrapper { - /** - * @see _.parseInt - */ - parseInt(radix?: number): number; - } - - interface LoDashExplicitWrapper { - /** - * @see _.parseInt - */ - parseInt(radix?: number): LoDashExplicitWrapper; - } - - //_.repeat - interface LoDashStatic { - /** - * Repeats the given string n times. - * - * @param string The string to repeat. - * @param n The number of times to repeat the string. - * @return Returns the repeated string. - */ - repeat( - string?: string, - n?: number - ): string; - } - - interface LoDashImplicitWrapper { - /** - * @see _.repeat - */ - repeat(n?: number): string; - } - - interface LoDashExplicitWrapper { - /** - * @see _.repeat - */ - repeat(n?: number): LoDashExplicitWrapper; - } - - //_.replace - interface LoDashStatic { - /** - * Replaces matches for pattern in string with replacement. - * - * Note: This method is based on String#replace. - * - * @param string - * @param pattern - * @param replacement - * @return Returns the modified string. - */ - replace( - string: string, - pattern: RegExp|string, - replacement: Function|string - ): string; - - /** - * @see _.replace - */ - replace( - pattern?: RegExp|string, - replacement?: Function|string - ): string; - } - - interface LoDashImplicitWrapper { - /** - * @see _.replace - */ - replace( - pattern?: RegExp|string, - replacement?: Function|string - ): string; - - /** - * @see _.replace - */ - replace( - replacement?: Function|string - ): string; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.replace - */ - replace( - pattern?: RegExp|string, - replacement?: Function|string - ): string; - - /** - * @see _.replace - */ - replace( - replacement?: Function|string - ): string; - } - - interface LoDashExplicitWrapper { - /** - * @see _.replace - */ - replace( - pattern?: RegExp|string, - replacement?: Function|string - ): LoDashExplicitWrapper; - - /** - * @see _.replace - */ - replace( - replacement?: Function|string - ): LoDashExplicitWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.replace - */ - replace( - pattern?: RegExp|string, - replacement?: Function|string - ): LoDashExplicitWrapper; - - /** - * @see _.replace - */ - replace( - replacement?: Function|string - ): LoDashExplicitWrapper; - } - - //_.snakeCase - interface LoDashStatic { - /** - * Converts string to snake case. - * - * @param string The string to convert. - * @return Returns the snake cased string. - */ - snakeCase(string?: string): string; - } - - interface LoDashImplicitWrapper { - /** - * @see _.snakeCase - */ - snakeCase(): string; - } - - interface LoDashExplicitWrapper { - /** - * @see _.snakeCase - */ - snakeCase(): LoDashExplicitWrapper; - } - - //_.split - interface LoDashStatic { - /** - * Splits string by separator. - * - * Note: This method is based on String#split. - * - * @param string - * @param separator - * @param limit - * @return Returns the new array of string segments. - */ - split( - string: string, - separator?: RegExp|string, - limit?: number - ): string[]; - } - - interface LoDashImplicitWrapper { - /** - * @see _.split - */ - split( - separator?: RegExp|string, - limit?: number - ): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitWrapper { - /** - * @see _.split - */ - split( - separator?: RegExp|string, - limit?: number - ): LoDashExplicitArrayWrapper; - } - - //_.startCase - interface LoDashStatic { - /** - * Converts string to start case. - * - * @param string The string to convert. - * @return Returns the start cased string. - */ - startCase(string?: string): string; - } - - interface LoDashImplicitWrapper { - /** - * @see _.startCase - */ - startCase(): string; - } - - interface LoDashExplicitWrapper { - /** - * @see _.startCase - */ - startCase(): LoDashExplicitWrapper; - } - - //_.startsWith - interface LoDashStatic { - /** - * Checks if string starts with the given target string. - * - * @param string The string to search. - * @param target The string to search for. - * @param position The position to search from. - * @return Returns true if string starts with target, else false. - */ - startsWith( - string?: string, - target?: string, - position?: number - ): boolean; - } - - interface LoDashImplicitWrapper { - /** - * @see _.startsWith - */ - startsWith( - target?: string, - position?: number - ): boolean; - } - - interface LoDashExplicitWrapper { - /** - * @see _.startsWith - */ - startsWith( - target?: string, - position?: number - ): LoDashExplicitWrapper; - } - - //_.template - interface TemplateOptions extends TemplateSettings { - /** - * The sourceURL of the template's compiled source. - */ - sourceURL?: string; - } - - interface TemplateExecutor { - (data?: Object): string; - source: string; - } - - interface LoDashStatic { - /** - * Creates a compiled template function that can interpolate data properties in "interpolate" delimiters, - * HTML-escape interpolated data properties in "escape" delimiters, and execute JavaScript in "evaluate" - * delimiters. Data properties may be accessed as free variables in the template. If a setting object is - * provided it takes precedence over _.templateSettings values. - * - * Note: In the development build _.template utilizes - * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl) for easier - * debugging. - * - * For more information on precompiling templates see - * [lodash's custom builds documentation](https://lodash.com/custom-builds). - * - * For more information on Chrome extension sandboxes see - * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval). - * - * @param string The template string. - * @param options The options object. - * @param options.escape The HTML "escape" delimiter. - * @param options.evaluate The "evaluate" delimiter. - * @param options.imports An object to import into the template as free variables. - * @param options.interpolate The "interpolate" delimiter. - * @param options.sourceURL The sourceURL of the template's compiled source. - * @param options.variable The data object variable name. - * @return Returns the compiled template function. - */ - template( - string: string, - options?: TemplateOptions - ): TemplateExecutor; - } - - interface LoDashImplicitWrapper { - /** - * @see _.template - */ - template(options?: TemplateOptions): TemplateExecutor; - } - - interface LoDashExplicitWrapper { - /** - * @see _.template - */ - template(options?: TemplateOptions): LoDashExplicitObjectWrapper; - } - - //_.toLower - interface LoDashStatic { - /** - * Converts `string`, as a whole, to lower case. - * - * @param string The string to convert. - * @return Returns the lower cased string. - */ - toLower(string?: string): string; - } - - interface LoDashImplicitWrapper { - /** - * @see _.toLower - */ - toLower(): string; - } - - interface LoDashExplicitWrapper { - /** - * @see _.toLower - */ - toLower(): LoDashExplicitWrapper; - } - - //_.toUpper - interface LoDashStatic { - /** - * Converts `string`, as a whole, to upper case. - * - * @param string The string to convert. - * @return Returns the upper cased string. - */ - toUpper(string?: string): string; - } - - interface LoDashImplicitWrapper { - /** - * @see _.toUpper - */ - toUpper(): string; - } - - interface LoDashExplicitWrapper { - /** - * @see _.toUpper - */ - toUpper(): LoDashExplicitWrapper; - } - - //_.trim - interface LoDashStatic { - /** - * Removes leading and trailing whitespace or specified characters from string. - * - * @param string The string to trim. - * @param chars The characters to trim. - * @return Returns the trimmed string. - */ - trim( - string?: string, - chars?: string - ): string; - } - - interface LoDashImplicitWrapper { - /** - * @see _.trim - */ - trim(chars?: string): string; - } - - interface LoDashExplicitWrapper { - /** - * @see _.trim - */ - trim(chars?: string): LoDashExplicitWrapper; - } - - //_.trimEnd - interface LoDashStatic { - /** - * Removes trailing whitespace or specified characters from string. - * - * @param string The string to trim. - * @param chars The characters to trim. - * @return Returns the trimmed string. - */ - trimEnd( - string?: string, - chars?: string - ): string; - } - - interface LoDashImplicitWrapper { - /** - * @see _.trimEnd - */ - trimEnd(chars?: string): string; - } - - interface LoDashExplicitWrapper { - /** - * @see _.trimEnd - */ - trimEnd(chars?: string): LoDashExplicitWrapper; - } - - //_.trimStart - interface LoDashStatic { - /** - * Removes leading whitespace or specified characters from string. - * - * @param string The string to trim. - * @param chars The characters to trim. - * @return Returns the trimmed string. - */ - trimStart( - string?: string, - chars?: string - ): string; - } - - interface LoDashImplicitWrapper { - /** - * @see _.trimStart - */ - trimStart(chars?: string): string; - } - - interface LoDashExplicitWrapper { - /** - * @see _.trimStart - */ - trimStart(chars?: string): LoDashExplicitWrapper; - } - - //_.truncate - interface TruncateOptions { - /** The maximum string length. */ - length?: number; - /** The string to indicate text is omitted. */ - omission?: string; - /** The separator pattern to truncate to. */ - separator?: string|RegExp; - } - - interface LoDashStatic { - /** - * Truncates string if it’s longer than the given maximum string length. The last characters of the truncated - * string are replaced with the omission string which defaults to "…". - * - * @param string The string to truncate. - * @param options The options object or maximum string length. - * @return Returns the truncated string. - */ - truncate( - string?: string, - options?: TruncateOptions - ): string; - } - - interface LoDashImplicitWrapper { - /** - * @see _.truncate - */ - truncate(options?: TruncateOptions): string; - } - - interface LoDashExplicitWrapper { - /** - * @see _.truncate - */ - truncate(options?: TruncateOptions): LoDashExplicitWrapper; - } - - //_.unescape - interface LoDashStatic { - /** - * The inverse of _.escape; this method converts the HTML entities &, <, >, ", ', and ` - * in string to their corresponding characters. - * - * Note: No other HTML entities are unescaped. To unescape additional HTML entities use a third-party library - * like he. - * - * @param string The string to unescape. - * @return Returns the unescaped string. - */ - unescape(string?: string): string; - } - - interface LoDashImplicitWrapper { - /** - * @see _.unescape - */ - unescape(): string; - } - - interface LoDashExplicitWrapper { - /** - * @see _.unescape - */ - unescape(): LoDashExplicitWrapper; - } - - //_.upperCase - interface LoDashStatic { - /** - * Converts `string`, as space separated words, to upper case. - * - * @param string The string to convert. - * @return Returns the upper cased string. - */ - upperCase(string?: string): string; - } - - interface LoDashImplicitWrapper { - /** - * @see _.upperCase - */ - upperCase(): string; - } - - interface LoDashExplicitWrapper { - /** - * @see _.upperCase - */ - upperCase(): LoDashExplicitWrapper; - } - - //_.upperFirst - interface LoDashStatic { - /** - * Converts the first character of `string` to upper case. - * - * @param string The string to convert. - * @return Returns the converted string. - */ - upperFirst(string?: string): string; - } - - interface LoDashImplicitWrapper { - /** - * @see _.upperFirst - */ - upperFirst(): string; - } - - interface LoDashExplicitWrapper { - /** - * @see _.upperFirst - */ - upperFirst(): LoDashExplicitWrapper; - } - - //_.words - interface LoDashStatic { - /** - * Splits `string` into an array of its words. - * - * @param string The string to inspect. - * @param pattern The pattern to match words. - * @return Returns the words of `string`. - */ - words( - string?: string, - pattern?: string|RegExp - ): string[]; - } - - interface LoDashImplicitWrapper { - /** - * @see _.words - */ - words(pattern?: string|RegExp): string[]; - } - - interface LoDashExplicitWrapper { - /** - * @see _.words - */ - words(pattern?: string|RegExp): LoDashExplicitArrayWrapper; - } - - /*********** - * Utility * - ***********/ - - //_.attempt - interface LoDashStatic { - /** - * Attempts to invoke func, returning either the result or the caught error object. Any additional arguments - * are provided to func when it’s invoked. - * - * @param func The function to attempt. - * @return Returns the func result or error object. - */ - attempt(func: (...args: any[]) => TResult, ...args: any[]): TResult|Error; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.attempt - */ - attempt(...args: any[]): TResult|Error; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.attempt - */ - attempt(...args: any[]): LoDashExplicitObjectWrapper; - } - - //_.constant - interface LoDashStatic { - /** - * Creates a function that returns value. - * - * @param value The value to return from the new function. - * @return Returns the new function. - */ - constant(value: T): () => T; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.constant - */ - constant(): LoDashImplicitObjectWrapper<() => TResult>; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.constant - */ - constant(): LoDashExplicitObjectWrapper<() => TResult>; - } - - //_.identity - interface LoDashStatic { - /** - * This method returns the first argument provided to it. - * - * @param value Any value. - * @return Returns value. - */ - identity(value?: T): T; - } - - interface LoDashImplicitWrapper { - /** - * @see _.identity - */ - identity(): T; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.identity - */ - identity(): T[]; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.identity - */ - identity(): T; - } - - interface LoDashExplicitWrapper { - /** - * @see _.identity - */ - identity(): LoDashExplicitWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.identity - */ - identity(): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.identity - */ - identity(): LoDashExplicitObjectWrapper; - } - - //_.iteratee - interface LoDashStatic { - /** - * Creates a function that invokes `func` with the arguments of the created - * function. If `func` is a property name the created callback returns the - * property value for a given element. If `func` is an object the created - * callback returns `true` for elements that contain the equivalent object properties, otherwise it returns `false`. - * - * @static - * @memberOf _ - * @category Util - * @param {*} [func=_.identity] The value to convert to a callback. - * @returns {Function} Returns the callback. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 40 } - * ]; - * - * // create custom iteratee shorthands - * _.iteratee = _.wrap(_.iteratee, function(callback, func) { - * var p = /^(\S+)\s*([<>])\s*(\S+)$/.exec(func); - * return !p ? callback(func) : function(object) { - * return (p[2] == '>' ? object[p[1]] > p[3] : object[p[1]] < p[3]); - * }; - * }); - * - * _.filter(users, 'age > 36'); - * // => [{ 'user': 'fred', 'age': 40 }] - */ - iteratee( - func: Function - ): (...args: any[]) => TResult; - - /** - * @see _.iteratee - */ - iteratee( - func: string - ): (object: any) => TResult; - - /** - * @see _.iteratee - */ - iteratee( - func: Object - ): (object: any) => boolean; - - /** - * @see _.iteratee - */ - iteratee(): (value: TResult) => TResult; - } - - interface LoDashImplicitWrapper { - /** - * @see _.iteratee - */ - iteratee(): LoDashImplicitObjectWrapper<(object: any) => TResult>; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.iteratee - */ - iteratee(): LoDashImplicitObjectWrapper<(object: any) => boolean>; - - /** - * @see _.iteratee - */ - iteratee(): LoDashImplicitObjectWrapper<(...args: any[]) => TResult>; - } - - interface LoDashExplicitWrapper { - /** - * @see _.iteratee - */ - iteratee(): LoDashExplicitObjectWrapper<(object: any) => TResult>; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.iteratee - */ - iteratee(): LoDashExplicitObjectWrapper<(object: any) => boolean>; - - /** - * @see _.iteratee - */ - iteratee(): LoDashExplicitObjectWrapper<(...args: any[]) => TResult>; - } - - //_.matches - interface LoDashStatic { - /** - * Creates a function that performs a deep comparison between a given object and source, returning true if the - * given object has equivalent property values, else false. - * - * Note: This method supports comparing arrays, booleans, Date objects, numbers, Object objects, regexes, and - * strings. Objects are compared by their own, not inherited, enumerable properties. For comparing a single own - * or inherited property value see _.matchesProperty. - * - * @param source The object of property values to match. - * @return Returns the new function. - */ - matches(source: T): (value: any) => boolean; - - /** - * @see _.matches - */ - matches(source: T): (value: V) => boolean; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.matches - */ - matches(): LoDashImplicitObjectWrapper<(value: V) => boolean>; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.matches - */ - matches(): LoDashExplicitObjectWrapper<(value: V) => boolean>; - } - - //_.matchesProperty - interface LoDashStatic { - /** - * Creates a function that compares the property value of path on a given object to value. - * - * Note: This method supports comparing arrays, booleans, Date objects, numbers, Object objects, regexes, and - * strings. Objects are compared by their own, not inherited, enumerable properties. - * - * @param path The path of the property to get. - * @param srcValue The value to match. - * @return Returns the new function. - */ - matchesProperty( - path: StringRepresentable|StringRepresentable[], - srcValue: T - ): (value: any) => boolean; - - /** - * @see _.matchesProperty - */ - matchesProperty( - path: StringRepresentable|StringRepresentable[], - srcValue: T - ): (value: V) => boolean; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.matchesProperty - */ - matchesProperty( - srcValue: SrcValue - ): LoDashImplicitObjectWrapper<(value: any) => boolean>; - - /** - * @see _.matchesProperty - */ - matchesProperty( - srcValue: SrcValue - ): LoDashImplicitObjectWrapper<(value: Value) => boolean>; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.matchesProperty - */ - matchesProperty( - srcValue: SrcValue - ): LoDashExplicitObjectWrapper<(value: any) => boolean>; - - /** - * @see _.matchesProperty - */ - matchesProperty( - srcValue: SrcValue - ): LoDashExplicitObjectWrapper<(value: Value) => boolean>; - } - - //_.method - interface LoDashStatic { - /** - * Creates a function that invokes the method at path on a given object. Any additional arguments are provided - * to the invoked method. - * - * @param path The path of the method to invoke. - * @param args The arguments to invoke the method with. - * @return Returns the new function. - */ - method( - path: string|StringRepresentable[], - ...args: any[] - ): (object: TObject) => TResult; - - /** - * @see _.method - */ - method( - path: string|StringRepresentable[], - ...args: any[] - ): (object: any) => TResult; - } - - interface LoDashImplicitWrapper { - /** - * @see _.method - */ - method(...args: any[]): LoDashImplicitObjectWrapper<(object: TObject) => TResult>; - - /** - * @see _.method - */ - method(...args: any[]): LoDashImplicitObjectWrapper<(object: any) => TResult>; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.method - */ - method(...args: any[]): LoDashImplicitObjectWrapper<(object: TObject) => TResult>; - - /** - * @see _.method - */ - method(...args: any[]): LoDashImplicitObjectWrapper<(object: any) => TResult>; - } - - interface LoDashExplicitWrapper { - /** - * @see _.method - */ - method(...args: any[]): LoDashExplicitObjectWrapper<(object: TObject) => TResult>; - - /** - * @see _.method - */ - method(...args: any[]): LoDashExplicitObjectWrapper<(object: any) => TResult>; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.method - */ - method(...args: any[]): LoDashExplicitObjectWrapper<(object: TObject) => TResult>; - - /** - * @see _.method - */ - method(...args: any[]): LoDashExplicitObjectWrapper<(object: any) => TResult>; - } - - //_.methodOf - interface LoDashStatic { - /** - * The opposite of _.method; this method creates a function that invokes the method at a given path on object. - * Any additional arguments are provided to the invoked method. - * - * @param object The object to query. - * @param args The arguments to invoke the method with. - * @return Returns the new function. - */ - methodOf( - object: TObject, - ...args: any[] - ): (path: StringRepresentable|StringRepresentable[]) => TResult; - - /** - * @see _.methodOf - */ - methodOf( - object: {}, - ...args: any[] - ): (path: StringRepresentable|StringRepresentable[]) => TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.methodOf - */ - methodOf( - ...args: any[] - ): LoDashImplicitObjectWrapper<(path: StringRepresentable|StringRepresentable[]) => TResult>; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.methodOf - */ - methodOf( - ...args: any[] - ): LoDashExplicitObjectWrapper<(path: StringRepresentable|StringRepresentable[]) => TResult>; - } - - //_.mixin - interface MixinOptions { - chain?: boolean; - } - - interface LoDashStatic { - /** - * Adds all own enumerable function properties of a source object to the destination object. If object is a - * function then methods are added to its prototype as well. - * - * Note: Use _.runInContext to create a pristine lodash function to avoid conflicts caused by modifying - * the original. - * - * @param object The destination object. - * @param source The object of functions to add. - * @param options The options object. - * @param options.chain Specify whether the functions added are chainable. - * @return Returns object. - */ - mixin( - object: TObject, - source: Dictionary, - options?: MixinOptions - ): TResult; - - /** - * @see _.mixin - */ - mixin( - source: Dictionary, - options?: MixinOptions - ): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.mixin - */ - mixin( - source: Dictionary, - options?: MixinOptions - ): LoDashImplicitObjectWrapper; - - /** - * @see _.mixin - */ - mixin( - options?: MixinOptions - ): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.mixin - */ - mixin( - source: Dictionary, - options?: MixinOptions - ): LoDashExplicitObjectWrapper; - - /** - * @see _.mixin - */ - mixin( - options?: MixinOptions - ): LoDashExplicitObjectWrapper; - } - - //_.noConflict - interface LoDashStatic { - /** - * Reverts the _ variable to its previous value and returns a reference to the lodash function. - * - * @return Returns the lodash function. - */ - noConflict(): typeof _; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.noConflict - */ - noConflict(): typeof _; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.noConflict - */ - noConflict(): LoDashExplicitObjectWrapper; - } - - //_.noop - interface LoDashStatic { - /** - * A no-operation function that returns undefined regardless of the arguments it receives. - * - * @return undefined - */ - noop(...args: any[]): void; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.noop - */ - noop(...args: any[]): void; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.noop - */ - noop(...args: any[]): _.LoDashExplicitWrapper; - } - - //_.nthArg - interface LoDashStatic { - /** - * Creates a function that returns its nth argument. - * - * @param n The index of the argument to return. - * @return Returns the new function. - */ - nthArg(n?: number): TResult; - } - - interface LoDashImplicitWrapper { - /** - * @see _.nthArg - */ - nthArg(): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitWrapper { - /** - * @see _.nthArg - */ - nthArg(): LoDashExplicitObjectWrapper; - } - - //_.over - interface LoDashStatic { - /** - * Creates a function that invokes iteratees with the arguments provided to the created function and returns - * their results. - * - * @param iteratees The iteratees to invoke. - * @return Returns the new function. - */ - over(...iteratees: (Function|Function[])[]): (...args: any[]) => TResult[]; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.over - */ - over(...iteratees: (Function|Function[])[]): LoDashImplicitObjectWrapper<(...args: any[]) => TResult[]>; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.over - */ - over(...iteratees: (Function|Function[])[]): LoDashImplicitObjectWrapper<(...args: any[]) => TResult[]>; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.over - */ - over(...iteratees: (Function|Function[])[]): LoDashExplicitObjectWrapper<(...args: any[]) => TResult[]>; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.over - */ - over(...iteratees: (Function|Function[])[]): LoDashExplicitObjectWrapper<(...args: any[]) => TResult[]>; - } - - //_.overEvery - interface LoDashStatic { - /** - * Creates a function that checks if all of the predicates return truthy when invoked with the arguments - * provided to the created function. - * - * @param predicates The predicates to check. - * @return Returns the new function. - */ - overEvery(...predicates: (Function|Function[])[]): (...args: any[]) => boolean; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.overEvery - */ - overEvery(...predicates: (Function|Function[])[]): LoDashImplicitObjectWrapper<(...args: any[]) => boolean>; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.overEvery - */ - overEvery(...predicates: (Function|Function[])[]): LoDashImplicitObjectWrapper<(...args: any[]) => boolean>; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.overEvery - */ - overEvery(...predicates: (Function|Function[])[]): LoDashExplicitObjectWrapper<(...args: any[]) => boolean>; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.overEvery - */ - overEvery(...predicates: (Function|Function[])[]): LoDashExplicitObjectWrapper<(...args: any[]) => boolean>; - } - - //_.overSome - interface LoDashStatic { - /** - * Creates a function that checks if any of the predicates return truthy when invoked with the arguments - * provided to the created function. - * - * @param predicates The predicates to check. - * @return Returns the new function. - */ - overSome(...predicates: (Function|Function[])[]): (...args: any[]) => boolean; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.overSome - */ - overSome(...predicates: (Function|Function[])[]): LoDashImplicitObjectWrapper<(...args: any[]) => boolean>; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.overSome - */ - overSome(...predicates: (Function|Function[])[]): LoDashImplicitObjectWrapper<(...args: any[]) => boolean>; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.overSome - */ - overSome(...predicates: (Function|Function[])[]): LoDashExplicitObjectWrapper<(...args: any[]) => boolean>; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.overSome - */ - overSome(...predicates: (Function|Function[])[]): LoDashExplicitObjectWrapper<(...args: any[]) => boolean>; - } - - //_.property - interface LoDashStatic { - /** - * Creates a function that returns the property value at path on a given object. - * - * @param path The path of the property to get. - * @return Returns the new function. - */ - property(path: StringRepresentable|StringRepresentable[]): (obj: TObj) => TResult; - } - - interface LoDashImplicitWrapper { - /** - * @see _.property - */ - property(): LoDashImplicitObjectWrapper<(obj: TObj) => TResult>; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.property - */ - property(): LoDashImplicitObjectWrapper<(obj: TObj) => TResult>; - } - - interface LoDashExplicitWrapper { - /** - * @see _.property - */ - property(): LoDashExplicitObjectWrapper<(obj: TObj) => TResult>; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.property - */ - property(): LoDashExplicitObjectWrapper<(obj: TObj) => TResult>; - } - - //_.propertyOf - interface LoDashStatic { - /** - * The opposite of _.property; this method creates a function that returns the property value at a given path - * on object. - * - * @param object The object to query. - * @return Returns the new function. - */ - propertyOf(object: T): (path: string|string[]) => any; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.propertyOf - */ - propertyOf(): LoDashImplicitObjectWrapper<(path: string|string[]) => any>; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.propertyOf - */ - propertyOf(): LoDashExplicitObjectWrapper<(path: string|string[]) => any>; - } - - //_.range - interface LoDashStatic { - /** - * Creates an array of numbers (positive and/or negative) progressing from start up to, but not including, end. - * If end is not specified it’s set to start with start then set to 0. If end is less than start a zero-length - * range is created unless a negative step is specified. - * - * @param start The start of the range. - * @param end The end of the range. - * @param step The value to increment or decrement by. - * @return Returns a new range array. - */ - range( - start: number, - end: number, - step?: number - ): number[]; - - /** - * @see _.range - */ - range( - end: number, - step?: number - ): number[]; - } - - interface LoDashImplicitWrapper { - /** - * @see _.range - */ - range( - end?: number, - step?: number - ): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitWrapper { - /** - * @see _.range - */ - range( - end?: number, - step?: number - ): LoDashExplicitArrayWrapper; - } - - //_.rangeRight - interface LoDashStatic { - /** - * This method is like `_.range` except that it populates values in - * descending order. - * - * @static - * @memberOf _ - * @category Util - * @param {number} [start=0] The start of the range. - * @param {number} end The end of the range. - * @param {number} [step=1] The value to increment or decrement by. - * @returns {Array} Returns the new array of numbers. - * @example - * - * _.rangeRight(4); - * // => [3, 2, 1, 0] - * - * _.rangeRight(-4); - * // => [-3, -2, -1, 0] - * - * _.rangeRight(1, 5); - * // => [4, 3, 2, 1] - * - * _.rangeRight(0, 20, 5); - * // => [15, 10, 5, 0] - * - * _.rangeRight(0, -4, -1); - * // => [-3, -2, -1, 0] - * - * _.rangeRight(1, 4, 0); - * // => [1, 1, 1] - * - * _.rangeRight(0); - * // => [] - */ - rangeRight( - start: number, - end: number, - step?: number - ): number[]; - - /** - * @see _.rangeRight - */ - rangeRight( - end: number, - step?: number - ): number[]; - } - - interface LoDashImplicitWrapper { - /** - * @see _.rangeRight - */ - rangeRight( - end?: number, - step?: number - ): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitWrapper { - /** - * @see _.rangeRight - */ - rangeRight( - end?: number, - step?: number - ): LoDashExplicitArrayWrapper; - } - - //_.runInContext - interface LoDashStatic { - /** - * Create a new pristine lodash function using the given context object. - * - * @param context The context object. - * @return Returns a new lodash function. - */ - runInContext(context?: Object): typeof _; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.runInContext - */ - runInContext(): typeof _; - } - - //_.times - interface LoDashStatic { - /** - * Invokes the iteratee function n times, returning an array of the results of each invocation. The iteratee - * is invoked with one argument; (index). - * - * @param n The number of times to invoke iteratee. - * @param iteratee The function invoked per iteration. - * @return Returns the array of results. - */ - times( - n: number, - iteratee: (num: number) => TResult - ): TResult[]; - - /** - * @see _.times - */ - times(n: number): number[]; - } - - interface LoDashImplicitWrapper { - /** - * @see _.times - */ - times( - iteratee: (num: number) => TResult - ): TResult[]; - - /** - * @see _.times - */ - times(): number[]; - } - - interface LoDashExplicitWrapper { - /** - * @see _.times - */ - times( - iteratee: (num: number) => TResult - ): LoDashExplicitArrayWrapper; - - /** - * @see _.times - */ - times(): LoDashExplicitArrayWrapper; - } - - //_.toPath - interface LoDashStatic { - /** - * Converts `value` to a property path array. - * - * @static - * @memberOf _ - * @category Util - * @param {*} value The value to convert. - * @returns {Array} Returns the new property path array. - * @example - * - * _.toPath('a.b.c'); - * // => ['a', 'b', 'c'] - * - * _.toPath('a[0].b.c'); - * // => ['a', '0', 'b', 'c'] - * - * var path = ['a', 'b', 'c'], - * newPath = _.toPath(path); - * - * console.log(newPath); - * // => ['a', 'b', 'c'] - * - * console.log(path === newPath); - * // => false - */ - toPath(value: any): string[]; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.toPath - */ - toPath(): LoDashImplicitWrapper; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.toPath - */ - toPath(): LoDashExplicitWrapper; - } - - //_.uniqueId - interface LoDashStatic { - /** - * Generates a unique ID. If prefix is provided the ID is appended to it. - * - * @param prefix The value to prefix the ID with. - * @return Returns the unique ID. - */ - uniqueId(prefix?: string): string; - } - - interface LoDashImplicitWrapper { - /** - * @see _.uniqueId - */ - uniqueId(): string; - } - - interface LoDashExplicitWrapper { - /** - * @see _.uniqueId - */ - uniqueId(): LoDashExplicitWrapper; - } - - interface ListIterator { - (value: T, index: number, collection: List): TResult; - } - - interface DictionaryIterator { - (value: T, key?: string, collection?: Dictionary): TResult; - } - - interface NumericDictionaryIterator { - (value: T, key?: number, collection?: Dictionary): TResult; - } - - interface ObjectIterator { - (element: T, key?: string, collection?: any): TResult; - } - - interface StringIterator { - (char: string, index?: number, string?: string): TResult; - } - - interface MemoVoidIterator { - (prev: TResult, curr: T, indexOrKey?: any, list?: T[]): void; - } - interface MemoIterator { - (prev: TResult, curr: T, indexOrKey?: any, list?: T[]): TResult; - } - - interface MemoVoidArrayIterator { - (acc: TResult, curr: T, index?: number, arr?: T[]): void; - } - interface MemoVoidDictionaryIterator { - (acc: TResult, curr: T, key?: string, dict?: Dictionary): void; - } - - //interface Collection {} - - // Common interface between Arrays and jQuery objects - interface List { - [index: number]: T; - length: number; - } - - interface Dictionary { - [index: string]: T; - } - - interface NumericDictionary { - [index: number]: T; - } - - interface StringRepresentable { - toString(): string; - } - - interface Cancelable { - cancel(): void; - flush(): void; - } -} - -// Named exports - -declare module "lodash/after" { - const after: typeof _.after; - export = after; -} - - -declare module "lodash/ary" { - const ary: typeof _.ary; - export = ary; -} - - -declare module "lodash/assign" { - const assign: typeof _.assign; - export = assign; -} - - -declare module "lodash/assignIn" { - const assignIn: typeof _.assignIn; - export = assignIn; -} - - -declare module "lodash/assignInWith" { - const assignInWith: typeof _.assignInWith; - export = assignInWith; -} - - -declare module "lodash/assignWith" { - const assignWith: typeof _.assignWith; - export = assignWith; -} - - -declare module "lodash/at" { - const at: typeof _.at; - export = at; -} - - -declare module "lodash/before" { - const before: typeof _.before; - export = before; -} - - -declare module "lodash/bind" { - const bind: typeof _.bind; - export = bind; -} - - -declare module "lodash/bindAll" { - const bindAll: typeof _.bindAll; - export = bindAll; -} - - -declare module "lodash/bindKey" { - const bindKey: typeof _.bindKey; - export = bindKey; -} - - -declare module "lodash/castArray" { - const castArray: typeof _.castArray; - export = castArray; -} - - -declare module "lodash/chain" { - const chain: typeof _.chain; - export = chain; -} - - -declare module "lodash/chunk" { - const chunk: typeof _.chunk; - export = chunk; -} - - -declare module "lodash/compact" { - const compact: typeof _.compact; - export = compact; -} - - -declare module "lodash/concat" { - const concat: typeof _.concat; - export = concat; -} - -/** -* uncoment it if definition exists -*/ -/* -declare module "lodash/cond" { - const cond: typeof _.cond; - export = cond; -} -*/ - -/** -* uncoment it if definition exists -*/ -/* -declare module "lodash/conforms" { - const conforms: typeof _.conforms; - export = conforms; -} -*/ - -declare module "lodash/constant" { - const constant: typeof _.constant; - export = constant; -} - - -declare module "lodash/countBy" { - const countBy: typeof _.countBy; - export = countBy; -} - - -declare module "lodash/create" { - const create: typeof _.create; - export = create; -} - - -declare module "lodash/curry" { - const curry: typeof _.curry; - export = curry; -} - - -declare module "lodash/curryRight" { - const curryRight: typeof _.curryRight; - export = curryRight; -} - - -declare module "lodash/debounce" { - const debounce: typeof _.debounce; - export = debounce; -} - - -declare module "lodash/defaults" { - const defaults: typeof _.defaults; - export = defaults; -} - - -declare module "lodash/defaultsDeep" { - const defaultsDeep: typeof _.defaultsDeep; - export = defaultsDeep; -} - - -declare module "lodash/defer" { - const defer: typeof _.defer; - export = defer; -} - - -declare module "lodash/delay" { - const delay: typeof _.delay; - export = delay; -} - - -declare module "lodash/difference" { - const difference: typeof _.difference; - export = difference; -} - - -declare module "lodash/differenceBy" { - const differenceBy: typeof _.differenceBy; - export = differenceBy; -} - - -declare module "lodash/differenceWith" { - const differenceWith: typeof _.differenceWith; - export = differenceWith; -} - - -declare module "lodash/drop" { - const drop: typeof _.drop; - export = drop; -} - - -declare module "lodash/dropRight" { - const dropRight: typeof _.dropRight; - export = dropRight; -} - - -declare module "lodash/dropRightWhile" { - const dropRightWhile: typeof _.dropRightWhile; - export = dropRightWhile; -} - - -declare module "lodash/dropWhile" { - const dropWhile: typeof _.dropWhile; - export = dropWhile; -} - - -declare module "lodash/fill" { - const fill: typeof _.fill; - export = fill; -} - - -declare module "lodash/filter" { - const filter: typeof _.filter; - export = filter; -} - - -declare module "lodash/flatMap" { - const flatMap: typeof _.flatMap; - export = flatMap; -} - -/** -* uncoment it if definition exists -*/ -/* -declare module "lodash/flatMapDeep" { - const flatMapDeep: typeof _.flatMapDeep; - export = flatMapDeep; -} -*/ -/** -* uncoment it if definition exists -*/ -/* -declare module "lodash/flatMapDepth" { - const flatMapDepth: typeof _.flatMapDepth; - export = flatMapDepth; -} -*/ - -declare module "lodash/flatten" { - const flatten: typeof _.flatten; - export = flatten; -} - - -declare module "lodash/flattenDeep" { - const flattenDeep: typeof _.flattenDeep; - export = flattenDeep; -} - -declare module "lodash/flattenDepth" { - const flattenDepth: typeof _.flattenDepth; - export = flattenDepth; -} - -declare module "lodash/flip" { - const flip: typeof _.flip; - export = flip; -} - - -declare module "lodash/flow" { - const flow: typeof _.flow; - export = flow; -} - - -declare module "lodash/flowRight" { - const flowRight: typeof _.flowRight; - export = flowRight; -} - - -declare module "lodash/fromPairs" { - const fromPairs: typeof _.fromPairs; - export = fromPairs; -} - - -declare module "lodash/functions" { - const functions: typeof _.functions; - export = functions; -} - - -declare module "lodash/functionsIn" { - const functionsIn: typeof _.functionsIn; - export = functionsIn; -} - - -declare module "lodash/groupBy" { - const groupBy: typeof _.groupBy; - export = groupBy; -} - - -declare module "lodash/initial" { - const initial: typeof _.initial; - export = initial; -} - - -declare module "lodash/intersection" { - const intersection: typeof _.intersection; - export = intersection; -} - - -declare module "lodash/intersectionBy" { - const intersectionBy: typeof _.intersectionBy; - export = intersectionBy; -} - - -declare module "lodash/intersectionWith" { - const intersectionWith: typeof _.intersectionWith; - export = intersectionWith; -} - - -declare module "lodash/invert" { - const invert: typeof _.invert; - export = invert; -} - - -declare module "lodash/invertBy" { - const invertBy: typeof _.invertBy; - export = invertBy; -} - - -declare module "lodash/invokeMap" { - const invokeMap: typeof _.invokeMap; - export = invokeMap; -} - - -declare module "lodash/iteratee" { - const iteratee: typeof _.iteratee; - export = iteratee; -} - - -declare module "lodash/keyBy" { - const keyBy: typeof _.keyBy; - export = keyBy; -} - - -declare module "lodash/keys" { - const keys: typeof _.keys; - export = keys; -} - - -declare module "lodash/keysIn" { - const keysIn: typeof _.keysIn; - export = keysIn; -} - - -declare module "lodash/map" { - const map: typeof _.map; - export = map; -} - - -declare module "lodash/mapKeys" { - const mapKeys: typeof _.mapKeys; - export = mapKeys; -} - - -declare module "lodash/mapValues" { - const mapValues: typeof _.mapValues; - export = mapValues; -} - - -declare module "lodash/matches" { - const matches: typeof _.matches; - export = matches; -} - - -declare module "lodash/matchesProperty" { - const matchesProperty: typeof _.matchesProperty; - export = matchesProperty; -} - - -declare module "lodash/memoize" { - const memoize: typeof _.memoize; - export = memoize; -} - - -declare module "lodash/merge" { - const merge: typeof _.merge; - export = merge; -} - - -declare module "lodash/mergeWith" { - const mergeWith: typeof _.mergeWith; - export = mergeWith; -} - - -declare module "lodash/method" { - const method: typeof _.method; - export = method; -} - - -declare module "lodash/methodOf" { - const methodOf: typeof _.methodOf; - export = methodOf; -} - - -declare module "lodash/mixin" { - const mixin: typeof _.mixin; - export = mixin; -} - - -declare module "lodash/negate" { - const negate: typeof _.negate; - export = negate; -} - - -declare module "lodash/nthArg" { - const nthArg: typeof _.nthArg; - export = nthArg; -} - - -declare module "lodash/omit" { - const omit: typeof _.omit; - export = omit; -} - - -declare module "lodash/omitBy" { - const omitBy: typeof _.omitBy; - export = omitBy; -} - - -declare module "lodash/once" { - const once: typeof _.once; - export = once; -} - - -declare module "lodash/orderBy" { - const orderBy: typeof _.orderBy; - export = orderBy; -} - - -declare module "lodash/over" { - const over: typeof _.over; - export = over; -} - - -declare module "lodash/overArgs" { - const overArgs: typeof _.overArgs; - export = overArgs; -} - - -declare module "lodash/overEvery" { - const overEvery: typeof _.overEvery; - export = overEvery; -} - - -declare module "lodash/overSome" { - const overSome: typeof _.overSome; - export = overSome; -} - - -declare module "lodash/partial" { - const partial: typeof _.partial; - export = partial; -} - - -declare module "lodash/partialRight" { - const partialRight: typeof _.partialRight; - export = partialRight; -} - - -declare module "lodash/partition" { - const partition: typeof _.partition; - export = partition; -} - - -declare module "lodash/pick" { - const pick: typeof _.pick; - export = pick; -} - - -declare module "lodash/pickBy" { - const pickBy: typeof _.pickBy; - export = pickBy; -} - - -declare module "lodash/property" { - const property: typeof _.property; - export = property; -} - - -declare module "lodash/propertyOf" { - const propertyOf: typeof _.propertyOf; - export = propertyOf; -} - - -declare module "lodash/pull" { - const pull: typeof _.pull; - export = pull; -} - - -declare module "lodash/pullAll" { - const pullAll: typeof _.pullAll; - export = pullAll; -} - - -declare module "lodash/pullAllBy" { - const pullAllBy: typeof _.pullAllBy; - export = pullAllBy; -} - -/** -* uncoment it if definition exists -*/ -/* -declare module "lodash/pullAllWith" { - const pullAllWith: typeof _.pullAllWith; - export = pullAllWith; -} -*/ - -declare module "lodash/pullAt" { - const pullAt: typeof _.pullAt; - export = pullAt; -} - - -declare module "lodash/range" { - const range: typeof _.range; - export = range; -} - - -declare module "lodash/rangeRight" { - const rangeRight: typeof _.rangeRight; - export = rangeRight; -} - - -declare module "lodash/rearg" { - const rearg: typeof _.rearg; - export = rearg; -} - - -declare module "lodash/reject" { - const reject: typeof _.reject; - export = reject; -} - - -declare module "lodash/remove" { - const remove: typeof _.remove; - export = remove; -} - - -declare module "lodash/rest" { - const rest: typeof _.rest; - export = rest; -} - - -declare module "lodash/reverse" { - const reverse: typeof _.reverse; - export = reverse; -} - - -declare module "lodash/sampleSize" { - const sampleSize: typeof _.sampleSize; - export = sampleSize; -} - - -declare module "lodash/set" { - const set: typeof _.set; - export = set; -} - - -declare module "lodash/setWith" { - const setWith: typeof _.setWith; - export = setWith; -} - - -declare module "lodash/shuffle" { - const shuffle: typeof _.shuffle; - export = shuffle; -} - - -declare module "lodash/slice" { - const slice: typeof _.slice; - export = slice; -} - - -declare module "lodash/sortBy" { - const sortBy: typeof _.sortBy; - export = sortBy; -} - - -declare module "lodash/sortedUniq" { - const sortedUniq: typeof _.sortedUniq; - export = sortedUniq; -} - - -declare module "lodash/sortedUniqBy" { - const sortedUniqBy: typeof _.sortedUniqBy; - export = sortedUniqBy; -} - - -declare module "lodash/split" { - const split: typeof _.split; - export = split; -} - - -declare module "lodash/spread" { - const spread: typeof _.spread; - export = spread; -} - - -declare module "lodash/tail" { - const tail: typeof _.tail; - export = tail; -} - - -declare module "lodash/take" { - const take: typeof _.take; - export = take; -} - - -declare module "lodash/takeRight" { - const takeRight: typeof _.takeRight; - export = takeRight; -} - - -declare module "lodash/takeRightWhile" { - const takeRightWhile: typeof _.takeRightWhile; - export = takeRightWhile; -} - - -declare module "lodash/takeWhile" { - const takeWhile: typeof _.takeWhile; - export = takeWhile; -} - - -declare module "lodash/tap" { - const tap: typeof _.tap; - export = tap; -} - - -declare module "lodash/throttle" { - const throttle: typeof _.throttle; - export = throttle; -} - - -declare module "lodash/thru" { - const thru: typeof _.thru; - export = thru; -} - - -declare module "lodash/toArray" { - const toArray: typeof _.toArray; - export = toArray; -} - - -declare module "lodash/toPairs" { - const toPairs: typeof _.toPairs; - export = toPairs; -} - - -declare module "lodash/toPairsIn" { - const toPairsIn: typeof _.toPairsIn; - export = toPairsIn; -} - - -declare module "lodash/toPath" { - const toPath: typeof _.toPath; - export = toPath; -} - - -declare module "lodash/toPlainObject" { - const toPlainObject: typeof _.toPlainObject; - export = toPlainObject; -} - - -declare module "lodash/transform" { - const transform: typeof _.transform; - export = transform; -} - - -declare module "lodash/unary" { - const unary: typeof _.unary; - export = unary; -} - - -declare module "lodash/union" { - const union: typeof _.union; - export = union; -} - - -declare module "lodash/unionBy" { - const unionBy: typeof _.unionBy; - export = unionBy; -} - - -declare module "lodash/unionWith" { - const unionWith: typeof _.unionWith; - export = unionWith; -} - - -declare module "lodash/uniq" { - const uniq: typeof _.uniq; - export = uniq; -} - - -declare module "lodash/uniqBy" { - const uniqBy: typeof _.uniqBy; - export = uniqBy; -} - - -declare module "lodash/uniqWith" { - const uniqWith: typeof _.uniqWith; - export = uniqWith; -} - - -declare module "lodash/unset" { - const unset: typeof _.unset; - export = unset; -} - - -declare module "lodash/unzip" { - const unzip: typeof _.unzip; - export = unzip; -} - - -declare module "lodash/unzipWith" { - const unzipWith: typeof _.unzipWith; - export = unzipWith; -} - - -declare module "lodash/update" { - const update: typeof _.update; - export = update; -} - -/** -* uncoment it if definition exists -*/ -/* -declare module "lodash/updateWith" { - const updateWith: typeof _.updateWith; - export = updateWith; -} -*/ - -declare module "lodash/values" { - const values: typeof _.values; - export = values; -} - - -declare module "lodash/valuesIn" { - const valuesIn: typeof _.valuesIn; - export = valuesIn; -} - - -declare module "lodash/without" { - const without: typeof _.without; - export = without; -} - - -declare module "lodash/words" { - const words: typeof _.words; - export = words; -} - - -declare module "lodash/wrap" { - const wrap: typeof _.wrap; - export = wrap; -} - - -declare module "lodash/xor" { - const xor: typeof _.xor; - export = xor; -} - - -declare module "lodash/xorBy" { - const xorBy: typeof _.xorBy; - export = xorBy; -} - - -declare module "lodash/xorWith" { - const xorWith: typeof _.xorWith; - export = xorWith; -} - - -declare module "lodash/zip" { - const zip: typeof _.zip; - export = zip; -} - - -declare module "lodash/zipObject" { - const zipObject: typeof _.zipObject; - export = zipObject; -} - -/** -* uncoment it if definition exists -*/ -/* -declare module "lodash/zipObjectDeep" { - const zipObjectDeep: typeof _.zipObjectDeep; - export = zipObjectDeep; -} -*/ - - -declare module "lodash/zipWith" { - const zipWith: typeof _.zipWith; - export = zipWith; -} - -/** -* uncoment it if definition exists -*/ -/* -declare module "lodash/entries" { - const entries: typeof _.entries; - export = entries; -} -*/ -/** -* uncoment it if definition exists -*/ -/* -declare module "lodash/entriesIn" { - const entriesIn: typeof _.entriesIn; - export = entriesIn; -} -*/ - - -declare module "lodash/extend" { - const extend: typeof _.extend; - export = extend; -} - - -declare module "lodash/extendWith" { - const extendWith: typeof _.extendWith; - export = extendWith; -} - - -declare module "lodash/add" { - const add: typeof _.add; - export = add; -} - - -declare module "lodash/attempt" { - const attempt: typeof _.attempt; - export = attempt; -} - - -declare module "lodash/camelCase" { - const camelCase: typeof _.camelCase; - export = camelCase; -} - - -declare module "lodash/capitalize" { - const capitalize: typeof _.capitalize; - export = capitalize; -} - - -declare module "lodash/ceil" { - const ceil: typeof _.ceil; - export = ceil; -} - - -declare module "lodash/clamp" { - const clamp: typeof _.clamp; - export = clamp; -} - - -declare module "lodash/clone" { - const clone: typeof _.clone; - export = clone; -} - - -declare module "lodash/cloneDeep" { - const cloneDeep: typeof _.cloneDeep; - export = cloneDeep; -} - - -declare module "lodash/cloneDeepWith" { - const cloneDeepWith: typeof _.cloneDeepWith; - export = cloneDeepWith; -} - - -declare module "lodash/cloneWith" { - const cloneWith: typeof _.cloneWith; - export = cloneWith; -} - - -declare module "lodash/deburr" { - const deburr: typeof _.deburr; - export = deburr; -} - -/** -* uncoment it if definition exists -*/ -/* -declare module "lodash/divide" { - const divide: typeof _.divide; - export = divide; -} -*/ - -declare module "lodash/endsWith" { - const endsWith: typeof _.endsWith; - export = endsWith; -} - - -declare module "lodash/eq" { - const eq: typeof _.eq; - export = eq; -} - - -declare module "lodash/escape" { - const escape: typeof _.escape; - export = escape; -} - - -declare module "lodash/escapeRegExp" { - const escapeRegExp: typeof _.escapeRegExp; - export = escapeRegExp; -} - - -declare module "lodash/every" { - const every: typeof _.every; - export = every; -} - - -declare module "lodash/find" { - const find: typeof _.find; - export = find; -} - - -declare module "lodash/findIndex" { - const findIndex: typeof _.findIndex; - export = findIndex; -} - - -declare module "lodash/findKey" { - const findKey: typeof _.findKey; - export = findKey; -} - - -declare module "lodash/findLast" { - const findLast: typeof _.findLast; - export = findLast; -} - - -declare module "lodash/findLastIndex" { - const findLastIndex: typeof _.findLastIndex; - export = findLastIndex; -} - - -declare module "lodash/findLastKey" { - const findLastKey: typeof _.findLastKey; - export = findLastKey; -} - - -declare module "lodash/floor" { - const floor: typeof _.floor; - export = floor; -} - - -declare module "lodash/forEach" { - const forEach: typeof _.forEach; - export = forEach; -} - - -declare module "lodash/forEachRight" { - const forEachRight: typeof _.forEachRight; - export = forEachRight; -} - - -declare module "lodash/forIn" { - const forIn: typeof _.forIn; - export = forIn; -} - - -declare module "lodash/forInRight" { - const forInRight: typeof _.forInRight; - export = forInRight; -} - - -declare module "lodash/forOwn" { - const forOwn: typeof _.forOwn; - export = forOwn; -} - - -declare module "lodash/forOwnRight" { - const forOwnRight: typeof _.forOwnRight; - export = forOwnRight; -} - - -declare module "lodash/get" { - const get: typeof _.get; - export = get; -} - - -declare module "lodash/gt" { - const gt: typeof _.gt; - export = gt; -} - - -declare module "lodash/gte" { - const gte: typeof _.gte; - export = gte; -} - - -declare module "lodash/has" { - const has: typeof _.has; - export = has; -} - - -declare module "lodash/hasIn" { - const hasIn: typeof _.hasIn; - export = hasIn; -} - - -declare module "lodash/head" { - const head: typeof _.head; - export = head; -} - - -declare module "lodash/identity" { - const identity: typeof _.identity; - export = identity; -} - - -declare module "lodash/includes" { - const includes: typeof _.includes; - export = includes; -} - - -declare module "lodash/indexOf" { - const indexOf: typeof _.indexOf; - export = indexOf; -} - - -declare module "lodash/inRange" { - const inRange: typeof _.inRange; - export = inRange; -} - - -declare module "lodash/invoke" { - const invoke: typeof _.invoke; - export = invoke; -} - - -declare module "lodash/isArguments" { - const isArguments: typeof _.isArguments; - export = isArguments; -} - - -declare module "lodash/isArray" { - const isArray: typeof _.isArray; - export = isArray; -} - - -declare module "lodash/isArrayBuffer" { - const isArrayBuffer: typeof _.isArrayBuffer; - export = isArrayBuffer; -} - - -declare module "lodash/isArrayLike" { - const isArrayLike: typeof _.isArrayLike; - export = isArrayLike; -} - - -declare module "lodash/isArrayLikeObject" { - const isArrayLikeObject: typeof _.isArrayLikeObject; - export = isArrayLikeObject; -} - - -declare module "lodash/isBoolean" { - const isBoolean: typeof _.isBoolean; - export = isBoolean; -} - - -declare module "lodash/isBuffer" { - const isBuffer: typeof _.isBuffer; - export = isBuffer; -} - - -declare module "lodash/isDate" { - const isDate: typeof _.isDate; - export = isDate; -} - - -declare module "lodash/isElement" { - const isElement: typeof _.isElement; - export = isElement; -} - - -declare module "lodash/isEmpty" { - const isEmpty: typeof _.isEmpty; - export = isEmpty; -} - - -declare module "lodash/isEqual" { - const isEqual: typeof _.isEqual; - export = isEqual; -} - - -declare module "lodash/isEqualWith" { - const isEqualWith: typeof _.isEqualWith; - export = isEqualWith; -} - - -declare module "lodash/isError" { - const isError: typeof _.isError; - export = isError; -} - - -declare module "lodash/isFinite" { - const isFinite: typeof _.isFinite; - export = isFinite; -} - - -declare module "lodash/isFunction" { - const isFunction: typeof _.isFunction; - export = isFunction; -} - - -declare module "lodash/isInteger" { - const isInteger: typeof _.isInteger; - export = isInteger; -} - - -declare module "lodash/isLength" { - const isLength: typeof _.isLength; - export = isLength; -} - - -declare module "lodash/isMap" { - const isMap: typeof _.isMap; - export = isMap; -} - - -declare module "lodash/isMatch" { - const isMatch: typeof _.isMatch; - export = isMatch; -} - - -declare module "lodash/isMatchWith" { - const isMatchWith: typeof _.isMatchWith; - export = isMatchWith; -} - - -declare module "lodash/isNaN" { - const isNaN: typeof _.isNaN; - export = isNaN; -} - - -declare module "lodash/isNative" { - const isNative: typeof _.isNative; - export = isNative; -} - - -declare module "lodash/isNil" { - const isNil: typeof _.isNil; - export = isNil; -} - - -declare module "lodash/isNull" { - const isNull: typeof _.isNull; - export = isNull; -} - - -declare module "lodash/isNumber" { - const isNumber: typeof _.isNumber; - export = isNumber; -} - - -declare module "lodash/isObject" { - const isObject: typeof _.isObject; - export = isObject; -} - - -declare module "lodash/isObjectLike" { - const isObjectLike: typeof _.isObjectLike; - export = isObjectLike; -} - - -declare module "lodash/isPlainObject" { - const isPlainObject: typeof _.isPlainObject; - export = isPlainObject; -} - - -declare module "lodash/isRegExp" { - const isRegExp: typeof _.isRegExp; - export = isRegExp; -} - - -declare module "lodash/isSafeInteger" { - const isSafeInteger: typeof _.isSafeInteger; - export = isSafeInteger; -} - - -declare module "lodash/isSet" { - const isSet: typeof _.isSet; - export = isSet; -} - - -declare module "lodash/isString" { - const isString: typeof _.isString; - export = isString; -} - - -declare module "lodash/isSymbol" { - const isSymbol: typeof _.isSymbol; - export = isSymbol; -} - - -declare module "lodash/isTypedArray" { - const isTypedArray: typeof _.isTypedArray; - export = isTypedArray; -} - - -declare module "lodash/isUndefined" { - const isUndefined: typeof _.isUndefined; - export = isUndefined; -} - - -declare module "lodash/isWeakMap" { - const isWeakMap: typeof _.isWeakMap; - export = isWeakMap; -} - - -declare module "lodash/isWeakSet" { - const isWeakSet: typeof _.isWeakSet; - export = isWeakSet; -} - - -declare module "lodash/join" { - const join: typeof _.join; - export = join; -} - - -declare module "lodash/kebabCase" { - const kebabCase: typeof _.kebabCase; - export = kebabCase; -} - - -declare module "lodash/last" { - const last: typeof _.last; - export = last; -} - - -declare module "lodash/lastIndexOf" { - const lastIndexOf: typeof _.lastIndexOf; - export = lastIndexOf; -} - - -declare module "lodash/lowerCase" { - const lowerCase: typeof _.lowerCase; - export = lowerCase; -} - - -declare module "lodash/lowerFirst" { - const lowerFirst: typeof _.lowerFirst; - export = lowerFirst; -} - - -declare module "lodash/lt" { - const lt: typeof _.lt; - export = lt; -} - - -declare module "lodash/lte" { - const lte: typeof _.lte; - export = lte; -} - - -declare module "lodash/max" { - const max: typeof _.max; - export = max; -} - - -declare module "lodash/maxBy" { - const maxBy: typeof _.maxBy; - export = maxBy; -} - - -declare module "lodash/mean" { - const mean: typeof _.mean; - export = mean; -} - -/** -* uncoment it if definition exists -*/ -/* -declare module "lodash/meanBy" { - const meanBy: typeof _.meanBy; - export = meanBy; -} -*/ - -declare module "lodash/min" { - const min: typeof _.min; - export = min; -} - - -declare module "lodash/minBy" { - const minBy: typeof _.minBy; - export = minBy; -} - -/** -* uncoment it if definition exists -*/ -/* -declare module "lodash/multiply" { - const multiply: typeof _.multiply; - export = multiply; -} -*/ - -/** -* uncoment it if definition exists -*/ -/* -declare module "lodash/nth" { - const nth: typeof _.nth; - export = nth; -} -*/ - -declare module "lodash/noConflict" { - const noConflict: typeof _.noConflict; - export = noConflict; -} - - -declare module "lodash/noop" { - const noop: typeof _.noop; - export = noop; -} - - -declare module "lodash/now" { - const now: typeof _.now; - export = now; -} - - -declare module "lodash/pad" { - const pad: typeof _.pad; - export = pad; -} - - -declare module "lodash/padEnd" { - const padEnd: typeof _.padEnd; - export = padEnd; -} - - -declare module "lodash/padStart" { - const padStart: typeof _.padStart; - export = padStart; -} - - -declare module "lodash/parseInt" { - const parseInt: typeof _.parseInt; - export = parseInt; -} - - -declare module "lodash/random" { - const random: typeof _.random; - export = random; -} - - -declare module "lodash/reduce" { - const reduce: typeof _.reduce; - export = reduce; -} - - -declare module "lodash/reduceRight" { - const reduceRight: typeof _.reduceRight; - export = reduceRight; -} - - -declare module "lodash/repeat" { - const repeat: typeof _.repeat; - export = repeat; -} - - -declare module "lodash/replace" { - const replace: typeof _.replace; - export = replace; -} - - -declare module "lodash/result" { - const result: typeof _.result; - export = result; -} - - -declare module "lodash/round" { - const round: typeof _.round; - export = round; -} - - -declare module "lodash/runInContext" { - const runInContext: typeof _.runInContext; - export = runInContext; -} - - -declare module "lodash/sample" { - const sample: typeof _.sample; - export = sample; -} - - -declare module "lodash/size" { - const size: typeof _.size; - export = size; -} - - -declare module "lodash/snakeCase" { - const snakeCase: typeof _.snakeCase; - export = snakeCase; -} - - -declare module "lodash/some" { - const some: typeof _.some; - export = some; -} - - -declare module "lodash/sortedIndex" { - const sortedIndex: typeof _.sortedIndex; - export = sortedIndex; -} - - -declare module "lodash/sortedIndexBy" { - const sortedIndexBy: typeof _.sortedIndexBy; - export = sortedIndexBy; -} - - -declare module "lodash/sortedIndexOf" { - const sortedIndexOf: typeof _.sortedIndexOf; - export = sortedIndexOf; -} - - -declare module "lodash/sortedLastIndex" { - const sortedLastIndex: typeof _.sortedLastIndex; - export = sortedLastIndex; -} - - -declare module "lodash/sortedLastIndexBy" { - const sortedLastIndexBy: typeof _.sortedLastIndexBy; - export = sortedLastIndexBy; -} - - -declare module "lodash/sortedLastIndexOf" { - const sortedLastIndexOf: typeof _.sortedLastIndexOf; - export = sortedLastIndexOf; -} - - -declare module "lodash/startCase" { - const startCase: typeof _.startCase; - export = startCase; -} - - -declare module "lodash/startsWith" { - const startsWith: typeof _.startsWith; - export = startsWith; -} - - -declare module "lodash/subtract" { - const subtract: typeof _.subtract; - export = subtract; -} - - -declare module "lodash/sum" { - const sum: typeof _.sum; - export = sum; -} - - -declare module "lodash/sumBy" { - const sumBy: typeof _.sumBy; - export = sumBy; -} - - -declare module "lodash/template" { - const template: typeof _.template; - export = template; -} - - -declare module "lodash/times" { - const times: typeof _.times; - export = times; -} - - -declare module "lodash/toInteger" { - const toInteger: typeof _.toInteger; - export = toInteger; -} - - -declare module "lodash/toLength" { - const toLength: typeof _.toLength; - export = toLength; -} - - -declare module "lodash/toLower" { - const toLower: typeof _.toLower; - export = toLower; -} - - -declare module "lodash/toNumber" { - const toNumber: typeof _.toNumber; - export = toNumber; -} - - -declare module "lodash/toSafeInteger" { - const toSafeInteger: typeof _.toSafeInteger; - export = toSafeInteger; -} - - -declare module "lodash/toString" { - const toString: typeof _.toString; - export = toString; -} - - -declare module "lodash/toUpper" { - const toUpper: typeof _.toUpper; - export = toUpper; -} - - -declare module "lodash/trim" { - const trim: typeof _.trim; - export = trim; -} - - -declare module "lodash/trimEnd" { - const trimEnd: typeof _.trimEnd; - export = trimEnd; -} - - -declare module "lodash/trimStart" { - const trimStart: typeof _.trimStart; - export = trimStart; -} - - -declare module "lodash/truncate" { - const truncate: typeof _.truncate; - export = truncate; -} - - -declare module "lodash/unescape" { - const unescape: typeof _.unescape; - export = unescape; -} - - -declare module "lodash/uniqueId" { - const uniqueId: typeof _.uniqueId; - export = uniqueId; -} - - -declare module "lodash/upperCase" { - const upperCase: typeof _.upperCase; - export = upperCase; -} - - -declare module "lodash/upperFirst" { - const upperFirst: typeof _.upperFirst; - export = upperFirst; -} - - -declare module "lodash/each" { - const each: typeof _.each; - export = each; -} - - -declare module "lodash/eachRight" { - const eachRight: typeof _.eachRight; - export = eachRight; -} - - -declare module "lodash/first" { - const first: typeof _.first; - export = first; -} - -declare module "lodash/fp" { - export = _; -} +} declare module "lodash" { export = _; } - -// Backward compatibility with --target es5 -interface Set {} -interface Map {} -interface WeakSet {} -interface WeakMap {} diff --git a/typings/minimatch/minimatch.d.ts b/typings/minimatch/minimatch.d.ts index 5a6c7215..697f9e21 100644 --- a/typings/minimatch/minimatch.d.ts +++ b/typings/minimatch/minimatch.d.ts @@ -1,64 +1,47 @@ -// Type definitions for Minimatch 2.0.8 +// Type definitions for Minimatch 1.0.0 // Project: https://github.com/isaacs/minimatch // Definitions by: vvakame -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// Definitions: https://github.com/borisyankov/DefinitelyTyped declare module "minimatch" { - function M(target: string, pattern: string, options?: M.IOptions): boolean; + function M(target:string, pattern:string, options?:M.IOptions): boolean; - namespace M { - function match(list: string[], pattern: string, options?: IOptions): string[]; - function filter(pattern: string, options?: IOptions): (element: string, indexed: number, array: string[]) => boolean; - function makeRe(pattern: string, options?: IOptions): RegExp; + module M { + function match(filenames:string[], pattern:string, options?:IOptions):string[]; + function filter(pattern:string, options?:IOptions): (target: string) => boolean; - var Minimatch: IMinimatchStatic; + var Minimatch:IMinimatchStatic; interface IOptions { - debug?: boolean; - nobrace?: boolean; - noglobstar?: boolean; - dot?: boolean; - noext?: boolean; - nocase?: boolean; - nonull?: boolean; - matchBase?: boolean; - nocomment?: boolean; - nonegate?: boolean; - flipNegate?: boolean; + debug?:boolean; + nobrace?:boolean; + noglobstar?:boolean; + dot?:boolean; + noext?:boolean; + nocase?:boolean; + nonull?:boolean; + matchBase?:boolean; + nocomment?:boolean; + nonegate?:boolean; + flipNegate?:boolean; } interface IMinimatchStatic { - new (pattern: string, options?: IOptions): IMinimatch; - prototype: IMinimatch; + new (pattern:string, options?:IOptions):IMinimatch; } interface IMinimatch { - pattern: string; - options: IOptions; - /** 2-dimensional array of regexp or string expressions. */ - set: any[][]; // (RegExp | string)[][] - regexp: RegExp; - negate: boolean; - comment: boolean; - empty: boolean; - - makeRe(): RegExp; // regexp or boolean - match(fname: string): boolean; - matchOne(files: string[], pattern: string[], partial: boolean): boolean; - - /** Deprecated. For internal use. */ - debug(): void; - /** Deprecated. For internal use. */ - make(): void; - /** Deprecated. For internal use. */ - parseNegate(): void; - /** Deprecated. For internal use. */ - braceExpand(pattern: string, options: IOptions): void; - /** Deprecated. For internal use. */ - parse(pattern: string, isSub?: boolean): void; + debug():void; + make():void; + parseNegate():void; + braceExpand(pattern:string, options:IOptions):void; + parse(pattern:string, isSub?:boolean):void; + makeRe():RegExp; // regexp or boolean + match(file:string):boolean; + matchOne(files:string[], pattern:string[], partial:any):boolean; } } - export = M; +export = M; } diff --git a/typings/minimist/minimist.d.ts b/typings/minimist/minimist.d.ts new file mode 100644 index 00000000..abbc5f02 --- /dev/null +++ b/typings/minimist/minimist.d.ts @@ -0,0 +1,38 @@ +// Type definitions for minimist 1.1.3 +// Project: https://github.com/substack/minimist +// Definitions by: Bart van der Schoor , Necroskillz +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare module 'minimist' { + function minimist(args?: string[], opts?: minimist.Opts): minimist.ParsedArgs; + + module minimist { + export interface Opts { + // a string or array of strings argument names to always treat as strings + // string?: string; + string?: string|string[]; + // a string or array of strings to always treat as booleans + // boolean?: string; + boolean?: boolean|string|string[]; + // an object mapping string names to strings or arrays of string argument names to use + // alias?: {[key:string]: string}; + alias?: {[key:string]: string[]}; + // an object mapping string argument names to default values + default?: {[key:string]: any}; + // when true, populate argv._ with everything after the first non-option + stopEarly?: boolean; + // a function which is invoked with a command line parameter not defined in the opts configuration object. + // If the function returns false, the unknown option is not added to argv + unknown?: (arg: string) => boolean; + // when true, populate argv._ with everything before the -- and argv['--'] with everything after the -- + '--'?: boolean; + } + + export interface ParsedArgs { + [arg: string]: any; + _: string[]; + } + } + + export = minimist; +} diff --git a/typings/mkdirp/mkdirp.d.ts b/typings/mkdirp/mkdirp.d.ts index cd635ab4..c3fca38a 100644 --- a/typings/mkdirp/mkdirp.d.ts +++ b/typings/mkdirp/mkdirp.d.ts @@ -1,14 +1,14 @@ // Type definitions for mkdirp 0.3.0 // Project: http://github.com/substack/node-mkdirp // Definitions by: Bart van der Schoor -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// Definitions: https://github.com/borisyankov/DefinitelyTyped declare module 'mkdirp' { function mkdirp(dir: string, cb: (err: any, made: string) => void): void; function mkdirp(dir: string, flags: any, cb: (err: any, made: string) => void): void; - namespace mkdirp { + module mkdirp { function sync(dir: string, flags?: any): string; } export = mkdirp; diff --git a/typings/mocha/mocha.d.ts b/typings/mocha/mocha.d.ts new file mode 100644 index 00000000..88dc359f --- /dev/null +++ b/typings/mocha/mocha.d.ts @@ -0,0 +1,214 @@ +// Type definitions for mocha 2.2.5 +// Project: http://mochajs.org/ +// Definitions by: Kazi Manzur Rashid , otiai10 , jt000 , Vadim Macagon +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +interface MochaSetupOptions { + //milliseconds to wait before considering a test slow + slow?: number; + + // timeout in milliseconds + timeout?: number; + + // ui name "bdd", "tdd", "exports" etc + ui?: string; + + //array of accepted globals + globals?: any[]; + + // reporter instance (function or string), defaults to `mocha.reporters.Spec` + reporter?: any; + + // bail on the first test failure + bail?: boolean; + + // ignore global leaks + ignoreLeaks?: boolean; + + // grep string or regexp to filter tests with + grep?: any; +} + +interface MochaDone { + (error?: Error): void; +} + +declare var mocha: Mocha; +declare var describe: Mocha.IContextDefinition; +declare var xdescribe: Mocha.IContextDefinition; +// alias for `describe` +declare var context: Mocha.IContextDefinition; +// alias for `describe` +declare var suite: Mocha.IContextDefinition; +declare var it: Mocha.ITestDefinition; +declare var xit: Mocha.ITestDefinition; +// alias for `it` +declare var test: Mocha.ITestDefinition; + +declare function before(action: () => void): void; + +declare function before(action: (done: MochaDone) => void): void; + +declare function setup(action: () => void): void; + +declare function setup(action: (done: MochaDone) => void): void; + +declare function after(action: () => void): void; + +declare function after(action: (done: MochaDone) => void): void; + +declare function teardown(action: () => void): void; + +declare function teardown(action: (done: MochaDone) => void): void; + +declare function beforeEach(action: () => void): void; + +declare function beforeEach(action: (done: MochaDone) => void): void; + +declare function suiteSetup(action: () => void): void; + +declare function suiteSetup(action: (done: MochaDone) => void): void; + +declare function afterEach(action: () => void): void; + +declare function afterEach(action: (done: MochaDone) => void): void; + +declare function suiteTeardown(action: () => void): void; + +declare function suiteTeardown(action: (done: MochaDone) => void): void; + +declare class Mocha { + constructor(options?: { + grep?: RegExp; + ui?: string; + reporter?: string; + timeout?: number; + bail?: boolean; + }); + + /** Setup mocha with the given options. */ + setup(options: MochaSetupOptions): Mocha; + bail(value?: boolean): Mocha; + addFile(file: string): Mocha; + /** Sets reporter by name, defaults to "spec". */ + reporter(name: string): Mocha; + /** Sets reporter constructor, defaults to mocha.reporters.Spec. */ + reporter(reporter: (runner: Mocha.IRunner, options: any) => any): Mocha; + ui(value: string): Mocha; + grep(value: string): Mocha; + grep(value: RegExp): Mocha; + invert(): Mocha; + ignoreLeaks(value: boolean): Mocha; + checkLeaks(): Mocha; + /** Enables growl support. */ + growl(): Mocha; + globals(value: string): Mocha; + globals(values: string[]): Mocha; + useColors(value: boolean): Mocha; + useInlineDiffs(value: boolean): Mocha; + timeout(value: number): Mocha; + slow(value: number): Mocha; + enableTimeouts(value: boolean): Mocha; + asyncOnly(value: boolean): Mocha; + noHighlighting(value: boolean): Mocha; + /** Runs tests and invokes `onComplete()` when finished. */ + run(onComplete?: (failures: number) => void): Mocha.IRunner; +} + +// merge the Mocha class declaration with a module +declare module Mocha { + /** Partial interface for Mocha's `Runnable` class. */ + interface IRunnable { + title: string; + fn: Function; + async: boolean; + sync: boolean; + timedOut: boolean; + } + + /** Partial interface for Mocha's `Suite` class. */ + interface ISuite { + parent: ISuite; + title: string; + + fullTitle(): string; + } + + /** Partial interface for Mocha's `Test` class. */ + interface ITest extends IRunnable { + parent: ISuite; + pending: boolean; + + fullTitle(): string; + } + + /** Partial interface for Mocha's `Runner` class. */ + interface IRunner {} + + interface IContextDefinition { + (description: string, spec: () => void): ISuite; + only(description: string, spec: () => void): ISuite; + skip(description: string, spec: () => void): void; + timeout(ms: number): void; + } + + interface ITestDefinition { + (expectation: string, assertion?: () => void): ITest; + (expectation: string, assertion?: (done: MochaDone) => void): ITest; + only(expectation: string, assertion?: () => void): ITest; + only(expectation: string, assertion?: (done: MochaDone) => void): ITest; + skip(expectation: string, assertion?: () => void): void; + skip(expectation: string, assertion?: (done: MochaDone) => void): void; + timeout(ms: number): void; + } + + export module reporters { + export class Base { + stats: { + suites: number; + tests: number; + passes: number; + pending: number; + failures: number; + }; + + constructor(runner: IRunner); + } + + export class Doc extends Base {} + export class Dot extends Base {} + export class HTML extends Base {} + export class HTMLCov extends Base {} + export class JSON extends Base {} + export class JSONCov extends Base {} + export class JSONStream extends Base {} + export class Landing extends Base {} + export class List extends Base {} + export class Markdown extends Base {} + export class Min extends Base {} + export class Nyan extends Base {} + export class Progress extends Base { + /** + * @param options.open String used to indicate the start of the progress bar. + * @param options.complete String used to indicate a complete test on the progress bar. + * @param options.incomplete String used to indicate an incomplete test on the progress bar. + * @param options.close String used to indicate the end of the progress bar. + */ + constructor(runner: IRunner, options?: { + open?: string; + complete?: string; + incomplete?: string; + close?: string; + }); + } + export class Spec extends Base {} + export class TAP extends Base {} + export class XUnit extends Base { + constructor(runner: IRunner, options?: any); + } + } +} + +declare module "mocha" { + export = Mocha; +} diff --git a/typings/node-uuid/node-uuid-base.d.ts b/typings/node-uuid/node-uuid-base.d.ts index fc59e9c7..255bb6b3 100644 --- a/typings/node-uuid/node-uuid-base.d.ts +++ b/typings/node-uuid/node-uuid-base.d.ts @@ -1,7 +1,7 @@ // Type definitions for node-uuid.js // Project: https://github.com/broofa/node-uuid // Definitions by: Jeff May -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// Definitions: https://github.com/borisyankov/DefinitelyTyped /** Common definitions for all environments */ declare namespace __NodeUUID { @@ -36,6 +36,12 @@ declare namespace __NodeUUID { v1(options?: UUIDOptions): string; v1(options?: UUIDOptions, buffer?: number[], offset?: number): number[]; + v2(options?: UUIDOptions): string; + v2(options?: UUIDOptions, buffer?: number[], offset?: number): number[]; + + v3(options?: UUIDOptions): string; + v3(options?: UUIDOptions, buffer?: number[], offset?: number): number[]; + v4(options?: UUIDOptions): string; v4(options?: UUIDOptions, buffer?: number[], offset?: number): number[]; diff --git a/typings/node-uuid/node-uuid-cjs.d.ts b/typings/node-uuid/node-uuid-cjs.d.ts index 78f75354..3c3a042e 100644 --- a/typings/node-uuid/node-uuid-cjs.d.ts +++ b/typings/node-uuid/node-uuid-cjs.d.ts @@ -1,9 +1,9 @@ // Type definitions for node-uuid.js // Project: https://github.com/broofa/node-uuid // Definitions by: Jeff May -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// Definitions: https://github.com/borisyankov/DefinitelyTyped + -/// /** * Expose as CommonJS module diff --git a/typings/node-uuid/node-uuid.d.ts b/typings/node-uuid/node-uuid.d.ts index a6737053..3105cdb1 100644 --- a/typings/node-uuid/node-uuid.d.ts +++ b/typings/node-uuid/node-uuid.d.ts @@ -1,11 +1,11 @@ // Type definitions for node-uuid.js // Project: https://github.com/broofa/node-uuid // Definitions by: Jeff May -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// Definitions: https://github.com/borisyankov/DefinitelyTyped + + + -/// -/// -/// /** * Definitions for use in node environment @@ -23,6 +23,14 @@ declare module __NodeUUID { v1(options?: UUIDOptions, buffer?: number[], offset?: number): number[]; v1(options?: UUIDOptions, buffer?: Buffer, offset?: number): Buffer; + v2(options?: UUIDOptions): string; + v2(options?: UUIDOptions, buffer?: number[], offset?: number): number[]; + v2(options?: UUIDOptions, buffer?: Buffer, offset?: number): Buffer; + + v3(options?: UUIDOptions): string; + v3(options?: UUIDOptions, buffer?: number[], offset?: number): number[]; + v3(options?: UUIDOptions, buffer?: Buffer, offset?: number): Buffer; + v4(options?: UUIDOptions): string; v4(options?: UUIDOptions, buffer?: number[], offset?: number): number[]; v4(options?: UUIDOptions, buffer?: Buffer, offset?: number): Buffer; diff --git a/typings/node/node.d.ts b/typings/node/node.d.ts index c3d9d2e1..1b661d8f 100644 --- a/typings/node/node.d.ts +++ b/typings/node/node.d.ts @@ -1,30 +1,21 @@ -// Type definitions for Node.js v6.x +// Type definitions for Node.js v0.12.0 // Project: http://nodejs.org/ -// Definitions by: Microsoft TypeScript , DefinitelyTyped -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// Definitions by: Microsoft TypeScript , DefinitelyTyped +// Definitions: https://github.com/borisyankov/DefinitelyTyped /************************************************ * * -* Node.js v6.x API * +* Node.js v0.12.0 API * * * ************************************************/ -interface Error { - stack?: string; -} - -interface ErrorConstructor { - captureStackTrace(targetObject: Object, constructorOpt?: Function): void; - stackTraceLimit: number; -} - -// compat for TypeScript 1.8 +// compat for TypeScript 1.5.3 // if you use with --target es3 or --target es5 and use below definitions, -// use the lib.es6.d.ts that is bundled with TypeScript 1.8. -interface MapConstructor { } -interface WeakMapConstructor { } -interface SetConstructor { } -interface WeakSetConstructor { } +// use the lib.es6.d.ts that is bundled with TypeScript 1.5.3. +interface MapConstructor {} +interface WeakMapConstructor {} +interface SetConstructor {} +interface WeakSetConstructor {} /************************************************ * * @@ -36,7 +27,6 @@ declare var global: NodeJS.Global; declare var __filename: string; declare var __dirname: string; -declare var console: any; declare function setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timer; declare function clearTimeout(timeoutId: NodeJS.Timer): void; @@ -50,7 +40,7 @@ interface NodeRequireFunction { } interface NodeRequire extends NodeRequireFunction { - resolve(id: string): string; + resolve(id:string): string; cache: any; extensions: any; main: any; @@ -85,8 +75,7 @@ declare var SlowBuffer: { // Buffer class -type BufferEncoding = "ascii" | "utf8" | "utf16le" | "ucs2" | "binary" | "hex"; -interface Buffer extends NodeBuffer { } +interface Buffer extends NodeBuffer {} /** * Raw data is stored in instances of the Buffer class. @@ -113,64 +102,19 @@ declare var Buffer: { * @param array The octets to store. */ new (array: Uint8Array): Buffer; - /** - * Produces a Buffer backed by the same allocated memory as - * the given {ArrayBuffer}. - * - * - * @param arrayBuffer The ArrayBuffer with which to share memory. - */ - new (arrayBuffer: ArrayBuffer): Buffer; /** * Allocates a new buffer containing the given {array} of octets. * * @param array The octets to store. */ new (array: any[]): Buffer; - /** - * Copies the passed {buffer} data onto a new {Buffer} instance. - * - * @param buffer The buffer to copy. - */ - new (buffer: Buffer): Buffer; prototype: Buffer; - /** - * Allocates a new Buffer using an {array} of octets. - * - * @param array - */ - from(array: any[]): Buffer; - /** - * When passed a reference to the .buffer property of a TypedArray instance, - * the newly created Buffer will share the same allocated memory as the TypedArray. - * The optional {byteOffset} and {length} arguments specify a memory range - * within the {arrayBuffer} that will be shared by the Buffer. - * - * @param arrayBuffer The .buffer property of a TypedArray or a new ArrayBuffer() - * @param byteOffset - * @param length - */ - from(arrayBuffer: ArrayBuffer, byteOffset?: number, length?: number): Buffer; - /** - * Copies the passed {buffer} data onto a new Buffer instance. - * - * @param buffer - */ - from(buffer: Buffer): Buffer; - /** - * Creates a new Buffer containing the given JavaScript string {str}. - * If provided, the {encoding} parameter identifies the character encoding. - * If not provided, {encoding} defaults to 'utf8'. - * - * @param str - */ - from(str: string, encoding?: string): Buffer; /** * Returns true if {obj} is a Buffer * * @param obj object to test. */ - isBuffer(obj: any): obj is Buffer; + isBuffer(obj: any): boolean; /** * Returns true if {encoding} is a valid encoding argument. * Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex' @@ -202,29 +146,6 @@ declare var Buffer: { * The same as buf1.compare(buf2). */ compare(buf1: Buffer, buf2: Buffer): number; - /** - * Allocates a new buffer of {size} octets. - * - * @param size count of octets to allocate. - * @param fill if specified, buffer will be initialized by calling buf.fill(fill). - * If parameter is omitted, buffer will be filled with zeros. - * @param encoding encoding used for call to buf.fill while initalizing - */ - alloc(size: number, fill?: string | Buffer | number, encoding?: string): Buffer; - /** - * Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents - * of the newly created Buffer are unknown and may contain sensitive data. - * - * @param size count of octets to allocate - */ - allocUnsafe(size: number): Buffer; - /** - * Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents - * of the newly created Buffer are unknown and may contain sensitive data. - * - * @param size count of octets to allocate - */ - allocUnsafeSlow(size: number): Buffer; }; /************************************************ @@ -232,38 +153,32 @@ declare var Buffer: { * GLOBAL INTERFACES * * * ************************************************/ -declare namespace NodeJS { +declare module NodeJS { export interface ErrnoException extends Error { - errno?: string; + errno?: number; code?: string; path?: string; syscall?: string; stack?: string; } - export class EventEmitter { - addListener(event: string | symbol, listener: Function): this; - on(event: string | symbol, listener: Function): this; - once(event: string | symbol, listener: Function): this; - removeListener(event: string | symbol, listener: Function): this; - removeAllListeners(event?: string | symbol): this; - setMaxListeners(n: number): this; - getMaxListeners(): number; - listeners(event: string | symbol): Function[]; - emit(event: string | symbol, ...args: any[]): boolean; - listenerCount(type: string | symbol): number; - // Added in Node 6... - prependListener(event: string | symbol, listener: Function): this; - prependOnceListener(event: string | symbol, listener: Function): this; - eventNames(): (string | symbol)[]; + export interface EventEmitter { + addListener(event: string, listener: Function): EventEmitter; + on(event: string, listener: Function): EventEmitter; + once(event: string, listener: Function): EventEmitter; + removeListener(event: string, listener: Function): EventEmitter; + removeAllListeners(event?: string): EventEmitter; + setMaxListeners(n: number): void; + listeners(event: string): Function[]; + emit(event: string, ...args: any[]): boolean; } export interface ReadableStream extends EventEmitter { readable: boolean; - read(size?: number): string | Buffer; + read(size?: number): string|Buffer; setEncoding(encoding: string): void; - pause(): ReadableStream; - resume(): ReadableStream; + pause(): void; + resume(): void; pipe(destination: T, options?: { end?: boolean; }): T; unpipe(destination?: T): void; unshift(chunk: string): void; @@ -273,7 +188,8 @@ declare namespace NodeJS { export interface WritableStream extends EventEmitter { writable: boolean; - write(buffer: Buffer | string, cb?: Function): boolean; + write(buffer: Buffer, cb?: Function): boolean; + write(str: string, cb?: Function): boolean; write(str: string, encoding?: string, cb?: Function): boolean; end(): void; end(buffer: Buffer, cb?: Function): void; @@ -281,58 +197,19 @@ declare namespace NodeJS { end(str: string, encoding?: string, cb?: Function): void; } - export interface ReadWriteStream extends ReadableStream, WritableStream { - pause(): ReadWriteStream; - resume(): ReadWriteStream; - } - - export interface Events extends EventEmitter { } - - export interface Domain extends Events { - run(fn: Function): void; - add(emitter: Events): void; - remove(emitter: Events): void; - bind(cb: (err: Error, data: any) => any): any; - intercept(cb: (data: any) => any): any; - dispose(): void; - - addListener(event: string, listener: Function): this; - on(event: string, listener: Function): this; - once(event: string, listener: Function): this; - removeListener(event: string, listener: Function): this; - removeAllListeners(event?: string): this; - } - - export interface MemoryUsage { - rss: number; - heapTotal: number; - heapUsed: number; - } - - export interface ProcessVersions { - http_parser: string; - node: string; - v8: string; - ares: string; - uv: string; - zlib: string; - modules: string; - openssl: string; - } + export interface ReadWriteStream extends ReadableStream, WritableStream {} export interface Process extends EventEmitter { stdout: WritableStream; stderr: WritableStream; stdin: ReadableStream; argv: string[]; - execArgv: string[]; execPath: string; abort(): void; chdir(directory: string): void; cwd(): string; env: any; exit(code?: number): void; - exitCode: number; getgid(): number; setgid(id: number): void; setgid(id: string): void; @@ -340,7 +217,15 @@ declare namespace NodeJS { setuid(id: number): void; setuid(id: string): void; version: string; - versions: ProcessVersions; + versions: { + http_parser: string; + node: string; + v8: string; + ares: string; + uv: string; + zlib: string; + openssl: string; + }; config: { target_defaults: { cflags: any[]; @@ -367,22 +252,19 @@ declare namespace NodeJS { visibility: string; }; }; - kill(pid: number, signal?: string | number): void; + kill(pid: number, signal?: string): void; pid: number; title: string; arch: string; platform: string; - memoryUsage(): MemoryUsage; - nextTick(callback: Function, ...args: any[]): void; + memoryUsage(): { rss: number; heapTotal: number; heapUsed: number; }; + nextTick(callback: Function): void; umask(mask?: number): number; uptime(): number; - hrtime(time?: number[]): number[]; - domain: Domain; + hrtime(time?:number[]): number[]; // Worker send?(message: any, sendHandle?: any): void; - disconnect(): void; - connected: boolean; } export interface Global { @@ -448,26 +330,25 @@ declare namespace NodeJS { undefined: typeof undefined; unescape: (str: string) => string; gc: () => void; - v8debug?: any; } export interface Timer { - ref(): void; - unref(): void; + ref() : void; + unref() : void; } } -interface IterableIterator { } - /** * @deprecated */ -interface NodeBuffer extends Uint8Array { +interface NodeBuffer { + [index: number]: number; write(string: string, offset?: number, length?: number, encoding?: string): number; toString(encoding?: string, start?: number, end?: number): string; - toJSON(): { type: 'Buffer', data: any[] }; + toJSON(): any; + length: number; equals(otherBuffer: Buffer): boolean; - compare(otherBuffer: Buffer, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number; + compare(otherBuffer: Buffer): number; copy(targetBuffer: Buffer, targetStart?: number, sourceStart?: number, sourceEnd?: number): number; slice(start?: number, end?: number): Buffer; writeUIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; @@ -478,7 +359,7 @@ interface NodeBuffer extends Uint8Array { readUIntBE(offset: number, byteLength: number, noAssert?: boolean): number; readIntLE(offset: number, byteLength: number, noAssert?: boolean): number; readIntBE(offset: number, byteLength: number, noAssert?: boolean): number; - readUInt8(offset: number, noAssert?: boolean): number; + readUInt8(offset: number, noAsset?: boolean): number; readUInt16LE(offset: number, noAssert?: boolean): number; readUInt16BE(offset: number, noAssert?: boolean): number; readUInt32LE(offset: number, noAssert?: boolean): number; @@ -492,30 +373,21 @@ interface NodeBuffer extends Uint8Array { readFloatBE(offset: number, noAssert?: boolean): number; readDoubleLE(offset: number, noAssert?: boolean): number; readDoubleBE(offset: number, noAssert?: boolean): number; - swap16(): Buffer; - swap32(): Buffer; - swap64(): Buffer; - writeUInt8(value: number, offset: number, noAssert?: boolean): number; - writeUInt16LE(value: number, offset: number, noAssert?: boolean): number; - writeUInt16BE(value: number, offset: number, noAssert?: boolean): number; - writeUInt32LE(value: number, offset: number, noAssert?: boolean): number; - writeUInt32BE(value: number, offset: number, noAssert?: boolean): number; - writeInt8(value: number, offset: number, noAssert?: boolean): number; - writeInt16LE(value: number, offset: number, noAssert?: boolean): number; - writeInt16BE(value: number, offset: number, noAssert?: boolean): number; - writeInt32LE(value: number, offset: number, noAssert?: boolean): number; - writeInt32BE(value: number, offset: number, noAssert?: boolean): number; - writeFloatLE(value: number, offset: number, noAssert?: boolean): number; - writeFloatBE(value: number, offset: number, noAssert?: boolean): number; - writeDoubleLE(value: number, offset: number, noAssert?: boolean): number; - writeDoubleBE(value: number, offset: number, noAssert?: boolean): number; - fill(value: any, offset?: number, end?: number): this; - indexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; - lastIndexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; - entries(): IterableIterator<[number, number]>; - includes(value: string | number | Buffer, byteOffset?: number, encoding?: string): boolean; - keys(): IterableIterator; - values(): IterableIterator; + writeUInt8(value: number, offset: number, noAssert?: boolean): void; + writeUInt16LE(value: number, offset: number, noAssert?: boolean): void; + writeUInt16BE(value: number, offset: number, noAssert?: boolean): void; + writeUInt32LE(value: number, offset: number, noAssert?: boolean): void; + writeUInt32BE(value: number, offset: number, noAssert?: boolean): void; + writeInt8(value: number, offset: number, noAssert?: boolean): void; + writeInt16LE(value: number, offset: number, noAssert?: boolean): void; + writeInt16BE(value: number, offset: number, noAssert?: boolean): void; + writeInt32LE(value: number, offset: number, noAssert?: boolean): void; + writeInt32BE(value: number, offset: number, noAssert?: boolean): void; + writeFloatLE(value: number, offset: number, noAssert?: boolean): void; + writeFloatBE(value: number, offset: number, noAssert?: boolean): void; + writeDoubleLE(value: number, offset: number, noAssert?: boolean): void; + writeDoubleBE(value: number, offset: number, noAssert?: boolean): void; + fill(value: any, offset?: number, end?: number): void; } /************************************************ @@ -525,48 +397,28 @@ interface NodeBuffer extends Uint8Array { ************************************************/ declare module "buffer" { export var INSPECT_MAX_BYTES: number; - var BuffType: typeof Buffer; - var SlowBuffType: typeof SlowBuffer; - export { BuffType as Buffer, SlowBuffType as SlowBuffer }; } declare module "querystring" { - export interface StringifyOptions { - encodeURIComponent?: Function; - } - - export interface ParseOptions { - maxKeys?: number; - decodeURIComponent?: Function; - } - - export function stringify(obj: T, sep?: string, eq?: string, options?: StringifyOptions): string; - export function parse(str: string, sep?: string, eq?: string, options?: ParseOptions): any; - export function parse(str: string, sep?: string, eq?: string, options?: ParseOptions): T; + export function stringify(obj: any, sep?: string, eq?: string): string; + export function parse(str: string, sep?: string, eq?: string, options?: { maxKeys?: number; }): any; export function escape(str: string): string; export function unescape(str: string): string; } declare module "events" { - export class EventEmitter extends NodeJS.EventEmitter { - static EventEmitter: EventEmitter; - static listenerCount(emitter: EventEmitter, event: string | symbol): number; // deprecated - static defaultMaxListeners: number; - - addListener(event: string | symbol, listener: Function): this; - on(event: string | symbol, listener: Function): this; - once(event: string | symbol, listener: Function): this; - prependListener(event: string | symbol, listener: Function): this; - prependOnceListener(event: string | symbol, listener: Function): this; - removeListener(event: string | symbol, listener: Function): this; - removeAllListeners(event?: string | symbol): this; - setMaxListeners(n: number): this; - getMaxListeners(): number; - listeners(event: string | symbol): Function[]; - emit(event: string | symbol, ...args: any[]): boolean; - eventNames(): (string | symbol)[]; - listenerCount(type: string | symbol): number; - } + export class EventEmitter implements NodeJS.EventEmitter { + static listenerCount(emitter: EventEmitter, event: string): number; + + addListener(event: string, listener: Function): EventEmitter; + on(event: string, listener: Function): EventEmitter; + once(event: string, listener: Function): EventEmitter; + removeListener(event: string, listener: Function): EventEmitter; + removeAllListeners(event?: string): EventEmitter; + setMaxListeners(n: number): void; + listeners(event: string): Function[]; + emit(event: string, ...args: any[]): boolean; + } } declare module "http" { @@ -574,26 +426,14 @@ declare module "http" { import * as net from "net"; import * as stream from "stream"; - export interface RequestOptions { - protocol?: string; - host?: string; - hostname?: string; - family?: number; - port?: number; - localAddress?: string; - socketPath?: string; - method?: string; - path?: string; - headers?: { [key: string]: any }; - auth?: string; - agent?: Agent | boolean; - } - - export interface Server extends net.Server { - setTimeout(msecs: number, callback: Function): void; + export interface Server extends events.EventEmitter { + listen(port: number, hostname?: string, backlog?: number, callback?: Function): Server; + listen(port: number, hostname?: string, callback?: Function): Server; + listen(path: string, callback?: Function): Server; + listen(handle: any, listeningListener?: Function): Server; + close(cb?: any): Server; + address(): { port: number; family: string; address: string; }; maxHeadersCount: number; - timeout: number; - listening: boolean; } /** * @deprecated Use IncomingMessage @@ -601,7 +441,7 @@ declare module "http" { export interface ServerRequest extends IncomingMessage { connection: net.Socket; } - export interface ServerResponse extends stream.Writable { + export interface ServerResponse extends events.EventEmitter, stream.Writable { // Extended base methods write(buffer: Buffer): boolean; write(buffer: Buffer, cb?: Function): boolean; @@ -613,16 +453,12 @@ declare module "http" { writeHead(statusCode: number, reasonPhrase?: string, headers?: any): void; writeHead(statusCode: number, headers?: any): void; statusCode: number; - statusMessage: string; - headersSent: boolean; - setHeader(name: string, value: string | string[]): void; - setTimeout(msecs: number, callback: Function): ServerResponse; + setHeader(name: string, value: string): void; sendDate: boolean; getHeader(name: string): string; removeHeader(name: string): void; write(chunk: any, encoding?: string): any; addTrailers(headers: any): void; - finished: boolean; // Extended base methods end(): void; @@ -631,7 +467,7 @@ declare module "http" { end(str: string, encoding?: string, cb?: Function): void; end(data?: any, encoding?: string): void; } - export interface ClientRequest extends stream.Writable { + export interface ClientRequest extends events.EventEmitter, stream.Writable { // Extended base methods write(buffer: Buffer): boolean; write(buffer: Buffer, cb?: Function): boolean; @@ -645,11 +481,6 @@ declare module "http" { setNoDelay(noDelay?: boolean): void; setSocketKeepAlive(enable?: boolean, initialDelay?: number): void; - setHeader(name: string, value: string | string[]): void; - getHeader(name: string): string; - removeHeader(name: string): void; - addTrailers(headers: any): void; - // Extended base methods end(): void; end(buffer: Buffer, cb?: Function): void; @@ -657,11 +488,8 @@ declare module "http" { end(str: string, encoding?: string, cb?: Function): void; end(data?: any, encoding?: string): void; } - export interface IncomingMessage extends stream.Readable { + export interface IncomingMessage extends events.EventEmitter, stream.Readable { httpVersion: string; - httpVersionMajor: number; - httpVersionMinor: number; - connection: net.Socket; headers: any; rawHeaders: string[]; trailers: any; @@ -684,48 +512,47 @@ declare module "http" { */ statusMessage?: string; socket: net.Socket; - destroy(error?: Error): void; } /** * @deprecated Use IncomingMessage */ export interface ClientResponse extends IncomingMessage { } - export interface AgentOptions { - /** - * Keep sockets around in a pool to be used by other requests in the future. Default = false - */ - keepAlive?: boolean; - /** - * When using HTTP KeepAlive, how often to send TCP KeepAlive packets over sockets being kept alive. Default = 1000. - * Only relevant if keepAlive is set to true. - */ - keepAliveMsecs?: number; - /** - * Maximum number of sockets to allow per host. Default for Node 0.10 is 5, default for Node 0.12 is Infinity - */ - maxSockets?: number; - /** - * Maximum number of sockets to leave open in a free state. Only relevant if keepAlive is set to true. Default = 256. - */ - maxFreeSockets?: number; - } + export interface AgentOptions { + /** + * Keep sockets around in a pool to be used by other requests in the future. Default = false + */ + keepAlive?: boolean; + /** + * When using HTTP KeepAlive, how often to send TCP KeepAlive packets over sockets being kept alive. Default = 1000. + * Only relevant if keepAlive is set to true. + */ + keepAliveMsecs?: number; + /** + * Maximum number of sockets to allow per host. Default for Node 0.10 is 5, default for Node 0.12 is Infinity + */ + maxSockets?: number; + /** + * Maximum number of sockets to leave open in a free state. Only relevant if keepAlive is set to true. Default = 256. + */ + maxFreeSockets?: number; + } export class Agent { - maxSockets: number; - sockets: any; - requests: any; + maxSockets: number; + sockets: any; + requests: any; - constructor(opts?: AgentOptions); + constructor(opts?: AgentOptions); - /** - * Destroy any sockets that are currently in use by the agent. - * It is usually not necessary to do this. However, if you are using an agent with KeepAlive enabled, - * then it is best to explicitly shut down the agent when you know that it will no longer be used. Otherwise, - * sockets may hang open for quite a long time before the server terminates them. - */ - destroy(): void; - } + /** + * Destroy any sockets that are currently in use by the agent. + * It is usually not necessary to do this. However, if you are using an agent with KeepAlive enabled, + * then it is best to explicitly shut down the agent when you know that it will no longer be used. Otherwise, + * sockets may hang open for quite a long time before the server terminates them. + */ + destroy(): void; + } export var METHODS: string[]; @@ -733,9 +560,9 @@ declare module "http" { [errorCode: number]: string; [errorCode: string]: string; }; - export function createServer(requestListener?: (request: IncomingMessage, response: ServerResponse) => void): Server; + export function createServer(requestListener?: (request: IncomingMessage, response: ServerResponse) =>void ): Server; export function createClient(port?: number, host?: string): any; - export function request(options: RequestOptions, callback?: (res: IncomingMessage) => void): ClientRequest; + export function request(options: any, callback?: (res: IncomingMessage) => void): ClientRequest; export function get(options: any, callback?: (res: IncomingMessage) => void): ClientRequest; export var globalAgent: Agent; } @@ -743,266 +570,41 @@ declare module "http" { declare module "cluster" { import * as child from "child_process"; import * as events from "events"; - import * as net from "net"; - // interfaces export interface ClusterSettings { - execArgv?: string[]; // default: process.execArgv exec?: string; args?: string[]; silent?: boolean; - stdio?: any[]; - uid?: number; - gid?: number; - } - - export interface ClusterSetupMasterSettings { - exec?: string; // default: process.argv[1] - args?: string[]; // default: process.argv.slice(2) - silent?: boolean; // default: false - stdio?: any[]; - } - - export interface Address { - address: string; - port: number; - addressType: number | "udp4" | "udp6"; // 4, 6, -1, "udp4", "udp6" } export class Worker extends events.EventEmitter { id: string; process: child.ChildProcess; suicide: boolean; - send(message: any, sendHandle?: any): boolean; + send(message: any, sendHandle?: any): void; kill(signal?: string): void; destroy(signal?: string): void; disconnect(): void; - isConnected(): boolean; - isDead(): boolean; - exitedAfterDisconnect: boolean; - - /** - * events.EventEmitter - * 1. disconnect - * 2. error - * 3. exit - * 4. listening - * 5. message - * 6. online - */ - addListener(event: string, listener: Function): this; - addListener(event: "disconnect", listener: () => void): this; - addListener(event: "error", listener: (code: number, signal: string) => void): this; - addListener(event: "exit", listener: (code: number, signal: string) => void): this; - addListener(event: "listening", listener: (address: Address) => void): this; - addListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. - addListener(event: "online", listener: () => void): this; - - emit(event: string, listener: Function): boolean - emit(event: "disconnect", listener: () => void): boolean - emit(event: "error", listener: (code: number, signal: string) => void): boolean - emit(event: "exit", listener: (code: number, signal: string) => void): boolean - emit(event: "listening", listener: (address: Address) => void): boolean - emit(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): boolean - emit(event: "online", listener: () => void): boolean - - on(event: string, listener: Function): this; - on(event: "disconnect", listener: () => void): this; - on(event: "error", listener: (code: number, signal: string) => void): this; - on(event: "exit", listener: (code: number, signal: string) => void): this; - on(event: "listening", listener: (address: Address) => void): this; - on(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. - on(event: "online", listener: () => void): this; - - once(event: string, listener: Function): this; - once(event: "disconnect", listener: () => void): this; - once(event: "error", listener: (code: number, signal: string) => void): this; - once(event: "exit", listener: (code: number, signal: string) => void): this; - once(event: "listening", listener: (address: Address) => void): this; - once(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. - once(event: "online", listener: () => void): this; - - prependListener(event: string, listener: Function): this; - prependListener(event: "disconnect", listener: () => void): this; - prependListener(event: "error", listener: (code: number, signal: string) => void): this; - prependListener(event: "exit", listener: (code: number, signal: string) => void): this; - prependListener(event: "listening", listener: (address: Address) => void): this; - prependListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. - prependListener(event: "online", listener: () => void): this; - - prependOnceListener(event: string, listener: Function): this; - prependOnceListener(event: "disconnect", listener: () => void): this; - prependOnceListener(event: "error", listener: (code: number, signal: string) => void): this; - prependOnceListener(event: "exit", listener: (code: number, signal: string) => void): this; - prependOnceListener(event: "listening", listener: (address: Address) => void): this; - prependOnceListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. - prependOnceListener(event: "online", listener: () => void): this; - } - - export interface Cluster extends events.EventEmitter { - Worker: Worker; - disconnect(callback?: Function): void; - fork(env?: any): Worker; - isMaster: boolean; - isWorker: boolean; - // TODO: cluster.schedulingPolicy - settings: ClusterSettings; - setupMaster(settings?: ClusterSetupMasterSettings): void; - worker: Worker; - workers: { - [index: string]: Worker - }; - - /** - * events.EventEmitter - * 1. disconnect - * 2. exit - * 3. fork - * 4. listening - * 5. message - * 6. online - * 7. setup - */ - addListener(event: string, listener: Function): this; - addListener(event: "disconnect", listener: (worker: Worker) => void): this; - addListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; - addListener(event: "fork", listener: (worker: Worker) => void): this; - addListener(event: "listening", listener: (worker: Worker, address: Address) => void): this; - addListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. - addListener(event: "online", listener: (worker: Worker) => void): this; - addListener(event: "setup", listener: (settings: any) => void): this; - - emit(event: string, listener: Function): boolean; - emit(event: "disconnect", listener: (worker: Worker) => void): boolean; - emit(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): boolean; - emit(event: "fork", listener: (worker: Worker) => void): boolean; - emit(event: "listening", listener: (worker: Worker, address: Address) => void): boolean; - emit(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): boolean; - emit(event: "online", listener: (worker: Worker) => void): boolean; - emit(event: "setup", listener: (settings: any) => void): boolean; - - on(event: string, listener: Function): this; - on(event: "disconnect", listener: (worker: Worker) => void): this; - on(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; - on(event: "fork", listener: (worker: Worker) => void): this; - on(event: "listening", listener: (worker: Worker, address: Address) => void): this; - on(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. - on(event: "online", listener: (worker: Worker) => void): this; - on(event: "setup", listener: (settings: any) => void): this; - - once(event: string, listener: Function): this; - once(event: "disconnect", listener: (worker: Worker) => void): this; - once(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; - once(event: "fork", listener: (worker: Worker) => void): this; - once(event: "listening", listener: (worker: Worker, address: Address) => void): this; - once(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. - once(event: "online", listener: (worker: Worker) => void): this; - once(event: "setup", listener: (settings: any) => void): this; - - prependListener(event: string, listener: Function): this; - prependListener(event: "disconnect", listener: (worker: Worker) => void): this; - prependListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; - prependListener(event: "fork", listener: (worker: Worker) => void): this; - prependListener(event: "listening", listener: (worker: Worker, address: Address) => void): this; - prependListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. - prependListener(event: "online", listener: (worker: Worker) => void): this; - prependListener(event: "setup", listener: (settings: any) => void): this; - - prependOnceListener(event: string, listener: Function): this; - prependOnceListener(event: "disconnect", listener: (worker: Worker) => void): this; - prependOnceListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; - prependOnceListener(event: "fork", listener: (worker: Worker) => void): this; - prependOnceListener(event: "listening", listener: (worker: Worker, address: Address) => void): this; - prependOnceListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. - prependOnceListener(event: "online", listener: (worker: Worker) => void): this; - prependOnceListener(event: "setup", listener: (settings: any) => void): this; - } - export function disconnect(callback?: Function): void; - export function fork(env?: any): Worker; + export var settings: ClusterSettings; export var isMaster: boolean; export var isWorker: boolean; - // TODO: cluster.schedulingPolicy - export var settings: ClusterSettings; - export function setupMaster(settings?: ClusterSetupMasterSettings): void; + export function setupMaster(settings?: ClusterSettings): void; + export function fork(env?: any): Worker; + export function disconnect(callback?: Function): void; export var worker: Worker; - export var workers: { - [index: string]: Worker - }; - - /** - * events.EventEmitter - * 1. disconnect - * 2. exit - * 3. fork - * 4. listening - * 5. message - * 6. online - * 7. setup - */ - export function addListener(event: string, listener: Function): Cluster; - export function addListener(event: "disconnect", listener: (worker: Worker) => void): Cluster; - export function addListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster; - export function addListener(event: "fork", listener: (worker: Worker) => void): Cluster; - export function addListener(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster; - export function addListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; // the handle is a net.Socket or net.Server object, or undefined. - export function addListener(event: "online", listener: (worker: Worker) => void): Cluster; - export function addListener(event: "setup", listener: (settings: any) => void): Cluster; - - export function emit(event: string, listener: Function): boolean; - export function emit(event: "disconnect", listener: (worker: Worker) => void): boolean; - export function emit(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): boolean; - export function emit(event: "fork", listener: (worker: Worker) => void): boolean; - export function emit(event: "listening", listener: (worker: Worker, address: Address) => void): boolean; - export function emit(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): boolean; - export function emit(event: "online", listener: (worker: Worker) => void): boolean; - export function emit(event: "setup", listener: (settings: any) => void): boolean; - - export function on(event: string, listener: Function): Cluster; - export function on(event: "disconnect", listener: (worker: Worker) => void): Cluster; - export function on(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster; - export function on(event: "fork", listener: (worker: Worker) => void): Cluster; - export function on(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster; - export function on(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; // the handle is a net.Socket or net.Server object, or undefined. - export function on(event: "online", listener: (worker: Worker) => void): Cluster; - export function on(event: "setup", listener: (settings: any) => void): Cluster; - - export function once(event: string, listener: Function): Cluster; - export function once(event: "disconnect", listener: (worker: Worker) => void): Cluster; - export function once(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster; - export function once(event: "fork", listener: (worker: Worker) => void): Cluster; - export function once(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster; - export function once(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; // the handle is a net.Socket or net.Server object, or undefined. - export function once(event: "online", listener: (worker: Worker) => void): Cluster; - export function once(event: "setup", listener: (settings: any) => void): Cluster; - - export function removeListener(event: string, listener: Function): Cluster; - export function removeAllListeners(event?: string): Cluster; - export function setMaxListeners(n: number): Cluster; - export function getMaxListeners(): number; + export var workers: Worker[]; + + // Event emitter + export function addListener(event: string, listener: Function): void; + export function on(event: string, listener: Function): any; + export function once(event: string, listener: Function): void; + export function removeListener(event: string, listener: Function): void; + export function removeAllListeners(event?: string): void; + export function setMaxListeners(n: number): void; export function listeners(event: string): Function[]; - export function listenerCount(type: string): number; - - export function prependListener(event: string, listener: Function): Cluster; - export function prependListener(event: "disconnect", listener: (worker: Worker) => void): Cluster; - export function prependListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster; - export function prependListener(event: "fork", listener: (worker: Worker) => void): Cluster; - export function prependListener(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster; - export function prependListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; // the handle is a net.Socket or net.Server object, or undefined. - export function prependListener(event: "online", listener: (worker: Worker) => void): Cluster; - export function prependListener(event: "setup", listener: (settings: any) => void): Cluster; - - export function prependOnceListener(event: string, listener: Function): Cluster; - export function prependOnceListener(event: "disconnect", listener: (worker: Worker) => void): Cluster; - export function prependOnceListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster; - export function prependOnceListener(event: "fork", listener: (worker: Worker) => void): Cluster; - export function prependOnceListener(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster; - export function prependOnceListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; // the handle is a net.Socket or net.Server object, or undefined. - export function prependOnceListener(event: "online", listener: (worker: Worker) => void): Cluster; - export function prependOnceListener(event: "setup", listener: (settings: any) => void): Cluster; - - export function eventNames(): string[]; + export function emit(event: string, ...args: any[]): boolean; } declare module "zlib" { @@ -1025,19 +627,19 @@ declare module "zlib" { export function createInflateRaw(options?: ZlibOptions): InflateRaw; export function createUnzip(options?: ZlibOptions): Unzip; - export function deflate(buf: Buffer, callback: (error: Error, result: any) => void): void; + export function deflate(buf: Buffer, callback: (error: Error, result: any) =>void ): void; export function deflateSync(buf: Buffer, options?: ZlibOptions): any; - export function deflateRaw(buf: Buffer, callback: (error: Error, result: any) => void): void; + export function deflateRaw(buf: Buffer, callback: (error: Error, result: any) =>void ): void; export function deflateRawSync(buf: Buffer, options?: ZlibOptions): any; - export function gzip(buf: Buffer, callback: (error: Error, result: any) => void): void; + export function gzip(buf: Buffer, callback: (error: Error, result: any) =>void ): void; export function gzipSync(buf: Buffer, options?: ZlibOptions): any; - export function gunzip(buf: Buffer, callback: (error: Error, result: any) => void): void; + export function gunzip(buf: Buffer, callback: (error: Error, result: any) =>void ): void; export function gunzipSync(buf: Buffer, options?: ZlibOptions): any; - export function inflate(buf: Buffer, callback: (error: Error, result: any) => void): void; + export function inflate(buf: Buffer, callback: (error: Error, result: any) =>void ): void; export function inflateSync(buf: Buffer, options?: ZlibOptions): any; - export function inflateRaw(buf: Buffer, callback: (error: Error, result: any) => void): void; + export function inflateRaw(buf: Buffer, callback: (error: Error, result: any) =>void ): void; export function inflateRawSync(buf: Buffer, options?: ZlibOptions): any; - export function unzip(buf: Buffer, callback: (error: Error, result: any) => void): void; + export function unzip(buf: Buffer, callback: (error: Error, result: any) =>void ): void; export function unzipSync(buf: Buffer, options?: ZlibOptions): any; // Constants @@ -1075,162 +677,19 @@ declare module "zlib" { } declare module "os" { - export interface CpuInfo { - model: string; - speed: number; - times: { - user: number; - nice: number; - sys: number; - idle: number; - irq: number; - }; - } - - export interface NetworkInterfaceInfo { - address: string; - netmask: string; - family: string; - mac: string; - internal: boolean; - } - + export function tmpdir(): string; export function hostname(): string; - export function loadavg(): number[]; - export function uptime(): number; - export function freemem(): number; - export function totalmem(): number; - export function cpus(): CpuInfo[]; export function type(): string; - export function release(): string; - export function networkInterfaces(): { [index: string]: NetworkInterfaceInfo[] }; - export function homedir(): string; - export function userInfo(options?: { encoding: string }): { username: string, uid: number, gid: number, shell: any, homedir: string } - export var constants: { - UV_UDP_REUSEADDR: number, - errno: { - SIGHUP: number; - SIGINT: number; - SIGQUIT: number; - SIGILL: number; - SIGTRAP: number; - SIGABRT: number; - SIGIOT: number; - SIGBUS: number; - SIGFPE: number; - SIGKILL: number; - SIGUSR1: number; - SIGSEGV: number; - SIGUSR2: number; - SIGPIPE: number; - SIGALRM: number; - SIGTERM: number; - SIGCHLD: number; - SIGSTKFLT: number; - SIGCONT: number; - SIGSTOP: number; - SIGTSTP: number; - SIGTTIN: number; - SIGTTOU: number; - SIGURG: number; - SIGXCPU: number; - SIGXFSZ: number; - SIGVTALRM: number; - SIGPROF: number; - SIGWINCH: number; - SIGIO: number; - SIGPOLL: number; - SIGPWR: number; - SIGSYS: number; - SIGUNUSED: number; - }, - signals: { - E2BIG: number; - EACCES: number; - EADDRINUSE: number; - EADDRNOTAVAIL: number; - EAFNOSUPPORT: number; - EAGAIN: number; - EALREADY: number; - EBADF: number; - EBADMSG: number; - EBUSY: number; - ECANCELED: number; - ECHILD: number; - ECONNABORTED: number; - ECONNREFUSED: number; - ECONNRESET: number; - EDEADLK: number; - EDESTADDRREQ: number; - EDOM: number; - EDQUOT: number; - EEXIST: number; - EFAULT: number; - EFBIG: number; - EHOSTUNREACH: number; - EIDRM: number; - EILSEQ: number; - EINPROGRESS: number; - EINTR: number; - EINVAL: number; - EIO: number; - EISCONN: number; - EISDIR: number; - ELOOP: number; - EMFILE: number; - EMLINK: number; - EMSGSIZE: number; - EMULTIHOP: number; - ENAMETOOLONG: number; - ENETDOWN: number; - ENETRESET: number; - ENETUNREACH: number; - ENFILE: number; - ENOBUFS: number; - ENODATA: number; - ENODEV: number; - ENOENT: number; - ENOEXEC: number; - ENOLCK: number; - ENOLINK: number; - ENOMEM: number; - ENOMSG: number; - ENOPROTOOPT: number; - ENOSPC: number; - ENOSR: number; - ENOSTR: number; - ENOSYS: number; - ENOTCONN: number; - ENOTDIR: number; - ENOTEMPTY: number; - ENOTSOCK: number; - ENOTSUP: number; - ENOTTY: number; - ENXIO: number; - EOPNOTSUPP: number; - EOVERFLOW: number; - EPERM: number; - EPIPE: number; - EPROTO: number; - EPROTONOSUPPORT: number; - EPROTOTYPE: number; - ERANGE: number; - EROFS: number; - ESPIPE: number; - ESRCH: number; - ESTALE: number; - ETIME: number; - ETIMEDOUT: number; - ETXTBSY: number; - EWOULDBLOCK: number; - EXDEV: number; - }, - }; - export function arch(): string; export function platform(): string; - export function tmpdir(): string; + export function arch(): string; + export function release(): string; + export function uptime(): number; + export function loadavg(): number[]; + export function totalmem(): number; + export function freemem(): number; + export function cpus(): { model: string; speed: number; times: { user: number; nice: number; sys: number; idle: number; irq: number; }; }[]; + export function networkInterfaces(): any; export var EOL: string; - export function endianness(): "BE" | "LE"; } declare module "https" { @@ -1250,10 +709,18 @@ declare module "https" { requestCert?: boolean; rejectUnauthorized?: boolean; NPNProtocols?: any; - SNICallback?: (servername: string, cb: (err: Error, ctx: tls.SecureContext) => any) => any; + SNICallback?: (servername: string) => any; } - export interface RequestOptions extends http.RequestOptions { + export interface RequestOptions { + host?: string; + hostname?: string; + port?: number; + path?: string; + method?: string; + headers?: any; + auth?: string; + agent?: any; pfx?: any; key?: any; passphrase?: string; @@ -1261,30 +728,20 @@ declare module "https" { ca?: any; ciphers?: string; rejectUnauthorized?: boolean; - secureProtocol?: string; } - export interface Agent extends http.Agent { } - - export interface AgentOptions extends http.AgentOptions { - pfx?: any; - key?: any; - passphrase?: string; - cert?: any; - ca?: any; - ciphers?: string; - rejectUnauthorized?: boolean; - secureProtocol?: string; - maxCachedSessions?: number; + export interface Agent { + maxSockets: number; + sockets: any; + requests: any; } - export var Agent: { - new (options?: AgentOptions): Agent; + new (options?: RequestOptions): Agent; }; export interface Server extends tls.Server { } export function createServer(options: ServerOptions, requestListener?: Function): Server; - export function request(options: RequestOptions, callback?: (res: http.IncomingMessage) => void): http.ClientRequest; - export function get(options: RequestOptions, callback?: (res: http.IncomingMessage) => void): http.ClientRequest; + export function request(options: RequestOptions, callback?: (res: http.IncomingMessage) =>void ): http.ClientRequest; + export function get(options: RequestOptions, callback?: (res: http.IncomingMessage) =>void ): http.ClientRequest; export var globalAgent: Agent; } @@ -1295,7 +752,7 @@ declare module "punycode" { export function toASCII(domain: string): string; export var ucs2: ucs2; interface ucs2 { - decode(string: string): number[]; + decode(string: string): string; encode(codePoints: number[]): string; } export var version: any; @@ -1303,7 +760,7 @@ declare module "punycode" { declare module "repl" { import * as stream from "stream"; - import * as readline from "readline"; + import * as events from "events"; export interface ReplOptions { prompt?: string; @@ -1315,98 +772,43 @@ declare module "repl" { useGlobal?: boolean; ignoreUndefined?: boolean; writer?: Function; - completer?: Function; - replMode?: any; - breakEvalOnSigint?: any; } - - export interface REPLServer extends readline.ReadLine { - defineCommand(keyword: string, cmd: Function | { help: string, action: Function }): void; - displayPrompt(preserveCursor?: boolean): void - } - - export function start(options: ReplOptions): REPLServer; + export function start(options: ReplOptions): events.EventEmitter; } declare module "readline" { import * as events from "events"; import * as stream from "stream"; - export interface Key { - sequence?: string; - name?: string; - ctrl?: boolean; - meta?: boolean; - shift?: boolean; - } - export interface ReadLine extends events.EventEmitter { - setPrompt(prompt: string): void; + setPrompt(prompt: string, length: number): void; prompt(preserveCursor?: boolean): void; - question(query: string, callback: (answer: string) => void): void; - pause(): ReadLine; - resume(): ReadLine; + question(query: string, callback: Function): void; + pause(): void; + resume(): void; close(): void; - write(data: string | Buffer, key?: Key): void; - } - - export interface Completer { - (line: string): CompleterResult; - (line: string, callback: (err: any, result: CompleterResult) => void): any; + write(data: any, key?: any): void; } - - export interface CompleterResult { - completions: string[]; - line: string; - } - export interface ReadLineOptions { input: NodeJS.ReadableStream; - output?: NodeJS.WritableStream; - completer?: Completer; + output: NodeJS.WritableStream; + completer?: Function; terminal?: boolean; - historySize?: number; } - - export function createInterface(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer, terminal?: boolean): ReadLine; export function createInterface(options: ReadLineOptions): ReadLine; - - export function cursorTo(stream: NodeJS.WritableStream, x: number, y: number): void; - export function moveCursor(stream: NodeJS.WritableStream, dx: number | string, dy: number | string): void; - export function clearLine(stream: NodeJS.WritableStream, dir: number): void; - export function clearScreenDown(stream: NodeJS.WritableStream): void; } declare module "vm" { export interface Context { } - export interface ScriptOptions { - filename?: string; - lineOffset?: number; - columnOffset?: number; - displayErrors?: boolean; - timeout?: number; - cachedData?: Buffer; - produceCachedData?: boolean; - } - export interface RunningScriptOptions { - filename?: string; - lineOffset?: number; - columnOffset?: number; - displayErrors?: boolean; - timeout?: number; - } - export class Script { - constructor(code: string, options?: ScriptOptions); - runInContext(contextifiedSandbox: Context, options?: RunningScriptOptions): any; - runInNewContext(sandbox?: Context, options?: RunningScriptOptions): any; - runInThisContext(options?: RunningScriptOptions): any; - } - export function createContext(sandbox?: Context): Context; - export function isContext(sandbox: Context): boolean; - export function runInContext(code: string, contextifiedSandbox: Context, options?: RunningScriptOptions): any; - export function runInDebugContext(code: string): any; - export function runInNewContext(code: string, sandbox?: Context, options?: RunningScriptOptions): any; - export function runInThisContext(code: string, options?: RunningScriptOptions): any; + export interface Script { + runInThisContext(): void; + runInNewContext(sandbox?: Context): void; + } + export function runInThisContext(code: string, filename?: string): void; + export function runInNewContext(code: string, sandbox?: Context, filename?: string): void; + export function runInContext(code: string, context: Context, filename?: string): void; + export function createContext(initSandbox?: Context): Context; + export function createScript(code: string, filename?: string): Script; } declare module "child_process" { @@ -1414,179 +816,96 @@ declare module "child_process" { import * as stream from "stream"; export interface ChildProcess extends events.EventEmitter { - stdin: stream.Writable; + stdin: stream.Writable; stdout: stream.Readable; stderr: stream.Readable; - stdio: [stream.Writable, stream.Readable, stream.Readable]; pid: number; kill(signal?: string): void; - send(message: any, sendHandle?: any): boolean; - connected: boolean; + send(message: any, sendHandle?: any): void; disconnect(): void; unref(): void; - ref(): void; } - export interface SpawnOptions { + export function spawn(command: string, args?: string[], options?: { cwd?: string; - env?: any; stdio?: any; + custom?: any; + env?: any; detached?: boolean; - uid?: number; - gid?: number; - shell?: boolean | string; - } - export function spawn(command: string, args?: string[], options?: SpawnOptions): ChildProcess; - - export interface ExecOptions { + }): ChildProcess; + export function exec(command: string, options: { cwd?: string; + stdio?: any; + customFds?: any; env?: any; - shell?: string; + encoding?: string; timeout?: number; maxBuffer?: number; killSignal?: string; - uid?: number; - gid?: number; - } - export interface ExecOptionsWithStringEncoding extends ExecOptions { - encoding: BufferEncoding; - } - export interface ExecOptionsWithBufferEncoding extends ExecOptions { - encoding: string; // specify `null`. - } - export function exec(command: string, callback?: (error: Error, stdout: string, stderr: string) => void): ChildProcess; - export function exec(command: string, options: ExecOptionsWithStringEncoding, callback?: (error: Error, stdout: string, stderr: string) => void): ChildProcess; - // usage. child_process.exec("tsc", {encoding: null as string}, (err, stdout, stderr) => {}); - export function exec(command: string, options: ExecOptionsWithBufferEncoding, callback?: (error: Error, stdout: Buffer, stderr: Buffer) => void): ChildProcess; - export function exec(command: string, options: ExecOptions, callback?: (error: Error, stdout: string, stderr: string) => void): ChildProcess; - - export interface ExecFileOptions { + }, callback?: (error: Error, stdout: Buffer, stderr: Buffer) =>void ): ChildProcess; + export function exec(command: string, callback?: (error: Error, stdout: Buffer, stderr: Buffer) =>void ): ChildProcess; + export function execFile(file: string, + callback?: (error: Error, stdout: Buffer, stderr: Buffer) =>void ): ChildProcess; + export function execFile(file: string, args?: string[], + callback?: (error: Error, stdout: Buffer, stderr: Buffer) =>void ): ChildProcess; + export function execFile(file: string, args?: string[], options?: { cwd?: string; + stdio?: any; + customFds?: any; env?: any; + encoding?: string; timeout?: number; - maxBuffer?: number; + maxBuffer?: string; killSignal?: string; - uid?: number; - gid?: number; - } - export interface ExecFileOptionsWithStringEncoding extends ExecFileOptions { - encoding: BufferEncoding; - } - export interface ExecFileOptionsWithBufferEncoding extends ExecFileOptions { - encoding: string; // specify `null`. - } - export function execFile(file: string, callback?: (error: Error, stdout: string, stderr: string) => void): ChildProcess; - export function execFile(file: string, options?: ExecFileOptionsWithStringEncoding, callback?: (error: Error, stdout: string, stderr: string) => void): ChildProcess; - // usage. child_process.execFile("file.sh", {encoding: null as string}, (err, stdout, stderr) => {}); - export function execFile(file: string, options?: ExecFileOptionsWithBufferEncoding, callback?: (error: Error, stdout: Buffer, stderr: Buffer) => void): ChildProcess; - export function execFile(file: string, options?: ExecFileOptions, callback?: (error: Error, stdout: string, stderr: string) => void): ChildProcess; - export function execFile(file: string, args?: string[], callback?: (error: Error, stdout: string, stderr: string) => void): ChildProcess; - export function execFile(file: string, args?: string[], options?: ExecFileOptionsWithStringEncoding, callback?: (error: Error, stdout: string, stderr: string) => void): ChildProcess; - // usage. child_process.execFile("file.sh", ["foo"], {encoding: null as string}, (err, stdout, stderr) => {}); - export function execFile(file: string, args?: string[], options?: ExecFileOptionsWithBufferEncoding, callback?: (error: Error, stdout: Buffer, stderr: Buffer) => void): ChildProcess; - export function execFile(file: string, args?: string[], options?: ExecFileOptions, callback?: (error: Error, stdout: string, stderr: string) => void): ChildProcess; - - export interface ForkOptions { - cwd?: string; - env?: any; - execPath?: string; - execArgv?: string[]; - silent?: boolean; - uid?: number; - gid?: number; - } - export function fork(modulePath: string, args?: string[], options?: ForkOptions): ChildProcess; - - export interface SpawnSyncOptions { + }, callback?: (error: Error, stdout: Buffer, stderr: Buffer) =>void ): ChildProcess; + export function fork(modulePath: string, args?: string[], options?: { cwd?: string; - input?: string | Buffer; - stdio?: any; env?: any; - uid?: number; - gid?: number; - timeout?: number; - killSignal?: string; - maxBuffer?: number; encoding?: string; - shell?: boolean | string; - } - export interface SpawnSyncOptionsWithStringEncoding extends SpawnSyncOptions { - encoding: BufferEncoding; - } - export interface SpawnSyncOptionsWithBufferEncoding extends SpawnSyncOptions { - encoding: string; // specify `null`. - } - export interface SpawnSyncReturns { - pid: number; - output: string[]; - stdout: T; - stderr: T; - status: number; - signal: string; - error: Error; - } - export function spawnSync(command: string): SpawnSyncReturns; - export function spawnSync(command: string, options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns; - export function spawnSync(command: string, options?: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns; - export function spawnSync(command: string, options?: SpawnSyncOptions): SpawnSyncReturns; - export function spawnSync(command: string, args?: string[], options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns; - export function spawnSync(command: string, args?: string[], options?: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns; - export function spawnSync(command: string, args?: string[], options?: SpawnSyncOptions): SpawnSyncReturns; - - export interface ExecSyncOptions { + }): ChildProcess; + export function execSync(command: string, options?: { cwd?: string; - input?: string | Buffer; + input?: string|Buffer; stdio?: any; env?: any; - shell?: string; uid?: number; gid?: number; timeout?: number; - killSignal?: string; maxBuffer?: number; + killSignal?: string; encoding?: string; - } - export interface ExecSyncOptionsWithStringEncoding extends ExecSyncOptions { - encoding: BufferEncoding; - } - export interface ExecSyncOptionsWithBufferEncoding extends ExecSyncOptions { - encoding: string; // specify `null`. - } - export function execSync(command: string): Buffer; - export function execSync(command: string, options?: ExecSyncOptionsWithStringEncoding): string; - export function execSync(command: string, options?: ExecSyncOptionsWithBufferEncoding): Buffer; - export function execSync(command: string, options?: ExecSyncOptions): Buffer; - - export interface ExecFileSyncOptions { + }): ChildProcess; + export function execFileSync(command: string, args?: string[], options?: { cwd?: string; - input?: string | Buffer; + input?: string|Buffer; stdio?: any; env?: any; uid?: number; gid?: number; timeout?: number; - killSignal?: string; maxBuffer?: number; + killSignal?: string; encoding?: string; - } - export interface ExecFileSyncOptionsWithStringEncoding extends ExecFileSyncOptions { - encoding: BufferEncoding; - } - export interface ExecFileSyncOptionsWithBufferEncoding extends ExecFileSyncOptions { - encoding: string; // specify `null`. - } - export function execFileSync(command: string): Buffer; - export function execFileSync(command: string, options?: ExecFileSyncOptionsWithStringEncoding): string; - export function execFileSync(command: string, options?: ExecFileSyncOptionsWithBufferEncoding): Buffer; - export function execFileSync(command: string, options?: ExecFileSyncOptions): Buffer; - export function execFileSync(command: string, args?: string[], options?: ExecFileSyncOptionsWithStringEncoding): string; - export function execFileSync(command: string, args?: string[], options?: ExecFileSyncOptionsWithBufferEncoding): Buffer; - export function execFileSync(command: string, args?: string[], options?: ExecFileSyncOptions): Buffer; + }): ChildProcess; } declare module "url" { export interface Url { - href?: string; + href: string; + protocol: string; + auth: string; + hostname: string; + port: string; + host: string; + pathname: string; + search: string; + query: any; // string | Object + slashes: boolean; + hash?: string; + path?: string; + } + + export interface UrlOptions { protocol?: string; auth?: string; hostname?: string; @@ -1594,62 +913,29 @@ declare module "url" { host?: string; pathname?: string; search?: string; - query?: string | any; - slashes?: boolean; + query?: any; hash?: string; path?: string; } - export function parse(urlStr: string, parseQueryString?: boolean, slashesDenoteHost?: boolean): Url; - export function format(url: Url): string; + export function parse(urlStr: string, parseQueryString?: boolean , slashesDenoteHost?: boolean ): Url; + export function format(url: UrlOptions): string; export function resolve(from: string, to: string): string; } declare module "dns" { - export interface MxRecord { - exchange: string, - priority: number - } - - export function lookup(domain: string, family: number, callback: (err: Error, address: string, family: number) => void): string; - export function lookup(domain: string, callback: (err: Error, address: string, family: number) => void): string; - export function resolve(domain: string, rrtype: string, callback: (err: Error, addresses: string[]) => void): string[]; - export function resolve(domain: string, callback: (err: Error, addresses: string[]) => void): string[]; - export function resolve4(domain: string, callback: (err: Error, addresses: string[]) => void): string[]; - export function resolve6(domain: string, callback: (err: Error, addresses: string[]) => void): string[]; - export function resolveMx(domain: string, callback: (err: Error, addresses: MxRecord[]) => void): string[]; - export function resolveTxt(domain: string, callback: (err: Error, addresses: string[]) => void): string[]; - export function resolveSrv(domain: string, callback: (err: Error, addresses: string[]) => void): string[]; - export function resolveNs(domain: string, callback: (err: Error, addresses: string[]) => void): string[]; - export function resolveCname(domain: string, callback: (err: Error, addresses: string[]) => void): string[]; - export function reverse(ip: string, callback: (err: Error, domains: string[]) => void): string[]; - export function setServers(servers: string[]): void; - - //Error codes - export var NODATA: string; - export var FORMERR: string; - export var SERVFAIL: string; - export var NOTFOUND: string; - export var NOTIMP: string; - export var REFUSED: string; - export var BADQUERY: string; - export var BADNAME: string; - export var BADFAMILY: string; - export var BADRESP: string; - export var CONNREFUSED: string; - export var TIMEOUT: string; - export var EOF: string; - export var FILE: string; - export var NOMEM: string; - export var DESTRUCTION: string; - export var BADSTR: string; - export var BADFLAGS: string; - export var NONAME: string; - export var BADHINTS: string; - export var NOTINITIALIZED: string; - export var LOADIPHLPAPI: string; - export var ADDRGETNETWORKPARAMS: string; - export var CANCELLED: string; + export function lookup(domain: string, family: number, callback: (err: Error, address: string, family: number) =>void ): string; + export function lookup(domain: string, callback: (err: Error, address: string, family: number) =>void ): string; + export function resolve(domain: string, rrtype: string, callback: (err: Error, addresses: string[]) =>void ): string[]; + export function resolve(domain: string, callback: (err: Error, addresses: string[]) =>void ): string[]; + export function resolve4(domain: string, callback: (err: Error, addresses: string[]) =>void ): string[]; + export function resolve6(domain: string, callback: (err: Error, addresses: string[]) =>void ): string[]; + export function resolveMx(domain: string, callback: (err: Error, addresses: string[]) =>void ): string[]; + export function resolveTxt(domain: string, callback: (err: Error, addresses: string[]) =>void ): string[]; + export function resolveSrv(domain: string, callback: (err: Error, addresses: string[]) =>void ): string[]; + export function resolveNs(domain: string, callback: (err: Error, addresses: string[]) =>void ): string[]; + export function resolveCname(domain: string, callback: (err: Error, addresses: string[]) =>void ): string[]; + export function reverse(ip: string, callback: (err: Error, domains: string[]) =>void ): string[]; } declare module "net" { @@ -1669,8 +955,8 @@ declare module "net" { setEncoding(encoding?: string): void; write(data: any, encoding?: string, callback?: Function): void; destroy(): void; - pause(): Socket; - resume(): Socket; + pause(): void; + resume(): void; setTimeout(timeout: number, callback?: Function): void; setNoDelay(noDelay?: boolean): void; setKeepAlive(enable?: boolean, initialDelay?: number): void; @@ -1692,158 +978,27 @@ declare module "net" { end(str: string, cb?: Function): void; end(str: string, encoding?: string, cb?: Function): void; end(data?: any, encoding?: string): void; - - /** - * events.EventEmitter - * 1. close - * 2. connect - * 3. data - * 4. drain - * 5. end - * 6. error - * 7. lookup - * 8. timeout - */ - addListener(event: string, listener: Function): this; - addListener(event: "close", listener: (had_error: boolean) => void): this; - addListener(event: "connect", listener: () => void): this; - addListener(event: "data", listener: (data: Buffer) => void): this; - addListener(event: "drain", listener: () => void): this; - addListener(event: "end", listener: () => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - addListener(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this; - addListener(event: "timeout", listener: () => void): this; - - emit(event: string, ...args: any[]): boolean; - emit(event: "close", had_error: boolean): boolean; - emit(event: "connect"): boolean; - emit(event: "data", data: Buffer): boolean; - emit(event: "drain"): boolean; - emit(event: "end"): boolean; - emit(event: "error", err: Error): boolean; - emit(event: "lookup", err: Error, address: string, family: string | number, host: string): boolean; - emit(event: "timeout"): boolean; - - on(event: string, listener: Function): this; - on(event: "close", listener: (had_error: boolean) => void): this; - on(event: "connect", listener: () => void): this; - on(event: "data", listener: (data: Buffer) => void): this; - on(event: "drain", listener: () => void): this; - on(event: "end", listener: () => void): this; - on(event: "error", listener: (err: Error) => void): this; - on(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this; - on(event: "timeout", listener: () => void): this; - - once(event: string, listener: Function): this; - once(event: "close", listener: (had_error: boolean) => void): this; - once(event: "connect", listener: () => void): this; - once(event: "data", listener: (data: Buffer) => void): this; - once(event: "drain", listener: () => void): this; - once(event: "end", listener: () => void): this; - once(event: "error", listener: (err: Error) => void): this; - once(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this; - once(event: "timeout", listener: () => void): this; - - prependListener(event: string, listener: Function): this; - prependListener(event: "close", listener: (had_error: boolean) => void): this; - prependListener(event: "connect", listener: () => void): this; - prependListener(event: "data", listener: (data: Buffer) => void): this; - prependListener(event: "drain", listener: () => void): this; - prependListener(event: "end", listener: () => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; - prependListener(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this; - prependListener(event: "timeout", listener: () => void): this; - - prependOnceListener(event: string, listener: Function): this; - prependOnceListener(event: "close", listener: (had_error: boolean) => void): this; - prependOnceListener(event: "connect", listener: () => void): this; - prependOnceListener(event: "data", listener: (data: Buffer) => void): this; - prependOnceListener(event: "drain", listener: () => void): this; - prependOnceListener(event: "end", listener: () => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; - prependOnceListener(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this; - prependOnceListener(event: "timeout", listener: () => void): this; } export var Socket: { new (options?: { fd?: string; type?: string; allowHalfOpen?: boolean; }): Socket; }; - export interface ListenOptions { - port?: number; - host?: string; - backlog?: number; - path?: string; - exclusive?: boolean; - } - export interface Server extends Socket { - listen(port: number, hostname?: string, backlog?: number, listeningListener?: Function): Server; - listen(port: number, hostname?: string, listeningListener?: Function): Server; - listen(port: number, backlog?: number, listeningListener?: Function): Server; - listen(port: number, listeningListener?: Function): Server; - listen(path: string, backlog?: number, listeningListener?: Function): Server; + listen(port: number, host?: string, backlog?: number, listeningListener?: Function): Server; listen(path: string, listeningListener?: Function): Server; - listen(handle: any, backlog?: number, listeningListener?: Function): Server; listen(handle: any, listeningListener?: Function): Server; - listen(options: ListenOptions, listeningListener?: Function): Server; close(callback?: Function): Server; address(): { port: number; family: string; address: string; }; - getConnections(cb: (error: Error, count: number) => void): void; - ref(): Server; - unref(): Server; maxConnections: number; connections: number; - - /** - * events.EventEmitter - * 1. close - * 2. connection - * 3. error - * 4. listening - */ - addListener(event: string, listener: Function): this; - addListener(event: "close", listener: () => void): this; - addListener(event: "connection", listener: (socket: Socket) => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - addListener(event: "listening", listener: () => void): this; - - emit(event: string, ...args: any[]): boolean; - emit(event: "close"): boolean; - emit(event: "connection", socket: Socket): boolean; - emit(event: "error", err: Error): boolean; - emit(event: "listening"): boolean; - - on(event: string, listener: Function): this; - on(event: "close", listener: () => void): this; - on(event: "connection", listener: (socket: Socket) => void): this; - on(event: "error", listener: (err: Error) => void): this; - on(event: "listening", listener: () => void): this; - - once(event: string, listener: Function): this; - once(event: "close", listener: () => void): this; - once(event: "connection", listener: (socket: Socket) => void): this; - once(event: "error", listener: (err: Error) => void): this; - once(event: "listening", listener: () => void): this; - - prependListener(event: string, listener: Function): this; - prependListener(event: "close", listener: () => void): this; - prependListener(event: "connection", listener: (socket: Socket) => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; - prependListener(event: "listening", listener: () => void): this; - - prependOnceListener(event: string, listener: Function): this; - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "connection", listener: (socket: Socket) => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; - prependOnceListener(event: "listening", listener: () => void): this; - } - export function createServer(connectionListener?: (socket: Socket) => void): Server; - export function createServer(options?: { allowHalfOpen?: boolean; }, connectionListener?: (socket: Socket) => void): Server; - export function connect(options: { port: number, host?: string, localAddress?: string, localPort?: string, family?: number, allowHalfOpen?: boolean; }, connectionListener?: Function): Socket; + } + export function createServer(connectionListener?: (socket: Socket) =>void ): Server; + export function createServer(options?: { allowHalfOpen?: boolean; }, connectionListener?: (socket: Socket) =>void ): Server; + export function connect(options: { allowHalfOpen?: boolean; }, connectionListener?: Function): Socket; export function connect(port: number, host?: string, connectionListener?: Function): Socket; export function connect(path: string, connectionListener?: Function): Socket; - export function createConnection(options: { port: number, host?: string, localAddress?: string, localPort?: string, family?: number, allowHalfOpen?: boolean; }, connectionListener?: Function): Socket; + export function createConnection(options: { allowHalfOpen?: boolean; }, connectionListener?: Function): Socket; export function createConnection(port: number, host?: string, connectionListener?: Function): Socket; export function createConnection(path: string, connectionListener?: Function): Socket; export function isIP(input: string): number; @@ -1856,8 +1011,8 @@ declare module "dgram" { interface RemoteInfo { address: string; - family: string; port: number; + size: number; } interface AddressInfo { @@ -1866,78 +1021,18 @@ declare module "dgram" { port: number; } - interface BindOptions { - port: number; - address?: string; - exclusive?: boolean; - } - - interface SocketOptions { - type: "udp4" | "udp6"; - reuseAddr?: boolean; - } - export function createSocket(type: string, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket; - export function createSocket(options: SocketOptions, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket; - - export interface Socket extends events.EventEmitter { - send(msg: Buffer | String | any[], port: number, address: string, callback?: (error: Error, bytes: number) => void): void; - send(msg: Buffer | String | any[], offset: number, length: number, port: number, address: string, callback?: (error: Error, bytes: number) => void): void; - bind(port?: number, address?: string, callback?: () => void): void; - bind(options: BindOptions, callback?: Function): void; - close(callback?: any): void; + + interface Socket extends events.EventEmitter { + send(buf: Buffer, offset: number, length: number, port: number, address: string, callback?: (error: Error, bytes: number) => void): void; + bind(port: number, address?: string, callback?: () => void): void; + close(): void; address(): AddressInfo; setBroadcast(flag: boolean): void; - setTTL(ttl: number): void; setMulticastTTL(ttl: number): void; setMulticastLoopback(flag: boolean): void; addMembership(multicastAddress: string, multicastInterface?: string): void; dropMembership(multicastAddress: string, multicastInterface?: string): void; - ref(): void; - unref(): void; - - /** - * events.EventEmitter - * 1. close - * 2. error - * 3. listening - * 4. message - **/ - addListener(event: string, listener: Function): this; - addListener(event: "close", listener: () => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - addListener(event: "listening", listener: () => void): this; - addListener(event: "message", listener: (msg: string, rinfo: AddressInfo) => void): this; - - emit(event: string, ...args: any[]): boolean; - emit(event: "close"): boolean; - emit(event: "error", err: Error): boolean; - emit(event: "listening"): boolean; - emit(event: "message", msg: string, rinfo: AddressInfo): boolean; - - on(event: string, listener: Function): this; - on(event: "close", listener: () => void): this; - on(event: "error", listener: (err: Error) => void): this; - on(event: "listening", listener: () => void): this; - on(event: "message", listener: (msg: string, rinfo: AddressInfo) => void): this; - - once(event: string, listener: Function): this; - once(event: "close", listener: () => void): this; - once(event: "error", listener: (err: Error) => void): this; - once(event: "listening", listener: () => void): this; - once(event: "message", listener: (msg: string, rinfo: AddressInfo) => void): this; - - prependListener(event: string, listener: Function): this; - prependListener(event: "close", listener: () => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; - prependListener(event: "listening", listener: () => void): this; - prependListener(event: "message", listener: (msg: string, rinfo: AddressInfo) => void): this; - - prependOnceListener(event: string, listener: Function): this; - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; - prependOnceListener(event: "listening", listener: () => void): this; - prependOnceListener(event: "message", listener: (msg: string, rinfo: AddressInfo) => void): this; } } @@ -1966,97 +1061,18 @@ declare module "fs" { atime: Date; mtime: Date; ctime: Date; - birthtime: Date; } interface FSWatcher extends events.EventEmitter { close(): void; - - /** - * events.EventEmitter - * 1. change - * 2. error - */ - addListener(event: string, listener: Function): this; - addListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; - addListener(event: "error", listener: (code: number, signal: string) => void): this; - - on(event: string, listener: Function): this; - on(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; - on(event: "error", listener: (code: number, signal: string) => void): this; - - once(event: string, listener: Function): this; - once(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; - once(event: "error", listener: (code: number, signal: string) => void): this; - - prependListener(event: string, listener: Function): this; - prependListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; - prependListener(event: "error", listener: (code: number, signal: string) => void): this; - - prependOnceListener(event: string, listener: Function): this; - prependOnceListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; - prependOnceListener(event: "error", listener: (code: number, signal: string) => void): this; } export interface ReadStream extends stream.Readable { close(): void; - destroy(): void; - - /** - * events.EventEmitter - * 1. open - * 2. close - */ - addListener(event: string, listener: Function): this; - addListener(event: "open", listener: (fd: number) => void): this; - addListener(event: "close", listener: () => void): this; - - on(event: string, listener: Function): this; - on(event: "open", listener: (fd: number) => void): this; - on(event: "close", listener: () => void): this; - - once(event: string, listener: Function): this; - once(event: "open", listener: (fd: number) => void): this; - once(event: "close", listener: () => void): this; - - prependListener(event: string, listener: Function): this; - prependListener(event: "open", listener: (fd: number) => void): this; - prependListener(event: "close", listener: () => void): this; - - prependOnceListener(event: string, listener: Function): this; - prependOnceListener(event: "open", listener: (fd: number) => void): this; - prependOnceListener(event: "close", listener: () => void): this; } - export interface WriteStream extends stream.Writable { close(): void; bytesWritten: number; - path: string | Buffer; - - /** - * events.EventEmitter - * 1. open - * 2. close - */ - addListener(event: string, listener: Function): this; - addListener(event: "open", listener: (fd: number) => void): this; - addListener(event: "close", listener: () => void): this; - - on(event: string, listener: Function): this; - on(event: "open", listener: (fd: number) => void): this; - on(event: "close", listener: () => void): this; - - once(event: string, listener: Function): this; - once(event: "open", listener: (fd: number) => void): this; - once(event: "close", listener: () => void): this; - - prependListener(event: string, listener: Function): this; - prependListener(event: "open", listener: (fd: number) => void): this; - prependListener(event: "close", listener: () => void): this; - - prependOnceListener(event: string, listener: Function): this; - prependOnceListener(event: "open", listener: (fd: number) => void): this; - prependOnceListener(event: "close", listener: () => void): this; } /** @@ -2072,78 +1088,78 @@ declare module "fs" { * @param newPath */ export function renameSync(oldPath: string, newPath: string): void; - export function truncate(path: string | Buffer, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function truncate(path: string | Buffer, len: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function truncateSync(path: string | Buffer, len?: number): void; + export function truncate(path: string, callback?: (err?: NodeJS.ErrnoException) => void): void; + export function truncate(path: string, len: number, callback?: (err?: NodeJS.ErrnoException) => void): void; + export function truncateSync(path: string, len?: number): void; export function ftruncate(fd: number, callback?: (err?: NodeJS.ErrnoException) => void): void; export function ftruncate(fd: number, len: number, callback?: (err?: NodeJS.ErrnoException) => void): void; export function ftruncateSync(fd: number, len?: number): void; - export function chown(path: string | Buffer, uid: number, gid: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function chownSync(path: string | Buffer, uid: number, gid: number): void; + export function chown(path: string, uid: number, gid: number, callback?: (err?: NodeJS.ErrnoException) => void): void; + export function chownSync(path: string, uid: number, gid: number): void; export function fchown(fd: number, uid: number, gid: number, callback?: (err?: NodeJS.ErrnoException) => void): void; export function fchownSync(fd: number, uid: number, gid: number): void; - export function lchown(path: string | Buffer, uid: number, gid: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function lchownSync(path: string | Buffer, uid: number, gid: number): void; - export function chmod(path: string | Buffer, mode: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function chmod(path: string | Buffer, mode: string, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function chmodSync(path: string | Buffer, mode: number): void; - export function chmodSync(path: string | Buffer, mode: string): void; + export function lchown(path: string, uid: number, gid: number, callback?: (err?: NodeJS.ErrnoException) => void): void; + export function lchownSync(path: string, uid: number, gid: number): void; + export function chmod(path: string, mode: number, callback?: (err?: NodeJS.ErrnoException) => void): void; + export function chmod(path: string, mode: string, callback?: (err?: NodeJS.ErrnoException) => void): void; + export function chmodSync(path: string, mode: number): void; + export function chmodSync(path: string, mode: string): void; export function fchmod(fd: number, mode: number, callback?: (err?: NodeJS.ErrnoException) => void): void; export function fchmod(fd: number, mode: string, callback?: (err?: NodeJS.ErrnoException) => void): void; export function fchmodSync(fd: number, mode: number): void; export function fchmodSync(fd: number, mode: string): void; - export function lchmod(path: string | Buffer, mode: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function lchmod(path: string | Buffer, mode: string, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function lchmodSync(path: string | Buffer, mode: number): void; - export function lchmodSync(path: string | Buffer, mode: string): void; - export function stat(path: string | Buffer, callback?: (err: NodeJS.ErrnoException, stats: Stats) => any): void; - export function lstat(path: string | Buffer, callback?: (err: NodeJS.ErrnoException, stats: Stats) => any): void; + export function lchmod(path: string, mode: number, callback?: (err?: NodeJS.ErrnoException) => void): void; + export function lchmod(path: string, mode: string, callback?: (err?: NodeJS.ErrnoException) => void): void; + export function lchmodSync(path: string, mode: number): void; + export function lchmodSync(path: string, mode: string): void; + export function stat(path: string, callback?: (err: NodeJS.ErrnoException, stats: Stats) => any): void; + export function lstat(path: string, callback?: (err: NodeJS.ErrnoException, stats: Stats) => any): void; export function fstat(fd: number, callback?: (err: NodeJS.ErrnoException, stats: Stats) => any): void; - export function statSync(path: string | Buffer): Stats; - export function lstatSync(path: string | Buffer): Stats; + export function statSync(path: string): Stats; + export function lstatSync(path: string): Stats; export function fstatSync(fd: number): Stats; - export function link(srcpath: string | Buffer, dstpath: string | Buffer, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function linkSync(srcpath: string | Buffer, dstpath: string | Buffer): void; - export function symlink(srcpath: string | Buffer, dstpath: string | Buffer, type?: string, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function symlinkSync(srcpath: string | Buffer, dstpath: string | Buffer, type?: string): void; - export function readlink(path: string | Buffer, callback?: (err: NodeJS.ErrnoException, linkString: string) => any): void; - export function readlinkSync(path: string | Buffer): string; - export function realpath(path: string | Buffer, callback?: (err: NodeJS.ErrnoException, resolvedPath: string) => any): void; - export function realpath(path: string | Buffer, cache: { [path: string]: string }, callback: (err: NodeJS.ErrnoException, resolvedPath: string) => any): void; - export function realpathSync(path: string | Buffer, cache?: { [path: string]: string }): string; + export function link(srcpath: string, dstpath: string, callback?: (err?: NodeJS.ErrnoException) => void): void; + export function linkSync(srcpath: string, dstpath: string): void; + export function symlink(srcpath: string, dstpath: string, type?: string, callback?: (err?: NodeJS.ErrnoException) => void): void; + export function symlinkSync(srcpath: string, dstpath: string, type?: string): void; + export function readlink(path: string, callback?: (err: NodeJS.ErrnoException, linkString: string) => any): void; + export function readlinkSync(path: string): string; + export function realpath(path: string, callback?: (err: NodeJS.ErrnoException, resolvedPath: string) => any): void; + export function realpath(path: string, cache: {[path: string]: string}, callback: (err: NodeJS.ErrnoException, resolvedPath: string) =>any): void; + export function realpathSync(path: string, cache?: { [path: string]: string }): string; /* * Asynchronous unlink - deletes the file specified in {path} * * @param path * @param callback No arguments other than a possible exception are given to the completion callback. */ - export function unlink(path: string | Buffer, callback?: (err?: NodeJS.ErrnoException) => void): void; + export function unlink(path: string, callback?: (err?: NodeJS.ErrnoException) => void): void; /* * Synchronous unlink - deletes the file specified in {path} * * @param path */ - export function unlinkSync(path: string | Buffer): void; + export function unlinkSync(path: string): void; /* * Asynchronous rmdir - removes the directory specified in {path} * * @param path * @param callback No arguments other than a possible exception are given to the completion callback. */ - export function rmdir(path: string | Buffer, callback?: (err?: NodeJS.ErrnoException) => void): void; + export function rmdir(path: string, callback?: (err?: NodeJS.ErrnoException) => void): void; /* * Synchronous rmdir - removes the directory specified in {path} * * @param path */ - export function rmdirSync(path: string | Buffer): void; + export function rmdirSync(path: string): void; /* * Asynchronous mkdir - creates the directory specified in {path}. Parameter {mode} defaults to 0777. * * @param path * @param callback No arguments other than a possible exception are given to the completion callback. */ - export function mkdir(path: string | Buffer, callback?: (err?: NodeJS.ErrnoException) => void): void; + export function mkdir(path: string, callback?: (err?: NodeJS.ErrnoException) => void): void; /* * Asynchronous mkdir - creates the directory specified in {path}. Parameter {mode} defaults to 0777. * @@ -2151,7 +1167,7 @@ declare module "fs" { * @param mode * @param callback No arguments other than a possible exception are given to the completion callback. */ - export function mkdir(path: string | Buffer, mode: number, callback?: (err?: NodeJS.ErrnoException) => void): void; + export function mkdir(path: string, mode: number, callback?: (err?: NodeJS.ErrnoException) => void): void; /* * Asynchronous mkdir - creates the directory specified in {path}. Parameter {mode} defaults to 0777. * @@ -2159,7 +1175,7 @@ declare module "fs" { * @param mode * @param callback No arguments other than a possible exception are given to the completion callback. */ - export function mkdir(path: string | Buffer, mode: string, callback?: (err?: NodeJS.ErrnoException) => void): void; + export function mkdir(path: string, mode: string, callback?: (err?: NodeJS.ErrnoException) => void): void; /* * Synchronous mkdir - creates the directory specified in {path}. Parameter {mode} defaults to 0777. * @@ -2167,7 +1183,7 @@ declare module "fs" { * @param mode * @param callback No arguments other than a possible exception are given to the completion callback. */ - export function mkdirSync(path: string | Buffer, mode?: number): void; + export function mkdirSync(path: string, mode?: number): void; /* * Synchronous mkdir - creates the directory specified in {path}. Parameter {mode} defaults to 0777. * @@ -2175,32 +1191,20 @@ declare module "fs" { * @param mode * @param callback No arguments other than a possible exception are given to the completion callback. */ - export function mkdirSync(path: string | Buffer, mode?: string): void; - /* - * Asynchronous mkdtemp - Creates a unique temporary directory. Generates six random characters to be appended behind a required prefix to create a unique temporary directory. - * - * @param prefix - * @param callback The created folder path is passed as a string to the callback's second parameter. - */ - export function mkdtemp(prefix: string, callback?: (err: NodeJS.ErrnoException, folder: string) => void): void; - /* - * Synchronous mkdtemp - Creates a unique temporary directory. Generates six random characters to be appended behind a required prefix to create a unique temporary directory. - * - * @param prefix - * @returns Returns the created folder path. - */ - export function mkdtempSync(prefix: string): string; - export function readdir(path: string | Buffer, callback?: (err: NodeJS.ErrnoException, files: string[]) => void): void; - export function readdirSync(path: string | Buffer): string[]; + export function mkdirSync(path: string, mode?: string): void; + export function readdir(path: string, callback?: (err: NodeJS.ErrnoException, files: string[]) => void): void; + export function readdirSync(path: string): string[]; export function close(fd: number, callback?: (err?: NodeJS.ErrnoException) => void): void; export function closeSync(fd: number): void; - export function open(path: string | Buffer, flags: string | number, callback: (err: NodeJS.ErrnoException, fd: number) => void): void; - export function open(path: string | Buffer, flags: string | number, mode: number, callback: (err: NodeJS.ErrnoException, fd: number) => void): void; - export function openSync(path: string | Buffer, flags: string | number, mode?: number): number; - export function utimes(path: string | Buffer, atime: number, mtime: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function utimes(path: string | Buffer, atime: Date, mtime: Date, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function utimesSync(path: string | Buffer, atime: number, mtime: number): void; - export function utimesSync(path: string | Buffer, atime: Date, mtime: Date): void; + export function open(path: string, flags: string, callback?: (err: NodeJS.ErrnoException, fd: number) => any): void; + export function open(path: string, flags: string, mode: number, callback?: (err: NodeJS.ErrnoException, fd: number) => any): void; + export function open(path: string, flags: string, mode: string, callback?: (err: NodeJS.ErrnoException, fd: number) => any): void; + export function openSync(path: string, flags: string, mode?: number): number; + export function openSync(path: string, flags: string, mode?: string): number; + export function utimes(path: string, atime: number, mtime: number, callback?: (err?: NodeJS.ErrnoException) => void): void; + export function utimes(path: string, atime: Date, mtime: Date, callback?: (err?: NodeJS.ErrnoException) => void): void; + export function utimesSync(path: string, atime: number, mtime: number): void; + export function utimesSync(path: string, atime: Date, mtime: Date): void; export function futimes(fd: number, atime: number, mtime: number, callback?: (err?: NodeJS.ErrnoException) => void): void; export function futimes(fd: number, atime: Date, mtime: Date, callback?: (err?: NodeJS.ErrnoException) => void): void; export function futimesSync(fd: number, atime: number, mtime: number): void; @@ -2209,11 +1213,7 @@ declare module "fs" { export function fsyncSync(fd: number): void; export function write(fd: number, buffer: Buffer, offset: number, length: number, position: number, callback?: (err: NodeJS.ErrnoException, written: number, buffer: Buffer) => void): void; export function write(fd: number, buffer: Buffer, offset: number, length: number, callback?: (err: NodeJS.ErrnoException, written: number, buffer: Buffer) => void): void; - export function write(fd: number, data: any, callback?: (err: NodeJS.ErrnoException, written: number, str: string) => void): void; - export function write(fd: number, data: any, offset: number, callback?: (err: NodeJS.ErrnoException, written: number, str: string) => void): void; - export function write(fd: number, data: any, offset: number, encoding: string, callback?: (err: NodeJS.ErrnoException, written: number, str: string) => void): void; - export function writeSync(fd: number, buffer: Buffer, offset: number, length: number, position?: number): number; - export function writeSync(fd: number, data: any, position?: number, enconding?: string): number; + export function writeSync(fd: number, buffer: Buffer, offset: number, length: number, position: number): number; export function read(fd: number, buffer: Buffer, offset: number, length: number, position: number, callback?: (err: NodeJS.ErrnoException, bytesRead: number, buffer: Buffer) => void): void; export function readSync(fd: number, buffer: Buffer, offset: number, length: number, position: number): number; /* @@ -2282,162 +1282,41 @@ declare module "fs" { export function watchFile(filename: string, options: { persistent?: boolean; interval?: number; }, listener: (curr: Stats, prev: Stats) => void): void; export function unwatchFile(filename: string, listener?: (curr: Stats, prev: Stats) => void): void; export function watch(filename: string, listener?: (event: string, filename: string) => any): FSWatcher; - export function watch(filename: string, encoding: string, listener?: (event: string, filename: string | Buffer) => any): FSWatcher; - export function watch(filename: string, options: { persistent?: boolean; recursive?: boolean; encoding?: string }, listener?: (event: string, filename: string | Buffer) => any): FSWatcher; - export function exists(path: string | Buffer, callback?: (exists: boolean) => void): void; - export function existsSync(path: string | Buffer): boolean; - - export namespace constants { - // File Access Constants - - /** Constant for fs.access(). File is visible to the calling process. */ - export const F_OK: number; - - /** Constant for fs.access(). File can be read by the calling process. */ - export const R_OK: number; - - /** Constant for fs.access(). File can be written by the calling process. */ - export const W_OK: number; - - /** Constant for fs.access(). File can be executed by the calling process. */ - export const X_OK: number; - - // File Open Constants - - /** Constant for fs.open(). Flag indicating to open a file for read-only access. */ - export const O_RDONLY: number; - - /** Constant for fs.open(). Flag indicating to open a file for write-only access. */ - export const O_WRONLY: number; - - /** Constant for fs.open(). Flag indicating to open a file for read-write access. */ - export const O_RDWR: number; - - /** Constant for fs.open(). Flag indicating to create the file if it does not already exist. */ - export const O_CREAT: number; - - /** Constant for fs.open(). Flag indicating that opening a file should fail if the O_CREAT flag is set and the file already exists. */ - export const O_EXCL: number; - - /** Constant for fs.open(). Flag indicating that if path identifies a terminal device, opening the path shall not cause that terminal to become the controlling terminal for the process (if the process does not already have one). */ - export const O_NOCTTY: number; - - /** Constant for fs.open(). Flag indicating that if the file exists and is a regular file, and the file is opened successfully for write access, its length shall be truncated to zero. */ - export const O_TRUNC: number; - - /** Constant for fs.open(). Flag indicating that data will be appended to the end of the file. */ - export const O_APPEND: number; - - /** Constant for fs.open(). Flag indicating that the open should fail if the path is not a directory. */ - export const O_DIRECTORY: number; - - /** Constant for fs.open(). Flag indicating reading accesses to the file system will no longer result in an update to the atime information associated with the file. This flag is available on Linux operating systems only. */ - export const O_NOATIME: number; - - /** Constant for fs.open(). Flag indicating that the open should fail if the path is a symbolic link. */ - export const O_NOFOLLOW: number; - - /** Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O. */ - export const O_SYNC: number; - - /** Constant for fs.open(). Flag indicating to open the symbolic link itself rather than the resource it is pointing to. */ - export const O_SYMLINK: number; - - /** Constant for fs.open(). When set, an attempt will be made to minimize caching effects of file I/O. */ - export const O_DIRECT: number; - - /** Constant for fs.open(). Flag indicating to open the file in nonblocking mode when possible. */ - export const O_NONBLOCK: number; - - // File Type Constants - - /** Constant for fs.Stats mode property for determining a file's type. Bit mask used to extract the file type code. */ - export const S_IFMT: number; - - /** Constant for fs.Stats mode property for determining a file's type. File type constant for a regular file. */ - export const S_IFREG: number; - - /** Constant for fs.Stats mode property for determining a file's type. File type constant for a directory. */ - export const S_IFDIR: number; - - /** Constant for fs.Stats mode property for determining a file's type. File type constant for a character-oriented device file. */ - export const S_IFCHR: number; - - /** Constant for fs.Stats mode property for determining a file's type. File type constant for a block-oriented device file. */ - export const S_IFBLK: number; - - /** Constant for fs.Stats mode property for determining a file's type. File type constant for a FIFO/pipe. */ - export const S_IFIFO: number; - - /** Constant for fs.Stats mode property for determining a file's type. File type constant for a symbolic link. */ - export const S_IFLNK: number; - - /** Constant for fs.Stats mode property for determining a file's type. File type constant for a socket. */ - export const S_IFSOCK: number; - - // File Mode Constants - - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by owner. */ - export const S_IRWXU: number; - - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by owner. */ - export const S_IRUSR: number; - - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by owner. */ - export const S_IWUSR: number; - - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by owner. */ - export const S_IXUSR: number; - - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by group. */ - export const S_IRWXG: number; - - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by group. */ - export const S_IRGRP: number; - - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by group. */ - export const S_IWGRP: number; - - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by group. */ - export const S_IXGRP: number; - - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by others. */ - export const S_IRWXO: number; - - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by others. */ - export const S_IROTH: number; - - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by others. */ - export const S_IWOTH: number; - - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by others. */ - export const S_IXOTH: number; - } - + export function watch(filename: string, options: { persistent?: boolean; }, listener?: (event: string, filename: string) => any): FSWatcher; + export function exists(path: string, callback?: (exists: boolean) => void): void; + export function existsSync(path: string): boolean; + /** Constant for fs.access(). File is visible to the calling process. */ + export var F_OK: number; + /** Constant for fs.access(). File can be read by the calling process. */ + export var R_OK: number; + /** Constant for fs.access(). File can be written by the calling process. */ + export var W_OK: number; + /** Constant for fs.access(). File can be executed by the calling process. */ + export var X_OK: number; /** Tests a user's permissions for the file specified by path. */ - export function access(path: string | Buffer, callback: (err: NodeJS.ErrnoException) => void): void; - export function access(path: string | Buffer, mode: number, callback: (err: NodeJS.ErrnoException) => void): void; + export function access(path: string, callback: (err: NodeJS.ErrnoException) => void): void; + export function access(path: string, mode: number, callback: (err: NodeJS.ErrnoException) => void): void; /** Synchronous version of fs.access. This throws if any accessibility checks fail, and does nothing otherwise. */ - export function accessSync(path: string | Buffer, mode?: number): void; - export function createReadStream(path: string | Buffer, options?: { + export function accessSync(path: string, mode ?: number): void; + export function createReadStream(path: string, options?: { flags?: string; encoding?: string; - fd?: number; + fd?: string; mode?: number; - autoClose?: boolean; - start?: number; - end?: number; + bufferSize?: number; }): ReadStream; - export function createWriteStream(path: string | Buffer, options?: { + export function createReadStream(path: string, options?: { flags?: string; encoding?: string; - fd?: number; - mode?: number; - autoClose?: boolean; - start?: number; + fd?: string; + mode?: string; + bufferSize?: number; + }): ReadStream; + export function createWriteStream(path: string, options?: { + flags?: string; + encoding?: string; + string?: string; }): WriteStream; - export function fdatasync(fd: number, callback: Function): void; - export function fdatasyncSync(fd: number): void; } declare module "path" { @@ -2556,43 +1435,43 @@ declare module "path" { export function format(pathObject: ParsedPath): string; export module posix { - export function normalize(p: string): string; - export function join(...paths: any[]): string; - export function resolve(...pathSegments: any[]): string; - export function isAbsolute(p: string): boolean; - export function relative(from: string, to: string): string; - export function dirname(p: string): string; - export function basename(p: string, ext?: string): string; - export function extname(p: string): string; - export var sep: string; - export var delimiter: string; - export function parse(p: string): ParsedPath; - export function format(pP: ParsedPath): string; + export function normalize(p: string): string; + export function join(...paths: any[]): string; + export function resolve(...pathSegments: any[]): string; + export function isAbsolute(p: string): boolean; + export function relative(from: string, to: string): string; + export function dirname(p: string): string; + export function basename(p: string, ext?: string): string; + export function extname(p: string): string; + export var sep: string; + export var delimiter: string; + export function parse(p: string): ParsedPath; + export function format(pP: ParsedPath): string; } export module win32 { - export function normalize(p: string): string; - export function join(...paths: any[]): string; - export function resolve(...pathSegments: any[]): string; - export function isAbsolute(p: string): boolean; - export function relative(from: string, to: string): string; - export function dirname(p: string): string; - export function basename(p: string, ext?: string): string; - export function extname(p: string): string; - export var sep: string; - export var delimiter: string; - export function parse(p: string): ParsedPath; - export function format(pP: ParsedPath): string; + export function normalize(p: string): string; + export function join(...paths: any[]): string; + export function resolve(...pathSegments: any[]): string; + export function isAbsolute(p: string): boolean; + export function relative(from: string, to: string): string; + export function dirname(p: string): string; + export function basename(p: string, ext?: string): string; + export function extname(p: string): string; + export var sep: string; + export var delimiter: string; + export function parse(p: string): ParsedPath; + export function format(pP: ParsedPath): string; } } declare module "string_decoder" { export interface NodeStringDecoder { write(buffer: Buffer): string; - end(buffer?: Buffer): string; + detectIncompleteChar(buffer: Buffer): number; } export var StringDecoder: { - new (encoding?: string): NodeStringDecoder; + new (encoding: string): NodeStringDecoder; }; } @@ -2604,222 +1483,42 @@ declare module "tls" { var CLIENT_RENEG_LIMIT: number; var CLIENT_RENEG_WINDOW: number; - export interface Certificate { - /** - * Country code. - */ - C: string; - /** - * Street. - */ - ST: string; - /** - * Locality. - */ - L: string; - /** - * Organization. - */ - O: string; - /** - * Organizational unit. - */ - OU: string; - /** - * Common name. - */ - CN: string; - } - - export interface CipherNameAndProtocol { - /** - * The cipher name. - */ - name: string; - /** - * SSL/TLS protocol version. - */ - version: string; - } - - export class TLSSocket extends stream.Duplex { - /** - * Returns the bound address, the address family name and port of the underlying socket as reported by - * the operating system. - * @returns {any} - An object with three properties, e.g. { port: 12346, family: 'IPv4', address: '127.0.0.1' }. - */ - address(): { port: number; family: string; address: string }; - /** - * A boolean that is true if the peer certificate was signed by one of the specified CAs, otherwise false. - */ - authorized: boolean; - /** - * The reason why the peer's certificate has not been verified. - * This property becomes available only when tlsSocket.authorized === false. - */ - authorizationError: Error; - /** - * Static boolean value, always true. - * May be used to distinguish TLS sockets from regular ones. - */ - encrypted: boolean; - /** - * Returns an object representing the cipher name and the SSL/TLS protocol version of the current connection. - * @returns {CipherNameAndProtocol} - Returns an object representing the cipher name - * and the SSL/TLS protocol version of the current connection. - */ - getCipher(): CipherNameAndProtocol; - /** - * Returns an object representing the peer's certificate. - * The returned object has some properties corresponding to the field of the certificate. - * If detailed argument is true the full chain with issuer property will be returned, - * if false only the top certificate without issuer property. - * If the peer does not provide a certificate, it returns null or an empty object. - * @param {boolean} detailed - If true; the full chain with issuer property will be returned. - * @returns {any} - An object representing the peer's certificate. - */ - getPeerCertificate(detailed?: boolean): { - subject: Certificate; - issuerInfo: Certificate; - issuer: Certificate; - raw: any; - valid_from: string; - valid_to: string; - fingerprint: string; - serialNumber: string; - }; - /** - * Could be used to speed up handshake establishment when reconnecting to the server. - * @returns {any} - ASN.1 encoded TLS session or undefined if none was negotiated. - */ - getSession(): any; - /** - * NOTE: Works only with client TLS sockets. - * Useful only for debugging, for session reuse provide session option to tls.connect(). - * @returns {any} - TLS session ticket or undefined if none was negotiated. - */ - getTLSTicket(): any; - /** - * The string representation of the local IP address. - */ - localAddress: string; - /** - * The numeric representation of the local port. - */ - localPort: string; - /** - * The string representation of the remote IP address. - * For example, '74.125.127.100' or '2001:4860:a005::68'. - */ - remoteAddress: string; - /** - * The string representation of the remote IP family. 'IPv4' or 'IPv6'. - */ - remoteFamily: string; - /** - * The numeric representation of the remote port. For example, 443. - */ - remotePort: number; - /** - * Initiate TLS renegotiation process. - * - * NOTE: Can be used to request peer's certificate after the secure connection has been established. - * ANOTHER NOTE: When running as the server, socket will be destroyed with an error after handshakeTimeout timeout. - * @param {TlsOptions} options - The options may contain the following fields: rejectUnauthorized, - * requestCert (See tls.createServer() for details). - * @param {Function} callback - callback(err) will be executed with null as err, once the renegotiation - * is successfully completed. - */ - renegotiate(options: TlsOptions, callback: (err: Error) => any): any; - /** - * Set maximum TLS fragment size (default and maximum value is: 16384, minimum is: 512). - * Smaller fragment size decreases buffering latency on the client: large fragments are buffered by - * the TLS layer until the entire fragment is received and its integrity is verified; - * large fragments can span multiple roundtrips, and their processing can be delayed due to packet - * loss or reordering. However, smaller fragments add extra TLS framing bytes and CPU overhead, - * which may decrease overall server throughput. - * @param {number} size - TLS fragment size (default and maximum value is: 16384, minimum is: 512). - * @returns {boolean} - Returns true on success, false otherwise. - */ - setMaxSendFragment(size: number): boolean; - - /** - * events.EventEmitter - * 1. OCSPResponse - * 2. secureConnect - **/ - addListener(event: string, listener: Function): this; - addListener(event: "OCSPResponse", listener: (response: Buffer) => void): this; - addListener(event: "secureConnect", listener: () => void): this; - - emit(event: string, ...args: any[]): boolean; - emit(event: "OCSPResponse", response: Buffer): boolean; - emit(event: "secureConnect"): boolean; - - on(event: string, listener: Function): this; - on(event: "OCSPResponse", listener: (response: Buffer) => void): this; - on(event: "secureConnect", listener: () => void): this; - - once(event: string, listener: Function): this; - once(event: "OCSPResponse", listener: (response: Buffer) => void): this; - once(event: "secureConnect", listener: () => void): this; - - prependListener(event: string, listener: Function): this; - prependListener(event: "OCSPResponse", listener: (response: Buffer) => void): this; - prependListener(event: "secureConnect", listener: () => void): this; - - prependOnceListener(event: string, listener: Function): this; - prependOnceListener(event: "OCSPResponse", listener: (response: Buffer) => void): this; - prependOnceListener(event: "secureConnect", listener: () => void): this; - } - export interface TlsOptions { - host?: string; - port?: number; - pfx?: string | Buffer[]; - key?: string | string[] | Buffer | any[]; + pfx?: any; //string or buffer + key?: any; //string or buffer passphrase?: string; - cert?: string | string[] | Buffer | Buffer[]; - ca?: string | string[] | Buffer | Buffer[]; - crl?: string | string[]; + cert?: any; + ca?: any; //string or buffer + crl?: any; //string or string array ciphers?: string; - honorCipherOrder?: boolean; + honorCipherOrder?: any; requestCert?: boolean; rejectUnauthorized?: boolean; - NPNProtocols?: string[] | Buffer; - SNICallback?: (servername: string, cb: (err: Error, ctx: SecureContext) => any) => any; - ecdhCurve?: string; - dhparam?: string | Buffer; - handshakeTimeout?: number; - ALPNProtocols?: string[] | Buffer; - sessionTimeout?: number; - ticketKeys?: any; - sessionIdContext?: string; - secureProtocol?: string; + NPNProtocols?: any; //array or Buffer; + SNICallback?: (servername: string) => any; } export interface ConnectionOptions { host?: string; port?: number; socket?: net.Socket; - pfx?: string | Buffer - key?: string | string[] | Buffer | Buffer[]; + pfx?: any; //string | Buffer + key?: any; //string | Buffer passphrase?: string; - cert?: string | string[] | Buffer | Buffer[]; - ca?: string | Buffer | (string | Buffer)[]; + cert?: any; //string | Buffer + ca?: any; //Array of string | Buffer rejectUnauthorized?: boolean; - NPNProtocols?: (string | Buffer)[]; + NPNProtocols?: any; //Array of string | Buffer servername?: string; - path?: string; - ALPNProtocols?: (string | Buffer)[]; - checkServerIdentity?: (servername: string, cert: string | Buffer | (string | Buffer)[]) => any; - secureProtocol?: string; - secureContext?: Object; - session?: Buffer; - minDHSize?: number; } export interface Server extends net.Server { + // Extended base methods + listen(port: number, host?: string, backlog?: number, listeningListener?: Function): Server; + listen(path: string, listeningListener?: Function): Server; + listen(handle: any, listeningListener?: Function): Server; + + listen(port: number, host?: string, callback?: Function): Server; close(): Server; address(): { port: number; family: string; address: string; }; addContext(hostName: string, credentials: { @@ -2829,56 +1528,6 @@ declare module "tls" { }): void; maxConnections: number; connections: number; - - /** - * events.EventEmitter - * 1. tlsClientError - * 2. newSession - * 3. OCSPRequest - * 4. resumeSession - * 5. secureConnection - **/ - addListener(event: string, listener: Function): this; - addListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; - addListener(event: "newSession", listener: (sessionId: any, sessionData: any, callback: (err: Error, resp: Buffer) => void) => void): this; - addListener(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: Function) => void): this; - addListener(event: "resumeSession", listener: (sessionId: any, callback: (err: Error, sessionData: any) => void) => void): this; - addListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; - - emit(event: string, ...args: any[]): boolean; - emit(event: "tlsClientError", err: Error, tlsSocket: TLSSocket): boolean; - emit(event: "newSession", sessionId: any, sessionData: any, callback: (err: Error, resp: Buffer) => void): boolean; - emit(event: "OCSPRequest", certificate: Buffer, issuer: Buffer, callback: Function): boolean; - emit(event: "resumeSession", sessionId: any, callback: (err: Error, sessionData: any) => void): boolean; - emit(event: "secureConnection", tlsSocket: TLSSocket): boolean; - - on(event: string, listener: Function): this; - on(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; - on(event: "newSession", listener: (sessionId: any, sessionData: any, callback: (err: Error, resp: Buffer) => void) => void): this; - on(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: Function) => void): this; - on(event: "resumeSession", listener: (sessionId: any, callback: (err: Error, sessionData: any) => void) => void): this; - on(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; - - once(event: string, listener: Function): this; - once(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; - once(event: "newSession", listener: (sessionId: any, sessionData: any, callback: (err: Error, resp: Buffer) => void) => void): this; - once(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: Function) => void): this; - once(event: "resumeSession", listener: (sessionId: any, callback: (err: Error, sessionData: any) => void) => void): this; - once(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; - - prependListener(event: string, listener: Function): this; - prependListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; - prependListener(event: "newSession", listener: (sessionId: any, sessionData: any, callback: (err: Error, resp: Buffer) => void) => void): this; - prependListener(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: Function) => void): this; - prependListener(event: "resumeSession", listener: (sessionId: any, callback: (err: Error, sessionData: any) => void) => void): this; - prependListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; - - prependOnceListener(event: string, listener: Function): this; - prependOnceListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; - prependOnceListener(event: "newSession", listener: (sessionId: any, sessionData: any, callback: (err: Error, resp: Buffer) => void) => void): this; - prependOnceListener(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: Function) => void): this; - prependOnceListener(event: "resumeSession", listener: (sessionId: any, callback: (err: Error, sessionData: any) => void) => void): this; - prependOnceListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; } export interface ClearTextStream extends stream.Duplex { @@ -2904,12 +1553,12 @@ declare module "tls" { } export interface SecureContextOptions { - pfx?: string | Buffer; - key?: string | Buffer; + pfx?: any; //string | buffer + key?: any; //string | buffer passphrase?: string; - cert?: string | Buffer; - ca?: string | Buffer; - crl?: string | string[] + cert?: any; // string | buffer + ca?: any; // string | buffer + crl?: any; // string | string[] ciphers?: string; honorCipherOrder?: boolean; } @@ -2918,397 +1567,189 @@ declare module "tls" { context: any; } - export function createServer(options: TlsOptions, secureConnectionListener?: (cleartextStream: ClearTextStream) => void): Server; - export function connect(options: ConnectionOptions, secureConnectionListener?: () => void): ClearTextStream; - export function connect(port: number, host?: string, options?: ConnectionOptions, secureConnectListener?: () => void): ClearTextStream; - export function connect(port: number, options?: ConnectionOptions, secureConnectListener?: () => void): ClearTextStream; + export function createServer(options: TlsOptions, secureConnectionListener?: (cleartextStream: ClearTextStream) =>void ): Server; + export function connect(options: TlsOptions, secureConnectionListener?: () =>void ): ClearTextStream; + export function connect(port: number, host?: string, options?: ConnectionOptions, secureConnectListener?: () =>void ): ClearTextStream; + export function connect(port: number, options?: ConnectionOptions, secureConnectListener?: () =>void ): ClearTextStream; export function createSecurePair(credentials?: crypto.Credentials, isServer?: boolean, requestCert?: boolean, rejectUnauthorized?: boolean): SecurePair; export function createSecureContext(details: SecureContextOptions): SecureContext; } declare module "crypto" { - export interface Certificate { - exportChallenge(spkac: string | Buffer): Buffer; - exportPublicKey(spkac: string | Buffer): Buffer; - verifySpkac(spkac: Buffer): boolean; - } - export var Certificate: { - new (): Certificate; - (): Certificate; - } - - export var fips: boolean; - export interface CredentialDetails { pfx: string; key: string; passphrase: string; cert: string; - ca: string | string[]; - crl: string | string[]; + ca: any; //string | string array + crl: any; //string | string array ciphers: string; } export interface Credentials { context?: any; } export function createCredentials(details: CredentialDetails): Credentials; export function createHash(algorithm: string): Hash; - export function createHmac(algorithm: string, key: string | Buffer): Hmac; - - type Utf8AsciiLatin1Encoding = "utf8" | "ascii" | "latin1"; - type HexBase64Latin1Encoding = "latin1" | "hex" | "base64"; - type Utf8AsciiBinaryEncoding = "utf8" | "ascii" | "binary"; - type HexBase64BinaryEncoding = "binary" | "base64" | "hex"; - type ECDHKeyFormat = "compressed" | "uncompressed" | "hybrid"; - - export interface Hash extends NodeJS.ReadWriteStream { - update(data: string | Buffer): Hash; - update(data: string | Buffer, input_encoding: Utf8AsciiLatin1Encoding): Hash; + export function createHmac(algorithm: string, key: string): Hmac; + export function createHmac(algorithm: string, key: Buffer): Hmac; + interface Hash { + update(data: any, input_encoding?: string): Hash; + digest(encoding: 'buffer'): Buffer; + digest(encoding: string): any; digest(): Buffer; - digest(encoding: HexBase64Latin1Encoding): string; } - export interface Hmac extends NodeJS.ReadWriteStream { - update(data: string | Buffer): Hmac; - update(data: string | Buffer, input_encoding: Utf8AsciiLatin1Encoding): Hmac; + interface Hmac { + update(data: any, input_encoding?: string): Hmac; + digest(encoding: 'buffer'): Buffer; + digest(encoding: string): any; digest(): Buffer; - digest(encoding: HexBase64Latin1Encoding): string; } export function createCipher(algorithm: string, password: any): Cipher; export function createCipheriv(algorithm: string, key: any, iv: any): Cipher; - export interface Cipher extends NodeJS.ReadWriteStream { + interface Cipher { update(data: Buffer): Buffer; - update(data: string, input_encoding: Utf8AsciiBinaryEncoding): Buffer; - update(data: Buffer, input_encoding: any, output_encoding: HexBase64BinaryEncoding): string; - update(data: string, input_encoding: Utf8AsciiBinaryEncoding, output_encoding: HexBase64BinaryEncoding): string; + update(data: string, input_encoding?: string, output_encoding?: string): string; final(): Buffer; final(output_encoding: string): string; - setAutoPadding(auto_padding?: boolean): void; - getAuthTag(): Buffer; - setAAD(buffer: Buffer): void; + setAutoPadding(auto_padding: boolean): void; } export function createDecipher(algorithm: string, password: any): Decipher; export function createDecipheriv(algorithm: string, key: any, iv: any): Decipher; - export interface Decipher extends NodeJS.ReadWriteStream { + interface Decipher { update(data: Buffer): Buffer; - update(data: string, input_encoding: HexBase64BinaryEncoding): Buffer; - update(data: Buffer, input_encoding: any, output_encoding: Utf8AsciiBinaryEncoding): string; - update(data: string, input_encoding: HexBase64BinaryEncoding, output_encoding: Utf8AsciiBinaryEncoding): string; + update(data: string, input_encoding?: string, output_encoding?: string): string; final(): Buffer; final(output_encoding: string): string; - setAutoPadding(auto_padding?: boolean): void; - setAuthTag(tag: Buffer): void; - setAAD(buffer: Buffer): void; + setAutoPadding(auto_padding: boolean): void; } export function createSign(algorithm: string): Signer; - export interface Signer extends NodeJS.WritableStream { - update(data: string | Buffer): Signer; - update(data: string | Buffer, input_encoding: Utf8AsciiLatin1Encoding): Signer; - sign(private_key: string | { key: string; passphrase: string }): Buffer; - sign(private_key: string | { key: string; passphrase: string }, output_format: HexBase64Latin1Encoding): string; + interface Signer { + update(data: any): void; + sign(private_key: string, output_format: string): string; } export function createVerify(algorith: string): Verify; - export interface Verify extends NodeJS.WritableStream { - update(data: string | Buffer): Verify; - update(data: string | Buffer, input_encoding: Utf8AsciiLatin1Encoding): Verify; - verify(object: string, signature: Buffer): boolean; - verify(object: string, signature: string, signature_format: HexBase64Latin1Encoding): boolean; - } - export function createDiffieHellman(prime_length: number, generator?: number): DiffieHellman; - export function createDiffieHellman(prime: Buffer): DiffieHellman; - export function createDiffieHellman(prime: string, prime_encoding: HexBase64Latin1Encoding): DiffieHellman; - export function createDiffieHellman(prime: string, prime_encoding: HexBase64Latin1Encoding, generator: number | Buffer): DiffieHellman; - export function createDiffieHellman(prime: string, prime_encoding: HexBase64Latin1Encoding, generator: string, generator_encoding: HexBase64Latin1Encoding): DiffieHellman; - export interface DiffieHellman { - generateKeys(): Buffer; - generateKeys(encoding: HexBase64Latin1Encoding): string; - computeSecret(other_public_key: Buffer): Buffer; - computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding): Buffer; - computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding, output_encoding: HexBase64Latin1Encoding): string; - getPrime(): Buffer; - getPrime(encoding: HexBase64Latin1Encoding): string; - getGenerator(): Buffer; - getGenerator(encoding: HexBase64Latin1Encoding): string; - getPublicKey(): Buffer; - getPublicKey(encoding: HexBase64Latin1Encoding): string; - getPrivateKey(): Buffer; - getPrivateKey(encoding: HexBase64Latin1Encoding): string; - setPublicKey(public_key: Buffer): void; - setPublicKey(public_key: string, encoding: string): void; - setPrivateKey(private_key: Buffer): void; - setPrivateKey(private_key: string, encoding: string): void; - verifyError: number; + interface Verify { + update(data: any): void; + verify(object: string, signature: string, signature_format?: string): boolean; + } + export function createDiffieHellman(prime_length: number): DiffieHellman; + export function createDiffieHellman(prime: number, encoding?: string): DiffieHellman; + interface DiffieHellman { + generateKeys(encoding?: string): string; + computeSecret(other_public_key: string, input_encoding?: string, output_encoding?: string): string; + getPrime(encoding?: string): string; + getGenerator(encoding: string): string; + getPublicKey(encoding?: string): string; + getPrivateKey(encoding?: string): string; + setPublicKey(public_key: string, encoding?: string): void; + setPrivateKey(public_key: string, encoding?: string): void; } export function getDiffieHellman(group_name: string): DiffieHellman; - export function pbkdf2(password: string | Buffer, salt: string | Buffer, iterations: number, keylen: number, digest: string, callback: (err: Error, derivedKey: Buffer) => any): void; - export function pbkdf2Sync(password: string | Buffer, salt: string | Buffer, iterations: number, keylen: number, digest: string): Buffer; + export function pbkdf2(password: string, salt: string, iterations: number, keylen: number, callback: (err: Error, derivedKey: Buffer) => any): void; + export function pbkdf2(password: string, salt: string, iterations: number, keylen: number, digest: string, callback: (err: Error, derivedKey: Buffer) => any): void; + export function pbkdf2Sync(password: string, salt: string, iterations: number, keylen: number) : Buffer; + export function pbkdf2Sync(password: string, salt: string, iterations: number, keylen: number, digest: string) : Buffer; export function randomBytes(size: number): Buffer; - export function randomBytes(size: number, callback: (err: Error, buf: Buffer) => void): void; + export function randomBytes(size: number, callback: (err: Error, buf: Buffer) =>void ): void; export function pseudoRandomBytes(size: number): Buffer; - export function pseudoRandomBytes(size: number, callback: (err: Error, buf: Buffer) => void): void; - export interface RsaPublicKey { - key: string; - padding?: number; - } - export interface RsaPrivateKey { - key: string; - passphrase?: string, - padding?: number; - } - export function publicEncrypt(public_key: string | RsaPublicKey, buffer: Buffer): Buffer - export function privateDecrypt(private_key: string | RsaPrivateKey, buffer: Buffer): Buffer - export function privateEncrypt(private_key: string | RsaPrivateKey, buffer: Buffer): Buffer - export function publicDecrypt(public_key: string | RsaPublicKey, buffer: Buffer): Buffer - export function getCiphers(): string[]; - export function getCurves(): string[]; - export function getHashes(): string[]; - export interface ECDH { - generateKeys(): Buffer; - generateKeys(encoding: HexBase64Latin1Encoding): string; - generateKeys(encoding: HexBase64Latin1Encoding, format: ECDHKeyFormat): string; - computeSecret(other_public_key: Buffer): Buffer; - computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding): Buffer; - computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding, output_encoding: HexBase64Latin1Encoding): string; - getPrivateKey(): Buffer; - getPrivateKey(encoding: HexBase64Latin1Encoding): string; - getPublicKey(): Buffer; - getPublicKey(encoding: HexBase64Latin1Encoding): string; - getPublicKey(encoding: HexBase64Latin1Encoding, format: ECDHKeyFormat): string; - setPrivateKey(private_key: Buffer): void; - setPrivateKey(private_key: string, encoding: HexBase64Latin1Encoding): void; - } - export function createECDH(curve_name: string): ECDH; - export function timingSafeEqual(a: Buffer, b: Buffer): boolean; - export var DEFAULT_ENCODING: string; + export function pseudoRandomBytes(size: number, callback: (err: Error, buf: Buffer) =>void ): void; } declare module "stream" { import * as events from "events"; - class internal extends events.EventEmitter { + export interface Stream extends events.EventEmitter { pipe(destination: T, options?: { end?: boolean; }): T; } - namespace internal { - - export class Stream extends internal { } - - export interface ReadableOptions { - highWaterMark?: number; - encoding?: string; - objectMode?: boolean; - read?: (size?: number) => any; - } - export class Readable extends events.EventEmitter implements NodeJS.ReadableStream { - readable: boolean; - constructor(opts?: ReadableOptions); - protected _read(size: number): void; - read(size?: number): any; - setEncoding(encoding: string): void; - pause(): Readable; - resume(): Readable; - pipe(destination: T, options?: { end?: boolean; }): T; - unpipe(destination?: T): void; - unshift(chunk: any): void; - wrap(oldStream: NodeJS.ReadableStream): NodeJS.ReadableStream; - push(chunk: any, encoding?: string): boolean; - - /** - * Event emitter - * The defined events on documents including: - * 1. close - * 2. data - * 3. end - * 4. readable - * 5. error - **/ - addListener(event: string, listener: Function): this; - addListener(event: string, listener: Function): this; - addListener(event: "close", listener: () => void): this; - addListener(event: "data", listener: (chunk: Buffer | string) => void): this; - addListener(event: "end", listener: () => void): this; - addListener(event: "readable", listener: () => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - - emit(event: string, ...args: any[]): boolean; - emit(event: "close"): boolean; - emit(event: "data", chunk: Buffer | string): boolean; - emit(event: "end"): boolean; - emit(event: "readable"): boolean; - emit(event: "error", err: Error): boolean; - - on(event: string, listener: Function): this; - on(event: "close", listener: () => void): this; - on(event: "data", listener: (chunk: Buffer | string) => void): this; - on(event: "end", listener: () => void): this; - on(event: "readable", listener: () => void): this; - on(event: "error", listener: (err: Error) => void): this; - - once(event: string, listener: Function): this; - once(event: "close", listener: () => void): this; - once(event: "data", listener: (chunk: Buffer | string) => void): this; - once(event: "end", listener: () => void): this; - once(event: "readable", listener: () => void): this; - once(event: "error", listener: (err: Error) => void): this; - - prependListener(event: string, listener: Function): this; - prependListener(event: "close", listener: () => void): this; - prependListener(event: "data", listener: (chunk: Buffer | string) => void): this; - prependListener(event: "end", listener: () => void): this; - prependListener(event: "readable", listener: () => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; - - prependOnceListener(event: string, listener: Function): this; - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "data", listener: (chunk: Buffer | string) => void): this; - prependOnceListener(event: "end", listener: () => void): this; - prependOnceListener(event: "readable", listener: () => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; - - removeListener(event: string, listener: Function): this; - removeListener(event: "close", listener: () => void): this; - removeListener(event: "data", listener: (chunk: Buffer | string) => void): this; - removeListener(event: "end", listener: () => void): this; - removeListener(event: "readable", listener: () => void): this; - removeListener(event: "error", listener: (err: Error) => void): this; - } + export interface ReadableOptions { + highWaterMark?: number; + encoding?: string; + objectMode?: boolean; + } - export interface WritableOptions { - highWaterMark?: number; - decodeStrings?: boolean; - objectMode?: boolean; - write?: (chunk: string | Buffer, encoding: string, callback: Function) => any; - writev?: (chunks: { chunk: string | Buffer, encoding: string }[], callback: Function) => any; - } + export class Readable extends events.EventEmitter implements NodeJS.ReadableStream { + readable: boolean; + constructor(opts?: ReadableOptions); + _read(size: number): void; + read(size?: number): string|Buffer; + setEncoding(encoding: string): void; + pause(): void; + resume(): void; + pipe(destination: T, options?: { end?: boolean; }): T; + unpipe(destination?: T): void; + unshift(chunk: string): void; + unshift(chunk: Buffer): void; + wrap(oldStream: NodeJS.ReadableStream): NodeJS.ReadableStream; + push(chunk: any, encoding?: string): boolean; + } - export class Writable extends events.EventEmitter implements NodeJS.WritableStream { - writable: boolean; - constructor(opts?: WritableOptions); - protected _write(chunk: any, encoding: string, callback: Function): void; - write(chunk: any, cb?: Function): boolean; - write(chunk: any, encoding?: string, cb?: Function): boolean; - end(): void; - end(chunk: any, cb?: Function): void; - end(chunk: any, encoding?: string, cb?: Function): void; - - /** - * Event emitter - * The defined events on documents including: - * 1. close - * 2. drain - * 3. error - * 4. finish - * 5. pipe - * 6. unpipe - **/ - addListener(event: string, listener: Function): this; - addListener(event: "close", listener: () => void): this; - addListener(event: "drain", listener: () => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - addListener(event: "finish", listener: () => void): this; - addListener(event: "pipe", listener: (src: Readable) => void): this; - addListener(event: "unpipe", listener: (src: Readable) => void): this; - - emit(event: string, ...args: any[]): boolean; - emit(event: "close"): boolean; - emit(event: "drain", chunk: Buffer | string): boolean; - emit(event: "error", err: Error): boolean; - emit(event: "finish"): boolean; - emit(event: "pipe", src: Readable): boolean; - emit(event: "unpipe", src: Readable): boolean; - - on(event: string, listener: Function): this; - on(event: "close", listener: () => void): this; - on(event: "drain", listener: () => void): this; - on(event: "error", listener: (err: Error) => void): this; - on(event: "finish", listener: () => void): this; - on(event: "pipe", listener: (src: Readable) => void): this; - on(event: "unpipe", listener: (src: Readable) => void): this; - - once(event: string, listener: Function): this; - once(event: "close", listener: () => void): this; - once(event: "drain", listener: () => void): this; - once(event: "error", listener: (err: Error) => void): this; - once(event: "finish", listener: () => void): this; - once(event: "pipe", listener: (src: Readable) => void): this; - once(event: "unpipe", listener: (src: Readable) => void): this; - - prependListener(event: string, listener: Function): this; - prependListener(event: "close", listener: () => void): this; - prependListener(event: "drain", listener: () => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; - prependListener(event: "finish", listener: () => void): this; - prependListener(event: "pipe", listener: (src: Readable) => void): this; - prependListener(event: "unpipe", listener: (src: Readable) => void): this; - - prependOnceListener(event: string, listener: Function): this; - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "drain", listener: () => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; - prependOnceListener(event: "finish", listener: () => void): this; - prependOnceListener(event: "pipe", listener: (src: Readable) => void): this; - prependOnceListener(event: "unpipe", listener: (src: Readable) => void): this; - - removeListener(event: string, listener: Function): this; - removeListener(event: "close", listener: () => void): this; - removeListener(event: "drain", listener: () => void): this; - removeListener(event: "error", listener: (err: Error) => void): this; - removeListener(event: "finish", listener: () => void): this; - removeListener(event: "pipe", listener: (src: Readable) => void): this; - removeListener(event: "unpipe", listener: (src: Readable) => void): this; - } + export interface WritableOptions { + highWaterMark?: number; + decodeStrings?: boolean; + } - export interface DuplexOptions extends ReadableOptions, WritableOptions { - allowHalfOpen?: boolean; - readableObjectMode?: boolean; - writableObjectMode?: boolean; - } + export class Writable extends events.EventEmitter implements NodeJS.WritableStream { + writable: boolean; + constructor(opts?: WritableOptions); + _write(data: Buffer, encoding: string, callback: Function): void; + _write(data: string, encoding: string, callback: Function): void; + write(buffer: Buffer, cb?: Function): boolean; + write(str: string, cb?: Function): boolean; + write(str: string, encoding?: string, cb?: Function): boolean; + end(): void; + end(buffer: Buffer, cb?: Function): void; + end(str: string, cb?: Function): void; + end(str: string, encoding?: string, cb?: Function): void; + } - // Note: Duplex extends both Readable and Writable. - export class Duplex extends Readable implements NodeJS.ReadWriteStream { - // Readable - pause(): Duplex; - resume(): Duplex; - // Writeable - writable: boolean; - constructor(opts?: DuplexOptions); - protected _write(chunk: any, encoding: string, callback: Function): void; - write(chunk: any, cb?: Function): boolean; - write(chunk: any, encoding?: string, cb?: Function): boolean; - end(): void; - end(chunk: any, cb?: Function): void; - end(chunk: any, encoding?: string, cb?: Function): void; - } + export interface DuplexOptions extends ReadableOptions, WritableOptions { + allowHalfOpen?: boolean; + } - export interface TransformOptions extends DuplexOptions { - transform?: (chunk: string | Buffer, encoding: string, callback: Function) => any; - flush?: (callback: Function) => any; - } + // Note: Duplex extends both Readable and Writable. + export class Duplex extends Readable implements NodeJS.ReadWriteStream { + writable: boolean; + constructor(opts?: DuplexOptions); + _write(data: Buffer, encoding: string, callback: Function): void; + _write(data: string, encoding: string, callback: Function): void; + write(buffer: Buffer, cb?: Function): boolean; + write(str: string, cb?: Function): boolean; + write(str: string, encoding?: string, cb?: Function): boolean; + end(): void; + end(buffer: Buffer, cb?: Function): void; + end(str: string, cb?: Function): void; + end(str: string, encoding?: string, cb?: Function): void; + } - // Note: Transform lacks the _read and _write methods of Readable/Writable. - export class Transform extends events.EventEmitter implements NodeJS.ReadWriteStream { - readable: boolean; - writable: boolean; - constructor(opts?: TransformOptions); - protected _transform(chunk: any, encoding: string, callback: Function): void; - protected _flush(callback: Function): void; - read(size?: number): any; - setEncoding(encoding: string): void; - pause(): Transform; - resume(): Transform; - pipe(destination: T, options?: { end?: boolean; }): T; - unpipe(destination?: T): void; - unshift(chunk: any): void; - wrap(oldStream: NodeJS.ReadableStream): NodeJS.ReadableStream; - push(chunk: any, encoding?: string): boolean; - write(chunk: any, cb?: Function): boolean; - write(chunk: any, encoding?: string, cb?: Function): boolean; - end(): void; - end(chunk: any, cb?: Function): void; - end(chunk: any, encoding?: string, cb?: Function): void; - } + export interface TransformOptions extends ReadableOptions, WritableOptions {} - export class PassThrough extends Transform { } + // Note: Transform lacks the _read and _write methods of Readable/Writable. + export class Transform extends events.EventEmitter implements NodeJS.ReadWriteStream { + readable: boolean; + writable: boolean; + constructor(opts?: TransformOptions); + _transform(chunk: Buffer, encoding: string, callback: Function): void; + _transform(chunk: string, encoding: string, callback: Function): void; + _flush(callback: Function): void; + read(size?: number): any; + setEncoding(encoding: string): void; + pause(): void; + resume(): void; + pipe(destination: T, options?: { end?: boolean; }): T; + unpipe(destination?: T): void; + unshift(chunk: string): void; + unshift(chunk: Buffer): void; + wrap(oldStream: NodeJS.ReadableStream): NodeJS.ReadableStream; + push(chunk: any, encoding?: string): boolean; + write(buffer: Buffer, cb?: Function): boolean; + write(str: string, cb?: Function): boolean; + write(str: string, encoding?: string, cb?: Function): boolean; + end(): void; + end(buffer: Buffer, cb?: Function): void; + end(str: string, cb?: Function): void; + end(str: string, encoding?: string, cb?: Function): void; } - export = internal; + export class PassThrough extends Transform {} } declare module "util" { @@ -3332,24 +1773,11 @@ declare module "util" { export function isDate(object: any): boolean; export function isError(object: any): boolean; export function inherits(constructor: any, superConstructor: any): void; - export function debuglog(key: string): (msg: string, ...param: any[]) => void; - export function isBoolean(object: any): boolean; - export function isBuffer(object: any): boolean; - export function isFunction(object: any): boolean; - export function isNull(object: any): boolean; - export function isNullOrUndefined(object: any): boolean; - export function isNumber(object: any): boolean; - export function isObject(object: any): boolean; - export function isPrimitive(object: any): boolean; - export function isString(object: any): boolean; - export function isSymbol(object: any): boolean; - export function isUndefined(object: any): boolean; - export function deprecate(fn: Function, message: string): Function; } declare module "assert" { - function internal(value: any, message?: string): void; - namespace internal { + function internal (value: any, message?: string): void; + module internal { export class AssertionError implements Error { name: string; message: string; @@ -3358,13 +1786,11 @@ declare module "assert" { operator: string; generatedMessage: boolean; - constructor(options?: { - message?: string; actual?: any; expected?: any; - operator?: string; stackStartFunction?: Function - }); + constructor(options?: {message?: string; actual?: any; expected?: any; + operator?: string; stackStartFunction?: Function}); } - export function fail(actual: any, expected: any, message: string, operator: string): void; + export function fail(actual?: any, expected?: any, message?: string, operator?: string): void; export function ok(value: any, message?: string): void; export function equal(actual: any, expected: any, message?: string): void; export function notEqual(actual: any, expected: any, message?: string): void; @@ -3372,8 +1798,6 @@ declare module "assert" { export function notDeepEqual(acutal: any, expected: any, message?: string): void; export function strictEqual(actual: any, expected: any, message?: string): void; export function notStrictEqual(actual: any, expected: any, message?: string): void; - export function deepStrictEqual(actual: any, expected: any, message?: string): void; - export function notDeepStrictEqual(actual: any, expected: any, message?: string): void; export var throws: { (block: Function, message?: string): void; (block: Function, error: Function, message?: string): void; @@ -3401,28 +1825,29 @@ declare module "tty" { export interface ReadStream extends net.Socket { isRaw: boolean; setRawMode(mode: boolean): void; - isTTY: boolean; } export interface WriteStream extends net.Socket { columns: number; rows: number; - isTTY: boolean; } } declare module "domain" { import * as events from "events"; - export class Domain extends events.EventEmitter implements NodeJS.Domain { + export class Domain extends events.EventEmitter { run(fn: Function): void; add(emitter: events.EventEmitter): void; remove(emitter: events.EventEmitter): void; bind(cb: (err: Error, data: any) => any): any; intercept(cb: (data: any) => any): any; dispose(): void; - members: any[]; - enter(): void; - exit(): void; + + addListener(event: string, listener: Function): Domain; + on(event: string, listener: Function): Domain; + once(event: string, listener: Function): Domain; + removeListener(event: string, listener: Function): Domain; + removeAllListeners(event?: string): Domain; } export function create(): Domain; @@ -3640,32 +2065,9 @@ declare module "constants" { export var S_IFREG: number; export var S_IFDIR: number; export var S_IFCHR: number; - export var S_IFBLK: number; - export var S_IFIFO: number; - export var S_IFSOCK: number; - export var S_IRWXU: number; - export var S_IRUSR: number; - export var S_IWUSR: number; - export var S_IXUSR: number; - export var S_IRWXG: number; - export var S_IRGRP: number; - export var S_IWGRP: number; - export var S_IXGRP: number; - export var S_IRWXO: number; - export var S_IROTH: number; - export var S_IWOTH: number; - export var S_IXOTH: number; export var S_IFLNK: number; export var O_CREAT: number; export var O_EXCL: number; - export var O_NOCTTY: number; - export var O_DIRECTORY: number; - export var O_NOATIME: number; - export var O_NOFOLLOW: number; - export var O_SYNC: number; - export var O_SYMLINK: number; - export var O_DIRECT: number; - export var O_NONBLOCK: number; export var O_TRUNC: number; export var O_APPEND: number; export var F_OK: number; @@ -3673,63 +2075,4 @@ declare module "constants" { export var W_OK: number; export var X_OK: number; export var UV_UDP_REUSEADDR: number; - export var SIGQUIT: number; - export var SIGTRAP: number; - export var SIGIOT: number; - export var SIGBUS: number; - export var SIGUSR1: number; - export var SIGUSR2: number; - export var SIGPIPE: number; - export var SIGALRM: number; - export var SIGCHLD: number; - export var SIGSTKFLT: number; - export var SIGCONT: number; - export var SIGSTOP: number; - export var SIGTSTP: number; - export var SIGTTIN: number; - export var SIGTTOU: number; - export var SIGURG: number; - export var SIGXCPU: number; - export var SIGXFSZ: number; - export var SIGVTALRM: number; - export var SIGPROF: number; - export var SIGIO: number; - export var SIGPOLL: number; - export var SIGPWR: number; - export var SIGSYS: number; - export var SIGUNUSED: number; - export var defaultCoreCipherList: string; - export var defaultCipherList: string; - export var ENGINE_METHOD_RSA: number; - export var ALPN_ENABLED: number; -} - -declare module "process" { - export = process; -} - -declare module "v8" { - interface HeapSpaceInfo { - space_name: string; - space_size: number; - space_used_size: number; - space_available_size: number; - physical_space_size: number; - } - export function getHeapStatistics(): { total_heap_size: number, total_heap_size_executable: number, total_physical_size: number, total_avaialble_size: number, used_heap_size: number, heap_size_limit: number }; - export function getHeapSpaceStatistics(): HeapSpaceInfo[]; - export function setFlagsFromString(flags: string): void; -} - -declare module "timers" { - export function setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timer; - export function clearTimeout(timeoutId: NodeJS.Timer): void; - export function setInterval(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timer; - export function clearInterval(intervalId: NodeJS.Timer): void; - export function setImmediate(callback: (...args: any[]) => void, ...args: any[]): any; - export function clearImmediate(immediateId: any): void; -} - -declare module "console" { - export = console; } diff --git a/typings/q/Q.d.ts b/typings/q/Q.d.ts new file mode 100644 index 00000000..8e69d8b4 --- /dev/null +++ b/typings/q/Q.d.ts @@ -0,0 +1,330 @@ +// Type definitions for Q +// Project: https://github.com/kriskowal/q +// Definitions by: Barrie Nemetchek , Andrew Gaspar , John Reilly +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/** + * If value is a Q promise, returns the promise. + * If value is a promise from another library it is coerced into a Q promise (where possible). + */ +declare function Q(promise: Q.IPromise): Promise; +/** + * If value is not a promise, returns a promise that is fulfilled with value. + */ +declare function Q(value: T): Promise; + +declare module Q { + interface IPromise { + then(onFulfill?: (value: T) => U | IPromise, onReject?: (error: any) => U | IPromise): IPromise; + } + + interface Deferred { + promise: Promise; + resolve(value: T): void; + reject(reason: any): void; + notify(value: any): void; + makeNodeResolver(): (reason: any, value: T) => void; + } + + interface Promise { + /** + * Like a finally clause, allows you to observe either the fulfillment or rejection of a promise, but to do so without modifying the final value. This is useful for collecting resources regardless of whether a job succeeded, like closing a database connection, shutting a server down, or deleting an unneeded key from an object. + + * finally returns a promise, which will become resolved with the same fulfillment value or rejection reason as promise. However, if callback returns a promise, the resolution of the returned promise will be delayed until the promise returned from callback is finished. + */ + fin(finallyCallback: () => any): Promise; + /** + * Like a finally clause, allows you to observe either the fulfillment or rejection of a promise, but to do so without modifying the final value. This is useful for collecting resources regardless of whether a job succeeded, like closing a database connection, shutting a server down, or deleting an unneeded key from an object. + + * finally returns a promise, which will become resolved with the same fulfillment value or rejection reason as promise. However, if callback returns a promise, the resolution of the returned promise will be delayed until the promise returned from callback is finished. + */ + finally(finallyCallback: () => any): Promise; + + /** + * The then method from the Promises/A+ specification, with an additional progress handler. + */ + then(onFulfill?: (value: T) => U | IPromise, onReject?: (error: any) => U | IPromise, onProgress?: Function): Promise; + + /** + * Like then, but "spreads" the array into a variadic fulfillment handler. If any of the promises in the array are rejected, instead calls onRejected with the first rejected promise's rejection reason. + * + * This is especially useful in conjunction with all + */ + spread(onFulfill: (...args: any[]) => IPromise | U, onReject?: (reason: any) => IPromise | U): Promise; + + fail(onRejected: (reason: any) => U | IPromise): Promise; + + /** + * A sugar method, equivalent to promise.then(undefined, onRejected). + */ + catch(onRejected: (reason: any) => U | IPromise): Promise; + + /** + * A sugar method, equivalent to promise.then(undefined, undefined, onProgress). + */ + progress(onProgress: (progress: any) => any): Promise; + + /** + * Much like then, but with different behavior around unhandled rejection. If there is an unhandled rejection, either because promise is rejected and no onRejected callback was provided, or because onFulfilled or onRejected threw an error or returned a rejected promise, the resulting rejection reason is thrown as an exception in a future turn of the event loop. + * + * This method should be used to terminate chains of promises that will not be passed elsewhere. Since exceptions thrown in then callbacks are consumed and transformed into rejections, exceptions at the end of the chain are easy to accidentally, silently ignore. By arranging for the exception to be thrown in a future turn of the event loop, so that it won't be caught, it causes an onerror event on the browser window, or an uncaughtException event on Node.js's process object. + * + * Exceptions thrown by done will have long stack traces, if Q.longStackSupport is set to true. If Q.onerror is set, exceptions will be delivered there instead of thrown in a future turn. + * + * The Golden Rule of done vs. then usage is: either return your promise to someone else, or if the chain ends with you, call done to terminate it. + */ + done(onFulfilled?: (value: T) => any, onRejected?: (reason: any) => any, onProgress?: (progress: any) => any): void; + + /** + * If callback is a function, assumes it's a Node.js-style callback, and calls it as either callback(rejectionReason) when/if promise becomes rejected, or as callback(null, fulfillmentValue) when/if promise becomes fulfilled. If callback is not a function, simply returns promise. + */ + nodeify(callback: (reason: any, value: any) => void): Promise; + + /** + * Returns a promise to get the named property of an object. Essentially equivalent to + * + * promise.then(function (o) { + * return o[propertyName]; + * }); + */ + get(propertyName: String): Promise; + set(propertyName: String, value: any): Promise; + delete(propertyName: String): Promise; + /** + * Returns a promise for the result of calling the named method of an object with the given array of arguments. The object itself is this in the function, just like a synchronous method call. Essentially equivalent to + * + * promise.then(function (o) { + * return o[methodName].apply(o, args); + * }); + */ + post(methodName: String, args: any[]): Promise; + /** + * Returns a promise for the result of calling the named method of an object with the given variadic arguments. The object itself is this in the function, just like a synchronous method call. + */ + invoke(methodName: String, ...args: any[]): Promise; + fapply(args: any[]): Promise; + fcall(...args: any[]): Promise; + + /** + * Returns a promise for an array of the property names of an object. Essentially equivalent to + * + * promise.then(function (o) { + * return Object.keys(o); + * }); + */ + keys(): Promise; + + /** + * A sugar method, equivalent to promise.then(function () { return value; }). + */ + thenResolve(value: U): Promise; + /** + * A sugar method, equivalent to promise.then(function () { throw reason; }). + */ + thenReject(reason: any): Promise; + + /** + * Attaches a handler that will observe the value of the promise when it becomes fulfilled, returning a promise for that same value, perhaps deferred but not replaced by the promise returned by the onFulfilled handler. + */ + tap(onFulfilled: (value: T) => any): Promise; + + timeout(ms: number, message?: string): Promise; + /** + * Returns a promise that will have the same result as promise, but will only be fulfilled or rejected after at least ms milliseconds have passed. + */ + delay(ms: number): Promise; + + /** + * Returns whether a given promise is in the fulfilled state. When the static version is used on non-promises, the result is always true. + */ + isFulfilled(): boolean; + /** + * Returns whether a given promise is in the rejected state. When the static version is used on non-promises, the result is always false. + */ + isRejected(): boolean; + /** + * Returns whether a given promise is in the pending state. When the static version is used on non-promises, the result is always false. + */ + isPending(): boolean; + + valueOf(): any; + + /** + * Returns a "state snapshot" object, which will be in one of three forms: + * + * - { state: "pending" } + * - { state: "fulfilled", value: } + * - { state: "rejected", reason: } + */ + inspect(): PromiseState; + } + + interface PromiseState { + /** + * "fulfilled", "rejected", "pending" + */ + state: string; + value?: T; + reason?: any; + } + + // If no value provided, returned promise will be of void type + export function when(): Promise; + + // if no fulfill, reject, or progress provided, returned promise will be of same type + export function when(value: T | IPromise): Promise; + + // If a non-promise value is provided, it will not reject or progress + export function when(value: T | IPromise, onFulfilled: (val: T) => U | IPromise, onRejected?: (reason: any) => U | IPromise, onProgress?: (progress: any) => any): Promise; + + /** + * Currently "impossible" (and I use the term loosely) to implement due to TypeScript limitations as it is now. + * See: https://github.com/Microsoft/TypeScript/issues/1784 for discussion on it. + */ + // export function try(method: Function, ...args: any[]): Promise; + + export function fbind(method: (...args: any[]) => T | IPromise, ...args: any[]): (...args: any[]) => Promise; + + export function fcall(method: (...args: any[]) => T, ...args: any[]): Promise; + + export function send(obj: any, functionName: string, ...args: any[]): Promise; + export function invoke(obj: any, functionName: string, ...args: any[]): Promise; + export function mcall(obj: any, functionName: string, ...args: any[]): Promise; + + export function denodeify(nodeFunction: Function, ...args: any[]): (...args: any[]) => Promise; + export function nbind(nodeFunction: Function, thisArg: any, ...args: any[]): (...args: any[]) => Promise; + export function nfbind(nodeFunction: Function, ...args: any[]): (...args: any[]) => Promise; + export function nfcall(nodeFunction: Function, ...args: any[]): Promise; + export function nfapply(nodeFunction: Function, args: any[]): Promise; + + export function ninvoke(nodeModule: any, functionName: string, ...args: any[]): Promise; + export function npost(nodeModule: any, functionName: string, args: any[]): Promise; + export function nsend(nodeModule: any, functionName: string, ...args: any[]): Promise; + export function nmcall(nodeModule: any, functionName: string, ...args: any[]): Promise; + + /** + * Returns a promise that is fulfilled with an array containing the fulfillment value of each promise, or is rejected with the same rejection reason as the first promise to be rejected. + */ + export function all(promises: IPromise[]): Promise; + + /** + * Returns a promise that is fulfilled with an array of promise state snapshots, but only after all the original promises have settled, i.e. become either fulfilled or rejected. + */ + export function allSettled(promises: IPromise[]): Promise[]>; + + export function allResolved(promises: IPromise[]): Promise[]>; + + /** + * Like then, but "spreads" the array into a variadic fulfillment handler. If any of the promises in the array are rejected, instead calls onRejected with the first rejected promise's rejection reason. + * This is especially useful in conjunction with all. + */ + export function spread(promises: IPromise[], onFulfilled: (...args: T[]) => U | IPromise, onRejected?: (reason: any) => U | IPromise): Promise; + + /** + * Returns a promise that will have the same result as promise, except that if promise is not fulfilled or rejected before ms milliseconds, the returned promise will be rejected with an Error with the given message. If message is not supplied, the message will be "Timed out after " + ms + " ms". + */ + export function timeout(promise: Promise, ms: number, message?: string): Promise; + + /** + * Returns a promise that will have the same result as promise, but will only be fulfilled or rejected after at least ms milliseconds have passed. + */ + export function delay(promise: Promise, ms: number): Promise; + /** + * Returns a promise that will have the same result as promise, but will only be fulfilled or rejected after at least ms milliseconds have passed. + */ + export function delay(value: T, ms: number): Promise; + /** + * Returns a promise that will be fulfilled with undefined after at least ms milliseconds have passed. + */ + export function delay(ms: number): Promise ; + /** + * Returns whether a given promise is in the fulfilled state. When the static version is used on non-promises, the result is always true. + */ + export function isFulfilled(promise: Promise): boolean; + /** + * Returns whether a given promise is in the rejected state. When the static version is used on non-promises, the result is always false. + */ + export function isRejected(promise: Promise): boolean; + /** + * Returns whether a given promise is in the pending state. When the static version is used on non-promises, the result is always false. + */ + export function isPending(promise: Promise): boolean; + + /** + * Returns a "deferred" object with a: + * promise property + * resolve(value) method + * reject(reason) method + * notify(value) method + * makeNodeResolver() method + */ + export function defer(): Deferred; + + /** + * Returns a promise that is rejected with reason. + */ + export function reject(reason?: any): Promise; + + export function Promise(resolver: (resolve: (val: T | IPromise) => void , reject: (reason: any) => void , notify: (progress: any) => void ) => void ): Promise; + + /** + * Creates a new version of func that accepts any combination of promise and non-promise values, converting them to their fulfillment values before calling the original func. The returned version also always returns a promise: if func does a return or throw, then Q.promised(func) will return fulfilled or rejected promise, respectively. + * + * This can be useful for creating functions that accept either promises or non-promise values, and for ensuring that the function always returns a promise even in the face of unintentional thrown exceptions. + */ + export function promised(callback: (...args: any[]) => T): (...args: any[]) => Promise; + + /** + * Returns whether the given value is a Q promise. + */ + export function isPromise(object: any): boolean; + /** + * Returns whether the given value is a promise (i.e. it's an object with a then function). + */ + export function isPromiseAlike(object: any): boolean; + /** + * Returns whether a given promise is in the pending state. When the static version is used on non-promises, the result is always false. + */ + export function isPending(object: any): boolean; + + /** + * This is an experimental tool for converting a generator function into a deferred function. This has the potential of reducing nested callbacks in engines that support yield. + */ + export function async(generatorFunction: any): (...args: any[]) => Promise; + export function nextTick(callback: Function): void; + + /** + * A settable property that will intercept any uncaught errors that would otherwise be thrown in the next tick of the event loop, usually as a result of done. Can be useful for getting the full stack trace of an error in browsers, which is not usually possible with window.onerror. + */ + export var onerror: (reason: any) => void; + /** + * A settable property that lets you turn on long stack trace support. If turned on, "stack jumps" will be tracked across asynchronous promise operations, so that if an uncaught error is thrown by done or a rejection reason's stack property is inspected in a rejection callback, a long stack trace is produced. + */ + export var longStackSupport: boolean; + + /** + * Calling resolve with a pending promise causes promise to wait on the passed promise, becoming fulfilled with its fulfillment value or rejected with its rejection reason (or staying pending forever, if the passed promise does). + * Calling resolve with a rejected promise causes promise to be rejected with the passed promise's rejection reason. + * Calling resolve with a fulfilled promise causes promise to be fulfilled with the passed promise's fulfillment value. + * Calling resolve with a non-promise value causes promise to be fulfilled with that value. + */ + export function resolve(object: IPromise): Promise; + /** + * Calling resolve with a pending promise causes promise to wait on the passed promise, becoming fulfilled with its fulfillment value or rejected with its rejection reason (or staying pending forever, if the passed promise does). + * Calling resolve with a rejected promise causes promise to be rejected with the passed promise's rejection reason. + * Calling resolve with a fulfilled promise causes promise to be fulfilled with the passed promise's fulfillment value. + * Calling resolve with a non-promise value causes promise to be fulfilled with that value. + */ + export function resolve(object: T): Promise; + + /** + * Resets the global "Q" variable to the value it has before Q was loaded. + * This will either be undefined if there was no version or the version of Q which was already loaded before. + * @returns { The last version of Q. } + */ + export function noConflict(): typeof Q; +} + +declare module "q" { + export = Q; +} \ No newline at end of file diff --git a/typings/read/read.d.ts b/typings/read/read.d.ts new file mode 100644 index 00000000..9ab7f15d --- /dev/null +++ b/typings/read/read.d.ts @@ -0,0 +1,24 @@ +// Type definitions for read +// Project: https://github.com/isaacs/read +// Definitions by: Tim JK +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare module 'read' { + function Read(options: Read.Options, callback: (error: any, result: string, isDefault: boolean) => any): void; + + module Read { + interface Options { + prompt?: string; + silent?: boolean; + replace?: string; + timeout?: number; + default?: string; + edit?: boolean; + terminal?: boolean; + input?: any; + output?: any; + } + } + + export = Read; +} diff --git a/typings/request/request.d.ts b/typings/request/request.d.ts new file mode 100644 index 00000000..78850cbb --- /dev/null +++ b/typings/request/request.d.ts @@ -0,0 +1,182 @@ +// Type definitions for request +// Project: https://github.com/mikeal/request +// Definitions by: Carlos Ballesteros Velasco , bonnici , Bart van der Schoor +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +// Imported from: https://github.com/soywiz/typescript-node-definitions/d.ts + + + + +declare module 'request' { + import stream = require('stream'); + import http = require('http'); + import FormData = require('form-data'); + + export = RequestAPI; + + function RequestAPI(uri: string, options?: RequestAPI.Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): RequestAPI.Request; + function RequestAPI(uri: string, callback?: (error: any, response: http.IncomingMessage, body: any) => void): RequestAPI.Request; + function RequestAPI(options: RequestAPI.Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): RequestAPI.Request; + + module RequestAPI { + export function defaults(options: Options): typeof RequestAPI; + + export function request(uri: string, options?: Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; + export function request(uri: string, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; + export function request(options?: Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; + + export function get(uri: string, options?: Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; + export function get(uri: string, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; + export function get(options: Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; + + export function post(uri: string, options?: Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; + export function post(uri: string, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; + export function post(options: Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; + + export function put(uri: string, options?: Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; + export function put(uri: string, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; + export function put(options: Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; + + export function head(uri: string, options?: Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; + export function head(uri: string, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; + export function head(options: Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; + + export function patch(uri: string, options?: Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; + export function patch(uri: string, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; + export function patch(options: Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; + + export function del(uri: string, options?: Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; + export function del(uri: string, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; + export function del(options: Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; + + export function forever(agentOptions: any, optionsArg: any): Request; + export function jar(): CookieJar; + export function cookie(str: string): Cookie; + + export var initParams: any; + + export interface Options { + url?: string; + uri?: string; + callback?: (error: any, response: http.IncomingMessage, body: any) => void; + jar?: any; // CookieJar + form?: any; // Object or string + auth?: AuthOptions; + oauth?: OAuthOptions; + aws?: AWSOptions; + hawk ?: HawkOptions; + qs?: Object; + json?: any; + multipart?: RequestPart[]; + agentOptions?: any; + agentClass?: any; + forever?: any; + host?: string; + port?: number; + method?: string; + headers?: Headers; + body?: any; + followRedirect?: boolean; + followAllRedirects?: boolean; + maxRedirects?: number; + encoding?: string; + pool?: any; + timeout?: number; + proxy?: any; + strictSSL?: boolean; + } + + export interface RequestPart { + headers?: Headers; + body: any; + } + + export interface Request extends stream.Stream { + readable: boolean; + writable: boolean; + + getAgent(): http.Agent; + //start(): void; + //abort(): void; + pipeDest(dest: any): void; + setHeader(name: string, value: string, clobber?: boolean): Request; + setHeaders(headers: Headers): Request; + qs(q: Object, clobber?: boolean): Request; + form(): FormData.FormData; + form(form: any): Request; + multipart(multipart: RequestPart[]): Request; + json(val: any): Request; + aws(opts: AWSOptions, now?: boolean): Request; + auth(username: string, password: string, sendInmediately?: boolean, bearer?: string): Request; + oauth(oauth: OAuthOptions): Request; + jar(jar: CookieJar): Request; + + on(event: string, listener: Function): Request; + + write(buffer: Buffer, cb?: Function): boolean; + write(str: string, cb?: Function): boolean; + write(str: string, encoding: string, cb?: Function): boolean; + write(str: string, encoding?: string, fd?: string): boolean; + end(): void; + end(chunk: Buffer, cb?: Function): void; + end(chunk: string, cb?: Function): void; + end(chunk: string, encoding: string, cb?: Function): void; + pause(): void; + resume(): void; + abort(): void; + destroy(): void; + toJSON(): string; + } + + export interface Headers { + [key: string]: any; + } + + export interface AuthOptions { + user?: string; + username?: string; + pass?: string; + password?: string; + sendImmediately?: boolean; + } + + export interface OAuthOptions { + callback?: string; + consumer_key?: string; + consumer_secret?: string; + token?: string; + token_secret?: string; + verifier?: string; + } + + export interface HawkOptions { + credentials: any; + } + + export interface AWSOptions { + secret: string; + bucket?: string; + } + + export interface CookieJar { + add(cookie: Cookie): void; + get(req: Request): Cookie; + cookieString(req: Request): string; + } + + export interface CookieValue { + name: string; + value: any; + httpOnly: boolean; + } + + export interface Cookie extends Array { + constructor(name: string, req: Request): void; + str: string; + expires: Date; + path: string; + toString(): string; + } + } +} diff --git a/typings/shelljs/shelljs.d.ts b/typings/shelljs/shelljs.d.ts index 5d33833e..c4608cae 100644 --- a/typings/shelljs/shelljs.d.ts +++ b/typings/shelljs/shelljs.d.ts @@ -1,7 +1,7 @@ // Type definitions for ShellJS v0.3.0 // Project: http://shelljs.org // Definitions by: Niklas Mollenhauer -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// Definitions: https://github.com/borisyankov/DefinitelyTyped /// @@ -128,7 +128,7 @@ declare module "shelljs" * @param {string} dest The destination. */ export function mv(source: string, dest: string): void; - + /** * Moves files. The wildcard * is accepted. * @param {string[]} source The source. @@ -436,7 +436,7 @@ declare module "shelljs" * Object containing environment variables (both getter and setter). Shortcut to process.env. */ export var env: { [key: string]: string }; - + /** * Executes the given command synchronously. * @param {string} command The command to execute. @@ -465,7 +465,7 @@ declare module "shelljs" export function exec(command: string, callback: ExecCallback): child.ChildProcess; export interface ExecCallback { - (code: number, output: string, error?: string): any; + (code: number, output: string): any; } export interface ExecOptions { @@ -511,27 +511,6 @@ declare module "shelljs" */ export function error(): string; - - - export function touch(...files: string[]): void; - export function touch(files: string[]): void; - - type TouchOptionsLiteral = "-a" | "-c" | "-m" | "-d" | "-r"; - - export function touch(options: TouchOptionsLiteral, ...files: string[]): void; - export function touch(options: TouchOptionsLiteral, files: string[]): void; - - /** - * Update the access and modification times of each FILE to the current time. A FILE argument that does not exist is created empty, unless -c is supplied - */ - type touchOptionsArray = { - '-d'?: string; - '-r'?: string; - }; - - export function touch(options: touchOptionsArray, ...files: string[]): void; - export function touch(options: touchOptionsArray, files: string[]): void; - // Configuration interface ShellConfig diff --git a/typings/validator/validator.d.ts b/typings/validator/validator.d.ts index 02e8eba7..05a391fa 100644 --- a/typings/validator/validator.d.ts +++ b/typings/validator/validator.d.ts @@ -1,315 +1,190 @@ -// Type definitions for validator.js v5.7.0 +// Type definitions for validator.js v3.22.1 // Project: https://github.com/chriso/validator.js -// Definitions by: tgfjt , Ilya Mochalov , Ayman Nedjmeddine , Louy Alakkad -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// Definitions by: tgfjt +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +// options for #isURL +interface IURLoptions { + protocols?: string[] + require_tld?: boolean + require_protocol?: boolean + allow_underscores?: boolean +} -declare namespace ValidatorJS { - type AlphaLocale = "ar" | "ar-AE" | "ar-BH" | "ar-DZ" | "ar-EG" | "ar-IQ" | "ar-JO" | "ar-KW" | "ar-LB" | "ar-LY" | "ar-MA" | "ar-QA" | "ar-QM" | "ar-SA" | "ar-SD" | "ar-SY" | "ar-TN" | "ar-YE" | "cs-CZ" | "de-DE" | "en-AU" | "en-GB" | "en-HK" | "en-IN" | "en-NZ" | "en-US" | "en-ZA" | "en-ZM" | "es-ES" | "fr-FR" | "hu-HU" | "nl-NL" | "pl-PL" | "pt-BR" | "pt-PT" | "ru-RU" | "sr-RS" | "sr-RS@latin" | "tr-TR"; - type AlphanumericLocale = "ar" | "ar-AE" | "ar-BH" | "ar-DZ" | "ar-EG" | "ar-IQ" | "ar-JO" | "ar-KW" | "ar-LB" | "ar-LY" | "ar-MA" | "ar-QA" | "ar-QM" | "ar-SA" | "ar-SD" | "ar-SY" | "ar-TN" | "ar-YE" | "cs-CZ" | "de-DE" | "en-AU" | "en-GB" | "en-HK" | "en-IN" | "en-NZ" | "en-US" | "en-ZA" | "en-ZM" | "es-ES" | "fr-FR" | "fr-BE" | "hu-HU" | "nl-BE" | "nl-NL" | "pl-PL" | "pt-BR" | "pt-PT" | "ru-RU" | "sr-RS" | "sr-RS@latin" | "tr-TR"; - type MobilePhoneLocale = "ar-DZ" | "ar-SA" | "ar-SY" | "cs-CZ" | "de-DE" | "da-DK" | "el-GR" | "en-AU" | "en-GB" | "en-HK" | "en-IN" | "en-NZ" | "en-US" | "en-CA" | "en-ZA" | "en-ZM" | "es-ES" | "fi-FI" | "fr-FR" | "hu-HU" | "it-IT" | "ja-JP" | "ms-MY" | "nb-NO" | "nn-NO" | "pl-PL" | "pt-PT" | "ru-RU" | "sr-RS" | "tr-TR" | "vi-VN" | "zh-CN" | "zh-TW" - - interface ValidatorStatic { +// options for isFQDN +interface IFQDNoptions { + require_tld?: boolean + allow_underscores?: boolean +} - // ************** - // * Validators * - // ************** +// options for normalizeEmail +interface IEmailoptions { + lowercase?: boolean +} - // check if the string contains the seed. - contains(str: string, elem: any): boolean; +// callback type for #extend +interface IExtendCallback { + (argv: string): any +} - // check if the string matches the comparison. - equals(str: string, comparison: string): boolean; +// return function for #extend +interface IExtendFunc { + (argv: string): boolean +} + +interface IValidatorStatic { + // add your own validators + extend(name: string, fn: IExtendCallback): IExtendFunc; - // check if the string is a date that's after the specified date (defaults to now). - isAfter(str: string, date?: string): boolean; + // check if the string matches the comparison. + equals(str: string, comparison: any): boolean; - // check if the string contains only letters (a-zA-Z). Locale is one of ['ar', 'ar-AE', 'ar-BH', 'ar-DZ', 'ar-EG', - // 'ar-IQ', 'ar-JO', 'ar-KW', 'ar-LB', 'ar-LY', 'ar-MA', 'ar-QA', 'ar-QM', 'ar-SA', 'ar-SD', 'ar-SY', 'ar-TN', 'ar-YE', - // 'cs-CZ', 'de-DE', 'en-AU', 'en-GB', 'en-HK', 'en-IN', 'en-NZ', 'en-US', 'en-ZA', 'en-ZM', 'es-ES', 'fr-FR', 'hu-HU', - // 'nl-NL', 'pl-PL', 'pt-BR', 'pt-PT', 'ru-RU', 'sr-RS', 'sr-RS@latin', 'tr-TR']) and defaults to en-US - isAlpha(str: string, locale?: AlphaLocale): boolean; + // check if the string contains the seed. + contains(str: string, elem: any): boolean; - // check if the string contains only letters and numbers. Locale is one of ['ar', 'ar-AE', 'ar-BH', 'ar-DZ', 'ar-EG', - // 'ar-IQ', 'ar-JO', 'ar-KW', 'ar-LB', 'ar-LY', 'ar-MA', 'ar-QA', 'ar-QM', 'ar-SA', 'ar-SD', 'ar-SY', 'ar-TN', 'ar-YE', - // 'cs-CZ', 'de-DE', 'en-AU', 'en-GB', 'en-HK', 'en-IN', 'en-NZ', 'en-US', 'en-ZA', 'en-ZM', 'es-ES', 'fr-FR', 'hu-HU', - // 'nl-NL', 'pl-PL', 'pt-BR', 'pt-PT', 'ru-RU', 'sr-RS', 'sr-RS@latin', 'tr-TR']) and defaults to en-US - isAlphanumeric(str: string, locale?: AlphanumericLocale): boolean; + // check if string matches the pattern. + matches(str: string, pattern: any, modifiers?: string): boolean; - // check if the string contains ASCII chars only. - isAscii(str: string): boolean; + // check if the string is an email. + isEmail(str: string): boolean; - // check if a string is base64 encoded. - isBase64(str: string): boolean; + // check if the string is an URL. + isURL(str: string, options?: IURLoptions): boolean; - // check if the string is a date that's before the specified date. - isBefore(str: string, date?: string): boolean; + // check if the string is a fully qualified domain name (e.g. domain.com). + isFQDN(str: string, options?: IFQDNoptions): boolean; - // check if a string is a boolean. - isBoolean(str: string): boolean; + // check if the string is an IP (version 4 or 6). + isIP(str: string, version?: number): boolean; - // check if the string's length (in bytes) falls in a range. - isByteLength(str: string, options: IsByteLengthOptions): boolean; - isByteLength(str: string, min: number, max?: number): boolean; + // check if the string contains only letters (a-zA-Z). + isAlpha(str: string): boolean; - // check if the string is a credit card. - isCreditCard(str: string): boolean; + // check if the string contains only numbers. + isNumeric(str: string): boolean; - // check if the string is a valid currency amount. - isCurrency(str: string, options?: IsCurrencyOptions): boolean; + // check if the string contains only letters and numbers. + isAlphanumeric(str: string): boolean; - // check if the string is a data uri format (https://developer.mozilla.org/en-US/docs/Web/HTTP/data_URIs) - isDataURI(str: string): boolean; + // check if a string is base64 encoded. + isBase64(str: string): boolean; - // check if the string is a date. - isDate(str: string): boolean; + // check if the string is a hexadecimal number. + isHexadecimal(str: string): boolean; - // check if the string represents a decimal number, such as 0.1, .3, 1.1, 1.00003, 4.0, etc. - isDecimal(str: string): boolean; + // check if the string is a hexadecimal color. + isHexColor(str: string): boolean; - // check if the string is a number that's divisible by another. - isDivisibleBy(str: string, number: number): boolean; + // check if the string is lowercase. + isLowercase(str: string): boolean; - // check if the string is an email. - isEmail(str: string, options?: IsEmailOptions): boolean; + // check if the string is uppercase. + isUppercase(str: string): boolean; - // check if the string is a fully qualified domain name (e.g. domain.com). - isFQDN(str: string, options?: IsFQDNOptions): boolean; + // check if the string is an integer. + isInt(str: string): boolean; - // check if the string is a float. - isFloat(str: string, options?: IsFloatOptions): boolean; + // check if the string is a float. + isFloat(str: string): boolean; - // check if the string contains any full-width chars. - isFullWidth(str: string): boolean; + // check if the string is a number that's divisible by another. + isDivisibleBy(str: string, number: number): boolean; - // check if the string contains any half-width chars. - isHalfWidth(str: string): boolean; + // check if the string is null. + isNull(str: string): boolean; - // check if the string is a hexadecimal color. - isHexColor(str: string): boolean; + // check if the string's length falls in a range. Note: this function takes into account surrogate pairs. + isLength(str: string, min: number, max?: number): boolean; - // check if the string is a hexadecimal number. - isHexadecimal(str: string): boolean; + // check if the string's length (in bytes) falls in a range. + isByteLength(str: string, min: number, max?: number): boolean; - // check if the string is an IP (version 4 or 6). - isIP(str: string, version?: number): boolean; + // check if the string is a UUID (version 3, 4 or 5). + isUUID(str: string, version?: number): boolean; - // check if the string is an ISBN (version 10 or 13). - isISBN(str: string, version?: number): boolean; + // check if the string is a date. + isDate(str: string): boolean; - // check if the string is an ISIN (https://en.wikipedia.org/wiki/International_Securities_Identification_Number) - // (stock/security identifier). - isISIN(str: string): boolean; + // check if the string is a date that's after the specified date (defaults to now). + isAfter(str: string, date?: Date): boolean; - // check if the string is a valid ISO 8601 (https://en.wikipedia.org/wiki/ISO_8601) date. - isISO8601(str: string): boolean; + // check if the string is a date that's before the specified date. + isBefore(str: string, date?: Date): boolean; - // check if the string is in a array of allowed values. - isIn(str: string, values: any[]): boolean; + // check if the string is in a array of allowed values. + isIn(str: string, values: any[]): boolean; - // check if the string is an integer. - isInt(str: string, options?: IsIntOptions): boolean; + // check if the string is a credit card. + isCreditCard(str: string): boolean; - // check if the string is valid JSON (note: uses JSON.parse). - isJSON(str: string): boolean; + // check if the string is an ISBN (version 10 or 13). + isISBN(str: string, version?: number): boolean; - // check if the string's length falls in a range. - // Note: this function takes into account surrogate pairs. - isLength(str: string, options: IsLengthOptions): boolean; - isLength(str: string, min: number, max?: number): boolean; + // check if the string is valid JSON (note: uses JSON.parse). + isJSON(str: string): boolean; - // check if the string is lowercase. - isLowercase(str: string): boolean; + // check if the string contains one or more multibyte chars. + isMultibyte(str: string): boolean; - // check if the string is a MAC address. - isMACAddress(str: string): boolean; + // check if the string contains ASCII chars only. + isAscii(str: string): boolean; - // check if the string is a MD5 hash. - isMD5(str: string): boolean; + // check if the string contains any full-width chars. + isFullWidth(str: string): boolean; - // check if the string is a mobile phone number, (locale is one of - // ['ar-DZ', 'ar-SA', 'ar-SY', 'cs-CZ', 'de-DE', 'da-DK', 'el-GR', 'en-AU', 'en-GB', 'en-HK', - // 'en-IN', 'en-NZ', 'en-US', 'en-CA', 'en-ZA', 'en-ZM', 'es-ES', 'fi-FI', 'fr-FR', 'hu-HU', - // 'it-IT', 'ja-JP', 'ms-MY', 'nb-NO', 'nn-NO', 'pl-PL', 'pt-PT', 'ru-RU', 'sr-RS', 'tr-TR', - // 'vi-VN', 'zh-CN', 'zh-TW']). - isMobilePhone(str: string, locale: MobilePhoneLocale): boolean; + // check if the string contains any half-width chars. + isHalfWidth(str: string): boolean; - // check if the string is a valid hex-encoded representation of a MongoDB ObjectId - // (http://docs.mongodb.org/manual/reference/object-id/). - isMongoId(str: string): boolean; + // check if the string contains a mixture of full and half-width chars. + isVariableWidth(str: string): boolean; - // check if the string contains one or more multibyte chars. - isMultibyte(str: string): boolean; + // check if the string contains any surrogate pairs chars. + isSurrogatePair(str: string): boolean; - // check if the string is null. - isNull(str: string): boolean; + // check if the string is a valid hex-encoded representation of a MongoDB ObjectId. + isMongoId(str: string): boolean; - // check if the string contains only numbers. - isNumeric(str: string): boolean; + // convert the input to a string. + toString(input: any): string; - // check if the string contains any surrogate pairs chars. - isSurrogatePair(str: string): boolean; + // convert the input to a date, or null if the input is not a date. + toDate(input: any): any; // Date or null - // check if the string is an URL. - isURL(str: string, options?: IsURLOptions): boolean; + // convert the input to a float, or NaN if the input is not a float. + toFloat(input:any): number; // number or NaN - // check if the string is a UUID. Must be one of ['3', '4', '5', 'all'], default is all. - isUUID(str: string, version?: string | number): boolean; + // convert the input to an integer, or NaN if the input is not an integer. + toInt(input:any, radix?: number): number; // number or NaN - // check if the string is uppercase. - isUppercase(str: string): boolean; + // convert the input to a boolean. + toBoolean(input:any, strict?: boolean): boolean; - // check if the string contains a mixture of full and half-width chars. - isVariableWidth(str: string): boolean; + // trim characters (whitespace by default) from both sides of the input. + trim(input: any, chars?: string): string; - // checks characters if they appear in the whitelist. - isWhitelisted(str: string, chars: string | string[]): boolean; + // trim characters from the left-side of the input. + ltrim(input: any, chars?: string): string; - // check if string matches the pattern. - matches(str: string, pattern: RegExp | string, modifiers?: string): boolean; + // trim characters from the right-side of the input. + rtrim(input: any, chars?: string): string; - // ************** - // * Sanitizers * - // ************** + // replace <, >, &, ' and " with HTML entities. + escape(input: string): string; - // remove characters that appear in the blacklist. The characters are used in a RegExp and so you will need - // to escape some chars, e.g. blacklist(input, '\\[\\]'). - blacklist(input: string, chars: string): string; + // remove characters with a numerical value < 32 and 127 + stripLow(input: string, keep_new_lines?: boolean): string; - // replace <, >, &, ', " and / with HTML entities. - escape(input: string): string; + // remove characters that do not appear in the whitelist. + whitelist(input: string, chars: string): string; - // replaces HTML encoded entities with <, >, &, ', " and /. - unescape(input: string): string; + // remove characters that appear in the blacklist. + blacklist(input: string, chars: string): string; - // trim characters from the left-side of the input. - ltrim(input: string, chars?: string): string; - - // canonicalize an email address. - normalizeEmail(email: string, options?: NormalizeEmailOptions): string; - - // trim characters from the right-side of the input. - rtrim(input: string, chars?: string): string; - - // remove characters with a numerical value < 32 and 127, mostly control characters. If keep_new_lines is true, - // newline characters are preserved (\n and \r, hex 0xA and 0xD). Unicode-safe in JavaScript. - stripLow(input: string, keep_new_lines?: boolean): string; - - // convert the input to a boolean. Everything except for '0', 'false' and '' returns true. In strict mode only '1' - // and 'true' return true. - toBoolean(input: string, strict?: boolean): boolean; - - // convert the input to a date, or null if the input is not a date. - toDate(input: string): Date; // Date or null - - // convert the input to a float, or NaN if the input is not a float. - toFloat(input: string): number; // number or NaN - - // convert the input to an integer, or NaN if the input is not an integer. - toInt(input: string, radix?: number): number; // number or NaN - - // trim characters (whitespace by default) from both sides of the input. - trim(input: string, chars?: string): string; - - // remove characters that do not appear in the whitelist. The characters are used in a RegExp and so you will - // need to escape some chars, e.g. whitelist(input, '\\[\\]'). - whitelist(input: string, chars: string): string; - - toString(input: any | any[]): string; - - version: string; - - // ************** - // * Extensions * - // ************** - - // add your own validators. - // Note: that the first argument will be automatically coerced to a string. - extend(name: string, fn: T): void; - } - - // options for IsByteLength - interface IsByteLengthOptions { - min?: number; - max?: number; - } - - // options for IsCurrency - interface IsCurrencyOptions { - symbol?: string; - require_symbol?: boolean; - allow_space_after_symbol?: boolean; - symbol_after_digits?: boolean; - allow_negatives?: boolean; - parens_for_negatives?: boolean; - negative_sign_before_digits?: boolean; - negative_sign_after_digits?: boolean; - allow_negative_sign_placeholder?: boolean; - thousands_separator?: string; - decimal_separator?: string; - allow_space_after_digits?: boolean; - } - - // options for isEmail - interface IsEmailOptions { - allow_display_name?: boolean; - allow_utf8_local_part?: boolean; - require_tld?: boolean; - } - - // options for isFQDN - interface IsFQDNOptions { - require_tld?: boolean; - allow_underscores?: boolean; - allow_trailing_dot?: boolean; - } - - // options for IsFloat - interface IsFloatOptions { - min?: number; - max?: number; - } - - // options for IsInt - interface IsIntOptions { - min?: number; - max?: number; - } - - // options for IsLength - interface IsLengthOptions { - min?: number; - max?: number; - } - - // options for isURL - interface IsURLOptions { - protocols?: string[]; - require_tld?: boolean; - require_protocol?: boolean; - require_host: boolean; - require_valid_protocol?: boolean; - allow_underscores?: boolean; - host_whitelist?: (string | RegExp)[]; - host_blacklist?: (string | RegExp)[]; - allow_trailing_dot?: boolean; - allow_protocol_relative_urls?: boolean; - } - - // options for normalizeEmail - interface NormalizeEmailOptions { - lowercase?: boolean; - remove_dots?: boolean; - remove_extension?: boolean; - } + // canonicalize an email address. + normalizeEmail(email: string, options?: IEmailoptions): string; } declare module "validator" { - const validator: ValidatorJS.ValidatorStatic; + var validator: IValidatorStatic; export = validator; } - -// deprecated interfaces for backward compatibility, please use ValidatorJS.* instead the ones -interface IValidatorStatic extends ValidatorJS.ValidatorStatic { } -interface IURLoptions extends ValidatorJS.IsURLOptions { } -interface IFQDNoptions extends ValidatorJS.IsFQDNOptions { } -interface IEmailoptions extends ValidatorJS.NormalizeEmailOptions { } diff --git a/typings/vso-node-api/vso-node-api.d.ts b/typings/vso-node-api/vso-node-api.d.ts new file mode 100644 index 00000000..9dc50cd5 --- /dev/null +++ b/typings/vso-node-api/vso-node-api.d.ts @@ -0,0 +1,18339 @@ + + +declare module 'vso-node-api/Serialization' { + /** + * Metadata for deserializing an enum field on a contract/type + */ + export interface ContractEnumMetadata { + enumValues?: { + [name: string]: number; + }; + } + export interface SerializationData { + requestTypeMetadata?: ContractMetadata; + responseTypeMetadata?: ContractMetadata; + responseIsCollection: boolean; + } + /** + * Metadata for deserializing a particular field on a contract/type + */ + export interface ContractFieldMetadata { + isArray?: boolean; + isDate?: boolean; + enumType?: ContractEnumMetadata; + typeInfo?: ContractMetadata; + isDictionary?: boolean; + dictionaryKeyIsDate?: boolean; + dictionaryValueIsDate?: boolean; + dictionaryKeyEnumType?: ContractEnumMetadata; + dictionaryValueEnumType?: ContractEnumMetadata; + dictionaryValueTypeInfo?: ContractMetadata; + dictionaryValueFieldInfo?: ContractFieldMetadata; + } + /** + * Metadata required for deserializing a given type + */ + export interface ContractMetadata { + fields?: { + [fieldName: string]: ContractFieldMetadata; + }; + } + export interface IWebApiArrayResult { + count: number; + value: any[]; + } + /** + * Module for handling serialization and deserialization of data contracts + * (contracts sent from the server using the VSO default REST api serialization settings) + */ + export module ContractSerializer { + /** + * Process a contract in its raw form (e.g. date fields are Dates, and Enums are numbers) and + * return a pure JSON object that can be posted to REST endpoint. + * + * @param data The object to serialize + * @param contractMetadata The type info/metadata for the contract type being serialized + * @param preserveOriginal If true, don't modify the original object. False modifies the original object (the return value points to the data argument). + */ + function serialize(data: any, contractMetadata: ContractMetadata, preserveOriginal?: boolean): any; + /** + * Process a pure JSON object (e.g. that came from a REST call) and transform it into a JS object + * where date strings are converted to Date objects and enum values are converted from strings into + * their numerical value. + * + * @param data The object to deserialize + * @param contractMetadata The type info/metadata for the contract type being deserialize + * @param preserveOriginal If true, don't modify the original object. False modifies the original object (the return value points to the data argument). + * @param unwrapWrappedCollections If true check for wrapped arrays (REST apis will not return arrays directly as the root result but will instead wrap them in a { values: [], count: 0 } object. + */ + function deserialize(data: any, contractMetadata: ContractMetadata, preserveOriginal?: boolean, unwrapWrappedCollections?: boolean): any; + } + +} +declare module 'vso-node-api/interfaces/common/VsoBaseInterfaces' { + import Serialization = require('vso-node-api/Serialization'); + /** + * Information about the location of a REST API resource + */ + export interface ApiResourceLocation { + /** + * Area name for this resource + */ + area: string; + /** + * Unique Identifier for this location + */ + id: string; + /** + * Maximum api version that this resource supports (current server version for this resource) + */ + maxVersion: string; + /** + * Minimum api version that this resource supports + */ + minVersion: string; + /** + * The latest version of this resource location that is in "Release" (non-preview) mode + */ + releasedVersion: string; + /** + * Resource name + */ + resourceName: string; + /** + * The current resource version supported by this resource location + */ + resourceVersion: number; + /** + * This location's route template (templated relative path) + */ + routeTemplate: string; + } + export interface IHeaders { + [key: string]: any; + } + export interface IBasicCredentials { + username: string; + password: string; + } + export interface IRequestHandler { + prepareRequest(options: any): void; + canHandleAuthentication(res: IHttpResponse): boolean; + handleAuthentication(httpClient: any, protocol: any, options: any, objs: any, finalCallback: any): void; + } + export interface IHttpResponse { + statusCode?: number; + headers: any; + } + export interface IQCoreApi { + connect(): Promise; + } + export interface IHttpClient { + get(verb: string, requestUrl: string, headers: any, onResult: (err: any, res: IHttpResponse, contents: string) => void): void; + send(verb: string, requestUrl: string, objs: any, headers: any, onResult: (err: any, res: IHttpResponse, contents: string) => void): void; + sendFile(verb: string, requestUrl: string, content: NodeJS.ReadableStream, headers: any, onResult: (err: any, res: IHttpResponse, contents: string) => void): void; + getStream(requestUrl: string, apiVersion: string, headers: any, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + makeAcceptHeader(type: string, apiVersion: string): string; + request(protocol: any, options: any, body: any, onResult: (err: any, res: IHttpResponse, contents: string) => void): void; + } + export interface IRestClient { + baseUrl: string; + httpClient: IHttpClient; + getJson(relativeUrl: string, apiVersion: string, customHeaders: IHeaders, serializationData: Serialization.SerializationData, onResult: (err: any, statusCode: number, obj: any) => void): void; + options(requestUrl: string, onResult: (err: any, statusCode: number, obj: any) => void): void; + create(relativeUrl: string, apiVersion: string, resources: any, customHeaders: IHeaders, serializationData: Serialization.SerializationData, onResult: (err: any, statusCode: number, obj: any) => void): void; + update(relativeUrl: string, apiVersion: string, resources: any, customHeaders: IHeaders, serializationData: Serialization.SerializationData, onResult: (err: any, statusCode: number, obj: any) => void): void; + uploadFile(verb: string, relativeUrl: string, apiVersion: string, filePath: string, customHeaders: IHeaders, serializationData: Serialization.SerializationData, onResult: (err: any, statusCode: number, obj: any) => void): void; + uploadStream(verb: string, relativeUrl: string, apiVersion: string, contentStream: NodeJS.ReadableStream, customHeaders: IHeaders, serializationData: Serialization.SerializationData, onResult: (err: any, statusCode: number, obj: any) => void): void; + replace(relativeUrl: string, apiVersion: string, resources: any, customHeaders: IHeaders, serializationData: Serialization.SerializationData, onResult: (err: any, statusCode: number, obj: any) => void): void; + } + +} +declare module 'vso-node-api/HttpClient' { + + import http = require("http"); + import ifm = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); + export class HttpClient implements ifm.IHttpClient { + userAgent: string; + handlers: ifm.IRequestHandler[]; + socketTimeout: number; + isSsl: boolean; + constructor(userAgent: string, handlers?: ifm.IRequestHandler[], socketTimeout?: number); + get(verb: string, requestUrl: string, headers: ifm.IHeaders, onResult: (err: any, res: http.ClientResponse, contents: string) => void): void; + send(verb: string, requestUrl: string, objs: any, headers: ifm.IHeaders, onResult: (err: any, res: http.ClientResponse, contents: string) => void): void; + sendFile(verb: string, requestUrl: string, content: NodeJS.ReadableStream, headers: ifm.IHeaders, onResult: (err: any, res: http.ClientResponse, contents: string) => void): void; + getStream(requestUrl: string, apiVersion: string, type: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + makeAcceptHeader(type: string, apiVersion: string): string; + _getOptions(method: string, requestUrl: string, headers: any): any; + request(protocol: any, options: any, objs: any, onResult: (err: any, res: http.ClientResponse, contents: string) => void): void; + requestInternal(protocol: any, options: any, objs: any, onResult: (err: any, res: http.ClientResponse, contents: string) => void): void; + } + +} +declare module 'vso-node-api/RestClient' { + + import ifm = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); + import Serialization = require('vso-node-api/Serialization'); + export function processResponse(url: any, res: any, contents: any, serializationData: Serialization.SerializationData, onResult: any): void; + export function enumToString(enumType: any, enumValue: number, camelCase: boolean): any; + export class RestClient implements ifm.IRestClient { + baseUrl: string; + basePath: string; + httpClient: ifm.IHttpClient; + constructor(httpClient: ifm.IHttpClient); + getJson(url: string, apiVersion: string, customHeaders: ifm.IHeaders, serializationData: Serialization.SerializationData, onResult: (err: any, statusCode: number, obj: any) => void): void; + options(url: string, onResult: (err: any, statusCode: number, obj: any) => void): void; + delete(url: string, apiVersion: string, customHeaders: ifm.IHeaders, serializationData: Serialization.SerializationData, onResult: (err: any, statusCode: number, obj: any) => void): void; + create(url: string, apiVersion: string, resources: any, customHeaders: ifm.IHeaders, serializationData: Serialization.SerializationData, onResult: (err: any, statusCode: number, obj: any) => void): void; + update(url: string, apiVersion: string, resources: any, customHeaders: ifm.IHeaders, serializationData: Serialization.SerializationData, onResult: (err: any, statusCode: number, obj: any) => void): void; + uploadFile(verb: string, url: string, apiVersion: string, filePath: string, customHeaders: ifm.IHeaders, serializationData: Serialization.SerializationData, onResult: (err: any, statusCode: number, obj: any) => void): void; + uploadStream(verb: string, url: string, apiVersion: string, contentStream: NodeJS.ReadableStream, customHeaders: ifm.IHeaders, serializationData: Serialization.SerializationData, onResult: (err: any, statusCode: number, obj: any) => void): void; + replace(url: string, apiVersion: string, resources: any, customHeaders: ifm.IHeaders, serializationData: Serialization.SerializationData, onResult: (err: any, statusCode: number, obj: any) => void): void; + _getJson(verb: string, url: string, apiVersion: string, customHeaders: ifm.IHeaders, serializationData: Serialization.SerializationData, onResult: (err: any, statusCode: number, obj: any) => void): void; + _sendJson(verb: string, url: string, apiVersion: string, data: any, customHeaders: ifm.IHeaders, serializationData: Serialization.SerializationData, onResult: (err: any, statusCode: number, obj: any) => void): void; + } + +} +declare module 'vso-node-api/VsoClient' { + + + import restm = require('vso-node-api/RestClient'); + import ifm = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); + export interface ClientVersioningData { + /** + * The api version string to send in the request (e.g. "1.0" or "2.0-preview.2") + */ + apiVersion?: string; + /** + * The request path string to send the request to. Looked up via an options request with the location id. + */ + requestUrl?: string; + } + export class InvalidApiResourceVersionError implements Error { + name: string; + message: string; + constructor(message?: string); + } + /** + * Base class that should be used (derived from) to make requests to VSS REST apis + */ + export class VsoClient { + private static APIS_RELATIVE_PATH; + private static PREVIEW_INDICATOR; + private _locationsByAreaPromises; + private _initializationPromise; + restClient: ifm.IRestClient; + baseUrl: string; + basePath: string; + constructor(baseUrl: string, restClient: restm.RestClient); + /** + * Compares the version on the server (locationVersion) to the api version given by the client (apiVersion). + * Returns a negative value if the location version is older (less than) the api version + * Returns 0 if the two are equal + * Returns a positive value if the location version is newer (greater than) the api version + */ + private compareResourceVersions(locationVersion, apiVersion); + /** + * Gets the route template for a resource based on its location ID and negotiates the api version + */ + getVersioningData(apiVersion: string, area: string, locationId: string, routeValues: any, queryParams?: any): Promise; + /** + * Sets a promise that is waited on before any requests are issued. Can be used to asynchronously + * set the request url and auth token manager. + */ + _setInitializationPromise(promise: Promise): void; + /** + * Gets information about an API resource location (route template, supported versions, etc.) + * + * @param area resource area name + * @param locationId Guid of the location to get + */ + beginGetLocation(area: string, locationId: string): Promise; + private beginGetAreaLocations(area); + resolveUrl(relativeUrl: string): string; + /** + * Issues an OPTIONS request to get location objects from a location id + */ + _issueOptionsRequest(requestUrl: string, onResult: (err: any, statusCode: number, locationsResult: any) => void): void; + private getSerializedObject(object); + protected getRequestUrl(routeTemplate: string, area: string, resource: string, routeValues: any, queryParams?: any): string; + private replaceRouteValues(routeTemplate, routeValues); + _getLinkResponseHeaders(xhr: XMLHttpRequest): { + [relName: string]: string; + }; + } + +} +declare module 'vso-node-api/ClientApiBases' { + import Q = require('q'); + import restm = require('vso-node-api/RestClient'); + import httpm = require('vso-node-api/HttpClient'); + import vsom = require('vso-node-api/VsoClient'); + import VsoBaseInterfaces = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); + export class ClientApiBase { + baseUrl: string; + userAgent: string; + httpClient: httpm.HttpClient; + restClient: restm.RestClient; + vsoClient: vsom.VsoClient; + constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], userAgent?: string); + setUserAgent(userAgent: string): void; + connect(onResult: (err: any, statusCode: number, obj: any) => void): void; + } + export class QClientApiBase { + api: ClientApiBase; + constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], api: typeof ClientApiBase); + connect(): Promise; + } + +} +declare module 'vso-node-api/interfaces/common/VSSInterfaces' { + export interface IdentityRef { + displayName: string; + id: string; + imageUrl: string; + isAadIdentity: boolean; + isContainer: boolean; + profileUrl: string; + uniqueName: string; + url: string; + } + export interface JsonPatchDocument { + } + /** + * The JSON model for a JSON Patch operation + */ + export interface JsonPatchOperation { + /** + * The path to copy from for the Move/Copy operation. + */ + from: string; + /** + * The patch operation + */ + op: Operation; + /** + * The path for the operation + */ + path: string; + /** + * The value for the operation. This is either a primitive or a JToken. + */ + value: any; + } + export enum Operation { + Add = 0, + Remove = 1, + Replace = 2, + Move = 3, + Copy = 4, + Test = 5, + } + export interface ResourceRef { + id: string; + url: string; + } + export interface VssJsonCollectionWrapper extends VssJsonCollectionWrapperBase { + value: any[]; + } + export interface VssJsonCollectionWrapperV extends VssJsonCollectionWrapperBase { + value: T; + } + export interface VssJsonCollectionWrapperBase { + count: number; + } + export var TypeInfo: { + IdentityRef: { + fields: any; + }; + JsonPatchDocument: { + fields: any; + }; + JsonPatchOperation: { + fields: any; + }; + Operation: { + enumValues: { + "add": number; + "remove": number; + "replace": number; + "move": number; + "copy": number; + "test": number; + }; + }; + OperationReference: { + fields: any; + }; + ResourceRef: { + fields: any; + }; + VssJsonCollectionWrapper: { + fields: any; + }; + VssJsonCollectionWrapperV: { + fields: any; + }; + VssJsonCollectionWrapperBase: { + fields: any; + }; + }; + +} +declare module 'vso-node-api/interfaces/CoreInterfaces' { + import VSSInterfaces = require('vso-node-api/interfaces/common/VSSInterfaces'); + export enum ConnectedServiceKind { + /** + * Custom or unknown service + */ + Custom = 0, + /** + * Azure Subscription + */ + AzureSubscription = 1, + /** + * Chef Connection + */ + Chef = 2, + /** + * Generic Connection + */ + Generic = 3, + } + export interface IdentityData { + identityIds: string[]; + } + export interface Process extends ProcessReference { + _links: any; + description: string; + id: string; + isDefault: boolean; + type: ProcessType; + } + export interface ProcessReference { + name: string; + url: string; + } + export enum ProcessType { + System = 0, + Custom = 1, + Inherited = 2, + } + export enum ProjectChangeType { + Modified = 0, + Deleted = 1, + Added = 2, + } + /** + * Contains information of the project + */ + export interface ProjectInfo { + abbreviation: string; + description: string; + id: string; + lastUpdateTime: Date; + name: string; + properties: ProjectProperty[]; + /** + * Current revision of the project + */ + revision: number; + state: any; + uri: string; + version: number; + } + export interface ProjectMessage { + project: ProjectInfo; + projectChangeType: ProjectChangeType; + } + export interface ProjectProperty { + name: string; + value: string; + } + export interface Proxy { + /** + * This is a description string + */ + description: string; + /** + * The friendly name of the server + */ + friendlyName: string; + globalDefault: boolean; + /** + * This is a string representation of the site that the proxy server is located in (e.g. "NA-WA-RED") + */ + site: string; + siteDefault: boolean; + /** + * The URL of the proxy server + */ + url: string; + } + export enum SourceControlTypes { + Tfvc = 1, + Git = 2, + } + /** + * The Team Context for an operation. + */ + export interface TeamContext { + /** + * The team project Id or name. Ignored if ProjectId is set. + */ + project: string; + /** + * The Team Project ID. Required if Project is not set. + */ + projectId: string; + /** + * The Team Id or name. Ignored if TeamId is set. + */ + team: string; + /** + * The Team Id + */ + teamId: string; + } + /** + * Represents a Team Project object. + */ + export interface TeamProject extends TeamProjectReference { + /** + * The links to other objects related to this object. + */ + _links: any; + /** + * Set of capabilities this project has (such as process template & version control). + */ + capabilities: { + [key: string]: { + [key: string]: string; + }; + }; + /** + * The shallow ref to the default team. + */ + defaultTeam: WebApiTeamRef; + } + /** + * Data contract for a TeamProjectCollection. + */ + export interface TeamProjectCollection extends TeamProjectCollectionReference { + /** + * The links to other objects related to this object. + */ + _links: any; + /** + * Project collection description. + */ + description: string; + /** + * Project collection state. + */ + state: string; + } + /** + * Reference object for a TeamProjectCollection. + */ + export interface TeamProjectCollectionReference { + /** + * Collection Id. + */ + id: string; + /** + * Collection Name. + */ + name: string; + /** + * Collection REST Url. + */ + url: string; + } + /** + * Represents a shallow reference to a TeamProject. + */ + export interface TeamProjectReference { + /** + * Project abbreviation. + */ + abbreviation: string; + /** + * The project's description (if any). + */ + description: string; + /** + * Project identifier. + */ + id: string; + /** + * Project name. + */ + name: string; + /** + * Project revision. + */ + revision: number; + /** + * Project state. + */ + state: any; + /** + * Url to the full version of the object. + */ + url: string; + } + export interface WebApiConnectedService extends WebApiConnectedServiceRef { + /** + * The user who did the OAuth authentication to created this service + */ + authenticatedBy: VSSInterfaces.IdentityRef; + /** + * Extra description on the service. + */ + description: string; + /** + * Friendly Name of service connection + */ + friendlyName: string; + /** + * Id/Name of the connection service. For Ex: Subscription Id for Azure Connection + */ + id: string; + /** + * The kind of service. + */ + kind: string; + /** + * The project associated with this service + */ + project: TeamProjectReference; + /** + * Optional uri to connect directly to the service such as https://windows.azure.com + */ + serviceUri: string; + } + export interface WebApiConnectedServiceDetails extends WebApiConnectedServiceRef { + /** + * Meta data for service connection + */ + connectedServiceMetaData: WebApiConnectedService; + /** + * Credential info + */ + credentialsXml: string; + /** + * Optional uri to connect directly to the service such as https://windows.azure.com + */ + endPoint: string; + } + export interface WebApiConnectedServiceRef { + id: string; + url: string; + } + /** + * The representation of data needed to create a tag definition which is sent across the wire. + */ + export interface WebApiCreateTagRequestData { + name: string; + } + export interface WebApiProject extends TeamProjectReference { + /** + * Set of capabilities this project has + */ + capabilities: { + [key: string]: { + [key: string]: string; + }; + }; + /** + * Reference to collection which contains this project + */ + collection: WebApiProjectCollectionRef; + /** + * Default team for this project + */ + defaultTeam: WebApiTeamRef; + } + export interface WebApiProjectCollection extends WebApiProjectCollectionRef { + /** + * Project collection description + */ + description: string; + /** + * Project collection state + */ + state: string; + } + export interface WebApiProjectCollectionRef { + /** + * Collection Tfs Url (Host Url) + */ + collectionUrl: string; + /** + * Collection Guid + */ + id: string; + /** + * Collection Name + */ + name: string; + /** + * Collection REST Url + */ + url: string; + } + /** + * The representation of a tag definition which is sent across the wire. + */ + export interface WebApiTagDefinition { + active: boolean; + id: string; + name: string; + url: string; + } + export interface WebApiTeam extends WebApiTeamRef { + /** + * Team description + */ + description: string; + /** + * Identity REST API Url to this team + */ + identityUrl: string; + } + export interface WebApiTeamRef { + /** + * Team (Identity) Guid. A Team Foundation ID. + */ + id: string; + /** + * Team name + */ + name: string; + /** + * Team REST API Url + */ + url: string; + } + export var TypeInfo: { + ConnectedServiceKind: { + enumValues: { + "custom": number; + "azureSubscription": number; + "chef": number; + "generic": number; + }; + }; + IdentityData: { + fields: any; + }; + Process: { + fields: any; + }; + ProcessReference: { + fields: any; + }; + ProcessType: { + enumValues: { + "system": number; + "custom": number; + "inherited": number; + }; + }; + ProjectChangeType: { + enumValues: { + "modified": number; + "deleted": number; + "added": number; + }; + }; + ProjectInfo: { + fields: any; + }; + ProjectMessage: { + fields: any; + }; + ProjectProperty: { + fields: any; + }; + Proxy: { + fields: any; + }; + SourceControlTypes: { + enumValues: { + "tfvc": number; + "git": number; + }; + }; + TeamContext: { + fields: any; + }; + TeamProject: { + fields: any; + }; + TeamProjectCollection: { + fields: any; + }; + TeamProjectCollectionReference: { + fields: any; + }; + TeamProjectReference: { + fields: any; + }; + WebApiConnectedService: { + fields: any; + }; + WebApiConnectedServiceDetails: { + fields: any; + }; + WebApiConnectedServiceRef: { + fields: any; + }; + WebApiCreateTagRequestData: { + fields: any; + }; + WebApiProject: { + fields: any; + }; + WebApiProjectCollection: { + fields: any; + }; + WebApiProjectCollectionRef: { + fields: any; + }; + WebApiTagDefinition: { + fields: any; + }; + WebApiTeam: { + fields: any; + }; + WebApiTeamRef: { + fields: any; + }; + }; + +} +declare module 'vso-node-api/interfaces/BuildInterfaces' { + import TfsCoreInterfaces = require('vso-node-api/interfaces/CoreInterfaces'); + import VSSInterfaces = require('vso-node-api/interfaces/common/VSSInterfaces'); + export interface AgentPoolQueue extends ShallowReference { + _links: any; + /** + * The pool used by this queue. + */ + pool: TaskAgentPoolReference; + } + export enum AgentStatus { + /** + * Indicates that the build agent cannot be contacted. + */ + Unavailable = 0, + /** + * Indicates that the build agent is currently available. + */ + Available = 1, + /** + * Indicates that the build agent has taken itself offline. + */ + Offline = 2, + } + export interface ArtifactResource { + _links: any; + /** + * The type-specific resource data. For example, "#/10002/5/drop", "$/drops/5", "\\myshare\myfolder\mydrops\5" + */ + data: string; + /** + * Link to the resource. This might include things like query parameters to download as a zip file + */ + downloadUrl: string; + /** + * Properties of Artifact Resource + */ + properties: { + [key: string]: string; + }; + /** + * The type of the resource: File container, version control folder, UNC path, etc. + */ + type: string; + /** + * Link to the resource + */ + url: string; + } + export enum AuditAction { + Add = 1, + Update = 2, + Delete = 3, + } + /** + * Data representation of a build + */ + export interface Build { + _links: any; + /** + * Build number/name of the build + */ + buildNumber: string; + /** + * Build number revision + */ + buildNumberRevision: number; + /** + * The build controller. This should only be set if the definition type is Xaml. + */ + controller: BuildController; + /** + * The definition associated with the build + */ + definition: DefinitionReference; + /** + * Indicates whether the build has been deleted. + */ + deleted: boolean; + /** + * Demands + */ + demands: any[]; + /** + * Time that the build was completed + */ + finishTime: Date; + /** + * Id of the build + */ + id: number; + keepForever: boolean; + /** + * Process or person that last changed the build + */ + lastChangedBy: VSSInterfaces.IdentityRef; + /** + * Date the build was last changed + */ + lastChangedDate: Date; + /** + * Log location of the build + */ + logs: BuildLogReference; + /** + * Orchestration plan for the build + */ + orchestrationPlan: TaskOrchestrationPlanReference; + /** + * Parameters for the build + */ + parameters: string; + /** + * The build's priority + */ + priority: QueuePriority; + /** + * The team project + */ + project: TfsCoreInterfaces.TeamProjectReference; + properties: any; + /** + * Quality of the xaml build (good, bad, etc.) + */ + quality: string; + /** + * The queue. This should only be set if the definition type is Build. + */ + queue: AgentPoolQueue; + /** + * Queue option of the build. + */ + queueOptions: QueueOptions; + /** + * The current position of the build in the queue + */ + queuePosition: number; + /** + * Time that the build was queued + */ + queueTime: Date; + /** + * Reason that the build was created + */ + reason: BuildReason; + /** + * The repository + */ + repository: BuildRepository; + /** + * The identity that queued the build + */ + requestedBy: VSSInterfaces.IdentityRef; + /** + * The identity on whose behalf the build was queued + */ + requestedFor: VSSInterfaces.IdentityRef; + /** + * The build result + */ + result: BuildResult; + /** + * Source branch + */ + sourceBranch: string; + /** + * Source version + */ + sourceVersion: string; + /** + * Time that the build was started + */ + startTime: Date; + /** + * Status of the build + */ + status: BuildStatus; + tags: string[]; + /** + * Uri of the build + */ + uri: string; + /** + * REST url of the build + */ + url: string; + validationResults: BuildRequestValidationResult[]; + } + export interface BuildAgent { + buildDirectory: string; + controller: ShallowReference; + createdDate: Date; + description: string; + enabled: boolean; + id: number; + messageQueueUrl: string; + name: string; + reservedForBuild: string; + server: ShallowReference; + status: AgentStatus; + statusMessage: string; + updatedDate: Date; + uri: string; + url: string; + } + export interface BuildArtifact { + /** + * The artifact id + */ + id: number; + /** + * The name of the artifact + */ + name: string; + /** + * The actual resource + */ + resource: ArtifactResource; + } + export interface BuildArtifactAddedEvent extends BuildUpdatedEvent { + artifact: BuildArtifact; + } + export enum BuildAuthorizationScope { + /** + * The identity used should have build service account permissions scoped to the project collection. This is useful when resources for a single build are spread across multiple projects. + */ + ProjectCollection = 1, + /** + * The identity used should have build service account permissions scoped to the project in which the build definition resides. This is useful for isolation of build jobs to a particular team project to avoid any unintentional escalation of privilege attacks during a build. + */ + Project = 2, + } + /** + * Data representation of a build badge + */ + export interface BuildBadge { + /** + * Build id, if exists that this badge corresponds to + */ + buildId: number; + /** + * Self Url that generates SVG + */ + imageUrl: string; + } + export interface BuildChangesCalculatedEvent extends BuildUpdatedEvent { + changes: Change[]; + } + export interface BuildCompletedEvent extends BuildUpdatedEvent { + } + export interface BuildController extends ShallowReference { + _links: any; + /** + * The date the controller was created. + */ + createdDate: Date; + /** + * The description of the controller. + */ + description: string; + /** + * Indicates whether the controller is enabled. + */ + enabled: boolean; + /** + * The status of the controller. + */ + status: ControllerStatus; + /** + * The date the controller was last updated. + */ + updatedDate: Date; + /** + * The controller's URI. + */ + uri: string; + } + export interface BuildDefinition extends BuildDefinitionReference { + _links: any; + /** + * Indicates whether badges are enabled for this definition + */ + badgeEnabled: boolean; + build: BuildDefinitionStep[]; + /** + * The build number format + */ + buildNumberFormat: string; + /** + * The comment entered when saving the definition + */ + comment: string; + demands: any[]; + /** + * The description + */ + description: string; + /** + * The drop location for the definition + */ + dropLocation: string; + /** + * Gets or sets the job authorization scope for builds which are queued against this definition + */ + jobAuthorizationScope: BuildAuthorizationScope; + /** + * Gets or sets the job execution timeout in minutes for builds which are queued against this definition + */ + jobTimeoutInMinutes: number; + options: BuildOption[]; + properties: any; + /** + * The repository + */ + repository: BuildRepository; + retentionRules: RetentionPolicy[]; + triggers: BuildTrigger[]; + variables: { + [key: string]: BuildDefinitionVariable; + }; + } + export interface BuildDefinitionChangedEvent { + changeType: AuditAction; + definition: BuildDefinition; + } + export interface BuildDefinitionChangingEvent { + changeType: AuditAction; + newDefinition: BuildDefinition; + originalDefinition: BuildDefinition; + } + export interface BuildDefinitionReference extends DefinitionReference { + /** + * The author of the definition. + */ + authoredBy: VSSInterfaces.IdentityRef; + /** + * If this is a draft definition, it might have a parent + */ + draftOf: DefinitionReference; + /** + * The quality of the definition document (draft, etc.) + */ + quality: DefinitionQuality; + /** + * The default queue which should be used for requests. + */ + queue: AgentPoolQueue; + } + export interface BuildDefinitionRevision { + changedBy: VSSInterfaces.IdentityRef; + changedDate: Date; + changeType: AuditAction; + comment: string; + definitionUrl: string; + name: string; + revision: number; + } + export interface BuildDefinitionSourceProvider { + /** + * Uri of the associated definition + */ + definitionUri: string; + /** + * fields associated with this build definition + */ + fields: { + [key: string]: string; + }; + /** + * Id of this source provider + */ + id: number; + /** + * The lst time this source provider was modified + */ + lastModified: Date; + /** + * Name of the source provider + */ + name: string; + /** + * Which trigger types are supported by this definition source provider + */ + supportedTriggerTypes: DefinitionTriggerType; + } + export interface BuildDefinitionStep { + alwaysRun: boolean; + continueOnError: boolean; + displayName: string; + enabled: boolean; + inputs: { + [key: string]: string; + }; + task: TaskDefinitionReference; + } + export interface BuildDefinitionTemplate { + canDelete: boolean; + category: string; + description: string; + iconTaskId: string; + id: string; + name: string; + template: BuildDefinition; + } + export interface BuildDefinitionVariable { + allowOverride: boolean; + isSecret: boolean; + value: string; + } + export interface BuildDeletedEvent extends RealtimeBuildEvent { + build: Build; + } + export interface BuildDeployment { + deployment: BuildSummary; + sourceBuild: ShallowReference; + } + export interface BuildDestroyedEvent extends RealtimeBuildEvent { + build: Build; + } + /** + * Represents a build log. + */ + export interface BuildLog extends BuildLogReference { + /** + * The date the log was created. + */ + createdOn: Date; + /** + * The date the log was last changed. + */ + lastChangedOn: Date; + /** + * The number of lines in the log. + */ + lineCount: number; + } + /** + * Data representation of a build log reference + */ + export interface BuildLogReference { + /** + * The id of the log. + */ + id: number; + /** + * The type of the log location. + */ + type: string; + /** + * Full link to the log resource. + */ + url: string; + } + export interface BuildOption { + definition: BuildOptionDefinitionReference; + enabled: boolean; + inputs: { + [key: string]: string; + }; + } + export interface BuildOptionDefinition extends BuildOptionDefinitionReference { + description: string; + groups: BuildOptionGroupDefinition[]; + inputs: BuildOptionInputDefinition[]; + name: string; + ordinal: number; + } + export interface BuildOptionDefinitionReference { + id: string; + } + export interface BuildOptionGroupDefinition { + displayName: string; + isExpanded: boolean; + name: string; + } + export interface BuildOptionInputDefinition { + defaultValue: string; + groupName: string; + help: { + [key: string]: string; + }; + label: string; + name: string; + options: { + [key: string]: string; + }; + required: boolean; + type: BuildOptionInputType; + visibleRule: string; + } + export enum BuildOptionInputType { + String = 0, + Boolean = 1, + StringList = 2, + Radio = 3, + PickList = 4, + MultiLine = 5, + } + export enum BuildPhaseStatus { + /** + * The state is not known. + */ + Unknown = 0, + /** + * The build phase completed unsuccessfully. + */ + Failed = 1, + /** + * The build phase completed successfully. + */ + Succeeded = 2, + } + export interface BuildPollingSummaryEvent { + } + export interface BuildProcessTemplate { + description: string; + fileExists: boolean; + id: number; + parameters: string; + serverPath: string; + supportedReasons: BuildReason; + teamProject: string; + templateType: ProcessTemplateType; + url: string; + version: string; + } + export enum BuildQueryOrder { + /** + * Order by finish time ascending. + */ + FinishTimeAscending = 2, + /** + * Order by finish time descending. + */ + FinishTimeDescending = 3, + } + export interface BuildQueuedEvent extends BuildUpdatedEvent { + } + export enum BuildReason { + /** + * No reason. This value should not be used. + */ + None = 0, + /** + * The build was started manually. + */ + Manual = 1, + /** + * The build was started for the trigger TriggerType.ContinuousIntegration. + */ + IndividualCI = 2, + /** + * The build was started for the trigger TriggerType.BatchedContinuousIntegration. + */ + BatchedCI = 4, + /** + * The build was started for the trigger TriggerType.Schedule. + */ + Schedule = 8, + /** + * The build was created by a user. + */ + UserCreated = 32, + /** + * The build was started manually for private validation. + */ + ValidateShelveset = 64, + /** + * The build was started for the trigger ContinuousIntegrationType.Gated. + */ + CheckInShelveset = 128, + /** + * The build was triggered for retention policy purposes. + */ + Triggered = 175, + /** + * All reasons. + */ + All = 239, + } + export interface BuildReference { + _links: any; + /** + * Build number/name of the build + */ + buildNumber: string; + /** + * Time that the build was completed + */ + finishTime: Date; + /** + * Id of the build + */ + id: number; + /** + * Time that the build was queued + */ + queueTime: Date; + /** + * The build result + */ + result: BuildResult; + /** + * Time that the build was started + */ + startTime: Date; + /** + * Status of the build + */ + status: BuildStatus; + } + export interface BuildReportMetadata { + buildId: number; + content: string; + type: string; + } + export interface BuildRepository { + checkoutSubmodules: boolean; + /** + * Indicates whether to clean the target folder when getting code from the repository. This is a String so that it can reference variables. + */ + clean: string; + /** + * Gets or sets the name of the default branch. + */ + defaultBranch: string; + id: string; + /** + * Gets or sets the friendly name of the repository. + */ + name: string; + properties: { + [key: string]: string; + }; + /** + * Gets or sets the root folder. + */ + rootFolder: string; + /** + * Gets or sets the type of the repository. + */ + type: string; + /** + * Gets or sets the url of the repository. + */ + url: string; + } + export interface BuildRequestValidationResult { + message: string; + result: ValidationResult; + } + export interface BuildResourceUsage { + distributedTaskAgents: number; + totalUsage: number; + xamlControllers: number; + } + export enum BuildResult { + /** + * No result + */ + None = 0, + /** + * The build completed successfully. + */ + Succeeded = 2, + /** + * The build completed compilation successfully but had other errors. + */ + PartiallySucceeded = 4, + /** + * The build completed unsuccessfully. + */ + Failed = 8, + /** + * The build was canceled before starting. + */ + Canceled = 32, + } + export interface BuildServer { + agents: ShallowReference[]; + controller: ShallowReference; + id: number; + isVirtual: boolean; + messageQueueUrl: string; + name: string; + requireClientCertificates: boolean; + status: ServiceHostStatus; + statusChangedDate: Date; + uri: string; + url: string; + version: number; + } + export interface BuildSettings { + daysToKeepDeletedBuildsBeforeDestroy: number; + defaultRetentionPolicy: RetentionPolicy; + maximumRetentionPolicy: RetentionPolicy; + } + export interface BuildStartedEvent extends BuildUpdatedEvent { + } + export enum BuildStatus { + /** + * No status. + */ + None = 0, + /** + * The build is currently in progress. + */ + InProgress = 1, + /** + * The build has completed. + */ + Completed = 2, + /** + * The build is cancelling + */ + Cancelling = 4, + /** + * The build is inactive in the queue. + */ + Postponed = 8, + /** + * The build has not yet started. + */ + NotStarted = 32, + /** + * All status. + */ + All = 47, + } + export interface BuildSummary { + build: ShallowReference; + finishTime: Date; + keepForever: boolean; + quality: string; + reason: BuildReason; + requestedFor: VSSInterfaces.IdentityRef; + startTime: Date; + status: BuildStatus; + } + export interface BuildTrigger { + triggerType: DefinitionTriggerType; + } + export interface BuildUpdatedEvent extends RealtimeBuildEvent { + build: Build; + } + export interface BuildWorkspace { + mappings: MappingDetails[]; + } + /** + * Represents a change associated with a build. + */ + export interface Change { + /** + * The author of the change. + */ + author: VSSInterfaces.IdentityRef; + /** + * The location of a user-friendly representation of the resource. + */ + displayUri: string; + /** + * Something that identifies the change. For a commit, this would be the SHA1. For a TFVC changeset, this would be the changeset id. + */ + id: string; + /** + * The location of the full representation of the resource. + */ + location: string; + /** + * A description of the change. This might be a commit message or changeset description. + */ + message: string; + /** + * Indicates whether the message was truncated + */ + messageTruncated: boolean; + /** + * A timestamp for the change. + */ + timestamp: Date; + /** + * The type of change. "commit", "changeset", etc. + */ + type: string; + } + export interface ConsoleLogEvent extends RealtimeBuildEvent { + lines: string[]; + timelineId: string; + timelineRecordId: string; + } + export interface ContinuousDeploymentDefinition { + /** + * The connected service associated with the continuous deployment + */ + connectedService: TfsCoreInterfaces.WebApiConnectedServiceRef; + /** + * The definition associated with the continuous deployment + */ + definition: ShallowReference; + gitBranch: string; + hostedServiceName: string; + project: TfsCoreInterfaces.TeamProjectReference; + repositoryId: string; + storageAccountName: string; + subscriptionId: string; + website: string; + webspace: string; + } + export interface ContinuousIntegrationTrigger extends BuildTrigger { + batchChanges: boolean; + branchFilters: string[]; + maxConcurrentBuildsPerBranch: number; + /** + * The polling interval in seconds. + */ + pollingInterval: number; + /** + * This is the id of the polling job that polls the external repository. Once the build definition is saved/updated, this value is set. + */ + pollingJobId: string; + } + export enum ControllerStatus { + /** + * Indicates that the build controller cannot be contacted. + */ + Unavailable = 0, + /** + * Indicates that the build controller is currently available. + */ + Available = 1, + /** + * Indicates that the build controller has taken itself offline. + */ + Offline = 2, + } + export enum DefinitionQuality { + Definition = 1, + Draft = 2, + } + export enum DefinitionQueryOrder { + /** + * No order + */ + None = 0, + /** + * Order by created on/last modified time ascending. + */ + LastModifiedAscending = 1, + /** + * Order by created on/last modified time descending. + */ + LastModifiedDescending = 2, + /** + * Order by definition name ascending. + */ + DefinitionNameAscending = 3, + /** + * Order by definition name descending. + */ + DefinitionNameDescending = 4, + } + export enum DefinitionQueueStatus { + /** + * When enabled the definition queue allows builds to be queued by users, the system will queue scheduled, gated and continuous integration builds, and the queued builds will be started by the system. + */ + Enabled = 0, + /** + * When paused the definition queue allows builds to be queued by users and the system will queue scheduled, gated and continuous integration builds. Builds in the queue will not be started by the system. + */ + Paused = 1, + /** + * When disabled the definition queue will not allow builds to be queued by users and the system will not queue scheduled, gated or continuous integration builds. Builds already in the queue will not be started by the system. + */ + Disabled = 2, + } + /** + * A reference to a definition. + */ + export interface DefinitionReference extends ShallowReference { + /** + * The date the definition was created + */ + createdDate: Date; + /** + * The project. + */ + project: TfsCoreInterfaces.TeamProjectReference; + /** + * If builds can be queued from this definition + */ + queueStatus: DefinitionQueueStatus; + /** + * The definition revision number. + */ + revision: number; + /** + * The type of the definition. + */ + type: DefinitionType; + /** + * The Uri of the definition + */ + uri: string; + } + export enum DefinitionTriggerType { + /** + * Manual builds only. + */ + None = 1, + /** + * A build should be started for each changeset. + */ + ContinuousIntegration = 2, + /** + * A build should be started for multiple changesets at a time at a specified interval. + */ + BatchedContinuousIntegration = 4, + /** + * A build should be started on a specified schedule whether or not changesets exist. + */ + Schedule = 8, + /** + * A validation build should be started for each check-in. + */ + GatedCheckIn = 16, + /** + * A validation build should be started for each batch of check-ins. + */ + BatchedGatedCheckIn = 32, + /** + * All types. + */ + All = 63, + } + export enum DefinitionType { + Xaml = 1, + Build = 2, + } + export enum DeleteOptions { + /** + * No data should be deleted. This value should not be used. + */ + None = 0, + /** + * The drop location should be deleted. + */ + DropLocation = 1, + /** + * The test results should be deleted. + */ + TestResults = 2, + /** + * The version control label should be deleted. + */ + Label = 4, + /** + * The build should be deleted. + */ + Details = 8, + /** + * Published symbols should be deleted. + */ + Symbols = 16, + /** + * All data should be deleted. + */ + All = 31, + } + /** + * Represents the data from the build information nodes for type "DeploymentInformation" for xaml builds + */ + export interface Deployment { + type: string; + } + /** + * Deployment iformation for type "Build" + */ + export interface DeploymentBuild extends Deployment { + buildId: number; + } + /** + * Deployment iformation for type "Deploy" + */ + export interface DeploymentDeploy extends Deployment { + message: string; + } + /** + * Deployment iformation for type "Test" + */ + export interface DeploymentTest extends Deployment { + runId: number; + } + export interface GatedCheckInTrigger extends BuildTrigger { + pathFilters: string[]; + runContinuousIntegration: boolean; + } + export enum GetOption { + /** + * Use the latest changeset at the time the build is queued. + */ + LatestOnQueue = 0, + /** + * Use the latest changeset at the time the build is started. + */ + LatestOnBuild = 1, + /** + * A user-specified version has been supplied. + */ + Custom = 2, + } + /** + * Data representation of an information node associated with a build + */ + export interface InformationNode { + /** + * Fields of the information node + */ + fields: { + [key: string]: string; + }; + /** + * Process or person that last modified this node + */ + lastModifiedBy: string; + /** + * Date this node was last modified + */ + lastModifiedDate: Date; + /** + * Node Id of this information node + */ + nodeId: number; + /** + * Id of parent node (xml tree) + */ + parentId: number; + /** + * The type of the information node + */ + type: string; + } + export interface Issue { + category: string; + data: { + [key: string]: string; + }; + message: string; + type: IssueType; + } + export enum IssueType { + Error = 1, + Warning = 2, + } + export interface MappingDetails { + localPath: string; + mappingType: string; + serverPath: string; + } + export enum ProcessTemplateType { + /** + * Indicates a custom template. + */ + Custom = 0, + /** + * Indicates a default template. + */ + Default = 1, + /** + * Indicates an upgrade template. + */ + Upgrade = 2, + } + export interface PropertyValue { + /** + * Guid of identity that changed this property value + */ + changedBy: string; + /** + * The date this property value was changed + */ + changedDate: Date; + /** + * Name in the name value mapping + */ + propertyName: string; + /** + * Value in the name value mapping + */ + value: any; + } + export enum QueryDeletedOption { + /** + * Include only non-deleted builds. + */ + ExcludeDeleted = 0, + /** + * Include deleted and non-deleted builds. + */ + IncludeDeleted = 1, + /** + * Include only deleted builds. + */ + OnlyDeleted = 2, + } + export enum QueueOptions { + /** + * No queue options + */ + None = 0, + /** + * Create a plan Id for the build, do not run it + */ + DoNotRun = 1, + } + export enum QueuePriority { + /** + * Low priority. + */ + Low = 5, + /** + * Below normal priority. + */ + BelowNormal = 4, + /** + * Normal priority. + */ + Normal = 3, + /** + * Above normal priority. + */ + AboveNormal = 2, + /** + * High priority. + */ + High = 1, + } + export interface RealtimeBuildEvent { + buildId: number; + } + export interface RequestReference { + /** + * Id of the resource + */ + id: number; + /** + * Name of the requestor + */ + requestedFor: VSSInterfaces.IdentityRef; + /** + * Full http link to the resource + */ + url: string; + } + export interface RetentionPolicy { + artifacts: string[]; + branches: string[]; + daysToKeep: number; + deleteBuildRecord: boolean; + deleteTestResults: boolean; + minimumToKeep: number; + } + export interface Schedule { + branchFilters: string[]; + /** + * Days for a build (flags enum for days of the week) + */ + daysToBuild: ScheduleDays; + /** + * The Job Id of the Scheduled job that will queue the scheduled build. Since a single trigger can have multiple schedules and we want a single job to process a single schedule (since each schedule has a list of branches to build), the schedule itself needs to define the Job Id. This value will be filled in when a definition is added or updated. The UI does not provide it or use it. + */ + scheduleJobId: string; + /** + * Local timezone hour to start + */ + startHours: number; + /** + * Local timezone minute to start + */ + startMinutes: number; + /** + * Time zone of the build schedule (string representation of the time zone id) + */ + timeZoneId: string; + } + export enum ScheduleDays { + /** + * Do not run. + */ + None = 0, + /** + * Run on Monday. + */ + Monday = 1, + /** + * Run on Tuesday. + */ + Tuesday = 2, + /** + * Run on Wednesday. + */ + Wednesday = 4, + /** + * Run on Thursday. + */ + Thursday = 8, + /** + * Run on Friday. + */ + Friday = 16, + /** + * Run on Saturday. + */ + Saturday = 32, + /** + * Run on Sunday. + */ + Sunday = 64, + /** + * Run on all days of the week. + */ + All = 127, + } + export interface ScheduleTrigger extends BuildTrigger { + schedules: Schedule[]; + } + export enum ServiceHostStatus { + /** + * The service host is currently connected and accepting commands. + */ + Online = 1, + /** + * The service host is currently disconnected and not accepting commands. + */ + Offline = 2, + } + /** + * An abstracted reference to some other resource. This class is used to provide the build data contracts with a uniform way to reference other resources in a way that provides easy traversal through links. + */ + export interface ShallowReference { + /** + * Id of the resource + */ + id: number; + /** + * Name of the linked resource (definition name, controller name, etc.) + */ + name: string; + /** + * Full http link to the resource + */ + url: string; + } + export interface SvnMappingDetails { + depth: number; + ignoreExternals: boolean; + localPath: string; + revision: string; + serverPath: string; + } + export interface SvnWorkspace { + mappings: SvnMappingDetails[]; + } + export interface TaskAgentPoolReference { + id: number; + name: string; + } + export interface TaskDefinitionReference { + id: string; + versionSpec: string; + } + export interface TaskOrchestrationPlanReference { + planId: string; + } + export enum TaskResult { + Succeeded = 0, + SucceededWithIssues = 1, + Failed = 2, + Canceled = 3, + Skipped = 4, + Abandoned = 5, + } + export interface Timeline extends TimelineReference { + lastChangedBy: string; + lastChangedOn: Date; + records: TimelineRecord[]; + } + export interface TimelineRecord { + _links: any; + changeId: number; + currentOperation: string; + details: TimelineReference; + errorCount: number; + finishTime: Date; + id: string; + issues: Issue[]; + lastModified: Date; + log: BuildLogReference; + name: string; + order: number; + parentId: string; + percentComplete: number; + result: TaskResult; + resultCode: string; + startTime: Date; + state: TimelineRecordState; + type: string; + url: string; + warningCount: number; + workerName: string; + } + export enum TimelineRecordState { + Pending = 0, + InProgress = 1, + Completed = 2, + } + export interface TimelineRecordsUpdatedEvent extends RealtimeBuildEvent { + timelineRecords: TimelineRecord[]; + } + export interface TimelineReference { + changeId: number; + id: string; + url: string; + } + export enum ValidationResult { + OK = 0, + Warning = 1, + Error = 2, + } + /** + * Mapping for a workspace + */ + export interface WorkspaceMapping { + /** + * Uri of the associated definition + */ + definitionUri: string; + /** + * Depth of this mapping + */ + depth: number; + /** + * local location of the definition + */ + localItem: string; + /** + * type of workspace mapping + */ + mappingType: WorkspaceMappingType; + /** + * Server location of the definition + */ + serverItem: string; + /** + * Id of the workspace + */ + workspaceId: number; + } + export enum WorkspaceMappingType { + /** + * The path is mapped in the workspace. + */ + Map = 0, + /** + * The path is cloaked in the workspace. + */ + Cloak = 1, + } + export interface WorkspaceTemplate { + /** + * Uri of the associated definition + */ + definitionUri: string; + /** + * The identity that last modified this template + */ + lastModifiedBy: string; + /** + * The last time this template was modified + */ + lastModifiedDate: Date; + /** + * List of workspace mappings + */ + mappings: WorkspaceMapping[]; + /** + * Id of the workspace for this template + */ + workspaceId: number; + } + export interface XamlBuildDefinition extends DefinitionReference { + _links: any; + /** + * Batch size of the definition + */ + batchSize: number; + buildArgs: string; + /** + * The continuous integration quiet period + */ + continuousIntegrationQuietPeriod: number; + /** + * The build controller + */ + controller: BuildController; + /** + * The date this definition was created + */ + createdOn: Date; + /** + * Default drop location for builds from this definition + */ + defaultDropLocation: string; + /** + * Description of the definition + */ + description: string; + /** + * The last build on this definition + */ + lastBuild: ShallowReference; + /** + * The repository + */ + repository: BuildRepository; + /** + * The reasons supported by the template + */ + supportedReasons: BuildReason; + /** + * How builds are triggered from this definition + */ + triggerType: DefinitionTriggerType; + } + export var TypeInfo: { + AgentPoolQueue: { + fields: any; + }; + AgentStatus: { + enumValues: { + "unavailable": number; + "available": number; + "offline": number; + }; + }; + ArtifactResource: { + fields: any; + }; + AuditAction: { + enumValues: { + "add": number; + "update": number; + "delete": number; + }; + }; + Build: { + fields: any; + }; + BuildAgent: { + fields: any; + }; + BuildArtifact: { + fields: any; + }; + BuildArtifactAddedEvent: { + fields: any; + }; + BuildAuthorizationScope: { + enumValues: { + "projectCollection": number; + "project": number; + }; + }; + BuildBadge: { + fields: any; + }; + BuildChangesCalculatedEvent: { + fields: any; + }; + BuildCompletedEvent: { + fields: any; + }; + BuildController: { + fields: any; + }; + BuildDefinition: { + fields: any; + }; + BuildDefinitionChangedEvent: { + fields: any; + }; + BuildDefinitionChangingEvent: { + fields: any; + }; + BuildDefinitionReference: { + fields: any; + }; + BuildDefinitionRevision: { + fields: any; + }; + BuildDefinitionSourceProvider: { + fields: any; + }; + BuildDefinitionStep: { + fields: any; + }; + BuildDefinitionTemplate: { + fields: any; + }; + BuildDefinitionVariable: { + fields: any; + }; + BuildDeletedEvent: { + fields: any; + }; + BuildDeployment: { + fields: any; + }; + BuildDestroyedEvent: { + fields: any; + }; + BuildLog: { + fields: any; + }; + BuildLogReference: { + fields: any; + }; + BuildOption: { + fields: any; + }; + BuildOptionDefinition: { + fields: any; + }; + BuildOptionDefinitionReference: { + fields: any; + }; + BuildOptionGroupDefinition: { + fields: any; + }; + BuildOptionInputDefinition: { + fields: any; + }; + BuildOptionInputType: { + enumValues: { + "string": number; + "boolean": number; + "stringList": number; + "radio": number; + "pickList": number; + "multiLine": number; + }; + }; + BuildPhaseStatus: { + enumValues: { + "unknown": number; + "failed": number; + "succeeded": number; + }; + }; + BuildPollingSummaryEvent: { + fields: any; + }; + BuildProcessTemplate: { + fields: any; + }; + BuildQueryOrder: { + enumValues: { + "finishTimeAscending": number; + "finishTimeDescending": number; + }; + }; + BuildQueuedEvent: { + fields: any; + }; + BuildReason: { + enumValues: { + "none": number; + "manual": number; + "individualCI": number; + "batchedCI": number; + "schedule": number; + "userCreated": number; + "validateShelveset": number; + "checkInShelveset": number; + "triggered": number; + "all": number; + }; + }; + BuildReference: { + fields: any; + }; + BuildReportMetadata: { + fields: any; + }; + BuildRepository: { + fields: any; + }; + BuildRequestValidationResult: { + fields: any; + }; + BuildResourceUsage: { + fields: any; + }; + BuildResult: { + enumValues: { + "none": number; + "succeeded": number; + "partiallySucceeded": number; + "failed": number; + "canceled": number; + }; + }; + BuildServer: { + fields: any; + }; + BuildSettings: { + fields: any; + }; + BuildStartedEvent: { + fields: any; + }; + BuildStatus: { + enumValues: { + "none": number; + "inProgress": number; + "completed": number; + "cancelling": number; + "postponed": number; + "notStarted": number; + "all": number; + }; + }; + BuildSummary: { + fields: any; + }; + BuildTrigger: { + fields: any; + }; + BuildUpdatedEvent: { + fields: any; + }; + BuildWorkspace: { + fields: any; + }; + Change: { + fields: any; + }; + ConsoleLogEvent: { + fields: any; + }; + ContinuousDeploymentDefinition: { + fields: any; + }; + ContinuousIntegrationTrigger: { + fields: any; + }; + ControllerStatus: { + enumValues: { + "unavailable": number; + "available": number; + "offline": number; + }; + }; + DefinitionQuality: { + enumValues: { + "definition": number; + "draft": number; + }; + }; + DefinitionQueryOrder: { + enumValues: { + "none": number; + "lastModifiedAscending": number; + "lastModifiedDescending": number; + "definitionNameAscending": number; + "definitionNameDescending": number; + }; + }; + DefinitionQueueStatus: { + enumValues: { + "enabled": number; + "paused": number; + "disabled": number; + }; + }; + DefinitionReference: { + fields: any; + }; + DefinitionTriggerType: { + enumValues: { + "none": number; + "continuousIntegration": number; + "batchedContinuousIntegration": number; + "schedule": number; + "gatedCheckIn": number; + "batchedGatedCheckIn": number; + "all": number; + }; + }; + DefinitionType: { + enumValues: { + "xaml": number; + "build": number; + }; + }; + DeleteOptions: { + enumValues: { + "none": number; + "dropLocation": number; + "testResults": number; + "label": number; + "details": number; + "symbols": number; + "all": number; + }; + }; + Deployment: { + fields: any; + }; + DeploymentBuild: { + fields: any; + }; + DeploymentDeploy: { + fields: any; + }; + DeploymentTest: { + fields: any; + }; + GatedCheckInTrigger: { + fields: any; + }; + GetOption: { + enumValues: { + "latestOnQueue": number; + "latestOnBuild": number; + "custom": number; + }; + }; + InformationNode: { + fields: any; + }; + Issue: { + fields: any; + }; + IssueType: { + enumValues: { + "error": number; + "warning": number; + }; + }; + MappingDetails: { + fields: any; + }; + ProcessTemplateType: { + enumValues: { + "custom": number; + "default": number; + "upgrade": number; + }; + }; + PropertyValue: { + fields: any; + }; + QueryDeletedOption: { + enumValues: { + "excludeDeleted": number; + "includeDeleted": number; + "onlyDeleted": number; + }; + }; + QueueOptions: { + enumValues: { + "none": number; + "doNotRun": number; + }; + }; + QueuePriority: { + enumValues: { + "low": number; + "belowNormal": number; + "normal": number; + "aboveNormal": number; + "high": number; + }; + }; + RealtimeBuildEvent: { + fields: any; + }; + RequestReference: { + fields: any; + }; + RetentionPolicy: { + fields: any; + }; + Schedule: { + fields: any; + }; + ScheduleDays: { + enumValues: { + "none": number; + "monday": number; + "tuesday": number; + "wednesday": number; + "thursday": number; + "friday": number; + "saturday": number; + "sunday": number; + "all": number; + }; + }; + ScheduleTrigger: { + fields: any; + }; + ServiceHostStatus: { + enumValues: { + "online": number; + "offline": number; + }; + }; + ShallowReference: { + fields: any; + }; + SvnMappingDetails: { + fields: any; + }; + SvnWorkspace: { + fields: any; + }; + TaskAgentPoolReference: { + fields: any; + }; + TaskDefinitionReference: { + fields: any; + }; + TaskOrchestrationPlanReference: { + fields: any; + }; + TaskResult: { + enumValues: { + "succeeded": number; + "succeededWithIssues": number; + "failed": number; + "canceled": number; + "skipped": number; + "abandoned": number; + }; + }; + Timeline: { + fields: any; + }; + TimelineRecord: { + fields: any; + }; + TimelineRecordState: { + enumValues: { + "pending": number; + "inProgress": number; + "completed": number; + }; + }; + TimelineRecordsUpdatedEvent: { + fields: any; + }; + TimelineReference: { + fields: any; + }; + ValidationResult: { + enumValues: { + "oK": number; + "warning": number; + "error": number; + }; + }; + WorkspaceMapping: { + fields: any; + }; + WorkspaceMappingType: { + enumValues: { + "map": number; + "cloak": number; + }; + }; + WorkspaceTemplate: { + fields: any; + }; + XamlBuildDefinition: { + fields: any; + }; + }; + +} +declare module 'vso-node-api/BuildApi' { + + + import Q = require('q'); + import basem = require('vso-node-api/ClientApiBases'); + import VsoBaseInterfaces = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); + import BuildInterfaces = require('vso-node-api/interfaces/BuildInterfaces'); + import VSSInterfaces = require('vso-node-api/interfaces/common/VSSInterfaces'); + export interface IBuildApi extends basem.ClientApiBase { + createArtifact(artifact: BuildInterfaces.BuildArtifact, buildId: number, project: string, onResult: (err: any, statusCode: number, artifact: BuildInterfaces.BuildArtifact) => void): void; + getArtifact(buildId: number, artifactName: string, project: string, onResult: (err: any, statusCode: number, artifact: BuildInterfaces.BuildArtifact) => void): void; + getArtifactContentZip(buildId: number, artifactName: string, project: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + getArtifacts(buildId: number, project: string, onResult: (err: any, statusCode: number, artifacts: BuildInterfaces.BuildArtifact[]) => void): void; + getBadge(project: string, definitionId: number, branchName: string, onResult: (err: any, statusCode: number, badge: string) => void): void; + getBuildBadge(project: string, repoType: string, repoId: string, branchName: string, onResult: (err: any, statusCode: number, buildbadge: BuildInterfaces.BuildBadge) => void): void; + getBuildBadgeData(project: string, repoType: string, repoId: string, branchName: string, onResult: (err: any, statusCode: number, buildbadge: string) => void): void; + deleteBuild(buildId: number, project: string, onResult: (err: any, statusCode: number) => void): void; + getBuild(buildId: number, project: string, propertyFilters: string, onResult: (err: any, statusCode: number, build: BuildInterfaces.Build) => void): void; + getBuilds(project: string, definitions: number[], queues: number[], buildNumber: string, minFinishTime: Date, maxFinishTime: Date, requestedFor: string, reasonFilter: BuildInterfaces.BuildReason, statusFilter: BuildInterfaces.BuildStatus, resultFilter: BuildInterfaces.BuildResult, tagFilters: string[], properties: string[], type: BuildInterfaces.DefinitionType, top: number, continuationToken: string, maxBuildsPerDefinition: number, deletedFilter: BuildInterfaces.QueryDeletedOption, queryOrder: BuildInterfaces.BuildQueryOrder, branchName: string, onResult: (err: any, statusCode: number, builds: BuildInterfaces.Build[]) => void): void; + queueBuild(build: BuildInterfaces.Build, project: string, ignoreWarnings: boolean, checkInTicket: string, onResult: (err: any, statusCode: number, build: BuildInterfaces.Build) => void): void; + updateBuild(build: BuildInterfaces.Build, buildId: number, project: string, onResult: (err: any, statusCode: number, build: BuildInterfaces.Build) => void): void; + getBuildChanges(project: string, buildId: number, continuationToken: string, top: number, includeSourceChange: boolean, onResult: (err: any, statusCode: number, changes: BuildInterfaces.Change[]) => void): void; + getChangesBetweenBuilds(project: string, fromBuildId: number, toBuildId: number, top: number, onResult: (err: any, statusCode: number, changes: BuildInterfaces.Change[]) => void): void; + getBuildController(controllerId: number, onResult: (err: any, statusCode: number, Controller: BuildInterfaces.BuildController) => void): void; + getBuildControllers(name: string, onResult: (err: any, statusCode: number, Controllers: BuildInterfaces.BuildController[]) => void): void; + createDefinition(definition: BuildInterfaces.BuildDefinition, project: string, definitionToCloneId: number, definitionToCloneRevision: number, onResult: (err: any, statusCode: number, definition: BuildInterfaces.BuildDefinition) => void): void; + deleteDefinition(definitionId: number, project: string, onResult: (err: any, statusCode: number) => void): void; + getDefinition(definitionId: number, project: string, revision: number, propertyFilters: string[], onResult: (err: any, statusCode: number, definition: BuildInterfaces.DefinitionReference) => void): void; + getDefinitions(project: string, name: string, type: BuildInterfaces.DefinitionType, repositoryId: string, repositoryType: string, queryOrder: BuildInterfaces.DefinitionQueryOrder, top: number, continuationToken: string, onResult: (err: any, statusCode: number, definitions: BuildInterfaces.DefinitionReference[]) => void): void; + updateDefinition(definition: BuildInterfaces.BuildDefinition, definitionId: number, project: string, secretsSourceDefinitionId: number, secretsSourceDefinitionRevision: number, onResult: (err: any, statusCode: number, definition: BuildInterfaces.BuildDefinition) => void): void; + getBuildDeployments(project: string, buildId: number, onResult: (err: any, statusCode: number, deployments: BuildInterfaces.Deployment[]) => void): void; + getBuildLog(project: string, buildId: number, logId: number, startLine: number, endLine: number, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + getBuildLogs(project: string, buildId: number, onResult: (err: any, statusCode: number, logs: BuildInterfaces.BuildLog[]) => void): void; + getBuildLogsZip(project: string, buildId: number, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + getBuildOptionDefinitions(project: string, onResult: (err: any, statusCode: number, options: BuildInterfaces.BuildOptionDefinition[]) => void): void; + createQueue(queue: BuildInterfaces.AgentPoolQueue, onResult: (err: any, statusCode: number, queue: BuildInterfaces.AgentPoolQueue) => void): void; + deleteQueue(id: number, onResult: (err: any, statusCode: number) => void): void; + getAgentPoolQueue(controllerId: number, onResult: (err: any, statusCode: number, queue: BuildInterfaces.AgentPoolQueue) => void): void; + getQueues(name: string, onResult: (err: any, statusCode: number, queues: BuildInterfaces.AgentPoolQueue[]) => void): void; + getBuildReport(project: string, buildId: number, type: string, onResult: (err: any, statusCode: number, report: BuildInterfaces.BuildReportMetadata) => void): void; + getBuildReportHtmlContent(project: string, buildId: number, type: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + getResourceUsage(onResult: (err: any, statusCode: number, ResourceUsage: BuildInterfaces.BuildResourceUsage) => void): void; + getDefinitionRevisions(project: string, definitionId: number, onResult: (err: any, statusCode: number, revisions: BuildInterfaces.BuildDefinitionRevision[]) => void): void; + getBuildSettings(onResult: (err: any, statusCode: number, setting: BuildInterfaces.BuildSettings) => void): void; + updateBuildSettings(settings: BuildInterfaces.BuildSettings, onResult: (err: any, statusCode: number, setting: BuildInterfaces.BuildSettings) => void): void; + addBuildTag(project: string, buildId: number, tag: string, onResult: (err: any, statusCode: number, tags: string[]) => void): void; + addBuildTags(tags: string[], project: string, buildId: number, onResult: (err: any, statusCode: number, tags: string[]) => void): void; + deleteBuildTag(project: string, buildId: number, tag: string, onResult: (err: any, statusCode: number, tags: string[]) => void): void; + getBuildTags(project: string, buildId: number, onResult: (err: any, statusCode: number, tags: string[]) => void): void; + getTags(project: string, onResult: (err: any, statusCode: number, tags: string[]) => void): void; + deleteTemplate(project: string, templateId: string, onResult: (err: any, statusCode: number) => void): void; + getTemplate(project: string, templateId: string, onResult: (err: any, statusCode: number, template: BuildInterfaces.BuildDefinitionTemplate) => void): void; + getTemplates(project: string, onResult: (err: any, statusCode: number, templates: BuildInterfaces.BuildDefinitionTemplate[]) => void): void; + saveTemplate(template: BuildInterfaces.BuildDefinitionTemplate, project: string, templateId: string, onResult: (err: any, statusCode: number, template: BuildInterfaces.BuildDefinitionTemplate) => void): void; + getBuildTimeline(project: string, buildId: number, timelineId: string, changeId: number, onResult: (err: any, statusCode: number, Timeline: BuildInterfaces.Timeline) => void): void; + getBuildWorkItemsRefs(project: string, buildId: number, top: number, onResult: (err: any, statusCode: number, workitems: VSSInterfaces.ResourceRef[]) => void): void; + getBuildWorkItemsRefsFromCommits(commitIds: string[], project: string, buildId: number, top: number, onResult: (err: any, statusCode: number, workitems: VSSInterfaces.ResourceRef[]) => void): void; + getWorkItemsBetweenBuilds(project: string, fromBuildId: number, toBuildId: number, top: number, onResult: (err: any, statusCode: number, workitems: VSSInterfaces.ResourceRef[]) => void): void; + } + export interface IBuildApi extends basem.QClientApiBase { + createArtifact(artifact: BuildInterfaces.BuildArtifact, buildId: number, project?: string): Promise; + getArtifact(buildId: number, artifactName: string, project?: string): Promise; + getArtifactContentZip(buildId: number, artifactName: string, project?: string): Promise; + getArtifacts(buildId: number, project?: string): Promise; + getBadge(project: string, definitionId: number, branchName?: string): Promise; + getBuildBadge(project: string, repoType: string, repoId?: string, branchName?: string): Promise; + getBuildBadgeData(project: string, repoType: string, repoId?: string, branchName?: string): Promise; + deleteBuild(buildId: number, project?: string): Promise; + getBuild(buildId: number, project?: string, propertyFilters?: string): Promise; + getBuilds(project?: string, definitions?: number[], queues?: number[], buildNumber?: string, minFinishTime?: Date, maxFinishTime?: Date, requestedFor?: string, reasonFilter?: BuildInterfaces.BuildReason, statusFilter?: BuildInterfaces.BuildStatus, resultFilter?: BuildInterfaces.BuildResult, tagFilters?: string[], properties?: string[], type?: BuildInterfaces.DefinitionType, top?: number, continuationToken?: string, maxBuildsPerDefinition?: number, deletedFilter?: BuildInterfaces.QueryDeletedOption, queryOrder?: BuildInterfaces.BuildQueryOrder, branchName?: string): Promise; + queueBuild(build: BuildInterfaces.Build, project?: string, ignoreWarnings?: boolean, checkInTicket?: string): Promise; + updateBuild(build: BuildInterfaces.Build, buildId: number, project?: string): Promise; + getBuildChanges(project: string, buildId: number, continuationToken?: string, top?: number, includeSourceChange?: boolean): Promise; + getChangesBetweenBuilds(project: string, fromBuildId?: number, toBuildId?: number, top?: number): Promise; + getBuildController(controllerId: number): Promise; + getBuildControllers(name?: string): Promise; + createDefinition(definition: BuildInterfaces.BuildDefinition, project?: string, definitionToCloneId?: number, definitionToCloneRevision?: number): Promise; + deleteDefinition(definitionId: number, project?: string): Promise; + getDefinition(definitionId: number, project?: string, revision?: number, propertyFilters?: string[]): Promise; + getDefinitions(project?: string, name?: string, type?: BuildInterfaces.DefinitionType, repositoryId?: string, repositoryType?: string, queryOrder?: BuildInterfaces.DefinitionQueryOrder, top?: number, continuationToken?: string): Promise; + updateDefinition(definition: BuildInterfaces.BuildDefinition, definitionId: number, project?: string, secretsSourceDefinitionId?: number, secretsSourceDefinitionRevision?: number): Promise; + getBuildDeployments(project: string, buildId: number): Promise; + getBuildLog(project: string, buildId: number, logId: number, startLine?: number, endLine?: number): Promise; + getBuildLogs(project: string, buildId: number): Promise; + getBuildLogsZip(project: string, buildId: number): Promise; + getBuildOptionDefinitions(project?: string): Promise; + createQueue(queue: BuildInterfaces.AgentPoolQueue): Promise; + deleteQueue(id: number): Promise; + getAgentPoolQueue(controllerId: number): Promise; + getQueues(name?: string): Promise; + getBuildReport(project: string, buildId: number, type?: string): Promise; + getBuildReportHtmlContent(project: string, buildId: number, type?: string): Promise; + getResourceUsage(): Promise; + getDefinitionRevisions(project: string, definitionId: number): Promise; + getBuildSettings(): Promise; + updateBuildSettings(settings: BuildInterfaces.BuildSettings): Promise; + addBuildTag(project: string, buildId: number, tag: string): Promise; + addBuildTags(tags: string[], project: string, buildId: number): Promise; + deleteBuildTag(project: string, buildId: number, tag: string): Promise; + getBuildTags(project: string, buildId: number): Promise; + getTags(project: string): Promise; + deleteTemplate(project: string, templateId: string): Promise; + getTemplate(project: string, templateId: string): Promise; + getTemplates(project: string): Promise; + saveTemplate(template: BuildInterfaces.BuildDefinitionTemplate, project: string, templateId: string): Promise; + getBuildTimeline(project: string, buildId: number, timelineId?: string, changeId?: number): Promise; + getBuildWorkItemsRefs(project: string, buildId: number, top?: number): Promise; + getBuildWorkItemsRefsFromCommits(commitIds: string[], project: string, buildId: number, top?: number): Promise; + getWorkItemsBetweenBuilds(project: string, fromBuildId: number, toBuildId: number, top?: number): Promise; + } + export class BuildApi extends basem.ClientApiBase implements IBuildApi { + constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); + /** + * Associates an artifact with a build + * + * @param {BuildInterfaces.BuildArtifact} artifact + * @param {number} buildId + * @param {string} project - Project ID or project name + * @param onResult callback function with the resulting BuildInterfaces.BuildArtifact + */ + createArtifact(artifact: BuildInterfaces.BuildArtifact, buildId: number, project: string, onResult: (err: any, statusCode: number, artifact: BuildInterfaces.BuildArtifact) => void): void; + /** + * Gets a specific artifact for a build + * + * @param {number} buildId + * @param {string} artifactName + * @param {string} project - Project ID or project name + * @param onResult callback function with the resulting BuildInterfaces.BuildArtifact + */ + getArtifact(buildId: number, artifactName: string, project: string, onResult: (err: any, statusCode: number, artifact: BuildInterfaces.BuildArtifact) => void): void; + /** + * Gets a specific artifact for a build + * + * @param {number} buildId + * @param {string} artifactName + * @param {string} project - Project ID or project name + * @param onResult callback function with the resulting ArrayBuffer + */ + getArtifactContentZip(buildId: number, artifactName: string, project: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + /** + * Gets all artifacts for a build + * + * @param {number} buildId + * @param {string} project - Project ID or project name + * @param onResult callback function with the resulting BuildInterfaces.BuildArtifact[] + */ + getArtifacts(buildId: number, project: string, onResult: (err: any, statusCode: number, artifacts: BuildInterfaces.BuildArtifact[]) => void): void; + /** + * @param {string} project + * @param {number} definitionId + * @param {string} branchName + * @param onResult callback function with the resulting string + */ + getBadge(project: string, definitionId: number, branchName: string, onResult: (err: any, statusCode: number, badge: string) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {string} repoType + * @param {string} repoId + * @param {string} branchName + * @param onResult callback function with the resulting BuildInterfaces.BuildBadge + */ + getBuildBadge(project: string, repoType: string, repoId: string, branchName: string, onResult: (err: any, statusCode: number, buildbadge: BuildInterfaces.BuildBadge) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {string} repoType + * @param {string} repoId + * @param {string} branchName + * @param onResult callback function with the resulting string + */ + getBuildBadgeData(project: string, repoType: string, repoId: string, branchName: string, onResult: (err: any, statusCode: number, buildbadge: string) => void): void; + /** + * Deletes a build + * + * @param {number} buildId + * @param {string} project - Project ID or project name + * @param onResult callback function + */ + deleteBuild(buildId: number, project: string, onResult: (err: any, statusCode: number) => void): void; + /** + * Gets a build + * + * @param {number} buildId + * @param {string} project - Project ID or project name + * @param {string} propertyFilters - A comma-delimited list of properties to include in the results + * @param onResult callback function with the resulting BuildInterfaces.Build + */ + getBuild(buildId: number, project: string, propertyFilters: string, onResult: (err: any, statusCode: number, build: BuildInterfaces.Build) => void): void; + /** + * Gets builds + * + * @param {string} project - Project ID or project name + * @param {number[]} definitions - A comma-delimited list of definition ids + * @param {number[]} queues - A comma-delimited list of queue ids + * @param {string} buildNumber + * @param {Date} minFinishTime + * @param {Date} maxFinishTime + * @param {string} requestedFor + * @param {BuildInterfaces.BuildReason} reasonFilter + * @param {BuildInterfaces.BuildStatus} statusFilter + * @param {BuildInterfaces.BuildResult} resultFilter + * @param {string[]} tagFilters - A comma-delimited list of tags + * @param {string[]} properties - A comma-delimited list of properties to include in the results + * @param {BuildInterfaces.DefinitionType} type - The definition type + * @param {number} top - The maximum number of builds to retrieve + * @param {string} continuationToken + * @param {number} maxBuildsPerDefinition + * @param {BuildInterfaces.QueryDeletedOption} deletedFilter + * @param {BuildInterfaces.BuildQueryOrder} queryOrder + * @param {string} branchName + * @param onResult callback function with the resulting BuildInterfaces.Build[] + */ + getBuilds(project: string, definitions: number[], queues: number[], buildNumber: string, minFinishTime: Date, maxFinishTime: Date, requestedFor: string, reasonFilter: BuildInterfaces.BuildReason, statusFilter: BuildInterfaces.BuildStatus, resultFilter: BuildInterfaces.BuildResult, tagFilters: string[], properties: string[], type: BuildInterfaces.DefinitionType, top: number, continuationToken: string, maxBuildsPerDefinition: number, deletedFilter: BuildInterfaces.QueryDeletedOption, queryOrder: BuildInterfaces.BuildQueryOrder, branchName: string, onResult: (err: any, statusCode: number, builds: BuildInterfaces.Build[]) => void): void; + /** + * Queues a build + * + * @param {BuildInterfaces.Build} build + * @param {string} project - Project ID or project name + * @param {boolean} ignoreWarnings + * @param {string} checkInTicket + * @param onResult callback function with the resulting BuildInterfaces.Build + */ + queueBuild(build: BuildInterfaces.Build, project: string, ignoreWarnings: boolean, checkInTicket: string, onResult: (err: any, statusCode: number, build: BuildInterfaces.Build) => void): void; + /** + * Updates a build + * + * @param {BuildInterfaces.Build} build + * @param {number} buildId + * @param {string} project - Project ID or project name + * @param onResult callback function with the resulting BuildInterfaces.Build + */ + updateBuild(build: BuildInterfaces.Build, buildId: number, project: string, onResult: (err: any, statusCode: number, build: BuildInterfaces.Build) => void): void; + /** + * Gets the changes associated with a build + * + * @param {string} project - Project ID or project name + * @param {number} buildId + * @param {string} continuationToken + * @param {number} top - The maximum number of changes to return + * @param {boolean} includeSourceChange + * @param onResult callback function with the resulting BuildInterfaces.Change[] + */ + getBuildChanges(project: string, buildId: number, continuationToken: string, top: number, includeSourceChange: boolean, onResult: (err: any, statusCode: number, changes: BuildInterfaces.Change[]) => void): void; + /** + * Gets the changes associated between given builds + * + * @param {string} project - Project ID or project name + * @param {number} fromBuildId + * @param {number} toBuildId + * @param {number} top - The maximum number of changes to return + * @param onResult callback function with the resulting BuildInterfaces.Change[] + */ + getChangesBetweenBuilds(project: string, fromBuildId: number, toBuildId: number, top: number, onResult: (err: any, statusCode: number, changes: BuildInterfaces.Change[]) => void): void; + /** + * Gets a controller + * + * @param {number} controllerId + * @param onResult callback function with the resulting BuildInterfaces.BuildController + */ + getBuildController(controllerId: number, onResult: (err: any, statusCode: number, Controller: BuildInterfaces.BuildController) => void): void; + /** + * Gets controller, optionally filtered by name + * + * @param {string} name + * @param onResult callback function with the resulting BuildInterfaces.BuildController[] + */ + getBuildControllers(name: string, onResult: (err: any, statusCode: number, Controllers: BuildInterfaces.BuildController[]) => void): void; + /** + * Creates a new definition + * + * @param {BuildInterfaces.BuildDefinition} definition + * @param {string} project - Project ID or project name + * @param {number} definitionToCloneId + * @param {number} definitionToCloneRevision + * @param onResult callback function with the resulting BuildInterfaces.BuildDefinition + */ + createDefinition(definition: BuildInterfaces.BuildDefinition, project: string, definitionToCloneId: number, definitionToCloneRevision: number, onResult: (err: any, statusCode: number, definition: BuildInterfaces.BuildDefinition) => void): void; + /** + * Deletes a definition and all associated builds + * + * @param {number} definitionId + * @param {string} project - Project ID or project name + * @param onResult callback function + */ + deleteDefinition(definitionId: number, project: string, onResult: (err: any, statusCode: number) => void): void; + /** + * Gets a definition, optionally at a specific revision + * + * @param {number} definitionId + * @param {string} project - Project ID or project name + * @param {number} revision + * @param {string[]} propertyFilters + * @param onResult callback function with the resulting BuildInterfaces.DefinitionReference + */ + getDefinition(definitionId: number, project: string, revision: number, propertyFilters: string[], onResult: (err: any, statusCode: number, definition: BuildInterfaces.DefinitionReference) => void): void; + /** + * Gets definitions, optionally filtered by name + * + * @param {string} project - Project ID or project name + * @param {string} name + * @param {BuildInterfaces.DefinitionType} type + * @param {string} repositoryId + * @param {string} repositoryType + * @param {BuildInterfaces.DefinitionQueryOrder} queryOrder + * @param {number} top + * @param {string} continuationToken + * @param onResult callback function with the resulting BuildInterfaces.DefinitionReference[] + */ + getDefinitions(project: string, name: string, type: BuildInterfaces.DefinitionType, repositoryId: string, repositoryType: string, queryOrder: BuildInterfaces.DefinitionQueryOrder, top: number, continuationToken: string, onResult: (err: any, statusCode: number, definitions: BuildInterfaces.DefinitionReference[]) => void): void; + /** + * Updates an existing definition + * + * @param {BuildInterfaces.BuildDefinition} definition + * @param {number} definitionId + * @param {string} project - Project ID or project name + * @param {number} secretsSourceDefinitionId + * @param {number} secretsSourceDefinitionRevision + * @param onResult callback function with the resulting BuildInterfaces.BuildDefinition + */ + updateDefinition(definition: BuildInterfaces.BuildDefinition, definitionId: number, project: string, secretsSourceDefinitionId: number, secretsSourceDefinitionRevision: number, onResult: (err: any, statusCode: number, definition: BuildInterfaces.BuildDefinition) => void): void; + /** + * Gets the deployment information associated with a build + * + * @param {string} project - Project ID or project name + * @param {number} buildId + * @param onResult callback function with the resulting BuildInterfaces.Deployment[] + */ + getBuildDeployments(project: string, buildId: number, onResult: (err: any, statusCode: number, deployments: BuildInterfaces.Deployment[]) => void): void; + /** + * Gets a log + * + * @param {string} project - Project ID or project name + * @param {number} buildId + * @param {number} logId + * @param {number} startLine + * @param {number} endLine + * @param onResult callback function with the resulting ArrayBuffer + */ + getBuildLog(project: string, buildId: number, logId: number, startLine: number, endLine: number, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + /** + * Gets logs for a build + * + * @param {string} project - Project ID or project name + * @param {number} buildId + * @param onResult callback function with the resulting BuildInterfaces.BuildLog[] + */ + getBuildLogs(project: string, buildId: number, onResult: (err: any, statusCode: number, logs: BuildInterfaces.BuildLog[]) => void): void; + /** + * Gets logs for a build + * + * @param {string} project - Project ID or project name + * @param {number} buildId + * @param onResult callback function with the resulting ArrayBuffer + */ + getBuildLogsZip(project: string, buildId: number, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + /** + * @param {string} project - Project ID or project name + * @param onResult callback function with the resulting BuildInterfaces.BuildOptionDefinition[] + */ + getBuildOptionDefinitions(project: string, onResult: (err: any, statusCode: number, options: BuildInterfaces.BuildOptionDefinition[]) => void): void; + /** + * Creates a build queue + * + * @param {BuildInterfaces.AgentPoolQueue} queue + * @param onResult callback function with the resulting BuildInterfaces.AgentPoolQueue + */ + createQueue(queue: BuildInterfaces.AgentPoolQueue, onResult: (err: any, statusCode: number, queue: BuildInterfaces.AgentPoolQueue) => void): void; + /** + * Deletes a build queue + * + * @param {number} id + * @param onResult callback function + */ + deleteQueue(id: number, onResult: (err: any, statusCode: number) => void): void; + /** + * Gets a queue + * + * @param {number} controllerId + * @param onResult callback function with the resulting BuildInterfaces.AgentPoolQueue + */ + getAgentPoolQueue(controllerId: number, onResult: (err: any, statusCode: number, queue: BuildInterfaces.AgentPoolQueue) => void): void; + /** + * Gets queues, optionally filtered by name + * + * @param {string} name + * @param onResult callback function with the resulting BuildInterfaces.AgentPoolQueue[] + */ + getQueues(name: string, onResult: (err: any, statusCode: number, queues: BuildInterfaces.AgentPoolQueue[]) => void): void; + /** + * Gets report for a build + * + * @param {string} project - Project ID or project name + * @param {number} buildId + * @param {string} type + * @param onResult callback function with the resulting BuildInterfaces.BuildReportMetadata + */ + getBuildReport(project: string, buildId: number, type: string, onResult: (err: any, statusCode: number, report: BuildInterfaces.BuildReportMetadata) => void): void; + /** + * Gets report for a build + * + * @param {string} project - Project ID or project name + * @param {number} buildId + * @param {string} type + * @param onResult callback function with the resulting any + */ + getBuildReportHtmlContent(project: string, buildId: number, type: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + /** + * @param onResult callback function with the resulting BuildInterfaces.BuildResourceUsage + */ + getResourceUsage(onResult: (err: any, statusCode: number, ResourceUsage: BuildInterfaces.BuildResourceUsage) => void): void; + /** + * Gets revisions of a definition + * + * @param {string} project - Project ID or project name + * @param {number} definitionId + * @param onResult callback function with the resulting BuildInterfaces.BuildDefinitionRevision[] + */ + getDefinitionRevisions(project: string, definitionId: number, onResult: (err: any, statusCode: number, revisions: BuildInterfaces.BuildDefinitionRevision[]) => void): void; + /** + * @param onResult callback function with the resulting BuildInterfaces.BuildSettings + */ + getBuildSettings(onResult: (err: any, statusCode: number, setting: BuildInterfaces.BuildSettings) => void): void; + /** + * Updates the build settings + * + * @param {BuildInterfaces.BuildSettings} settings + * @param onResult callback function with the resulting BuildInterfaces.BuildSettings + */ + updateBuildSettings(settings: BuildInterfaces.BuildSettings, onResult: (err: any, statusCode: number, setting: BuildInterfaces.BuildSettings) => void): void; + /** + * Adds a tag to a build + * + * @param {string} project - Project ID or project name + * @param {number} buildId + * @param {string} tag + * @param onResult callback function with the resulting string[] + */ + addBuildTag(project: string, buildId: number, tag: string, onResult: (err: any, statusCode: number, tags: string[]) => void): void; + /** + * Adds tag to a build + * + * @param {string[]} tags + * @param {string} project - Project ID or project name + * @param {number} buildId + * @param onResult callback function with the resulting string[] + */ + addBuildTags(tags: string[], project: string, buildId: number, onResult: (err: any, statusCode: number, tags: string[]) => void): void; + /** + * Deletes a tag from a build + * + * @param {string} project - Project ID or project name + * @param {number} buildId + * @param {string} tag + * @param onResult callback function with the resulting string[] + */ + deleteBuildTag(project: string, buildId: number, tag: string, onResult: (err: any, statusCode: number, tags: string[]) => void): void; + /** + * Gets the tags for a build + * + * @param {string} project - Project ID or project name + * @param {number} buildId + * @param onResult callback function with the resulting string[] + */ + getBuildTags(project: string, buildId: number, onResult: (err: any, statusCode: number, tags: string[]) => void): void; + /** + * @param {string} project - Project ID or project name + * @param onResult callback function with the resulting string[] + */ + getTags(project: string, onResult: (err: any, statusCode: number, tags: string[]) => void): void; + /** + * Deletes a definition template + * + * @param {string} project - Project ID or project name + * @param {string} templateId + * @param onResult callback function + */ + deleteTemplate(project: string, templateId: string, onResult: (err: any, statusCode: number) => void): void; + /** + * Gets definition template filtered by id + * + * @param {string} project - Project ID or project name + * @param {string} templateId + * @param onResult callback function with the resulting BuildInterfaces.BuildDefinitionTemplate + */ + getTemplate(project: string, templateId: string, onResult: (err: any, statusCode: number, template: BuildInterfaces.BuildDefinitionTemplate) => void): void; + /** + * @param {string} project - Project ID or project name + * @param onResult callback function with the resulting BuildInterfaces.BuildDefinitionTemplate[] + */ + getTemplates(project: string, onResult: (err: any, statusCode: number, templates: BuildInterfaces.BuildDefinitionTemplate[]) => void): void; + /** + * Saves a definition template + * + * @param {BuildInterfaces.BuildDefinitionTemplate} template + * @param {string} project - Project ID or project name + * @param {string} templateId + * @param onResult callback function with the resulting BuildInterfaces.BuildDefinitionTemplate + */ + saveTemplate(template: BuildInterfaces.BuildDefinitionTemplate, project: string, templateId: string, onResult: (err: any, statusCode: number, template: BuildInterfaces.BuildDefinitionTemplate) => void): void; + /** + * Gets details for a build + * + * @param {string} project - Project ID or project name + * @param {number} buildId + * @param {string} timelineId + * @param {number} changeId + * @param onResult callback function with the resulting BuildInterfaces.Timeline + */ + getBuildTimeline(project: string, buildId: number, timelineId: string, changeId: number, onResult: (err: any, statusCode: number, Timeline: BuildInterfaces.Timeline) => void): void; + /** + * Gets the work item ids associated with a build + * + * @param {string} project - Project ID or project name + * @param {number} buildId + * @param {number} top - The maximum number of workitems to return + * @param onResult callback function with the resulting VSSInterfaces.ResourceRef[] + */ + getBuildWorkItemsRefs(project: string, buildId: number, top: number, onResult: (err: any, statusCode: number, workitems: VSSInterfaces.ResourceRef[]) => void): void; + /** + * Gets the work item ids associated with build commits + * + * @param {string[]} commitIds + * @param {string} project - Project ID or project name + * @param {number} buildId + * @param {number} top - The maximum number of workitems to return, also number of commits to consider if commitids are not sent + * @param onResult callback function with the resulting VSSInterfaces.ResourceRef[] + */ + getBuildWorkItemsRefsFromCommits(commitIds: string[], project: string, buildId: number, top: number, onResult: (err: any, statusCode: number, workitems: VSSInterfaces.ResourceRef[]) => void): void; + /** + * Gets all the work item ids inbetween fromBuildId to toBuildId + * + * @param {string} project - Project ID or project name + * @param {number} fromBuildId + * @param {number} toBuildId + * @param {number} top - The maximum number of workitems to return + * @param onResult callback function with the resulting VSSInterfaces.ResourceRef[] + */ + getWorkItemsBetweenBuilds(project: string, fromBuildId: number, toBuildId: number, top: number, onResult: (err: any, statusCode: number, workitems: VSSInterfaces.ResourceRef[]) => void): void; + } + export class QBuildApi extends basem.QClientApiBase implements IBuildApi { + api: BuildApi; + constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); + /** + * Associates an artifact with a build + * + * @param {BuildInterfaces.BuildArtifact} artifact + * @param {number} buildId + * @param {string} project - Project ID or project name + */ + createArtifact(artifact: BuildInterfaces.BuildArtifact, buildId: number, project?: string): Promise; + /** + * Gets a specific artifact for a build + * + * @param {number} buildId + * @param {string} artifactName + * @param {string} project - Project ID or project name + */ + getArtifact(buildId: number, artifactName: string, project?: string): Promise; + /** + * Gets a specific artifact for a build + * + * @param {number} buildId + * @param {string} artifactName + * @param {string} project - Project ID or project name + */ + getArtifactContentZip(buildId: number, artifactName: string, project?: string): Promise; + /** + * Gets all artifacts for a build + * + * @param {number} buildId + * @param {string} project - Project ID or project name + */ + getArtifacts(buildId: number, project?: string): Promise; + /** + * @param {string} project + * @param {number} definitionId + * @param {string} branchName + */ + getBadge(project: string, definitionId: number, branchName?: string): Promise; + /** + * @param {string} project - Project ID or project name + * @param {string} repoType + * @param {string} repoId + * @param {string} branchName + */ + getBuildBadge(project: string, repoType: string, repoId?: string, branchName?: string): Promise; + /** + * @param {string} project - Project ID or project name + * @param {string} repoType + * @param {string} repoId + * @param {string} branchName + */ + getBuildBadgeData(project: string, repoType: string, repoId?: string, branchName?: string): Promise; + /** + * Deletes a build + * + * @param {number} buildId + * @param {string} project - Project ID or project name + */ + deleteBuild(buildId: number, project?: string): Promise; + /** + * Gets a build + * + * @param {number} buildId + * @param {string} project - Project ID or project name + * @param {string} propertyFilters - A comma-delimited list of properties to include in the results + */ + getBuild(buildId: number, project?: string, propertyFilters?: string): Promise; + /** + * Gets builds + * + * @param {string} project - Project ID or project name + * @param {number[]} definitions - A comma-delimited list of definition ids + * @param {number[]} queues - A comma-delimited list of queue ids + * @param {string} buildNumber + * @param {Date} minFinishTime + * @param {Date} maxFinishTime + * @param {string} requestedFor + * @param {BuildInterfaces.BuildReason} reasonFilter + * @param {BuildInterfaces.BuildStatus} statusFilter + * @param {BuildInterfaces.BuildResult} resultFilter + * @param {string[]} tagFilters - A comma-delimited list of tags + * @param {string[]} properties - A comma-delimited list of properties to include in the results + * @param {BuildInterfaces.DefinitionType} type - The definition type + * @param {number} top - The maximum number of builds to retrieve + * @param {string} continuationToken + * @param {number} maxBuildsPerDefinition + * @param {BuildInterfaces.QueryDeletedOption} deletedFilter + * @param {BuildInterfaces.BuildQueryOrder} queryOrder + * @param {string} branchName + */ + getBuilds(project?: string, definitions?: number[], queues?: number[], buildNumber?: string, minFinishTime?: Date, maxFinishTime?: Date, requestedFor?: string, reasonFilter?: BuildInterfaces.BuildReason, statusFilter?: BuildInterfaces.BuildStatus, resultFilter?: BuildInterfaces.BuildResult, tagFilters?: string[], properties?: string[], type?: BuildInterfaces.DefinitionType, top?: number, continuationToken?: string, maxBuildsPerDefinition?: number, deletedFilter?: BuildInterfaces.QueryDeletedOption, queryOrder?: BuildInterfaces.BuildQueryOrder, branchName?: string): Promise; + /** + * Queues a build + * + * @param {BuildInterfaces.Build} build + * @param {string} project - Project ID or project name + * @param {boolean} ignoreWarnings + * @param {string} checkInTicket + */ + queueBuild(build: BuildInterfaces.Build, project?: string, ignoreWarnings?: boolean, checkInTicket?: string): Promise; + /** + * Updates a build + * + * @param {BuildInterfaces.Build} build + * @param {number} buildId + * @param {string} project - Project ID or project name + */ + updateBuild(build: BuildInterfaces.Build, buildId: number, project?: string): Promise; + /** + * Gets the changes associated with a build + * + * @param {string} project - Project ID or project name + * @param {number} buildId + * @param {string} continuationToken + * @param {number} top - The maximum number of changes to return + * @param {boolean} includeSourceChange + */ + getBuildChanges(project: string, buildId: number, continuationToken?: string, top?: number, includeSourceChange?: boolean): Promise; + /** + * Gets the changes associated between given builds + * + * @param {string} project - Project ID or project name + * @param {number} fromBuildId + * @param {number} toBuildId + * @param {number} top - The maximum number of changes to return + */ + getChangesBetweenBuilds(project: string, fromBuildId?: number, toBuildId?: number, top?: number): Promise; + /** + * Gets a controller + * + * @param {number} controllerId + */ + getBuildController(controllerId: number): Promise; + /** + * Gets controller, optionally filtered by name + * + * @param {string} name + */ + getBuildControllers(name?: string): Promise; + /** + * Creates a new definition + * + * @param {BuildInterfaces.BuildDefinition} definition + * @param {string} project - Project ID or project name + * @param {number} definitionToCloneId + * @param {number} definitionToCloneRevision + */ + createDefinition(definition: BuildInterfaces.BuildDefinition, project?: string, definitionToCloneId?: number, definitionToCloneRevision?: number): Promise; + /** + * Deletes a definition and all associated builds + * + * @param {number} definitionId + * @param {string} project - Project ID or project name + */ + deleteDefinition(definitionId: number, project?: string): Promise; + /** + * Gets a definition, optionally at a specific revision + * + * @param {number} definitionId + * @param {string} project - Project ID or project name + * @param {number} revision + * @param {string[]} propertyFilters + */ + getDefinition(definitionId: number, project?: string, revision?: number, propertyFilters?: string[]): Promise; + /** + * Gets definitions, optionally filtered by name + * + * @param {string} project - Project ID or project name + * @param {string} name + * @param {BuildInterfaces.DefinitionType} type + * @param {string} repositoryId + * @param {string} repositoryType + * @param {BuildInterfaces.DefinitionQueryOrder} queryOrder + * @param {number} top + * @param {string} continuationToken + */ + getDefinitions(project?: string, name?: string, type?: BuildInterfaces.DefinitionType, repositoryId?: string, repositoryType?: string, queryOrder?: BuildInterfaces.DefinitionQueryOrder, top?: number, continuationToken?: string): Promise; + /** + * Updates an existing definition + * + * @param {BuildInterfaces.BuildDefinition} definition + * @param {number} definitionId + * @param {string} project - Project ID or project name + * @param {number} secretsSourceDefinitionId + * @param {number} secretsSourceDefinitionRevision + */ + updateDefinition(definition: BuildInterfaces.BuildDefinition, definitionId: number, project?: string, secretsSourceDefinitionId?: number, secretsSourceDefinitionRevision?: number): Promise; + /** + * Gets the deployment information associated with a build + * + * @param {string} project - Project ID or project name + * @param {number} buildId + */ + getBuildDeployments(project: string, buildId: number): Promise; + /** + * Gets a log + * + * @param {string} project - Project ID or project name + * @param {number} buildId + * @param {number} logId + * @param {number} startLine + * @param {number} endLine + */ + getBuildLog(project: string, buildId: number, logId: number, startLine?: number, endLine?: number): Promise; + /** + * Gets logs for a build + * + * @param {string} project - Project ID or project name + * @param {number} buildId + */ + getBuildLogs(project: string, buildId: number): Promise; + /** + * Gets logs for a build + * + * @param {string} project - Project ID or project name + * @param {number} buildId + */ + getBuildLogsZip(project: string, buildId: number): Promise; + /** + * @param {string} project - Project ID or project name + */ + getBuildOptionDefinitions(project?: string): Promise; + /** + * Creates a build queue + * + * @param {BuildInterfaces.AgentPoolQueue} queue + */ + createQueue(queue: BuildInterfaces.AgentPoolQueue): Promise; + /** + * Deletes a build queue + * + * @param {number} id + */ + deleteQueue(id: number): Promise; + /** + * Gets a queue + * + * @param {number} controllerId + */ + getAgentPoolQueue(controllerId: number): Promise; + /** + * Gets queues, optionally filtered by name + * + * @param {string} name + */ + getQueues(name?: string): Promise; + /** + * Gets report for a build + * + * @param {string} project - Project ID or project name + * @param {number} buildId + * @param {string} type + */ + getBuildReport(project: string, buildId: number, type?: string): Promise; + /** + * Gets report for a build + * + * @param {string} project - Project ID or project name + * @param {number} buildId + * @param {string} type + */ + getBuildReportHtmlContent(project: string, buildId: number, type?: string): Promise; + /** + */ + getResourceUsage(): Promise; + /** + * Gets revisions of a definition + * + * @param {string} project - Project ID or project name + * @param {number} definitionId + */ + getDefinitionRevisions(project: string, definitionId: number): Promise; + /** + */ + getBuildSettings(): Promise; + /** + * Updates the build settings + * + * @param {BuildInterfaces.BuildSettings} settings + */ + updateBuildSettings(settings: BuildInterfaces.BuildSettings): Promise; + /** + * Adds a tag to a build + * + * @param {string} project - Project ID or project name + * @param {number} buildId + * @param {string} tag + */ + addBuildTag(project: string, buildId: number, tag: string): Promise; + /** + * Adds tag to a build + * + * @param {string[]} tags + * @param {string} project - Project ID or project name + * @param {number} buildId + */ + addBuildTags(tags: string[], project: string, buildId: number): Promise; + /** + * Deletes a tag from a build + * + * @param {string} project - Project ID or project name + * @param {number} buildId + * @param {string} tag + */ + deleteBuildTag(project: string, buildId: number, tag: string): Promise; + /** + * Gets the tags for a build + * + * @param {string} project - Project ID or project name + * @param {number} buildId + */ + getBuildTags(project: string, buildId: number): Promise; + /** + * @param {string} project - Project ID or project name + */ + getTags(project: string): Promise; + /** + * Deletes a definition template + * + * @param {string} project - Project ID or project name + * @param {string} templateId + */ + deleteTemplate(project: string, templateId: string): Promise; + /** + * Gets definition template filtered by id + * + * @param {string} project - Project ID or project name + * @param {string} templateId + */ + getTemplate(project: string, templateId: string): Promise; + /** + * @param {string} project - Project ID or project name + */ + getTemplates(project: string): Promise; + /** + * Saves a definition template + * + * @param {BuildInterfaces.BuildDefinitionTemplate} template + * @param {string} project - Project ID or project name + * @param {string} templateId + */ + saveTemplate(template: BuildInterfaces.BuildDefinitionTemplate, project: string, templateId: string): Promise; + /** + * Gets details for a build + * + * @param {string} project - Project ID or project name + * @param {number} buildId + * @param {string} timelineId + * @param {number} changeId + */ + getBuildTimeline(project: string, buildId: number, timelineId?: string, changeId?: number): Promise; + /** + * Gets the work item ids associated with a build + * + * @param {string} project - Project ID or project name + * @param {number} buildId + * @param {number} top - The maximum number of workitems to return + */ + getBuildWorkItemsRefs(project: string, buildId: number, top?: number): Promise; + /** + * Gets the work item ids associated with build commits + * + * @param {string[]} commitIds + * @param {string} project - Project ID or project name + * @param {number} buildId + * @param {number} top - The maximum number of workitems to return, also number of commits to consider if commitids are not sent + */ + getBuildWorkItemsRefsFromCommits(commitIds: string[], project: string, buildId: number, top?: number): Promise; + /** + * Gets all the work item ids inbetween fromBuildId to toBuildId + * + * @param {string} project - Project ID or project name + * @param {number} fromBuildId + * @param {number} toBuildId + * @param {number} top - The maximum number of workitems to return + */ + getWorkItemsBetweenBuilds(project: string, fromBuildId: number, toBuildId: number, top?: number): Promise; + } + +} +declare module 'vso-node-api/interfaces/common/OperationsInterfaces' { + /** + * Reference for an async operation. + */ + export interface OperationReference { + /** + * The identifier for this operation. + */ + id: string; + /** + * The current status of the operation. + */ + status: OperationStatus; + /** + * Url to get the full object. + */ + url: string; + } + export enum OperationStatus { + /** + * The operation object does not have the status set. + */ + NotSet = 0, + /** + * The operation has been queued. + */ + Queued = 1, + /** + * The operation is in progress. + */ + InProgress = 2, + /** + * The operation was cancelled by the user. + */ + Cancelled = 3, + /** + * The operation completed successfully. + */ + Succeeded = 4, + /** + * The operation completed with a failure. + */ + Failed = 5, + } + export var TypeInfo: { + OperationReference: { + fields: any; + }; + OperationStatus: { + enumValues: { + "notSet": number; + "queued": number; + "inProgress": number; + "cancelled": number; + "succeeded": number; + "failed": number; + }; + }; + }; + +} +declare module 'vso-node-api/CoreApi' { + + + import Q = require('q'); + import basem = require('vso-node-api/ClientApiBases'); + import VsoBaseInterfaces = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); + import CoreInterfaces = require('vso-node-api/interfaces/CoreInterfaces'); + import OperationsInterfaces = require('vso-node-api/interfaces/common/OperationsInterfaces'); + import VSSInterfaces = require('vso-node-api/interfaces/common/VSSInterfaces'); + export interface ICoreApi extends basem.ClientApiBase { + createConnectedService(connectedServiceCreationData: CoreInterfaces.WebApiConnectedServiceDetails, projectId: string, onResult: (err: any, statusCode: number, connectedService: CoreInterfaces.WebApiConnectedService) => void): void; + getConnectedServiceDetails(projectId: string, name: string, onResult: (err: any, statusCode: number, connectedService: CoreInterfaces.WebApiConnectedServiceDetails) => void): void; + getConnectedServices(projectId: string, kind: CoreInterfaces.ConnectedServiceKind, onResult: (err: any, statusCode: number, connectedServices: CoreInterfaces.WebApiConnectedService[]) => void): void; + createIdentityMru(mruData: CoreInterfaces.IdentityData, mruName: string, onResult: (err: any, statusCode: number) => void): void; + deleteIdentityMru(mruData: CoreInterfaces.IdentityData, mruName: string, onResult: (err: any, statusCode: number) => void): void; + getIdentityMru(mruName: string, onResult: (err: any, statusCode: number, identityMru: VSSInterfaces.IdentityRef[]) => void): void; + updateIdentityMru(mruData: CoreInterfaces.IdentityData, mruName: string, onResult: (err: any, statusCode: number) => void): void; + getTeamMembers(projectId: string, teamId: string, top: number, skip: number, onResult: (err: any, statusCode: number, members: VSSInterfaces.IdentityRef[]) => void): void; + getProcessById(processId: string, onResult: (err: any, statusCode: number, processe: CoreInterfaces.Process) => void): void; + getProcesses(onResult: (err: any, statusCode: number, processes: CoreInterfaces.Process[]) => void): void; + getProjectCollection(collectionId: string, onResult: (err: any, statusCode: number, projectCollection: CoreInterfaces.TeamProjectCollection) => void): void; + getProjectCollections(top: number, skip: number, onResult: (err: any, statusCode: number, projectCollections: CoreInterfaces.TeamProjectCollectionReference[]) => void): void; + getProjectHistory(minRevision: number, onResult: (err: any, statusCode: number, projectHistory: CoreInterfaces.TeamProjectReference[]) => void): void; + getProject(projectId: string, includeCapabilities: boolean, includeHistory: boolean, onResult: (err: any, statusCode: number, project: CoreInterfaces.TeamProject) => void): void; + getProjects(stateFilter: any, top: number, skip: number, onResult: (err: any, statusCode: number, projects: CoreInterfaces.TeamProjectReference[]) => void): void; + queueCreateProject(projectToCreate: CoreInterfaces.TeamProject, onResult: (err: any, statusCode: number, project: OperationsInterfaces.OperationReference) => void): void; + queueDeleteProject(projectId: string, onResult: (err: any, statusCode: number, project: OperationsInterfaces.OperationReference) => void): void; + updateProject(projectUpdate: CoreInterfaces.TeamProject, projectId: string, onResult: (err: any, statusCode: number, project: OperationsInterfaces.OperationReference) => void): void; + getProxies(proxyUrl: string, onResult: (err: any, statusCode: number, proxies: CoreInterfaces.Proxy[]) => void): void; + createTeam(team: CoreInterfaces.WebApiTeam, projectId: string, onResult: (err: any, statusCode: number, team: CoreInterfaces.WebApiTeam) => void): void; + deleteTeam(projectId: string, teamId: string, onResult: (err: any, statusCode: number) => void): void; + getTeam(projectId: string, teamId: string, onResult: (err: any, statusCode: number, team: CoreInterfaces.WebApiTeam) => void): void; + getTeams(projectId: string, top: number, skip: number, onResult: (err: any, statusCode: number, teams: CoreInterfaces.WebApiTeam[]) => void): void; + updateTeam(teamData: CoreInterfaces.WebApiTeam, projectId: string, teamId: string, onResult: (err: any, statusCode: number, team: CoreInterfaces.WebApiTeam) => void): void; + } + export interface IQCoreApi extends basem.QClientApiBase { + createConnectedService(connectedServiceCreationData: CoreInterfaces.WebApiConnectedServiceDetails, projectId: string): Promise; + getConnectedServiceDetails(projectId: string, name: string): Promise; + getConnectedServices(projectId: string, kind?: CoreInterfaces.ConnectedServiceKind): Promise; + createIdentityMru(mruData: CoreInterfaces.IdentityData, mruName: string): Promise; + deleteIdentityMru(mruData: CoreInterfaces.IdentityData, mruName: string): Promise; + getIdentityMru(mruName: string): Promise; + updateIdentityMru(mruData: CoreInterfaces.IdentityData, mruName: string): Promise; + getTeamMembers(projectId: string, teamId: string, top?: number, skip?: number): Promise; + getProcessById(processId: string): Promise; + getProcesses(): Promise; + getProjectCollection(collectionId: string): Promise; + getProjectCollections(top?: number, skip?: number): Promise; + getProjectHistory(minRevision?: number): Promise; + getProject(projectId: string, includeCapabilities?: boolean, includeHistory?: boolean): Promise; + getProjects(stateFilter?: any, top?: number, skip?: number): Promise; + queueCreateProject(projectToCreate: CoreInterfaces.TeamProject): Promise; + queueDeleteProject(projectId: string): Promise; + updateProject(projectUpdate: CoreInterfaces.TeamProject, projectId: string): Promise; + getProxies(proxyUrl?: string): Promise; + createTeam(team: CoreInterfaces.WebApiTeam, projectId: string): Promise; + deleteTeam(projectId: string, teamId: string): Promise; + getTeam(projectId: string, teamId: string): Promise; + getTeams(projectId: string, top?: number, skip?: number): Promise; + updateTeam(teamData: CoreInterfaces.WebApiTeam, projectId: string, teamId: string): Promise; + } + export class CoreApi extends basem.ClientApiBase implements ICoreApi { + constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); + /** + * @param {CoreInterfaces.WebApiConnectedServiceDetails} connectedServiceCreationData + * @param {string} projectId + * @param onResult callback function with the resulting CoreInterfaces.WebApiConnectedService + */ + createConnectedService(connectedServiceCreationData: CoreInterfaces.WebApiConnectedServiceDetails, projectId: string, onResult: (err: any, statusCode: number, connectedService: CoreInterfaces.WebApiConnectedService) => void): void; + /** + * @param {string} projectId + * @param {string} name + * @param onResult callback function with the resulting CoreInterfaces.WebApiConnectedServiceDetails + */ + getConnectedServiceDetails(projectId: string, name: string, onResult: (err: any, statusCode: number, connectedService: CoreInterfaces.WebApiConnectedServiceDetails) => void): void; + /** + * @param {string} projectId + * @param {CoreInterfaces.ConnectedServiceKind} kind + * @param onResult callback function with the resulting CoreInterfaces.WebApiConnectedService[] + */ + getConnectedServices(projectId: string, kind: CoreInterfaces.ConnectedServiceKind, onResult: (err: any, statusCode: number, connectedServices: CoreInterfaces.WebApiConnectedService[]) => void): void; + /** + * @param {CoreInterfaces.IdentityData} mruData + * @param {string} mruName + * @param onResult callback function + */ + createIdentityMru(mruData: CoreInterfaces.IdentityData, mruName: string, onResult: (err: any, statusCode: number) => void): void; + /** + * @param {CoreInterfaces.IdentityData} mruData + * @param {string} mruName + * @param onResult callback function + */ + deleteIdentityMru(mruData: CoreInterfaces.IdentityData, mruName: string, onResult: (err: any, statusCode: number) => void): void; + /** + * @param {string} mruName + * @param onResult callback function with the resulting VSSInterfaces.IdentityRef[] + */ + getIdentityMru(mruName: string, onResult: (err: any, statusCode: number, identityMru: VSSInterfaces.IdentityRef[]) => void): void; + /** + * @param {CoreInterfaces.IdentityData} mruData + * @param {string} mruName + * @param onResult callback function + */ + updateIdentityMru(mruData: CoreInterfaces.IdentityData, mruName: string, onResult: (err: any, statusCode: number) => void): void; + /** + * @param {string} projectId + * @param {string} teamId + * @param {number} top + * @param {number} skip + * @param onResult callback function with the resulting VSSInterfaces.IdentityRef[] + */ + getTeamMembers(projectId: string, teamId: string, top: number, skip: number, onResult: (err: any, statusCode: number, members: VSSInterfaces.IdentityRef[]) => void): void; + /** + * Retrieve process by id + * + * @param {string} processId + * @param onResult callback function with the resulting CoreInterfaces.Process + */ + getProcessById(processId: string, onResult: (err: any, statusCode: number, processe: CoreInterfaces.Process) => void): void; + /** + * @param onResult callback function with the resulting CoreInterfaces.Process[] + */ + getProcesses(onResult: (err: any, statusCode: number, processes: CoreInterfaces.Process[]) => void): void; + /** + * Get project collection with the specified id or name. + * + * @param {string} collectionId + * @param onResult callback function with the resulting CoreInterfaces.TeamProjectCollection + */ + getProjectCollection(collectionId: string, onResult: (err: any, statusCode: number, projectCollection: CoreInterfaces.TeamProjectCollection) => void): void; + /** + * Get project collection references for this application. + * + * @param {number} top + * @param {number} skip + * @param onResult callback function with the resulting CoreInterfaces.TeamProjectCollectionReference[] + */ + getProjectCollections(top: number, skip: number, onResult: (err: any, statusCode: number, projectCollections: CoreInterfaces.TeamProjectCollectionReference[]) => void): void; + /** + * @param {number} minRevision + * @param onResult callback function with the resulting CoreInterfaces.TeamProjectReference[] + */ + getProjectHistory(minRevision: number, onResult: (err: any, statusCode: number, projectHistory: CoreInterfaces.TeamProjectReference[]) => void): void; + /** + * Get project with the specified id or name, optionally including capabilities. + * + * @param {string} projectId + * @param {boolean} includeCapabilities - Include capabilities (such as source control) in the team project result (default: false). + * @param {boolean} includeHistory - Search within renamed projects (that had such name in the past). + * @param onResult callback function with the resulting CoreInterfaces.TeamProject + */ + getProject(projectId: string, includeCapabilities: boolean, includeHistory: boolean, onResult: (err: any, statusCode: number, project: CoreInterfaces.TeamProject) => void): void; + /** + * Get project references with the specified state + * + * @param {any} stateFilter - Filter on team projects in a specific team project state (default: WellFormed). + * @param {number} top + * @param {number} skip + * @param onResult callback function with the resulting CoreInterfaces.TeamProjectReference[] + */ + getProjects(stateFilter: any, top: number, skip: number, onResult: (err: any, statusCode: number, projects: CoreInterfaces.TeamProjectReference[]) => void): void; + /** + * Queue a project creation. + * + * @param {CoreInterfaces.TeamProject} projectToCreate - The project to create. + * @param onResult callback function with the resulting OperationsInterfaces.OperationReference + */ + queueCreateProject(projectToCreate: CoreInterfaces.TeamProject, onResult: (err: any, statusCode: number, project: OperationsInterfaces.OperationReference) => void): void; + /** + * Queue a project deletion. + * + * @param {string} projectId - The project id of the project to delete. + * @param onResult callback function with the resulting OperationsInterfaces.OperationReference + */ + queueDeleteProject(projectId: string, onResult: (err: any, statusCode: number, project: OperationsInterfaces.OperationReference) => void): void; + /** + * Update an existing project's name, abbreviation, or description. + * + * @param {CoreInterfaces.TeamProject} projectUpdate - The updates for the project. + * @param {string} projectId - The project id of the project to update. + * @param onResult callback function with the resulting OperationsInterfaces.OperationReference + */ + updateProject(projectUpdate: CoreInterfaces.TeamProject, projectId: string, onResult: (err: any, statusCode: number, project: OperationsInterfaces.OperationReference) => void): void; + /** + * @param {string} proxyUrl + * @param onResult callback function with the resulting CoreInterfaces.Proxy[] + */ + getProxies(proxyUrl: string, onResult: (err: any, statusCode: number, proxies: CoreInterfaces.Proxy[]) => void): void; + /** + * Creates a team + * + * @param {CoreInterfaces.WebApiTeam} team - The team data used to create the team. + * @param {string} projectId - The name or id (GUID) of the team project in which to create the team. + * @param onResult callback function with the resulting CoreInterfaces.WebApiTeam + */ + createTeam(team: CoreInterfaces.WebApiTeam, projectId: string, onResult: (err: any, statusCode: number, team: CoreInterfaces.WebApiTeam) => void): void; + /** + * Deletes a team + * + * @param {string} projectId - The name or id (GUID) of the team project containing the team to delete. + * @param {string} teamId - The name of id of the team to delete. + * @param onResult callback function + */ + deleteTeam(projectId: string, teamId: string, onResult: (err: any, statusCode: number) => void): void; + /** + * Gets a team + * + * @param {string} projectId + * @param {string} teamId + * @param onResult callback function with the resulting CoreInterfaces.WebApiTeam + */ + getTeam(projectId: string, teamId: string, onResult: (err: any, statusCode: number, team: CoreInterfaces.WebApiTeam) => void): void; + /** + * @param {string} projectId + * @param {number} top + * @param {number} skip + * @param onResult callback function with the resulting CoreInterfaces.WebApiTeam[] + */ + getTeams(projectId: string, top: number, skip: number, onResult: (err: any, statusCode: number, teams: CoreInterfaces.WebApiTeam[]) => void): void; + /** + * Updates a team's name and/or description + * + * @param {CoreInterfaces.WebApiTeam} teamData + * @param {string} projectId - The name or id (GUID) of the team project containing the team to update. + * @param {string} teamId - The name of id of the team to update. + * @param onResult callback function with the resulting CoreInterfaces.WebApiTeam + */ + updateTeam(teamData: CoreInterfaces.WebApiTeam, projectId: string, teamId: string, onResult: (err: any, statusCode: number, team: CoreInterfaces.WebApiTeam) => void): void; + } + export class QCoreApi extends basem.QClientApiBase implements IQCoreApi { + api: CoreApi; + constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); + /** + * @param {CoreInterfaces.WebApiConnectedServiceDetails} connectedServiceCreationData + * @param {string} projectId + */ + createConnectedService(connectedServiceCreationData: CoreInterfaces.WebApiConnectedServiceDetails, projectId: string): Promise; + /** + * @param {string} projectId + * @param {string} name + */ + getConnectedServiceDetails(projectId: string, name: string): Promise; + /** + * @param {string} projectId + * @param {CoreInterfaces.ConnectedServiceKind} kind + */ + getConnectedServices(projectId: string, kind?: CoreInterfaces.ConnectedServiceKind): Promise; + /** + * @param {CoreInterfaces.IdentityData} mruData + * @param {string} mruName + */ + createIdentityMru(mruData: CoreInterfaces.IdentityData, mruName: string): Promise; + /** + * @param {CoreInterfaces.IdentityData} mruData + * @param {string} mruName + */ + deleteIdentityMru(mruData: CoreInterfaces.IdentityData, mruName: string): Promise; + /** + * @param {string} mruName + */ + getIdentityMru(mruName: string): Promise; + /** + * @param {CoreInterfaces.IdentityData} mruData + * @param {string} mruName + */ + updateIdentityMru(mruData: CoreInterfaces.IdentityData, mruName: string): Promise; + /** + * @param {string} projectId + * @param {string} teamId + * @param {number} top + * @param {number} skip + */ + getTeamMembers(projectId: string, teamId: string, top?: number, skip?: number): Promise; + /** + * Retrieve process by id + * + * @param {string} processId + */ + getProcessById(processId: string): Promise; + /** + */ + getProcesses(): Promise; + /** + * Get project collection with the specified id or name. + * + * @param {string} collectionId + */ + getProjectCollection(collectionId: string): Promise; + /** + * Get project collection references for this application. + * + * @param {number} top + * @param {number} skip + */ + getProjectCollections(top?: number, skip?: number): Promise; + /** + * @param {number} minRevision + */ + getProjectHistory(minRevision?: number): Promise; + /** + * Get project with the specified id or name, optionally including capabilities. + * + * @param {string} projectId + * @param {boolean} includeCapabilities - Include capabilities (such as source control) in the team project result (default: false). + * @param {boolean} includeHistory - Search within renamed projects (that had such name in the past). + */ + getProject(projectId: string, includeCapabilities?: boolean, includeHistory?: boolean): Promise; + /** + * Get project references with the specified state + * + * @param {any} stateFilter - Filter on team projects in a specific team project state (default: WellFormed). + * @param {number} top + * @param {number} skip + */ + getProjects(stateFilter?: any, top?: number, skip?: number): Promise; + /** + * Queue a project creation. + * + * @param {CoreInterfaces.TeamProject} projectToCreate - The project to create. + */ + queueCreateProject(projectToCreate: CoreInterfaces.TeamProject): Promise; + /** + * Queue a project deletion. + * + * @param {string} projectId - The project id of the project to delete. + */ + queueDeleteProject(projectId: string): Promise; + /** + * Update an existing project's name, abbreviation, or description. + * + * @param {CoreInterfaces.TeamProject} projectUpdate - The updates for the project. + * @param {string} projectId - The project id of the project to update. + */ + updateProject(projectUpdate: CoreInterfaces.TeamProject, projectId: string): Promise; + /** + * @param {string} proxyUrl + */ + getProxies(proxyUrl?: string): Promise; + /** + * Creates a team + * + * @param {CoreInterfaces.WebApiTeam} team - The team data used to create the team. + * @param {string} projectId - The name or id (GUID) of the team project in which to create the team. + */ + createTeam(team: CoreInterfaces.WebApiTeam, projectId: string): Promise; + /** + * Deletes a team + * + * @param {string} projectId - The name or id (GUID) of the team project containing the team to delete. + * @param {string} teamId - The name of id of the team to delete. + */ + deleteTeam(projectId: string, teamId: string): Promise; + /** + * Gets a team + * + * @param {string} projectId + * @param {string} teamId + */ + getTeam(projectId: string, teamId: string): Promise; + /** + * @param {string} projectId + * @param {number} top + * @param {number} skip + */ + getTeams(projectId: string, top?: number, skip?: number): Promise; + /** + * Updates a team's name and/or description + * + * @param {CoreInterfaces.WebApiTeam} teamData + * @param {string} projectId - The name or id (GUID) of the team project containing the team to update. + * @param {string} teamId - The name of id of the team to update. + */ + updateTeam(teamData: CoreInterfaces.WebApiTeam, projectId: string, teamId: string): Promise; + } + +} +declare module 'vso-node-api/interfaces/FileContainerInterfaces' { + export enum ContainerItemStatus { + /** + * Item is created. + */ + Created = 1, + /** + * Item is a file pending for upload. + */ + PendingUpload = 2, + } + export enum ContainerItemType { + /** + * Any item type. + */ + Any = 0, + /** + * Item is a folder which can have child items. + */ + Folder = 1, + /** + * Item is a file which is stored in the file service. + */ + File = 2, + } + export enum ContainerOptions { + /** + * No option. + */ + None = 0, + } + /** + * Represents a container that encapsulates a hierarchical file system. + */ + export interface FileContainer { + /** + * Uri of the artifact associated with the container. + */ + artifactUri: string; + /** + * Download Url for the content of this item. + */ + contentLocation: string; + /** + * Owner. + */ + createdBy: string; + /** + * Creation date. + */ + dateCreated: Date; + /** + * Description. + */ + description: string; + /** + * Id. + */ + id: number; + /** + * Location of the item resource. + */ + itemLocation: string; + /** + * Name. + */ + name: string; + /** + * Options the container can have. + */ + options: ContainerOptions; + /** + * Project Id. + */ + scopeIdentifier: string; + /** + * Security token of the artifact associated with the container. + */ + securityToken: string; + /** + * Identifier of the optional encryption key. + */ + signingKeyId: string; + /** + * Total size of the files in bytes. + */ + size: number; + } + /** + * Represents an item in a container. + */ + export interface FileContainerItem { + /** + * Container Id. + */ + containerId: number; + contentId: number[]; + /** + * Download Url for the content of this item. + */ + contentLocation: string; + /** + * Creator. + */ + createdBy: string; + /** + * Creation date. + */ + dateCreated: Date; + /** + * Last modified date. + */ + dateLastModified: Date; + /** + * Encoding of the file. Zero if not a file. + */ + fileEncoding: number; + /** + * Hash value of the file. Null if not a file. + */ + fileHash: number[]; + /** + * Length of the file. Zero if not of a file. + */ + fileLength: number; + /** + * Type of the file. Zero if not a file. + */ + fileType: number; + /** + * Location of the item resource. + */ + itemLocation: string; + /** + * Type of the item: Folder, File or String. + */ + itemType: ContainerItemType; + /** + * Modifier. + */ + lastModifiedBy: string; + /** + * Unique path that identifies the item. + */ + path: string; + /** + * Project Id. + */ + scopeIdentifier: string; + /** + * Status of the item: Created or Pending Upload. + */ + status: ContainerItemStatus; + ticket: string; + } + export var TypeInfo: { + ContainerItemStatus: { + enumValues: { + "created": number; + "pendingUpload": number; + }; + }; + ContainerItemType: { + enumValues: { + "any": number; + "folder": number; + "file": number; + }; + }; + ContainerOptions: { + enumValues: { + "none": number; + }; + }; + FileContainer: { + fields: any; + }; + FileContainerItem: { + fields: any; + }; + }; + +} +declare module 'vso-node-api/FileContainerApiBase' { + + + import Q = require('q'); + import basem = require('vso-node-api/ClientApiBases'); + import VsoBaseInterfaces = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); + import FileContainerInterfaces = require('vso-node-api/interfaces/FileContainerInterfaces'); + import VSSInterfaces = require('vso-node-api/interfaces/common/VSSInterfaces'); + export interface IFileContainerApiBase extends basem.ClientApiBase { + createItems(items: VSSInterfaces.VssJsonCollectionWrapperV, containerId: number, scope: string, onResult: (err: any, statusCode: number, Container: FileContainerInterfaces.FileContainerItem[]) => void): void; + deleteItem(containerId: number, itemPath: string, scope: string, onResult: (err: any, statusCode: number) => void): void; + getContainers(scope: string, artifactUris: string, onResult: (err: any, statusCode: number, Containers: FileContainerInterfaces.FileContainer[]) => void): void; + getItems(containerId: number, scope: string, itemPath: string, metadata: boolean, format: string, downloadFileName: string, includeDownloadTickets: boolean, isShallow: boolean, onResult: (err: any, statusCode: number, Containers: FileContainerInterfaces.FileContainerItem[]) => void): void; + browseItems(container: number, itemPath: string, onResult: (err: any, statusCode: number, Containers: FileContainerInterfaces.FileContainerItem[]) => void): void; + } + export interface IQFileContainerApiBase extends basem.QClientApiBase { + createItems(items: VSSInterfaces.VssJsonCollectionWrapperV, containerId: number, scope?: string): Promise; + deleteItem(containerId: number, itemPath: string, scope?: string): Promise; + getContainers(scope?: string, artifactUris?: string): Promise; + getItems(containerId: number, scope?: string, itemPath?: string, metadata?: boolean, format?: string, downloadFileName?: string, includeDownloadTickets?: boolean, isShallow?: boolean): Promise; + browseItems(container: number, itemPath?: string): Promise; + } + export class FileContainerApiBase extends basem.ClientApiBase implements IFileContainerApiBase { + constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); + /** + * Creates the specified items in in the referenced container. + * + * @param {VSSInterfaces.VssJsonCollectionWrapperV} items + * @param {number} containerId + * @param {string} scope - A guid representing the scope of the container. This is often the project id. + * @param onResult callback function with the resulting FileContainerInterfaces.FileContainerItem[] + */ + createItems(items: VSSInterfaces.VssJsonCollectionWrapperV, containerId: number, scope: string, onResult: (err: any, statusCode: number, Container: FileContainerInterfaces.FileContainerItem[]) => void): void; + /** + * Deletes the specified items in a container. + * + * @param {number} containerId - Container Id. + * @param {string} itemPath - Path to delete. + * @param {string} scope - A guid representing the scope of the container. This is often the project id. + * @param onResult callback function + */ + deleteItem(containerId: number, itemPath: string, scope: string, onResult: (err: any, statusCode: number) => void): void; + /** + * Gets containers filtered by a comma separated list of artifact uris within the same scope, if not specified returns all containers + * + * @param {string} scope - A guid representing the scope of the container. This is often the project id. + * @param {string} artifactUris + * @param onResult callback function with the resulting FileContainerInterfaces.FileContainer[] + */ + getContainers(scope: string, artifactUris: string, onResult: (err: any, statusCode: number, Containers: FileContainerInterfaces.FileContainer[]) => void): void; + /** + * @param {number} containerId + * @param {string} scope + * @param {string} itemPath + * @param {boolean} metadata + * @param {string} format + * @param {string} downloadFileName + * @param {boolean} includeDownloadTickets + * @param {boolean} isShallow + * @param onResult callback function with the resulting FileContainerInterfaces.FileContainerItem[] + */ + getItems(containerId: number, scope: string, itemPath: string, metadata: boolean, format: string, downloadFileName: string, includeDownloadTickets: boolean, isShallow: boolean, onResult: (err: any, statusCode: number, Containers: FileContainerInterfaces.FileContainerItem[]) => void): void; + /** + * Allow browsing of file ,the contentDisposition is inline and Content-Type is determined by FileExtension + * + * @param {number} container + * @param {string} itemPath - The path to the item of interest + * @param onResult callback function with the resulting FileContainerInterfaces.FileContainerItem[] + */ + browseItems(container: number, itemPath: string, onResult: (err: any, statusCode: number, Containers: FileContainerInterfaces.FileContainerItem[]) => void): void; + } + export class QFileContainerApiBase extends basem.QClientApiBase implements IQFileContainerApiBase { + api: FileContainerApiBase; + constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], api: typeof basem.ClientApiBase); + /** + * Creates the specified items in in the referenced container. + * + * @param {VSSInterfaces.VssJsonCollectionWrapperV} items + * @param {number} containerId + * @param {string} scope - A guid representing the scope of the container. This is often the project id. + */ + createItems(items: VSSInterfaces.VssJsonCollectionWrapperV, containerId: number, scope?: string): Promise; + /** + * Deletes the specified items in a container. + * + * @param {number} containerId - Container Id. + * @param {string} itemPath - Path to delete. + * @param {string} scope - A guid representing the scope of the container. This is often the project id. + */ + deleteItem(containerId: number, itemPath: string, scope?: string): Promise; + /** + * Gets containers filtered by a comma separated list of artifact uris within the same scope, if not specified returns all containers + * + * @param {string} scope - A guid representing the scope of the container. This is often the project id. + * @param {string} artifactUris + */ + getContainers(scope?: string, artifactUris?: string): Promise; + /** + * @param {number} containerId + * @param {string} scope + * @param {string} itemPath + * @param {boolean} metadata + * @param {string} format + * @param {string} downloadFileName + * @param {boolean} includeDownloadTickets + * @param {boolean} isShallow + */ + getItems(containerId: number, scope?: string, itemPath?: string, metadata?: boolean, format?: string, downloadFileName?: string, includeDownloadTickets?: boolean, isShallow?: boolean): Promise; + /** + * Allow browsing of file ,the contentDisposition is inline and Content-Type is determined by FileExtension + * + * @param {number} container + * @param {string} itemPath - The path to the item of interest + */ + browseItems(container: number, itemPath?: string): Promise; + } + +} +declare module 'vso-node-api/FileContainerApi' { + + + import Q = require('q'); + import VsoBaseInterfaces = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); + import FileContainerApiBase = require('vso-node-api/FileContainerApiBase'); + import FileContainerInterfaces = require('vso-node-api/interfaces/FileContainerInterfaces'); + export interface IFileContainerApi extends FileContainerApiBase.IFileContainerApiBase { + createItem(contentStream: NodeJS.ReadableStream, uncompressedLength: number, containerId: number, itemPath: string, scope: string, options: any, onResult: (err: any, statusCode: number, Container: FileContainerInterfaces.FileContainerItem) => void): void; + } + export interface IQFileContainerApi extends FileContainerApiBase.IQFileContainerApiBase { + createItem(contentStream: NodeJS.ReadableStream, uncompressedLength: number, containerId: number, itemPath: string, scope: string, options: any): Promise; + } + export class FileContainerApi extends FileContainerApiBase.FileContainerApiBase implements IFileContainerApi { + constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); + createItem(contentStream: NodeJS.ReadableStream, uncompressedLength: number, containerId: number, itemPath: string, scope: string, options: any, onResult: (err: any, statusCode: number, Container: FileContainerInterfaces.FileContainerItem) => void): void; + _createItem(customHeaders: VsoBaseInterfaces.IHeaders, contentStream: NodeJS.ReadableStream, containerId: number, itemPath: string, scope: string, onResult: (err: any, statusCode: number, Container: FileContainerInterfaces.FileContainerItem) => void): void; + } + export class QFileContainerApi extends FileContainerApiBase.QFileContainerApiBase implements IQFileContainerApi { + api: FileContainerApi; + constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); + createItem(contentStream: NodeJS.ReadableStream, uncompressedLength: number, containerId: number, itemPath: string, scope: string, options: any): Promise; + } + +} +declare module 'vso-node-api/interfaces/GalleryInterfaces' { + export enum AcquisitionAssignmentType { + None = 0, + /** + * Just assign for me + */ + Me = 1, + /** + * Assign for all users in the account + */ + All = 2, + } + export interface AcquisitionOperation { + /** + * State of the the AcquisitionOperation for the current user + */ + operationState: AcquisitionOperationState; + /** + * AcquisitionOperationType: install, request, buy, etc... + */ + operationType: AcquisitionOperationType; + /** + * Optional reason to justify current state. Typically used with Disallow state. + */ + reason: string; + } + export enum AcquisitionOperationState { + /** + * Not allowed to use this AcquisitionOperation + */ + Disallow = 0, + /** + * Allowed to use this AcquisitionOperation + */ + Allow = 1, + /** + * Operation has already been completed and is no longer available + */ + Completed = 3, + } + export enum AcquisitionOperationType { + /** + * Not yet used + */ + Get = 0, + /** + * Install this extension into the host provided + */ + Install = 1, + /** + * Buy licenses for this extension and install into the host provided + */ + Buy = 2, + /** + * Not yet used + */ + Try = 3, + /** + * Not yet used + */ + Request = 4, + /** + * No action found + */ + None = 5, + } + /** + * Market item acquisition options (install, buy, etc) for an installation target. + */ + export interface AcquisitionOptions { + /** + * Default Operation for the ItemId in this target + */ + defaultOperation: AcquisitionOperation; + /** + * The item id that this options refer to + */ + itemId: string; + /** + * Operations allowed for the ItemId in this target + */ + operations: AcquisitionOperation[]; + /** + * The target that this options refer to + */ + target: string; + } + export enum ConcernCategory { + General = 1, + Abusive = 2, + Spam = 4, + } + /** + * Contract for handling the extension acquisition process + */ + export interface ExtensionAcquisitionRequest { + /** + * How the item is being assigned + */ + assignmentType: AcquisitionAssignmentType; + /** + * The id of the subscription used for purchase + */ + billingId: string; + /** + * The marketplace id (publisherName.extensionName) for the item + */ + itemId: string; + /** + * The type of operation, such as install, request, purchase + */ + operationType: AcquisitionOperationType; + /** + * Additional properties which can be added to the request. + */ + properties: any; + /** + * How many licenses should be purchased + */ + quantity: number; + /** + * A list of target guids where the item should be acquired (installed, requested, etc.), such as account id + */ + targets: string[]; + } + export interface ExtensionFile { + assetType: string; + contentType: string; + fileId: number; + isDefault: boolean; + isPublic: boolean; + language: string; + shortDescription: string; + source: string; + version: string; + } + /** + * The FilterResult is the set of extensions that matched a particular query filter. + */ + export interface ExtensionFilterResult { + /** + * This is the set of appplications that matched the query filter supplied. + */ + extensions: PublishedExtension[]; + /** + * The PagingToken is returned from a request when more records exist that match the result than were requested or could be returned. A follow-up query with this paging token can be used to retrieve more results. + */ + pagingToken: string; + /** + * This is the additional optional metadata for the given result. E.g. Total count of results which is useful in case of paged results + */ + resultMetadata: ExtensionFilterResultMetadata[]; + } + /** + * ExtensionFilterResultMetadata is one set of metadata for the result e.g. Total count. There can be multiple metadata items for one metadata. + */ + export interface ExtensionFilterResultMetadata { + /** + * The metadata items for the category + */ + metadataItems: MetadataItem[]; + /** + * Defines the category of metadata items + */ + metadataType: string; + } + /** + * Represents the component pieces of an extensions fully qualified name, along with the fully qualified name. + */ + export interface ExtensionIdentifier { + /** + * The ExtensionName component part of the fully qualified ExtensionIdentifier + */ + extensionName: string; + /** + * The PublisherName component part of the fully qualified ExtensionIdentifier + */ + publisherName: string; + } + /** + * Package that will be used to create or update a published extension + */ + export interface ExtensionPackage { + /** + * Base 64 encoded extension package + */ + extensionManifest: string; + } + /** + * Policy with a set of permissions on extension operations + */ + export interface ExtensionPolicy { + /** + * Permissions on 'Install' operation + */ + install: ExtensionPolicyFlags; + /** + * Permission on 'Request' operation + */ + request: ExtensionPolicyFlags; + } + export enum ExtensionPolicyFlags { + /** + * No permission + */ + None = 0, + /** + * Permission on private extensions + */ + Private = 1, + /** + * Permission on public extensions + */ + Public = 2, + /** + * Premission in extensions that are in preview + */ + Preview = 4, + /** + * Premission in relased extensions + */ + Released = 8, + /** + * Permission in 1st party extensions + */ + FirstParty = 16, + /** + * Mask that defines all permissions + */ + All = 31, + } + /** + * An ExtensionQuery is used to search the gallery for a set of extensions that match one of many filter values. + */ + export interface ExtensionQuery { + /** + * When retrieving extensions with a query; frequently the caller only needs a small subset of the assets. The caller may specify a list of asset types that should be returned if the extension contains it. All other assets will not be returned. + */ + assetTypes: string[]; + /** + * Each filter is a unique query and will have matching set of extensions returned from the request. Each result will have the same index in the resulting array that the filter had in the incoming query. + */ + filters: QueryFilter[]; + /** + * The Flags are used to deterine which set of information the caller would like returned for the matched extensions. + */ + flags: ExtensionQueryFlags; + } + export enum ExtensionQueryFilterType { + /** + * The values are used as tags. All tags are treated as "OR" conditions with each other. There may be some value put on the number of matched tags from the query. + */ + Tag = 1, + /** + * The Values are an ExtensionName or fragment that is used to match other extension names. + */ + DisplayName = 2, + /** + * The Filter is one or more tokens that define what scope to return private extensions for. + */ + Private = 3, + /** + * Retrieve a set of extensions based on their id's. The values should be the extension id's encoded as strings. + */ + Id = 4, + /** + * The catgeory is unlike other filters. It is AND'd with the other filters instead of being a seperate query. + */ + Category = 5, + /** + * Certain contribution types may be indexed to allow for query by type. User defined types can't be indexed at the moment. + */ + ContributionType = 6, + /** + * Retrieve an set extension based on the name based identifier. This differs from the internal id (which is being deprecated). + */ + Name = 7, + /** + * The InstallationTarget for an extension defines the target consumer for the extension. This may be something like VS, VSOnline, or VSCode + */ + InstallationTarget = 8, + /** + * Query for featured extensions, no value is allowed when using the query type. + */ + Featured = 9, + /** + * The SearchText provided by the user to search for extensions + */ + SearchText = 10, + } + export enum ExtensionQueryFlags { + /** + * None is used to retrieve only the basic extension details. + */ + None = 0, + /** + * IncludeVersions will return version information for extensions returned + */ + IncludeVersions = 1, + /** + * IncludeFiles will return information about which files were found within the extension that were stored independant of the manifest. When asking for files, versions will be included as well since files are returned as a property of the versions. These files can be retrieved using the path to the file without requiring the entire manifest be downloaded. + */ + IncludeFiles = 2, + /** + * Include the Categories and Tags that were added to the extension definition. + */ + IncludeCategoryAndTags = 4, + /** + * Include the details about which accounts the extension has been shared with if the extesion is a private extension. + */ + IncludeSharedAccounts = 8, + /** + * Include properties associated with versions of the extension + */ + IncludeVersionProperties = 16, + /** + * Excluding non-validated extensions will remove any extension versions that either are in the process of being validated or have failed validation. + */ + ExcludeNonValidated = 32, + /** + * Include the set of installation targets the extension has requested. + */ + IncludeInstallationTargets = 64, + /** + * Include the base uri for assets of this extension + */ + IncludeAssetUri = 128, + /** + * Include the statistics associated with this extension + */ + IncludeStatistics = 256, + /** + * When retrieving versions from a query, only include the latest version of the extensions that matched. This is useful when the caller doesn't need all the published versions. It will save a significant size in the returned payload. + */ + IncludeLatestVersionOnly = 512, + /** + * AllAttributes is designed to be a mask that defines all sub-elements of the extension should be returned. NOTE: This is not actually All flags. This is now locked to the set defined since changing this enum would be a breaking change and would change the behavior of anyone using it. Try not to use this value when making calls to the service, instead be explicit about the options required. + */ + AllAttributes = 479, + } + /** + * This is the set of extensions that matched a supplied query through the filters given. + */ + export interface ExtensionQueryResult { + /** + * For each filter supplied in the query, a filter result will be returned in the query result. + */ + results: ExtensionFilterResult[]; + } + export interface ExtensionShare { + id: string; + name: string; + type: string; + } + export interface ExtensionStatistic { + statisticName: string; + value: number; + } + export enum ExtensionStatisticOperation { + None = 0, + Set = 1, + Increment = 2, + Decrement = 3, + } + export interface ExtensionVersion { + assetUri: string; + files: ExtensionFile[]; + flags: ExtensionVersionFlags; + lastUpdated: Date; + properties: { + key: string; + value: string; + }[]; + validationResultMessage: string; + version: string; + versionDescription: string; + } + export enum ExtensionVersionFlags { + /** + * No flags exist for this version. + */ + None = 0, + /** + * The Validated flag for a version means the extension version has passed validation and can be used.. + */ + Validated = 1, + } + /** + * One condition in a QueryFilter. + */ + export interface FilterCriteria { + filterType: number; + /** + * The value used in the match based on the filter type. + */ + value: string; + } + export interface InstallationTarget { + target: string; + } + /** + * MetadataItem is one value of metadata under a given category of metadata + */ + export interface MetadataItem { + /** + * The count of the metadata item + */ + count: number; + /** + * The name of the metadata item + */ + name: string; + } + export enum PagingDirection { + /** + * Backward will return results from earlier in the resultset. + */ + Backward = 1, + /** + * Forward will return results from later in the resultset. + */ + Forward = 2, + } + export interface PublishedExtension { + categories: string[]; + displayName: string; + extensionId: string; + extensionName: string; + flags: PublishedExtensionFlags; + installationTargets: InstallationTarget[]; + lastUpdated: Date; + longDescription: string; + publisher: PublisherFacts; + sharedWith: ExtensionShare[]; + shortDescription: string; + statistics: ExtensionStatistic[]; + tags: string[]; + versions: ExtensionVersion[]; + } + export enum PublishedExtensionFlags { + /** + * No flags exist for this extension. + */ + None = 0, + /** + * The Disabled flag for an extension means the extension can't be changed and won't be used by consumers. The disabled flag is managed by the service and can't be supplied by the Extension Developers. + */ + Disabled = 1, + /** + * BuiltIn Extension are available to all Tenants. An explicit registration is not required. This attribute is reserved and can't be supplied by Extension Developers. BuiltIn extensions are by definition Public. There is no need to set the public flag for extensions marked BuiltIn. + */ + BuiltIn = 2, + /** + * This extension has been validated by the service. The extension meets the requirements specified. This attribute is reserved and can't be supplied by the Extension Developers. Validation is a process that ensures that all contributions are well formed. They meet the requirements defined by the contribution type they are extending. Note this attribute will be updated asynchronously as the extension is validated by the developer of the contribution type. There will be restricted access to the extension while this process is performed. + */ + Validated = 4, + /** + * Trusted extensions are ones that are given special capabilities. These tend to come from Microsoft and can't be published by the general public. Note: BuiltIn extensions are always trusted. + */ + Trusted = 8, + /** + * This extension registration is public, making its visibilty open to the public. This means all tenants have the ability to install this extension. Without this flag the extension will be private and will need to be shared with the tenants that can install it. + */ + Public = 256, + /** + * This extension has multiple versions active at one time and version discovery should be done usig the defined "Version Discovery" protocol to determine the version available to a specific user or tenant. @TODO: Link to Version Discovery Protocol. + */ + MultiVersion = 512, + /** + * The system flag is reserved, and cant be used by publishers. + */ + System = 1024, + /** + * The Preview flag indicates that the extension is still under preview (not yet of "release" quality). These extensions may be decorated differently in the gallery and may have different policies applied to them. + */ + Preview = 2048, + } + export interface Publisher { + displayName: string; + extensions: PublishedExtension[]; + flags: PublisherFlags; + lastUpdated: Date; + longDescription: string; + publisherId: string; + publisherName: string; + shortDescription: string; + } + /** + * High-level information about the publisher, like id's and names + */ + export interface PublisherFacts { + displayName: string; + flags: PublisherFlags; + publisherId: string; + publisherName: string; + } + /** + * The FilterResult is the set of publishers that matched a particular query filter. + */ + export interface PublisherFilterResult { + /** + * This is the set of appplications that matched the query filter supplied. + */ + publishers: Publisher[]; + } + export enum PublisherFlags { + /** + * This should never be returned, it is used to represent a publisher who's flags havent changed during update calls. + */ + UnChanged = 1073741824, + /** + * No flags exist for this publisher. + */ + None = 0, + /** + * The Disabled flag for a publisher means the publisher can't be changed and won't be used by consumers, this extends to extensions owned by the publisher as well. The disabled flag is managed by the service and can't be supplied by the Extension Developers. + */ + Disabled = 1, + /** + * A verified publisher is one that Microsoft has done some review of and ensured the publisher meets a set of requirements. The requirements to become a verified publisher are not listed here. They can be found in public documentation (TBD). + */ + Verified = 2, + /** + * This is the set of flags that can't be supplied by the developer and is managed by the service itself. + */ + ServiceFlags = 3, + } + export enum PublisherPermissions { + /** + * This gives the bearer the rights to read Publishers and Extensions. + */ + Read = 1, + /** + * This gives the bearer the rights to update, delete, and share Extensions (but not the ability to create them). + */ + UpdateExtension = 2, + /** + * This gives the bearer the rights to create new Publishers at the root of the namespace. + */ + CreatePublisher = 4, + /** + * This gives the bearer the rights to create new Extensions within a publisher. + */ + PublishExtension = 8, + /** + * Admin gives the bearer the rights to manage restricted attributes of Publishers and Extensions. + */ + Admin = 16, + /** + * TrustedPartner gives the bearer the rights to publish a extensions with restricted capabilities. + */ + TrustedPartner = 32, + /** + * PrivateRead is another form of read designed to allow higher privilege accessors the ability to read private extensions. + */ + PrivateRead = 64, + /** + * This gives the bearer the rights to delete any extension. + */ + DeleteExtension = 128, + /** + * This gives the bearer the rights edit the publisher settings. + */ + EditSettings = 256, + /** + * This gives the bearer the rights to see all permissions on the publisher. + */ + ViewPermissions = 512, + /** + * This gives the bearer the rights to assign permissions on the publisher. + */ + ManagePermissions = 1024, + /** + * This gives the bearer the rights to delete the publisher. + */ + DeletePublisher = 2048, + } + /** + * An PublisherQuery is used to search the gallery for a set of publishers that match one of many filter values. + */ + export interface PublisherQuery { + /** + * Each filter is a unique query and will have matching set of publishers returned from the request. Each result will have the same index in the resulting array that the filter had in the incoming query. + */ + filters: QueryFilter[]; + /** + * The Flags are used to deterine which set of information the caller would like returned for the matched publishers. + */ + flags: PublisherQueryFlags; + } + export enum PublisherQueryFilterType { + /** + * The values are used as tags. All tags are treated as "OR" conditions with each other. There may be some value put on the number of matched tags from the query. + */ + Tag = 1, + /** + * The Values are an PublisherName or fragment that is used to match other extension names. + */ + DisplayName = 2, + /** + * The My Query filter is used to retrieve the set of publishers that I have access to publish extesions into. All Values are ignored and the calling user is used as the filter in this case. + */ + My = 3, + } + export enum PublisherQueryFlags { + /** + * None is used to retrieve only the basic publisher details. + */ + None = 0, + /** + * Is used to include a list of basic extension details for all extensions published by the requested publisher. + */ + IncludeExtensions = 1, + } + /** + * This is the set of publishers that matched a supplied query through the filters given. + */ + export interface PublisherQueryResult { + /** + * For each filter supplied in the query, a filter result will be returned in the query result. + */ + results: PublisherFilterResult[]; + } + /** + * A filter used to define a set of extensions to return during a query. + */ + export interface QueryFilter { + /** + * The filter values define the set of values in this query. They are applied based on the QueryFilterType. + */ + criteria: FilterCriteria[]; + /** + * The PagingDirection is applied to a paging token if one exists. If not the direction is ignored, and Forward from the start of the resultset is used. Direction should be left out of the request unless a paging token is used to help prevent future issues. + */ + direction: PagingDirection; + /** + * The page number requested by the user. If not provided 1 is assumed by default. + */ + pageNumber: number; + /** + * The page size defines the number of results the caller wants for this filter. The count can't exceed the overall query size limits. + */ + pageSize: number; + /** + * The paging token is a distinct type of filter and the other filter fields are ignored. The paging token represents the continuation of a previously executed query. The information about where in the result and what fields are being filtered are embeded in the token. + */ + pagingToken: string; + /** + * Defines the type of sorting to be applied on the results. The page slice is cut of the sorted results only. + */ + sortBy: number; + /** + * Defines the order of sorting, 1 for Ascending, 2 for Descending, else default ordering based on the SortBy value + */ + sortOrder: number; + } + export interface Review { + /** + * Unique identifier of a review item + */ + id: number; + /** + * Flag for soft deletion + */ + isDeleted: boolean; + /** + * Version of the product for which review was submitted + */ + productVersion: string; + /** + * Rating procided by the user + */ + rating: number; + /** + * Text description of the review + */ + text: string; + /** + * Title of the review + */ + title: string; + /** + * Time when the review was edited/updated + */ + updatedDate: Date; + /** + * Id of the user who submitted the review + */ + userId: string; + } + export interface ReviewsResult { + /** + * Flag indicating if there are more reviews to be shown (for paging) + */ + hasMoreReviews: boolean; + /** + * List of reviews + */ + reviews: Review[]; + /** + * Count of total review items + */ + totalReviewCount: number; + } + export enum SigningKeyPermissions { + Read = 1, + Write = 2, + } + export enum SortByType { + /** + * The results will be sorted by relevance in case search query is given, if no search query resutls will be provided as is + */ + Relevance = 0, + /** + * The results will be sorted as per Last Updated date of the extensions with recently updated at the top + */ + LastUpdatedDate = 1, + /** + * Results will be sorted Alphabetically as per the title of the extension + */ + Title = 2, + /** + * Results will be sorted Alphabetically as per Publisher title + */ + Publisher = 3, + /** + * Results will be sorted by Install Count + */ + InstallCount = 4, + } + export enum SortOrderType { + /** + * Results will be sorted in the default order as per the sorting type defined. The default varies for each type, e.g. for Relevance, default is Descnding, for Title default is Ascending etc. + */ + Default = 0, + /** + * The results will be sorted in Ascending order + */ + Ascending = 1, + /** + * The results will be sorted in Descending order + */ + Descending = 2, + } + /** + * Represents the extension policy applied to a given user + */ + export interface UserExtensionPolicy { + /** + * User display name that this policy refers to + */ + displayName: string; + /** + * The extension policy applied to the user + */ + permissions: ExtensionPolicy; + /** + * User id that this policy refers to + */ + userId: string; + } + export interface UserReportedConcern { + /** + * Category of the concern + */ + category: ConcernCategory; + /** + * User comment associated with the report + */ + concernText: string; + /** + * Id of the review which was reported + */ + reviewId: number; + /** + * Date the report was submitted + */ + submittedDate: Date; + /** + * Id of the user who reported a review + */ + userId: string; + } + export var TypeInfo: { + AcquisitionAssignmentType: { + enumValues: { + "none": number; + "me": number; + "all": number; + }; + }; + AcquisitionOperation: { + fields: any; + }; + AcquisitionOperationState: { + enumValues: { + "disallow": number; + "allow": number; + "completed": number; + }; + }; + AcquisitionOperationType: { + enumValues: { + "get": number; + "install": number; + "buy": number; + "try": number; + "request": number; + "none": number; + }; + }; + AcquisitionOptions: { + fields: any; + }; + ConcernCategory: { + enumValues: { + "general": number; + "abusive": number; + "spam": number; + }; + }; + ExtensionAcquisitionRequest: { + fields: any; + }; + ExtensionFile: { + fields: any; + }; + ExtensionFilterResult: { + fields: any; + }; + ExtensionFilterResultMetadata: { + fields: any; + }; + ExtensionIdentifier: { + fields: any; + }; + ExtensionPackage: { + fields: any; + }; + ExtensionPolicy: { + fields: any; + }; + ExtensionPolicyFlags: { + enumValues: { + "none": number; + "private": number; + "public": number; + "preview": number; + "released": number; + "firstParty": number; + "all": number; + }; + }; + ExtensionQuery: { + fields: any; + }; + ExtensionQueryFilterType: { + enumValues: { + "tag": number; + "displayName": number; + "private": number; + "id": number; + "category": number; + "contributionType": number; + "name": number; + "installationTarget": number; + "featured": number; + "searchText": number; + }; + }; + ExtensionQueryFlags: { + enumValues: { + "none": number; + "includeVersions": number; + "includeFiles": number; + "includeCategoryAndTags": number; + "includeSharedAccounts": number; + "includeVersionProperties": number; + "excludeNonValidated": number; + "includeInstallationTargets": number; + "includeAssetUri": number; + "includeStatistics": number; + "includeLatestVersionOnly": number; + "allAttributes": number; + }; + }; + ExtensionQueryResult: { + fields: any; + }; + ExtensionShare: { + fields: any; + }; + ExtensionStatistic: { + fields: any; + }; + ExtensionStatisticOperation: { + enumValues: { + "none": number; + "set": number; + "increment": number; + "decrement": number; + }; + }; + ExtensionVersion: { + fields: any; + }; + ExtensionVersionFlags: { + enumValues: { + "none": number; + "validated": number; + }; + }; + FilterCriteria: { + fields: any; + }; + InstallationTarget: { + fields: any; + }; + MetadataItem: { + fields: any; + }; + PagingDirection: { + enumValues: { + "backward": number; + "forward": number; + }; + }; + PublishedExtension: { + fields: any; + }; + PublishedExtensionFlags: { + enumValues: { + "none": number; + "disabled": number; + "builtIn": number; + "validated": number; + "trusted": number; + "public": number; + "multiVersion": number; + "system": number; + "preview": number; + }; + }; + Publisher: { + fields: any; + }; + PublisherFacts: { + fields: any; + }; + PublisherFilterResult: { + fields: any; + }; + PublisherFlags: { + enumValues: { + "unChanged": number; + "none": number; + "disabled": number; + "verified": number; + "serviceFlags": number; + }; + }; + PublisherPermissions: { + enumValues: { + "read": number; + "updateExtension": number; + "createPublisher": number; + "publishExtension": number; + "admin": number; + "trustedPartner": number; + "privateRead": number; + "deleteExtension": number; + "editSettings": number; + "viewPermissions": number; + "managePermissions": number; + "deletePublisher": number; + }; + }; + PublisherQuery: { + fields: any; + }; + PublisherQueryFilterType: { + enumValues: { + "tag": number; + "displayName": number; + "my": number; + }; + }; + PublisherQueryFlags: { + enumValues: { + "none": number; + "includeExtensions": number; + }; + }; + PublisherQueryResult: { + fields: any; + }; + QueryFilter: { + fields: any; + }; + Review: { + fields: any; + }; + ReviewsResult: { + fields: any; + }; + SigningKeyPermissions: { + enumValues: { + "read": number; + "write": number; + }; + }; + SortByType: { + enumValues: { + "relevance": number; + "lastUpdatedDate": number; + "title": number; + "publisher": number; + "installCount": number; + }; + }; + SortOrderType: { + enumValues: { + "default": number; + "ascending": number; + "descending": number; + }; + }; + UserExtensionPolicy: { + fields: any; + }; + UserReportedConcern: { + fields: any; + }; + }; + +} +declare module 'vso-node-api/GalleryApi' { + + + import Q = require('q'); + import basem = require('vso-node-api/ClientApiBases'); + import VsoBaseInterfaces = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); + import GalleryInterfaces = require('vso-node-api/interfaces/GalleryInterfaces'); + export interface IGalleryApi extends basem.ClientApiBase { + shareExtensionById(extensionId: string, accountName: string, onResult: (err: any, statusCode: number) => void): void; + unshareExtensionById(extensionId: string, accountName: string, onResult: (err: any, statusCode: number) => void): void; + shareExtension(publisherName: string, extensionName: string, accountName: string, onResult: (err: any, statusCode: number) => void): void; + unshareExtension(publisherName: string, extensionName: string, accountName: string, onResult: (err: any, statusCode: number) => void): void; + getAcquisitionOptions(itemId: string, installationTarget: string, onResult: (err: any, statusCode: number, acquisitionoption: GalleryInterfaces.AcquisitionOptions) => void): void; + requestAcquisition(acquisitionRequest: GalleryInterfaces.ExtensionAcquisitionRequest, onResult: (err: any, statusCode: number, acquisitionrequest: GalleryInterfaces.ExtensionAcquisitionRequest) => void): void; + getAssetByName(publisherName: string, extensionName: string, version: string, assetType: string, accountToken: string, acceptDefault: boolean, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + getAsset(extensionId: string, version: string, assetType: string, accountToken: string, acceptDefault: boolean, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + getCategories(languages: string, onResult: (err: any, statusCode: number, categories: string[]) => void): void; + getCertificate(publisherName: string, extensionName: string, version: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + queryExtensions(extensionQuery: GalleryInterfaces.ExtensionQuery, accountToken: string, onResult: (err: any, statusCode: number, extensionquery: GalleryInterfaces.ExtensionQueryResult) => void): void; + createExtension(extensionPackage: GalleryInterfaces.ExtensionPackage, onResult: (err: any, statusCode: number, extension: GalleryInterfaces.PublishedExtension) => void): void; + deleteExtensionById(extensionId: string, version: string, onResult: (err: any, statusCode: number) => void): void; + getExtensionById(extensionId: string, version: string, flags: GalleryInterfaces.ExtensionQueryFlags, onResult: (err: any, statusCode: number, extension: GalleryInterfaces.PublishedExtension) => void): void; + updateExtensionById(extensionPackage: GalleryInterfaces.ExtensionPackage, extensionId: string, onResult: (err: any, statusCode: number, extension: GalleryInterfaces.PublishedExtension) => void): void; + createExtensionWithPublisher(extensionPackage: GalleryInterfaces.ExtensionPackage, publisherName: string, onResult: (err: any, statusCode: number, extension: GalleryInterfaces.PublishedExtension) => void): void; + deleteExtension(publisherName: string, extensionName: string, version: string, onResult: (err: any, statusCode: number) => void): void; + getExtension(publisherName: string, extensionName: string, version: string, flags: GalleryInterfaces.ExtensionQueryFlags, accountToken: string, onResult: (err: any, statusCode: number, extension: GalleryInterfaces.PublishedExtension) => void): void; + updateExtension(extensionPackage: GalleryInterfaces.ExtensionPackage, publisherName: string, extensionName: string, onResult: (err: any, statusCode: number, extension: GalleryInterfaces.PublishedExtension) => void): void; + getPackage(publisherName: string, extensionName: string, version: string, accountToken: string, acceptDefault: boolean, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + getAssetWithToken(publisherName: string, extensionName: string, version: string, assetType: string, assetToken: string, accountToken: string, acceptDefault: boolean, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + queryPublishers(publisherQuery: GalleryInterfaces.PublisherQuery, onResult: (err: any, statusCode: number, publisherquery: GalleryInterfaces.PublisherQueryResult) => void): void; + createPublisher(publisher: GalleryInterfaces.Publisher, onResult: (err: any, statusCode: number, publisher: GalleryInterfaces.Publisher) => void): void; + deletePublisher(publisherName: string, onResult: (err: any, statusCode: number) => void): void; + getPublisher(publisherName: string, flags: number, onResult: (err: any, statusCode: number, publisher: GalleryInterfaces.Publisher) => void): void; + updatePublisher(publisher: GalleryInterfaces.Publisher, publisherName: string, onResult: (err: any, statusCode: number, publisher: GalleryInterfaces.Publisher) => void): void; + createReview(review: GalleryInterfaces.Review, extensionId: string, onResult: (err: any, statusCode: number, review: GalleryInterfaces.Review) => void): void; + getReviews(extensionId: string, onResult: (err: any, statusCode: number, review: GalleryInterfaces.ReviewsResult) => void): void; + generateKey(keyType: string, expireCurrentSeconds: number, onResult: (err: any, statusCode: number) => void): void; + getSigningKey(keyType: string, onResult: (err: any, statusCode: number, signingkey: string) => void): void; + } + export interface IGalleryApi extends basem.QClientApiBase { + shareExtensionById(extensionId: string, accountName: string): Promise; + unshareExtensionById(extensionId: string, accountName: string): Promise; + shareExtension(publisherName: string, extensionName: string, accountName: string): Promise; + unshareExtension(publisherName: string, extensionName: string, accountName: string): Promise; + getAcquisitionOptions(itemId: string, installationTarget: string): Promise; + requestAcquisition(acquisitionRequest: GalleryInterfaces.ExtensionAcquisitionRequest): Promise; + getAssetByName(publisherName: string, extensionName: string, version: string, assetType: string, accountToken?: string, acceptDefault?: boolean): Promise; + getAsset(extensionId: string, version: string, assetType: string, accountToken?: string, acceptDefault?: boolean): Promise; + getCategories(languages?: string): Promise; + getCertificate(publisherName: string, extensionName: string, version?: string): Promise; + queryExtensions(extensionQuery: GalleryInterfaces.ExtensionQuery, accountToken?: string): Promise; + createExtension(extensionPackage: GalleryInterfaces.ExtensionPackage): Promise; + deleteExtensionById(extensionId: string, version?: string): Promise; + getExtensionById(extensionId: string, version?: string, flags?: GalleryInterfaces.ExtensionQueryFlags): Promise; + updateExtensionById(extensionPackage: GalleryInterfaces.ExtensionPackage, extensionId: string): Promise; + createExtensionWithPublisher(extensionPackage: GalleryInterfaces.ExtensionPackage, publisherName: string): Promise; + deleteExtension(publisherName: string, extensionName: string, version?: string): Promise; + getExtension(publisherName: string, extensionName: string, version?: string, flags?: GalleryInterfaces.ExtensionQueryFlags, accountToken?: string): Promise; + updateExtension(extensionPackage: GalleryInterfaces.ExtensionPackage, publisherName: string, extensionName: string): Promise; + getPackage(publisherName: string, extensionName: string, version: string, accountToken?: string, acceptDefault?: boolean): Promise; + getAssetWithToken(publisherName: string, extensionName: string, version: string, assetType: string, assetToken?: string, accountToken?: string, acceptDefault?: boolean): Promise; + queryPublishers(publisherQuery: GalleryInterfaces.PublisherQuery): Promise; + createPublisher(publisher: GalleryInterfaces.Publisher): Promise; + deletePublisher(publisherName: string): Promise; + getPublisher(publisherName: string, flags?: number): Promise; + updatePublisher(publisher: GalleryInterfaces.Publisher, publisherName: string): Promise; + createReview(review: GalleryInterfaces.Review, extensionId: string): Promise; + getReviews(extensionId: string): Promise; + generateKey(keyType: string, expireCurrentSeconds?: number): Promise; + getSigningKey(keyType: string): Promise; + } + export class GalleryApi extends basem.ClientApiBase implements IGalleryApi { + constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); + /** + * @param {string} extensionId + * @param {string} accountName + * @param onResult callback function + */ + shareExtensionById(extensionId: string, accountName: string, onResult: (err: any, statusCode: number) => void): void; + /** + * @param {string} extensionId + * @param {string} accountName + * @param onResult callback function + */ + unshareExtensionById(extensionId: string, accountName: string, onResult: (err: any, statusCode: number) => void): void; + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} accountName + * @param onResult callback function + */ + shareExtension(publisherName: string, extensionName: string, accountName: string, onResult: (err: any, statusCode: number) => void): void; + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} accountName + * @param onResult callback function + */ + unshareExtension(publisherName: string, extensionName: string, accountName: string, onResult: (err: any, statusCode: number) => void): void; + /** + * @param {string} itemId + * @param {string} installationTarget + * @param onResult callback function with the resulting GalleryInterfaces.AcquisitionOptions + */ + getAcquisitionOptions(itemId: string, installationTarget: string, onResult: (err: any, statusCode: number, acquisitionoption: GalleryInterfaces.AcquisitionOptions) => void): void; + /** + * @param {GalleryInterfaces.ExtensionAcquisitionRequest} acquisitionRequest + * @param onResult callback function with the resulting GalleryInterfaces.ExtensionAcquisitionRequest + */ + requestAcquisition(acquisitionRequest: GalleryInterfaces.ExtensionAcquisitionRequest, onResult: (err: any, statusCode: number, acquisitionrequest: GalleryInterfaces.ExtensionAcquisitionRequest) => void): void; + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} version + * @param {string} assetType + * @param {string} accountToken + * @param {boolean} acceptDefault + * @param onResult callback function with the resulting ArrayBuffer + */ + getAssetByName(publisherName: string, extensionName: string, version: string, assetType: string, accountToken: string, acceptDefault: boolean, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + /** + * @param {string} extensionId + * @param {string} version + * @param {string} assetType + * @param {string} accountToken + * @param {boolean} acceptDefault + * @param onResult callback function with the resulting ArrayBuffer + */ + getAsset(extensionId: string, version: string, assetType: string, accountToken: string, acceptDefault: boolean, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + /** + * @param {string} languages + * @param onResult callback function with the resulting string[] + */ + getCategories(languages: string, onResult: (err: any, statusCode: number, categories: string[]) => void): void; + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} version + * @param onResult callback function with the resulting ArrayBuffer + */ + getCertificate(publisherName: string, extensionName: string, version: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + /** + * @param {GalleryInterfaces.ExtensionQuery} extensionQuery + * @param {string} accountToken + * @param onResult callback function with the resulting GalleryInterfaces.ExtensionQueryResult + */ + queryExtensions(extensionQuery: GalleryInterfaces.ExtensionQuery, accountToken: string, onResult: (err: any, statusCode: number, extensionquery: GalleryInterfaces.ExtensionQueryResult) => void): void; + /** + * @param {GalleryInterfaces.ExtensionPackage} extensionPackage + * @param onResult callback function with the resulting GalleryInterfaces.PublishedExtension + */ + createExtension(extensionPackage: GalleryInterfaces.ExtensionPackage, onResult: (err: any, statusCode: number, extension: GalleryInterfaces.PublishedExtension) => void): void; + /** + * @param {string} extensionId + * @param {string} version + * @param onResult callback function + */ + deleteExtensionById(extensionId: string, version: string, onResult: (err: any, statusCode: number) => void): void; + /** + * @param {string} extensionId + * @param {string} version + * @param {GalleryInterfaces.ExtensionQueryFlags} flags + * @param onResult callback function with the resulting GalleryInterfaces.PublishedExtension + */ + getExtensionById(extensionId: string, version: string, flags: GalleryInterfaces.ExtensionQueryFlags, onResult: (err: any, statusCode: number, extension: GalleryInterfaces.PublishedExtension) => void): void; + /** + * @param {GalleryInterfaces.ExtensionPackage} extensionPackage + * @param {string} extensionId + * @param onResult callback function with the resulting GalleryInterfaces.PublishedExtension + */ + updateExtensionById(extensionPackage: GalleryInterfaces.ExtensionPackage, extensionId: string, onResult: (err: any, statusCode: number, extension: GalleryInterfaces.PublishedExtension) => void): void; + /** + * @param {GalleryInterfaces.ExtensionPackage} extensionPackage + * @param {string} publisherName + * @param onResult callback function with the resulting GalleryInterfaces.PublishedExtension + */ + createExtensionWithPublisher(extensionPackage: GalleryInterfaces.ExtensionPackage, publisherName: string, onResult: (err: any, statusCode: number, extension: GalleryInterfaces.PublishedExtension) => void): void; + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} version + * @param onResult callback function + */ + deleteExtension(publisherName: string, extensionName: string, version: string, onResult: (err: any, statusCode: number) => void): void; + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} version + * @param {GalleryInterfaces.ExtensionQueryFlags} flags + * @param {string} accountToken + * @param onResult callback function with the resulting GalleryInterfaces.PublishedExtension + */ + getExtension(publisherName: string, extensionName: string, version: string, flags: GalleryInterfaces.ExtensionQueryFlags, accountToken: string, onResult: (err: any, statusCode: number, extension: GalleryInterfaces.PublishedExtension) => void): void; + /** + * @param {GalleryInterfaces.ExtensionPackage} extensionPackage + * @param {string} publisherName + * @param {string} extensionName + * @param onResult callback function with the resulting GalleryInterfaces.PublishedExtension + */ + updateExtension(extensionPackage: GalleryInterfaces.ExtensionPackage, publisherName: string, extensionName: string, onResult: (err: any, statusCode: number, extension: GalleryInterfaces.PublishedExtension) => void): void; + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} version + * @param {string} accountToken + * @param {boolean} acceptDefault + * @param onResult callback function with the resulting ArrayBuffer + */ + getPackage(publisherName: string, extensionName: string, version: string, accountToken: string, acceptDefault: boolean, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} version + * @param {string} assetType + * @param {string} assetToken + * @param {string} accountToken + * @param {boolean} acceptDefault + * @param onResult callback function with the resulting ArrayBuffer + */ + getAssetWithToken(publisherName: string, extensionName: string, version: string, assetType: string, assetToken: string, accountToken: string, acceptDefault: boolean, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + /** + * @param {GalleryInterfaces.PublisherQuery} publisherQuery + * @param onResult callback function with the resulting GalleryInterfaces.PublisherQueryResult + */ + queryPublishers(publisherQuery: GalleryInterfaces.PublisherQuery, onResult: (err: any, statusCode: number, publisherquery: GalleryInterfaces.PublisherQueryResult) => void): void; + /** + * @param {GalleryInterfaces.Publisher} publisher + * @param onResult callback function with the resulting GalleryInterfaces.Publisher + */ + createPublisher(publisher: GalleryInterfaces.Publisher, onResult: (err: any, statusCode: number, publisher: GalleryInterfaces.Publisher) => void): void; + /** + * @param {string} publisherName + * @param onResult callback function + */ + deletePublisher(publisherName: string, onResult: (err: any, statusCode: number) => void): void; + /** + * @param {string} publisherName + * @param {number} flags + * @param onResult callback function with the resulting GalleryInterfaces.Publisher + */ + getPublisher(publisherName: string, flags: number, onResult: (err: any, statusCode: number, publisher: GalleryInterfaces.Publisher) => void): void; + /** + * @param {GalleryInterfaces.Publisher} publisher + * @param {string} publisherName + * @param onResult callback function with the resulting GalleryInterfaces.Publisher + */ + updatePublisher(publisher: GalleryInterfaces.Publisher, publisherName: string, onResult: (err: any, statusCode: number, publisher: GalleryInterfaces.Publisher) => void): void; + /** + * Creates a new review item + * + * @param {GalleryInterfaces.Review} review - Contains details about the review item to be created like rating, reviewText, productId + * @param {string} extensionId + * @param onResult callback function with the resulting GalleryInterfaces.Review + */ + createReview(review: GalleryInterfaces.Review, extensionId: string, onResult: (err: any, statusCode: number, review: GalleryInterfaces.Review) => void): void; + /** + * Returns all reviews associated with a product + * + * @param {string} extensionId - Guid of the extension whose reviews need to be retrieved + * @param onResult callback function with the resulting GalleryInterfaces.ReviewsResult + */ + getReviews(extensionId: string, onResult: (err: any, statusCode: number, review: GalleryInterfaces.ReviewsResult) => void): void; + /** + * @param {string} keyType + * @param {number} expireCurrentSeconds + * @param onResult callback function + */ + generateKey(keyType: string, expireCurrentSeconds: number, onResult: (err: any, statusCode: number) => void): void; + /** + * @param {string} keyType + * @param onResult callback function with the resulting string + */ + getSigningKey(keyType: string, onResult: (err: any, statusCode: number, signingkey: string) => void): void; + } + export class QGalleryApi extends basem.QClientApiBase implements IGalleryApi { + api: GalleryApi; + constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); + /** + * @param {string} extensionId + * @param {string} accountName + */ + shareExtensionById(extensionId: string, accountName: string): Promise; + /** + * @param {string} extensionId + * @param {string} accountName + */ + unshareExtensionById(extensionId: string, accountName: string): Promise; + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} accountName + */ + shareExtension(publisherName: string, extensionName: string, accountName: string): Promise; + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} accountName + */ + unshareExtension(publisherName: string, extensionName: string, accountName: string): Promise; + /** + * @param {string} itemId + * @param {string} installationTarget + */ + getAcquisitionOptions(itemId: string, installationTarget: string): Promise; + /** + * @param {GalleryInterfaces.ExtensionAcquisitionRequest} acquisitionRequest + */ + requestAcquisition(acquisitionRequest: GalleryInterfaces.ExtensionAcquisitionRequest): Promise; + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} version + * @param {string} assetType + * @param {string} accountToken + * @param {boolean} acceptDefault + */ + getAssetByName(publisherName: string, extensionName: string, version: string, assetType: string, accountToken?: string, acceptDefault?: boolean): Promise; + /** + * @param {string} extensionId + * @param {string} version + * @param {string} assetType + * @param {string} accountToken + * @param {boolean} acceptDefault + */ + getAsset(extensionId: string, version: string, assetType: string, accountToken?: string, acceptDefault?: boolean): Promise; + /** + * @param {string} languages + */ + getCategories(languages?: string): Promise; + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} version + */ + getCertificate(publisherName: string, extensionName: string, version?: string): Promise; + /** + * @param {GalleryInterfaces.ExtensionQuery} extensionQuery + * @param {string} accountToken + */ + queryExtensions(extensionQuery: GalleryInterfaces.ExtensionQuery, accountToken?: string): Promise; + /** + * @param {GalleryInterfaces.ExtensionPackage} extensionPackage + */ + createExtension(extensionPackage: GalleryInterfaces.ExtensionPackage): Promise; + /** + * @param {string} extensionId + * @param {string} version + */ + deleteExtensionById(extensionId: string, version?: string): Promise; + /** + * @param {string} extensionId + * @param {string} version + * @param {GalleryInterfaces.ExtensionQueryFlags} flags + */ + getExtensionById(extensionId: string, version?: string, flags?: GalleryInterfaces.ExtensionQueryFlags): Promise; + /** + * @param {GalleryInterfaces.ExtensionPackage} extensionPackage + * @param {string} extensionId + */ + updateExtensionById(extensionPackage: GalleryInterfaces.ExtensionPackage, extensionId: string): Promise; + /** + * @param {GalleryInterfaces.ExtensionPackage} extensionPackage + * @param {string} publisherName + */ + createExtensionWithPublisher(extensionPackage: GalleryInterfaces.ExtensionPackage, publisherName: string): Promise; + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} version + */ + deleteExtension(publisherName: string, extensionName: string, version?: string): Promise; + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} version + * @param {GalleryInterfaces.ExtensionQueryFlags} flags + * @param {string} accountToken + */ + getExtension(publisherName: string, extensionName: string, version?: string, flags?: GalleryInterfaces.ExtensionQueryFlags, accountToken?: string): Promise; + /** + * @param {GalleryInterfaces.ExtensionPackage} extensionPackage + * @param {string} publisherName + * @param {string} extensionName + */ + updateExtension(extensionPackage: GalleryInterfaces.ExtensionPackage, publisherName: string, extensionName: string): Promise; + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} version + * @param {string} accountToken + * @param {boolean} acceptDefault + */ + getPackage(publisherName: string, extensionName: string, version: string, accountToken?: string, acceptDefault?: boolean): Promise; + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} version + * @param {string} assetType + * @param {string} assetToken + * @param {string} accountToken + * @param {boolean} acceptDefault + */ + getAssetWithToken(publisherName: string, extensionName: string, version: string, assetType: string, assetToken?: string, accountToken?: string, acceptDefault?: boolean): Promise; + /** + * @param {GalleryInterfaces.PublisherQuery} publisherQuery + */ + queryPublishers(publisherQuery: GalleryInterfaces.PublisherQuery): Promise; + /** + * @param {GalleryInterfaces.Publisher} publisher + */ + createPublisher(publisher: GalleryInterfaces.Publisher): Promise; + /** + * @param {string} publisherName + */ + deletePublisher(publisherName: string): Promise; + /** + * @param {string} publisherName + * @param {number} flags + */ + getPublisher(publisherName: string, flags?: number): Promise; + /** + * @param {GalleryInterfaces.Publisher} publisher + * @param {string} publisherName + */ + updatePublisher(publisher: GalleryInterfaces.Publisher, publisherName: string): Promise; + /** + * Creates a new review item + * + * @param {GalleryInterfaces.Review} review - Contains details about the review item to be created like rating, reviewText, productId + * @param {string} extensionId + */ + createReview(review: GalleryInterfaces.Review, extensionId: string): Promise; + /** + * Returns all reviews associated with a product + * + * @param {string} extensionId - Guid of the extension whose reviews need to be retrieved + */ + getReviews(extensionId: string): Promise; + /** + * @param {string} keyType + * @param {number} expireCurrentSeconds + */ + generateKey(keyType: string, expireCurrentSeconds?: number): Promise; + /** + * @param {string} keyType + */ + getSigningKey(keyType: string): Promise; + } + +} +declare module 'vso-node-api/interfaces/GitInterfaces' { + import TfsCoreInterfaces = require('vso-node-api/interfaces/CoreInterfaces'); + import VSSInterfaces = require('vso-node-api/interfaces/common/VSSInterfaces'); + export interface AssociatedWorkItem { + assignedTo: string; + id: number; + state: string; + title: string; + /** + * REST url + */ + url: string; + webUrl: string; + workItemType: string; + } + export interface Change { + changeType: VersionControlChangeType; + item: T; + newContent: ItemContent; + sourceServerItem: string; + url: string; + } + export interface ChangeCountDictionary { + } + export interface ChangeList { + allChangesIncluded: boolean; + changeCounts: { + [key: number]: number; + }; + changes: Change[]; + comment: string; + commentTruncated: boolean; + creationDate: Date; + notes: CheckinNote[]; + owner: string; + ownerDisplayName: string; + ownerId: string; + sortDate: Date; + version: string; + } + /** + * Criteria used in a search for change lists + */ + export interface ChangeListSearchCriteria { + /** + * If provided, a version descriptor to compare against base + */ + compareVersion: string; + /** + * If true, don't include delete history entries + */ + excludeDeletes: boolean; + /** + * Whether or not to follow renames for the given item being queried + */ + followRenames: boolean; + /** + * If provided, only include history entries created after this date (string) + */ + fromDate: string; + /** + * If provided, a version descriptor for the earliest change list to include + */ + fromVersion: string; + /** + * Path of item to search under + */ + itemPath: string; + /** + * Version of the items to search + */ + itemVersion: string; + /** + * Number of results to skip (used when clicking more...) + */ + skip: number; + /** + * If provided, only include history entries created before this date (string) + */ + toDate: string; + /** + * If provided, the maximum number of history entries to return + */ + top: number; + /** + * If provided, a version descriptor for the latest change list to include + */ + toVersion: string; + /** + * Alias or display name of user who made the changes + */ + user: string; + } + export interface CheckinNote { + name: string; + value: string; + } + export interface FileContentMetadata { + contentType: string; + encoding: number; + extension: string; + fileName: string; + isBinary: boolean; + isImage: boolean; + vsLink: string; + } + export interface GitBaseVersionDescriptor extends GitVersionDescriptor { + /** + * Version string identifier (name of tag/branch, SHA1 of commit) + */ + baseVersion: string; + /** + * Version options - Specify additional modifiers to version (e.g Previous) + */ + baseVersionOptions: GitVersionOptions; + /** + * Version type (branch, tag, or commit). Determines how Id is interpreted + */ + baseVersionType: GitVersionType; + } + export interface GitBlobRef { + _links: any; + /** + * SHA1 hash of git object + */ + objectId: string; + /** + * Size of blob content (in bytes) + */ + size: number; + url: string; + } + export interface GitBranchStats { + aheadCount: number; + behindCount: number; + commit: GitCommitRef; + isBaseVersion: boolean; + name: string; + } + export interface GitChange extends Change { + } + export interface GitCommit extends GitCommitRef { + push: GitPushRef; + treeId: string; + } + export interface GitCommitChanges { + changeCounts: ChangeCountDictionary; + changes: GitChange[]; + } + export interface GitCommitDiffs { + aheadCount: number; + allChangesIncluded: boolean; + baseCommit: string; + behindCount: number; + changeCounts: { + [key: number]: number; + }; + changes: GitChange[]; + commonCommit: string; + targetCommit: string; + } + export interface GitCommitRef { + _links: any; + author: GitUserDate; + changeCounts: ChangeCountDictionary; + changes: GitChange[]; + comment: string; + commentTruncated: boolean; + commitId: string; + committer: GitUserDate; + parents: string[]; + remoteUrl: string; + url: string; + } + export interface GitCommitToCreate { + baseRef: GitRef; + comment: string; + pathActions: GitPathAction[]; + } + export interface GitDeletedRepository { + createdDate: Date; + deletedBy: VSSInterfaces.IdentityRef; + deletedDate: Date; + id: string; + name: string; + project: TfsCoreInterfaces.TeamProjectReference; + } + export interface GitHistoryQueryResults extends HistoryQueryResults { + /** + * Seed commit used for querying history. Used for skip feature. + */ + startingCommitId: string; + unpopulatedCount: number; + unprocessedCount: number; + } + export interface GitItem extends ItemModel { + /** + * SHA1 of commit item was fetched at + */ + commitId: string; + /** + * Type of object (Commit, Tree, Blob, Tag, ...) + */ + gitObjectType: GitObjectType; + /** + * Shallow ref to commit that last changed this item Only populated if latestProcessedChange is requested May not be accurate if latest change is not yet cached + */ + latestProcessedChange: GitCommitRef; + /** + * Git object id + */ + objectId: string; + /** + * Git object id + */ + originalObjectId: string; + } + export interface GitItemDescriptor { + /** + * Path to item + */ + path: string; + /** + * Specifies whether to include children (OneLevel), all descendants (Full), or None + */ + recursionLevel: VersionControlRecursionType; + /** + * Version string (interpretation based on VersionType defined in subclass + */ + version: string; + /** + * Version modifiers (e.g. previous) + */ + versionOptions: GitVersionOptions; + /** + * How to interpret version (branch,tag,commit) + */ + versionType: GitVersionType; + } + export interface GitItemRequestData { + /** + * Whether to include metadata for all items + */ + includeContentMetadata: boolean; + /** + * Whether to include the _links field on the shallow references + */ + includeLinks: boolean; + /** + * Collection of items to fetch, including path, version, and recursion level + */ + itemDescriptors: GitItemDescriptor[]; + /** + * Whether to include shallow ref to commit that last changed each item + */ + latestProcessedChange: boolean; + } + export enum GitObjectType { + Bad = 0, + Commit = 1, + Tree = 2, + Blob = 3, + Tag = 4, + Ext2 = 5, + OfsDelta = 6, + RefDelta = 7, + } + export interface GitPathAction { + action: GitPathActions; + base64Content: string; + path: string; + rawTextContent: string; + targetPath: string; + } + export enum GitPathActions { + None = 0, + Edit = 1, + Delete = 2, + Add = 3, + Rename = 4, + } + export enum GitPermissionScope { + Project = 0, + Repository = 1, + Branch = 2, + } + export interface GitPullRequest { + _links: any; + closedDate: Date; + codeReviewId: number; + commits: GitCommitRef[]; + completionOptions: GitPullRequestCompletionOptions; + completionQueueTime: Date; + createdBy: VSSInterfaces.IdentityRef; + creationDate: Date; + description: string; + lastMergeCommit: GitCommitRef; + lastMergeSourceCommit: GitCommitRef; + lastMergeTargetCommit: GitCommitRef; + mergeId: string; + mergeStatus: PullRequestAsyncStatus; + pullRequestId: number; + remoteUrl: string; + repository: GitRepository; + reviewers: IdentityRefWithVote[]; + sourceRefName: string; + status: PullRequestStatus; + targetRefName: string; + title: string; + upgraded: boolean; + url: string; + workItemRefs: VSSInterfaces.ResourceRef[]; + } + export interface GitPullRequestCompletionOptions { + deleteSourceBranch: boolean; + mergeCommitMessage: string; + squashMerge: boolean; + } + export interface GitPullRequestSearchCriteria { + creatorId: string; + /** + * Whether to include the _links field on the shallow references + */ + includeLinks: boolean; + repositoryId: string; + reviewerId: string; + sourceRefName: string; + status: PullRequestStatus; + targetRefName: string; + } + export interface GitPush extends GitPushRef { + commits: GitCommitRef[]; + refUpdates: GitRefUpdate[]; + repository: GitRepository; + } + export interface GitPushEventData { + afterId: string; + beforeId: string; + branch: string; + commits: GitCommit[]; + repository: GitRepository; + } + export interface GitPushRef { + _links: any; + date: Date; + pushCorrelationId: string; + pushedBy: VSSInterfaces.IdentityRef; + pushId: number; + url: string; + } + export interface GitPushSearchCriteria { + fromDate: Date; + /** + * Whether to include the _links field on the shallow references + */ + includeLinks: boolean; + includeRefUpdates: boolean; + pusherId: string; + refName: string; + toDate: Date; + } + export interface GitQueryCommitsCriteria { + /** + * Number of entries to skip + */ + $skip: number; + /** + * Maximum number of entries to retrieve + */ + $top: number; + /** + * Alias or display name of the author + */ + author: string; + /** + * If provided, the earliest commit in the graph to search + */ + compareVersion: GitVersionDescriptor; + /** + * If true, don't include delete history entries + */ + excludeDeletes: boolean; + /** + * If provided, a lower bound for filtering commits alphabetically + */ + fromCommitId: string; + /** + * If provided, only include history entries created after this date (string) + */ + fromDate: string; + /** + * If provided, specifies the exact commit ids of the commits to fetch. May not be combined with other parameters. + */ + ids: string[]; + /** + * Whether to include the _links field on the shallow references + */ + includeLinks: boolean; + /** + * Path of item to search under + */ + itemPath: string; + /** + * If provided, identifies the commit or branch to search + */ + itemVersion: GitVersionDescriptor; + /** + * If provided, an upper bound for filtering commits alphabetically + */ + toCommitId: string; + /** + * If provided, only include history entries created before this date (string) + */ + toDate: string; + /** + * Alias or display name of the committer + */ + user: string; + } + export interface GitRef { + _links: any; + isLockedBy: VSSInterfaces.IdentityRef; + name: string; + objectId: string; + statuses: GitStatus[]; + url: string; + } + export interface GitRefUpdate { + name: string; + newObjectId: string; + oldObjectId: string; + repositoryId: string; + } + export enum GitRefUpdateMode { + /** + * Indicates the Git protocol model where any refs that can be updated will be updated, but any failures will not prevent other updates from succeeding. + */ + BestEffort = 0, + /** + * Indicates that all ref updates must succeed or none will succeed. All ref updates will be atomically written. If any failure is encountered, previously successful updates will be rolled back and the entire operation will fail. + */ + AllOrNone = 1, + } + export interface GitRefUpdateResult { + /** + * Custom message for the result object For instance, Reason for failing. + */ + customMessage: string; + /** + * Ref name + */ + name: string; + /** + * New object ID + */ + newObjectId: string; + /** + * Old object ID + */ + oldObjectId: string; + /** + * Name of the plugin that rejected the updated. + */ + rejectedBy: string; + /** + * Repository ID + */ + repositoryId: string; + /** + * True if the ref update succeeded, false otherwise + */ + success: boolean; + /** + * Status of the update from the TFS server. + */ + updateStatus: GitRefUpdateStatus; + } + export interface GitRefUpdateResultSet { + countFailed: number; + countSucceeded: number; + pushCorrelationId: string; + pushIds: { + [key: string]: number; + }; + pushTime: Date; + results: GitRefUpdateResult[]; + } + export enum GitRefUpdateStatus { + /** + * Indicates that the ref update request was completed successfully. + */ + Succeeded = 0, + /** + * Indicates that the ref update request could not be completed because part of the graph would be disconnected by this change, and the caller does not have ForcePush permission on the repository. + */ + ForcePushRequired = 1, + /** + * Indicates that the ref update request could not be completed because the old object ID presented in the request was not the object ID of the ref when the database attempted the update. The most likely scenario is that the caller lost a race to update the ref. + */ + StaleOldObjectId = 2, + /** + * Indicates that the ref update request could not be completed because the ref name presented in the request was not valid. + */ + InvalidRefName = 3, + /** + * The request was not processed + */ + Unprocessed = 4, + /** + * The ref update request could not be completed because the new object ID for the ref could not be resolved to a commit object (potentially through any number of tags) + */ + UnresolvableToCommit = 5, + /** + * The ref update request could not be completed because the user lacks write permissions required to write this ref + */ + WritePermissionRequired = 6, + /** + * The ref update request could not be completed because the user lacks note creation permissions required to write this note + */ + ManageNotePermissionRequired = 7, + /** + * The ref update request could not be completed because the user lacks the permission to create a branch + */ + CreateBranchPermissionRequired = 8, + /** + * The ref update request could not be completed because the user lacks the permission to create a tag + */ + CreateTagPermissionRequired = 9, + /** + * The ref update could not be completed because it was rejected by the plugin. + */ + RejectedByPlugin = 10, + /** + * The ref update could not be completed because the ref is locked by another user. + */ + Locked = 11, + /** + * The ref update could not be completed because, in case-insensitive mode, the ref name conflicts with an existing, differently-cased ref name. + */ + RefNameConflict = 12, + /** + * The ref update could not be completed because it was rejected by policy. + */ + RejectedByPolicy = 13, + /** + * Indicates that the ref update request was completed successfully, but the ref doesn't actually exist so no changes were made. This should only happen during deletes. + */ + SucceededNonExistentRef = 14, + /** + * Indicates that the ref update request was completed successfully, but the passed-in ref was corrupt - as in, the old object ID was bad. This should only happen during deletes. + */ + SucceededCorruptRef = 15, + } + export interface GitRepository { + _links: any; + defaultBranch: string; + id: string; + name: string; + project: TfsCoreInterfaces.TeamProjectReference; + remoteUrl: string; + url: string; + } + export enum GitRepositoryPermissions { + None = 0, + Administer = 1, + GenericRead = 2, + GenericContribute = 4, + ForcePush = 8, + CreateBranch = 16, + CreateTag = 32, + ManageNote = 64, + PolicyExempt = 128, + /** + * This defines the set of bits that are valid for the git permission space. When reading or writing git permissions, these are the only bits paid attention too. + */ + All = 255, + BranchLevelPermissions = 141, + } + export interface GitStatus { + _links: any; + context: GitStatusContext; + createdBy: VSSInterfaces.IdentityRef; + creationDate: Date; + description: string; + state: GitStatusState; + targetUrl: string; + } + export interface GitStatusContext { + genre: string; + name: string; + } + export enum GitStatusState { + NotSet = 0, + Pending = 1, + Succeeded = 2, + Failed = 3, + Error = 4, + } + export interface GitSuggestion { + properties: { + [key: string]: any; + }; + type: string; + } + export interface GitTargetVersionDescriptor extends GitVersionDescriptor { + /** + * Version string identifier (name of tag/branch, SHA1 of commit) + */ + targetVersion: string; + /** + * Version options - Specify additional modifiers to version (e.g Previous) + */ + targetVersionOptions: GitVersionOptions; + /** + * Version type (branch, tag, or commit). Determines how Id is interpreted + */ + targetVersionType: GitVersionType; + } + export interface GitTreeEntryRef { + /** + * Blob or tree + */ + gitObjectType: GitObjectType; + /** + * Mode represented as octal string + */ + mode: string; + /** + * SHA1 hash of git object + */ + objectId: string; + /** + * Path relative to parent tree object + */ + relativePath: string; + /** + * Size of content + */ + size: number; + /** + * url to retrieve tree or blob + */ + url: string; + } + export interface GitTreeRef { + _links: any; + /** + * SHA1 hash of git object + */ + objectId: string; + /** + * Sum of sizes of all children + */ + size: number; + /** + * Blobs and trees under this tree + */ + treeEntries: GitTreeEntryRef[]; + /** + * Url to tree + */ + url: string; + } + export interface GitUserDate { + date: Date; + email: string; + name: string; + } + export interface GitVersionDescriptor { + /** + * Version string identifier (name of tag/branch/index, SHA1 of commit) + */ + version: string; + /** + * Version options - Specify additional modifiers to version (e.g Previous) + */ + versionOptions: GitVersionOptions; + /** + * Version type (branch, tag, commit, or index). Determines how Id is interpreted + */ + versionType: GitVersionType; + } + export enum GitVersionOptions { + /** + * Not specified + */ + None = 0, + /** + * Commit that changed item prior to the current version + */ + PreviousChange = 1, + /** + * First parent of commit (HEAD^) + */ + FirstParent = 2, + } + export enum GitVersionType { + /** + * Interpret the version as a branch name + */ + Branch = 0, + /** + * Interpret the version as a tag name + */ + Tag = 1, + /** + * Interpret the version as a commit ID (SHA1) + */ + Commit = 2, + /** + * Interpret the version as an index name + */ + Index = 3, + } + export interface HistoryEntry { + /** + * The Change list (changeset/commit/shelveset) for this point in history + */ + changeList: ChangeList; + /** + * The change made to the item from this change list (only relevant for File history, not folders) + */ + itemChangeType: VersionControlChangeType; + /** + * The path of the item at this point in history (only relevant for File history, not folders) + */ + serverItem: string; + } + export interface HistoryQueryResults { + /** + * True if there are more results available to fetch (we're returning the max # of items requested) A more RESTy solution would be to include a Link header + */ + moreResultsAvailable: boolean; + /** + * The history entries (results) from this query + */ + results: HistoryEntry[]; + } + export interface IdentityRefWithVote extends VSSInterfaces.IdentityRef { + isRequired: boolean; + reviewerUrl: string; + vote: number; + votedFor: IdentityRefWithVote[]; + } + export interface IncludedGitCommit { + commitId: string; + commitTime: Date; + parentCommitIds: string[]; + repositoryId: string; + } + export interface ItemContent { + content: string; + contentType: ItemContentType; + } + export enum ItemContentType { + RawText = 0, + Base64Encoded = 1, + } + /** + * Optional details to include when returning an item model + */ + export interface ItemDetailsOptions { + /** + * If true, include metadata about the file type + */ + includeContentMetadata: boolean; + /** + * Specifies whether to include children (OneLevel), all descendants (Full) or None for folder items + */ + recursionLevel: VersionControlRecursionType; + } + export interface ItemModel { + _links: any; + contentMetadata: FileContentMetadata; + isFolder: boolean; + isSymLink: boolean; + path: string; + url: string; + } + export enum PullRequestAsyncStatus { + NotSet = 0, + Queued = 1, + Conflicts = 2, + Succeeded = 3, + RejectedByPolicy = 4, + Failure = 5, + } + export enum PullRequestStatus { + NotSet = 0, + Active = 1, + Abandoned = 2, + Completed = 3, + All = 4, + } + export interface TfvcBranch extends TfvcBranchRef { + children: TfvcBranch[]; + mappings: TfvcBranchMapping[]; + parent: TfvcShallowBranchRef; + relatedBranches: TfvcShallowBranchRef[]; + } + export interface TfvcBranchMapping { + depth: string; + serverItem: string; + type: string; + } + export interface TfvcBranchRef extends TfvcShallowBranchRef { + _links: any; + createdDate: Date; + description: string; + isDeleted: boolean; + owner: VSSInterfaces.IdentityRef; + url: string; + } + export interface TfvcChange extends Change { + /** + * List of merge sources in case of rename or branch creation. + */ + mergeSources: TfvcMergeSource[]; + /** + * Version at which a (shelved) change was pended against + */ + pendingVersion: number; + } + export interface TfvcChangeset extends TfvcChangesetRef { + accountId: string; + changes: TfvcChange[]; + checkinNotes: CheckinNote[]; + collectionId: string; + hasMoreChanges: boolean; + policyOverride: TfvcPolicyOverrideInfo; + teamProjectIds: string[]; + workItems: AssociatedWorkItem[]; + } + export interface TfvcChangesetRef { + _links: any; + author: VSSInterfaces.IdentityRef; + changesetId: number; + checkedInBy: VSSInterfaces.IdentityRef; + comment: string; + commentTruncated: boolean; + createdDate: Date; + url: string; + } + /** + * Criteria used in a search for change lists + */ + export interface TfvcChangesetSearchCriteria { + /** + * Alias or display name of user who made the changes + */ + author: string; + /** + * Whether or not to follow renames for the given item being queried + */ + followRenames: boolean; + /** + * If provided, only include changesets created after this date (string) Think of a better name for this. + */ + fromDate: string; + /** + * If provided, only include changesets after this changesetID + */ + fromId: number; + /** + * Whether to include the _links field on the shallow references + */ + includeLinks: boolean; + /** + * Path of item to search under + */ + path: string; + /** + * If provided, only include changesets created before this date (string) Think of a better name for this. + */ + toDate: string; + /** + * If provided, a version descriptor for the latest change list to include + */ + toId: number; + } + export interface TfvcChangesetsRequestData { + changesetIds: number[]; + commentLength: number; + /** + * Whether to include the _links field on the shallow references + */ + includeLinks: boolean; + } + export interface TfvcCheckinEventData { + changeset: TfvcChangeset; + project: TfsCoreInterfaces.TeamProjectReference; + } + export interface TfvcHistoryEntry extends HistoryEntry { + /** + * The encoding of the item at this point in history (only relevant for File history, not folders) + */ + encoding: number; + /** + * The file id of the item at this point in history (only relevant for File history, not folders) + */ + fileId: number; + } + export interface TfvcItem extends ItemModel { + changeDate: Date; + deletionId: number; + /** + * MD5 hash as a base 64 string, applies to files only. + */ + hashValue: string; + isBranch: boolean; + isPendingChange: boolean; + /** + * The size of the file, if applicable. + */ + size: number; + version: number; + } + /** + * Item path and Version descriptor properties + */ + export interface TfvcItemDescriptor { + path: string; + recursionLevel: VersionControlRecursionType; + version: string; + versionOption: TfvcVersionOption; + versionType: TfvcVersionType; + } + export interface TfvcItemRequestData { + /** + * If true, include metadata about the file type + */ + includeContentMetadata: boolean; + /** + * Whether to include the _links field on the shallow references + */ + includeLinks: boolean; + itemDescriptors: TfvcItemDescriptor[]; + } + export interface TfvcLabel extends TfvcLabelRef { + items: TfvcItem[]; + } + export interface TfvcLabelRef { + _links: any; + description: string; + id: number; + labelScope: string; + modifiedDate: Date; + name: string; + owner: VSSInterfaces.IdentityRef; + url: string; + } + export interface TfvcLabelRequestData { + /** + * Whether to include the _links field on the shallow references + */ + includeLinks: boolean; + itemLabelFilter: string; + labelScope: string; + maxItemCount: number; + name: string; + owner: string; + } + export interface TfvcMergeSource { + /** + * Indicates if this a rename source. If false, it is a merge source. + */ + isRename: boolean; + /** + * The server item of the merge source + */ + serverItem: string; + /** + * Start of the version range + */ + versionFrom: number; + /** + * End of the version range + */ + versionTo: number; + } + export interface TfvcPolicyFailureInfo { + message: string; + policyName: string; + } + export interface TfvcPolicyOverrideInfo { + comment: string; + policyFailures: TfvcPolicyFailureInfo[]; + } + export interface TfvcShallowBranchRef { + path: string; + } + export interface TfvcShelveset extends TfvcShelvesetRef { + changes: TfvcChange[]; + notes: CheckinNote[]; + policyOverride: TfvcPolicyOverrideInfo; + workItems: AssociatedWorkItem[]; + } + export interface TfvcShelvesetRef { + _links: any; + comment: string; + commentTruncated: boolean; + createdDate: Date; + id: string; + name: string; + owner: VSSInterfaces.IdentityRef; + url: string; + } + export interface TfvcShelvesetRequestData { + /** + * Whether to include policyOverride and notes + */ + includeDetails: boolean; + /** + * Whether to include the _links field on the shallow references + */ + includeLinks: boolean; + /** + * Whether to include workItems + */ + includeWorkItems: boolean; + /** + * Max number of changes to include + */ + maxChangeCount: number; + /** + * Max length of comment + */ + maxCommentLength: number; + /** + * Shelveset's name + */ + name: string; + /** + * Owner's ID. Could be a name or a guid. + */ + owner: string; + } + export interface TfvcVersionDescriptor { + version: string; + versionOption: TfvcVersionOption; + versionType: TfvcVersionType; + } + export enum TfvcVersionOption { + None = 0, + Previous = 1, + UseRename = 2, + } + export enum TfvcVersionType { + None = 0, + Changeset = 1, + Shelveset = 2, + Change = 3, + Date = 4, + Latest = 5, + Tip = 6, + MergeSource = 7, + } + export interface UpdateRefsRequest { + refUpdateRequests: GitRefUpdate[]; + updateMode: GitRefUpdateMode; + } + export enum VersionControlChangeType { + None = 0, + Add = 1, + Edit = 2, + Encoding = 4, + Rename = 8, + Delete = 16, + Undelete = 32, + Branch = 64, + Merge = 128, + Lock = 256, + Rollback = 512, + SourceRename = 1024, + TargetRename = 2048, + Property = 4096, + All = 8191, + } + export interface VersionControlProjectInfo { + defaultSourceControlType: TfsCoreInterfaces.SourceControlTypes; + project: TfsCoreInterfaces.TeamProjectReference; + supportsGit: boolean; + supportsTFVC: boolean; + } + export enum VersionControlRecursionType { + /** + * Only return the specified item. + */ + None = 0, + /** + * Return the specified item and its direct children. + */ + OneLevel = 1, + /** + * Return the specified item and its direct children, as well as recursive chains of nested child folders that only contain a single folder. + */ + OneLevelPlusNestedEmptyFolders = 4, + /** + * Return specified item and all descendants + */ + Full = 120, + } + export var TypeInfo: { + AssociatedWorkItem: { + fields: any; + }; + Change: { + fields: any; + }; + ChangeCountDictionary: { + fields: any; + }; + ChangeList: { + fields: any; + }; + ChangeListSearchCriteria: { + fields: any; + }; + CheckinNote: { + fields: any; + }; + FileContentMetadata: { + fields: any; + }; + GitBaseVersionDescriptor: { + fields: any; + }; + GitBlobRef: { + fields: any; + }; + GitBranchStats: { + fields: any; + }; + GitChange: { + fields: any; + }; + GitCommit: { + fields: any; + }; + GitCommitChanges: { + fields: any; + }; + GitCommitDiffs: { + fields: any; + }; + GitCommitRef: { + fields: any; + }; + GitCommitToCreate: { + fields: any; + }; + GitDeletedRepository: { + fields: any; + }; + GitHistoryQueryResults: { + fields: any; + }; + GitItem: { + fields: any; + }; + GitItemDescriptor: { + fields: any; + }; + GitItemRequestData: { + fields: any; + }; + GitObjectType: { + enumValues: { + "bad": number; + "commit": number; + "tree": number; + "blob": number; + "tag": number; + "ext2": number; + "ofsDelta": number; + "refDelta": number; + }; + }; + GitPathAction: { + fields: any; + }; + GitPathActions: { + enumValues: { + "none": number; + "edit": number; + "delete": number; + "add": number; + "rename": number; + }; + }; + GitPermissionScope: { + enumValues: { + "project": number; + "repository": number; + "branch": number; + }; + }; + GitPullRequest: { + fields: any; + }; + GitPullRequestCompletionOptions: { + fields: any; + }; + GitPullRequestSearchCriteria: { + fields: any; + }; + GitPush: { + fields: any; + }; + GitPushEventData: { + fields: any; + }; + GitPushRef: { + fields: any; + }; + GitPushSearchCriteria: { + fields: any; + }; + GitQueryCommitsCriteria: { + fields: any; + }; + GitRef: { + fields: any; + }; + GitRefUpdate: { + fields: any; + }; + GitRefUpdateMode: { + enumValues: { + "bestEffort": number; + "allOrNone": number; + }; + }; + GitRefUpdateResult: { + fields: any; + }; + GitRefUpdateResultSet: { + fields: any; + }; + GitRefUpdateStatus: { + enumValues: { + "succeeded": number; + "forcePushRequired": number; + "staleOldObjectId": number; + "invalidRefName": number; + "unprocessed": number; + "unresolvableToCommit": number; + "writePermissionRequired": number; + "manageNotePermissionRequired": number; + "createBranchPermissionRequired": number; + "createTagPermissionRequired": number; + "rejectedByPlugin": number; + "locked": number; + "refNameConflict": number; + "rejectedByPolicy": number; + "succeededNonExistentRef": number; + "succeededCorruptRef": number; + }; + }; + GitRepository: { + fields: any; + }; + GitRepositoryPermissions: { + enumValues: { + "none": number; + "administer": number; + "genericRead": number; + "genericContribute": number; + "forcePush": number; + "createBranch": number; + "createTag": number; + "manageNote": number; + "policyExempt": number; + "all": number; + "branchLevelPermissions": number; + }; + }; + GitStatus: { + fields: any; + }; + GitStatusContext: { + fields: any; + }; + GitStatusState: { + enumValues: { + "notSet": number; + "pending": number; + "succeeded": number; + "failed": number; + "error": number; + }; + }; + GitSuggestion: { + fields: any; + }; + GitTargetVersionDescriptor: { + fields: any; + }; + GitTreeEntryRef: { + fields: any; + }; + GitTreeRef: { + fields: any; + }; + GitUserDate: { + fields: any; + }; + GitVersionDescriptor: { + fields: any; + }; + GitVersionOptions: { + enumValues: { + "none": number; + "previousChange": number; + "firstParent": number; + }; + }; + GitVersionType: { + enumValues: { + "branch": number; + "tag": number; + "commit": number; + "index": number; + }; + }; + HistoryEntry: { + fields: any; + }; + HistoryQueryResults: { + fields: any; + }; + IdentityRefWithVote: { + fields: any; + }; + IncludedGitCommit: { + fields: any; + }; + ItemContent: { + fields: any; + }; + ItemContentType: { + enumValues: { + "rawText": number; + "base64Encoded": number; + }; + }; + ItemDetailsOptions: { + fields: any; + }; + ItemModel: { + fields: any; + }; + PullRequestAsyncStatus: { + enumValues: { + "notSet": number; + "queued": number; + "conflicts": number; + "succeeded": number; + "rejectedByPolicy": number; + "failure": number; + }; + }; + PullRequestStatus: { + enumValues: { + "notSet": number; + "active": number; + "abandoned": number; + "completed": number; + "all": number; + }; + }; + TfvcBranch: { + fields: any; + }; + TfvcBranchMapping: { + fields: any; + }; + TfvcBranchRef: { + fields: any; + }; + TfvcChange: { + fields: any; + }; + TfvcChangeset: { + fields: any; + }; + TfvcChangesetRef: { + fields: any; + }; + TfvcChangesetSearchCriteria: { + fields: any; + }; + TfvcChangesetsRequestData: { + fields: any; + }; + TfvcCheckinEventData: { + fields: any; + }; + TfvcHistoryEntry: { + fields: any; + }; + TfvcItem: { + fields: any; + }; + TfvcItemDescriptor: { + fields: any; + }; + TfvcItemRequestData: { + fields: any; + }; + TfvcLabel: { + fields: any; + }; + TfvcLabelRef: { + fields: any; + }; + TfvcLabelRequestData: { + fields: any; + }; + TfvcMergeSource: { + fields: any; + }; + TfvcPolicyFailureInfo: { + fields: any; + }; + TfvcPolicyOverrideInfo: { + fields: any; + }; + TfvcShallowBranchRef: { + fields: any; + }; + TfvcShelveset: { + fields: any; + }; + TfvcShelvesetRef: { + fields: any; + }; + TfvcShelvesetRequestData: { + fields: any; + }; + TfvcVersionDescriptor: { + fields: any; + }; + TfvcVersionOption: { + enumValues: { + "none": number; + "previous": number; + "useRename": number; + }; + }; + TfvcVersionType: { + enumValues: { + "none": number; + "changeset": number; + "shelveset": number; + "change": number; + "date": number; + "latest": number; + "tip": number; + "mergeSource": number; + }; + }; + UpdateRefsRequest: { + fields: any; + }; + VersionControlChangeType: { + enumValues: { + "none": number; + "add": number; + "edit": number; + "encoding": number; + "rename": number; + "delete": number; + "undelete": number; + "branch": number; + "merge": number; + "lock": number; + "rollback": number; + "sourceRename": number; + "targetRename": number; + "property": number; + "all": number; + }; + }; + VersionControlProjectInfo: { + fields: any; + }; + VersionControlRecursionType: { + enumValues: { + "none": number; + "oneLevel": number; + "oneLevelPlusNestedEmptyFolders": number; + "full": number; + }; + }; + }; + +} +declare module 'vso-node-api/GitApi' { + + + import Q = require('q'); + import basem = require('vso-node-api/ClientApiBases'); + import VsoBaseInterfaces = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); + import GitInterfaces = require('vso-node-api/interfaces/GitInterfaces'); + import VSSInterfaces = require('vso-node-api/interfaces/common/VSSInterfaces'); + export interface IGitApi extends basem.ClientApiBase { + getBlob(repositoryId: string, sha1: string, project: string, download: boolean, fileName: string, onResult: (err: any, statusCode: number, Blob: GitInterfaces.GitBlobRef) => void): void; + getBlobContent(repositoryId: string, sha1: string, project: string, download: boolean, fileName: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + getBlobsZip(blobIds: string[], repositoryId: string, project: string, filename: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + getBlobZip(repositoryId: string, sha1: string, project: string, download: boolean, fileName: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + getBranch(repositoryId: string, name: string, project: string, baseVersionDescriptor: GitInterfaces.GitVersionDescriptor, onResult: (err: any, statusCode: number, BranchStat: GitInterfaces.GitBranchStats) => void): void; + getBranches(repositoryId: string, project: string, baseVersionDescriptor: GitInterfaces.GitVersionDescriptor, onResult: (err: any, statusCode: number, BranchStats: GitInterfaces.GitBranchStats[]) => void): void; + getChanges(commitId: string, repositoryId: string, project: string, top: number, skip: number, onResult: (err: any, statusCode: number, Change: GitInterfaces.GitCommitChanges) => void): void; + getCommit(commitId: string, repositoryId: string, project: string, changeCount: number, onResult: (err: any, statusCode: number, Commit: GitInterfaces.GitCommit) => void): void; + getCommits(repositoryId: string, searchCriteria: GitInterfaces.GitQueryCommitsCriteria, project: string, skip: number, top: number, onResult: (err: any, statusCode: number, Commits: GitInterfaces.GitCommitRef[]) => void): void; + getPushCommits(repositoryId: string, pushId: number, project: string, top: number, skip: number, includeLinks: boolean, onResult: (err: any, statusCode: number, Commits: GitInterfaces.GitCommitRef[]) => void): void; + getCommitsBatch(searchCriteria: GitInterfaces.GitQueryCommitsCriteria, repositoryId: string, project: string, skip: number, top: number, onResult: (err: any, statusCode: number, CommitsBatch: GitInterfaces.GitCommitRef[]) => void): void; + getDeletedRepositories(project: string, onResult: (err: any, statusCode: number, DeletedRepositories: GitInterfaces.GitDeletedRepository[]) => void): void; + getItem(repositoryId: string, path: string, project: string, scopePath: string, recursionLevel: GitInterfaces.VersionControlRecursionType, includeContentMetadata: boolean, latestProcessedChange: boolean, download: boolean, versionDescriptor: GitInterfaces.GitVersionDescriptor, onResult: (err: any, statusCode: number, Item: GitInterfaces.GitItem) => void): void; + getItemContent(repositoryId: string, path: string, project: string, scopePath: string, recursionLevel: GitInterfaces.VersionControlRecursionType, includeContentMetadata: boolean, latestProcessedChange: boolean, download: boolean, versionDescriptor: GitInterfaces.GitVersionDescriptor, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + getItems(repositoryId: string, project: string, scopePath: string, recursionLevel: GitInterfaces.VersionControlRecursionType, includeContentMetadata: boolean, latestProcessedChange: boolean, download: boolean, includeLinks: boolean, versionDescriptor: GitInterfaces.GitVersionDescriptor, onResult: (err: any, statusCode: number, Items: GitInterfaces.GitItem[]) => void): void; + getItemText(repositoryId: string, path: string, project: string, scopePath: string, recursionLevel: GitInterfaces.VersionControlRecursionType, includeContentMetadata: boolean, latestProcessedChange: boolean, download: boolean, versionDescriptor: GitInterfaces.GitVersionDescriptor, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + getItemZip(repositoryId: string, path: string, project: string, scopePath: string, recursionLevel: GitInterfaces.VersionControlRecursionType, includeContentMetadata: boolean, latestProcessedChange: boolean, download: boolean, versionDescriptor: GitInterfaces.GitVersionDescriptor, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + getItemsBatch(requestData: GitInterfaces.GitItemRequestData, repositoryId: string, project: string, onResult: (err: any, statusCode: number, ItemsBatch: GitInterfaces.GitItem[][]) => void): void; + getPullRequestCommits(repositoryId: string, pullRequestId: number, project: string, onResult: (err: any, statusCode: number, PullRequestCommits: GitInterfaces.GitCommitRef[]) => void): void; + createPullRequestReviewer(reviewer: GitInterfaces.IdentityRefWithVote, repositoryId: string, pullRequestId: number, reviewerId: string, project: string, onResult: (err: any, statusCode: number, PullRequestReviewer: GitInterfaces.IdentityRefWithVote) => void): void; + createPullRequestReviewers(reviewers: VSSInterfaces.IdentityRef[], repositoryId: string, pullRequestId: number, project: string, onResult: (err: any, statusCode: number, PullRequestReviewers: GitInterfaces.IdentityRefWithVote[]) => void): void; + deletePullRequestReviewer(repositoryId: string, pullRequestId: number, reviewerId: string, project: string, onResult: (err: any, statusCode: number) => void): void; + getPullRequestReviewer(repositoryId: string, pullRequestId: number, reviewerId: string, project: string, onResult: (err: any, statusCode: number, PullRequestReviewer: GitInterfaces.IdentityRefWithVote) => void): void; + getPullRequestReviewers(repositoryId: string, pullRequestId: number, project: string, onResult: (err: any, statusCode: number, PullRequestReviewers: GitInterfaces.IdentityRefWithVote[]) => void): void; + getPullRequestsByProject(project: string, searchCriteria: GitInterfaces.GitPullRequestSearchCriteria, maxCommentLength: number, skip: number, top: number, onResult: (err: any, statusCode: number, PullRequests: GitInterfaces.GitPullRequest[]) => void): void; + createPullRequest(gitPullRequestToCreate: GitInterfaces.GitPullRequest, repositoryId: string, project: string, onResult: (err: any, statusCode: number, PullRequest: GitInterfaces.GitPullRequest) => void): void; + getPullRequest(repositoryId: string, pullRequestId: number, project: string, maxCommentLength: number, skip: number, top: number, includeCommits: boolean, onResult: (err: any, statusCode: number, PullRequest: GitInterfaces.GitPullRequest) => void): void; + getPullRequests(repositoryId: string, searchCriteria: GitInterfaces.GitPullRequestSearchCriteria, project: string, maxCommentLength: number, skip: number, top: number, onResult: (err: any, statusCode: number, PullRequests: GitInterfaces.GitPullRequest[]) => void): void; + updatePullRequest(gitPullRequestToUpdate: GitInterfaces.GitPullRequest, repositoryId: string, pullRequestId: number, project: string, onResult: (err: any, statusCode: number, PullRequest: GitInterfaces.GitPullRequest) => void): void; + getPullRequestWorkItems(repositoryId: string, pullRequestId: number, project: string, commitsTop: number, commitsSkip: number, onResult: (err: any, statusCode: number, PullRequestWorkItems: GitInterfaces.AssociatedWorkItem[]) => void): void; + createPush(push: GitInterfaces.GitPush, repositoryId: string, project: string, onResult: (err: any, statusCode: number, pushe: GitInterfaces.GitPush) => void): void; + getPush(repositoryId: string, pushId: number, project: string, includeCommits: number, includeRefUpdates: boolean, onResult: (err: any, statusCode: number, pushe: GitInterfaces.GitPush) => void): void; + getPushes(repositoryId: string, project: string, skip: number, top: number, searchCriteria: GitInterfaces.GitPushSearchCriteria, onResult: (err: any, statusCode: number, pushes: GitInterfaces.GitPush[]) => void): void; + getRefs(repositoryId: string, project: string, filter: string, includeLinks: boolean, onResult: (err: any, statusCode: number, refs: GitInterfaces.GitRef[]) => void): void; + updateRefs(refUpdates: GitInterfaces.GitRefUpdate[], repositoryId: string, project: string, projectId: string, onResult: (err: any, statusCode: number, refs: GitInterfaces.GitRefUpdateResult[]) => void): void; + createRepository(gitRepositoryToCreate: GitInterfaces.GitRepository, project: string, onResult: (err: any, statusCode: number, Repositorie: GitInterfaces.GitRepository) => void): void; + deleteRepository(repositoryId: string, project: string, onResult: (err: any, statusCode: number) => void): void; + getRepositories(project: string, includeLinks: boolean, onResult: (err: any, statusCode: number, Repositories: GitInterfaces.GitRepository[]) => void): void; + getRepository(repositoryId: string, project: string, onResult: (err: any, statusCode: number, Repositorie: GitInterfaces.GitRepository) => void): void; + updateRepository(newRepositoryInfo: GitInterfaces.GitRepository, repositoryId: string, project: string, onResult: (err: any, statusCode: number, Repositorie: GitInterfaces.GitRepository) => void): void; + createCommitStatus(gitCommitStatusToCreate: GitInterfaces.GitStatus, commitId: string, repositoryId: string, project: string, onResult: (err: any, statusCode: number, Statuse: GitInterfaces.GitStatus) => void): void; + getStatuses(commitId: string, repositoryId: string, project: string, top: number, skip: number, onResult: (err: any, statusCode: number, Statuses: GitInterfaces.GitStatus[]) => void): void; + getTree(repositoryId: string, sha1: string, project: string, projectId: string, recursive: boolean, fileName: string, onResult: (err: any, statusCode: number, Tree: GitInterfaces.GitTreeRef) => void): void; + getTreeZip(repositoryId: string, sha1: string, project: string, projectId: string, recursive: boolean, fileName: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + } + export interface IQGitApi extends basem.QClientApiBase { + getBlob(repositoryId: string, sha1: string, project?: string, download?: boolean, fileName?: string): Promise; + getBlobContent(repositoryId: string, sha1: string, project?: string, download?: boolean, fileName?: string): Promise; + getBlobsZip(blobIds: string[], repositoryId: string, project?: string, filename?: string): Promise; + getBlobZip(repositoryId: string, sha1: string, project?: string, download?: boolean, fileName?: string): Promise; + getBranch(repositoryId: string, name: string, project?: string, baseVersionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise; + getBranches(repositoryId: string, project?: string, baseVersionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise; + getChanges(commitId: string, repositoryId: string, project?: string, top?: number, skip?: number): Promise; + getCommit(commitId: string, repositoryId: string, project?: string, changeCount?: number): Promise; + getCommits(repositoryId: string, searchCriteria: GitInterfaces.GitQueryCommitsCriteria, project?: string, skip?: number, top?: number): Promise; + getPushCommits(repositoryId: string, pushId: number, project?: string, top?: number, skip?: number, includeLinks?: boolean): Promise; + getCommitsBatch(searchCriteria: GitInterfaces.GitQueryCommitsCriteria, repositoryId: string, project?: string, skip?: number, top?: number): Promise; + getDeletedRepositories(project: string): Promise; + getItem(repositoryId: string, path: string, project?: string, scopePath?: string, recursionLevel?: GitInterfaces.VersionControlRecursionType, includeContentMetadata?: boolean, latestProcessedChange?: boolean, download?: boolean, versionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise; + getItemContent(repositoryId: string, path: string, project?: string, scopePath?: string, recursionLevel?: GitInterfaces.VersionControlRecursionType, includeContentMetadata?: boolean, latestProcessedChange?: boolean, download?: boolean, versionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise; + getItems(repositoryId: string, project?: string, scopePath?: string, recursionLevel?: GitInterfaces.VersionControlRecursionType, includeContentMetadata?: boolean, latestProcessedChange?: boolean, download?: boolean, includeLinks?: boolean, versionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise; + getItemText(repositoryId: string, path: string, project?: string, scopePath?: string, recursionLevel?: GitInterfaces.VersionControlRecursionType, includeContentMetadata?: boolean, latestProcessedChange?: boolean, download?: boolean, versionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise; + getItemZip(repositoryId: string, path: string, project?: string, scopePath?: string, recursionLevel?: GitInterfaces.VersionControlRecursionType, includeContentMetadata?: boolean, latestProcessedChange?: boolean, download?: boolean, versionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise; + getItemsBatch(requestData: GitInterfaces.GitItemRequestData, repositoryId: string, project?: string): Promise; + getPullRequestCommits(repositoryId: string, pullRequestId: number, project?: string): Promise; + createPullRequestReviewer(reviewer: GitInterfaces.IdentityRefWithVote, repositoryId: string, pullRequestId: number, reviewerId: string, project?: string): Promise; + createPullRequestReviewers(reviewers: VSSInterfaces.IdentityRef[], repositoryId: string, pullRequestId: number, project?: string): Promise; + deletePullRequestReviewer(repositoryId: string, pullRequestId: number, reviewerId: string, project?: string): Promise; + getPullRequestReviewer(repositoryId: string, pullRequestId: number, reviewerId: string, project?: string): Promise; + getPullRequestReviewers(repositoryId: string, pullRequestId: number, project?: string): Promise; + getPullRequestsByProject(project: string, searchCriteria: GitInterfaces.GitPullRequestSearchCriteria, maxCommentLength?: number, skip?: number, top?: number): Promise; + createPullRequest(gitPullRequestToCreate: GitInterfaces.GitPullRequest, repositoryId: string, project?: string): Promise; + getPullRequest(repositoryId: string, pullRequestId: number, project?: string, maxCommentLength?: number, skip?: number, top?: number, includeCommits?: boolean): Promise; + getPullRequests(repositoryId: string, searchCriteria: GitInterfaces.GitPullRequestSearchCriteria, project?: string, maxCommentLength?: number, skip?: number, top?: number): Promise; + updatePullRequest(gitPullRequestToUpdate: GitInterfaces.GitPullRequest, repositoryId: string, pullRequestId: number, project?: string): Promise; + getPullRequestWorkItems(repositoryId: string, pullRequestId: number, project?: string, commitsTop?: number, commitsSkip?: number): Promise; + createPush(push: GitInterfaces.GitPush, repositoryId: string, project?: string): Promise; + getPush(repositoryId: string, pushId: number, project?: string, includeCommits?: number, includeRefUpdates?: boolean): Promise; + getPushes(repositoryId: string, project?: string, skip?: number, top?: number, searchCriteria?: GitInterfaces.GitPushSearchCriteria): Promise; + getRefs(repositoryId: string, project?: string, filter?: string, includeLinks?: boolean): Promise; + updateRefs(refUpdates: GitInterfaces.GitRefUpdate[], repositoryId: string, project?: string, projectId?: string): Promise; + createRepository(gitRepositoryToCreate: GitInterfaces.GitRepository, project?: string): Promise; + deleteRepository(repositoryId: string, project?: string): Promise; + getRepositories(project?: string, includeLinks?: boolean): Promise; + getRepository(repositoryId: string, project?: string): Promise; + updateRepository(newRepositoryInfo: GitInterfaces.GitRepository, repositoryId: string, project?: string): Promise; + createCommitStatus(gitCommitStatusToCreate: GitInterfaces.GitStatus, commitId: string, repositoryId: string, project?: string): Promise; + getStatuses(commitId: string, repositoryId: string, project?: string, top?: number, skip?: number): Promise; + getTree(repositoryId: string, sha1: string, project?: string, projectId?: string, recursive?: boolean, fileName?: string): Promise; + getTreeZip(repositoryId: string, sha1: string, project?: string, projectId?: string, recursive?: boolean, fileName?: string): Promise; + } + export class GitApi extends basem.ClientApiBase implements IGitApi { + constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); + /** + * Gets a single blob. + * + * @param {string} repositoryId + * @param {string} sha1 + * @param {string} project - Project ID or project name + * @param {boolean} download + * @param {string} fileName + * @param onResult callback function with the resulting GitInterfaces.GitBlobRef + */ + getBlob(repositoryId: string, sha1: string, project: string, download: boolean, fileName: string, onResult: (err: any, statusCode: number, Blob: GitInterfaces.GitBlobRef) => void): void; + /** + * Gets a single blob. + * + * @param {string} repositoryId + * @param {string} sha1 + * @param {string} project - Project ID or project name + * @param {boolean} download + * @param {string} fileName + * @param onResult callback function with the resulting ArrayBuffer + */ + getBlobContent(repositoryId: string, sha1: string, project: string, download: boolean, fileName: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + /** + * Gets one or more blobs in a zip file download. + * + * @param {string[]} blobIds + * @param {string} repositoryId + * @param {string} project - Project ID or project name + * @param {string} filename + * @param onResult callback function with the resulting ArrayBuffer + */ + getBlobsZip(blobIds: string[], repositoryId: string, project: string, filename: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + /** + * Gets a single blob. + * + * @param {string} repositoryId + * @param {string} sha1 + * @param {string} project - Project ID or project name + * @param {boolean} download + * @param {string} fileName + * @param onResult callback function with the resulting ArrayBuffer + */ + getBlobZip(repositoryId: string, sha1: string, project: string, download: boolean, fileName: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + /** + * Retrieve statistics about a single branch. + * + * @param {string} repositoryId - Friendly name or guid of repository + * @param {string} name - Name of the branch + * @param {string} project - Project ID or project name + * @param {GitInterfaces.GitVersionDescriptor} baseVersionDescriptor + * @param onResult callback function with the resulting GitInterfaces.GitBranchStats + */ + getBranch(repositoryId: string, name: string, project: string, baseVersionDescriptor: GitInterfaces.GitVersionDescriptor, onResult: (err: any, statusCode: number, BranchStat: GitInterfaces.GitBranchStats) => void): void; + /** + * Retrieve statistics about all branches within a repository. + * + * @param {string} repositoryId - Friendly name or guid of repository + * @param {string} project - Project ID or project name + * @param {GitInterfaces.GitVersionDescriptor} baseVersionDescriptor + * @param onResult callback function with the resulting GitInterfaces.GitBranchStats[] + */ + getBranches(repositoryId: string, project: string, baseVersionDescriptor: GitInterfaces.GitVersionDescriptor, onResult: (err: any, statusCode: number, BranchStats: GitInterfaces.GitBranchStats[]) => void): void; + /** + * Retrieve changes for a particular commit. + * + * @param {string} commitId - The id of the commit. + * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. + * @param {string} project - Project ID or project name + * @param {number} top - The maximum number of changes to return. + * @param {number} skip - The number of changes to skip. + * @param onResult callback function with the resulting GitInterfaces.GitCommitChanges + */ + getChanges(commitId: string, repositoryId: string, project: string, top: number, skip: number, onResult: (err: any, statusCode: number, Change: GitInterfaces.GitCommitChanges) => void): void; + /** + * Retrieve a particular commit. + * + * @param {string} commitId - The id of the commit. + * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. + * @param {string} project - Project ID or project name + * @param {number} changeCount - The number of changes to include in the result. + * @param onResult callback function with the resulting GitInterfaces.GitCommit + */ + getCommit(commitId: string, repositoryId: string, project: string, changeCount: number, onResult: (err: any, statusCode: number, Commit: GitInterfaces.GitCommit) => void): void; + /** + * Retrieve git commits for a project + * + * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. + * @param {GitInterfaces.GitQueryCommitsCriteria} searchCriteria + * @param {string} project - Project ID or project name + * @param {number} skip + * @param {number} top + * @param onResult callback function with the resulting GitInterfaces.GitCommitRef[] + */ + getCommits(repositoryId: string, searchCriteria: GitInterfaces.GitQueryCommitsCriteria, project: string, skip: number, top: number, onResult: (err: any, statusCode: number, Commits: GitInterfaces.GitCommitRef[]) => void): void; + /** + * Retrieve a list of commits associated with a particular push. + * + * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. + * @param {number} pushId - The id of the push. + * @param {string} project - Project ID or project name + * @param {number} top - The maximum number of commits to return ("get the top x commits"). + * @param {number} skip - The number of commits to skip. + * @param {boolean} includeLinks + * @param onResult callback function with the resulting GitInterfaces.GitCommitRef[] + */ + getPushCommits(repositoryId: string, pushId: number, project: string, top: number, skip: number, includeLinks: boolean, onResult: (err: any, statusCode: number, Commits: GitInterfaces.GitCommitRef[]) => void): void; + /** + * Retrieve git commits for a project + * + * @param {GitInterfaces.GitQueryCommitsCriteria} searchCriteria - Search options + * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. + * @param {string} project - Project ID or project name + * @param {number} skip + * @param {number} top + * @param onResult callback function with the resulting GitInterfaces.GitCommitRef[] + */ + getCommitsBatch(searchCriteria: GitInterfaces.GitQueryCommitsCriteria, repositoryId: string, project: string, skip: number, top: number, onResult: (err: any, statusCode: number, CommitsBatch: GitInterfaces.GitCommitRef[]) => void): void; + /** + * Retrieve deleted git repositories. + * + * @param {string} project - Project ID or project name + * @param onResult callback function with the resulting GitInterfaces.GitDeletedRepository[] + */ + getDeletedRepositories(project: string, onResult: (err: any, statusCode: number, DeletedRepositories: GitInterfaces.GitDeletedRepository[]) => void): void; + /** + * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. + * + * @param {string} repositoryId + * @param {string} path + * @param {string} project - Project ID or project name + * @param {string} scopePath + * @param {GitInterfaces.VersionControlRecursionType} recursionLevel + * @param {boolean} includeContentMetadata + * @param {boolean} latestProcessedChange + * @param {boolean} download + * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor + * @param onResult callback function with the resulting GitInterfaces.GitItem + */ + getItem(repositoryId: string, path: string, project: string, scopePath: string, recursionLevel: GitInterfaces.VersionControlRecursionType, includeContentMetadata: boolean, latestProcessedChange: boolean, download: boolean, versionDescriptor: GitInterfaces.GitVersionDescriptor, onResult: (err: any, statusCode: number, Item: GitInterfaces.GitItem) => void): void; + /** + * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. + * + * @param {string} repositoryId + * @param {string} path + * @param {string} project - Project ID or project name + * @param {string} scopePath + * @param {GitInterfaces.VersionControlRecursionType} recursionLevel + * @param {boolean} includeContentMetadata + * @param {boolean} latestProcessedChange + * @param {boolean} download + * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor + * @param onResult callback function with the resulting ArrayBuffer + */ + getItemContent(repositoryId: string, path: string, project: string, scopePath: string, recursionLevel: GitInterfaces.VersionControlRecursionType, includeContentMetadata: boolean, latestProcessedChange: boolean, download: boolean, versionDescriptor: GitInterfaces.GitVersionDescriptor, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + /** + * Get Item Metadata and/or Content for a collection of items. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. + * + * @param {string} repositoryId + * @param {string} project - Project ID or project name + * @param {string} scopePath + * @param {GitInterfaces.VersionControlRecursionType} recursionLevel + * @param {boolean} includeContentMetadata + * @param {boolean} latestProcessedChange + * @param {boolean} download + * @param {boolean} includeLinks + * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor + * @param onResult callback function with the resulting GitInterfaces.GitItem[] + */ + getItems(repositoryId: string, project: string, scopePath: string, recursionLevel: GitInterfaces.VersionControlRecursionType, includeContentMetadata: boolean, latestProcessedChange: boolean, download: boolean, includeLinks: boolean, versionDescriptor: GitInterfaces.GitVersionDescriptor, onResult: (err: any, statusCode: number, Items: GitInterfaces.GitItem[]) => void): void; + /** + * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. + * + * @param {string} repositoryId + * @param {string} path + * @param {string} project - Project ID or project name + * @param {string} scopePath + * @param {GitInterfaces.VersionControlRecursionType} recursionLevel + * @param {boolean} includeContentMetadata + * @param {boolean} latestProcessedChange + * @param {boolean} download + * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor + * @param onResult callback function with the resulting string + */ + getItemText(repositoryId: string, path: string, project: string, scopePath: string, recursionLevel: GitInterfaces.VersionControlRecursionType, includeContentMetadata: boolean, latestProcessedChange: boolean, download: boolean, versionDescriptor: GitInterfaces.GitVersionDescriptor, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + /** + * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. + * + * @param {string} repositoryId + * @param {string} path + * @param {string} project - Project ID or project name + * @param {string} scopePath + * @param {GitInterfaces.VersionControlRecursionType} recursionLevel + * @param {boolean} includeContentMetadata + * @param {boolean} latestProcessedChange + * @param {boolean} download + * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor + * @param onResult callback function with the resulting ArrayBuffer + */ + getItemZip(repositoryId: string, path: string, project: string, scopePath: string, recursionLevel: GitInterfaces.VersionControlRecursionType, includeContentMetadata: boolean, latestProcessedChange: boolean, download: boolean, versionDescriptor: GitInterfaces.GitVersionDescriptor, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + /** + * Post for retrieving a creating a batch out of a set of items in a repo / project given a list of paths or a long path + * + * @param {GitInterfaces.GitItemRequestData} requestData + * @param {string} repositoryId + * @param {string} project - Project ID or project name + * @param onResult callback function with the resulting GitInterfaces.GitItem[][] + */ + getItemsBatch(requestData: GitInterfaces.GitItemRequestData, repositoryId: string, project: string, onResult: (err: any, statusCode: number, ItemsBatch: GitInterfaces.GitItem[][]) => void): void; + /** + * Retrieve pull request's commits + * + * @param {string} repositoryId + * @param {number} pullRequestId + * @param {string} project - Project ID or project name + * @param onResult callback function with the resulting GitInterfaces.GitCommitRef[] + */ + getPullRequestCommits(repositoryId: string, pullRequestId: number, project: string, onResult: (err: any, statusCode: number, PullRequestCommits: GitInterfaces.GitCommitRef[]) => void): void; + /** + * Adds a reviewer to a git pull request + * + * @param {GitInterfaces.IdentityRefWithVote} reviewer + * @param {string} repositoryId + * @param {number} pullRequestId + * @param {string} reviewerId + * @param {string} project - Project ID or project name + * @param onResult callback function with the resulting GitInterfaces.IdentityRefWithVote + */ + createPullRequestReviewer(reviewer: GitInterfaces.IdentityRefWithVote, repositoryId: string, pullRequestId: number, reviewerId: string, project: string, onResult: (err: any, statusCode: number, PullRequestReviewer: GitInterfaces.IdentityRefWithVote) => void): void; + /** + * Adds reviewers to a git pull request + * + * @param {VSSInterfaces.IdentityRef[]} reviewers + * @param {string} repositoryId + * @param {number} pullRequestId + * @param {string} project - Project ID or project name + * @param onResult callback function with the resulting GitInterfaces.IdentityRefWithVote[] + */ + createPullRequestReviewers(reviewers: VSSInterfaces.IdentityRef[], repositoryId: string, pullRequestId: number, project: string, onResult: (err: any, statusCode: number, PullRequestReviewers: GitInterfaces.IdentityRefWithVote[]) => void): void; + /** + * Adds reviewers to a git pull request + * + * @param {string} repositoryId + * @param {number} pullRequestId + * @param {string} reviewerId + * @param {string} project - Project ID or project name + * @param onResult callback function + */ + deletePullRequestReviewer(repositoryId: string, pullRequestId: number, reviewerId: string, project: string, onResult: (err: any, statusCode: number) => void): void; + /** + * Retrieve a reviewer from a pull request + * + * @param {string} repositoryId + * @param {number} pullRequestId + * @param {string} reviewerId + * @param {string} project - Project ID or project name + * @param onResult callback function with the resulting GitInterfaces.IdentityRefWithVote + */ + getPullRequestReviewer(repositoryId: string, pullRequestId: number, reviewerId: string, project: string, onResult: (err: any, statusCode: number, PullRequestReviewer: GitInterfaces.IdentityRefWithVote) => void): void; + /** + * Retrieve a pull request reviewers + * + * @param {string} repositoryId + * @param {number} pullRequestId + * @param {string} project - Project ID or project name + * @param onResult callback function with the resulting GitInterfaces.IdentityRefWithVote[] + */ + getPullRequestReviewers(repositoryId: string, pullRequestId: number, project: string, onResult: (err: any, statusCode: number, PullRequestReviewers: GitInterfaces.IdentityRefWithVote[]) => void): void; + /** + * Query pull requests by project + * + * @param {string} project - Project ID or project name + * @param {GitInterfaces.GitPullRequestSearchCriteria} searchCriteria + * @param {number} maxCommentLength + * @param {number} skip + * @param {number} top + * @param onResult callback function with the resulting GitInterfaces.GitPullRequest[] + */ + getPullRequestsByProject(project: string, searchCriteria: GitInterfaces.GitPullRequestSearchCriteria, maxCommentLength: number, skip: number, top: number, onResult: (err: any, statusCode: number, PullRequests: GitInterfaces.GitPullRequest[]) => void): void; + /** + * Create a git pull request + * + * @param {GitInterfaces.GitPullRequest} gitPullRequestToCreate + * @param {string} repositoryId + * @param {string} project - Project ID or project name + * @param onResult callback function with the resulting GitInterfaces.GitPullRequest + */ + createPullRequest(gitPullRequestToCreate: GitInterfaces.GitPullRequest, repositoryId: string, project: string, onResult: (err: any, statusCode: number, PullRequest: GitInterfaces.GitPullRequest) => void): void; + /** + * Retrieve a pull request + * + * @param {string} repositoryId + * @param {number} pullRequestId + * @param {string} project - Project ID or project name + * @param {number} maxCommentLength + * @param {number} skip + * @param {number} top + * @param {boolean} includeCommits + * @param onResult callback function with the resulting GitInterfaces.GitPullRequest + */ + getPullRequest(repositoryId: string, pullRequestId: number, project: string, maxCommentLength: number, skip: number, top: number, includeCommits: boolean, onResult: (err: any, statusCode: number, PullRequest: GitInterfaces.GitPullRequest) => void): void; + /** + * Query for pull requests + * + * @param {string} repositoryId + * @param {GitInterfaces.GitPullRequestSearchCriteria} searchCriteria + * @param {string} project - Project ID or project name + * @param {number} maxCommentLength + * @param {number} skip + * @param {number} top + * @param onResult callback function with the resulting GitInterfaces.GitPullRequest[] + */ + getPullRequests(repositoryId: string, searchCriteria: GitInterfaces.GitPullRequestSearchCriteria, project: string, maxCommentLength: number, skip: number, top: number, onResult: (err: any, statusCode: number, PullRequests: GitInterfaces.GitPullRequest[]) => void): void; + /** + * Updates a pull request + * + * @param {GitInterfaces.GitPullRequest} gitPullRequestToUpdate + * @param {string} repositoryId + * @param {number} pullRequestId + * @param {string} project - Project ID or project name + * @param onResult callback function with the resulting GitInterfaces.GitPullRequest + */ + updatePullRequest(gitPullRequestToUpdate: GitInterfaces.GitPullRequest, repositoryId: string, pullRequestId: number, project: string, onResult: (err: any, statusCode: number, PullRequest: GitInterfaces.GitPullRequest) => void): void; + /** + * Retrieve a pull request work items + * + * @param {string} repositoryId + * @param {number} pullRequestId + * @param {string} project - Project ID or project name + * @param {number} commitsTop + * @param {number} commitsSkip + * @param onResult callback function with the resulting GitInterfaces.AssociatedWorkItem[] + */ + getPullRequestWorkItems(repositoryId: string, pullRequestId: number, project: string, commitsTop: number, commitsSkip: number, onResult: (err: any, statusCode: number, PullRequestWorkItems: GitInterfaces.AssociatedWorkItem[]) => void): void; + /** + * Push changes to the repository. + * + * @param {GitInterfaces.GitPush} push + * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, a project-scoped route must be used. + * @param {string} project - Project ID or project name + * @param onResult callback function with the resulting GitInterfaces.GitPush + */ + createPush(push: GitInterfaces.GitPush, repositoryId: string, project: string, onResult: (err: any, statusCode: number, pushe: GitInterfaces.GitPush) => void): void; + /** + * Retrieve a particular push. + * + * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. + * @param {number} pushId - The id of the push. + * @param {string} project - Project ID or project name + * @param {number} includeCommits - The number of commits to include in the result. + * @param {boolean} includeRefUpdates + * @param onResult callback function with the resulting GitInterfaces.GitPush + */ + getPush(repositoryId: string, pushId: number, project: string, includeCommits: number, includeRefUpdates: boolean, onResult: (err: any, statusCode: number, pushe: GitInterfaces.GitPush) => void): void; + /** + * Retrieves pushes associated with the specified repository. + * + * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. + * @param {string} project - Project ID or project name + * @param {number} skip + * @param {number} top + * @param {GitInterfaces.GitPushSearchCriteria} searchCriteria + * @param onResult callback function with the resulting GitInterfaces.GitPush[] + */ + getPushes(repositoryId: string, project: string, skip: number, top: number, searchCriteria: GitInterfaces.GitPushSearchCriteria, onResult: (err: any, statusCode: number, pushes: GitInterfaces.GitPush[]) => void): void; + /** + * Queries the provided repository for its refs and returns them. + * + * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. + * @param {string} project - Project ID or project name + * @param {string} filter - [optional] A filter to apply to the refs. + * @param {boolean} includeLinks - [optional] Specifies if referenceLinks should be included in the result. default is false. + * @param onResult callback function with the resulting GitInterfaces.GitRef[] + */ + getRefs(repositoryId: string, project: string, filter: string, includeLinks: boolean, onResult: (err: any, statusCode: number, refs: GitInterfaces.GitRef[]) => void): void; + /** + * Creates or updates refs with the given information + * + * @param {GitInterfaces.GitRefUpdate[]} refUpdates - List of ref updates to attempt to perform + * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. + * @param {string} project - Project ID or project name + * @param {string} projectId - The id of the project. + * @param onResult callback function with the resulting GitInterfaces.GitRefUpdateResult[] + */ + updateRefs(refUpdates: GitInterfaces.GitRefUpdate[], repositoryId: string, project: string, projectId: string, onResult: (err: any, statusCode: number, refs: GitInterfaces.GitRefUpdateResult[]) => void): void; + /** + * Create a git repository + * + * @param {GitInterfaces.GitRepository} gitRepositoryToCreate + * @param {string} project - Project ID or project name + * @param onResult callback function with the resulting GitInterfaces.GitRepository + */ + createRepository(gitRepositoryToCreate: GitInterfaces.GitRepository, project: string, onResult: (err: any, statusCode: number, Repositorie: GitInterfaces.GitRepository) => void): void; + /** + * Delete a git repository + * + * @param {string} repositoryId + * @param {string} project - Project ID or project name + * @param onResult callback function + */ + deleteRepository(repositoryId: string, project: string, onResult: (err: any, statusCode: number) => void): void; + /** + * Retrieve git repositories. + * + * @param {string} project - Project ID or project name + * @param {boolean} includeLinks + * @param onResult callback function with the resulting GitInterfaces.GitRepository[] + */ + getRepositories(project: string, includeLinks: boolean, onResult: (err: any, statusCode: number, Repositories: GitInterfaces.GitRepository[]) => void): void; + /** + * @param {string} repositoryId + * @param {string} project - Project ID or project name + * @param onResult callback function with the resulting GitInterfaces.GitRepository + */ + getRepository(repositoryId: string, project: string, onResult: (err: any, statusCode: number, Repositorie: GitInterfaces.GitRepository) => void): void; + /** + * Updates the Git repository with the single populated change in the specified repository information. + * + * @param {GitInterfaces.GitRepository} newRepositoryInfo + * @param {string} repositoryId + * @param {string} project - Project ID or project name + * @param onResult callback function with the resulting GitInterfaces.GitRepository + */ + updateRepository(newRepositoryInfo: GitInterfaces.GitRepository, repositoryId: string, project: string, onResult: (err: any, statusCode: number, Repositorie: GitInterfaces.GitRepository) => void): void; + /** + * @param {GitInterfaces.GitStatus} gitCommitStatusToCreate + * @param {string} commitId + * @param {string} repositoryId + * @param {string} project - Project ID or project name + * @param onResult callback function with the resulting GitInterfaces.GitStatus + */ + createCommitStatus(gitCommitStatusToCreate: GitInterfaces.GitStatus, commitId: string, repositoryId: string, project: string, onResult: (err: any, statusCode: number, Statuse: GitInterfaces.GitStatus) => void): void; + /** + * @param {string} commitId + * @param {string} repositoryId + * @param {string} project - Project ID or project name + * @param {number} top + * @param {number} skip + * @param onResult callback function with the resulting GitInterfaces.GitStatus[] + */ + getStatuses(commitId: string, repositoryId: string, project: string, top: number, skip: number, onResult: (err: any, statusCode: number, Statuses: GitInterfaces.GitStatus[]) => void): void; + /** + * @param {string} repositoryId + * @param {string} sha1 + * @param {string} project - Project ID or project name + * @param {string} projectId + * @param {boolean} recursive + * @param {string} fileName + * @param onResult callback function with the resulting GitInterfaces.GitTreeRef + */ + getTree(repositoryId: string, sha1: string, project: string, projectId: string, recursive: boolean, fileName: string, onResult: (err: any, statusCode: number, Tree: GitInterfaces.GitTreeRef) => void): void; + /** + * @param {string} repositoryId + * @param {string} sha1 + * @param {string} project - Project ID or project name + * @param {string} projectId + * @param {boolean} recursive + * @param {string} fileName + * @param onResult callback function with the resulting ArrayBuffer + */ + getTreeZip(repositoryId: string, sha1: string, project: string, projectId: string, recursive: boolean, fileName: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + } + export class QGitApi extends basem.QClientApiBase implements IQGitApi { + api: GitApi; + constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); + /** + * Gets a single blob. + * + * @param {string} repositoryId + * @param {string} sha1 + * @param {string} project - Project ID or project name + * @param {boolean} download + * @param {string} fileName + */ + getBlob(repositoryId: string, sha1: string, project?: string, download?: boolean, fileName?: string): Promise; + /** + * Gets a single blob. + * + * @param {string} repositoryId + * @param {string} sha1 + * @param {string} project - Project ID or project name + * @param {boolean} download + * @param {string} fileName + */ + getBlobContent(repositoryId: string, sha1: string, project?: string, download?: boolean, fileName?: string): Promise; + /** + * Gets one or more blobs in a zip file download. + * + * @param {string[]} blobIds + * @param {string} repositoryId + * @param {string} project - Project ID or project name + * @param {string} filename + */ + getBlobsZip(blobIds: string[], repositoryId: string, project?: string, filename?: string): Promise; + /** + * Gets a single blob. + * + * @param {string} repositoryId + * @param {string} sha1 + * @param {string} project - Project ID or project name + * @param {boolean} download + * @param {string} fileName + */ + getBlobZip(repositoryId: string, sha1: string, project?: string, download?: boolean, fileName?: string): Promise; + /** + * Retrieve statistics about a single branch. + * + * @param {string} repositoryId - Friendly name or guid of repository + * @param {string} name - Name of the branch + * @param {string} project - Project ID or project name + * @param {GitInterfaces.GitVersionDescriptor} baseVersionDescriptor + */ + getBranch(repositoryId: string, name: string, project?: string, baseVersionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise; + /** + * Retrieve statistics about all branches within a repository. + * + * @param {string} repositoryId - Friendly name or guid of repository + * @param {string} project - Project ID or project name + * @param {GitInterfaces.GitVersionDescriptor} baseVersionDescriptor + */ + getBranches(repositoryId: string, project?: string, baseVersionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise; + /** + * Retrieve changes for a particular commit. + * + * @param {string} commitId - The id of the commit. + * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. + * @param {string} project - Project ID or project name + * @param {number} top - The maximum number of changes to return. + * @param {number} skip - The number of changes to skip. + */ + getChanges(commitId: string, repositoryId: string, project?: string, top?: number, skip?: number): Promise; + /** + * Retrieve a particular commit. + * + * @param {string} commitId - The id of the commit. + * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. + * @param {string} project - Project ID or project name + * @param {number} changeCount - The number of changes to include in the result. + */ + getCommit(commitId: string, repositoryId: string, project?: string, changeCount?: number): Promise; + /** + * Retrieve git commits for a project + * + * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. + * @param {GitInterfaces.GitQueryCommitsCriteria} searchCriteria + * @param {string} project - Project ID or project name + * @param {number} skip + * @param {number} top + */ + getCommits(repositoryId: string, searchCriteria: GitInterfaces.GitQueryCommitsCriteria, project?: string, skip?: number, top?: number): Promise; + /** + * Retrieve a list of commits associated with a particular push. + * + * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. + * @param {number} pushId - The id of the push. + * @param {string} project - Project ID or project name + * @param {number} top - The maximum number of commits to return ("get the top x commits"). + * @param {number} skip - The number of commits to skip. + * @param {boolean} includeLinks + */ + getPushCommits(repositoryId: string, pushId: number, project?: string, top?: number, skip?: number, includeLinks?: boolean): Promise; + /** + * Retrieve git commits for a project + * + * @param {GitInterfaces.GitQueryCommitsCriteria} searchCriteria - Search options + * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. + * @param {string} project - Project ID or project name + * @param {number} skip + * @param {number} top + */ + getCommitsBatch(searchCriteria: GitInterfaces.GitQueryCommitsCriteria, repositoryId: string, project?: string, skip?: number, top?: number): Promise; + /** + * Retrieve deleted git repositories. + * + * @param {string} project - Project ID or project name + */ + getDeletedRepositories(project: string): Promise; + /** + * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. + * + * @param {string} repositoryId + * @param {string} path + * @param {string} project - Project ID or project name + * @param {string} scopePath + * @param {GitInterfaces.VersionControlRecursionType} recursionLevel + * @param {boolean} includeContentMetadata + * @param {boolean} latestProcessedChange + * @param {boolean} download + * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor + */ + getItem(repositoryId: string, path: string, project?: string, scopePath?: string, recursionLevel?: GitInterfaces.VersionControlRecursionType, includeContentMetadata?: boolean, latestProcessedChange?: boolean, download?: boolean, versionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise; + /** + * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. + * + * @param {string} repositoryId + * @param {string} path + * @param {string} project - Project ID or project name + * @param {string} scopePath + * @param {GitInterfaces.VersionControlRecursionType} recursionLevel + * @param {boolean} includeContentMetadata + * @param {boolean} latestProcessedChange + * @param {boolean} download + * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor + */ + getItemContent(repositoryId: string, path: string, project?: string, scopePath?: string, recursionLevel?: GitInterfaces.VersionControlRecursionType, includeContentMetadata?: boolean, latestProcessedChange?: boolean, download?: boolean, versionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise; + /** + * Get Item Metadata and/or Content for a collection of items. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. + * + * @param {string} repositoryId + * @param {string} project - Project ID or project name + * @param {string} scopePath + * @param {GitInterfaces.VersionControlRecursionType} recursionLevel + * @param {boolean} includeContentMetadata + * @param {boolean} latestProcessedChange + * @param {boolean} download + * @param {boolean} includeLinks + * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor + */ + getItems(repositoryId: string, project?: string, scopePath?: string, recursionLevel?: GitInterfaces.VersionControlRecursionType, includeContentMetadata?: boolean, latestProcessedChange?: boolean, download?: boolean, includeLinks?: boolean, versionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise; + /** + * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. + * + * @param {string} repositoryId + * @param {string} path + * @param {string} project - Project ID or project name + * @param {string} scopePath + * @param {GitInterfaces.VersionControlRecursionType} recursionLevel + * @param {boolean} includeContentMetadata + * @param {boolean} latestProcessedChange + * @param {boolean} download + * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor + */ + getItemText(repositoryId: string, path: string, project?: string, scopePath?: string, recursionLevel?: GitInterfaces.VersionControlRecursionType, includeContentMetadata?: boolean, latestProcessedChange?: boolean, download?: boolean, versionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise; + /** + * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. + * + * @param {string} repositoryId + * @param {string} path + * @param {string} project - Project ID or project name + * @param {string} scopePath + * @param {GitInterfaces.VersionControlRecursionType} recursionLevel + * @param {boolean} includeContentMetadata + * @param {boolean} latestProcessedChange + * @param {boolean} download + * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor + */ + getItemZip(repositoryId: string, path: string, project?: string, scopePath?: string, recursionLevel?: GitInterfaces.VersionControlRecursionType, includeContentMetadata?: boolean, latestProcessedChange?: boolean, download?: boolean, versionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise; + /** + * Post for retrieving a creating a batch out of a set of items in a repo / project given a list of paths or a long path + * + * @param {GitInterfaces.GitItemRequestData} requestData + * @param {string} repositoryId + * @param {string} project - Project ID or project name + */ + getItemsBatch(requestData: GitInterfaces.GitItemRequestData, repositoryId: string, project?: string): Promise; + /** + * Retrieve pull request's commits + * + * @param {string} repositoryId + * @param {number} pullRequestId + * @param {string} project - Project ID or project name + */ + getPullRequestCommits(repositoryId: string, pullRequestId: number, project?: string): Promise; + /** + * Adds a reviewer to a git pull request + * + * @param {GitInterfaces.IdentityRefWithVote} reviewer + * @param {string} repositoryId + * @param {number} pullRequestId + * @param {string} reviewerId + * @param {string} project - Project ID or project name + */ + createPullRequestReviewer(reviewer: GitInterfaces.IdentityRefWithVote, repositoryId: string, pullRequestId: number, reviewerId: string, project?: string): Promise; + /** + * Adds reviewers to a git pull request + * + * @param {VSSInterfaces.IdentityRef[]} reviewers + * @param {string} repositoryId + * @param {number} pullRequestId + * @param {string} project - Project ID or project name + */ + createPullRequestReviewers(reviewers: VSSInterfaces.IdentityRef[], repositoryId: string, pullRequestId: number, project?: string): Promise; + /** + * Adds reviewers to a git pull request + * + * @param {string} repositoryId + * @param {number} pullRequestId + * @param {string} reviewerId + * @param {string} project - Project ID or project name + */ + deletePullRequestReviewer(repositoryId: string, pullRequestId: number, reviewerId: string, project?: string): Promise; + /** + * Retrieve a reviewer from a pull request + * + * @param {string} repositoryId + * @param {number} pullRequestId + * @param {string} reviewerId + * @param {string} project - Project ID or project name + */ + getPullRequestReviewer(repositoryId: string, pullRequestId: number, reviewerId: string, project?: string): Promise; + /** + * Retrieve a pull request reviewers + * + * @param {string} repositoryId + * @param {number} pullRequestId + * @param {string} project - Project ID or project name + */ + getPullRequestReviewers(repositoryId: string, pullRequestId: number, project?: string): Promise; + /** + * Query pull requests by project + * + * @param {string} project - Project ID or project name + * @param {GitInterfaces.GitPullRequestSearchCriteria} searchCriteria + * @param {number} maxCommentLength + * @param {number} skip + * @param {number} top + */ + getPullRequestsByProject(project: string, searchCriteria: GitInterfaces.GitPullRequestSearchCriteria, maxCommentLength?: number, skip?: number, top?: number): Promise; + /** + * Create a git pull request + * + * @param {GitInterfaces.GitPullRequest} gitPullRequestToCreate + * @param {string} repositoryId + * @param {string} project - Project ID or project name + */ + createPullRequest(gitPullRequestToCreate: GitInterfaces.GitPullRequest, repositoryId: string, project?: string): Promise; + /** + * Retrieve a pull request + * + * @param {string} repositoryId + * @param {number} pullRequestId + * @param {string} project - Project ID or project name + * @param {number} maxCommentLength + * @param {number} skip + * @param {number} top + * @param {boolean} includeCommits + */ + getPullRequest(repositoryId: string, pullRequestId: number, project?: string, maxCommentLength?: number, skip?: number, top?: number, includeCommits?: boolean): Promise; + /** + * Query for pull requests + * + * @param {string} repositoryId + * @param {GitInterfaces.GitPullRequestSearchCriteria} searchCriteria + * @param {string} project - Project ID or project name + * @param {number} maxCommentLength + * @param {number} skip + * @param {number} top + */ + getPullRequests(repositoryId: string, searchCriteria: GitInterfaces.GitPullRequestSearchCriteria, project?: string, maxCommentLength?: number, skip?: number, top?: number): Promise; + /** + * Updates a pull request + * + * @param {GitInterfaces.GitPullRequest} gitPullRequestToUpdate + * @param {string} repositoryId + * @param {number} pullRequestId + * @param {string} project - Project ID or project name + */ + updatePullRequest(gitPullRequestToUpdate: GitInterfaces.GitPullRequest, repositoryId: string, pullRequestId: number, project?: string): Promise; + /** + * Retrieve a pull request work items + * + * @param {string} repositoryId + * @param {number} pullRequestId + * @param {string} project - Project ID or project name + * @param {number} commitsTop + * @param {number} commitsSkip + */ + getPullRequestWorkItems(repositoryId: string, pullRequestId: number, project?: string, commitsTop?: number, commitsSkip?: number): Promise; + /** + * Push changes to the repository. + * + * @param {GitInterfaces.GitPush} push + * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, a project-scoped route must be used. + * @param {string} project - Project ID or project name + */ + createPush(push: GitInterfaces.GitPush, repositoryId: string, project?: string): Promise; + /** + * Retrieve a particular push. + * + * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. + * @param {number} pushId - The id of the push. + * @param {string} project - Project ID or project name + * @param {number} includeCommits - The number of commits to include in the result. + * @param {boolean} includeRefUpdates + */ + getPush(repositoryId: string, pushId: number, project?: string, includeCommits?: number, includeRefUpdates?: boolean): Promise; + /** + * Retrieves pushes associated with the specified repository. + * + * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. + * @param {string} project - Project ID or project name + * @param {number} skip + * @param {number} top + * @param {GitInterfaces.GitPushSearchCriteria} searchCriteria + */ + getPushes(repositoryId: string, project?: string, skip?: number, top?: number, searchCriteria?: GitInterfaces.GitPushSearchCriteria): Promise; + /** + * Queries the provided repository for its refs and returns them. + * + * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. + * @param {string} project - Project ID or project name + * @param {string} filter - [optional] A filter to apply to the refs. + * @param {boolean} includeLinks - [optional] Specifies if referenceLinks should be included in the result. default is false. + */ + getRefs(repositoryId: string, project?: string, filter?: string, includeLinks?: boolean): Promise; + /** + * Creates or updates refs with the given information + * + * @param {GitInterfaces.GitRefUpdate[]} refUpdates - List of ref updates to attempt to perform + * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. + * @param {string} project - Project ID or project name + * @param {string} projectId - The id of the project. + */ + updateRefs(refUpdates: GitInterfaces.GitRefUpdate[], repositoryId: string, project?: string, projectId?: string): Promise; + /** + * Create a git repository + * + * @param {GitInterfaces.GitRepository} gitRepositoryToCreate + * @param {string} project - Project ID or project name + */ + createRepository(gitRepositoryToCreate: GitInterfaces.GitRepository, project?: string): Promise; + /** + * Delete a git repository + * + * @param {string} repositoryId + * @param {string} project - Project ID or project name + */ + deleteRepository(repositoryId: string, project?: string): Promise; + /** + * Retrieve git repositories. + * + * @param {string} project - Project ID or project name + * @param {boolean} includeLinks + */ + getRepositories(project?: string, includeLinks?: boolean): Promise; + /** + * @param {string} repositoryId + * @param {string} project - Project ID or project name + */ + getRepository(repositoryId: string, project?: string): Promise; + /** + * Updates the Git repository with the single populated change in the specified repository information. + * + * @param {GitInterfaces.GitRepository} newRepositoryInfo + * @param {string} repositoryId + * @param {string} project - Project ID or project name + */ + updateRepository(newRepositoryInfo: GitInterfaces.GitRepository, repositoryId: string, project?: string): Promise; + /** + * @param {GitInterfaces.GitStatus} gitCommitStatusToCreate + * @param {string} commitId + * @param {string} repositoryId + * @param {string} project - Project ID or project name + */ + createCommitStatus(gitCommitStatusToCreate: GitInterfaces.GitStatus, commitId: string, repositoryId: string, project?: string): Promise; + /** + * @param {string} commitId + * @param {string} repositoryId + * @param {string} project - Project ID or project name + * @param {number} top + * @param {number} skip + */ + getStatuses(commitId: string, repositoryId: string, project?: string, top?: number, skip?: number): Promise; + /** + * @param {string} repositoryId + * @param {string} sha1 + * @param {string} project - Project ID or project name + * @param {string} projectId + * @param {boolean} recursive + * @param {string} fileName + */ + getTree(repositoryId: string, sha1: string, project?: string, projectId?: string, recursive?: boolean, fileName?: string): Promise; + /** + * @param {string} repositoryId + * @param {string} sha1 + * @param {string} project - Project ID or project name + * @param {string} projectId + * @param {boolean} recursive + * @param {string} fileName + */ + getTreeZip(repositoryId: string, sha1: string, project?: string, projectId?: string, recursive?: boolean, fileName?: string): Promise; + } + +} +declare module 'vso-node-api/interfaces/common/FormInputInterfaces' { + export enum InputDataType { + /** + * No data type is specified. + */ + None = 0, + /** + * Represents a textual value. + */ + String = 10, + /** + * Represents a numberic value. + */ + Number = 20, + /** + * Represents a value of true or false. + */ + Boolean = 30, + /** + * Represents a Guid. + */ + Guid = 40, + /** + * Represents a URI. + */ + Uri = 50, + } + /** + * Describes an input for subscriptions. + */ + export interface InputDescriptor { + /** + * The ids of all inputs that the value of this input is dependent on. + */ + dependencyInputIds: string[]; + /** + * Description of what this input is used for + */ + description: string; + /** + * The group localized name to which this input belongs and can be shown as a header for the container that will include all the inputs in the group. + */ + groupName: string; + /** + * If true, the value information for this input is dynamic and should be fetched when the value of dependency inputs change. + */ + hasDynamicValueInformation: boolean; + /** + * Identifier for the subscription input + */ + id: string; + /** + * Mode in which the value of this input should be entered + */ + inputMode: InputMode; + /** + * Gets whether this input is confidential, such as for a password or application key + */ + isConfidential: boolean; + /** + * Localized name which can be shown as a label for the subscription input + */ + name: string; + /** + * Gets whether this input is included in the default generated action description. + */ + useInDefaultDescription: boolean; + /** + * Information to use to validate this input's value + */ + validation: InputValidation; + /** + * A hint for input value. It can be used in the UI as the input placeholder. + */ + valueHint: string; + /** + * Information about possible values for this input + */ + values: InputValues; + } + /** + * Defines a filter for subscription inputs. The filter matches a set of inputs if any (one or more) of the groups evaluates to true. + */ + export interface InputFilter { + /** + * Groups of input filter expressions. This filter matches a set of inputs if any (one or more) of the groups evaluates to true. + */ + conditions: InputFilterCondition[]; + } + /** + * An expression which can be applied to filter a list of subscription inputs + */ + export interface InputFilterCondition { + /** + * Whether or not to do a case sensitive match + */ + caseSensitive: boolean; + /** + * The Id of the input to filter on + */ + inputId: string; + /** + * The "expected" input value to compare with the actual input value + */ + inputValue: string; + /** + * The operator applied between the expected and actual input value + */ + operator: InputFilterOperator; + } + export enum InputFilterOperator { + Equals = 0, + NotEquals = 1, + } + export enum InputMode { + /** + * This input should not be shown in the UI + */ + None = 0, + /** + * An input text box should be shown + */ + TextBox = 10, + /** + * An password input box should be shown + */ + PasswordBox = 20, + /** + * A select/combo control should be shown + */ + Combo = 30, + /** + * Radio buttons should be shown + */ + RadioButtons = 40, + /** + * Checkbox should be shown(for true/false values) + */ + CheckBox = 50, + /** + * A multi-line text area should be shown + */ + TextArea = 60, + } + /** + * Describes what values are valid for a subscription input + */ + export interface InputValidation { + dataType: InputDataType; + isRequired: boolean; + maxLength: number; + maxValue: number; + minLength: number; + minValue: number; + pattern: string; + patternMismatchErrorMessage: string; + } + /** + * Information about a single value for an input + */ + export interface InputValue { + /** + * Any other data about this input + */ + data: { + [key: string]: any; + }; + /** + * The text to show for the display of this value + */ + displayValue: string; + /** + * The value to store for this input + */ + value: string; + } + /** + * Information about the possible/allowed values for a given subscription input + */ + export interface InputValues { + /** + * The default value to use for this input + */ + defaultValue: string; + /** + * Errors encountered while computing dynamic values. + */ + error: InputValuesError; + /** + * The id of the input + */ + inputId: string; + /** + * Should this input be disabled + */ + isDisabled: boolean; + /** + * Should the value be restricted to one of the values in the PossibleValues (True) or are the values in PossibleValues just a suggestion (False) + */ + isLimitedToPossibleValues: boolean; + /** + * Should this input be made read-only + */ + isReadOnly: boolean; + /** + * Possible values that this input can take + */ + possibleValues: InputValue[]; + } + /** + * Error information related to a subscription input value. + */ + export interface InputValuesError { + /** + * The error message. + */ + message: string; + } + export interface InputValuesQuery { + currentValues: { + [key: string]: string; + }; + /** + * The input values to return on input, and the result from the consumer on output. + */ + inputValues: InputValues[]; + /** + * Subscription containing information about the publisher/consumer and the current input values + */ + resource: any; + } + export var TypeInfo: { + InputDataType: { + enumValues: { + "none": number; + "string": number; + "number": number; + "boolean": number; + "guid": number; + "uri": number; + }; + }; + InputDescriptor: { + fields: any; + }; + InputFilter: { + fields: any; + }; + InputFilterCondition: { + fields: any; + }; + InputFilterOperator: { + enumValues: { + "equals": number; + "notEquals": number; + }; + }; + InputMode: { + enumValues: { + "none": number; + "textBox": number; + "passwordBox": number; + "combo": number; + "radioButtons": number; + "checkBox": number; + "textArea": number; + }; + }; + InputValidation: { + fields: any; + }; + InputValue: { + fields: any; + }; + InputValues: { + fields: any; + }; + InputValuesError: { + fields: any; + }; + InputValuesQuery: { + fields: any; + }; + }; + +} +declare module 'vso-node-api/interfaces/TaskAgentInterfaces' { + import FormInputInterfaces = require('vso-node-api/interfaces/common/FormInputInterfaces'); + import VSSInterfaces = require('vso-node-api/interfaces/common/VSSInterfaces'); + export interface AgentPoolEvent { + eventType: string; + pool: TaskAgentPool; + } + export interface AgentQueueEvent { + eventType: string; + queue: TaskAgentQueue; + } + export interface AgentRefreshMessage { + agentId: number; + timeout: any; + } + export interface AuthorizationHeader { + name: string; + value: string; + } + export enum ConnectedServiceKind { + /** + * Custom or unknown service + */ + Custom = 0, + /** + * Azure Subscription + */ + AzureSubscription = 1, + /** + * Chef Connection + */ + Chef = 2, + /** + * Generic Connection + */ + Generic = 3, + /** + * GitHub Connection + */ + GitHub = 4, + } + export interface DataSource { + endpointUrl: string; + name: string; + resultSelector: string; + } + export interface DataSourceBinding { + dataSourceName: string; + endpointId: string; + parameters: { + [key: string]: string; + }; + resultTemplate: string; + target: string; + } + export interface EndpointAuthorization { + parameters: { + [key: string]: string; + }; + scheme: string; + } + export interface EndpointUrl { + displayName: string; + helpText: string; + value: string; + } + export interface HelpLink { + text: string; + url: string; + } + export interface Issue { + category: string; + data: { + [key: string]: string; + }; + message: string; + type: IssueType; + } + export enum IssueType { + Error = 1, + Warning = 2, + } + export interface JobAssignedEvent extends JobEvent { + request: TaskAgentJobRequest; + } + export interface JobCancelMessage { + jobId: string; + timeout: any; + } + export interface JobCompletedEvent extends JobEvent { + requestId: number; + result: TaskResult; + } + /** + * Represents the context of variables and vectors for a job request. + */ + export interface JobEnvironment { + endpoints: ServiceEndpoint[]; + mask: MaskHint[]; + options: { + [key: string]: JobOption; + }; + /** + * Gets or sets the endpoint used for communicating back to the calling service. + */ + systemConnection: ServiceEndpoint; + variables: { + [key: string]: string; + }; + } + export interface JobEvent { + jobId: string; + name: string; + } + /** + * Represents an option that may affect the way an agent runs the job. + */ + export interface JobOption { + data: { + [key: string]: string; + }; + /** + * Gets the id of the option. + */ + id: string; + } + export interface JobRequestMessage { + environment: JobEnvironment; + jobId: string; + jobName: string; + lockedUntil: Date; + lockToken: string; + plan: TaskOrchestrationPlanReference; + requestId: number; + tasks: TaskInstance[]; + timeline: TimelineReference; + } + export interface MaskHint { + type: MaskType; + value: string; + } + export enum MaskType { + Variable = 1, + Regex = 2, + } + export interface PlanEnvironment { + mask: MaskHint[]; + options: { + [key: string]: JobOption; + }; + variables: { + [key: string]: string; + }; + } + /** + * Represents an endpoint which may be used by an orchestration job. + */ + export interface ServiceEndpoint { + administratorsGroup: VSSInterfaces.IdentityRef; + /** + * Gets or sets the authorization data for talking to the endpoint. + */ + authorization: EndpointAuthorization; + /** + * The Gets or sets Identity reference for the user who created the Service endpoint + */ + createdBy: VSSInterfaces.IdentityRef; + data: { + [key: string]: string; + }; + /** + * Gets or Sets description of endpoint + */ + description: string; + groupScopeId: string; + /** + * Gets or sets the identifier of this endpoint. + */ + id: string; + /** + * Gets or sets the friendly name of the endpoint. + */ + name: string; + readersGroup: VSSInterfaces.IdentityRef; + /** + * Gets or sets the type of the endpoint. + */ + type: string; + /** + * Gets or sets the url of the endpoint. + */ + url: string; + } + export interface ServiceEndpointAuthenticationScheme { + authorizationHeaders: AuthorizationHeader[]; + displayName: string; + endpointHeaders: AuthorizationHeader[]; + inputDescriptors: FormInputInterfaces.InputDescriptor[]; + scheme: string; + } + export interface ServiceEndpointType { + authenticationSchemes: ServiceEndpointAuthenticationScheme[]; + dataSources: DataSource[]; + description: string; + displayName: string; + endpointUrl: EndpointUrl; + helpLink: HelpLink; + helpMarkDown: string; + name: string; + } + export interface TaskAgent extends TaskAgentReference { + /** + * Gets the request which is currently assigned to this agent. + */ + assignedRequest: TaskAgentJobRequest; + /** + * Gets the date on which this agent was created. + */ + createdOn: Date; + /** + * Gets or sets the maximum job parallelism allowed on this host. + */ + maxParallelism: number; + properties: any; + /** + * Gets the date on which the last connectivity status change occurred. + */ + statusChangedOn: Date; + systemCapabilities: { + [key: string]: string; + }; + userCapabilities: { + [key: string]: string; + }; + } + export interface TaskAgentJobRequest { + assignTime: Date; + definition: TaskOrchestrationOwner; + demands: any[]; + finishTime: Date; + hostId: string; + jobId: string; + lockedUntil: Date; + matchedAgents: TaskAgentReference[]; + owner: TaskOrchestrationOwner; + planId: string; + planType: string; + queueTime: Date; + receiveTime: Date; + requestId: number; + reservedAgent: TaskAgentReference; + result: TaskResult; + scopeId: string; + serviceOwner: string; + } + export interface TaskAgentMessage { + body: string; + messageId: number; + messageType: string; + } + export interface TaskAgentPool extends TaskAgentPoolReference { + /** + * Gets the administrators group for this agent pool. + */ + administratorsGroup: VSSInterfaces.IdentityRef; + /** + * Gets or sets a value indicating whether or not a queue should be automatically provisioned for each project collection or not. + */ + autoProvision: boolean; + /** + * Gets the identity who created this pool. The creator of the pool is automatically added into the administrators group for the pool on creation. + */ + createdBy: VSSInterfaces.IdentityRef; + /** + * Gets the date/time of the pool creation. + */ + createdOn: Date; + /** + * Gets the scope identifier for groups/roles which are owned by this pool. + */ + groupScopeId: string; + /** + * Gets or sets a value indicating whether or not this pool is managed by the service. + */ + isHosted: boolean; + properties: any; + /** + * Gets a value indicating whether or not roles have been provisioned for this pool. + */ + provisioned: boolean; + /** + * Gets the service accounts group for this agent pool. + */ + serviceAccountsGroup: VSSInterfaces.IdentityRef; + /** + * Gets the current size of the pool. + */ + size: number; + } + export interface TaskAgentPoolReference { + id: number; + name: string; + scope: string; + } + export interface TaskAgentQueue { + groupScopeId: string; + id: number; + name: string; + pool: TaskAgentPoolReference; + provisioned: boolean; + } + export enum TaskAgentQueueActionFilter { + None = 0, + Manage = 2, + Use = 16, + } + export interface TaskAgentReference { + _links: any; + /** + * Gets or sets a value indicating whether or not this agent should be enabled for job execution. + */ + enabled: boolean; + /** + * Gets the identifier of the agent. + */ + id: number; + /** + * Gets the name of the agent. + */ + name: string; + /** + * Gets the current connectivity status of the agent. + */ + status: TaskAgentStatus; + /** + * Gets the version of the agent. + */ + version: string; + } + export interface TaskAgentSession { + agent: TaskAgentReference; + ownerName: string; + sessionId: string; + systemCapabilities: { + [key: string]: string; + }; + } + export enum TaskAgentStatus { + Offline = 1, + Online = 2, + } + export interface TaskAttachment { + _links: any; + createdOn: Date; + lastChangedBy: string; + lastChangedOn: Date; + name: string; + recordId: string; + timelineId: string; + type: string; + } + export interface TaskChangeEvent { + } + export interface TaskDefinition { + agentExecution: TaskExecution; + author: string; + category: string; + contentsUploaded: boolean; + contributionIdentifier: string; + contributionVersion: string; + dataSourceBindings: DataSourceBinding[]; + demands: any[]; + description: string; + disabled: boolean; + friendlyName: string; + groups: TaskGroupDefinition[]; + helpMarkDown: string; + hostType: string; + iconUrl: string; + id: string; + inputs: TaskInputDefinition[]; + instanceNameFormat: string; + minimumAgentVersion: string; + name: string; + packageLocation: string; + packageType: string; + serverOwned: boolean; + sourceDefinitions: TaskSourceDefinition[]; + sourceLocation: string; + version: TaskVersion; + visibility: string[]; + } + export interface TaskDefinitionEndpoint { + /** + * An ID that identifies a service connection to be used for authenticating endpoint requests. + */ + connectionId: string; + /** + * An Json based keyselector to filter response returned by fetching the endpoint Url.A Json based keyselector must be prefixed with "jsonpath:". KeySelector can be used to specify the filter to get the keys for the values specified with Selector. The following keyselector defines an Json for extracting nodes named 'ServiceName'. endpoint.KeySelector = "jsonpath://ServiceName"; + */ + keySelector: string; + /** + * The scope as understood by Connected Services. Essentialy, a project-id for now. + */ + scope: string; + /** + * An XPath/Json based selector to filter response returned by fetching the endpoint Url. An XPath based selector must be prefixed with the string "xpath:". A Json based selector must be prefixed with "jsonpath:". The following selector defines an XPath for extracting nodes named 'ServiceName'. endpoint.Selector = "xpath://ServiceName"; + */ + selector: string; + /** + * TaskId that this endpoint belongs to. + */ + taskId: string; + /** + * URL to GET. + */ + url: string; + } + export interface TaskExecution { + /** + * The utility task to run. Specifying this means that this task definition is simply a meta task to call another task. This is useful for tasks that call utility tasks like powershell and commandline + */ + execTask: TaskReference; + /** + * If a task is going to run code, then this provides the type/script etc... information by platform. For example, it might look like. net45: { typeName: "Microsoft.TeamFoundation.Automation.Tasks.PowerShellTask", assemblyName: "Microsoft.TeamFoundation.Automation.Tasks.PowerShell.dll" } net20: { typeName: "Microsoft.TeamFoundation.Automation.Tasks.PowerShellTask", assemblyName: "Microsoft.TeamFoundation.Automation.Tasks.PowerShell.dll" } java: { jar: "powershelltask.tasks.automation.teamfoundation.microsoft.com", } node: { script: "powershellhost.js", } + */ + platformInstructions: { + [key: string]: { + [key: string]: string; + }; + }; + } + export interface TaskGroupDefinition { + displayName: string; + isExpanded: boolean; + name: string; + tags: string[]; + } + export interface TaskInputDefinition { + defaultValue: string; + groupName: string; + helpMarkDown: string; + label: string; + name: string; + options: { + [key: string]: string; + }; + properties: { + [key: string]: string; + }; + required: boolean; + type: string; + visibleRule: string; + } + export interface TaskInstance extends TaskReference { + alwaysRun: boolean; + continueOnError: boolean; + displayName: string; + enabled: boolean; + instanceId: string; + } + export interface TaskLog extends TaskLogReference { + createdOn: Date; + indexLocation: string; + lastChangedOn: Date; + lineCount: number; + path: string; + } + export interface TaskLogReference { + id: number; + location: string; + } + export interface TaskOrchestrationContainer extends TaskOrchestrationItem { + children: TaskOrchestrationItem[]; + continueOnError: boolean; + parallel: boolean; + rollback: TaskOrchestrationContainer; + } + export interface TaskOrchestrationItem { + itemType: TaskOrchestrationItemType; + } + export enum TaskOrchestrationItemType { + Container = 0, + Job = 1, + } + export interface TaskOrchestrationJob extends TaskOrchestrationItem { + demands: any[]; + executeAs: VSSInterfaces.IdentityRef; + executionTimeout: any; + instanceId: string; + name: string; + tasks: TaskInstance[]; + variables: { + [key: string]: string; + }; + } + export interface TaskOrchestrationOwner { + _links: any; + id: number; + name: string; + } + export interface TaskOrchestrationPlan extends TaskOrchestrationPlanReference { + environment: PlanEnvironment; + finishTime: Date; + implementation: TaskOrchestrationContainer; + requestedById: string; + requestedForId: string; + result: TaskResult; + resultCode: string; + startTime: Date; + state: TaskOrchestrationPlanState; + timeline: TimelineReference; + } + export interface TaskOrchestrationPlanReference { + artifactLocation: string; + artifactUri: string; + planId: string; + planType: string; + scopeIdentifier: string; + version: number; + } + export enum TaskOrchestrationPlanState { + InProgress = 1, + Queued = 2, + Completed = 4, + } + export interface TaskPackageMetadata { + /** + * Gets the name of the package. + */ + type: string; + /** + * Gets the url of the package. + */ + url: string; + /** + * Gets the version of the package. + */ + version: string; + } + export interface TaskReference { + id: string; + inputs: { + [key: string]: string; + }; + name: string; + version: string; + } + export enum TaskResult { + Succeeded = 0, + SucceededWithIssues = 1, + Failed = 2, + Canceled = 3, + Skipped = 4, + Abandoned = 5, + } + export interface TaskSourceDefinition { + authKey: string; + endpoint: string; + keySelector: string; + selector: string; + target: string; + } + export interface TaskVersion { + isTest: boolean; + major: number; + minor: number; + patch: number; + } + /** + * Represents a shallow reference to a TeamProject. + */ + export interface TeamProjectReference { + /** + * Project abbreviation. + */ + abbreviation: string; + /** + * The project's description (if any). + */ + description: string; + /** + * Project identifier. + */ + id: string; + /** + * Project name. + */ + name: string; + /** + * Project state. + */ + state: any; + /** + * Url to the full version of the object. + */ + url: string; + } + export interface Timeline extends TimelineReference { + lastChangedBy: string; + lastChangedOn: Date; + records: TimelineRecord[]; + } + export interface TimelineRecord { + changeId: number; + currentOperation: string; + details: TimelineReference; + errorCount: number; + finishTime: Date; + id: string; + issues: Issue[]; + lastModified: Date; + location: string; + log: TaskLogReference; + name: string; + order: number; + parentId: string; + percentComplete: number; + result: TaskResult; + resultCode: string; + startTime: Date; + state: TimelineRecordState; + type: string; + warningCount: number; + workerName: string; + } + export enum TimelineRecordState { + Pending = 0, + InProgress = 1, + Completed = 2, + } + export interface TimelineReference { + changeId: number; + id: string; + location: string; + } + export interface WebApiConnectedService extends WebApiConnectedServiceRef { + /** + * The user who did the OAuth authentication to created this service + */ + authenticatedBy: VSSInterfaces.IdentityRef; + /** + * Extra description on the service. + */ + description: string; + /** + * Friendly Name of service connection + */ + friendlyName: string; + /** + * Id/Name of the connection service. For Ex: Subscription Id for Azure Connection + */ + id: string; + /** + * The kind of service. + */ + kind: string; + /** + * The project associated with this service + */ + project: TeamProjectReference; + /** + * Optional uri to connect directly to the service such as https://windows.azure.com + */ + serviceUri: string; + } + export interface WebApiConnectedServiceDetails extends WebApiConnectedServiceRef { + /** + * Meta data for service connection + */ + connectedServiceMetaData: WebApiConnectedService; + /** + * Credential info + */ + credentialsXml: string; + /** + * Optional uri to connect directly to the service such as https://windows.azure.com + */ + endPoint: string; + } + export interface WebApiConnectedServiceRef { + id: string; + url: string; + } + export var TypeInfo: { + AgentPoolEvent: { + fields: any; + }; + AgentQueueEvent: { + fields: any; + }; + AgentRefreshMessage: { + fields: any; + }; + AuthorizationHeader: { + fields: any; + }; + ConnectedServiceKind: { + enumValues: { + "custom": number; + "azureSubscription": number; + "chef": number; + "generic": number; + "gitHub": number; + }; + }; + DataSource: { + fields: any; + }; + DataSourceBinding: { + fields: any; + }; + EndpointAuthorization: { + fields: any; + }; + EndpointUrl: { + fields: any; + }; + HelpLink: { + fields: any; + }; + Issue: { + fields: any; + }; + IssueType: { + enumValues: { + "error": number; + "warning": number; + }; + }; + JobAssignedEvent: { + fields: any; + }; + JobCancelMessage: { + fields: any; + }; + JobCompletedEvent: { + fields: any; + }; + JobEnvironment: { + fields: any; + }; + JobEvent: { + fields: any; + }; + JobOption: { + fields: any; + }; + JobRequestMessage: { + fields: any; + }; + MaskHint: { + fields: any; + }; + MaskType: { + enumValues: { + "variable": number; + "regex": number; + }; + }; + PlanEnvironment: { + fields: any; + }; + ServiceEndpoint: { + fields: any; + }; + ServiceEndpointAuthenticationScheme: { + fields: any; + }; + ServiceEndpointType: { + fields: any; + }; + TaskAgent: { + fields: any; + }; + TaskAgentJobRequest: { + fields: any; + }; + TaskAgentMessage: { + fields: any; + }; + TaskAgentPool: { + fields: any; + }; + TaskAgentPoolReference: { + fields: any; + }; + TaskAgentQueue: { + fields: any; + }; + TaskAgentQueueActionFilter: { + enumValues: { + "none": number; + "manage": number; + "use": number; + }; + }; + TaskAgentReference: { + fields: any; + }; + TaskAgentSession: { + fields: any; + }; + TaskAgentStatus: { + enumValues: { + "offline": number; + "online": number; + }; + }; + TaskAttachment: { + fields: any; + }; + TaskChangeEvent: { + fields: any; + }; + TaskDefinition: { + fields: any; + }; + TaskDefinitionEndpoint: { + fields: any; + }; + TaskExecution: { + fields: any; + }; + TaskGroupDefinition: { + fields: any; + }; + TaskInputDefinition: { + fields: any; + }; + TaskInstance: { + fields: any; + }; + TaskLog: { + fields: any; + }; + TaskLogReference: { + fields: any; + }; + TaskOrchestrationContainer: { + fields: any; + }; + TaskOrchestrationItem: { + fields: any; + }; + TaskOrchestrationItemType: { + enumValues: { + "container": number; + "job": number; + }; + }; + TaskOrchestrationJob: { + fields: any; + }; + TaskOrchestrationOwner: { + fields: any; + }; + TaskOrchestrationPlan: { + fields: any; + }; + TaskOrchestrationPlanReference: { + fields: any; + }; + TaskOrchestrationPlanState: { + enumValues: { + "inProgress": number; + "queued": number; + "completed": number; + }; + }; + TaskPackageMetadata: { + fields: any; + }; + TaskReference: { + fields: any; + }; + TaskResult: { + enumValues: { + "succeeded": number; + "succeededWithIssues": number; + "failed": number; + "canceled": number; + "skipped": number; + "abandoned": number; + }; + }; + TaskSourceDefinition: { + fields: any; + }; + TaskVersion: { + fields: any; + }; + TeamProjectReference: { + fields: any; + }; + Timeline: { + fields: any; + }; + TimelineRecord: { + fields: any; + }; + TimelineRecordState: { + enumValues: { + "pending": number; + "inProgress": number; + "completed": number; + }; + }; + TimelineReference: { + fields: any; + }; + WebApiConnectedService: { + fields: any; + }; + WebApiConnectedServiceDetails: { + fields: any; + }; + WebApiConnectedServiceRef: { + fields: any; + }; + }; + +} +declare module 'vso-node-api/TaskAgentApiBase' { + + + import Q = require('q'); + import basem = require('vso-node-api/ClientApiBases'); + import VsoBaseInterfaces = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); + import TaskAgentInterfaces = require('vso-node-api/interfaces/TaskAgentInterfaces'); + import VSSInterfaces = require('vso-node-api/interfaces/common/VSSInterfaces'); + export interface ITaskAgentApiBase extends basem.ClientApiBase { + addAgent(agent: TaskAgentInterfaces.TaskAgent, poolId: number, onResult: (err: any, statusCode: number, agent: TaskAgentInterfaces.TaskAgent) => void): void; + deleteAgent(poolId: number, agentId: number, onResult: (err: any, statusCode: number) => void): void; + getAgent(poolId: number, agentId: number, includeCapabilities: boolean, includeAssignedRequest: boolean, propertyFilters: string[], onResult: (err: any, statusCode: number, agent: TaskAgentInterfaces.TaskAgent) => void): void; + getAgents(poolId: number, agentName: string, includeCapabilities: boolean, includeAssignedRequest: boolean, propertyFilters: string[], demands: string[], onResult: (err: any, statusCode: number, agents: TaskAgentInterfaces.TaskAgent[]) => void): void; + replaceAgent(agent: TaskAgentInterfaces.TaskAgent, poolId: number, agentId: number, onResult: (err: any, statusCode: number, agent: TaskAgentInterfaces.TaskAgent) => void): void; + updateAgent(agent: TaskAgentInterfaces.TaskAgent, poolId: number, agentId: number, onResult: (err: any, statusCode: number, agent: TaskAgentInterfaces.TaskAgent) => void): void; + queryEndpoint(endpoint: TaskAgentInterfaces.TaskDefinitionEndpoint, onResult: (err: any, statusCode: number, endpoint: string[]) => void): void; + deleteAgentRequest(poolId: number, requestId: number, lockToken: string, onResult: (err: any, statusCode: number) => void): void; + getAgentRequest(poolId: number, requestId: number, onResult: (err: any, statusCode: number, jobrequest: TaskAgentInterfaces.TaskAgentJobRequest) => void): void; + getAgentRequestsForAgent(poolId: number, agentId: number, completedRequestCount: number, onResult: (err: any, statusCode: number, jobrequests: TaskAgentInterfaces.TaskAgentJobRequest[]) => void): void; + getAgentRequestsForAgents(poolId: number, agentIds: number[], completedRequestCount: number, onResult: (err: any, statusCode: number, jobrequests: TaskAgentInterfaces.TaskAgentJobRequest[]) => void): void; + getAgentRequestsForPlan(poolId: number, planId: string, jobId: string, onResult: (err: any, statusCode: number, jobrequests: TaskAgentInterfaces.TaskAgentJobRequest[]) => void): void; + queueAgentRequest(request: TaskAgentInterfaces.TaskAgentJobRequest, poolId: number, onResult: (err: any, statusCode: number, jobrequest: TaskAgentInterfaces.TaskAgentJobRequest) => void): void; + updateAgentRequest(request: TaskAgentInterfaces.TaskAgentJobRequest, poolId: number, requestId: number, lockToken: string, onResult: (err: any, statusCode: number, jobrequest: TaskAgentInterfaces.TaskAgentJobRequest) => void): void; + deleteMessage(poolId: number, messageId: number, sessionId: string, onResult: (err: any, statusCode: number) => void): void; + getMessage(poolId: number, sessionId: string, lastMessageId: number, onResult: (err: any, statusCode: number, message: TaskAgentInterfaces.TaskAgentMessage) => void): void; + refreshAgent(poolId: number, agentId: number, onResult: (err: any, statusCode: number) => void): void; + refreshAgents(poolId: number, onResult: (err: any, statusCode: number) => void): void; + sendMessage(message: TaskAgentInterfaces.TaskAgentMessage, poolId: number, requestId: number, onResult: (err: any, statusCode: number) => void): void; + getPackage(packageType: string, onResult: (err: any, statusCode: number, _package: TaskAgentInterfaces.TaskPackageMetadata) => void): void; + getPackages(onResult: (err: any, statusCode: number, packages: TaskAgentInterfaces.TaskPackageMetadata[]) => void): void; + getPackageZip(packageType: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + getAgentPoolRoles(poolId: number, onResult: (err: any, statusCode: number, poolroles: VSSInterfaces.IdentityRef[]) => void): void; + addAgentPool(pool: TaskAgentInterfaces.TaskAgentPool, onResult: (err: any, statusCode: number, pool: TaskAgentInterfaces.TaskAgentPool) => void): void; + deleteAgentPool(poolId: number, onResult: (err: any, statusCode: number) => void): void; + getAgentPool(poolId: number, properties: string[], onResult: (err: any, statusCode: number, pool: TaskAgentInterfaces.TaskAgentPool) => void): void; + getAgentPools(poolName: string, properties: string[], onResult: (err: any, statusCode: number, pools: TaskAgentInterfaces.TaskAgentPool[]) => void): void; + updateAgentPool(pool: TaskAgentInterfaces.TaskAgentPool, poolId: number, onResult: (err: any, statusCode: number, pool: TaskAgentInterfaces.TaskAgentPool) => void): void; + getAgentQueueRoles(queueId: number, onResult: (err: any, statusCode: number, queueroles: VSSInterfaces.IdentityRef[]) => void): void; + addAgentQueue(queue: TaskAgentInterfaces.TaskAgentQueue, onResult: (err: any, statusCode: number, queue: TaskAgentInterfaces.TaskAgentQueue) => void): void; + deleteAgentQueue(queueId: number, onResult: (err: any, statusCode: number) => void): void; + getAgentQueue(queueId: number, actionFilter: TaskAgentInterfaces.TaskAgentQueueActionFilter, onResult: (err: any, statusCode: number, queue: TaskAgentInterfaces.TaskAgentQueue) => void): void; + getAgentQueues(queueName: string, actionFilter: TaskAgentInterfaces.TaskAgentQueueActionFilter, onResult: (err: any, statusCode: number, queues: TaskAgentInterfaces.TaskAgentQueue[]) => void): void; + queryServiceEndpoint(binding: TaskAgentInterfaces.DataSourceBinding, scopeIdentifier: string, onResult: (err: any, statusCode: number, serviceendpointproxy: string[]) => void): void; + createServiceEndpoint(endpoint: TaskAgentInterfaces.ServiceEndpoint, scopeIdentifier: string, onResult: (err: any, statusCode: number, serviceendpoint: TaskAgentInterfaces.ServiceEndpoint) => void): void; + deleteServiceEndpoint(scopeIdentifier: string, endpointId: string, onResult: (err: any, statusCode: number) => void): void; + getServiceEndpointDetails(scopeIdentifier: string, endpointId: string, onResult: (err: any, statusCode: number, serviceendpoint: TaskAgentInterfaces.ServiceEndpoint) => void): void; + getServiceEndpoints(scopeIdentifier: string, type: string, authSchemes: string[], endpointIds: string[], onResult: (err: any, statusCode: number, serviceendpoints: TaskAgentInterfaces.ServiceEndpoint[]) => void): void; + updateServiceEndpoint(endpoint: TaskAgentInterfaces.ServiceEndpoint, scopeIdentifier: string, endpointId: string, onResult: (err: any, statusCode: number, serviceendpoint: TaskAgentInterfaces.ServiceEndpoint) => void): void; + getServiceEndpointTypes(scopeIdentifier: string, type: string, scheme: string, onResult: (err: any, statusCode: number, serviceendpointtypes: TaskAgentInterfaces.ServiceEndpointType[]) => void): void; + createAgentSession(session: TaskAgentInterfaces.TaskAgentSession, poolId: number, onResult: (err: any, statusCode: number, session: TaskAgentInterfaces.TaskAgentSession) => void): void; + deleteAgentSession(poolId: number, sessionId: string, onResult: (err: any, statusCode: number) => void): void; + deleteTaskDefinition(taskId: string, onResult: (err: any, statusCode: number) => void): void; + getTaskContentZip(taskId: string, versionString: string, visibility: string[], scopeLocal: boolean, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + getTaskDefinition(taskId: string, versionString: string, visibility: string[], scopeLocal: boolean, onResult: (err: any, statusCode: number, task: TaskAgentInterfaces.TaskDefinition) => void): void; + getTaskDefinitions(taskId: string, visibility: string[], scopeLocal: boolean, onResult: (err: any, statusCode: number, tasks: TaskAgentInterfaces.TaskDefinition[]) => void): void; + updateAgentUserCapabilities(userCapabilities: { + [key: string]: string; + }, poolId: number, agentId: number, onResult: (err: any, statusCode: number, usercapabilitie: TaskAgentInterfaces.TaskAgent) => void): void; + } + export interface IQTaskAgentApiBase extends basem.QClientApiBase { + addAgent(agent: TaskAgentInterfaces.TaskAgent, poolId: number): Promise; + deleteAgent(poolId: number, agentId: number): Promise; + getAgent(poolId: number, agentId: number, includeCapabilities?: boolean, includeAssignedRequest?: boolean, propertyFilters?: string[]): Promise; + getAgents(poolId: number, agentName?: string, includeCapabilities?: boolean, includeAssignedRequest?: boolean, propertyFilters?: string[], demands?: string[]): Promise; + replaceAgent(agent: TaskAgentInterfaces.TaskAgent, poolId: number, agentId: number): Promise; + updateAgent(agent: TaskAgentInterfaces.TaskAgent, poolId: number, agentId: number): Promise; + queryEndpoint(endpoint: TaskAgentInterfaces.TaskDefinitionEndpoint): Promise; + deleteAgentRequest(poolId: number, requestId: number, lockToken: string): Promise; + getAgentRequest(poolId: number, requestId: number): Promise; + getAgentRequestsForAgent(poolId: number, agentId: number, completedRequestCount?: number): Promise; + getAgentRequestsForAgents(poolId: number, agentIds: number[], completedRequestCount?: number): Promise; + getAgentRequestsForPlan(poolId: number, planId: string, jobId?: string): Promise; + queueAgentRequest(request: TaskAgentInterfaces.TaskAgentJobRequest, poolId: number): Promise; + updateAgentRequest(request: TaskAgentInterfaces.TaskAgentJobRequest, poolId: number, requestId: number, lockToken: string): Promise; + deleteMessage(poolId: number, messageId: number, sessionId: string): Promise; + getMessage(poolId: number, sessionId: string, lastMessageId?: number): Promise; + refreshAgent(poolId: number, agentId: number): Promise; + refreshAgents(poolId: number): Promise; + sendMessage(message: TaskAgentInterfaces.TaskAgentMessage, poolId: number, requestId: number): Promise; + getPackage(packageType: string): Promise; + getPackages(): Promise; + getPackageZip(packageType: string): Promise; + getAgentPoolRoles(poolId?: number): Promise; + addAgentPool(pool: TaskAgentInterfaces.TaskAgentPool): Promise; + deleteAgentPool(poolId: number): Promise; + getAgentPool(poolId: number, properties?: string[]): Promise; + getAgentPools(poolName?: string, properties?: string[]): Promise; + updateAgentPool(pool: TaskAgentInterfaces.TaskAgentPool, poolId: number): Promise; + getAgentQueueRoles(queueId?: number): Promise; + addAgentQueue(queue: TaskAgentInterfaces.TaskAgentQueue): Promise; + deleteAgentQueue(queueId: number): Promise; + getAgentQueue(queueId: number, actionFilter?: TaskAgentInterfaces.TaskAgentQueueActionFilter): Promise; + getAgentQueues(queueName?: string, actionFilter?: TaskAgentInterfaces.TaskAgentQueueActionFilter): Promise; + queryServiceEndpoint(binding: TaskAgentInterfaces.DataSourceBinding, scopeIdentifier: string): Promise; + createServiceEndpoint(endpoint: TaskAgentInterfaces.ServiceEndpoint, scopeIdentifier: string): Promise; + deleteServiceEndpoint(scopeIdentifier: string, endpointId: string): Promise; + getServiceEndpointDetails(scopeIdentifier: string, endpointId: string): Promise; + getServiceEndpoints(scopeIdentifier: string, type?: string, authSchemes?: string[], endpointIds?: string[]): Promise; + updateServiceEndpoint(endpoint: TaskAgentInterfaces.ServiceEndpoint, scopeIdentifier: string, endpointId: string): Promise; + getServiceEndpointTypes(scopeIdentifier: string, type?: string, scheme?: string): Promise; + createAgentSession(session: TaskAgentInterfaces.TaskAgentSession, poolId: number): Promise; + deleteAgentSession(poolId: number, sessionId: string): Promise; + deleteTaskDefinition(taskId: string): Promise; + getTaskContentZip(taskId: string, versionString: string, visibility?: string[], scopeLocal?: boolean): Promise; + getTaskDefinition(taskId: string, versionString: string, visibility?: string[], scopeLocal?: boolean): Promise; + getTaskDefinitions(taskId?: string, visibility?: string[], scopeLocal?: boolean): Promise; + updateAgentUserCapabilities(userCapabilities: { + [key: string]: string; + }, poolId: number, agentId: number): Promise; + } + export class TaskAgentApiBase extends basem.ClientApiBase implements ITaskAgentApiBase { + constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); + /** + * @param {TaskAgentInterfaces.TaskAgent} agent + * @param {number} poolId + * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAgent + */ + addAgent(agent: TaskAgentInterfaces.TaskAgent, poolId: number, onResult: (err: any, statusCode: number, agent: TaskAgentInterfaces.TaskAgent) => void): void; + /** + * @param {number} poolId + * @param {number} agentId + * @param onResult callback function + */ + deleteAgent(poolId: number, agentId: number, onResult: (err: any, statusCode: number) => void): void; + /** + * @param {number} poolId + * @param {number} agentId + * @param {boolean} includeCapabilities + * @param {boolean} includeAssignedRequest + * @param {string[]} propertyFilters + * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAgent + */ + getAgent(poolId: number, agentId: number, includeCapabilities: boolean, includeAssignedRequest: boolean, propertyFilters: string[], onResult: (err: any, statusCode: number, agent: TaskAgentInterfaces.TaskAgent) => void): void; + /** + * @param {number} poolId + * @param {string} agentName + * @param {boolean} includeCapabilities + * @param {boolean} includeAssignedRequest + * @param {string[]} propertyFilters + * @param {string[]} demands + * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAgent[] + */ + getAgents(poolId: number, agentName: string, includeCapabilities: boolean, includeAssignedRequest: boolean, propertyFilters: string[], demands: string[], onResult: (err: any, statusCode: number, agents: TaskAgentInterfaces.TaskAgent[]) => void): void; + /** + * @param {TaskAgentInterfaces.TaskAgent} agent + * @param {number} poolId + * @param {number} agentId + * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAgent + */ + replaceAgent(agent: TaskAgentInterfaces.TaskAgent, poolId: number, agentId: number, onResult: (err: any, statusCode: number, agent: TaskAgentInterfaces.TaskAgent) => void): void; + /** + * @param {TaskAgentInterfaces.TaskAgent} agent + * @param {number} poolId + * @param {number} agentId + * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAgent + */ + updateAgent(agent: TaskAgentInterfaces.TaskAgent, poolId: number, agentId: number, onResult: (err: any, statusCode: number, agent: TaskAgentInterfaces.TaskAgent) => void): void; + /** + * Proxy for a GET request defined by an 'endpoint'. The request is authorized using a service connection. The response is filtered using an XPath/Json based selector. + * + * @param {TaskAgentInterfaces.TaskDefinitionEndpoint} endpoint - Describes the URL to fetch. + * @param onResult callback function with the resulting string[] + */ + queryEndpoint(endpoint: TaskAgentInterfaces.TaskDefinitionEndpoint, onResult: (err: any, statusCode: number, endpoint: string[]) => void): void; + /** + * @param {number} poolId + * @param {number} requestId + * @param {string} lockToken + * @param onResult callback function + */ + deleteAgentRequest(poolId: number, requestId: number, lockToken: string, onResult: (err: any, statusCode: number) => void): void; + /** + * @param {number} poolId + * @param {number} requestId + * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAgentJobRequest + */ + getAgentRequest(poolId: number, requestId: number, onResult: (err: any, statusCode: number, jobrequest: TaskAgentInterfaces.TaskAgentJobRequest) => void): void; + /** + * @param {number} poolId + * @param {number} agentId + * @param {number} completedRequestCount + * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAgentJobRequest[] + */ + getAgentRequestsForAgent(poolId: number, agentId: number, completedRequestCount: number, onResult: (err: any, statusCode: number, jobrequests: TaskAgentInterfaces.TaskAgentJobRequest[]) => void): void; + /** + * @param {number} poolId + * @param {number[]} agentIds + * @param {number} completedRequestCount + * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAgentJobRequest[] + */ + getAgentRequestsForAgents(poolId: number, agentIds: number[], completedRequestCount: number, onResult: (err: any, statusCode: number, jobrequests: TaskAgentInterfaces.TaskAgentJobRequest[]) => void): void; + /** + * @param {number} poolId + * @param {string} planId + * @param {string} jobId + * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAgentJobRequest[] + */ + getAgentRequestsForPlan(poolId: number, planId: string, jobId: string, onResult: (err: any, statusCode: number, jobrequests: TaskAgentInterfaces.TaskAgentJobRequest[]) => void): void; + /** + * @param {TaskAgentInterfaces.TaskAgentJobRequest} request + * @param {number} poolId + * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAgentJobRequest + */ + queueAgentRequest(request: TaskAgentInterfaces.TaskAgentJobRequest, poolId: number, onResult: (err: any, statusCode: number, jobrequest: TaskAgentInterfaces.TaskAgentJobRequest) => void): void; + /** + * @param {TaskAgentInterfaces.TaskAgentJobRequest} request + * @param {number} poolId + * @param {number} requestId + * @param {string} lockToken + * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAgentJobRequest + */ + updateAgentRequest(request: TaskAgentInterfaces.TaskAgentJobRequest, poolId: number, requestId: number, lockToken: string, onResult: (err: any, statusCode: number, jobrequest: TaskAgentInterfaces.TaskAgentJobRequest) => void): void; + /** + * @param {number} poolId + * @param {number} messageId + * @param {string} sessionId + * @param onResult callback function + */ + deleteMessage(poolId: number, messageId: number, sessionId: string, onResult: (err: any, statusCode: number) => void): void; + /** + * @param {number} poolId + * @param {string} sessionId + * @param {number} lastMessageId + * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAgentMessage + */ + getMessage(poolId: number, sessionId: string, lastMessageId: number, onResult: (err: any, statusCode: number, message: TaskAgentInterfaces.TaskAgentMessage) => void): void; + /** + * @param {number} poolId + * @param {number} agentId + * @param onResult callback function + */ + refreshAgent(poolId: number, agentId: number, onResult: (err: any, statusCode: number) => void): void; + /** + * @param {number} poolId + * @param onResult callback function + */ + refreshAgents(poolId: number, onResult: (err: any, statusCode: number) => void): void; + /** + * @param {TaskAgentInterfaces.TaskAgentMessage} message + * @param {number} poolId + * @param {number} requestId + * @param onResult callback function + */ + sendMessage(message: TaskAgentInterfaces.TaskAgentMessage, poolId: number, requestId: number, onResult: (err: any, statusCode: number) => void): void; + /** + * This method can return packages/{packageType} -- package stream OR TaskPackageMetadata if requested for json + * + * @param {string} packageType + * @param onResult callback function with the resulting TaskAgentInterfaces.TaskPackageMetadata + */ + getPackage(packageType: string, onResult: (err: any, statusCode: number, _package: TaskAgentInterfaces.TaskPackageMetadata) => void): void; + /** + * @param onResult callback function with the resulting TaskAgentInterfaces.TaskPackageMetadata[] + */ + getPackages(onResult: (err: any, statusCode: number, packages: TaskAgentInterfaces.TaskPackageMetadata[]) => void): void; + /** + * This method can return packages/{packageType} -- package stream OR TaskPackageMetadata if requested for json + * + * @param {string} packageType + * @param onResult callback function with the resulting ArrayBuffer + */ + getPackageZip(packageType: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + /** + * @param {number} poolId + * @param onResult callback function with the resulting VSSInterfaces.IdentityRef[] + */ + getAgentPoolRoles(poolId: number, onResult: (err: any, statusCode: number, poolroles: VSSInterfaces.IdentityRef[]) => void): void; + /** + * @param {TaskAgentInterfaces.TaskAgentPool} pool + * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAgentPool + */ + addAgentPool(pool: TaskAgentInterfaces.TaskAgentPool, onResult: (err: any, statusCode: number, pool: TaskAgentInterfaces.TaskAgentPool) => void): void; + /** + * @param {number} poolId + * @param onResult callback function + */ + deleteAgentPool(poolId: number, onResult: (err: any, statusCode: number) => void): void; + /** + * @param {number} poolId + * @param {string[]} properties + * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAgentPool + */ + getAgentPool(poolId: number, properties: string[], onResult: (err: any, statusCode: number, pool: TaskAgentInterfaces.TaskAgentPool) => void): void; + /** + * @param {string} poolName + * @param {string[]} properties + * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAgentPool[] + */ + getAgentPools(poolName: string, properties: string[], onResult: (err: any, statusCode: number, pools: TaskAgentInterfaces.TaskAgentPool[]) => void): void; + /** + * @param {TaskAgentInterfaces.TaskAgentPool} pool + * @param {number} poolId + * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAgentPool + */ + updateAgentPool(pool: TaskAgentInterfaces.TaskAgentPool, poolId: number, onResult: (err: any, statusCode: number, pool: TaskAgentInterfaces.TaskAgentPool) => void): void; + /** + * @param {number} queueId + * @param onResult callback function with the resulting VSSInterfaces.IdentityRef[] + */ + getAgentQueueRoles(queueId: number, onResult: (err: any, statusCode: number, queueroles: VSSInterfaces.IdentityRef[]) => void): void; + /** + * @param {TaskAgentInterfaces.TaskAgentQueue} queue + * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAgentQueue + */ + addAgentQueue(queue: TaskAgentInterfaces.TaskAgentQueue, onResult: (err: any, statusCode: number, queue: TaskAgentInterfaces.TaskAgentQueue) => void): void; + /** + * @param {number} queueId + * @param onResult callback function + */ + deleteAgentQueue(queueId: number, onResult: (err: any, statusCode: number) => void): void; + /** + * @param {number} queueId + * @param {TaskAgentInterfaces.TaskAgentQueueActionFilter} actionFilter + * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAgentQueue + */ + getAgentQueue(queueId: number, actionFilter: TaskAgentInterfaces.TaskAgentQueueActionFilter, onResult: (err: any, statusCode: number, queue: TaskAgentInterfaces.TaskAgentQueue) => void): void; + /** + * @param {string} queueName + * @param {TaskAgentInterfaces.TaskAgentQueueActionFilter} actionFilter + * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAgentQueue[] + */ + getAgentQueues(queueName: string, actionFilter: TaskAgentInterfaces.TaskAgentQueueActionFilter, onResult: (err: any, statusCode: number, queues: TaskAgentInterfaces.TaskAgentQueue[]) => void): void; + /** + * Proxy for a GET request defined by an service endpoint. The request is authorized using a data source in service endpoint. The response is filtered using an XPath/Json based selector. + * + * @param {TaskAgentInterfaces.DataSourceBinding} binding - Describes the data source to fetch. + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param onResult callback function with the resulting string[] + */ + queryServiceEndpoint(binding: TaskAgentInterfaces.DataSourceBinding, scopeIdentifier: string, onResult: (err: any, statusCode: number, serviceendpointproxy: string[]) => void): void; + /** + * @param {TaskAgentInterfaces.ServiceEndpoint} endpoint + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param onResult callback function with the resulting TaskAgentInterfaces.ServiceEndpoint + */ + createServiceEndpoint(endpoint: TaskAgentInterfaces.ServiceEndpoint, scopeIdentifier: string, onResult: (err: any, statusCode: number, serviceendpoint: TaskAgentInterfaces.ServiceEndpoint) => void): void; + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} endpointId + * @param onResult callback function + */ + deleteServiceEndpoint(scopeIdentifier: string, endpointId: string, onResult: (err: any, statusCode: number) => void): void; + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} endpointId + * @param onResult callback function with the resulting TaskAgentInterfaces.ServiceEndpoint + */ + getServiceEndpointDetails(scopeIdentifier: string, endpointId: string, onResult: (err: any, statusCode: number, serviceendpoint: TaskAgentInterfaces.ServiceEndpoint) => void): void; + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} type + * @param {string[]} authSchemes + * @param {string[]} endpointIds + * @param onResult callback function with the resulting TaskAgentInterfaces.ServiceEndpoint[] + */ + getServiceEndpoints(scopeIdentifier: string, type: string, authSchemes: string[], endpointIds: string[], onResult: (err: any, statusCode: number, serviceendpoints: TaskAgentInterfaces.ServiceEndpoint[]) => void): void; + /** + * @param {TaskAgentInterfaces.ServiceEndpoint} endpoint + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} endpointId + * @param onResult callback function with the resulting TaskAgentInterfaces.ServiceEndpoint + */ + updateServiceEndpoint(endpoint: TaskAgentInterfaces.ServiceEndpoint, scopeIdentifier: string, endpointId: string, onResult: (err: any, statusCode: number, serviceendpoint: TaskAgentInterfaces.ServiceEndpoint) => void): void; + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} type + * @param {string} scheme + * @param onResult callback function with the resulting TaskAgentInterfaces.ServiceEndpointType[] + */ + getServiceEndpointTypes(scopeIdentifier: string, type: string, scheme: string, onResult: (err: any, statusCode: number, serviceendpointtypes: TaskAgentInterfaces.ServiceEndpointType[]) => void): void; + /** + * @param {TaskAgentInterfaces.TaskAgentSession} session + * @param {number} poolId + * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAgentSession + */ + createAgentSession(session: TaskAgentInterfaces.TaskAgentSession, poolId: number, onResult: (err: any, statusCode: number, session: TaskAgentInterfaces.TaskAgentSession) => void): void; + /** + * @param {number} poolId + * @param {string} sessionId + * @param onResult callback function + */ + deleteAgentSession(poolId: number, sessionId: string, onResult: (err: any, statusCode: number) => void): void; + /** + * @param {string} taskId + * @param onResult callback function + */ + deleteTaskDefinition(taskId: string, onResult: (err: any, statusCode: number) => void): void; + /** + * @param {string} taskId + * @param {string} versionString + * @param {string[]} visibility + * @param {boolean} scopeLocal + * @param onResult callback function with the resulting ArrayBuffer + */ + getTaskContentZip(taskId: string, versionString: string, visibility: string[], scopeLocal: boolean, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + /** + * @param {string} taskId + * @param {string} versionString + * @param {string[]} visibility + * @param {boolean} scopeLocal + * @param onResult callback function with the resulting TaskAgentInterfaces.TaskDefinition + */ + getTaskDefinition(taskId: string, versionString: string, visibility: string[], scopeLocal: boolean, onResult: (err: any, statusCode: number, task: TaskAgentInterfaces.TaskDefinition) => void): void; + /** + * @param {string} taskId + * @param {string[]} visibility + * @param {boolean} scopeLocal + * @param onResult callback function with the resulting TaskAgentInterfaces.TaskDefinition[] + */ + getTaskDefinitions(taskId: string, visibility: string[], scopeLocal: boolean, onResult: (err: any, statusCode: number, tasks: TaskAgentInterfaces.TaskDefinition[]) => void): void; + /** + * @param {{ [key: string] : string; }} userCapabilities + * @param {number} poolId + * @param {number} agentId + * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAgent + */ + updateAgentUserCapabilities(userCapabilities: { + [key: string]: string; + }, poolId: number, agentId: number, onResult: (err: any, statusCode: number, usercapabilitie: TaskAgentInterfaces.TaskAgent) => void): void; + } + export class QTaskAgentApiBase extends basem.QClientApiBase implements IQTaskAgentApiBase { + api: TaskAgentApiBase; + constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], api: typeof basem.ClientApiBase); + /** + * @param {TaskAgentInterfaces.TaskAgent} agent + * @param {number} poolId + */ + addAgent(agent: TaskAgentInterfaces.TaskAgent, poolId: number): Promise; + /** + * @param {number} poolId + * @param {number} agentId + */ + deleteAgent(poolId: number, agentId: number): Promise; + /** + * @param {number} poolId + * @param {number} agentId + * @param {boolean} includeCapabilities + * @param {boolean} includeAssignedRequest + * @param {string[]} propertyFilters + */ + getAgent(poolId: number, agentId: number, includeCapabilities?: boolean, includeAssignedRequest?: boolean, propertyFilters?: string[]): Promise; + /** + * @param {number} poolId + * @param {string} agentName + * @param {boolean} includeCapabilities + * @param {boolean} includeAssignedRequest + * @param {string[]} propertyFilters + * @param {string[]} demands + */ + getAgents(poolId: number, agentName?: string, includeCapabilities?: boolean, includeAssignedRequest?: boolean, propertyFilters?: string[], demands?: string[]): Promise; + /** + * @param {TaskAgentInterfaces.TaskAgent} agent + * @param {number} poolId + * @param {number} agentId + */ + replaceAgent(agent: TaskAgentInterfaces.TaskAgent, poolId: number, agentId: number): Promise; + /** + * @param {TaskAgentInterfaces.TaskAgent} agent + * @param {number} poolId + * @param {number} agentId + */ + updateAgent(agent: TaskAgentInterfaces.TaskAgent, poolId: number, agentId: number): Promise; + /** + * Proxy for a GET request defined by an 'endpoint'. The request is authorized using a service connection. The response is filtered using an XPath/Json based selector. + * + * @param {TaskAgentInterfaces.TaskDefinitionEndpoint} endpoint - Describes the URL to fetch. + */ + queryEndpoint(endpoint: TaskAgentInterfaces.TaskDefinitionEndpoint): Promise; + /** + * @param {number} poolId + * @param {number} requestId + * @param {string} lockToken + */ + deleteAgentRequest(poolId: number, requestId: number, lockToken: string): Promise; + /** + * @param {number} poolId + * @param {number} requestId + */ + getAgentRequest(poolId: number, requestId: number): Promise; + /** + * @param {number} poolId + * @param {number} agentId + * @param {number} completedRequestCount + */ + getAgentRequestsForAgent(poolId: number, agentId: number, completedRequestCount?: number): Promise; + /** + * @param {number} poolId + * @param {number[]} agentIds + * @param {number} completedRequestCount + */ + getAgentRequestsForAgents(poolId: number, agentIds: number[], completedRequestCount?: number): Promise; + /** + * @param {number} poolId + * @param {string} planId + * @param {string} jobId + */ + getAgentRequestsForPlan(poolId: number, planId: string, jobId?: string): Promise; + /** + * @param {TaskAgentInterfaces.TaskAgentJobRequest} request + * @param {number} poolId + */ + queueAgentRequest(request: TaskAgentInterfaces.TaskAgentJobRequest, poolId: number): Promise; + /** + * @param {TaskAgentInterfaces.TaskAgentJobRequest} request + * @param {number} poolId + * @param {number} requestId + * @param {string} lockToken + */ + updateAgentRequest(request: TaskAgentInterfaces.TaskAgentJobRequest, poolId: number, requestId: number, lockToken: string): Promise; + /** + * @param {number} poolId + * @param {number} messageId + * @param {string} sessionId + */ + deleteMessage(poolId: number, messageId: number, sessionId: string): Promise; + /** + * @param {number} poolId + * @param {string} sessionId + * @param {number} lastMessageId + */ + getMessage(poolId: number, sessionId: string, lastMessageId?: number): Promise; + /** + * @param {number} poolId + * @param {number} agentId + */ + refreshAgent(poolId: number, agentId: number): Promise; + /** + * @param {number} poolId + */ + refreshAgents(poolId: number): Promise; + /** + * @param {TaskAgentInterfaces.TaskAgentMessage} message + * @param {number} poolId + * @param {number} requestId + */ + sendMessage(message: TaskAgentInterfaces.TaskAgentMessage, poolId: number, requestId: number): Promise; + /** + * This method can return packages/{packageType} -- package stream OR TaskPackageMetadata if requested for json + * + * @param {string} packageType + */ + getPackage(packageType: string): Promise; + /** + */ + getPackages(): Promise; + /** + * This method can return packages/{packageType} -- package stream OR TaskPackageMetadata if requested for json + * + * @param {string} packageType + */ + getPackageZip(packageType: string): Promise; + /** + * @param {number} poolId + */ + getAgentPoolRoles(poolId?: number): Promise; + /** + * @param {TaskAgentInterfaces.TaskAgentPool} pool + */ + addAgentPool(pool: TaskAgentInterfaces.TaskAgentPool): Promise; + /** + * @param {number} poolId + */ + deleteAgentPool(poolId: number): Promise; + /** + * @param {number} poolId + * @param {string[]} properties + */ + getAgentPool(poolId: number, properties?: string[]): Promise; + /** + * @param {string} poolName + * @param {string[]} properties + */ + getAgentPools(poolName?: string, properties?: string[]): Promise; + /** + * @param {TaskAgentInterfaces.TaskAgentPool} pool + * @param {number} poolId + */ + updateAgentPool(pool: TaskAgentInterfaces.TaskAgentPool, poolId: number): Promise; + /** + * @param {number} queueId + */ + getAgentQueueRoles(queueId?: number): Promise; + /** + * @param {TaskAgentInterfaces.TaskAgentQueue} queue + */ + addAgentQueue(queue: TaskAgentInterfaces.TaskAgentQueue): Promise; + /** + * @param {number} queueId + */ + deleteAgentQueue(queueId: number): Promise; + /** + * @param {number} queueId + * @param {TaskAgentInterfaces.TaskAgentQueueActionFilter} actionFilter + */ + getAgentQueue(queueId: number, actionFilter?: TaskAgentInterfaces.TaskAgentQueueActionFilter): Promise; + /** + * @param {string} queueName + * @param {TaskAgentInterfaces.TaskAgentQueueActionFilter} actionFilter + */ + getAgentQueues(queueName?: string, actionFilter?: TaskAgentInterfaces.TaskAgentQueueActionFilter): Promise; + /** + * Proxy for a GET request defined by an service endpoint. The request is authorized using a data source in service endpoint. The response is filtered using an XPath/Json based selector. + * + * @param {TaskAgentInterfaces.DataSourceBinding} binding - Describes the data source to fetch. + * @param {string} scopeIdentifier - The project GUID to scope the request + */ + queryServiceEndpoint(binding: TaskAgentInterfaces.DataSourceBinding, scopeIdentifier: string): Promise; + /** + * @param {TaskAgentInterfaces.ServiceEndpoint} endpoint + * @param {string} scopeIdentifier - The project GUID to scope the request + */ + createServiceEndpoint(endpoint: TaskAgentInterfaces.ServiceEndpoint, scopeIdentifier: string): Promise; + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} endpointId + */ + deleteServiceEndpoint(scopeIdentifier: string, endpointId: string): Promise; + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} endpointId + */ + getServiceEndpointDetails(scopeIdentifier: string, endpointId: string): Promise; + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} type + * @param {string[]} authSchemes + * @param {string[]} endpointIds + */ + getServiceEndpoints(scopeIdentifier: string, type?: string, authSchemes?: string[], endpointIds?: string[]): Promise; + /** + * @param {TaskAgentInterfaces.ServiceEndpoint} endpoint + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} endpointId + */ + updateServiceEndpoint(endpoint: TaskAgentInterfaces.ServiceEndpoint, scopeIdentifier: string, endpointId: string): Promise; + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} type + * @param {string} scheme + */ + getServiceEndpointTypes(scopeIdentifier: string, type?: string, scheme?: string): Promise; + /** + * @param {TaskAgentInterfaces.TaskAgentSession} session + * @param {number} poolId + */ + createAgentSession(session: TaskAgentInterfaces.TaskAgentSession, poolId: number): Promise; + /** + * @param {number} poolId + * @param {string} sessionId + */ + deleteAgentSession(poolId: number, sessionId: string): Promise; + /** + * @param {string} taskId + */ + deleteTaskDefinition(taskId: string): Promise; + /** + * @param {string} taskId + * @param {string} versionString + * @param {string[]} visibility + * @param {boolean} scopeLocal + */ + getTaskContentZip(taskId: string, versionString: string, visibility?: string[], scopeLocal?: boolean): Promise; + /** + * @param {string} taskId + * @param {string} versionString + * @param {string[]} visibility + * @param {boolean} scopeLocal + */ + getTaskDefinition(taskId: string, versionString: string, visibility?: string[], scopeLocal?: boolean): Promise; + /** + * @param {string} taskId + * @param {string[]} visibility + * @param {boolean} scopeLocal + */ + getTaskDefinitions(taskId?: string, visibility?: string[], scopeLocal?: boolean): Promise; + /** + * @param {{ [key: string] : string; }} userCapabilities + * @param {number} poolId + * @param {number} agentId + */ + updateAgentUserCapabilities(userCapabilities: { + [key: string]: string; + }, poolId: number, agentId: number): Promise; + } + +} +declare module 'vso-node-api/TaskAgentApi' { + import taskagentbasem = require('vso-node-api/TaskAgentApiBase'); + + import TaskAgentInterfaces = require('vso-node-api/interfaces/TaskAgentInterfaces'); + import VsoBaseInterfaces = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); + export interface ITaskAgentApi extends taskagentbasem.ITaskAgentApiBase { + uploadTaskDefinition(customHeaders: VsoBaseInterfaces.IHeaders, contentStream: NodeJS.ReadableStream, taskId: string, overwrite: boolean, onResult: (err: any, statusCode: number, obj: any) => void): void; + } + export interface IQTaskAgentApi extends taskagentbasem.IQTaskAgentApiBase { + uploadTaskDefinition(customHeaders: VsoBaseInterfaces.IHeaders, contentStream: NodeJS.ReadableStream, taskId: string, overwrite: boolean): Promise; + } + export class TaskAgentApi extends taskagentbasem.TaskAgentApiBase implements ITaskAgentApi { + private _handlers; + private _fallbackClient; + constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); + /** + * @param {string} taskId + * @param onResult callback function + */ + deleteTaskDefinition(taskId: string, onResult: (err: any, statusCode: number) => void): void; + /** + * @param {string} taskId + * @param {string} versionString + * @param {string[]} visibility + * @param {boolean} scopeLocal + * @param onResult callback function with the resulting ArrayBuffer + */ + getTaskContentZip(taskId: string, versionString: string, visibility: string[], scopeLocal: boolean, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + /** + * @param {string} taskId + * @param {string} versionString + * @param {string[]} visibility + * @param {boolean} scopeLocal + * @param onResult callback function with the resulting TaskAgentInterfaces.TaskDefinition + */ + getTaskDefinition(taskId: string, versionString: string, visibility: string[], scopeLocal: boolean, onResult: (err: any, statusCode: number, task: TaskAgentInterfaces.TaskDefinition) => void): void; + /** + * @param {string} taskId + * @param {string[]} visibility + * @param {boolean} scopeLocal + * @param onResult callback function with the resulting TaskAgentInterfaces.TaskDefinition[] + */ + getTaskDefinitions(taskId: string, visibility: string[], scopeLocal: boolean, onResult: (err: any, statusCode: number, tasks: TaskAgentInterfaces.TaskDefinition[]) => void): void; + /** + * @param {NodeJS.ReadableStream} contentStream + * @param {string} taskId + * @param {boolean} overwrite + * @param onResult callback function + */ + uploadTaskDefinition(customHeaders: VsoBaseInterfaces.IHeaders, contentStream: NodeJS.ReadableStream, taskId: string, overwrite: boolean, onResult: (err: any, statusCode: number, obj: any) => void): void; + /** + * @param {NodeJS.ReadableStream} contentStream + * @param {string} taskId + * @param {boolean} overwrite + * @param onResult callback function + */ + private _uploadTaskDefinition(customHeaders, contentStream, taskId, overwrite, onResult); + private _getFallbackClient(baseUrl); + private _getAccountUrl(collectionUrl); + } + export class QTaskAgentApi extends taskagentbasem.QTaskAgentApiBase implements IQTaskAgentApi { + api: TaskAgentApi; + constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); + /** + * @param {NodeJS.ReadableStream} contentStream + * @param {string} taskId + * @param {boolean} overwrite + */ + uploadTaskDefinition(customHeaders: VsoBaseInterfaces.IHeaders, contentStream: NodeJS.ReadableStream, taskId: string, overwrite: boolean): Promise; + } + +} +declare module 'vso-node-api/TaskApi' { + + + import Q = require('q'); + import basem = require('vso-node-api/ClientApiBases'); + import VsoBaseInterfaces = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); + import TaskAgentInterfaces = require('vso-node-api/interfaces/TaskAgentInterfaces'); + import VSSInterfaces = require('vso-node-api/interfaces/common/VSSInterfaces'); + export interface ITaskApi extends basem.ClientApiBase { + getPlanAttachments(scopeIdentifier: string, hubName: string, planId: string, type: string, onResult: (err: any, statusCode: number, attachments: TaskAgentInterfaces.TaskAttachment[]) => void): void; + createAttachment(customHeaders: any, contentStream: NodeJS.ReadableStream, scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string, name: string, onResult: (err: any, statusCode: number, attachment: TaskAgentInterfaces.TaskAttachment) => void): void; + getAttachment(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string, name: string, onResult: (err: any, statusCode: number, attachment: TaskAgentInterfaces.TaskAttachment) => void): void; + getAttachmentContent(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string, name: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + getAttachments(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string, onResult: (err: any, statusCode: number, attachments: TaskAgentInterfaces.TaskAttachment[]) => void): void; + appendTimelineRecordFeed(lines: VSSInterfaces.VssJsonCollectionWrapperV, scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, onResult: (err: any, statusCode: number) => void): void; + appendLogContent(customHeaders: any, contentStream: NodeJS.ReadableStream, scopeIdentifier: string, hubName: string, planId: string, logId: number, onResult: (err: any, statusCode: number, log: TaskAgentInterfaces.TaskLog) => void): void; + createLog(log: TaskAgentInterfaces.TaskLog, scopeIdentifier: string, hubName: string, planId: string, onResult: (err: any, statusCode: number, log: TaskAgentInterfaces.TaskLog) => void): void; + getLog(scopeIdentifier: string, hubName: string, planId: string, logId: number, startLine: number, endLine: number, onResult: (err: any, statusCode: number, logs: string[]) => void): void; + getLogs(scopeIdentifier: string, hubName: string, planId: string, onResult: (err: any, statusCode: number, logs: TaskAgentInterfaces.TaskLog[]) => void): void; + getPlan(scopeIdentifier: string, hubName: string, planId: string, onResult: (err: any, statusCode: number, plan: TaskAgentInterfaces.TaskOrchestrationPlan) => void): void; + getRecords(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, changeId: number, onResult: (err: any, statusCode: number, records: TaskAgentInterfaces.TimelineRecord[]) => void): void; + updateRecords(records: VSSInterfaces.VssJsonCollectionWrapperV, scopeIdentifier: string, hubName: string, planId: string, timelineId: string, onResult: (err: any, statusCode: number, record: TaskAgentInterfaces.TimelineRecord[]) => void): void; + createTimeline(timeline: TaskAgentInterfaces.Timeline, scopeIdentifier: string, hubName: string, planId: string, onResult: (err: any, statusCode: number, timeline: TaskAgentInterfaces.Timeline) => void): void; + deleteTimeline(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, onResult: (err: any, statusCode: number) => void): void; + getTimeline(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, changeId: number, includeRecords: boolean, onResult: (err: any, statusCode: number, timeline: TaskAgentInterfaces.Timeline) => void): void; + getTimelines(scopeIdentifier: string, hubName: string, planId: string, onResult: (err: any, statusCode: number, timelines: TaskAgentInterfaces.Timeline[]) => void): void; + } + export interface IQTaskApi extends basem.QClientApiBase { + getPlanAttachments(scopeIdentifier: string, hubName: string, planId: string, type: string): Promise; + createAttachment(customHeaders: any, contentStream: NodeJS.ReadableStream, scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string, name: string): Promise; + getAttachment(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string, name: string): Promise; + getAttachmentContent(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string, name: string): Promise; + getAttachments(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string): Promise; + appendTimelineRecordFeed(lines: VSSInterfaces.VssJsonCollectionWrapperV, scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string): Promise; + appendLogContent(customHeaders: any, contentStream: NodeJS.ReadableStream, scopeIdentifier: string, hubName: string, planId: string, logId: number): Promise; + createLog(log: TaskAgentInterfaces.TaskLog, scopeIdentifier: string, hubName: string, planId: string): Promise; + getLog(scopeIdentifier: string, hubName: string, planId: string, logId: number, startLine?: number, endLine?: number): Promise; + getLogs(scopeIdentifier: string, hubName: string, planId: string): Promise; + getPlan(scopeIdentifier: string, hubName: string, planId: string): Promise; + getRecords(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, changeId?: number): Promise; + updateRecords(records: VSSInterfaces.VssJsonCollectionWrapperV, scopeIdentifier: string, hubName: string, planId: string, timelineId: string): Promise; + createTimeline(timeline: TaskAgentInterfaces.Timeline, scopeIdentifier: string, hubName: string, planId: string): Promise; + deleteTimeline(scopeIdentifier: string, hubName: string, planId: string, timelineId: string): Promise; + getTimeline(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, changeId?: number, includeRecords?: boolean): Promise; + getTimelines(scopeIdentifier: string, hubName: string, planId: string): Promise; + } + export class TaskApi extends basem.ClientApiBase implements ITaskApi { + constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + * @param {string} type + * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAttachment[] + */ + getPlanAttachments(scopeIdentifier: string, hubName: string, planId: string, type: string, onResult: (err: any, statusCode: number, attachments: TaskAgentInterfaces.TaskAttachment[]) => void): void; + /** + * @param {NodeJS.ReadableStream} contentStream - Content to upload + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + * @param {string} timelineId + * @param {string} recordId + * @param {string} type + * @param {string} name + * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAttachment + */ + createAttachment(customHeaders: VsoBaseInterfaces.IHeaders, contentStream: NodeJS.ReadableStream, scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string, name: string, onResult: (err: any, statusCode: number, attachment: TaskAgentInterfaces.TaskAttachment) => void): void; + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + * @param {string} timelineId + * @param {string} recordId + * @param {string} type + * @param {string} name + * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAttachment + */ + getAttachment(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string, name: string, onResult: (err: any, statusCode: number, attachment: TaskAgentInterfaces.TaskAttachment) => void): void; + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + * @param {string} timelineId + * @param {string} recordId + * @param {string} type + * @param {string} name + * @param onResult callback function with the resulting ArrayBuffer + */ + getAttachmentContent(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string, name: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + * @param {string} timelineId + * @param {string} recordId + * @param {string} type + * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAttachment[] + */ + getAttachments(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string, onResult: (err: any, statusCode: number, attachments: TaskAgentInterfaces.TaskAttachment[]) => void): void; + /** + * @param {VSSInterfaces.VssJsonCollectionWrapperV} lines + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + * @param {string} timelineId + * @param {string} recordId + * @param onResult callback function + */ + appendTimelineRecordFeed(lines: VSSInterfaces.VssJsonCollectionWrapperV, scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, onResult: (err: any, statusCode: number) => void): void; + /** + * @param {NodeJS.ReadableStream} contentStream - Content to upload + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + * @param {number} logId + * @param onResult callback function with the resulting TaskAgentInterfaces.TaskLog + */ + appendLogContent(customHeaders: VsoBaseInterfaces.IHeaders, contentStream: NodeJS.ReadableStream, scopeIdentifier: string, hubName: string, planId: string, logId: number, onResult: (err: any, statusCode: number, log: TaskAgentInterfaces.TaskLog) => void): void; + /** + * @param {TaskAgentInterfaces.TaskLog} log + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + * @param onResult callback function with the resulting TaskAgentInterfaces.TaskLog + */ + createLog(log: TaskAgentInterfaces.TaskLog, scopeIdentifier: string, hubName: string, planId: string, onResult: (err: any, statusCode: number, log: TaskAgentInterfaces.TaskLog) => void): void; + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + * @param {number} logId + * @param {number} startLine + * @param {number} endLine + * @param onResult callback function with the resulting string[] + */ + getLog(scopeIdentifier: string, hubName: string, planId: string, logId: number, startLine: number, endLine: number, onResult: (err: any, statusCode: number, logs: string[]) => void): void; + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + * @param onResult callback function with the resulting TaskAgentInterfaces.TaskLog[] + */ + getLogs(scopeIdentifier: string, hubName: string, planId: string, onResult: (err: any, statusCode: number, logs: TaskAgentInterfaces.TaskLog[]) => void): void; + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + * @param onResult callback function with the resulting TaskAgentInterfaces.TaskOrchestrationPlan + */ + getPlan(scopeIdentifier: string, hubName: string, planId: string, onResult: (err: any, statusCode: number, plan: TaskAgentInterfaces.TaskOrchestrationPlan) => void): void; + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + * @param {string} timelineId + * @param {number} changeId + * @param onResult callback function with the resulting TaskAgentInterfaces.TimelineRecord[] + */ + getRecords(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, changeId: number, onResult: (err: any, statusCode: number, records: TaskAgentInterfaces.TimelineRecord[]) => void): void; + /** + * @param {VSSInterfaces.VssJsonCollectionWrapperV} records + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + * @param {string} timelineId + * @param onResult callback function with the resulting TaskAgentInterfaces.TimelineRecord[] + */ + updateRecords(records: VSSInterfaces.VssJsonCollectionWrapperV, scopeIdentifier: string, hubName: string, planId: string, timelineId: string, onResult: (err: any, statusCode: number, record: TaskAgentInterfaces.TimelineRecord[]) => void): void; + /** + * @param {TaskAgentInterfaces.Timeline} timeline + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + * @param onResult callback function with the resulting TaskAgentInterfaces.Timeline + */ + createTimeline(timeline: TaskAgentInterfaces.Timeline, scopeIdentifier: string, hubName: string, planId: string, onResult: (err: any, statusCode: number, timeline: TaskAgentInterfaces.Timeline) => void): void; + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + * @param {string} timelineId + * @param onResult callback function + */ + deleteTimeline(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, onResult: (err: any, statusCode: number) => void): void; + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + * @param {string} timelineId + * @param {number} changeId + * @param {boolean} includeRecords + * @param onResult callback function with the resulting TaskAgentInterfaces.Timeline + */ + getTimeline(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, changeId: number, includeRecords: boolean, onResult: (err: any, statusCode: number, timeline: TaskAgentInterfaces.Timeline) => void): void; + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + * @param onResult callback function with the resulting TaskAgentInterfaces.Timeline[] + */ + getTimelines(scopeIdentifier: string, hubName: string, planId: string, onResult: (err: any, statusCode: number, timelines: TaskAgentInterfaces.Timeline[]) => void): void; + } + export class QTaskApi extends basem.QClientApiBase implements IQTaskApi { + api: TaskApi; + constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + * @param {string} type + */ + getPlanAttachments(scopeIdentifier: string, hubName: string, planId: string, type: string): Promise; + /** + * @param {NodeJS.ReadableStream} contentStream - Content to upload + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + * @param {string} timelineId + * @param {string} recordId + * @param {string} type + * @param {string} name + */ + createAttachment(customHeaders: any, contentStream: NodeJS.ReadableStream, scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string, name: string): Promise; + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + * @param {string} timelineId + * @param {string} recordId + * @param {string} type + * @param {string} name + */ + getAttachment(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string, name: string): Promise; + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + * @param {string} timelineId + * @param {string} recordId + * @param {string} type + * @param {string} name + */ + getAttachmentContent(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string, name: string): Promise; + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + * @param {string} timelineId + * @param {string} recordId + * @param {string} type + */ + getAttachments(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string): Promise; + /** + * @param {VSSInterfaces.VssJsonCollectionWrapperV} lines + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + * @param {string} timelineId + * @param {string} recordId + */ + appendTimelineRecordFeed(lines: VSSInterfaces.VssJsonCollectionWrapperV, scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string): Promise; + /** + * @param {NodeJS.ReadableStream} contentStream - Content to upload + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + * @param {number} logId + */ + appendLogContent(customHeaders: any, contentStream: NodeJS.ReadableStream, scopeIdentifier: string, hubName: string, planId: string, logId: number): Promise; + /** + * @param {TaskAgentInterfaces.TaskLog} log + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + */ + createLog(log: TaskAgentInterfaces.TaskLog, scopeIdentifier: string, hubName: string, planId: string): Promise; + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + * @param {number} logId + * @param {number} startLine + * @param {number} endLine + */ + getLog(scopeIdentifier: string, hubName: string, planId: string, logId: number, startLine?: number, endLine?: number): Promise; + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + */ + getLogs(scopeIdentifier: string, hubName: string, planId: string): Promise; + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + */ + getPlan(scopeIdentifier: string, hubName: string, planId: string): Promise; + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + * @param {string} timelineId + * @param {number} changeId + */ + getRecords(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, changeId?: number): Promise; + /** + * @param {VSSInterfaces.VssJsonCollectionWrapperV} records + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + * @param {string} timelineId + */ + updateRecords(records: VSSInterfaces.VssJsonCollectionWrapperV, scopeIdentifier: string, hubName: string, planId: string, timelineId: string): Promise; + /** + * @param {TaskAgentInterfaces.Timeline} timeline + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + */ + createTimeline(timeline: TaskAgentInterfaces.Timeline, scopeIdentifier: string, hubName: string, planId: string): Promise; + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + * @param {string} timelineId + */ + deleteTimeline(scopeIdentifier: string, hubName: string, planId: string, timelineId: string): Promise; + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + * @param {string} timelineId + * @param {number} changeId + * @param {boolean} includeRecords + */ + getTimeline(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, changeId?: number, includeRecords?: boolean): Promise; + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + */ + getTimelines(scopeIdentifier: string, hubName: string, planId: string): Promise; + } + +} +declare module 'vso-node-api/interfaces/TestInterfaces' { + import TfsCoreInterfaces = require('vso-node-api/interfaces/CoreInterfaces'); + import VSSInterfaces = require('vso-node-api/interfaces/common/VSSInterfaces'); + export interface AggregatedDataForResultTrend { + /** + * This is tests execution duration. + */ + duration: any; + resultsByOutcome: { + [key: number]: AggregatedResultsByOutcome; + }; + testResultsContext: TestResultsContext; + } + export interface AggregatedResultsAnalysis { + duration: any; + previousContext: TestResultsContext; + resultsByOutcome: { + [key: number]: AggregatedResultsByOutcome; + }; + resultsDifference: AggregatedResultsDifference; + totalTests: number; + } + export interface AggregatedResultsByOutcome { + count: number; + duration: any; + outcome: TestOutcome; + } + export interface AggregatedResultsDifference { + increaseInDuration: any; + increaseInFailures: number; + increaseInPassedTests: number; + increaseInTotalTests: number; + } + export enum AttachmentType { + GeneralAttachment = 0, + AfnStrip = 1, + BugFilingData = 2, + CodeCoverage = 3, + IntermediateCollectorData = 4, + RunConfig = 5, + TestImpactDetails = 6, + TmiTestRunDeploymentFiles = 7, + TmiTestRunReverseDeploymentFiles = 8, + TmiTestResultDetail = 9, + TmiTestRunSummary = 10, + } + export interface BatchResponse { + error: string; + responses: Response[]; + status: string; + } + export interface BuildConfiguration { + branchName: string; + buildDefinitionId: number; + flavor: string; + id: number; + number: string; + platform: string; + project: ShallowReference; + repositoryId: number; + sourceVersion: string; + uri: string; + } + export interface BuildCoverage { + codeCoverageFileUrl: string; + configuration: BuildConfiguration; + lastError: string; + modules: ModuleCoverage[]; + state: string; + } + export interface BuildReference { + branchName: string; + buildSystem: string; + definitionId: number; + id: number; + number: string; + uri: string; + } + export interface CloneOperationInformation { + cloneStatistics: CloneStatistics; + /** + * If the operation is complete, the DateTime of completion. If operation is not complete, this is DateTime.MaxValue + */ + completionDate: Date; + /** + * DateTime when the operation was started + */ + creationDate: Date; + /** + * Shallow reference of the destination + */ + destinationObject: ShallowReference; + /** + * Shallow reference of the destination + */ + destinationPlan: ShallowReference; + /** + * Shallow reference of the destination + */ + destinationProject: ShallowReference; + /** + * If the operation has Failed, Message contains the reason for failure. Null otherwise. + */ + message: string; + /** + * The ID of the operation + */ + opId: number; + /** + * The type of the object generated as a result of the Clone operation + */ + resultObjectType: ResultObjectType; + /** + * Shallow reference of the source + */ + sourceObject: ShallowReference; + /** + * Shallow reference of the source + */ + sourcePlan: ShallowReference; + /** + * Shallow reference of the source + */ + sourceProject: ShallowReference; + /** + * Current state of the operation. When State reaches Suceeded or Failed, the operation is complete + */ + state: CloneOperationState; + /** + * Url for geting the clone information + */ + url: string; + } + export enum CloneOperationState { + Failed = 2, + InProgress = 1, + Queued = 0, + Succeeded = 3, + } + export interface CloneOptions { + /** + * If set to true requirements will be cloned + */ + cloneRequirements: boolean; + /** + * copy all suites from a source plan + */ + copyAllSuites: boolean; + /** + * copy ancestor hieracrchy + */ + copyAncestorHierarchy: boolean; + /** + * Name of the workitem type of the clone + */ + destinationWorkItemType: string; + /** + * Key value pairs where the key value is overridden by the value. + */ + overrideParameters: { + [key: string]: string; + }; + /** + * Comment on the link that will link the new clone test case to the original Set null for no comment + */ + relatedLinkComment: string; + } + export interface CloneStatistics { + /** + * Number of Requirments cloned so far. + */ + clonedRequirementsCount: number; + /** + * Number of shared steps cloned so far. + */ + clonedSharedStepsCount: number; + /** + * Number of test cases cloned so far + */ + clonedTestCasesCount: number; + /** + * Total number of requirements to be cloned + */ + totalRequirementsCount: number; + /** + * Total number of test cases to be cloned + */ + totalTestCasesCount: number; + } + /** + * Represents the build configuration (platform, flavor) and coverage data for the build + */ + export interface CodeCoverageData { + /** + * Flavor of build for which data is retrieved/published + */ + buildFlavor: string; + /** + * Platform of build for which data is retrieved/published + */ + buildPlatform: string; + /** + * List of coverage data for the build + */ + coverageStats: CodeCoverageStatistics[]; + } + /** + * Represents the code coverage statistics for a particular coverage label (modules, statements, blocks, etc.) + */ + export interface CodeCoverageStatistics { + /** + * Covered units + */ + covered: number; + /** + * Delta of coverage + */ + delta: number; + /** + * Is delta valid + */ + isDeltaAvailable: boolean; + /** + * Label of coverage data ("Blocks", "Statements", "Modules", etc.) + */ + label: string; + /** + * Position of label + */ + position: number; + /** + * Total units + */ + total: number; + } + /** + * Represents the code coverage summary results Used to publish or retrieve code coverage summary against a build + */ + export interface CodeCoverageSummary { + /** + * Uri of build for which data is retrieved/published + */ + build: ShallowReference; + /** + * List of coverage data and details for the build + */ + coverageData: CodeCoverageData[]; + /** + * Uri of build against which difference in coverage is computed + */ + deltaBuild: ShallowReference; + } + export enum CoverageQueryFlags { + /** + * If set, the Coverage.Modules property will be populated. + */ + Modules = 1, + /** + * If set, the ModuleCoverage.Functions properties will be populated. + */ + Functions = 2, + /** + * If set, the ModuleCoverage.CoverageData field will be populated. + */ + BlockData = 4, + } + export interface CoverageStatistics { + blocksCovered: number; + blocksNotCovered: number; + linesCovered: number; + linesNotCovered: number; + linesPartiallyCovered: number; + } + export interface CustomTestField { + fieldName: string; + value: any; + } + export interface CustomTestFieldDefinition { + fieldId: number; + fieldName: string; + fieldType: CustomTestFieldType; + scope: CustomTestFieldScope; + } + export enum CustomTestFieldScope { + None = 0, + TestRun = 1, + TestResult = 2, + System = 4, + All = 7, + } + export enum CustomTestFieldType { + Bit = 2, + DateTime = 4, + Int = 8, + Float = 6, + String = 12, + Guid = 14, + } + /** + * This is a temporary class to provide the details for the test run environment. + */ + export interface DtlEnvironmentDetails { + csmContent: string; + csmParameters: string; + subscriptionName: string; + } + export interface FailingSince { + build: BuildReference; + date: Date; + release: ReleaseReference; + } + export interface FunctionCoverage { + class: string; + name: string; + namespace: string; + sourceFile: string; + statistics: CoverageStatistics; + } + export enum GroupTestResultsBy { + None = 0, + AutomatedTestStorage = 1, + } + export interface LastResultDetails { + dateCompleted: Date; + duration: number; + runBy: VSSInterfaces.IdentityRef; + } + export interface ModuleCoverage { + blockCount: number; + blockData: number[]; + functions: FunctionCoverage[]; + name: string; + signature: string; + signatureAge: number; + statistics: CoverageStatistics; + } + export interface NameValuePair { + name: string; + value: string; + } + export interface PlanUpdateModel { + area: ShallowReference; + automatedTestEnvironment: TestEnvironment; + automatedTestSettings: TestSettings; + build: ShallowReference; + configurationIds: number[]; + description: string; + endDate: string; + iteration: string; + manualTestEnvironment: TestEnvironment; + manualTestSettings: TestSettings; + name: string; + owner: VSSInterfaces.IdentityRef; + startDate: string; + state: string; + status: string; + } + export interface PointAssignment { + configuration: ShallowReference; + tester: VSSInterfaces.IdentityRef; + } + export interface PointUpdateModel { + } + export interface PointWorkItemProperty { + workItem: { + key: string; + value: any; + }; + } + export interface QueryModel { + query: string; + } + export interface ReleaseReference { + definitionId: number; + environmentDefinitionId: number; + environmentId: number; + id: number; + } + export interface Response { + error: string; + id: string; + status: string; + url: string; + } + export enum ResultDetails { + None = 0, + Iterations = 1, + WorkItems = 2, + } + export enum ResultObjectType { + TestSuite = 0, + TestPlan = 1, + } + export enum ResultOutcome { + Pass = 1, + Fail = 2, + Pending = 3, + } + export interface ResultRetentionSettings { + automatedResultsRetentionDuration: number; + lastUpdatedBy: VSSInterfaces.IdentityRef; + lastUpdatedDate: Date; + manualResultsRetentionDuration: number; + } + export interface ResultUpdateRequestModel { + actionResultDeletes: TestActionResultModel[]; + actionResults: TestActionResultModel[]; + parameterDeletes: TestResultParameterModel[]; + parameters: TestResultParameterModel[]; + testCaseResult: TestCaseResultUpdateModel; + } + export interface ResultUpdateResponseModel { + revision: number; + } + export interface RunCreateModel { + automated: boolean; + build: ShallowReference; + buildDropLocation: string; + buildFlavor: string; + buildPlatform: string; + comment: string; + completeDate: string; + configurationIds: number[]; + controller: string; + customTestFields: CustomTestField[]; + dtlAutEnvironment: ShallowReference; + dtlTestEnvironment: ShallowReference; + dueDate: string; + environmentDetails: DtlEnvironmentDetails; + errorMessage: string; + filter: RunFilter; + iteration: string; + name: string; + owner: VSSInterfaces.IdentityRef; + plan: ShallowReference; + pointIds: number[]; + releaseEnvironmentUri: string; + releaseUri: string; + runTimeout: any; + sourceWorkflow: string; + startDate: string; + state: string; + testConfigurationsMapping: string; + testEnvironmentId: string; + testSettings: ShallowReference; + type: string; + } + /** + * This class is used to provide the filters used for discovery + */ + export interface RunFilter { + /** + * filter for the test case sources (test containers) + */ + sourceFilter: string; + /** + * filter for the test cases + */ + testCaseFilter: string; + } + export interface RunStatistic { + count: number; + outcome: string; + resolutionState: TestResolutionState; + state: string; + } + export interface RunUpdateModel { + build: ShallowReference; + comment: string; + completedDate: string; + controller: string; + deleteInProgressResults: boolean; + dtlAutEnvironment: ShallowReference; + dtlEnvironment: ShallowReference; + dtlEnvironmentDetails: DtlEnvironmentDetails; + dueDate: string; + errorMessage: string; + iteration: string; + logEntries: TestMessageLogDetails[]; + name: string; + startedDate: string; + state: string; + substate: TestRunSubstate; + testEnvironmentId: string; + testSettings: ShallowReference; + } + /** + * An abstracted reference to some other resource. This class is used to provide the build data contracts with a uniform way to reference other resources in a way that provides easy traversal through links. + */ + export interface ShallowReference { + /** + * Id of the resource + */ + id: string; + /** + * Name of the linked resource (definition name, controller name, etc.) + */ + name: string; + /** + * Full http link to the resource + */ + url: string; + } + export interface SharedStepModel { + id: number; + revision: number; + } + export interface SuiteCreateModel { + } + export interface SuiteTestCase { + pointAssignments: PointAssignment[]; + testCase: WorkItemReference; + } + export interface SuiteUpdateModel { + } + export interface TestActionResultModel extends TestResultModelBase { + actionPath: string; + iterationId: number; + sharedStepModel: SharedStepModel; + url: string; + } + export interface TestAttachmentReference { + id: number; + url: string; + } + export interface TestAttachmentRequestModel { + attachmentType: string; + comment: string; + fileName: string; + stream: string; + } + export interface TestCaseResult { + afnStripId: number; + area: ShallowReference; + associatedBugs: ShallowReference[]; + automatedTestId: string; + automatedTestName: string; + automatedTestStorage: string; + automatedTestType: string; + automatedTestTypeId: string; + build: ShallowReference; + buildReference: BuildReference; + comment: string; + completedDate: Date; + computerName: string; + configuration: ShallowReference; + createdDate: Date; + customFields: CustomTestField[]; + durationInMs: number; + errorMessage: string; + failingSince: FailingSince; + failureType: string; + id: number; + iterationDetails: TestIterationDetailsModel[]; + lastUpdatedBy: VSSInterfaces.IdentityRef; + lastUpdatedDate: Date; + outcome: string; + owner: VSSInterfaces.IdentityRef; + priority: number; + project: ShallowReference; + releaseReference: ReleaseReference; + resetCount: number; + resolutionState: string; + resolutionStateId: number; + revision: number; + runBy: VSSInterfaces.IdentityRef; + stackTrace: string; + startedDate: Date; + state: string; + testCase: ShallowReference; + testCaseTitle: string; + testPoint: ShallowReference; + testRun: ShallowReference; + url: string; + } + export interface TestCaseResult2 { + componentId: string; + custom: any; + endTime: Date; + exceptionStack: string; + externalArtifacts: string[]; + externalRunId: string; + externalSystem: string; + externalTestId: string; + failureReasons: string[]; + failureSummary: string; + investigationNotes: string; + isSuperseded: boolean; + isValid: boolean; + outcome: ResultOutcome; + resultCustomPropertiesTypeName: string; + resultId: string; + resultName: string; + runId: string; + startTime: Date; + testId: string; + tfsSecurityKey: string; + } + export interface TestCaseResultAttachmentModel { + id: number; + iterationId: number; + name: string; + size: number; + url: string; + } + export interface TestCaseResultIdentifier { + testResultId: number; + testRunId: number; + } + export interface TestCaseResultUpdateModel { + associatedWorkItems: number[]; + automatedTestTypeId: string; + comment: string; + completedDate: string; + computerName: string; + customFields: CustomTestField[]; + durationInMs: string; + errorMessage: string; + failureType: string; + outcome: string; + owner: VSSInterfaces.IdentityRef; + resolutionState: string; + runBy: VSSInterfaces.IdentityRef; + stackTrace: string; + startedDate: string; + state: string; + testCasePriority: string; + testResult: ShallowReference; + } + export interface TestConfiguration { + /** + * Area of the configuration + */ + area: ShallowReference; + /** + * Description of the configuration + */ + description: string; + /** + * Id of the configuration + */ + id: number; + /** + * Is the configuration a default for the test plans + */ + isDefault: boolean; + /** + * Last Updated By Reference + */ + lastUpdatedBy: VSSInterfaces.IdentityRef; + /** + * Last Updated Data + */ + lastUpdatedDate: Date; + /** + * Name of the configuration + */ + name: string; + /** + * Project to which the configuration belongs + */ + project: ShallowReference; + /** + * Revision of the the configuration + */ + revision: number; + /** + * State of the configuration + */ + state: TestConfigurationState; + /** + * Url of Configuration Resource + */ + url: string; + /** + * Dictionary of Test Variable, Selected Value + */ + values: NameValuePair[]; + } + export enum TestConfigurationState { + /** + * The configuration can be used for new test runs. + */ + Active = 1, + /** + * The configuration has been retired and should not be used for new test runs. + */ + Inactive = 2, + } + export interface TestEnvironment { + environmentId: string; + environmentName: string; + } + export interface TestFailureDetails { + count: number; + testResults: ShallowReference[]; + } + export interface TestFailuresAnalysis { + existingFailures: TestFailureDetails; + fixedTests: TestFailureDetails; + newFailures: TestFailureDetails; + previousContext: TestResultsContext; + } + export interface TestIterationDetailsModel { + actionResults: TestActionResultModel[]; + attachments: TestCaseResultAttachmentModel[]; + comment: string; + completedDate: Date; + durationInMs: number; + errorMessage: string; + id: number; + outcome: string; + parameters: TestResultParameterModel[]; + startedDate: Date; + url: string; + } + /** + * An abstracted reference to some other resource. This class is used to provide the build data contracts with a uniform way to reference other resources in a way that provides easy traversal through links. + */ + export interface TestMessageLogDetails { + /** + * Date when the resource is created + */ + dateCreated: Date; + /** + * Id of the resource + */ + entryId: number; + /** + * Message of the resource + */ + message: string; + } + export enum TestOutcome { + /** + * Only used during an update to preserve the existing value. + */ + Unspecified = 0, + /** + * Test has not been completed, or the test type does not report pass/failure. + */ + None = 1, + /** + * Test was executed w/o any issues. + */ + Passed = 2, + /** + * Test was executed, but there were issues. Issues may involve exceptions or failed assertions. + */ + Failed = 3, + /** + * Test has completed, but we can't say if it passed or failed. May be used for aborted tests... + */ + Inconclusive = 4, + /** + * The test timed out + */ + Timeout = 5, + /** + * Test was aborted. This was not caused by a user gesture, but rather by a framework decision. + */ + Aborted = 6, + /** + * Test had it chance for been executed but was not, as ITestElement.IsRunnable == false. + */ + Blocked = 7, + /** + * Test was not executed. This was caused by a user gesture - e.g. user hit stop button. + */ + NotExecuted = 8, + /** + * To be used by Run level results. This is not a failure. + */ + Warning = 9, + /** + * There was a system error while we were trying to execute a test. + */ + Error = 10, + /** + * Test is Not Applicable for execution. + */ + NotApplicable = 11, + /** + * Test is paused. + */ + Paused = 12, + /** + * Test is currently executing. Added this for TCM charts + */ + InProgress = 13, + MaxValue = 13, + } + export interface TestPlan { + area: ShallowReference; + automatedTestEnvironment: TestEnvironment; + automatedTestSettings: TestSettings; + build: ShallowReference; + clientUrl: string; + description: string; + endDate: Date; + id: number; + iteration: string; + manualTestEnvironment: TestEnvironment; + manualTestSettings: TestSettings; + name: string; + owner: VSSInterfaces.IdentityRef; + previousBuild: ShallowReference; + project: ShallowReference; + revision: number; + rootSuite: ShallowReference; + startDate: Date; + state: string; + updatedBy: VSSInterfaces.IdentityRef; + updatedDate: Date; + url: string; + } + export interface TestPlanCloneRequest { + cloneOptions: CloneOptions; + destinationTestPlan: TestPlan; + suiteIds: number[]; + } + export interface TestPlansWithSelection { + lastSelectedPlan: number; + lastSelectedSuite: number; + plans: TestPlan[]; + } + export interface TestPoint { + assignedTo: VSSInterfaces.IdentityRef; + automated: boolean; + comment: string; + configuration: ShallowReference; + failureType: string; + id: number; + lastResolutionStateId: number; + lastResult: ShallowReference; + lastResultDetails: LastResultDetails; + lastRunBuildNumber: string; + lastTestRun: ShallowReference; + lastUpdatedBy: VSSInterfaces.IdentityRef; + lastUpdatedDate: Date; + outcome: string; + revision: number; + state: string; + suite: ShallowReference; + testCase: WorkItemReference; + testPlan: ShallowReference; + url: string; + workItemProperties: any[]; + } + export interface TestResolutionState { + id: number; + name: string; + project: ShallowReference; + } + export interface TestResultCreateModel { + area: ShallowReference; + associatedWorkItems: number[]; + automatedTestId: string; + automatedTestName: string; + automatedTestStorage: string; + automatedTestType: string; + automatedTestTypeId: string; + comment: string; + completedDate: string; + computerName: string; + configuration: ShallowReference; + customFields: CustomTestField[]; + durationInMs: string; + errorMessage: string; + failureType: string; + outcome: string; + owner: VSSInterfaces.IdentityRef; + resolutionState: string; + runBy: VSSInterfaces.IdentityRef; + stackTrace: string; + startedDate: string; + state: string; + testCase: ShallowReference; + testCasePriority: string; + testCaseTitle: string; + testPoint: ShallowReference; + } + export interface TestResultModelBase { + comment: string; + completedDate: Date; + durationInMs: number; + errorMessage: string; + outcome: string; + startedDate: Date; + } + export interface TestResultParameterModel { + actionPath: string; + iterationId: number; + parameterName: string; + url: string; + value: string; + } + export interface TestResultsContext { + build: BuildReference; + contextType: TestResultsContextType; + release: ReleaseReference; + } + export enum TestResultsContextType { + Build = 1, + Release = 2, + } + export interface TestResultsDetails { + groupByField: string; + resultsForGroup: TestResultsDetailsForGroup[]; + } + export interface TestResultsDetailsForGroup { + groupByValue: any; + ids: TestCaseResultIdentifier[]; + resultsCountByOutcome: { + [key: number]: AggregatedResultsByOutcome; + }; + } + export interface TestResultSummary { + aggregatedResultsAnalysis: AggregatedResultsAnalysis; + teamProject: TfsCoreInterfaces.TeamProjectReference; + testFailures: TestFailuresAnalysis; + testResultsContext: TestResultsContext; + } + export interface TestResultTrendFilter { + branchNames: string[]; + buildCount: number; + definitionIds: number[]; + publishContext: string; + testRunTitles: string[]; + } + export interface TestRun { + build: ShallowReference; + buildConfiguration: BuildConfiguration; + comment: string; + completedDate: Date; + controller: string; + createdDate: Date; + customFields: CustomTestField[]; + dropLocation: string; + dtlAutEnvironment: ShallowReference; + dtlEnvironment: ShallowReference; + dtlEnvironmentCreationDetails: DtlEnvironmentDetails; + dueDate: Date; + errorMessage: string; + filter: RunFilter; + id: number; + incompleteTests: number; + isAutomated: boolean; + iteration: string; + lastUpdatedBy: VSSInterfaces.IdentityRef; + lastUpdatedDate: Date; + name: string; + notApplicableTests: number; + owner: VSSInterfaces.IdentityRef; + passedTests: number; + phase: string; + plan: ShallowReference; + postProcessState: string; + project: ShallowReference; + releaseEnvironmentUri: string; + releaseUri: string; + revision: number; + runStatistics: RunStatistic[]; + startedDate: Date; + state: string; + substate: TestRunSubstate; + testEnvironment: TestEnvironment; + testMessageLogId: number; + testSettings: ShallowReference; + totalTests: number; + unanalyzedTests: number; + url: string; + webAccessUrl: string; + } + export interface TestRunCoverage { + lastError: string; + modules: ModuleCoverage[]; + state: string; + testRun: ShallowReference; + } + export enum TestRunState { + /** + * Only used during an update to preserve the existing value. + */ + Unspecified = 0, + /** + * The run is still being created. No tests have started yet. + */ + NotStarted = 1, + /** + * Tests are running. + */ + InProgress = 2, + /** + * All tests have completed or been skipped. + */ + Completed = 3, + /** + * Run is stopped and remaing tests have been aborted + */ + Aborted = 4, + /** + * Run is currently initializing This is a legacy state and should not be used any more + */ + Waiting = 5, + /** + * Run requires investigation because of a test point failure This is a legacy state and should not be used any more + */ + NeedsInvestigation = 6, + } + export interface TestRunStatistic { + run: ShallowReference; + runStatistics: RunStatistic[]; + } + export enum TestRunSubstate { + None = 0, + CreatingEnvironment = 1, + RunningTests = 2, + CanceledByUser = 3, + AbortedBySystem = 4, + TimedOut = 5, + PendingAnalysis = 6, + Analyzed = 7, + CancellationInProgress = 8, + } + /** + * Represents the test settings of the run. Used to create test settings and fetch test settings + */ + export interface TestSettings { + /** + * Area path required to create test settings + */ + areaPath: string; + /** + * Description of the test settings. Used in create test settings. + */ + description: string; + /** + * Indicates if the tests settings is public or private.Used in create test settings. + */ + isPublic: boolean; + /** + * Xml string of machine roles. Used in create test settings. + */ + machineRoles: string; + /** + * Test settings content. + */ + testSettingsContent: string; + /** + * Test settings id. + */ + testSettingsId: number; + /** + * Test settings name. + */ + testSettingsName: string; + } + export interface TestSuite { + areaUri: string; + children: TestSuite[]; + defaultConfigurations: ShallowReference[]; + id: number; + inheritDefaultConfigurations: boolean; + lastError: string; + lastPopulatedDate: Date; + lastUpdatedBy: VSSInterfaces.IdentityRef; + lastUpdatedDate: Date; + name: string; + parent: ShallowReference; + plan: ShallowReference; + project: ShallowReference; + queryString: string; + requirementId: number; + revision: number; + state: string; + suites: ShallowReference[]; + suiteType: string; + testCaseCount: number; + testCasesUrl: string; + text: string; + url: string; + } + export interface TestSuiteCloneRequest { + cloneOptions: CloneOptions; + destinationSuiteId: number; + destinationSuiteProjectName: string; + } + export interface TestVariable { + /** + * Description of the test variable + */ + description: string; + /** + * Id of the test variable + */ + id: number; + /** + * Name of the test variable + */ + name: string; + /** + * Project to which the test variable belongs + */ + project: ShallowReference; + /** + * Revision + */ + revision: number; + /** + * Url of the test variable + */ + url: string; + /** + * List of allowed values + */ + values: string[]; + } + export interface WorkItemReference { + id: string; + name: string; + url: string; + webUrl: string; + } + export var TypeInfo: { + AggregatedDataForResultTrend: { + fields: any; + }; + AggregatedResultsAnalysis: { + fields: any; + }; + AggregatedResultsByOutcome: { + fields: any; + }; + AggregatedResultsDifference: { + fields: any; + }; + AttachmentType: { + enumValues: { + "generalAttachment": number; + "afnStrip": number; + "bugFilingData": number; + "codeCoverage": number; + "intermediateCollectorData": number; + "runConfig": number; + "testImpactDetails": number; + "tmiTestRunDeploymentFiles": number; + "tmiTestRunReverseDeploymentFiles": number; + "tmiTestResultDetail": number; + "tmiTestRunSummary": number; + }; + }; + BatchResponse: { + fields: any; + }; + BuildConfiguration: { + fields: any; + }; + BuildCoverage: { + fields: any; + }; + BuildReference: { + fields: any; + }; + CloneOperationInformation: { + fields: any; + }; + CloneOperationState: { + enumValues: { + "failed": number; + "inProgress": number; + "queued": number; + "succeeded": number; + }; + }; + CloneOptions: { + fields: any; + }; + CloneStatistics: { + fields: any; + }; + CodeCoverageData: { + fields: any; + }; + CodeCoverageStatistics: { + fields: any; + }; + CodeCoverageSummary: { + fields: any; + }; + CoverageQueryFlags: { + enumValues: { + "modules": number; + "functions": number; + "blockData": number; + }; + }; + CoverageStatistics: { + fields: any; + }; + CustomTestField: { + fields: any; + }; + CustomTestFieldDefinition: { + fields: any; + }; + CustomTestFieldScope: { + enumValues: { + "none": number; + "testRun": number; + "testResult": number; + "system": number; + "all": number; + }; + }; + CustomTestFieldType: { + enumValues: { + "bit": number; + "dateTime": number; + "int": number; + "float": number; + "string": number; + "guid": number; + }; + }; + DtlEnvironmentDetails: { + fields: any; + }; + FailingSince: { + fields: any; + }; + FunctionCoverage: { + fields: any; + }; + GroupTestResultsBy: { + enumValues: { + "none": number; + "automatedTestStorage": number; + }; + }; + LastResultDetails: { + fields: any; + }; + ModuleCoverage: { + fields: any; + }; + NameValuePair: { + fields: any; + }; + PlanUpdateModel: { + fields: any; + }; + PointAssignment: { + fields: any; + }; + PointUpdateModel: { + fields: any; + }; + PointWorkItemProperty: { + fields: any; + }; + QueryModel: { + fields: any; + }; + ReleaseReference: { + fields: any; + }; + Response: { + fields: any; + }; + ResultDetails: { + enumValues: { + "none": number; + "iterations": number; + "workItems": number; + }; + }; + ResultObjectType: { + enumValues: { + "testSuite": number; + "testPlan": number; + }; + }; + ResultOutcome: { + enumValues: { + "pass": number; + "fail": number; + "pending": number; + }; + }; + ResultRetentionSettings: { + fields: any; + }; + ResultUpdateRequestModel: { + fields: any; + }; + ResultUpdateResponseModel: { + fields: any; + }; + RunCreateModel: { + fields: any; + }; + RunFilter: { + fields: any; + }; + RunStatistic: { + fields: any; + }; + RunUpdateModel: { + fields: any; + }; + ShallowReference: { + fields: any; + }; + SharedStepModel: { + fields: any; + }; + SuiteCreateModel: { + fields: any; + }; + SuiteTestCase: { + fields: any; + }; + SuiteUpdateModel: { + fields: any; + }; + TestActionResultModel: { + fields: any; + }; + TestAttachmentReference: { + fields: any; + }; + TestAttachmentRequestModel: { + fields: any; + }; + TestCaseResult: { + fields: any; + }; + TestCaseResult2: { + fields: any; + }; + TestCaseResultAttachmentModel: { + fields: any; + }; + TestCaseResultIdentifier: { + fields: any; + }; + TestCaseResultUpdateModel: { + fields: any; + }; + TestConfiguration: { + fields: any; + }; + TestConfigurationState: { + enumValues: { + "active": number; + "inactive": number; + }; + }; + TestEnvironment: { + fields: any; + }; + TestFailureDetails: { + fields: any; + }; + TestFailuresAnalysis: { + fields: any; + }; + TestIterationDetailsModel: { + fields: any; + }; + TestMessageLogDetails: { + fields: any; + }; + TestOutcome: { + enumValues: { + "unspecified": number; + "none": number; + "passed": number; + "failed": number; + "inconclusive": number; + "timeout": number; + "aborted": number; + "blocked": number; + "notExecuted": number; + "warning": number; + "error": number; + "notApplicable": number; + "paused": number; + "inProgress": number; + "maxValue": number; + }; + }; + TestPlan: { + fields: any; + }; + TestPlanCloneRequest: { + fields: any; + }; + TestPlansWithSelection: { + fields: any; + }; + TestPoint: { + fields: any; + }; + TestResolutionState: { + fields: any; + }; + TestResultCreateModel: { + fields: any; + }; + TestResultModelBase: { + fields: any; + }; + TestResultParameterModel: { + fields: any; + }; + TestResultsContext: { + fields: any; + }; + TestResultsContextType: { + enumValues: { + "build": number; + "release": number; + }; + }; + TestResultsDetails: { + fields: any; + }; + TestResultsDetailsForGroup: { + fields: any; + }; + TestResultSummary: { + fields: any; + }; + TestResultTrendFilter: { + fields: any; + }; + TestRun: { + fields: any; + }; + TestRunCoverage: { + fields: any; + }; + TestRunState: { + enumValues: { + "unspecified": number; + "notStarted": number; + "inProgress": number; + "completed": number; + "aborted": number; + "waiting": number; + "needsInvestigation": number; + }; + }; + TestRunStatistic: { + fields: any; + }; + TestRunSubstate: { + enumValues: { + "none": number; + "creatingEnvironment": number; + "runningTests": number; + "canceledByUser": number; + "abortedBySystem": number; + "timedOut": number; + "pendingAnalysis": number; + "analyzed": number; + "cancellationInProgress": number; + }; + }; + TestSettings: { + fields: any; + }; + TestSuite: { + fields: any; + }; + TestSuiteCloneRequest: { + fields: any; + }; + TestVariable: { + fields: any; + }; + WorkItemReference: { + fields: any; + }; + }; + +} +declare module 'vso-node-api/TestApi' { + + + import Q = require('q'); + import basem = require('vso-node-api/ClientApiBases'); + import VsoBaseInterfaces = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); + import TestInterfaces = require('vso-node-api/interfaces/TestInterfaces'); + export interface ITestApi extends basem.ClientApiBase { + createTestResultAttachment(attachmentRequestModel: TestInterfaces.TestAttachmentRequestModel, project: string, runId: number, testCaseResultId: number, onResult: (err: any, statusCode: number, Attachment: TestInterfaces.TestAttachmentReference) => void): void; + getTestResultAttachmentContent(project: string, runId: number, testCaseResultId: number, attachmentId: number, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + getTestResultAttachmentZip(project: string, runId: number, testCaseResultId: number, attachmentId: number, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + createTestRunAttachment(attachmentRequestModel: TestInterfaces.TestAttachmentRequestModel, project: string, runId: number, onResult: (err: any, statusCode: number, Attachment: TestInterfaces.TestAttachmentReference) => void): void; + getTestRunAttachmentContent(project: string, runId: number, attachmentId: number, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + getTestRunAttachmentZip(project: string, runId: number, attachmentId: number, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + getBugsLinkedToTestResult(project: string, runId: number, testCaseResultId: number, onResult: (err: any, statusCode: number, Bugs: TestInterfaces.WorkItemReference[]) => void): void; + getBuildCodeCoverage(project: string, buildId: number, flags: number, onResult: (err: any, statusCode: number, CodeCoverage: TestInterfaces.BuildCoverage[]) => void): void; + getCodeCoverageSummary(project: string, buildId: number, deltaBuildId: number, onResult: (err: any, statusCode: number, CodeCoverage: TestInterfaces.CodeCoverageSummary) => void): void; + updateCodeCoverageSummary(coverageData: TestInterfaces.CodeCoverageData, project: string, buildId: number, onResult: (err: any, statusCode: number) => void): void; + getTestRunCodeCoverage(project: string, runId: number, flags: number, onResult: (err: any, statusCode: number, CodeCoverage: TestInterfaces.TestRunCoverage[]) => void): void; + createTestConfiguration(testConfiguration: TestInterfaces.TestConfiguration, project: string, onResult: (err: any, statusCode: number, Configuration: TestInterfaces.TestConfiguration) => void): void; + deleteTestConfiguration(project: string, testConfigurationId: number, onResult: (err: any, statusCode: number) => void): void; + getTestConfigurationById(project: string, testConfigurationId: number, onResult: (err: any, statusCode: number, Configuration: TestInterfaces.TestConfiguration) => void): void; + getTestConfigurations(project: string, skip: number, top: number, includeAllProperties: boolean, onResult: (err: any, statusCode: number, Configurations: TestInterfaces.TestConfiguration[]) => void): void; + updateTestConfiguration(testConfiguration: TestInterfaces.TestConfiguration, project: string, testConfigurationId: number, onResult: (err: any, statusCode: number, Configuration: TestInterfaces.TestConfiguration) => void): void; + addCustomFields(newFields: TestInterfaces.CustomTestFieldDefinition[], project: string, onResult: (err: any, statusCode: number, ExtensionFields: TestInterfaces.CustomTestFieldDefinition[]) => void): void; + queryCustomFields(project: string, scopeFilter: TestInterfaces.CustomTestFieldScope, onResult: (err: any, statusCode: number, ExtensionFields: TestInterfaces.CustomTestFieldDefinition[]) => void): void; + getTestRunLogs(project: string, runId: number, onResult: (err: any, statusCode: number, MessageLogs: TestInterfaces.TestMessageLogDetails[]) => void): void; + getPlanCloneInformation(project: string, operationId: number, includeDetails: boolean, onResult: (err: any, statusCode: number, Plan: TestInterfaces.CloneOperationInformation) => void): void; + createTestPlan(testPlan: TestInterfaces.PlanUpdateModel, project: string, onResult: (err: any, statusCode: number, Plan: TestInterfaces.TestPlan) => void): void; + deleteTestPlan(project: string, planId: number, onResult: (err: any, statusCode: number) => void): void; + getPlanById(project: string, planId: number, onResult: (err: any, statusCode: number, Plan: TestInterfaces.TestPlan) => void): void; + getPlans(project: string, owner: string, skip: number, top: number, includePlanDetails: boolean, filterActivePlans: boolean, onResult: (err: any, statusCode: number, Plans: TestInterfaces.TestPlan[]) => void): void; + updateTestPlan(planUpdateModel: TestInterfaces.PlanUpdateModel, project: string, planId: number, onResult: (err: any, statusCode: number, Plan: TestInterfaces.TestPlan) => void): void; + cloneTestPlan(cloneRequestBody: TestInterfaces.TestPlanCloneRequest, project: string, sourcePlanId: number, onResult: (err: any, statusCode: number, Plan: TestInterfaces.CloneOperationInformation) => void): void; + getPoint(project: string, planId: number, suiteId: number, pointIds: number, witFields: string, onResult: (err: any, statusCode: number, Point: TestInterfaces.TestPoint) => void): void; + getPoints(project: string, planId: number, suiteId: number, witFields: string, configurationId: string, testCaseId: string, testPointIds: string, includePointDetails: boolean, skip: number, top: number, onResult: (err: any, statusCode: number, Points: TestInterfaces.TestPoint[]) => void): void; + updateTestPoints(pointUpdateModel: TestInterfaces.PointUpdateModel, project: string, planId: number, suiteId: number, pointIds: string, onResult: (err: any, statusCode: number, Point: TestInterfaces.TestPoint[]) => void): void; + queryTestResultRecentBugs(project: string, testRunId: number, testResultId: number, recentDays: number, onResult: (err: any, statusCode: number, RecentBugs: TestInterfaces.WorkItemReference[]) => void): void; + getTestResultDetailsForBuild(project: string, buildId: number, publishContext: string, groupBy: string, filter: string, onResult: (err: any, statusCode: number, ResultDetailsByBuild: TestInterfaces.TestResultsDetails) => void): void; + getTestResultDetailsForRelease(project: string, releaseId: number, releaseEnvId: number, publishContext: string, groupBy: string, filter: string, onResult: (err: any, statusCode: number, ResultDetailsByRelease: TestInterfaces.TestResultsDetails) => void): void; + createResultRetentionSettings(retentionSettings: TestInterfaces.ResultRetentionSettings, project: string, onResult: (err: any, statusCode: number, ResultRetentionSetting: TestInterfaces.ResultRetentionSettings) => void): void; + deleteResultRetentionSettings(project: string, onResult: (err: any, statusCode: number) => void): void; + getResultRetentionSettings(project: string, onResult: (err: any, statusCode: number, ResultRetentionSetting: TestInterfaces.ResultRetentionSettings) => void): void; + updateResultRetentionSettings(retentionSettings: TestInterfaces.ResultRetentionSettings, project: string, onResult: (err: any, statusCode: number, ResultRetentionSetting: TestInterfaces.ResultRetentionSettings) => void): void; + getTestIteration(project: string, runId: number, testCaseResultId: number, iterationId: number, includeActionResults: boolean, onResult: (err: any, statusCode: number, Result: TestInterfaces.TestIterationDetailsModel) => void): void; + getTestIterations(project: string, runId: number, testCaseResultId: number, includeActionResults: boolean, onResult: (err: any, statusCode: number, Results: TestInterfaces.TestIterationDetailsModel[]) => void): void; + addTestResultsToTestRun(resultCreateModels: TestInterfaces.TestResultCreateModel[], project: string, runId: number, onResult: (err: any, statusCode: number, Results: TestInterfaces.TestCaseResult[]) => void): void; + bulkUpdateTestResults(resultUpdateModel: TestInterfaces.TestCaseResultUpdateModel, project: string, runId: number, resultIds: number[], onResult: (err: any, statusCode: number, Result: TestInterfaces.TestCaseResult[]) => void): void; + getTestCaseResultById(project: string, runId: number, testCaseResultId: number, includeIterationDetails: boolean, includeAssociatedBugs: boolean, onResult: (err: any, statusCode: number, Result: TestInterfaces.TestCaseResult) => void): void; + getTestCaseResults(project: string, runId: number, includeIterationDetails: boolean, onResult: (err: any, statusCode: number, Results: TestInterfaces.TestCaseResult[]) => void): void; + getTestResultById(project: string, runId: number, testCaseResultId: number, detailsToInclude: TestInterfaces.ResultDetails, onResult: (err: any, statusCode: number, Results: TestInterfaces.TestCaseResult[]) => void): void; + getTestResults(project: string, runId: number, detailsToInclude: TestInterfaces.ResultDetails, skip: number, top: number, onResult: (err: any, statusCode: number, Results: TestInterfaces.TestCaseResult[]) => void): void; + updateTestResults(resultUpdateModels: TestInterfaces.TestCaseResultUpdateModel[], project: string, runId: number, onResult: (err: any, statusCode: number, Results: TestInterfaces.TestCaseResult[]) => void): void; + getTestResultsByIds(ids: TestInterfaces.TestCaseResultIdentifier[], project: string, fields: string[], onResult: (err: any, statusCode: number, Results: TestInterfaces.TestCaseResult[]) => void): void; + getActionResults(project: string, runId: number, testCaseResultId: number, iterationId: number, actionPath: string, onResult: (err: any, statusCode: number, Results: TestInterfaces.TestActionResultModel[]) => void): void; + getResultParameters(project: string, runId: number, testCaseResultId: number, iterationId: number, paramName: string, onResult: (err: any, statusCode: number, Results: TestInterfaces.TestResultParameterModel[]) => void): void; + getTestResultsByQuery(query: TestInterfaces.QueryModel, project: string, includeResultDetails: boolean, includeIterationDetails: boolean, skip: number, top: number, onResult: (err: any, statusCode: number, Result: TestInterfaces.TestCaseResult[]) => void): void; + queryTestResultsReportForBuild(project: string, buildId: number, publishContext: string, includeFailureDetails: boolean, buildToCompare: TestInterfaces.BuildReference, onResult: (err: any, statusCode: number, ResultSummaryByBuild: TestInterfaces.TestResultSummary) => void): void; + queryTestResultsReportForRelease(project: string, releaseId: number, releaseEnvId: number, publishContext: string, includeFailureDetails: boolean, releaseToCompare: TestInterfaces.ReleaseReference, onResult: (err: any, statusCode: number, ResultSummaryByRelease: TestInterfaces.TestResultSummary) => void): void; + queryTestResultTrendReport(project: string, testRunId: number, testResultId: number, historyDays: number, top: number, onResult: (err: any, statusCode: number, ResultTrend: TestInterfaces.TestCaseResult[]) => void): void; + queryResultTrendForBuild(filter: TestInterfaces.TestResultTrendFilter, project: string, onResult: (err: any, statusCode: number, ResultTrendByBuild: TestInterfaces.AggregatedDataForResultTrend[]) => void): void; + getTestRunStatistics(project: string, runId: number, onResult: (err: any, statusCode: number, Run: TestInterfaces.TestRunStatistic) => void): void; + getTestRunsByQuery(query: TestInterfaces.QueryModel, project: string, includeRunDetails: boolean, skip: number, top: number, onResult: (err: any, statusCode: number, Run: TestInterfaces.TestRun[]) => void): void; + createTestRun(testRun: TestInterfaces.RunCreateModel, project: string, onResult: (err: any, statusCode: number, Run: TestInterfaces.TestRun) => void): void; + deleteTestRun(project: string, runId: number, onResult: (err: any, statusCode: number) => void): void; + getTestRunById(project: string, runId: number, onResult: (err: any, statusCode: number, Run: TestInterfaces.TestRun) => void): void; + getTestRuns(project: string, buildUri: string, owner: string, tmiRunId: string, planId: number, includeRunDetails: boolean, automated: boolean, skip: number, top: number, onResult: (err: any, statusCode: number, Runs: TestInterfaces.TestRun[]) => void): void; + updateTestRun(runUpdateModel: TestInterfaces.RunUpdateModel, project: string, runId: number, onResult: (err: any, statusCode: number, Run: TestInterfaces.TestRun) => void): void; + getSuiteCloneInformation(project: string, operationId: number, includeDetails: boolean, onResult: (err: any, statusCode: number, Suite: TestInterfaces.CloneOperationInformation) => void): void; + addTestCasesToSuite(project: string, planId: number, suiteId: number, testCaseIds: string, onResult: (err: any, statusCode: number, Suites: TestInterfaces.SuiteTestCase[]) => void): void; + getTestCaseById(project: string, planId: number, suiteId: number, testCaseIds: number, onResult: (err: any, statusCode: number, Suite: TestInterfaces.SuiteTestCase) => void): void; + getTestCases(project: string, planId: number, suiteId: number, onResult: (err: any, statusCode: number, Suites: TestInterfaces.SuiteTestCase[]) => void): void; + removeTestCasesFromSuiteUrl(project: string, planId: number, suiteId: number, testCaseIds: string, onResult: (err: any, statusCode: number) => void): void; + createTestSuite(testSuite: TestInterfaces.SuiteCreateModel, project: string, planId: number, suiteId: number, onResult: (err: any, statusCode: number, Suite: TestInterfaces.TestSuite[]) => void): void; + deleteTestSuite(project: string, planId: number, suiteId: number, onResult: (err: any, statusCode: number) => void): void; + getTestSuiteById(project: string, planId: number, suiteId: number, includeChildSuites: boolean, onResult: (err: any, statusCode: number, Suite: TestInterfaces.TestSuite) => void): void; + getTestSuitesForPlan(project: string, planId: number, includeSuites: boolean, skip: number, top: number, asTreeView: boolean, onResult: (err: any, statusCode: number, Suites: TestInterfaces.TestSuite[]) => void): void; + updateTestSuite(suiteUpdateModel: TestInterfaces.SuiteUpdateModel, project: string, planId: number, suiteId: number, onResult: (err: any, statusCode: number, Suite: TestInterfaces.TestSuite) => void): void; + cloneTestSuite(cloneRequestBody: TestInterfaces.TestSuiteCloneRequest, project: string, sourceSuiteId: number, planId: number, onResult: (err: any, statusCode: number, Suite: TestInterfaces.CloneOperationInformation) => void): void; + getSuitesByTestCaseId(testCaseId: number, onResult: (err: any, statusCode: number, Suites: TestInterfaces.TestSuite[]) => void): void; + createTestSettings(testSettings: TestInterfaces.TestSettings, project: string, onResult: (err: any, statusCode: number, TestSetting: number) => void): void; + deleteTestSettings(project: string, testSettingsId: number, onResult: (err: any, statusCode: number) => void): void; + getTestSettingsById(project: string, testSettingsId: number, onResult: (err: any, statusCode: number, TestSetting: TestInterfaces.TestSettings) => void): void; + createTestVariable(testVariable: TestInterfaces.TestVariable, project: string, onResult: (err: any, statusCode: number, Variable: TestInterfaces.TestVariable) => void): void; + deleteTestVariable(project: string, testVariableId: number, onResult: (err: any, statusCode: number) => void): void; + getTestVariable(project: string, testVariableId: number, onResult: (err: any, statusCode: number, Variable: TestInterfaces.TestVariable) => void): void; + getTestVariables(project: string, skip: number, top: number, onResult: (err: any, statusCode: number, Variables: TestInterfaces.TestVariable[]) => void): void; + updateTestVariable(testVariable: TestInterfaces.TestVariable, project: string, testVariableId: number, onResult: (err: any, statusCode: number, Variable: TestInterfaces.TestVariable) => void): void; + } + export interface IQTestApi extends basem.QClientApiBase { + createTestResultAttachment(attachmentRequestModel: TestInterfaces.TestAttachmentRequestModel, project: string, runId: number, testCaseResultId: number): Promise; + getTestResultAttachmentContent(project: string, runId: number, testCaseResultId: number, attachmentId: number): Promise; + getTestResultAttachmentZip(project: string, runId: number, testCaseResultId: number, attachmentId: number): Promise; + createTestRunAttachment(attachmentRequestModel: TestInterfaces.TestAttachmentRequestModel, project: string, runId: number): Promise; + getTestRunAttachmentContent(project: string, runId: number, attachmentId: number): Promise; + getTestRunAttachmentZip(project: string, runId: number, attachmentId: number): Promise; + getBugsLinkedToTestResult(project: string, runId: number, testCaseResultId: number): Promise; + getBuildCodeCoverage(project: string, buildId: number, flags: number): Promise; + getCodeCoverageSummary(project: string, buildId: number, deltaBuildId?: number): Promise; + updateCodeCoverageSummary(coverageData: TestInterfaces.CodeCoverageData, project: string, buildId: number): Promise; + getTestRunCodeCoverage(project: string, runId: number, flags: number): Promise; + createTestConfiguration(testConfiguration: TestInterfaces.TestConfiguration, project: string): Promise; + deleteTestConfiguration(project: string, testConfigurationId: number): Promise; + getTestConfigurationById(project: string, testConfigurationId: number): Promise; + getTestConfigurations(project: string, skip?: number, top?: number, includeAllProperties?: boolean): Promise; + updateTestConfiguration(testConfiguration: TestInterfaces.TestConfiguration, project: string, testConfigurationId: number): Promise; + addCustomFields(newFields: TestInterfaces.CustomTestFieldDefinition[], project: string): Promise; + queryCustomFields(project: string, scopeFilter: TestInterfaces.CustomTestFieldScope): Promise; + getTestRunLogs(project: string, runId: number): Promise; + getPlanCloneInformation(project: string, operationId: number, includeDetails?: boolean): Promise; + createTestPlan(testPlan: TestInterfaces.PlanUpdateModel, project: string): Promise; + deleteTestPlan(project: string, planId: number): Promise; + getPlanById(project: string, planId: number): Promise; + getPlans(project: string, owner?: string, skip?: number, top?: number, includePlanDetails?: boolean, filterActivePlans?: boolean): Promise; + updateTestPlan(planUpdateModel: TestInterfaces.PlanUpdateModel, project: string, planId: number): Promise; + cloneTestPlan(cloneRequestBody: TestInterfaces.TestPlanCloneRequest, project: string, sourcePlanId: number): Promise; + getPoint(project: string, planId: number, suiteId: number, pointIds: number, witFields?: string): Promise; + getPoints(project: string, planId: number, suiteId: number, witFields?: string, configurationId?: string, testCaseId?: string, testPointIds?: string, includePointDetails?: boolean, skip?: number, top?: number): Promise; + updateTestPoints(pointUpdateModel: TestInterfaces.PointUpdateModel, project: string, planId: number, suiteId: number, pointIds: string): Promise; + queryTestResultRecentBugs(project: string, testRunId: number, testResultId: number, recentDays?: number): Promise; + getTestResultDetailsForBuild(project: string, buildId: number, publishContext?: string, groupBy?: string, filter?: string): Promise; + getTestResultDetailsForRelease(project: string, releaseId: number, releaseEnvId: number, publishContext?: string, groupBy?: string, filter?: string): Promise; + createResultRetentionSettings(retentionSettings: TestInterfaces.ResultRetentionSettings, project: string): Promise; + deleteResultRetentionSettings(project: string): Promise; + getResultRetentionSettings(project: string): Promise; + updateResultRetentionSettings(retentionSettings: TestInterfaces.ResultRetentionSettings, project: string): Promise; + getTestIteration(project: string, runId: number, testCaseResultId: number, iterationId: number, includeActionResults?: boolean): Promise; + getTestIterations(project: string, runId: number, testCaseResultId: number, includeActionResults?: boolean): Promise; + addTestResultsToTestRun(resultCreateModels: TestInterfaces.TestResultCreateModel[], project: string, runId: number): Promise; + bulkUpdateTestResults(resultUpdateModel: TestInterfaces.TestCaseResultUpdateModel, project: string, runId: number, resultIds: number[]): Promise; + getTestCaseResultById(project: string, runId: number, testCaseResultId: number, includeIterationDetails: boolean, includeAssociatedBugs?: boolean): Promise; + getTestCaseResults(project: string, runId: number, includeIterationDetails: boolean): Promise; + getTestResultById(project: string, runId: number, testCaseResultId: number, detailsToInclude?: TestInterfaces.ResultDetails): Promise; + getTestResults(project: string, runId: number, detailsToInclude?: TestInterfaces.ResultDetails, skip?: number, top?: number): Promise; + updateTestResults(resultUpdateModels: TestInterfaces.TestCaseResultUpdateModel[], project: string, runId: number): Promise; + getTestResultsByIds(ids: TestInterfaces.TestCaseResultIdentifier[], project: string, fields: string[]): Promise; + getActionResults(project: string, runId: number, testCaseResultId: number, iterationId: number, actionPath?: string): Promise; + getResultParameters(project: string, runId: number, testCaseResultId: number, iterationId: number, paramName?: string): Promise; + getTestResultsByQuery(query: TestInterfaces.QueryModel, project: string, includeResultDetails?: boolean, includeIterationDetails?: boolean, skip?: number, top?: number): Promise; + queryTestResultsReportForBuild(project: string, buildId: number, publishContext?: string, includeFailureDetails?: boolean, buildToCompare?: TestInterfaces.BuildReference): Promise; + queryTestResultsReportForRelease(project: string, releaseId: number, releaseEnvId: number, publishContext?: string, includeFailureDetails?: boolean, releaseToCompare?: TestInterfaces.ReleaseReference): Promise; + queryTestResultTrendReport(project: string, testRunId: number, testResultId: number, historyDays?: number, top?: number): Promise; + queryResultTrendForBuild(filter: TestInterfaces.TestResultTrendFilter, project: string): Promise; + getTestRunStatistics(project: string, runId: number): Promise; + getTestRunsByQuery(query: TestInterfaces.QueryModel, project: string, includeRunDetails?: boolean, skip?: number, top?: number): Promise; + createTestRun(testRun: TestInterfaces.RunCreateModel, project: string): Promise; + deleteTestRun(project: string, runId: number): Promise; + getTestRunById(project: string, runId: number): Promise; + getTestRuns(project: string, buildUri?: string, owner?: string, tmiRunId?: string, planId?: number, includeRunDetails?: boolean, automated?: boolean, skip?: number, top?: number): Promise; + updateTestRun(runUpdateModel: TestInterfaces.RunUpdateModel, project: string, runId: number): Promise; + getSuiteCloneInformation(project: string, operationId: number, includeDetails?: boolean): Promise; + addTestCasesToSuite(project: string, planId: number, suiteId: number, testCaseIds: string): Promise; + getTestCaseById(project: string, planId: number, suiteId: number, testCaseIds: number): Promise; + getTestCases(project: string, planId: number, suiteId: number): Promise; + removeTestCasesFromSuiteUrl(project: string, planId: number, suiteId: number, testCaseIds: string): Promise; + createTestSuite(testSuite: TestInterfaces.SuiteCreateModel, project: string, planId: number, suiteId: number): Promise; + deleteTestSuite(project: string, planId: number, suiteId: number): Promise; + getTestSuiteById(project: string, planId: number, suiteId: number, includeChildSuites?: boolean): Promise; + getTestSuitesForPlan(project: string, planId: number, includeSuites?: boolean, skip?: number, top?: number, asTreeView?: boolean): Promise; + updateTestSuite(suiteUpdateModel: TestInterfaces.SuiteUpdateModel, project: string, planId: number, suiteId: number): Promise; + cloneTestSuite(cloneRequestBody: TestInterfaces.TestSuiteCloneRequest, project: string, sourceSuiteId: number, planId: number): Promise; + getSuitesByTestCaseId(testCaseId: number): Promise; + createTestSettings(testSettings: TestInterfaces.TestSettings, project: string): Promise; + deleteTestSettings(project: string, testSettingsId: number): Promise; + getTestSettingsById(project: string, testSettingsId: number): Promise; + createTestVariable(testVariable: TestInterfaces.TestVariable, project: string): Promise; + deleteTestVariable(project: string, testVariableId: number): Promise; + getTestVariable(project: string, testVariableId: number): Promise; + getTestVariables(project: string, skip?: number, top?: number): Promise; + updateTestVariable(testVariable: TestInterfaces.TestVariable, project: string, testVariableId: number): Promise; + } + export class TestApi extends basem.ClientApiBase implements ITestApi { + constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); + /** + * @param {TestInterfaces.TestAttachmentRequestModel} attachmentRequestModel + * @param {string} project - Project ID or project name + * @param {number} runId + * @param {number} testCaseResultId + * @param onResult callback function with the resulting TestInterfaces.TestAttachmentReference + */ + createTestResultAttachment(attachmentRequestModel: TestInterfaces.TestAttachmentRequestModel, project: string, runId: number, testCaseResultId: number, onResult: (err: any, statusCode: number, Attachment: TestInterfaces.TestAttachmentReference) => void): void; + /** + * Returns a test result attachment + * + * @param {string} project - Project ID or project name + * @param {number} runId + * @param {number} testCaseResultId + * @param {number} attachmentId + * @param onResult callback function with the resulting ArrayBuffer + */ + getTestResultAttachmentContent(project: string, runId: number, testCaseResultId: number, attachmentId: number, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + /** + * Returns a test result attachment + * + * @param {string} project - Project ID or project name + * @param {number} runId + * @param {number} testCaseResultId + * @param {number} attachmentId + * @param onResult callback function with the resulting ArrayBuffer + */ + getTestResultAttachmentZip(project: string, runId: number, testCaseResultId: number, attachmentId: number, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + /** + * @param {TestInterfaces.TestAttachmentRequestModel} attachmentRequestModel + * @param {string} project - Project ID or project name + * @param {number} runId + * @param onResult callback function with the resulting TestInterfaces.TestAttachmentReference + */ + createTestRunAttachment(attachmentRequestModel: TestInterfaces.TestAttachmentRequestModel, project: string, runId: number, onResult: (err: any, statusCode: number, Attachment: TestInterfaces.TestAttachmentReference) => void): void; + /** + * Returns a test run attachment + * + * @param {string} project - Project ID or project name + * @param {number} runId + * @param {number} attachmentId + * @param onResult callback function with the resulting ArrayBuffer + */ + getTestRunAttachmentContent(project: string, runId: number, attachmentId: number, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + /** + * Returns a test run attachment + * + * @param {string} project - Project ID or project name + * @param {number} runId + * @param {number} attachmentId + * @param onResult callback function with the resulting ArrayBuffer + */ + getTestRunAttachmentZip(project: string, runId: number, attachmentId: number, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {number} runId + * @param {number} testCaseResultId + * @param onResult callback function with the resulting TestInterfaces.WorkItemReference[] + */ + getBugsLinkedToTestResult(project: string, runId: number, testCaseResultId: number, onResult: (err: any, statusCode: number, Bugs: TestInterfaces.WorkItemReference[]) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {number} buildId + * @param {number} flags + * @param onResult callback function with the resulting TestInterfaces.BuildCoverage[] + */ + getBuildCodeCoverage(project: string, buildId: number, flags: number, onResult: (err: any, statusCode: number, CodeCoverage: TestInterfaces.BuildCoverage[]) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {number} buildId + * @param {number} deltaBuildId + * @param onResult callback function with the resulting TestInterfaces.CodeCoverageSummary + */ + getCodeCoverageSummary(project: string, buildId: number, deltaBuildId: number, onResult: (err: any, statusCode: number, CodeCoverage: TestInterfaces.CodeCoverageSummary) => void): void; + /** + * http://(tfsserver):8080/tfs/DefaultCollection/_apis/test/CodeCoverage?buildId=10 Request: Json of code coverage summary + * + * @param {TestInterfaces.CodeCoverageData} coverageData + * @param {string} project - Project ID or project name + * @param {number} buildId + * @param onResult callback function + */ + updateCodeCoverageSummary(coverageData: TestInterfaces.CodeCoverageData, project: string, buildId: number, onResult: (err: any, statusCode: number) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {number} runId + * @param {number} flags + * @param onResult callback function with the resulting TestInterfaces.TestRunCoverage[] + */ + getTestRunCodeCoverage(project: string, runId: number, flags: number, onResult: (err: any, statusCode: number, CodeCoverage: TestInterfaces.TestRunCoverage[]) => void): void; + /** + * @param {TestInterfaces.TestConfiguration} testConfiguration + * @param {string} project - Project ID or project name + * @param onResult callback function with the resulting TestInterfaces.TestConfiguration + */ + createTestConfiguration(testConfiguration: TestInterfaces.TestConfiguration, project: string, onResult: (err: any, statusCode: number, Configuration: TestInterfaces.TestConfiguration) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {number} testConfigurationId + * @param onResult callback function + */ + deleteTestConfiguration(project: string, testConfigurationId: number, onResult: (err: any, statusCode: number) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {number} testConfigurationId + * @param onResult callback function with the resulting TestInterfaces.TestConfiguration + */ + getTestConfigurationById(project: string, testConfigurationId: number, onResult: (err: any, statusCode: number, Configuration: TestInterfaces.TestConfiguration) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {number} skip + * @param {number} top + * @param {boolean} includeAllProperties + * @param onResult callback function with the resulting TestInterfaces.TestConfiguration[] + */ + getTestConfigurations(project: string, skip: number, top: number, includeAllProperties: boolean, onResult: (err: any, statusCode: number, Configurations: TestInterfaces.TestConfiguration[]) => void): void; + /** + * @param {TestInterfaces.TestConfiguration} testConfiguration + * @param {string} project - Project ID or project name + * @param {number} testConfigurationId + * @param onResult callback function with the resulting TestInterfaces.TestConfiguration + */ + updateTestConfiguration(testConfiguration: TestInterfaces.TestConfiguration, project: string, testConfigurationId: number, onResult: (err: any, statusCode: number, Configuration: TestInterfaces.TestConfiguration) => void): void; + /** + * @param {TestInterfaces.CustomTestFieldDefinition[]} newFields + * @param {string} project - Project ID or project name + * @param onResult callback function with the resulting TestInterfaces.CustomTestFieldDefinition[] + */ + addCustomFields(newFields: TestInterfaces.CustomTestFieldDefinition[], project: string, onResult: (err: any, statusCode: number, ExtensionFields: TestInterfaces.CustomTestFieldDefinition[]) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {TestInterfaces.CustomTestFieldScope} scopeFilter + * @param onResult callback function with the resulting TestInterfaces.CustomTestFieldDefinition[] + */ + queryCustomFields(project: string, scopeFilter: TestInterfaces.CustomTestFieldScope, onResult: (err: any, statusCode: number, ExtensionFields: TestInterfaces.CustomTestFieldDefinition[]) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {number} runId + * @param onResult callback function with the resulting TestInterfaces.TestMessageLogDetails[] + */ + getTestRunLogs(project: string, runId: number, onResult: (err: any, statusCode: number, MessageLogs: TestInterfaces.TestMessageLogDetails[]) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {number} operationId + * @param {boolean} includeDetails + * @param onResult callback function with the resulting TestInterfaces.CloneOperationInformation + */ + getPlanCloneInformation(project: string, operationId: number, includeDetails: boolean, onResult: (err: any, statusCode: number, Plan: TestInterfaces.CloneOperationInformation) => void): void; + /** + * @param {TestInterfaces.PlanUpdateModel} testPlan + * @param {string} project - Project ID or project name + * @param onResult callback function with the resulting TestInterfaces.TestPlan + */ + createTestPlan(testPlan: TestInterfaces.PlanUpdateModel, project: string, onResult: (err: any, statusCode: number, Plan: TestInterfaces.TestPlan) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {number} planId + * @param onResult callback function + */ + deleteTestPlan(project: string, planId: number, onResult: (err: any, statusCode: number) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {number} planId + * @param onResult callback function with the resulting TestInterfaces.TestPlan + */ + getPlanById(project: string, planId: number, onResult: (err: any, statusCode: number, Plan: TestInterfaces.TestPlan) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {string} owner + * @param {number} skip + * @param {number} top + * @param {boolean} includePlanDetails + * @param {boolean} filterActivePlans + * @param onResult callback function with the resulting TestInterfaces.TestPlan[] + */ + getPlans(project: string, owner: string, skip: number, top: number, includePlanDetails: boolean, filterActivePlans: boolean, onResult: (err: any, statusCode: number, Plans: TestInterfaces.TestPlan[]) => void): void; + /** + * @param {TestInterfaces.PlanUpdateModel} planUpdateModel + * @param {string} project - Project ID or project name + * @param {number} planId + * @param onResult callback function with the resulting TestInterfaces.TestPlan + */ + updateTestPlan(planUpdateModel: TestInterfaces.PlanUpdateModel, project: string, planId: number, onResult: (err: any, statusCode: number, Plan: TestInterfaces.TestPlan) => void): void; + /** + * @param {TestInterfaces.TestPlanCloneRequest} cloneRequestBody + * @param {string} project - Project ID or project name + * @param {number} sourcePlanId + * @param onResult callback function with the resulting TestInterfaces.CloneOperationInformation + */ + cloneTestPlan(cloneRequestBody: TestInterfaces.TestPlanCloneRequest, project: string, sourcePlanId: number, onResult: (err: any, statusCode: number, Plan: TestInterfaces.CloneOperationInformation) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {number} planId + * @param {number} suiteId + * @param {number} pointIds + * @param {string} witFields + * @param onResult callback function with the resulting TestInterfaces.TestPoint + */ + getPoint(project: string, planId: number, suiteId: number, pointIds: number, witFields: string, onResult: (err: any, statusCode: number, Point: TestInterfaces.TestPoint) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {number} planId + * @param {number} suiteId + * @param {string} witFields + * @param {string} configurationId + * @param {string} testCaseId + * @param {string} testPointIds + * @param {boolean} includePointDetails + * @param {number} skip + * @param {number} top + * @param onResult callback function with the resulting TestInterfaces.TestPoint[] + */ + getPoints(project: string, planId: number, suiteId: number, witFields: string, configurationId: string, testCaseId: string, testPointIds: string, includePointDetails: boolean, skip: number, top: number, onResult: (err: any, statusCode: number, Points: TestInterfaces.TestPoint[]) => void): void; + /** + * @param {TestInterfaces.PointUpdateModel} pointUpdateModel + * @param {string} project - Project ID or project name + * @param {number} planId + * @param {number} suiteId + * @param {string} pointIds + * @param onResult callback function with the resulting TestInterfaces.TestPoint[] + */ + updateTestPoints(pointUpdateModel: TestInterfaces.PointUpdateModel, project: string, planId: number, suiteId: number, pointIds: string, onResult: (err: any, statusCode: number, Point: TestInterfaces.TestPoint[]) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {number} testRunId + * @param {number} testResultId + * @param {number} recentDays + * @param onResult callback function with the resulting TestInterfaces.WorkItemReference[] + */ + queryTestResultRecentBugs(project: string, testRunId: number, testResultId: number, recentDays: number, onResult: (err: any, statusCode: number, RecentBugs: TestInterfaces.WorkItemReference[]) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {number} buildId + * @param {string} publishContext + * @param {string} groupBy + * @param {string} filter + * @param onResult callback function with the resulting TestInterfaces.TestResultsDetails + */ + getTestResultDetailsForBuild(project: string, buildId: number, publishContext: string, groupBy: string, filter: string, onResult: (err: any, statusCode: number, ResultDetailsByBuild: TestInterfaces.TestResultsDetails) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param {number} releaseEnvId + * @param {string} publishContext + * @param {string} groupBy + * @param {string} filter + * @param onResult callback function with the resulting TestInterfaces.TestResultsDetails + */ + getTestResultDetailsForRelease(project: string, releaseId: number, releaseEnvId: number, publishContext: string, groupBy: string, filter: string, onResult: (err: any, statusCode: number, ResultDetailsByRelease: TestInterfaces.TestResultsDetails) => void): void; + /** + * @param {TestInterfaces.ResultRetentionSettings} retentionSettings + * @param {string} project - Project ID or project name + * @param onResult callback function with the resulting TestInterfaces.ResultRetentionSettings + */ + createResultRetentionSettings(retentionSettings: TestInterfaces.ResultRetentionSettings, project: string, onResult: (err: any, statusCode: number, ResultRetentionSetting: TestInterfaces.ResultRetentionSettings) => void): void; + /** + * @param {string} project - Project ID or project name + * @param onResult callback function + */ + deleteResultRetentionSettings(project: string, onResult: (err: any, statusCode: number) => void): void; + /** + * @param {string} project - Project ID or project name + * @param onResult callback function with the resulting TestInterfaces.ResultRetentionSettings + */ + getResultRetentionSettings(project: string, onResult: (err: any, statusCode: number, ResultRetentionSetting: TestInterfaces.ResultRetentionSettings) => void): void; + /** + * @param {TestInterfaces.ResultRetentionSettings} retentionSettings + * @param {string} project - Project ID or project name + * @param onResult callback function with the resulting TestInterfaces.ResultRetentionSettings + */ + updateResultRetentionSettings(retentionSettings: TestInterfaces.ResultRetentionSettings, project: string, onResult: (err: any, statusCode: number, ResultRetentionSetting: TestInterfaces.ResultRetentionSettings) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {number} runId + * @param {number} testCaseResultId + * @param {number} iterationId + * @param {boolean} includeActionResults + * @param onResult callback function with the resulting TestInterfaces.TestIterationDetailsModel + */ + getTestIteration(project: string, runId: number, testCaseResultId: number, iterationId: number, includeActionResults: boolean, onResult: (err: any, statusCode: number, Result: TestInterfaces.TestIterationDetailsModel) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {number} runId + * @param {number} testCaseResultId + * @param {boolean} includeActionResults + * @param onResult callback function with the resulting TestInterfaces.TestIterationDetailsModel[] + */ + getTestIterations(project: string, runId: number, testCaseResultId: number, includeActionResults: boolean, onResult: (err: any, statusCode: number, Results: TestInterfaces.TestIterationDetailsModel[]) => void): void; + /** + * @param {TestInterfaces.TestResultCreateModel[]} resultCreateModels + * @param {string} project - Project ID or project name + * @param {number} runId + * @param onResult callback function with the resulting TestInterfaces.TestCaseResult[] + */ + addTestResultsToTestRun(resultCreateModels: TestInterfaces.TestResultCreateModel[], project: string, runId: number, onResult: (err: any, statusCode: number, Results: TestInterfaces.TestCaseResult[]) => void): void; + /** + * @param {TestInterfaces.TestCaseResultUpdateModel} resultUpdateModel + * @param {string} project - Project ID or project name + * @param {number} runId + * @param {number[]} resultIds + * @param onResult callback function with the resulting TestInterfaces.TestCaseResult[] + */ + bulkUpdateTestResults(resultUpdateModel: TestInterfaces.TestCaseResultUpdateModel, project: string, runId: number, resultIds: number[], onResult: (err: any, statusCode: number, Result: TestInterfaces.TestCaseResult[]) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {number} runId + * @param {number} testCaseResultId + * @param {boolean} includeIterationDetails + * @param {boolean} includeAssociatedBugs + * @param onResult callback function with the resulting TestInterfaces.TestCaseResult + */ + getTestCaseResultById(project: string, runId: number, testCaseResultId: number, includeIterationDetails: boolean, includeAssociatedBugs: boolean, onResult: (err: any, statusCode: number, Result: TestInterfaces.TestCaseResult) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {number} runId + * @param {boolean} includeIterationDetails + * @param onResult callback function with the resulting TestInterfaces.TestCaseResult[] + */ + getTestCaseResults(project: string, runId: number, includeIterationDetails: boolean, onResult: (err: any, statusCode: number, Results: TestInterfaces.TestCaseResult[]) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {number} runId + * @param {number} testCaseResultId + * @param {TestInterfaces.ResultDetails} detailsToInclude + * @param onResult callback function with the resulting TestInterfaces.TestCaseResult[] + */ + getTestResultById(project: string, runId: number, testCaseResultId: number, detailsToInclude: TestInterfaces.ResultDetails, onResult: (err: any, statusCode: number, Results: TestInterfaces.TestCaseResult[]) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {number} runId + * @param {TestInterfaces.ResultDetails} detailsToInclude + * @param {number} skip + * @param {number} top + * @param onResult callback function with the resulting TestInterfaces.TestCaseResult[] + */ + getTestResults(project: string, runId: number, detailsToInclude: TestInterfaces.ResultDetails, skip: number, top: number, onResult: (err: any, statusCode: number, Results: TestInterfaces.TestCaseResult[]) => void): void; + /** + * @param {TestInterfaces.TestCaseResultUpdateModel[]} resultUpdateModels + * @param {string} project - Project ID or project name + * @param {number} runId + * @param onResult callback function with the resulting TestInterfaces.TestCaseResult[] + */ + updateTestResults(resultUpdateModels: TestInterfaces.TestCaseResultUpdateModel[], project: string, runId: number, onResult: (err: any, statusCode: number, Results: TestInterfaces.TestCaseResult[]) => void): void; + /** + * @param {TestInterfaces.TestCaseResultIdentifier[]} ids + * @param {string} project - Project ID or project name + * @param {string[]} fields + * @param onResult callback function with the resulting TestInterfaces.TestCaseResult[] + */ + getTestResultsByIds(ids: TestInterfaces.TestCaseResultIdentifier[], project: string, fields: string[], onResult: (err: any, statusCode: number, Results: TestInterfaces.TestCaseResult[]) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {number} runId + * @param {number} testCaseResultId + * @param {number} iterationId + * @param {string} actionPath + * @param onResult callback function with the resulting TestInterfaces.TestActionResultModel[] + */ + getActionResults(project: string, runId: number, testCaseResultId: number, iterationId: number, actionPath: string, onResult: (err: any, statusCode: number, Results: TestInterfaces.TestActionResultModel[]) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {number} runId + * @param {number} testCaseResultId + * @param {number} iterationId + * @param {string} paramName + * @param onResult callback function with the resulting TestInterfaces.TestResultParameterModel[] + */ + getResultParameters(project: string, runId: number, testCaseResultId: number, iterationId: number, paramName: string, onResult: (err: any, statusCode: number, Results: TestInterfaces.TestResultParameterModel[]) => void): void; + /** + * @param {TestInterfaces.QueryModel} query + * @param {string} project - Project ID or project name + * @param {boolean} includeResultDetails + * @param {boolean} includeIterationDetails + * @param {number} skip + * @param {number} top + * @param onResult callback function with the resulting TestInterfaces.TestCaseResult[] + */ + getTestResultsByQuery(query: TestInterfaces.QueryModel, project: string, includeResultDetails: boolean, includeIterationDetails: boolean, skip: number, top: number, onResult: (err: any, statusCode: number, Result: TestInterfaces.TestCaseResult[]) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {number} buildId + * @param {string} publishContext + * @param {boolean} includeFailureDetails + * @param {TestInterfaces.BuildReference} buildToCompare + * @param onResult callback function with the resulting TestInterfaces.TestResultSummary + */ + queryTestResultsReportForBuild(project: string, buildId: number, publishContext: string, includeFailureDetails: boolean, buildToCompare: TestInterfaces.BuildReference, onResult: (err: any, statusCode: number, ResultSummaryByBuild: TestInterfaces.TestResultSummary) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param {number} releaseEnvId + * @param {string} publishContext + * @param {boolean} includeFailureDetails + * @param {TestInterfaces.ReleaseReference} releaseToCompare + * @param onResult callback function with the resulting TestInterfaces.TestResultSummary + */ + queryTestResultsReportForRelease(project: string, releaseId: number, releaseEnvId: number, publishContext: string, includeFailureDetails: boolean, releaseToCompare: TestInterfaces.ReleaseReference, onResult: (err: any, statusCode: number, ResultSummaryByRelease: TestInterfaces.TestResultSummary) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {number} testRunId + * @param {number} testResultId + * @param {number} historyDays + * @param {number} top + * @param onResult callback function with the resulting TestInterfaces.TestCaseResult[] + */ + queryTestResultTrendReport(project: string, testRunId: number, testResultId: number, historyDays: number, top: number, onResult: (err: any, statusCode: number, ResultTrend: TestInterfaces.TestCaseResult[]) => void): void; + /** + * @param {TestInterfaces.TestResultTrendFilter} filter + * @param {string} project - Project ID or project name + * @param onResult callback function with the resulting TestInterfaces.AggregatedDataForResultTrend[] + */ + queryResultTrendForBuild(filter: TestInterfaces.TestResultTrendFilter, project: string, onResult: (err: any, statusCode: number, ResultTrendByBuild: TestInterfaces.AggregatedDataForResultTrend[]) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {number} runId + * @param onResult callback function with the resulting TestInterfaces.TestRunStatistic + */ + getTestRunStatistics(project: string, runId: number, onResult: (err: any, statusCode: number, Run: TestInterfaces.TestRunStatistic) => void): void; + /** + * @param {TestInterfaces.QueryModel} query + * @param {string} project - Project ID or project name + * @param {boolean} includeRunDetails + * @param {number} skip + * @param {number} top + * @param onResult callback function with the resulting TestInterfaces.TestRun[] + */ + getTestRunsByQuery(query: TestInterfaces.QueryModel, project: string, includeRunDetails: boolean, skip: number, top: number, onResult: (err: any, statusCode: number, Run: TestInterfaces.TestRun[]) => void): void; + /** + * @param {TestInterfaces.RunCreateModel} testRun + * @param {string} project - Project ID or project name + * @param onResult callback function with the resulting TestInterfaces.TestRun + */ + createTestRun(testRun: TestInterfaces.RunCreateModel, project: string, onResult: (err: any, statusCode: number, Run: TestInterfaces.TestRun) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {number} runId + * @param onResult callback function + */ + deleteTestRun(project: string, runId: number, onResult: (err: any, statusCode: number) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {number} runId + * @param onResult callback function with the resulting TestInterfaces.TestRun + */ + getTestRunById(project: string, runId: number, onResult: (err: any, statusCode: number, Run: TestInterfaces.TestRun) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {string} buildUri + * @param {string} owner + * @param {string} tmiRunId + * @param {number} planId + * @param {boolean} includeRunDetails + * @param {boolean} automated + * @param {number} skip + * @param {number} top + * @param onResult callback function with the resulting TestInterfaces.TestRun[] + */ + getTestRuns(project: string, buildUri: string, owner: string, tmiRunId: string, planId: number, includeRunDetails: boolean, automated: boolean, skip: number, top: number, onResult: (err: any, statusCode: number, Runs: TestInterfaces.TestRun[]) => void): void; + /** + * @param {TestInterfaces.RunUpdateModel} runUpdateModel + * @param {string} project - Project ID or project name + * @param {number} runId + * @param onResult callback function with the resulting TestInterfaces.TestRun + */ + updateTestRun(runUpdateModel: TestInterfaces.RunUpdateModel, project: string, runId: number, onResult: (err: any, statusCode: number, Run: TestInterfaces.TestRun) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {number} operationId + * @param {boolean} includeDetails + * @param onResult callback function with the resulting TestInterfaces.CloneOperationInformation + */ + getSuiteCloneInformation(project: string, operationId: number, includeDetails: boolean, onResult: (err: any, statusCode: number, Suite: TestInterfaces.CloneOperationInformation) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {number} planId + * @param {number} suiteId + * @param {string} testCaseIds + * @param onResult callback function with the resulting TestInterfaces.SuiteTestCase[] + */ + addTestCasesToSuite(project: string, planId: number, suiteId: number, testCaseIds: string, onResult: (err: any, statusCode: number, Suites: TestInterfaces.SuiteTestCase[]) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {number} planId + * @param {number} suiteId + * @param {number} testCaseIds + * @param onResult callback function with the resulting TestInterfaces.SuiteTestCase + */ + getTestCaseById(project: string, planId: number, suiteId: number, testCaseIds: number, onResult: (err: any, statusCode: number, Suite: TestInterfaces.SuiteTestCase) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {number} planId + * @param {number} suiteId + * @param onResult callback function with the resulting TestInterfaces.SuiteTestCase[] + */ + getTestCases(project: string, planId: number, suiteId: number, onResult: (err: any, statusCode: number, Suites: TestInterfaces.SuiteTestCase[]) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {number} planId + * @param {number} suiteId + * @param {string} testCaseIds + * @param onResult callback function + */ + removeTestCasesFromSuiteUrl(project: string, planId: number, suiteId: number, testCaseIds: string, onResult: (err: any, statusCode: number) => void): void; + /** + * @param {TestInterfaces.SuiteCreateModel} testSuite + * @param {string} project - Project ID or project name + * @param {number} planId + * @param {number} suiteId + * @param onResult callback function with the resulting TestInterfaces.TestSuite[] + */ + createTestSuite(testSuite: TestInterfaces.SuiteCreateModel, project: string, planId: number, suiteId: number, onResult: (err: any, statusCode: number, Suite: TestInterfaces.TestSuite[]) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {number} planId + * @param {number} suiteId + * @param onResult callback function + */ + deleteTestSuite(project: string, planId: number, suiteId: number, onResult: (err: any, statusCode: number) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {number} planId + * @param {number} suiteId + * @param {boolean} includeChildSuites + * @param onResult callback function with the resulting TestInterfaces.TestSuite + */ + getTestSuiteById(project: string, planId: number, suiteId: number, includeChildSuites: boolean, onResult: (err: any, statusCode: number, Suite: TestInterfaces.TestSuite) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {number} planId + * @param {boolean} includeSuites + * @param {number} skip + * @param {number} top + * @param {boolean} asTreeView + * @param onResult callback function with the resulting TestInterfaces.TestSuite[] + */ + getTestSuitesForPlan(project: string, planId: number, includeSuites: boolean, skip: number, top: number, asTreeView: boolean, onResult: (err: any, statusCode: number, Suites: TestInterfaces.TestSuite[]) => void): void; + /** + * @param {TestInterfaces.SuiteUpdateModel} suiteUpdateModel + * @param {string} project - Project ID or project name + * @param {number} planId + * @param {number} suiteId + * @param onResult callback function with the resulting TestInterfaces.TestSuite + */ + updateTestSuite(suiteUpdateModel: TestInterfaces.SuiteUpdateModel, project: string, planId: number, suiteId: number, onResult: (err: any, statusCode: number, Suite: TestInterfaces.TestSuite) => void): void; + /** + * @param {TestInterfaces.TestSuiteCloneRequest} cloneRequestBody + * @param {string} project - Project ID or project name + * @param {number} sourceSuiteId + * @param {number} planId + * @param onResult callback function with the resulting TestInterfaces.CloneOperationInformation + */ + cloneTestSuite(cloneRequestBody: TestInterfaces.TestSuiteCloneRequest, project: string, sourceSuiteId: number, planId: number, onResult: (err: any, statusCode: number, Suite: TestInterfaces.CloneOperationInformation) => void): void; + /** + * @param {number} testCaseId + * @param onResult callback function with the resulting TestInterfaces.TestSuite[] + */ + getSuitesByTestCaseId(testCaseId: number, onResult: (err: any, statusCode: number, Suites: TestInterfaces.TestSuite[]) => void): void; + /** + * @param {TestInterfaces.TestSettings} testSettings + * @param {string} project - Project ID or project name + * @param onResult callback function with the resulting number + */ + createTestSettings(testSettings: TestInterfaces.TestSettings, project: string, onResult: (err: any, statusCode: number, TestSetting: number) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {number} testSettingsId + * @param onResult callback function + */ + deleteTestSettings(project: string, testSettingsId: number, onResult: (err: any, statusCode: number) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {number} testSettingsId + * @param onResult callback function with the resulting TestInterfaces.TestSettings + */ + getTestSettingsById(project: string, testSettingsId: number, onResult: (err: any, statusCode: number, TestSetting: TestInterfaces.TestSettings) => void): void; + /** + * @param {TestInterfaces.TestVariable} testVariable + * @param {string} project - Project ID or project name + * @param onResult callback function with the resulting TestInterfaces.TestVariable + */ + createTestVariable(testVariable: TestInterfaces.TestVariable, project: string, onResult: (err: any, statusCode: number, Variable: TestInterfaces.TestVariable) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {number} testVariableId + * @param onResult callback function + */ + deleteTestVariable(project: string, testVariableId: number, onResult: (err: any, statusCode: number) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {number} testVariableId + * @param onResult callback function with the resulting TestInterfaces.TestVariable + */ + getTestVariable(project: string, testVariableId: number, onResult: (err: any, statusCode: number, Variable: TestInterfaces.TestVariable) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {number} skip + * @param {number} top + * @param onResult callback function with the resulting TestInterfaces.TestVariable[] + */ + getTestVariables(project: string, skip: number, top: number, onResult: (err: any, statusCode: number, Variables: TestInterfaces.TestVariable[]) => void): void; + /** + * @param {TestInterfaces.TestVariable} testVariable + * @param {string} project - Project ID or project name + * @param {number} testVariableId + * @param onResult callback function with the resulting TestInterfaces.TestVariable + */ + updateTestVariable(testVariable: TestInterfaces.TestVariable, project: string, testVariableId: number, onResult: (err: any, statusCode: number, Variable: TestInterfaces.TestVariable) => void): void; + } + export class QTestApi extends basem.QClientApiBase implements IQTestApi { + api: TestApi; + constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); + /** + * @param {TestInterfaces.TestAttachmentRequestModel} attachmentRequestModel + * @param {string} project - Project ID or project name + * @param {number} runId + * @param {number} testCaseResultId + */ + createTestResultAttachment(attachmentRequestModel: TestInterfaces.TestAttachmentRequestModel, project: string, runId: number, testCaseResultId: number): Promise; + /** + * Returns a test result attachment + * + * @param {string} project - Project ID or project name + * @param {number} runId + * @param {number} testCaseResultId + * @param {number} attachmentId + */ + getTestResultAttachmentContent(project: string, runId: number, testCaseResultId: number, attachmentId: number): Promise; + /** + * Returns a test result attachment + * + * @param {string} project - Project ID or project name + * @param {number} runId + * @param {number} testCaseResultId + * @param {number} attachmentId + */ + getTestResultAttachmentZip(project: string, runId: number, testCaseResultId: number, attachmentId: number): Promise; + /** + * @param {TestInterfaces.TestAttachmentRequestModel} attachmentRequestModel + * @param {string} project - Project ID or project name + * @param {number} runId + */ + createTestRunAttachment(attachmentRequestModel: TestInterfaces.TestAttachmentRequestModel, project: string, runId: number): Promise; + /** + * Returns a test run attachment + * + * @param {string} project - Project ID or project name + * @param {number} runId + * @param {number} attachmentId + */ + getTestRunAttachmentContent(project: string, runId: number, attachmentId: number): Promise; + /** + * Returns a test run attachment + * + * @param {string} project - Project ID or project name + * @param {number} runId + * @param {number} attachmentId + */ + getTestRunAttachmentZip(project: string, runId: number, attachmentId: number): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} runId + * @param {number} testCaseResultId + */ + getBugsLinkedToTestResult(project: string, runId: number, testCaseResultId: number): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} buildId + * @param {number} flags + */ + getBuildCodeCoverage(project: string, buildId: number, flags: number): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} buildId + * @param {number} deltaBuildId + */ + getCodeCoverageSummary(project: string, buildId: number, deltaBuildId?: number): Promise; + /** + * http://(tfsserver):8080/tfs/DefaultCollection/_apis/test/CodeCoverage?buildId=10 Request: Json of code coverage summary + * + * @param {TestInterfaces.CodeCoverageData} coverageData + * @param {string} project - Project ID or project name + * @param {number} buildId + */ + updateCodeCoverageSummary(coverageData: TestInterfaces.CodeCoverageData, project: string, buildId: number): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} runId + * @param {number} flags + */ + getTestRunCodeCoverage(project: string, runId: number, flags: number): Promise; + /** + * @param {TestInterfaces.TestConfiguration} testConfiguration + * @param {string} project - Project ID or project name + */ + createTestConfiguration(testConfiguration: TestInterfaces.TestConfiguration, project: string): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} testConfigurationId + */ + deleteTestConfiguration(project: string, testConfigurationId: number): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} testConfigurationId + */ + getTestConfigurationById(project: string, testConfigurationId: number): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} skip + * @param {number} top + * @param {boolean} includeAllProperties + */ + getTestConfigurations(project: string, skip?: number, top?: number, includeAllProperties?: boolean): Promise; + /** + * @param {TestInterfaces.TestConfiguration} testConfiguration + * @param {string} project - Project ID or project name + * @param {number} testConfigurationId + */ + updateTestConfiguration(testConfiguration: TestInterfaces.TestConfiguration, project: string, testConfigurationId: number): Promise; + /** + * @param {TestInterfaces.CustomTestFieldDefinition[]} newFields + * @param {string} project - Project ID or project name + */ + addCustomFields(newFields: TestInterfaces.CustomTestFieldDefinition[], project: string): Promise; + /** + * @param {string} project - Project ID or project name + * @param {TestInterfaces.CustomTestFieldScope} scopeFilter + */ + queryCustomFields(project: string, scopeFilter: TestInterfaces.CustomTestFieldScope): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} runId + */ + getTestRunLogs(project: string, runId: number): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} operationId + * @param {boolean} includeDetails + */ + getPlanCloneInformation(project: string, operationId: number, includeDetails?: boolean): Promise; + /** + * @param {TestInterfaces.PlanUpdateModel} testPlan + * @param {string} project - Project ID or project name + */ + createTestPlan(testPlan: TestInterfaces.PlanUpdateModel, project: string): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} planId + */ + deleteTestPlan(project: string, planId: number): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} planId + */ + getPlanById(project: string, planId: number): Promise; + /** + * @param {string} project - Project ID or project name + * @param {string} owner + * @param {number} skip + * @param {number} top + * @param {boolean} includePlanDetails + * @param {boolean} filterActivePlans + */ + getPlans(project: string, owner?: string, skip?: number, top?: number, includePlanDetails?: boolean, filterActivePlans?: boolean): Promise; + /** + * @param {TestInterfaces.PlanUpdateModel} planUpdateModel + * @param {string} project - Project ID or project name + * @param {number} planId + */ + updateTestPlan(planUpdateModel: TestInterfaces.PlanUpdateModel, project: string, planId: number): Promise; + /** + * @param {TestInterfaces.TestPlanCloneRequest} cloneRequestBody + * @param {string} project - Project ID or project name + * @param {number} sourcePlanId + */ + cloneTestPlan(cloneRequestBody: TestInterfaces.TestPlanCloneRequest, project: string, sourcePlanId: number): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} planId + * @param {number} suiteId + * @param {number} pointIds + * @param {string} witFields + */ + getPoint(project: string, planId: number, suiteId: number, pointIds: number, witFields?: string): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} planId + * @param {number} suiteId + * @param {string} witFields + * @param {string} configurationId + * @param {string} testCaseId + * @param {string} testPointIds + * @param {boolean} includePointDetails + * @param {number} skip + * @param {number} top + */ + getPoints(project: string, planId: number, suiteId: number, witFields?: string, configurationId?: string, testCaseId?: string, testPointIds?: string, includePointDetails?: boolean, skip?: number, top?: number): Promise; + /** + * @param {TestInterfaces.PointUpdateModel} pointUpdateModel + * @param {string} project - Project ID or project name + * @param {number} planId + * @param {number} suiteId + * @param {string} pointIds + */ + updateTestPoints(pointUpdateModel: TestInterfaces.PointUpdateModel, project: string, planId: number, suiteId: number, pointIds: string): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} testRunId + * @param {number} testResultId + * @param {number} recentDays + */ + queryTestResultRecentBugs(project: string, testRunId: number, testResultId: number, recentDays?: number): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} buildId + * @param {string} publishContext + * @param {string} groupBy + * @param {string} filter + */ + getTestResultDetailsForBuild(project: string, buildId: number, publishContext?: string, groupBy?: string, filter?: string): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param {number} releaseEnvId + * @param {string} publishContext + * @param {string} groupBy + * @param {string} filter + */ + getTestResultDetailsForRelease(project: string, releaseId: number, releaseEnvId: number, publishContext?: string, groupBy?: string, filter?: string): Promise; + /** + * @param {TestInterfaces.ResultRetentionSettings} retentionSettings + * @param {string} project - Project ID or project name + */ + createResultRetentionSettings(retentionSettings: TestInterfaces.ResultRetentionSettings, project: string): Promise; + /** + * @param {string} project - Project ID or project name + */ + deleteResultRetentionSettings(project: string): Promise; + /** + * @param {string} project - Project ID or project name + */ + getResultRetentionSettings(project: string): Promise; + /** + * @param {TestInterfaces.ResultRetentionSettings} retentionSettings + * @param {string} project - Project ID or project name + */ + updateResultRetentionSettings(retentionSettings: TestInterfaces.ResultRetentionSettings, project: string): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} runId + * @param {number} testCaseResultId + * @param {number} iterationId + * @param {boolean} includeActionResults + */ + getTestIteration(project: string, runId: number, testCaseResultId: number, iterationId: number, includeActionResults?: boolean): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} runId + * @param {number} testCaseResultId + * @param {boolean} includeActionResults + */ + getTestIterations(project: string, runId: number, testCaseResultId: number, includeActionResults?: boolean): Promise; + /** + * @param {TestInterfaces.TestResultCreateModel[]} resultCreateModels + * @param {string} project - Project ID or project name + * @param {number} runId + */ + addTestResultsToTestRun(resultCreateModels: TestInterfaces.TestResultCreateModel[], project: string, runId: number): Promise; + /** + * @param {TestInterfaces.TestCaseResultUpdateModel} resultUpdateModel + * @param {string} project - Project ID or project name + * @param {number} runId + * @param {number[]} resultIds + */ + bulkUpdateTestResults(resultUpdateModel: TestInterfaces.TestCaseResultUpdateModel, project: string, runId: number, resultIds: number[]): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} runId + * @param {number} testCaseResultId + * @param {boolean} includeIterationDetails + * @param {boolean} includeAssociatedBugs + */ + getTestCaseResultById(project: string, runId: number, testCaseResultId: number, includeIterationDetails: boolean, includeAssociatedBugs?: boolean): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} runId + * @param {boolean} includeIterationDetails + */ + getTestCaseResults(project: string, runId: number, includeIterationDetails: boolean): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} runId + * @param {number} testCaseResultId + * @param {TestInterfaces.ResultDetails} detailsToInclude + */ + getTestResultById(project: string, runId: number, testCaseResultId: number, detailsToInclude?: TestInterfaces.ResultDetails): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} runId + * @param {TestInterfaces.ResultDetails} detailsToInclude + * @param {number} skip + * @param {number} top + */ + getTestResults(project: string, runId: number, detailsToInclude?: TestInterfaces.ResultDetails, skip?: number, top?: number): Promise; + /** + * @param {TestInterfaces.TestCaseResultUpdateModel[]} resultUpdateModels + * @param {string} project - Project ID or project name + * @param {number} runId + */ + updateTestResults(resultUpdateModels: TestInterfaces.TestCaseResultUpdateModel[], project: string, runId: number): Promise; + /** + * @param {TestInterfaces.TestCaseResultIdentifier[]} ids + * @param {string} project - Project ID or project name + * @param {string[]} fields + */ + getTestResultsByIds(ids: TestInterfaces.TestCaseResultIdentifier[], project: string, fields: string[]): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} runId + * @param {number} testCaseResultId + * @param {number} iterationId + * @param {string} actionPath + */ + getActionResults(project: string, runId: number, testCaseResultId: number, iterationId: number, actionPath?: string): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} runId + * @param {number} testCaseResultId + * @param {number} iterationId + * @param {string} paramName + */ + getResultParameters(project: string, runId: number, testCaseResultId: number, iterationId: number, paramName?: string): Promise; + /** + * @param {TestInterfaces.QueryModel} query + * @param {string} project - Project ID or project name + * @param {boolean} includeResultDetails + * @param {boolean} includeIterationDetails + * @param {number} skip + * @param {number} top + */ + getTestResultsByQuery(query: TestInterfaces.QueryModel, project: string, includeResultDetails?: boolean, includeIterationDetails?: boolean, skip?: number, top?: number): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} buildId + * @param {string} publishContext + * @param {boolean} includeFailureDetails + * @param {TestInterfaces.BuildReference} buildToCompare + */ + queryTestResultsReportForBuild(project: string, buildId: number, publishContext?: string, includeFailureDetails?: boolean, buildToCompare?: TestInterfaces.BuildReference): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param {number} releaseEnvId + * @param {string} publishContext + * @param {boolean} includeFailureDetails + * @param {TestInterfaces.ReleaseReference} releaseToCompare + */ + queryTestResultsReportForRelease(project: string, releaseId: number, releaseEnvId: number, publishContext?: string, includeFailureDetails?: boolean, releaseToCompare?: TestInterfaces.ReleaseReference): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} testRunId + * @param {number} testResultId + * @param {number} historyDays + * @param {number} top + */ + queryTestResultTrendReport(project: string, testRunId: number, testResultId: number, historyDays?: number, top?: number): Promise; + /** + * @param {TestInterfaces.TestResultTrendFilter} filter + * @param {string} project - Project ID or project name + */ + queryResultTrendForBuild(filter: TestInterfaces.TestResultTrendFilter, project: string): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} runId + */ + getTestRunStatistics(project: string, runId: number): Promise; + /** + * @param {TestInterfaces.QueryModel} query + * @param {string} project - Project ID or project name + * @param {boolean} includeRunDetails + * @param {number} skip + * @param {number} top + */ + getTestRunsByQuery(query: TestInterfaces.QueryModel, project: string, includeRunDetails?: boolean, skip?: number, top?: number): Promise; + /** + * @param {TestInterfaces.RunCreateModel} testRun + * @param {string} project - Project ID or project name + */ + createTestRun(testRun: TestInterfaces.RunCreateModel, project: string): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} runId + */ + deleteTestRun(project: string, runId: number): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} runId + */ + getTestRunById(project: string, runId: number): Promise; + /** + * @param {string} project - Project ID or project name + * @param {string} buildUri + * @param {string} owner + * @param {string} tmiRunId + * @param {number} planId + * @param {boolean} includeRunDetails + * @param {boolean} automated + * @param {number} skip + * @param {number} top + */ + getTestRuns(project: string, buildUri?: string, owner?: string, tmiRunId?: string, planId?: number, includeRunDetails?: boolean, automated?: boolean, skip?: number, top?: number): Promise; + /** + * @param {TestInterfaces.RunUpdateModel} runUpdateModel + * @param {string} project - Project ID or project name + * @param {number} runId + */ + updateTestRun(runUpdateModel: TestInterfaces.RunUpdateModel, project: string, runId: number): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} operationId + * @param {boolean} includeDetails + */ + getSuiteCloneInformation(project: string, operationId: number, includeDetails?: boolean): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} planId + * @param {number} suiteId + * @param {string} testCaseIds + */ + addTestCasesToSuite(project: string, planId: number, suiteId: number, testCaseIds: string): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} planId + * @param {number} suiteId + * @param {number} testCaseIds + */ + getTestCaseById(project: string, planId: number, suiteId: number, testCaseIds: number): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} planId + * @param {number} suiteId + */ + getTestCases(project: string, planId: number, suiteId: number): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} planId + * @param {number} suiteId + * @param {string} testCaseIds + */ + removeTestCasesFromSuiteUrl(project: string, planId: number, suiteId: number, testCaseIds: string): Promise; + /** + * @param {TestInterfaces.SuiteCreateModel} testSuite + * @param {string} project - Project ID or project name + * @param {number} planId + * @param {number} suiteId + */ + createTestSuite(testSuite: TestInterfaces.SuiteCreateModel, project: string, planId: number, suiteId: number): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} planId + * @param {number} suiteId + */ + deleteTestSuite(project: string, planId: number, suiteId: number): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} planId + * @param {number} suiteId + * @param {boolean} includeChildSuites + */ + getTestSuiteById(project: string, planId: number, suiteId: number, includeChildSuites?: boolean): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} planId + * @param {boolean} includeSuites + * @param {number} skip + * @param {number} top + * @param {boolean} asTreeView + */ + getTestSuitesForPlan(project: string, planId: number, includeSuites?: boolean, skip?: number, top?: number, asTreeView?: boolean): Promise; + /** + * @param {TestInterfaces.SuiteUpdateModel} suiteUpdateModel + * @param {string} project - Project ID or project name + * @param {number} planId + * @param {number} suiteId + */ + updateTestSuite(suiteUpdateModel: TestInterfaces.SuiteUpdateModel, project: string, planId: number, suiteId: number): Promise; + /** + * @param {TestInterfaces.TestSuiteCloneRequest} cloneRequestBody + * @param {string} project - Project ID or project name + * @param {number} sourceSuiteId + * @param {number} planId + */ + cloneTestSuite(cloneRequestBody: TestInterfaces.TestSuiteCloneRequest, project: string, sourceSuiteId: number, planId: number): Promise; + /** + * @param {number} testCaseId + */ + getSuitesByTestCaseId(testCaseId: number): Promise; + /** + * @param {TestInterfaces.TestSettings} testSettings + * @param {string} project - Project ID or project name + */ + createTestSettings(testSettings: TestInterfaces.TestSettings, project: string): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} testSettingsId + */ + deleteTestSettings(project: string, testSettingsId: number): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} testSettingsId + */ + getTestSettingsById(project: string, testSettingsId: number): Promise; + /** + * @param {TestInterfaces.TestVariable} testVariable + * @param {string} project - Project ID or project name + */ + createTestVariable(testVariable: TestInterfaces.TestVariable, project: string): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} testVariableId + */ + deleteTestVariable(project: string, testVariableId: number): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} testVariableId + */ + getTestVariable(project: string, testVariableId: number): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} skip + * @param {number} top + */ + getTestVariables(project: string, skip?: number, top?: number): Promise; + /** + * @param {TestInterfaces.TestVariable} testVariable + * @param {string} project - Project ID or project name + * @param {number} testVariableId + */ + updateTestVariable(testVariable: TestInterfaces.TestVariable, project: string, testVariableId: number): Promise; + } + +} +declare module 'vso-node-api/interfaces/TfvcInterfaces' { + import TfsCoreInterfaces = require('vso-node-api/interfaces/CoreInterfaces'); + import VSSInterfaces = require('vso-node-api/interfaces/common/VSSInterfaces'); + export interface AssociatedWorkItem { + assignedTo: string; + id: number; + state: string; + title: string; + /** + * REST url + */ + url: string; + webUrl: string; + workItemType: string; + } + export interface Change { + changeType: VersionControlChangeType; + item: T; + newContent: ItemContent; + sourceServerItem: string; + url: string; + } + export interface ChangeCountDictionary { + } + export interface ChangeList { + allChangesIncluded: boolean; + changeCounts: { + [key: number]: number; + }; + changes: Change[]; + comment: string; + commentTruncated: boolean; + creationDate: Date; + notes: CheckinNote[]; + owner: string; + ownerDisplayName: string; + ownerId: string; + sortDate: Date; + version: string; + } + /** + * Criteria used in a search for change lists + */ + export interface ChangeListSearchCriteria { + /** + * If provided, a version descriptor to compare against base + */ + compareVersion: string; + /** + * If true, don't include delete history entries + */ + excludeDeletes: boolean; + /** + * Whether or not to follow renames for the given item being queried + */ + followRenames: boolean; + /** + * If provided, only include history entries created after this date (string) + */ + fromDate: string; + /** + * If provided, a version descriptor for the earliest change list to include + */ + fromVersion: string; + /** + * Path of item to search under + */ + itemPath: string; + /** + * Version of the items to search + */ + itemVersion: string; + /** + * Number of results to skip (used when clicking more...) + */ + skip: number; + /** + * If provided, only include history entries created before this date (string) + */ + toDate: string; + /** + * If provided, the maximum number of history entries to return + */ + top: number; + /** + * If provided, a version descriptor for the latest change list to include + */ + toVersion: string; + /** + * Alias or display name of user who made the changes + */ + user: string; + } + export interface CheckinNote { + name: string; + value: string; + } + export interface FileContentMetadata { + contentType: string; + encoding: number; + extension: string; + fileName: string; + isBinary: boolean; + isImage: boolean; + vsLink: string; + } + export interface GitBaseVersionDescriptor extends GitVersionDescriptor { + /** + * Version string identifier (name of tag/branch, SHA1 of commit) + */ + baseVersion: string; + /** + * Version options - Specify additional modifiers to version (e.g Previous) + */ + baseVersionOptions: GitVersionOptions; + /** + * Version type (branch, tag, or commit). Determines how Id is interpreted + */ + baseVersionType: GitVersionType; + } + export interface GitBlobRef { + _links: any; + /** + * SHA1 hash of git object + */ + objectId: string; + /** + * Size of blob content (in bytes) + */ + size: number; + url: string; + } + export interface GitBranchStats { + aheadCount: number; + behindCount: number; + commit: GitCommitRef; + isBaseVersion: boolean; + name: string; + } + export interface GitChange extends Change { + } + export interface GitCommit extends GitCommitRef { + push: GitPushRef; + treeId: string; + } + export interface GitCommitChanges { + changeCounts: ChangeCountDictionary; + changes: GitChange[]; + } + export interface GitCommitDiffs { + aheadCount: number; + allChangesIncluded: boolean; + baseCommit: string; + behindCount: number; + changeCounts: { + [key: number]: number; + }; + changes: GitChange[]; + commonCommit: string; + targetCommit: string; + } + export interface GitCommitRef { + _links: any; + author: GitUserDate; + changeCounts: ChangeCountDictionary; + changes: GitChange[]; + comment: string; + commentTruncated: boolean; + commitId: string; + committer: GitUserDate; + parents: string[]; + remoteUrl: string; + url: string; + } + export interface GitCommitToCreate { + baseRef: GitRef; + comment: string; + pathActions: GitPathAction[]; + } + export interface GitDeletedRepository { + createdDate: Date; + deletedBy: VSSInterfaces.IdentityRef; + deletedDate: Date; + id: string; + name: string; + project: TfsCoreInterfaces.TeamProjectReference; + } + export interface GitHistoryQueryResults extends HistoryQueryResults { + /** + * Seed commit used for querying history. Used for skip feature. + */ + startingCommitId: string; + unpopulatedCount: number; + unprocessedCount: number; + } + export interface GitItem extends ItemModel { + /** + * SHA1 of commit item was fetched at + */ + commitId: string; + /** + * Type of object (Commit, Tree, Blob, Tag, ...) + */ + gitObjectType: GitObjectType; + /** + * Shallow ref to commit that last changed this item Only populated if latestProcessedChange is requested May not be accurate if latest change is not yet cached + */ + latestProcessedChange: GitCommitRef; + /** + * Git object id + */ + objectId: string; + /** + * Git object id + */ + originalObjectId: string; + } + export interface GitItemDescriptor { + /** + * Path to item + */ + path: string; + /** + * Specifies whether to include children (OneLevel), all descendants (Full), or None + */ + recursionLevel: VersionControlRecursionType; + /** + * Version string (interpretation based on VersionType defined in subclass + */ + version: string; + /** + * Version modifiers (e.g. previous) + */ + versionOptions: GitVersionOptions; + /** + * How to interpret version (branch,tag,commit) + */ + versionType: GitVersionType; + } + export interface GitItemRequestData { + /** + * Whether to include metadata for all items + */ + includeContentMetadata: boolean; + /** + * Whether to include the _links field on the shallow references + */ + includeLinks: boolean; + /** + * Collection of items to fetch, including path, version, and recursion level + */ + itemDescriptors: GitItemDescriptor[]; + /** + * Whether to include shallow ref to commit that last changed each item + */ + latestProcessedChange: boolean; + } + export interface GitLimitedRefCriteria { + _links: any; + refExactMatches: string[]; + refNamespaces: string[]; + url: string; + } + export enum GitObjectType { + Bad = 0, + Commit = 1, + Tree = 2, + Blob = 3, + Tag = 4, + Ext2 = 5, + OfsDelta = 6, + RefDelta = 7, + } + export interface GitPathAction { + action: GitPathActions; + base64Content: string; + path: string; + rawTextContent: string; + targetPath: string; + } + export enum GitPathActions { + None = 0, + Edit = 1, + Delete = 2, + Add = 3, + Rename = 4, + } + export enum GitPermissionScope { + Project = 0, + Repository = 1, + Branch = 2, + } + export interface GitPullRequest { + _links: any; + closedDate: Date; + codeReviewId: number; + commits: GitCommitRef[]; + completionOptions: GitPullRequestCompletionOptions; + completionQueueTime: Date; + createdBy: VSSInterfaces.IdentityRef; + creationDate: Date; + description: string; + lastMergeCommit: GitCommitRef; + lastMergeSourceCommit: GitCommitRef; + lastMergeTargetCommit: GitCommitRef; + mergeId: string; + mergeStatus: PullRequestAsyncStatus; + pullRequestId: number; + remoteUrl: string; + repository: GitRepository; + reviewers: IdentityRefWithVote[]; + sourceRefName: string; + status: PullRequestStatus; + targetRefName: string; + title: string; + upgraded: boolean; + url: string; + workItemRefs: VSSInterfaces.ResourceRef[]; + } + export interface GitPullRequestCompletionOptions { + deleteSourceBranch: boolean; + mergeCommitMessage: string; + squashMerge: boolean; + } + export interface GitPullRequestSearchCriteria { + creatorId: string; + /** + * Whether to include the _links field on the shallow references + */ + includeLinks: boolean; + repositoryId: string; + reviewerId: string; + sourceRefName: string; + status: PullRequestStatus; + targetRefName: string; + } + export interface GitPush extends GitPushRef { + commits: GitCommitRef[]; + refUpdates: GitRefUpdate[]; + repository: GitRepository; + } + export interface GitPushEventData { + afterId: string; + beforeId: string; + branch: string; + commits: GitCommit[]; + repository: GitRepository; + } + export interface GitPushRef { + _links: any; + date: Date; + pushCorrelationId: string; + pushedBy: VSSInterfaces.IdentityRef; + pushId: number; + url: string; + } + export interface GitPushSearchCriteria { + fromDate: Date; + /** + * Whether to include the _links field on the shallow references + */ + includeLinks: boolean; + includeRefUpdates: boolean; + pusherId: string; + refName: string; + toDate: Date; + } + export interface GitQueryCommitsCriteria { + /** + * Number of entries to skip + */ + $skip: number; + /** + * Maximum number of entries to retrieve + */ + $top: number; + /** + * Alias or display name of the author + */ + author: string; + /** + * If provided, the earliest commit in the graph to search + */ + compareVersion: GitVersionDescriptor; + /** + * If true, don't include delete history entries + */ + excludeDeletes: boolean; + /** + * If provided, a lower bound for filtering commits alphabetically + */ + fromCommitId: string; + /** + * If provided, only include history entries created after this date (string) + */ + fromDate: string; + /** + * If provided, specifies the exact commit ids of the commits to fetch. May not be combined with other parameters. + */ + ids: string[]; + /** + * Whether to include the _links field on the shallow references + */ + includeLinks: boolean; + /** + * Path of item to search under + */ + itemPath: string; + /** + * If provided, identifies the commit or branch to search + */ + itemVersion: GitVersionDescriptor; + /** + * If provided, an upper bound for filtering commits alphabetically + */ + toCommitId: string; + /** + * If provided, only include history entries created before this date (string) + */ + toDate: string; + /** + * Alias or display name of the committer + */ + user: string; + } + export interface GitRef { + _links: any; + isLockedBy: VSSInterfaces.IdentityRef; + name: string; + objectId: string; + statuses: GitStatus[]; + url: string; + } + export interface GitRefUpdate { + name: string; + newObjectId: string; + oldObjectId: string; + repositoryId: string; + } + export enum GitRefUpdateMode { + /** + * Indicates the Git protocol model where any refs that can be updated will be updated, but any failures will not prevent other updates from succeeding. + */ + BestEffort = 0, + /** + * Indicates that all ref updates must succeed or none will succeed. All ref updates will be atomically written. If any failure is encountered, previously successful updates will be rolled back and the entire operation will fail. + */ + AllOrNone = 1, + } + export interface GitRefUpdateResult { + /** + * Custom message for the result object For instance, Reason for failing. + */ + customMessage: string; + /** + * Ref name + */ + name: string; + /** + * New object ID + */ + newObjectId: string; + /** + * Old object ID + */ + oldObjectId: string; + /** + * Name of the plugin that rejected the updated. + */ + rejectedBy: string; + /** + * Repository ID + */ + repositoryId: string; + /** + * True if the ref update succeeded, false otherwise + */ + success: boolean; + /** + * Status of the update from the TFS server. + */ + updateStatus: GitRefUpdateStatus; + } + export interface GitRefUpdateResultSet { + countFailed: number; + countSucceeded: number; + pushCorrelationId: string; + pushIds: { + [key: string]: number; + }; + pushTime: Date; + results: GitRefUpdateResult[]; + } + export enum GitRefUpdateStatus { + /** + * Indicates that the ref update request was completed successfully. + */ + Succeeded = 0, + /** + * Indicates that the ref update request could not be completed because part of the graph would be disconnected by this change, and the caller does not have ForcePush permission on the repository. + */ + ForcePushRequired = 1, + /** + * Indicates that the ref update request could not be completed because the old object ID presented in the request was not the object ID of the ref when the database attempted the update. The most likely scenario is that the caller lost a race to update the ref. + */ + StaleOldObjectId = 2, + /** + * Indicates that the ref update request could not be completed because the ref name presented in the request was not valid. + */ + InvalidRefName = 3, + /** + * The request was not processed + */ + Unprocessed = 4, + /** + * The ref update request could not be completed because the new object ID for the ref could not be resolved to a commit object (potentially through any number of tags) + */ + UnresolvableToCommit = 5, + /** + * The ref update request could not be completed because the user lacks write permissions required to write this ref + */ + WritePermissionRequired = 6, + /** + * The ref update request could not be completed because the user lacks note creation permissions required to write this note + */ + ManageNotePermissionRequired = 7, + /** + * The ref update request could not be completed because the user lacks the permission to create a branch + */ + CreateBranchPermissionRequired = 8, + /** + * The ref update request could not be completed because the user lacks the permission to create a tag + */ + CreateTagPermissionRequired = 9, + /** + * The ref update could not be completed because it was rejected by the plugin. + */ + RejectedByPlugin = 10, + /** + * The ref update could not be completed because the ref is locked by another user. + */ + Locked = 11, + /** + * The ref update could not be completed because, in case-insensitive mode, the ref name conflicts with an existing, differently-cased ref name. + */ + RefNameConflict = 12, + /** + * The ref update could not be completed because it was rejected by policy. + */ + RejectedByPolicy = 13, + /** + * Indicates that the ref update request was completed successfully, but the ref doesn't actually exist so no changes were made. This should only happen during deletes. + */ + SucceededNonExistentRef = 14, + /** + * Indicates that the ref update request was completed successfully, but the passed-in ref was corrupt - as in, the old object ID was bad. This should only happen during deletes. + */ + SucceededCorruptRef = 15, + } + export interface GitRepository { + _links: any; + defaultBranch: string; + id: string; + name: string; + project: TfsCoreInterfaces.TeamProjectReference; + remoteUrl: string; + url: string; + } + export enum GitRepositoryPermissions { + None = 0, + Administer = 1, + GenericRead = 2, + GenericContribute = 4, + ForcePush = 8, + CreateBranch = 16, + CreateTag = 32, + ManageNote = 64, + PolicyExempt = 128, + /** + * This defines the set of bits that are valid for the git permission space. When reading or writing git permissions, these are the only bits paid attention too. + */ + All = 255, + BranchLevelPermissions = 141, + } + export interface GitStatus { + _links: any; + context: GitStatusContext; + createdBy: VSSInterfaces.IdentityRef; + creationDate: Date; + description: string; + state: GitStatusState; + targetUrl: string; + } + export interface GitStatusContext { + genre: string; + name: string; + } + export enum GitStatusState { + NotSet = 0, + Pending = 1, + Succeeded = 2, + Failed = 3, + Error = 4, + } + export interface GitSuggestion { + properties: { + [key: string]: any; + }; + type: string; + } + export interface GitTargetVersionDescriptor extends GitVersionDescriptor { + /** + * Version string identifier (name of tag/branch, SHA1 of commit) + */ + targetVersion: string; + /** + * Version options - Specify additional modifiers to version (e.g Previous) + */ + targetVersionOptions: GitVersionOptions; + /** + * Version type (branch, tag, or commit). Determines how Id is interpreted + */ + targetVersionType: GitVersionType; + } + export interface GitTreeEntryRef { + /** + * Blob or tree + */ + gitObjectType: GitObjectType; + /** + * Mode represented as octal string + */ + mode: string; + /** + * SHA1 hash of git object + */ + objectId: string; + /** + * Path relative to parent tree object + */ + relativePath: string; + /** + * Size of content + */ + size: number; + /** + * url to retrieve tree or blob + */ + url: string; + } + export interface GitTreeRef { + _links: any; + /** + * SHA1 hash of git object + */ + objectId: string; + /** + * Sum of sizes of all children + */ + size: number; + /** + * Blobs and trees under this tree + */ + treeEntries: GitTreeEntryRef[]; + /** + * Url to tree + */ + url: string; + } + export interface GitUserDate { + date: Date; + email: string; + name: string; + } + export interface GitVersionDescriptor { + /** + * Version string identifier (name of tag/branch/index, SHA1 of commit) + */ + version: string; + /** + * Version options - Specify additional modifiers to version (e.g Previous) + */ + versionOptions: GitVersionOptions; + /** + * Version type (branch, tag, commit, or index). Determines how Id is interpreted + */ + versionType: GitVersionType; + } + export enum GitVersionOptions { + /** + * Not specified + */ + None = 0, + /** + * Commit that changed item prior to the current version + */ + PreviousChange = 1, + /** + * First parent of commit (HEAD^) + */ + FirstParent = 2, + } + export enum GitVersionType { + /** + * Interpret the version as a branch name + */ + Branch = 0, + /** + * Interpret the version as a tag name + */ + Tag = 1, + /** + * Interpret the version as a commit ID (SHA1) + */ + Commit = 2, + /** + * Interpret the version as an index name + */ + Index = 3, + } + export interface HistoryEntry { + /** + * The Change list (changeset/commit/shelveset) for this point in history + */ + changeList: ChangeList; + /** + * The change made to the item from this change list (only relevant for File history, not folders) + */ + itemChangeType: VersionControlChangeType; + /** + * The path of the item at this point in history (only relevant for File history, not folders) + */ + serverItem: string; + } + export interface HistoryQueryResults { + /** + * True if there are more results available to fetch (we're returning the max # of items requested) A more RESTy solution would be to include a Link header + */ + moreResultsAvailable: boolean; + /** + * The history entries (results) from this query + */ + results: HistoryEntry[]; + } + export interface IdentityRefWithVote extends VSSInterfaces.IdentityRef { + isRequired: boolean; + reviewerUrl: string; + vote: number; + votedFor: IdentityRefWithVote[]; + } + export interface IncludedGitCommit { + commitId: string; + commitTime: Date; + parentCommitIds: string[]; + repositoryId: string; + } + export interface ItemContent { + content: string; + contentType: ItemContentType; + } + export enum ItemContentType { + RawText = 0, + Base64Encoded = 1, + } + /** + * Optional details to include when returning an item model + */ + export interface ItemDetailsOptions { + /** + * If true, include metadata about the file type + */ + includeContentMetadata: boolean; + /** + * Specifies whether to include children (OneLevel), all descendants (Full) or None for folder items + */ + recursionLevel: VersionControlRecursionType; + } + export interface ItemModel { + _links: any; + contentMetadata: FileContentMetadata; + isFolder: boolean; + isSymLink: boolean; + path: string; + url: string; + } + export enum PullRequestAsyncStatus { + NotSet = 0, + Queued = 1, + Conflicts = 2, + Succeeded = 3, + RejectedByPolicy = 4, + Failure = 5, + } + export enum PullRequestStatus { + NotSet = 0, + Active = 1, + Abandoned = 2, + Completed = 3, + All = 4, + } + export interface TfvcBranch extends TfvcBranchRef { + children: TfvcBranch[]; + mappings: TfvcBranchMapping[]; + parent: TfvcShallowBranchRef; + relatedBranches: TfvcShallowBranchRef[]; + } + export interface TfvcBranchMapping { + depth: string; + serverItem: string; + type: string; + } + export interface TfvcBranchRef extends TfvcShallowBranchRef { + _links: any; + createdDate: Date; + description: string; + isDeleted: boolean; + owner: VSSInterfaces.IdentityRef; + url: string; + } + export interface TfvcChange extends Change { + /** + * List of merge sources in case of rename or branch creation. + */ + mergeSources: TfvcMergeSource[]; + /** + * Version at which a (shelved) change was pended against + */ + pendingVersion: number; + } + export interface TfvcChangeset extends TfvcChangesetRef { + accountId: string; + changes: TfvcChange[]; + checkinNotes: CheckinNote[]; + collectionId: string; + hasMoreChanges: boolean; + policyOverride: TfvcPolicyOverrideInfo; + teamProjectIds: string[]; + workItems: AssociatedWorkItem[]; + } + export interface TfvcChangesetRef { + _links: any; + author: VSSInterfaces.IdentityRef; + changesetId: number; + checkedInBy: VSSInterfaces.IdentityRef; + comment: string; + commentTruncated: boolean; + createdDate: Date; + url: string; + } + /** + * Criteria used in a search for change lists + */ + export interface TfvcChangesetSearchCriteria { + /** + * Alias or display name of user who made the changes + */ + author: string; + /** + * Whether or not to follow renames for the given item being queried + */ + followRenames: boolean; + /** + * If provided, only include changesets created after this date (string) Think of a better name for this. + */ + fromDate: string; + /** + * If provided, only include changesets after this changesetID + */ + fromId: number; + /** + * Whether to include the _links field on the shallow references + */ + includeLinks: boolean; + /** + * Path of item to search under + */ + path: string; + /** + * If provided, only include changesets created before this date (string) Think of a better name for this. + */ + toDate: string; + /** + * If provided, a version descriptor for the latest change list to include + */ + toId: number; + } + export interface TfvcChangesetsRequestData { + changesetIds: number[]; + commentLength: number; + /** + * Whether to include the _links field on the shallow references + */ + includeLinks: boolean; + } + export interface TfvcCheckinEventData { + changeset: TfvcChangeset; + project: TfsCoreInterfaces.TeamProjectReference; + } + export interface TfvcHistoryEntry extends HistoryEntry { + /** + * The encoding of the item at this point in history (only relevant for File history, not folders) + */ + encoding: number; + /** + * The file id of the item at this point in history (only relevant for File history, not folders) + */ + fileId: number; + } + export interface TfvcItem extends ItemModel { + changeDate: Date; + deletionId: number; + /** + * MD5 hash as a base 64 string, applies to files only. + */ + hashValue: string; + isBranch: boolean; + isPendingChange: boolean; + /** + * The size of the file, if applicable. + */ + size: number; + version: number; + } + /** + * Item path and Version descriptor properties + */ + export interface TfvcItemDescriptor { + path: string; + recursionLevel: VersionControlRecursionType; + version: string; + versionOption: TfvcVersionOption; + versionType: TfvcVersionType; + } + export interface TfvcItemRequestData { + /** + * If true, include metadata about the file type + */ + includeContentMetadata: boolean; + /** + * Whether to include the _links field on the shallow references + */ + includeLinks: boolean; + itemDescriptors: TfvcItemDescriptor[]; + } + export interface TfvcLabel extends TfvcLabelRef { + items: TfvcItem[]; + } + export interface TfvcLabelRef { + _links: any; + description: string; + id: number; + labelScope: string; + modifiedDate: Date; + name: string; + owner: VSSInterfaces.IdentityRef; + url: string; + } + export interface TfvcLabelRequestData { + /** + * Whether to include the _links field on the shallow references + */ + includeLinks: boolean; + itemLabelFilter: string; + labelScope: string; + maxItemCount: number; + name: string; + owner: string; + } + export interface TfvcMergeSource { + /** + * Indicates if this a rename source. If false, it is a merge source. + */ + isRename: boolean; + /** + * The server item of the merge source + */ + serverItem: string; + /** + * Start of the version range + */ + versionFrom: number; + /** + * End of the version range + */ + versionTo: number; + } + export interface TfvcPolicyFailureInfo { + message: string; + policyName: string; + } + export interface TfvcPolicyOverrideInfo { + comment: string; + policyFailures: TfvcPolicyFailureInfo[]; + } + export interface TfvcShallowBranchRef { + path: string; + } + export interface TfvcShelveset extends TfvcShelvesetRef { + changes: TfvcChange[]; + notes: CheckinNote[]; + policyOverride: TfvcPolicyOverrideInfo; + workItems: AssociatedWorkItem[]; + } + export interface TfvcShelvesetRef { + _links: any; + comment: string; + commentTruncated: boolean; + createdDate: Date; + id: string; + name: string; + owner: VSSInterfaces.IdentityRef; + url: string; + } + export interface TfvcShelvesetRequestData { + /** + * Whether to include policyOverride and notes + */ + includeDetails: boolean; + /** + * Whether to include the _links field on the shallow references + */ + includeLinks: boolean; + /** + * Whether to include workItems + */ + includeWorkItems: boolean; + /** + * Max number of changes to include + */ + maxChangeCount: number; + /** + * Max length of comment + */ + maxCommentLength: number; + /** + * Shelveset's name + */ + name: string; + /** + * Owner's ID. Could be a name or a guid. + */ + owner: string; + } + export interface TfvcVersionDescriptor { + version: string; + versionOption: TfvcVersionOption; + versionType: TfvcVersionType; + } + export enum TfvcVersionOption { + None = 0, + Previous = 1, + UseRename = 2, + } + export enum TfvcVersionType { + None = 0, + Changeset = 1, + Shelveset = 2, + Change = 3, + Date = 4, + Latest = 5, + Tip = 6, + MergeSource = 7, + } + export interface UpdateRefsRequest { + refUpdateRequests: GitRefUpdate[]; + updateMode: GitRefUpdateMode; + } + export enum VersionControlChangeType { + None = 0, + Add = 1, + Edit = 2, + Encoding = 4, + Rename = 8, + Delete = 16, + Undelete = 32, + Branch = 64, + Merge = 128, + Lock = 256, + Rollback = 512, + SourceRename = 1024, + TargetRename = 2048, + Property = 4096, + All = 8191, + } + export interface VersionControlProjectInfo { + defaultSourceControlType: TfsCoreInterfaces.SourceControlTypes; + project: TfsCoreInterfaces.TeamProjectReference; + supportsGit: boolean; + supportsTFVC: boolean; + } + export enum VersionControlRecursionType { + /** + * Only return the specified item. + */ + None = 0, + /** + * Return the specified item and its direct children. + */ + OneLevel = 1, + /** + * Return the specified item and its direct children, as well as recursive chains of nested child folders that only contain a single folder. + */ + OneLevelPlusNestedEmptyFolders = 4, + /** + * Return specified item and all descendants + */ + Full = 120, + } + export var TypeInfo: { + AssociatedWorkItem: { + fields: any; + }; + Change: { + fields: any; + }; + ChangeCountDictionary: { + fields: any; + }; + ChangeList: { + fields: any; + }; + ChangeListSearchCriteria: { + fields: any; + }; + CheckinNote: { + fields: any; + }; + FileContentMetadata: { + fields: any; + }; + GitBaseVersionDescriptor: { + fields: any; + }; + GitBlobRef: { + fields: any; + }; + GitBranchStats: { + fields: any; + }; + GitChange: { + fields: any; + }; + GitCommit: { + fields: any; + }; + GitCommitChanges: { + fields: any; + }; + GitCommitDiffs: { + fields: any; + }; + GitCommitRef: { + fields: any; + }; + GitCommitToCreate: { + fields: any; + }; + GitDeletedRepository: { + fields: any; + }; + GitHistoryQueryResults: { + fields: any; + }; + GitItem: { + fields: any; + }; + GitItemDescriptor: { + fields: any; + }; + GitItemRequestData: { + fields: any; + }; + GitLimitedRefCriteria: { + fields: any; + }; + GitObjectType: { + enumValues: { + "bad": number; + "commit": number; + "tree": number; + "blob": number; + "tag": number; + "ext2": number; + "ofsDelta": number; + "refDelta": number; + }; + }; + GitPathAction: { + fields: any; + }; + GitPathActions: { + enumValues: { + "none": number; + "edit": number; + "delete": number; + "add": number; + "rename": number; + }; + }; + GitPermissionScope: { + enumValues: { + "project": number; + "repository": number; + "branch": number; + }; + }; + GitPullRequest: { + fields: any; + }; + GitPullRequestCompletionOptions: { + fields: any; + }; + GitPullRequestSearchCriteria: { + fields: any; + }; + GitPush: { + fields: any; + }; + GitPushEventData: { + fields: any; + }; + GitPushRef: { + fields: any; + }; + GitPushSearchCriteria: { + fields: any; + }; + GitQueryCommitsCriteria: { + fields: any; + }; + GitRef: { + fields: any; + }; + GitRefUpdate: { + fields: any; + }; + GitRefUpdateMode: { + enumValues: { + "bestEffort": number; + "allOrNone": number; + }; + }; + GitRefUpdateResult: { + fields: any; + }; + GitRefUpdateResultSet: { + fields: any; + }; + GitRefUpdateStatus: { + enumValues: { + "succeeded": number; + "forcePushRequired": number; + "staleOldObjectId": number; + "invalidRefName": number; + "unprocessed": number; + "unresolvableToCommit": number; + "writePermissionRequired": number; + "manageNotePermissionRequired": number; + "createBranchPermissionRequired": number; + "createTagPermissionRequired": number; + "rejectedByPlugin": number; + "locked": number; + "refNameConflict": number; + "rejectedByPolicy": number; + "succeededNonExistentRef": number; + "succeededCorruptRef": number; + }; + }; + GitRepository: { + fields: any; + }; + GitRepositoryPermissions: { + enumValues: { + "none": number; + "administer": number; + "genericRead": number; + "genericContribute": number; + "forcePush": number; + "createBranch": number; + "createTag": number; + "manageNote": number; + "policyExempt": number; + "all": number; + "branchLevelPermissions": number; + }; + }; + GitStatus: { + fields: any; + }; + GitStatusContext: { + fields: any; + }; + GitStatusState: { + enumValues: { + "notSet": number; + "pending": number; + "succeeded": number; + "failed": number; + "error": number; + }; + }; + GitSuggestion: { + fields: any; + }; + GitTargetVersionDescriptor: { + fields: any; + }; + GitTreeEntryRef: { + fields: any; + }; + GitTreeRef: { + fields: any; + }; + GitUserDate: { + fields: any; + }; + GitVersionDescriptor: { + fields: any; + }; + GitVersionOptions: { + enumValues: { + "none": number; + "previousChange": number; + "firstParent": number; + }; + }; + GitVersionType: { + enumValues: { + "branch": number; + "tag": number; + "commit": number; + "index": number; + }; + }; + HistoryEntry: { + fields: any; + }; + HistoryQueryResults: { + fields: any; + }; + IdentityRefWithVote: { + fields: any; + }; + IncludedGitCommit: { + fields: any; + }; + ItemContent: { + fields: any; + }; + ItemContentType: { + enumValues: { + "rawText": number; + "base64Encoded": number; + }; + }; + ItemDetailsOptions: { + fields: any; + }; + ItemModel: { + fields: any; + }; + PullRequestAsyncStatus: { + enumValues: { + "notSet": number; + "queued": number; + "conflicts": number; + "succeeded": number; + "rejectedByPolicy": number; + "failure": number; + }; + }; + PullRequestStatus: { + enumValues: { + "notSet": number; + "active": number; + "abandoned": number; + "completed": number; + "all": number; + }; + }; + TfvcBranch: { + fields: any; + }; + TfvcBranchMapping: { + fields: any; + }; + TfvcBranchRef: { + fields: any; + }; + TfvcChange: { + fields: any; + }; + TfvcChangeset: { + fields: any; + }; + TfvcChangesetRef: { + fields: any; + }; + TfvcChangesetSearchCriteria: { + fields: any; + }; + TfvcChangesetsRequestData: { + fields: any; + }; + TfvcCheckinEventData: { + fields: any; + }; + TfvcHistoryEntry: { + fields: any; + }; + TfvcItem: { + fields: any; + }; + TfvcItemDescriptor: { + fields: any; + }; + TfvcItemRequestData: { + fields: any; + }; + TfvcLabel: { + fields: any; + }; + TfvcLabelRef: { + fields: any; + }; + TfvcLabelRequestData: { + fields: any; + }; + TfvcMergeSource: { + fields: any; + }; + TfvcPolicyFailureInfo: { + fields: any; + }; + TfvcPolicyOverrideInfo: { + fields: any; + }; + TfvcShallowBranchRef: { + fields: any; + }; + TfvcShelveset: { + fields: any; + }; + TfvcShelvesetRef: { + fields: any; + }; + TfvcShelvesetRequestData: { + fields: any; + }; + TfvcVersionDescriptor: { + fields: any; + }; + TfvcVersionOption: { + enumValues: { + "none": number; + "previous": number; + "useRename": number; + }; + }; + TfvcVersionType: { + enumValues: { + "none": number; + "changeset": number; + "shelveset": number; + "change": number; + "date": number; + "latest": number; + "tip": number; + "mergeSource": number; + }; + }; + UpdateRefsRequest: { + fields: any; + }; + VersionControlChangeType: { + enumValues: { + "none": number; + "add": number; + "edit": number; + "encoding": number; + "rename": number; + "delete": number; + "undelete": number; + "branch": number; + "merge": number; + "lock": number; + "rollback": number; + "sourceRename": number; + "targetRename": number; + "property": number; + "all": number; + }; + }; + VersionControlProjectInfo: { + fields: any; + }; + VersionControlRecursionType: { + enumValues: { + "none": number; + "oneLevel": number; + "oneLevelPlusNestedEmptyFolders": number; + "full": number; + }; + }; + }; + +} +declare module 'vso-node-api/TfvcApi' { + + + import Q = require('q'); + import basem = require('vso-node-api/ClientApiBases'); + import VsoBaseInterfaces = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); + import TfvcInterfaces = require('vso-node-api/interfaces/TfvcInterfaces'); + export interface ITfvcApi extends basem.ClientApiBase { + getBranch(path: string, project: string, includeParent: boolean, includeChildren: boolean, onResult: (err: any, statusCode: number, Branche: TfvcInterfaces.TfvcBranch) => void): void; + getBranches(project: string, includeParent: boolean, includeChildren: boolean, includeDeleted: boolean, includeLinks: boolean, onResult: (err: any, statusCode: number, Branches: TfvcInterfaces.TfvcBranch[]) => void): void; + getBranchRefs(scopePath: string, project: string, includeDeleted: boolean, includeLinks: boolean, onResult: (err: any, statusCode: number, Branches: TfvcInterfaces.TfvcBranchRef[]) => void): void; + getChangesetChanges(id: number, skip: number, top: number, onResult: (err: any, statusCode: number, ChangesetChanges: TfvcInterfaces.TfvcChange[]) => void): void; + createChangeset(changeset: TfvcInterfaces.TfvcChangeset, project: string, onResult: (err: any, statusCode: number, Changeset: TfvcInterfaces.TfvcChangesetRef) => void): void; + getChangeset(id: number, project: string, maxChangeCount: number, includeDetails: boolean, includeWorkItems: boolean, maxCommentLength: number, includeSourceRename: boolean, skip: number, top: number, orderby: string, searchCriteria: TfvcInterfaces.TfvcChangesetSearchCriteria, onResult: (err: any, statusCode: number, Changeset: TfvcInterfaces.TfvcChangeset) => void): void; + getChangesets(project: string, maxChangeCount: number, includeDetails: boolean, includeWorkItems: boolean, maxCommentLength: number, includeSourceRename: boolean, skip: number, top: number, orderby: string, searchCriteria: TfvcInterfaces.TfvcChangesetSearchCriteria, onResult: (err: any, statusCode: number, Changesets: TfvcInterfaces.TfvcChangesetRef[]) => void): void; + getBatchedChangesets(changesetsRequestData: TfvcInterfaces.TfvcChangesetsRequestData, onResult: (err: any, statusCode: number, ChangesetsBatch: TfvcInterfaces.TfvcChangesetRef[]) => void): void; + getChangesetWorkItems(id: number, onResult: (err: any, statusCode: number, ChangesetWorkItems: TfvcInterfaces.AssociatedWorkItem[]) => void): void; + getItemsBatch(itemRequestData: TfvcInterfaces.TfvcItemRequestData, project: string, onResult: (err: any, statusCode: number, ItemBatch: TfvcInterfaces.TfvcItem[][]) => void): void; + getItemsBatchZip(itemRequestData: TfvcInterfaces.TfvcItemRequestData, project: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + getItem(path: string, project: string, fileName: string, download: boolean, scopePath: string, recursionLevel: TfvcInterfaces.VersionControlRecursionType, versionDescriptor: TfvcInterfaces.TfvcVersionDescriptor, onResult: (err: any, statusCode: number, Item: TfvcInterfaces.TfvcItem) => void): void; + getItemContent(path: string, project: string, fileName: string, download: boolean, scopePath: string, recursionLevel: TfvcInterfaces.VersionControlRecursionType, versionDescriptor: TfvcInterfaces.TfvcVersionDescriptor, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + getItems(project: string, scopePath: string, recursionLevel: TfvcInterfaces.VersionControlRecursionType, includeLinks: boolean, versionDescriptor: TfvcInterfaces.TfvcVersionDescriptor, onResult: (err: any, statusCode: number, Items: TfvcInterfaces.TfvcItem[]) => void): void; + getItemText(path: string, project: string, fileName: string, download: boolean, scopePath: string, recursionLevel: TfvcInterfaces.VersionControlRecursionType, versionDescriptor: TfvcInterfaces.TfvcVersionDescriptor, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + getItemZip(path: string, project: string, fileName: string, download: boolean, scopePath: string, recursionLevel: TfvcInterfaces.VersionControlRecursionType, versionDescriptor: TfvcInterfaces.TfvcVersionDescriptor, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + getLabelItems(labelId: string, top: number, skip: number, onResult: (err: any, statusCode: number, LabelItems: TfvcInterfaces.TfvcItem[]) => void): void; + getLabel(labelId: string, requestData: TfvcInterfaces.TfvcLabelRequestData, project: string, onResult: (err: any, statusCode: number, Label: TfvcInterfaces.TfvcLabel) => void): void; + getLabels(requestData: TfvcInterfaces.TfvcLabelRequestData, project: string, top: number, skip: number, onResult: (err: any, statusCode: number, Labels: TfvcInterfaces.TfvcLabelRef[]) => void): void; + getShelvesetChanges(shelvesetId: string, top: number, skip: number, onResult: (err: any, statusCode: number, ShelvesetChanges: TfvcInterfaces.TfvcChange[]) => void): void; + getShelveset(shelvesetId: string, requestData: TfvcInterfaces.TfvcShelvesetRequestData, onResult: (err: any, statusCode: number, Shelveset: TfvcInterfaces.TfvcShelveset) => void): void; + getShelvesets(requestData: TfvcInterfaces.TfvcShelvesetRequestData, top: number, skip: number, onResult: (err: any, statusCode: number, Shelvesets: TfvcInterfaces.TfvcShelvesetRef[]) => void): void; + getShelvesetWorkItems(shelvesetId: string, onResult: (err: any, statusCode: number, ShelvesetWorkItems: TfvcInterfaces.AssociatedWorkItem[]) => void): void; + } + export interface IQTfvcApi extends basem.QClientApiBase { + getBranch(path: string, project?: string, includeParent?: boolean, includeChildren?: boolean): Promise; + getBranches(project?: string, includeParent?: boolean, includeChildren?: boolean, includeDeleted?: boolean, includeLinks?: boolean): Promise; + getBranchRefs(scopePath: string, project?: string, includeDeleted?: boolean, includeLinks?: boolean): Promise; + getChangesetChanges(id?: number, skip?: number, top?: number): Promise; + createChangeset(changeset: TfvcInterfaces.TfvcChangeset, project?: string): Promise; + getChangeset(id: number, project?: string, maxChangeCount?: number, includeDetails?: boolean, includeWorkItems?: boolean, maxCommentLength?: number, includeSourceRename?: boolean, skip?: number, top?: number, orderby?: string, searchCriteria?: TfvcInterfaces.TfvcChangesetSearchCriteria): Promise; + getChangesets(project?: string, maxChangeCount?: number, includeDetails?: boolean, includeWorkItems?: boolean, maxCommentLength?: number, includeSourceRename?: boolean, skip?: number, top?: number, orderby?: string, searchCriteria?: TfvcInterfaces.TfvcChangesetSearchCriteria): Promise; + getBatchedChangesets(changesetsRequestData: TfvcInterfaces.TfvcChangesetsRequestData): Promise; + getChangesetWorkItems(id?: number): Promise; + getItemsBatch(itemRequestData: TfvcInterfaces.TfvcItemRequestData, project?: string): Promise; + getItemsBatchZip(itemRequestData: TfvcInterfaces.TfvcItemRequestData, project?: string): Promise; + getItem(path: string, project?: string, fileName?: string, download?: boolean, scopePath?: string, recursionLevel?: TfvcInterfaces.VersionControlRecursionType, versionDescriptor?: TfvcInterfaces.TfvcVersionDescriptor): Promise; + getItemContent(path: string, project?: string, fileName?: string, download?: boolean, scopePath?: string, recursionLevel?: TfvcInterfaces.VersionControlRecursionType, versionDescriptor?: TfvcInterfaces.TfvcVersionDescriptor): Promise; + getItems(project?: string, scopePath?: string, recursionLevel?: TfvcInterfaces.VersionControlRecursionType, includeLinks?: boolean, versionDescriptor?: TfvcInterfaces.TfvcVersionDescriptor): Promise; + getItemText(path: string, project?: string, fileName?: string, download?: boolean, scopePath?: string, recursionLevel?: TfvcInterfaces.VersionControlRecursionType, versionDescriptor?: TfvcInterfaces.TfvcVersionDescriptor): Promise; + getItemZip(path: string, project?: string, fileName?: string, download?: boolean, scopePath?: string, recursionLevel?: TfvcInterfaces.VersionControlRecursionType, versionDescriptor?: TfvcInterfaces.TfvcVersionDescriptor): Promise; + getLabelItems(labelId: string, top?: number, skip?: number): Promise; + getLabel(labelId: string, requestData: TfvcInterfaces.TfvcLabelRequestData, project?: string): Promise; + getLabels(requestData: TfvcInterfaces.TfvcLabelRequestData, project?: string, top?: number, skip?: number): Promise; + getShelvesetChanges(shelvesetId: string, top?: number, skip?: number): Promise; + getShelveset(shelvesetId: string, requestData: TfvcInterfaces.TfvcShelvesetRequestData): Promise; + getShelvesets(requestData: TfvcInterfaces.TfvcShelvesetRequestData, top?: number, skip?: number): Promise; + getShelvesetWorkItems(shelvesetId: string): Promise; + } + export class TfvcApi extends basem.ClientApiBase implements ITfvcApi { + constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); + /** + * Get a single branch hierarchy at the given path with parents or children (if specified) + * + * @param {string} path + * @param {string} project - Project ID or project name + * @param {boolean} includeParent + * @param {boolean} includeChildren + * @param onResult callback function with the resulting TfvcInterfaces.TfvcBranch + */ + getBranch(path: string, project: string, includeParent: boolean, includeChildren: boolean, onResult: (err: any, statusCode: number, Branche: TfvcInterfaces.TfvcBranch) => void): void; + /** + * Get a collection of branch roots -- first-level children, branches with no parents + * + * @param {string} project - Project ID or project name + * @param {boolean} includeParent + * @param {boolean} includeChildren + * @param {boolean} includeDeleted + * @param {boolean} includeLinks + * @param onResult callback function with the resulting TfvcInterfaces.TfvcBranch[] + */ + getBranches(project: string, includeParent: boolean, includeChildren: boolean, includeDeleted: boolean, includeLinks: boolean, onResult: (err: any, statusCode: number, Branches: TfvcInterfaces.TfvcBranch[]) => void): void; + /** + * Get branch hierarchies below the specified scopePath + * + * @param {string} scopePath + * @param {string} project - Project ID or project name + * @param {boolean} includeDeleted + * @param {boolean} includeLinks + * @param onResult callback function with the resulting TfvcInterfaces.TfvcBranchRef[] + */ + getBranchRefs(scopePath: string, project: string, includeDeleted: boolean, includeLinks: boolean, onResult: (err: any, statusCode: number, Branches: TfvcInterfaces.TfvcBranchRef[]) => void): void; + /** + * Retrieve Tfvc changes for a given changeset + * + * @param {number} id + * @param {number} skip + * @param {number} top + * @param onResult callback function with the resulting TfvcInterfaces.TfvcChange[] + */ + getChangesetChanges(id: number, skip: number, top: number, onResult: (err: any, statusCode: number, ChangesetChanges: TfvcInterfaces.TfvcChange[]) => void): void; + /** + * @param {TfvcInterfaces.TfvcChangeset} changeset + * @param {string} project - Project ID or project name + * @param onResult callback function with the resulting TfvcInterfaces.TfvcChangesetRef + */ + createChangeset(changeset: TfvcInterfaces.TfvcChangeset, project: string, onResult: (err: any, statusCode: number, Changeset: TfvcInterfaces.TfvcChangesetRef) => void): void; + /** + * Retrieve a Tfvc Changeset + * + * @param {number} id + * @param {string} project - Project ID or project name + * @param {number} maxChangeCount + * @param {boolean} includeDetails + * @param {boolean} includeWorkItems + * @param {number} maxCommentLength + * @param {boolean} includeSourceRename + * @param {number} skip + * @param {number} top + * @param {string} orderby + * @param {TfvcInterfaces.TfvcChangesetSearchCriteria} searchCriteria + * @param onResult callback function with the resulting TfvcInterfaces.TfvcChangeset + */ + getChangeset(id: number, project: string, maxChangeCount: number, includeDetails: boolean, includeWorkItems: boolean, maxCommentLength: number, includeSourceRename: boolean, skip: number, top: number, orderby: string, searchCriteria: TfvcInterfaces.TfvcChangesetSearchCriteria, onResult: (err: any, statusCode: number, Changeset: TfvcInterfaces.TfvcChangeset) => void): void; + /** + * Retrieve Tfvc changesets + * + * @param {string} project - Project ID or project name + * @param {number} maxChangeCount + * @param {boolean} includeDetails + * @param {boolean} includeWorkItems + * @param {number} maxCommentLength + * @param {boolean} includeSourceRename + * @param {number} skip + * @param {number} top + * @param {string} orderby + * @param {TfvcInterfaces.TfvcChangesetSearchCriteria} searchCriteria + * @param onResult callback function with the resulting TfvcInterfaces.TfvcChangesetRef[] + */ + getChangesets(project: string, maxChangeCount: number, includeDetails: boolean, includeWorkItems: boolean, maxCommentLength: number, includeSourceRename: boolean, skip: number, top: number, orderby: string, searchCriteria: TfvcInterfaces.TfvcChangesetSearchCriteria, onResult: (err: any, statusCode: number, Changesets: TfvcInterfaces.TfvcChangesetRef[]) => void): void; + /** + * @param {TfvcInterfaces.TfvcChangesetsRequestData} changesetsRequestData + * @param onResult callback function with the resulting TfvcInterfaces.TfvcChangesetRef[] + */ + getBatchedChangesets(changesetsRequestData: TfvcInterfaces.TfvcChangesetsRequestData, onResult: (err: any, statusCode: number, ChangesetsBatch: TfvcInterfaces.TfvcChangesetRef[]) => void): void; + /** + * @param {number} id + * @param onResult callback function with the resulting TfvcInterfaces.AssociatedWorkItem[] + */ + getChangesetWorkItems(id: number, onResult: (err: any, statusCode: number, ChangesetWorkItems: TfvcInterfaces.AssociatedWorkItem[]) => void): void; + /** + * Post for retrieving a set of items given a list of paths or a long path. Allows for specifying the recursionLevel and version descriptors for each path. + * + * @param {TfvcInterfaces.TfvcItemRequestData} itemRequestData + * @param {string} project - Project ID or project name + * @param onResult callback function with the resulting TfvcInterfaces.TfvcItem[][] + */ + getItemsBatch(itemRequestData: TfvcInterfaces.TfvcItemRequestData, project: string, onResult: (err: any, statusCode: number, ItemBatch: TfvcInterfaces.TfvcItem[][]) => void): void; + /** + * Post for retrieving a set of items given a list of paths or a long path. Allows for specifying the recursionLevel and version descriptors for each path. + * + * @param {TfvcInterfaces.TfvcItemRequestData} itemRequestData + * @param {string} project - Project ID or project name + * @param onResult callback function with the resulting ArrayBuffer + */ + getItemsBatchZip(itemRequestData: TfvcInterfaces.TfvcItemRequestData, project: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + /** + * Get Item Metadata and/or Content. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. + * + * @param {string} path + * @param {string} project - Project ID or project name + * @param {string} fileName + * @param {boolean} download + * @param {string} scopePath + * @param {TfvcInterfaces.VersionControlRecursionType} recursionLevel + * @param {TfvcInterfaces.TfvcVersionDescriptor} versionDescriptor + * @param onResult callback function with the resulting TfvcInterfaces.TfvcItem + */ + getItem(path: string, project: string, fileName: string, download: boolean, scopePath: string, recursionLevel: TfvcInterfaces.VersionControlRecursionType, versionDescriptor: TfvcInterfaces.TfvcVersionDescriptor, onResult: (err: any, statusCode: number, Item: TfvcInterfaces.TfvcItem) => void): void; + /** + * Get Item Metadata and/or Content. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. + * + * @param {string} path + * @param {string} project - Project ID or project name + * @param {string} fileName + * @param {boolean} download + * @param {string} scopePath + * @param {TfvcInterfaces.VersionControlRecursionType} recursionLevel + * @param {TfvcInterfaces.TfvcVersionDescriptor} versionDescriptor + * @param onResult callback function with the resulting ArrayBuffer + */ + getItemContent(path: string, project: string, fileName: string, download: boolean, scopePath: string, recursionLevel: TfvcInterfaces.VersionControlRecursionType, versionDescriptor: TfvcInterfaces.TfvcVersionDescriptor, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + /** + * Get a list of Tfvc items + * + * @param {string} project - Project ID or project name + * @param {string} scopePath + * @param {TfvcInterfaces.VersionControlRecursionType} recursionLevel + * @param {boolean} includeLinks + * @param {TfvcInterfaces.TfvcVersionDescriptor} versionDescriptor + * @param onResult callback function with the resulting TfvcInterfaces.TfvcItem[] + */ + getItems(project: string, scopePath: string, recursionLevel: TfvcInterfaces.VersionControlRecursionType, includeLinks: boolean, versionDescriptor: TfvcInterfaces.TfvcVersionDescriptor, onResult: (err: any, statusCode: number, Items: TfvcInterfaces.TfvcItem[]) => void): void; + /** + * Get Item Metadata and/or Content. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. + * + * @param {string} path + * @param {string} project - Project ID or project name + * @param {string} fileName + * @param {boolean} download + * @param {string} scopePath + * @param {TfvcInterfaces.VersionControlRecursionType} recursionLevel + * @param {TfvcInterfaces.TfvcVersionDescriptor} versionDescriptor + * @param onResult callback function with the resulting string + */ + getItemText(path: string, project: string, fileName: string, download: boolean, scopePath: string, recursionLevel: TfvcInterfaces.VersionControlRecursionType, versionDescriptor: TfvcInterfaces.TfvcVersionDescriptor, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + /** + * Get Item Metadata and/or Content. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. + * + * @param {string} path + * @param {string} project - Project ID or project name + * @param {string} fileName + * @param {boolean} download + * @param {string} scopePath + * @param {TfvcInterfaces.VersionControlRecursionType} recursionLevel + * @param {TfvcInterfaces.TfvcVersionDescriptor} versionDescriptor + * @param onResult callback function with the resulting ArrayBuffer + */ + getItemZip(path: string, project: string, fileName: string, download: boolean, scopePath: string, recursionLevel: TfvcInterfaces.VersionControlRecursionType, versionDescriptor: TfvcInterfaces.TfvcVersionDescriptor, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + /** + * Get items under a label. + * + * @param {string} labelId - Unique identifier of label + * @param {number} top - Max number of items to return + * @param {number} skip - Number of items to skip + * @param onResult callback function with the resulting TfvcInterfaces.TfvcItem[] + */ + getLabelItems(labelId: string, top: number, skip: number, onResult: (err: any, statusCode: number, LabelItems: TfvcInterfaces.TfvcItem[]) => void): void; + /** + * Get a single deep label. + * + * @param {string} labelId - Unique identifier of label + * @param {TfvcInterfaces.TfvcLabelRequestData} requestData - maxItemCount + * @param {string} project - Project ID or project name + * @param onResult callback function with the resulting TfvcInterfaces.TfvcLabel + */ + getLabel(labelId: string, requestData: TfvcInterfaces.TfvcLabelRequestData, project: string, onResult: (err: any, statusCode: number, Label: TfvcInterfaces.TfvcLabel) => void): void; + /** + * Get a collection of shallow label references. + * + * @param {TfvcInterfaces.TfvcLabelRequestData} requestData - labelScope, name, owner, and itemLabelFilter + * @param {string} project - Project ID or project name + * @param {number} top - Max number of labels to return + * @param {number} skip - Number of labels to skip + * @param onResult callback function with the resulting TfvcInterfaces.TfvcLabelRef[] + */ + getLabels(requestData: TfvcInterfaces.TfvcLabelRequestData, project: string, top: number, skip: number, onResult: (err: any, statusCode: number, Labels: TfvcInterfaces.TfvcLabelRef[]) => void): void; + /** + * Get changes included in a shelveset. + * + * @param {string} shelvesetId - Shelveset's unique ID + * @param {number} top - Max number of changes to return + * @param {number} skip - Number of changes to skip + * @param onResult callback function with the resulting TfvcInterfaces.TfvcChange[] + */ + getShelvesetChanges(shelvesetId: string, top: number, skip: number, onResult: (err: any, statusCode: number, ShelvesetChanges: TfvcInterfaces.TfvcChange[]) => void): void; + /** + * Get a single deep shelveset. + * + * @param {string} shelvesetId - Shelveset's unique ID + * @param {TfvcInterfaces.TfvcShelvesetRequestData} requestData - includeDetails, includeWorkItems, maxChangeCount, and maxCommentLength + * @param onResult callback function with the resulting TfvcInterfaces.TfvcShelveset + */ + getShelveset(shelvesetId: string, requestData: TfvcInterfaces.TfvcShelvesetRequestData, onResult: (err: any, statusCode: number, Shelveset: TfvcInterfaces.TfvcShelveset) => void): void; + /** + * Return a collection of shallow shelveset references. + * + * @param {TfvcInterfaces.TfvcShelvesetRequestData} requestData - name, owner, and maxCommentLength + * @param {number} top - Max number of shelvesets to return + * @param {number} skip - Number of shelvesets to skip + * @param onResult callback function with the resulting TfvcInterfaces.TfvcShelvesetRef[] + */ + getShelvesets(requestData: TfvcInterfaces.TfvcShelvesetRequestData, top: number, skip: number, onResult: (err: any, statusCode: number, Shelvesets: TfvcInterfaces.TfvcShelvesetRef[]) => void): void; + /** + * Get work items associated with a shelveset. + * + * @param {string} shelvesetId - Shelveset's unique ID + * @param onResult callback function with the resulting TfvcInterfaces.AssociatedWorkItem[] + */ + getShelvesetWorkItems(shelvesetId: string, onResult: (err: any, statusCode: number, ShelvesetWorkItems: TfvcInterfaces.AssociatedWorkItem[]) => void): void; + } + export class QTfvcApi extends basem.QClientApiBase implements IQTfvcApi { + api: TfvcApi; + constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); + /** + * Get a single branch hierarchy at the given path with parents or children (if specified) + * + * @param {string} path + * @param {string} project - Project ID or project name + * @param {boolean} includeParent + * @param {boolean} includeChildren + */ + getBranch(path: string, project?: string, includeParent?: boolean, includeChildren?: boolean): Promise; + /** + * Get a collection of branch roots -- first-level children, branches with no parents + * + * @param {string} project - Project ID or project name + * @param {boolean} includeParent + * @param {boolean} includeChildren + * @param {boolean} includeDeleted + * @param {boolean} includeLinks + */ + getBranches(project?: string, includeParent?: boolean, includeChildren?: boolean, includeDeleted?: boolean, includeLinks?: boolean): Promise; + /** + * Get branch hierarchies below the specified scopePath + * + * @param {string} scopePath + * @param {string} project - Project ID or project name + * @param {boolean} includeDeleted + * @param {boolean} includeLinks + */ + getBranchRefs(scopePath: string, project?: string, includeDeleted?: boolean, includeLinks?: boolean): Promise; + /** + * Retrieve Tfvc changes for a given changeset + * + * @param {number} id + * @param {number} skip + * @param {number} top + */ + getChangesetChanges(id?: number, skip?: number, top?: number): Promise; + /** + * @param {TfvcInterfaces.TfvcChangeset} changeset + * @param {string} project - Project ID or project name + */ + createChangeset(changeset: TfvcInterfaces.TfvcChangeset, project?: string): Promise; + /** + * Retrieve a Tfvc Changeset + * + * @param {number} id + * @param {string} project - Project ID or project name + * @param {number} maxChangeCount + * @param {boolean} includeDetails + * @param {boolean} includeWorkItems + * @param {number} maxCommentLength + * @param {boolean} includeSourceRename + * @param {number} skip + * @param {number} top + * @param {string} orderby + * @param {TfvcInterfaces.TfvcChangesetSearchCriteria} searchCriteria + */ + getChangeset(id: number, project?: string, maxChangeCount?: number, includeDetails?: boolean, includeWorkItems?: boolean, maxCommentLength?: number, includeSourceRename?: boolean, skip?: number, top?: number, orderby?: string, searchCriteria?: TfvcInterfaces.TfvcChangesetSearchCriteria): Promise; + /** + * Retrieve Tfvc changesets + * + * @param {string} project - Project ID or project name + * @param {number} maxChangeCount + * @param {boolean} includeDetails + * @param {boolean} includeWorkItems + * @param {number} maxCommentLength + * @param {boolean} includeSourceRename + * @param {number} skip + * @param {number} top + * @param {string} orderby + * @param {TfvcInterfaces.TfvcChangesetSearchCriteria} searchCriteria + */ + getChangesets(project?: string, maxChangeCount?: number, includeDetails?: boolean, includeWorkItems?: boolean, maxCommentLength?: number, includeSourceRename?: boolean, skip?: number, top?: number, orderby?: string, searchCriteria?: TfvcInterfaces.TfvcChangesetSearchCriteria): Promise; + /** + * @param {TfvcInterfaces.TfvcChangesetsRequestData} changesetsRequestData + */ + getBatchedChangesets(changesetsRequestData: TfvcInterfaces.TfvcChangesetsRequestData): Promise; + /** + * @param {number} id + */ + getChangesetWorkItems(id?: number): Promise; + /** + * Post for retrieving a set of items given a list of paths or a long path. Allows for specifying the recursionLevel and version descriptors for each path. + * + * @param {TfvcInterfaces.TfvcItemRequestData} itemRequestData + * @param {string} project - Project ID or project name + */ + getItemsBatch(itemRequestData: TfvcInterfaces.TfvcItemRequestData, project?: string): Promise; + /** + * Post for retrieving a set of items given a list of paths or a long path. Allows for specifying the recursionLevel and version descriptors for each path. + * + * @param {TfvcInterfaces.TfvcItemRequestData} itemRequestData + * @param {string} project - Project ID or project name + */ + getItemsBatchZip(itemRequestData: TfvcInterfaces.TfvcItemRequestData, project?: string): Promise; + /** + * Get Item Metadata and/or Content. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. + * + * @param {string} path + * @param {string} project - Project ID or project name + * @param {string} fileName + * @param {boolean} download + * @param {string} scopePath + * @param {TfvcInterfaces.VersionControlRecursionType} recursionLevel + * @param {TfvcInterfaces.TfvcVersionDescriptor} versionDescriptor + */ + getItem(path: string, project?: string, fileName?: string, download?: boolean, scopePath?: string, recursionLevel?: TfvcInterfaces.VersionControlRecursionType, versionDescriptor?: TfvcInterfaces.TfvcVersionDescriptor): Promise; + /** + * Get Item Metadata and/or Content. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. + * + * @param {string} path + * @param {string} project - Project ID or project name + * @param {string} fileName + * @param {boolean} download + * @param {string} scopePath + * @param {TfvcInterfaces.VersionControlRecursionType} recursionLevel + * @param {TfvcInterfaces.TfvcVersionDescriptor} versionDescriptor + */ + getItemContent(path: string, project?: string, fileName?: string, download?: boolean, scopePath?: string, recursionLevel?: TfvcInterfaces.VersionControlRecursionType, versionDescriptor?: TfvcInterfaces.TfvcVersionDescriptor): Promise; + /** + * Get a list of Tfvc items + * + * @param {string} project - Project ID or project name + * @param {string} scopePath + * @param {TfvcInterfaces.VersionControlRecursionType} recursionLevel + * @param {boolean} includeLinks + * @param {TfvcInterfaces.TfvcVersionDescriptor} versionDescriptor + */ + getItems(project?: string, scopePath?: string, recursionLevel?: TfvcInterfaces.VersionControlRecursionType, includeLinks?: boolean, versionDescriptor?: TfvcInterfaces.TfvcVersionDescriptor): Promise; + /** + * Get Item Metadata and/or Content. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. + * + * @param {string} path + * @param {string} project - Project ID or project name + * @param {string} fileName + * @param {boolean} download + * @param {string} scopePath + * @param {TfvcInterfaces.VersionControlRecursionType} recursionLevel + * @param {TfvcInterfaces.TfvcVersionDescriptor} versionDescriptor + */ + getItemText(path: string, project?: string, fileName?: string, download?: boolean, scopePath?: string, recursionLevel?: TfvcInterfaces.VersionControlRecursionType, versionDescriptor?: TfvcInterfaces.TfvcVersionDescriptor): Promise; + /** + * Get Item Metadata and/or Content. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. + * + * @param {string} path + * @param {string} project - Project ID or project name + * @param {string} fileName + * @param {boolean} download + * @param {string} scopePath + * @param {TfvcInterfaces.VersionControlRecursionType} recursionLevel + * @param {TfvcInterfaces.TfvcVersionDescriptor} versionDescriptor + */ + getItemZip(path: string, project?: string, fileName?: string, download?: boolean, scopePath?: string, recursionLevel?: TfvcInterfaces.VersionControlRecursionType, versionDescriptor?: TfvcInterfaces.TfvcVersionDescriptor): Promise; + /** + * Get items under a label. + * + * @param {string} labelId - Unique identifier of label + * @param {number} top - Max number of items to return + * @param {number} skip - Number of items to skip + */ + getLabelItems(labelId: string, top?: number, skip?: number): Promise; + /** + * Get a single deep label. + * + * @param {string} labelId - Unique identifier of label + * @param {TfvcInterfaces.TfvcLabelRequestData} requestData - maxItemCount + * @param {string} project - Project ID or project name + */ + getLabel(labelId: string, requestData: TfvcInterfaces.TfvcLabelRequestData, project?: string): Promise; + /** + * Get a collection of shallow label references. + * + * @param {TfvcInterfaces.TfvcLabelRequestData} requestData - labelScope, name, owner, and itemLabelFilter + * @param {string} project - Project ID or project name + * @param {number} top - Max number of labels to return + * @param {number} skip - Number of labels to skip + */ + getLabels(requestData: TfvcInterfaces.TfvcLabelRequestData, project?: string, top?: number, skip?: number): Promise; + /** + * Get changes included in a shelveset. + * + * @param {string} shelvesetId - Shelveset's unique ID + * @param {number} top - Max number of changes to return + * @param {number} skip - Number of changes to skip + */ + getShelvesetChanges(shelvesetId: string, top?: number, skip?: number): Promise; + /** + * Get a single deep shelveset. + * + * @param {string} shelvesetId - Shelveset's unique ID + * @param {TfvcInterfaces.TfvcShelvesetRequestData} requestData - includeDetails, includeWorkItems, maxChangeCount, and maxCommentLength + */ + getShelveset(shelvesetId: string, requestData: TfvcInterfaces.TfvcShelvesetRequestData): Promise; + /** + * Return a collection of shallow shelveset references. + * + * @param {TfvcInterfaces.TfvcShelvesetRequestData} requestData - name, owner, and maxCommentLength + * @param {number} top - Max number of shelvesets to return + * @param {number} skip - Number of shelvesets to skip + */ + getShelvesets(requestData: TfvcInterfaces.TfvcShelvesetRequestData, top?: number, skip?: number): Promise; + /** + * Get work items associated with a shelveset. + * + * @param {string} shelvesetId - Shelveset's unique ID + */ + getShelvesetWorkItems(shelvesetId: string): Promise; + } + +} +declare module 'vso-node-api/interfaces/WorkItemTrackingInterfaces' { + export interface AttachmentReference { + id: string; + url: string; + } + export interface FieldDependentRule extends WorkItemTrackingResource { + dependentFields: WorkItemFieldReference[]; + } + export interface FieldsToEvaluate { + fields: string[]; + fieldUpdates: { + [key: string]: any; + }; + fieldValues: { + [key: string]: any; + }; + rulesFrom: string[]; + } + export enum FieldType { + String = 0, + Integer = 1, + DateTime = 2, + PlainText = 3, + Html = 4, + TreePath = 5, + History = 6, + Double = 7, + Guid = 8, + Boolean = 9, + } + export enum FieldUsage { + None = 0, + WorkItem = 1, + WorkItemLink = 2, + Tree = 3, + WorkItemTypeExtension = 4, + } + export interface IdentityReference { + id: string; + name: string; + url: string; + } + export interface Link { + attributes: { + [key: string]: any; + }; + rel: string; + title: string; + url: string; + } + export enum LinkQueryMode { + WorkItems = 0, + LinksOneHopMustContain = 1, + LinksOneHopMayContain = 2, + LinksOneHopDoesNotContain = 3, + LinksRecursiveMustContain = 4, + LinksRecursiveMayContain = 5, + LinksRecursiveDoesNotContain = 6, + } + export enum LogicalOperation { + NONE = 0, + AND = 1, + OR = 2, + } + export interface ProjectReference { + id: string; + name: string; + url: string; + } + export enum ProvisioningActionType { + Import = 0, + Validate = 1, + } + export interface ProvisioningResult { + provisioningImportEvents: string[]; + } + export enum QueryExpand { + None = 0, + Wiql = 1, + Clauses = 2, + All = 3, + } + export interface QueryHierarchyItem extends WorkItemTrackingResource { + children: QueryHierarchyItem[]; + clauses: WorkItemQueryClause; + columns: WorkItemFieldReference[]; + filterOptions: LinkQueryMode; + hasChildren: boolean; + id: string; + isDeleted: boolean; + isFolder: boolean; + isInvalidSyntax: boolean; + isPublic: boolean; + linkClauses: WorkItemQueryClause; + name: string; + path: string; + queryType: QueryType; + sortColumns: WorkItemQuerySortColumn[]; + sourceClauses: WorkItemQueryClause; + targetClauses: WorkItemQueryClause; + wiql: string; + } + export enum QueryResultType { + WorkItem = 1, + WorkItemLink = 2, + } + export enum QueryType { + Flat = 1, + Tree = 2, + OneHop = 3, + } + export interface ReportingWorkItemLink { + changedDate: Date; + isActive: boolean; + rel: string; + sourceId: number; + targetId: number; + } + export interface ReportingWorkItemLinksBatch extends StreamedBatch { + } + export interface ReportingWorkItemRevisionsBatch extends StreamedBatch { + } + export interface ReportingWorkItemRevisionsFilter { + /** + * A list of fields to return in work item revisions. Omit this parameter to get all reportable fields. + */ + fields: string[]; + /** + * Return an identity reference instead of a string value for identity fields. + */ + includeIdentityRef: boolean; + /** + * A list of types to filter the results to specific work item types. Omit this parameter to get work item revisions of all work item types. + */ + types: string[]; + } + export interface StreamedBatch { + continuationToken: string; + isLastBatch: boolean; + nextLink: string; + values: T[]; + } + export enum TemplateType { + WorkItemType = 0, + GlobalWorkflow = 1, + } + export enum TreeNodeStructureType { + Area = 0, + Iteration = 1, + } + export enum TreeStructureGroup { + Areas = 0, + Iterations = 1, + } + export interface Wiql { + query: string; + } + export interface WitBatchRequest { + body: string; + headers: { + [key: string]: string; + }; + method: string; + uri: string; + } + export interface WitBatchResponse { + body: string; + code: number; + headers: { + [key: string]: string; + }; + } + export interface WorkItem extends WorkItemTrackingResource { + fields: { + [key: string]: any; + }; + id: number; + relations: WorkItemRelation[]; + rev: number; + } + export interface WorkItemClassificationNode extends WorkItemTrackingResource { + attributes: { + [key: string]: any; + }; + children: WorkItemClassificationNode[]; + id: number; + identifier: string; + name: string; + structureType: TreeNodeStructureType; + } + export interface WorkItemDelete extends WorkItemDeleteReference { + resource: WorkItem; + } + export interface WorkItemDeleteReference { + code: number; + deletedBy: string; + deletedDate: string; + id: number; + message: string; + name: string; + project: string; + type: string; + url: string; + } + export interface WorkItemDeleteUpdate { + isDeleted: boolean; + } + export enum WorkItemExpand { + None = 0, + Relations = 1, + Fields = 2, + All = 3, + } + export interface WorkItemField extends WorkItemTrackingResource { + name: string; + readOnly: boolean; + referenceName: string; + supportedOperations: WorkItemFieldOperation[]; + type: FieldType; + } + export interface WorkItemFieldOperation { + name: string; + referenceName: string; + } + export interface WorkItemFieldReference { + name: string; + referenceName: string; + url: string; + } + export interface WorkItemFieldUpdate { + newValue: any; + oldValue: any; + } + export interface WorkItemHistory extends WorkItemTrackingResource { + rev: number; + revisedBy: IdentityReference; + revisedDate: Date; + value: string; + } + export interface WorkItemLink { + rel: string; + source: WorkItemReference; + target: WorkItemReference; + } + export interface WorkItemQueryClause { + clauses: WorkItemQueryClause[]; + field: WorkItemFieldReference; + fieldValue: WorkItemFieldReference; + isFieldValue: boolean; + logicalOperator: LogicalOperation; + operator: WorkItemFieldOperation; + value: string; + } + export interface WorkItemQueryResult { + asOf: Date; + columns: WorkItemFieldReference[]; + queryResultType: QueryResultType; + queryType: QueryType; + sortColumns: WorkItemQuerySortColumn[]; + workItemRelations: WorkItemLink[]; + workItems: WorkItemReference[]; + } + export interface WorkItemQuerySortColumn { + descending: boolean; + field: WorkItemFieldReference; + } + export interface WorkItemReference { + id: number; + url: string; + } + export interface WorkItemRelation extends Link { + } + export interface WorkItemRelationType extends WorkItemTrackingReference { + attributes: { + [key: string]: any; + }; + } + export interface WorkItemRelationUpdates { + added: WorkItemRelation[]; + removed: WorkItemRelation[]; + updated: WorkItemRelation[]; + } + export interface WorkItemRevisionReference extends WorkItemReference { + rev: number; + } + export interface WorkItemTrackingReference extends WorkItemTrackingResource { + name: string; + referenceName: string; + } + export interface WorkItemTrackingResource extends WorkItemTrackingResourceReference { + _links: any; + } + export interface WorkItemTrackingResourceReference { + url: string; + } + export interface WorkItemType extends WorkItemTrackingResource { + description: string; + fields: WorkItemTypeFieldInstance[]; + name: string; + xmlForm: string; + } + export interface WorkItemTypeCategory extends WorkItemTrackingResource { + defaultWorkItemType: WorkItemTypeReference; + name: string; + referenceName: string; + workItemTypes: WorkItemTypeReference[]; + } + export interface WorkItemTypeFieldInstance { + field: WorkItemFieldReference; + helpText: string; + } + export interface WorkItemTypeReference extends WorkItemTrackingResourceReference { + name: string; + } + export interface WorkItemTypeTemplate { + template: string; + } + export interface WorkItemTypeTemplateUpdateModel { + actionType: ProvisioningActionType; + methodology: string; + template: string; + templateType: TemplateType; + } + export interface WorkItemUpdate extends WorkItemTrackingResourceReference { + fields: { + [key: string]: WorkItemFieldUpdate; + }; + id: number; + relations: WorkItemRelationUpdates; + rev: number; + revisedBy: IdentityReference; + revisedDate: Date; + workItemId: number; + } + export var TypeInfo: { + AttachmentReference: { + fields: any; + }; + FieldDependentRule: { + fields: any; + }; + FieldsToEvaluate: { + fields: any; + }; + FieldType: { + enumValues: { + "string": number; + "integer": number; + "dateTime": number; + "plainText": number; + "html": number; + "treePath": number; + "history": number; + "double": number; + "guid": number; + "boolean": number; + }; + }; + FieldUsage: { + enumValues: { + "none": number; + "workItem": number; + "workItemLink": number; + "tree": number; + "workItemTypeExtension": number; + }; + }; + IdentityReference: { + fields: any; + }; + Link: { + fields: any; + }; + LinkQueryMode: { + enumValues: { + "workItems": number; + "linksOneHopMustContain": number; + "linksOneHopMayContain": number; + "linksOneHopDoesNotContain": number; + "linksRecursiveMustContain": number; + "linksRecursiveMayContain": number; + "linksRecursiveDoesNotContain": number; + }; + }; + LogicalOperation: { + enumValues: { + "nONE": number; + "aND": number; + "oR": number; + }; + }; + ProjectReference: { + fields: any; + }; + ProvisioningActionType: { + enumValues: { + "import": number; + "validate": number; + }; + }; + ProvisioningResult: { + fields: any; + }; + QueryExpand: { + enumValues: { + "none": number; + "wiql": number; + "clauses": number; + "all": number; + }; + }; + QueryHierarchyItem: { + fields: any; + }; + QueryResultType: { + enumValues: { + "workItem": number; + "workItemLink": number; + }; + }; + QueryType: { + enumValues: { + "flat": number; + "tree": number; + "oneHop": number; + }; + }; + ReportingWorkItemLink: { + fields: any; + }; + ReportingWorkItemLinksBatch: { + fields: any; + }; + ReportingWorkItemRevisionsBatch: { + fields: any; + }; + ReportingWorkItemRevisionsFilter: { + fields: any; + }; + StreamedBatch: { + fields: any; + }; + TemplateType: { + enumValues: { + "workItemType": number; + "globalWorkflow": number; + }; + }; + TreeNodeStructureType: { + enumValues: { + "area": number; + "iteration": number; + }; + }; + TreeStructureGroup: { + enumValues: { + "areas": number; + "iterations": number; + }; + }; + Wiql: { + fields: any; + }; + WitBatchRequest: { + fields: any; + }; + WitBatchResponse: { + fields: any; + }; + WorkItem: { + fields: any; + }; + WorkItemClassificationNode: { + fields: any; + }; + WorkItemDelete: { + fields: any; + }; + WorkItemDeleteReference: { + fields: any; + }; + WorkItemDeleteUpdate: { + fields: any; + }; + WorkItemExpand: { + enumValues: { + "none": number; + "relations": number; + "fields": number; + "all": number; + }; + }; + WorkItemField: { + fields: any; + }; + WorkItemFieldOperation: { + fields: any; + }; + WorkItemFieldReference: { + fields: any; + }; + WorkItemFieldUpdate: { + fields: any; + }; + WorkItemHistory: { + fields: any; + }; + WorkItemLink: { + fields: any; + }; + WorkItemQueryClause: { + fields: any; + }; + WorkItemQueryResult: { + fields: any; + }; + WorkItemQuerySortColumn: { + fields: any; + }; + WorkItemReference: { + fields: any; + }; + WorkItemRelation: { + fields: any; + }; + WorkItemRelationType: { + fields: any; + }; + WorkItemRelationUpdates: { + fields: any; + }; + WorkItemRevisionReference: { + fields: any; + }; + WorkItemTrackingReference: { + fields: any; + }; + WorkItemTrackingResource: { + fields: any; + }; + WorkItemTrackingResourceReference: { + fields: any; + }; + WorkItemType: { + fields: any; + }; + WorkItemTypeCategory: { + fields: any; + }; + WorkItemTypeFieldInstance: { + fields: any; + }; + WorkItemTypeReference: { + fields: any; + }; + WorkItemTypeTemplate: { + fields: any; + }; + WorkItemTypeTemplateUpdateModel: { + fields: any; + }; + WorkItemUpdate: { + fields: any; + }; + }; + +} +declare module 'vso-node-api/WorkItemTrackingApi' { + + + import Q = require('q'); + import basem = require('vso-node-api/ClientApiBases'); + import VsoBaseInterfaces = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); + import TfsCoreInterfaces = require('vso-node-api/interfaces/CoreInterfaces'); + import VSSInterfaces = require('vso-node-api/interfaces/common/VSSInterfaces'); + import WorkItemTrackingInterfaces = require('vso-node-api/interfaces/WorkItemTrackingInterfaces'); + export interface IWorkItemTrackingApi extends basem.ClientApiBase { + createAttachment(customHeaders: any, contentStream: NodeJS.ReadableStream, fileName: string, uploadType: string, onResult: (err: any, statusCode: number, attachment: WorkItemTrackingInterfaces.AttachmentReference) => void): void; + getAttachmentContent(id: string, fileName: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + getAttachmentZip(id: string, fileName: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + getRootNodes(project: string, depth: number, onResult: (err: any, statusCode: number, classificationNodes: WorkItemTrackingInterfaces.WorkItemClassificationNode[]) => void): void; + createOrUpdateClassificationNode(postedNode: WorkItemTrackingInterfaces.WorkItemClassificationNode, project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path: string, onResult: (err: any, statusCode: number, classificationNode: WorkItemTrackingInterfaces.WorkItemClassificationNode) => void): void; + deleteClassificationNode(project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path: string, reclassifyId: number, onResult: (err: any, statusCode: number) => void): void; + getClassificationNode(project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path: string, depth: number, onResult: (err: any, statusCode: number, classificationNode: WorkItemTrackingInterfaces.WorkItemClassificationNode) => void): void; + updateClassificationNode(postedNode: WorkItemTrackingInterfaces.WorkItemClassificationNode, project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path: string, onResult: (err: any, statusCode: number, classificationNode: WorkItemTrackingInterfaces.WorkItemClassificationNode) => void): void; + getField(field: string, onResult: (err: any, statusCode: number, field: WorkItemTrackingInterfaces.WorkItemField) => void): void; + getFields(onResult: (err: any, statusCode: number, fields: WorkItemTrackingInterfaces.WorkItemField[]) => void): void; + getHistory(id: number, top: number, skip: number, onResult: (err: any, statusCode: number, history: WorkItemTrackingInterfaces.WorkItemHistory[]) => void): void; + getHistoryById(id: number, revisionNumber: number, onResult: (err: any, statusCode: number, history: WorkItemTrackingInterfaces.WorkItemHistory) => void): void; + createQuery(postedQuery: WorkItemTrackingInterfaces.QueryHierarchyItem, project: string, query: string, onResult: (err: any, statusCode: number, querie: WorkItemTrackingInterfaces.QueryHierarchyItem) => void): void; + deleteQuery(project: string, query: string, onResult: (err: any, statusCode: number) => void): void; + getQueries(project: string, expand: WorkItemTrackingInterfaces.QueryExpand, depth: number, includeDeleted: boolean, onResult: (err: any, statusCode: number, queries: WorkItemTrackingInterfaces.QueryHierarchyItem[]) => void): void; + getQuery(project: string, query: string, expand: WorkItemTrackingInterfaces.QueryExpand, depth: number, includeDeleted: boolean, onResult: (err: any, statusCode: number, querie: WorkItemTrackingInterfaces.QueryHierarchyItem) => void): void; + updateQuery(queryUpdate: WorkItemTrackingInterfaces.QueryHierarchyItem, project: string, query: string, undeleteDescendants: boolean, onResult: (err: any, statusCode: number, querie: WorkItemTrackingInterfaces.QueryHierarchyItem) => void): void; + destroyWorkItem(id: number, project: string, onResult: (err: any, statusCode: number) => void): void; + getDeletedWorkItem(id: number, project: string, onResult: (err: any, statusCode: number, recyclebin: WorkItemTrackingInterfaces.WorkItemDelete) => void): void; + getDeletedWorkItems(project: string, ids: number[], onResult: (err: any, statusCode: number, recyclebin: WorkItemTrackingInterfaces.WorkItemDeleteReference[]) => void): void; + restoreWorkItem(payload: WorkItemTrackingInterfaces.WorkItemDeleteUpdate, id: number, project: string, onResult: (err: any, statusCode: number, recyclebin: WorkItemTrackingInterfaces.WorkItemDelete) => void): void; + getRevision(id: number, revisionNumber: number, expand: WorkItemTrackingInterfaces.WorkItemExpand, onResult: (err: any, statusCode: number, revision: WorkItemTrackingInterfaces.WorkItem) => void): void; + getRevisions(id: number, top: number, skip: number, expand: WorkItemTrackingInterfaces.WorkItemExpand, onResult: (err: any, statusCode: number, revisions: WorkItemTrackingInterfaces.WorkItem[]) => void): void; + evaluateRulesOnField(ruleEngineInput: WorkItemTrackingInterfaces.FieldsToEvaluate, onResult: (err: any, statusCode: number) => void): void; + getUpdate(id: number, updateNumber: number, onResult: (err: any, statusCode: number, update: WorkItemTrackingInterfaces.WorkItemUpdate) => void): void; + getUpdates(id: number, top: number, skip: number, onResult: (err: any, statusCode: number, updates: WorkItemTrackingInterfaces.WorkItemUpdate[]) => void): void; + queryByWiql(wiql: WorkItemTrackingInterfaces.Wiql, teamContext: TfsCoreInterfaces.TeamContext, timePrecision: boolean, onResult: (err: any, statusCode: number, wiql: WorkItemTrackingInterfaces.WorkItemQueryResult) => void): void; + queryById(id: string, teamContext: TfsCoreInterfaces.TeamContext, timePrecision: boolean, onResult: (err: any, statusCode: number, wiql: WorkItemTrackingInterfaces.WorkItemQueryResult) => void): void; + getReportingLinks(project: string, types: string[], continuationToken: string, startDateTime: Date, onResult: (err: any, statusCode: number, workItemLink: WorkItemTrackingInterfaces.ReportingWorkItemLinksBatch) => void): void; + getRelationType(relation: string, onResult: (err: any, statusCode: number, workItemRelationType: WorkItemTrackingInterfaces.WorkItemRelationType) => void): void; + getRelationTypes(onResult: (err: any, statusCode: number, workItemRelationTypes: WorkItemTrackingInterfaces.WorkItemRelationType[]) => void): void; + readReportingRevisionsGet(project: string, fields: string[], types: string[], continuationToken: string, startDateTime: Date, includeIdentityRef: boolean, includeDeleted: boolean, includeTagRef: boolean, onResult: (err: any, statusCode: number, workItemRevision: WorkItemTrackingInterfaces.ReportingWorkItemRevisionsBatch) => void): void; + readReportingRevisionsPost(filter: WorkItemTrackingInterfaces.ReportingWorkItemRevisionsFilter, project: string, continuationToken: string, startDateTime: Date, onResult: (err: any, statusCode: number, workItemRevision: WorkItemTrackingInterfaces.ReportingWorkItemRevisionsBatch) => void): void; + deleteWorkItem(id: number, destroy: boolean, onResult: (err: any, statusCode: number, workItem: WorkItemTrackingInterfaces.WorkItemDelete) => void): void; + getWorkItem(id: number, fields: string[], asOf: Date, expand: WorkItemTrackingInterfaces.WorkItemExpand, onResult: (err: any, statusCode: number, workItem: WorkItemTrackingInterfaces.WorkItem) => void): void; + getWorkItems(ids: number[], fields: string[], asOf: Date, expand: WorkItemTrackingInterfaces.WorkItemExpand, onResult: (err: any, statusCode: number, workItems: WorkItemTrackingInterfaces.WorkItem[]) => void): void; + updateWorkItem(customHeaders: any, document: VSSInterfaces.JsonPatchDocument, id: number, validateOnly: boolean, bypassRules: boolean, onResult: (err: any, statusCode: number, workItem: WorkItemTrackingInterfaces.WorkItem) => void): void; + createWorkItem(customHeaders: any, document: VSSInterfaces.JsonPatchDocument, project: string, type: string, validateOnly: boolean, bypassRules: boolean, onResult: (err: any, statusCode: number, workItem: WorkItemTrackingInterfaces.WorkItem) => void): void; + getWorkItemTemplate(project: string, type: string, fields: string, asOf: Date, expand: WorkItemTrackingInterfaces.WorkItemExpand, onResult: (err: any, statusCode: number, workItem: WorkItemTrackingInterfaces.WorkItem) => void): void; + getWorkItemTypeCategories(project: string, onResult: (err: any, statusCode: number, workItemTypeCategories: WorkItemTrackingInterfaces.WorkItemTypeCategory[]) => void): void; + getWorkItemTypeCategory(project: string, category: string, onResult: (err: any, statusCode: number, workItemTypeCategorie: WorkItemTrackingInterfaces.WorkItemTypeCategory) => void): void; + getWorkItemType(project: string, type: string, onResult: (err: any, statusCode: number, workItemType: WorkItemTrackingInterfaces.WorkItemType) => void): void; + getWorkItemTypes(project: string, onResult: (err: any, statusCode: number, workItemTypes: WorkItemTrackingInterfaces.WorkItemType[]) => void): void; + getDependentFields(project: string, type: string, field: string, onResult: (err: any, statusCode: number, workItemTypesField: WorkItemTrackingInterfaces.FieldDependentRule) => void): void; + exportWorkItemTypeDefinition(project: string, type: string, exportGlobalLists: boolean, onResult: (err: any, statusCode: number, workItemTypeTemplate: WorkItemTrackingInterfaces.WorkItemTypeTemplate) => void): void; + updateWorkItemTypeDefinition(updateModel: WorkItemTrackingInterfaces.WorkItemTypeTemplateUpdateModel, project: string, onResult: (err: any, statusCode: number, workItemTypeTemplate: WorkItemTrackingInterfaces.ProvisioningResult) => void): void; + } + export interface IQWorkItemTrackingApi extends basem.QClientApiBase { + createAttachment(customHeaders: any, contentStream: NodeJS.ReadableStream, fileName?: string, uploadType?: string): Promise; + getAttachmentContent(id: string, fileName?: string): Promise; + getAttachmentZip(id: string, fileName?: string): Promise; + getRootNodes(project: string, depth?: number): Promise; + createOrUpdateClassificationNode(postedNode: WorkItemTrackingInterfaces.WorkItemClassificationNode, project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path?: string): Promise; + deleteClassificationNode(project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path?: string, reclassifyId?: number): Promise; + getClassificationNode(project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path?: string, depth?: number): Promise; + updateClassificationNode(postedNode: WorkItemTrackingInterfaces.WorkItemClassificationNode, project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path?: string): Promise; + getField(field: string): Promise; + getFields(): Promise; + getHistory(id: number, top?: number, skip?: number): Promise; + getHistoryById(id: number, revisionNumber: number): Promise; + createQuery(postedQuery: WorkItemTrackingInterfaces.QueryHierarchyItem, project: string, query: string): Promise; + deleteQuery(project: string, query: string): Promise; + getQueries(project: string, expand?: WorkItemTrackingInterfaces.QueryExpand, depth?: number, includeDeleted?: boolean): Promise; + getQuery(project: string, query: string, expand?: WorkItemTrackingInterfaces.QueryExpand, depth?: number, includeDeleted?: boolean): Promise; + updateQuery(queryUpdate: WorkItemTrackingInterfaces.QueryHierarchyItem, project: string, query: string, undeleteDescendants?: boolean): Promise; + destroyWorkItem(id: number, project?: string): Promise; + getDeletedWorkItem(id: number, project?: string): Promise; + getDeletedWorkItems(project?: string, ids?: number[]): Promise; + restoreWorkItem(payload: WorkItemTrackingInterfaces.WorkItemDeleteUpdate, id: number, project?: string): Promise; + getRevision(id: number, revisionNumber: number, expand?: WorkItemTrackingInterfaces.WorkItemExpand): Promise; + getRevisions(id: number, top?: number, skip?: number, expand?: WorkItemTrackingInterfaces.WorkItemExpand): Promise; + evaluateRulesOnField(ruleEngineInput: WorkItemTrackingInterfaces.FieldsToEvaluate): Promise; + getUpdate(id: number, updateNumber: number): Promise; + getUpdates(id: number, top?: number, skip?: number): Promise; + queryByWiql(wiql: WorkItemTrackingInterfaces.Wiql, teamContext?: TfsCoreInterfaces.TeamContext, timePrecision?: boolean): Promise; + queryById(id: string, teamContext?: TfsCoreInterfaces.TeamContext, timePrecision?: boolean): Promise; + getReportingLinks(project?: string, types?: string[], continuationToken?: string, startDateTime?: Date): Promise; + getRelationType(relation: string): Promise; + getRelationTypes(): Promise; + readReportingRevisionsGet(project?: string, fields?: string[], types?: string[], continuationToken?: string, startDateTime?: Date, includeIdentityRef?: boolean, includeDeleted?: boolean, includeTagRef?: boolean): Promise; + readReportingRevisionsPost(filter: WorkItemTrackingInterfaces.ReportingWorkItemRevisionsFilter, project?: string, continuationToken?: string, startDateTime?: Date): Promise; + deleteWorkItem(id: number, destroy?: boolean): Promise; + getWorkItem(id: number, fields?: string[], asOf?: Date, expand?: WorkItemTrackingInterfaces.WorkItemExpand): Promise; + getWorkItems(ids: number[], fields?: string[], asOf?: Date, expand?: WorkItemTrackingInterfaces.WorkItemExpand): Promise; + updateWorkItem(customHeaders: any, document: VSSInterfaces.JsonPatchDocument, id: number, validateOnly?: boolean, bypassRules?: boolean): Promise; + createWorkItem(customHeaders: any, document: VSSInterfaces.JsonPatchDocument, project: string, type: string, validateOnly?: boolean, bypassRules?: boolean): Promise; + getWorkItemTemplate(project: string, type: string, fields?: string, asOf?: Date, expand?: WorkItemTrackingInterfaces.WorkItemExpand): Promise; + getWorkItemTypeCategories(project: string): Promise; + getWorkItemTypeCategory(project: string, category: string): Promise; + getWorkItemType(project: string, type: string): Promise; + getWorkItemTypes(project: string): Promise; + getDependentFields(project: string, type: string, field: string): Promise; + exportWorkItemTypeDefinition(project?: string, type?: string, exportGlobalLists?: boolean): Promise; + updateWorkItemTypeDefinition(updateModel: WorkItemTrackingInterfaces.WorkItemTypeTemplateUpdateModel, project?: string): Promise; + } + export class WorkItemTrackingApi extends basem.ClientApiBase implements IWorkItemTrackingApi { + constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); + /** + * Creates an attachment. + * + * @param {NodeJS.ReadableStream} contentStream - Content to upload + * @param {string} fileName + * @param {string} uploadType + * @param onResult callback function with the resulting WorkItemTrackingInterfaces.AttachmentReference + */ + createAttachment(customHeaders: VsoBaseInterfaces.IHeaders, contentStream: NodeJS.ReadableStream, fileName: string, uploadType: string, onResult: (err: any, statusCode: number, attachment: WorkItemTrackingInterfaces.AttachmentReference) => void): void; + /** + * Returns an attachment + * + * @param {string} id + * @param {string} fileName + * @param onResult callback function with the resulting ArrayBuffer + */ + getAttachmentContent(id: string, fileName: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + /** + * Returns an attachment + * + * @param {string} id + * @param {string} fileName + * @param onResult callback function with the resulting ArrayBuffer + */ + getAttachmentZip(id: string, fileName: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {number} depth + * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemClassificationNode[] + */ + getRootNodes(project: string, depth: number, onResult: (err: any, statusCode: number, classificationNodes: WorkItemTrackingInterfaces.WorkItemClassificationNode[]) => void): void; + /** + * @param {WorkItemTrackingInterfaces.WorkItemClassificationNode} postedNode + * @param {string} project - Project ID or project name + * @param {WorkItemTrackingInterfaces.TreeStructureGroup} structureGroup + * @param {string} path + * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemClassificationNode + */ + createOrUpdateClassificationNode(postedNode: WorkItemTrackingInterfaces.WorkItemClassificationNode, project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path: string, onResult: (err: any, statusCode: number, classificationNode: WorkItemTrackingInterfaces.WorkItemClassificationNode) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {WorkItemTrackingInterfaces.TreeStructureGroup} structureGroup + * @param {string} path + * @param {number} reclassifyId + * @param onResult callback function + */ + deleteClassificationNode(project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path: string, reclassifyId: number, onResult: (err: any, statusCode: number) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {WorkItemTrackingInterfaces.TreeStructureGroup} structureGroup + * @param {string} path + * @param {number} depth + * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemClassificationNode + */ + getClassificationNode(project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path: string, depth: number, onResult: (err: any, statusCode: number, classificationNode: WorkItemTrackingInterfaces.WorkItemClassificationNode) => void): void; + /** + * @param {WorkItemTrackingInterfaces.WorkItemClassificationNode} postedNode + * @param {string} project - Project ID or project name + * @param {WorkItemTrackingInterfaces.TreeStructureGroup} structureGroup + * @param {string} path + * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemClassificationNode + */ + updateClassificationNode(postedNode: WorkItemTrackingInterfaces.WorkItemClassificationNode, project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path: string, onResult: (err: any, statusCode: number, classificationNode: WorkItemTrackingInterfaces.WorkItemClassificationNode) => void): void; + /** + * @param {string} field + * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemField + */ + getField(field: string, onResult: (err: any, statusCode: number, field: WorkItemTrackingInterfaces.WorkItemField) => void): void; + /** + * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemField[] + */ + getFields(onResult: (err: any, statusCode: number, fields: WorkItemTrackingInterfaces.WorkItemField[]) => void): void; + /** + * Returns history of all revision for a given work item ID + * + * @param {number} id + * @param {number} top + * @param {number} skip + * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemHistory[] + */ + getHistory(id: number, top: number, skip: number, onResult: (err: any, statusCode: number, history: WorkItemTrackingInterfaces.WorkItemHistory[]) => void): void; + /** + * Returns the history value of particular revision + * + * @param {number} id + * @param {number} revisionNumber + * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemHistory + */ + getHistoryById(id: number, revisionNumber: number, onResult: (err: any, statusCode: number, history: WorkItemTrackingInterfaces.WorkItemHistory) => void): void; + /** + * Creates a query, or moves a query. + * + * @param {WorkItemTrackingInterfaces.QueryHierarchyItem} postedQuery - The query to create. + * @param {string} project - Project ID or project name + * @param {string} query - The parent path for the query to create. + * @param onResult callback function with the resulting WorkItemTrackingInterfaces.QueryHierarchyItem + */ + createQuery(postedQuery: WorkItemTrackingInterfaces.QueryHierarchyItem, project: string, query: string, onResult: (err: any, statusCode: number, querie: WorkItemTrackingInterfaces.QueryHierarchyItem) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {string} query + * @param onResult callback function + */ + deleteQuery(project: string, query: string, onResult: (err: any, statusCode: number) => void): void; + /** + * Retrieves all queries the user has access to in the current project + * + * @param {string} project - Project ID or project name + * @param {WorkItemTrackingInterfaces.QueryExpand} expand + * @param {number} depth + * @param {boolean} includeDeleted + * @param onResult callback function with the resulting WorkItemTrackingInterfaces.QueryHierarchyItem[] + */ + getQueries(project: string, expand: WorkItemTrackingInterfaces.QueryExpand, depth: number, includeDeleted: boolean, onResult: (err: any, statusCode: number, queries: WorkItemTrackingInterfaces.QueryHierarchyItem[]) => void): void; + /** + * Retrieves a single query by project and either id or path + * + * @param {string} project - Project ID or project name + * @param {string} query + * @param {WorkItemTrackingInterfaces.QueryExpand} expand + * @param {number} depth + * @param {boolean} includeDeleted + * @param onResult callback function with the resulting WorkItemTrackingInterfaces.QueryHierarchyItem + */ + getQuery(project: string, query: string, expand: WorkItemTrackingInterfaces.QueryExpand, depth: number, includeDeleted: boolean, onResult: (err: any, statusCode: number, querie: WorkItemTrackingInterfaces.QueryHierarchyItem) => void): void; + /** + * @param {WorkItemTrackingInterfaces.QueryHierarchyItem} queryUpdate + * @param {string} project - Project ID or project name + * @param {string} query + * @param {boolean} undeleteDescendants + * @param onResult callback function with the resulting WorkItemTrackingInterfaces.QueryHierarchyItem + */ + updateQuery(queryUpdate: WorkItemTrackingInterfaces.QueryHierarchyItem, project: string, query: string, undeleteDescendants: boolean, onResult: (err: any, statusCode: number, querie: WorkItemTrackingInterfaces.QueryHierarchyItem) => void): void; + /** + * @param {number} id + * @param {string} project - Project ID or project name + * @param onResult callback function + */ + destroyWorkItem(id: number, project: string, onResult: (err: any, statusCode: number) => void): void; + /** + * @param {number} id + * @param {string} project - Project ID or project name + * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemDelete + */ + getDeletedWorkItem(id: number, project: string, onResult: (err: any, statusCode: number, recyclebin: WorkItemTrackingInterfaces.WorkItemDelete) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {number[]} ids + * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemDeleteReference[] + */ + getDeletedWorkItems(project: string, ids: number[], onResult: (err: any, statusCode: number, recyclebin: WorkItemTrackingInterfaces.WorkItemDeleteReference[]) => void): void; + /** + * @param {WorkItemTrackingInterfaces.WorkItemDeleteUpdate} payload + * @param {number} id + * @param {string} project - Project ID or project name + * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemDelete + */ + restoreWorkItem(payload: WorkItemTrackingInterfaces.WorkItemDeleteUpdate, id: number, project: string, onResult: (err: any, statusCode: number, recyclebin: WorkItemTrackingInterfaces.WorkItemDelete) => void): void; + /** + * Returns a fully hydrated work item for the requested revision + * + * @param {number} id + * @param {number} revisionNumber + * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand + * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItem + */ + getRevision(id: number, revisionNumber: number, expand: WorkItemTrackingInterfaces.WorkItemExpand, onResult: (err: any, statusCode: number, revision: WorkItemTrackingInterfaces.WorkItem) => void): void; + /** + * Returns the list of fully hydrated work item revisions, paged. + * + * @param {number} id + * @param {number} top + * @param {number} skip + * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand + * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItem[] + */ + getRevisions(id: number, top: number, skip: number, expand: WorkItemTrackingInterfaces.WorkItemExpand, onResult: (err: any, statusCode: number, revisions: WorkItemTrackingInterfaces.WorkItem[]) => void): void; + /** + * Validates the fields values. + * + * @param {WorkItemTrackingInterfaces.FieldsToEvaluate} ruleEngineInput + * @param onResult callback function + */ + evaluateRulesOnField(ruleEngineInput: WorkItemTrackingInterfaces.FieldsToEvaluate, onResult: (err: any, statusCode: number) => void): void; + /** + * Returns a single update for a work item + * + * @param {number} id + * @param {number} updateNumber + * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemUpdate + */ + getUpdate(id: number, updateNumber: number, onResult: (err: any, statusCode: number, update: WorkItemTrackingInterfaces.WorkItemUpdate) => void): void; + /** + * Returns a the deltas between work item revisions + * + * @param {number} id + * @param {number} top + * @param {number} skip + * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemUpdate[] + */ + getUpdates(id: number, top: number, skip: number, onResult: (err: any, statusCode: number, updates: WorkItemTrackingInterfaces.WorkItemUpdate[]) => void): void; + /** + * Gets the results of the query. + * + * @param {WorkItemTrackingInterfaces.Wiql} wiql - The query containing the wiql. + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {boolean} timePrecision + * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemQueryResult + */ + queryByWiql(wiql: WorkItemTrackingInterfaces.Wiql, teamContext: TfsCoreInterfaces.TeamContext, timePrecision: boolean, onResult: (err: any, statusCode: number, wiql: WorkItemTrackingInterfaces.WorkItemQueryResult) => void): void; + /** + * Gets the results of the query by id. + * + * @param {string} id - The query id. + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {boolean} timePrecision + * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemQueryResult + */ + queryById(id: string, teamContext: TfsCoreInterfaces.TeamContext, timePrecision: boolean, onResult: (err: any, statusCode: number, wiql: WorkItemTrackingInterfaces.WorkItemQueryResult) => void): void; + /** + * Get a batch of work item links + * + * @param {string} project - Project ID or project name + * @param {string[]} types - A list of types to filter the results to specific work item types. Omit this parameter to get work item links of all work item types. + * @param {string} continuationToken - Specifies the continuationToken to start the batch from. Omit this parameter to get the first batch of links. + * @param {Date} startDateTime - Date/time to use as a starting point for link changes. Only link changes that occurred after that date/time will be returned. Cannot be used in conjunction with 'watermark' parameter. + * @param onResult callback function with the resulting WorkItemTrackingInterfaces.ReportingWorkItemLinksBatch + */ + getReportingLinks(project: string, types: string[], continuationToken: string, startDateTime: Date, onResult: (err: any, statusCode: number, workItemLink: WorkItemTrackingInterfaces.ReportingWorkItemLinksBatch) => void): void; + /** + * Gets the work item relation types. + * + * @param {string} relation + * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemRelationType + */ + getRelationType(relation: string, onResult: (err: any, statusCode: number, workItemRelationType: WorkItemTrackingInterfaces.WorkItemRelationType) => void): void; + /** + * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemRelationType[] + */ + getRelationTypes(onResult: (err: any, statusCode: number, workItemRelationTypes: WorkItemTrackingInterfaces.WorkItemRelationType[]) => void): void; + /** + * Get a batch of work item revisions with the option of including deleted items + * + * @param {string} project - Project ID or project name + * @param {string[]} fields - A list of fields to return in work item revisions. Omit this parameter to get all reportable fields. + * @param {string[]} types - A list of types to filter the results to specific work item types. Omit this parameter to get work item revisions of all work item types. + * @param {string} continuationToken - Specifies the watermark to start the batch from. Omit this parameter to get the first batch of revisions. + * @param {Date} startDateTime - Date/time to use as a starting point for revisions, all revisions will occur after this date/time. Cannot be used in conjunction with 'watermark' parameter. + * @param {boolean} includeIdentityRef - Return an identity reference instead of a string value for identity fields. + * @param {boolean} includeDeleted - Specify if the deleted item should be returned. + * @param {boolean} includeTagRef - Specify if the tag objects should be returned for System.Tags field. + * @param onResult callback function with the resulting WorkItemTrackingInterfaces.ReportingWorkItemRevisionsBatch + */ + readReportingRevisionsGet(project: string, fields: string[], types: string[], continuationToken: string, startDateTime: Date, includeIdentityRef: boolean, includeDeleted: boolean, includeTagRef: boolean, onResult: (err: any, statusCode: number, workItemRevision: WorkItemTrackingInterfaces.ReportingWorkItemRevisionsBatch) => void): void; + /** + * Get a batch of work item revisions + * + * @param {WorkItemTrackingInterfaces.ReportingWorkItemRevisionsFilter} filter - An object that contains request settings: field filter, type filter, identity format + * @param {string} project - Project ID or project name + * @param {string} continuationToken - Specifies the watermark to start the batch from. Omit this parameter to get the first batch of revisions. + * @param {Date} startDateTime - Date/time to use as a starting point for revisions, all revisions will occur after this date/time. Cannot be used in conjunction with 'watermark' parameter. + * @param onResult callback function with the resulting WorkItemTrackingInterfaces.ReportingWorkItemRevisionsBatch + */ + readReportingRevisionsPost(filter: WorkItemTrackingInterfaces.ReportingWorkItemRevisionsFilter, project: string, continuationToken: string, startDateTime: Date, onResult: (err: any, statusCode: number, workItemRevision: WorkItemTrackingInterfaces.ReportingWorkItemRevisionsBatch) => void): void; + /** + * @param {number} id + * @param {boolean} destroy + * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemDelete + */ + deleteWorkItem(id: number, destroy: boolean, onResult: (err: any, statusCode: number, workItem: WorkItemTrackingInterfaces.WorkItemDelete) => void): void; + /** + * Returns a single work item + * + * @param {number} id + * @param {string[]} fields + * @param {Date} asOf + * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand + * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItem + */ + getWorkItem(id: number, fields: string[], asOf: Date, expand: WorkItemTrackingInterfaces.WorkItemExpand, onResult: (err: any, statusCode: number, workItem: WorkItemTrackingInterfaces.WorkItem) => void): void; + /** + * Returns a list of work items + * + * @param {number[]} ids + * @param {string[]} fields + * @param {Date} asOf + * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand + * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItem[] + */ + getWorkItems(ids: number[], fields: string[], asOf: Date, expand: WorkItemTrackingInterfaces.WorkItemExpand, onResult: (err: any, statusCode: number, workItems: WorkItemTrackingInterfaces.WorkItem[]) => void): void; + /** + * @param {VSSInterfaces.JsonPatchDocument} document + * @param {number} id + * @param {boolean} validateOnly + * @param {boolean} bypassRules + * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItem + */ + updateWorkItem(customHeaders: VsoBaseInterfaces.IHeaders, document: VSSInterfaces.JsonPatchDocument, id: number, validateOnly: boolean, bypassRules: boolean, onResult: (err: any, statusCode: number, workItem: WorkItemTrackingInterfaces.WorkItem) => void): void; + /** + * @param {VSSInterfaces.JsonPatchDocument} document + * @param {string} project - Project ID or project name + * @param {string} type + * @param {boolean} validateOnly + * @param {boolean} bypassRules + * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItem + */ + createWorkItem(customHeaders: VsoBaseInterfaces.IHeaders, document: VSSInterfaces.JsonPatchDocument, project: string, type: string, validateOnly: boolean, bypassRules: boolean, onResult: (err: any, statusCode: number, workItem: WorkItemTrackingInterfaces.WorkItem) => void): void; + /** + * Returns a single work item from a template + * + * @param {string} project - Project ID or project name + * @param {string} type + * @param {string} fields + * @param {Date} asOf + * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand + * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItem + */ + getWorkItemTemplate(project: string, type: string, fields: string, asOf: Date, expand: WorkItemTrackingInterfaces.WorkItemExpand, onResult: (err: any, statusCode: number, workItem: WorkItemTrackingInterfaces.WorkItem) => void): void; + /** + * @param {string} project - Project ID or project name + * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemTypeCategory[] + */ + getWorkItemTypeCategories(project: string, onResult: (err: any, statusCode: number, workItemTypeCategories: WorkItemTrackingInterfaces.WorkItemTypeCategory[]) => void): void; + /** + * Returns a the deltas between work item revisions + * + * @param {string} project - Project ID or project name + * @param {string} category + * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemTypeCategory + */ + getWorkItemTypeCategory(project: string, category: string, onResult: (err: any, statusCode: number, workItemTypeCategorie: WorkItemTrackingInterfaces.WorkItemTypeCategory) => void): void; + /** + * Returns a the deltas between work item revisions + * + * @param {string} project - Project ID or project name + * @param {string} type + * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemType + */ + getWorkItemType(project: string, type: string, onResult: (err: any, statusCode: number, workItemType: WorkItemTrackingInterfaces.WorkItemType) => void): void; + /** + * @param {string} project - Project ID or project name + * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemType[] + */ + getWorkItemTypes(project: string, onResult: (err: any, statusCode: number, workItemTypes: WorkItemTrackingInterfaces.WorkItemType[]) => void): void; + /** + * Returns the dependent fields for the corresponding workitem type and fieldname + * + * @param {string} project - Project ID or project name + * @param {string} type + * @param {string} field + * @param onResult callback function with the resulting WorkItemTrackingInterfaces.FieldDependentRule + */ + getDependentFields(project: string, type: string, field: string, onResult: (err: any, statusCode: number, workItemTypesField: WorkItemTrackingInterfaces.FieldDependentRule) => void): void; + /** + * Export work item type + * + * @param {string} project - Project ID or project name + * @param {string} type + * @param {boolean} exportGlobalLists + * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemTypeTemplate + */ + exportWorkItemTypeDefinition(project: string, type: string, exportGlobalLists: boolean, onResult: (err: any, statusCode: number, workItemTypeTemplate: WorkItemTrackingInterfaces.WorkItemTypeTemplate) => void): void; + /** + * Add/updates a work item type + * + * @param {WorkItemTrackingInterfaces.WorkItemTypeTemplateUpdateModel} updateModel + * @param {string} project - Project ID or project name + * @param onResult callback function with the resulting WorkItemTrackingInterfaces.ProvisioningResult + */ + updateWorkItemTypeDefinition(updateModel: WorkItemTrackingInterfaces.WorkItemTypeTemplateUpdateModel, project: string, onResult: (err: any, statusCode: number, workItemTypeTemplate: WorkItemTrackingInterfaces.ProvisioningResult) => void): void; + } + export class QWorkItemTrackingApi extends basem.QClientApiBase implements IQWorkItemTrackingApi { + api: WorkItemTrackingApi; + constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); + /** + * Creates an attachment. + * + * @param {NodeJS.ReadableStream} contentStream - Content to upload + * @param {string} fileName + * @param {string} uploadType + */ + createAttachment(customHeaders: any, contentStream: NodeJS.ReadableStream, fileName?: string, uploadType?: string): Promise; + /** + * Returns an attachment + * + * @param {string} id + * @param {string} fileName + */ + getAttachmentContent(id: string, fileName?: string): Promise; + /** + * Returns an attachment + * + * @param {string} id + * @param {string} fileName + */ + getAttachmentZip(id: string, fileName?: string): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} depth + */ + getRootNodes(project: string, depth?: number): Promise; + /** + * @param {WorkItemTrackingInterfaces.WorkItemClassificationNode} postedNode + * @param {string} project - Project ID or project name + * @param {WorkItemTrackingInterfaces.TreeStructureGroup} structureGroup + * @param {string} path + */ + createOrUpdateClassificationNode(postedNode: WorkItemTrackingInterfaces.WorkItemClassificationNode, project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path?: string): Promise; + /** + * @param {string} project - Project ID or project name + * @param {WorkItemTrackingInterfaces.TreeStructureGroup} structureGroup + * @param {string} path + * @param {number} reclassifyId + */ + deleteClassificationNode(project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path?: string, reclassifyId?: number): Promise; + /** + * @param {string} project - Project ID or project name + * @param {WorkItemTrackingInterfaces.TreeStructureGroup} structureGroup + * @param {string} path + * @param {number} depth + */ + getClassificationNode(project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path?: string, depth?: number): Promise; + /** + * @param {WorkItemTrackingInterfaces.WorkItemClassificationNode} postedNode + * @param {string} project - Project ID or project name + * @param {WorkItemTrackingInterfaces.TreeStructureGroup} structureGroup + * @param {string} path + */ + updateClassificationNode(postedNode: WorkItemTrackingInterfaces.WorkItemClassificationNode, project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path?: string): Promise; + /** + * @param {string} field + */ + getField(field: string): Promise; + /** + */ + getFields(): Promise; + /** + * Returns history of all revision for a given work item ID + * + * @param {number} id + * @param {number} top + * @param {number} skip + */ + getHistory(id: number, top?: number, skip?: number): Promise; + /** + * Returns the history value of particular revision + * + * @param {number} id + * @param {number} revisionNumber + */ + getHistoryById(id: number, revisionNumber: number): Promise; + /** + * Creates a query, or moves a query. + * + * @param {WorkItemTrackingInterfaces.QueryHierarchyItem} postedQuery - The query to create. + * @param {string} project - Project ID or project name + * @param {string} query - The parent path for the query to create. + */ + createQuery(postedQuery: WorkItemTrackingInterfaces.QueryHierarchyItem, project: string, query: string): Promise; + /** + * @param {string} project - Project ID or project name + * @param {string} query + */ + deleteQuery(project: string, query: string): Promise; + /** + * Retrieves all queries the user has access to in the current project + * + * @param {string} project - Project ID or project name + * @param {WorkItemTrackingInterfaces.QueryExpand} expand + * @param {number} depth + * @param {boolean} includeDeleted + */ + getQueries(project: string, expand?: WorkItemTrackingInterfaces.QueryExpand, depth?: number, includeDeleted?: boolean): Promise; + /** + * Retrieves a single query by project and either id or path + * + * @param {string} project - Project ID or project name + * @param {string} query + * @param {WorkItemTrackingInterfaces.QueryExpand} expand + * @param {number} depth + * @param {boolean} includeDeleted + */ + getQuery(project: string, query: string, expand?: WorkItemTrackingInterfaces.QueryExpand, depth?: number, includeDeleted?: boolean): Promise; + /** + * @param {WorkItemTrackingInterfaces.QueryHierarchyItem} queryUpdate + * @param {string} project - Project ID or project name + * @param {string} query + * @param {boolean} undeleteDescendants + */ + updateQuery(queryUpdate: WorkItemTrackingInterfaces.QueryHierarchyItem, project: string, query: string, undeleteDescendants?: boolean): Promise; + /** + * @param {number} id + * @param {string} project - Project ID or project name + */ + destroyWorkItem(id: number, project?: string): Promise; + /** + * @param {number} id + * @param {string} project - Project ID or project name + */ + getDeletedWorkItem(id: number, project?: string): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number[]} ids + */ + getDeletedWorkItems(project?: string, ids?: number[]): Promise; + /** + * @param {WorkItemTrackingInterfaces.WorkItemDeleteUpdate} payload + * @param {number} id + * @param {string} project - Project ID or project name + */ + restoreWorkItem(payload: WorkItemTrackingInterfaces.WorkItemDeleteUpdate, id: number, project?: string): Promise; + /** + * Returns a fully hydrated work item for the requested revision + * + * @param {number} id + * @param {number} revisionNumber + * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand + */ + getRevision(id: number, revisionNumber: number, expand?: WorkItemTrackingInterfaces.WorkItemExpand): Promise; + /** + * Returns the list of fully hydrated work item revisions, paged. + * + * @param {number} id + * @param {number} top + * @param {number} skip + * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand + */ + getRevisions(id: number, top?: number, skip?: number, expand?: WorkItemTrackingInterfaces.WorkItemExpand): Promise; + /** + * Validates the fields values. + * + * @param {WorkItemTrackingInterfaces.FieldsToEvaluate} ruleEngineInput + */ + evaluateRulesOnField(ruleEngineInput: WorkItemTrackingInterfaces.FieldsToEvaluate): Promise; + /** + * Returns a single update for a work item + * + * @param {number} id + * @param {number} updateNumber + */ + getUpdate(id: number, updateNumber: number): Promise; + /** + * Returns a the deltas between work item revisions + * + * @param {number} id + * @param {number} top + * @param {number} skip + */ + getUpdates(id: number, top?: number, skip?: number): Promise; + /** + * Gets the results of the query. + * + * @param {WorkItemTrackingInterfaces.Wiql} wiql - The query containing the wiql. + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {boolean} timePrecision + */ + queryByWiql(wiql: WorkItemTrackingInterfaces.Wiql, teamContext?: TfsCoreInterfaces.TeamContext, timePrecision?: boolean): Promise; + /** + * Gets the results of the query by id. + * + * @param {string} id - The query id. + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {boolean} timePrecision + */ + queryById(id: string, teamContext?: TfsCoreInterfaces.TeamContext, timePrecision?: boolean): Promise; + /** + * Get a batch of work item links + * + * @param {string} project - Project ID or project name + * @param {string[]} types - A list of types to filter the results to specific work item types. Omit this parameter to get work item links of all work item types. + * @param {string} continuationToken - Specifies the continuationToken to start the batch from. Omit this parameter to get the first batch of links. + * @param {Date} startDateTime - Date/time to use as a starting point for link changes. Only link changes that occurred after that date/time will be returned. Cannot be used in conjunction with 'watermark' parameter. + */ + getReportingLinks(project?: string, types?: string[], continuationToken?: string, startDateTime?: Date): Promise; + /** + * Gets the work item relation types. + * + * @param {string} relation + */ + getRelationType(relation: string): Promise; + /** + */ + getRelationTypes(): Promise; + /** + * Get a batch of work item revisions with the option of including deleted items + * + * @param {string} project - Project ID or project name + * @param {string[]} fields - A list of fields to return in work item revisions. Omit this parameter to get all reportable fields. + * @param {string[]} types - A list of types to filter the results to specific work item types. Omit this parameter to get work item revisions of all work item types. + * @param {string} continuationToken - Specifies the watermark to start the batch from. Omit this parameter to get the first batch of revisions. + * @param {Date} startDateTime - Date/time to use as a starting point for revisions, all revisions will occur after this date/time. Cannot be used in conjunction with 'watermark' parameter. + * @param {boolean} includeIdentityRef - Return an identity reference instead of a string value for identity fields. + * @param {boolean} includeDeleted - Specify if the deleted item should be returned. + * @param {boolean} includeTagRef - Specify if the tag objects should be returned for System.Tags field. + */ + readReportingRevisionsGet(project?: string, fields?: string[], types?: string[], continuationToken?: string, startDateTime?: Date, includeIdentityRef?: boolean, includeDeleted?: boolean, includeTagRef?: boolean): Promise; + /** + * Get a batch of work item revisions + * + * @param {WorkItemTrackingInterfaces.ReportingWorkItemRevisionsFilter} filter - An object that contains request settings: field filter, type filter, identity format + * @param {string} project - Project ID or project name + * @param {string} continuationToken - Specifies the watermark to start the batch from. Omit this parameter to get the first batch of revisions. + * @param {Date} startDateTime - Date/time to use as a starting point for revisions, all revisions will occur after this date/time. Cannot be used in conjunction with 'watermark' parameter. + */ + readReportingRevisionsPost(filter: WorkItemTrackingInterfaces.ReportingWorkItemRevisionsFilter, project?: string, continuationToken?: string, startDateTime?: Date): Promise; + /** + * @param {number} id + * @param {boolean} destroy + */ + deleteWorkItem(id: number, destroy?: boolean): Promise; + /** + * Returns a single work item + * + * @param {number} id + * @param {string[]} fields + * @param {Date} asOf + * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand + */ + getWorkItem(id: number, fields?: string[], asOf?: Date, expand?: WorkItemTrackingInterfaces.WorkItemExpand): Promise; + /** + * Returns a list of work items + * + * @param {number[]} ids + * @param {string[]} fields + * @param {Date} asOf + * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand + */ + getWorkItems(ids: number[], fields?: string[], asOf?: Date, expand?: WorkItemTrackingInterfaces.WorkItemExpand): Promise; + /** + * @param {VSSInterfaces.JsonPatchDocument} document + * @param {number} id + * @param {boolean} validateOnly + * @param {boolean} bypassRules + */ + updateWorkItem(customHeaders: any, document: VSSInterfaces.JsonPatchDocument, id: number, validateOnly?: boolean, bypassRules?: boolean): Promise; + /** + * @param {VSSInterfaces.JsonPatchDocument} document + * @param {string} project - Project ID or project name + * @param {string} type + * @param {boolean} validateOnly + * @param {boolean} bypassRules + */ + createWorkItem(customHeaders: any, document: VSSInterfaces.JsonPatchDocument, project: string, type: string, validateOnly?: boolean, bypassRules?: boolean): Promise; + /** + * Returns a single work item from a template + * + * @param {string} project - Project ID or project name + * @param {string} type + * @param {string} fields + * @param {Date} asOf + * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand + */ + getWorkItemTemplate(project: string, type: string, fields?: string, asOf?: Date, expand?: WorkItemTrackingInterfaces.WorkItemExpand): Promise; + /** + * @param {string} project - Project ID or project name + */ + getWorkItemTypeCategories(project: string): Promise; + /** + * Returns a the deltas between work item revisions + * + * @param {string} project - Project ID or project name + * @param {string} category + */ + getWorkItemTypeCategory(project: string, category: string): Promise; + /** + * Returns a the deltas between work item revisions + * + * @param {string} project - Project ID or project name + * @param {string} type + */ + getWorkItemType(project: string, type: string): Promise; + /** + * @param {string} project - Project ID or project name + */ + getWorkItemTypes(project: string): Promise; + /** + * Returns the dependent fields for the corresponding workitem type and fieldname + * + * @param {string} project - Project ID or project name + * @param {string} type + * @param {string} field + */ + getDependentFields(project: string, type: string, field: string): Promise; + /** + * Export work item type + * + * @param {string} project - Project ID or project name + * @param {string} type + * @param {boolean} exportGlobalLists + */ + exportWorkItemTypeDefinition(project?: string, type?: string, exportGlobalLists?: boolean): Promise; + /** + * Add/updates a work item type + * + * @param {WorkItemTrackingInterfaces.WorkItemTypeTemplateUpdateModel} updateModel + * @param {string} project - Project ID or project name + */ + updateWorkItemTypeDefinition(updateModel: WorkItemTrackingInterfaces.WorkItemTypeTemplateUpdateModel, project?: string): Promise; + } + +} +declare module 'vso-node-api/interfaces/ReleaseInterfaces' { + import FormInputInterfaces = require('vso-node-api/interfaces/common/FormInputInterfaces'); + import VSSInterfaces = require('vso-node-api/interfaces/common/VSSInterfaces'); + export interface AgentArtifactDefinition { + alias: string; + artifactType: AgentArtifactType; + details: string; + name: string; + version: string; + } + export enum AgentArtifactType { + XamlBuild = 0, + Build = 1, + Jenkins = 2, + FileShare = 3, + Nuget = 4, + TfsOnPrem = 5, + GitHub = 6, + TFGit = 7, + ExternalTfsBuild = 8, + } + export interface ApprovalOptions { + releaseCreatorCanBeApprover: boolean; + requiredApproverCount: number; + } + export interface ApprovalPendingEvent { + } + export enum ApprovalStatus { + Undefined = 0, + Pending = 1, + Approved = 2, + Rejected = 4, + Reassigned = 6, + Canceled = 7, + Skipped = 8, + } + export enum ApprovalType { + Undefined = 0, + PreDeploy = 1, + PostDeploy = 2, + } + export interface Artifact { + alias: string; + definitionReference: { + [key: string]: ArtifactSourceReference; + }; + id: number; + isPrimary: boolean; + type: string; + } + export interface ArtifactInstanceData { + accountName: string; + authenticationToken: string; + tfsUrl: string; + version: string; + } + export interface ArtifactMetadata { + alias: string; + instanceReference: BuildVersion; + } + export interface ArtifactProvider { + id: number; + name: string; + sourceUri: string; + version: string; + } + export interface ArtifactSourceId { + artifactTypeId: string; + sourceIdInputs: SourceIdInput[]; + } + export interface ArtifactSourceIdsQueryResult { + artifactSourceIds: ArtifactSourceId[]; + } + export interface ArtifactSourceReference { + id: string; + name: string; + } + export interface ArtifactTypeDefinition { + inputDescriptors: FormInputInterfaces.InputDescriptor[]; + name: string; + } + export interface ArtifactVersion { + artifactSourceId: number; + errorMessage: string; + versions: BuildVersion[]; + } + export interface ArtifactVersionQueryResult { + artifactVersions: ArtifactVersion[]; + } + export enum AuditAction { + Add = 1, + Update = 2, + Delete = 3, + } + export interface BuildVersion { + id: string; + name: string; + sourceBranch: string; + } + /** + * Represents a change associated with a build. + */ + export interface Change { + /** + * The author of the change. + */ + author: VSSInterfaces.IdentityRef; + /** + * The type of change. "commit", "changeset", etc. + */ + changeType: string; + /** + * The location of a user-friendly representation of the resource. + */ + displayUri: string; + /** + * Something that identifies the change. For a commit, this would be the SHA1. For a TFVC changeset, this would be the changeset id. + */ + id: string; + /** + * The location of the full representation of the resource. + */ + location: string; + /** + * A description of the change. This might be a commit message or changeset description. + */ + message: string; + /** + * A timestamp for the change. + */ + timestamp: Date; + } + export interface Condition { + conditionType: ConditionType; + name: string; + value: string; + } + export enum ConditionType { + Undefined = 0, + Event = 1, + EnvironmentState = 2, + } + export interface ConfigurationVariableValue { + isSecret: boolean; + value: string; + } + export interface Consumer { + consumerId: number; + consumerName: string; + } + export interface DeploymentAttempt { + attempt: number; + /** + * Error log to show any unexpected error that occurred during executing deploy step + */ + errorLog: string; + id: number; + job: ReleaseTask; + runPlanId: string; + tasks: ReleaseTask[]; + } + /** + * Defines policy on environment queuing at Release Management side queue. We will send to Environment Runner [creating pre-deploy and other steps] only when the policies mentioned are satisfied. + */ + export interface EnvironmentExecutionPolicy { + /** + * This policy decides, how many environments would be with Environment Runner. + */ + concurrencyCount: number; + /** + * Queue depth in the EnvironmentQueue table, this table keeps the environment entries till Environment Runner is free [as per it's policy] to take another environment for running. + */ + queueDepthCount: number; + } + export enum EnvironmentStatus { + Undefined = 0, + NotStarted = 1, + Pending = 2, + Succeeded = 3, + Rejected = 4, + InProgress = 5, + Canceled = 6, + Queued = 7, + } + export interface Issue { + issueType: string; + message: string; + } + export interface RealtimeReleaseEvent { + projectId: string; + releaseId: number; + } + export interface Release { + artifacts: Artifact[]; + createdBy: VSSInterfaces.IdentityRef; + createdOn: Date; + description: string; + environments: ReleaseEnvironment[]; + id: number; + keepForever: boolean; + modifiedBy: VSSInterfaces.IdentityRef; + modifiedOn: Date; + name: string; + poolName: string; + reason: ReleaseReason; + releaseDefinition: ShallowReference; + releaseNameFormat: string; + status: ReleaseStatus; + variables: { + [key: string]: ConfigurationVariableValue; + }; + } + export interface ReleaseApproval { + approvalType: ApprovalType; + approvedBy: VSSInterfaces.IdentityRef; + approver: VSSInterfaces.IdentityRef; + attempt: number; + comments: string; + createdOn: Date; + history: ReleaseApprovalHistory[]; + id: number; + isAutomated: boolean; + isNotificationOn: boolean; + modifiedOn: Date; + rank: number; + release: ShallowReference; + releaseDefinition: ShallowReference; + releaseEnvironment: ShallowReference; + revision: number; + status: ApprovalStatus; + trialNumber: number; + } + export interface ReleaseApprovalHistory { + approver: VSSInterfaces.IdentityRef; + changedBy: VSSInterfaces.IdentityRef; + comments: string; + createdOn: Date; + modifiedOn: Date; + revision: number; + } + export interface ReleaseArtifact { + artifactProvider: ArtifactProvider; + artifactType: string; + definitionData: string; + definitionId: number; + description: string; + id: number; + name: string; + releaseId: number; + } + export interface ReleaseDefinition { + artifacts: Artifact[]; + createdBy: VSSInterfaces.IdentityRef; + createdOn: Date; + environments: ReleaseDefinitionEnvironment[]; + id: number; + modifiedBy: VSSInterfaces.IdentityRef; + modifiedOn: Date; + name: string; + releaseNameFormat: string; + retentionPolicy: RetentionPolicy; + revision: number; + triggers: ReleaseTrigger[]; + variables: { + [key: string]: ConfigurationVariableValue; + }; + } + export interface ReleaseDefinitionApprovals { + approvalOptions: ApprovalOptions; + approvals: ReleaseDefinitionApprovalStep[]; + } + export interface ReleaseDefinitionApprovalStep extends ReleaseDefinitionEnvironmentStep { + approver: VSSInterfaces.IdentityRef; + isAutomated: boolean; + isNotificationOn: boolean; + rank: number; + } + export interface ReleaseDefinitionDeployStep extends ReleaseDefinitionEnvironmentStep { + /** + * The list of steps for this definition. + */ + tasks: WorkflowTask[]; + } + export interface ReleaseDefinitionEnvironment { + conditions: Condition[]; + demands: any[]; + deployStep: ReleaseDefinitionDeployStep; + executionPolicy: EnvironmentExecutionPolicy; + id: number; + name: string; + owner: VSSInterfaces.IdentityRef; + postDeployApprovals: ReleaseDefinitionApprovals; + preDeployApprovals: ReleaseDefinitionApprovals; + queueId: number; + rank: number; + runOptions: { + [key: string]: string; + }; + variables: { + [key: string]: ConfigurationVariableValue; + }; + } + export interface ReleaseDefinitionEnvironmentStep { + id: number; + } + export interface ReleaseDefinitionEnvironmentSummary { + id: number; + lastReleases: ShallowReference[]; + name: string; + } + export interface ReleaseDefinitionEnvironmentTemplate { + canDelete: boolean; + category: string; + description: string; + environment: ReleaseDefinitionEnvironment; + iconTaskId: string; + id: string; + name: string; + } + export enum ReleaseDefinitionExpands { + None = 0, + Environments = 2, + Artifacts = 4, + } + export interface ReleaseDefinitionRevision { + changedBy: VSSInterfaces.IdentityRef; + changedDate: Date; + changeType: AuditAction; + definitionId: number; + definitionUrl: string; + revision: number; + } + export interface ReleaseDefinitionSummary { + environments: ReleaseDefinitionEnvironmentSummary[]; + releaseDefinition: ShallowReference; + releases: Release[]; + } + export interface ReleaseEnvironment { + conditions: Condition[]; + createdOn: Date; + definitionEnvironmentId: number; + demands: any[]; + deploySteps: DeploymentAttempt[]; + id: number; + modifiedOn: Date; + name: string; + owner: VSSInterfaces.IdentityRef; + postApprovalsSnapshot: ReleaseDefinitionApprovals; + postDeployApprovals: ReleaseApproval[]; + preApprovalsSnapshot: ReleaseDefinitionApprovals; + preDeployApprovals: ReleaseApproval[]; + queueId: number; + rank: number; + releaseId: number; + runOptions: { + [key: string]: string; + }; + scheduledDeploymentTime: Date; + status: EnvironmentStatus; + variables: { + [key: string]: ConfigurationVariableValue; + }; + workflowTasks: WorkflowTask[]; + } + export interface ReleaseEnvironmentCompletedEvent { + createdByName: string; + definitionName: string; + environment: ReleaseEnvironment; + projectName: string; + releaseCreatedBy: VSSInterfaces.IdentityRef; + releaseLogsUri: string; + releaseName: string; + status: string; + title: string; + webAccessUri: string; + } + export enum ReleaseExpands { + None = 0, + Environments = 2, + Artifacts = 4, + Approvals = 8, + } + export enum ReleaseQueryOrder { + Descending = 0, + Ascending = 1, + } + export enum ReleaseReason { + None = 0, + Manual = 1, + ContinuousIntegration = 2, + Schedule = 3, + } + export interface ReleaseSchedule { + /** + * Days of the week to release + */ + daysToRelease: ScheduleDays; + /** + * Team Foundation Job Definition Job Id + */ + jobId: string; + /** + * Local time zone hour to start + */ + startHours: number; + /** + * Local time zone minute to start + */ + startMinutes: number; + /** + * Time zone Id of release schedule, such as 'UTC' + */ + timeZoneId: string; + } + export interface ReleaseStartMetadata { + artifacts: ArtifactMetadata[]; + definitionId: number; + description: string; + isDraft: boolean; + reason: ReleaseReason; + } + export enum ReleaseStatus { + Undefined = 0, + Draft = 1, + Abandoned = 2, + Active = 3, + } + export interface ReleaseTask { + agentName: string; + dateEnded: Date; + dateStarted: Date; + id: number; + issues: Issue[]; + lineCount: number; + name: string; + rank: number; + status: TaskStatus; + timelineRecordId: string; + } + export interface ReleaseTaskLogUpdatedEvent extends RealtimeReleaseEvent { + environmentId: number; + lines: string[]; + timelineRecordId: string; + } + export interface ReleaseTasksUpdatedEvent extends RealtimeReleaseEvent { + environmentId: number; + job: ReleaseTask; + releaseStepId: number; + tasks: ReleaseTask[]; + } + export interface ReleaseTrigger { + /** + * Artifact source alias for ArtifactSource trigger type - value is null for all other trigger types + */ + artifactAlias: string; + /** + * Release schedule for Schedule trigger type - value is null for all other trigger types + */ + schedule: ReleaseSchedule; + triggerType: ReleaseTriggerType; + } + export enum ReleaseTriggerType { + Undefined = 0, + ArtifactSource = 1, + Schedule = 2, + } + export interface ReleaseUpdatedEvent extends RealtimeReleaseEvent { + release: Release; + } + export interface ReleaseUpdateMetadata { + keepForever: boolean; + status: ReleaseStatus; + } + export interface ReleaseWorkItemRef { + id: string; + url: string; + } + export interface RetentionPolicy { + daysToKeep: number; + } + export enum ScheduleDays { + None = 0, + Monday = 1, + Tuesday = 2, + Wednesday = 4, + Thursday = 8, + Friday = 16, + Saturday = 32, + Sunday = 64, + All = 127, + } + export interface ShallowReference { + id: number; + name: string; + url: string; + } + export interface SourceIdInput { + id: string; + name: string; + } + export enum TaskStatus { + Unknown = 0, + Pending = 1, + InProgress = 2, + Success = 3, + Failure = 4, + Canceled = 5, + Skipped = 6, + } + export interface TimeZone { + displayName: string; + id: string; + } + export interface TimeZoneList { + utcTimeZone: TimeZone; + validTimeZones: TimeZone[]; + } + export interface WorkflowTask { + alwaysRun: boolean; + continueOnError: boolean; + enabled: boolean; + inputs: { + [key: string]: string; + }; + name: string; + taskId: string; + version: string; + } + export var TypeInfo: { + AgentArtifactDefinition: { + fields: any; + }; + AgentArtifactType: { + enumValues: { + "xamlBuild": number; + "build": number; + "jenkins": number; + "fileShare": number; + "nuget": number; + "tfsOnPrem": number; + "gitHub": number; + "tFGit": number; + "externalTfsBuild": number; + }; + }; + ApprovalOptions: { + fields: any; + }; + ApprovalPendingEvent: { + fields: any; + }; + ApprovalStatus: { + enumValues: { + "undefined": number; + "pending": number; + "approved": number; + "rejected": number; + "reassigned": number; + "canceled": number; + "skipped": number; + }; + }; + ApprovalType: { + enumValues: { + "undefined": number; + "preDeploy": number; + "postDeploy": number; + }; + }; + Artifact: { + fields: any; + }; + ArtifactInstanceData: { + fields: any; + }; + ArtifactMetadata: { + fields: any; + }; + ArtifactProvider: { + fields: any; + }; + ArtifactSourceId: { + fields: any; + }; + ArtifactSourceIdsQueryResult: { + fields: any; + }; + ArtifactSourceReference: { + fields: any; + }; + ArtifactTypeDefinition: { + fields: any; + }; + ArtifactVersion: { + fields: any; + }; + ArtifactVersionQueryResult: { + fields: any; + }; + AuditAction: { + enumValues: { + "add": number; + "update": number; + "delete": number; + }; + }; + BuildVersion: { + fields: any; + }; + Change: { + fields: any; + }; + Condition: { + fields: any; + }; + ConditionType: { + enumValues: { + "undefined": number; + "event": number; + "environmentState": number; + }; + }; + ConfigurationVariableValue: { + fields: any; + }; + Consumer: { + fields: any; + }; + DeploymentAttempt: { + fields: any; + }; + EnvironmentExecutionPolicy: { + fields: any; + }; + EnvironmentStatus: { + enumValues: { + "undefined": number; + "notStarted": number; + "pending": number; + "succeeded": number; + "rejected": number; + "inProgress": number; + "canceled": number; + "queued": number; + }; + }; + Issue: { + fields: any; + }; + RealtimeReleaseEvent: { + fields: any; + }; + Release: { + fields: any; + }; + ReleaseApproval: { + fields: any; + }; + ReleaseApprovalHistory: { + fields: any; + }; + ReleaseArtifact: { + fields: any; + }; + ReleaseDefinition: { + fields: any; + }; + ReleaseDefinitionApprovals: { + fields: any; + }; + ReleaseDefinitionApprovalStep: { + fields: any; + }; + ReleaseDefinitionDeployStep: { + fields: any; + }; + ReleaseDefinitionEnvironment: { + fields: any; + }; + ReleaseDefinitionEnvironmentStep: { + fields: any; + }; + ReleaseDefinitionEnvironmentSummary: { + fields: any; + }; + ReleaseDefinitionEnvironmentTemplate: { + fields: any; + }; + ReleaseDefinitionExpands: { + enumValues: { + "none": number; + "environments": number; + "artifacts": number; + }; + }; + ReleaseDefinitionRevision: { + fields: any; + }; + ReleaseDefinitionSummary: { + fields: any; + }; + ReleaseEnvironment: { + fields: any; + }; + ReleaseEnvironmentCompletedEvent: { + fields: any; + }; + ReleaseExpands: { + enumValues: { + "none": number; + "environments": number; + "artifacts": number; + "approvals": number; + }; + }; + ReleaseQueryOrder: { + enumValues: { + "descending": number; + "ascending": number; + }; + }; + ReleaseReason: { + enumValues: { + "none": number; + "manual": number; + "continuousIntegration": number; + "schedule": number; + }; + }; + ReleaseSchedule: { + fields: any; + }; + ReleaseStartMetadata: { + fields: any; + }; + ReleaseStatus: { + enumValues: { + "undefined": number; + "draft": number; + "abandoned": number; + "active": number; + }; + }; + ReleaseTask: { + fields: any; + }; + ReleaseTaskLogUpdatedEvent: { + fields: any; + }; + ReleaseTasksUpdatedEvent: { + fields: any; + }; + ReleaseTrigger: { + fields: any; + }; + ReleaseTriggerType: { + enumValues: { + "undefined": number; + "artifactSource": number; + "schedule": number; + }; + }; + ReleaseUpdatedEvent: { + fields: any; + }; + ReleaseUpdateMetadata: { + fields: any; + }; + ReleaseWorkItemRef: { + fields: any; + }; + RetentionPolicy: { + fields: any; + }; + ScheduleDays: { + enumValues: { + "none": number; + "monday": number; + "tuesday": number; + "wednesday": number; + "thursday": number; + "friday": number; + "saturday": number; + "sunday": number; + "all": number; + }; + }; + ShallowReference: { + fields: any; + }; + SourceIdInput: { + fields: any; + }; + TaskStatus: { + enumValues: { + "unknown": number; + "pending": number; + "inProgress": number; + "success": number; + "failure": number; + "canceled": number; + "skipped": number; + }; + }; + TimeZone: { + fields: any; + }; + TimeZoneList: { + fields: any; + }; + WorkflowTask: { + fields: any; + }; + }; + +} +declare module 'vso-node-api/ReleaseApi' { + + + import Q = require('q'); + import basem = require('vso-node-api/ClientApiBases'); + import VsoBaseInterfaces = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); + import FormInputInterfaces = require('vso-node-api/interfaces/common/FormInputInterfaces'); + import ReleaseInterfaces = require('vso-node-api/interfaces/ReleaseInterfaces'); + export interface IReleaseApi extends basem.ClientApiBase { + getAgentArtifactDefinitions(project: string, releaseId: number, onResult: (err: any, statusCode: number, agentartifacts: ReleaseInterfaces.AgentArtifactDefinition[]) => void): void; + getApprovals(project: string, assignedToFilter: string, statusFilter: ReleaseInterfaces.ApprovalStatus, releaseIdsFilter: number[], onResult: (err: any, statusCode: number, approvals: ReleaseInterfaces.ReleaseApproval[]) => void): void; + getApprovalHistory(project: string, approvalStepId: number, onResult: (err: any, statusCode: number, approval: ReleaseInterfaces.ReleaseApproval) => void): void; + updateReleaseApproval(approval: ReleaseInterfaces.ReleaseApproval, project: string, approvalId: number, onResult: (err: any, statusCode: number, approval: ReleaseInterfaces.ReleaseApproval) => void): void; + getReleaseChanges(project: string, releaseId: number, baseReleaseId: number, top: number, onResult: (err: any, statusCode: number, changes: ReleaseInterfaces.Change[]) => void): void; + createReleaseDefinition(releaseDefinition: ReleaseInterfaces.ReleaseDefinition, project: string, onResult: (err: any, statusCode: number, definition: ReleaseInterfaces.ReleaseDefinition) => void): void; + deleteReleaseDefinition(project: string, definitionId: number, onResult: (err: any, statusCode: number) => void): void; + getReleaseDefinition(project: string, definitionId: number, onResult: (err: any, statusCode: number, definition: ReleaseInterfaces.ReleaseDefinition) => void): void; + getReleaseDefinitions(project: string, searchText: string, artifactIdFilter: number, expand: ReleaseInterfaces.ReleaseDefinitionExpands, onResult: (err: any, statusCode: number, definitions: ReleaseInterfaces.ReleaseDefinition[]) => void): void; + getReleaseDefinitionsForArtifactSource(project: string, artifactType: string, artifactSourceId: string, expand: ReleaseInterfaces.ReleaseDefinitionExpands, onResult: (err: any, statusCode: number, definitions: ReleaseInterfaces.ReleaseDefinition[]) => void): void; + updateReleaseDefinition(releaseDefinition: ReleaseInterfaces.ReleaseDefinition, project: string, onResult: (err: any, statusCode: number, definition: ReleaseInterfaces.ReleaseDefinition) => void): void; + getReleaseEnvironment(project: string, releaseId: number, environmentId: number, onResult: (err: any, statusCode: number, environment: ReleaseInterfaces.ReleaseEnvironment) => void): void; + updateReleaseEnvironment(environmentUpdateData: any, project: string, releaseId: number, environmentId: number, onResult: (err: any, statusCode: number, environment: ReleaseInterfaces.ReleaseEnvironment) => void): void; + createDefinitionEnvironmentTemplate(template: ReleaseInterfaces.ReleaseDefinitionEnvironmentTemplate, project: string, onResult: (err: any, statusCode: number, environmenttemplate: ReleaseInterfaces.ReleaseDefinitionEnvironmentTemplate) => void): void; + deleteDefinitionEnvironmentTemplate(project: string, templateId: string, onResult: (err: any, statusCode: number) => void): void; + getDefinitionEnvironmentTemplate(project: string, templateId: string, onResult: (err: any, statusCode: number, environmenttemplate: ReleaseInterfaces.ReleaseDefinitionEnvironmentTemplate) => void): void; + listDefinitionEnvironmentTemplates(project: string, onResult: (err: any, statusCode: number, environmenttemplates: ReleaseInterfaces.ReleaseDefinitionEnvironmentTemplate[]) => void): void; + getInputValues(query: FormInputInterfaces.InputValuesQuery, project: string, onResult: (err: any, statusCode: number, inputvaluesquery: FormInputInterfaces.InputValuesQuery) => void): void; + getLogs(project: string, releaseId: number, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + getLog(project: string, releaseId: number, environmentId: number, taskId: number, attemptId: number, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + createRelease(releaseStartMetadata: ReleaseInterfaces.ReleaseStartMetadata, project: string, onResult: (err: any, statusCode: number, release: ReleaseInterfaces.Release) => void): void; + deleteRelease(project: string, releaseId: number, onResult: (err: any, statusCode: number) => void): void; + getRelease(project: string, releaseId: number, includeAllApprovals: boolean, onResult: (err: any, statusCode: number, release: ReleaseInterfaces.Release) => void): void; + getReleaseDefinitionSummary(project: string, definitionId: number, releaseCount: number, includeArtifact: boolean, onResult: (err: any, statusCode: number, release: ReleaseInterfaces.ReleaseDefinitionSummary) => void): void; + getReleases(project: string, definitionId: number, definitionEnvironmentId: number, searchText: string, createdBy: string, statusFilter: ReleaseInterfaces.ReleaseStatus, minCreatedTime: Date, maxCreatedTime: Date, queryOrder: ReleaseInterfaces.ReleaseQueryOrder, top: number, continuationToken: number, expand: ReleaseInterfaces.ReleaseExpands, artifactTypeId: string, artifactSourceId: number, artifactVersionId: string, onResult: (err: any, statusCode: number, releases: ReleaseInterfaces.Release[]) => void): void; + updateRelease(release: ReleaseInterfaces.Release, project: string, releaseId: number, onResult: (err: any, statusCode: number, release: ReleaseInterfaces.Release) => void): void; + updateReleaseResource(releaseUpdateMetadata: ReleaseInterfaces.ReleaseUpdateMetadata, project: string, releaseId: number, onResult: (err: any, statusCode: number, release: ReleaseInterfaces.Release) => void): void; + getReleaseDefinitionHistory(project: string, definitionId: number, onResult: (err: any, statusCode: number, revisions: ReleaseInterfaces.ReleaseDefinitionRevision[]) => void): void; + getReleaseDefinitionRevision(project: string, definitionId: number, revision: number, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + getArtifactsSources(project: string, typeId: string, onResult: (err: any, statusCode: number, source: ReleaseInterfaces.ArtifactSourceIdsQueryResult) => void): void; + getTasks(project: string, releaseId: number, environmentId: number, attemptId: number, onResult: (err: any, statusCode: number, tasks: ReleaseInterfaces.ReleaseTask[]) => void): void; + getArtifactTypeDefinitions(project: string, onResult: (err: any, statusCode: number, types: ReleaseInterfaces.ArtifactTypeDefinition[]) => void): void; + getArtifactVersions(project: string, releaseDefinitionId: number, onResult: (err: any, statusCode: number, version: ReleaseInterfaces.ArtifactVersionQueryResult) => void): void; + getArtifactVersionsForSources(artifacts: ReleaseInterfaces.Artifact[], project: string, onResult: (err: any, statusCode: number, version: ReleaseInterfaces.ArtifactVersionQueryResult) => void): void; + getReleaseWorkItemsRefs(project: string, releaseId: number, baseReleaseId: number, top: number, onResult: (err: any, statusCode: number, workitems: ReleaseInterfaces.ReleaseWorkItemRef[]) => void): void; + } + export interface IQReleaseApi extends basem.QClientApiBase { + getAgentArtifactDefinitions(project: string, releaseId: number): Promise; + getApprovals(project: string, assignedToFilter?: string, statusFilter?: ReleaseInterfaces.ApprovalStatus, releaseIdsFilter?: number[]): Promise; + getApprovalHistory(project: string, approvalStepId: number): Promise; + updateReleaseApproval(approval: ReleaseInterfaces.ReleaseApproval, project: string, approvalId: number): Promise; + getReleaseChanges(project: string, releaseId: number, baseReleaseId?: number, top?: number): Promise; + createReleaseDefinition(releaseDefinition: ReleaseInterfaces.ReleaseDefinition, project: string): Promise; + deleteReleaseDefinition(project: string, definitionId: number): Promise; + getReleaseDefinition(project: string, definitionId: number): Promise; + getReleaseDefinitions(project: string, searchText?: string, artifactIdFilter?: number, expand?: ReleaseInterfaces.ReleaseDefinitionExpands): Promise; + getReleaseDefinitionsForArtifactSource(project: string, artifactType: string, artifactSourceId: string, expand?: ReleaseInterfaces.ReleaseDefinitionExpands): Promise; + updateReleaseDefinition(releaseDefinition: ReleaseInterfaces.ReleaseDefinition, project: string): Promise; + getReleaseEnvironment(project: string, releaseId: number, environmentId: number): Promise; + updateReleaseEnvironment(environmentUpdateData: any, project: string, releaseId: number, environmentId: number): Promise; + createDefinitionEnvironmentTemplate(template: ReleaseInterfaces.ReleaseDefinitionEnvironmentTemplate, project: string): Promise; + deleteDefinitionEnvironmentTemplate(project: string, templateId: string): Promise; + getDefinitionEnvironmentTemplate(project: string, templateId: string): Promise; + listDefinitionEnvironmentTemplates(project: string): Promise; + getInputValues(query: FormInputInterfaces.InputValuesQuery, project: string): Promise; + getLogs(project: string, releaseId: number): Promise; + getLog(project: string, releaseId: number, environmentId: number, taskId: number, attemptId?: number): Promise; + createRelease(releaseStartMetadata: ReleaseInterfaces.ReleaseStartMetadata, project: string): Promise; + deleteRelease(project: string, releaseId: number): Promise; + getRelease(project: string, releaseId: number, includeAllApprovals?: boolean): Promise; + getReleaseDefinitionSummary(project: string, definitionId: number, releaseCount: number, includeArtifact?: boolean): Promise; + getReleases(project: string, definitionId?: number, definitionEnvironmentId?: number, searchText?: string, createdBy?: string, statusFilter?: ReleaseInterfaces.ReleaseStatus, minCreatedTime?: Date, maxCreatedTime?: Date, queryOrder?: ReleaseInterfaces.ReleaseQueryOrder, top?: number, continuationToken?: number, expand?: ReleaseInterfaces.ReleaseExpands, artifactTypeId?: string, artifactSourceId?: number, artifactVersionId?: string): Promise; + updateRelease(release: ReleaseInterfaces.Release, project: string, releaseId: number): Promise; + updateReleaseResource(releaseUpdateMetadata: ReleaseInterfaces.ReleaseUpdateMetadata, project: string, releaseId: number): Promise; + getReleaseDefinitionHistory(project: string, definitionId: number): Promise; + getReleaseDefinitionRevision(project: string, definitionId: number, revision: number): Promise; + getArtifactsSources(project: string, typeId?: string): Promise; + getTasks(project: string, releaseId: number, environmentId: number, attemptId?: number): Promise; + getArtifactTypeDefinitions(project: string): Promise; + getArtifactVersions(project: string, releaseDefinitionId: number): Promise; + getArtifactVersionsForSources(artifacts: ReleaseInterfaces.Artifact[], project: string): Promise; + getReleaseWorkItemsRefs(project: string, releaseId: number, baseReleaseId?: number, top?: number): Promise; + } + export class ReleaseApi extends basem.ClientApiBase implements IReleaseApi { + constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); + /** + * Returns the artifact details that automation agent requires + * + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param onResult callback function with the resulting ReleaseInterfaces.AgentArtifactDefinition[] + */ + getAgentArtifactDefinitions(project: string, releaseId: number, onResult: (err: any, statusCode: number, agentartifacts: ReleaseInterfaces.AgentArtifactDefinition[]) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {string} assignedToFilter + * @param {ReleaseInterfaces.ApprovalStatus} statusFilter + * @param {number[]} releaseIdsFilter + * @param onResult callback function with the resulting ReleaseInterfaces.ReleaseApproval[] + */ + getApprovals(project: string, assignedToFilter: string, statusFilter: ReleaseInterfaces.ApprovalStatus, releaseIdsFilter: number[], onResult: (err: any, statusCode: number, approvals: ReleaseInterfaces.ReleaseApproval[]) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {number} approvalStepId + * @param onResult callback function with the resulting ReleaseInterfaces.ReleaseApproval + */ + getApprovalHistory(project: string, approvalStepId: number, onResult: (err: any, statusCode: number, approval: ReleaseInterfaces.ReleaseApproval) => void): void; + /** + * @param {ReleaseInterfaces.ReleaseApproval} approval + * @param {string} project - Project ID or project name + * @param {number} approvalId + * @param onResult callback function with the resulting ReleaseInterfaces.ReleaseApproval + */ + updateReleaseApproval(approval: ReleaseInterfaces.ReleaseApproval, project: string, approvalId: number, onResult: (err: any, statusCode: number, approval: ReleaseInterfaces.ReleaseApproval) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param {number} baseReleaseId + * @param {number} top + * @param onResult callback function with the resulting ReleaseInterfaces.Change[] + */ + getReleaseChanges(project: string, releaseId: number, baseReleaseId: number, top: number, onResult: (err: any, statusCode: number, changes: ReleaseInterfaces.Change[]) => void): void; + /** + * @param {ReleaseInterfaces.ReleaseDefinition} releaseDefinition + * @param {string} project - Project ID or project name + * @param onResult callback function with the resulting ReleaseInterfaces.ReleaseDefinition + */ + createReleaseDefinition(releaseDefinition: ReleaseInterfaces.ReleaseDefinition, project: string, onResult: (err: any, statusCode: number, definition: ReleaseInterfaces.ReleaseDefinition) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {number} definitionId + * @param onResult callback function + */ + deleteReleaseDefinition(project: string, definitionId: number, onResult: (err: any, statusCode: number) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {number} definitionId + * @param onResult callback function with the resulting ReleaseInterfaces.ReleaseDefinition + */ + getReleaseDefinition(project: string, definitionId: number, onResult: (err: any, statusCode: number, definition: ReleaseInterfaces.ReleaseDefinition) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {string} searchText + * @param {number} artifactIdFilter + * @param {ReleaseInterfaces.ReleaseDefinitionExpands} expand + * @param onResult callback function with the resulting ReleaseInterfaces.ReleaseDefinition[] + */ + getReleaseDefinitions(project: string, searchText: string, artifactIdFilter: number, expand: ReleaseInterfaces.ReleaseDefinitionExpands, onResult: (err: any, statusCode: number, definitions: ReleaseInterfaces.ReleaseDefinition[]) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {string} artifactType + * @param {string} artifactSourceId + * @param {ReleaseInterfaces.ReleaseDefinitionExpands} expand + * @param onResult callback function with the resulting ReleaseInterfaces.ReleaseDefinition[] + */ + getReleaseDefinitionsForArtifactSource(project: string, artifactType: string, artifactSourceId: string, expand: ReleaseInterfaces.ReleaseDefinitionExpands, onResult: (err: any, statusCode: number, definitions: ReleaseInterfaces.ReleaseDefinition[]) => void): void; + /** + * @param {ReleaseInterfaces.ReleaseDefinition} releaseDefinition + * @param {string} project - Project ID or project name + * @param onResult callback function with the resulting ReleaseInterfaces.ReleaseDefinition + */ + updateReleaseDefinition(releaseDefinition: ReleaseInterfaces.ReleaseDefinition, project: string, onResult: (err: any, statusCode: number, definition: ReleaseInterfaces.ReleaseDefinition) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param {number} environmentId + * @param onResult callback function with the resulting ReleaseInterfaces.ReleaseEnvironment + */ + getReleaseEnvironment(project: string, releaseId: number, environmentId: number, onResult: (err: any, statusCode: number, environment: ReleaseInterfaces.ReleaseEnvironment) => void): void; + /** + * @param {any} environmentUpdateData + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param {number} environmentId + * @param onResult callback function with the resulting ReleaseInterfaces.ReleaseEnvironment + */ + updateReleaseEnvironment(environmentUpdateData: any, project: string, releaseId: number, environmentId: number, onResult: (err: any, statusCode: number, environment: ReleaseInterfaces.ReleaseEnvironment) => void): void; + /** + * @param {ReleaseInterfaces.ReleaseDefinitionEnvironmentTemplate} template + * @param {string} project - Project ID or project name + * @param onResult callback function with the resulting ReleaseInterfaces.ReleaseDefinitionEnvironmentTemplate + */ + createDefinitionEnvironmentTemplate(template: ReleaseInterfaces.ReleaseDefinitionEnvironmentTemplate, project: string, onResult: (err: any, statusCode: number, environmenttemplate: ReleaseInterfaces.ReleaseDefinitionEnvironmentTemplate) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {string} templateId + * @param onResult callback function + */ + deleteDefinitionEnvironmentTemplate(project: string, templateId: string, onResult: (err: any, statusCode: number) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {string} templateId + * @param onResult callback function with the resulting ReleaseInterfaces.ReleaseDefinitionEnvironmentTemplate + */ + getDefinitionEnvironmentTemplate(project: string, templateId: string, onResult: (err: any, statusCode: number, environmenttemplate: ReleaseInterfaces.ReleaseDefinitionEnvironmentTemplate) => void): void; + /** + * @param {string} project - Project ID or project name + * @param onResult callback function with the resulting ReleaseInterfaces.ReleaseDefinitionEnvironmentTemplate[] + */ + listDefinitionEnvironmentTemplates(project: string, onResult: (err: any, statusCode: number, environmenttemplates: ReleaseInterfaces.ReleaseDefinitionEnvironmentTemplate[]) => void): void; + /** + * @param {FormInputInterfaces.InputValuesQuery} query + * @param {string} project - Project ID or project name + * @param onResult callback function with the resulting FormInputInterfaces.InputValuesQuery + */ + getInputValues(query: FormInputInterfaces.InputValuesQuery, project: string, onResult: (err: any, statusCode: number, inputvaluesquery: FormInputInterfaces.InputValuesQuery) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param onResult callback function with the resulting ArrayBuffer + */ + getLogs(project: string, releaseId: number, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param {number} environmentId + * @param {number} taskId + * @param {number} attemptId + * @param onResult callback function with the resulting string + */ + getLog(project: string, releaseId: number, environmentId: number, taskId: number, attemptId: number, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + /** + * @param {ReleaseInterfaces.ReleaseStartMetadata} releaseStartMetadata + * @param {string} project - Project ID or project name + * @param onResult callback function with the resulting ReleaseInterfaces.Release + */ + createRelease(releaseStartMetadata: ReleaseInterfaces.ReleaseStartMetadata, project: string, onResult: (err: any, statusCode: number, release: ReleaseInterfaces.Release) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param onResult callback function + */ + deleteRelease(project: string, releaseId: number, onResult: (err: any, statusCode: number) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param {boolean} includeAllApprovals + * @param onResult callback function with the resulting ReleaseInterfaces.Release + */ + getRelease(project: string, releaseId: number, includeAllApprovals: boolean, onResult: (err: any, statusCode: number, release: ReleaseInterfaces.Release) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {number} definitionId + * @param {number} releaseCount + * @param {boolean} includeArtifact + * @param onResult callback function with the resulting ReleaseInterfaces.ReleaseDefinitionSummary + */ + getReleaseDefinitionSummary(project: string, definitionId: number, releaseCount: number, includeArtifact: boolean, onResult: (err: any, statusCode: number, release: ReleaseInterfaces.ReleaseDefinitionSummary) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {number} definitionId + * @param {number} definitionEnvironmentId + * @param {string} searchText + * @param {string} createdBy + * @param {ReleaseInterfaces.ReleaseStatus} statusFilter + * @param {Date} minCreatedTime + * @param {Date} maxCreatedTime + * @param {ReleaseInterfaces.ReleaseQueryOrder} queryOrder + * @param {number} top + * @param {number} continuationToken + * @param {ReleaseInterfaces.ReleaseExpands} expand + * @param {string} artifactTypeId + * @param {number} artifactSourceId + * @param {string} artifactVersionId + * @param onResult callback function with the resulting ReleaseInterfaces.Release[] + */ + getReleases(project: string, definitionId: number, definitionEnvironmentId: number, searchText: string, createdBy: string, statusFilter: ReleaseInterfaces.ReleaseStatus, minCreatedTime: Date, maxCreatedTime: Date, queryOrder: ReleaseInterfaces.ReleaseQueryOrder, top: number, continuationToken: number, expand: ReleaseInterfaces.ReleaseExpands, artifactTypeId: string, artifactSourceId: number, artifactVersionId: string, onResult: (err: any, statusCode: number, releases: ReleaseInterfaces.Release[]) => void): void; + /** + * @param {ReleaseInterfaces.Release} release + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param onResult callback function with the resulting ReleaseInterfaces.Release + */ + updateRelease(release: ReleaseInterfaces.Release, project: string, releaseId: number, onResult: (err: any, statusCode: number, release: ReleaseInterfaces.Release) => void): void; + /** + * @param {ReleaseInterfaces.ReleaseUpdateMetadata} releaseUpdateMetadata + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param onResult callback function with the resulting ReleaseInterfaces.Release + */ + updateReleaseResource(releaseUpdateMetadata: ReleaseInterfaces.ReleaseUpdateMetadata, project: string, releaseId: number, onResult: (err: any, statusCode: number, release: ReleaseInterfaces.Release) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {number} definitionId + * @param onResult callback function with the resulting ReleaseInterfaces.ReleaseDefinitionRevision[] + */ + getReleaseDefinitionHistory(project: string, definitionId: number, onResult: (err: any, statusCode: number, revisions: ReleaseInterfaces.ReleaseDefinitionRevision[]) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {number} definitionId + * @param {number} revision + * @param onResult callback function with the resulting string + */ + getReleaseDefinitionRevision(project: string, definitionId: number, revision: number, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {string} typeId + * @param onResult callback function with the resulting ReleaseInterfaces.ArtifactSourceIdsQueryResult + */ + getArtifactsSources(project: string, typeId: string, onResult: (err: any, statusCode: number, source: ReleaseInterfaces.ArtifactSourceIdsQueryResult) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param {number} environmentId + * @param {number} attemptId + * @param onResult callback function with the resulting ReleaseInterfaces.ReleaseTask[] + */ + getTasks(project: string, releaseId: number, environmentId: number, attemptId: number, onResult: (err: any, statusCode: number, tasks: ReleaseInterfaces.ReleaseTask[]) => void): void; + /** + * @param {string} project - Project ID or project name + * @param onResult callback function with the resulting ReleaseInterfaces.ArtifactTypeDefinition[] + */ + getArtifactTypeDefinitions(project: string, onResult: (err: any, statusCode: number, types: ReleaseInterfaces.ArtifactTypeDefinition[]) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {number} releaseDefinitionId + * @param onResult callback function with the resulting ReleaseInterfaces.ArtifactVersionQueryResult + */ + getArtifactVersions(project: string, releaseDefinitionId: number, onResult: (err: any, statusCode: number, version: ReleaseInterfaces.ArtifactVersionQueryResult) => void): void; + /** + * @param {ReleaseInterfaces.Artifact[]} artifacts + * @param {string} project - Project ID or project name + * @param onResult callback function with the resulting ReleaseInterfaces.ArtifactVersionQueryResult + */ + getArtifactVersionsForSources(artifacts: ReleaseInterfaces.Artifact[], project: string, onResult: (err: any, statusCode: number, version: ReleaseInterfaces.ArtifactVersionQueryResult) => void): void; + /** + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param {number} baseReleaseId + * @param {number} top + * @param onResult callback function with the resulting ReleaseInterfaces.ReleaseWorkItemRef[] + */ + getReleaseWorkItemsRefs(project: string, releaseId: number, baseReleaseId: number, top: number, onResult: (err: any, statusCode: number, workitems: ReleaseInterfaces.ReleaseWorkItemRef[]) => void): void; + } + export class QReleaseApi extends basem.QClientApiBase implements IQReleaseApi { + api: ReleaseApi; + constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); + /** + * Returns the artifact details that automation agent requires + * + * @param {string} project - Project ID or project name + * @param {number} releaseId + */ + getAgentArtifactDefinitions(project: string, releaseId: number): Promise; + /** + * @param {string} project - Project ID or project name + * @param {string} assignedToFilter + * @param {ReleaseInterfaces.ApprovalStatus} statusFilter + * @param {number[]} releaseIdsFilter + */ + getApprovals(project: string, assignedToFilter?: string, statusFilter?: ReleaseInterfaces.ApprovalStatus, releaseIdsFilter?: number[]): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} approvalStepId + */ + getApprovalHistory(project: string, approvalStepId: number): Promise; + /** + * @param {ReleaseInterfaces.ReleaseApproval} approval + * @param {string} project - Project ID or project name + * @param {number} approvalId + */ + updateReleaseApproval(approval: ReleaseInterfaces.ReleaseApproval, project: string, approvalId: number): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param {number} baseReleaseId + * @param {number} top + */ + getReleaseChanges(project: string, releaseId: number, baseReleaseId?: number, top?: number): Promise; + /** + * @param {ReleaseInterfaces.ReleaseDefinition} releaseDefinition + * @param {string} project - Project ID or project name + */ + createReleaseDefinition(releaseDefinition: ReleaseInterfaces.ReleaseDefinition, project: string): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} definitionId + */ + deleteReleaseDefinition(project: string, definitionId: number): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} definitionId + */ + getReleaseDefinition(project: string, definitionId: number): Promise; + /** + * @param {string} project - Project ID or project name + * @param {string} searchText + * @param {number} artifactIdFilter + * @param {ReleaseInterfaces.ReleaseDefinitionExpands} expand + */ + getReleaseDefinitions(project: string, searchText?: string, artifactIdFilter?: number, expand?: ReleaseInterfaces.ReleaseDefinitionExpands): Promise; + /** + * @param {string} project - Project ID or project name + * @param {string} artifactType + * @param {string} artifactSourceId + * @param {ReleaseInterfaces.ReleaseDefinitionExpands} expand + */ + getReleaseDefinitionsForArtifactSource(project: string, artifactType: string, artifactSourceId: string, expand?: ReleaseInterfaces.ReleaseDefinitionExpands): Promise; + /** + * @param {ReleaseInterfaces.ReleaseDefinition} releaseDefinition + * @param {string} project - Project ID or project name + */ + updateReleaseDefinition(releaseDefinition: ReleaseInterfaces.ReleaseDefinition, project: string): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param {number} environmentId + */ + getReleaseEnvironment(project: string, releaseId: number, environmentId: number): Promise; + /** + * @param {any} environmentUpdateData + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param {number} environmentId + */ + updateReleaseEnvironment(environmentUpdateData: any, project: string, releaseId: number, environmentId: number): Promise; + /** + * @param {ReleaseInterfaces.ReleaseDefinitionEnvironmentTemplate} template + * @param {string} project - Project ID or project name + */ + createDefinitionEnvironmentTemplate(template: ReleaseInterfaces.ReleaseDefinitionEnvironmentTemplate, project: string): Promise; + /** + * @param {string} project - Project ID or project name + * @param {string} templateId + */ + deleteDefinitionEnvironmentTemplate(project: string, templateId: string): Promise; + /** + * @param {string} project - Project ID or project name + * @param {string} templateId + */ + getDefinitionEnvironmentTemplate(project: string, templateId: string): Promise; + /** + * @param {string} project - Project ID or project name + */ + listDefinitionEnvironmentTemplates(project: string): Promise; + /** + * @param {FormInputInterfaces.InputValuesQuery} query + * @param {string} project - Project ID or project name + */ + getInputValues(query: FormInputInterfaces.InputValuesQuery, project: string): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} releaseId + */ + getLogs(project: string, releaseId: number): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param {number} environmentId + * @param {number} taskId + * @param {number} attemptId + */ + getLog(project: string, releaseId: number, environmentId: number, taskId: number, attemptId?: number): Promise; + /** + * @param {ReleaseInterfaces.ReleaseStartMetadata} releaseStartMetadata + * @param {string} project - Project ID or project name + */ + createRelease(releaseStartMetadata: ReleaseInterfaces.ReleaseStartMetadata, project: string): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} releaseId + */ + deleteRelease(project: string, releaseId: number): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param {boolean} includeAllApprovals + */ + getRelease(project: string, releaseId: number, includeAllApprovals?: boolean): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} definitionId + * @param {number} releaseCount + * @param {boolean} includeArtifact + */ + getReleaseDefinitionSummary(project: string, definitionId: number, releaseCount: number, includeArtifact?: boolean): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} definitionId + * @param {number} definitionEnvironmentId + * @param {string} searchText + * @param {string} createdBy + * @param {ReleaseInterfaces.ReleaseStatus} statusFilter + * @param {Date} minCreatedTime + * @param {Date} maxCreatedTime + * @param {ReleaseInterfaces.ReleaseQueryOrder} queryOrder + * @param {number} top + * @param {number} continuationToken + * @param {ReleaseInterfaces.ReleaseExpands} expand + * @param {string} artifactTypeId + * @param {number} artifactSourceId + * @param {string} artifactVersionId + */ + getReleases(project: string, definitionId?: number, definitionEnvironmentId?: number, searchText?: string, createdBy?: string, statusFilter?: ReleaseInterfaces.ReleaseStatus, minCreatedTime?: Date, maxCreatedTime?: Date, queryOrder?: ReleaseInterfaces.ReleaseQueryOrder, top?: number, continuationToken?: number, expand?: ReleaseInterfaces.ReleaseExpands, artifactTypeId?: string, artifactSourceId?: number, artifactVersionId?: string): Promise; + /** + * @param {ReleaseInterfaces.Release} release + * @param {string} project - Project ID or project name + * @param {number} releaseId + */ + updateRelease(release: ReleaseInterfaces.Release, project: string, releaseId: number): Promise; + /** + * @param {ReleaseInterfaces.ReleaseUpdateMetadata} releaseUpdateMetadata + * @param {string} project - Project ID or project name + * @param {number} releaseId + */ + updateReleaseResource(releaseUpdateMetadata: ReleaseInterfaces.ReleaseUpdateMetadata, project: string, releaseId: number): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} definitionId + */ + getReleaseDefinitionHistory(project: string, definitionId: number): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} definitionId + * @param {number} revision + */ + getReleaseDefinitionRevision(project: string, definitionId: number, revision: number): Promise; + /** + * @param {string} project - Project ID or project name + * @param {string} typeId + */ + getArtifactsSources(project: string, typeId?: string): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param {number} environmentId + * @param {number} attemptId + */ + getTasks(project: string, releaseId: number, environmentId: number, attemptId?: number): Promise; + /** + * @param {string} project - Project ID or project name + */ + getArtifactTypeDefinitions(project: string): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} releaseDefinitionId + */ + getArtifactVersions(project: string, releaseDefinitionId: number): Promise; + /** + * @param {ReleaseInterfaces.Artifact[]} artifacts + * @param {string} project - Project ID or project name + */ + getArtifactVersionsForSources(artifacts: ReleaseInterfaces.Artifact[], project: string): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param {number} baseReleaseId + * @param {number} top + */ + getReleaseWorkItemsRefs(project: string, releaseId: number, baseReleaseId?: number, top?: number): Promise; + } + +} +declare module 'vso-node-api/handlers/apiversion' { + + import VsoBaseInterfaces = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); + export class ApiVersionHandler implements VsoBaseInterfaces.IRequestHandler { + apiVersion: string; + constructor(apiVersion: string); + prepareRequest(options: any): void; + canHandleAuthentication(res: VsoBaseInterfaces.IHttpResponse): boolean; + handleAuthentication(httpClient: any, protocol: any, options: any, objs: any, finalCallback: any): void; + } + +} +declare module 'vso-node-api/handlers/basiccreds' { + + import VsoBaseInterfaces = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); + export class BasicCredentialHandler implements VsoBaseInterfaces.IRequestHandler { + username: string; + password: string; + constructor(username: string, password: string); + prepareRequest(options: any): void; + canHandleAuthentication(res: VsoBaseInterfaces.IHttpResponse): boolean; + handleAuthentication(httpClient: any, protocol: any, options: any, objs: any, finalCallback: any): void; + } + +} +declare module 'vso-node-api/handlers/bearertoken' { + + import VsoBaseInterfaces = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); + export class BearerCredentialHandler implements VsoBaseInterfaces.IRequestHandler { + token: string; + constructor(token: string); + prepareRequest(options: any): void; + canHandleAuthentication(res: VsoBaseInterfaces.IHttpResponse): boolean; + handleAuthentication(httpClient: any, protocol: any, options: any, objs: any, finalCallback: any): void; + } + +} +declare module 'vso-node-api/handlers/ntlm' { + + import VsoBaseInterfaces = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); + export class NtlmCredentialHandler implements VsoBaseInterfaces.IRequestHandler { + username: string; + password: string; + workstation: string; + domain: string; + constructor(username: string, password: string, domain?: string, workstation?: string); + prepareRequest(options: any): void; + canHandleAuthentication(res: VsoBaseInterfaces.IHttpResponse): boolean; + handleAuthentication(httpClient: any, protocol: any, options: any, objs: any, finalCallback: any): void; + private sendType1Message(httpClient, protocol, options, objs, keepaliveAgent, callback); + private sendType3Message(httpClient, protocol, options, objs, keepaliveAgent, res, callback); + } + +} +declare module 'vso-node-api/WebApi' { + import VsoBaseInterfaces = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); + import buildm = require('vso-node-api/BuildApi'); + import corem = require('vso-node-api/CoreApi'); + import filecontainerm = require('vso-node-api/FileContainerApi'); + import gallerym = require('vso-node-api/GalleryApi'); + import gitm = require('vso-node-api/GitApi'); + import taskagentm = require('vso-node-api/TaskAgentApi'); + import taskm = require('vso-node-api/TaskApi'); + import testm = require('vso-node-api/TestApi'); + import tfvcm = require('vso-node-api/TfvcApi'); + import workitemtrackingm = require('vso-node-api/WorkItemTrackingApi'); + import releasem = require('vso-node-api/ReleaseApi'); + import apivm = require('vso-node-api/handlers/apiversion'); + import basicm = require('vso-node-api/handlers/basiccreds'); + import bearm = require('vso-node-api/handlers/bearertoken'); + import ntlmm = require('vso-node-api/handlers/ntlm'); + /** + * Methods to return handler objects (see handlers folder) + */ + export function getVersionHandler(apiVersion: string): apivm.ApiVersionHandler; + export function getBasicHandler(username: string, password: string): basicm.BasicCredentialHandler; + export function getNtlmHandler(username: string, password: string, workstation?: string, domain?: string): ntlmm.NtlmCredentialHandler; + export function getBearerHandler(token: any): bearm.BearerCredentialHandler; + export class WebApi { + serverUrl: string; + authHandler: VsoBaseInterfaces.IRequestHandler; + constructor(serverUrl: string, authHandler: VsoBaseInterfaces.IRequestHandler); + /** + * Each factory method can take a serverUrl and a list of handlers + * if these aren't provided, the default url and auth handler given to the constructor for this class will be used + */ + getBuildApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): buildm.IBuildApi; + /** + * Each API has a method here to create the "vanilla" API as well as one with a Q Promise wrapper. + */ + getBuildApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): buildm.IBuildApi; + getCoreApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): corem.ICoreApi; + getQCoreApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): corem.IQCoreApi; + getFileContainerApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): filecontainerm.IFileContainerApi; + getQFileContainerApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): filecontainerm.IQFileContainerApi; + getGalleryApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): gallerym.IGalleryApi; + getGalleryApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): gallerym.IGalleryApi; + getGitApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): gitm.IGitApi; + getQGitApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): gitm.IQGitApi; + getTaskApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): taskm.ITaskApi; + getQTaskApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): taskm.IQTaskApi; + getTaskAgentApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): taskagentm.ITaskAgentApi; + getTaskAgentApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): taskagentm.IQTaskAgentApi; + getTestApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): testm.ITestApi; + getQTestApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): testm.IQTestApi; + getTfvcApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): tfvcm.ITfvcApi; + getQTfvcApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): tfvcm.IQTfvcApi; + getWorkItemTrackingApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): workitemtrackingm.IWorkItemTrackingApi; + getQWorkItemTrackingApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): workitemtrackingm.IQWorkItemTrackingApi; + getReleaseApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): releasem.IReleaseApi; + getQReleaseApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): releasem.IQReleaseApi; + } + +} diff --git a/typings/winreg/winreg.d.ts b/typings/winreg/winreg.d.ts index 3860bc23..53c818ba 100644 --- a/typings/winreg/winreg.d.ts +++ b/typings/winreg/winreg.d.ts @@ -1,338 +1,57 @@ -// Type definitions for Winreg v1.2.0 -// Project: http://fresc81.github.io/node-winreg/ -// Definitions by: RX14 , BobBuehler -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// Type definitions for winreg 0.0.12 +// Project: https://www.npmjs.com/package/winreg -declare var Winreg: WinregStatic; - -interface WinregStatic { - /** - * Creates a registry object, which provides access to a single registry key. - * Note: This class is returned by a call to ```require('winreg')```. - * - * @public - * @class - * - * @param {@link Options} options - the options - * - * @example - * var Registry = require('winreg') - * , autoStartCurrentUser = new Registry({ - * hive: Registry.HKCU, - * key: '\\Software\\Microsoft\\Windows\\CurrentVersion\\Run' - * }); - */ - new (options: Winreg.Options): Winreg.Registry; - - /** - * Registry hive key HKEY_LOCAL_MACHINE. - * Note: For writing to this hive your program has to run with admin privileges. - */ - HKLM: string; - - /** - * Registry hive key HKEY_CURRENT_USER. - */ - HKCU: string; - - /** - * Registry hive key HKEY_CLASSES_ROOT. - * Note: For writing to this hive your program has to run with admin privileges. - */ - HKCR: string; - - /** - * Registry hive key HKEY_USERS. - * Note: For writing to this hive your program has to run with admin privileges. - */ - HKU: string; - - /** - * Registry hive key HKEY_CURRENT_CONFIG. - * Note: For writing to this hive your program has to run with admin privileges. - */ - HKCC: string; - - /** - * Collection of available registry hive keys. - */ - HIVES: Array; - - /** - * Registry value type STRING. - * - * Values of this type contain a string. - */ - REG_SZ: string; - - /** - * Registry value type MULTILINE_STRING. - * - * Values of this type contain a multiline string. - */ - REG_MULTI_SZ: string; - - /** - * Registry value type EXPANDABLE_STRING. - * - * Values of this type contain an expandable string. - */ - REG_EXPAND_SZ: string; - - /** - * Registry value type DOUBLE_WORD. - * - * Values of this type contain a double word (32 bit integer). - */ - REG_DWORD: string; - - /** - * Registry value type QUAD_WORD. - * - * Values of this type contain a quad word (64 bit integer). - */ - REG_QWORD: string; - - /** - * Registry value type BINARY. - * - * Values of this type contain a binary value. - */ - REG_BINARY: string; - - /** - * Registry value type UNKNOWN. - * - * Values of this type contain a value of an unknown type. - */ - REG_NONE: string; - - /** - * Collection of available registry value types. - */ - REG_TYPES: Array; - - /** - * The name of the default value. May be used instead of the empty string literal for better readability. - */ - DEFAULT_VALUE: string; +declare module "winreg" { + export = winreg; +} + +interface WinregOptions { + host?: string; + hive: Hive; + key: string; } -declare namespace Winreg { - export interface Options { - /** - * Optional hostname, must start with '\\' sequence. - */ - host?: string; - - /** - * Optional hive ID, default is HKLM. - */ - hive?: string; - - /** - * Optional key, default is the root key. - */ - key?: string; - - /** - * Optional registry hive architecture ('x86' or 'x64'; only valid on Windows 64 Bit Operating Systems). - */ - arch?: string; - } - - /** - * A registry object, which provides access to a single registry key. - */ - export interface Registry { - /** - * The hostname. - * @readonly - */ - host: string; - - /** - * The hive id. - * @readonly - */ - hive: string; - - /** - * The registry key name. - * @readonly - */ - key: string; - - /** - * The full path to the registry key. - * @readonly - */ - path: string; - - /** - * The registry hive architecture ('x86' or 'x64'). - * @readonly - */ - arch: string; - - /** - * Creates a new {@link Registry} instance that points to the parent registry key. - * @readonly - */ - parent: Registry; - - /** - * Retrieve all values from this registry key. - * @param {valuesCallback} cb - callback function - * @param {error=} cb.err - error object or null if successful - * @param {array=} cb.items - an array of {@link RegistryItem} objects - * @returns {Registry} this registry key object - */ - values(cb: (err: Error, result: Array) => void): Registry; - - /** - * Retrieve all subkeys from this registry key. - * @param {function (err, items)} cb - callback function - * @param {error=} cb.err - error object or null if successful - * @param {array=} cb.items - an array of {@link Registry} objects - * @returns {Registry} this registry key object - */ - keys(cb: (err: Error, result: Array) => void): Registry; - - /** - * Gets a named value from this registry key. - * @param {string} name - the value name, use {@link Registry.DEFAULT_VALUE} or an empty string for the default value - * @param {function (err, item)} cb - callback function - * @param {error=} cb.err - error object or null if successful - * @param {RegistryItem=} cb.item - the retrieved registry item - * @returns {Registry} this registry key object - */ - get(name: string, cb: (err: Error, result: Winreg.RegistryItem) => void): Registry; - - /** - * Sets a named value in this registry key, overwriting an already existing value. - * @param {string} name - the value name, use {@link Registry.DEFAULT_VALUE} or an empty string for the default value - * @param {string} type - the value type - * @param {string} value - the value - * @param {function (err)} cb - callback function - * @param {error=} cb.err - error object or null if successful - * @returns {Registry} this registry key object - */ - set(name: string, type: string, value: string, cb: (err: Error) => void): Registry; - - /** - * Remove a named value from this registry key. If name is empty, sets the default value of this key. - * Note: This key must be already existing. - * @param {string} name - the value name, use {@link Registry.DEFAULT_VALUE} or an empty string for the default value - * @param {function (err)} cb - callback function - * @param {error=} cb.err - error object or null if successful - * @returns {Registry} this registry key object - */ - remove(name: string, cb: (err: Error) => void): Registry; - - /** - * Remove all subkeys and values (including the default value) from this registry key. - * @param {function (err)} cb - callback function - * @param {error=} cb.err - error object or null if successful - * @returns {Registry} this registry key object - */ - clear(cb: (err: Error) => void): Registry; - - /** - * Alias for the clear method to keep it backward compatible. - * @method - * @deprecated Use {@link Registry#clear} or {@link Registry#destroy} in favour of this method. - * @param {function (err)} cb - callback function - * @param {error=} cb.err - error object or null if successful - * @returns {Registry} this registry key object - */ - erase(cb: (err: Error) => void): Registry; - - /** - * Delete this key and all subkeys from the registry. - * @param {function (err)} cb - callback function - * @param {error=} cb.err - error object or null if successful - * @returns {Registry} this registry key object - */ - destroy(cb: (err: Error) => void): Registry; - - /** - * Create this registry key. Note that this is a no-op if the key already exists. - * @param {function (err)} cb - callback function - * @param {error=} cb.err - error object or null if successful - * @returns {Registry} this registry key object - */ - create(cb: (err: Error) => void): Registry; - - /** - * Checks if this key already exists. - * @param {function (err, exists)} cb - callback function - * @param {error=} cb.err - error object or null if successful - * @param {boolean=} cb.exists - true if a registry key with this name already exists - * @returns {Registry} this registry key object - */ - keyExists(cb: (err: Error, exists: boolean) => void): Registry; - - /** - * Checks if a value with the given name already exists within this key. - * @param {string} name - the value name, use {@link Registry.DEFAULT_VALUE} or an empty string for the default value - * @param {function (err, exists)} cb - callback function - * @param {error=} cb.err - error object or null if successful - * @param {boolean=} cb.exists - true if a value with the given name was found in this key - * @returns {Registry} this registry key object - */ - valueExists(name: string, cb: (err: Error, exists: boolean) => void): Registry; - } - - /** - * A single registry value record. - * Objects of this type are created internally and returned by methods of {@link Registry} objects. - */ - export interface RegistryItem { - /** - * The hostname. - * @readonly - */ - host: string; - - /** - * The hive id. - * @readonly - */ - hive: string; - - /** - * The registry key. - * @readonly - */ - key: string; - - /** - * The value name. - * @readonly - */ - name: string; - - /** - * The value type. - * @readonly - */ - type: string; +declare enum Hive { + HKLM, + HKCU, + HKCR, + HKCC, + HKU +} - /** - * The value. - * @readonly - */ - value: string; +interface WinregValue { + host: string; + hive: string; + key: string; + name: string; + type: string; + value: string; +} - /** - * The hive architecture. - * @readonly - */ - arch: string; - } +interface Winreg { + new (options: WinregOptions): Winreg; + host: string; + hive: string; + key: string; + path: string; + parent: Winreg; + + values: (callback: WinregCallback) => void; + keys: (callback: WinregCallback) => void; + get: (name: string, callback: WinregCallback) => void; + set: (name: string, type: string, value: WinregValue, callback: WinregCallback) => void; + remove: (name: string, callback: WinregCallback) => void; + create: (callback: WinregCallback) => void; + erase: (callback: WinregCallback) => void; + + HKLM: Hive; + HKCU: Hive; + HKCR: Hive; + HKCC: Hive; + HKU: Hive; } -declare module "winreg" { - export = Winreg; +interface WinregCallback { + (err: NodeJS.ErrnoException, val: T): void; } +declare var winreg: Winreg; \ No newline at end of file diff --git a/typings/xml2js/xml2js.d.ts b/typings/xml2js/xml2js.d.ts index 5fb4542d..33ad6497 100644 --- a/typings/xml2js/xml2js.d.ts +++ b/typings/xml2js/xml2js.d.ts @@ -1,21 +1,16 @@ // Type definitions for node-xml2js // Project: https://github.com/Leonidas-from-XIV/node-xml2js -// Definitions by: Michel Salib , Jason McNeil , Christopher Currens -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// Definitions by: Michel Salib , Jason McNeil +// Definitions: https://github.com/borisyankov/DefinitelyTyped declare module 'xml2js' { export = xml2js; - namespace xml2js { + module xml2js { function parseString(xml: string, callback: (err: any, result: any) => void): void; function parseString(xml: string, options: Options, callback: (err: any, result: any) => void): void; - var defaults: { - '0.1': Options; - '0.2': OptionsV2; - } - class Builder { constructor(options?: BuilderOptions); buildObject(rootObj: any): string; @@ -55,8 +50,7 @@ declare module 'xml2js' { interface Options { async?: boolean; attrkey?: string; - attrNameProcessors?: [(name: string) => string]; - attrValueProcessors?: [(name: string) => string]; + attrNameProcessors?: (name: string) => string; charkey?: string; charsAsChildren?: boolean; childkey?: string; @@ -70,30 +64,10 @@ declare module 'xml2js' { normalize?: boolean; normalizeTags?: boolean; strict?: boolean; - tagNameProcessors?: [(name: string) => string]; + tagNameProcessors?: (name: string) => string; trim?: boolean; validator?: Function; - valueProcessors?: [(name: string) => string]; xmlns?: boolean; } - - interface OptionsV2 extends Options { - preserveChildrenOrder?: boolean; - rootName?: string; - xmldec?: { - version: string; - encoding?: string; - standalone?: boolean; - }; - doctype?: any; - renderOpts?: { - pretty?: boolean; - indent?: string; - newline?: string; - }; - headless?: boolean; - chunkSize?: number; - cdata?: boolean; - } } } From b690d3d357a9a00fa0f803512f8f46d2a8d26df5 Mon Sep 17 00:00:00 2001 From: sfeldman Date: Tue, 20 Dec 2016 14:29:17 +0200 Subject: [PATCH 105/235] Revert "temporary state after API change" This reverts commit d17e3b9979083392008cca4f108c519ac48dbe17. --- app/exec/build/agent.ts | 37 +- app/exec/build/agents.ts | 2 +- app/exec/build/list.ts | 2 +- app/exec/build/pools.ts | 4 +- app/exec/build/tasks/delete.ts | 8 +- typings/archiver/archiver.d.ts | 12 +- typings/colors/colors.d.ts | 21 +- typings/copy-paste/copy-paste.d.ts | 57 +- typings/form-data/form-data.d.ts | 15 - typings/form-data/form-data2.d.ts | 1 - typings/fs-extra/fs-extra.d.ts | 195 - typings/glob/glob.d.ts | 125 +- typings/jszip/jszip.d.ts | 95 +- typings/lodash/lodash.d.ts | 24437 ++++++++++++++++++----- typings/minimatch/minimatch.d.ts | 73 +- typings/minimist/minimist.d.ts | 38 - typings/mkdirp/mkdirp.d.ts | 4 +- typings/mocha/mocha.d.ts | 214 - typings/node-uuid/node-uuid-base.d.ts | 8 +- typings/node-uuid/node-uuid-cjs.d.ts | 4 +- typings/node-uuid/node-uuid.d.ts | 16 +- typings/node/node.d.ts | 2721 ++- typings/q/Q.d.ts | 330 - typings/read/read.d.ts | 24 - typings/request/request.d.ts | 182 - typings/shelljs/shelljs.d.ts | 29 +- typings/validator/validator.d.ts | 387 +- typings/vso-node-api/vso-node-api.d.ts | 18339 ----------------- typings/winreg/winreg.d.ts | 379 +- typings/xml2js/xml2js.d.ts | 36 +- 30 files changed, 22506 insertions(+), 25289 deletions(-) delete mode 100644 typings/form-data/form-data.d.ts delete mode 100644 typings/form-data/form-data2.d.ts delete mode 100644 typings/fs-extra/fs-extra.d.ts delete mode 100644 typings/minimist/minimist.d.ts delete mode 100644 typings/mocha/mocha.d.ts delete mode 100644 typings/q/Q.d.ts delete mode 100644 typings/read/read.d.ts delete mode 100644 typings/request/request.d.ts delete mode 100644 typings/vso-node-api/vso-node-api.d.ts diff --git a/app/exec/build/agent.ts b/app/exec/build/agent.ts index ad72c6ae..af556ba1 100644 --- a/app/exec/build/agent.ts +++ b/app/exec/build/agent.ts @@ -40,18 +40,18 @@ export class Agent extends agentBase.BuildBase ao) - if(ao.length > 0) { - var aid = ao[0].id; - var an = ao[0].name; - trace.debug("found, agent id %s for agent name %s",aid, an); - return this._getOrUpdateAgent(agentapi, pool as number,aid,newkey as string,value as string,include,disable as string); - } - else { - trace.debug("No agents found with name " + agentname); - throw new Error("No agents found with name " + agentname); - } + return agentapi.getAgents(pool as number, agentname as string).then((ao: taskAgentContracts.TaskAgent[]) => { + if(ao.length > 0) { + var aid = ao[0].id; + var an = ao[0].name; + trace.debug("found, agent id %s for agent name %s",aid, an); + return this._getOrUpdateAgent(agentapi, pool as number,aid,newkey as string,value as string,include,disable as string); + } + else { + trace.debug("No agents found with name " + agentname); + throw new Error("No agents found with name " + agentname); + } + }); } trace.debug("disable request: %s",disable); return this._getOrUpdateAgent(agentapi, pool as number,agentid as number,newkey as string,value as string,include,disable as string); @@ -82,22 +82,21 @@ export class Agent extends agentBase.BuildBase agent); + return agentapi.getAgent(pool,agentid,true,true,null).then((agent) => { trace.debug("disable request: %s",disable); if (disable) { if (disable == "true") { include = false; trace.debug("agent status (enabled): %s",agent.enabled); agent.enabled = false; - agentapi.updateAgent(agent,pool,agentid,(err: any, statusCode: number, agent:taskAgentContracts.TaskAgent) => agent); + agentapi.updateAgent(agent,pool,agentid); trace.debug("agent status (enabled): %s",agent.enabled); } if (disable == "false") { include = false; trace.debug("agent status (enabled): %s",agent.enabled); agent.enabled = true; - agentapi.updateAgent(agent,pool,agentid,(err: any, statusCode: number, agent:taskAgentContracts.TaskAgent) => agent); + agentapi.updateAgent(agent,pool,agentid); trace.debug("agent status (enabled): %s",agent.enabled); } if (disable != "true" && disable != "false") { @@ -108,9 +107,9 @@ export class Agent extends agentBase.BuildBase agent); + agentapi.updateAgentUserCapabilities(capabilities,pool,agentid); }; - agentapi.getAgent(pool,agentid,include,include,null,(err: any, statusCode: number, agent:taskAgentContracts.TaskAgent) => agent); - return agent; + return agentapi.getAgent(pool,agentid,include,include,null); + }); } } \ No newline at end of file diff --git a/app/exec/build/agents.ts b/app/exec/build/agents.ts index 3d257530..69a68f47 100644 --- a/app/exec/build/agents.ts +++ b/app/exec/build/agents.ts @@ -22,7 +22,7 @@ export class Agents extends agentBase.BuildBase { trace.debug("getting pool : %s",pool); - return agentapi.getAgents(pool,"",true,null,null,null,(err: any, statusCode: number, ao:taskAgentContracts.TaskAgent[]) => ao); + return agentapi.getAgents(pool); }); } diff --git a/app/exec/build/list.ts b/app/exec/build/list.ts index 3bdc13b4..3ea288fc 100644 --- a/app/exec/build/list.ts +++ b/app/exec/build/list.ts @@ -71,6 +71,6 @@ export class BuildGetList extends buildBase.BuildBase { trace.debug("pool.exec"); var agentapi: agentClient.ITaskAgentApiBase = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl().substring(0,this.connection.getCollectionUrl().lastIndexOf("/"))); - var pools: taskAgentContracts.TaskAgentPool[] = null; - agentapi.getAgentPools(null,null,(err: any,statusCode: number, pools: taskAgentContracts.TaskAgentPool[]) => pools); - return Promise.resolve(pools); + return agentapi.getAgentPools(); } public friendlyOutput(pools: taskAgentContracts.TaskAgentPool[]): void { diff --git a/app/exec/build/tasks/delete.ts b/app/exec/build/tasks/delete.ts index aa432cbc..5ae8d0ca 100644 --- a/app/exec/build/tasks/delete.ts +++ b/app/exec/build/tasks/delete.ts @@ -18,20 +18,20 @@ export class BuildTaskDelete extends tasksBase.BuildTaskBase { let agentApi = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl()); return this.commandArgs.taskId.val().then((taskId) => { - var tasks: agentContracts.TaskDefinition[] = null; - agentApi.getTaskDefinitions(taskId,null,false,(err: any, statusCode: number, tasks:agentContracts.TaskDefinition[]) => tasks) + return agentApi.getTaskDefinitions(taskId).then((tasks) => { if (tasks && tasks.length > 0) { trace.debug("Deleting task(s)..."); - var task:agentContracts.TaskDefinition = null; - agentApi.deleteTaskDefinition(taskId,(err: any, statusCode: number) => task); + return agentApi.deleteTaskDefinition(taskId).then(() => { return { id: taskId }; + }); } else { trace.debug("No such task."); throw new Error("No task found with provided ID: " + taskId); } }); + }); } public friendlyOutput(data: agentContracts.TaskDefinition): void { diff --git a/typings/archiver/archiver.d.ts b/typings/archiver/archiver.d.ts index e39fe426..33b26062 100644 --- a/typings/archiver/archiver.d.ts +++ b/typings/archiver/archiver.d.ts @@ -1,7 +1,7 @@ // Type definitions for archiver v0.15.0 // Project: https://github.com/archiverjs/node-archiver // Definitions by: Esri -// Definitions: https://github.com/borisyankov/DefinitelyTyped +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /* =================== USAGE =================== @@ -13,18 +13,18 @@ =============================================== */ - +/// declare module "archiver" { import * as FS from 'fs'; - import * as Stream from "stream"; + import * as STREAM from 'stream'; interface nameInterface { name?: string; } - interface Archiver extends Stream.Transform { + interface Archiver extends STREAM.Transform { pipe(writeStream: FS.WriteStream): void; - append(readStream: FS.ReadStream, name: nameInterface): void; + append(source: FS.ReadStream | Buffer | string, name: nameInterface): void; finalize(): void; directory(dirpath: string, destpath?: string | boolean, data?: any) } @@ -40,4 +40,4 @@ declare module "archiver" { } export = archiver; -} \ No newline at end of file +} diff --git a/typings/colors/colors.d.ts b/typings/colors/colors.d.ts index c7e3abf2..50e960c4 100644 --- a/typings/colors/colors.d.ts +++ b/typings/colors/colors.d.ts @@ -1,13 +1,15 @@ - // Type definitions for Colors.js 0.6.0-1 // Project: https://github.com/Marak/colors.js // Definitions by: Bart van der Schoor -// Definitions: https://github.com/borisyankov/DefinitelyTyped +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare module "colors" { interface Color { (text: string): string; + strip: Color; + stripColors: Color; + black: Color; red: Color; green: Color; @@ -42,11 +44,17 @@ declare module "colors" { america: Color; trap: Color; random: Color; + zalgo: Color; } - module e { + namespace e { export function setTheme(theme:any): void; + export var enabled: boolean; + + export var strip: Color; + export var stripColors: Color; + export var black: Color; export var red: Color; export var green: Color; @@ -81,12 +89,16 @@ declare module "colors" { export var america: Color; export var trap: Color; export var random: Color; + export var zalgo: Color; } export = e; } interface String { + strip: string; + stripColors: string; + black: string; red: string; green: string; @@ -121,4 +133,5 @@ interface String { america: string; trap: string; random: string; -} \ No newline at end of file + zalgo: string; +} diff --git a/typings/copy-paste/copy-paste.d.ts b/typings/copy-paste/copy-paste.d.ts index 9ed43567..a8a844b5 100644 --- a/typings/copy-paste/copy-paste.d.ts +++ b/typings/copy-paste/copy-paste.d.ts @@ -1,19 +1,46 @@ -// Type definitions for copy-paste +// Type definitions for copy-paste v1.1.3 // Project: https://github.com/xavi-/node-copy-paste +// Definitions by: Tobias Kahlert +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare module 'copy-paste' { + + export type CopyCallback = (err: Error) => void; + export type PasteCallback = (err: Error, content: string) => void; - interface ClipboardFunctions { - copy: (text: string, callback?: (err: NodeJS.ErrnoException, text: string) => void) => void; - paste: ((callback: (err: NodeJS.ErrnoException, text: string) => void) => void | - (() => string)); - } - - interface CopyPaste extends ClipboardFunctions { - global: () => ClipboardFunctions; - } - - var copyPaste: CopyPaste; - - export = copyPaste; -} + /** + * Asynchronously replaces the current contents of the clip board with text. + * + * @param {T} content Takes either a string, array, object, or readable stream. + * @return {T} Returns the same value passed in. + */ + export function copy(content: T): T; + + /** + * Asynchronously replaces the current contents of the clip board with text. + * + * @param {T} content Takes either a string, array, object, or readable stream. + * @param {CopyCallback} callback will fire when the copy operation is complete. + * @return {T} Returns the same value passed in. + */ + export function copy(content: T, callback: CopyCallback): T; + + + /** + * Synchronously returns the current contents of the system clip board. + * + * Note: The synchronous version of paste is not always availabled. + * An error message is shown if the synchronous version of paste is used on an unsupported platform. + * The asynchronous version of paste is always available. + * + * @return {string} Returns the current contents of the system clip board. + */ + export function paste(): string; + + /** + * Asynchronously returns the current contents of the system clip board. + * + * @param {PasteCallback} callback The contents of the system clip board are passed to the callback as the second parameter. + */ + export function paste(callback: PasteCallback): void; +} \ No newline at end of file diff --git a/typings/form-data/form-data.d.ts b/typings/form-data/form-data.d.ts deleted file mode 100644 index 0f22b8ff..00000000 --- a/typings/form-data/form-data.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -// Type definitions for form-data -// Project: https://github.com/felixge/node-form-data -// Definitions by: Carlos Ballesteros Velasco -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -// Imported from: https://github.com/soywiz/typescript-node-definitions/form-data.d.ts - -declare module "form-data" { - export class FormData { - append(key: string, value: any): FormData; - getHeaders(): Object; - // TODO expand pipe - pipe(to: any): any; - } -} diff --git a/typings/form-data/form-data2.d.ts b/typings/form-data/form-data2.d.ts deleted file mode 100644 index bab077f0..00000000 --- a/typings/form-data/form-data2.d.ts +++ /dev/null @@ -1 +0,0 @@ -//type definitions for form-data diff --git a/typings/fs-extra/fs-extra.d.ts b/typings/fs-extra/fs-extra.d.ts deleted file mode 100644 index 852956a7..00000000 --- a/typings/fs-extra/fs-extra.d.ts +++ /dev/null @@ -1,195 +0,0 @@ -// Type definitions for fs-extra -// Project: https://github.com/jprichardson/node-fs-extra -// Definitions by: midknight41 -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -// Imported from: https://github.com/soywiz/typescript-node-definitions/fs-extra.d.ts - -/// - -declare module "fs-extra" { - import stream = require("stream"); - - export interface Stats { - isFile(): boolean; - isDirectory(): boolean; - isBlockDevice(): boolean; - isCharacterDevice(): boolean; - isSymbolicLink(): boolean; - isFIFO(): boolean; - isSocket(): boolean; - dev: number; - ino: number; - mode: number; - nlink: number; - uid: number; - gid: number; - rdev: number; - size: number; - blksize: number; - blocks: number; - atime: Date; - mtime: Date; - ctime: Date; - } - - export interface FSWatcher { - close(): void; - } - - export class ReadStream extends stream.Readable { } - export class WriteStream extends stream.Writable { } - - //extended methods - export function copy(src: string, dest: string, callback?: (err: Error) => void): void; - export function copy(src: string, dest: string, filter: (src: string) => boolean, callback?: (err: Error) => void): void; - - export function copySync(src: string, dest: string): void; - export function copySync(src: string, dest: string, filter: (src: string) => boolean): void; - - export function createFile(file: string, callback?: (err: Error) => void): void; - export function createFileSync(file: string): void; - - export function mkdirs(dir: string, callback?: (err: Error) => void): void; - export function mkdirp(dir: string, callback?: (err: Error) => void): void; - export function mkdirs(dir: string, options?: MkdirOptions, callback?: (err: Error) => void): void; - export function mkdirp(dir: string, options?: MkdirOptions, callback?: (err: Error) => void): void; - export function mkdirsSync(dir: string, options?: MkdirOptions): void; - export function mkdirpSync(dir: string, options?: MkdirOptions): void; - - export function outputFile(file: string, data: any, callback?: (err: Error) => void): void; - export function outputFileSync(file: string, data: any): void; - - export function outputJson(file: string, data: any, callback?: (err: Error) => void): void; - export function outputJSON(file: string, data: any, callback?: (err: Error) => void): void; - export function outputJsonSync(file: string, data: any): void; - export function outputJSONSync(file: string, data: any): void; - - export function readJson(file: string, callback?: (err: Error) => void): void; - export function readJson(file: string, options?: OpenOptions, callback?: (err: Error) => void): void; - export function readJSON(file: string, callback?: (err: Error) => void): void; - export function readJSON(file: string, options?: OpenOptions, callback?: (err: Error) => void): void; - - export function readJsonSync(file: string, options?: OpenOptions): void; - export function readJSONSync(file: string, options?: OpenOptions): void; - - export function remove(dir: string, callback?: (err: Error) => void): void; - export function removeSync(dir: string): void; - // export function delete(dir: string, callback?: (err: Error) => void): void; - // export function deleteSync(dir: string): void; - - export function writeJson(file: string, object: any, callback?: (err: Error) => void): void; - export function writeJson(file: string, object: any, options?: OpenOptions, callback?: (err: Error) => void): void; - export function writeJSON(file: string, object: any, callback?: (err: Error) => void): void; - export function writeJSON(file: string, object: any, options?: OpenOptions, callback?: (err: Error) => void): void; - - export function writeJsonSync(file: string, object: any, options?: OpenOptions): void; - export function writeJSONSync(file: string, object: any, options?: OpenOptions): void; - - export function rename(oldPath: string, newPath: string, callback?: (err: Error) => void): void; - export function renameSync(oldPath: string, newPath: string): void; - export function truncate(fd: number, len: number, callback?: (err: Error) => void): void; - export function truncateSync(fd: number, len: number): void; - export function chown(path: string, uid: number, gid: number, callback?: (err: Error) => void): void; - export function chownSync(path: string, uid: number, gid: number): void; - export function fchown(fd: number, uid: number, gid: number, callback?: (err: Error) => void): void; - export function fchownSync(fd: number, uid: number, gid: number): void; - export function lchown(path: string, uid: number, gid: number, callback?: (err: Error) => void): void; - export function lchownSync(path: string, uid: number, gid: number): void; - export function chmod(path: string, mode: number, callback?: (err: Error) => void): void; - export function chmod(path: string, mode: string, callback?: (err: Error) => void): void; - export function chmodSync(path: string, mode: number): void; - export function chmodSync(path: string, mode: string): void; - export function fchmod(fd: number, mode: number, callback?: (err: Error) => void): void; - export function fchmod(fd: number, mode: string, callback?: (err: Error) => void): void; - export function fchmodSync(fd: number, mode: number): void; - export function fchmodSync(fd: number, mode: string): void; - export function lchmod(path: string, mode: string, callback?: (err: Error) => void): void; - export function lchmod(path: string, mode: number, callback?: (err: Error) => void): void; - export function lchmodSync(path: string, mode: number): void; - export function lchmodSync(path: string, mode: string): void; - export function stat(path: string, callback?: (err: Error, stats: Stats) => void): void; - export function lstat(path: string, callback?: (err: Error, stats: Stats) => void): void; - export function fstat(fd: number, callback?: (err: Error, stats: Stats) => void): void; - export function statSync(path: string): Stats; - export function lstatSync(path: string): Stats; - export function fstatSync(fd: number): Stats; - export function link(srcpath: string, dstpath: string, callback?: (err: Error) => void): void; - export function linkSync(srcpath: string, dstpath: string): void; - export function symlink(srcpath: string, dstpath: string, type?: string, callback?: (err: Error) => void): void; - export function symlinkSync(srcpath: string, dstpath: string, type?: string): void; - export function readlink(path: string, callback?: (err: Error, linkString: string) => void): void; - export function realpath(path: string, callback?: (err: Error, resolvedPath: string) => void): void; - export function realpath(path: string, cache: string, callback: (err: Error, resolvedPath: string) => void): void; - export function realpathSync(path: string, cache?: boolean): string; - export function unlink(path: string, callback?: (err: Error) => void): void; - export function unlinkSync(path: string): void; - export function rmdir(path: string, callback?: (err: Error) => void): void; - export function rmdirSync(path: string): void; - export function mkdir(path: string, mode?: number, callback?: (err: Error) => void): void; - export function mkdir(path: string, mode?: string, callback?: (err: Error) => void): void; - export function mkdirSync(path: string, mode?: number): void; - export function mkdirSync(path: string, mode?: string): void; - export function readdir(path: string, callback?: (err: Error, files: string[]) => void ): void; - export function readdirSync(path: string): string[]; - export function close(fd: number, callback?: (err: Error) => void): void; - export function closeSync(fd: number): void; - export function open(path: string, flags: string, mode?: string, callback?: (err: Error, fs: number) => void): void; - export function openSync(path: string, flags: string, mode?: string): number; - export function utimes(path: string, atime: number, mtime: number, callback?: (err: Error) => void): void; - export function utimesSync(path: string, atime: number, mtime: number): void; - export function futimes(fd: number, atime: number, mtime: number, callback?: (err: Error) => void): void; - export function futimesSync(fd: number, atime: number, mtime: number): void; - export function fsync(fd: number, callback?: (err: Error) => void): void; - export function fsyncSync(fd: number): void; - export function write(fd: number, buffer: NodeBuffer, offset: number, length: number, position: number, callback?: (err: Error, written: number, buffer: NodeBuffer) => void): void; - export function writeSync(fd: number, buffer: NodeBuffer, offset: number, length: number, position: number): number; - export function read(fd: number, buffer: NodeBuffer, offset: number, length: number, position: number, callback?: (err: Error, bytesRead: number, buffer: NodeBuffer) => void ): void; - export function readSync(fd: number, buffer: NodeBuffer, offset: number, length: number, position: number): number; - export function readFile(filename: string, encoding: string, callback: (err: Error, data: string) => void ): void; - export function readFile(filename: string, options: OpenOptions, callback: (err: Error, data: string) => void ): void; - export function readFile(filename: string, callback: (err: Error, data: NodeBuffer) => void ): void; - export function readFileSync(filename: string): NodeBuffer; - export function readFileSync(filename: string, encoding: string): string; - export function readFileSync(filename: string, options: OpenOptions): string; - export function writeFile(filename: string, data: any, encoding?: string, callback?: (err: Error) => void): void; - export function writeFile(filename: string, data: any, options?: OpenOptions, callback?: (err: Error) => void): void; - export function writeFileSync(filename: string, data: any, encoding?: string): void; - export function writeFileSync(filename: string, data: any, option?: OpenOptions): void; - export function appendFile(filename: string, data: any, encoding?: string, callback?: (err: Error) => void): void; - export function appendFile(filename: string, data: any,option?: OpenOptions, callback?: (err: Error) => void): void; - export function appendFileSync(filename: string, data: any, encoding?: string): void; - export function appendFileSync(filename: string, data: any, option?: OpenOptions): void; - export function watchFile(filename: string, listener: { curr: Stats; prev: Stats; }): void; - export function watchFile(filename: string, options: { persistent?: boolean; interval?: number; }, listener: { curr: Stats; prev: Stats; }): void; - export function unwatchFile(filename: string, listener?: Stats): void; - export function watch(filename: string, options?: { persistent?: boolean; }, listener?: (event: string, filename: string) => any): FSWatcher; - export function exists(path: string, callback?: (exists: boolean) => void ): void; - export function existsSync(path: string): boolean; - export function ensureDir(path: string, cb: (err: Error) => void): void; - - export interface OpenOptions { - encoding?: string; - flag?: string; - } - - export interface MkdirOptions { - fs?: any; - mode?: number; - } - - export interface ReadStreamOptions { - flags?: string; - encoding?: string; - fd?: number; - mode?: number; - bufferSize?: number; - } - export interface WriteStreamOptions { - flags?: string; - encoding?: string; - string?: string; - } - export function createReadStream(path: string, options?: ReadStreamOptions): ReadStream; - export function createWriteStream(path: string, options?: WriteStreamOptions): WriteStream; -} diff --git a/typings/glob/glob.d.ts b/typings/glob/glob.d.ts index c5ab0047..2957204f 100644 --- a/typings/glob/glob.d.ts +++ b/typings/glob/glob.d.ts @@ -1,71 +1,112 @@ -// Type definitions for Glob +// Type definitions for Glob 5.0.10 // Project: https://github.com/isaacs/node-glob // Definitions by: vvakame -// Definitions: https://github.com/borisyankov/DefinitelyTyped - - +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +/// +/// declare module "glob" { import events = require("events"); + import fs = require('fs'); import minimatch = require("minimatch"); - function G(pattern:string, cb:(err:Error, matches:string[])=>void):void; + function G(pattern: string, cb: (err: Error, matches: string[]) => void): void; + function G(pattern: string, options: G.IOptions, cb: (err: Error, matches: string[]) => void): void; - function G(pattern:string, options:G.IOptions, cb:(err:Error, matches:string[])=>void):void; + namespace G { + function sync(pattern: string, options?: IOptions): string[]; - module G { - function sync(pattern:string, options?:IOptions):string[]; + function hasMagic(pattern: string, options?: IOptions): boolean; - var Glob:IGlobStatic; + var Glob: IGlobStatic; + var GlobSync: IGlobSyncStatic; interface IOptions extends minimatch.IOptions { cwd?: string; - sync?: boolean; + root?: string; + dot?: boolean; nomount?: boolean; - matchBase?:any; - noglobstar?:any; + mark?: boolean; + nosort?: boolean; + stat?: boolean; + silent?: boolean; strict?: boolean; - dot?:boolean; - mark?:boolean; - nounique?:boolean; - nonull?:boolean; - nosort?:boolean; - nocase?:boolean; - stat?:boolean; - debug?:boolean; - globDebug?:boolean; - silent?:boolean; + cache?: { [path: string]: any /* boolean | string | string[] */ }; + statCache?: { [path: string]: fs.Stats }; + symlinks?: any; + sync?: boolean; + nounique?: boolean; + nonull?: boolean; + debug?: boolean; + nobrace?: boolean; + noglobstar?: boolean; + noext?: boolean; + nocase?: boolean; + matchBase?: any; + nodir?: boolean; + ignore?: any; /* string | string[] */ + follow?: boolean; + realpath?: boolean; + nonegate?: boolean; + nocomment?: boolean; + + /** Deprecated. */ + globDebug?: boolean; } interface IGlobStatic extends events.EventEmitter { - new (pattern:string, cb?:(err:Error, matches:string[])=>void):IGlob; - new (pattern:string, options:any, cb?:(err:Error, matches:string[])=>void):IGlob; + new (pattern: string, cb?: (err: Error, matches: string[]) => void): IGlob; + new (pattern: string, options: IOptions, cb?: (err: Error, matches: string[]) => void): IGlob; + prototype: IGlob; + } + + interface IGlobSyncStatic { + new (pattern: string, options?: IOptions): IGlobBase + prototype: IGlobBase; } - interface IGlob { - EOF:any; - paused:boolean; - maxDepth:number; - maxLength:number; - cache:any; - statCache:any; - changedCwd:boolean; + interface IGlobBase { + minimatch: minimatch.IMinimatch; + options: IOptions; + aborted: boolean; + cache: { [path: string]: any /* boolean | string | string[] */ }; + statCache: { [path: string]: fs.Stats }; + symlinks: { [path: string]: boolean }; + realpathCache: { [path: string]: string }; + found: string[]; + } + + interface IGlob extends IGlobBase, events.EventEmitter { + pause(): void; + resume(): void; + abort(): void; + + /** Deprecated. */ + EOF: any; + /** Deprecated. */ + paused: boolean; + /** Deprecated. */ + maxDepth: number; + /** Deprecated. */ + maxLength: number; + /** Deprecated. */ + changedCwd: boolean; + /** Deprecated. */ cwd: string; + /** Deprecated. */ root: string; + /** Deprecated. */ error: any; - aborted: boolean; - minimatch: minimatch.IMinimatch; - matches:string[]; - - log(...args:any[]):void; - abort():void; - pause():void; - resume():void; - emitMatch(m:any):void; + /** Deprecated. */ + matches: string[]; + /** Deprecated. */ + log(...args: any[]): void; + /** Deprecated. */ + emitMatch(m: any): void; } } -export = G; + export = G; } diff --git a/typings/jszip/jszip.d.ts b/typings/jszip/jszip.d.ts index ce3376b5..46fe0f87 100644 --- a/typings/jszip/jszip.d.ts +++ b/typings/jszip/jszip.d.ts @@ -1,19 +1,11 @@ // Type definitions for JSZip // Project: http://stuk.github.com/jszip/ // Definitions by: mzeiher -// Definitions: https://github.com/borisyankov/DefinitelyTyped +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped interface JSZip { - /** - * List of files in the archive - */ - files: {[name: string]: JSZipObject}; - - /** - * The comment of the archive - */ - comment: string; - + files: {[key: string]: JSZipObject}; + /** * Get a file from the archive * @@ -56,6 +48,13 @@ interface JSZip { */ folder(name: RegExp): JSZipObject[]; + /** + * Call a callback function for each entry at this folder level. + * + * @param callback function + */ + forEach(callback: (relativePath: string, file: JSZipObject) => void): void; + /** * Get all files wchich match the given filter function * @@ -73,23 +72,40 @@ interface JSZip { remove(path: string): JSZip; /** - * Generates a new archive + * @deprecated since version 3.0 + * @see {@link generateAsync} + * http://stuk.github.io/jszip/documentation/upgrade_guide.html + */ + generate(options?: JSZipGeneratorOptions): any; + + /** + * Generates a new archive asynchronously * * @param options Optional options for the generator * @return The serialized archive */ - generate(options?: JSZipGeneratorOptions): any; + generateAsync(options?: JSZipGeneratorOptions, onUpdate?: Function): Promise; + + /** + * @deprecated since version 3.0 + * @see {@link loadAsync} + * http://stuk.github.io/jszip/documentation/upgrade_guide.html + */ + load(): void; /** - * Deserialize zip file + * Deserialize zip file asynchronously * * @param data Serialized zip file * @param options Options for deserializing - * @return Returns the JSZip instance + * @return Returns promise */ - load(data: any, options: JSZipLoadOptions): JSZip; + loadAsync(data: any, options?: JSZipLoadOptions): Promise; } +type Serialization = ("string" | "text" | "base64" | "binarystring" | "uint8array" | + "arraybuffer" | "blob" | "nodebuffer"); + interface JSZipObject { name: string; dir: boolean; @@ -97,11 +113,31 @@ interface JSZipObject { comment: string; options: JSZipObjectOptions; - asText(): string; - asBinary(): string; - asArrayBuffer(): ArrayBuffer; - asUint8Array(): Uint8Array; - //asNodeBuffer(): Buffer; + /** + * Prepare the content in the asked type. + * @param {String} type the type of the result. + * @param {Function} onUpdate a function to call on each internal update. + * @return Promise the promise of the result. + */ + async(type: Serialization, onUpdate?: Function): Promise; + + /** + * @deprecated since version 3.0 + */ + asText(): void; + /** + * @deprecated since version 3.0 + */ + asBinary(): void; + /** + * @deprecated since version 3.0 + */ + asArrayBuffer(): void; + /** + * @deprecated since version 3.0 + */ + asUint8Array(): void; + //asNodeBuffer(): void; } interface JSZipFileOptions { @@ -131,11 +167,9 @@ interface JSZipGeneratorOptions { base64?: boolean; /** DEFLATE or STORE */ compression?: string; - compressionOptions?: any; /** base64 (default), string, uint8array, blob */ type?: string; comment?: string; - platform?: string; } interface JSZipLoadOptions { @@ -152,18 +186,6 @@ interface JSZipSupport { nodebuffer: boolean; } -interface DEFLATE { - /** pako.deflateRaw, level:0-9 */ - compress(input: string, compressionOptions: {level:number}): Uint8Array; - compress(input: number[], compressionOptions: {level:number}): Uint8Array; - compress(input: Uint8Array, compressionOptions: {level:number}): Uint8Array; - - /** pako.inflateRaw */ - uncompress(input: string): Uint8Array; - uncompress(input: number[]): Uint8Array; - uncompress(input: Uint8Array): Uint8Array; -} - declare var JSZip: { /** * Create JSZip instance @@ -193,9 +215,6 @@ declare var JSZip: { prototype: JSZip; support: JSZipSupport; - compressions: { - DEFLATE: DEFLATE; - } } declare module "jszip" { diff --git a/typings/lodash/lodash.d.ts b/typings/lodash/lodash.d.ts index a28ce877..3305528a 100644 --- a/typings/lodash/lodash.d.ts +++ b/typings/lodash/lodash.d.ts @@ -1,7 +1,240 @@ -// Type definitions for Lo-Dash +// Type definitions for Lo-Dash 4.14 // Project: http://lodash.com/ -// Definitions by: Brian Zengel -// Definitions: https://github.com/borisyankov/DefinitelyTyped +// Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + + +/** +### 4.0.0 Changelog (https://github.com/lodash/lodash/wiki/Changelog) + +#### TODO: +removed: +- [x] Removed _.support +- [x] Removed _.findWhere in favor of _.find with iteratee shorthand +- [x] Removed _.where in favor of _.filter with iteratee shorthand +- [x] Removed _.pluck in favor of _.map with iteratee shorthand + +renamed: +- [x] Renamed _.first to _.head +- [x] Renamed _.indexBy to _.keyBy +- [x] Renamed _.invoke to _.invokeMap +- [x] Renamed _.overArgs to _.overArgs +- [x] Renamed _.padLeft & _.padRight to _.padStart & _.padEnd +- [x] Renamed _.pairs to _.toPairs +- [x] Renamed _.rest to _.tail +- [x] Renamed _.restParam to _.rest +- [x] Renamed _.sortByOrder to _.orderBy +- [x] Renamed _.trimLeft & _.trimRight to _.trimStart & _.trimEnd +- [x] Renamed _.trunc to _.truncate + +split: +- [x] Split _.indexOf & _.lastIndexOf into _.sortedIndexOf & _.sortedLastIndexOf +- [x] Split _.max & _.min into _.maxBy & _.minBy +- [x] Split _.omit & _.pick into _.omitBy & _.pickBy +- [x] Split _.sample into _.sampleSize +- [x] Split _.sortedIndex into _.sortedIndexBy +- [x] Split _.sortedLastIndex into _.sortedLastIndexBy +- [x] Split _.uniq into _.sortedUniq, _.sortedUniqBy, & _.uniqBy + +changes: +- [x] Absorbed _.sortByAll into _.sortBy +- [x] Changed the category of _.at to “Object” +- [x] Changed the category of _.bindAll to “Utility” +- [x] Made _.capitalize uppercase the first character & lowercase the rest +- [x] Made _.functions return only own method names + + +added 23 array methods: +- [x] _.concat +- [x] _.differenceBy +- [x] _.differenceWith +- [x] _.flatMap +- [x] _.fromPairs +- [x] _.intersectionBy +- [x] _.intersectionWith +- [x] _.join +- [x] _.pullAll +- [x] _.pullAllBy +- [x] _.reverse +- [x] _.sortedIndexBy +- [x] _.sortedIndexOf +- [x] _.sortedLastIndexBy +- [x] _.sortedLastIndexOf +- [x] _.sortedUniq +- [x] _.sortedUniqBy +- [x] _.unionBy +- [x] _.unionWith +- [x] _.uniqBy +- [x] _.uniqWith +- [x] _.xorBy +- [x] _.xorWith + +added 18 lang methods: +- [x] _.cloneDeepWith +- [x] _.cloneWith +- [x] _.eq +- [x] _.isArrayLike +- [x] _.isArrayLikeObject +- [x] _.isEqualWith +- [x] _.isInteger +- [x] _.isLength +- [x] _.isMatchWith +- [x] _.isNil +- [x] _.isObjectLike +- [x] _.isSafeInteger +- [x] _.isSymbol +- [x] _.toInteger +- [x] _.toLength +- [x] _.toNumber +- [x] _.toSafeInteger +- [x] _.toString + +added 13 object methods: +- [x] _.assignIn +- [x] _.assignInWith +- [x] _.assignWith +- [x] _.functionsIn +- [x] _.hasIn +- [x] _.mergeWith +- [x] _.omitBy +- [x] _.pickBy + + +added 8 string methods: +- [x] _.lowerCase +- [x] _.lowerFirst +- [x] _.upperCase +- [x] _.upperFirst +- [x] _.toLower +- [x] _.toUpper + +added 8 utility methods: +- [x] _.toPath + +added 4 math methods: +- [x] _.maxBy +- [x] _.mean +- [x] _.minBy +- [x] _.sumBy + +added 2 function methods: +- [x] _.flip +- [x] _.unary + +added 2 number methods: +- [x] _.clamp +- [x] _.subtract + +added collection method: +- [x] _.sampleSize + +Added 3 aliases + +- [x] _.first as an alias of _.head + +Removed 17 aliases +- [x] Removed aliase _.all +- [x] Removed aliase _.any +- [x] Removed aliase _.backflow +- [x] Removed aliase _.callback +- [x] Removed aliase _.collect +- [x] Removed aliase _.compose +- [x] Removed aliase _.contains +- [x] Removed aliase _.detect +- [x] Removed aliase _.foldl +- [x] Removed aliase _.foldr +- [x] Removed aliase _.include +- [x] Removed aliase _.inject +- [x] Removed aliase _.methods +- [x] Removed aliase _.object +- [x] Removed aliase _.run +- [x] Removed aliase _.select +- [x] Removed aliase _.unique + +Other changes +- [x] Added support for array buffers to _.isEqual +- [x] Added support for converting iterators to _.toArray +- [x] Added support for deep paths to _.zipObject +- [x] Changed UMD to export to window or self when available regardless of other exports +- [x] Ensured debounce cancel clears args & thisArg references +- [x] Ensured _.add, _.subtract, & _.sum don’t skip NaN values +- [x] Ensured _.clone treats generators like functions +- [x] Ensured _.clone produces clones with the source’s [[Prototype]] +- [x] Ensured _.defaults assigns properties that shadow Object.prototype +- [x] Ensured _.defaultsDeep doesn’t merge a string into an array +- [x] Ensured _.defaultsDeep & _.merge don’t modify sources +- [x] Ensured _.defaultsDeep works with circular references +- [x] Ensured _.keys skips “length” on strict mode arguments objects in Safari 9 +- [x] Ensured _.merge doesn’t convert strings to arrays +- [x] Ensured _.merge merges plain-objects onto non plain-objects +- [x] Ensured _#plant resets iterator data of cloned sequences +- [x] Ensured _.random swaps min & max if min is greater than max +- [x] Ensured _.range preserves the sign of start of -0 +- [x] Ensured _.reduce & _.reduceRight use getIteratee in their array branch +- [x] Fixed rounding issue with the precision param of _.floor +- [x] Added flush method to debounced & throttled functions + +** LATER ** +Misc: +- [ ] Made _.forEach, _.forIn, _.forOwn, & _.times implicitly end a chain sequence +- [ ] Removed thisArg params from most methods +- [ ] Made “By” methods provide a single param to iteratees +- [ ] Made _.words chainable by default +- [ ] Removed isDeep params from _.clone & _.flatten +- [ ] Removed _.bindAll support for binding all methods when no names are provided +- [ ] Removed func-first param signature from _.before & _.after +- [ ] _.extend as an alias of _.assignIn +- [ ] _.extendWith as an alias of _.assignInWith +- [ ] Added clear method to _.memoize.Cache +- [ ] Added support for ES6 maps, sets, & symbols to _.clone, _.isEqual, & _.toArray +- [ ] Enabled _.flow & _.flowRight to accept an array of functions +- [ ] Ensured “Collection” methods treat functions as objects +- [ ] Ensured _.assign, _.defaults, & _.merge coerce object values to objects +- [ ] Ensured _.bindKey bound functions call object[key] when called with the new operator +- [ ] Ensured _.isFunction returns true for generator functions +- [ ] Ensured _.merge assigns typed arrays directly +- [ ] Made _(...) an iterator & iterable +- [ ] Made _.drop, _.take, & right forms coerce n of undefined to 0 + +Methods: +- [ ] _.concat +- [ ] _.differenceBy +- [ ] _.differenceWith +- [ ] _.flatMap +- [ ] _.fromPairs +- [ ] _.intersectionBy +- [ ] _.intersectionWith +- [ ] _.join +- [ ] _.pullAll +- [ ] _.pullAllBy +- [ ] _.reverse +- [ ] _.sortedLastIndexOf +- [ ] _.unionBy +- [ ] _.unionWith +- [ ] _.uniqWith +- [ ] _.xorBy +- [ ] _.xorWith +- [ ] _.toString + +- [ ] _.invoke +- [ ] _.setWith +- [ ] _.toPairs +- [ ] _.toPairsIn +- [ ] _.unset + +- [ ] _.replace +- [ ] _.split + +- [ ] _.cond +- [ ] _.conforms +- [ ] _.nthArg +- [ ] _.over +- [ ] _.overEvery +- [ ] _.overSome +- [ ] _.rangeRight + +- [ ] _.next +*/ declare var _: _.LoDashStatic; @@ -20,10 +253,10 @@ declare module _ { * after, assign, bind, bindAll, bindKey, chain, chunk, compact, compose, concat, countBy, * createCallback, curry, debounce, defaults, defer, delay, difference, filter, flatten, * forEach, forEachRight, forIn, forInRight, forOwn, forOwnRight, functions, groupBy, - * indexBy, initial, intersection, invert, invoke, keys, map, max, memoize, merge, min, + * keyBy, initial, intersection, invert, invoke, keys, map, max, memoize, merge, min, * object, omit, once, pairs, partial, partialRight, pick, pluck, pull, push, range, reject, - * remove, rest, reverse, shuffle, slice, sort, sortBy, splice, tap, throttle, times, - * toArray, transform, union, uniq, unshift, unzip, values, where, without, wrap, and zip + * remove, rest, reverse, sample, shuffle, slice, sort, sortBy, splice, tap, throttle, times, + * toArray, transform, union, uniq, unset, unshift, unzip, values, where, without, wrap, and zip * * The non-chainable wrapper functions are: * clone, cloneDeep, contains, escape, every, find, findIndex, findKey, findLast, @@ -38,24 +271,19 @@ declare module _ { * * Explicit chaining can be enabled by using the _.chain method. **/ - (value: number): LoDashWrapper; - (value: string): LoDashWrapper; - (value: boolean): LoDashWrapper; - (value: Array): LoDashNumberArrayWrapper; - (value: Array): LoDashArrayWrapper; - (value: T): LoDashObjectWrapper; - (value: any): LoDashWrapper; + (value: number): LoDashImplicitWrapper; + (value: string): LoDashImplicitStringWrapper; + (value: boolean): LoDashImplicitWrapper; + (value: Array): LoDashImplicitNumberArrayWrapper; + (value: Array): LoDashImplicitArrayWrapper; + (value: T): LoDashImplicitObjectWrapper; + (value: any): LoDashImplicitWrapper; /** * The semantic version number. **/ VERSION: string; - /** - * An object used to flag environments features. - **/ - support: Support; - /** * By default, the template delimiters used by Lo-Dash are similar to those in embedded Ruby * (ERB). Change the following template settings to use alternative delimiters. @@ -95,6599 +323,20716 @@ declare module _ { } /** - * An object used to flag environments features. - **/ - interface Support { + * Creates a cache object to store key/value pairs. + */ + interface MapCache { /** - * Detect if an arguments object's [[Class]] is resolvable (all but Firefox < 4, IE < 9). - **/ - argsClass: boolean; + * Removes `key` and its value from the cache. + * @param key The key of the value to remove. + * @return Returns `true` if the entry was removed successfully, else `false`. + */ + delete(key: string): boolean; /** - * Detect if arguments objects are Object objects (all but Narwhal and Opera < 10.5). - **/ - argsObject: boolean; + * Gets the cached value for `key`. + * @param key The key of the value to get. + * @return Returns the cached value. + */ + get(key: string): any; /** - * Detect if name or message properties of Error.prototype are enumerable by default. - * (IE < 9, Safari < 5.1) - **/ - enumErrorProps: boolean; + * Checks if a cached value for `key` exists. + * @param key The key of the entry to check. + * @return Returns `true` if an entry for `key` exists, else `false`. + */ + has(key: string): boolean; /** - * Detect if Function#bind exists and is inferred to be fast (all but V8). - **/ - fastBind: boolean; + * Sets `value` to `key` of the cache. + * @param key The key of the value to cache. + * @param value The value to cache. + * @return Returns the cache object. + */ + set(key: string, value: any): _.Dictionary; + } + interface MapCacheConstructor { + new (): MapCache; + } - /** - * Detect if functions can be decompiled by Function#toString (all but PS3 and older Opera - * mobile browsers & avoided in Windows 8 apps). - **/ - funcDecomp: boolean; + interface LoDashWrapperBase { } - /** - * Detect if Function#name is supported (all but IE). - **/ - funcNames: boolean; + interface LoDashImplicitWrapperBase extends LoDashWrapperBase { } - /** - * Detect if arguments object indexes are non-enumerable (Firefox < 4, IE < 9, PhantomJS, - * Safari < 5.1). - **/ - nonEnumArgs: boolean; + interface LoDashExplicitWrapperBase extends LoDashWrapperBase { } - /** - * Detect if properties shadowing those on Object.prototype are non-enumerable. - * - * In IE < 9 an objects own properties, shadowing non-enumerable ones, are made - * non-enumerable as well (a.k.a the JScript [[DontEnum]] bug). - **/ - nonEnumShadows: boolean; + interface LoDashImplicitWrapper extends LoDashImplicitWrapperBase> { } - /** - * Detect if own properties are iterated after inherited properties (all but IE < 9). - **/ - ownLast: boolean; + interface LoDashExplicitWrapper extends LoDashExplicitWrapperBase> { } - /** - * Detect if Array#shift and Array#splice augment array-like objects correctly. - * - * Firefox < 10, IE compatibility mode, and IE < 9 have buggy Array shift() and splice() - * functions that fail to remove the last element, value[0], of array-like objects even - * though the length property is set to 0. The shift() method is buggy in IE 8 compatibility - * mode, while splice() is buggy regardless of mode in IE < 9 and buggy in compatibility mode - * in IE 9. - **/ - spliceObjects: boolean; + interface LoDashImplicitStringWrapper extends LoDashImplicitWrapper { } - /** - * Detect lack of support for accessing string characters by index. - * - * IE < 8 can't access characters by index and IE 8 can only access characters by index on - * string literals. - **/ - unindexedChars: boolean; - } + interface LoDashExplicitStringWrapper extends LoDashExplicitWrapper { } - interface LoDashWrapperBase { - /** - * Produces the toString result of the wrapped value. - * @return Returns the string result. - **/ - toString(): string; + interface LoDashImplicitObjectWrapper extends LoDashImplicitWrapperBase> { } - /** - * Extracts the wrapped value. - * @return The wrapped value. - **/ - valueOf(): T; + interface LoDashExplicitObjectWrapper extends LoDashExplicitWrapperBase> { } - /** - * @see valueOf - **/ - value(): T; + interface LoDashImplicitArrayWrapper extends LoDashImplicitWrapperBase> { + pop(): T; + push(...items: T[]): LoDashImplicitArrayWrapper; + shift(): T; + sort(compareFn?: (a: T, b: T) => number): LoDashImplicitArrayWrapper; + splice(start: number): LoDashImplicitArrayWrapper; + splice(start: number, deleteCount: number, ...items: any[]): LoDashImplicitArrayWrapper; + unshift(...items: T[]): LoDashImplicitArrayWrapper; } - interface LoDashWrapper extends LoDashWrapperBase> { } + interface LoDashExplicitArrayWrapper extends LoDashExplicitWrapperBase> { + pop(): LoDashExplicitObjectWrapper; + push(...items: T[]): LoDashExplicitArrayWrapper; + shift(): LoDashExplicitObjectWrapper; + sort(compareFn?: (a: T, b: T) => number): LoDashExplicitArrayWrapper; + splice(start: number): LoDashExplicitArrayWrapper; + splice(start: number, deleteCount: number, ...items: any[]): LoDashExplicitArrayWrapper; + unshift(...items: T[]): LoDashExplicitArrayWrapper; + } - interface LoDashObjectWrapper extends LoDashWrapperBase> { } + interface LoDashImplicitNumberArrayWrapper extends LoDashImplicitArrayWrapper { } - interface LoDashArrayWrapper extends LoDashWrapperBase> { - concat(...items: T[]): LoDashArrayWrapper; - join(seperator?: string): LoDashWrapper; - pop(): LoDashWrapper; - push(...items: T[]): void; - reverse(): LoDashArrayWrapper; - shift(): LoDashWrapper; - slice(start: number, end?: number): LoDashArrayWrapper; - sort(compareFn?: (a: T, b: T) => number): LoDashArrayWrapper; - splice(start: number): LoDashArrayWrapper; - splice(start: number, deleteCount: number, ...items: any[]): LoDashArrayWrapper; - unshift(...items: any[]): LoDashWrapper; - } + interface LoDashExplicitNumberArrayWrapper extends LoDashExplicitArrayWrapper { } - interface LoDashNumberArrayWrapper extends LoDashArrayWrapper { } + /********* + * Array * + *********/ - //_.chain + //_.chunk interface LoDashStatic { /** - * Creates a lodash object that wraps the given value with explicit method chaining enabled. - * @param value The value to wrap. - * @return The wrapper object. - **/ - chain(value: number): LoDashWrapper; - chain(value: string): LoDashWrapper; - chain(value: boolean): LoDashWrapper; - chain(value: Array): LoDashArrayWrapper; - chain(value: T): LoDashObjectWrapper; - chain(value: any): LoDashWrapper; + * Creates an array of elements split into groups the length of size. If collection can’t be split evenly, the + * final chunk will be the remaining elements. + * + * @param array The array to process. + * @param size The length of each chunk. + * @return Returns the new array containing chunks. + */ + chunk( + array: List, + size?: number + ): T[][]; } - interface LoDashWrapperBase { + interface LoDashImplicitArrayWrapper { /** - * Enables explicit method chaining on the wrapper object. - * @see _.chain - * @return The wrapper object. - **/ - chain(): TWrapper; + * @see _.chunk + */ + chunk(size?: number): LoDashImplicitArrayWrapper; } - //_.tap - interface LoDashStatic { + interface LoDashImplicitObjectWrapper { /** - * Invokes interceptor with the value as the first argument and then returns value. The - * purpose of this method is to "tap into" a method chain in order to perform operations on - * intermediate results within the chain. - * @param value The value to provide to interceptor - * @param interceptor The function to invoke. - * @return value - **/ - tap( - value: T, - interceptor: (value: T) => void): T; + * @see _.chunk + */ + chunk(size?: number): LoDashImplicitArrayWrapper; } - interface LoDashWrapperBase { + interface LoDashExplicitArrayWrapper { /** - * @see _.tap - **/ - tap(interceptor: (value: T) => void): TWrapper; + * @see _.chunk + */ + chunk(size?: number): LoDashExplicitArrayWrapper; } - /********* - * Arrays * - **********/ + interface LoDashExplicitObjectWrapper { + /** + * @see _.chunk + */ + chunk(size?: number): LoDashExplicitArrayWrapper; + } - //_.chunk + //_.compact interface LoDashStatic { /** - * Creates an array of elements split into groups the length of size. If collection can't be - * split evenly, the final chunk will be the remaining elements. - * @param array The array to process. - * @param size The length of each chunk. - * @return Returns the new array containing chunks. - **/ - chunk(array: Array, size?: number): T[][]; + * Creates an array with all falsey values removed. The values false, null, 0, "", undefined, and NaN are + * falsey. + * + * @param array The array to compact. + * @return (Array) Returns the new array of filtered values. + */ + compact(array?: List): T[]; + } + interface LoDashImplicitArrayWrapper { /** - * @see _.chunk - **/ - chunk(array: List, size?: number): T[][]; + * @see _.compact + */ + compact(): LoDashImplicitArrayWrapper; } - interface LoDashArrayWrapper { + interface LoDashImplicitObjectWrapper { /** - * @see _.chunk - **/ - chunk(size?: number): LoDashArrayWrapper; + * @see _.compact + */ + compact(): LoDashImplicitArrayWrapper; } - //_.compact - interface LoDashStatic { + interface LoDashExplicitArrayWrapper { /** - * Returns a copy of the array with all falsy values removed. In JavaScript, false, null, 0, "", - * undefined and NaN are all falsy. - * @param array Array to compact. - * @return (Array) Returns a new array of filtered values. - **/ - compact(array?: Array): T[]; + * @see _.compact + */ + compact(): LoDashExplicitArrayWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.compact - **/ - compact(array?: List): T[]; + * @see _.compact + */ + compact(): LoDashExplicitArrayWrapper; } - interface LoDashArrayWrapper { + //_.concat DUMMY + interface LoDashStatic { /** - * @see _.compact - **/ - compact(): LoDashArrayWrapper; + * Creates a new array concatenating `array` with any additional arrays + * and/or values. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to concatenate. + * @param {...*} [values] The values to concatenate. + * @returns {Array} Returns the new concatenated array. + * @example + * + * var array = [1]; + * var other = _.concat(array, 2, [3], [[4]]); + * + * console.log(other); + * // => [1, 2, 3, [4]] + * + * console.log(array); + * // => [1] + */ + concat(array: T[]|List, ...values: (T|T[]|List)[]) : T[]; } //_.difference interface LoDashStatic { /** - * Creates an array excluding all values of the provided arrays using strict equality for comparisons - * , i.e. ===. - * @param array The array to process - * @param others The arrays of values to exclude. - * @return Returns a new array of filtered values. - **/ - difference( - array?: Array, - ...others: Array[]): T[]; - /** - * @see _.difference - **/ + * Creates an array of unique array values not included in the other provided arrays using SameValueZero for + * equality comparisons. + * + * @param array The array to inspect. + * @param values The arrays of values to exclude. + * @return Returns the new array of filtered values. + */ difference( - array?: List, - ...others: List[]): T[]; + array: T[]|List, + ...values: Array> + ): T[]; } - interface LoDashArrayWrapper { - /** - * @see _.difference - **/ - difference( - ...others: Array[]): LoDashArrayWrapper; + interface LoDashImplicitArrayWrapper { /** - * @see _.difference - **/ - difference( - ...others: List[]): LoDashArrayWrapper; + * @see _.difference + */ + difference(...values: (T[]|List)[]): LoDashImplicitArrayWrapper; } - //_.findIndex - interface LoDashStatic { + interface LoDashImplicitObjectWrapper { /** - * This method is like _.find except that it returns the index of the first element that passes - * the callback check, instead of the element itself. - * @param array The array to search. - * @param {(Function|Object|string)} callback The function called per iteration. If a property name or object is provided it will be - * used to create a ".pluck" or ".where" style callback, respectively. - * @param thisArg The this binding of callback. - * @return Returns the index of the found element, else -1. - **/ - findIndex( - array: Array, - callback: ListIterator, - thisArg?: any): number; + * @see _.difference + */ + difference(...values: (TValue[]|List)[]): LoDashImplicitArrayWrapper; + } + interface LoDashExplicitArrayWrapper { /** - * @see _.findIndex - **/ - findIndex( - array: List, - callback: ListIterator, - thisArg?: any): number; + * @see _.difference + */ + difference(...values: (T[]|List)[]): LoDashExplicitArrayWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.findIndex - **/ - findIndex( - array: Array, - pluckValue: string): number; + * @see _.difference + */ + difference(...values: (TValue[]|List)[]): LoDashExplicitArrayWrapper; + } + //_.differenceBy + interface LoDashStatic { /** - * @see _.findIndex - **/ - findIndex( - array: List, - pluckValue: string): number; + * This method is like _.difference except that it accepts iteratee which is invoked for each element of array + * and values to generate the criterion by which uniqueness is computed. The iteratee is invoked with one + * argument: (value). + * + * @param array The array to inspect. + * @param values The values to exclude. + * @param iteratee The iteratee invoked per element. + * @returns Returns the new array of filtered values. + */ + differenceBy( + array: T[]|List, + values?: T[]|List, + iteratee?: ((value: T) => any)|string + ): T[]; /** - * @see _.findIndex - **/ - findIndex( - array: Array, - whereDictionary: W): number; + * @see _.differenceBy + */ + differenceBy( + array: T[]|List, + values?: T[]|List, + iteratee?: W + ): T[]; /** - * @see _.findIndex - **/ - findIndex( - array: List, - whereDictionary: W): number; - } + * @see _.differenceBy + */ + differenceBy( + array: T[]|List, + values1?: T[]|List, + values2?: T[]|List, + iteratee?: ((value: T) => any)|string + ): T[]; - //_.findLastIndex - interface LoDashStatic { /** - * This method is like _.findIndex except that it iterates over elements of a collection from right to left. - * @param array The array to search. - * @param {(Function|Object|string)} callback The function called per iteration. If a property name or object is provided it will be - * used to create a ".pluck" or ".where" style callback, respectively. - * @param thisArg The this binding of callback. - * @return Returns the index of the found element, else -1. - **/ - findLastIndex( - array: Array, - callback: ListIterator, - thisArg?: any): number; + * @see _.differenceBy + */ + differenceBy( + array: T[]|List, + values1?: T[]|List, + values2?: T[]|List, + iteratee?: W + ): T[]; /** - * @see _.findLastIndex - **/ - findLastIndex( - array: List, - callback: ListIterator, - thisArg?: any): number; + * @see _.differenceBy + */ + differenceBy( + array: T[]|List, + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + iteratee?: ((value: T) => any)|string + ): T[]; /** - * @see _.findLastIndex - **/ - findLastIndex( - array: Array, - pluckValue: string): number; + * @see _.differenceBy + */ + differenceBy( + array: T[]|List, + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + iteratee?: W + ): T[]; /** - * @see _.findLastIndex - **/ - findLastIndex( - array: List, - pluckValue: string): number; + * @see _.differenceBy + */ + differenceBy( + array: T[]|List, + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + values4?: T[]|List, + iteratee?: W + ): T[]; /** - * @see _.findLastIndex - **/ - findLastIndex( - array: Array, - whereDictionary: Dictionary): number; + * @see _.differenceBy + */ + differenceBy( + array: T[]|List, + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + values4?: T[]|List, + iteratee?: ((value: T) => any)|string + ): T[]; /** - * @see _.findLastIndex - **/ - findLastIndex( - array: List, - whereDictionary: Dictionary): number; + * @see _.differenceBy + */ + differenceBy( + array: T[]|List, + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + values4?: T[]|List, + values5?: T[]|List, + iteratee?: ((value: T) => any)|string + ): T[]; + + /** + * @see _.differenceBy + */ + differenceBy( + array: T[]|List, + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + values4?: T[]|List, + values5?: T[]|List, + iteratee?: W + ): T[]; + + /** + * @see _.differenceBy + */ + differenceBy( + array: T[]|List, + ...values: any[] + ): T[]; } - //_.first - interface LoDashStatic { + interface LoDashImplicitArrayWrapper { /** - * Gets the first element or first n elements of an array. If a callback is provided - * elements at the beginning of the array are returned as long as the callback returns - * truey. The callback is bound to thisArg and invoked with three arguments; (value, - * index, array). - * - * If a property name is provided for callback the created "_.pluck" style callback - * will return the property value of the given element. - * - * If an object is provided for callback the created "_.where" style callback will return ] - * true for elements that have the properties of the given object, else false. - * @param array Retrieves the first element of this array. - * @return Returns the first element of `array`. - **/ - first(array?: Array): T; + * @see _.differenceBy + */ + differenceBy( + values?: T[]|List, + iteratee?: ((value: T) => any)|string + ): LoDashImplicitArrayWrapper; /** - * @see _.first - **/ - first(array?: List): T; + * @see _.differenceBy + */ + differenceBy( + values?: T[]|List, + iteratee?: W + ): LoDashImplicitArrayWrapper; /** - * @see _.first - * @param n The number of elements to return. - **/ - first( - array: Array, - n: number): T[]; + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + iteratee?: ((value: T) => any)|string + ): LoDashImplicitArrayWrapper; /** - * @see _.first - * @param n The number of elements to return. - **/ - first( - array: List, - n: number): T[]; + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + iteratee?: W + ): LoDashImplicitArrayWrapper; /** - * @see _.first - * @param callback The function called per element. - * @param [thisArg] The this binding of callback. - **/ - first( - array: Array, - callback: ListIterator, - thisArg?: any): T[]; + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + iteratee?: ((value: T) => any)|string + ): LoDashImplicitArrayWrapper; /** - * @see _.first - * @param callback The function called per element. - * @param [thisArg] The this binding of callback. - **/ - first( - array: List, - callback: ListIterator, - thisArg?: any): T[]; + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + iteratee?: W + ): LoDashImplicitArrayWrapper; /** - * @see _.first - * @param pluckValue "_.pluck" style callback value - **/ - first( - array: Array, - pluckValue: string): T[]; + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + values4?: T[]|List, + iteratee?: ((value: T) => any)|string + ): LoDashImplicitArrayWrapper; /** - * @see _.first - * @param pluckValue "_.pluck" style callback value - **/ - first( - array: List, - pluckValue: string): T[]; + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + values4?: T[]|List, + iteratee?: W + ): LoDashImplicitArrayWrapper; /** - * @see _.first - * @param whereValue "_.where" style callback value - **/ - first( - array: Array, - whereValue: W): T[]; + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + values4?: T[]|List, + values5?: T[]|List, + iteratee?: ((value: T) => any)|string + ): LoDashImplicitArrayWrapper; /** - * @see _.first - * @param whereValue "_.where" style callback value - **/ - first( - array: List, - whereValue: W): T[]; + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + values4?: T[]|List, + values5?: T[]|List, + iteratee?: W + ): LoDashImplicitArrayWrapper; /** - * @see _.first - **/ - head(array: Array): T; + * @see _.differenceBy + */ + differenceBy( + ...values: any[] + ): LoDashImplicitArrayWrapper; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.first - **/ - head(array: List): T; + * @see _.differenceBy + */ + differenceBy( + values?: T[]|List, + iteratee?: ((value: T) => any)|string + ): LoDashImplicitArrayWrapper; /** - * @see _.first - **/ - head( - array: Array, - n: number): T[]; + * @see _.differenceBy + */ + differenceBy( + values?: T[]|List, + iteratee?: W + ): LoDashImplicitArrayWrapper; /** - * @see _.first - **/ - head( - array: List, - n: number): T[]; + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + iteratee?: ((value: T) => any)|string + ): LoDashImplicitArrayWrapper; /** - * @see _.first - **/ - head( - array: Array, - callback: ListIterator, - thisArg?: any): T[]; + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + iteratee?: W + ): LoDashImplicitArrayWrapper; /** - * @see _.first - **/ - head( - array: List, - callback: ListIterator, - thisArg?: any): T[]; + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + iteratee?: ((value: T) => any)|string + ): LoDashImplicitArrayWrapper; /** - * @see _.first - **/ - head( - array: Array, - pluckValue: string): T[]; + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + iteratee?: W + ): LoDashImplicitArrayWrapper; /** - * @see _.first - **/ - head( - array: List, - pluckValue: string): T[]; + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + values4?: T[]|List, + iteratee?: ((value: T) => any)|string + ): LoDashImplicitArrayWrapper; /** - * @see _.first - **/ - head( - array: Array, - whereValue: W): T[]; + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + values4?: T[]|List, + iteratee?: W + ): LoDashImplicitArrayWrapper; /** - * @see _.first - **/ - head( - array: List, - whereValue: W): T[]; + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + values4?: T[]|List, + values5?: T[]|List, + iteratee?: ((value: T) => any)|string + ): LoDashImplicitArrayWrapper; /** - * @see _.first - **/ - take(array: Array): T; + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + values4?: T[]|List, + values5?: T[]|List, + iteratee?: W + ): LoDashImplicitArrayWrapper; /** - * @see _.first - **/ - take(array: List): T; + * @see _.differenceBy + */ + differenceBy( + ...values: any[] + ): LoDashImplicitArrayWrapper; + } + interface LoDashExplicitArrayWrapper { /** - * @see _.first - **/ - take( - array: Array, - n: number): T[]; + * @see _.differenceBy + */ + differenceBy( + values?: T[]|List, + iteratee?: ((value: T) => any)|string + ): LoDashExplicitArrayWrapper; /** - * @see _.first - **/ - take( - array: List, - n: number): T[]; + * @see _.differenceBy + */ + differenceBy( + values?: T[]|List, + iteratee?: W + ): LoDashExplicitArrayWrapper; /** - * @see _.first - **/ - take( - array: Array, - callback: ListIterator, - thisArg?: any): T[]; + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + iteratee?: ((value: T) => any)|string + ): LoDashExplicitArrayWrapper; /** - * @see _.first - **/ - take( - array: List, - callback: ListIterator, - thisArg?: any): T[]; + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + iteratee?: W + ): LoDashExplicitArrayWrapper; /** - * @see _.first - **/ - take( - array: Array, - pluckValue: string): T[]; + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + iteratee?: ((value: T) => any)|string + ): LoDashExplicitArrayWrapper; /** - * @see _.first - **/ - take( - array: List, - pluckValue: string): T[]; + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + iteratee?: W + ): LoDashExplicitArrayWrapper; /** - * @see _.first - **/ - take( - array: Array, - whereValue: W): T[]; + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + values4?: T[]|List, + iteratee?: ((value: T) => any)|string + ): LoDashExplicitArrayWrapper; /** - * @see _.first - **/ - take( - array: List, - whereValue: W): T[]; - } + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + values4?: T[]|List, + iteratee?: W + ): LoDashExplicitArrayWrapper; - interface LoDashArrayWrapper { /** - * @see _.first - **/ - first(): T; + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + values4?: T[]|List, + values5?: T[]|List, + iteratee?: ((value: T) => any)|string + ): LoDashExplicitArrayWrapper; /** - * @see _.first - * @param n The number of elements to return. - **/ - first(n: number): LoDashArrayWrapper; + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + values4?: T[]|List, + values5?: T[]|List, + iteratee?: W + ): LoDashExplicitArrayWrapper; /** - * @see _.first - * @param callback The function called per element. - * @param [thisArg] The this binding of callback. - **/ - first( - callback: ListIterator, - thisArg?: any): LoDashArrayWrapper; + * @see _.differenceBy + */ + differenceBy( + ...values: any[] + ): LoDashExplicitArrayWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.first - * @param pluckValue "_.pluck" style callback value - **/ - first(pluckValue: string): LoDashArrayWrapper; + * @see _.differenceBy + */ + differenceBy( + values?: T[]|List, + iteratee?: ((value: T) => any)|string + ): LoDashExplicitArrayWrapper; /** - * @see _.first - * @param whereValue "_.where" style callback value - **/ - first(whereValue: W): LoDashArrayWrapper; + * @see _.differenceBy + */ + differenceBy( + values?: T[]|List, + iteratee?: W + ): LoDashExplicitArrayWrapper; /** - * @see _.first - **/ - head(): T; + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + iteratee?: ((value: T) => any)|string + ): LoDashExplicitArrayWrapper; /** - * @see _.first - * @param n The number of elements to return. - **/ - head(n: number): LoDashArrayWrapper; + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + iteratee?: W + ): LoDashExplicitArrayWrapper; /** - * @see _.first - * @param callback The function called per element. - * @param [thisArg] The this binding of callback. - **/ - head( - callback: ListIterator, - thisArg?: any): LoDashArrayWrapper; - - /** - * @see _.first - * @param pluckValue "_.pluck" style callback value - **/ - head(pluckValue: string): LoDashArrayWrapper; + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + iteratee?: ((value: T) => any)|string + ): LoDashExplicitArrayWrapper; /** - * @see _.first - * @param whereValue "_.where" style callback value - **/ - head(whereValue: W): LoDashArrayWrapper; + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + iteratee?: W + ): LoDashExplicitArrayWrapper; /** - * @see _.first - **/ - take(): T; + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + values4?: T[]|List, + iteratee?: ((value: T) => any)|string + ): LoDashExplicitArrayWrapper; /** - * @see _.first - * @param n The number of elements to return. - **/ - take(n: number): LoDashArrayWrapper; + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + values4?: T[]|List, + iteratee?: W + ): LoDashExplicitArrayWrapper; /** - * @see _.first - * @param callback The function called per element. - * @param [thisArg] The this binding of callback. - **/ - take( - callback: ListIterator, - thisArg?: any): LoDashArrayWrapper; + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + values4?: T[]|List, + values5?: T[]|List, + iteratee?: ((value: T) => any)|string + ): LoDashExplicitArrayWrapper; /** - * @see _.first - * @param pluckValue "_.pluck" style callback value - **/ - take(pluckValue: string): LoDashArrayWrapper; + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + values4?: T[]|List, + values5?: T[]|List, + iteratee?: W + ): LoDashExplicitArrayWrapper; /** - * @see _.first - * @param whereValue "_.where" style callback value - **/ - take(whereValue: W): LoDashArrayWrapper; + * @see _.differenceBy + */ + differenceBy( + ...values: any[] + ): LoDashExplicitArrayWrapper; } - //_.flatten + //_.differenceWith DUMMY interface LoDashStatic { /** - * Flattens a nested array (the nesting can be to any depth). If isShallow is truey, the - * array will only be flattened a single level. If a callback is provided each element of - * the array is passed through the callback before flattening. The callback is bound to - * thisArg and invoked with three arguments; (value, index, array). - * - * If a property name is provided for callback the created "_.pluck" style callback will - * return the property value of the given element. - * - * If an object is provided for callback the created "_.where" style callback will return - * true for elements that have the properties of the given object, else false. - * @param array The array to flatten. - * @param shallow If true then only flatten one level, optional, default = false. - * @return `array` flattened. - **/ - flatten(array: Array, isShallow?: boolean): T[]; + * Creates an array of unique `array` values not included in the other + * provided arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.difference([3, 2, 1], [4, 2]); + * // => [3, 1] + */ + differenceWith( + array: any[]|List, + ...values: any[] + ): any[]; + } + //_.drop + interface LoDashStatic { /** - * @see _.flatten - **/ - flatten(array: List, isShallow?: boolean): T[]; + * Creates a slice of array with n elements dropped from the beginning. + * + * @param array The array to query. + * @param n The number of elements to drop. + * @return Returns the slice of array. + */ + drop(array: T[]|List, n?: number): T[]; + } + interface LoDashImplicitArrayWrapper { /** - * @see _.flatten - **/ - flatten( - array: Array, - isShallow: boolean, - callback: ListIterator, - thisArg?: any): T[]; + * @see _.drop + */ + drop(n?: number): LoDashImplicitArrayWrapper; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.flatten - **/ - flatten( - array: List, - isShallow: boolean, - callback: ListIterator, - thisArg?: any): T[]; + * @see _.drop + */ + drop(n?: number): LoDashImplicitArrayWrapper; + } + interface LoDashExplicitArrayWrapper { /** - * @see _.flatten - **/ - flatten( - array: Array, - callback: ListIterator, - thisArg?: any): T[]; + * @see _.drop + */ + drop(n?: number): LoDashExplicitArrayWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.flatten - **/ - flatten( - array: List, - callback: ListIterator, - thisArg?: any): T[]; + * @see _.drop + */ + drop(n?: number): LoDashExplicitArrayWrapper; + } + //_.dropRight + interface LoDashStatic { /** - * @see _.flatten - **/ - flatten( - array: Array, - isShallow: boolean, - whereValue: W): T[]; + * Creates a slice of array with n elements dropped from the end. + * + * @param array The array to query. + * @param n The number of elements to drop. + * @return Returns the slice of array. + */ + dropRight( + array: List, + n?: number + ): T[]; + } + interface LoDashImplicitArrayWrapper { /** - * @see _.flatten - **/ - flatten( - array: List, - isShallow: boolean, - whereValue: W): T[]; + * @see _.dropRight + */ + dropRight(n?: number): LoDashImplicitArrayWrapper; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.flatten - **/ - flatten( - array: Array, - whereValue: W): T[]; + * @see _.dropRight + */ + dropRight(n?: number): LoDashImplicitArrayWrapper; + } + interface LoDashExplicitArrayWrapper { /** - * @see _.flatten - **/ - flatten( - array: List, - whereValue: W): T[]; + * @see _.dropRight + */ + dropRight(n?: number): LoDashExplicitArrayWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.flatten - **/ - flatten( - array: Array, - isShallow: boolean, - pluckValue: string): T[]; + * @see _.dropRight + */ + dropRight(n?: number): LoDashExplicitArrayWrapper; + } + //_.dropRightWhile + interface LoDashStatic { /** - * @see _.flatten - **/ - flatten( - array: List, - isShallow: boolean, - pluckValue: string): T[]; + * Creates a slice of array excluding elements dropped from the end. Elements are dropped until predicate + * returns falsey. The predicate is bound to thisArg and invoked with three arguments: (value, index, array). + * + * If a property name is provided for predicate the created _.property style callback returns the property + * value of the given element. + * + * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for + * elements that have a matching property value, else false. + * + * If an object is provided for predicate the created _.matches style callback returns true for elements that + * match the properties of the given object, else false. + * + * @param array The array to query. + * @param predicate The function invoked per iteration. + * @param thisArg The this binding of predicate. + * @return Returns the slice of array. + */ + dropRightWhile( + array: List, + predicate?: ListIterator + ): TValue[]; /** - * @see _.flatten - **/ - flatten( - array: Array, - pluckValue: string): T[]; + * @see _.dropRightWhile + */ + dropRightWhile( + array: List, + predicate?: string + ): TValue[]; /** - * @see _.flatten - **/ - flatten( - array: List, - pluckValue: string): T[]; + * @see _.dropRightWhile + */ + dropRightWhile( + array: List, + predicate?: TWhere + ): TValue[]; } - interface LoDashArrayWrapper { - /** - * @see _.flatten - **/ - flatten(isShallow?: boolean): LoDashArrayWrapper; - + interface LoDashImplicitArrayWrapper { /** - * @see _.flatten - **/ - flatten( - isShallow: boolean, - callback: ListIterator, - thisArg?: any): LoDashArrayWrapper; + * @see _.dropRightWhile + */ + dropRightWhile( + predicate?: ListIterator + ): LoDashImplicitArrayWrapper; /** - * @see _.flatten - **/ - flatten( - callback: ListIterator, - thisArg?: any): LoDashArrayWrapper; + * @see _.dropRightWhile + */ + dropRightWhile( + predicate?: string + ): LoDashImplicitArrayWrapper; /** - * @see _.flatten - **/ - flatten( - isShallow: boolean, - pluckValue: string): LoDashArrayWrapper; + * @see _.dropRightWhile + */ + dropRightWhile( + predicate?: TWhere + ): LoDashImplicitArrayWrapper; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.flatten - **/ - flatten( - pluckValue: string): LoDashArrayWrapper; + * @see _.dropRightWhile + */ + dropRightWhile( + predicate?: ListIterator + ): LoDashImplicitArrayWrapper; /** - * @see _.flatten - **/ - flatten( - isShallow: boolean, - whereValue: W): LoDashArrayWrapper; + * @see _.dropRightWhile + */ + dropRightWhile( + predicate?: string + ): LoDashImplicitArrayWrapper; /** - * @see _.flatten - **/ - flatten( - whereValue: W): LoDashArrayWrapper; + * @see _.dropRightWhile + */ + dropRightWhile( + predicate?: TWhere + ): LoDashImplicitArrayWrapper; } - //_.indexOf - interface LoDashStatic { + interface LoDashExplicitArrayWrapper { /** - * Gets the index at which the first occurrence of value is found using strict equality - * for comparisons, i.e. ===. If the array is already sorted providing true for fromIndex - * will run a faster binary search. - * @param array The array to search. - * @param value The value to search for. - * @param fromIndex The index to search from. - * @return The index of `value` within `array`. - **/ - indexOf( - array: Array, - value: T): number; + * @see _.dropRightWhile + */ + dropRightWhile( + predicate?: ListIterator + ): LoDashExplicitArrayWrapper; /** - * @see _.indexOf - **/ - indexOf( - array: List, - value: T): number; + * @see _.dropRightWhile + */ + dropRightWhile( + predicate?: string + ): LoDashExplicitArrayWrapper; /** - * @see _.indexOf - * @param fromIndex The index to search from - **/ - indexOf( - array: Array, - value: T, - fromIndex: number): number; + * @see _.dropRightWhile + */ + dropRightWhile( + predicate?: TWhere + ): LoDashExplicitArrayWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.indexOf - * @param fromIndex The index to search from - **/ - indexOf( - array: List, - value: T, - fromIndex: number): number; + * @see _.dropRightWhile + */ + dropRightWhile( + predicate?: ListIterator + ): LoDashExplicitArrayWrapper; /** - * @see _.indexOf - * @param isSorted True to perform a binary search on a sorted array. - **/ - indexOf( - array: Array, - value: T, - isSorted: boolean): number; + * @see _.dropRightWhile + */ + dropRightWhile( + predicate?: string + ): LoDashExplicitArrayWrapper; /** - * @see _.indexOf - * @param isSorted True to perform a binary search on a sorted array. - **/ - indexOf( - array: List, - value: T, - isSorted: boolean): number; + * @see _.dropRightWhile + */ + dropRightWhile( + predicate?: TWhere + ): LoDashExplicitArrayWrapper; } - //_.initial + //_.dropWhile interface LoDashStatic { /** - * Gets all but the last element or last n elements of an array. If a callback is provided - * elements at the end of the array are excluded from the result as long as the callback - * returns truey. The callback is bound to thisArg and invoked with three arguments; - * (value, index, array). - * - * If a property name is provided for callback the created "_.pluck" style callback will - * return the property value of the given element. - * - * If an object is provided for callback the created "_.where" style callback will return - * true for elements that have the properties of the given object, else false. - * @param array The array to query. - * @param n Leaves this many elements behind, optional. - * @return Returns everything but the last `n` elements of `array`. - **/ - initial( - array: Array): T[]; + * Creates a slice of array excluding elements dropped from the beginning. Elements are dropped until predicate + * returns falsey. The predicate is bound to thisArg and invoked with three arguments: (value, index, array). + * + * If a property name is provided for predicate the created _.property style callback returns the property + * value of the given element. + * + * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for + * elements that have a matching property value, else false. + * + * If an object is provided for predicate the created _.matches style callback returns true for elements that + * have the properties of the given object, else false. + * + * @param array The array to query. + * @param predicate The function invoked per iteration. + * @param thisArg The this binding of predicate. + * @return Returns the slice of array. + */ + dropWhile( + array: List, + predicate?: ListIterator + ): TValue[]; /** - * @see _.initial - **/ - initial( - array: List): T[]; + * @see _.dropWhile + */ + dropWhile( + array: List, + predicate?: string + ): TValue[]; /** - * @see _.initial - * @param n The number of elements to exclude. - **/ - initial( - array: Array, - n: number): T[]; + * @see _.dropWhile + */ + dropWhile( + array: List, + predicate?: TWhere + ): TValue[]; + } + interface LoDashImplicitArrayWrapper { /** - * @see _.initial - * @param n The number of elements to exclude. - **/ - initial( - array: List, - n: number): T[]; + * @see _.dropWhile + */ + dropWhile( + predicate?: ListIterator + ): LoDashImplicitArrayWrapper; /** - * @see _.initial - * @param callback The function called per element - **/ - initial( - array: Array, - callback: ListIterator): T[]; + * @see _.dropWhile + */ + dropWhile( + predicate?: string + ): LoDashImplicitArrayWrapper; /** - * @see _.initial - * @param callback The function called per element - **/ - initial( - array: List, - callback: ListIterator): T[]; + * @see _.dropWhile + */ + dropWhile( + predicate?: TWhere + ): LoDashImplicitArrayWrapper; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.initial - * @param pluckValue _.pluck style callback - **/ - initial( - array: Array, - pluckValue: string): T[]; + * @see _.dropWhile + */ + dropWhile( + predicate?: ListIterator + ): LoDashImplicitArrayWrapper; /** - * @see _.initial - * @param pluckValue _.pluck style callback - **/ - initial( - array: List, - pluckValue: string): T[]; + * @see _.dropWhile + */ + dropWhile( + predicate?: string + ): LoDashImplicitArrayWrapper; /** - * @see _.initial - * @param whereValue _.where style callback - **/ - initial( - array: Array, - whereValue: W): T[]; + * @see _.dropWhile + */ + dropWhile( + predicate?: TWhere + ): LoDashImplicitArrayWrapper; + } + interface LoDashExplicitArrayWrapper { /** - * @see _.initial - * @param whereValue _.where style callback - **/ - initial( - array: List, - whereValue: W): T[]; - } + * @see _.dropWhile + */ + dropWhile( + predicate?: ListIterator + ): LoDashExplicitArrayWrapper; - //_.intersection - interface LoDashStatic { /** - * Creates an array of unique values present in all provided arrays using strict - * equality for comparisons, i.e. ===. - * @param arrays The arrays to inspect. - * @return Returns an array of composite values. - **/ - intersection(...arrays: Array[]): T[]; + * @see _.dropWhile + */ + dropWhile( + predicate?: string + ): LoDashExplicitArrayWrapper; /** - * @see _.intersection - **/ - intersection(...arrays: List[]): T[]; + * @see _.dropWhile + */ + dropWhile( + predicate?: TWhere + ): LoDashExplicitArrayWrapper; } - //_.last - interface LoDashStatic { + interface LoDashExplicitObjectWrapper { /** - * Gets the last element or last n elements of an array. If a callback is provided - * elements at the end of the array are returned as long as the callback returns truey. - * The callback is bound to thisArg and invoked with three arguments; (value, index, array). - * - * If a property name is provided for callback the created "_.pluck" style callback will - * return the property value of the given element. - * - * If an object is provided for callback the created "_.where" style callback will return - * true for elements that have the properties of the given object, else false. - * @param array The array to query. - * @return Returns the last element(s) of array. - **/ - last(array: Array): T; + * @see _.dropWhile + */ + dropWhile( + predicate?: ListIterator + ): LoDashExplicitArrayWrapper; /** - * @see _.last - **/ - last(array: List): T; + * @see _.dropWhile + */ + dropWhile( + predicate?: string + ): LoDashExplicitArrayWrapper; /** - * @see _.last - * @param n The number of elements to return - **/ - last( - array: Array, - n: number): T[]; + * @see _.dropWhile + */ + dropWhile( + predicate?: TWhere + ): LoDashExplicitArrayWrapper; + } + //_.fill + interface LoDashStatic { /** - * @see _.last - * @param n The number of elements to return - **/ - last( - array: List, - n: number): T[]; + * Fills elements of array with value from start up to, but not including, end. + * + * Note: This method mutates array. + * + * @param array The array to fill. + * @param value The value to fill array with. + * @param start The start position. + * @param end The end position. + * @return Returns array. + */ + fill( + array: any[], + value: T, + start?: number, + end?: number + ): T[]; /** - * @see _.last - * @param callback The function called per element - **/ - last( - array: Array, - callback: ListIterator, - thisArg?: any): T[]; + * @see _.fill + */ + fill( + array: List, + value: T, + start?: number, + end?: number + ): List; + } + interface LoDashImplicitArrayWrapper { /** - * @see _.last - * @param callback The function called per element - **/ - last( - array: List, - callback: ListIterator, - thisArg?: any): T[]; + * @see _.fill + */ + fill( + value: T, + start?: number, + end?: number + ): LoDashImplicitArrayWrapper; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.last - * @param pluckValue _.pluck style callback - **/ - last( - array: Array, - pluckValue: string): T[]; + * @see _.fill + */ + fill( + value: T, + start?: number, + end?: number + ): LoDashImplicitObjectWrapper>; + } + interface LoDashExplicitArrayWrapper { /** - * @see _.last - * @param pluckValue _.pluck style callback - **/ - last( - array: List, - pluckValue: string): T[]; + * @see _.fill + */ + fill( + value: T, + start?: number, + end?: number + ): LoDashExplicitArrayWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.last - * @param whereValue _.where style callback - **/ - last( - array: Array, - whereValue: W): T[]; + * @see _.fill + */ + fill( + value: T, + start?: number, + end?: number + ): LoDashExplicitObjectWrapper>; + } + //_.findIndex + interface LoDashStatic { /** - * @see _.last - * @param whereValue _.where style callback - **/ - last( + * This method is like _.find except that it returns the index of the first element predicate returns truthy + * for instead of the element itself. + * + * If a property name is provided for predicate the created _.property style callback returns the property + * value of the given element. + * + * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for + * elements that have a matching property value, else false. + * + * If an object is provided for predicate the created _.matches style callback returns true for elements that + * have the properties of the given object, else false. + * + * @param array The array to search. + * @param predicate The function invoked per iteration. + * @param thisArg The this binding of predicate. + * @return Returns the index of the found element, else -1. + */ + findIndex( array: List, - whereValue: W): T[]; - } + predicate?: ListIterator + ): number; - //_.lastIndexOf - interface LoDashStatic { /** - * Gets the index at which the last occurrence of value is found using strict equality - * for comparisons, i.e. ===. If fromIndex is negative, it is used as the offset from the - * end of the collection. - * @param array The array to search. - * @param value The value to search for. - * @param fromIndex The index to search from. - * @return The index of the matched value or -1. - **/ - lastIndexOf( - array: Array, - value: T, - fromIndex?: number): number; + * @see _.findIndex + */ + findIndex( + array: List, + predicate?: string + ): number; /** - * @see _.lastIndexOf - **/ - lastIndexOf( + * @see _.findIndex + */ + findIndex( array: List, - value: T, - fromIndex?: number): number; + predicate?: W + ): number; } - //_.pull - interface LoDashStatic { + interface LoDashImplicitArrayWrapper { /** - * Removes all provided values from the given array using strict equality for comparisons, - * i.e. ===. - * @param array The array to modify. - * @param values The values to remove. - * @return array. - **/ - pull( - array: Array, - ...values: any[]): any[]; + * @see _.findIndex + */ + findIndex( + predicate?: ListIterator + ): number; /** - * @see _.pull - **/ - pull( - array: List, - ...values: any[]): any[]; - } + * @see _.findIndex + */ + findIndex( + predicate?: string + ): number; - //_.range - interface LoDashStatic { /** - * Creates an array of numbers (positive and/or negative) progressing from start up - * to but not including end. If start is less than stop a zero-length range is created - * unless a negative step is specified. - * @param start The start of the range. - * @param end The end of the range. - * @param step The value to increment or decrement by. - * @return Returns a new range array. - **/ - range( - start: number, - stop: number, - step?: number): number[]; + * @see _.findIndex + */ + findIndex( + predicate?: W + ): number; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.range - * @param end The end of the range. - * @return Returns a new range array. - * @note If start is not specified the implementation will never pull the step (step = arguments[2] || 0) - **/ - range(stop: number): number[]; - } + * @see _.findIndex + */ + findIndex( + predicate?: ListIterator + ): number; - //_.remove - interface LoDashStatic { /** - * Removes all elements from an array that the callback returns truey for and returns - * an array of removed elements. The callback is bound to thisArg and invoked with three - * arguments; (value, index, array). - * - * If a property name is provided for callback the created "_.pluck" style callback will - * return the property value of the given element. - * - * If an object is provided for callback the created "_.where" style callback will return - * true for elements that have the properties of the given object, else false. - * @param array The array to modify. - * @param callback The function called per iteration. - * @param thisArg The this binding of callback. - * @return A new array of removed elements. - **/ - remove( - array: Array, - callback?: ListIterator, - thisArg?: any): any[]; + * @see _.findIndex + */ + findIndex( + predicate?: string + ): number; /** - * @see _.remove - **/ - remove( - array: List, - callback?: ListIterator, - thisArg?: any): any[]; + * @see _.findIndex + */ + findIndex( + predicate?: W + ): number; + } + interface LoDashExplicitArrayWrapper { /** - * @see _.remove - * @param pluckValue _.pluck style callback - **/ - remove( - array: Array, - pluckValue?: string): any[]; + * @see _.findIndex + */ + findIndex( + predicate?: ListIterator + ): LoDashExplicitWrapper; /** - * @see _.remove - * @param pluckValue _.pluck style callback - **/ - remove( - array: List, - pluckValue?: string): any[]; + * @see _.findIndex + */ + findIndex( + predicate?: string + ): LoDashExplicitWrapper; /** - * @see _.remove - * @param whereValue _.where style callback - **/ - remove( - array: Array, - wherealue?: Dictionary): any[]; + * @see _.findIndex + */ + findIndex( + predicate?: W + ): LoDashExplicitWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.remove - * @param whereValue _.where style callback - **/ - remove( - array: List, - wherealue?: Dictionary): any[]; + * @see _.findIndex + */ + findIndex( + predicate?: ListIterator + ): LoDashExplicitWrapper; /** - * @see _.remove - * @param item The item to remove - **/ - remove( - array:Array, - item:T): T[]; + * @see _.findIndex + */ + findIndex( + predicate?: string + ): LoDashExplicitWrapper; + + /** + * @see _.findIndex + */ + findIndex( + predicate?: W + ): LoDashExplicitWrapper; } - //_.rest + //_.findLastIndex interface LoDashStatic { /** - * The opposite of _.initial this method gets all but the first element or first n elements of - * an array. If a callback function is provided elements at the beginning of the array are excluded - * from the result as long as the callback returns truey. The callback is bound to thisArg and - * invoked with three arguments; (value, index, array). - * - * If a property name is provided for callback the created "_.pluck" style callback will return - * the property value of the given element. - * - * If an object is provided for callback the created "_.where" style callback will return true - * for elements that have the properties of the given object, else false. - * @param array The array to query. - * @param {(Function|Object|number|string)} [callback=1] The function called per element or the number - * of elements to exclude. If a property name or object is provided it will be used to create a - * ".pluck" or ".where" style callback, respectively. - * @param {*} [thisArg] The this binding of callback. - * @return Returns a slice of array. - **/ - rest(array: Array): T[]; + * This method is like _.findIndex except that it iterates over elements of collection from right to left. + * + * If a property name is provided for predicate the created _.property style callback returns the property + * value of the given element. + * + * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for + * elements that have a matching property value, else false. + * + * If an object is provided for predicate the created _.matches style callback returns true for elements that + * have the properties of the given object, else false. + * + * @param array The array to search. + * @param predicate The function invoked per iteration. + * @param thisArg The function invoked per iteration. + * @return Returns the index of the found element, else -1. + */ + findLastIndex( + array: List, + predicate?: ListIterator + ): number; /** - * @see _.rest - **/ - rest(array: List): T[]; + * @see _.findLastIndex + */ + findLastIndex( + array: List, + predicate?: string + ): number; /** - * @see _.rest - **/ - rest( - array: Array, - callback: ListIterator, - thisArg?: any): T[]; + * @see _.findLastIndex + */ + findLastIndex( + array: List, + predicate?: W + ): number; + } + interface LoDashImplicitArrayWrapper { /** - * @see _.rest - **/ - rest( - array: List, - callback: ListIterator, - thisArg?: any): T[]; + * @see _.findLastIndex + */ + findLastIndex( + predicate?: ListIterator + ): number; /** - * @see _.rest - **/ - rest( - array: Array, - n: number): T[]; + * @see _.findLastIndex + */ + findLastIndex( + predicate?: string + ): number; /** - * @see _.rest - **/ - rest( - array: List, - n: number): T[]; + * @see _.findLastIndex + */ + findLastIndex( + predicate?: W + ): number; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.rest - **/ - rest( - array: Array, - pluckValue: string): T[]; + * @see _.findLastIndex + */ + findLastIndex( + predicate?: ListIterator + ): number; /** - * @see _.rest - **/ - rest( - array: List, - pluckValue: string): T[]; + * @see _.findLastIndex + */ + findLastIndex( + predicate?: string + ): number; /** - * @see _.rest - **/ - rest( - array: Array, - whereValue: W): T[]; + * @see _.findLastIndex + */ + findLastIndex( + predicate?: W + ): number; + } + interface LoDashExplicitArrayWrapper { /** - * @see _.rest - **/ - rest( - array: List, - whereValue: W): T[]; + * @see _.findLastIndex + */ + findLastIndex( + predicate?: ListIterator + ): LoDashExplicitWrapper; /** - * @see _.rest - **/ - drop(array: Array): T[]; + * @see _.findLastIndex + */ + findLastIndex( + predicate?: string + ): LoDashExplicitWrapper; /** - * @see _.rest - **/ - drop(array: List): T[]; + * @see _.findLastIndex + */ + findLastIndex( + predicate?: W + ): LoDashExplicitWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.rest - **/ - drop( - array: Array, - callback: ListIterator, - thisArg?: any): T[]; + * @see _.findLastIndex + */ + findLastIndex( + predicate?: ListIterator + ): LoDashExplicitWrapper; /** - * @see _.rest - **/ - drop( - array: List, - callback: ListIterator, - thisArg?: any): T[]; + * @see _.findLastIndex + */ + findLastIndex( + predicate?: string + ): LoDashExplicitWrapper; /** - * @see _.rest - **/ - drop( - array: Array, - n: number): T[]; + * @see _.findLastIndex + */ + findLastIndex( + predicate?: W + ): LoDashExplicitWrapper; + } + //_.first + interface LoDashStatic { /** - * @see _.rest - **/ - drop( - array: List, - n: number): T[]; + * @see _.head + */ + first(array: List): T; + } + interface LoDashImplicitWrapper { /** - * @see _.rest - **/ - drop( - array: Array, - pluckValue: string): T[]; + * @see _.head + */ + first(): string; + } + interface LoDashImplicitArrayWrapper { /** - * @see _.rest - **/ - drop( - array: List, - pluckValue: string): T[]; + * @see _.head + */ + first(): T; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.rest - **/ - drop( - array: Array, - whereValue: W): T[]; + * @see _.head + */ + first(): T; + } + interface LoDashExplicitWrapper { /** - * @see _.rest - **/ - drop( - array: List, - whereValue: W): T[]; + * @see _.head + */ + first(): LoDashExplicitWrapper; + } + interface LoDashExplicitArrayWrapper { /** - * @see _.rest - **/ - tail(array: Array): T[]; + * @see _.head + */ + first(): T; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.rest - **/ - tail(array: List): T[]; + * @see _.head + */ + first(): T; + } + interface RecursiveArray extends Array> {} + interface ListOfRecursiveArraysOrValues extends List> {} + + //_.flatten + interface LoDashStatic { /** - * @see _.rest - **/ - tail( - array: Array, - callback: ListIterator, - thisArg?: any): T[]; + * Flattens a nested array. If isDeep is true the array is recursively flattened, otherwise it’s only + * flattened a single level. + * + * @param array The array to flatten. + * @param isDeep Specify a deep flatten. + * @return Returns the new flattened array. + */ + flatten(array: ListOfRecursiveArraysOrValues, isDeep: boolean): T[]; /** - * @see _.rest - **/ - tail( - array: List, - callback: ListIterator, - thisArg?: any): T[]; + * @see _.flatten + */ + flatten(array: List): T[]; /** - * @see _.rest - **/ - tail( - array: Array, - n: number): T[]; + * @see _.flatten + */ + flatten(array: ListOfRecursiveArraysOrValues): RecursiveArray; + } + interface LoDashImplicitWrapper { /** - * @see _.rest - **/ - tail( - array: List, - n: number): T[]; + * @see _.flatten + */ + flatten(): LoDashImplicitArrayWrapper; + } + interface LoDashImplicitArrayWrapper { /** - * @see _.rest - **/ - tail( - array: Array, - pluckValue: string): T[]; + * @see _.flatten + */ + flatten(isDeep?: boolean): LoDashImplicitArrayWrapper; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.rest - **/ - tail( - array: List, - pluckValue: string): T[]; + * @see _.flatten + */ + flatten(isDeep?: boolean): LoDashImplicitArrayWrapper; + } + interface LoDashExplicitWrapper { /** - * @see _.rest - **/ - tail( - array: Array, - whereValue: W): T[]; + * @see _.flatten + */ + flatten(): LoDashExplicitArrayWrapper; + } + interface LoDashExplicitArrayWrapper { /** - * @see _.rest - **/ - tail( - array: List, - whereValue: W): T[]; + * @see _.flatten + */ + flatten(isDeep?: boolean): LoDashExplicitArrayWrapper; } - //_.sortedIndex - interface LoDashStatic { + interface LoDashExplicitObjectWrapper { /** - * Uses a binary search to determine the smallest index at which a value should be inserted - * into a given sorted array in order to maintain the sort order of the array. If a callback - * is provided it will be executed for value and each element of array to compute their sort - * ranking. The callback is bound to thisArg and invoked with one argument; (value). - * - * If a property name is provided for callback the created "_.pluck" style callback will - * return the property value of the given element. - * - * If an object is provided for callback the created "_.where" style callback will return - * true for elements that have the properties of the given object, else false. - * @param array The sorted list. - * @param value The value to determine its index within `list`. - * @param callback Iterator to compute the sort ranking of each value, optional. - * @return The index at which value should be inserted into array. - **/ - sortedIndex( - array: Array, - value: T, - callback?: (x: T) => TSort, - thisArg?: any): number; + * @see _.flatten + */ + flatten(isDeep?: boolean): LoDashExplicitArrayWrapper; + } + //_.flattenDeep + interface LoDashStatic { /** - * @see _.sortedIndex - **/ - sortedIndex( - array: List, - value: T, - callback?: (x: T) => TSort, - thisArg?: any): number; + * Recursively flattens a nested array. + * + * @param array The array to recursively flatten. + * @return Returns the new flattened array. + */ + flattenDeep(array: ListOfRecursiveArraysOrValues): T[]; + } + interface LoDashImplicitWrapper { /** - * @see _.sortedIndex - * @param pluckValue the _.pluck style callback - **/ - sortedIndex( - array: Array, - value: T, - pluckValue: string): number; + * @see _.flattenDeep + */ + flattenDeep(): LoDashImplicitArrayWrapper; + } + interface LoDashImplicitArrayWrapper { /** - * @see _.sortedIndex - * @param pluckValue the _.pluck style callback - **/ - sortedIndex( - array: List, - value: T, - pluckValue: string): number; + * @see _.flattenDeep + */ + flattenDeep(): LoDashImplicitArrayWrapper; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.sortedIndex - * @param pluckValue the _.where style callback - **/ - sortedIndex( - array: Array, - value: T, - whereValue: W): number; + * @see _.flattenDeep + */ + flattenDeep(): LoDashImplicitArrayWrapper; + } + interface LoDashExplicitWrapper { /** - * @see _.sortedIndex - * @param pluckValue the _.where style callback - **/ - sortedIndex( - array: List, - value: T, - whereValue: W): number; + * @see _.flattenDeep + */ + flattenDeep(): LoDashExplicitArrayWrapper; } - //_.union - interface LoDashStatic { + interface LoDashExplicitArrayWrapper { /** - * Creates an array of unique values, in order, of the provided arrays using strict - * equality for comparisons, i.e. ===. - * @param arrays The arrays to inspect. - * @return Returns an array of composite values. - **/ - union(...arrays: Array[]): T[]; + * @see _.flattenDeep + */ + flattenDeep(): LoDashExplicitArrayWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.union - **/ - union(...arrays: List[]): T[]; + * @see _.flattenDeep + */ + flattenDeep(): LoDashExplicitArrayWrapper; } - //_.uniq + // _.flattenDepth interface LoDashStatic { /** - * Creates a duplicate-value-free version of an array using strict equality for comparisons, - * i.e. ===. If the array is sorted, providing true for isSorted will use a faster algorithm. - * If a callback is provided each element of array is passed through the callback before - * uniqueness is computed. The callback is bound to thisArg and invoked with three arguments; - * (value, index, array). - * - * If a property name is provided for callback the created "_.pluck" style callback will - * return the property value of the given element. + * Recursively flatten array up to depth times. * - * If an object is provided for callback the created "_.where" style callback will return - * true for elements that have the properties of the given object, else false. - * @param array Array to remove duplicates from. - * @param isSorted True if `array` is already sorted, optiona, default = false. - * @param iterator Transform the elements of `array` before comparisons for uniqueness. - * @param context 'this' object in `iterator`, optional. - * @return Copy of `array` where all elements are unique. - **/ - uniq(array: Array, isSorted?: boolean): T[]; + * @param array The array to recursively flatten. + * @param number The maximum recursion depth. + * @return Returns the new flattened array. + */ + flattenDepth(array: ListOfRecursiveArraysOrValues, depth?: number): T[]; + } + //_.fromPairs + interface LoDashStatic { /** - * @see _.uniq - **/ - uniq(array: List, isSorted?: boolean): T[]; + * The inverse of `_.toPairs`; this method returns an object composed + * from key-value `pairs`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} pairs The key-value pairs. + * @returns {Object} Returns the new object. + * @example + * + * _.fromPairs([['fred', 30], ['barney', 40]]); + * // => { 'fred': 30, 'barney': 40 } + */ + fromPairs( + array: List<[_.StringRepresentable, T]> + ): Dictionary; /** - * @see _.uniq - **/ - uniq( - array: Array, - isSorted: boolean, - callback: ListIterator, - thisArg?: any): T[]; + @see _.fromPairs + */ + fromPairs( + array: List + ): Dictionary; + } + //_.fromPairs DUMMY + interface LoDashImplicitArrayWrapper { /** - * @see _.uniq - **/ - uniq( - array: List, - isSorted: boolean, - callback: ListIterator, - thisArg?: any): T[]; + * @see _.fromPairs + */ + fromPairs(): LoDashImplicitObjectWrapper; + } + //_.fromPairs DUMMY + interface LoDashExplicitArrayWrapper { /** - * @see _.uniq - **/ - uniq( - array: Array, - callback: ListIterator, - thisArg?: any): T[]; + * @see _.fromPairs + */ + fromPairs(): LoDashExplicitObjectWrapper; + } + //_.head + interface LoDashStatic { /** - * @see _.uniq - **/ - uniq( - array: List, - callback: ListIterator, - thisArg?: any): T[]; + * Gets the first element of array. + * + * @alias _.first + * + * @param array The array to query. + * @return Returns the first element of array. + */ + head(array: List): T; + } + interface LoDashImplicitWrapper { /** - * @see _.uniq - * @param pluckValue _.pluck style callback - **/ - uniq( - array: Array, - isSorted: boolean, - pluckValue: string): T[]; + * @see _.head + */ + head(): string; + } + interface LoDashImplicitArrayWrapper { /** - * @see _.uniq - * @param pluckValue _.pluck style callback - **/ - uniq( - array: List, - isSorted: boolean, - pluckValue: string): T[]; + * @see _.head + */ + head(): T; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.uniq - * @param pluckValue _.pluck style callback - **/ - uniq( - array: Array, - pluckValue: string): T[]; + * @see _.head + */ + head(): T; + } + interface LoDashExplicitWrapper { /** - * @see _.uniq - * @param pluckValue _.pluck style callback - **/ - uniq( - array: List, - pluckValue: string): T[]; + * @see _.head + */ + head(): LoDashExplicitWrapper; + } + interface LoDashExplicitArrayWrapper { /** - * @see _.uniq - * @param whereValue _.where style callback - **/ - uniq( - array: Array, - isSorted: boolean, - whereValue: W): T[]; + * @see _.head + */ + head(): T; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.uniq - * @param whereValue _.where style callback - **/ - uniq( - array: List, - isSorted: boolean, - whereValue: W): T[]; + * @see _.head + */ + head(): T; + } + //_.indexOf + interface LoDashStatic { /** - * @see _.uniq - * @param whereValue _.where style callback - **/ - uniq( - array: Array, - whereValue: W): T[]; + * Gets the index at which the first occurrence of `value` is found in `array` + * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. If `fromIndex` is negative, it's used as the offset + * from the end of `array`. If `array` is sorted providing `true` for `fromIndex` + * performs a faster binary search. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to search. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.indexOf([1, 2, 1, 2], 2); + * // => 1 + * + * // using `fromIndex` + * _.indexOf([1, 2, 1, 2], 2, 2); + * // => 3 + */ + indexOf( + array: List, + value: T, + fromIndex?: boolean|number + ): number; + } + interface LoDashImplicitArrayWrapper { /** - * @see _.uniq - * @param whereValue _.where style callback - **/ - uniq( - array: List, - whereValue: W): T[]; + * @see _.indexOf + */ + indexOf( + value: T, + fromIndex?: boolean|number + ): number; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.uniq - **/ - unique(array: Array, isSorted?: boolean): T[]; + * @see _.indexOf + */ + indexOf( + value: TValue, + fromIndex?: boolean|number + ): number; + } + interface LoDashExplicitArrayWrapper { /** - * @see _.uniq - **/ - unique(array: List, isSorted?: boolean): T[]; + * @see _.indexOf + */ + indexOf( + value: T, + fromIndex?: boolean|number + ): LoDashExplicitWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.uniq - **/ - unique( - array: Array, - callback: ListIterator, - thisArg?: any): T[]; + * @see _.indexOf + */ + indexOf( + value: TValue, + fromIndex?: boolean|number + ): LoDashExplicitWrapper; + } + //_.intersectionBy DUMMY + interface LoDashStatic { /** - * @see _.uniq - **/ - unique( - array: List, - callback: ListIterator, - thisArg?: any): T[]; + * This method is like `_.intersection` except that it accepts `iteratee` + * which is invoked for each element of each `arrays` to generate the criterion + * by which uniqueness is computed. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of shared values. + * @example + * + * _.intersectionBy([2.1, 1.2], [4.3, 2.4], Math.floor); + * // => [2.1] + * + * // using the `_.property` iteratee shorthand + * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }] + */ + intersectionBy( + array: any[]|List, + ...values: any[] + ): any[]; + } + //_.intersectionWith DUMMY + interface LoDashStatic { /** - * @see _.uniq - **/ - unique( - array: Array, - isSorted: boolean, - callback: ListIterator, - thisArg?: any): T[]; + * This method is like `_.intersection` except that it accepts `comparator` + * which is invoked to compare elements of `arrays`. The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of shared values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.intersectionWith(objects, others, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }] + */ + intersectionWith( + array: any[]|List, + ...values: any[] + ): any[]; + } + //_.join + interface LoDashStatic { /** - * @see _.uniq - **/ - unique( - array: List, - isSorted: boolean, - callback: ListIterator, - thisArg?: any): T[]; + * Converts all elements in `array` into a string separated by `separator`. + * + * @param array The array to convert. + * @param separator The element separator. + * @returns Returns the joined string. + */ + join( + array: List, + separator?: string + ): string; + } + interface LoDashImplicitWrapper { /** - * @see _.uniq - * @param pluckValue _.pluck style callback - **/ - unique( - array: Array, - isSorted: boolean, - pluckValue: string): T[]; + * @see _.join + */ + join(separator?: string): string; + } + interface LoDashImplicitArrayWrapper { /** - * @see _.uniq - * @param pluckValue _.pluck style callback - **/ - unique( - array: List, - isSorted: boolean, - pluckValue: string): T[]; + * @see _.join + */ + join(separator?: string): string; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.uniq - * @param pluckValue _.pluck style callback - **/ - unique( - array: Array, - pluckValue: string): T[]; + * @see _.join + */ + join(separator?: string): string; + } + interface LoDashExplicitWrapper { /** - * @see _.uniq - * @param pluckValue _.pluck style callback - **/ - unique( - array: List, - pluckValue: string): T[]; + * @see _.join + */ + join(separator?: string): LoDashExplicitWrapper; + } + interface LoDashExplicitArrayWrapper { /** - * @see _.uniq - * @param whereValue _.where style callback - **/ - unique( - array: Array, - whereValue?: W): T[]; + * @see _.join + */ + join(separator?: string): LoDashExplicitWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.uniq - * @param whereValue _.where style callback - **/ - unique( - array: List, - whereValue?: W): T[]; + * @see _.join + */ + join(separator?: string): LoDashExplicitWrapper; + } + //_.pullAll DUMMY + interface LoDashStatic { /** - * @see _.uniq - * @param whereValue _.where style callback - **/ - unique( - array: Array, - isSorted: boolean, - whereValue?: W): T[]; + * This method is like `_.pull` except that it accepts an array of values to remove. + * + * **Note:** Unlike `_.difference`, this method mutates `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3, 1, 2, 3]; + * + * _.pull(array, [2, 3]); + * console.log(array); + * // => [1, 1] + */ + pullAll( + array: any[]|List, + ...values: any[] + ): any[]; + } + //_.pullAllBy DUMMY + interface LoDashStatic { /** - * @see _.uniq - * @param whereValue _.where style callback - **/ - unique( - array: List, - isSorted: boolean, - whereValue?: W): T[]; + * This method is like `_.pullAll` except that it accepts `iteratee` which is + * invoked for each element of `array` and `values` to to generate the criterion + * by which uniqueness is computed. The iteratee is invoked with one argument: (value). + * + * **Note:** Unlike `_.differenceBy`, this method mutates `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns `array`. + * @example + * + * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }]; + * + * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x'); + * console.log(array); + * // => [{ 'x': 2 }] + */ + pullAllBy( + array: any[]|List, + ...values: any[] + ): any[]; } - interface LoDashArrayWrapper { + //_.reverse DUMMY + interface LoDashStatic { /** - * @see _.uniq - **/ - uniq(isSorted?: boolean): LoDashArrayWrapper; + * Reverses `array` so that the first element becomes the last, the second + * element becomes the second to last, and so on. + * + * **Note:** This method mutates `array` and is based on + * [`Array#reverse`](https://mdn.io/Array/reverse). + * + * @memberOf _ + * @category Array + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3]; + * + * _.reverse(array); + * // => [3, 2, 1] + * + * console.log(array); + * // => [3, 2, 1] + */ + reverse( + array: any[]|List, + ...values: any[] + ): any[]; + } + //_.sortedIndexOf + interface LoDashStatic { /** - * @see _.uniq - **/ - uniq( - isSorted: boolean, - callback: ListIterator, - thisArg?: any): LoDashArrayWrapper; + * This method is like `_.indexOf` except that it performs a binary + * search on a sorted `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to search. + * @param {*} value The value to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.sortedIndexOf([1, 1, 2, 2], 2); + * // => 2 + */ + sortedIndexOf( + array: List, + value: T + ): number; + } + interface LoDashImplicitArrayWrapper { /** - * @see _.uniq - **/ - uniq( - callback: ListIterator, - thisArg?: any): LoDashArrayWrapper; + * @see _.sortedIndexOf + */ + sortedIndexOf( + value: T + ): number; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.uniq - * @param pluckValue _.pluck style callback - **/ - uniq( - isSorted: boolean, - pluckValue: string): LoDashArrayWrapper; + * @see _.sortedIndexOf + */ + sortedIndexOf( + value: TValue + ): number; + } + interface LoDashExplicitArrayWrapper { /** - * @see _.uniq - * @param pluckValue _.pluck style callback - **/ - uniq(pluckValue: string): LoDashArrayWrapper; + * @see _.sortedIndexOf + */ + sortedIndexOf( + value: T + ): LoDashExplicitWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.uniq - * @param whereValue _.where style callback - **/ - uniq( - isSorted: boolean, - whereValue: W): LoDashArrayWrapper; + * @see _.sortedIndexOf + */ + sortedIndexOf( + value: TValue + ): LoDashExplicitWrapper; + } + //_.initial + interface LoDashStatic { /** - * @see _.uniq - * @param whereValue _.where style callback - **/ - uniq( - whereValue: W): LoDashArrayWrapper; + * Gets all but the last element of array. + * + * @param array The array to query. + * @return Returns the slice of array. + */ + initial(array: List): T[]; + } + interface LoDashImplicitArrayWrapper { /** - * @see _.uniq - **/ - unique(isSorted?: boolean): LoDashArrayWrapper; + * @see _.initial + */ + initial(): LoDashImplicitArrayWrapper; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.uniq - **/ - unique( - isSorted: boolean, - callback: ListIterator, - thisArg?: any): LoDashArrayWrapper; + * @see _.initial + */ + initial(): LoDashImplicitArrayWrapper; + } + interface LoDashExplicitArrayWrapper { /** - * @see _.uniq - **/ - unique( - callback: ListIterator, - thisArg?: any): LoDashArrayWrapper; + * @see _.initial + */ + initial(): LoDashExplicitArrayWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.uniq - * @param pluckValue _.pluck style callback - **/ - unique( - isSorted: boolean, - pluckValue: string): LoDashArrayWrapper; + * @see _.initial + */ + initial(): LoDashExplicitArrayWrapper; + } + //_.intersection + interface LoDashStatic { /** - * @see _.uniq - * @param pluckValue _.pluck style callback - **/ - unique(pluckValue: string): LoDashArrayWrapper; + * Creates an array of unique values that are included in all of the provided arrays using SameValueZero for + * equality comparisons. + * + * @param arrays The arrays to inspect. + * @return Returns the new array of shared values. + */ + intersection(...arrays: (T[]|List)[]): T[]; + } + interface LoDashImplicitArrayWrapper { /** - * @see _.uniq - * @param whereValue _.where style callback - **/ - unique( - isSorted: boolean, - whereValue: W): LoDashArrayWrapper; + * @see _.intersection + */ + intersection(...arrays: (TResult[]|List)[]): LoDashImplicitArrayWrapper; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.uniq - * @param whereValue _.where style callback - **/ - unique( - whereValue: W): LoDashArrayWrapper; + * @see _.intersection + */ + intersection(...arrays: (TResult[]|List)[]): LoDashImplicitArrayWrapper; } - //_.without - interface LoDashStatic { + interface LoDashExplicitArrayWrapper { /** - * Creates an array excluding all provided values using strict equality for comparisons, i.e. ===. - * @param array The array to filter. - * @param values The value(s) to exclude. - * @return A new array of filtered values. - **/ - without( - array: Array, - ...values: T[]): T[]; + * @see _.intersection + */ + intersection(...arrays: (TResult[]|List)[]): LoDashExplicitArrayWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.without - **/ - without( - array: List, - ...values: T[]): T[]; + * @see _.intersection + */ + intersection(...arrays: (TResult[]|List)[]): LoDashExplicitArrayWrapper; } - //_.xor + //_.last interface LoDashStatic { /** - * Creates an array that is the symmetric difference of the provided arrays. - * @param array The array to process - * @param others The arrays of values to calculate the symmetric difference. - * @return Returns a new array of filtered values. - **/ - xor( - array: Array, - ...others: Array[]): T[]; - /** - * @see _.xor - **/ - xor( - array: List, - ...others: List[]): T[]; + * Gets the last element of array. + * + * @param array The array to query. + * @return Returns the last element of array. + */ + last(array: List): T; } - interface LoDashArrayWrapper { - /** - * @see _.xor - **/ - xor( - ...others: Array[]): LoDashArrayWrapper; + interface LoDashImplicitWrapper { /** - * @see _.xor - **/ - xor( - ...others: List[]): LoDashArrayWrapper; + * @see _.last + */ + last(): string; } - //_.zip - interface LoDashStatic { - /** - * Creates an array of grouped elements, the first of which contains the first - * elements of the given arrays, the second of which contains the second elements - * of the given arrays, and so on. - * @param arrays Arrays to process. - * @return A new array of grouped elements. - **/ - zip(...arrays: any[][]): any[][]; - + interface LoDashImplicitArrayWrapper { /** - * @see _.zip - **/ - zip(...arrays: any[]): any[]; + * @see _.last + */ + last(): T; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.zip - **/ - unzip(...arrays: any[][]): any[][]; + * @see _.last + */ + last(): T; + } + interface LoDashExplicitWrapper { /** - * @see _.zip - **/ - unzip(...arrays: any[]): any[]; + * @see _.last + */ + last(): LoDashExplicitWrapper; } - interface LoDashArrayWrapper { + interface LoDashExplicitArrayWrapper { /** - * @see _.zip - **/ - zip(...arrays: any[][]): _.LoDashArrayWrapper; + * @see _.last + */ + last(): T; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.zip - **/ - unzip(...arrays: any[]): _.LoDashArrayWrapper; + * @see _.last + */ + last(): T; } - //_.zipObject + //_.lastIndexOf interface LoDashStatic { /** - * The inverse of _.pairs; this method returns an object composed from arrays of property - * names and values. Provide either a single two dimensional array, e.g. [[key1, value1], - * [key2, value2]] or two arrays, one of property names and one of corresponding values. - * @param props The property names. - * @param values The property values. - * @return Returns the new object. - **/ - zipObject( - props: List, - values?: List): TResult; - - /** - * @see _.zipObject - **/ - zipObject(props: List>): Dictionary; + * This method is like _.indexOf except that it iterates over elements of array from right to left. + * + * @param array The array to search. + * @param value The value to search for. + * @param fromIndex The index to search from or true to perform a binary search on a sorted array. + * @return Returns the index of the matched value, else -1. + */ + lastIndexOf( + array: List, + value: T, + fromIndex?: boolean|number + ): number; + } + interface LoDashImplicitArrayWrapper { /** - * @see _.zipObject - **/ - object( - props: List, - values?: List): TResult; + * @see _.lastIndexOf + */ + lastIndexOf( + value: T, + fromIndex?: boolean|number + ): number; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.zipObject - **/ - object(props: List>): Dictionary; + * @see _.lastIndexOf + */ + lastIndexOf( + value: TResult, + fromIndex?: boolean|number + ): number; } - interface LoDashArrayWrapper { + interface LoDashExplicitArrayWrapper { /** - * @see _.zipObject - **/ - zipObject(values?: List): _.LoDashObjectWrapper>; + * @see _.lastIndexOf + */ + lastIndexOf( + value: T, + fromIndex?: boolean|number + ): LoDashExplicitWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.zipObject - **/ - object(values?: List): _.LoDashObjectWrapper>; + * @see _.lastIndexOf + */ + lastIndexOf( + value: TResult, + fromIndex?: boolean|number + ): LoDashExplicitWrapper; } - /* ************* - * Collections * - ************* */ - - //_.at + //_.pull interface LoDashStatic { /** - * Creates an array of elements from the specified indexes, or keys, of the collection. - * Indexes may be specified as individual arguments or as arrays of indexes. - * @param collection The collection to iterate over. - * @param indexes The indexes of collection to retrieve, specified as individual indexes or - * arrays of indexes. - * @return A new array of elements corresponding to the provided indexes. - **/ - at( - collection: Array, - indexes: number[]): T[]; + * Removes all provided values from array using SameValueZero for equality comparisons. + * + * Note: Unlike _.without, this method mutates array. + * + * @param array The array to modify. + * @param values The values to remove. + * @return Returns array. + */ + pull( + array: T[], + ...values: T[] + ): T[]; /** - * @see _.at - **/ - at( - collection: List, - indexes: number[]): T[]; + * @see _.pull + */ + pull( + array: List, + ...values: T[] + ): List; + } + interface LoDashImplicitArrayWrapper { /** - * @see _.at - **/ - at( - collection: Dictionary, - indexes: number[]): T[]; + * @see _.pull + */ + pull(...values: T[]): LoDashImplicitArrayWrapper; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.at - **/ - at( - collection: Array, - ...indexes: number[]): T[]; + * @see _.pull + */ + pull(...values: TValue[]): LoDashImplicitObjectWrapper>; + } + interface LoDashExplicitArrayWrapper { /** - * @see _.at - **/ - at( - collection: List, - ...indexes: number[]): T[]; + * @see _.pull + */ + pull(...values: T[]): LoDashExplicitArrayWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.at - **/ - at( - collection: Dictionary, - ...indexes: number[]): T[]; + * @see _.pull + */ + pull(...values: TValue[]): LoDashExplicitObjectWrapper>; } - //_.contains + //_.pullAt interface LoDashStatic { /** - * Checks if a given value is present in a collection using strict equality for comparisons, - * i.e. ===. If fromIndex is negative, it is used as the offset from the end of the collection. - * @param collection The collection to iterate over. - * @param target The value to check for. - * @param fromIndex The index to search from. - * @return True if the target element is found, else false. - **/ - contains( - collection: Array, - target: T, - fromIndex?: number): boolean; + * Removes elements from array corresponding to the given indexes and returns an array of the removed elements. + * Indexes may be specified as an array of indexes or as individual arguments. + * + * Note: Unlike _.at, this method mutates array. + * + * @param array The array to modify. + * @param indexes The indexes of elements to remove, specified as individual indexes or arrays of indexes. + * @return Returns the new array of removed elements. + */ + pullAt( + array: List, + ...indexes: (number|number[])[] + ): T[]; + } + interface LoDashImplicitArrayWrapper { /** - * @see _.contains - **/ - contains( - collection: List, - target: T, - fromIndex?: number): boolean; + * @see _.pullAt + */ + pullAt(...indexes: (number|number[])[]): LoDashImplicitArrayWrapper; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.contains - * @param dictionary The dictionary to iterate over. - * @param key The key in the dictionary to search for. - **/ - contains( - dictionary: Dictionary, - key: string, - fromIndex?: number): boolean; + * @see _.pullAt + */ + pullAt(...indexes: (number|number[])[]): LoDashImplicitArrayWrapper; + } + interface LoDashExplicitArrayWrapper { /** - * @see _.contains - * @param searchString the string to search - * @param targetString the string to search for - **/ - contains( - searchString: string, - targetString: string, - fromIndex?: number): boolean; + * @see _.pullAt + */ + pullAt(...indexes: (number|number[])[]): LoDashExplicitArrayWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.contains - **/ - include( - collection: Array, - target: T, - fromIndex?: number): boolean; + * @see _.pullAt + */ + pullAt(...indexes: (number|number[])[]): LoDashExplicitArrayWrapper; + } + //_.remove + interface LoDashStatic { /** - * @see _.contains - **/ - include( - collection: List, - target: T, - fromIndex?: number): boolean; + * Removes all elements from array that predicate returns truthy for and returns an array of the removed + * elements. The predicate is bound to thisArg and invoked with three arguments: (value, index, array). + * + * If a property name is provided for predicate the created _.property style callback returns the property + * value of the given element. + * + * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for + * elements that have a matching property value, else false. + * + * If an object is provided for predicate the created _.matches style callback returns true for elements that + * have the properties of the given object, else false. + * + * Note: Unlike _.filter, this method mutates array. + * + * @param array The array to modify. + * @param predicate The function invoked per iteration. + * @param thisArg The this binding of predicate. + * @return Returns the new array of removed elements. + */ + remove( + array: List, + predicate?: ListIterator + ): T[]; /** - * @see _.contains - **/ - include( - dictionary: Dictionary, - key: string, - fromIndex?: number): boolean; + * @see _.remove + */ + remove( + array: List, + predicate?: string + ): T[]; /** - * @see _.contains - **/ - include( - searchString: string, - targetString: string, - fromIndex?: number): boolean; + * @see _.remove + */ + remove( + array: List, + predicate?: W + ): T[]; } - //_.countBy - interface LoDashStatic { + interface LoDashImplicitArrayWrapper { /** - * Creates an object composed of keys generated from the results of running each element - * of collection through the callback. The corresponding value of each key is the number - * of times the key was returned by the callback. The callback is bound to thisArg and - * invoked with three arguments; (value, index|key, collection). - * - * If a property name is provided for callback the created "_.pluck" style callback will - * return the property value of the given element. - * - * If an object is provided for callback the created "_.where" style callback will return - * true for elements that have the properties of the given object, else false. - * @param collection The collection to iterate over. - * @param callback The function called per iteration. - * @param thisArg The this binding of callback. - * @return Returns the composed aggregate object. - **/ - countBy( - collection: Array, - callback?: ListIterator, - thisArg?: any): Dictionary; + * @see _.remove + */ + remove( + predicate?: ListIterator + ): LoDashImplicitArrayWrapper; /** - * @see _.countBy - * @param callback Function name - **/ - countBy( - collection: List, - callback?: ListIterator, - thisArg?: any): Dictionary; + * @see _.remove + */ + remove( + predicate?: string + ): LoDashImplicitArrayWrapper; /** - * @see _.countBy - * @param callback Function name - **/ - countBy( - collection: Dictionary, - callback?: DictionaryIterator, - thisArg?: any): Dictionary; + * @see _.remove + */ + remove( + predicate?: W + ): LoDashImplicitArrayWrapper; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.countBy - * @param callback Function name - **/ - countBy( - collection: Array, - callback: string, - thisArg?: any): Dictionary; + * @see _.remove + */ + remove( + predicate?: ListIterator + ): LoDashImplicitArrayWrapper; /** - * @see _.countBy - * @param callback Function name - **/ - countBy( - collection: List, - callback: string, - thisArg?: any): Dictionary; + * @see _.remove + */ + remove( + predicate?: string + ): LoDashImplicitArrayWrapper; /** - * @see _.countBy - * @param callback Function name - **/ - countBy( - collection: Dictionary, - callback: string, - thisArg?: any): Dictionary; + * @see _.remove + */ + remove( + predicate?: W + ): LoDashImplicitArrayWrapper; } - interface LoDashArrayWrapper { + interface LoDashExplicitArrayWrapper { /** - * @see _.countBy - **/ - countBy( - callback?: ListIterator, - thisArg?: any): LoDashObjectWrapper>; + * @see _.remove + */ + remove( + predicate?: ListIterator + ): LoDashExplicitArrayWrapper; /** - * @see _.countBy - * @param callback Function name - **/ - countBy( - callback: string, - thisArg?: any): LoDashObjectWrapper>; - } + * @see _.remove + */ + remove( + predicate?: string + ): LoDashExplicitArrayWrapper; - //_.every - interface LoDashStatic { /** - * Checks if the given callback returns truey value for all elements of a collection. - * The callback is bound to thisArg and invoked with three arguments; (value, index|key, - * collection). - * - * If a property name is provided for callback the created "_.pluck" style callback will - * return the property value of the given element. - * - * If an object is provided for callback the created "_.where" style callback will return - * true for elements that have the properties of the given object, else false. - * @param collection The collection to iterate over. - * @param callback The function called per iteration. - * @param thisArg The this binding of callback. - * @return True if all elements passed the callback check, else false. - **/ - every( - collection: Array, - callback?: ListIterator, - thisArg?: any): boolean; + * @see _.remove + */ + remove( + predicate?: W + ): LoDashExplicitArrayWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.every - * @param pluckValue _.pluck style callback - **/ - every( - collection: List, - callback?: ListIterator, - thisArg?: any): boolean; + * @see _.remove + */ + remove( + predicate?: ListIterator + ): LoDashExplicitArrayWrapper; /** - * @see _.every - * @param pluckValue _.pluck style callback - **/ - every( - collection: Dictionary, - callback?: DictionaryIterator, - thisArg?: any): boolean; + * @see _.remove + */ + remove( + predicate?: string + ): LoDashExplicitArrayWrapper; /** - * @see _.every - * @param pluckValue _.pluck style callback - **/ - every( - collection: Array, - pluckValue: string): boolean; + * @see _.remove + */ + remove( + predicate?: W + ): LoDashExplicitArrayWrapper; + } + //_.tail + interface LoDashStatic { /** - * @see _.every - * @param pluckValue _.pluck style callback - **/ - every( - collection: List, - pluckValue: string): boolean; + * Gets all but the first element of array. + * + * @alias _.tail + * + * @param array The array to query. + * @return Returns the slice of array. + */ + tail(array: List): T[]; + } + interface LoDashImplicitArrayWrapper { /** - * @see _.every - * @param pluckValue _.pluck style callback - **/ - every( - collection: Dictionary, - pluckValue: string): boolean; + * @see _.tail + */ + tail(): LoDashImplicitArrayWrapper; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.every - * @param whereValue _.where style callback - **/ - every( - collection: Array, - whereValue: W): boolean; + * @see _.tail + */ + tail(): LoDashImplicitArrayWrapper; + } + interface LoDashExplicitArrayWrapper { /** - * @see _.every - * @param whereValue _.where style callback - **/ - every( - collection: List, - whereValue: W): boolean; + * @see _.tail + */ + tail(): LoDashExplicitArrayWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.every - * @param whereValue _.where style callback - **/ - every( - collection: Dictionary, - whereValue: W): boolean; + * @see _.tail + */ + tail(): LoDashExplicitArrayWrapper; + } + //_.slice + interface LoDashStatic { /** - * @see _.every - **/ - all( - collection: Array, - callback?: ListIterator, - thisArg?: any): boolean; + * Creates a slice of array from start up to, but not including, end. + * + * @param array The array to slice. + * @param start The start position. + * @param end The end position. + * @return Returns the slice of array. + */ + slice( + array: T[], + start?: number, + end?: number + ): T[]; + } + interface LoDashImplicitArrayWrapper { /** - * @see _.every - **/ - all( - collection: List, - callback?: ListIterator, - thisArg?: any): boolean; + * @see _.slice + */ + slice( + start?: number, + end?: number + ): LoDashImplicitArrayWrapper; + } + interface LoDashExplicitArrayWrapper { /** - * @see _.every - **/ - all( - collection: Dictionary, - callback?: DictionaryIterator, - thisArg?: any): boolean; + * @see _.slice + */ + slice( + start?: number, + end?: number + ): LoDashExplicitArrayWrapper; + } + //_.sortedIndex + interface LoDashStatic { /** - * @see _.every - * @param pluckValue _.pluck style callback - **/ - all( - collection: Array, - pluckValue: string): boolean; + * Uses a binary search to determine the lowest index at which `value` should + * be inserted into `array` in order to maintain its sort order. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @returns {number} Returns the index at which `value` should be inserted into `array`. + * @example + * + * _.sortedIndex([30, 50], 40); + * // => 1 + * + * _.sortedIndex([4, 5], 4); + * // => 0 + */ + sortedIndex( + array: List, + value: T + ): number; /** - * @see _.every - * @param pluckValue _.pluck style callback - **/ - all( - collection: List, - pluckValue: string): boolean; + * @see _.sortedIndex + */ + sortedIndex( + array: List, + value: T + ): number; /** - * @see _.every - * @param pluckValue _.pluck style callback - **/ - all( - collection: Dictionary, - pluckValue: string): boolean; + * @see _.sortedIndex + */ + sortedIndex( + array: List, + value: T + ): number; /** - * @see _.every - * @param whereValue _.where style callback - **/ - all( - collection: Array, - whereValue: W): boolean; + * @see _.sortedIndex + */ + sortedIndex( + array: List, + value: T + ): number; /** - * @see _.every - * @param whereValue _.where style callback - **/ - all( - collection: List, - whereValue: W): boolean; + * @see _.sortedIndex + */ + sortedIndex( + array: List, + value: T + ): number; + } + interface LoDashImplicitWrapper { /** - * @see _.every - * @param whereValue _.where style callback - **/ - all( - collection: Dictionary, - whereValue: W): boolean; + * @see _.sortedIndex + */ + sortedIndex( + value: string + ): number; } - //_.filter - interface LoDashStatic { + interface LoDashImplicitArrayWrapper { /** - * Iterates over elements of a collection, returning an array of all elements the - * callback returns truey for. The callback is bound to thisArg and invoked with three - * arguments; (value, index|key, collection). - * - * If a property name is provided for callback the created "_.pluck" style callback will - * return the property value of the given element. - * - * If an object is provided for callback the created "_.where" style callback will return - * true for elements that have the properties of the given object, else false. - * @param collection The collection to iterate over. - * @param callback The function called per iteration. - * @param context The this binding of callback. - * @return Returns a new array of elements that passed the callback check. - **/ - filter( - collection: Array, - callback: ListIterator, - thisArg?: any): T[]; + * @see _.sortedIndex + */ + sortedIndex( + value: T + ): number; /** - * @see _.filter - **/ - filter( - collection: List, - callback: ListIterator, - thisArg?: any): T[]; + * @see _.sortedIndex + */ + sortedIndex( + value: T + ): number; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.filter - **/ - filter( - collection: Dictionary, - callback: DictionaryIterator, - thisArg?: any): T[]; + * @see _.sortedIndex + */ + sortedIndex( + value: T + ): number; /** - * @see _.filter - * @param pluckValue _.pluck style callback - **/ - filter( - collection: Array, - pluckValue: string): T[]; + * @see _.sortedIndex + */ + sortedIndex( + value: T + ): number; /** - * @see _.filter - * @param pluckValue _.pluck style callback - **/ - filter( - collection: List, - pluckValue: string): T[]; + * @see _.sortedIndex + */ + sortedIndex( + value: T + ): number; + } + interface LoDashExplicitWrapper { /** - * @see _.filter - * @param pluckValue _.pluck style callback - **/ - filter( - collection: Dictionary, - pluckValue: string): T[]; + * @see _.sortedIndex + */ + sortedIndex( + value: string + ): LoDashExplicitWrapper; + } + interface LoDashExplicitArrayWrapper { /** - * @see _.filter - * @param pluckValue _.pluck style callback - **/ - filter( - collection: Array, - whereValue: W): T[]; + * @see _.sortedIndex + */ + sortedIndex( + value: T + ): LoDashExplicitWrapper; /** - * @see _.filter - * @param pluckValue _.pluck style callback - **/ - filter( - collection: List, - whereValue: W): T[]; + * @see _.sortedIndex + */ + sortedIndex( + value: T + ): LoDashExplicitWrapper; /** - * @see _.filter - * @param pluckValue _.pluck style callback - **/ - filter( - collection: Dictionary, - whereValue: W): T[]; + * @see _.sortedIndex + */ + sortedIndex( + value: T + ): LoDashExplicitWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.filter - **/ - select( - collection: Array, - callback: ListIterator, - thisArg?: any): T[]; + * @see _.sortedIndex + */ + sortedIndex( + value: T + ): LoDashExplicitWrapper; /** - * @see _.filter - **/ - select( - collection: List, - callback: ListIterator, - thisArg?: any): T[]; + * @see _.sortedIndex + */ + sortedIndex( + value: T + ): LoDashExplicitWrapper; /** - * @see _.filter - **/ - select( - collection: Dictionary, - callback: DictionaryIterator, - thisArg?: any): T[]; + * @see _.sortedIndex + */ + sortedIndex( + value: T + ): LoDashExplicitWrapper; + + } + + //_.sortedIndexBy + interface LoDashStatic { /** - * @see _.filter - * @param pluckValue _.pluck style callback - **/ - select( - collection: Array, - pluckValue: string): T[]; + * This method is like `_.sortedIndex` except that it accepts `iteratee` + * which is invoked for `value` and each element of `array` to compute their + * sort ranking. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the index at which `value` should be inserted into `array`. + * @example + * + * var dict = { 'thirty': 30, 'forty': 40, 'fifty': 50 }; + * + * _.sortedIndexBy(['thirty', 'fifty'], 'forty', _.propertyOf(dict)); + * // => 1 + * + * // using the `_.property` iteratee shorthand + * _.sortedIndexBy([{ 'x': 4 }, { 'x': 5 }], { 'x': 4 }, 'x'); + * // => 0 + */ + sortedIndexBy( + array: List, + value: T, + iteratee: (x: T) => TSort + ): number; /** - * @see _.filter - * @param pluckValue _.pluck style callback - **/ - select( - collection: List, - pluckValue: string): T[]; + * @see _.sortedIndexBy + */ + sortedIndexBy( + array: List, + value: T, + iteratee: (x: T) => any + ): number; /** - * @see _.filter - * @param pluckValue _.pluck style callback - **/ - select( - collection: Dictionary, - pluckValue: string): T[]; + * @see _.sortedIndexBy + */ + sortedIndexBy( + array: List, + value: T, + iteratee: string + ): number; /** - * @see _.filter - * @param pluckValue _.pluck style callback - **/ - select( - collection: Array, - whereValue: W): T[]; + * @see _.sortedIndexBy + */ + sortedIndexBy( + array: List, + value: T, + iteratee: W + ): number; /** - * @see _.filter - * @param pluckValue _.pluck style callback - **/ - select( - collection: List, - whereValue: W): T[]; + * @see _.sortedIndexBy + */ + sortedIndexBy( + array: List, + value: T, + iteratee: Object + ): number; + } + interface LoDashImplicitWrapper { /** - * @see _.filter - * @param pluckValue _.pluck style callback - **/ - select( - collection: Dictionary, - whereValue: W): T[]; + * @see _.sortedIndexBy + */ + sortedIndexBy( + value: string, + iteratee: (x: string) => TSort + ): number; } - interface LoDashArrayWrapper { + interface LoDashImplicitArrayWrapper { /** - * @see _.filter - **/ - filter( - callback: ListIterator, - thisArg?: any): LoDashArrayWrapper; + * @see _.sortedIndexBy + */ + sortedIndexBy( + value: T, + iteratee: (x: T) => TSort + ): number; /** - * @see _.filter - * @param pluckValue _.pluck style callback - **/ - filter( - pluckValue: string): LoDashArrayWrapper; + * @see _.sortedIndexBy + */ + sortedIndexBy( + value: T, + iteratee: string + ): number; /** - * @see _.filter - * @param pluckValue _.pluck style callback - **/ - filter( - whereValue: W): LoDashArrayWrapper; + * @see _.sortedIndexBy + */ + sortedIndexBy( + value: T, + iteratee: W + ): number; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.filter - **/ - select( - callback: ListIterator, - thisArg?: any): LoDashArrayWrapper; + * @see _.sortedIndexBy + */ + sortedIndexBy( + value: T, + iteratee: (x: T) => TSort + ): number; /** - * @see _.filter - * @param pluckValue _.pluck style callback - **/ - select( - pluckValue: string): LoDashArrayWrapper; + * @see _.sortedIndexBy + */ + sortedIndexBy( + value: T, + iteratee: (x: T) => any + ): number; /** - * @see _.filter - * @param pluckValue _.pluck style callback - **/ - select( - whereValue: W): LoDashArrayWrapper; - } + * @see _.sortedIndexBy + */ + sortedIndexBy( + value: T, + iteratee: string + ): number; - interface LoDashObjectWrapper { /** - * @see _.filter - **/ - filter( - callback: ObjectIterator, - thisArg?: any): LoDashObjectWrapper; + * @see _.sortedIndexBy + */ + sortedIndexBy( + value: T, + iteratee: W + ): number; + + /** + * @see _.sortedIndexBy + */ + sortedIndexBy( + value: T, + iteratee: Object + ): number; } - //_.find - interface LoDashStatic { + interface LoDashExplicitWrapper { /** - * Iterates over elements of a collection, returning the first element that the callback - * returns truey for. The callback is bound to thisArg and invoked with three arguments; - * (value, index|key, collection). - * - * If a property name is provided for callback the created "_.pluck" style callback will - * return the property value of the given element. - * - * If an object is provided for callback the created "_.where" style callback will return - * true for elements that have the properties of the given object, else false. - * @param collection Searches for a value in this list. - * @param callback The function called per iteration. - * @param thisArg The this binding of callback. - * @return The found element, else undefined. - **/ - find( - collection: Array, - callback: ListIterator, - thisArg?: any): T; + * @see _.sortedIndexBy + */ + sortedIndexBy( + value: string, + iteratee: (x: string) => TSort + ): LoDashExplicitWrapper; + } + interface LoDashExplicitArrayWrapper { /** - * @see _.find - **/ - find( - collection: List, - callback: ListIterator, - thisArg?: any): T; + * @see _.sortedIndexBy + */ + sortedIndexBy( + value: T, + iteratee: (x: T) => TSort + ): LoDashExplicitWrapper; /** - * @see _.find - **/ - find( - collection: Dictionary, - callback: DictionaryIterator, - thisArg?: any): T; + * @see _.sortedIndexBy + */ + sortedIndexBy( + value: T, + iteratee: string + ): LoDashExplicitWrapper; /** - * @see _.find - * @param _.pluck style callback - **/ - find( - collection: Array, - whereValue: W): T; + * @see _.sortedIndexBy + */ + sortedIndexBy( + value: T, + iteratee: W + ): LoDashExplicitWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.find - * @param _.pluck style callback - **/ - find( - collection: List, - whereValue: W): T; + * @see _.sortedIndexBy + */ + sortedIndexBy( + value: T, + iteratee: (x: T) => TSort + ): LoDashExplicitWrapper; /** - * @see _.find - * @param _.pluck style callback - **/ - find( - collection: Dictionary, - whereValue: W): T; + * @see _.sortedIndexBy + */ + sortedIndexBy( + value: T, + iteratee: (x: T) => any + ): LoDashExplicitWrapper; /** - * @see _.find - * @param _.where style callback - **/ - find( - collection: Array, - pluckValue: string): T; + * @see _.sortedIndexBy + */ + sortedIndexBy( + value: T, + iteratee: string + ): LoDashExplicitWrapper; /** - * @see _.find - * @param _.where style callback - **/ - find( - collection: List, - pluckValue: string): T; + * @see _.sortedIndexBy + */ + sortedIndexBy( + value: T, + iteratee: W + ): LoDashExplicitWrapper; /** - * @see _.find - * @param _.where style callback - **/ - find( - collection: Dictionary, - pluckValue: string): T; + * @see _.sortedIndexBy + */ + sortedIndexBy( + value: T, + iteratee: Object + ): LoDashExplicitWrapper; + } + //_.sortedLastIndex + interface LoDashStatic { /** - * @see _.find - **/ - detect( - collection: Array, - callback: ListIterator, - thisArg?: any): T; + * This method is like `_.sortedIndex` except that it returns the highest + * index at which `value` should be inserted into `array` in order to + * maintain its sort order. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @returns {number} Returns the index at which `value` should be inserted into `array`. + * @example + * + * _.sortedLastIndex([4, 5], 4); + * // => 1 + */ + sortedLastIndex( + array: List, + value: T + ): number; /** - * @see _.find - **/ - detect( - collection: List, - callback: ListIterator, - thisArg?: any): T; + * @see _.sortedLastIndex + */ + sortedLastIndex( + array: List, + value: T + ): number; /** - * @see _.find - **/ - detect( - collection: Dictionary, - callback: DictionaryIterator, - thisArg?: any): T; + * @see _.sortedLastIndex + */ + sortedLastIndex( + array: List, + value: T + ): number; /** - * @see _.find - * @param _.pluck style callback - **/ - detect( - collection: Array, - whereValue: W): T; + * @see _.sortedLastIndex + */ + sortedLastIndex( + array: List, + value: T + ): number; /** - * @see _.find - * @param _.pluck style callback - **/ - detect( - collection: List, - whereValue: W): T; + * @see _.sortedLastIndex + */ + sortedLastIndex( + array: List, + value: T + ): number; + } + interface LoDashImplicitWrapper { /** - * @see _.find - * @param _.pluck style callback - **/ - detect( - collection: Dictionary, - whereValue: W): T; + * @see _.sortedLastIndex + */ + sortedLastIndex( + value: string + ): number; + } + interface LoDashImplicitArrayWrapper { /** - * @see _.find - * @param _.where style callback - **/ - detect( - collection: Array, - pluckValue: string): T; + * @see _.sortedLastIndex + */ + sortedLastIndex( + value: T + ): number; /** - * @see _.find - * @param _.where style callback - **/ - detect( - collection: List, - pluckValue: string): T; + * @see _.sortedLastIndex + */ + sortedLastIndex( + value: T + ): number; /** - * @see _.find - * @param _.where style callback - **/ - detect( - collection: Dictionary, - pluckValue: string): T; + * @see _.sortedLastIndex + */ + sortedLastIndex( + value: T + ): number; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.find - **/ - findWhere( - collection: Array, - callback: ListIterator, - thisArg?: any): T; + * @see _.sortedLastIndex + */ + sortedLastIndex( + value: T + ): number; /** - * @see _.find - **/ - findWhere( - collection: List, - callback: ListIterator, - thisArg?: any): T; + * @see _.sortedLastIndex + */ + sortedLastIndex( + value: T + ): number; /** - * @see _.find - **/ - findWhere( - collection: Dictionary, - callback: DictionaryIterator, - thisArg?: any): T; + * @see _.sortedLastIndex + */ + sortedLastIndex( + value: T + ): number; + } + interface LoDashExplicitWrapper { /** - * @see _.find - * @param _.pluck style callback - **/ - findWhere( - collection: Array, - whereValue: W): T; + * @see _.sortedLastIndex + */ + sortedLastIndex( + value: string + ): LoDashExplicitWrapper; + } + interface LoDashExplicitArrayWrapper { /** - * @see _.find - * @param _.pluck style callback - **/ - findWhere( - collection: List, - whereValue: W): T; + * @see _.sortedLastIndex + */ + sortedLastIndex( + value: T + ): LoDashExplicitWrapper; /** - * @see _.find - * @param _.pluck style callback - **/ - findWhere( - collection: Dictionary, - whereValue: W): T; + * @see _.sortedLastIndex + */ + sortedLastIndex( + value: T + ): LoDashExplicitWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.find - * @param _.where style callback - **/ - findWhere( - collection: Array, - pluckValue: string): T; + * @see _.sortedLastIndex + */ + sortedLastIndex( + value: T + ): LoDashExplicitWrapper; /** - * @see _.find - * @param _.where style callback - **/ - findWhere( - collection: List, - pluckValue: string): T; + * @see _.sortedLastIndex + */ + sortedLastIndex( + value: T + ): LoDashExplicitWrapper; /** - * @see _.find - * @param _.where style callback - **/ - findWhere( - collection: Dictionary, - pluckValue: string): T; + * @see _.sortedLastIndex + */ + sortedLastIndex( + value: T + ): LoDashExplicitWrapper; } - interface LoDashArrayWrapper { + //_.sortedLastIndexBy + interface LoDashStatic { /** - * @see _.find - */ - find( - callback: ListIterator, - thisArg?: any): T; + * This method is like `_.sortedLastIndex` except that it accepts `iteratee` + * which is invoked for `value` and each element of `array` to compute their + * sort ranking. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the index at which `value` should be inserted into `array`. + * @example + * + * // using the `_.property` iteratee shorthand + * _.sortedLastIndexBy([{ 'x': 4 }, { 'x': 5 }], { 'x': 4 }, 'x'); + * // => 1 + */ + sortedLastIndexBy( + array: List, + value: T, + iteratee: (x: T) => TSort + ): number; + /** - * @see _.find - * @param _.where style callback - */ - find( - whereValue: W): T; + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + array: List, + value: T, + iteratee: (x: T) => any + ): number; /** - * @see _.find - * @param _.where style callback - */ - find( - pluckValue: string): T; - } + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + array: List, + value: T, + iteratee: string + ): number; - //_.findLast - interface LoDashStatic { /** - * This method is like _.find except that it iterates over elements of a collection from - * right to left. - * @param collection Searches for a value in this list. - * @param callback The function called per iteration. - * @param thisArg The this binding of callback. - * @return The found element, else undefined. - **/ - findLast( - collection: Array, - callback: ListIterator, - thisArg?: any): T; + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + array: List, + value: T, + iteratee: W + ): number; /** - * @see _.find - **/ - findLast( - collection: List, - callback: ListIterator, - thisArg?: any): T; + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + array: List, + value: T, + iteratee: Object + ): number; + } + interface LoDashImplicitWrapper { /** - * @see _.find - **/ - findLast( - collection: Dictionary, - callback: DictionaryIterator, - thisArg?: any): T; + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + value: string, + iteratee: (x: string) => TSort + ): number; + } + interface LoDashImplicitArrayWrapper { /** - * @see _.find - * @param _.pluck style callback - **/ - findLast( - collection: Array, - whereValue: W): T; + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + value: T, + iteratee: (x: T) => TSort + ): number; /** - * @see _.find - * @param _.pluck style callback - **/ - findLast( - collection: List, - whereValue: W): T; + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + value: T, + iteratee: string + ): number; /** - * @see _.find - * @param _.pluck style callback - **/ - findLast( - collection: Dictionary, - whereValue: W): T; + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + value: T, + iteratee: W + ): number; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.find - * @param _.where style callback - **/ - findLast( - collection: Array, - pluckValue: string): T; + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + value: T, + iteratee: (x: T) => TSort + ): number; /** - * @see _.find - * @param _.where style callback - **/ - findLast( - collection: List, - pluckValue: string): T; + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + value: T, + iteratee: (x: T) => any + ): number; /** - * @see _.find - * @param _.where style callback - **/ - findLast( - collection: Dictionary, - pluckValue: string): T; - } + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + value: T, + iteratee: string + ): number; - interface LoDashArrayWrapper { /** - * @see _.findLast - */ - findLast( - callback: ListIterator, - thisArg?: any): T; + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + value: T, + iteratee: W + ): number; + /** - * @see _.findLast - * @param _.where style callback - */ - findLast( - whereValue: W): T; + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + value: T, + iteratee: Object + ): number; + } + interface LoDashExplicitWrapper { /** - * @see _.findLast - * @param _.where style callback - */ - findLast( - pluckValue: string): T; + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + value: string, + iteratee: (x: string) => TSort + ): LoDashExplicitWrapper; } - //_.forEach - interface LoDashStatic { + interface LoDashExplicitArrayWrapper { /** - * Iterates over elements of a collection, executing the callback for each element. - * The callback is bound to thisArg and invoked with three arguments; (value, index|key, - * collection). Callbacks may exit iteration early by explicitly returning false. - * @param collection The collection to iterate over. - * @param callback The function called per iteration. - * @param thisArg The this binding of callback. - **/ - forEach( - collection: Array, - callback: ListIterator, - thisArg?: any): Array; + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + value: T, + iteratee: (x: T) => TSort + ): LoDashExplicitWrapper; /** - * @see _.forEach - **/ - forEach( - collection: List, - callback: ListIterator, - thisArg?: any): List; + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + value: T, + iteratee: string + ): LoDashExplicitWrapper; /** - * @see _.forEach - **/ - forEach( - object: Dictionary, - callback: DictionaryIterator, - thisArg?: any): Dictionary; + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + value: T, + iteratee: W + ): LoDashExplicitWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.each - **/ - forEach( - object: T, - callback: ObjectIterator, - thisArg?: any): T + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + value: T, + iteratee: (x: T) => TSort + ): LoDashExplicitWrapper; /** - * @see _.forEach - **/ - each( - collection: Array, - callback: ListIterator, - thisArg?: any): Array; + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + value: T, + iteratee: (x: T) => any + ): LoDashExplicitWrapper; /** - * @see _.forEach - **/ - each( - collection: List, - callback: ListIterator, - thisArg?: any): List; + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + value: T, + iteratee: string + ): LoDashExplicitWrapper; /** - * @see _.forEach - * @param object The object to iterate over - * @param callback The function called per iteration. - * @param thisArg The this binding of callback. - **/ - each( - object: Dictionary, - callback: DictionaryIterator, - thisArg?: any): Dictionary; + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + value: T, + iteratee: W + ): LoDashExplicitWrapper; /** - * @see _.each - **/ - each( - object: T, - callback: ObjectIterator, - thisArg?: any): T + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + value: T, + iteratee: Object + ): LoDashExplicitWrapper; } - interface LoDashArrayWrapper { + //_.sortedLastIndexOf DUMMY + interface LoDashStatic { /** - * @see _.forEach - **/ - forEach( - callback: ListIterator, - thisArg?: any): LoDashArrayWrapper; + * This method is like `_.lastIndexOf` except that it performs a binary + * search on a sorted `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to search. + * @param {*} value The value to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.sortedLastIndexOf([1, 1, 2, 2], 2); + * // => 3 + */ + sortedLastIndexOf( + array: any[]|List, + ...values: any[] + ): any[]; + } + //_.tail + interface LoDashStatic { /** - * @see _.forEach - **/ - each( - callback: ListIterator, - thisArg?: any): LoDashArrayWrapper; + * @see _.rest + */ + tail(array: List): T[]; } - interface LoDashObjectWrapper { + interface LoDashImplicitArrayWrapper { /** - * @see _.forEach - **/ - forEach( - callback: ObjectIterator, - thisArg?: any): LoDashObjectWrapper; + * @see _.rest + */ + tail(): LoDashImplicitArrayWrapper; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.forEach - **/ - each( - callback: ObjectIterator, - thisArg?: any): LoDashObjectWrapper; + * @see _.rest + */ + tail(): LoDashImplicitArrayWrapper; } - //_.forEachRight + interface LoDashExplicitArrayWrapper { + /** + * @see _.rest + */ + tail(): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.rest + */ + tail(): LoDashExplicitArrayWrapper; + } + + //_.take interface LoDashStatic { /** - * This method is like _.forEach except that it iterates over elements of a - * collection from right to left. - * @param collection The collection to iterate over. - * @param callback The function called per iteration. - * @param thisArg The this binding of callback. - **/ - forEachRight( - collection: Array, - callback: ListIterator, - thisArg?: any): Array; + * Creates a slice of array with n elements taken from the beginning. + * + * @param array The array to query. + * @param n The number of elements to take. + * @return Returns the slice of array. + */ + take( + array: List, + n?: number + ): T[]; + } + interface LoDashImplicitArrayWrapper { /** - * @see _.forEachRight - **/ - forEachRight( - collection: List, - callback: ListIterator, - thisArg?: any): List; + * @see _.take + */ + take(n?: number): LoDashImplicitArrayWrapper; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.forEachRight - **/ - forEachRight( - object: Dictionary, - callback: DictionaryIterator, - thisArg?: any): Dictionary; + * @see _.take + */ + take(n?: number): LoDashImplicitArrayWrapper; + } + interface LoDashExplicitArrayWrapper { /** - * @see _.forEachRight - **/ - eachRight( - collection: Array, - callback: ListIterator, - thisArg?: any): Array; + * @see _.take + */ + take(n?: number): LoDashExplicitArrayWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.forEachRight - **/ - eachRight( - collection: List, - callback: ListIterator, - thisArg?: any): List; + * @see _.take + */ + take(n?: number): LoDashExplicitArrayWrapper; + } + //_.takeRight + interface LoDashStatic { /** - * @see _.forEachRight - * @param object The object to iterate over - * @param callback The function called per iteration. - * @param thisArg The this binding of callback. - **/ - eachRight( - object: Dictionary, - callback: DictionaryIterator, - thisArg?: any): Dictionary; + * Creates a slice of array with n elements taken from the end. + * + * @param array The array to query. + * @param n The number of elements to take. + * @return Returns the slice of array. + */ + takeRight( + array: List, + n?: number + ): T[]; } - interface LoDashArrayWrapper { + interface LoDashImplicitArrayWrapper { /** - * @see _.forEachRight - **/ - forEachRight( - callback: ListIterator, - thisArg?: any): LoDashArrayWrapper; + * @see _.takeRight + */ + takeRight(n?: number): LoDashImplicitArrayWrapper; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.forEachRight - **/ - eachRight( - callback: ListIterator, - thisArg?: any): LoDashArrayWrapper; + * @see _.takeRight + */ + takeRight(n?: number): LoDashImplicitArrayWrapper; } - interface LoDashObjectWrapper { + interface LoDashExplicitArrayWrapper { /** - * @see _.forEachRight - **/ - forEachRight( - callback: ObjectIterator, - thisArg?: any): LoDashObjectWrapper>; + * @see _.takeRight + */ + takeRight(n?: number): LoDashExplicitArrayWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.forEachRight - * @param object The object to iterate over - * @param callback The function called per iteration. - * @param thisArg The this binding of callback. - **/ - eachRight( - callback: ObjectIterator, - thisArg?: any): LoDashObjectWrapper>; + * @see _.takeRight + */ + takeRight(n?: number): LoDashExplicitArrayWrapper; } - //_.groupBy + //_.takeRightWhile interface LoDashStatic { /** - * Creates an object composed of keys generated from the results of running each element - * of a collection through the callback. The corresponding value of each key is an array - * of the elements responsible for generating the key. The callback is bound to thisArg - * and invoked with three arguments; (value, index|key, collection). - * - * If a property name is provided for callback the created "_.pluck" style callback will - * return the property value of the given element. - * If an object is provided for callback the created "_.where" style callback will return - * true for elements that have the properties of the given object, else false - * @param collection The collection to iterate over. - * @param callback The function called per iteration. - * @param thisArg The this binding of callback. - * @return Returns the composed aggregate object. - **/ - groupBy( - collection: Array, - callback?: ListIterator, - thisArg?: any): Dictionary; + * Creates a slice of array with elements taken from the end. Elements are taken until predicate returns + * falsey. The predicate is bound to thisArg and invoked with three arguments: (value, index, array). + * + * If a property name is provided for predicate the created _.property style callback returns the property + * value of the given element. + * + * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for + * elements that have a matching property value, else false. + * + * If an object is provided for predicate the created _.matches style callback returns true for elements that + * have the properties of the given object, else false. + * + * @param array The array to query. + * @param predicate The function invoked per iteration. + * @param thisArg The this binding of predicate. + * @return Returns the slice of array. + */ + takeRightWhile( + array: List, + predicate?: ListIterator + ): TValue[]; /** - * @see _.groupBy - **/ - groupBy( - collection: List, - callback?: ListIterator, - thisArg?: any): Dictionary; + * @see _.takeRightWhile + */ + takeRightWhile( + array: List, + predicate?: string + ): TValue[]; /** - * @see _.groupBy - * @param pluckValue _.pluck style callback - **/ - groupBy( - collection: Array, - pluckValue: string): Dictionary; + * @see _.takeRightWhile + */ + takeRightWhile( + array: List, + predicate?: TWhere + ): TValue[]; + } + interface LoDashImplicitArrayWrapper { /** - * @see _.groupBy - * @param pluckValue _.pluck style callback - **/ - groupBy( - collection: List, - pluckValue: string): Dictionary; + * @see _.takeRightWhile + */ + takeRightWhile( + predicate?: ListIterator + ): LoDashImplicitArrayWrapper; /** - * @see _.groupBy - * @param whereValue _.where style callback - **/ - groupBy( - collection: Array, - whereValue: W): Dictionary; + * @see _.takeRightWhile + */ + takeRightWhile( + predicate?: string + ): LoDashImplicitArrayWrapper; /** - * @see _.groupBy - * @param whereValue _.where style callback - **/ - groupBy( - collection: List, - whereValue: W): Dictionary; + * @see _.takeRightWhile + */ + takeRightWhile( + predicate?: TWhere + ): LoDashImplicitArrayWrapper; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.groupBy - **/ - groupBy( - collection: Dictionary, - callback?: DictionaryIterator, - thisArg?: any): Dictionary; + * @see _.takeRightWhile + */ + takeRightWhile( + predicate?: ListIterator + ): LoDashImplicitArrayWrapper; /** - * @see _.groupBy - * @param pluckValue _.pluck style callback - **/ - groupBy( - collection: Dictionary, - pluckValue: string): Dictionary; + * @see _.takeRightWhile + */ + takeRightWhile( + predicate?: string + ): LoDashImplicitArrayWrapper; /** - * @see _.groupBy - * @param whereValue _.where style callback - **/ - groupBy( - collection: Dictionary, - whereValue: W): Dictionary; + * @see _.takeRightWhile + */ + takeRightWhile( + predicate?: TWhere + ): LoDashImplicitArrayWrapper; } - interface LoDashArrayWrapper { + interface LoDashExplicitArrayWrapper { /** - * @see _.groupBy - **/ - groupBy( - callback: ListIterator, - thisArg?: any): _.LoDashObjectWrapper<_.Dictionary>; + * @see _.takeRightWhile + */ + takeRightWhile( + predicate?: ListIterator + ): LoDashExplicitArrayWrapper; /** - * @see _.groupBy - **/ - groupBy( - pluckValue: string): _.LoDashObjectWrapper<_.Dictionary>; + * @see _.takeRightWhile + */ + takeRightWhile( + predicate?: string + ): LoDashExplicitArrayWrapper; /** - * @see _.groupBy - **/ - groupBy( - whereValue: W): _.LoDashObjectWrapper<_.Dictionary>; + * @see _.takeRightWhile + */ + takeRightWhile( + predicate?: TWhere + ): LoDashExplicitArrayWrapper; } - interface LoDashObjectWrapper { + interface LoDashExplicitObjectWrapper { /** - * @see _.groupBy - **/ - groupBy( - callback: ListIterator, - thisArg?: any): _.LoDashObjectWrapper<_.Dictionary>; + * @see _.takeRightWhile + */ + takeRightWhile( + predicate?: ListIterator + ): LoDashExplicitArrayWrapper; /** - * @see _.groupBy - **/ - groupBy( - pluckValue: string): _.LoDashObjectWrapper<_.Dictionary>; + * @see _.takeRightWhile + */ + takeRightWhile( + predicate?: string + ): LoDashExplicitArrayWrapper; /** - * @see _.groupBy - **/ - groupBy( - whereValue: W): _.LoDashObjectWrapper<_.Dictionary>; + * @see _.takeRightWhile + */ + takeRightWhile( + predicate?: TWhere + ): LoDashExplicitArrayWrapper; } - //_.indexBy + //_.takeWhile interface LoDashStatic { /** - * Creates an object composed of keys generated from the results of running each element - * of the collection through the given callback. The corresponding value of each key is - * the last element responsible for generating the key. The callback is bound to thisArg - * and invoked with three arguments; (value, index|key, collection). - * - * If a property name is provided for callback the created "_.pluck" style callback will - * return the property value of the given element. - * - * If an object is provided for callback the created "_.where" style callback will return - * true for elements that have the properties of the given object, else false. - * @param collection The collection to iterate over. - * @param callback The function called per iteration. - * @param thisArg The this binding of callback. - * @return Returns the composed aggregate object. - **/ - indexBy( - list: Array, - iterator: ListIterator, - context?: any): Dictionary; + * Creates a slice of array with elements taken from the beginning. Elements are taken until predicate returns + * falsey. The predicate is bound to thisArg and invoked with three arguments: (value, index, array). + * + * If a property name is provided for predicate the created _.property style callback returns the property + * value of the given element. + * + * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for + * elements that have a matching property value, else false. + * + * If an object is provided for predicate the created _.matches style callback returns true for elements that + * have the properties of the given object, else false. + * + * @param array The array to query. + * @param predicate The function invoked per iteration. + * @param thisArg The this binding of predicate. + * @return Returns the slice of array. + */ + takeWhile( + array: List, + predicate?: ListIterator + ): TValue[]; /** - * @see _.indexBy - **/ - indexBy( - list: List, - iterator: ListIterator, - context?: any): Dictionary; + * @see _.takeWhile + */ + takeWhile( + array: List, + predicate?: string + ): TValue[]; /** - * @see _.indexBy - * @param pluckValue _.pluck style callback - **/ - indexBy( - collection: Array, - pluckValue: string): Dictionary; + * @see _.takeWhile + */ + takeWhile( + array: List, + predicate?: TWhere + ): TValue[]; + } + interface LoDashImplicitArrayWrapper { /** - * @see _.indexBy - * @param pluckValue _.pluck style callback - **/ - indexBy( - collection: List, - pluckValue: string): Dictionary; + * @see _.takeWhile + */ + takeWhile( + predicate?: ListIterator + ): LoDashImplicitArrayWrapper; /** - * @see _.indexBy - * @param whereValue _.where style callback - **/ - indexBy( - collection: Array, - whereValue: W): Dictionary; + * @see _.takeWhile + */ + takeWhile( + predicate?: string + ): LoDashImplicitArrayWrapper; /** - * @see _.indexBy - * @param whereValue _.where style callback - **/ - indexBy( - collection: List, - whereValue: W): Dictionary; + * @see _.takeWhile + */ + takeWhile( + predicate?: TWhere + ): LoDashImplicitArrayWrapper; } - //_.invoke - interface LoDashStatic { + interface LoDashImplicitObjectWrapper { /** - * Invokes the method named by methodName on each element in the collection returning - * an array of the results of each invoked method. Additional arguments will be provided - * to each invoked method. If methodName is a function it will be invoked for, and this - * bound to, each element in the collection. - * @param collection The collection to iterate over. - * @param methodName The name of the method to invoke. - * @param args Arguments to invoke the method with. - **/ - invoke( - collection: Array, - methodName: string, - ...args: any[]): any; + * @see _.takeWhile + */ + takeWhile( + predicate?: ListIterator + ): LoDashImplicitArrayWrapper; /** - * @see _.invoke - **/ - invoke( - collection: List, - methodName: string, - ...args: any[]): any; + * @see _.takeWhile + */ + takeWhile( + predicate?: string + ): LoDashImplicitArrayWrapper; /** - * @see _.invoke - **/ - invoke( - collection: Dictionary, - methodName: string, - ...args: any[]): any; + * @see _.takeWhile + */ + takeWhile( + predicate?: TWhere + ): LoDashImplicitArrayWrapper; + } + interface LoDashExplicitArrayWrapper { /** - * @see _.invoke - **/ - invoke( - collection: Array, - method: Function, - ...args: any[]): any; + * @see _.takeWhile + */ + takeWhile( + predicate?: ListIterator + ): LoDashExplicitArrayWrapper; /** - * @see _.invoke - **/ - invoke( - collection: List, - method: Function, - ...args: any[]): any; + * @see _.takeWhile + */ + takeWhile( + predicate?: string + ): LoDashExplicitArrayWrapper; /** - * @see _.invoke - **/ - invoke( - collection: Dictionary, - method: Function, - ...args: any[]): any; + * @see _.takeWhile + */ + takeWhile( + predicate?: TWhere + ): LoDashExplicitArrayWrapper; } - //_.map - interface LoDashStatic { + interface LoDashExplicitObjectWrapper { /** - * Creates an array of values by running each element in the collection through the callback. - * The callback is bound to thisArg and invoked with three arguments; (value, index|key, - * collection). - * - * If a property name is provided for callback the created "_.pluck" style callback will return - * the property value of the given element. - * - * If an object is provided for callback the created "_.where" style callback will return true - * for elements that have the properties of the given object, else false. - * @param collection The collection to iterate over. - * @param callback The function called per iteration. - * @param theArg The this binding of callback. - * @return The mapped array result. - **/ - map( - collection: Array, - callback: ListIterator, - thisArg?: any): TResult[]; + * @see _.takeWhile + */ + takeWhile( + predicate?: ListIterator + ): LoDashExplicitArrayWrapper; /** - * @see _.map - **/ - map( - collection: List, - callback: ListIterator, - thisArg?: any): TResult[]; + * @see _.takeWhile + */ + takeWhile( + predicate?: string + ): LoDashExplicitArrayWrapper; /** - * @see _.map - * @param object The object to iterate over. - * @param callback The function called per iteration. - * @param thisArg `this` object in `iterator`, optional. - * @return The mapped object result. - **/ - map( - object: Dictionary, - callback: DictionaryIterator, - thisArg?: any): TResult[]; + * @see _.takeWhile + */ + takeWhile( + predicate?: TWhere + ): LoDashExplicitArrayWrapper; + } + //_.union + interface LoDashStatic { /** - * @see _.map - * @param pluckValue _.pluck style callback - **/ - map( - collection: Array, - pluckValue: string): TResult[]; + * Creates an array of unique values, in order, from all of the provided arrays using SameValueZero for + * equality comparisons. + * + * @param arrays The arrays to inspect. + * @return Returns the new array of combined values. + */ + union(...arrays: List[]): T[]; + } + interface LoDashImplicitArrayWrapper { /** - * @see _.map - * @param pluckValue _.pluck style callback - **/ - map( - collection: List, - pluckValue: string): TResult[]; + * @see _.union + */ + union(...arrays: List[]): LoDashImplicitArrayWrapper; /** - * @see _.map - **/ - collect( - collection: Array, - callback: ListIterator, - thisArg?: any): TResult[]; + * @see _.union + */ + union(...arrays: List[]): LoDashImplicitArrayWrapper; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.map - **/ - collect( - collection: List, - callback: ListIterator, - thisArg?: any): TResult[]; + * @see _.union + */ + union(...arrays: List[]): LoDashImplicitArrayWrapper; + } + interface LoDashExplicitArrayWrapper { /** - * @see _.map - **/ - collect( - object: Dictionary, - callback: DictionaryIterator, - thisArg?: any): TResult[]; + * @see _.union + */ + union(...arrays: List[]): LoDashExplicitArrayWrapper; /** - * @see _.map - **/ - collect( - collection: Array, - pluckValue: string): TResult[]; + * @see _.union + */ + union(...arrays: List[]): LoDashExplicitArrayWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.map - **/ - collect( - collection: List, - pluckValue: string): TResult[]; + * @see _.union + */ + union(...arrays: List[]): LoDashExplicitArrayWrapper; } - interface LoDashArrayWrapper { + //_.unionBy + interface LoDashStatic { /** - * @see _.map - **/ - map( - callback: ListIterator, - thisArg?: any): LoDashArrayWrapper; + * This method is like `_.union` except that it accepts `iteratee` which is + * invoked for each element of each `arrays` to generate the criterion by which + * uniqueness is computed. The iteratee is invoked with one argument: (value). + * + * @param arrays The arrays to inspect. + * @param iteratee The iteratee invoked per element. + * @return Returns the new array of combined values. + */ + unionBy( + arrays: T[]|List, + iteratee?: (value: T) => any + ): T[]; /** - * @see _.map - * @param pluckValue _.pluck style callback - **/ - map( - pluckValue: string): LoDashArrayWrapper; + * @see _.unionBy + */ + unionBy( + arrays: T[]|List, + iteratee?: W + ): T[]; /** - * @see _.map - **/ - collect( - callback: ListIterator, - thisArg?: any): LoDashArrayWrapper; + * @see _.unionBy + */ + unionBy( + arrays1: T[]|List, + arrays2: T[]|List, + iteratee?: (value: T) => any + ): T[]; /** - * @see _.map - **/ - collect( - pluckValue: string): LoDashArrayWrapper; - } + * @see _.unionBy + */ + unionBy( + arrays1: T[]|List, + arrays2: T[]|List, + iteratee?: W + ): T[]; - interface LoDashObjectWrapper { /** - * @see _.map - **/ - map( - callback: ObjectIterator, - thisArg?: any): LoDashArrayWrapper; + * @see _.unionBy + */ + unionBy( + arrays1: T[]|List, + arrays2: T[]|List, + arrays3: T[]|List, + iteratee?: (value: T) => any + ): T[]; /** - * @see _.map - **/ - collect( - callback: ObjectIterator, - thisArg?: any): LoDashArrayWrapper; - } + * @see _.unionBy + */ + unionBy( + arrays1: T[]|List, + arrays2: T[]|List, + arrays3: T[]|List, + iteratee?: W + ): T[]; - //_.max - interface LoDashStatic { /** - * Retrieves the maximum value of a collection. If the collection is empty or falsey -Infinity is - * returned. If a callback is provided it will be executed for each value in the collection to - * generate the criterion by which the value is ranked. The callback is bound to thisArg and invoked - * with three arguments; (value, index, collection). - * - * If a property name is provided for callback the created "_.pluck" style callback will return the - * property value of the given element. - * - * If an object is provided for callback the created "_.where" style callback will return true for - * elements that have the properties of the given object, else false. - * @param collection The collection to iterate over. - * @param callback The function called per iteration. - * @param thisArg The this binding of callback. - * @return Returns the maximum value. - **/ - max( - collection: Array, - callback?: ListIterator, - thisArg?: any): T; + * @see _.unionBy + */ + unionBy( + arrays1: T[]|List, + arrays2: T[]|List, + arrays3: T[]|List, + arrays4: T[]|List, + iteratee?: (value: T) => any + ): T[]; /** - * @see _.max - **/ - max( - collection: List, - callback?: ListIterator, - thisArg?: any): T; + * @see _.unionBy + */ + unionBy( + arrays1: T[]|List, + arrays2: T[]|List, + arrays3: T[]|List, + arrays4: T[]|List, + iteratee?: W + ): T[]; /** - * @see _.max - **/ - max( - collection: Dictionary, - callback?: DictionaryIterator, - thisArg?: any): T; + * @see _.unionBy + */ + unionBy( + arrays1: T[]|List, + arrays2: T[]|List, + arrays3: T[]|List, + arrays4: T[]|List, + arrays5: T[]|List, + iteratee?: (value: T) => any + ): T[]; /** - * @see _.max - * @param pluckValue _.pluck style callback - **/ - max( - collection: Array, - pluckValue: string): T; + * @see _.unionBy + */ + unionBy( + arrays1: T[]|List, + arrays2: T[]|List, + arrays3: T[]|List, + arrays4: T[]|List, + arrays5: T[]|List, + iteratee?: W + ): T[]; /** - * @see _.max - * @param pluckValue _.pluck style callback - **/ - max( - collection: List, - pluckValue: string): T; + * @see _.unionBy + */ + unionBy( + arrays: T[]|List, + ...iteratee: any[] + ): T[]; + } + interface LoDashImplicitArrayWrapper { /** - * @see _.max - * @param pluckValue _.pluck style callback - **/ - max( - collection: Dictionary, - pluckValue: string): T; + * @see _.unionBy + */ + unionBy( + iteratee?: (value: T) => any + ): LoDashImplicitArrayWrapper; /** - * @see _.max - * @param whereValue _.where style callback - **/ - max( - collection: Array, - whereValue: W): T; + * @see _.unionBy + */ + unionBy( + iteratee?: W + ): LoDashImplicitArrayWrapper; /** - * @see _.max - * @param whereValue _.where style callback - **/ - max( - collection: List, - whereValue: W): T; + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + iteratee?: (value: T) => any + ): LoDashImplicitArrayWrapper; /** - * @see _.max - * @param whereValue _.where style callback - **/ - max( - collection: Dictionary, - whereValue: W): T; - } + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + iteratee?: W + ): LoDashImplicitArrayWrapper; - interface LoDashArrayWrapper { /** - * @see _.max - **/ - max( - callback?: ListIterator, - thisArg?: any): LoDashWrapper; + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + iteratee?: (value: T) => any + ): LoDashImplicitArrayWrapper; /** - * @see _.max - * @param pluckValue _.pluck style callback - **/ - max( - pluckValue: string): LoDashWrapper; + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + iteratee?: W + ): LoDashImplicitArrayWrapper; /** - * @see _.max - * @param whereValue _.where style callback - **/ - max( - whereValue: W): LoDashWrapper; - } + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + arrays4: T[]|List, + iteratee?: (value: T) => any + ): LoDashImplicitArrayWrapper; - //_.min - interface LoDashStatic { /** - * Retrieves the minimum value of a collection. If the collection is empty or falsey - * Infinity is returned. If a callback is provided it will be executed for each value - * in the collection to generate the criterion by which the value is ranked. The callback - * is bound to thisArg and invoked with three arguments; (value, index, collection). - * - * If a property name is provided for callback the created "_.pluck" style callback - * will return the property value of the given element. - * - * If an object is provided for callback the created "_.where" style callback will - * return true for elements that have the properties of the given object, else false. - * @param collection The collection to iterate over. - * @param callback The function called per iteration. - * @param thisArg The this binding of callback. - * @return Returns the maximum value. - **/ - min( - collection: Array, - callback?: ListIterator, - thisArg?: any): T; + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + arrays4: T[]|List, + iteratee?: W + ): LoDashImplicitArrayWrapper; /** - * @see _.min - **/ - min( - collection: List, - callback?: ListIterator, - thisArg?: any): T; + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + arrays4: T[]|List, + arrays5: T[]|List, + iteratee?: (value: T) => any + ): LoDashImplicitArrayWrapper; /** - * @see _.min - **/ - min( - collection: Dictionary, - callback?: ListIterator, - thisArg?: any): T; + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + arrays4: T[]|List, + arrays5: T[]|List, + iteratee?: W + ): LoDashImplicitArrayWrapper; /** - * @see _.min - * @param pluckValue _.pluck style callback - **/ - min( - collection: Array, - pluckValue: string): T; + * @see _.unionBy + */ + unionBy( + ...iteratee: any[] + ): LoDashImplicitArrayWrapper; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.min - * @param pluckValue _.pluck style callback - **/ - min( - collection: List, - pluckValue: string): T; + * @see _.unionBy + */ + unionBy( + iteratee?: (value: T) => any + ): LoDashImplicitArrayWrapper; /** - * @see _.min - * @param pluckValue _.pluck style callback - **/ - min( - collection: Dictionary, - pluckValue: string): T; + * @see _.unionBy + */ + unionBy( + iteratee?: W + ): LoDashImplicitArrayWrapper; /** - * @see _.min - * @param whereValue _.where style callback - **/ - min( - collection: Array, - whereValue: W): T; + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + iteratee?: (value: T) => any + ): LoDashImplicitArrayWrapper; /** - * @see _.min - * @param whereValue _.where style callback - **/ - min( - collection: List, - whereValue: W): T; + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + iteratee?: W + ): LoDashImplicitArrayWrapper; /** - * @see _.min - * @param whereValue _.where style callback - **/ - min( - collection: Dictionary, - whereValue: W): T; - } + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + iteratee?: (value: T) => any + ): LoDashImplicitArrayWrapper; - interface LoDashArrayWrapper { /** - * @see _.min - **/ - min( - callback?: ListIterator, - thisArg?: any): LoDashWrapper; + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + iteratee?: W + ): LoDashImplicitArrayWrapper; /** - * @see _.min - * @param pluckValue _.pluck style callback - **/ - min( - pluckValue: string): LoDashWrapper; + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + arrays4: T[]|List, + iteratee?: (value: T) => any + ): LoDashImplicitArrayWrapper; /** - * @see _.min - * @param whereValue _.where style callback - **/ - min( - whereValue: W): LoDashWrapper; - } + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + arrays4: T[]|List, + iteratee?: W + ): LoDashImplicitArrayWrapper; - //_.sum - interface LoDashStatic { /** - * Gets the sum of the values in collection. - * - * @param collection The collection to iterate over. - * @param iteratee The function invoked per iteration. - * @param thisArg The this binding of iteratee. - * @return Returns the sum. - **/ - sum( - collection: Array): number; + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + arrays4: T[]|List, + arrays5: T[]|List, + iteratee?: (value: T) => any + ): LoDashImplicitArrayWrapper; /** - * @see _.sum - **/ - sum( - collection: List): number; + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + arrays4: T[]|List, + arrays5: T[]|List, + iteratee?: W + ): LoDashImplicitArrayWrapper; /** - * @see _.sum - **/ - sum( - collection: Dictionary): number; + * @see _.unionBy + */ + unionBy( + ...iteratee: any[] + ): LoDashImplicitArrayWrapper; + } + interface LoDashExplicitArrayWrapper { /** - * @see _.sum - **/ - sum( - collection: Array, - iteratee: ListIterator, - thisArg?: any): number; + * @see _.unionBy + */ + unionBy( + iteratee?: (value: T) => any + ): LoDashExplicitArrayWrapper; /** - * @see _.sum - **/ - sum( - collection: List, - iteratee: ListIterator, - thisArg?: any): number; + * @see _.unionBy + */ + unionBy( + iteratee?: W + ): LoDashExplicitArrayWrapper; /** - * @see _.sum - **/ - sum( - collection: Dictionary, - iteratee: ObjectIterator, - thisArg?: any): number; + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + iteratee?: (value: T) => any + ): LoDashExplicitArrayWrapper; /** - * @see _.sum - * @param property _.property callback shorthand. - **/ - sum( - collection: Array, - property: string): number; + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + iteratee?: W + ): LoDashExplicitArrayWrapper; /** - * @see _.sum - * @param property _.property callback shorthand. - **/ - sum( - collection: List, - property: string): number; + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + iteratee?: (value: T) => any + ): LoDashExplicitArrayWrapper; /** - * @see _.sum - * @param property _.property callback shorthand. - **/ - sum( - collection: Dictionary, - property: string): number; - } + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + iteratee?: W + ): LoDashExplicitArrayWrapper; - interface LoDashNumberArrayWrapper { /** - * @see _.sum - **/ - sum(): number + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + arrays4: T[]|List, + iteratee?: (value: T) => any + ): LoDashExplicitArrayWrapper; /** - * @see _.sum - **/ - sum( - iteratee: ListIterator, - thisArg?: any): number; - } + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + arrays4: T[]|List, + iteratee?: W + ): LoDashExplicitArrayWrapper; - interface LoDashArrayWrapper { /** - * @see _.sum - **/ - sum( - iteratee: ListIterator, - thisArg?: any): number; + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + arrays4: T[]|List, + arrays5: T[]|List, + iteratee?: (value: T) => any + ): LoDashExplicitArrayWrapper; /** - * @see _.sum - * @param property _.property callback shorthand. - **/ - sum( - property: string): number; + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + arrays4: T[]|List, + arrays5: T[]|List, + iteratee?: W + ): LoDashExplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + ...iteratee: any[] + ): LoDashExplicitArrayWrapper; } - interface LoDashObjectWrapper { + interface LoDashExplicitObjectWrapper { /** - * @see _.sum - **/ - sum(): number + * @see _.unionBy + */ + unionBy( + iteratee?: (value: T) => any + ): LoDashExplicitArrayWrapper; /** - * @see _.sum - **/ - sum( - iteratee: ObjectIterator, - thisArg?: any): number; + * @see _.unionBy + */ + unionBy( + iteratee?: W + ): LoDashExplicitArrayWrapper; /** - * @see _.sum - * @param property _.property callback shorthand. - **/ - sum( - property: string): number; - } + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + iteratee?: (value: T) => any + ): LoDashExplicitArrayWrapper; - //_.pluck - interface LoDashStatic { /** - * Retrieves the value of a specified property from all elements in the collection. - * @param collection The collection to iterate over. - * @param property The property to pluck. - * @return A new array of property values. - **/ - pluck( - collection: Array, - property: string): any[]; + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + iteratee?: W + ): LoDashExplicitArrayWrapper; /** - * @see _.pluck - **/ - pluck( - collection: List, - property: string): any[]; + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + iteratee?: (value: T) => any + ): LoDashExplicitArrayWrapper; /** - * @see _.pluck - **/ - pluck( - collection: Dictionary, - property: string): any[]; - } + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + iteratee?: W + ): LoDashExplicitArrayWrapper; - interface LoDashArrayWrapper { /** - * @see _.pluck - **/ - pluck( - property: string): LoDashArrayWrapper; - } + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + arrays4: T[]|List, + iteratee?: (value: T) => any + ): LoDashExplicitArrayWrapper; - interface LoDashObjectWrapper { /** - * @see _.pluck - **/ - pluck( - property: string): LoDashArrayWrapper; - } + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + arrays4: T[]|List, + iteratee?: W + ): LoDashExplicitArrayWrapper; - //_.reduce - interface LoDashStatic { /** - * Reduces a collection to a value which is the accumulated result of running each - * element in the collection through the callback, where each successive callback execution - * consumes the return value of the previous execution. If accumulator is not provided the - * first element of the collection will be used as the initial accumulator value. The callback - * is bound to thisArg and invoked with four arguments; (accumulator, value, index|key, collection). - * @param collection The collection to iterate over. - * @param callback The function called per iteration. - * @param accumulator Initial value of the accumulator. - * @param thisArg The this binding of callback. - * @return Returns the accumulated value. - **/ - reduce( - collection: Array, - callback: MemoIterator, - accumulator: TResult, - thisArg?: any): TResult; + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + arrays4: T[]|List, + arrays5: T[]|List, + iteratee?: (value: T) => any + ): LoDashExplicitArrayWrapper; /** - * @see _.reduce - **/ - reduce( - collection: List, - callback: MemoIterator, - accumulator: TResult, - thisArg?: any): TResult; + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + arrays4: T[]|List, + arrays5: T[]|List, + iteratee?: W + ): LoDashExplicitArrayWrapper; /** - * @see _.reduce - **/ - reduce( - collection: Dictionary, - callback: MemoIterator, - accumulator: TResult, - thisArg?: any): TResult; + * @see _.unionBy + */ + unionBy( + ...iteratee: any[] + ): LoDashExplicitArrayWrapper; + } + //_.uniq + interface LoDashStatic { /** - * @see _.reduce - **/ - reduce( - collection: Array, - callback: MemoIterator, - thisArg?: any): TResult; + * Creates a duplicate-free version of an array, using + * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons, in which only the first occurrence of each element + * is kept. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to inspect. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.uniq([2, 1, 2]); + * // => [2, 1] + */ + uniq( + array: List + ): T[]; /** - * @see _.reduce - **/ - reduce( - collection: List, - callback: MemoIterator, - thisArg?: any): TResult; + * @see _.uniq + */ + uniq( + array: List + ): T[]; + } + interface LoDashImplicitWrapper { /** - * @see _.reduce - **/ - reduce( - collection: Dictionary, - callback: MemoIterator, - thisArg?: any): TResult; + * @see _.uniq + */ + uniq(): LoDashImplicitArrayWrapper; + } + interface LoDashImplicitArrayWrapper { /** - * @see _.reduce - **/ - inject( - collection: Array, - callback: MemoIterator, - accumulator: TResult, - thisArg?: any): TResult; + * @see _.uniq + */ + uniq(): LoDashImplicitArrayWrapper; /** - * @see _.reduce - **/ - inject( - collection: List, - callback: MemoIterator, - accumulator: TResult, - thisArg?: any): TResult; + * @see _.uniq + */ + uniq(): LoDashImplicitArrayWrapper; + } - /** - * @see _.reduce - **/ - inject( - collection: Dictionary, - callback: MemoIterator, - accumulator: TResult, - thisArg?: any): TResult; + interface LoDashImplicitObjectWrapper { + uniq(): LoDashImplicitArrayWrapper; /** - * @see _.reduce - **/ - inject( - collection: Array, - callback: MemoIterator, - thisArg?: any): TResult; + * @see _.uniq + */ + uniq(): LoDashImplicitArrayWrapper; + } + interface LoDashExplicitWrapper { /** - * @see _.reduce - **/ - inject( - collection: List, - callback: MemoIterator, - thisArg?: any): TResult; + * @see _.uniq + */ + uniq(): LoDashExplicitArrayWrapper; + } + interface LoDashExplicitArrayWrapper { /** - * @see _.reduce - **/ - inject( - collection: Dictionary, - callback: MemoIterator, - thisArg?: any): TResult; + * @see _.uniq + */ + uniq(): LoDashExplicitArrayWrapper; /** - * @see _.reduce - **/ - foldl( - collection: Array, - callback: MemoIterator, - accumulator: TResult, - thisArg?: any): TResult; + * @see _.uniq + */ + uniq(): LoDashExplicitArrayWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.reduce - **/ - foldl( - collection: List, - callback: MemoIterator, - accumulator: TResult, - thisArg?: any): TResult; + * @see _.uniq + */ + uniq(): LoDashExplicitArrayWrapper; /** - * @see _.reduce - **/ - foldl( - collection: Dictionary, - callback: MemoIterator, - accumulator: TResult, - thisArg?: any): TResult; + * @see _.uniq + */ + uniq(): LoDashExplicitArrayWrapper; + } + //_.uniqBy + interface LoDashStatic { /** - * @see _.reduce - **/ - foldl( - collection: Array, - callback: MemoIterator, - thisArg?: any): TResult; + * This method is like `_.uniq` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the criterion by which + * uniqueness is computed. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to inspect. + * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.uniqBy([2.1, 1.2, 2.3], Math.floor); + * // => [2.1, 1.2] + * + * // using the `_.property` iteratee shorthand + * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] + */ + uniqBy( + array: List, + iteratee: ListIterator + ): T[]; /** - * @see _.reduce - **/ - foldl( - collection: List, - callback: MemoIterator, - thisArg?: any): TResult; + * @see _.uniqBy + */ + uniqBy( + array: List, + iteratee: ListIterator + ): T[]; /** - * @see _.reduce - **/ - foldl( - collection: Dictionary, - callback: MemoIterator, - thisArg?: any): TResult; - } + * @see _.uniqBy + */ + uniqBy( + array: List, + iteratee: string + ): T[]; - interface LoDashArrayWrapper { - /** - * @see _.reduce - **/ - reduce( - callback: MemoIterator, - accumulator: TResult, - thisArg?: any): TResult; + /** + * @see _.uniqBy + */ + uniqBy( + array: List, + iteratee: Object + ): T[]; /** - * @see _.reduce - **/ - reduce( - callback: MemoIterator, - thisArg?: any): TResult; + * @see _.uniqBy + */ + uniqBy( + array: List, + iteratee: TWhere + ): T[]; + } + interface LoDashImplicitWrapper { /** - * @see _.reduce - **/ - inject( - callback: MemoIterator, - accumulator: TResult, - thisArg?: any): TResult; + * @see _.uniqBy + */ + uniqBy( + iteratee: ListIterator + ): LoDashImplicitArrayWrapper; + } + interface LoDashImplicitArrayWrapper { /** - * @see _.reduce - **/ - inject( - callback: MemoIterator, - thisArg?: any): TResult; + * @see _.uniqBy + */ + uniqBy( + iteratee: ListIterator + ): LoDashImplicitArrayWrapper; /** - * @see _.reduce - **/ - foldl( - callback: MemoIterator, - accumulator: TResult, - thisArg?: any): TResult; + * @see _.uniqBy + */ + uniqBy( + iteratee: string + ): LoDashImplicitArrayWrapper; /** - * @see _.reduce - **/ - foldl( - callback: MemoIterator, - thisArg?: any): TResult; + * @see _.uniqBy + */ + uniqBy( + iteratee: TWhere + ): LoDashImplicitArrayWrapper; } - interface LoDashObjectWrapper { - /** - * @see _.reduce - **/ - reduce( - callback: MemoIterator, - accumulator: TResult, - thisArg?: any): TResult; + interface LoDashImplicitObjectWrapper { + /** + * @see _.uniqBy + */ + uniqBy( + iteratee: ListIterator + ): LoDashImplicitArrayWrapper; /** - * @see _.reduce - **/ - reduce( - callback: MemoIterator, - thisArg?: any): TResult; + * @see _.uniqBy + */ + uniqBy( + iteratee: ListIterator + ): LoDashImplicitArrayWrapper; /** - * @see _.reduce - **/ - inject( - callback: MemoIterator, - accumulator: TResult, - thisArg?: any): TResult; + * @see _.uniqBy + */ + uniqBy( + iteratee: string + ): LoDashImplicitArrayWrapper; /** - * @see _.reduce - **/ - inject( - callback: MemoIterator, - thisArg?: any): TResult; + * @see _.uniqBy + */ + uniqBy( + iteratee: Object + ): LoDashImplicitArrayWrapper; /** - * @see _.reduce - **/ - foldl( - callback: MemoIterator, - accumulator: TResult, - thisArg?: any): TResult; + * @see _.uniqBy + */ + uniqBy( + iteratee: TWhere + ): LoDashImplicitArrayWrapper; + } + interface LoDashExplicitWrapper { /** - * @see _.reduce - **/ - foldl( - callback: MemoIterator, - thisArg?: any): TResult; + * @see _.uniqBy + */ + uniqBy( + iteratee: ListIterator + ): LoDashExplicitArrayWrapper; } - //_.reduceRight - interface LoDashStatic { + interface LoDashExplicitArrayWrapper { /** - * This method is like _.reduce except that it iterates over elements of a collection from - * right to left. - * @param collection The collection to iterate over. - * @param callback The function called per iteration. - * @param accumulator Initial value of the accumulator. - * @param thisArg The this binding of callback. - * @return The accumulated value. - **/ - reduceRight( - collection: Array, - callback: MemoIterator, - accumulator: TResult, - thisArg?: any): TResult; + * @see _.uniqBy + */ + uniqBy( + iteratee: ListIterator + ): LoDashExplicitArrayWrapper; /** - * @see _.reduceRight - **/ - reduceRight( - collection: List, - callback: MemoIterator, - accumulator: TResult, - thisArg?: any): TResult; + * @see _.uniqBy + */ + uniqBy( + iteratee: string + ): LoDashExplicitArrayWrapper; /** - * @see _.reduceRight - **/ - reduceRight( - collection: Dictionary, - callback: MemoIterator, - accumulator: TResult, - thisArg?: any): TResult; + * @see _.uniqBy + */ + uniqBy( + iteratee: TWhere + ): LoDashExplicitArrayWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.reduceRight - **/ - reduceRight( - collection: Array, - callback: MemoIterator, - thisArg?: any): TResult; + * @see _.uniqBy + */ + uniqBy( + iteratee: ListIterator + ): LoDashExplicitArrayWrapper; /** - * @see _.reduceRight - **/ - reduceRight( - collection: List, - callback: MemoIterator, - thisArg?: any): TResult; + * @see _.uniqBy + */ + uniqBy( + iteratee: ListIterator + ): LoDashExplicitArrayWrapper; /** - * @see _.reduceRight - **/ - reduceRight( - collection: Dictionary, - callback: MemoIterator, - thisArg?: any): TResult; + * @see _.uniqBy + */ + uniqBy( + iteratee: string + ): LoDashExplicitArrayWrapper; /** - * @see _.reduceRight - **/ - foldr( - collection: Array, - callback: MemoIterator, - accumulator: TResult, - thisArg?: any): TResult; + * @see _.uniqBy + */ + uniqBy( + iteratee: Object + ): LoDashExplicitArrayWrapper; /** - * @see _.reduceRight - **/ - foldr( - collection: List, - callback: MemoIterator, - accumulator: TResult, - thisArg?: any): TResult; + * @see _.uniqBy + */ + uniqBy( + iteratee: TWhere + ): LoDashExplicitArrayWrapper; + } + //_.sortedUniq + interface LoDashStatic { /** - * @see _.reduceRight - **/ - foldr( - collection: Dictionary, - callback: MemoIterator, - accumulator: TResult, - thisArg?: any): TResult; + * This method is like `_.uniq` except that it's designed and optimized + * for sorted arrays. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to inspect. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.sortedUniq([1, 1, 2]); + * // => [1, 2] + */ + sortedUniq( + array: List + ): T[]; /** - * @see _.reduceRight - **/ - foldr( - collection: Array, - callback: MemoIterator, - thisArg?: any): TResult; + * @see _.sortedUniq + */ + sortedUniq( + array: List + ): T[]; + } + interface LoDashImplicitWrapper { /** - * @see _.reduceRight - **/ - foldr( - collection: List, - callback: MemoIterator, - thisArg?: any): TResult; + * @see _.sortedUniq + */ + sortedUniq(): LoDashImplicitArrayWrapper; + } + interface LoDashImplicitArrayWrapper { /** - * @see _.reduceRight - **/ - foldr( - collection: Dictionary, - callback: MemoIterator, - thisArg?: any): TResult; - } - - //_.reject - interface LoDashStatic { - /** - * The opposite of _.filter this method returns the elements of a collection that - * the callback does not return truey for. - * - * If a property name is provided for callback the created "_.pluck" style callback - * will return the property value of the given element. - * - * If an object is provided for callback the created "_.where" style callback will - * return true for elements that have the properties of the given object, else false. - * @param collection The collection to iterate over. - * @param callback The function called per iteration. - * @param thisArg The this binding of callback. - * @return A new array of elements that failed the callback check. - **/ - reject( - collection: Array, - callback: ListIterator, - thisArg?: any): T[]; + * @see _.sortedUniq + */ + sortedUniq(): LoDashImplicitArrayWrapper; /** - * @see _.reject - **/ - reject( - collection: List, - callback: ListIterator, - thisArg?: any): T[]; + * @see _.sortedUniq + */ + sortedUniq(): LoDashImplicitArrayWrapper; + } - /** - * @see _.reject - **/ - reject( - collection: Dictionary, - callback: DictionaryIterator, - thisArg?: any): T[]; + interface LoDashImplicitObjectWrapper { + sortedUniq(): LoDashImplicitArrayWrapper; /** - * @see _.reject - * @param pluckValue _.pluck style callback - **/ - reject( - collection: Array, - pluckValue: string): T[]; + * @see _.sortedUniq + */ + sortedUniq(): LoDashImplicitArrayWrapper; + } + interface LoDashExplicitWrapper { /** - * @see _.reject - * @param pluckValue _.pluck style callback - **/ - reject( - collection: List, - pluckValue: string): T[]; + * @see _.sortedUniq + */ + sortedUniq(): LoDashExplicitArrayWrapper; + } + interface LoDashExplicitArrayWrapper { /** - * @see _.reject - * @param pluckValue _.pluck style callback - **/ - reject( - collection: Dictionary, - pluckValue: string): T[]; + * @see _.sortedUniq + */ + sortedUniq(): LoDashExplicitArrayWrapper; /** - * @see _.reject - * @param whereValue _.where style callback - **/ - reject( - collection: Array, - whereValue: W): T[]; + * @see _.sortedUniq + */ + sortedUniq(): LoDashExplicitArrayWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.reject - * @param whereValue _.where style callback - **/ - reject( - collection: List, - whereValue: W): T[]; + * @see _.sortedUniq + */ + sortedUniq(): LoDashExplicitArrayWrapper; /** - * @see _.reject - * @param whereValue _.where style callback - **/ - reject( - collection: Dictionary, - whereValue: W): T[]; + * @see _.sortedUniq + */ + sortedUniq(): LoDashExplicitArrayWrapper; } - interface LoDashArrayWrapper { + //_.sortedUniqBy + interface LoDashStatic { /** - * @see _.reject - **/ - reject( - callback: ListIterator, - thisArg?: any): LoDashArrayWrapper; + * This method is like `_.uniqBy` except that it's designed and optimized + * for sorted arrays. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor); + * // => [1.1, 2.2] + */ + sortedUniqBy( + array: List, + iteratee: ListIterator + ): T[]; /** - * @see _.reject - * @param pluckValue _.pluck style callback - **/ - reject(pluckValue: string): LoDashArrayWrapper; + * @see _.sortedUniqBy + */ + sortedUniqBy( + array: List, + iteratee: ListIterator + ): T[]; /** - * @see _.reject - * @param whereValue _.where style callback - **/ - reject(whereValue: W): LoDashArrayWrapper; - } + * @see _.sortedUniqBy + */ + sortedUniqBy( + array: List, + iteratee: string + ): T[]; - //_.sample - interface LoDashStatic { /** - * Retrieves a random element or n random elements from a collection. - * @param collection The collection to sample. - * @return Returns the random sample(s) of collection. - **/ - sample(collection: Array): T; + * @see _.sortedUniqBy + */ + sortedUniqBy( + array: List, + iteratee: Object + ): T[]; /** - * @see _.sample - **/ - sample(collection: List): T; + * @see _.sortedUniqBy + */ + sortedUniqBy( + array: List, + iteratee: TWhere + ): T[]; + } + interface LoDashImplicitWrapper { /** - * @see _.sample - **/ - sample(collection: Dictionary): T; + * @see _.sortedUniqBy + */ + sortedUniqBy( + iteratee: ListIterator + ): LoDashImplicitArrayWrapper; + } + interface LoDashImplicitArrayWrapper { /** - * @see _.sample - * @param n The number of elements to sample. - **/ - sample(collection: Array, n: number): T[]; + * @see _.sortedUniqBy + */ + sortedUniqBy( + iteratee: ListIterator + ): LoDashImplicitArrayWrapper; /** - * @see _.sample - * @param n The number of elements to sample. - **/ - sample(collection: List, n: number): T[]; + * @see _.sortedUniqBy + */ + sortedUniqBy( + iteratee: string + ): LoDashImplicitArrayWrapper; /** - * @see _.sample - * @param n The number of elements to sample. - **/ - sample(collection: Dictionary, n: number): T[]; + * @see _.sortedUniqBy + */ + sortedUniqBy( + iteratee: TWhere + ): LoDashImplicitArrayWrapper; } - //_.shuffle - interface LoDashStatic { + interface LoDashImplicitObjectWrapper { /** - * Creates an array of shuffled values, using a version of the Fisher-Yates shuffle. - * See http://en.wikipedia.org/wiki/Fisher-Yates_shuffle. - * @param collection The collection to shuffle. - * @return Returns a new shuffled collection. - **/ - shuffle(collection: Array): T[]; + * @see _.sortedUniqBy + */ + sortedUniqBy( + iteratee: ListIterator + ): LoDashImplicitArrayWrapper; /** - * @see _.shuffle - **/ - shuffle(collection: List): T[]; + * @see _.sortedUniqBy + */ + sortedUniqBy( + iteratee: ListIterator + ): LoDashImplicitArrayWrapper; /** - * @see _.shuffle - **/ - shuffle(collection: Dictionary): T[]; - } + * @see _.sortedUniqBy + */ + sortedUniqBy( + iteratee: string + ): LoDashImplicitArrayWrapper; - interface LoDashArrayWrapper { /** - * @see _.shuffle - **/ - shuffle(): LoDashArrayWrapper; - } + * @see _.sortedUniqBy + */ + sortedUniqBy( + iteratee: Object + ): LoDashImplicitArrayWrapper; - interface LoDashObjectWrapper { /** - * @see _.shuffle - **/ - shuffle(): LoDashArrayWrapper; + * @see _.sortedUniqBy + */ + sortedUniqBy( + iteratee: TWhere + ): LoDashImplicitArrayWrapper; } - //_.size - interface LoDashStatic { + interface LoDashExplicitWrapper { /** - * Gets the size of the collection by returning collection.length for arrays and array-like - * objects or the number of own enumerable properties for objects. - * @param collection The collection to inspect. - * @return collection.length - **/ - size(collection: Array): number; + * @see _.sortedUniqBy + */ + sortedUniqBy( + iteratee: ListIterator + ): LoDashExplicitArrayWrapper; + } + interface LoDashExplicitArrayWrapper { /** - * @see _.size - **/ - size(collection: List): number; + * @see _.sortedUniqBy + */ + sortedUniqBy( + iteratee: ListIterator + ): LoDashExplicitArrayWrapper; /** - * @see _.size - * @param object The object to inspect - * @return The number of own enumerable properties. - **/ - size(object: T): number; + * @see _.sortedUniqBy + */ + sortedUniqBy( + iteratee: string + ): LoDashExplicitArrayWrapper; /** - * @see _.size - * @param aString The string to inspect - * @return The length of aString - **/ - size(aString: string): number; + * @see _.sortedUniqBy + */ + sortedUniqBy( + iteratee: TWhere + ): LoDashExplicitArrayWrapper; } - //_.some - interface LoDashStatic { + interface LoDashExplicitObjectWrapper { /** - * Checks if the callback returns a truey value for any element of a collection. The function - * returns as soon as it finds a passing value and does not iterate over the entire collection. - * The callback is bound to thisArg and invoked with three arguments; (value, index|key, collection). - * - * If a property name is provided for callback the created "_.pluck" style callback will return - * the property value of the given element. - * - * If an object is provided for callback the created "_.where" style callback will return true for - * elements that have the properties of the given object, else false. - * @param collection The collection to iterate over. - * @param callback The function called per iteration. - * @param thisArg The this binding of callback. - * @return True if any element passed the callback check, else false. - **/ - some( - collection: Array, - callback?: ListIterator, - thisArg?: any): boolean; + * @see _.sortedUniqBy + */ + sortedUniqBy( + iteratee: ListIterator + ): LoDashExplicitArrayWrapper; /** - * @see _.some - **/ - some( - collection: List, - callback?: ListIterator, - thisArg?: any): boolean; + * @see _.sortedUniqBy + */ + sortedUniqBy( + iteratee: ListIterator + ): LoDashExplicitArrayWrapper; /** - * @see _.some - **/ - some( - collection: Dictionary, - callback?: DictionaryIterator, - thisArg?: any): boolean; + * @see _.sortedUniqBy + */ + sortedUniqBy( + iteratee: string + ): LoDashExplicitArrayWrapper; /** - * @see _.some - **/ - some( - collection: {}, - callback?: ListIterator<{}, boolean>, - thisArg?: any): boolean; + * @see _.sortedUniqBy + */ + sortedUniqBy( + iteratee: Object + ): LoDashExplicitArrayWrapper; /** - * @see _.some - * @param pluckValue _.pluck style callback - **/ - some( - collection: Array, - pluckValue: string): boolean; + * @see _.sortedUniqBy + */ + sortedUniqBy( + iteratee: TWhere + ): LoDashExplicitArrayWrapper; + } + //_.unionWith DUMMY + interface LoDashStatic { /** - * @see _.some - * @param pluckValue _.pluck style callback - **/ - some( - collection: List, - pluckValue: string): boolean; + * This method is like `_.union` except that it accepts `comparator` which + * is invoked to compare elements of `arrays`. The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of combined values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.unionWith(objects, others, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] + */ + unionWith( + array: any[]|List, + ...values: any[] + ): any[]; + } + //_.uniqWith DUMMY + interface LoDashStatic { /** - * @see _.some - * @param pluckValue _.pluck style callback - **/ - some( - collection: Dictionary, - pluckValue: string): boolean; + * This method is like `_.uniq` except that it accepts `comparator` which + * is invoked to compare elements of `array`. The comparator is invoked with + * two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.uniqWith(objects, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }] + */ + uniqWith( + array: any[]|List, + ...values: any[] + ): any[]; + } + //_.unzip + interface LoDashStatic { /** - * @see _.some - * @param whereValue _.where style callback - **/ - some( - collection: Array, - whereValue: W): boolean; + * This method is like _.zip except that it accepts an array of grouped elements and creates an array + * regrouping the elements to their pre-zip configuration. + * + * @param array The array of grouped elements to process. + * @return Returns the new array of regrouped elements. + */ + unzip(array: List>): T[][]; + } + interface LoDashImplicitArrayWrapper { /** - * @see _.some - * @param whereValue _.where style callback - **/ - some( - collection: List, - whereValue: W): boolean; + * @see _.unzip + */ + unzip(): LoDashImplicitArrayWrapper; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.some - * @param whereValue _.where style callback - **/ - some( - collection: Dictionary, - whereValue: W): boolean; + * @see _.unzip + */ + unzip(): LoDashImplicitArrayWrapper; + } + interface LoDashExplicitArrayWrapper { /** - * @see _.some - **/ - any( - collection: Array, - callback?: ListIterator, - thisArg?: any): boolean; + * @see _.unzip + */ + unzip(): LoDashExplicitArrayWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.some - **/ - any( - collection: List, - callback?: ListIterator, - thisArg?: any): boolean; + * @see _.unzip + */ + unzip(): LoDashExplicitArrayWrapper; + } + //_.unzipWith + interface LoDashStatic { /** - * @see _.some - **/ - any( - collection: Dictionary, - callback?: DictionaryIterator, - thisArg?: any): boolean; + * This method is like _.unzip except that it accepts an iteratee to specify how regrouped values should be + * combined. The iteratee is bound to thisArg and invoked with four arguments: (accumulator, value, index, + * group). + * + * @param array The array of grouped elements to process. + * @param iteratee The function to combine regrouped values. + * @param thisArg The this binding of iteratee. + * @return Returns the new array of regrouped elements. + */ + unzipWith( + array: List>, + iteratee?: MemoIterator + ): TResult[]; + } + interface LoDashImplicitArrayWrapper { /** - * @see _.some - **/ - any( - collection: {}, - callback?: ListIterator<{}, boolean>, - thisArg?: any): boolean; + * @see _.unzipWith + */ + unzipWith( + iteratee?: MemoIterator + ): LoDashImplicitArrayWrapper; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.some - * @param pluckValue _.pluck style callback - **/ - any( - collection: Array, - pluckValue: string): boolean; + * @see _.unzipWith + */ + unzipWith( + iteratee?: MemoIterator + ): LoDashImplicitArrayWrapper; + } + //_.without + interface LoDashStatic { /** - * @see _.some - * @param pluckValue _.pluck style callback - **/ - any( - collection: List, - pluckValue: string): boolean; + * Creates an array excluding all provided values using SameValueZero for equality comparisons. + * + * @param array The array to filter. + * @param values The values to exclude. + * @return Returns the new array of filtered values. + */ + without( + array: List, + ...values: T[] + ): T[]; + } + interface LoDashImplicitArrayWrapper { /** - * @see _.some - * @param pluckValue _.pluck style callback - **/ - any( - collection: Dictionary, - pluckValue: string): boolean; + * @see _.without + */ + without(...values: T[]): LoDashImplicitArrayWrapper; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.some - * @param whereValue _.where style callback - **/ - any( - collection: Array, - whereValue: W): boolean; + * @see _.without + */ + without(...values: T[]): LoDashImplicitArrayWrapper; + } + interface LoDashExplicitArrayWrapper { /** - * @see _.some - * @param whereValue _.where style callback - **/ - any( - collection: List, - whereValue: W): boolean; + * @see _.without + */ + without(...values: T[]): LoDashExplicitArrayWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.some - * @param whereValue _.where style callback - **/ - any( - collection: Dictionary, - whereValue: W): boolean; + * @see _.without + */ + without(...values: T[]): LoDashExplicitArrayWrapper; } - //_.sortBy + //_.xor interface LoDashStatic { /** - * Creates an array of elements, sorted in ascending order by the results of running each - * element in a collection through the callback. This method performs a stable sort, that - * is, it will preserve the original sort order of equal elements. The callback is bound - * to thisArg and invoked with three arguments; (value, index|key, collection). - * - * If a property name is provided for callback the created "_.pluck" style callback will - * return the property value of the given element. - * - * If an object is provided for callback the created "_.where" style callback will return - * true for elements that have the properties of the given object, else false. - * @param collection The collection to iterate over. - * @param callback The function called per iteration. - * @param thisArg The this binding of callback. - * @return A new array of sorted elements. - **/ - sortBy( - collection: Array, - callback?: ListIterator, - thisArg?: any): T[]; + * Creates an array of unique values that is the symmetric difference of the provided arrays. + * + * @param arrays The arrays to inspect. + * @return Returns the new array of values. + */ + xor(...arrays: List[]): T[]; + } + interface LoDashImplicitArrayWrapper { /** - * @see _.sortBy - **/ - sortBy( - collection: List, - callback?: ListIterator, - thisArg?: any): T[]; + * @see _.xor + */ + xor(...arrays: List[]): LoDashImplicitArrayWrapper; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.sortBy - * @param pluckValue _.pluck style callback - **/ - sortBy( - collection: Array, - pluckValue: string): T[]; + * @see _.xor + */ + xor(...arrays: List[]): LoDashImplicitArrayWrapper; + } + interface LoDashExplicitArrayWrapper { /** - * @see _.sortBy - * @param pluckValue _.pluck style callback - **/ - sortBy( - collection: List, - pluckValue: string): T[]; + * @see _.xor + */ + xor(...arrays: List[]): LoDashExplicitArrayWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.sortBy - * @param whereValue _.where style callback - **/ - sortBy( - collection: Array, - whereValue: W): T[]; + * @see _.xor + */ + xor(...arrays: List[]): LoDashExplicitArrayWrapper; + } + //_.xorBy DUMMY + interface LoDashStatic { /** - * @see _.sortBy - * @param whereValue _.where style callback - **/ - sortBy( - collection: List, - whereValue: W): T[]; + * This method is like `_.xor` except that it accepts `iteratee` which is + * invoked for each element of each `arrays` to generate the criterion by which + * uniqueness is computed. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of values. + * @example + * + * _.xorBy([2.1, 1.2], [4.3, 2.4], Math.floor); + * // => [1.2, 4.3] + * + * // using the `_.property` iteratee shorthand + * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 2 }] + */ + xorBy( + array: any[]|List, + ...values: any[] + ): any[]; } - interface LoDashArrayWrapper { + //_.xorWith DUMMY + interface LoDashStatic { /** - * @see _.sortBy - **/ - sortBy( - callback?: ListIterator, - thisArg?: any): LoDashArrayWrapper; + * This method is like `_.xor` except that it accepts `comparator` which is + * invoked to compare elements of `arrays`. The comparator is invoked with + * two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.xorWith(objects, others, _.isEqual); + * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] + */ + xorWith( + array: any[]|List, + ...values: any[] + ): any[]; + } + //_.zip + interface LoDashStatic { /** - * @see _.sortBy - * @param pluckValue _.pluck style callback - **/ - sortBy(pluckValue: string): LoDashArrayWrapper; - - /** - * @see _.sortBy - * @param whereValue _.where style callback - **/ - sortBy(whereValue: W): LoDashArrayWrapper; + * Creates an array of grouped elements, the first of which contains the first elements of the given arrays, + * the second of which contains the second elements of the given arrays, and so on. + * + * @param arrays The arrays to process. + * @return Returns the new array of grouped elements. + */ + zip(...arrays: List[]): T[][]; } - //_.toArray - interface LoDashStatic { - /** - * Converts the collection to an array. - * @param collection The collection to convert. - * @return The new converted array. - **/ - toArray(collection: Array): T[]; - + interface LoDashImplicitArrayWrapper { /** - * @see _.toArray - **/ - toArray(collection: List): T[]; + * @see _.zip + */ + zip(...arrays: List[]): _.LoDashImplicitArrayWrapper; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.toArray - **/ - toArray(collection: Dictionary): T[]; + * @see _.zip + */ + zip(...arrays: List[]): _.LoDashImplicitArrayWrapper; } - interface LoDashArrayWrapper { + interface LoDashExplicitArrayWrapper { /** - * @see _.toArray - **/ - toArray(): LoDashArrayWrapper; + * @see _.zip + */ + zip(...arrays: List[]): _.LoDashExplicitArrayWrapper; } - interface LoDashObjectWrapper { + interface LoDashExplicitObjectWrapper { /** - * @see _.toArray - **/ - toArray(): LoDashArrayWrapper; + * @see _.zip + */ + zip(...arrays: List[]): _.LoDashExplicitArrayWrapper; } - //_.where + //_.zipObject interface LoDashStatic { /** - * Performs a deep comparison of each element in a collection to the given properties - * object, returning an array of all elements that have equivalent property values. - * @param collection The collection to iterate over. - * @param properties The object of property values to filter by. - * @return A new array of elements that have the given properties. - **/ - where( - list: Array, - properties: U): T[]; + * The inverse of _.pairs; this method returns an object composed from arrays of property names and values. + * Provide either a single two dimensional array, e.g. [[key1, value1], [key2, value2]] or two arrays, one of + * property names and one of corresponding values. + * + * @param props The property names. + * @param values The property values. + * @return Returns the new object. + */ + zipObject( + props: List|List>, + values?: List + ): TResult; /** - * @see _.where - **/ - where( - list: List, - properties: U): T[]; + * @see _.zipObject + */ + zipObject( + props: List|List>, + values?: List + ): TResult; /** - * @see _.where - **/ - where( - list: Dictionary, - properties: U): T[]; + * @see _.zipObject + */ + zipObject( + props: List|List>, + values?: List + ): _.Dictionary; } - interface LoDashArrayWrapper { + interface LoDashImplicitArrayWrapper { /** - * @see _.where - **/ - where(properties: U): LoDashArrayWrapper; - } + * @see _.zipObject + */ + zipObject( + values?: List + ): _.LoDashImplicitObjectWrapper; - /******** - * Date * - ********/ + /** + * @see _.zipObject + */ + zipObject( + values?: List + ): _.LoDashImplicitObjectWrapper; - //_.now - interface LoDashStatic { /** - * Gets the number of milliseconds that have elapsed since the Unix epoch - * (1 January 1970 00:00:00 UTC). - * @return The number of milliseconds. - **/ - now(): number; + * @see _.zipObject + */ + zipObject( + values?: List + ): _.LoDashImplicitObjectWrapper<_.Dictionary>; } - /************* - * Functions * - *************/ + interface LoDashImplicitObjectWrapper { + /** + * @see _.zipObject + */ + zipObject( + values?: List + ): _.LoDashImplicitObjectWrapper; - //_.after - interface LoDashStatic { /** - * Creates a function that executes func, with the this binding and arguments of the - * created function, only after being called n times. - * @param n The number of times the function must be called before func is executed. - * @param func The function to restrict. - * @return The new restricted function. - **/ - after( - n: number, - func: Function): Function; - } + * @see _.zipObject + */ + zipObject( + values?: List + ): _.LoDashImplicitObjectWrapper; - interface LoDashWrapper { /** - * @see _.after - **/ - after(func: Function): LoDashObjectWrapper; + * @see _.zipObject + */ + zipObject( + values?: List + ): _.LoDashImplicitObjectWrapper<_.Dictionary>; } - //_.bind - interface LoDashStatic { + interface LoDashExplicitArrayWrapper { /** - * Creates a function that, when called, invokes func with the this binding of thisArg - * and prepends any additional bind arguments to those provided to the bound function. - * @param func The function to bind. - * @param thisArg The this binding of func. - * @param args Arguments to be partially applied. - * @return The new bound function. - **/ - bind( - func: Function, - thisArg: any, - ...args: any[]): (...args: any[]) => any; - } + * @see _.zipObject + */ + zipObject( + values?: List + ): _.LoDashExplicitObjectWrapper; - interface LoDashObjectWrapper { /** - * @see _.bind - **/ - bind( - thisArg: any, - ...args: any[]): LoDashObjectWrapper<(...args: any[]) => any>; - } + * @see _.zipObject + */ + zipObject( + values?: List + ): _.LoDashExplicitObjectWrapper; - //_.bindAll - interface LoDashStatic { /** - * Binds methods of an object to the object itself, overwriting the existing method. Method - * names may be specified as individual arguments or as arrays of method names. If no method - * names are provided all the function properties of object will be bound. - * @param object The object to bind and assign the bound methods to. - * @param methodNames The object method names to bind, specified as individual method names - * or arrays of method names. - * @return object - **/ - bindAll( - object: T, - ...methodNames: string[]): T; + * @see _.zipObject + */ + zipObject( + values?: List + ): _.LoDashExplicitObjectWrapper<_.Dictionary>; } - interface LoDashObjectWrapper { + interface LoDashExplicitObjectWrapper { /** - * @see _.bindAll - **/ - bindAll(...methodNames: string[]): LoDashWrapper; - } + * @see _.zipObject + */ + zipObject( + values?: List + ): _.LoDashExplicitObjectWrapper; - //_.bindKey - interface LoDashStatic { /** - * Creates a function that, when called, invokes the method at object[key] and prepends any - * additional bindKey arguments to those provided to the bound function. This method differs - * from _.bind by allowing bound functions to reference methods that will be redefined or don't - * yet exist. See http://michaux.ca/articles/lazy-function-definition-pattern. - * @param object The object the method belongs to. - * @param key The key of the method. - * @param args Arguments to be partially applied. - * @return The new bound function. - **/ - bindKey( - object: T, - key: string, - ...args: any[]): Function; - } + * @see _.zipObject + */ + zipObject( + values?: List + ): _.LoDashExplicitObjectWrapper; - interface LoDashObjectWrapper { /** - * @see _.bindKey - **/ - bindKey( - key: string, - ...args: any[]): LoDashObjectWrapper; + * @see _.zipObject + */ + zipObject( + values?: List + ): _.LoDashExplicitObjectWrapper<_.Dictionary>; } - //_.compose + //_.zipWith interface LoDashStatic { /** - * Creates a function that is the composition of the provided functions, where each function - * consumes the return value of the function that follows. For example, composing the functions - * f(), g(), and h() produces f(g(h())). Each function is executed with the this binding of the - * composed function. - * @param funcs Functions to compose. - * @return The new composed function. - **/ - compose(...funcs: Function[]): Function; + * This method is like _.zip except that it accepts an iteratee to specify how grouped values should be + * combined. The iteratee is bound to thisArg and invoked with four arguments: (accumulator, value, index, + * group). + * @param {...Array} [arrays] The arrays to process. + * @param {Function} [iteratee] The function to combine grouped values. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @return Returns the new array of grouped elements. + */ + zipWith(...args: any[]): TResult[]; } - interface LoDashObjectWrapper { + interface LoDashImplicitArrayWrapper { /** - * @see _.compose - **/ - compose(...funcs: Function[]): LoDashObjectWrapper; + * @see _.zipWith + */ + zipWith(...args: any[]): LoDashImplicitArrayWrapper; } - //_.createCallback + /********* + * Chain * + *********/ + + //_.chain interface LoDashStatic { /** - * Produces a callback bound to an optional thisArg. If func is a property name the created - * callback will return the property value for a given element. If func is an object the created - * callback will return true for elements that contain the equivalent object properties, - * otherwise it will return false. - * @param func The value to convert to a callback. - * @param thisArg The this binding of the created callback. - * @param argCount The number of arguments the callback accepts. - * @return A callback function. - **/ - createCallback( - func: string, - thisArg?: any, - argCount?: number): () => any; + * Creates a lodash object that wraps value with explicit method chaining enabled. + * + * @param value The value to wrap. + * @return Returns the new lodash wrapper instance. + */ + chain(value: number): LoDashExplicitWrapper; + chain(value: string): LoDashExplicitWrapper; + chain(value: boolean): LoDashExplicitWrapper; + chain(value: T[]): LoDashExplicitArrayWrapper; + chain(value: T): LoDashExplicitObjectWrapper; + chain(value: any): LoDashExplicitWrapper; + } + interface LoDashImplicitWrapper { /** - * @see _.createCallback - **/ - createCallback( - func: Dictionary, - thisArg?: any, - argCount?: number): () => boolean; + * @see _.chain + */ + chain(): LoDashExplicitWrapper; } - interface LoDashWrapper { + interface LoDashImplicitArrayWrapper { /** - * @see _.createCallback - **/ - createCallback( - thisArg?: any, - argCount?: number): LoDashObjectWrapper<() => any>; + * @see _.chain + */ + chain(): LoDashExplicitArrayWrapper; } - interface LoDashObjectWrapper { + interface LoDashImplicitObjectWrapper { /** - * @see _.createCallback - **/ - createCallback( - thisArg?: any, - argCount?: number): LoDashObjectWrapper<() => any>; + * @see _.chain + */ + chain(): LoDashExplicitObjectWrapper; } - //_.curry + interface LoDashExplicitWrapperBase { + /** + * @see _.chain + */ + chain(): TWrapper; + } + + //_.tap interface LoDashStatic { /** - * Creates a function which accepts one or more arguments of func that when invoked either - * executes func returning its result, if all func arguments have been provided, or returns - * a function that accepts one or more of the remaining func arguments, and so on. The arity - * of func can be specified if func.length is not sufficient. - * @param func The function to curry. - * @param arity The arity of func. - * @return The new curried function. - **/ - curry( - func: Function, - arity?: number): Function; + * This method invokes interceptor and returns value. The interceptor is bound to thisArg and invoked with one + * argument; (value). The purpose of this method is to "tap into" a method chain in order to perform operations + * on intermediate results within the chain. + * + * @param value The value to provide to interceptor. + * @param interceptor The function to invoke. + * @parem thisArg The this binding of interceptor. + * @return Returns value. + **/ + tap( + value: T, + interceptor: (value: T) => void + ): T; } - interface LoDashObjectWrapper { + interface LoDashImplicitWrapperBase { /** - * @see _.curry - **/ - curry(arity?: number): LoDashObjectWrapper; + * @see _.tap + */ + tap( + interceptor: (value: T) => void + ): TWrapper; } - //_.debounce - interface LoDashStatic { + interface LoDashExplicitWrapperBase { /** - * Creates a function that will delay the execution of func until after wait milliseconds have - * elapsed since the last time it was invoked. Provide an options object to indicate that func - * should be invoked on the leading and/or trailing edge of the wait timeout. Subsequent calls - * to the debounced function will return the result of the last func call. - * - * Note: If leading and trailing options are true func will be called on the trailing edge of - * the timeout only if the the debounced function is invoked more than once during the wait - * timeout. - * @param func The function to debounce. - * @param wait The number of milliseconds to delay. - * @param options The options object. - * @param options.leading Specify execution on the leading edge of the timeout. - * @param options.maxWait The maximum time func is allowed to be delayed before it's called. - * @param options.trailing Specify execution on the trailing edge of the timeout. - * @return The new debounced function. - **/ - debounce( - func: T, - wait: number, - options?: DebounceSettings): T; + * @see _.tap + */ + tap( + interceptor: (value: T) => void + ): TWrapper; } - interface LoDashObjectWrapper { + //_.thru + interface LoDashStatic { /** - * @see _.debounce - **/ - debounce( - wait: number, - options?: DebounceSettings): LoDashObjectWrapper; + * This method is like _.tap except that it returns the result of interceptor. + * + * @param value The value to provide to interceptor. + * @param interceptor The function to invoke. + * @param thisArg The this binding of interceptor. + * @return Returns the result of interceptor. + */ + thru( + value: T, + interceptor: (value: T) => TResult + ): TResult; } - interface DebounceSettings { + interface LoDashImplicitWrapperBase { /** - * Specify execution on the leading edge of the timeout. - **/ - leading?: boolean; + * @see _.thru + */ + thru( + interceptor: (value: T) => TResult): LoDashImplicitWrapper; /** - * The maximum time func is allowed to be delayed before it's called. - **/ - maxWait?: number; + * @see _.thru + */ + thru( + interceptor: (value: T) => TResult): LoDashImplicitWrapper; /** - * Specify execution on the trailing edge of the timeout. - **/ - trailing?: boolean; - } + * @see _.thru + */ + thru( + interceptor: (value: T) => TResult): LoDashImplicitWrapper; - //_.defer - interface LoDashStatic { /** - * Defers executing the func function until the current call stack has cleared. Additional - * arguments will be provided to func when it is invoked. - * @param func The function to defer. - * @param args Arguments to invoke the function with. - * @return The timer id. - **/ - defer( - func: Function, - ...args: any[]): number; - } + * @see _.thru + */ + thru( + interceptor: (value: T) => TResult): LoDashImplicitObjectWrapper; - interface LoDashObjectWrapper { /** - * @see _.defer - **/ - defer(...args: any[]): LoDashWrapper; + * @see _.thru + */ + thru( + interceptor: (value: T) => TResult[]): LoDashImplicitArrayWrapper; } - //_.delay - interface LoDashStatic { + interface LoDashExplicitWrapperBase { /** - * Executes the func function after wait milliseconds. Additional arguments will be provided - * to func when it is invoked. - * @param func The function to delay. - * @param wait The number of milliseconds to delay execution. - * @param args Arguments to invoke the function with. - * @return The timer id. - **/ - delay( - func: Function, - wait: number, - ...args: any[]): number; - } + * @see _.thru + */ + thru( + interceptor: (value: T) => TResult + ): LoDashExplicitWrapper; - interface LoDashObjectWrapper { /** - * @see _.delay - **/ - delay( - wait: number, - ...args: any[]): LoDashWrapper; - } + * @see _.thru + */ + thru( + interceptor: (value: T) => TResult + ): LoDashExplicitWrapper; - //_.memoize - interface LoDashStatic { /** - * Creates a function that memoizes the result of func. If resolver is provided it will be - * used to determine the cache key for storing the result based on the arguments provided to - * the memoized function. By default, the first argument provided to the memoized function is - * used as the cache key. The func is executed with the this binding of the memoized function. - * The result cache is exposed as the cache property on the memoized function. - * @param func Computationally expensive function that will now memoized results. - * @param resolver Hash function for storing the result of `fn`. - * @return Returns the new memoizing function. - **/ - memoize( - func: T, - resolver?: Function): T; - } + * @see _.thru + */ + thru( + interceptor: (value: T) => TResult + ): LoDashExplicitWrapper; - //_.once - interface LoDashStatic { /** - * Creates a function that is restricted to execute func once. Repeat calls to the function - * will return the value of the first call. The func is executed with the this binding of the - * created function. - * @param func Function to only execute once. - * @return The new restricted function. - **/ - once(func: T): T; - } + * @see _.thru + */ + thru( + interceptor: (value: T) => TResult + ): LoDashExplicitObjectWrapper; - //_.partial - interface LoDashStatic { /** - * Creates a function that, when called, invokes func with any additional partial arguments - * prepended to those provided to the new function. This method is similar to _.bind except - * it does not alter the this binding. - * @param func The function to partially apply arguments to. - * @param args Arguments to be partially applied. - * @return The new partially applied function. - **/ - partial( - func: Function, - ...args: any[]): Function; + * @see _.thru + */ + thru( + interceptor: (value: T) => TResult[] + ): LoDashExplicitArrayWrapper; } - //_.partialRight - interface LoDashStatic { + //_.prototype.commit + interface LoDashImplicitWrapperBase { /** - * This method is like _.partial except that partial arguments are appended to those provided - * to the new function. - * @param func The function to partially apply arguments to. - * @param args Arguments to be partially applied. - * @return The new partially applied function. - **/ - partialRight( - func: Function, - ...args: any[]): Function; + * Executes the chained sequence and returns the wrapped result. + * + * @return Returns the new lodash wrapper instance. + */ + commit(): TWrapper; } - //_.throttle - interface LoDashStatic { + interface LoDashExplicitWrapperBase { /** - * Creates a function that, when executed, will only call the func function at most once per - * every wait milliseconds. Provide an options object to indicate that func should be invoked - * on the leading and/or trailing edge of the wait timeout. Subsequent calls to the throttled - * function will return the result of the last func call. - * - * Note: If leading and trailing options are true func will be called on the trailing edge of - * the timeout only if the the throttled function is invoked more than once during the wait timeout. - * @param func The function to throttle. - * @param wait The number of milliseconds to throttle executions to. - * @param options The options object. - * @param options.leading Specify execution on the leading edge of the timeout. - * @param options.trailing Specify execution on the trailing edge of the timeout. - * @return The new throttled function. - **/ - throttle( - func: T, - wait: number, - options?: ThrottleSettings): T; + * @see _.commit + */ + commit(): TWrapper; } - interface ThrottleSettings { - + //_.prototype.concat + interface LoDashImplicitWrapperBase { /** - * If you'd like to disable the leading-edge call, pass this as false. - **/ - leading?: boolean; + * Creates a new array joining a wrapped array with any additional arrays and/or values. + * + * @param items + * @return Returns the new concatenated array. + */ + concat(...items: Array>): LoDashImplicitArrayWrapper; /** - * If you'd like to disable the execution on the trailing-edge, pass false. - **/ - trailing?: boolean; + * @see _.concat + */ + concat(...items: Array>): LoDashImplicitArrayWrapper; } - //_.wrap - interface LoDashStatic { + interface LoDashExplicitWrapperBase { /** - * Creates a function that provides value to the wrapper function as its first argument. - * Additional arguments provided to the function are appended to those provided to the - * wrapper function. The wrapper is executed with the this binding of the created function. - * @param value The value to wrap. - * @param wrapper The wrapper function. - * @return The new function. - **/ - wrap( - value: any, - wrapper: (func: Function, ...args: any[]) => any): Function; - } + * @see _.concat + */ + concat(...items: Array>): LoDashExplicitArrayWrapper; - /************* - * Objects * - *************/ + /** + * @see _.concat + */ + concat(...items: Array>): LoDashExplicitArrayWrapper; + } - //_.assign - interface LoDashStatic { + //_.prototype.plant + interface LoDashImplicitWrapperBase { /** - * Assigns own enumerable properties of source object(s) to the destination object. Subsequent - * sources will overwrite property assignments of previous sources. If a callback is provided - * it will be executed to produce the assigned values. The callback is bound to thisArg and - * invoked with two arguments; (objectValue, sourceValue). - * @param object The destination object. - * @param s1-8 The source object(s) - * @param callback The function to customize merging properties. - * @param thisArg The this binding of callback. - * @return The destination object. - **/ - assign( - object: T, - s1: S1, - callback?: (objectValue: Value, sourceValue: Value) => Value, - thisArg?: any): Result; + * Creates a clone of the chained sequence planting value as the wrapped value. + * @param value The value to plant as the wrapped value. + * @return Returns the new lodash wrapper instance. + */ + plant(value: number): LoDashImplicitWrapper; /** - * @see _.assign - **/ - assign( - object: T, - s1: S1, - s2: S2, - callback?: (objectValue: Value, sourceValue: Value) => Value, - thisArg?: any): Result; + * @see _.plant + */ + plant(value: string): LoDashImplicitStringWrapper; /** - * @see _.assign - **/ - assign( - object: T, - s1: S1, - s2: S2, - s3: S3, - callback?: (objectValue: Value, sourceValue: Value) => Value, - thisArg?: any): Result; - - /** - * @see _.assign - **/ - assign( - object: T, - s1: S1, - s2: S2, - s3: S3, - s4: S4, - callback?: (objectValue: Value, sourceValue: Value) => Value, - thisArg?: any): Result; + * @see _.plant + */ + plant(value: boolean): LoDashImplicitWrapper; /** - * @see _.assign - **/ - extend( - object: T, - s1: S1, - callback?: (objectValue: Value, sourceValue: Value) => Value, - thisArg?: any): Result; + * @see _.plant + */ + plant(value: number[]): LoDashImplicitNumberArrayWrapper; /** - * @see _.assign - **/ - extend( - object: T, - s1: S1, - s2: S2, - callback?: (objectValue: Value, sourceValue: Value) => Value, - thisArg?: any): Result; + * @see _.plant + */ + plant(value: T[]): LoDashImplicitArrayWrapper; /** - * @see _.assign - **/ - extend( - object: T, - s1: S1, - s2: S2, - s3: S3, - callback?: (objectValue: Value, sourceValue: Value) => Value, - thisArg?: any): Result; + * @see _.plant + */ + plant(value: T): LoDashImplicitObjectWrapper; /** - * @see _.assign - **/ - extend( - object: T, - s1: S1, - s2: S2, - s3: S3, - s4: S4, - callback?: (objectValue: Value, sourceValue: Value) => Value, - thisArg?: any): Result; + * @see _.plant + */ + plant(value: any): LoDashImplicitWrapper; } - interface LoDashObjectWrapper { + interface LoDashExplicitWrapperBase { /** - * @see _.assign - **/ - assign( - s1: S1, - callback?: (objectValue: Value, sourceValue: Value) => Value, - thisArg?: any): TResult; + * @see _.plant + */ + plant(value: number): LoDashExplicitWrapper; /** - * @see _.assign - **/ - assign( - s1: S1, - s2: S2, - callback?: (objectValue: Value, sourceValue: Value) => Value, - thisArg?: any): TResult; - /** - * @see _.assign - **/ - assign( - s1: S1, - s2: S2, - s3: S3, - callback?: (objectValue: Value, sourceValue: Value) => Value, - thisArg?: any): TResult; - /** - * @see _.assign - **/ - assign( - s1: S1, - s2: S2, - s3: S3, - s4: S4, - callback?: (objectValue: Value, sourceValue: Value) => Value, - thisArg?: any): TResult; - /** - * @see _.assign - **/ - assign( - s1: S1, - s2: S2, - s3: S3, - s4: S4, - s5: S5, - callback?: (objectValue: Value, sourceValue: Value) => Value, - thisArg?: any): TResult; + * @see _.plant + */ + plant(value: string): LoDashExplicitStringWrapper; /** - * @see _.assign - **/ - extend( - s1: S1, - callback?: (objectValue: Value, sourceValue: Value) => Value, - thisArg?: any): TResult; + * @see _.plant + */ + plant(value: boolean): LoDashExplicitWrapper; /** - * @see _.assign - **/ - extend( - s1: S1, - s2: S2, - callback?: (objectValue: Value, sourceValue: Value) => Value, - thisArg?: any): TResult; + * @see _.plant + */ + plant(value: number[]): LoDashExplicitNumberArrayWrapper; + /** - * @see _.assign - **/ - extend( - s1: S1, - s2: S2, - s3: S3, - callback?: (objectValue: Value, sourceValue: Value) => Value, - thisArg?: any): TResult; - /** - * @see _.assign - **/ - extend( - s1: S1, - s2: S2, - s3: S3, - s4: S4, - callback?: (objectValue: Value, sourceValue: Value) => Value, - thisArg?: any): TResult; - /** - * @see _.assign - **/ - extend( - s1: S1, - s2: S2, - s3: S3, - s4: S4, - s5: S5, - callback?: (objectValue: Value, sourceValue: Value) => Value, - thisArg?: any): TResult; + * @see _.plant + */ + plant(value: T[]): LoDashExplicitArrayWrapper; - } + /** + * @see _.plant + */ + plant(value: T): LoDashExplicitObjectWrapper; - //_.clone - interface LoDashStatic { /** - * Creates a clone of value. If deep is true nested objects will also be cloned, otherwise - * they will be assigned by reference. If a callback is provided it will be executed to produce - * the cloned values. If the callback returns undefined cloning will be handled by the method - * instead. The callback is bound to thisArg and invoked with one argument; (value). - * @param value The value to clone. - * @param deep Specify a deep clone. - * @param callback The function to customize cloning values. - * @param thisArg The this binding of callback. - * @return The cloned value. - **/ - clone( - value: T, - deep?: boolean, - callback?: (value: any) => any, - thisArg?: any): T; + * @see _.plant + */ + plant(value: any): LoDashExplicitWrapper; } - //_.cloneDeep - interface LoDashStatic { + //_.prototype.reverse + interface LoDashImplicitArrayWrapper { /** - * Creates a deep clone of value. If a callback is provided it will be executed to produce the - * cloned values. If the callback returns undefined cloning will be handled by the method instead. - * The callback is bound to thisArg and invoked with one argument; (value). - * - * Note: This method is loosely based on the structured clone algorithm. Functions and DOM nodes - * are not cloned. The enumerable properties of arguments objects and objects created by constructors - * other than Object are cloned to plain Object objects. - * See http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm. - * @param value The value to clone. - * @param callback The function to customize cloning values. - * @param thisArg The this binding of callback. - * @return The cloned value. - **/ - cloneDeep( - value: T, - callback?: (value: any) => any, - thisArg?: any): T; + * Reverses the wrapped array so the first element becomes the last, the second element becomes the second to + * last, and so on. + * + * Note: This method mutates the wrapped array. + * + * @return Returns the new reversed lodash wrapper instance. + */ + reverse(): LoDashImplicitArrayWrapper; } - //_.defaults - interface LoDashStatic { + interface LoDashExplicitArrayWrapper { /** - * Assigns own enumerable properties of source object(s) to the destination object for all - * destination properties that resolve to undefined. Once a property is set, additional defaults - * of the same property will be ignored. - * @param object The destination object. - * @param sources The source objects. - * @return The destination object. - **/ - defaults( - object: T, - ...sources: any[]): TResult; + * @see _.reverse + */ + reverse(): LoDashExplicitArrayWrapper; } - interface LoDashObjectWrapper { + //_.prototype.toJSON + interface LoDashWrapperBase { /** - * @see _.defaults - **/ - defaults(...sources: any[]): LoDashObjectWrapper + * @see _.value + */ + toJSON(): T; } - //_.findKey - interface LoDashStatic { + //_.prototype.toString + interface LoDashWrapperBase { /** - * This method is like _.findIndex except that it returns the key of the first element that - * passes the callback check, instead of the element itself. - * @param object The object to search. - * @param callback The function called per iteration. - * @param thisArg The this binding of callback. - * @return The key of the found element, else undefined. - **/ - findKey( - object: any, - callback: (value: any) => boolean, - thisArg?: any): string; + * Produces the result of coercing the unwrapped value to a string. + * + * @return Returns the coerced string value. + */ + toString(): string; + } + //_.prototype.value + interface LoDashWrapperBase { /** - * @see _.findKey - * @param pluckValue _.pluck style callback - **/ - findKey( - object: any, - pluckValue: string): string; + * Executes the chained sequence to extract the unwrapped value. + * + * @alias _.toJSON, _.valueOf + * + * @return Returns the resolved unwrapped value. + */ + value(): T; + } + //_.valueOf + interface LoDashWrapperBase { /** - * @see _.findKey - * @param whereValue _.where style callback - **/ - findKey, T>( - object: T, - whereValue: W): string; + * @see _.value + */ + valueOf(): T; } - //_.findLastKey - interface LoDashStatic { - /** - * This method is like _.findKey except that it iterates over elements of a collection in the opposite order. - * @param object The object to search. - * @param callback The function called per iteration. - * @param thisArg The this binding of callback. - * @return The key of the found element, else undefined. - **/ - findLastKey( - object: any, - callback: (value: any) => boolean, - thisArg?: any): string; + /************** + * Collection * + **************/ + //_.at + interface LoDashStatic { /** - * @see _.findLastKey - * @param pluckValue _.pluck style callback - **/ - findLastKey( - object: any, - pluckValue: string): string; + * Creates an array of elements corresponding to the given keys, or indexes, of collection. Keys may be + * specified as individual arguments or as arrays of keys. + * + * @param collection The collection to iterate over. + * @param props The property names or indexes of elements to pick, specified individually or in arrays. + * @return Returns the new array of picked elements. + */ + at( + collection: List|Dictionary, + ...props: (number|string|(number|string)[])[] + ): T[]; + } + interface LoDashImplicitArrayWrapper { /** - * @see _.findLastKey - * @param whereValue _.where style callback - **/ - findLastKey, T>( - object: T, - whereValue: W): string; + * @see _.at + */ + at(...props: (number|string|(number|string)[])[]): LoDashImplicitArrayWrapper; } - //_.forIn - interface LoDashStatic { + interface LoDashImplicitObjectWrapper { /** - * Iterates over own and inherited enumerable properties of an object, executing the callback for - * each property. The callback is bound to thisArg and invoked with three arguments; (value, key, - * object). Callbacks may exit iteration early by explicitly returning false. - * @param object The object to iterate over. - * @param callback The function called per iteration. - * @param thisArg The this binding of callback. - * @return object - **/ - forIn( - object: Dictionary, - callback?: DictionaryIterator, - thisArg?: any): Dictionary; + * @see _.at + */ + at(...props: (number|string|(number|string)[])[]): LoDashImplicitArrayWrapper; + } + interface LoDashExplicitArrayWrapper { /** - * @see _.forIn - **/ - forIn( - object: T, - callback?: ObjectIterator, - thisArg?: any): T; + * @see _.at + */ + at(...props: (number|string|(number|string)[])[]): LoDashExplicitArrayWrapper; } - interface LoDashObjectWrapper { + interface LoDashExplicitObjectWrapper { /** - * @see _.forIn - **/ - forIn( - callback: ObjectIterator, - thisArg?: any): _.LoDashObjectWrapper; + * @see _.at + */ + at(...props: (number|string|(number|string)[])[]): LoDashExplicitArrayWrapper; } - //_.forInRight + //_.countBy interface LoDashStatic { /** - * This method is like _.forIn except that it iterates over elements of a collection in the - * opposite order. - * @param object The object to iterate over. - * @param callback The function called per iteration. - * @param thisArg The this binding of callback. - * @return object - **/ - forInRight( - object: Dictionary, - callback?: DictionaryIterator, - thisArg?: any): Dictionary; + * Creates an object composed of keys generated from the results of running each element of collection through + * iteratee. The corresponding value of each key is the number of times the key was returned by iteratee. The + * iteratee is bound to thisArg and invoked with three arguments: + * (value, index|key, collection). + * + * If a property name is provided for iteratee the created _.property style callback returns the property + * value of the given element. + * + * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for + * elements that have a matching property value, else false. + * + * If an object is provided for iteratee the created _.matches style callback returns true for elements that + * have the properties of the given object, else false. + * + * @param collection The collection to iterate over. + * @param iteratee The function invoked per iteration. + * @param thisArg The this binding of iteratee. + * @return Returns the composed aggregate object. + */ + countBy( + collection: List, + iteratee?: ListIterator + ): Dictionary; /** - * @see _.forInRight - **/ - forInRight( - object: T, - callback?: ObjectIterator, - thisArg?: any): T; - } + * @see _.countBy + */ + countBy( + collection: Dictionary, + iteratee?: DictionaryIterator + ): Dictionary; - interface LoDashObjectWrapper { /** - * @see _.forInRight - **/ - forInRight( - callback: ObjectIterator, - thisArg?: any): _.LoDashObjectWrapper; - } + * @see _.countBy + */ + countBy( + collection: NumericDictionary, + iteratee?: NumericDictionaryIterator + ): Dictionary; - //_.forOwn - interface LoDashStatic { /** - * Iterates over own enumerable properties of an object, executing the callback for each - * property. The callback is bound to thisArg and invoked with three arguments; (value, key, - * object). Callbacks may exit iteration early by explicitly returning false. - * @param object The object to iterate over. - * @param callback The function called per iteration. - * @param thisArg The this binding of callback. - * @return object - **/ - forOwn( - object: Dictionary, - callback?: DictionaryIterator, - thisArg?: any): Dictionary; + * @see _.countBy + */ + countBy( + collection: List|Dictionary|NumericDictionary, + iteratee?: string + ): Dictionary; /** - * @see _.forOwn - **/ - forOwn( - object: T, - callback?: ObjectIterator, - thisArg?: any): T; - } + * @see _.countBy + */ + countBy( + collection: List|Dictionary|NumericDictionary, + iteratee?: W + ): Dictionary; - interface LoDashObjectWrapper { /** - * @see _.forOwn - **/ - forOwn( - callback: ObjectIterator, - thisArg?: any): _.LoDashObjectWrapper; + * @see _.countBy + */ + countBy( + collection: List|Dictionary|NumericDictionary, + iteratee?: Object + ): Dictionary; } - //_.forOwnRight - interface LoDashStatic { - /** - * This method is like _.forOwn except that it iterates over elements of a collection in the - * opposite order. - * @param object The object to iterate over. - * @param callback The function called per iteration. - * @param thisArg The this binding of callback. - * @return object - **/ - forOwnRight( - object: Dictionary, - callback?: DictionaryIterator, - thisArg?: any): Dictionary; + interface LoDashImplicitWrapper { /** - * @see _.forOwnRight - **/ - forOwnRight( - object: T, - callback?: ObjectIterator, - thisArg?: any): T; + * @see _.countBy + */ + countBy( + iteratee?: ListIterator + ): LoDashImplicitObjectWrapper>; } - interface LoDashObjectWrapper { + interface LoDashImplicitArrayWrapper { /** - * @see _.forOwnRight - **/ - forOwnRight( - callback: ObjectIterator, - thisArg?: any): _.LoDashObjectWrapper; - } + * @see _.countBy + */ + countBy( + iteratee?: ListIterator + ): LoDashImplicitObjectWrapper>; - //_.functions - interface LoDashStatic { /** - * Creates a sorted array of property names of all enumerable properties, own and inherited, of - * object that have function values. - * @param object The object to inspect. - * @return An array of property names that have function values. - **/ - functions(object: any): string[]; + * @see _.countBy + */ + countBy( + iteratee?: string + ): LoDashImplicitObjectWrapper>; /** - * @see _functions - **/ - methods(object: any): string[]; + * @see _.countBy + */ + countBy( + iteratee?: W + ): LoDashImplicitObjectWrapper>; } - interface LoDashObjectWrapper { + interface LoDashImplicitObjectWrapper { /** - * @see _.functions - **/ - functions(): _.LoDashArrayWrapper; + * @see _.countBy + */ + countBy( + iteratee?: ListIterator|DictionaryIterator|NumericDictionaryIterator + ): LoDashImplicitObjectWrapper>; /** - * @see _.functions - **/ - methods(): _.LoDashArrayWrapper; - } + * @see _.countBy + */ + countBy( + iteratee?: string + ): LoDashImplicitObjectWrapper>; - //_.get - interface LoDashStatic { /** - * Gets the property value at path of object. If the resolved - * value is undefined the defaultValue is used in its place. - * @param object The object to query. - * @param path The path of the property to get. - * @param defaultValue The value returned if the resolved value is undefined. - * @return Returns the resolved value. - **/ - get(object : Object, - path:string|string[], - defaultValue?:T - ): T; + * @see _.countBy + */ + countBy( + iteratee?: W + ): LoDashImplicitObjectWrapper>; } - //_.has - interface LoDashStatic { + interface LoDashExplicitWrapper { /** - * Checks if the specified object property exists and is a direct property, instead of an - * inherited property. - * @param object The object to check. - * @param property The property to check for. - * @return True if key is a direct property, else false. - **/ - has(object: any, property: string): boolean; + * @see _.countBy + */ + countBy( + iteratee?: ListIterator + ): LoDashExplicitObjectWrapper>; } - //_.invert - interface LoDashStatic { + interface LoDashExplicitArrayWrapper { /** - * Creates an object composed of the inverted keys and values of the given object. - * @param object The object to invert. - * @return The created inverted object. - **/ - invert(object: any): any; - } + * @see _.countBy + */ + countBy( + iteratee?: ListIterator + ): LoDashExplicitObjectWrapper>; - //_.isArguments - interface LoDashStatic { /** - * Checks if value is an arguments object. - * @param value The value to check. - * @return True if the value is an arguments object, else false. - **/ - isArguments(value?: any): boolean; - } + * @see _.countBy + */ + countBy( + iteratee?: string + ): LoDashExplicitObjectWrapper>; - //_.isArray - interface LoDashStatic { /** - * Checks if value is an array. - * @param value The value to check. - * @return True if the value is an array, else false. - **/ - isArray(value?: any): boolean; + * @see _.countBy + */ + countBy( + iteratee?: W + ): LoDashExplicitObjectWrapper>; } - //_.isBoolean - interface LoDashStatic { + interface LoDashExplicitObjectWrapper { /** - * Checks if value is a boolean value. - * @param value The value to check. - * @return True if the value is a boolean value, else false. - **/ - isBoolean(value?: any): boolean; - } + * @see _.countBy + */ + countBy( + iteratee?: ListIterator|DictionaryIterator|NumericDictionaryIterator + ): LoDashExplicitObjectWrapper>; - //_.isDate - interface LoDashStatic { /** - * Checks if value is a date. - * @param value The value to check. - * @return True if the value is a date, else false. - **/ - isDate(value?: any): boolean; - } + * @see _.countBy + */ + countBy( + iteratee?: string + ): LoDashExplicitObjectWrapper>; - //_.isElement - interface LoDashStatic { /** - * Checks if value is a DOM element. - * @param value The value to check. - * @return True if the value is a DOM element, else false. - **/ - isElement(value?: any): boolean; + * @see _.countBy + */ + countBy( + iteratee?: W + ): LoDashExplicitObjectWrapper>; } - //_.isEmpty + //_.each interface LoDashStatic { /** - * Checks if value is empty. Arrays, strings, or arguments objects with a length of 0 and objects - * with no own enumerable properties are considered "empty". - * @param value The value to inspect. - * @return True if the value is empty, else false. - **/ - isEmpty(value?: any[]|Dictionary|string|any): boolean; - } + * @see _.forEach + */ + each( + collection: T[], + iteratee?: ListIterator + ): T[]; - //_.isError - interface LoDashStatic { /** - * Checks if value is an Error, EvalError, RangeError, ReferenceError, SyntaxError, TypeError, - * or URIError object. - * @param value The value to check. - * @return True if value is an error object, else false. - */ - isError(value: any): boolean; - } + * @see _.forEach + */ + each( + collection: List, + iteratee?: ListIterator + ): List; + /** + * @see _.forEach + */ + each( + collection: Dictionary, + iteratee?: DictionaryIterator + ): Dictionary; - //_.isEqual - interface LoDashStatic { /** - * Performs a deep comparison between two values to determine if they are equivalent to each - * other. If a callback is provided it will be executed to compare values. If the callback - * returns undefined comparisons will be handled by the method instead. The callback is bound to - * thisArg and invoked with two arguments; (a, b). - * @param a The value to compare. - * @param b The other value to compare. - * @param callback The function to customize comparing values. - * @param thisArg The this binding of callback. - * @return True if the values are equivalent, else false. - **/ - isEqual( - a?: any, - b?: any, - callback?: (a: any, b: any) => boolean, - thisArg?: any): boolean; - } + * @see _.forEach + */ + each( + collection: T, + iteratee?: ObjectIterator + ): T; - //_.isFinite - interface LoDashStatic { /** - * Checks if value is, or can be coerced to, a finite number. - * - * Note: This is not the same as native isFinite which will return true for booleans and empty - * strings. See http://es5.github.io/#x15.1.2.5. - * @param value The value to check. - * @return True if the value is finite, else false. - **/ - isFinite(value?: any): boolean; + * @see _.forEach + */ + each( + collection: T, + iteratee?: ObjectIterator + ): T; } - //_.isFunction - interface LoDashStatic { + interface LoDashImplicitWrapper { /** - * Checks if value is a function. - * @param value The value to check. - * @return True if the value is a function, else false. - **/ - isFunction(value?: any): boolean; + * @see _.forEach + */ + each( + iteratee: ListIterator + ): LoDashImplicitWrapper; } - //_.isNaN - interface LoDashStatic { + interface LoDashImplicitArrayWrapper { /** - * Checks if value is NaN. - * - * Note: This is not the same as native isNaN which will return true for undefined and other - * non-numeric values. See http://es5.github.io/#x15.1.2.4. - * @param value The value to check. - * @return True if the value is NaN, else false. - **/ - isNaN(value?: any): boolean; + * @see _.forEach + */ + each( + iteratee: ListIterator + ): LoDashImplicitArrayWrapper; } - //_.isNull - interface LoDashStatic { + interface LoDashImplicitObjectWrapper { /** - * Checks if value is null. - * @param value The value to check. - * @return True if the value is null, else false. - **/ - isNull(value?: any): boolean; + * @see _.forEach + */ + each( + iteratee?: ListIterator|DictionaryIterator + ): LoDashImplicitObjectWrapper; } - //_.isNumber - interface LoDashStatic { + interface LoDashExplicitWrapper { /** - * Checks if value is a number. - * - * Note: NaN is considered a number. See http://es5.github.io/#x8.5. - * @param value The value to check. - * @return True if the value is a number, else false. - **/ - isNumber(value?: any): boolean; + * @see _.forEach + */ + each( + iteratee: ListIterator + ): LoDashExplicitWrapper; } - //_.isObject - interface LoDashStatic { + interface LoDashExplicitArrayWrapper { /** - * Checks if value is the language type of Object. (e.g. arrays, functions, objects, regexes, - * new Number(0), and new String('')) - * @param value The value to check. - * @return True if the value is an object, else false. - **/ - isObject(value?: any): boolean; + * @see _.forEach + */ + each( + iteratee: ListIterator + ): LoDashExplicitArrayWrapper; } - //_.isPlainObject - interface LoDashStatic { + interface LoDashExplicitObjectWrapper { /** - * Checks if value is an object created by the Object constructor. - * @param value The value to check. - * @return True if value is a plain object, else false. - **/ - isPlainObject(value?: any): boolean; + * @see _.forEach + */ + each( + iteratee?: ListIterator|DictionaryIterator + ): LoDashExplicitObjectWrapper; } - //_.isRegExp + //_.eachRight interface LoDashStatic { /** - * Checks if value is a regular expression. - * @param value The value to check. - * @return True if the value is a regular expression, else false. - **/ - isRegExp(value?: any): boolean; - } + * @see _.forEachRight + */ + eachRight( + collection: T[], + iteratee?: ListIterator + ): T[]; - //_.isString - interface LoDashStatic { /** - * Checks if value is a string. - * @param value The value to check. - * @return True if the value is a string, else false. - **/ - isString(value?: any): boolean; - } + * @see _.forEachRight + */ + eachRight( + collection: List, + iteratee?: ListIterator + ): List; - //_.isUndefined - interface LoDashStatic { /** - * Checks if value is undefined. - * @param value The value to check. - * @return True if the value is undefined, else false. - **/ - isUndefined(value?: any): boolean; - } + * @see _.forEachRight + */ + eachRight( + collection: Dictionary, + iteratee?: DictionaryIterator + ): Dictionary; - //_.keys - interface LoDashStatic { /** - * Creates an array composed of the own enumerable property names of an object. - * @param object The object to inspect. - * @return An array of property names. - **/ - keys(object?: any): string[]; + * @see _.forEachRight + */ + eachRight( + collection: T, + iteratee?: ObjectIterator + ): T; + + /** + * @see _.forEachRight + */ + eachRight( + collection: T, + iteratee?: ObjectIterator + ): T; } - interface LoDashObjectWrapper { + interface LoDashImplicitWrapper { /** - * @see _.keys - **/ - keys(): LoDashArrayWrapper + * @see _.forEachRight + */ + eachRight( + iteratee: ListIterator + ): LoDashImplicitWrapper; } - //_.mapValues - interface LoDashStatic { + interface LoDashImplicitArrayWrapper { /** - * Creates an object with the same keys as object and values generated by running each own - * enumerable property of object through iteratee. The iteratee function is bound to thisArg - * and invoked with three arguments: (value, key, object). - * - * If a property name is provided iteratee the created "_.property" style callback returns - * the property value of the given element. - * - * If a value is also provided for thisArg the creted "_.matchesProperty" style callback returns - * true for elements that have a matching property value, else false;. - * - * If an object is provided for iteratee the created "_.matches" style callback returns true - * for elements that have the properties of the given object, else false. - * - * @param {Object} object The object to iterate over. - * @param {Function|Object|string} [iteratee=_.identity] The function invoked per iteration. - * @param {Object} [thisArg] The `this` binding of `iteratee`. - * @return {Object} Returns the new mapped object. - */ - mapValues(obj: Dictionary, callback: ObjectIterator, thisArg?: any): Dictionary; - mapValues(obj: Dictionary, where: Dictionary): Dictionary; - mapValues(obj: T, pluck: string): TMapped; - mapValues(obj: T, callback: ObjectIterator, thisArg?: any): T; + * @see _.forEachRight + */ + eachRight( + iteratee: ListIterator + ): LoDashImplicitArrayWrapper; } - interface LoDashObjectWrapper { + interface LoDashImplicitObjectWrapper { /** - * @see _.mapValues - * TValue is the type of the property values of T. - * TResult is the type output by the ObjectIterator function + * @see _.forEachRight */ - mapValues(callback: ObjectIterator, thisArg?: any): LoDashObjectWrapper>; + eachRight( + iteratee?: ListIterator|DictionaryIterator + ): LoDashImplicitObjectWrapper; + } + interface LoDashExplicitWrapper { /** - * @see _.mapValues - * TResult is the type of the property specified by pluck. - * T should be a Dictionary> + * @see _.forEachRight */ - mapValues(pluck: string): LoDashObjectWrapper>; + eachRight( + iteratee: ListIterator + ): LoDashExplicitWrapper; + } + interface LoDashExplicitArrayWrapper { /** - * @see _.mapValues - * TResult is the type of the properties on the object specified by pluck. - * T should be a Dictionary>> + * @see _.forEachRight */ - mapValues(pluck: string, where: Dictionary): LoDashArrayWrapper>; + eachRight( + iteratee: ListIterator + ): LoDashExplicitArrayWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.mapValues - * TResult is the type of the properties of each object in the values of T - * T should be a Dictionary> + * @see _.forEachRight */ - mapValues(where: Dictionary): LoDashArrayWrapper; + eachRight( + iteratee?: ListIterator|DictionaryIterator + ): LoDashExplicitObjectWrapper; } - //_.merge + //_.every interface LoDashStatic { /** - * Recursively merges own enumerable properties of the source object(s), that don't resolve - * to undefined into the destination object. Subsequent sources will overwrite property - * assignments of previous sources. If a callback is provided it will be executed to produce - * the merged values of the destination and source properties. If the callback returns undefined - * merging will be handled by the method instead. The callback is bound to thisArg and invoked - * with two arguments; (objectValue, sourceValue). - * @param object The destination object. - * @param s1-8 The source object(s) - * @param callback The function to customize merging properties. - * @param thisArg The this binding of callback. - * @return The destination object. - **/ - merge( - object: T, - s1: S1, - callback?: (objectValue: Value, sourceValue: Value) => Value, - thisArg?: any): Result; + * Checks if predicate returns truthy for all elements of collection. Iteration is stopped once predicate + * returns falsey. The predicate is invoked with three arguments: (value, index|key, collection). + * + * @param collection The collection to iterate over. + * @param predicate The function invoked per iteration. + * @return Returns true if all elements pass the predicate check, else false. + */ + every( + collection: List, + predicate?: ListIterator + ): boolean; /** - * @see _.merge - **/ - merge( - object: T, - s1: S1, - s2: S2, - callback?: (objectValue: Value, sourceValue: Value) => Value, - thisArg?: any): Result; + * @see _.every + */ + every( + collection: Dictionary, + predicate?: DictionaryIterator + ): boolean; /** - * @see _.merge - **/ - merge( - object: T, - s1: S1, - s2: S2, - s3: S3, - callback?: (objectValue: Value, sourceValue: Value) => Value, - thisArg?: any): Result; + * @see _.every + */ + every( + collection: NumericDictionary, + predicate?: NumericDictionaryIterator + ): boolean; /** - * @see _.merge - **/ - merge( - object: T, - s1: S1, - s2: S2, - s3: S3, - s4: S4, - callback?: (objectValue: Value, sourceValue: Value) => Value, - thisArg?: any): Result; + * @see _.every + */ + every( + collection: List|Dictionary|NumericDictionary, + predicate?: string|any[] + ): boolean; + + /** + * @see _.every + */ + every( + collection: List|Dictionary|NumericDictionary, + predicate?: TObject + ): boolean; } - //_.omit - interface LoDashStatic { + interface LoDashImplicitArrayWrapper { /** - * Creates a shallow clone of object excluding the specified properties. Property names may be - * specified as individual arguments or as arrays of property names. If a callback is provided - * it will be executed for each property of object omitting the properties the callback returns - * truey for. The callback is bound to thisArg and invoked with three arguments; (value, key, - * object). - * @param object The source object. - * @param keys The properties to omit. - * @return An object without the omitted properties. - **/ - omit( - object: T, - ...keys: string[]): Omitted; + * @see _.every + */ + every( + predicate?: ListIterator|NumericDictionaryIterator + ): boolean; /** - * @see _.omit - **/ - omit( - object: T, - keys: string[]): Omitted; + * @see _.every + */ + every( + predicate?: string|any[] + ): boolean; /** - * @see _.omit - **/ - omit( - object: T, - callback: ObjectIterator, - thisArg?: any): Omitted; + * @see _.every + */ + every( + predicate?: TObject + ): boolean; } - interface LoDashObjectWrapper { + interface LoDashImplicitObjectWrapper { /** - * @see _.omit - **/ - omit( - ...keys: string[]): LoDashObjectWrapper; + * @see _.every + */ + every( + predicate?: ListIterator|DictionaryIterator|NumericDictionaryIterator + ): boolean; /** - * @see _.omit - **/ - omit( - keys: string[]): LoDashObjectWrapper; + * @see _.every + */ + every( + predicate?: string|any[] + ): boolean; /** - * @see _.omit - **/ - omit( - callback: ObjectIterator, - thisArg?: any): LoDashObjectWrapper; + * @see _.every + */ + every( + predicate?: TObject + ): boolean; } - //_.pairs - interface LoDashStatic { + interface LoDashExplicitArrayWrapper { /** - * Creates a two dimensional array of an object's key-value pairs, - * i.e. [[key1, value1], [key2, value2]]. - * @param object The object to inspect. - * @return Aew array of key-value pairs. - **/ - pairs(object?: any): any[][]; - } + * @see _.every + */ + every( + predicate?: ListIterator|NumericDictionaryIterator + ): LoDashExplicitWrapper; - interface LoDashObjectWrapper { /** - * @see _.pairs - **/ - pairs(): LoDashArrayWrapper; + * @see _.every + */ + every( + predicate?: string|any[] + ): LoDashExplicitWrapper; + + /** + * @see _.every + */ + every( + predicate?: TObject + ): LoDashExplicitWrapper; } - //_.picks - interface LoDashStatic { + interface LoDashExplicitObjectWrapper { /** - * Creates a shallow clone of object composed of the specified properties. Property names may be - * specified as individual arguments or as arrays of property names. If a callback is provided - * it will be executed for each property of object picking the properties the callback returns - * truey for. The callback is bound to thisArg and invoked with three arguments; (value, key, - * object). - * @param object Object to strip unwanted key/value pairs. - * @param keys Property names to pick - * @return An object composed of the picked properties. - **/ - pick( - object: T, - ...keys: string[]): Picked; + * @see _.every + */ + every( + predicate?: ListIterator|DictionaryIterator|NumericDictionaryIterator + ): LoDashExplicitWrapper; /** - * @see _.pick - **/ - pick( - object: T, - keys: string[]): Picked; + * @see _.every + */ + every( + predicate?: string|any[] + ): LoDashExplicitWrapper; /** - * @see _.pick - **/ - pick( - object: T, - callback: ObjectIterator, - thisArg?: any): Picked; - } - - //_.set - interface LoDashStatic { - /** - * Sets the property value of path on object. If a portion of path does not exist it is created. - * @param object The object to augment. - * @param path The path of the property to set. - * @param value The value to set - **/ - set( - object: Augmented, - path: Array | string, - value: T - ): Augmented; + * @see _.every + */ + every( + predicate?: TObject + ): LoDashExplicitWrapper; } - //_.transform + //_.filter interface LoDashStatic { /** - * An alternative to _.reduce this method transforms object to a new accumulator object which is - * the result of running each of its elements through a callback, with each callback execution - * potentially mutating the accumulator object. The callback is bound to thisArg and invoked with - * four arguments; (accumulator, value, key, object). Callbacks may exit iteration early by - * explicitly returning false. - * @param collection The collection to iterate over. - * @param callback The function called per iteration. - * @param accumulator The custom accumulator value. - * @param thisArg The this binding of callback. - * @return The accumulated value. - **/ - transform( - collection: Array, - callback: MemoVoidIterator, - accumulator: Acc, - thisArg?: any): Acc; - - /** - * @see _.transform - **/ - transform( + * Iterates over elements of collection, returning an array of all elements predicate returns truthy for. The + * predicate is bound to thisArg and invoked with three arguments: (value, index|key, collection). + * + * If a property name is provided for predicate the created _.property style callback returns the property + * value of the given element. + * + * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for + * elements that have a matching property value, else false. + * + * If an object is provided for predicate the created _.matches style callback returns true for elements that + * have the properties of the given object, else false. + * + * @param collection The collection to iterate over. + * @param predicate The function invoked per iteration. + * @param thisArg The this binding of predicate. + * @return Returns the new filtered array. + */ + filter( collection: List, - callback: MemoVoidIterator, - accumulator: Acc, - thisArg?: any): Acc; + predicate?: ListIterator + ): T[]; /** - * @see _.transform - **/ - transform( + * @see _.filter + */ + filter( collection: Dictionary, - callback: MemoVoidIterator, - accumulator: Acc, - thisArg?: any): Acc; + predicate?: DictionaryIterator + ): T[]; /** - * @see _.transform - **/ - transform( - collection: Array, - callback?: MemoVoidIterator, - thisArg?: any): Acc; + * @see _.filter + */ + filter( + collection: string, + predicate?: StringIterator + ): string[]; /** - * @see _.transform - **/ - transform( - collection: List, - callback?: MemoVoidIterator, - thisArg?: any): Acc; + * @see _.filter + */ + filter( + collection: List|Dictionary, + predicate: string + ): T[]; /** - * @see _.transform - **/ - transform( - collection: Dictionary, - callback?: MemoVoidIterator, - thisArg?: any): Acc; + * @see _.filter + */ + filter( + collection: List|Dictionary, + predicate: W + ): T[]; } - //_.values - interface LoDashStatic { + interface LoDashImplicitWrapper { /** - * Creates an array composed of the own enumerable property values of object. - * @param object The object to inspect. - * @return Returns an array of property values. - **/ - values(object?: any): any[]; + * @see _.filter + */ + filter( + predicate?: StringIterator + ): LoDashImplicitArrayWrapper; } - /********** - * String * - **********/ + interface LoDashImplicitArrayWrapper { + /** + * @see _.filter + */ + filter( + predicate: ListIterator + ): LoDashImplicitArrayWrapper; - interface LoDashStatic { - camelCase(str?: string): string; - capitalize(str?: string): string; - deburr(str?: string): string; - endsWith(str?: string, target?: string, position?: number): boolean; - escape(str?: string): string; - escapeRegExp(str?: string): string; - kebabCase(str?: string): string; - pad(str?: string, length?: number, chars?: string): string; - padLeft(str?: string, length?: number, chars?: string): string; - padRight(str?: string, length?: number, chars?: string): string; - repeat(str?: string, n?: number): string; - snakeCase(str?: string): string; - startCase(str?: string): string; - startsWith(str?: string, target?: string, position?: number): boolean; - trim(str?: string, chars?: string): string; - trimLeft(str?: string, chars?: string): string; - trimRight(str?: string, chars?: string): string; - trunc(str?: string, len?: number): string; - trunc(str?: string, options?: { length?: number; omission?: string; separator?: string|RegExp }): string; - words(str?: string, pattern?: string|RegExp): string[]; - } + /** + * @see _.filter + */ + filter( + predicate: string + ): LoDashImplicitArrayWrapper; - //_.parseInt - interface LoDashStatic { /** - * Converts the given value into an integer of the specified radix. If radix is undefined or 0 a - * radix of 10 is used unless the value is a hexadecimal, in which case a radix of 16 is used. - * - * Note: This method avoids differences in native ES3 and ES5 parseInt implementations. See - * http://es5.github.io/#E. - * @param value The value to parse. - * @param radix The radix used to interpret the value to parse. - * @return The new integer value. - **/ - parseInt(value?: string, radix?: number): number; + * @see _.filter + */ + filter(predicate: W): LoDashImplicitArrayWrapper; } - /************* - * Utilities * - *************/ - //_.escape - interface LoDashStatic { + interface LoDashImplicitObjectWrapper { /** - * Converts the characters &, <, >, ", and ' in string to their corresponding HTML entities. - * @param string The string to escape. - * @return The escaped string. - **/ - escape(str?: string): string; - } + * @see _.filter + */ + filter( + predicate: ListIterator|DictionaryIterator + ): LoDashImplicitArrayWrapper; - //_.identity - interface LoDashStatic { /** - * This method returns the first argument provided to it. - * @param value Any value. - * @return value. - **/ - identity(value?: T): T; - } + * @see _.filter + */ + filter( + predicate: string + ): LoDashImplicitArrayWrapper; - //_.mixin - interface LoDashStatic { /** - * Adds function properties of a source object to the lodash function and chainable wrapper. - * @param object The object of function properties to add to lodash. - **/ - mixin(object?: Dictionary<(value: any) => any>): void; + * @see _.filter + */ + filter(predicate: W): LoDashImplicitArrayWrapper; } - //_.noConflict - interface LoDashStatic { + interface LoDashExplicitWrapper { /** - * Reverts the '_' variable to its previous value and returns a reference to the lodash function. - * @return The lodash function. - **/ - noConflict(): typeof _; + * @see _.filter + */ + filter( + predicate?: StringIterator + ): LoDashExplicitArrayWrapper; } - //_.property - interface LoDashStatic { + interface LoDashExplicitArrayWrapper { /** - * # S - * Creates a "_.pluck" style function, which returns the key value of a given object. - * @param key (string) - * @return the value of that key on the object - **/ - property(key: string): (obj: T) => RT; - } + * @see _.filter + */ + filter( + predicate: ListIterator + ): LoDashExplicitArrayWrapper; - //_.random - interface LoDashStatic { /** - * Produces a random number between min and max (inclusive). If only one argument is provided a - * number between 0 and the given number will be returned. If floating is truey or either min or - * max are floats a floating-point number will be returned instead of an integer. - * @param max The maximum possible value. - * @param floating Specify returning a floating-point number. - * @return A random number. - **/ - random(max: number, floating?: boolean): number; + * @see _.filter + */ + filter( + predicate: string + ): LoDashExplicitArrayWrapper; /** - * @see _.random - * @param min The minimum possible value. - * @return A random number between `min` and `max`. - **/ - random(min: number, max: number, floating?: boolean): number; + * @see _.filter + */ + filter(predicate: W): LoDashExplicitArrayWrapper; } - //_.result - interface LoDashStatic { + interface LoDashExplicitObjectWrapper { /** - * Resolves the value of property on object. If property is a function it will be invoked with - * the this binding of object and its result returned, else the property value is returned. If - * object is falsey then undefined is returned. - * @param object The object to inspect. - * @param property The property to get the value of. - * @return The resolved value. - **/ - result(object: any, property: string): any; + * @see _.filter + */ + filter( + predicate: ListIterator|DictionaryIterator + ): LoDashExplicitArrayWrapper; + + /** + * @see _.filter + */ + filter( + predicate: string + ): LoDashExplicitArrayWrapper; + + /** + * @see _.filter + */ + filter(predicate: W): LoDashExplicitArrayWrapper; } - //_.runInContext + //_.find interface LoDashStatic { /** - * Create a new lodash function using the given context object. - * @param context The context object - * @returns The lodash function. - **/ - runInContext(context: any): typeof _; + * Iterates over elements of collection, returning the first element predicate returns truthy for. + * The predicate is bound to thisArg and invoked with three arguments: (value, index|key, collection). + * + * If a property name is provided for predicate the created _.property style callback returns the property + * value of the given element. + * + * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for + * elements that have a matching property value, else false. + * + * If an object is provided for predicate the created _.matches style callback returns true for elements that + * have the properties of the given object, else false. + * + * @param collection The collection to search. + * @param predicate The function invoked per iteration. + * @param fromIndex The index to search from. + * @return Returns the matched element, else undefined. + */ + find( + collection: List, + predicate?: ListIterator, + fromIndex?: number + ): T; + + /** + * @see _.find + */ + find( + collection: Dictionary, + predicate?: DictionaryIterator, + fromIndex?: number + ): T; + + /** + * @see _.find + */ + find( + collection: List|Dictionary, + predicate?: string, + fromIndex?: number + ): T; + + /** + * @see _.find + */ + find( + collection: List|Dictionary, + predicate?: TObject, + fromIndex?: number + ): T; } - //_.template - interface LoDashStatic { + interface LoDashImplicitArrayWrapper { /** - * A micro-templating method that handles arbitrary delimiters, preserves whitespace, and - * correctly escapes quotes within interpolated code. - * - * Note: In the development build, _.template utilizes sourceURLs for easier debugging. See - * http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl - * - * For more information on precompiling templates see: - * http://lodash.com/#custom-builds - * - * For more information on Chrome extension sandboxes see: - * http://developer.chrome.com/stable/extensions/sandboxingEval.html - * @param text The template text. - * @param data The data object used to populate the text. - * @param options The options object. - * @param options.escape The "escape" delimiter. - * @param options.evaluate The "evaluate" delimiter. - * @param options.import An object to import into the template as local variables. - * @param options.interpolate The "interpolate" delimiter. - * @param sourceURL The sourceURL of the template's compiled source. - * @param variable The data object variable name. - * @return Returns the compiled Lo-Dash HTML template or a TemplateExecutor if no data is passed. - **/ - template( - text: string): TemplateExecutor; + * @see _.find + */ + find( + predicate?: ListIterator, + fromIndex?: number + ): T; /** - * @see _.template - **/ - template( - text: string, - data: any, - options?: TemplateSettings, - sourceURL?: string, - variable?: string): any /* string or TemplateExecutor*/; + * @see _.find + */ + find( + predicate?: string, + fromIndex?: number + ): T; + + /** + * @see _.find + */ + find( + predicate?: TObject, + fromIndex?: number + ): T; } - interface TemplateExecutor { - (...data: any[]): string; - source: string; + interface LoDashImplicitObjectWrapper { + /** + * @see _.find + */ + find( + predicate?: ListIterator|DictionaryIterator, + fromIndex?: number + ): TResult; + + /** + * @see _.find + */ + find( + predicate?: string, + fromIndex?: number + ): TResult; + + /** + * @see _.find + */ + find( + predicate?: TObject, + fromIndex?: number + ): TResult; } - //_.times + //_.findLast interface LoDashStatic { /** - * Executes the callback n times, returning an array of the results of each callback execution. - * The callback is bound to thisArg and invoked with one argument; (index). - * @param n The number of times to execute the callback. + * This method is like _.find except that it iterates over elements of a collection from + * right to left. + * @param collection Searches for a value in this list. * @param callback The function called per iteration. * @param thisArg The this binding of callback. + * @return The found element, else undefined. **/ - times( - n: number, - callback: (num: number) => TResult, - context?: any): TResult[]; - } + findLast( + collection: Array, + callback: ListIterator): T; - //_.unescape - interface LoDashStatic { /** - * The inverse of _.escape this method converts the HTML entities &, <, >, ", and - * ' in string to their corresponding characters. - * @param string The string to unescape. - * @return The unescaped string. + * @see _.find **/ - unescape( - string: string): string; - } + findLast( + collection: List, + callback: ListIterator): T; - //_.uniqueId - interface LoDashStatic { /** - * Generates a unique ID. If prefix is provided the ID will be appended to it. - * @param prefix The value to prefix the ID with. - * @return Returns the unique ID. + * @see _.find **/ - uniqueId(prefix?: string): string; - } + findLast( + collection: Dictionary, + callback: DictionaryIterator): T; - //_.noop - interface LoDashStatic { /** - * A no-operation function. - **/ - noop(): void; + * @see _.find + * @param _.pluck style callback + **/ + findLast( + collection: Array, + whereValue: W): T; + + /** + * @see _.find + * @param _.pluck style callback + **/ + findLast( + collection: List, + whereValue: W): T; + + /** + * @see _.find + * @param _.pluck style callback + **/ + findLast( + collection: Dictionary, + whereValue: W): T; + + /** + * @see _.find + * @param _.where style callback + **/ + findLast( + collection: Array, + pluckValue: string): T; + + /** + * @see _.find + * @param _.where style callback + **/ + findLast( + collection: List, + pluckValue: string): T; + + /** + * @see _.find + * @param _.where style callback + **/ + findLast( + collection: Dictionary, + pluckValue: string): T; } - //_.constant - interface LoDashStatic { + interface LoDashImplicitArrayWrapper { /** - * Creates a function that returns value.. - **/ - constant(value: T): () => T; + * @see _.findLast + */ + findLast( + callback: ListIterator): T; + /** + * @see _.findLast + * @param _.where style callback + */ + findLast( + whereValue: W): T; + + /** + * @see _.findLast + * @param _.where style callback + */ + findLast( + pluckValue: string): T; } - //_.create + //_.flatMap interface LoDashStatic { /** - * Creates an object that inherits from the given prototype object. If a properties object is provided its own enumerable properties are assigned to the created object. - * @param prototype The object to inherit from. - * @param properties The properties to assign to the object. + * Creates an array of flattened values by running each element in collection through iteratee + * and concating its result to the other mapped values. The iteratee is invoked with three arguments: + * (value, index|key, collection). + * + * @param collection The collection to iterate over. + * @param iteratee The function invoked per iteration. + * @return Returns the new flattened array. */ - create(prototype: Object, properties?: Object): Object; - } + flatMap( + collection: List, + iteratee?: ListIterator + ): TResult[]; - interface ListIterator { - (value: T, index: number, collection: T[]): TResult; - } + /** + * @see _.flatMap + */ + flatMap( + collection: List, + iteratee?: ListIterator + ): TResult[]; - interface DictionaryIterator { - (value: T, key: string, collection: Dictionary): TResult; - } + /** + * @see _.flatMap + */ + flatMap( + collection: Dictionary, + iteratee?: DictionaryIterator + ): TResult[]; - interface ObjectIterator { - (element: T, key: string, collection: any): TResult; - } + /** + * @see _.flatMap + */ + flatMap( + collection: Dictionary, + iteratee?: DictionaryIterator + ): TResult[]; - interface MemoVoidIterator { - (prev: TResult, curr: T, indexOrKey: any, list?: T[]): void; - } - interface MemoIterator { - (prev: TResult, curr: T, indexOrKey: any, list?: T[]): TResult; - } - /* - interface MemoListIterator { - (prev: TResult, curr: T, index: number, list?: T[]): TResult; - } - interface MemoObjectIterator { - (prev: TResult, curr: T, index: string, object?: Dictionary): TResult; + /** + * @see _.flatMap + */ + flatMap( + collection: NumericDictionary, + iteratee?: NumericDictionaryIterator + ): TResult[]; + + /** + * @see _.flatMap + */ + flatMap( + collection: NumericDictionary, + iteratee?: NumericDictionaryIterator + ): TResult[]; + + /** + * @see _.flatMap + */ + flatMap( + collection: TObject, + iteratee?: ObjectIterator + ): TResult[]; + + /** + * @see _.flatMap + */ + flatMap( + collection: Object, + iteratee?: ObjectIterator + ): TResult[]; + + /** + * @see _.flatMap + */ + flatMap( + collection: TObject, + iteratee: TWhere + ): boolean[]; + + /** + * @see _.flatMap + */ + flatMap( + collection: TObject, + iteratee: Object|string + ): TResult[]; + + /** + * @see _.flatMap + */ + flatMap( + collection: TObject, + iteratee: [string, any] + ): boolean[]; + + /** + * @see _.flatMap + */ + flatMap( + collection: string + ): string[]; + + /** + * @see _.flatMap + */ + flatMap( + collection: Object, + iteratee?: Object|string + ): TResult[]; } - */ - //interface Collection {} + interface LoDashImplicitWrapper { + /** + * @see _.flatMap + */ + flatMap( + iteratee: ListIterator + ): LoDashImplicitArrayWrapper; - // Common interface between Arrays and jQuery objects - interface List { - [index: number]: T; - length: number; + /** + * @see _.flatMap + */ + flatMap(): LoDashImplicitArrayWrapper; } - interface Dictionary { - [index: string]: T; + interface LoDashImplicitArrayWrapper { + /** + * @see _.flatMap + */ + flatMap( + iteratee: ListIterator|string + ): LoDashImplicitArrayWrapper; + + /** + * @see _.flatMap + */ + flatMap( + iteratee: TWhere + ): LoDashImplicitArrayWrapper; + + /** + * @see _.flatMap + */ + flatMap( + iteratee: [string, any] + ): LoDashImplicitArrayWrapper; + + /** + * @see _.flatMap + */ + flatMap(): LoDashImplicitArrayWrapper; } -} -declare module "lodash" { - export = _; -} + interface LoDashImplicitObjectWrapper { + /** + * @see _.flatMap + */ + flatMap( + iteratee: ListIterator|DictionaryIterator|NumericDictionaryIterator + ): LoDashImplicitArrayWrapper; + + /** + * @see _.flatMap + */ + flatMap( + iteratee: ObjectIterator|string + ): LoDashImplicitArrayWrapper; + + /** + * @see _.flatMap + */ + flatMap( + iteratee: TWhere + ): LoDashImplicitArrayWrapper; + + /** + * @see _.flatMap + */ + flatMap( + iteratee: [string, any] + ): LoDashImplicitArrayWrapper; + + /** + * @see _.flatMap + */ + flatMap(): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.flatMap + */ + flatMap( + iteratee: ListIterator + ): LoDashExplicitArrayWrapper; + + /** + * @see _.flatMap + */ + flatMap(): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.flatMap + */ + flatMap( + iteratee: ListIterator|string + ): LoDashExplicitArrayWrapper; + + /** + * @see _.flatMap + */ + flatMap( + iteratee: TWhere + ): LoDashExplicitArrayWrapper; + + /** + * @see _.flatMap + */ + flatMap( + iteratee: [string, any] + ): LoDashExplicitArrayWrapper; + + /** + * @see _.flatMap + */ + flatMap(): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.flatMap + */ + flatMap( + iteratee: ListIterator|DictionaryIterator|NumericDictionaryIterator + ): LoDashExplicitArrayWrapper; + + /** + * @see _.flatMap + */ + flatMap( + iteratee: ObjectIterator|string + ): LoDashExplicitArrayWrapper; + + /** + * @see _.flatMap + */ + flatMap( + iteratee: TWhere + ): LoDashExplicitArrayWrapper; + + /** + * @see _.flatMap + */ + flatMap( + iteratee: [string, any] + ): LoDashExplicitArrayWrapper; + + /** + * @see _.flatMap + */ + flatMap(): LoDashExplicitArrayWrapper; + } + + //_.forEach + interface LoDashStatic { + /** + * Iterates over elements of collection invoking iteratee for each element. The iteratee is bound to thisArg + * and invoked with three arguments: + * (value, index|key, collection). Iteratee functions may exit iteration early by explicitly returning false. + * + * Note: As with other "Collections" methods, objects with a "length" property are iterated like arrays. To + * avoid this behavior _.forIn or _.forOwn may be used for object iteration. + * + * @alias _.each + * + * @param collection The collection to iterate over. + * @param iteratee The function invoked per iteration. + * @param thisArg The this binding of iteratee. + */ + forEach( + collection: T[], + iteratee?: ListIterator + ): T[]; + + /** + * @see _.forEach + */ + forEach( + collection: List, + iteratee?: ListIterator + ): List; + + /** + * @see _.forEach + */ + forEach( + collection: Dictionary, + iteratee?: DictionaryIterator + ): Dictionary; + + /** + * @see _.forEach + */ + forEach( + collection: T, + iteratee?: ObjectIterator + ): T; + + /** + * @see _.forEach + */ + forEach( + collection: T, + iteratee?: ObjectIterator + ): T; + } + + interface LoDashImplicitWrapper { + /** + * @see _.forEach + */ + forEach( + iteratee: ListIterator + ): LoDashImplicitWrapper; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.forEach + */ + forEach( + iteratee: ListIterator + ): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.forEach + */ + forEach( + iteratee?: ListIterator|DictionaryIterator + ): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.forEach + */ + forEach( + iteratee: ListIterator + ): LoDashExplicitWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.forEach + */ + forEach( + iteratee: ListIterator + ): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.forEach + */ + forEach( + iteratee?: ListIterator|DictionaryIterator + ): LoDashExplicitObjectWrapper; + } + + //_.forEachRight + interface LoDashStatic { + /** + * This method is like _.forEach except that it iterates over elements of collection from right to left. + * + * @alias _.eachRight + * + * @param collection The collection to iterate over. + * @param iteratee The function called per iteration. + * @param thisArg The this binding of callback. + */ + forEachRight( + collection: T[], + iteratee?: ListIterator + ): T[]; + + /** + * @see _.forEachRight + */ + forEachRight( + collection: List, + iteratee?: ListIterator + ): List; + + /** + * @see _.forEachRight + */ + forEachRight( + collection: Dictionary, + iteratee?: DictionaryIterator + ): Dictionary; + + /** + * @see _.forEachRight + */ + forEachRight( + collection: T, + iteratee?: ObjectIterator + ): T; + + /** + * @see _.forEachRight + */ + forEachRight( + collection: T, + iteratee?: ObjectIterator + ): T; + } + + interface LoDashImplicitWrapper { + /** + * @see _.forEachRight + */ + forEachRight( + iteratee: ListIterator + ): LoDashImplicitWrapper; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.forEachRight + */ + forEachRight( + iteratee: ListIterator + ): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.forEachRight + */ + forEachRight( + iteratee?: ListIterator|DictionaryIterator + ): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.forEachRight + */ + forEachRight( + iteratee: ListIterator + ): LoDashExplicitWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.forEachRight + */ + forEachRight( + iteratee: ListIterator + ): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.forEachRight + */ + forEachRight( + iteratee?: ListIterator|DictionaryIterator + ): LoDashExplicitObjectWrapper; + } + + //_.groupBy + interface LoDashStatic { + /** + * Creates an object composed of keys generated from the results of running each element of collection through + * iteratee. The corresponding value of each key is an array of the elements responsible for generating the + * key. The iteratee is bound to thisArg and invoked with three arguments: + * (value, index|key, collection). + * + * If a property name is provided for iteratee the created _.property style callback returns the property + * value of the given element. + * + * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for + * elements that have a matching property value, else false. + * + * If an object is provided for iteratee the created _.matches style callback returns true for elements that + * have the properties of the given object, else false. + * + * @param collection The collection to iterate over. + * @param iteratee The function invoked per iteration. + * @param thisArg The this binding of iteratee. + * @return Returns the composed aggregate object. + */ + groupBy( + collection: List, + iteratee?: ListIterator + ): Dictionary; + + /** + * @see _.groupBy + */ + groupBy( + collection: List, + iteratee?: ListIterator + ): Dictionary; + + /** + * @see _.groupBy + */ + groupBy( + collection: Dictionary, + iteratee?: DictionaryIterator + ): Dictionary; + + /** + * @see _.groupBy + */ + groupBy( + collection: Dictionary, + iteratee?: DictionaryIterator + ): Dictionary; + + /** + * @see _.groupBy + */ + groupBy( + collection: List|Dictionary, + iteratee?: string + ): Dictionary; + + /** + * @see _.groupBy + */ + groupBy( + collection: List|Dictionary, + iteratee?: string + ): Dictionary; + + /** + * @see _.groupBy + */ + groupBy( + collection: List|Dictionary, + iteratee?: TWhere + ): Dictionary; + + /** + * @see _.groupBy + */ + groupBy( + collection: List|Dictionary, + iteratee?: Object + ): Dictionary; + } + + interface LoDashImplicitWrapper { + /** + * @see _.groupBy + */ + groupBy( + iteratee?: ListIterator + ): LoDashImplicitObjectWrapper>; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.groupBy + */ + groupBy( + iteratee?: ListIterator + ): LoDashImplicitObjectWrapper>; + + /** + * @see _.groupBy + */ + groupBy( + iteratee?: string + ): LoDashImplicitObjectWrapper>; + + /** + * @see _.groupBy + */ + groupBy( + iteratee?: TWhere + ): LoDashImplicitObjectWrapper>; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.groupBy + */ + groupBy( + iteratee?: ListIterator|DictionaryIterator + ): LoDashImplicitObjectWrapper>; + + /** + * @see _.groupBy + */ + groupBy( + iteratee?: ListIterator|DictionaryIterator + ): LoDashImplicitObjectWrapper>; + + /** + * @see _.groupBy + */ + groupBy( + iteratee?: string + ): LoDashImplicitObjectWrapper>; + + /** + * @see _.groupBy + */ + groupBy( + iteratee?: string + ): LoDashImplicitObjectWrapper>; + + /** + * @see _.groupBy + */ + groupBy( + iteratee?: TWhere + ): LoDashImplicitObjectWrapper>; + + /** + * @see _.groupBy + */ + groupBy( + iteratee?: Object + ): LoDashImplicitObjectWrapper>; + } + + interface LoDashExplicitWrapper { + /** + * @see _.groupBy + */ + groupBy( + iteratee?: ListIterator + ): LoDashExplicitObjectWrapper>; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.groupBy + */ + groupBy( + iteratee?: ListIterator + ): LoDashExplicitObjectWrapper>; + + /** + * @see _.groupBy + */ + groupBy( + iteratee?: string + ): LoDashExplicitObjectWrapper>; + + /** + * @see _.groupBy + */ + groupBy( + iteratee?: TWhere + ): LoDashExplicitObjectWrapper>; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.groupBy + */ + groupBy( + iteratee?: ListIterator|DictionaryIterator + ): LoDashExplicitObjectWrapper>; + + /** + * @see _.groupBy + */ + groupBy( + iteratee?: ListIterator|DictionaryIterator + ): LoDashExplicitObjectWrapper>; + + /** + * @see _.groupBy + */ + groupBy( + iteratee?: string + ): LoDashExplicitObjectWrapper>; + + /** + * @see _.groupBy + */ + groupBy( + iteratee?: string + ): LoDashExplicitObjectWrapper>; + + /** + * @see _.groupBy + */ + groupBy( + iteratee?: TWhere + ): LoDashExplicitObjectWrapper>; + + /** + * @see _.groupBy + */ + groupBy( + iteratee?: Object + ): LoDashExplicitObjectWrapper>; + } + + //_.includes + interface LoDashStatic { + /** + * Checks if target is in collection using SameValueZero for equality comparisons. If fromIndex is negative, + * it’s used as the offset from the end of collection. + * + * @param collection The collection to search. + * @param target The value to search for. + * @param fromIndex The index to search from. + * @return True if the target element is found, else false. + */ + includes( + collection: List|Dictionary, + target: T, + fromIndex?: number + ): boolean; + + /** + * @see _.includes + */ + includes( + collection: string, + target: string, + fromIndex?: number + ): boolean; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.includes + */ + includes( + target: T, + fromIndex?: number + ): boolean; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.includes + */ + includes( + target: TValue, + fromIndex?: number + ): boolean; + } + + interface LoDashImplicitWrapper { + /** + * @see _.includes + */ + includes( + target: string, + fromIndex?: number + ): boolean; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.includes + */ + includes( + target: T, + fromIndex?: number + ): LoDashExplicitWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.includes + */ + includes( + target: TValue, + fromIndex?: number + ): LoDashExplicitWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.includes + */ + includes( + target: string, + fromIndex?: number + ): LoDashExplicitWrapper; + } + + //_.keyBy + interface LoDashStatic { + /** + * Creates an object composed of keys generated from the results of running each element of collection through + * iteratee. The corresponding value of each key is the last element responsible for generating the key. The + * iteratee function is bound to thisArg and invoked with three arguments: + * (value, index|key, collection). + * + * If a property name is provided for iteratee the created _.property style callback returns the property + * value of the given element. + * + * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for + * elements that have a matching property value, else false. + * + * If an object is provided for iteratee the created _.matches style callback returns true for elements that + * have the properties of the given object, else false. + * + * @param collection The collection to iterate over. + * @param iteratee The function invoked per iteration. + * @param thisArg The this binding of iteratee. + * @return Returns the composed aggregate object. + */ + keyBy( + collection: List, + iteratee?: ListIterator + ): Dictionary; + + /** + * @see _.keyBy + */ + keyBy( + collection: NumericDictionary, + iteratee?: NumericDictionaryIterator + ): Dictionary; + + /** + * @see _.keyBy + */ + keyBy( + collection: Dictionary, + iteratee?: DictionaryIterator + ): Dictionary; + + /** + * @see _.keyBy + */ + keyBy( + collection: List|NumericDictionary|Dictionary, + iteratee?: string + ): Dictionary; + + /** + * @see _.keyBy + */ + keyBy( + collection: List|NumericDictionary|Dictionary, + iteratee?: W + ): Dictionary; + + /** + * @see _.keyBy + */ + keyBy( + collection: List|NumericDictionary|Dictionary, + iteratee?: Object + ): Dictionary; + } + + interface LoDashImplicitWrapper { + /** + * @see _.keyBy + */ + keyBy( + iteratee?: ListIterator + ): LoDashImplicitObjectWrapper>; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.keyBy + */ + keyBy( + iteratee?: ListIterator + ): LoDashImplicitObjectWrapper>; + + /** + * @see _.keyBy + */ + keyBy( + iteratee?: string + ): LoDashImplicitObjectWrapper>; + + /** + * @see _.keyBy + */ + keyBy( + iteratee?: W + ): LoDashImplicitObjectWrapper>; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.keyBy + */ + keyBy( + iteratee?: ListIterator|NumericDictionaryIterator|DictionaryIterator + ): LoDashImplicitObjectWrapper>; + + /** + * @see _.keyBy + */ + keyBy( + iteratee?: string + ): LoDashImplicitObjectWrapper>; + + /** + * @see _.keyBy + */ + keyBy( + iteratee?: W + ): LoDashImplicitObjectWrapper>; + + /** + * @see _.keyBy + */ + keyBy( + iteratee?: Object + ): LoDashImplicitObjectWrapper>; + } + + interface LoDashExplicitWrapper { + /** + * @see _.keyBy + */ + keyBy( + iteratee?: ListIterator + ): LoDashExplicitObjectWrapper>; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.keyBy + */ + keyBy( + iteratee?: ListIterator + ): LoDashExplicitObjectWrapper>; + + /** + * @see _.keyBy + */ + keyBy( + iteratee?: string + ): LoDashExplicitObjectWrapper>; + + /** + * @see _.keyBy + */ + keyBy( + iteratee?: W + ): LoDashExplicitObjectWrapper>; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.keyBy + */ + keyBy( + iteratee?: ListIterator|NumericDictionaryIterator|DictionaryIterator + ): LoDashExplicitObjectWrapper>; + + /** + * @see _.keyBy + */ + keyBy( + iteratee?: string + ): LoDashExplicitObjectWrapper>; + + /** + * @see _.keyBy + */ + keyBy( + iteratee?: W + ): LoDashExplicitObjectWrapper>; + + /** + * @see _.keyBy + */ + keyBy( + iteratee?: Object + ): LoDashExplicitObjectWrapper>; + } + + //_.invoke + interface LoDashStatic { + /** + * Invokes the method at path of object. + * @param object The object to query. + * @param path The path of the method to invoke. + * @param args The arguments to invoke the method with. + **/ + invoke( + object: TObject, + path: StringRepresentable|StringRepresentable[], + ...args: any[]): TResult; + + /** + * @see _.invoke + **/ + invoke( + object: Dictionary|TValue[], + path: StringRepresentable|StringRepresentable[], + ...args: any[]): TResult; + + /** + * @see _.invoke + **/ + invoke( + object: any, + path: StringRepresentable|StringRepresentable[], + ...args: any[]): TResult; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.invoke + **/ + invoke( + path: StringRepresentable|StringRepresentable[], + ...args: any[]): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.invoke + **/ + invoke( + path: StringRepresentable|StringRepresentable[], + ...args: any[]): TResult; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.invoke + **/ + invoke( + path: StringRepresentable|StringRepresentable[], + ...args: any[]): TResult; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.invoke + **/ + invoke( + path: StringRepresentable|StringRepresentable[], + ...args: any[]): TResult; + } + + //_.invokeMap + interface LoDashStatic { + /** + * Invokes the method named by methodName on each element in the collection returning + * an array of the results of each invoked method. Additional arguments will be provided + * to each invoked method. If methodName is a function it will be invoked for, and this + * bound to, each element in the collection. + * @param collection The collection to iterate over. + * @param methodName The name of the method to invoke. + * @param args Arguments to invoke the method with. + **/ + invokeMap( + collection: TValue[], + methodName: string, + ...args: any[]): TResult[]; + + /** + * @see _.invokeMap + **/ + invokeMap( + collection: Dictionary, + methodName: string, + ...args: any[]): TResult[]; + + /** + * @see _.invokeMap + **/ + invokeMap( + collection: {}[], + methodName: string, + ...args: any[]): TResult[]; + + /** + * @see _.invokeMap + **/ + invokeMap( + collection: Dictionary<{}>, + methodName: string, + ...args: any[]): TResult[]; + + /** + * @see _.invokeMap + **/ + invokeMap( + collection: TValue[], + method: (...args: any[]) => TResult, + ...args: any[]): TResult[]; + + /** + * @see _.invokeMap + **/ + invokeMap( + collection: Dictionary, + method: (...args: any[]) => TResult, + ...args: any[]): TResult[]; + + /** + * @see _.invokeMap + **/ + invokeMap( + collection: {}[], + method: (...args: any[]) => TResult, + ...args: any[]): TResult[]; + + /** + * @see _.invokeMap + **/ + invokeMap( + collection: Dictionary<{}>, + method: (...args: any[]) => TResult, + ...args: any[]): TResult[]; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.invokeMap + **/ + invokeMap( + methodName: string, + ...args: any[]): LoDashImplicitArrayWrapper; + + /** + * @see _.invokeMap + **/ + invokeMap( + method: (...args: any[]) => TResult, + ...args: any[]): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.invokeMap + **/ + invokeMap( + methodName: string, + ...args: any[]): LoDashImplicitArrayWrapper; + + /** + * @see _.invokeMap + **/ + invokeMap( + method: (...args: any[]) => TResult, + ...args: any[]): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.invokeMap + **/ + invokeMap( + methodName: string, + ...args: any[]): LoDashExplicitArrayWrapper; + + /** + * @see _.invokeMap + **/ + invokeMap( + method: (...args: any[]) => TResult, + ...args: any[]): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.invokeMap + **/ + invokeMap( + methodName: string, + ...args: any[]): LoDashExplicitArrayWrapper; + + /** + * @see _.invokeMap + **/ + invokeMap( + method: (...args: any[]) => TResult, + ...args: any[]): LoDashExplicitArrayWrapper; + } + + //_.map + interface LoDashStatic { + /** + * Creates an array of values by running each element in collection through iteratee. The iteratee is bound to + * thisArg and invoked with three arguments: (value, index|key, collection). + * + * If a property name is provided for iteratee the created _.property style callback returns the property value + * of the given element. + * + * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for + * elements that have a matching property value, else false. + * + * If an object is provided for iteratee the created _.matches style callback returns true for elements that + * have the properties of the given object, else false. + * + * Many lodash methods are guarded to work as iteratees for methods like _.every, _.filter, _.map, _.mapValues, + * _.reject, and _.some. + * + * The guarded methods are: + * ary, callback, chunk, clone, create, curry, curryRight, drop, dropRight, every, fill, flatten, invert, max, + * min, parseInt, slice, sortBy, take, takeRight, template, trim, trimLeft, trimRight, trunc, random, range, + * sample, some, sum, uniq, and words + * + * @param collection The collection to iterate over. + * @param iteratee The function invoked per iteration. + * @param thisArg The this binding of iteratee. + * @return Returns the new mapped array. + */ + map( + collection: List, + iteratee?: ListIterator + ): TResult[]; + + /** + * @see _.map + */ + map( + collection: Dictionary, + iteratee?: DictionaryIterator + ): TResult[]; + + map( + collection: NumericDictionary, + iteratee?: NumericDictionaryIterator + ): TResult[]; + + /** + * @see _.map + */ + map( + collection: List|Dictionary|NumericDictionary, + iteratee?: string + ): TResult[]; + + /** + * @see _.map + */ + map( + collection: List|Dictionary|NumericDictionary, + iteratee?: TObject + ): boolean[]; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.map + */ + map( + iteratee?: ListIterator + ): LoDashImplicitArrayWrapper; + + /** + * @see _.map + */ + map( + iteratee?: string + ): LoDashImplicitArrayWrapper; + + /** + * @see _.map + */ + map( + iteratee?: TObject + ): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.map + */ + map( + iteratee?: ListIterator|DictionaryIterator + ): LoDashImplicitArrayWrapper; + + /** + * @see _.map + */ + map( + iteratee?: string + ): LoDashImplicitArrayWrapper; + + /** + * @see _.map + */ + map( + iteratee?: TObject + ): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.map + */ + map( + iteratee?: ListIterator + ): LoDashExplicitArrayWrapper; + + /** + * @see _.map + */ + map( + iteratee?: string + ): LoDashExplicitArrayWrapper; + + /** + * @see _.map + */ + map( + iteratee?: TObject + ): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.map + */ + map( + iteratee?: ListIterator|DictionaryIterator + ): LoDashExplicitArrayWrapper; + + /** + * @see _.map + */ + map( + iteratee?: string + ): LoDashExplicitArrayWrapper; + + /** + * @see _.map + */ + map( + iteratee?: TObject + ): LoDashExplicitArrayWrapper; + } + + //_.partition + interface LoDashStatic { + /** + * Creates an array of elements split into two groups, the first of which contains elements predicate returns truthy for, + * while the second of which contains elements predicate returns falsey for. + * The predicate is bound to thisArg and invoked with three arguments: (value, index|key, collection). + * + * If a property name is provided for predicate the created _.property style callback + * returns the property value of the given element. + * + * If a value is also provided for thisArg the created _.matchesProperty style callback + * returns true for elements that have a matching property value, else false. + * + * If an object is provided for predicate the created _.matches style callback returns + * true for elements that have the properties of the given object, else false. + * + * @param collection The collection to iterate over. + * @param callback The function called per iteration. + * @param thisArg The this binding of predicate. + * @return Returns the array of grouped elements. + **/ + partition( + collection: List, + callback: ListIterator): T[][]; + + /** + * @see _.partition + **/ + partition( + collection: Dictionary, + callback: DictionaryIterator): T[][]; + + /** + * @see _.partition + **/ + partition( + collection: List, + whereValue: W): T[][]; + + /** + * @see _.partition + **/ + partition( + collection: Dictionary, + whereValue: W): T[][]; + + /** + * @see _.partition + **/ + partition( + collection: List, + path: string, + srcValue: any): T[][]; + + /** + * @see _.partition + **/ + partition( + collection: Dictionary, + path: string, + srcValue: any): T[][]; + + /** + * @see _.partition + **/ + partition( + collection: List, + pluckValue: string): T[][]; + + /** + * @see _.partition + **/ + partition( + collection: Dictionary, + pluckValue: string): T[][]; + } + + interface LoDashImplicitStringWrapper { + /** + * @see _.partition + */ + partition( + callback: ListIterator): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.partition + */ + partition( + callback: ListIterator): LoDashImplicitArrayWrapper; + /** + * @see _.partition + */ + partition( + whereValue: W): LoDashImplicitArrayWrapper; + /** + * @see _.partition + */ + partition( + path: string, + srcValue: any): LoDashImplicitArrayWrapper; + /** + * @see _.partition + */ + partition( + pluckValue: string): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.partition + */ + partition( + callback: ListIterator): LoDashImplicitArrayWrapper; + + /** + * @see _.partition + */ + partition( + callback: DictionaryIterator): LoDashImplicitArrayWrapper; + + /** + * @see _.partition + */ + partition( + whereValue: W): LoDashImplicitArrayWrapper; + + /** + * @see _.partition + */ + partition( + path: string, + srcValue: any): LoDashImplicitArrayWrapper; + + /** + * @see _.partition + */ + partition( + pluckValue: string): LoDashImplicitArrayWrapper; + } + + //_.reduce + interface LoDashStatic { + /** + * Reduces a collection to a value which is the accumulated result of running each + * element in the collection through the callback, where each successive callback execution + * consumes the return value of the previous execution. If accumulator is not provided the + * first element of the collection will be used as the initial accumulator value. The callback + * is bound to thisArg and invoked with four arguments; (accumulator, value, index|key, collection). + * @param collection The collection to iterate over. + * @param callback The function called per iteration. + * @param accumulator Initial value of the accumulator. + * @param thisArg The this binding of callback. + * @return Returns the accumulated value. + **/ + reduce( + collection: Array, + callback: MemoIterator, + accumulator: TResult): TResult; + + /** + * @see _.reduce + **/ + reduce( + collection: List, + callback: MemoIterator, + accumulator: TResult): TResult; + + /** + * @see _.reduce + **/ + reduce( + collection: Dictionary, + callback: MemoIterator, + accumulator: TResult): TResult; + + /** + * @see _.reduce + **/ + reduce( + collection: NumericDictionary, + callback: MemoIterator, + accumulator: TResult): TResult; + + /** + * @see _.reduce + **/ + reduce( + collection: Array, + callback: MemoIterator): TResult; + + /** + * @see _.reduce + **/ + reduce( + collection: List, + callback: MemoIterator): TResult; + + /** + * @see _.reduce + **/ + reduce( + collection: Dictionary, + callback: MemoIterator): TResult; + + /** + * @see _.reduce + **/ + reduce( + collection: NumericDictionary, + callback: MemoIterator): TResult; + + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.reduce + **/ + reduce( + callback: MemoIterator, + accumulator: TResult): TResult; + + /** + * @see _.reduce + **/ + reduce( + callback: MemoIterator): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.reduce + **/ + reduce( + callback: MemoIterator, + accumulator: TResult): TResult; + + /** + * @see _.reduce + **/ + reduce( + callback: MemoIterator): TResult; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.reduce + **/ + reduce( + callback: MemoIterator, + accumulator: TResult): LoDashExplicitObjectWrapper; + + /** + * @see _.reduce + **/ + reduce( + callback: MemoIterator): LoDashExplicitObjectWrapper; + } + + interface LoDashExplicitArrayWrapper { + /**LoDashExplicitWrapper + * @see _.reduce + */ + reduce( + callback: MemoIterator, + accumulator: TResult): LoDashExplicitWrapper; + + /** + * @see _.reduce + */ + reduce( + callback: MemoIterator): LoDashExplicitWrapper; + } + + //_.reduceRight + interface LoDashStatic { + /** + * This method is like _.reduce except that it iterates over elements of a collection from + * right to left. + * @param collection The collection to iterate over. + * @param callback The function called per iteration. + * @param accumulator Initial value of the accumulator. + * @param thisArg The this binding of callback. + * @return The accumulated value. + **/ + reduceRight( + collection: Array, + callback: MemoIterator, + accumulator: TResult): TResult; + + /** + * @see _.reduceRight + **/ + reduceRight( + collection: List, + callback: MemoIterator, + accumulator: TResult): TResult; + + /** + * @see _.reduceRight + **/ + reduceRight( + collection: Dictionary, + callback: MemoIterator, + accumulator: TResult): TResult; + + /** + * @see _.reduceRight + **/ + reduceRight( + collection: Array, + callback: MemoIterator): TResult; + + /** + * @see _.reduceRight + **/ + reduceRight( + collection: List, + callback: MemoIterator): TResult; + + /** + * @see _.reduceRight + **/ + reduceRight( + collection: Dictionary, + callback: MemoIterator): TResult; + } + + //_.reject + interface LoDashStatic { + /** + * The opposite of _.filter; this method returns the elements of collection that predicate does not return + * truthy for. + * + * @param collection The collection to iterate over. + * @param predicate The function invoked per iteration. + * @param thisArg The this binding of predicate. + * @return Returns the new filtered array. + */ + reject( + collection: List, + predicate?: ListIterator + ): T[]; + + /** + * @see _.reject + */ + reject( + collection: Dictionary, + predicate?: DictionaryIterator + ): T[]; + + /** + * @see _.reject + */ + reject( + collection: string, + predicate?: StringIterator + ): string[]; + + /** + * @see _.reject + */ + reject( + collection: List|Dictionary, + predicate: string + ): T[]; + + /** + * @see _.reject + */ + reject( + collection: List|Dictionary, + predicate: W + ): T[]; + } + + interface LoDashImplicitWrapper { + /** + * @see _.reject + */ + reject( + predicate?: StringIterator + ): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.reject + */ + reject( + predicate: ListIterator + ): LoDashImplicitArrayWrapper; + + /** + * @see _.reject + */ + reject( + predicate: string + ): LoDashImplicitArrayWrapper; + + /** + * @see _.reject + */ + reject(predicate: W): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.reject + */ + reject( + predicate: ListIterator|DictionaryIterator + ): LoDashImplicitArrayWrapper; + + /** + * @see _.reject + */ + reject( + predicate: string + ): LoDashImplicitArrayWrapper; + + /** + * @see _.reject + */ + reject(predicate: W): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.reject + */ + reject( + predicate?: StringIterator + ): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.reject + */ + reject( + predicate: ListIterator + ): LoDashExplicitArrayWrapper; + + /** + * @see _.reject + */ + reject( + predicate: string + ): LoDashExplicitArrayWrapper; + + /** + * @see _.reject + */ + reject(predicate: W): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.reject + */ + reject( + predicate: ListIterator|DictionaryIterator + ): LoDashExplicitArrayWrapper; + + /** + * @see _.reject + */ + reject( + predicate: string + ): LoDashExplicitArrayWrapper; + + /** + * @see _.reject + */ + reject(predicate: W): LoDashExplicitArrayWrapper; + } + + //_.sample + interface LoDashStatic { + /** + * Gets a random element from collection. + * + * @param collection The collection to sample. + * @return Returns the random element. + */ + sample( + collection: List|Dictionary|NumericDictionary + ): T; + + /** + * @see _.sample + */ + sample( + collection: O + ): T; + + /** + * @see _.sample + */ + sample( + collection: Object + ): T; + } + + interface LoDashImplicitWrapper { + /** + * @see _.sample + */ + sample(): string; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.sample + */ + sample(): T; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.sample + */ + sample(): T; + } + + interface LoDashExplicitWrapper { + /** + * @see _.sample + */ + sample(): LoDashExplicitWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.sample + */ + sample(): TWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.sample + */ + sample(): TWrapper; + } + + //_.sampleSize + interface LoDashStatic { + /** + * Gets n random elements at unique keys from collection up to the size of collection. + * + * @param collection The collection to sample. + * @param n The number of elements to sample. + * @return Returns the random elements. + */ + sampleSize( + collection: List|Dictionary|NumericDictionary, + n?: number + ): T[]; + + /** + * @see _.sampleSize + */ + sampleSize( + collection: O, + n?: number + ): T[]; + + /** + * @see _.sampleSize + */ + sampleSize( + collection: Object, + n?: number + ): T[]; + } + + interface LoDashImplicitWrapper { + /** + * @see _.sampleSize + */ + sampleSize( + n?: number + ): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.sampleSize + */ + sampleSize( + n?: number + ): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.sampleSize + */ + sampleSize( + n?: number + ): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.sampleSize + */ + sampleSize( + n?: number + ): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.sampleSize + */ + sampleSize( + n?: number + ): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.sampleSize + */ + sampleSize( + n?: number + ): LoDashExplicitArrayWrapper; + } + + //_.shuffle + interface LoDashStatic { + /** + * Creates an array of shuffled values, using a version of the Fisher-Yates shuffle. + * + * @param collection The collection to shuffle. + * @return Returns the new shuffled array. + */ + shuffle(collection: List|Dictionary): T[]; + + /** + * @see _.shuffle + */ + shuffle(collection: string): string[]; + } + + interface LoDashImplicitWrapper { + /** + * @see _.shuffle + */ + shuffle(): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.shuffle + */ + shuffle(): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.shuffle + */ + shuffle(): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.shuffle + */ + shuffle(): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.shuffle + */ + shuffle(): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.shuffle + */ + shuffle(): LoDashExplicitArrayWrapper; + } + + //_.size + interface LoDashStatic { + /** + * Gets the size of collection by returning its length for array-like values or the number of own enumerable + * properties for objects. + * + * @param collection The collection to inspect. + * @return Returns the size of collection. + */ + size(collection: List|Dictionary): number; + + /** + * @see _.size + */ + size(collection: string): number; + } + + interface LoDashImplicitWrapper { + /** + * @see _.size + */ + size(): number; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.size + */ + size(): number; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.size + */ + size(): number; + } + + interface LoDashExplicitWrapper { + /** + * @see _.size + */ + size(): LoDashExplicitWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.size + */ + size(): LoDashExplicitWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.size + */ + size(): LoDashExplicitWrapper; + } + + //_.some + interface LoDashStatic { + /** + * Checks if predicate returns truthy for any element of collection. Iteration is stopped once predicate + * returns truthy. The predicate is invoked with three arguments: (value, index|key, collection). + * + * @param collection The collection to iterate over. + * @param predicate The function invoked per iteration. + * @return Returns true if any element passes the predicate check, else false. + */ + some( + collection: List, + predicate?: ListIterator + ): boolean; + + /** + * @see _.some + */ + some( + collection: Dictionary, + predicate?: DictionaryIterator + ): boolean; + + /** + * @see _.some + */ + some( + collection: NumericDictionary, + predicate?: NumericDictionaryIterator + ): boolean; + + /** + * @see _.some + */ + some( + collection: Object, + predicate?: ObjectIterator + ): boolean; + + /** + * @see _.some + */ + some( + collection: List|Dictionary|NumericDictionary, + predicate?: string|[string, any] + ): boolean; + + + /** + * @see _.some + */ + some( + collection: Object, + predicate?: string|[string, any] + ): boolean; + + /** + * @see _.some + */ + some( + collection: List|Dictionary|NumericDictionary, + predicate?: TObject + ): boolean; + + /** + * @see _.some + */ + some( + collection: List|Dictionary|NumericDictionary, + predicate?: Object + ): boolean; + + /** + * @see _.some + */ + some( + collection: Object, + predicate?: TObject + ): boolean; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.some + */ + some( + predicate?: ListIterator|NumericDictionaryIterator + ): boolean; + + /** + * @see _.some + */ + some( + predicate?: string|[string, any] + ): boolean; + + /** + * @see _.some + */ + some( + predicate?: TObject + ): boolean; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.some + */ + some( + predicate?: ListIterator|DictionaryIterator|NumericDictionaryIterator|ObjectIterator + ): boolean; + + /** + * @see _.some + */ + some( + predicate?: string|[string, any] + ): boolean; + + /** + * @see _.some + */ + some( + predicate?: TObject + ): boolean; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.some + */ + some( + predicate?: ListIterator|NumericDictionaryIterator + ): LoDashExplicitWrapper; + + /** + * @see _.some + */ + some( + predicate?: string|[string, any] + ): LoDashExplicitWrapper; + + /** + * @see _.some + */ + some( + predicate?: TObject + ): LoDashExplicitWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.some + */ + some( + predicate?: ListIterator|DictionaryIterator|NumericDictionaryIterator|ObjectIterator + ): LoDashExplicitWrapper; + + /** + * @see _.some + */ + some( + predicate?: string|[string, any] + ): LoDashExplicitWrapper; + + /** + * @see _.some + */ + some( + predicate?: TObject + ): LoDashExplicitWrapper; + } + + //_.sortBy + interface LoDashStatic { + /** + * Creates an array of elements, sorted in ascending order by the results of + * running each element in a collection through each iteratee. This method + * performs a stable sort, that is, it preserves the original sort order of + * equal elements. The iteratees are invoked with one argument: (value). + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {...(Function|Function[]|Object|Object[]|string|string[])} [iteratees=[_.identity]] + * The iteratees to sort by, specified individually or in arrays. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 42 }, + * { 'user': 'barney', 'age': 34 } + * ]; + * + * _.sortBy(users, function(o) { return o.user; }); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]] + * + * _.sortBy(users, ['user', 'age']); + * // => objects for [['barney', 34], ['barney', 36], ['fred', 42], ['fred', 48]] + * + * _.sortBy(users, 'user', function(o) { + * return Math.floor(o.age / 10); + * }); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]] + */ + sortBy( + collection: List, + iteratee?: ListIterator + ): T[]; + + /** + * @see _.sortBy + */ + sortBy( + collection: Dictionary, + iteratee?: DictionaryIterator + ): T[]; + + /** + * @see _.sortBy + */ + sortBy( + collection: List|Dictionary, + iteratee: string + ): T[]; + + /** + * @see _.sortBy + */ + sortBy( + collection: List|Dictionary, + whereValue: W + ): T[]; + + /** + * @see _.sortBy + */ + sortBy( + collection: List|Dictionary + ): T[]; + + /** + * @see _.sortBy + */ + sortBy( + collection: (Array|List), + iteratees: (ListIterator|string|Object)[]): T[]; + + /** + * @see _.sortBy + */ + sortBy( + collection: (Array|List), + ...iteratees: (ListIterator|Object|string)[]): T[]; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.sortBy + */ + sortBy( + iteratee?: ListIterator + ): LoDashImplicitArrayWrapper; + + /** + * @see _.sortBy + */ + sortBy(iteratee: string): LoDashImplicitArrayWrapper; + + /** + * @see _.sortBy + */ + sortBy(whereValue: W): LoDashImplicitArrayWrapper; + + /** + * @see _.sortBy + */ + sortBy(): LoDashImplicitArrayWrapper; + + /** + * @see _.sortBy + */ + sortBy(...iteratees: (ListIterator|Object|string)[]): LoDashImplicitArrayWrapper; + + /** + * @see _.sortBy + **/ + sortBy(iteratees: (ListIterator|string|Object)[]): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.sortBy + */ + sortBy( + iteratee?: ListIterator|DictionaryIterator + ): LoDashImplicitArrayWrapper; + + /** + * @see _.sortBy + */ + sortBy(iteratee: string): LoDashImplicitArrayWrapper; + + /** + * @see _.sortBy + */ + sortBy(whereValue: W): LoDashImplicitArrayWrapper; + + /** + * @see _.sortBy + */ + sortBy(): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.sortBy + */ + sortBy( + iteratee?: ListIterator + ): LoDashExplicitArrayWrapper; + + /** + * @see _.sortBy + */ + sortBy(iteratee: string): LoDashExplicitArrayWrapper; + + /** + * @see _.sortBy + */ + sortBy(whereValue: W): LoDashExplicitArrayWrapper; + + /** + * @see _.sortBy + */ + sortBy(): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.sortBy + */ + sortBy( + iteratee?: ListIterator|DictionaryIterator + ): LoDashExplicitArrayWrapper; + + /** + * @see _.sortBy + */ + sortBy(iteratee: string): LoDashExplicitArrayWrapper; + + /** + * @see _.sortBy + */ + sortBy(whereValue: W): LoDashExplicitArrayWrapper; + + /** + * @see _.sortBy + */ + sortBy(): LoDashExplicitArrayWrapper; + } + + //_.orderBy + interface LoDashStatic { + /** + * This method is like `_.sortBy` except that it allows specifying the sort + * orders of the iteratees to sort by. If `orders` is unspecified, all values + * are sorted in ascending order. Otherwise, specify an order of "desc" for + * descending or "asc" for ascending sort order of corresponding values. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function[]|Object[]|string[]} [iteratees=[_.identity]] The iteratees to sort by. + * @param {string[]} [orders] The sort orders of `iteratees`. + * @param- {Object} [guard] Enables use as an iteratee for functions like `_.reduce`. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 34 }, + * { 'user': 'fred', 'age': 42 }, + * { 'user': 'barney', 'age': 36 } + * ]; + * + * // sort by `user` in ascending order and by `age` in descending order + * _.orderBy(users, ['user', 'age'], ['asc', 'desc']); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]] + */ + orderBy( + collection: List, + iteratees: ListIterator|string|W|(ListIterator|string|W)[], + orders?: boolean|string|(boolean|string)[] + ): T[]; + + /** + * @see _.orderBy + */ + orderBy( + collection: List, + iteratees: ListIterator|string|Object|(ListIterator|string|Object)[], + orders?: boolean|string|(boolean|string)[] + ): T[]; + + /** + * @see _.orderBy + */ + orderBy( + collection: NumericDictionary, + iteratees: NumericDictionaryIterator|string|W|(NumericDictionaryIterator|string|W)[], + orders?: boolean|string|(boolean|string)[] + ): T[]; + + /** + * @see _.orderBy + */ + orderBy( + collection: NumericDictionary, + iteratees: NumericDictionaryIterator|string|Object|(NumericDictionaryIterator|string|Object)[], + orders?: boolean|string|(boolean|string)[] + ): T[]; + + /** + * @see _.orderBy + */ + orderBy( + collection: Dictionary, + iteratees: DictionaryIterator|string|W|(DictionaryIterator|string|W)[], + orders?: boolean|string|(boolean|string)[] + ): T[]; + + /** + * @see _.orderBy + */ + orderBy( + collection: Dictionary, + iteratees: DictionaryIterator|string|Object|(DictionaryIterator|string|Object)[], + orders?: boolean|string|(boolean|string)[] + ): T[]; + } + + interface LoDashImplicitWrapper { + /** + * @see _.orderBy + */ + orderBy( + iteratees: ListIterator|string|(ListIterator|string)[], + orders?: boolean|string|(boolean|string)[] + ): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.orderBy + */ + orderBy( + iteratees: ListIterator|string|W|(ListIterator|string|W)[], + orders?: boolean|string|(boolean|string)[] + ): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.orderBy + */ + orderBy( + iteratees: ListIterator|string|W|(ListIterator|string|W)[], + orders?: boolean|string|(boolean|string)[] + ): LoDashImplicitArrayWrapper; + + /** + * @see _.orderBy + */ + orderBy( + iteratees: ListIterator|string|Object|(ListIterator|string|Object)[], + orders?: boolean|string|(boolean|string)[] + ): LoDashImplicitArrayWrapper; + + /** + * @see _.orderBy + */ + orderBy( + iteratees: NumericDictionaryIterator|string|W|(NumericDictionaryIterator|string|W)[], + orders?: boolean|string|(boolean|string)[] + ): LoDashImplicitArrayWrapper; + + /** + * @see _.orderBy + */ + orderBy( + iteratees: NumericDictionaryIterator|string|Object|(NumericDictionaryIterator|string|Object)[], + orders?: boolean|string|(boolean|string)[] + ): LoDashImplicitArrayWrapper; + + /** + * @see _.orderBy + */ + orderBy( + iteratees: DictionaryIterator|string|W|(DictionaryIterator|string|W)[], + orders?: boolean|string|(boolean|string)[] + ): LoDashImplicitArrayWrapper; + + /** + * @see _.orderBy + */ + orderBy( + iteratees: DictionaryIterator|string|Object|(DictionaryIterator|string|Object)[], + orders?: boolean|string|(boolean|string)[] + ): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.orderBy + */ + orderBy( + iteratees: ListIterator|string|(ListIterator|string)[], + orders?: boolean|string|(boolean|string)[] + ): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.orderBy + */ + orderBy( + iteratees: ListIterator|string|W|(ListIterator|string|W)[], + orders?: boolean|string|(boolean|string)[] + ): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.orderBy + */ + orderBy( + iteratees: ListIterator|string|W|(ListIterator|string|W)[], + orders?: boolean|string|(boolean|string)[] + ): LoDashExplicitArrayWrapper; + + /** + * @see _.orderBy + */ + orderBy( + iteratees: ListIterator|string|Object|(ListIterator|string|Object)[], + orders?: boolean|string|(boolean|string)[] + ): LoDashExplicitArrayWrapper; + + /** + * @see _.orderBy + */ + orderBy( + iteratees: NumericDictionaryIterator|string|W|(NumericDictionaryIterator|string|W)[], + orders?: boolean|string|(boolean|string)[] + ): LoDashExplicitArrayWrapper; + + /** + * @see _.orderBy + */ + orderBy( + iteratees: NumericDictionaryIterator|string|Object|(NumericDictionaryIterator|string|Object)[], + orders?: boolean|string|(boolean|string)[] + ): LoDashExplicitArrayWrapper; + + /** + * @see _.orderBy + */ + orderBy( + iteratees: DictionaryIterator|string|W|(DictionaryIterator|string|W)[], + orders?: boolean|string|(boolean|string)[] + ): LoDashExplicitArrayWrapper; + + /** + * @see _.orderBy + */ + orderBy( + iteratees: DictionaryIterator|string|Object|(DictionaryIterator|string|Object)[], + orders?: boolean|string|(boolean|string)[] + ): LoDashExplicitArrayWrapper; + } + + /******** + * Date * + ********/ + + //_.now + interface LoDashStatic { + /** + * Gets the number of milliseconds that have elapsed since the Unix epoch (1 January 1970 00:00:00 UTC). + * + * @return The number of milliseconds. + */ + now(): number; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.now + */ + now(): number; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.now + */ + now(): LoDashExplicitWrapper; + } + + /************* + * Functions * + *************/ + + //_.after + interface LoDashStatic { + /** + * The opposite of _.before; this method creates a function that invokes func once it’s called n or more times. + * + * @param n The number of calls before func is invoked. + * @param func The function to restrict. + * @return Returns the new restricted function. + */ + after( + n: number, + func: TFunc + ): TFunc; + } + + interface LoDashImplicitWrapper { + /** + * @see _.after + **/ + after(func: TFunc): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.after + **/ + after(func: TFunc): LoDashExplicitObjectWrapper; + } + + //_.ary + interface LoDashStatic { + /** + * Creates a function that accepts up to n arguments ignoring any additional arguments. + * + * @param func The function to cap arguments for. + * @param n The arity cap. + * @returns Returns the new function. + */ + ary( + func: Function, + n?: number + ): TResult; + + ary( + func: T, + n?: number + ): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.ary + */ + ary(n?: number): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.ary + */ + ary(n?: number): LoDashExplicitObjectWrapper; + } + + //_.before + interface LoDashStatic { + /** + * Creates a function that invokes func, with the this binding and arguments of the created function, while + * it’s called less than n times. Subsequent calls to the created function return the result of the last func + * invocation. + * + * @param n The number of calls at which func is no longer invoked. + * @param func The function to restrict. + * @return Returns the new restricted function. + */ + before( + n: number, + func: TFunc + ): TFunc; + } + + interface LoDashImplicitWrapper { + /** + * @see _.before + **/ + before(func: TFunc): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.before + **/ + before(func: TFunc): LoDashExplicitObjectWrapper; + } + + //_.bind + interface FunctionBind { + placeholder: any; + + ( + func: T, + thisArg: any, + ...partials: any[] + ): TResult; + + ( + func: Function, + thisArg: any, + ...partials: any[] + ): TResult; + } + + interface LoDashStatic { + /** + * Creates a function that invokes func with the this binding of thisArg and prepends any additional _.bind + * arguments to those provided to the bound function. + * + * The _.bind.placeholder value, which defaults to _ in monolithic builds, may be used as a placeholder for + * partially applied arguments. + * + * Note: Unlike native Function#bind this method does not set the "length" property of bound functions. + * + * @param func The function to bind. + * @param thisArg The this binding of func. + * @param partials The arguments to be partially applied. + * @return Returns the new bound function. + */ + bind: FunctionBind; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.bind + */ + bind( + thisArg: any, + ...partials: any[] + ): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.bind + */ + bind( + thisArg: any, + ...partials: any[] + ): LoDashExplicitObjectWrapper; + } + + //_.bindAll + interface LoDashStatic { + /** + * Binds methods of an object to the object itself, overwriting the existing method. Method names may be + * specified as individual arguments or as arrays of method names. If no method names are provided all + * enumerable function properties, own and inherited, of object are bound. + * + * Note: This method does not set the "length" property of bound functions. + * + * @param object The object to bind and assign the bound methods to. + * @param methodNames The object method names to bind, specified as individual method names or arrays of + * method names. + * @return Returns object. + */ + bindAll( + object: T, + ...methodNames: (string|string[])[] + ): T; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.bindAll + */ + bindAll(...methodNames: (string|string[])[]): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.bindAll + */ + bindAll(...methodNames: (string|string[])[]): LoDashExplicitObjectWrapper; + } + + //_.bindKey + interface FunctionBindKey { + placeholder: any; + + ( + object: T, + key: any, + ...partials: any[] + ): TResult; + + ( + object: Object, + key: any, + ...partials: any[] + ): TResult; + } + + interface LoDashStatic { + /** + * Creates a function that invokes the method at object[key] and prepends any additional _.bindKey arguments + * to those provided to the bound function. + * + * This method differs from _.bind by allowing bound functions to reference methods that may be redefined + * or don’t yet exist. See Peter Michaux’s article for more details. + * + * The _.bindKey.placeholder value, which defaults to _ in monolithic builds, may be used as a placeholder + * for partially applied arguments. + * + * @param object The object the method belongs to. + * @param key The key of the method. + * @param partials The arguments to be partially applied. + * @return Returns the new bound function. + */ + bindKey: FunctionBindKey; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.bindKey + */ + bindKey( + key: any, + ...partials: any[] + ): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.bindKey + */ + bindKey( + key: any, + ...partials: any[] + ): LoDashExplicitObjectWrapper; + } + + //_.createCallback + interface LoDashStatic { + /** + * Produces a callback bound to an optional thisArg. If func is a property name the created + * callback will return the property value for a given element. If func is an object the created + * callback will return true for elements that contain the equivalent object properties, + * otherwise it will return false. + * @param func The value to convert to a callback. + * @param thisArg The this binding of the created callback. + * @param argCount The number of arguments the callback accepts. + * @return A callback function. + **/ + createCallback( + func: string, + argCount?: number): () => any; + + /** + * @see _.createCallback + **/ + createCallback( + func: Dictionary, + argCount?: number): () => boolean; + } + + interface LoDashImplicitWrapper { + /** + * @see _.createCallback + **/ + createCallback( + argCount?: number): LoDashImplicitObjectWrapper<() => any>; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.createCallback + **/ + createCallback( + argCount?: number): LoDashImplicitObjectWrapper<() => any>; + } + + //_.curry + interface LoDashStatic { + /** + * Creates a function that accepts one or more arguments of func that when called either invokes func returning + * its result, if all func arguments have been provided, or returns a function that accepts one or more of the + * remaining func arguments, and so on. The arity of func may be specified if func.length is not sufficient. + * @param func The function to curry. + * @return Returns the new curried function. + */ + curry(func: (t1: T1) => R): + CurriedFunction1; + /** + * Creates a function that accepts one or more arguments of func that when called either invokes func returning + * its result, if all func arguments have been provided, or returns a function that accepts one or more of the + * remaining func arguments, and so on. The arity of func may be specified if func.length is not sufficient. + * @param func The function to curry. + * @return Returns the new curried function. + */ + curry(func: (t1: T1, t2: T2) => R): + CurriedFunction2; + /** + * Creates a function that accepts one or more arguments of func that when called either invokes func returning + * its result, if all func arguments have been provided, or returns a function that accepts one or more of the + * remaining func arguments, and so on. The arity of func may be specified if func.length is not sufficient. + * @param func The function to curry. + * @return Returns the new curried function. + */ + curry(func: (t1: T1, t2: T2, t3: T3) => R): + CurriedFunction3; + /** + * Creates a function that accepts one or more arguments of func that when called either invokes func returning + * its result, if all func arguments have been provided, or returns a function that accepts one or more of the + * remaining func arguments, and so on. The arity of func may be specified if func.length is not sufficient. + * @param func The function to curry. + * @return Returns the new curried function. + */ + curry(func: (t1: T1, t2: T2, t3: T3, t4: T4) => R): + CurriedFunction4; + /** + * Creates a function that accepts one or more arguments of func that when called either invokes func returning + * its result, if all func arguments have been provided, or returns a function that accepts one or more of the + * remaining func arguments, and so on. The arity of func may be specified if func.length is not sufficient. + * @param func The function to curry. + * @return Returns the new curried function. + */ + curry(func: (t1: T1, t2: T2, t3: T3, t4: T4, t5: T5) => R): + CurriedFunction5; + /** + * Creates a function that accepts one or more arguments of func that when called either invokes func returning + * its result, if all func arguments have been provided, or returns a function that accepts one or more of the + * remaining func arguments, and so on. The arity of func may be specified if func.length is not sufficient. + * @param func The function to curry. + * @param arity The arity of func. + * @return Returns the new curried function. + */ + curry( + func: Function, + arity?: number): TResult; + } + + interface CurriedFunction1 { + (): CurriedFunction1; + (t1: T1): R; + } + + interface CurriedFunction2 { + (): CurriedFunction2; + (t1: T1): CurriedFunction1; + (t1: T1, t2: T2): R; + } + + interface CurriedFunction3 { + (): CurriedFunction3; + (t1: T1): CurriedFunction2; + (t1: T1, t2: T2): CurriedFunction1; + (t1: T1, t2: T2, t3: T3): R; + } + + interface CurriedFunction4 { + (): CurriedFunction4; + (t1: T1): CurriedFunction3; + (t1: T1, t2: T2): CurriedFunction2; + (t1: T1, t2: T2, t3: T3): CurriedFunction1; + (t1: T1, t2: T2, t3: T3, t4: T4): R; + } + + interface CurriedFunction5 { + (): CurriedFunction5; + (t1: T1): CurriedFunction4; + (t1: T1, t2: T2): CurriedFunction3; + (t1: T1, t2: T2, t3: T3): CurriedFunction2; + (t1: T1, t2: T2, t3: T3, t4: T4): CurriedFunction1; + (t1: T1, t2: T2, t3: T3, t4: T4, t5: T5): R; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.curry + **/ + curry(arity?: number): LoDashImplicitObjectWrapper; + } + + //_.curryRight + interface LoDashStatic { + /** + * This method is like _.curry except that arguments are applied to func in the manner of _.partialRight + * instead of _.partial. + * @param func The function to curry. + * @return Returns the new curried function. + */ + curryRight(func: (t1: T1) => R): + CurriedFunction1; + /** + * This method is like _.curry except that arguments are applied to func in the manner of _.partialRight + * instead of _.partial. + * @param func The function to curry. + * @return Returns the new curried function. + */ + curryRight(func: (t1: T1, t2: T2) => R): + CurriedFunction2; + /** + * This method is like _.curry except that arguments are applied to func in the manner of _.partialRight + * instead of _.partial. + * @param func The function to curry. + * @return Returns the new curried function. + */ + curryRight(func: (t1: T1, t2: T2, t3: T3) => R): + CurriedFunction3; + /** + * This method is like _.curry except that arguments are applied to func in the manner of _.partialRight + * instead of _.partial. + * @param func The function to curry. + * @return Returns the new curried function. + */ + curryRight(func: (t1: T1, t2: T2, t3: T3, t4: T4) => R): + CurriedFunction4; + /** + * This method is like _.curry except that arguments are applied to func in the manner of _.partialRight + * instead of _.partial. + * @param func The function to curry. + * @return Returns the new curried function. + */ + curryRight(func: (t1: T1, t2: T2, t3: T3, t4: T4, t5: T5) => R): + CurriedFunction5; + /** + * This method is like _.curry except that arguments are applied to func in the manner of _.partialRight + * instead of _.partial. + * @param func The function to curry. + * @param arity The arity of func. + * @return Returns the new curried function. + */ + curryRight( + func: Function, + arity?: number): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.curryRight + **/ + curryRight(arity?: number): LoDashImplicitObjectWrapper; + } + + //_.debounce + interface DebounceSettings { + /** + * Specify invoking on the leading edge of the timeout. + */ + leading?: boolean; + + /** + * The maximum time func is allowed to be delayed before it’s invoked. + */ + maxWait?: number; + + /** + * Specify invoking on the trailing edge of the timeout. + */ + trailing?: boolean; + } + + interface LoDashStatic { + /** + * Creates a debounced function that delays invoking func until after wait milliseconds have elapsed since + * the last time the debounced function was invoked. The debounced function comes with a cancel method to + * cancel delayed invocations and a flush method to immediately invoke them. Provide an options object to + * indicate that func should be invoked on the leading and/or trailing edge of the wait timeout. Subsequent + * calls to the debounced function return the result of the last func invocation. + * + * Note: If leading and trailing options are true, func is invoked on the trailing edge of the timeout only + * if the the debounced function is invoked more than once during the wait timeout. + * + * See David Corbacho’s article for details over the differences between _.debounce and _.throttle. + * + * @param func The function to debounce. + * @param wait The number of milliseconds to delay. + * @param options The options object. + * @param options.leading Specify invoking on the leading edge of the timeout. + * @param options.maxWait The maximum time func is allowed to be delayed before it’s invoked. + * @param options.trailing Specify invoking on the trailing edge of the timeout. + * @return Returns the new debounced function. + */ + debounce( + func: T, + wait?: number, + options?: DebounceSettings + ): T & Cancelable; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.debounce + */ + debounce( + wait?: number, + options?: DebounceSettings + ): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.debounce + */ + debounce( + wait?: number, + options?: DebounceSettings + ): LoDashExplicitObjectWrapper; + } + + //_.defer + interface LoDashStatic { + /** + * Defers invoking the func until the current call stack has cleared. Any additional arguments are provided to + * func when it’s invoked. + * + * @param func The function to defer. + * @param args The arguments to invoke the function with. + * @return Returns the timer id. + */ + defer( + func: T, + ...args: any[] + ): number; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.defer + */ + defer(...args: any[]): LoDashImplicitWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.defer + */ + defer(...args: any[]): LoDashExplicitWrapper; + } + + //_.delay + interface LoDashStatic { + /** + * Invokes func after wait milliseconds. Any additional arguments are provided to func when it’s invoked. + * + * @param func The function to delay. + * @param wait The number of milliseconds to delay invocation. + * @param args The arguments to invoke the function with. + * @return Returns the timer id. + */ + delay( + func: T, + wait: number, + ...args: any[] + ): number; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.delay + */ + delay( + wait: number, + ...args: any[] + ): LoDashImplicitWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.delay + */ + delay( + wait: number, + ...args: any[] + ): LoDashExplicitWrapper; + } + + interface LoDashStatic { + /** + * Creates a function that invokes `func` with arguments reversed. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to flip arguments for. + * @returns {Function} Returns the new function. + * @example + * + * var flipped = _.flip(function() { + * return _.toArray(arguments); + * }); + * + * flipped('a', 'b', 'c', 'd'); + * // => ['d', 'c', 'b', 'a'] + */ + flip(func: T): T; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.flip + */ + flip(): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.flip + */ + flip(): LoDashExplicitObjectWrapper; + } + + //_.flow + interface LoDashStatic { + /** + * Creates a function that returns the result of invoking the provided functions with the this binding of the + * created function, where each successive invocation is supplied the return value of the previous. + * + * @param funcs Functions to invoke. + * @return Returns the new function. + */ + // 1-argument first function + flow(f1: (a1: A1) => R1, f2: (a: R1) => R2): (a1: A1) => R2; + flow(f1: (a1: A1) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3): (a1: A1) => R3; + flow(f1: (a1: A1) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4): (a1: A1) => R4; + flow(f1: (a1: A1) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5): (a1: A1) => R5; + flow(f1: (a1: A1) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6): (a1: A1) => R6; + flow(f1: (a1: A1) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6, f7: (a: R6) => R7): (a1: A1) => R7; + // 2-argument first function + flow(f1: (a1: A1, a2: A2) => R1, f2: (a: R1) => R2): (a1: A1, a2: A2) => R2; + flow(f1: (a1: A1, a2: A2) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3): (a1: A1, a2: A2) => R3; + flow(f1: (a1: A1, a2: A2) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4): (a1: A1, a2: A2) => R4; + flow(f1: (a1: A1, a2: A2) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5): (a1: A1, a2: A2) => R5; + flow(f1: (a1: A1, a2: A2) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6): (a1: A1, a2: A2) => R6; + flow(f1: (a1: A1, a2: A2) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6, f7: (a: R6) => R7): (a1: A1, a2: A2) => R7; + // 3-argument first function + flow(f1: (a1: A1, a2: A2, a3: A3) => R1, f2: (a: R1) => R2): (a1: A1, a2: A2, a3: A3) => R2; + flow(f1: (a1: A1, a2: A2, a3: A3) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3): (a1: A1, a2: A2, a3: A3) => R3; + flow(f1: (a1: A1, a2: A2, a3: A3) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4): (a1: A1, a2: A2, a3: A3) => R4; + flow(f1: (a1: A1, a2: A2, a3: A3) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5): (a1: A1, a2: A2, a3: A3) => R5; + flow(f1: (a1: A1, a2: A2, a3: A3) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6): (a1: A1, a2: A2, a3: A3) => R6; + flow(f1: (a1: A1, a2: A2, a3: A3) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6, f7: (a: R6) => R7): (a1: A1, a2: A2, a3: A3) => R7; + // 4-argument first function + flow(f1: (a1: A1, a2: A2, a3: A3, a4: A4) => R1, f2: (a: R1) => R2): (a1: A1, a2: A2, a3: A3, a4: A4) => R2; + flow(f1: (a1: A1, a2: A2, a3: A3, a4: A4) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3): (a1: A1, a2: A2, a3: A3, a4: A4) => R3; + flow(f1: (a1: A1, a2: A2, a3: A3, a4: A4) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4): (a1: A1, a2: A2, a3: A3, a4: A4) => R4; + flow(f1: (a1: A1, a2: A2, a3: A3, a4: A4) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5): (a1: A1, a2: A2, a3: A3, a4: A4) => R5; + flow(f1: (a1: A1, a2: A2, a3: A3, a4: A4) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6): (a1: A1, a2: A2, a3: A3, a4: A4) => R6; + flow(f1: (a1: A1, a2: A2, a3: A3, a4: A4) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6, f7: (a: R6) => R7): (a1: A1, a2: A2, a3: A3, a4: A4) => R7; + // generic function + flow(...funcs: Function[]): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.flow + */ + flow(...funcs: Function[]): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.flow + */ + flow(...funcs: Function[]): LoDashExplicitObjectWrapper; + } + + //_.flowRight + interface LoDashStatic { + /** + * This method is like _.flow except that it creates a function that invokes the provided functions from right + * to left. + * + * @param funcs Functions to invoke. + * @return Returns the new function. + */ + flowRight(...funcs: Function[]): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.flowRight + */ + flowRight(...funcs: Function[]): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.flowRight + */ + flowRight(...funcs: Function[]): LoDashExplicitObjectWrapper; + } + + + //_.memoize + interface MemoizedFunction extends Function { + cache: MapCache; + } + + interface LoDashStatic { + /** + * Creates a function that memoizes the result of func. If resolver is provided it determines the cache key for + * storing the result based on the arguments provided to the memoized function. By default, the first argument + * provided to the memoized function is coerced to a string and used as the cache key. The func is invoked with + * the this binding of the memoized function. + * + * @param func The function to have its output memoized. + * @param resolver The function to resolve the cache key. + * @return Returns the new memoizing function. + */ + memoize: { + (func: T, resolver?: Function): T & MemoizedFunction; + Cache: MapCacheConstructor; + } + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.memoize + */ + memoize(resolver?: Function): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.memoize + */ + memoize(resolver?: Function): LoDashExplicitObjectWrapper; + } + + //_.overArgs (was _.modArgs) + interface LoDashStatic { + /** + * Creates a function that runs each argument through a corresponding transform function. + * + * @param func The function to wrap. + * @param transforms The functions to transform arguments, specified as individual functions or arrays + * of functions. + * @return Returns the new function. + */ + overArgs( + func: T, + ...transforms: Function[] + ): TResult; + + /** + * @see _.overArgs + */ + overArgs( + func: T, + transforms: Function[] + ): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.overArgs + */ + overArgs(...transforms: Function[]): LoDashImplicitObjectWrapper; + + /** + * @see _.overArgs + */ + overArgs(transforms: Function[]): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.overArgs + */ + overArgs(...transforms: Function[]): LoDashExplicitObjectWrapper; + + /** + * @see _.overArgs + */ + overArgs(transforms: Function[]): LoDashExplicitObjectWrapper; + } + + //_.negate + interface LoDashStatic { + /** + * Creates a function that negates the result of the predicate func. The func predicate is invoked with + * the this binding and arguments of the created function. + * + * @param predicate The predicate to negate. + * @return Returns the new function. + */ + negate(predicate: T): (...args: any[]) => boolean; + + /** + * @see _.negate + */ + negate(predicate: T): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.negate + */ + negate(): LoDashImplicitObjectWrapper<(...args: any[]) => boolean>; + + /** + * @see _.negate + */ + negate(): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.negate + */ + negate(): LoDashExplicitObjectWrapper<(...args: any[]) => boolean>; + + /** + * @see _.negate + */ + negate(): LoDashExplicitObjectWrapper; + } + + //_.once + interface LoDashStatic { + /** + * Creates a function that is restricted to invoking func once. Repeat calls to the function return the value + * of the first call. The func is invoked with the this binding and arguments of the created function. + * + * @param func The function to restrict. + * @return Returns the new restricted function. + */ + once(func: T): T; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.once + */ + once(): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.once + */ + once(): LoDashExplicitObjectWrapper; + } + + //_.partial + interface LoDashStatic { + /** + * Creates a function that, when called, invokes func with any additional partial arguments + * prepended to those provided to the new function. This method is similar to _.bind except + * it does not alter the this binding. + * @param func The function to partially apply arguments to. + * @param args Arguments to be partially applied. + * @return The new partially applied function. + **/ + partial: Partial; + } + + type PH = LoDashStatic; + + interface Function0 { + (): R; + } + interface Function1 { + (t1: T1): R; + } + interface Function2 { + (t1: T1, t2: T2): R; + } + interface Function3 { + (t1: T1, t2: T2, t3: T3): R; + } + interface Function4 { + (t1: T1, t2: T2, t3: T3, t4: T4): R; + } + + interface Partial { + // arity 0 + (func: Function0): Function0; + // arity 1 + (func: Function1): Function1; + (func: Function1, arg1: T1): Function0; + // arity 2 + (func: Function2): Function2; + (func: Function2, arg1: T1): Function1< T2, R>; + (func: Function2, plc1: PH, arg2: T2): Function1; + (func: Function2, arg1: T1, arg2: T2): Function0< R>; + // arity 3 + (func: Function3): Function3; + (func: Function3, arg1: T1): Function2< T2, T3, R>; + (func: Function3, plc1: PH, arg2: T2): Function2; + (func: Function3, arg1: T1, arg2: T2): Function1< T3, R>; + (func: Function3, plc1: PH, plc2: PH, arg3: T3): Function2; + (func: Function3, arg1: T1, plc2: PH, arg3: T3): Function1< T2, R>; + (func: Function3, plc1: PH, arg2: T2, arg3: T3): Function1; + (func: Function3, arg1: T1, arg2: T2, arg3: T3): Function0< R>; + // arity 4 + (func: Function4): Function4; + (func: Function4, arg1: T1): Function3< T2, T3, T4, R>; + (func: Function4, plc1: PH, arg2: T2): Function3; + (func: Function4, arg1: T1, arg2: T2): Function2< T3, T4, R>; + (func: Function4, plc1: PH, plc2: PH, arg3: T3): Function3; + (func: Function4, arg1: T1, plc2: PH, arg3: T3): Function2< T2, T4, R>; + (func: Function4, plc1: PH, arg2: T2, arg3: T3): Function2; + (func: Function4, arg1: T1, arg2: T2, arg3: T3): Function1< T4, R>; + (func: Function4, plc1: PH, plc2: PH, plc3: PH, arg4: T4): Function3; + (func: Function4, arg1: T1, plc2: PH, plc3: PH, arg4: T4): Function2< T2, T3, R>; + (func: Function4, plc1: PH, arg2: T2, plc3: PH, arg4: T4): Function2; + (func: Function4, arg1: T1, arg2: T2, plc3: PH, arg4: T4): Function1< T3, R>; + (func: Function4, plc1: PH, plc2: PH, arg3: T3, arg4: T4): Function2; + (func: Function4, arg1: T1, plc2: PH, arg3: T3, arg4: T4): Function1< T2, R>; + (func: Function4, plc1: PH, arg2: T2, arg3: T3, arg4: T4): Function1; + (func: Function4, arg1: T1, arg2: T2, arg3: T3, arg4: T4): Function0< R>; + // catch-all + (func: Function, ...args: any[]): Function; + } + + //_.partialRight + interface LoDashStatic { + /** + * This method is like _.partial except that partial arguments are appended to those provided + * to the new function. + * @param func The function to partially apply arguments to. + * @param args Arguments to be partially applied. + * @return The new partially applied function. + **/ + partialRight: PartialRight + } + + interface PartialRight { + // arity 0 + (func: Function0): Function0; + // arity 1 + (func: Function1): Function1; + (func: Function1, arg1: T1): Function0; + // arity 2 + (func: Function2): Function2; + (func: Function2, arg1: T1, plc2: PH): Function1< T2, R>; + (func: Function2, arg2: T2): Function1; + (func: Function2, arg1: T1, arg2: T2): Function0< R>; + // arity 3 + (func: Function3): Function3; + (func: Function3, arg1: T1, plc2: PH, plc3: PH): Function2< T2, T3, R>; + (func: Function3, arg2: T2, plc3: PH): Function2; + (func: Function3, arg1: T1, arg2: T2, plc3: PH): Function1< T3, R>; + (func: Function3, arg3: T3): Function2; + (func: Function3, arg1: T1, plc2: PH, arg3: T3): Function1< T2, R>; + (func: Function3, arg2: T2, arg3: T3): Function1; + (func: Function3, arg1: T1, arg2: T2, arg3: T3): Function0< R>; + // arity 4 + (func: Function4): Function4; + (func: Function4, arg1: T1, plc2: PH, plc3: PH, plc4: PH): Function3< T2, T3, T4, R>; + (func: Function4, arg2: T2, plc3: PH, plc4: PH): Function3; + (func: Function4, arg1: T1, arg2: T2, plc3: PH, plc4: PH): Function2< T3, T4, R>; + (func: Function4, arg3: T3, plc4: PH): Function3; + (func: Function4, arg1: T1, plc2: PH, arg3: T3, plc4: PH): Function2< T2, T4, R>; + (func: Function4, arg2: T2, arg3: T3, plc4: PH): Function2; + (func: Function4, arg1: T1, arg2: T2, arg3: T3, plc4: PH): Function1< T4, R>; + (func: Function4, arg4: T4): Function3; + (func: Function4, arg1: T1, plc2: PH, plc3: PH, arg4: T4): Function2< T2, T3, R>; + (func: Function4, arg2: T2, plc3: PH, arg4: T4): Function2; + (func: Function4, arg1: T1, arg2: T2, plc3: PH, arg4: T4): Function1< T3, R>; + (func: Function4, arg3: T3, arg4: T4): Function2; + (func: Function4, arg1: T1, plc2: PH, arg3: T3, arg4: T4): Function1< T2, R>; + (func: Function4, arg2: T2, arg3: T3, arg4: T4): Function1; + (func: Function4, arg1: T1, arg2: T2, arg3: T3, arg4: T4): Function0< R>; + // catch-all + (func: Function, ...args: any[]): Function; + } + + //_.rearg + interface LoDashStatic { + /** + * Creates a function that invokes func with arguments arranged according to the specified indexes where the + * argument value at the first index is provided as the first argument, the argument value at the second index + * is provided as the second argument, and so on. + * @param func The function to rearrange arguments for. + * @param indexes The arranged argument indexes, specified as individual indexes or arrays of indexes. + * @return Returns the new function. + */ + rearg(func: Function, indexes: number[]): TResult; + + /** + * @see _.rearg + */ + rearg(func: Function, ...indexes: number[]): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.rearg + */ + rearg(indexes: number[]): LoDashImplicitObjectWrapper; + + /** + * @see _.rearg + */ + rearg(...indexes: number[]): LoDashImplicitObjectWrapper; + } + + //_.rest + interface LoDashStatic { + /** + * Creates a function that invokes func with the this binding of the created function and arguments from start + * and beyond provided as an array. + * + * Note: This method is based on the rest parameter. + * + * @param func The function to apply a rest parameter to. + * @param start The start position of the rest parameter. + * @return Returns the new function. + */ + rest( + func: Function, + start?: number + ): TResult; + + /** + * @see _.rest + */ + rest( + func: TFunc, + start?: number + ): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.rest + */ + rest(start?: number): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.rest + */ + rest(start?: number): LoDashExplicitObjectWrapper; + } + + //_.spread + interface LoDashStatic { + /** + * Creates a function that invokes func with the this binding of the created function and an array of arguments + * much like Function#apply. + * + * Note: This method is based on the spread operator. + * + * @param func The function to spread arguments over. + * @return Returns the new function. + */ + spread(func: F): T; + + /** + * @see _.spread + */ + spread(func: Function): T; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.spread + */ + spread(): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.spread + */ + spread(): LoDashExplicitObjectWrapper; + } + + //_.throttle + interface ThrottleSettings { + /** + * If you'd like to disable the leading-edge call, pass this as false. + */ + leading?: boolean; + + /** + * If you'd like to disable the execution on the trailing-edge, pass false. + */ + trailing?: boolean; + } + + interface LoDashStatic { + /** + * Creates a throttled function that only invokes func at most once per every wait milliseconds. The throttled + * function comes with a cancel method to cancel delayed invocations and a flush method to immediately invoke + * them. Provide an options object to indicate that func should be invoked on the leading and/or trailing edge + * of the wait timeout. Subsequent calls to the throttled function return the result of the last func call. + * + * Note: If leading and trailing options are true, func is invoked on the trailing edge of the timeout only if + * the the throttled function is invoked more than once during the wait timeout. + * + * @param func The function to throttle. + * @param wait The number of milliseconds to throttle invocations to. + * @param options The options object. + * @param options.leading Specify invoking on the leading edge of the timeout. + * @param options.trailing Specify invoking on the trailing edge of the timeout. + * @return Returns the new throttled function. + */ + throttle( + func: T, + wait?: number, + options?: ThrottleSettings + ): T & Cancelable; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.throttle + */ + throttle( + wait?: number, + options?: ThrottleSettings + ): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.throttle + */ + throttle( + wait?: number, + options?: ThrottleSettings + ): LoDashExplicitObjectWrapper; + } + + //_.unary + interface LoDashStatic { + /** + * Creates a function that accepts up to one argument, ignoring any + * additional arguments. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new function. + * @example + * + * _.map(['6', '8', '10'], _.unary(parseInt)); + * // => [6, 8, 10] + */ + unary(func: T): T; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.unary + */ + unary(): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.unary + */ + unary(): LoDashExplicitObjectWrapper; + } + + //_.wrap + interface LoDashStatic { + /** + * Creates a function that provides value to the wrapper function as its first argument. Any additional + * arguments provided to the function are appended to those provided to the wrapper function. The wrapper is + * invoked with the this binding of the created function. + * + * @param value The value to wrap. + * @param wrapper The wrapper function. + * @return Returns the new function. + */ + wrap( + value: V, + wrapper: W + ): R; + + /** + * @see _.wrap + */ + wrap( + value: V, + wrapper: Function + ): R; + + /** + * @see _.wrap + */ + wrap( + value: any, + wrapper: Function + ): R; + } + + interface LoDashImplicitWrapper { + /** + * @see _.wrap + */ + wrap(wrapper: W): LoDashImplicitObjectWrapper; + + /** + * @see _.wrap + */ + wrap(wrapper: Function): LoDashImplicitObjectWrapper; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.wrap + */ + wrap(wrapper: W): LoDashImplicitObjectWrapper; + + /** + * @see _.wrap + */ + wrap(wrapper: Function): LoDashImplicitObjectWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.wrap + */ + wrap(wrapper: W): LoDashImplicitObjectWrapper; + + /** + * @see _.wrap + */ + wrap(wrapper: Function): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.wrap + */ + wrap(wrapper: W): LoDashExplicitObjectWrapper; + + /** + * @see _.wrap + */ + wrap(wrapper: Function): LoDashExplicitObjectWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.wrap + */ + wrap(wrapper: W): LoDashExplicitObjectWrapper; + + /** + * @see _.wrap + */ + wrap(wrapper: Function): LoDashExplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.wrap + */ + wrap(wrapper: W): LoDashExplicitObjectWrapper; + + /** + * @see _.wrap + */ + wrap(wrapper: Function): LoDashExplicitObjectWrapper; + } + + /******** + * Lang * + ********/ + + //_.castArray + interface LoDashStatic { + /** + * Casts value as an array if it’s not one. + * + * @param value The value to inspect. + * @return Returns the cast array. + */ + castArray(value: T): T[]; + } + + interface LoDashImplicitWrapper { + /** + * @see _.castArray + */ + castArray(): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.castArray + */ + castArray(): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.castArray + */ + castArray(): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.castArray + */ + castArray(): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.castArray + */ + castArray(): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.castArray + */ + castArray(): LoDashExplicitArrayWrapper; + } + + //_.clone + interface LoDashStatic { + /** + * Creates a shallow clone of value. + * + * Note: This method is loosely based on the structured clone algorithm and supports cloning arrays, + * array buffers, booleans, date objects, maps, numbers, Object objects, regexes, sets, strings, symbols, + * and typed arrays. The own enumerable properties of arguments objects are cloned as plain objects. An empty + * object is returned for uncloneable values such as error objects, functions, DOM nodes, and WeakMaps. + * + * @param value The value to clone. + * @return Returns the cloned value. + */ + clone(value: T): T; + } + + interface LoDashImplicitWrapper { + /** + * @see _.clone + */ + clone(): T; + } + + interface LoDashImplicitArrayWrapper { + + /** + * @see _.clone + */ + clone(): T[]; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.clone + */ + clone(): T; + } + + interface LoDashExplicitWrapper { + /** + * @see _.clone + */ + clone(): LoDashExplicitWrapper; + } + + interface LoDashExplicitArrayWrapper { + + /** + * @see _.clone + */ + clone(): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.clone + */ + clone(): LoDashExplicitObjectWrapper; + } + + //_.cloneDeep + interface LoDashStatic { + /** + * This method is like _.clone except that it recursively clones value. + * + * @param value The value to recursively clone. + * @return Returns the deep cloned value. + */ + cloneDeep(value: T): T; + } + + interface LoDashImplicitWrapper { + /** + * @see _.cloneDeep + */ + cloneDeep(): T; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.cloneDeep + */ + cloneDeep(): T[]; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.cloneDeep + */ + cloneDeep(): T; + } + + interface LoDashExplicitWrapper { + /** + * @see _.cloneDeep + */ + cloneDeep(): LoDashExplicitWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.cloneDeep + */ + cloneDeep(): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.cloneDeep + */ + cloneDeep(): LoDashExplicitObjectWrapper; + } + + //_.cloneDeepWith + interface CloneDeepWithCustomizer { + (value: TValue): TResult; + } + + interface LoDashStatic { + /** + * This method is like _.cloneWith except that it recursively clones value. + * + * @param value The value to recursively clone. + * @param customizer The function to customize cloning. + * @return Returns the deep cloned value. + */ + cloneDeepWith( + value: any, + customizer?: CloneDeepWithCustomizer + ): TResult; + + /** + * @see _.clonDeepeWith + */ + cloneDeepWith( + value: T, + customizer?: CloneDeepWithCustomizer + ): TResult; + } + + interface LoDashImplicitWrapper { + /** + * @see _.cloneDeepWith + */ + cloneDeepWith( + customizer?: CloneDeepWithCustomizer + ): TResult; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.cloneDeepWith + */ + cloneDeepWith( + customizer?: CloneDeepWithCustomizer + ): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.cloneDeepWith + */ + cloneDeepWith( + customizer?: CloneDeepWithCustomizer + ): TResult; + } + + interface LoDashExplicitWrapper { + /** + * @see _.cloneDeepWith + */ + cloneDeepWith( + customizer?: CloneDeepWithCustomizer + ): LoDashExplicitWrapper; + + /** + * @see _.cloneDeepWith + */ + cloneDeepWith( + customizer?: CloneDeepWithCustomizer + ): LoDashExplicitArrayWrapper; + + /** + * @see _.cloneDeepWith + */ + cloneDeepWith( + customizer?: CloneDeepWithCustomizer + ): LoDashExplicitObjectWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.cloneDeepWith + */ + cloneDeepWith( + customizer?: CloneDeepWithCustomizer + ): LoDashExplicitWrapper; + + /** + * @see _.cloneDeepWith + */ + cloneDeepWith( + customizer?: CloneDeepWithCustomizer + ): LoDashExplicitArrayWrapper; + + /** + * @see _.cloneDeepWith + */ + cloneDeepWith( + customizer?: CloneDeepWithCustomizer + ): LoDashExplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.cloneDeepWith + */ + cloneDeepWith( + customizer?: CloneDeepWithCustomizer + ): LoDashExplicitWrapper; + + /** + * @see _.cloneDeepWith + */ + cloneDeepWith( + customizer?: CloneDeepWithCustomizer + ): LoDashExplicitArrayWrapper; + + /** + * @see _.cloneDeepWith + */ + cloneDeepWith( + customizer?: CloneDeepWithCustomizer + ): LoDashExplicitObjectWrapper; + } + + //_.cloneWith + interface CloneWithCustomizer { + (value: TValue): TResult; + } + + interface LoDashStatic { + /** + * This method is like _.clone except that it accepts customizer which is invoked to produce the cloned value. + * If customizer returns undefined cloning is handled by the method instead. + * + * @param value The value to clone. + * @param customizer The function to customize cloning. + * @return Returns the cloned value. + */ + cloneWith( + value: any, + customizer?: CloneWithCustomizer + ): TResult; + + /** + * @see _.cloneWith + */ + cloneWith( + value: T, + customizer?: CloneWithCustomizer + ): TResult; + } + + interface LoDashImplicitWrapper { + /** + * @see _.cloneWith + */ + cloneWith( + customizer?: CloneWithCustomizer + ): TResult; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.cloneWith + */ + cloneWith( + customizer?: CloneWithCustomizer + ): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.cloneWith + */ + cloneWith( + customizer?: CloneWithCustomizer + ): TResult; + } + + interface LoDashExplicitWrapper { + /** + * @see _.cloneWith + */ + cloneWith( + customizer?: CloneWithCustomizer + ): LoDashExplicitWrapper; + + /** + * @see _.cloneWith + */ + cloneWith( + customizer?: CloneWithCustomizer + ): LoDashExplicitArrayWrapper; + + /** + * @see _.cloneWith + */ + cloneWith( + customizer?: CloneWithCustomizer + ): LoDashExplicitObjectWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.cloneWith + */ + cloneWith( + customizer?: CloneWithCustomizer + ): LoDashExplicitWrapper; + + /** + * @see _.cloneWith + */ + cloneWith( + customizer?: CloneWithCustomizer + ): LoDashExplicitArrayWrapper; + + /** + * @see _.cloneWith + */ + cloneWith( + customizer?: CloneWithCustomizer + ): LoDashExplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.cloneWith + */ + cloneWith( + customizer?: CloneWithCustomizer + ): LoDashExplicitWrapper; + + /** + * @see _.cloneWith + */ + cloneWith( + customizer?: CloneWithCustomizer + ): LoDashExplicitArrayWrapper; + + /** + * @see _.cloneWith + */ + cloneWith( + customizer?: CloneWithCustomizer + ): LoDashExplicitObjectWrapper; + } + + //_.eq + interface LoDashStatic { + /** + * Performs a [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'user': 'fred' }; + * var other = { 'user': 'fred' }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ + eq( + value: any, + other: any + ): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isEqual + */ + eq( + other: any + ): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isEqual + */ + eq( + other: any + ): LoDashExplicitWrapper; + } + + //_.gt + interface LoDashStatic { + /** + * Checks if value is greater than other. + * + * @param value The value to compare. + * @param other The other value to compare. + * @return Returns true if value is greater than other, else false. + */ + gt( + value: any, + other: any + ): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.gt + */ + gt(other: any): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.gt + */ + gt(other: any): LoDashExplicitWrapper; + } + + //_.gte + interface LoDashStatic { + /** + * Checks if value is greater than or equal to other. + * + * @param value The value to compare. + * @param other The other value to compare. + * @return Returns true if value is greater than or equal to other, else false. + */ + gte( + value: any, + other: any + ): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.gte + */ + gte(other: any): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.gte + */ + gte(other: any): LoDashExplicitWrapper; + } + + //_.isArguments + interface LoDashStatic { + /** + * Checks if value is classified as an arguments object. + * + * @param value The value to check. + * @return Returns true if value is correctly classified, else false. + */ + isArguments(value?: any): value is IArguments; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isArguments + */ + isArguments(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isArguments + */ + isArguments(): LoDashExplicitWrapper; + } + + //_.isArray + interface LoDashStatic { + /** + * Checks if value is classified as an Array object. + * @param value The value to check. + * + * @return Returns true if value is correctly classified, else false. + */ + isArray(value?: any): value is T[]; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isArray + */ + isArray(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isArray + */ + isArray(): LoDashExplicitWrapper; + } + + //_.isArrayBuffer + interface LoDashStatic { + /** + * Checks if value is classified as an ArrayBuffer object. + * + * @param value The value to check. + * @return Returns true if value is correctly classified, else false. + */ + isArrayBuffer(value?: any): value is ArrayBuffer; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isArrayBuffer + */ + isArrayBuffer(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isArrayBuffer + */ + isArrayBuffer(): LoDashExplicitWrapper; + } + + //_.isArrayLike + interface LoDashStatic { + /** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @type Function + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ + isArrayLike(value?: any): value is T[]; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isArrayLike + */ + isArrayLike(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isArrayLike + */ + isArrayLike(): LoDashExplicitWrapper; + } + + //_.isArrayLikeObject + interface LoDashStatic { + /** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @type Function + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ + isArrayLikeObject(value?: any): value is T[]; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isArrayLikeObject + */ + isArrayLikeObject(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isArrayLikeObject + */ + isArrayLikeObject(): LoDashExplicitWrapper; + } + + //_.isBoolean + interface LoDashStatic { + /** + * Checks if value is classified as a boolean primitive or object. + * + * @param value The value to check. + * @return Returns true if value is correctly classified, else false. + */ + isBoolean(value?: any): value is boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isBoolean + */ + isBoolean(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isBoolean + */ + isBoolean(): LoDashExplicitWrapper; + } + + //_.isBuffer + interface LoDashStatic { + /** + * Checks if value is a buffer. + * + * @param value The value to check. + * @return Returns true if value is a buffer, else false. + */ + isBuffer(value?: any): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isBuffer + */ + isBuffer(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isBuffer + */ + isBuffer(): LoDashExplicitWrapper; + } + + //_.isDate + interface LoDashStatic { + /** + * Checks if value is classified as a Date object. + * @param value The value to check. + * + * @return Returns true if value is correctly classified, else false. + */ + isDate(value?: any): value is Date; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isDate + */ + isDate(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isDate + */ + isDate(): LoDashExplicitWrapper; + } + + //_.isElement + interface LoDashStatic { + /** + * Checks if value is a DOM element. + * + * @param value The value to check. + * @return Returns true if value is a DOM element, else false. + */ + isElement(value?: any): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isElement + */ + isElement(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isElement + */ + isElement(): LoDashExplicitWrapper; + } + + //_.isEmpty + interface LoDashStatic { + /** + * Checks if value is empty. A value is considered empty unless it’s an arguments object, array, string, or + * jQuery-like collection with a length greater than 0 or an object with own enumerable properties. + * + * @param value The value to inspect. + * @return Returns true if value is empty, else false. + */ + isEmpty(value?: any): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isEmpty + */ + isEmpty(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isEmpty + */ + isEmpty(): LoDashExplicitWrapper; + } + + //_.isEqual + interface LoDashStatic { + /** + * Performs a deep comparison between two values to determine if they are + * equivalent. + * + * **Note:** This method supports comparing arrays, array buffers, booleans, + * date objects, error objects, maps, numbers, `Object` objects, regexes, + * sets, strings, symbols, and typed arrays. `Object` objects are compared + * by their own, not inherited, enumerable properties. Functions and DOM + * nodes are **not** supported. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'user': 'fred' }; + * var other = { 'user': 'fred' }; + * + * _.isEqual(object, other); + * // => true + * + * object === other; + * // => false + */ + isEqual( + value: any, + other: any + ): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isEqual + */ + isEqual( + other: any + ): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isEqual + */ + isEqual( + other: any + ): LoDashExplicitWrapper; + } + + // _.isEqualWith + interface IsEqualCustomizer { + (value: any, other: any, indexOrKey?: number|string): boolean; + } + + interface LoDashStatic { + /** + * This method is like `_.isEqual` except that it accepts `customizer` which is + * invoked to compare values. If `customizer` returns `undefined` comparisons are + * handled by the method instead. The `customizer` is invoked with up to seven arguments: + * (objValue, othValue [, index|key, object, other, stack]). + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); + * } + * + * function customizer(objValue, othValue) { + * if (isGreeting(objValue) && isGreeting(othValue)) { + * return true; + * } + * } + * + * var array = ['hello', 'goodbye']; + * var other = ['hi', 'goodbye']; + * + * _.isEqualWith(array, other, customizer); + * // => true + */ + isEqualWith( + value: any, + other: any, + customizer: IsEqualCustomizer + ): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isEqualWith + */ + isEqualWith( + other: any, + customizer: IsEqualCustomizer + ): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isEqualWith + */ + isEqualWith( + other: any, + customizer: IsEqualCustomizer + ): LoDashExplicitWrapper; + } + + //_.isError + interface LoDashStatic { + /** + * Checks if value is an Error, EvalError, RangeError, ReferenceError, SyntaxError, TypeError, or URIError + * object. + * + * @param value The value to check. + * @return Returns true if value is an error object, else false. + */ + isError(value: any): value is Error; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isError + */ + isError(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isError + */ + isError(): LoDashExplicitWrapper; + } + + //_.isFinite + interface LoDashStatic { + /** + * Checks if value is a finite primitive number. + * + * Note: This method is based on Number.isFinite. + * + * @param value The value to check. + * @return Returns true if value is a finite number, else false. + */ + isFinite(value?: any): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isFinite + */ + isFinite(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isFinite + */ + isFinite(): LoDashExplicitWrapper; + } + + //_.isFunction + interface LoDashStatic { + /** + * Checks if value is classified as a Function object. + * + * @param value The value to check. + * @return Returns true if value is correctly classified, else false. + */ + isFunction(value?: any): value is Function; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isFunction + */ + isFunction(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isFunction + */ + isFunction(): LoDashExplicitWrapper; + } + + //_.isInteger + interface LoDashStatic { + /** + * Checks if `value` is an integer. + * + * **Note:** This method is based on [`Number.isInteger`](https://mdn.io/Number/isInteger). + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an integer, else `false`. + * @example + * + * _.isInteger(3); + * // => true + * + * _.isInteger(Number.MIN_VALUE); + * // => false + * + * _.isInteger(Infinity); + * // => false + * + * _.isInteger('3'); + * // => false + */ + isInteger(value?: any): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isInteger + */ + isInteger(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isInteger + */ + isInteger(): LoDashExplicitWrapper; + } + + //_.isLength + interface LoDashStatic { + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This function is loosely based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ + isLength(value?: any): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isLength + */ + isLength(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isLength + */ + isLength(): LoDashExplicitWrapper; + } + + //_.isMap + interface LoDashStatic { + /** + * Checks if value is classified as a Map object. + * + * @param value The value to check. + * @returns Returns true if value is correctly classified, else false. + */ + isMap(value?: any): value is Map; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isMap + */ + isMap(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isMap + */ + isMap(): LoDashExplicitWrapper; + } + + //_.isMatch + interface isMatchCustomizer { + (value: any, other: any, indexOrKey?: number|string): boolean; + } + + interface LoDashStatic { + /** + * Performs a deep comparison between `object` and `source` to determine if + * `object` contains equivalent property values. + * + * **Note:** This method supports comparing the same values as `_.isEqual`. + * + * @static + * @memberOf _ + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @example + * + * var object = { 'user': 'fred', 'age': 40 }; + * + * _.isMatch(object, { 'age': 40 }); + * // => true + * + * _.isMatch(object, { 'age': 36 }); + * // => false + */ + isMatch(object: Object, source: Object): boolean; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.isMatch + */ + isMatch(source: Object): boolean; + } + + //_.isMatchWith + interface isMatchWithCustomizer { + (value: any, other: any, indexOrKey?: number|string): boolean; + } + + interface LoDashStatic { + /** + * This method is like `_.isMatch` except that it accepts `customizer` which + * is invoked to compare values. If `customizer` returns `undefined` comparisons + * are handled by the method instead. The `customizer` is invoked with three + * arguments: (objValue, srcValue, index|key, object, source). + * + * @static + * @memberOf _ + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @example + * + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); + * } + * + * function customizer(objValue, srcValue) { + * if (isGreeting(objValue) && isGreeting(srcValue)) { + * return true; + * } + * } + * + * var object = { 'greeting': 'hello' }; + * var source = { 'greeting': 'hi' }; + * + * _.isMatchWith(object, source, customizer); + * // => true + */ + isMatchWith(object: Object, source: Object, customizer: isMatchWithCustomizer): boolean; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.isMatchWith + */ + isMatchWith(source: Object, customizer: isMatchWithCustomizer): boolean; + } + + //_.isNaN + interface LoDashStatic { + /** + * Checks if value is NaN. + * + * Note: This method is not the same as isNaN which returns true for undefined and other non-numeric values. + * + * @param value The value to check. + * @return Returns true if value is NaN, else false. + */ + isNaN(value?: any): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isNaN + */ + isNaN(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isNaN + */ + isNaN(): LoDashExplicitWrapper; + } + + //_.isNative + interface LoDashStatic { + /** + * Checks if value is a native function. + * @param value The value to check. + * + * @retrun Returns true if value is a native function, else false. + */ + isNative(value: any): value is Function; + } + + interface LoDashImplicitWrapperBase { + /** + * see _.isNative + */ + isNative(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * see _.isNative + */ + isNative(): LoDashExplicitWrapper; + } + + //_.isNil + interface LoDashStatic { + /** + * Checks if `value` is `null` or `undefined`. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is nullish, else `false`. + * @example + * + * _.isNil(null); + * // => true + * + * _.isNil(void 0); + * // => true + * + * _.isNil(NaN); + * // => false + */ + isNil(value?: any): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * see _.isNil + */ + isNil(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * see _.isNil + */ + isNil(): LoDashExplicitWrapper; + } + + //_.isNull + interface LoDashStatic { + /** + * Checks if value is null. + * + * @param value The value to check. + * @return Returns true if value is null, else false. + */ + isNull(value?: any): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * see _.isNull + */ + isNull(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * see _.isNull + */ + isNull(): LoDashExplicitWrapper; + } + + //_.isNumber + interface LoDashStatic { + /** + * Checks if value is classified as a Number primitive or object. + * + * Note: To exclude Infinity, -Infinity, and NaN, which are classified as numbers, use the _.isFinite method. + * + * @param value The value to check. + * @return Returns true if value is correctly classified, else false. + */ + isNumber(value?: any): value is number; + } + + interface LoDashImplicitWrapperBase { + /** + * see _.isNumber + */ + isNumber(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * see _.isNumber + */ + isNumber(): LoDashExplicitWrapper; + } + + //_.isObject + interface LoDashStatic { + /** + * Checks if value is the language type of Object. (e.g. arrays, functions, objects, regexes, new Number(0), + * and new String('')) + * + * @param value The value to check. + * @return Returns true if value is an object, else false. + */ + isObject(value?: any): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * see _.isObject + */ + isObject(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * see _.isObject + */ + isObject(): LoDashExplicitWrapper; + } + + //_.isObjectLike + interface LoDashStatic { + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + isObjectLike(value?: any): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * see _.isObjectLike + */ + isObjectLike(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * see _.isObjectLike + */ + isObjectLike(): LoDashExplicitWrapper; + } + + //_.isPlainObject + interface LoDashStatic { + /** + * Checks if value is a plain object, that is, an object created by the Object constructor or one with a + * [[Prototype]] of null. + * + * Note: This method assumes objects created by the Object constructor have no inherited enumerable properties. + * + * @param value The value to check. + * @return Returns true if value is a plain object, else false. + */ + isPlainObject(value?: any): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * see _.isPlainObject + */ + isPlainObject(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * see _.isPlainObject + */ + isPlainObject(): LoDashExplicitWrapper; + } + + //_.isRegExp + interface LoDashStatic { + /** + * Checks if value is classified as a RegExp object. + * @param value The value to check. + * + * @return Returns true if value is correctly classified, else false. + */ + isRegExp(value?: any): value is RegExp; + } + + interface LoDashImplicitWrapperBase { + /** + * see _.isRegExp + */ + isRegExp(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * see _.isRegExp + */ + isRegExp(): LoDashExplicitWrapper; + } + + //_.isSafeInteger + interface LoDashStatic { + /** + * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754 + * double precision number which isn't the result of a rounded unsafe integer. + * + * **Note:** This method is based on [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger). + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`. + * @example + * + * _.isSafeInteger(3); + * // => true + * + * _.isSafeInteger(Number.MIN_VALUE); + * // => false + * + * _.isSafeInteger(Infinity); + * // => false + * + * _.isSafeInteger('3'); + * // => false + */ + isSafeInteger(value: any): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * see _.isSafeInteger + */ + isSafeInteger(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * see _.isSafeInteger + */ + isSafeInteger(): LoDashExplicitWrapper; + } + + //_.isSet + interface LoDashStatic { + /** + * Checks if value is classified as a Set object. + * + * @param value The value to check. + * @returns Returns true if value is correctly classified, else false. + */ + isSet(value?: any): value is Set; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isSet + */ + isSet(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isSet + */ + isSet(): LoDashExplicitWrapper; + } + + //_.isString + interface LoDashStatic { + /** + * Checks if value is classified as a String primitive or object. + * + * @param value The value to check. + * @return Returns true if value is correctly classified, else false. + */ + isString(value?: any): value is string; + } + + interface LoDashImplicitWrapperBase { + /** + * see _.isString + */ + isString(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * see _.isString + */ + isString(): LoDashExplicitWrapper; + } + + //_.isSymbol + interface LoDashStatic { + /** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ + isSymbol(value: any): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * see _.isSymbol + */ + isSymbol(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * see _.isSymbol + */ + isSymbol(): LoDashExplicitWrapper; + } + + //_.isTypedArray + interface LoDashStatic { + /** + * Checks if value is classified as a typed array. + * + * @param value The value to check. + * @return Returns true if value is correctly classified, else false. + */ + isTypedArray(value: any): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * see _.isTypedArray + */ + isTypedArray(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * see _.isTypedArray + */ + isTypedArray(): LoDashExplicitWrapper; + } + + //_.isUndefined + interface LoDashStatic { + /** + * Checks if value is undefined. + * + * @param value The value to check. + * @return Returns true if value is undefined, else false. + */ + isUndefined(value: any): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * see _.isUndefined + */ + isUndefined(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * see _.isUndefined + */ + isUndefined(): LoDashExplicitWrapper; + } + + //_.isWeakMap + interface LoDashStatic { + /** + * Checks if value is classified as a WeakMap object. + * + * @param value The value to check. + * @returns Returns true if value is correctly classified, else false. + */ + isWeakMap(value?: any): value is WeakMap; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isSet + */ + isWeakMap(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isSet + */ + isWeakMap(): LoDashExplicitWrapper; + } + + //_.isWeakSet + interface LoDashStatic { + /** + * Checks if value is classified as a WeakSet object. + * + * @param value The value to check. + * @returns Returns true if value is correctly classified, else false. + */ + isWeakSet(value?: any): value is WeakSet; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isWeakSet + */ + isWeakSet(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isWeakSet + */ + isWeakSet(): LoDashExplicitWrapper; + } + + //_.lt + interface LoDashStatic { + /** + * Checks if value is less than other. + * + * @param value The value to compare. + * @param other The other value to compare. + * @return Returns true if value is less than other, else false. + */ + lt( + value: any, + other: any + ): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.lt + */ + lt(other: any): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.lt + */ + lt(other: any): LoDashExplicitWrapper; + } + + //_.lte + interface LoDashStatic { + /** + * Checks if value is less than or equal to other. + * + * @param value The value to compare. + * @param other The other value to compare. + * @return Returns true if value is less than or equal to other, else false. + */ + lte( + value: any, + other: any + ): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.lte + */ + lte(other: any): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.lte + */ + lte(other: any): LoDashExplicitWrapper; + } + + //_.toArray + interface LoDashStatic { + /** + * Converts value to an array. + * + * @param value The value to convert. + * @return Returns the converted array. + */ + toArray(value: List|Dictionary|NumericDictionary): T[]; + + /** + * @see _.toArray + */ + toArray(value: TValue): TResult[]; + + /** + * @see _.toArray + */ + toArray(value?: any): TResult[]; + } + + interface LoDashImplicitWrapper { + /** + * @see _.toArray + */ + toArray(): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.toArray + */ + toArray(): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.toArray + */ + toArray(): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.toArray + */ + toArray(): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.toArray + */ + toArray(): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.toArray + */ + toArray(): LoDashExplicitArrayWrapper; + } + + //_.toPlainObject + interface LoDashStatic { + /** + * Converts value to a plain object flattening inherited enumerable properties of value to own properties + * of the plain object. + * + * @param value The value to convert. + * @return Returns the converted plain object. + */ + toPlainObject(value?: any): TResult; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.toPlainObject + */ + toPlainObject(): LoDashImplicitObjectWrapper; + } + + //_.toInteger + interface LoDashStatic { + /** + * Converts `value` to an integer. + * + * **Note:** This function is loosely based on [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger). + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toInteger(3); + * // => 3 + * + * _.toInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toInteger(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toInteger('3'); + * // => 3 + */ + toInteger(value: any): number; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.toInteger + */ + toInteger(): LoDashImplicitWrapper; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.toInteger + */ + toInteger(): LoDashExplicitWrapper; + } + + //_.toLength + interface LoDashStatic { + /** + * Converts `value` to an integer suitable for use as the length of an + * array-like object. + * + * **Note:** This method is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to convert. + * @return {number} Returns the converted integer. + * @example + * + * _.toLength(3); + * // => 3 + * + * _.toLength(Number.MIN_VALUE); + * // => 0 + * + * _.toLength(Infinity); + * // => 4294967295 + * + * _.toLength('3'); + * // => 3 + */ + toLength(value: any): number; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.toLength + */ + toLength(): LoDashImplicitWrapper; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.toLength + */ + toLength(): LoDashExplicitWrapper; + } + + //_.toNumber + interface LoDashStatic { + /** + * Converts `value` to a number. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to process. + * @returns {number} Returns the number. + * @example + * + * _.toNumber(3); + * // => 3 + * + * _.toNumber(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toNumber(Infinity); + * // => Infinity + * + * _.toNumber('3'); + * // => 3 + */ + toNumber(value: any): number; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.toNumber + */ + toNumber(): LoDashImplicitWrapper; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.toNumber + */ + toNumber(): LoDashExplicitWrapper; + } + + //_.toSafeInteger + interface LoDashStatic { + /** + * Converts `value` to a safe integer. A safe integer can be compared and + * represented correctly. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toSafeInteger(3); + * // => 3 + * + * _.toSafeInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toSafeInteger(Infinity); + * // => 9007199254740991 + * + * _.toSafeInteger('3'); + * // => 3 + */ + toSafeInteger(value: any): number; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.toSafeInteger + */ + toSafeInteger(): LoDashImplicitWrapper; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.toSafeInteger + */ + toSafeInteger(): LoDashExplicitWrapper; + } + + //_.toString DUMMY + interface LoDashStatic { + /** + * Converts `value` to a string if it's not one. An empty string is returned + * for `null` and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to process. + * @returns {string} Returns the string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ + toString(value: any): string; + } + + /******** + * Math * + ********/ + + //_.add + interface LoDashStatic { + /** + * Adds two numbers. + * + * @param augend The first number to add. + * @param addend The second number to add. + * @return Returns the sum. + */ + add( + augend: number, + addend: number + ): number; + } + + interface LoDashImplicitWrapper { + /** + * @see _.add + */ + add(addend: number): number; + } + + interface LoDashExplicitWrapper { + /** + * @see _.add + */ + add(addend: number): LoDashExplicitWrapper; + } + + //_.ceil + interface LoDashStatic { + /** + * Calculates n rounded up to precision. + * + * @param n The number to round up. + * @param precision The precision to round up to. + * @return Returns the rounded up number. + */ + ceil( + n: number, + precision?: number + ): number; + } + + interface LoDashImplicitWrapper { + /** + * @see _.ceil + */ + ceil(precision?: number): number; + } + + interface LoDashExplicitWrapper { + /** + * @see _.ceil + */ + ceil(precision?: number): LoDashExplicitWrapper; + } + + //_.floor + interface LoDashStatic { + /** + * Calculates n rounded down to precision. + * + * @param n The number to round down. + * @param precision The precision to round down to. + * @return Returns the rounded down number. + */ + floor( + n: number, + precision?: number + ): number; + } + + interface LoDashImplicitWrapper { + /** + * @see _.floor + */ + floor(precision?: number): number; + } + + interface LoDashExplicitWrapper { + /** + * @see _.floor + */ + floor(precision?: number): LoDashExplicitWrapper; + } + + //_.max + interface LoDashStatic { + /** + * Computes the maximum value of `array`. If `array` is empty or falsey + * `undefined` is returned. + * + * @static + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @returns {*} Returns the maximum value. + */ + max( + collection: List + ): T; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.max + */ + max(): T; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.max + */ + max(): T; + } + + //_.maxBy + interface LoDashStatic { + /** + * This method is like `_.max` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the criterion by which + * the value is ranked. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element. + * @returns {*} Returns the maximum value. + * @example + * + * var objects = [{ 'n': 1 }, { 'n': 2 }]; + * + * _.maxBy(objects, function(o) { return o.a; }); + * // => { 'n': 2 } + * + * // using the `_.property` iteratee shorthand + * _.maxBy(objects, 'n'); + * // => { 'n': 2 } + */ + maxBy( + collection: List, + iteratee?: ListIterator + ): T; + + /** + * @see _.maxBy + */ + maxBy( + collection: Dictionary, + iteratee?: DictionaryIterator + ): T; + + /** + * @see _.maxBy + */ + maxBy( + collection: List|Dictionary, + iteratee?: string + ): T; + + /** + * @see _.maxBy + */ + maxBy( + collection: List|Dictionary, + whereValue?: TObject + ): T; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.maxBy + */ + maxBy( + iteratee?: ListIterator + ): T; + + /** + * @see _.maxBy + */ + maxBy( + iteratee?: string + ): T; + + /** + * @see _.maxBy + */ + maxBy( + whereValue?: TObject + ): T; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.maxBy + */ + maxBy( + iteratee?: ListIterator|DictionaryIterator + ): T; + + /** + * @see _.maxBy + */ + maxBy( + iteratee?: string + ): T; + + /** + * @see _.maxBy + */ + maxBy( + whereValue?: TObject + ): T; + } + + //_.mean + interface LoDashStatic { + /** + * Computes the mean of the values in `array`. + * + * @static + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @returns {number} Returns the mean. + * @example + * + * _.mean([4, 2, 8, 6]); + * // => 5 + */ + mean( + collection: List + ): number; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.mean + */ + mean(): number; + + /** + * @see _.mean + */ + mean(): number; + } + + //_.min + interface LoDashStatic { + /** + * Computes the minimum value of `array`. If `array` is empty or falsey + * `undefined` is returned. + * + * @static + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @returns {*} Returns the minimum value. + */ + min( + collection: List + ): T; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.min + */ + min(): T; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.min + */ + min(): T; + } + + //_.minBy + interface LoDashStatic { + /** + * This method is like `_.min` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the criterion by which + * the value is ranked. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element. + * @returns {*} Returns the minimum value. + * @example + * + * var objects = [{ 'n': 1 }, { 'n': 2 }]; + * + * _.minBy(objects, function(o) { return o.a; }); + * // => { 'n': 1 } + * + * // using the `_.property` iteratee shorthand + * _.minBy(objects, 'n'); + * // => { 'n': 1 } + */ + minBy( + collection: List, + iteratee?: ListIterator + ): T; + + /** + * @see _.minBy + */ + minBy( + collection: Dictionary, + iteratee?: DictionaryIterator + ): T; + + /** + * @see _.minBy + */ + minBy( + collection: List|Dictionary, + iteratee?: string + ): T; + + /** + * @see _.minBy + */ + minBy( + collection: List|Dictionary, + whereValue?: TObject + ): T; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.minBy + */ + minBy( + iteratee?: ListIterator + ): T; + + /** + * @see _.minBy + */ + minBy( + iteratee?: string + ): T; + + /** + * @see _.minBy + */ + minBy( + whereValue?: TObject + ): T; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.minBy + */ + minBy( + iteratee?: ListIterator|DictionaryIterator + ): T; + + /** + * @see _.minBy + */ + minBy( + iteratee?: string + ): T; + + /** + * @see _.minBy + */ + minBy( + whereValue?: TObject + ): T; + } + + //_.round + interface LoDashStatic { + /** + * Calculates n rounded to precision. + * + * @param n The number to round. + * @param precision The precision to round to. + * @return Returns the rounded number. + */ + round( + n: number, + precision?: number + ): number; + } + + interface LoDashImplicitWrapper { + /** + * @see _.round + */ + round(precision?: number): number; + } + + interface LoDashExplicitWrapper { + /** + * @see _.round + */ + round(precision?: number): LoDashExplicitWrapper; + } + + //_.sum + interface LoDashStatic { + /** + * Computes the sum of the values in `array`. + * + * @static + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @returns {number} Returns the sum. + * @example + * + * _.sum([4, 2, 8, 6]); + * // => 20 + */ + sum(collection: List): number; + + /** + * @see _.sum + */ + sum(collection: List|Dictionary): number; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.sum + */ + sum(): number; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.sum + **/ + sum(): number; + + /** + * @see _.sum + */ + sum(): number; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.sum + */ + sum(): LoDashExplicitWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.sum + */ + sum(): LoDashExplicitWrapper; + + /** + * @see _.sum + */ + sum(): LoDashExplicitWrapper; + } + + //_.sumBy + interface LoDashStatic { + /** + * This method is like `_.sum` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the value to be summed. + * The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the sum. + * @example + * + * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }]; + * + * _.sumBy(objects, function(o) { return o.n; }); + * // => 20 + * + * // using the `_.property` iteratee shorthand + * _.sumBy(objects, 'n'); + * // => 20 + */ + sumBy( + collection: List, + iteratee: ListIterator + ): number; + + /** + * @see _.sumBy + */ + sumBy( + collection: List<{}>, + iteratee: string + ): number; + + /** + * @see _.sumBy + */ + sumBy( + collection: List + ): number; + + /** + * @see _.sumBy + */ + sumBy( + collection: List<{}>, + iteratee: Dictionary<{}> + ): number; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.sumBy + */ + sumBy( + iteratee: ListIterator + ): number; + + /** + * @see _.sumBy + */ + sumBy(iteratee: string): number; + + /** + * @see _.sumBy + */ + sumBy(iteratee: Dictionary<{}>): number; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.sumBy + */ + sumBy( + iteratee: ListIterator<{}, number> + ): number; + + /** + * @see _.sumBy + */ + sumBy(iteratee: string): number; + + /** + * @see _.sumBy + */ + sumBy(iteratee: Dictionary<{}>): number; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.sumBy + */ + sumBy( + iteratee: ListIterator + ): LoDashExplicitWrapper; + + /** + * @see _.sumBy + */ + sumBy(iteratee: string): LoDashExplicitWrapper; + + /** + * @see _.sumBy + */ + sumBy(): LoDashExplicitWrapper; + + /** + * @see _.sumBy + */ + sumBy(iteratee: Dictionary<{}>): LoDashExplicitWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.sumBy + */ + sumBy( + iteratee: ListIterator<{}, number> + ): LoDashExplicitWrapper; + + /** + * @see _.sumBy + */ + sumBy(iteratee: string): LoDashExplicitWrapper; + + /** + * @see _.sumBy + */ + sumBy(iteratee: Dictionary<{}>): LoDashExplicitWrapper; + } + + /********** + * Number * + **********/ + + //_.subtract + interface LoDashStatic { + /** + * Subtract two numbers. + * + * @static + * @memberOf _ + * @category Math + * @param {number} minuend The first number in a subtraction. + * @param {number} subtrahend The second number in a subtraction. + * @returns {number} Returns the difference. + * @example + * + * _.subtract(6, 4); + * // => 2 + */ + subtract( + minuend: number, + subtrahend: number + ): number; + } + + interface LoDashImplicitWrapper { + /** + * @see _.subtract + */ + subtract( + subtrahend: number + ): number; + } + + interface LoDashExplicitWrapper { + /** + * @see _.subtract + */ + subtract( + subtrahend: number + ): LoDashExplicitWrapper; + } + + //_.clamp + interface LoDashStatic { + /** + * Clamps `number` within the inclusive `lower` and `upper` bounds. + * + * @static + * @memberOf _ + * @category Number + * @param {number} number The number to clamp. + * @param {number} [lower] The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the clamped number. + * @example + * + * _.clamp(-10, -5, 5); + * // => -5 + * + * _.clamp(10, -5, 5); + * // => 5 + */ + clamp( + number: number, + lower: number, + upper: number + ): number; + } + + interface LoDashImplicitWrapper { + /** + * @see _.clamp + */ + clamp( + lower: number, + upper: number + ): number; + } + + interface LoDashExplicitWrapper { + /** + * @see _.clamp + */ + clamp( + lower: number, + upper: number + ): LoDashExplicitWrapper; + } + + //_.inRange + interface LoDashStatic { + /** + * Checks if n is between start and up to but not including, end. If end is not specified it’s set to start + * with start then set to 0. + * + * @param n The number to check. + * @param start The start of the range. + * @param end The end of the range. + * @return Returns true if n is in the range, else false. + */ + inRange( + n: number, + start: number, + end: number + ): boolean; + + + /** + * @see _.inRange + */ + inRange( + n: number, + end: number + ): boolean; + } + + interface LoDashImplicitWrapper { + /** + * @see _.inRange + */ + inRange( + start: number, + end: number + ): boolean; + + /** + * @see _.inRange + */ + inRange(end: number): boolean; + } + + interface LoDashExplicitWrapper { + /** + * @see _.inRange + */ + inRange( + start: number, + end: number + ): LoDashExplicitWrapper; + + /** + * @see _.inRange + */ + inRange(end: number): LoDashExplicitWrapper; + } + + //_.random + interface LoDashStatic { + /** + * Produces a random number between min and max (inclusive). If only one argument is provided a number between + * 0 and the given number is returned. If floating is true, or either min or max are floats, a floating-point + * number is returned instead of an integer. + * + * @param min The minimum possible value. + * @param max The maximum possible value. + * @param floating Specify returning a floating-point number. + * @return Returns the random number. + */ + random( + min?: number, + max?: number, + floating?: boolean + ): number; + + /** + * @see _.random + */ + random( + min?: number, + floating?: boolean + ): number; + + /** + * @see _.random + */ + random(floating?: boolean): number; + } + + interface LoDashImplicitWrapper { + /** + * @see _.random + */ + random( + max?: number, + floating?: boolean + ): number; + + /** + * @see _.random + */ + random(floating?: boolean): number; + } + + interface LoDashExplicitWrapper { + /** + * @see _.random + */ + random( + max?: number, + floating?: boolean + ): LoDashExplicitWrapper; + + /** + * @see _.random + */ + random(floating?: boolean): LoDashExplicitWrapper; + } + + /********** + * Object * + **********/ + + //_.assign + interface LoDashStatic { + /** + * Assigns own enumerable properties of source objects to the destination + * object. Source objects are applied from left to right. Subsequent sources + * overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object` and is loosely based on + * [`Object.assign`](https://mdn.io/Object/assign). + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @example + * + * function Foo() { + * this.c = 3; + * } + * + * function Bar() { + * this.e = 5; + * } + * + * Foo.prototype.d = 4; + * Bar.prototype.f = 6; + * + * _.assign({ 'a': 1 }, new Foo, new Bar); + * // => { 'a': 1, 'c': 3, 'e': 5 } + */ + assign( + object: TObject, + source: TSource + ): TObject & TSource; + + /** + * @see assign + */ + assign( + object: TObject, + source1: TSource1, + source2: TSource2 + ): TObject & TSource1 & TSource2; + + /** + * @see assign + */ + assign( + object: TObject, + source1: TSource1, + source2: TSource2, + source3: TSource3 + ): TObject & TSource1 & TSource2 & TSource3; + + /** + * @see assign + */ + assign( + object: TObject, + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4 + ): TObject & TSource1 & TSource2 & TSource3 & TSource4; + + /** + * @see _.assign + */ + assign(object: TObject): TObject; + + /** + * @see _.assign + */ + assign( + object: any, + ...otherArgs: any[] + ): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.assign + */ + assign( + source: TSource + ): LoDashImplicitObjectWrapper; + + /** + * @see assign + */ + assign( + source1: TSource1, + source2: TSource2 + ): LoDashImplicitObjectWrapper; + + /** + * @see assign + */ + assign( + source1: TSource1, + source2: TSource2, + source3: TSource3 + ): LoDashImplicitObjectWrapper; + + /** + * @see assign + */ + assign( + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4 + ): LoDashImplicitObjectWrapper; + + /** + * @see _.assign + */ + assign(): LoDashImplicitObjectWrapper; + + /** + * @see _.assign + */ + assign(...otherArgs: any[]): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.assign + */ + assign( + source: TSource + ): LoDashExplicitObjectWrapper; + + /** + * @see assign + */ + assign( + source1: TSource1, + source2: TSource2 + ): LoDashExplicitObjectWrapper; + + /** + * @see assign + */ + assign( + source1: TSource1, + source2: TSource2, + source3: TSource3 + ): LoDashExplicitObjectWrapper; + + /** + * @see assign + */ + assign( + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4 + ): LoDashExplicitObjectWrapper; + + /** + * @see _.assign + */ + assign(): LoDashExplicitObjectWrapper; + + /** + * @see _.assign + */ + assign(...otherArgs: any[]): LoDashExplicitObjectWrapper; + } + + //_.assignWith + interface AssignCustomizer { + (objectValue: any, sourceValue: any, key?: string, object?: {}, source?: {}): any; + } + + interface LoDashStatic { + /** + * This method is like `_.assign` except that it accepts `customizer` which + * is invoked to produce the assigned values. If `customizer` returns `undefined` + * assignment is handled by the method instead. The `customizer` is invoked + * with five arguments: (objValue, srcValue, key, object, source). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; + * } + * + * var defaults = _.partialRight(_.assignWith, customizer); + * + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + assignWith( + object: TObject, + source: TSource, + customizer: AssignCustomizer + ): TObject & TSource; + + /** + * @see assignWith + */ + assignWith( + object: TObject, + source1: TSource1, + source2: TSource2, + customizer: AssignCustomizer + ): TObject & TSource1 & TSource2; + + /** + * @see assignWith + */ + assignWith( + object: TObject, + source1: TSource1, + source2: TSource2, + source3: TSource3, + customizer: AssignCustomizer + ): TObject & TSource1 & TSource2 & TSource3; + + /** + * @see assignWith + */ + assignWith( + object: TObject, + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4, + customizer: AssignCustomizer + ): TObject & TSource1 & TSource2 & TSource3 & TSource4; + + /** + * @see _.assignWith + */ + assignWith(object: TObject): TObject; + + /** + * @see _.assignWith + */ + assignWith( + object: any, + ...otherArgs: any[] + ): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.assignWith + */ + assignWith( + source: TSource, + customizer: AssignCustomizer + ): LoDashImplicitObjectWrapper; + + /** + * @see assignWith + */ + assignWith( + source1: TSource1, + source2: TSource2, + customizer: AssignCustomizer + ): LoDashImplicitObjectWrapper; + + /** + * @see assignWith + */ + assignWith( + source1: TSource1, + source2: TSource2, + source3: TSource3, + customizer: AssignCustomizer + ): LoDashImplicitObjectWrapper; + + /** + * @see assignWith + */ + assignWith( + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4, + customizer: AssignCustomizer + ): LoDashImplicitObjectWrapper; + + /** + * @see _.assignWith + */ + assignWith(): LoDashImplicitObjectWrapper; + + /** + * @see _.assignWith + */ + assignWith(...otherArgs: any[]): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.assignWith + */ + assignWith( + source: TSource, + customizer: AssignCustomizer + ): LoDashExplicitObjectWrapper; + + /** + * @see assignWith + */ + assignWith( + source1: TSource1, + source2: TSource2, + customizer: AssignCustomizer + ): LoDashExplicitObjectWrapper; + + /** + * @see assignWith + */ + assignWith( + source1: TSource1, + source2: TSource2, + source3: TSource3, + customizer: AssignCustomizer + ): LoDashExplicitObjectWrapper; + + /** + * @see assignWith + */ + assignWith( + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4, + customizer: AssignCustomizer + ): LoDashExplicitObjectWrapper; + + /** + * @see _.assignWith + */ + assignWith(): LoDashExplicitObjectWrapper; + + /** + * @see _.assignWith + */ + assignWith(...otherArgs: any[]): LoDashExplicitObjectWrapper; + } + + //_.assignIn + interface LoDashStatic { + /** + * This method is like `_.assign` except that it iterates over own and + * inherited source properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @alias extend + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @example + * + * function Foo() { + * this.b = 2; + * } + * + * function Bar() { + * this.d = 4; + * } + * + * Foo.prototype.c = 3; + * Bar.prototype.e = 5; + * + * _.assignIn({ 'a': 1 }, new Foo, new Bar); + * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5 } + */ + assignIn( + object: TObject, + source: TSource + ): TObject & TSource; + + /** + * @see assignIn + */ + assignIn( + object: TObject, + source1: TSource1, + source2: TSource2 + ): TObject & TSource1 & TSource2; + + /** + * @see assignIn + */ + assignIn( + object: TObject, + source1: TSource1, + source2: TSource2, + source3: TSource3 + ): TObject & TSource1 & TSource2 & TSource3; + + /** + * @see assignIn + */ + assignIn( + object: TObject, + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4 + ): TObject & TSource1 & TSource2 & TSource3 & TSource4; + + /** + * @see _.assignIn + */ + assignIn(object: TObject): TObject; + + /** + * @see _.assignIn + */ + assignIn( + object: any, + ...otherArgs: any[] + ): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.assignIn + */ + assignIn( + source: TSource + ): LoDashImplicitObjectWrapper; + + /** + * @see assignIn + */ + assignIn( + source1: TSource1, + source2: TSource2 + ): LoDashImplicitObjectWrapper; + + /** + * @see assignIn + */ + assignIn( + source1: TSource1, + source2: TSource2, + source3: TSource3 + ): LoDashImplicitObjectWrapper; + + /** + * @see assignIn + */ + assignIn( + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4 + ): LoDashImplicitObjectWrapper; + + /** + * @see _.assignIn + */ + assignIn(): LoDashImplicitObjectWrapper; + + /** + * @see _.assignIn + */ + assignIn(...otherArgs: any[]): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.assignIn + */ + assignIn( + source: TSource + ): LoDashExplicitObjectWrapper; + + /** + * @see assignIn + */ + assignIn( + source1: TSource1, + source2: TSource2 + ): LoDashExplicitObjectWrapper; + + /** + * @see assignIn + */ + assignIn( + source1: TSource1, + source2: TSource2, + source3: TSource3 + ): LoDashExplicitObjectWrapper; + + /** + * @see assignIn + */ + assignIn( + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4 + ): LoDashExplicitObjectWrapper; + + /** + * @see _.assignIn + */ + assignIn(): LoDashExplicitObjectWrapper; + + /** + * @see _.assignIn + */ + assignIn(...otherArgs: any[]): LoDashExplicitObjectWrapper; + } + + //_.assignInWith + interface AssignCustomizer { + (objectValue: any, sourceValue: any, key?: string, object?: {}, source?: {}): any; + } + + interface LoDashStatic { + /** + * This method is like `_.assignIn` except that it accepts `customizer` which + * is invoked to produce the assigned values. If `customizer` returns `undefined` + * assignment is handled by the method instead. The `customizer` is invoked + * with five arguments: (objValue, srcValue, key, object, source). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @alias extendWith + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; + * } + * + * var defaults = _.partialRight(_.assignInWith, customizer); + * + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + assignInWith( + object: TObject, + source: TSource, + customizer: AssignCustomizer + ): TObject & TSource; + + /** + * @see assignInWith + */ + assignInWith( + object: TObject, + source1: TSource1, + source2: TSource2, + customizer: AssignCustomizer + ): TObject & TSource1 & TSource2; + + /** + * @see assignInWith + */ + assignInWith( + object: TObject, + source1: TSource1, + source2: TSource2, + source3: TSource3, + customizer: AssignCustomizer + ): TObject & TSource1 & TSource2 & TSource3; + + /** + * @see assignInWith + */ + assignInWith( + object: TObject, + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4, + customizer: AssignCustomizer + ): TObject & TSource1 & TSource2 & TSource3 & TSource4; + + /** + * @see _.assignInWith + */ + assignInWith(object: TObject): TObject; + + /** + * @see _.assignInWith + */ + assignInWith( + object: any, + ...otherArgs: any[] + ): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.assignInWith + */ + assignInWith( + source: TSource, + customizer: AssignCustomizer + ): LoDashImplicitObjectWrapper; + + /** + * @see assignInWith + */ + assignInWith( + source1: TSource1, + source2: TSource2, + customizer: AssignCustomizer + ): LoDashImplicitObjectWrapper; + + /** + * @see assignInWith + */ + assignInWith( + source1: TSource1, + source2: TSource2, + source3: TSource3, + customizer: AssignCustomizer + ): LoDashImplicitObjectWrapper; + + /** + * @see assignInWith + */ + assignInWith( + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4, + customizer: AssignCustomizer + ): LoDashImplicitObjectWrapper; + + /** + * @see _.assignInWith + */ + assignInWith(): LoDashImplicitObjectWrapper; + + /** + * @see _.assignInWith + */ + assignInWith(...otherArgs: any[]): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.assignInWith + */ + assignInWith( + source: TSource, + customizer: AssignCustomizer + ): LoDashExplicitObjectWrapper; + + /** + * @see assignInWith + */ + assignInWith( + source1: TSource1, + source2: TSource2, + customizer: AssignCustomizer + ): LoDashExplicitObjectWrapper; + + /** + * @see assignInWith + */ + assignInWith( + source1: TSource1, + source2: TSource2, + source3: TSource3, + customizer: AssignCustomizer + ): LoDashExplicitObjectWrapper; + + /** + * @see assignInWith + */ + assignInWith( + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4, + customizer: AssignCustomizer + ): LoDashExplicitObjectWrapper; + + /** + * @see _.assignInWith + */ + assignInWith(): LoDashExplicitObjectWrapper; + + /** + * @see _.assignInWith + */ + assignInWith(...otherArgs: any[]): LoDashExplicitObjectWrapper; + } + + //_.create + interface LoDashStatic { + /** + * Creates an object that inherits from the given prototype object. If a properties object is provided its own + * enumerable properties are assigned to the created object. + * + * @param prototype The object to inherit from. + * @param properties The properties to assign to the object. + * @return Returns the new object. + */ + create( + prototype: T, + properties?: U + ): T & U; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.create + */ + create(properties?: U): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.create + */ + create(properties?: U): LoDashExplicitObjectWrapper; + } + + + //_.defaults + interface LoDashStatic { + /** + * Assigns own enumerable properties of source object(s) to the destination object for all destination + * properties that resolve to undefined. Once a property is set, additional values of the same property are + * ignored. + * + * Note: This method mutates object. + * + * @param object The destination object. + * @param sources The source objects. + * @return The destination object. + */ + defaults( + object: TObject, + source: TSource + ): TSource & TObject; + + /** + * @see _.defaults + */ + defaults( + object: TObject, + source1: TSource1, + source2: TSource2 + ): TSource2 & TSource1 & TObject; + + /** + * @see _.defaults + */ + defaults( + object: TObject, + source1: TSource1, + source2: TSource2, + source3: TSource3 + ): TSource3 & TSource2 & TSource1 & TObject; + + /** + * @see _.defaults + */ + defaults( + object: TObject, + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4 + ): TSource4 & TSource3 & TSource2 & TSource1 & TObject; + + /** + * @see _.defaults + */ + defaults(object: TObject): TObject; + + /** + * @see _.defaults + */ + defaults( + object: any, + ...sources: any[] + ): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.defaults + */ + defaults( + source: TSource + ): LoDashImplicitObjectWrapper; + + /** + * @see _.defaults + */ + defaults( + source1: TSource1, + source2: TSource2 + ): LoDashImplicitObjectWrapper; + + /** + * @see _.defaults + */ + defaults( + source1: TSource1, + source2: TSource2, + source3: TSource3 + ): LoDashImplicitObjectWrapper; + + /** + * @see _.defaults + */ + defaults( + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4 + ): LoDashImplicitObjectWrapper; + + /** + * @see _.defaults + */ + defaults(): LoDashImplicitObjectWrapper; + + /** + * @see _.defaults + */ + defaults(...sources: any[]): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.defaults + */ + defaults( + source: TSource + ): LoDashExplicitObjectWrapper; + + /** + * @see _.defaults + */ + defaults( + source1: TSource1, + source2: TSource2 + ): LoDashExplicitObjectWrapper; + + /** + * @see _.defaults + */ + defaults( + source1: TSource1, + source2: TSource2, + source3: TSource3 + ): LoDashExplicitObjectWrapper; + + /** + * @see _.defaults + */ + defaults( + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4 + ): LoDashExplicitObjectWrapper; + + /** + * @see _.defaults + */ + defaults(): LoDashExplicitObjectWrapper; + + /** + * @see _.defaults + */ + defaults(...sources: any[]): LoDashExplicitObjectWrapper; + } + + //_.defaultsDeep + interface LoDashStatic { + /** + * This method is like _.defaults except that it recursively assigns default properties. + * @param object The destination object. + * @param sources The source objects. + * @return Returns object. + **/ + defaultsDeep( + object: T, + ...sources: any[]): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.defaultsDeep + **/ + defaultsDeep(...sources: any[]): LoDashImplicitObjectWrapper + } + + // _.extend + interface LoDashStatic { + /** + * @see _.assignIn + */ + extend( + object: TObject, + source: TSource + ): TObject & TSource; + + /** + * @see _.assignIn + */ + extend( + object: TObject, + source1: TSource1, + source2: TSource2 + ): TObject & TSource1 & TSource2; + + /** + * @see _.assignIn + */ + extend( + object: TObject, + source1: TSource1, + source2: TSource2, + source3: TSource3 + ): TObject & TSource1 & TSource2 & TSource3; + + /** + * @see _.assignIn + */ + extend( + object: TObject, + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4 + ): TObject & TSource1 & TSource2 & TSource3 & TSource4; + + /** + * @see _.assignIn + */ + extend(object: TObject): TObject; + + /** + * @see _.assignIn + */ + extend( + object: any, + ...otherArgs: any[] + ): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.assignIn + */ + extend( + source: TSource + ): LoDashImplicitObjectWrapper; + + /** + * @see _.assignIn + */ + extend( + source1: TSource1, + source2: TSource2 + ): LoDashImplicitObjectWrapper; + + /** + * @see _.assignIn + */ + extend( + source1: TSource1, + source2: TSource2, + source3: TSource3 + ): LoDashImplicitObjectWrapper; + + /** + * @see _.assignIn + */ + extend( + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4 + ): LoDashImplicitObjectWrapper; + + /** + * @see _.assignIn + */ + extend(): LoDashImplicitObjectWrapper; + + /** + * @see _.assignIn + */ + extend(...otherArgs: any[]): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.assignIn + */ + extend( + source: TSource + ): LoDashExplicitObjectWrapper; + + /** + * @see _.assignIn + */ + extend( + source1: TSource1, + source2: TSource2 + ): LoDashExplicitObjectWrapper; + + /** + * @see _.assignIn + */ + extend( + source1: TSource1, + source2: TSource2, + source3: TSource3 + ): LoDashExplicitObjectWrapper; + + /** + * @see _.assignIn + */ + extend( + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4 + ): LoDashExplicitObjectWrapper; + + /** + * @see _.assignIn + */ + extend(): LoDashExplicitObjectWrapper; + + /** + * @see _.assignIn + */ + extend(...otherArgs: any[]): LoDashExplicitObjectWrapper; + } + + interface LoDashStatic { + /** + * @see _.assignInWith + */ + extendWith( + object: TObject, + source: TSource, + customizer: AssignCustomizer + ): TObject & TSource; + + /** + * @see _.assignInWith + */ + extendWith( + object: TObject, + source1: TSource1, + source2: TSource2, + customizer: AssignCustomizer + ): TObject & TSource1 & TSource2; + + /** + * @see _.assignInWith + */ + extendWith( + object: TObject, + source1: TSource1, + source2: TSource2, + source3: TSource3, + customizer: AssignCustomizer + ): TObject & TSource1 & TSource2 & TSource3; + + /** + * @see _.assignInWith + */ + extendWith( + object: TObject, + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4, + customizer: AssignCustomizer + ): TObject & TSource1 & TSource2 & TSource3 & TSource4; + + /** + * @see _.assignInWith + */ + extendWith(object: TObject): TObject; + + /** + * @see _.assignInWith + */ + extendWith( + object: any, + ...otherArgs: any[] + ): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.assignInWith + */ + extendWith( + source: TSource, + customizer: AssignCustomizer + ): LoDashImplicitObjectWrapper; + + /** + * @see _.assignInWith + */ + extendWith( + source1: TSource1, + source2: TSource2, + customizer: AssignCustomizer + ): LoDashImplicitObjectWrapper; + + /** + * @see _.assignInWith + */ + extendWith( + source1: TSource1, + source2: TSource2, + source3: TSource3, + customizer: AssignCustomizer + ): LoDashImplicitObjectWrapper; + + /** + * @see _.assignInWith + */ + extendWith( + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4, + customizer: AssignCustomizer + ): LoDashImplicitObjectWrapper; + + /** + * @see _.assignInWith + */ + extendWith(): LoDashImplicitObjectWrapper; + + /** + * @see _.assignInWith + */ + extendWith(...otherArgs: any[]): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.assignInWith + */ + extendWith( + source: TSource, + customizer: AssignCustomizer + ): LoDashExplicitObjectWrapper; + + /** + * @see _.assignInWith + */ + extendWith( + source1: TSource1, + source2: TSource2, + customizer: AssignCustomizer + ): LoDashExplicitObjectWrapper; + + /** + * @see _.assignInWith + */ + extendWith( + source1: TSource1, + source2: TSource2, + source3: TSource3, + customizer: AssignCustomizer + ): LoDashExplicitObjectWrapper; + + /** + * @see _.assignInWith + */ + extendWith( + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4, + customizer: AssignCustomizer + ): LoDashExplicitObjectWrapper; + + /** + * @see _.assignInWith + */ + extendWith(): LoDashExplicitObjectWrapper; + + /** + * @see _.assignInWith + */ + extendWith(...otherArgs: any[]): LoDashExplicitObjectWrapper; + } + + //_.findKey + interface LoDashStatic { + /** + * This method is like _.find except that it returns the key of the first element predicate returns truthy for + * instead of the element itself. + * + * If a property name is provided for predicate the created _.property style callback returns the property + * value of the given element. + * + * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for + * elements that have a matching property value, else false. + * + * If an object is provided for predicate the created _.matches style callback returns true for elements that + * have the properties of the given object, else false. + * + * @param object The object to search. + * @param predicate The function invoked per iteration. + * @param thisArg The this binding of predicate. + * @return Returns the key of the matched element, else undefined. + */ + findKey( + object: TObject, + predicate?: DictionaryIterator + ): string; + + /** + * @see _.findKey + */ + findKey( + object: TObject, + predicate?: ObjectIterator + ): string; + + /** + * @see _.findKey + */ + findKey( + object: TObject, + predicate?: string + ): string; + + /** + * @see _.findKey + */ + findKey, TObject>( + object: TObject, + predicate?: TWhere + ): string; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.findKey + */ + findKey( + predicate?: DictionaryIterator + ): string; + + /** + * @see _.findKey + */ + findKey( + predicate?: ObjectIterator + ): string; + + /** + * @see _.findKey + */ + findKey( + predicate?: string + ): string; + + /** + * @see _.findKey + */ + findKey>( + predicate?: TWhere + ): string; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.findKey + */ + findKey( + predicate?: DictionaryIterator + ): LoDashExplicitWrapper; + + /** + * @see _.findKey + */ + findKey( + predicate?: ObjectIterator + ): LoDashExplicitWrapper; + + /** + * @see _.findKey + */ + findKey( + predicate?: string + ): LoDashExplicitWrapper; + + /** + * @see _.findKey + */ + findKey>( + predicate?: TWhere + ): LoDashExplicitWrapper; + } + + //_.findLastKey + interface LoDashStatic { + /** + * This method is like _.findKey except that it iterates over elements of a collection in the opposite order. + * + * If a property name is provided for predicate the created _.property style callback returns the property + * value of the given element. + * + * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for + * elements that have a matching property value, else false. + * + * If an object is provided for predicate the created _.matches style callback returns true for elements that + * have the properties of the given object, else false. + * + * @param object The object to search. + * @param predicate The function invoked per iteration. + * @param thisArg The this binding of predicate. + * @return Returns the key of the matched element, else undefined. + */ + findLastKey( + object: TObject, + predicate?: DictionaryIterator + ): string; + + /** + * @see _.findLastKey + */ + findLastKey( + object: TObject, + predicate?: ObjectIterator + ): string; + + /** + * @see _.findLastKey + */ + findLastKey( + object: TObject, + predicate?: string + ): string; + + /** + * @see _.findLastKey + */ + findLastKey, TObject>( + object: TObject, + predicate?: TWhere + ): string; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.findLastKey + */ + findLastKey( + predicate?: DictionaryIterator + ): string; + + /** + * @see _.findLastKey + */ + findLastKey( + predicate?: ObjectIterator + ): string; + + /** + * @see _.findLastKey + */ + findLastKey( + predicate?: string + ): string; + + /** + * @see _.findLastKey + */ + findLastKey>( + predicate?: TWhere + ): string; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.findLastKey + */ + findLastKey( + predicate?: DictionaryIterator + ): LoDashExplicitWrapper; + + /** + * @see _.findLastKey + */ + findLastKey( + predicate?: ObjectIterator + ): LoDashExplicitWrapper; + + /** + * @see _.findLastKey + */ + findLastKey( + predicate?: string + ): LoDashExplicitWrapper; + + /** + * @see _.findLastKey + */ + findLastKey>( + predicate?: TWhere + ): LoDashExplicitWrapper; + } + + //_.forIn + interface LoDashStatic { + /** + * Iterates over own and inherited enumerable properties of an object invoking iteratee for each property. The + * iteratee is bound to thisArg and invoked with three arguments: (value, key, object). Iteratee functions may + * exit iteration early by explicitly returning false. + * + * @param object The object to iterate over. + * @param iteratee The function invoked per iteration. + * @param thisArg The this binding of iteratee. + * @return Returns object. + */ + forIn( + object: Dictionary, + iteratee?: DictionaryIterator + ): Dictionary; + + /** + * @see _.forIn + */ + forIn( + object: T, + iteratee?: ObjectIterator + ): T; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.forIn + */ + forIn( + iteratee?: DictionaryIterator + ): _.LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.forIn + */ + forIn( + iteratee?: DictionaryIterator + ): _.LoDashExplicitObjectWrapper; + } + + //_.forInRight + interface LoDashStatic { + /** + * This method is like _.forIn except that it iterates over properties of object in the opposite order. + * + * @param object The object to iterate over. + * @param iteratee The function invoked per iteration. + * @param thisArg The this binding of iteratee. + * @return Returns object. + */ + forInRight( + object: Dictionary, + iteratee?: DictionaryIterator + ): Dictionary; + + /** + * @see _.forInRight + */ + forInRight( + object: T, + iteratee?: ObjectIterator + ): T; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.forInRight + */ + forInRight( + iteratee?: DictionaryIterator + ): _.LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.forInRight + */ + forInRight( + iteratee?: DictionaryIterator + ): _.LoDashExplicitObjectWrapper; + } + + //_.forOwn + interface LoDashStatic { + /** + * Iterates over own enumerable properties of an object invoking iteratee for each property. The iteratee is + * bound to thisArg and invoked with three arguments: (value, key, object). Iteratee functions may exit + * iteration early by explicitly returning false. + * + * @param object The object to iterate over. + * @param iteratee The function invoked per iteration. + * @param thisArg The this binding of iteratee. + * @return Returns object. + */ + forOwn( + object: Dictionary, + iteratee?: DictionaryIterator + ): Dictionary; + + /** + * @see _.forOwn + */ + forOwn( + object: T, + iteratee?: ObjectIterator + ): T; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.forOwn + */ + forOwn( + iteratee?: DictionaryIterator + ): _.LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.forOwn + */ + forOwn( + iteratee?: DictionaryIterator + ): _.LoDashExplicitObjectWrapper; + } + + //_.forOwnRight + interface LoDashStatic { + /** + * This method is like _.forOwn except that it iterates over properties of object in the opposite order. + * + * @param object The object to iterate over. + * @param iteratee The function invoked per iteration. + * @param thisArg The this binding of iteratee. + * @return Returns object. + */ + forOwnRight( + object: Dictionary, + iteratee?: DictionaryIterator + ): Dictionary; + + /** + * @see _.forOwnRight + */ + forOwnRight( + object: T, + iteratee?: ObjectIterator + ): T; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.forOwnRight + */ + forOwnRight( + iteratee?: DictionaryIterator + ): _.LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.forOwnRight + */ + forOwnRight( + iteratee?: DictionaryIterator + ): _.LoDashExplicitObjectWrapper; + } + + //_.functions + interface LoDashStatic { + /** + * Creates an array of function property names from own enumerable properties + * of `object`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to inspect. + * @returns {Array} Returns the new array of property names. + * @example + * + * function Foo() { + * this.a = _.constant('a'); + * this.b = _.constant('b'); + * } + * + * Foo.prototype.c = _.constant('c'); + * + * _.functions(new Foo); + * // => ['a', 'b'] + */ + functions(object: any): string[]; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.functions + */ + functions(): _.LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.functions + */ + functions(): _.LoDashExplicitArrayWrapper; + } + + //_.functionsIn + interface LoDashStatic { + /** + * Creates an array of function property names from own and inherited + * enumerable properties of `object`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to inspect. + * @returns {Array} Returns the new array of property names. + * @example + * + * function Foo() { + * this.a = _.constant('a'); + * this.b = _.constant('b'); + * } + * + * Foo.prototype.c = _.constant('c'); + * + * _.functionsIn(new Foo); + * // => ['a', 'b', 'c'] + */ + functionsIn(object: any): string[]; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.functionsIn + */ + functionsIn(): _.LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.functionsIn + */ + functionsIn(): _.LoDashExplicitArrayWrapper; + } + + //_.get + interface LoDashStatic { + /** + * Gets the property value at path of object. If the resolved value is undefined the defaultValue is used + * in its place. + * + * @param object The object to query. + * @param path The path of the property to get. + * @param defaultValue The value returned if the resolved value is undefined. + * @return Returns the resolved value. + */ + get( + object: TObject, + path: StringRepresentable|StringRepresentable[], + defaultValue?: TResult + ): TResult; + + /** + * @see _.get + */ + get( + object: any, + path: StringRepresentable|StringRepresentable[], + defaultValue?: TResult + ): TResult; + } + + interface LoDashImplicitWrapper { + /** + * @see _.get + */ + get( + path: StringRepresentable|StringRepresentable[], + defaultValue?: TResult + ): TResult; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.get + */ + get( + path: StringRepresentable|StringRepresentable[], + defaultValue?: TResult + ): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.get + */ + get( + path: StringRepresentable|StringRepresentable[], + defaultValue?: TResult + ): TResult; + } + + interface LoDashExplicitWrapper { + /** + * @see _.get + */ + get( + path: StringRepresentable|StringRepresentable[], + defaultValue?: any + ): TResultWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.get + */ + get( + path: StringRepresentable|StringRepresentable[], + defaultValue?: any + ): TResultWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.get + */ + get( + path: StringRepresentable|StringRepresentable[], + defaultValue?: any + ): TResultWrapper; + } + + //_.has + interface LoDashStatic { + /** + * Checks if `path` is a direct property of `object`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = { 'a': { 'b': { 'c': 3 } } }; + * var other = _.create({ 'a': _.create({ 'b': _.create({ 'c': 3 }) }) }); + * + * _.has(object, 'a'); + * // => true + * + * _.has(object, 'a.b.c'); + * // => true + * + * _.has(object, ['a', 'b', 'c']); + * // => true + * + * _.has(other, 'a'); + * // => false + */ + has( + object: T, + path: StringRepresentable|StringRepresentable[] + ): boolean; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.has + */ + has(path: StringRepresentable|StringRepresentable[]): boolean; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.has + */ + has(path: StringRepresentable|StringRepresentable[]): LoDashExplicitWrapper; + } + + //_.hasIn + interface LoDashStatic { + /** + * Checks if `path` is a direct or inherited property of `object`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = _.create({ 'a': _.create({ 'b': _.create({ 'c': 3 }) }) }); + * + * _.hasIn(object, 'a'); + * // => true + * + * _.hasIn(object, 'a.b.c'); + * // => true + * + * _.hasIn(object, ['a', 'b', 'c']); + * // => true + * + * _.hasIn(object, 'b'); + * // => false + */ + hasIn( + object: T, + path: StringRepresentable|StringRepresentable[] + ): boolean; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.hasIn + */ + hasIn(path: StringRepresentable|StringRepresentable[]): boolean; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.hasIn + */ + hasIn(path: StringRepresentable|StringRepresentable[]): LoDashExplicitWrapper; + } + + //_.invert + interface LoDashStatic { + /** + * Creates an object composed of the inverted keys and values of object. If object contains duplicate values, + * subsequent values overwrite property assignments of previous values unless multiValue is true. + * + * @param object The object to invert. + * @param multiValue Allow multiple values per key. + * @return Returns the new inverted object. + */ + invert( + object: T, + multiValue?: boolean + ): TResult; + + /** + * @see _.invert + */ + invert( + object: Object, + multiValue?: boolean + ): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.invert + */ + invert(multiValue?: boolean): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.invert + */ + invert(multiValue?: boolean): LoDashExplicitObjectWrapper; + } + + //_.inverBy + interface InvertByIterator { + (value: T): any; + } + + interface LoDashStatic { + /** + * This method is like _.invert except that the inverted object is generated from the results of running each + * element of object through iteratee. The corresponding inverted value of each inverted key is an array of + * keys responsible for generating the inverted value. The iteratee is invoked with one argument: (value). + * + * @param object The object to invert. + * @param interatee The iteratee invoked per element. + * @return Returns the new inverted object. + */ + invertBy( + object: Object, + interatee?: InvertByIterator|string + ): Dictionary; + + /** + * @see _.invertBy + */ + invertBy( + object: _.Dictionary|_.NumericDictionary, + interatee?: InvertByIterator|string + ): Dictionary; + + /** + * @see _.invertBy + */ + invertBy( + object: Object, + interatee?: W + ): Dictionary; + + /** + * @see _.invertBy + */ + invertBy( + object: _.Dictionary, + interatee?: W + ): Dictionary; + } + + interface LoDashImplicitWrapper { + /** + * @see _.invertBy + */ + invertBy( + interatee?: InvertByIterator + ): LoDashImplicitObjectWrapper>; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.invertBy + */ + invertBy( + interatee?: InvertByIterator|string + ): LoDashImplicitObjectWrapper>; + + /** + * @see _.invertBy + */ + invertBy( + interatee?: W + ): LoDashImplicitObjectWrapper>; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.invertBy + */ + invertBy( + interatee?: InvertByIterator|string + ): LoDashImplicitObjectWrapper>; + + /** + * @see _.invertBy + */ + invertBy( + interatee?: W + ): LoDashImplicitObjectWrapper>; + } + + interface LoDashExplicitWrapper { + /** + * @see _.invertBy + */ + invertBy( + interatee?: InvertByIterator + ): LoDashExplicitObjectWrapper>; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.invertBy + */ + invertBy( + interatee?: InvertByIterator|string + ): LoDashExplicitObjectWrapper>; + + /** + * @see _.invertBy + */ + invertBy( + interatee?: W + ): LoDashExplicitObjectWrapper>; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.invertBy + */ + invertBy( + interatee?: InvertByIterator|string + ): LoDashExplicitObjectWrapper>; + + /** + * @see _.invertBy + */ + invertBy( + interatee?: W + ): LoDashExplicitObjectWrapper>; + } + + //_.keys + interface LoDashStatic { + /** + * Creates an array of the own enumerable property names of object. + * + * Note: Non-object values are coerced to objects. See the ES spec for more details. + * + * @param object The object to query. + * @return Returns the array of property names. + */ + keys(object?: any): string[]; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.keys + */ + keys(): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.keys + */ + keys(): LoDashExplicitArrayWrapper; + } + + //_.keysIn + interface LoDashStatic { + /** + * Creates an array of the own and inherited enumerable property names of object. + * + * Note: Non-object values are coerced to objects. + * + * @param object The object to query. + * @return An array of property names. + */ + keysIn(object?: any): string[]; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.keysIn + */ + keysIn(): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.keysIn + */ + keysIn(): LoDashExplicitArrayWrapper; + } + + //_.mapKeys + interface LoDashStatic { + /** + * The opposite of _.mapValues; this method creates an object with the same values as object and keys generated + * by running each own enumerable property of object through iteratee. + * + * @param object The object to iterate over. + * @param iteratee The function invoked per iteration. + * @param thisArg The this binding of iteratee. + * @return Returns the new mapped object. + */ + mapKeys( + object: List, + iteratee?: ListIterator + ): Dictionary; + + /** + * @see _.mapKeys + */ + mapKeys( + object: Dictionary, + iteratee?: DictionaryIterator + ): Dictionary; + + /** + * @see _.mapKeys + */ + mapKeys( + object: List|Dictionary, + iteratee?: TObject + ): Dictionary; + + /** + * @see _.mapKeys + */ + mapKeys( + object: List|Dictionary, + iteratee?: string + ): Dictionary; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.mapKeys + */ + mapKeys( + iteratee?: ListIterator + ): LoDashImplicitObjectWrapper>; + + /** + * @see _.mapKeys + */ + mapKeys( + iteratee?: TObject + ): LoDashImplicitObjectWrapper>; + + /** + * @see _.mapKeys + */ + mapKeys( + iteratee?: string + ): LoDashImplicitObjectWrapper>; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.mapKeys + */ + mapKeys( + iteratee?: ListIterator|DictionaryIterator + ): LoDashImplicitObjectWrapper>; + + /** + * @see _.mapKeys + */ + mapKeys( + iteratee?: TObject + ): LoDashImplicitObjectWrapper>; + + /** + * @see _.mapKeys + */ + mapKeys( + iteratee?: string + ): LoDashImplicitObjectWrapper>; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.mapKeys + */ + mapKeys( + iteratee?: ListIterator + ): LoDashExplicitObjectWrapper>; + + /** + * @see _.mapKeys + */ + mapKeys( + iteratee?: TObject + ): LoDashExplicitObjectWrapper>; + + /** + * @see _.mapKeys + */ + mapKeys( + iteratee?: string + ): LoDashExplicitObjectWrapper>; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.mapKeys + */ + mapKeys( + iteratee?: ListIterator|DictionaryIterator + ): LoDashExplicitObjectWrapper>; + + /** + * @see _.mapKeys + */ + mapKeys( + iteratee?: TObject + ): LoDashExplicitObjectWrapper>; + + /** + * @see _.mapKeys + */ + mapKeys( + iteratee?: string + ): LoDashExplicitObjectWrapper>; + } + + //_.mapValues + interface LoDashStatic { + /** + * Creates an object with the same keys as object and values generated by running each own + * enumerable property of object through iteratee. The iteratee function is bound to thisArg + * and invoked with three arguments: (value, key, object). + * + * If a property name is provided iteratee the created "_.property" style callback returns + * the property value of the given element. + * + * If a value is also provided for thisArg the creted "_.matchesProperty" style callback returns + * true for elements that have a matching property value, else false;. + * + * If an object is provided for iteratee the created "_.matches" style callback returns true + * for elements that have the properties of the given object, else false. + * + * @param {Object} object The object to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked per iteration. + * @param {Object} [thisArg] The `this` binding of `iteratee`. + * @return {Object} Returns the new mapped object. + */ + mapValues(obj: Dictionary, callback: ObjectIterator): Dictionary; + mapValues(obj: Dictionary, where: Dictionary): Dictionary; + mapValues(obj: T, pluck: string): TMapped; + mapValues(obj: T, callback: ObjectIterator): T; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.mapValues + * TValue is the type of the property values of T. + * TResult is the type output by the ObjectIterator function + */ + mapValues(callback: ObjectIterator): LoDashImplicitObjectWrapper>; + + /** + * @see _.mapValues + * TResult is the type of the property specified by pluck. + * T should be a Dictionary> + */ + mapValues(pluck: string): LoDashImplicitObjectWrapper>; + + /** + * @see _.mapValues + * TResult is the type of the properties of each object in the values of T + * T should be a Dictionary> + */ + mapValues(where: Dictionary): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.mapValues + * TValue is the type of the property values of T. + * TResult is the type output by the ObjectIterator function + */ + mapValues(callback: ObjectIterator): LoDashExplicitObjectWrapper>; + + /** + * @see _.mapValues + * TResult is the type of the property specified by pluck. + * T should be a Dictionary> + */ + mapValues(pluck: string): LoDashExplicitObjectWrapper>; + + /** + * @see _.mapValues + * TResult is the type of the properties of each object in the values of T + * T should be a Dictionary> + */ + mapValues(where: Dictionary): LoDashExplicitObjectWrapper; + } + + //_.merge + interface LoDashStatic { + /** + * Recursively merges own and inherited enumerable properties of source + * objects into the destination object, skipping source properties that resolve + * to `undefined`. Array and plain object properties are merged recursively. + * Other objects and value types are overridden by assignment. Source objects + * are applied from left to right. Subsequent sources overwrite property + * assignments of previous sources. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @example + * + * var users = { + * 'data': [{ 'user': 'barney' }, { 'user': 'fred' }] + * }; + * + * var ages = { + * 'data': [{ 'age': 36 }, { 'age': 40 }] + * }; + * + * _.merge(users, ages); + * // => { 'data': [{ 'user': 'barney', 'age': 36 }, { 'user': 'fred', 'age': 40 }] } + */ + merge( + object: TObject, + source: TSource + ): TObject & TSource; + + /** + * @see _.merge + */ + merge( + object: TObject, + source1: TSource1, + source2: TSource2 + ): TObject & TSource1 & TSource2; + + /** + * @see _.merge + */ + merge( + object: TObject, + source1: TSource1, + source2: TSource2, + source3: TSource3 + ): TObject & TSource1 & TSource2 & TSource3; + + /** + * @see _.merge + */ + merge( + object: TObject, + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4 + ): TObject & TSource1 & TSource2 & TSource3 & TSource4; + + /** + * @see _.merge + */ + merge( + object: any, + ...otherArgs: any[] + ): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.merge + */ + merge( + source: TSource + ): LoDashImplicitObjectWrapper; + + /** + * @see _.merge + */ + merge( + source1: TSource1, + source2: TSource2 + ): LoDashImplicitObjectWrapper; + + /** + * @see _.merge + */ + merge( + source1: TSource1, + source2: TSource2, + source3: TSource3 + ): LoDashImplicitObjectWrapper; + + /** + * @see _.merge + */ + merge( + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4 + ): LoDashImplicitObjectWrapper; + + /** + * @see _.merge + */ + merge( + ...otherArgs: any[] + ): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.merge + */ + merge( + source: TSource + ): LoDashExplicitObjectWrapper; + + /** + * @see _.merge + */ + merge( + source1: TSource1, + source2: TSource2 + ): LoDashExplicitObjectWrapper; + + /** + * @see _.merge + */ + merge( + source1: TSource1, + source2: TSource2, + source3: TSource3 + ): LoDashExplicitObjectWrapper; + + /** + * @see _.merge + */ + merge( + ): LoDashExplicitObjectWrapper; + + /** + * @see _.merge + */ + merge( + ...otherArgs: any[] + ): LoDashExplicitObjectWrapper; + } + + //_.mergeWith + interface MergeWithCustomizer { + (value: any, srcValue: any, key?: string, object?: Object, source?: Object): any; + } + + interface LoDashStatic { + /** + * This method is like `_.merge` except that it accepts `customizer` which + * is invoked to produce the merged values of the destination and source + * properties. If `customizer` returns `undefined` merging is handled by the + * method instead. The `customizer` is invoked with seven arguments: + * (objValue, srcValue, key, object, source, stack). + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} customizer The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * function customizer(objValue, srcValue) { + * if (_.isArray(objValue)) { + * return objValue.concat(srcValue); + * } + * } + * + * var object = { + * 'fruits': ['apple'], + * 'vegetables': ['beet'] + * }; + * + * var other = { + * 'fruits': ['banana'], + * 'vegetables': ['carrot'] + * }; + * + * _.merge(object, other, customizer); + * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot'] } + */ + mergeWith( + object: TObject, + source: TSource, + customizer: MergeWithCustomizer + ): TObject & TSource; + + /** + * @see _.mergeWith + */ + mergeWith( + object: TObject, + source1: TSource1, + source2: TSource2, + customizer: MergeWithCustomizer + ): TObject & TSource1 & TSource2; + + /** + * @see _.mergeWith + */ + mergeWith( + object: TObject, + source1: TSource1, + source2: TSource2, + source3: TSource3, + customizer: MergeWithCustomizer + ): TObject & TSource1 & TSource2 & TSource3; + + /** + * @see _.mergeWith + */ + mergeWith( + object: TObject, + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4, + customizer: MergeWithCustomizer + ): TObject & TSource1 & TSource2 & TSource3 & TSource4; + + /** + * @see _.mergeWith + */ + mergeWith( + object: any, + ...otherArgs: any[] + ): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.mergeWith + */ + mergeWith( + source: TSource, + customizer: MergeWithCustomizer + ): LoDashImplicitObjectWrapper; + + /** + * @see _.mergeWith + */ + mergeWith( + source1: TSource1, + source2: TSource2, + customizer: MergeWithCustomizer + ): LoDashImplicitObjectWrapper; + + /** + * @see _.mergeWith + */ + mergeWith( + source1: TSource1, + source2: TSource2, + source3: TSource3, + customizer: MergeWithCustomizer + ): LoDashImplicitObjectWrapper; + + /** + * @see _.mergeWith + */ + mergeWith( + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4, + customizer: MergeWithCustomizer + ): LoDashImplicitObjectWrapper; + + /** + * @see _.mergeWith + */ + mergeWith( + ...otherArgs: any[] + ): LoDashImplicitObjectWrapper; + } + + //_.omit + interface LoDashStatic { + /** + * The opposite of `_.pick`; this method creates an object composed of the + * own and inherited enumerable properties of `object` that are not omitted. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [props] The property names to omit, specified + * individually or in arrays.. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.omit(object, ['a', 'c']); + * // => { 'b': '2' } + */ + + omit( + object: T, + ...predicate: (StringRepresentable|StringRepresentable[])[] + ): TResult; + } + + interface LoDashImplicitObjectWrapper { + + /** + * @see _.omit + */ + omit( + ...predicate: (StringRepresentable|StringRepresentable[])[] + ): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + + /** + * @see _.omit + */ + omit( + ...predicate: (StringRepresentable|StringRepresentable[])[] + ): LoDashExplicitObjectWrapper; + } + + //_.omitBy + interface LoDashStatic { + /** + * The opposite of `_.pickBy`; this method creates an object composed of the + * own and inherited enumerable properties of `object` that `predicate` + * doesn't return truthy for. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {Function|Object|string} [predicate=_.identity] The function invoked per property. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.omitBy(object, _.isNumber); + * // => { 'b': '2' } + */ + omitBy( + object: T, + predicate: ObjectIterator + ): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.omitBy + */ + omitBy( + predicate: ObjectIterator + ): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.omitBy + */ + omitBy( + predicate: ObjectIterator + ): LoDashExplicitObjectWrapper; + } + + //_.pick + interface LoDashStatic { + /** + * Creates an object composed of the picked `object` properties. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [props] The property names to pick, specified + * individually or in arrays. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pick(object, ['a', 'c']); + * // => { 'a': 1, 'c': 3 } + */ + pick( + object: T, + ...predicate: (StringRepresentable|StringRepresentable[])[] + ): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.pick + */ + pick( + ...predicate: (StringRepresentable|StringRepresentable[])[] + ): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.pick + */ + pick( + ...predicate: (StringRepresentable|StringRepresentable[])[] + ): LoDashExplicitObjectWrapper; + } + + //_.pickBy + interface LoDashStatic { + /** + * Creates an object composed of the `object` properties `predicate` returns + * truthy for. The predicate is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {Function|Object|string} [predicate=_.identity] The function invoked per property. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pickBy(object, _.isNumber); + * // => { 'a': 1, 'c': 3 } + */ + pickBy( + object: T, + predicate?: ObjectIterator + ): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.pickBy + */ + pickBy( + predicate?: ObjectIterator + ): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.pickBy + */ + pickBy( + predicate?: ObjectIterator + ): LoDashExplicitObjectWrapper; + } + + //_.result + interface LoDashStatic { + /** + * This method is like _.get except that if the resolved value is a function it’s invoked with the this binding + * of its parent object and its result is returned. + * + * @param object The object to query. + * @param path The path of the property to resolve. + * @param defaultValue The value returned if the resolved value is undefined. + * @return Returns the resolved value. + */ + result( + object: TObject, + path: StringRepresentable|StringRepresentable[], + defaultValue?: TResult|((...args: any[]) => TResult) + ): TResult; + + /** + * @see _.result + */ + result( + object: any, + path: StringRepresentable|StringRepresentable[], + defaultValue?: TResult|((...args: any[]) => TResult) + ): TResult; + } + + interface LoDashImplicitWrapper { + /** + * @see _.result + */ + result( + path: StringRepresentable|StringRepresentable[], + defaultValue?: TResult|((...args: any[]) => TResult) + ): TResult; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.result + */ + result( + path: StringRepresentable|StringRepresentable[], + defaultValue?: TResult|((...args: any[]) => TResult) + ): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.result + */ + result( + path: StringRepresentable|StringRepresentable[], + defaultValue?: TResult|((...args: any[]) => TResult) + ): TResult; + } + + interface LoDashExplicitWrapper { + /** + * @see _.result + */ + result( + path: StringRepresentable|StringRepresentable[], + defaultValue?: any + ): TResultWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.result + */ + result( + path: StringRepresentable|StringRepresentable[], + defaultValue?: any + ): TResultWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.result + */ + result( + path: StringRepresentable|StringRepresentable[], + defaultValue?: any + ): TResultWrapper; + } + + //_.set + interface LoDashStatic { + /** + * Sets the value at path of object. If a portion of path doesn’t exist it’s created. Arrays are created for + * missing index properties while objects are created for all other missing properties. Use _.setWith to + * customize path creation. + * + * @param object The object to modify. + * @param path The path of the property to set. + * @param value The value to set. + * @return Returns object. + */ + set( + object: Object, + path: StringRepresentable|StringRepresentable[], + value: any + ): TResult; + + /** + * @see _.set + */ + set( + object: Object, + path: StringRepresentable|StringRepresentable[], + value: V + ): TResult; + + /** + * @see _.set + */ + set( + object: O, + path: StringRepresentable|StringRepresentable[], + value: V + ): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.set + */ + set( + path: StringRepresentable|StringRepresentable[], + value: any + ): LoDashImplicitObjectWrapper; + + /** + * @see _.set + */ + set( + path: StringRepresentable|StringRepresentable[], + value: V + ): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.set + */ + set( + path: StringRepresentable|StringRepresentable[], + value: any + ): LoDashExplicitObjectWrapper; + + /** + * @see _.set + */ + set( + path: StringRepresentable|StringRepresentable[], + value: V + ): LoDashExplicitObjectWrapper; + } + + //_.setWith + interface SetWithCustomizer { + (nsValue: any, key: string, nsObject: T): any; + } + + interface LoDashStatic { + /** + * This method is like _.set except that it accepts customizer which is invoked to produce the objects of + * path. If customizer returns undefined path creation is handled by the method instead. The customizer is + * invoked with three arguments: (nsValue, key, nsObject). + * + * @param object The object to modify. + * @param path The path of the property to set. + * @param value The value to set. + * @parem customizer The function to customize assigned values. + * @return Returns object. + */ + setWith( + object: Object, + path: StringRepresentable|StringRepresentable[], + value: any, + customizer?: SetWithCustomizer + ): TResult; + + /** + * @see _.setWith + */ + setWith( + object: Object, + path: StringRepresentable|StringRepresentable[], + value: V, + customizer?: SetWithCustomizer + ): TResult; + + /** + * @see _.setWith + */ + setWith( + object: O, + path: StringRepresentable|StringRepresentable[], + value: V, + customizer?: SetWithCustomizer + ): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.setWith + */ + setWith( + path: StringRepresentable|StringRepresentable[], + value: any, + customizer?: SetWithCustomizer + ): LoDashImplicitObjectWrapper; + + /** + * @see _.setWith + */ + setWith( + path: StringRepresentable|StringRepresentable[], + value: V, + customizer?: SetWithCustomizer + ): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.setWith + */ + setWith( + path: StringRepresentable|StringRepresentable[], + value: any, + customizer?: SetWithCustomizer + ): LoDashExplicitObjectWrapper; + + /** + * @see _.setWith + */ + setWith( + path: StringRepresentable|StringRepresentable[], + value: V, + customizer?: SetWithCustomizer + ): LoDashExplicitObjectWrapper; + } + + //_.toPairs + interface LoDashStatic { + /** + * Creates an array of own enumerable key-value pairs for object. + * + * @param object The object to query. + * @return Returns the new array of key-value pairs. + */ + toPairs(object?: T): any[][]; + + toPairs(object?: T): TResult[][]; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.toPairs + */ + toPairs(): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.toPairs + */ + toPairs(): LoDashExplicitArrayWrapper; + } + + //_.toPairsIn + interface LoDashStatic { + /** + * Creates an array of own and inherited enumerable key-value pairs for object. + * + * @param object The object to query. + * @return Returns the new array of key-value pairs. + */ + toPairsIn(object?: T): any[][]; + + toPairsIn(object?: T): TResult[][]; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.toPairsIn + */ + toPairsIn(): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.toPairsIn + */ + toPairsIn(): LoDashExplicitArrayWrapper; + } + + //_.transform + interface LoDashStatic { + /** + * An alternative to _.reduce; this method transforms object to a new accumulator object which is the result of + * running each of its own enumerable properties through iteratee, with each invocation potentially mutating + * the accumulator object. The iteratee is bound to thisArg and invoked with four arguments: (accumulator, + * value, key, object). Iteratee functions may exit iteration early by explicitly returning false. + * + * @param object The object to iterate over. + * @param iteratee The function invoked per iteration. + * @param accumulator The custom accumulator value. + * @param thisArg The this binding of iteratee. + * @return Returns the accumulated value. + */ + transform( + object: T[], + iteratee?: MemoVoidArrayIterator, + accumulator?: TResult[] + ): TResult[]; + + /** + * @see _.transform + */ + transform( + object: T[], + iteratee?: MemoVoidArrayIterator>, + accumulator?: Dictionary + ): Dictionary; + + /** + * @see _.transform + */ + transform( + object: Dictionary, + iteratee?: MemoVoidDictionaryIterator>, + accumulator?: Dictionary + ): Dictionary; + + /** + * @see _.transform + */ + transform( + object: Dictionary, + iteratee?: MemoVoidDictionaryIterator, + accumulator?: TResult[] + ): TResult[]; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.transform + */ + transform( + iteratee?: MemoVoidArrayIterator, + accumulator?: TResult[] + ): LoDashImplicitArrayWrapper; + + /** + * @see _.transform + */ + transform( + iteratee?: MemoVoidArrayIterator>, + accumulator?: Dictionary + ): LoDashImplicitObjectWrapper>; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.transform + */ + transform( + iteratee?: MemoVoidDictionaryIterator>, + accumulator?: Dictionary + ): LoDashImplicitObjectWrapper>; + + /** + * @see _.transform + */ + transform( + iteratee?: MemoVoidDictionaryIterator, + accumulator?: TResult[] + ): LoDashImplicitArrayWrapper; + } + + //_.unset + interface LoDashStatic { + /** + * Removes the property at path of object. + * + * Note: This method mutates object. + * + * @param object The object to modify. + * @param path The path of the property to unset. + * @return Returns true if the property is deleted, else false. + */ + unset( + object: T, + path: StringRepresentable|StringRepresentable[] + ): boolean; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.unset + */ + unset(path: StringRepresentable|StringRepresentable[]): LoDashImplicitWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.unset + */ + unset(path: StringRepresentable|StringRepresentable[]): LoDashExplicitWrapper; + } + + //_.update + interface LoDashStatic { + /** + * This method is like _.set except that accepts updater to produce the value to set. Use _.updateWith to + * customize path creation. The updater is invoked with one argument: (value). + * + * @param object The object to modify. + * @param path The path of the property to set. + * @param updater The function to produce the updated value. + * @return Returns object. + */ + update( + object: Object, + path: StringRepresentable|StringRepresentable[], + updater: Function + ): TResult; + + /** + * @see _.update + */ + update( + object: Object, + path: StringRepresentable|StringRepresentable[], + updater: U + ): TResult; + + /** + * @see _.update + */ + update( + object: O, + path: StringRepresentable|StringRepresentable[], + updater: Function + ): TResult; + + /** + * @see _.update + */ + update( + object: O, + path: StringRepresentable|StringRepresentable[], + updater: U + ): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.update + */ + update( + path: StringRepresentable|StringRepresentable[], + updater: any + ): LoDashImplicitObjectWrapper; + + /** + * @see _.update + */ + update( + path: StringRepresentable|StringRepresentable[], + updater: U + ): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.update + */ + update( + path: StringRepresentable|StringRepresentable[], + updater: any + ): LoDashExplicitObjectWrapper; + + /** + * @see _.update + */ + update( + path: StringRepresentable|StringRepresentable[], + updater: U + ): LoDashExplicitObjectWrapper; + } + + //_.values + interface LoDashStatic { + /** + * Creates an array of the own enumerable property values of object. + * + * @param object The object to query. + * @return Returns an array of property values. + */ + values(object?: Dictionary): T[]; + + /** + * @see _.values + */ + values(object?: any): T[]; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.values + */ + values(): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.values + */ + values(): LoDashExplicitArrayWrapper; + } + + //_.valuesIn + interface LoDashStatic { + /** + * Creates an array of the own and inherited enumerable property values of object. + * + * @param object The object to query. + * @return Returns the array of property values. + */ + valuesIn(object?: Dictionary): T[]; + + /** + * @see _.valuesIn + */ + valuesIn(object?: any): T[]; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.valuesIn + */ + valuesIn(): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.valuesIn + */ + valuesIn(): LoDashExplicitArrayWrapper; + } + + /********** + * String * + **********/ + + //_.camelCase + interface LoDashStatic { + /** + * Converts string to camel case. + * + * @param string The string to convert. + * @return Returns the camel cased string. + */ + camelCase(string?: string): string; + } + + interface LoDashImplicitWrapper { + /** + * @see _.camelCase + */ + camelCase(): string; + } + + interface LoDashExplicitWrapper { + /** + * @see _.camelCase + */ + camelCase(): LoDashExplicitWrapper; + } + + //_.capitalize + interface LoDashStatic { + /** + * Converts the first character of string to upper case and the remaining to lower case. + * + * @param string The string to capitalize. + * @return Returns the capitalized string. + */ + capitalize(string?: string): string; + } + + interface LoDashImplicitWrapper { + /** + * @see _.capitalize + */ + capitalize(): string; + } + + interface LoDashExplicitWrapper { + /** + * @see _.capitalize + */ + capitalize(): LoDashExplicitWrapper; + } + + //_.deburr + interface LoDashStatic { + /** + * Deburrs string by converting latin-1 supplementary letters to basic latin letters and removing combining + * diacritical marks. + * + * @param string The string to deburr. + * @return Returns the deburred string. + */ + deburr(string?: string): string; + } + + interface LoDashImplicitWrapper { + /** + * @see _.deburr + */ + deburr(): string; + } + + interface LoDashExplicitWrapper { + /** + * @see _.deburr + */ + deburr(): LoDashExplicitWrapper; + } + + //_.endsWith + interface LoDashStatic { + /** + * Checks if string ends with the given target string. + * + * @param string The string to search. + * @param target The string to search for. + * @param position The position to search from. + * @return Returns true if string ends with target, else false. + */ + endsWith( + string?: string, + target?: string, + position?: number + ): boolean; + } + + interface LoDashImplicitWrapper { + /** + * @see _.endsWith + */ + endsWith( + target?: string, + position?: number + ): boolean; + } + + interface LoDashExplicitWrapper { + /** + * @see _.endsWith + */ + endsWith( + target?: string, + position?: number + ): LoDashExplicitWrapper; + } + + // _.escape + interface LoDashStatic { + /** + * Converts the characters "&", "<", ">", '"', "'", and "`" in string to their corresponding HTML entities. + * + * Note: No other characters are escaped. To escape additional characters use a third-party library like he. + * + * hough the ">" character is escaped for symmetry, characters like ">" and "/" don’t need escaping in HTML + * and have no special meaning unless they're part of a tag or unquoted attribute value. See Mathias Bynens’s + * article (under "semi-related fun fact") for more details. + * + * Backticks are escaped because in IE < 9, they can break out of attribute values or HTML comments. See #59, + * #102, #108, and #133 of the HTML5 Security Cheatsheet for more details. + * + * When working with HTML you should always quote attribute values to reduce XSS vectors. + * + * @param string The string to escape. + * @return Returns the escaped string. + */ + escape(string?: string): string; + } + + interface LoDashImplicitWrapper { + /** + * @see _.escape + */ + escape(): string; + } + + interface LoDashExplicitWrapper { + /** + * @see _.escape + */ + escape(): LoDashExplicitWrapper; + } + + // _.escapeRegExp + interface LoDashStatic { + /** + * Escapes the RegExp special characters "^", "$", "\", ".", "*", "+", "?", "(", ")", "[", "]", + * "{", "}", and "|" in string. + * + * @param string The string to escape. + * @return Returns the escaped string. + */ + escapeRegExp(string?: string): string; + } + + interface LoDashImplicitWrapper { + /** + * @see _.escapeRegExp + */ + escapeRegExp(): string; + } + + interface LoDashExplicitWrapper { + /** + * @see _.escapeRegExp + */ + escapeRegExp(): LoDashExplicitWrapper; + } + + //_.kebabCase + interface LoDashStatic { + /** + * Converts string to kebab case. + * + * @param string The string to convert. + * @return Returns the kebab cased string. + */ + kebabCase(string?: string): string; + } + + interface LoDashImplicitWrapper { + /** + * @see _.kebabCase + */ + kebabCase(): string; + } + + interface LoDashExplicitWrapper { + /** + * @see _.kebabCase + */ + kebabCase(): LoDashExplicitWrapper; + } + + //_.lowerCase + interface LoDashStatic { + /** + * Converts `string`, as space separated words, to lower case. + * + * @param string The string to convert. + * @return Returns the lower cased string. + */ + lowerCase(string?: string): string; + } + + interface LoDashImplicitWrapper { + /** + * @see _.lowerCase + */ + lowerCase(): string; + } + + interface LoDashExplicitWrapper { + /** + * @see _.lowerCase + */ + lowerCase(): LoDashExplicitWrapper; + } + + //_.lowerFirst + interface LoDashStatic { + /** + * Converts the first character of `string` to lower case. + * + * @param string The string to convert. + * @return Returns the converted string. + */ + lowerFirst(string?: string): string; + } + + interface LoDashImplicitWrapper { + /** + * @see _.lowerFirst + */ + lowerFirst(): string; + } + + interface LoDashExplicitWrapper { + /** + * @see _.lowerFirst + */ + lowerFirst(): LoDashExplicitWrapper; + } + + //_.pad + interface LoDashStatic { + /** + * Pads string on the left and right sides if it’s shorter than length. Padding characters are truncated if + * they can’t be evenly divided by length. + * + * @param string The string to pad. + * @param length The padding length. + * @param chars The string used as padding. + * @return Returns the padded string. + */ + pad( + string?: string, + length?: number, + chars?: string + ): string; + } + + interface LoDashImplicitWrapper { + /** + * @see _.pad + */ + pad( + length?: number, + chars?: string + ): string; + } + + interface LoDashExplicitWrapper { + /** + * @see _.pad + */ + pad( + length?: number, + chars?: string + ): LoDashExplicitWrapper; + } + + //_.padEnd + interface LoDashStatic { + /** + * Pads string on the right side if it’s shorter than length. Padding characters are truncated if they exceed + * length. + * + * @param string The string to pad. + * @param length The padding length. + * @param chars The string used as padding. + * @return Returns the padded string. + */ + padEnd( + string?: string, + length?: number, + chars?: string + ): string; + } + + interface LoDashImplicitWrapper { + /** + * @see _.padEnd + */ + padEnd( + length?: number, + chars?: string + ): string; + } + + interface LoDashExplicitWrapper { + /** + * @see _.padEnd + */ + padEnd( + length?: number, + chars?: string + ): LoDashExplicitWrapper; + } + + //_.padStart + interface LoDashStatic { + /** + * Pads string on the left side if it’s shorter than length. Padding characters are truncated if they exceed + * length. + * + * @param string The string to pad. + * @param length The padding length. + * @param chars The string used as padding. + * @return Returns the padded string. + */ + padStart( + string?: string, + length?: number, + chars?: string + ): string; + } + + interface LoDashImplicitWrapper { + /** + * @see _.padStart + */ + padStart( + length?: number, + chars?: string + ): string; + } + + interface LoDashExplicitWrapper { + /** + * @see _.padStart + */ + padStart( + length?: number, + chars?: string + ): LoDashExplicitWrapper; + } + + //_.parseInt + interface LoDashStatic { + /** + * Converts string to an integer of the specified radix. If radix is undefined or 0, a radix of 10 is used + * unless value is a hexadecimal, in which case a radix of 16 is used. + * + * Note: This method aligns with the ES5 implementation of parseInt. + * + * @param string The string to convert. + * @param radix The radix to interpret value by. + * @return Returns the converted integer. + */ + parseInt( + string: string, + radix?: number + ): number; + } + + interface LoDashImplicitWrapper { + /** + * @see _.parseInt + */ + parseInt(radix?: number): number; + } + + interface LoDashExplicitWrapper { + /** + * @see _.parseInt + */ + parseInt(radix?: number): LoDashExplicitWrapper; + } + + //_.repeat + interface LoDashStatic { + /** + * Repeats the given string n times. + * + * @param string The string to repeat. + * @param n The number of times to repeat the string. + * @return Returns the repeated string. + */ + repeat( + string?: string, + n?: number + ): string; + } + + interface LoDashImplicitWrapper { + /** + * @see _.repeat + */ + repeat(n?: number): string; + } + + interface LoDashExplicitWrapper { + /** + * @see _.repeat + */ + repeat(n?: number): LoDashExplicitWrapper; + } + + //_.replace + interface LoDashStatic { + /** + * Replaces matches for pattern in string with replacement. + * + * Note: This method is based on String#replace. + * + * @param string + * @param pattern + * @param replacement + * @return Returns the modified string. + */ + replace( + string: string, + pattern: RegExp|string, + replacement: Function|string + ): string; + + /** + * @see _.replace + */ + replace( + pattern?: RegExp|string, + replacement?: Function|string + ): string; + } + + interface LoDashImplicitWrapper { + /** + * @see _.replace + */ + replace( + pattern?: RegExp|string, + replacement?: Function|string + ): string; + + /** + * @see _.replace + */ + replace( + replacement?: Function|string + ): string; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.replace + */ + replace( + pattern?: RegExp|string, + replacement?: Function|string + ): string; + + /** + * @see _.replace + */ + replace( + replacement?: Function|string + ): string; + } + + interface LoDashExplicitWrapper { + /** + * @see _.replace + */ + replace( + pattern?: RegExp|string, + replacement?: Function|string + ): LoDashExplicitWrapper; + + /** + * @see _.replace + */ + replace( + replacement?: Function|string + ): LoDashExplicitWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.replace + */ + replace( + pattern?: RegExp|string, + replacement?: Function|string + ): LoDashExplicitWrapper; + + /** + * @see _.replace + */ + replace( + replacement?: Function|string + ): LoDashExplicitWrapper; + } + + //_.snakeCase + interface LoDashStatic { + /** + * Converts string to snake case. + * + * @param string The string to convert. + * @return Returns the snake cased string. + */ + snakeCase(string?: string): string; + } + + interface LoDashImplicitWrapper { + /** + * @see _.snakeCase + */ + snakeCase(): string; + } + + interface LoDashExplicitWrapper { + /** + * @see _.snakeCase + */ + snakeCase(): LoDashExplicitWrapper; + } + + //_.split + interface LoDashStatic { + /** + * Splits string by separator. + * + * Note: This method is based on String#split. + * + * @param string + * @param separator + * @param limit + * @return Returns the new array of string segments. + */ + split( + string: string, + separator?: RegExp|string, + limit?: number + ): string[]; + } + + interface LoDashImplicitWrapper { + /** + * @see _.split + */ + split( + separator?: RegExp|string, + limit?: number + ): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.split + */ + split( + separator?: RegExp|string, + limit?: number + ): LoDashExplicitArrayWrapper; + } + + //_.startCase + interface LoDashStatic { + /** + * Converts string to start case. + * + * @param string The string to convert. + * @return Returns the start cased string. + */ + startCase(string?: string): string; + } + + interface LoDashImplicitWrapper { + /** + * @see _.startCase + */ + startCase(): string; + } + + interface LoDashExplicitWrapper { + /** + * @see _.startCase + */ + startCase(): LoDashExplicitWrapper; + } + + //_.startsWith + interface LoDashStatic { + /** + * Checks if string starts with the given target string. + * + * @param string The string to search. + * @param target The string to search for. + * @param position The position to search from. + * @return Returns true if string starts with target, else false. + */ + startsWith( + string?: string, + target?: string, + position?: number + ): boolean; + } + + interface LoDashImplicitWrapper { + /** + * @see _.startsWith + */ + startsWith( + target?: string, + position?: number + ): boolean; + } + + interface LoDashExplicitWrapper { + /** + * @see _.startsWith + */ + startsWith( + target?: string, + position?: number + ): LoDashExplicitWrapper; + } + + //_.template + interface TemplateOptions extends TemplateSettings { + /** + * The sourceURL of the template's compiled source. + */ + sourceURL?: string; + } + + interface TemplateExecutor { + (data?: Object): string; + source: string; + } + + interface LoDashStatic { + /** + * Creates a compiled template function that can interpolate data properties in "interpolate" delimiters, + * HTML-escape interpolated data properties in "escape" delimiters, and execute JavaScript in "evaluate" + * delimiters. Data properties may be accessed as free variables in the template. If a setting object is + * provided it takes precedence over _.templateSettings values. + * + * Note: In the development build _.template utilizes + * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl) for easier + * debugging. + * + * For more information on precompiling templates see + * [lodash's custom builds documentation](https://lodash.com/custom-builds). + * + * For more information on Chrome extension sandboxes see + * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval). + * + * @param string The template string. + * @param options The options object. + * @param options.escape The HTML "escape" delimiter. + * @param options.evaluate The "evaluate" delimiter. + * @param options.imports An object to import into the template as free variables. + * @param options.interpolate The "interpolate" delimiter. + * @param options.sourceURL The sourceURL of the template's compiled source. + * @param options.variable The data object variable name. + * @return Returns the compiled template function. + */ + template( + string: string, + options?: TemplateOptions + ): TemplateExecutor; + } + + interface LoDashImplicitWrapper { + /** + * @see _.template + */ + template(options?: TemplateOptions): TemplateExecutor; + } + + interface LoDashExplicitWrapper { + /** + * @see _.template + */ + template(options?: TemplateOptions): LoDashExplicitObjectWrapper; + } + + //_.toLower + interface LoDashStatic { + /** + * Converts `string`, as a whole, to lower case. + * + * @param string The string to convert. + * @return Returns the lower cased string. + */ + toLower(string?: string): string; + } + + interface LoDashImplicitWrapper { + /** + * @see _.toLower + */ + toLower(): string; + } + + interface LoDashExplicitWrapper { + /** + * @see _.toLower + */ + toLower(): LoDashExplicitWrapper; + } + + //_.toUpper + interface LoDashStatic { + /** + * Converts `string`, as a whole, to upper case. + * + * @param string The string to convert. + * @return Returns the upper cased string. + */ + toUpper(string?: string): string; + } + + interface LoDashImplicitWrapper { + /** + * @see _.toUpper + */ + toUpper(): string; + } + + interface LoDashExplicitWrapper { + /** + * @see _.toUpper + */ + toUpper(): LoDashExplicitWrapper; + } + + //_.trim + interface LoDashStatic { + /** + * Removes leading and trailing whitespace or specified characters from string. + * + * @param string The string to trim. + * @param chars The characters to trim. + * @return Returns the trimmed string. + */ + trim( + string?: string, + chars?: string + ): string; + } + + interface LoDashImplicitWrapper { + /** + * @see _.trim + */ + trim(chars?: string): string; + } + + interface LoDashExplicitWrapper { + /** + * @see _.trim + */ + trim(chars?: string): LoDashExplicitWrapper; + } + + //_.trimEnd + interface LoDashStatic { + /** + * Removes trailing whitespace or specified characters from string. + * + * @param string The string to trim. + * @param chars The characters to trim. + * @return Returns the trimmed string. + */ + trimEnd( + string?: string, + chars?: string + ): string; + } + + interface LoDashImplicitWrapper { + /** + * @see _.trimEnd + */ + trimEnd(chars?: string): string; + } + + interface LoDashExplicitWrapper { + /** + * @see _.trimEnd + */ + trimEnd(chars?: string): LoDashExplicitWrapper; + } + + //_.trimStart + interface LoDashStatic { + /** + * Removes leading whitespace or specified characters from string. + * + * @param string The string to trim. + * @param chars The characters to trim. + * @return Returns the trimmed string. + */ + trimStart( + string?: string, + chars?: string + ): string; + } + + interface LoDashImplicitWrapper { + /** + * @see _.trimStart + */ + trimStart(chars?: string): string; + } + + interface LoDashExplicitWrapper { + /** + * @see _.trimStart + */ + trimStart(chars?: string): LoDashExplicitWrapper; + } + + //_.truncate + interface TruncateOptions { + /** The maximum string length. */ + length?: number; + /** The string to indicate text is omitted. */ + omission?: string; + /** The separator pattern to truncate to. */ + separator?: string|RegExp; + } + + interface LoDashStatic { + /** + * Truncates string if it’s longer than the given maximum string length. The last characters of the truncated + * string are replaced with the omission string which defaults to "…". + * + * @param string The string to truncate. + * @param options The options object or maximum string length. + * @return Returns the truncated string. + */ + truncate( + string?: string, + options?: TruncateOptions + ): string; + } + + interface LoDashImplicitWrapper { + /** + * @see _.truncate + */ + truncate(options?: TruncateOptions): string; + } + + interface LoDashExplicitWrapper { + /** + * @see _.truncate + */ + truncate(options?: TruncateOptions): LoDashExplicitWrapper; + } + + //_.unescape + interface LoDashStatic { + /** + * The inverse of _.escape; this method converts the HTML entities &, <, >, ", ', and ` + * in string to their corresponding characters. + * + * Note: No other HTML entities are unescaped. To unescape additional HTML entities use a third-party library + * like he. + * + * @param string The string to unescape. + * @return Returns the unescaped string. + */ + unescape(string?: string): string; + } + + interface LoDashImplicitWrapper { + /** + * @see _.unescape + */ + unescape(): string; + } + + interface LoDashExplicitWrapper { + /** + * @see _.unescape + */ + unescape(): LoDashExplicitWrapper; + } + + //_.upperCase + interface LoDashStatic { + /** + * Converts `string`, as space separated words, to upper case. + * + * @param string The string to convert. + * @return Returns the upper cased string. + */ + upperCase(string?: string): string; + } + + interface LoDashImplicitWrapper { + /** + * @see _.upperCase + */ + upperCase(): string; + } + + interface LoDashExplicitWrapper { + /** + * @see _.upperCase + */ + upperCase(): LoDashExplicitWrapper; + } + + //_.upperFirst + interface LoDashStatic { + /** + * Converts the first character of `string` to upper case. + * + * @param string The string to convert. + * @return Returns the converted string. + */ + upperFirst(string?: string): string; + } + + interface LoDashImplicitWrapper { + /** + * @see _.upperFirst + */ + upperFirst(): string; + } + + interface LoDashExplicitWrapper { + /** + * @see _.upperFirst + */ + upperFirst(): LoDashExplicitWrapper; + } + + //_.words + interface LoDashStatic { + /** + * Splits `string` into an array of its words. + * + * @param string The string to inspect. + * @param pattern The pattern to match words. + * @return Returns the words of `string`. + */ + words( + string?: string, + pattern?: string|RegExp + ): string[]; + } + + interface LoDashImplicitWrapper { + /** + * @see _.words + */ + words(pattern?: string|RegExp): string[]; + } + + interface LoDashExplicitWrapper { + /** + * @see _.words + */ + words(pattern?: string|RegExp): LoDashExplicitArrayWrapper; + } + + /*********** + * Utility * + ***********/ + + //_.attempt + interface LoDashStatic { + /** + * Attempts to invoke func, returning either the result or the caught error object. Any additional arguments + * are provided to func when it’s invoked. + * + * @param func The function to attempt. + * @return Returns the func result or error object. + */ + attempt(func: (...args: any[]) => TResult, ...args: any[]): TResult|Error; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.attempt + */ + attempt(...args: any[]): TResult|Error; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.attempt + */ + attempt(...args: any[]): LoDashExplicitObjectWrapper; + } + + //_.constant + interface LoDashStatic { + /** + * Creates a function that returns value. + * + * @param value The value to return from the new function. + * @return Returns the new function. + */ + constant(value: T): () => T; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.constant + */ + constant(): LoDashImplicitObjectWrapper<() => TResult>; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.constant + */ + constant(): LoDashExplicitObjectWrapper<() => TResult>; + } + + //_.identity + interface LoDashStatic { + /** + * This method returns the first argument provided to it. + * + * @param value Any value. + * @return Returns value. + */ + identity(value?: T): T; + } + + interface LoDashImplicitWrapper { + /** + * @see _.identity + */ + identity(): T; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.identity + */ + identity(): T[]; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.identity + */ + identity(): T; + } + + interface LoDashExplicitWrapper { + /** + * @see _.identity + */ + identity(): LoDashExplicitWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.identity + */ + identity(): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.identity + */ + identity(): LoDashExplicitObjectWrapper; + } + + //_.iteratee + interface LoDashStatic { + /** + * Creates a function that invokes `func` with the arguments of the created + * function. If `func` is a property name the created callback returns the + * property value for a given element. If `func` is an object the created + * callback returns `true` for elements that contain the equivalent object properties, otherwise it returns `false`. + * + * @static + * @memberOf _ + * @category Util + * @param {*} [func=_.identity] The value to convert to a callback. + * @returns {Function} Returns the callback. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 } + * ]; + * + * // create custom iteratee shorthands + * _.iteratee = _.wrap(_.iteratee, function(callback, func) { + * var p = /^(\S+)\s*([<>])\s*(\S+)$/.exec(func); + * return !p ? callback(func) : function(object) { + * return (p[2] == '>' ? object[p[1]] > p[3] : object[p[1]] < p[3]); + * }; + * }); + * + * _.filter(users, 'age > 36'); + * // => [{ 'user': 'fred', 'age': 40 }] + */ + iteratee( + func: Function + ): (...args: any[]) => TResult; + + /** + * @see _.iteratee + */ + iteratee( + func: string + ): (object: any) => TResult; + + /** + * @see _.iteratee + */ + iteratee( + func: Object + ): (object: any) => boolean; + + /** + * @see _.iteratee + */ + iteratee(): (value: TResult) => TResult; + } + + interface LoDashImplicitWrapper { + /** + * @see _.iteratee + */ + iteratee(): LoDashImplicitObjectWrapper<(object: any) => TResult>; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.iteratee + */ + iteratee(): LoDashImplicitObjectWrapper<(object: any) => boolean>; + + /** + * @see _.iteratee + */ + iteratee(): LoDashImplicitObjectWrapper<(...args: any[]) => TResult>; + } + + interface LoDashExplicitWrapper { + /** + * @see _.iteratee + */ + iteratee(): LoDashExplicitObjectWrapper<(object: any) => TResult>; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.iteratee + */ + iteratee(): LoDashExplicitObjectWrapper<(object: any) => boolean>; + + /** + * @see _.iteratee + */ + iteratee(): LoDashExplicitObjectWrapper<(...args: any[]) => TResult>; + } + + //_.matches + interface LoDashStatic { + /** + * Creates a function that performs a deep comparison between a given object and source, returning true if the + * given object has equivalent property values, else false. + * + * Note: This method supports comparing arrays, booleans, Date objects, numbers, Object objects, regexes, and + * strings. Objects are compared by their own, not inherited, enumerable properties. For comparing a single own + * or inherited property value see _.matchesProperty. + * + * @param source The object of property values to match. + * @return Returns the new function. + */ + matches(source: T): (value: any) => boolean; + + /** + * @see _.matches + */ + matches(source: T): (value: V) => boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.matches + */ + matches(): LoDashImplicitObjectWrapper<(value: V) => boolean>; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.matches + */ + matches(): LoDashExplicitObjectWrapper<(value: V) => boolean>; + } + + //_.matchesProperty + interface LoDashStatic { + /** + * Creates a function that compares the property value of path on a given object to value. + * + * Note: This method supports comparing arrays, booleans, Date objects, numbers, Object objects, regexes, and + * strings. Objects are compared by their own, not inherited, enumerable properties. + * + * @param path The path of the property to get. + * @param srcValue The value to match. + * @return Returns the new function. + */ + matchesProperty( + path: StringRepresentable|StringRepresentable[], + srcValue: T + ): (value: any) => boolean; + + /** + * @see _.matchesProperty + */ + matchesProperty( + path: StringRepresentable|StringRepresentable[], + srcValue: T + ): (value: V) => boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.matchesProperty + */ + matchesProperty( + srcValue: SrcValue + ): LoDashImplicitObjectWrapper<(value: any) => boolean>; + + /** + * @see _.matchesProperty + */ + matchesProperty( + srcValue: SrcValue + ): LoDashImplicitObjectWrapper<(value: Value) => boolean>; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.matchesProperty + */ + matchesProperty( + srcValue: SrcValue + ): LoDashExplicitObjectWrapper<(value: any) => boolean>; + + /** + * @see _.matchesProperty + */ + matchesProperty( + srcValue: SrcValue + ): LoDashExplicitObjectWrapper<(value: Value) => boolean>; + } + + //_.method + interface LoDashStatic { + /** + * Creates a function that invokes the method at path on a given object. Any additional arguments are provided + * to the invoked method. + * + * @param path The path of the method to invoke. + * @param args The arguments to invoke the method with. + * @return Returns the new function. + */ + method( + path: string|StringRepresentable[], + ...args: any[] + ): (object: TObject) => TResult; + + /** + * @see _.method + */ + method( + path: string|StringRepresentable[], + ...args: any[] + ): (object: any) => TResult; + } + + interface LoDashImplicitWrapper { + /** + * @see _.method + */ + method(...args: any[]): LoDashImplicitObjectWrapper<(object: TObject) => TResult>; + + /** + * @see _.method + */ + method(...args: any[]): LoDashImplicitObjectWrapper<(object: any) => TResult>; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.method + */ + method(...args: any[]): LoDashImplicitObjectWrapper<(object: TObject) => TResult>; + + /** + * @see _.method + */ + method(...args: any[]): LoDashImplicitObjectWrapper<(object: any) => TResult>; + } + + interface LoDashExplicitWrapper { + /** + * @see _.method + */ + method(...args: any[]): LoDashExplicitObjectWrapper<(object: TObject) => TResult>; + + /** + * @see _.method + */ + method(...args: any[]): LoDashExplicitObjectWrapper<(object: any) => TResult>; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.method + */ + method(...args: any[]): LoDashExplicitObjectWrapper<(object: TObject) => TResult>; + + /** + * @see _.method + */ + method(...args: any[]): LoDashExplicitObjectWrapper<(object: any) => TResult>; + } + + //_.methodOf + interface LoDashStatic { + /** + * The opposite of _.method; this method creates a function that invokes the method at a given path on object. + * Any additional arguments are provided to the invoked method. + * + * @param object The object to query. + * @param args The arguments to invoke the method with. + * @return Returns the new function. + */ + methodOf( + object: TObject, + ...args: any[] + ): (path: StringRepresentable|StringRepresentable[]) => TResult; + + /** + * @see _.methodOf + */ + methodOf( + object: {}, + ...args: any[] + ): (path: StringRepresentable|StringRepresentable[]) => TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.methodOf + */ + methodOf( + ...args: any[] + ): LoDashImplicitObjectWrapper<(path: StringRepresentable|StringRepresentable[]) => TResult>; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.methodOf + */ + methodOf( + ...args: any[] + ): LoDashExplicitObjectWrapper<(path: StringRepresentable|StringRepresentable[]) => TResult>; + } + + //_.mixin + interface MixinOptions { + chain?: boolean; + } + + interface LoDashStatic { + /** + * Adds all own enumerable function properties of a source object to the destination object. If object is a + * function then methods are added to its prototype as well. + * + * Note: Use _.runInContext to create a pristine lodash function to avoid conflicts caused by modifying + * the original. + * + * @param object The destination object. + * @param source The object of functions to add. + * @param options The options object. + * @param options.chain Specify whether the functions added are chainable. + * @return Returns object. + */ + mixin( + object: TObject, + source: Dictionary, + options?: MixinOptions + ): TResult; + + /** + * @see _.mixin + */ + mixin( + source: Dictionary, + options?: MixinOptions + ): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.mixin + */ + mixin( + source: Dictionary, + options?: MixinOptions + ): LoDashImplicitObjectWrapper; + + /** + * @see _.mixin + */ + mixin( + options?: MixinOptions + ): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.mixin + */ + mixin( + source: Dictionary, + options?: MixinOptions + ): LoDashExplicitObjectWrapper; + + /** + * @see _.mixin + */ + mixin( + options?: MixinOptions + ): LoDashExplicitObjectWrapper; + } + + //_.noConflict + interface LoDashStatic { + /** + * Reverts the _ variable to its previous value and returns a reference to the lodash function. + * + * @return Returns the lodash function. + */ + noConflict(): typeof _; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.noConflict + */ + noConflict(): typeof _; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.noConflict + */ + noConflict(): LoDashExplicitObjectWrapper; + } + + //_.noop + interface LoDashStatic { + /** + * A no-operation function that returns undefined regardless of the arguments it receives. + * + * @return undefined + */ + noop(...args: any[]): void; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.noop + */ + noop(...args: any[]): void; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.noop + */ + noop(...args: any[]): _.LoDashExplicitWrapper; + } + + //_.nthArg + interface LoDashStatic { + /** + * Creates a function that returns its nth argument. + * + * @param n The index of the argument to return. + * @return Returns the new function. + */ + nthArg(n?: number): TResult; + } + + interface LoDashImplicitWrapper { + /** + * @see _.nthArg + */ + nthArg(): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.nthArg + */ + nthArg(): LoDashExplicitObjectWrapper; + } + + //_.over + interface LoDashStatic { + /** + * Creates a function that invokes iteratees with the arguments provided to the created function and returns + * their results. + * + * @param iteratees The iteratees to invoke. + * @return Returns the new function. + */ + over(...iteratees: (Function|Function[])[]): (...args: any[]) => TResult[]; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.over + */ + over(...iteratees: (Function|Function[])[]): LoDashImplicitObjectWrapper<(...args: any[]) => TResult[]>; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.over + */ + over(...iteratees: (Function|Function[])[]): LoDashImplicitObjectWrapper<(...args: any[]) => TResult[]>; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.over + */ + over(...iteratees: (Function|Function[])[]): LoDashExplicitObjectWrapper<(...args: any[]) => TResult[]>; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.over + */ + over(...iteratees: (Function|Function[])[]): LoDashExplicitObjectWrapper<(...args: any[]) => TResult[]>; + } + + //_.overEvery + interface LoDashStatic { + /** + * Creates a function that checks if all of the predicates return truthy when invoked with the arguments + * provided to the created function. + * + * @param predicates The predicates to check. + * @return Returns the new function. + */ + overEvery(...predicates: (Function|Function[])[]): (...args: any[]) => boolean; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.overEvery + */ + overEvery(...predicates: (Function|Function[])[]): LoDashImplicitObjectWrapper<(...args: any[]) => boolean>; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.overEvery + */ + overEvery(...predicates: (Function|Function[])[]): LoDashImplicitObjectWrapper<(...args: any[]) => boolean>; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.overEvery + */ + overEvery(...predicates: (Function|Function[])[]): LoDashExplicitObjectWrapper<(...args: any[]) => boolean>; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.overEvery + */ + overEvery(...predicates: (Function|Function[])[]): LoDashExplicitObjectWrapper<(...args: any[]) => boolean>; + } + + //_.overSome + interface LoDashStatic { + /** + * Creates a function that checks if any of the predicates return truthy when invoked with the arguments + * provided to the created function. + * + * @param predicates The predicates to check. + * @return Returns the new function. + */ + overSome(...predicates: (Function|Function[])[]): (...args: any[]) => boolean; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.overSome + */ + overSome(...predicates: (Function|Function[])[]): LoDashImplicitObjectWrapper<(...args: any[]) => boolean>; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.overSome + */ + overSome(...predicates: (Function|Function[])[]): LoDashImplicitObjectWrapper<(...args: any[]) => boolean>; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.overSome + */ + overSome(...predicates: (Function|Function[])[]): LoDashExplicitObjectWrapper<(...args: any[]) => boolean>; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.overSome + */ + overSome(...predicates: (Function|Function[])[]): LoDashExplicitObjectWrapper<(...args: any[]) => boolean>; + } + + //_.property + interface LoDashStatic { + /** + * Creates a function that returns the property value at path on a given object. + * + * @param path The path of the property to get. + * @return Returns the new function. + */ + property(path: StringRepresentable|StringRepresentable[]): (obj: TObj) => TResult; + } + + interface LoDashImplicitWrapper { + /** + * @see _.property + */ + property(): LoDashImplicitObjectWrapper<(obj: TObj) => TResult>; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.property + */ + property(): LoDashImplicitObjectWrapper<(obj: TObj) => TResult>; + } + + interface LoDashExplicitWrapper { + /** + * @see _.property + */ + property(): LoDashExplicitObjectWrapper<(obj: TObj) => TResult>; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.property + */ + property(): LoDashExplicitObjectWrapper<(obj: TObj) => TResult>; + } + + //_.propertyOf + interface LoDashStatic { + /** + * The opposite of _.property; this method creates a function that returns the property value at a given path + * on object. + * + * @param object The object to query. + * @return Returns the new function. + */ + propertyOf(object: T): (path: string|string[]) => any; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.propertyOf + */ + propertyOf(): LoDashImplicitObjectWrapper<(path: string|string[]) => any>; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.propertyOf + */ + propertyOf(): LoDashExplicitObjectWrapper<(path: string|string[]) => any>; + } + + //_.range + interface LoDashStatic { + /** + * Creates an array of numbers (positive and/or negative) progressing from start up to, but not including, end. + * If end is not specified it’s set to start with start then set to 0. If end is less than start a zero-length + * range is created unless a negative step is specified. + * + * @param start The start of the range. + * @param end The end of the range. + * @param step The value to increment or decrement by. + * @return Returns a new range array. + */ + range( + start: number, + end: number, + step?: number + ): number[]; + + /** + * @see _.range + */ + range( + end: number, + step?: number + ): number[]; + } + + interface LoDashImplicitWrapper { + /** + * @see _.range + */ + range( + end?: number, + step?: number + ): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.range + */ + range( + end?: number, + step?: number + ): LoDashExplicitArrayWrapper; + } + + //_.rangeRight + interface LoDashStatic { + /** + * This method is like `_.range` except that it populates values in + * descending order. + * + * @static + * @memberOf _ + * @category Util + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @param {number} [step=1] The value to increment or decrement by. + * @returns {Array} Returns the new array of numbers. + * @example + * + * _.rangeRight(4); + * // => [3, 2, 1, 0] + * + * _.rangeRight(-4); + * // => [-3, -2, -1, 0] + * + * _.rangeRight(1, 5); + * // => [4, 3, 2, 1] + * + * _.rangeRight(0, 20, 5); + * // => [15, 10, 5, 0] + * + * _.rangeRight(0, -4, -1); + * // => [-3, -2, -1, 0] + * + * _.rangeRight(1, 4, 0); + * // => [1, 1, 1] + * + * _.rangeRight(0); + * // => [] + */ + rangeRight( + start: number, + end: number, + step?: number + ): number[]; + + /** + * @see _.rangeRight + */ + rangeRight( + end: number, + step?: number + ): number[]; + } + + interface LoDashImplicitWrapper { + /** + * @see _.rangeRight + */ + rangeRight( + end?: number, + step?: number + ): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.rangeRight + */ + rangeRight( + end?: number, + step?: number + ): LoDashExplicitArrayWrapper; + } + + //_.runInContext + interface LoDashStatic { + /** + * Create a new pristine lodash function using the given context object. + * + * @param context The context object. + * @return Returns a new lodash function. + */ + runInContext(context?: Object): typeof _; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.runInContext + */ + runInContext(): typeof _; + } + + //_.times + interface LoDashStatic { + /** + * Invokes the iteratee function n times, returning an array of the results of each invocation. The iteratee + * is invoked with one argument; (index). + * + * @param n The number of times to invoke iteratee. + * @param iteratee The function invoked per iteration. + * @return Returns the array of results. + */ + times( + n: number, + iteratee: (num: number) => TResult + ): TResult[]; + + /** + * @see _.times + */ + times(n: number): number[]; + } + + interface LoDashImplicitWrapper { + /** + * @see _.times + */ + times( + iteratee: (num: number) => TResult + ): TResult[]; + + /** + * @see _.times + */ + times(): number[]; + } + + interface LoDashExplicitWrapper { + /** + * @see _.times + */ + times( + iteratee: (num: number) => TResult + ): LoDashExplicitArrayWrapper; + + /** + * @see _.times + */ + times(): LoDashExplicitArrayWrapper; + } + + //_.toPath + interface LoDashStatic { + /** + * Converts `value` to a property path array. + * + * @static + * @memberOf _ + * @category Util + * @param {*} value The value to convert. + * @returns {Array} Returns the new property path array. + * @example + * + * _.toPath('a.b.c'); + * // => ['a', 'b', 'c'] + * + * _.toPath('a[0].b.c'); + * // => ['a', '0', 'b', 'c'] + * + * var path = ['a', 'b', 'c'], + * newPath = _.toPath(path); + * + * console.log(newPath); + * // => ['a', 'b', 'c'] + * + * console.log(path === newPath); + * // => false + */ + toPath(value: any): string[]; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.toPath + */ + toPath(): LoDashImplicitWrapper; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.toPath + */ + toPath(): LoDashExplicitWrapper; + } + + //_.uniqueId + interface LoDashStatic { + /** + * Generates a unique ID. If prefix is provided the ID is appended to it. + * + * @param prefix The value to prefix the ID with. + * @return Returns the unique ID. + */ + uniqueId(prefix?: string): string; + } + + interface LoDashImplicitWrapper { + /** + * @see _.uniqueId + */ + uniqueId(): string; + } + + interface LoDashExplicitWrapper { + /** + * @see _.uniqueId + */ + uniqueId(): LoDashExplicitWrapper; + } + + interface ListIterator { + (value: T, index: number, collection: List): TResult; + } + + interface DictionaryIterator { + (value: T, key?: string, collection?: Dictionary): TResult; + } + + interface NumericDictionaryIterator { + (value: T, key?: number, collection?: Dictionary): TResult; + } + + interface ObjectIterator { + (element: T, key?: string, collection?: any): TResult; + } + + interface StringIterator { + (char: string, index?: number, string?: string): TResult; + } + + interface MemoVoidIterator { + (prev: TResult, curr: T, indexOrKey?: any, list?: T[]): void; + } + interface MemoIterator { + (prev: TResult, curr: T, indexOrKey?: any, list?: T[]): TResult; + } + + interface MemoVoidArrayIterator { + (acc: TResult, curr: T, index?: number, arr?: T[]): void; + } + interface MemoVoidDictionaryIterator { + (acc: TResult, curr: T, key?: string, dict?: Dictionary): void; + } + + //interface Collection {} + + // Common interface between Arrays and jQuery objects + interface List { + [index: number]: T; + length: number; + } + + interface Dictionary { + [index: string]: T; + } + + interface NumericDictionary { + [index: number]: T; + } + + interface StringRepresentable { + toString(): string; + } + + interface Cancelable { + cancel(): void; + flush(): void; + } +} + +// Named exports + +declare module "lodash/after" { + const after: typeof _.after; + export = after; +} + + +declare module "lodash/ary" { + const ary: typeof _.ary; + export = ary; +} + + +declare module "lodash/assign" { + const assign: typeof _.assign; + export = assign; +} + + +declare module "lodash/assignIn" { + const assignIn: typeof _.assignIn; + export = assignIn; +} + + +declare module "lodash/assignInWith" { + const assignInWith: typeof _.assignInWith; + export = assignInWith; +} + + +declare module "lodash/assignWith" { + const assignWith: typeof _.assignWith; + export = assignWith; +} + + +declare module "lodash/at" { + const at: typeof _.at; + export = at; +} + + +declare module "lodash/before" { + const before: typeof _.before; + export = before; +} + + +declare module "lodash/bind" { + const bind: typeof _.bind; + export = bind; +} + + +declare module "lodash/bindAll" { + const bindAll: typeof _.bindAll; + export = bindAll; +} + + +declare module "lodash/bindKey" { + const bindKey: typeof _.bindKey; + export = bindKey; +} + + +declare module "lodash/castArray" { + const castArray: typeof _.castArray; + export = castArray; +} + + +declare module "lodash/chain" { + const chain: typeof _.chain; + export = chain; +} + + +declare module "lodash/chunk" { + const chunk: typeof _.chunk; + export = chunk; +} + + +declare module "lodash/compact" { + const compact: typeof _.compact; + export = compact; +} + + +declare module "lodash/concat" { + const concat: typeof _.concat; + export = concat; +} + +/** +* uncoment it if definition exists +*/ +/* +declare module "lodash/cond" { + const cond: typeof _.cond; + export = cond; +} +*/ + +/** +* uncoment it if definition exists +*/ +/* +declare module "lodash/conforms" { + const conforms: typeof _.conforms; + export = conforms; +} +*/ + +declare module "lodash/constant" { + const constant: typeof _.constant; + export = constant; +} + + +declare module "lodash/countBy" { + const countBy: typeof _.countBy; + export = countBy; +} + + +declare module "lodash/create" { + const create: typeof _.create; + export = create; +} + + +declare module "lodash/curry" { + const curry: typeof _.curry; + export = curry; +} + + +declare module "lodash/curryRight" { + const curryRight: typeof _.curryRight; + export = curryRight; +} + + +declare module "lodash/debounce" { + const debounce: typeof _.debounce; + export = debounce; +} + + +declare module "lodash/defaults" { + const defaults: typeof _.defaults; + export = defaults; +} + + +declare module "lodash/defaultsDeep" { + const defaultsDeep: typeof _.defaultsDeep; + export = defaultsDeep; +} + + +declare module "lodash/defer" { + const defer: typeof _.defer; + export = defer; +} + + +declare module "lodash/delay" { + const delay: typeof _.delay; + export = delay; +} + + +declare module "lodash/difference" { + const difference: typeof _.difference; + export = difference; +} + + +declare module "lodash/differenceBy" { + const differenceBy: typeof _.differenceBy; + export = differenceBy; +} + + +declare module "lodash/differenceWith" { + const differenceWith: typeof _.differenceWith; + export = differenceWith; +} + + +declare module "lodash/drop" { + const drop: typeof _.drop; + export = drop; +} + + +declare module "lodash/dropRight" { + const dropRight: typeof _.dropRight; + export = dropRight; +} + + +declare module "lodash/dropRightWhile" { + const dropRightWhile: typeof _.dropRightWhile; + export = dropRightWhile; +} + + +declare module "lodash/dropWhile" { + const dropWhile: typeof _.dropWhile; + export = dropWhile; +} + + +declare module "lodash/fill" { + const fill: typeof _.fill; + export = fill; +} + + +declare module "lodash/filter" { + const filter: typeof _.filter; + export = filter; +} + + +declare module "lodash/flatMap" { + const flatMap: typeof _.flatMap; + export = flatMap; +} + +/** +* uncoment it if definition exists +*/ +/* +declare module "lodash/flatMapDeep" { + const flatMapDeep: typeof _.flatMapDeep; + export = flatMapDeep; +} +*/ +/** +* uncoment it if definition exists +*/ +/* +declare module "lodash/flatMapDepth" { + const flatMapDepth: typeof _.flatMapDepth; + export = flatMapDepth; +} +*/ + +declare module "lodash/flatten" { + const flatten: typeof _.flatten; + export = flatten; +} + + +declare module "lodash/flattenDeep" { + const flattenDeep: typeof _.flattenDeep; + export = flattenDeep; +} + +declare module "lodash/flattenDepth" { + const flattenDepth: typeof _.flattenDepth; + export = flattenDepth; +} + +declare module "lodash/flip" { + const flip: typeof _.flip; + export = flip; +} + + +declare module "lodash/flow" { + const flow: typeof _.flow; + export = flow; +} + + +declare module "lodash/flowRight" { + const flowRight: typeof _.flowRight; + export = flowRight; +} + + +declare module "lodash/fromPairs" { + const fromPairs: typeof _.fromPairs; + export = fromPairs; +} + + +declare module "lodash/functions" { + const functions: typeof _.functions; + export = functions; +} + + +declare module "lodash/functionsIn" { + const functionsIn: typeof _.functionsIn; + export = functionsIn; +} + + +declare module "lodash/groupBy" { + const groupBy: typeof _.groupBy; + export = groupBy; +} + + +declare module "lodash/initial" { + const initial: typeof _.initial; + export = initial; +} + + +declare module "lodash/intersection" { + const intersection: typeof _.intersection; + export = intersection; +} + + +declare module "lodash/intersectionBy" { + const intersectionBy: typeof _.intersectionBy; + export = intersectionBy; +} + + +declare module "lodash/intersectionWith" { + const intersectionWith: typeof _.intersectionWith; + export = intersectionWith; +} + + +declare module "lodash/invert" { + const invert: typeof _.invert; + export = invert; +} + + +declare module "lodash/invertBy" { + const invertBy: typeof _.invertBy; + export = invertBy; +} + + +declare module "lodash/invokeMap" { + const invokeMap: typeof _.invokeMap; + export = invokeMap; +} + + +declare module "lodash/iteratee" { + const iteratee: typeof _.iteratee; + export = iteratee; +} + + +declare module "lodash/keyBy" { + const keyBy: typeof _.keyBy; + export = keyBy; +} + + +declare module "lodash/keys" { + const keys: typeof _.keys; + export = keys; +} + + +declare module "lodash/keysIn" { + const keysIn: typeof _.keysIn; + export = keysIn; +} + + +declare module "lodash/map" { + const map: typeof _.map; + export = map; +} + + +declare module "lodash/mapKeys" { + const mapKeys: typeof _.mapKeys; + export = mapKeys; +} + + +declare module "lodash/mapValues" { + const mapValues: typeof _.mapValues; + export = mapValues; +} + + +declare module "lodash/matches" { + const matches: typeof _.matches; + export = matches; +} + + +declare module "lodash/matchesProperty" { + const matchesProperty: typeof _.matchesProperty; + export = matchesProperty; +} + + +declare module "lodash/memoize" { + const memoize: typeof _.memoize; + export = memoize; +} + + +declare module "lodash/merge" { + const merge: typeof _.merge; + export = merge; +} + + +declare module "lodash/mergeWith" { + const mergeWith: typeof _.mergeWith; + export = mergeWith; +} + + +declare module "lodash/method" { + const method: typeof _.method; + export = method; +} + + +declare module "lodash/methodOf" { + const methodOf: typeof _.methodOf; + export = methodOf; +} + + +declare module "lodash/mixin" { + const mixin: typeof _.mixin; + export = mixin; +} + + +declare module "lodash/negate" { + const negate: typeof _.negate; + export = negate; +} + + +declare module "lodash/nthArg" { + const nthArg: typeof _.nthArg; + export = nthArg; +} + + +declare module "lodash/omit" { + const omit: typeof _.omit; + export = omit; +} + + +declare module "lodash/omitBy" { + const omitBy: typeof _.omitBy; + export = omitBy; +} + + +declare module "lodash/once" { + const once: typeof _.once; + export = once; +} + + +declare module "lodash/orderBy" { + const orderBy: typeof _.orderBy; + export = orderBy; +} + + +declare module "lodash/over" { + const over: typeof _.over; + export = over; +} + + +declare module "lodash/overArgs" { + const overArgs: typeof _.overArgs; + export = overArgs; +} + + +declare module "lodash/overEvery" { + const overEvery: typeof _.overEvery; + export = overEvery; +} + + +declare module "lodash/overSome" { + const overSome: typeof _.overSome; + export = overSome; +} + + +declare module "lodash/partial" { + const partial: typeof _.partial; + export = partial; +} + + +declare module "lodash/partialRight" { + const partialRight: typeof _.partialRight; + export = partialRight; +} + + +declare module "lodash/partition" { + const partition: typeof _.partition; + export = partition; +} + + +declare module "lodash/pick" { + const pick: typeof _.pick; + export = pick; +} + + +declare module "lodash/pickBy" { + const pickBy: typeof _.pickBy; + export = pickBy; +} + + +declare module "lodash/property" { + const property: typeof _.property; + export = property; +} + + +declare module "lodash/propertyOf" { + const propertyOf: typeof _.propertyOf; + export = propertyOf; +} + + +declare module "lodash/pull" { + const pull: typeof _.pull; + export = pull; +} + + +declare module "lodash/pullAll" { + const pullAll: typeof _.pullAll; + export = pullAll; +} + + +declare module "lodash/pullAllBy" { + const pullAllBy: typeof _.pullAllBy; + export = pullAllBy; +} + +/** +* uncoment it if definition exists +*/ +/* +declare module "lodash/pullAllWith" { + const pullAllWith: typeof _.pullAllWith; + export = pullAllWith; +} +*/ + +declare module "lodash/pullAt" { + const pullAt: typeof _.pullAt; + export = pullAt; +} + + +declare module "lodash/range" { + const range: typeof _.range; + export = range; +} + + +declare module "lodash/rangeRight" { + const rangeRight: typeof _.rangeRight; + export = rangeRight; +} + + +declare module "lodash/rearg" { + const rearg: typeof _.rearg; + export = rearg; +} + + +declare module "lodash/reject" { + const reject: typeof _.reject; + export = reject; +} + + +declare module "lodash/remove" { + const remove: typeof _.remove; + export = remove; +} + + +declare module "lodash/rest" { + const rest: typeof _.rest; + export = rest; +} + + +declare module "lodash/reverse" { + const reverse: typeof _.reverse; + export = reverse; +} + + +declare module "lodash/sampleSize" { + const sampleSize: typeof _.sampleSize; + export = sampleSize; +} + + +declare module "lodash/set" { + const set: typeof _.set; + export = set; +} + + +declare module "lodash/setWith" { + const setWith: typeof _.setWith; + export = setWith; +} + + +declare module "lodash/shuffle" { + const shuffle: typeof _.shuffle; + export = shuffle; +} + + +declare module "lodash/slice" { + const slice: typeof _.slice; + export = slice; +} + + +declare module "lodash/sortBy" { + const sortBy: typeof _.sortBy; + export = sortBy; +} + + +declare module "lodash/sortedUniq" { + const sortedUniq: typeof _.sortedUniq; + export = sortedUniq; +} + + +declare module "lodash/sortedUniqBy" { + const sortedUniqBy: typeof _.sortedUniqBy; + export = sortedUniqBy; +} + + +declare module "lodash/split" { + const split: typeof _.split; + export = split; +} + + +declare module "lodash/spread" { + const spread: typeof _.spread; + export = spread; +} + + +declare module "lodash/tail" { + const tail: typeof _.tail; + export = tail; +} + + +declare module "lodash/take" { + const take: typeof _.take; + export = take; +} + + +declare module "lodash/takeRight" { + const takeRight: typeof _.takeRight; + export = takeRight; +} + + +declare module "lodash/takeRightWhile" { + const takeRightWhile: typeof _.takeRightWhile; + export = takeRightWhile; +} + + +declare module "lodash/takeWhile" { + const takeWhile: typeof _.takeWhile; + export = takeWhile; +} + + +declare module "lodash/tap" { + const tap: typeof _.tap; + export = tap; +} + + +declare module "lodash/throttle" { + const throttle: typeof _.throttle; + export = throttle; +} + + +declare module "lodash/thru" { + const thru: typeof _.thru; + export = thru; +} + + +declare module "lodash/toArray" { + const toArray: typeof _.toArray; + export = toArray; +} + + +declare module "lodash/toPairs" { + const toPairs: typeof _.toPairs; + export = toPairs; +} + + +declare module "lodash/toPairsIn" { + const toPairsIn: typeof _.toPairsIn; + export = toPairsIn; +} + + +declare module "lodash/toPath" { + const toPath: typeof _.toPath; + export = toPath; +} + + +declare module "lodash/toPlainObject" { + const toPlainObject: typeof _.toPlainObject; + export = toPlainObject; +} + + +declare module "lodash/transform" { + const transform: typeof _.transform; + export = transform; +} + + +declare module "lodash/unary" { + const unary: typeof _.unary; + export = unary; +} + + +declare module "lodash/union" { + const union: typeof _.union; + export = union; +} + + +declare module "lodash/unionBy" { + const unionBy: typeof _.unionBy; + export = unionBy; +} + + +declare module "lodash/unionWith" { + const unionWith: typeof _.unionWith; + export = unionWith; +} + + +declare module "lodash/uniq" { + const uniq: typeof _.uniq; + export = uniq; +} + + +declare module "lodash/uniqBy" { + const uniqBy: typeof _.uniqBy; + export = uniqBy; +} + + +declare module "lodash/uniqWith" { + const uniqWith: typeof _.uniqWith; + export = uniqWith; +} + + +declare module "lodash/unset" { + const unset: typeof _.unset; + export = unset; +} + + +declare module "lodash/unzip" { + const unzip: typeof _.unzip; + export = unzip; +} + + +declare module "lodash/unzipWith" { + const unzipWith: typeof _.unzipWith; + export = unzipWith; +} + + +declare module "lodash/update" { + const update: typeof _.update; + export = update; +} + +/** +* uncoment it if definition exists +*/ +/* +declare module "lodash/updateWith" { + const updateWith: typeof _.updateWith; + export = updateWith; +} +*/ + +declare module "lodash/values" { + const values: typeof _.values; + export = values; +} + + +declare module "lodash/valuesIn" { + const valuesIn: typeof _.valuesIn; + export = valuesIn; +} + + +declare module "lodash/without" { + const without: typeof _.without; + export = without; +} + + +declare module "lodash/words" { + const words: typeof _.words; + export = words; +} + + +declare module "lodash/wrap" { + const wrap: typeof _.wrap; + export = wrap; +} + + +declare module "lodash/xor" { + const xor: typeof _.xor; + export = xor; +} + + +declare module "lodash/xorBy" { + const xorBy: typeof _.xorBy; + export = xorBy; +} + + +declare module "lodash/xorWith" { + const xorWith: typeof _.xorWith; + export = xorWith; +} + + +declare module "lodash/zip" { + const zip: typeof _.zip; + export = zip; +} + + +declare module "lodash/zipObject" { + const zipObject: typeof _.zipObject; + export = zipObject; +} + +/** +* uncoment it if definition exists +*/ +/* +declare module "lodash/zipObjectDeep" { + const zipObjectDeep: typeof _.zipObjectDeep; + export = zipObjectDeep; +} +*/ + + +declare module "lodash/zipWith" { + const zipWith: typeof _.zipWith; + export = zipWith; +} + +/** +* uncoment it if definition exists +*/ +/* +declare module "lodash/entries" { + const entries: typeof _.entries; + export = entries; +} +*/ +/** +* uncoment it if definition exists +*/ +/* +declare module "lodash/entriesIn" { + const entriesIn: typeof _.entriesIn; + export = entriesIn; +} +*/ + + +declare module "lodash/extend" { + const extend: typeof _.extend; + export = extend; +} + + +declare module "lodash/extendWith" { + const extendWith: typeof _.extendWith; + export = extendWith; +} + + +declare module "lodash/add" { + const add: typeof _.add; + export = add; +} + + +declare module "lodash/attempt" { + const attempt: typeof _.attempt; + export = attempt; +} + + +declare module "lodash/camelCase" { + const camelCase: typeof _.camelCase; + export = camelCase; +} + + +declare module "lodash/capitalize" { + const capitalize: typeof _.capitalize; + export = capitalize; +} + + +declare module "lodash/ceil" { + const ceil: typeof _.ceil; + export = ceil; +} + + +declare module "lodash/clamp" { + const clamp: typeof _.clamp; + export = clamp; +} + + +declare module "lodash/clone" { + const clone: typeof _.clone; + export = clone; +} + + +declare module "lodash/cloneDeep" { + const cloneDeep: typeof _.cloneDeep; + export = cloneDeep; +} + + +declare module "lodash/cloneDeepWith" { + const cloneDeepWith: typeof _.cloneDeepWith; + export = cloneDeepWith; +} + + +declare module "lodash/cloneWith" { + const cloneWith: typeof _.cloneWith; + export = cloneWith; +} + + +declare module "lodash/deburr" { + const deburr: typeof _.deburr; + export = deburr; +} + +/** +* uncoment it if definition exists +*/ +/* +declare module "lodash/divide" { + const divide: typeof _.divide; + export = divide; +} +*/ + +declare module "lodash/endsWith" { + const endsWith: typeof _.endsWith; + export = endsWith; +} + + +declare module "lodash/eq" { + const eq: typeof _.eq; + export = eq; +} + + +declare module "lodash/escape" { + const escape: typeof _.escape; + export = escape; +} + + +declare module "lodash/escapeRegExp" { + const escapeRegExp: typeof _.escapeRegExp; + export = escapeRegExp; +} + + +declare module "lodash/every" { + const every: typeof _.every; + export = every; +} + + +declare module "lodash/find" { + const find: typeof _.find; + export = find; +} + + +declare module "lodash/findIndex" { + const findIndex: typeof _.findIndex; + export = findIndex; +} + + +declare module "lodash/findKey" { + const findKey: typeof _.findKey; + export = findKey; +} + + +declare module "lodash/findLast" { + const findLast: typeof _.findLast; + export = findLast; +} + + +declare module "lodash/findLastIndex" { + const findLastIndex: typeof _.findLastIndex; + export = findLastIndex; +} + + +declare module "lodash/findLastKey" { + const findLastKey: typeof _.findLastKey; + export = findLastKey; +} + + +declare module "lodash/floor" { + const floor: typeof _.floor; + export = floor; +} + + +declare module "lodash/forEach" { + const forEach: typeof _.forEach; + export = forEach; +} + + +declare module "lodash/forEachRight" { + const forEachRight: typeof _.forEachRight; + export = forEachRight; +} + + +declare module "lodash/forIn" { + const forIn: typeof _.forIn; + export = forIn; +} + + +declare module "lodash/forInRight" { + const forInRight: typeof _.forInRight; + export = forInRight; +} + + +declare module "lodash/forOwn" { + const forOwn: typeof _.forOwn; + export = forOwn; +} + + +declare module "lodash/forOwnRight" { + const forOwnRight: typeof _.forOwnRight; + export = forOwnRight; +} + + +declare module "lodash/get" { + const get: typeof _.get; + export = get; +} + + +declare module "lodash/gt" { + const gt: typeof _.gt; + export = gt; +} + + +declare module "lodash/gte" { + const gte: typeof _.gte; + export = gte; +} + + +declare module "lodash/has" { + const has: typeof _.has; + export = has; +} + + +declare module "lodash/hasIn" { + const hasIn: typeof _.hasIn; + export = hasIn; +} + + +declare module "lodash/head" { + const head: typeof _.head; + export = head; +} + + +declare module "lodash/identity" { + const identity: typeof _.identity; + export = identity; +} + + +declare module "lodash/includes" { + const includes: typeof _.includes; + export = includes; +} + + +declare module "lodash/indexOf" { + const indexOf: typeof _.indexOf; + export = indexOf; +} + + +declare module "lodash/inRange" { + const inRange: typeof _.inRange; + export = inRange; +} + + +declare module "lodash/invoke" { + const invoke: typeof _.invoke; + export = invoke; +} + + +declare module "lodash/isArguments" { + const isArguments: typeof _.isArguments; + export = isArguments; +} + + +declare module "lodash/isArray" { + const isArray: typeof _.isArray; + export = isArray; +} + + +declare module "lodash/isArrayBuffer" { + const isArrayBuffer: typeof _.isArrayBuffer; + export = isArrayBuffer; +} + + +declare module "lodash/isArrayLike" { + const isArrayLike: typeof _.isArrayLike; + export = isArrayLike; +} + + +declare module "lodash/isArrayLikeObject" { + const isArrayLikeObject: typeof _.isArrayLikeObject; + export = isArrayLikeObject; +} + + +declare module "lodash/isBoolean" { + const isBoolean: typeof _.isBoolean; + export = isBoolean; +} + + +declare module "lodash/isBuffer" { + const isBuffer: typeof _.isBuffer; + export = isBuffer; +} + + +declare module "lodash/isDate" { + const isDate: typeof _.isDate; + export = isDate; +} + + +declare module "lodash/isElement" { + const isElement: typeof _.isElement; + export = isElement; +} + + +declare module "lodash/isEmpty" { + const isEmpty: typeof _.isEmpty; + export = isEmpty; +} + + +declare module "lodash/isEqual" { + const isEqual: typeof _.isEqual; + export = isEqual; +} + + +declare module "lodash/isEqualWith" { + const isEqualWith: typeof _.isEqualWith; + export = isEqualWith; +} + + +declare module "lodash/isError" { + const isError: typeof _.isError; + export = isError; +} + + +declare module "lodash/isFinite" { + const isFinite: typeof _.isFinite; + export = isFinite; +} + + +declare module "lodash/isFunction" { + const isFunction: typeof _.isFunction; + export = isFunction; +} + + +declare module "lodash/isInteger" { + const isInteger: typeof _.isInteger; + export = isInteger; +} + + +declare module "lodash/isLength" { + const isLength: typeof _.isLength; + export = isLength; +} + + +declare module "lodash/isMap" { + const isMap: typeof _.isMap; + export = isMap; +} + + +declare module "lodash/isMatch" { + const isMatch: typeof _.isMatch; + export = isMatch; +} + + +declare module "lodash/isMatchWith" { + const isMatchWith: typeof _.isMatchWith; + export = isMatchWith; +} + + +declare module "lodash/isNaN" { + const isNaN: typeof _.isNaN; + export = isNaN; +} + + +declare module "lodash/isNative" { + const isNative: typeof _.isNative; + export = isNative; +} + + +declare module "lodash/isNil" { + const isNil: typeof _.isNil; + export = isNil; +} + + +declare module "lodash/isNull" { + const isNull: typeof _.isNull; + export = isNull; +} + + +declare module "lodash/isNumber" { + const isNumber: typeof _.isNumber; + export = isNumber; +} + + +declare module "lodash/isObject" { + const isObject: typeof _.isObject; + export = isObject; +} + + +declare module "lodash/isObjectLike" { + const isObjectLike: typeof _.isObjectLike; + export = isObjectLike; +} + + +declare module "lodash/isPlainObject" { + const isPlainObject: typeof _.isPlainObject; + export = isPlainObject; +} + + +declare module "lodash/isRegExp" { + const isRegExp: typeof _.isRegExp; + export = isRegExp; +} + + +declare module "lodash/isSafeInteger" { + const isSafeInteger: typeof _.isSafeInteger; + export = isSafeInteger; +} + + +declare module "lodash/isSet" { + const isSet: typeof _.isSet; + export = isSet; +} + + +declare module "lodash/isString" { + const isString: typeof _.isString; + export = isString; +} + + +declare module "lodash/isSymbol" { + const isSymbol: typeof _.isSymbol; + export = isSymbol; +} + + +declare module "lodash/isTypedArray" { + const isTypedArray: typeof _.isTypedArray; + export = isTypedArray; +} + + +declare module "lodash/isUndefined" { + const isUndefined: typeof _.isUndefined; + export = isUndefined; +} + + +declare module "lodash/isWeakMap" { + const isWeakMap: typeof _.isWeakMap; + export = isWeakMap; +} + + +declare module "lodash/isWeakSet" { + const isWeakSet: typeof _.isWeakSet; + export = isWeakSet; +} + + +declare module "lodash/join" { + const join: typeof _.join; + export = join; +} + + +declare module "lodash/kebabCase" { + const kebabCase: typeof _.kebabCase; + export = kebabCase; +} + + +declare module "lodash/last" { + const last: typeof _.last; + export = last; +} + + +declare module "lodash/lastIndexOf" { + const lastIndexOf: typeof _.lastIndexOf; + export = lastIndexOf; +} + + +declare module "lodash/lowerCase" { + const lowerCase: typeof _.lowerCase; + export = lowerCase; +} + + +declare module "lodash/lowerFirst" { + const lowerFirst: typeof _.lowerFirst; + export = lowerFirst; +} + + +declare module "lodash/lt" { + const lt: typeof _.lt; + export = lt; +} + + +declare module "lodash/lte" { + const lte: typeof _.lte; + export = lte; +} + + +declare module "lodash/max" { + const max: typeof _.max; + export = max; +} + + +declare module "lodash/maxBy" { + const maxBy: typeof _.maxBy; + export = maxBy; +} + + +declare module "lodash/mean" { + const mean: typeof _.mean; + export = mean; +} + +/** +* uncoment it if definition exists +*/ +/* +declare module "lodash/meanBy" { + const meanBy: typeof _.meanBy; + export = meanBy; +} +*/ + +declare module "lodash/min" { + const min: typeof _.min; + export = min; +} + + +declare module "lodash/minBy" { + const minBy: typeof _.minBy; + export = minBy; +} + +/** +* uncoment it if definition exists +*/ +/* +declare module "lodash/multiply" { + const multiply: typeof _.multiply; + export = multiply; +} +*/ + +/** +* uncoment it if definition exists +*/ +/* +declare module "lodash/nth" { + const nth: typeof _.nth; + export = nth; +} +*/ + +declare module "lodash/noConflict" { + const noConflict: typeof _.noConflict; + export = noConflict; +} + + +declare module "lodash/noop" { + const noop: typeof _.noop; + export = noop; +} + + +declare module "lodash/now" { + const now: typeof _.now; + export = now; +} + + +declare module "lodash/pad" { + const pad: typeof _.pad; + export = pad; +} + + +declare module "lodash/padEnd" { + const padEnd: typeof _.padEnd; + export = padEnd; +} + + +declare module "lodash/padStart" { + const padStart: typeof _.padStart; + export = padStart; +} + + +declare module "lodash/parseInt" { + const parseInt: typeof _.parseInt; + export = parseInt; +} + + +declare module "lodash/random" { + const random: typeof _.random; + export = random; +} + + +declare module "lodash/reduce" { + const reduce: typeof _.reduce; + export = reduce; +} + + +declare module "lodash/reduceRight" { + const reduceRight: typeof _.reduceRight; + export = reduceRight; +} + + +declare module "lodash/repeat" { + const repeat: typeof _.repeat; + export = repeat; +} + + +declare module "lodash/replace" { + const replace: typeof _.replace; + export = replace; +} + + +declare module "lodash/result" { + const result: typeof _.result; + export = result; +} + + +declare module "lodash/round" { + const round: typeof _.round; + export = round; +} + + +declare module "lodash/runInContext" { + const runInContext: typeof _.runInContext; + export = runInContext; +} + + +declare module "lodash/sample" { + const sample: typeof _.sample; + export = sample; +} + + +declare module "lodash/size" { + const size: typeof _.size; + export = size; +} + + +declare module "lodash/snakeCase" { + const snakeCase: typeof _.snakeCase; + export = snakeCase; +} + + +declare module "lodash/some" { + const some: typeof _.some; + export = some; +} + + +declare module "lodash/sortedIndex" { + const sortedIndex: typeof _.sortedIndex; + export = sortedIndex; +} + + +declare module "lodash/sortedIndexBy" { + const sortedIndexBy: typeof _.sortedIndexBy; + export = sortedIndexBy; +} + + +declare module "lodash/sortedIndexOf" { + const sortedIndexOf: typeof _.sortedIndexOf; + export = sortedIndexOf; +} + + +declare module "lodash/sortedLastIndex" { + const sortedLastIndex: typeof _.sortedLastIndex; + export = sortedLastIndex; +} + + +declare module "lodash/sortedLastIndexBy" { + const sortedLastIndexBy: typeof _.sortedLastIndexBy; + export = sortedLastIndexBy; +} + + +declare module "lodash/sortedLastIndexOf" { + const sortedLastIndexOf: typeof _.sortedLastIndexOf; + export = sortedLastIndexOf; +} + + +declare module "lodash/startCase" { + const startCase: typeof _.startCase; + export = startCase; +} + + +declare module "lodash/startsWith" { + const startsWith: typeof _.startsWith; + export = startsWith; +} + + +declare module "lodash/subtract" { + const subtract: typeof _.subtract; + export = subtract; +} + + +declare module "lodash/sum" { + const sum: typeof _.sum; + export = sum; +} + + +declare module "lodash/sumBy" { + const sumBy: typeof _.sumBy; + export = sumBy; +} + + +declare module "lodash/template" { + const template: typeof _.template; + export = template; +} + + +declare module "lodash/times" { + const times: typeof _.times; + export = times; +} + + +declare module "lodash/toInteger" { + const toInteger: typeof _.toInteger; + export = toInteger; +} + + +declare module "lodash/toLength" { + const toLength: typeof _.toLength; + export = toLength; +} + + +declare module "lodash/toLower" { + const toLower: typeof _.toLower; + export = toLower; +} + + +declare module "lodash/toNumber" { + const toNumber: typeof _.toNumber; + export = toNumber; +} + + +declare module "lodash/toSafeInteger" { + const toSafeInteger: typeof _.toSafeInteger; + export = toSafeInteger; +} + + +declare module "lodash/toString" { + const toString: typeof _.toString; + export = toString; +} + + +declare module "lodash/toUpper" { + const toUpper: typeof _.toUpper; + export = toUpper; +} + + +declare module "lodash/trim" { + const trim: typeof _.trim; + export = trim; +} + + +declare module "lodash/trimEnd" { + const trimEnd: typeof _.trimEnd; + export = trimEnd; +} + + +declare module "lodash/trimStart" { + const trimStart: typeof _.trimStart; + export = trimStart; +} + + +declare module "lodash/truncate" { + const truncate: typeof _.truncate; + export = truncate; +} + + +declare module "lodash/unescape" { + const unescape: typeof _.unescape; + export = unescape; +} + + +declare module "lodash/uniqueId" { + const uniqueId: typeof _.uniqueId; + export = uniqueId; +} + + +declare module "lodash/upperCase" { + const upperCase: typeof _.upperCase; + export = upperCase; +} + + +declare module "lodash/upperFirst" { + const upperFirst: typeof _.upperFirst; + export = upperFirst; +} + + +declare module "lodash/each" { + const each: typeof _.each; + export = each; +} + + +declare module "lodash/eachRight" { + const eachRight: typeof _.eachRight; + export = eachRight; +} + + +declare module "lodash/first" { + const first: typeof _.first; + export = first; +} + +declare module "lodash/fp" { + export = _; +} + +declare module "lodash" { + export = _; +} + +// Backward compatibility with --target es5 +interface Set {} +interface Map {} +interface WeakSet {} +interface WeakMap {} diff --git a/typings/minimatch/minimatch.d.ts b/typings/minimatch/minimatch.d.ts index 697f9e21..5a6c7215 100644 --- a/typings/minimatch/minimatch.d.ts +++ b/typings/minimatch/minimatch.d.ts @@ -1,47 +1,64 @@ -// Type definitions for Minimatch 1.0.0 +// Type definitions for Minimatch 2.0.8 // Project: https://github.com/isaacs/minimatch // Definitions by: vvakame -// Definitions: https://github.com/borisyankov/DefinitelyTyped +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare module "minimatch" { - function M(target:string, pattern:string, options?:M.IOptions): boolean; + function M(target: string, pattern: string, options?: M.IOptions): boolean; - module M { - function match(filenames:string[], pattern:string, options?:IOptions):string[]; - function filter(pattern:string, options?:IOptions): (target: string) => boolean; + namespace M { + function match(list: string[], pattern: string, options?: IOptions): string[]; + function filter(pattern: string, options?: IOptions): (element: string, indexed: number, array: string[]) => boolean; + function makeRe(pattern: string, options?: IOptions): RegExp; - var Minimatch:IMinimatchStatic; + var Minimatch: IMinimatchStatic; interface IOptions { - debug?:boolean; - nobrace?:boolean; - noglobstar?:boolean; - dot?:boolean; - noext?:boolean; - nocase?:boolean; - nonull?:boolean; - matchBase?:boolean; - nocomment?:boolean; - nonegate?:boolean; - flipNegate?:boolean; + debug?: boolean; + nobrace?: boolean; + noglobstar?: boolean; + dot?: boolean; + noext?: boolean; + nocase?: boolean; + nonull?: boolean; + matchBase?: boolean; + nocomment?: boolean; + nonegate?: boolean; + flipNegate?: boolean; } interface IMinimatchStatic { - new (pattern:string, options?:IOptions):IMinimatch; + new (pattern: string, options?: IOptions): IMinimatch; + prototype: IMinimatch; } interface IMinimatch { - debug():void; - make():void; - parseNegate():void; - braceExpand(pattern:string, options:IOptions):void; - parse(pattern:string, isSub?:boolean):void; - makeRe():RegExp; // regexp or boolean - match(file:string):boolean; - matchOne(files:string[], pattern:string[], partial:any):boolean; + pattern: string; + options: IOptions; + /** 2-dimensional array of regexp or string expressions. */ + set: any[][]; // (RegExp | string)[][] + regexp: RegExp; + negate: boolean; + comment: boolean; + empty: boolean; + + makeRe(): RegExp; // regexp or boolean + match(fname: string): boolean; + matchOne(files: string[], pattern: string[], partial: boolean): boolean; + + /** Deprecated. For internal use. */ + debug(): void; + /** Deprecated. For internal use. */ + make(): void; + /** Deprecated. For internal use. */ + parseNegate(): void; + /** Deprecated. For internal use. */ + braceExpand(pattern: string, options: IOptions): void; + /** Deprecated. For internal use. */ + parse(pattern: string, isSub?: boolean): void; } } -export = M; + export = M; } diff --git a/typings/minimist/minimist.d.ts b/typings/minimist/minimist.d.ts deleted file mode 100644 index abbc5f02..00000000 --- a/typings/minimist/minimist.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -// Type definitions for minimist 1.1.3 -// Project: https://github.com/substack/minimist -// Definitions by: Bart van der Schoor , Necroskillz -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -declare module 'minimist' { - function minimist(args?: string[], opts?: minimist.Opts): minimist.ParsedArgs; - - module minimist { - export interface Opts { - // a string or array of strings argument names to always treat as strings - // string?: string; - string?: string|string[]; - // a string or array of strings to always treat as booleans - // boolean?: string; - boolean?: boolean|string|string[]; - // an object mapping string names to strings or arrays of string argument names to use - // alias?: {[key:string]: string}; - alias?: {[key:string]: string[]}; - // an object mapping string argument names to default values - default?: {[key:string]: any}; - // when true, populate argv._ with everything after the first non-option - stopEarly?: boolean; - // a function which is invoked with a command line parameter not defined in the opts configuration object. - // If the function returns false, the unknown option is not added to argv - unknown?: (arg: string) => boolean; - // when true, populate argv._ with everything before the -- and argv['--'] with everything after the -- - '--'?: boolean; - } - - export interface ParsedArgs { - [arg: string]: any; - _: string[]; - } - } - - export = minimist; -} diff --git a/typings/mkdirp/mkdirp.d.ts b/typings/mkdirp/mkdirp.d.ts index c3fca38a..cd635ab4 100644 --- a/typings/mkdirp/mkdirp.d.ts +++ b/typings/mkdirp/mkdirp.d.ts @@ -1,14 +1,14 @@ // Type definitions for mkdirp 0.3.0 // Project: http://github.com/substack/node-mkdirp // Definitions by: Bart van der Schoor -// Definitions: https://github.com/borisyankov/DefinitelyTyped +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare module 'mkdirp' { function mkdirp(dir: string, cb: (err: any, made: string) => void): void; function mkdirp(dir: string, flags: any, cb: (err: any, made: string) => void): void; - module mkdirp { + namespace mkdirp { function sync(dir: string, flags?: any): string; } export = mkdirp; diff --git a/typings/mocha/mocha.d.ts b/typings/mocha/mocha.d.ts deleted file mode 100644 index 88dc359f..00000000 --- a/typings/mocha/mocha.d.ts +++ /dev/null @@ -1,214 +0,0 @@ -// Type definitions for mocha 2.2.5 -// Project: http://mochajs.org/ -// Definitions by: Kazi Manzur Rashid , otiai10 , jt000 , Vadim Macagon -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -interface MochaSetupOptions { - //milliseconds to wait before considering a test slow - slow?: number; - - // timeout in milliseconds - timeout?: number; - - // ui name "bdd", "tdd", "exports" etc - ui?: string; - - //array of accepted globals - globals?: any[]; - - // reporter instance (function or string), defaults to `mocha.reporters.Spec` - reporter?: any; - - // bail on the first test failure - bail?: boolean; - - // ignore global leaks - ignoreLeaks?: boolean; - - // grep string or regexp to filter tests with - grep?: any; -} - -interface MochaDone { - (error?: Error): void; -} - -declare var mocha: Mocha; -declare var describe: Mocha.IContextDefinition; -declare var xdescribe: Mocha.IContextDefinition; -// alias for `describe` -declare var context: Mocha.IContextDefinition; -// alias for `describe` -declare var suite: Mocha.IContextDefinition; -declare var it: Mocha.ITestDefinition; -declare var xit: Mocha.ITestDefinition; -// alias for `it` -declare var test: Mocha.ITestDefinition; - -declare function before(action: () => void): void; - -declare function before(action: (done: MochaDone) => void): void; - -declare function setup(action: () => void): void; - -declare function setup(action: (done: MochaDone) => void): void; - -declare function after(action: () => void): void; - -declare function after(action: (done: MochaDone) => void): void; - -declare function teardown(action: () => void): void; - -declare function teardown(action: (done: MochaDone) => void): void; - -declare function beforeEach(action: () => void): void; - -declare function beforeEach(action: (done: MochaDone) => void): void; - -declare function suiteSetup(action: () => void): void; - -declare function suiteSetup(action: (done: MochaDone) => void): void; - -declare function afterEach(action: () => void): void; - -declare function afterEach(action: (done: MochaDone) => void): void; - -declare function suiteTeardown(action: () => void): void; - -declare function suiteTeardown(action: (done: MochaDone) => void): void; - -declare class Mocha { - constructor(options?: { - grep?: RegExp; - ui?: string; - reporter?: string; - timeout?: number; - bail?: boolean; - }); - - /** Setup mocha with the given options. */ - setup(options: MochaSetupOptions): Mocha; - bail(value?: boolean): Mocha; - addFile(file: string): Mocha; - /** Sets reporter by name, defaults to "spec". */ - reporter(name: string): Mocha; - /** Sets reporter constructor, defaults to mocha.reporters.Spec. */ - reporter(reporter: (runner: Mocha.IRunner, options: any) => any): Mocha; - ui(value: string): Mocha; - grep(value: string): Mocha; - grep(value: RegExp): Mocha; - invert(): Mocha; - ignoreLeaks(value: boolean): Mocha; - checkLeaks(): Mocha; - /** Enables growl support. */ - growl(): Mocha; - globals(value: string): Mocha; - globals(values: string[]): Mocha; - useColors(value: boolean): Mocha; - useInlineDiffs(value: boolean): Mocha; - timeout(value: number): Mocha; - slow(value: number): Mocha; - enableTimeouts(value: boolean): Mocha; - asyncOnly(value: boolean): Mocha; - noHighlighting(value: boolean): Mocha; - /** Runs tests and invokes `onComplete()` when finished. */ - run(onComplete?: (failures: number) => void): Mocha.IRunner; -} - -// merge the Mocha class declaration with a module -declare module Mocha { - /** Partial interface for Mocha's `Runnable` class. */ - interface IRunnable { - title: string; - fn: Function; - async: boolean; - sync: boolean; - timedOut: boolean; - } - - /** Partial interface for Mocha's `Suite` class. */ - interface ISuite { - parent: ISuite; - title: string; - - fullTitle(): string; - } - - /** Partial interface for Mocha's `Test` class. */ - interface ITest extends IRunnable { - parent: ISuite; - pending: boolean; - - fullTitle(): string; - } - - /** Partial interface for Mocha's `Runner` class. */ - interface IRunner {} - - interface IContextDefinition { - (description: string, spec: () => void): ISuite; - only(description: string, spec: () => void): ISuite; - skip(description: string, spec: () => void): void; - timeout(ms: number): void; - } - - interface ITestDefinition { - (expectation: string, assertion?: () => void): ITest; - (expectation: string, assertion?: (done: MochaDone) => void): ITest; - only(expectation: string, assertion?: () => void): ITest; - only(expectation: string, assertion?: (done: MochaDone) => void): ITest; - skip(expectation: string, assertion?: () => void): void; - skip(expectation: string, assertion?: (done: MochaDone) => void): void; - timeout(ms: number): void; - } - - export module reporters { - export class Base { - stats: { - suites: number; - tests: number; - passes: number; - pending: number; - failures: number; - }; - - constructor(runner: IRunner); - } - - export class Doc extends Base {} - export class Dot extends Base {} - export class HTML extends Base {} - export class HTMLCov extends Base {} - export class JSON extends Base {} - export class JSONCov extends Base {} - export class JSONStream extends Base {} - export class Landing extends Base {} - export class List extends Base {} - export class Markdown extends Base {} - export class Min extends Base {} - export class Nyan extends Base {} - export class Progress extends Base { - /** - * @param options.open String used to indicate the start of the progress bar. - * @param options.complete String used to indicate a complete test on the progress bar. - * @param options.incomplete String used to indicate an incomplete test on the progress bar. - * @param options.close String used to indicate the end of the progress bar. - */ - constructor(runner: IRunner, options?: { - open?: string; - complete?: string; - incomplete?: string; - close?: string; - }); - } - export class Spec extends Base {} - export class TAP extends Base {} - export class XUnit extends Base { - constructor(runner: IRunner, options?: any); - } - } -} - -declare module "mocha" { - export = Mocha; -} diff --git a/typings/node-uuid/node-uuid-base.d.ts b/typings/node-uuid/node-uuid-base.d.ts index 255bb6b3..fc59e9c7 100644 --- a/typings/node-uuid/node-uuid-base.d.ts +++ b/typings/node-uuid/node-uuid-base.d.ts @@ -1,7 +1,7 @@ // Type definitions for node-uuid.js // Project: https://github.com/broofa/node-uuid // Definitions by: Jeff May -// Definitions: https://github.com/borisyankov/DefinitelyTyped +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /** Common definitions for all environments */ declare namespace __NodeUUID { @@ -36,12 +36,6 @@ declare namespace __NodeUUID { v1(options?: UUIDOptions): string; v1(options?: UUIDOptions, buffer?: number[], offset?: number): number[]; - v2(options?: UUIDOptions): string; - v2(options?: UUIDOptions, buffer?: number[], offset?: number): number[]; - - v3(options?: UUIDOptions): string; - v3(options?: UUIDOptions, buffer?: number[], offset?: number): number[]; - v4(options?: UUIDOptions): string; v4(options?: UUIDOptions, buffer?: number[], offset?: number): number[]; diff --git a/typings/node-uuid/node-uuid-cjs.d.ts b/typings/node-uuid/node-uuid-cjs.d.ts index 3c3a042e..78f75354 100644 --- a/typings/node-uuid/node-uuid-cjs.d.ts +++ b/typings/node-uuid/node-uuid-cjs.d.ts @@ -1,9 +1,9 @@ // Type definitions for node-uuid.js // Project: https://github.com/broofa/node-uuid // Definitions by: Jeff May -// Definitions: https://github.com/borisyankov/DefinitelyTyped - +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +/// /** * Expose as CommonJS module diff --git a/typings/node-uuid/node-uuid.d.ts b/typings/node-uuid/node-uuid.d.ts index 3105cdb1..a6737053 100644 --- a/typings/node-uuid/node-uuid.d.ts +++ b/typings/node-uuid/node-uuid.d.ts @@ -1,11 +1,11 @@ // Type definitions for node-uuid.js // Project: https://github.com/broofa/node-uuid // Definitions by: Jeff May -// Definitions: https://github.com/borisyankov/DefinitelyTyped - - - +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +/// +/// +/// /** * Definitions for use in node environment @@ -23,14 +23,6 @@ declare module __NodeUUID { v1(options?: UUIDOptions, buffer?: number[], offset?: number): number[]; v1(options?: UUIDOptions, buffer?: Buffer, offset?: number): Buffer; - v2(options?: UUIDOptions): string; - v2(options?: UUIDOptions, buffer?: number[], offset?: number): number[]; - v2(options?: UUIDOptions, buffer?: Buffer, offset?: number): Buffer; - - v3(options?: UUIDOptions): string; - v3(options?: UUIDOptions, buffer?: number[], offset?: number): number[]; - v3(options?: UUIDOptions, buffer?: Buffer, offset?: number): Buffer; - v4(options?: UUIDOptions): string; v4(options?: UUIDOptions, buffer?: number[], offset?: number): number[]; v4(options?: UUIDOptions, buffer?: Buffer, offset?: number): Buffer; diff --git a/typings/node/node.d.ts b/typings/node/node.d.ts index 1b661d8f..c3d9d2e1 100644 --- a/typings/node/node.d.ts +++ b/typings/node/node.d.ts @@ -1,21 +1,30 @@ -// Type definitions for Node.js v0.12.0 +// Type definitions for Node.js v6.x // Project: http://nodejs.org/ -// Definitions by: Microsoft TypeScript , DefinitelyTyped -// Definitions: https://github.com/borisyankov/DefinitelyTyped +// Definitions by: Microsoft TypeScript , DefinitelyTyped +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /************************************************ * * -* Node.js v0.12.0 API * +* Node.js v6.x API * * * ************************************************/ -// compat for TypeScript 1.5.3 +interface Error { + stack?: string; +} + +interface ErrorConstructor { + captureStackTrace(targetObject: Object, constructorOpt?: Function): void; + stackTraceLimit: number; +} + +// compat for TypeScript 1.8 // if you use with --target es3 or --target es5 and use below definitions, -// use the lib.es6.d.ts that is bundled with TypeScript 1.5.3. -interface MapConstructor {} -interface WeakMapConstructor {} -interface SetConstructor {} -interface WeakSetConstructor {} +// use the lib.es6.d.ts that is bundled with TypeScript 1.8. +interface MapConstructor { } +interface WeakMapConstructor { } +interface SetConstructor { } +interface WeakSetConstructor { } /************************************************ * * @@ -27,6 +36,7 @@ declare var global: NodeJS.Global; declare var __filename: string; declare var __dirname: string; +declare var console: any; declare function setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timer; declare function clearTimeout(timeoutId: NodeJS.Timer): void; @@ -40,7 +50,7 @@ interface NodeRequireFunction { } interface NodeRequire extends NodeRequireFunction { - resolve(id:string): string; + resolve(id: string): string; cache: any; extensions: any; main: any; @@ -75,7 +85,8 @@ declare var SlowBuffer: { // Buffer class -interface Buffer extends NodeBuffer {} +type BufferEncoding = "ascii" | "utf8" | "utf16le" | "ucs2" | "binary" | "hex"; +interface Buffer extends NodeBuffer { } /** * Raw data is stored in instances of the Buffer class. @@ -102,19 +113,64 @@ declare var Buffer: { * @param array The octets to store. */ new (array: Uint8Array): Buffer; + /** + * Produces a Buffer backed by the same allocated memory as + * the given {ArrayBuffer}. + * + * + * @param arrayBuffer The ArrayBuffer with which to share memory. + */ + new (arrayBuffer: ArrayBuffer): Buffer; /** * Allocates a new buffer containing the given {array} of octets. * * @param array The octets to store. */ new (array: any[]): Buffer; + /** + * Copies the passed {buffer} data onto a new {Buffer} instance. + * + * @param buffer The buffer to copy. + */ + new (buffer: Buffer): Buffer; prototype: Buffer; + /** + * Allocates a new Buffer using an {array} of octets. + * + * @param array + */ + from(array: any[]): Buffer; + /** + * When passed a reference to the .buffer property of a TypedArray instance, + * the newly created Buffer will share the same allocated memory as the TypedArray. + * The optional {byteOffset} and {length} arguments specify a memory range + * within the {arrayBuffer} that will be shared by the Buffer. + * + * @param arrayBuffer The .buffer property of a TypedArray or a new ArrayBuffer() + * @param byteOffset + * @param length + */ + from(arrayBuffer: ArrayBuffer, byteOffset?: number, length?: number): Buffer; + /** + * Copies the passed {buffer} data onto a new Buffer instance. + * + * @param buffer + */ + from(buffer: Buffer): Buffer; + /** + * Creates a new Buffer containing the given JavaScript string {str}. + * If provided, the {encoding} parameter identifies the character encoding. + * If not provided, {encoding} defaults to 'utf8'. + * + * @param str + */ + from(str: string, encoding?: string): Buffer; /** * Returns true if {obj} is a Buffer * * @param obj object to test. */ - isBuffer(obj: any): boolean; + isBuffer(obj: any): obj is Buffer; /** * Returns true if {encoding} is a valid encoding argument. * Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex' @@ -146,6 +202,29 @@ declare var Buffer: { * The same as buf1.compare(buf2). */ compare(buf1: Buffer, buf2: Buffer): number; + /** + * Allocates a new buffer of {size} octets. + * + * @param size count of octets to allocate. + * @param fill if specified, buffer will be initialized by calling buf.fill(fill). + * If parameter is omitted, buffer will be filled with zeros. + * @param encoding encoding used for call to buf.fill while initalizing + */ + alloc(size: number, fill?: string | Buffer | number, encoding?: string): Buffer; + /** + * Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents + * of the newly created Buffer are unknown and may contain sensitive data. + * + * @param size count of octets to allocate + */ + allocUnsafe(size: number): Buffer; + /** + * Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents + * of the newly created Buffer are unknown and may contain sensitive data. + * + * @param size count of octets to allocate + */ + allocUnsafeSlow(size: number): Buffer; }; /************************************************ @@ -153,32 +232,38 @@ declare var Buffer: { * GLOBAL INTERFACES * * * ************************************************/ -declare module NodeJS { +declare namespace NodeJS { export interface ErrnoException extends Error { - errno?: number; + errno?: string; code?: string; path?: string; syscall?: string; stack?: string; } - export interface EventEmitter { - addListener(event: string, listener: Function): EventEmitter; - on(event: string, listener: Function): EventEmitter; - once(event: string, listener: Function): EventEmitter; - removeListener(event: string, listener: Function): EventEmitter; - removeAllListeners(event?: string): EventEmitter; - setMaxListeners(n: number): void; - listeners(event: string): Function[]; - emit(event: string, ...args: any[]): boolean; + export class EventEmitter { + addListener(event: string | symbol, listener: Function): this; + on(event: string | symbol, listener: Function): this; + once(event: string | symbol, listener: Function): this; + removeListener(event: string | symbol, listener: Function): this; + removeAllListeners(event?: string | symbol): this; + setMaxListeners(n: number): this; + getMaxListeners(): number; + listeners(event: string | symbol): Function[]; + emit(event: string | symbol, ...args: any[]): boolean; + listenerCount(type: string | symbol): number; + // Added in Node 6... + prependListener(event: string | symbol, listener: Function): this; + prependOnceListener(event: string | symbol, listener: Function): this; + eventNames(): (string | symbol)[]; } export interface ReadableStream extends EventEmitter { readable: boolean; - read(size?: number): string|Buffer; + read(size?: number): string | Buffer; setEncoding(encoding: string): void; - pause(): void; - resume(): void; + pause(): ReadableStream; + resume(): ReadableStream; pipe(destination: T, options?: { end?: boolean; }): T; unpipe(destination?: T): void; unshift(chunk: string): void; @@ -188,8 +273,7 @@ declare module NodeJS { export interface WritableStream extends EventEmitter { writable: boolean; - write(buffer: Buffer, cb?: Function): boolean; - write(str: string, cb?: Function): boolean; + write(buffer: Buffer | string, cb?: Function): boolean; write(str: string, encoding?: string, cb?: Function): boolean; end(): void; end(buffer: Buffer, cb?: Function): void; @@ -197,19 +281,58 @@ declare module NodeJS { end(str: string, encoding?: string, cb?: Function): void; } - export interface ReadWriteStream extends ReadableStream, WritableStream {} + export interface ReadWriteStream extends ReadableStream, WritableStream { + pause(): ReadWriteStream; + resume(): ReadWriteStream; + } + + export interface Events extends EventEmitter { } + + export interface Domain extends Events { + run(fn: Function): void; + add(emitter: Events): void; + remove(emitter: Events): void; + bind(cb: (err: Error, data: any) => any): any; + intercept(cb: (data: any) => any): any; + dispose(): void; + + addListener(event: string, listener: Function): this; + on(event: string, listener: Function): this; + once(event: string, listener: Function): this; + removeListener(event: string, listener: Function): this; + removeAllListeners(event?: string): this; + } + + export interface MemoryUsage { + rss: number; + heapTotal: number; + heapUsed: number; + } + + export interface ProcessVersions { + http_parser: string; + node: string; + v8: string; + ares: string; + uv: string; + zlib: string; + modules: string; + openssl: string; + } export interface Process extends EventEmitter { stdout: WritableStream; stderr: WritableStream; stdin: ReadableStream; argv: string[]; + execArgv: string[]; execPath: string; abort(): void; chdir(directory: string): void; cwd(): string; env: any; exit(code?: number): void; + exitCode: number; getgid(): number; setgid(id: number): void; setgid(id: string): void; @@ -217,15 +340,7 @@ declare module NodeJS { setuid(id: number): void; setuid(id: string): void; version: string; - versions: { - http_parser: string; - node: string; - v8: string; - ares: string; - uv: string; - zlib: string; - openssl: string; - }; + versions: ProcessVersions; config: { target_defaults: { cflags: any[]; @@ -252,19 +367,22 @@ declare module NodeJS { visibility: string; }; }; - kill(pid: number, signal?: string): void; + kill(pid: number, signal?: string | number): void; pid: number; title: string; arch: string; platform: string; - memoryUsage(): { rss: number; heapTotal: number; heapUsed: number; }; - nextTick(callback: Function): void; + memoryUsage(): MemoryUsage; + nextTick(callback: Function, ...args: any[]): void; umask(mask?: number): number; uptime(): number; - hrtime(time?:number[]): number[]; + hrtime(time?: number[]): number[]; + domain: Domain; // Worker send?(message: any, sendHandle?: any): void; + disconnect(): void; + connected: boolean; } export interface Global { @@ -330,25 +448,26 @@ declare module NodeJS { undefined: typeof undefined; unescape: (str: string) => string; gc: () => void; + v8debug?: any; } export interface Timer { - ref() : void; - unref() : void; + ref(): void; + unref(): void; } } +interface IterableIterator { } + /** * @deprecated */ -interface NodeBuffer { - [index: number]: number; +interface NodeBuffer extends Uint8Array { write(string: string, offset?: number, length?: number, encoding?: string): number; toString(encoding?: string, start?: number, end?: number): string; - toJSON(): any; - length: number; + toJSON(): { type: 'Buffer', data: any[] }; equals(otherBuffer: Buffer): boolean; - compare(otherBuffer: Buffer): number; + compare(otherBuffer: Buffer, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number; copy(targetBuffer: Buffer, targetStart?: number, sourceStart?: number, sourceEnd?: number): number; slice(start?: number, end?: number): Buffer; writeUIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; @@ -359,7 +478,7 @@ interface NodeBuffer { readUIntBE(offset: number, byteLength: number, noAssert?: boolean): number; readIntLE(offset: number, byteLength: number, noAssert?: boolean): number; readIntBE(offset: number, byteLength: number, noAssert?: boolean): number; - readUInt8(offset: number, noAsset?: boolean): number; + readUInt8(offset: number, noAssert?: boolean): number; readUInt16LE(offset: number, noAssert?: boolean): number; readUInt16BE(offset: number, noAssert?: boolean): number; readUInt32LE(offset: number, noAssert?: boolean): number; @@ -373,21 +492,30 @@ interface NodeBuffer { readFloatBE(offset: number, noAssert?: boolean): number; readDoubleLE(offset: number, noAssert?: boolean): number; readDoubleBE(offset: number, noAssert?: boolean): number; - writeUInt8(value: number, offset: number, noAssert?: boolean): void; - writeUInt16LE(value: number, offset: number, noAssert?: boolean): void; - writeUInt16BE(value: number, offset: number, noAssert?: boolean): void; - writeUInt32LE(value: number, offset: number, noAssert?: boolean): void; - writeUInt32BE(value: number, offset: number, noAssert?: boolean): void; - writeInt8(value: number, offset: number, noAssert?: boolean): void; - writeInt16LE(value: number, offset: number, noAssert?: boolean): void; - writeInt16BE(value: number, offset: number, noAssert?: boolean): void; - writeInt32LE(value: number, offset: number, noAssert?: boolean): void; - writeInt32BE(value: number, offset: number, noAssert?: boolean): void; - writeFloatLE(value: number, offset: number, noAssert?: boolean): void; - writeFloatBE(value: number, offset: number, noAssert?: boolean): void; - writeDoubleLE(value: number, offset: number, noAssert?: boolean): void; - writeDoubleBE(value: number, offset: number, noAssert?: boolean): void; - fill(value: any, offset?: number, end?: number): void; + swap16(): Buffer; + swap32(): Buffer; + swap64(): Buffer; + writeUInt8(value: number, offset: number, noAssert?: boolean): number; + writeUInt16LE(value: number, offset: number, noAssert?: boolean): number; + writeUInt16BE(value: number, offset: number, noAssert?: boolean): number; + writeUInt32LE(value: number, offset: number, noAssert?: boolean): number; + writeUInt32BE(value: number, offset: number, noAssert?: boolean): number; + writeInt8(value: number, offset: number, noAssert?: boolean): number; + writeInt16LE(value: number, offset: number, noAssert?: boolean): number; + writeInt16BE(value: number, offset: number, noAssert?: boolean): number; + writeInt32LE(value: number, offset: number, noAssert?: boolean): number; + writeInt32BE(value: number, offset: number, noAssert?: boolean): number; + writeFloatLE(value: number, offset: number, noAssert?: boolean): number; + writeFloatBE(value: number, offset: number, noAssert?: boolean): number; + writeDoubleLE(value: number, offset: number, noAssert?: boolean): number; + writeDoubleBE(value: number, offset: number, noAssert?: boolean): number; + fill(value: any, offset?: number, end?: number): this; + indexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; + lastIndexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; + entries(): IterableIterator<[number, number]>; + includes(value: string | number | Buffer, byteOffset?: number, encoding?: string): boolean; + keys(): IterableIterator; + values(): IterableIterator; } /************************************************ @@ -397,28 +525,48 @@ interface NodeBuffer { ************************************************/ declare module "buffer" { export var INSPECT_MAX_BYTES: number; + var BuffType: typeof Buffer; + var SlowBuffType: typeof SlowBuffer; + export { BuffType as Buffer, SlowBuffType as SlowBuffer }; } declare module "querystring" { - export function stringify(obj: any, sep?: string, eq?: string): string; - export function parse(str: string, sep?: string, eq?: string, options?: { maxKeys?: number; }): any; + export interface StringifyOptions { + encodeURIComponent?: Function; + } + + export interface ParseOptions { + maxKeys?: number; + decodeURIComponent?: Function; + } + + export function stringify(obj: T, sep?: string, eq?: string, options?: StringifyOptions): string; + export function parse(str: string, sep?: string, eq?: string, options?: ParseOptions): any; + export function parse(str: string, sep?: string, eq?: string, options?: ParseOptions): T; export function escape(str: string): string; export function unescape(str: string): string; } declare module "events" { - export class EventEmitter implements NodeJS.EventEmitter { - static listenerCount(emitter: EventEmitter, event: string): number; - - addListener(event: string, listener: Function): EventEmitter; - on(event: string, listener: Function): EventEmitter; - once(event: string, listener: Function): EventEmitter; - removeListener(event: string, listener: Function): EventEmitter; - removeAllListeners(event?: string): EventEmitter; - setMaxListeners(n: number): void; - listeners(event: string): Function[]; - emit(event: string, ...args: any[]): boolean; - } + export class EventEmitter extends NodeJS.EventEmitter { + static EventEmitter: EventEmitter; + static listenerCount(emitter: EventEmitter, event: string | symbol): number; // deprecated + static defaultMaxListeners: number; + + addListener(event: string | symbol, listener: Function): this; + on(event: string | symbol, listener: Function): this; + once(event: string | symbol, listener: Function): this; + prependListener(event: string | symbol, listener: Function): this; + prependOnceListener(event: string | symbol, listener: Function): this; + removeListener(event: string | symbol, listener: Function): this; + removeAllListeners(event?: string | symbol): this; + setMaxListeners(n: number): this; + getMaxListeners(): number; + listeners(event: string | symbol): Function[]; + emit(event: string | symbol, ...args: any[]): boolean; + eventNames(): (string | symbol)[]; + listenerCount(type: string | symbol): number; + } } declare module "http" { @@ -426,14 +574,26 @@ declare module "http" { import * as net from "net"; import * as stream from "stream"; - export interface Server extends events.EventEmitter { - listen(port: number, hostname?: string, backlog?: number, callback?: Function): Server; - listen(port: number, hostname?: string, callback?: Function): Server; - listen(path: string, callback?: Function): Server; - listen(handle: any, listeningListener?: Function): Server; - close(cb?: any): Server; - address(): { port: number; family: string; address: string; }; + export interface RequestOptions { + protocol?: string; + host?: string; + hostname?: string; + family?: number; + port?: number; + localAddress?: string; + socketPath?: string; + method?: string; + path?: string; + headers?: { [key: string]: any }; + auth?: string; + agent?: Agent | boolean; + } + + export interface Server extends net.Server { + setTimeout(msecs: number, callback: Function): void; maxHeadersCount: number; + timeout: number; + listening: boolean; } /** * @deprecated Use IncomingMessage @@ -441,7 +601,7 @@ declare module "http" { export interface ServerRequest extends IncomingMessage { connection: net.Socket; } - export interface ServerResponse extends events.EventEmitter, stream.Writable { + export interface ServerResponse extends stream.Writable { // Extended base methods write(buffer: Buffer): boolean; write(buffer: Buffer, cb?: Function): boolean; @@ -453,12 +613,16 @@ declare module "http" { writeHead(statusCode: number, reasonPhrase?: string, headers?: any): void; writeHead(statusCode: number, headers?: any): void; statusCode: number; - setHeader(name: string, value: string): void; + statusMessage: string; + headersSent: boolean; + setHeader(name: string, value: string | string[]): void; + setTimeout(msecs: number, callback: Function): ServerResponse; sendDate: boolean; getHeader(name: string): string; removeHeader(name: string): void; write(chunk: any, encoding?: string): any; addTrailers(headers: any): void; + finished: boolean; // Extended base methods end(): void; @@ -467,7 +631,7 @@ declare module "http" { end(str: string, encoding?: string, cb?: Function): void; end(data?: any, encoding?: string): void; } - export interface ClientRequest extends events.EventEmitter, stream.Writable { + export interface ClientRequest extends stream.Writable { // Extended base methods write(buffer: Buffer): boolean; write(buffer: Buffer, cb?: Function): boolean; @@ -481,6 +645,11 @@ declare module "http" { setNoDelay(noDelay?: boolean): void; setSocketKeepAlive(enable?: boolean, initialDelay?: number): void; + setHeader(name: string, value: string | string[]): void; + getHeader(name: string): string; + removeHeader(name: string): void; + addTrailers(headers: any): void; + // Extended base methods end(): void; end(buffer: Buffer, cb?: Function): void; @@ -488,8 +657,11 @@ declare module "http" { end(str: string, encoding?: string, cb?: Function): void; end(data?: any, encoding?: string): void; } - export interface IncomingMessage extends events.EventEmitter, stream.Readable { + export interface IncomingMessage extends stream.Readable { httpVersion: string; + httpVersionMajor: number; + httpVersionMinor: number; + connection: net.Socket; headers: any; rawHeaders: string[]; trailers: any; @@ -512,47 +684,48 @@ declare module "http" { */ statusMessage?: string; socket: net.Socket; + destroy(error?: Error): void; } /** * @deprecated Use IncomingMessage */ export interface ClientResponse extends IncomingMessage { } - export interface AgentOptions { - /** - * Keep sockets around in a pool to be used by other requests in the future. Default = false - */ - keepAlive?: boolean; - /** - * When using HTTP KeepAlive, how often to send TCP KeepAlive packets over sockets being kept alive. Default = 1000. - * Only relevant if keepAlive is set to true. - */ - keepAliveMsecs?: number; - /** - * Maximum number of sockets to allow per host. Default for Node 0.10 is 5, default for Node 0.12 is Infinity - */ - maxSockets?: number; - /** - * Maximum number of sockets to leave open in a free state. Only relevant if keepAlive is set to true. Default = 256. - */ - maxFreeSockets?: number; - } + export interface AgentOptions { + /** + * Keep sockets around in a pool to be used by other requests in the future. Default = false + */ + keepAlive?: boolean; + /** + * When using HTTP KeepAlive, how often to send TCP KeepAlive packets over sockets being kept alive. Default = 1000. + * Only relevant if keepAlive is set to true. + */ + keepAliveMsecs?: number; + /** + * Maximum number of sockets to allow per host. Default for Node 0.10 is 5, default for Node 0.12 is Infinity + */ + maxSockets?: number; + /** + * Maximum number of sockets to leave open in a free state. Only relevant if keepAlive is set to true. Default = 256. + */ + maxFreeSockets?: number; + } export class Agent { - maxSockets: number; - sockets: any; - requests: any; + maxSockets: number; + sockets: any; + requests: any; - constructor(opts?: AgentOptions); + constructor(opts?: AgentOptions); - /** - * Destroy any sockets that are currently in use by the agent. - * It is usually not necessary to do this. However, if you are using an agent with KeepAlive enabled, - * then it is best to explicitly shut down the agent when you know that it will no longer be used. Otherwise, - * sockets may hang open for quite a long time before the server terminates them. - */ - destroy(): void; - } + /** + * Destroy any sockets that are currently in use by the agent. + * It is usually not necessary to do this. However, if you are using an agent with KeepAlive enabled, + * then it is best to explicitly shut down the agent when you know that it will no longer be used. Otherwise, + * sockets may hang open for quite a long time before the server terminates them. + */ + destroy(): void; + } export var METHODS: string[]; @@ -560,9 +733,9 @@ declare module "http" { [errorCode: number]: string; [errorCode: string]: string; }; - export function createServer(requestListener?: (request: IncomingMessage, response: ServerResponse) =>void ): Server; + export function createServer(requestListener?: (request: IncomingMessage, response: ServerResponse) => void): Server; export function createClient(port?: number, host?: string): any; - export function request(options: any, callback?: (res: IncomingMessage) => void): ClientRequest; + export function request(options: RequestOptions, callback?: (res: IncomingMessage) => void): ClientRequest; export function get(options: any, callback?: (res: IncomingMessage) => void): ClientRequest; export var globalAgent: Agent; } @@ -570,41 +743,266 @@ declare module "http" { declare module "cluster" { import * as child from "child_process"; import * as events from "events"; + import * as net from "net"; + // interfaces export interface ClusterSettings { + execArgv?: string[]; // default: process.execArgv exec?: string; args?: string[]; silent?: boolean; + stdio?: any[]; + uid?: number; + gid?: number; + } + + export interface ClusterSetupMasterSettings { + exec?: string; // default: process.argv[1] + args?: string[]; // default: process.argv.slice(2) + silent?: boolean; // default: false + stdio?: any[]; + } + + export interface Address { + address: string; + port: number; + addressType: number | "udp4" | "udp6"; // 4, 6, -1, "udp4", "udp6" } export class Worker extends events.EventEmitter { id: string; process: child.ChildProcess; suicide: boolean; - send(message: any, sendHandle?: any): void; + send(message: any, sendHandle?: any): boolean; kill(signal?: string): void; destroy(signal?: string): void; disconnect(): void; + isConnected(): boolean; + isDead(): boolean; + exitedAfterDisconnect: boolean; + + /** + * events.EventEmitter + * 1. disconnect + * 2. error + * 3. exit + * 4. listening + * 5. message + * 6. online + */ + addListener(event: string, listener: Function): this; + addListener(event: "disconnect", listener: () => void): this; + addListener(event: "error", listener: (code: number, signal: string) => void): this; + addListener(event: "exit", listener: (code: number, signal: string) => void): this; + addListener(event: "listening", listener: (address: Address) => void): this; + addListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + addListener(event: "online", listener: () => void): this; + + emit(event: string, listener: Function): boolean + emit(event: "disconnect", listener: () => void): boolean + emit(event: "error", listener: (code: number, signal: string) => void): boolean + emit(event: "exit", listener: (code: number, signal: string) => void): boolean + emit(event: "listening", listener: (address: Address) => void): boolean + emit(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): boolean + emit(event: "online", listener: () => void): boolean + + on(event: string, listener: Function): this; + on(event: "disconnect", listener: () => void): this; + on(event: "error", listener: (code: number, signal: string) => void): this; + on(event: "exit", listener: (code: number, signal: string) => void): this; + on(event: "listening", listener: (address: Address) => void): this; + on(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + on(event: "online", listener: () => void): this; + + once(event: string, listener: Function): this; + once(event: "disconnect", listener: () => void): this; + once(event: "error", listener: (code: number, signal: string) => void): this; + once(event: "exit", listener: (code: number, signal: string) => void): this; + once(event: "listening", listener: (address: Address) => void): this; + once(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + once(event: "online", listener: () => void): this; + + prependListener(event: string, listener: Function): this; + prependListener(event: "disconnect", listener: () => void): this; + prependListener(event: "error", listener: (code: number, signal: string) => void): this; + prependListener(event: "exit", listener: (code: number, signal: string) => void): this; + prependListener(event: "listening", listener: (address: Address) => void): this; + prependListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + prependListener(event: "online", listener: () => void): this; + + prependOnceListener(event: string, listener: Function): this; + prependOnceListener(event: "disconnect", listener: () => void): this; + prependOnceListener(event: "error", listener: (code: number, signal: string) => void): this; + prependOnceListener(event: "exit", listener: (code: number, signal: string) => void): this; + prependOnceListener(event: "listening", listener: (address: Address) => void): this; + prependOnceListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + prependOnceListener(event: "online", listener: () => void): this; + } + + export interface Cluster extends events.EventEmitter { + Worker: Worker; + disconnect(callback?: Function): void; + fork(env?: any): Worker; + isMaster: boolean; + isWorker: boolean; + // TODO: cluster.schedulingPolicy + settings: ClusterSettings; + setupMaster(settings?: ClusterSetupMasterSettings): void; + worker: Worker; + workers: { + [index: string]: Worker + }; + + /** + * events.EventEmitter + * 1. disconnect + * 2. exit + * 3. fork + * 4. listening + * 5. message + * 6. online + * 7. setup + */ + addListener(event: string, listener: Function): this; + addListener(event: "disconnect", listener: (worker: Worker) => void): this; + addListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; + addListener(event: "fork", listener: (worker: Worker) => void): this; + addListener(event: "listening", listener: (worker: Worker, address: Address) => void): this; + addListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + addListener(event: "online", listener: (worker: Worker) => void): this; + addListener(event: "setup", listener: (settings: any) => void): this; + + emit(event: string, listener: Function): boolean; + emit(event: "disconnect", listener: (worker: Worker) => void): boolean; + emit(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): boolean; + emit(event: "fork", listener: (worker: Worker) => void): boolean; + emit(event: "listening", listener: (worker: Worker, address: Address) => void): boolean; + emit(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): boolean; + emit(event: "online", listener: (worker: Worker) => void): boolean; + emit(event: "setup", listener: (settings: any) => void): boolean; + + on(event: string, listener: Function): this; + on(event: "disconnect", listener: (worker: Worker) => void): this; + on(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; + on(event: "fork", listener: (worker: Worker) => void): this; + on(event: "listening", listener: (worker: Worker, address: Address) => void): this; + on(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + on(event: "online", listener: (worker: Worker) => void): this; + on(event: "setup", listener: (settings: any) => void): this; + + once(event: string, listener: Function): this; + once(event: "disconnect", listener: (worker: Worker) => void): this; + once(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; + once(event: "fork", listener: (worker: Worker) => void): this; + once(event: "listening", listener: (worker: Worker, address: Address) => void): this; + once(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + once(event: "online", listener: (worker: Worker) => void): this; + once(event: "setup", listener: (settings: any) => void): this; + + prependListener(event: string, listener: Function): this; + prependListener(event: "disconnect", listener: (worker: Worker) => void): this; + prependListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; + prependListener(event: "fork", listener: (worker: Worker) => void): this; + prependListener(event: "listening", listener: (worker: Worker, address: Address) => void): this; + prependListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + prependListener(event: "online", listener: (worker: Worker) => void): this; + prependListener(event: "setup", listener: (settings: any) => void): this; + + prependOnceListener(event: string, listener: Function): this; + prependOnceListener(event: "disconnect", listener: (worker: Worker) => void): this; + prependOnceListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; + prependOnceListener(event: "fork", listener: (worker: Worker) => void): this; + prependOnceListener(event: "listening", listener: (worker: Worker, address: Address) => void): this; + prependOnceListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. + prependOnceListener(event: "online", listener: (worker: Worker) => void): this; + prependOnceListener(event: "setup", listener: (settings: any) => void): this; + } - export var settings: ClusterSettings; + export function disconnect(callback?: Function): void; + export function fork(env?: any): Worker; export var isMaster: boolean; export var isWorker: boolean; - export function setupMaster(settings?: ClusterSettings): void; - export function fork(env?: any): Worker; - export function disconnect(callback?: Function): void; + // TODO: cluster.schedulingPolicy + export var settings: ClusterSettings; + export function setupMaster(settings?: ClusterSetupMasterSettings): void; export var worker: Worker; - export var workers: Worker[]; - - // Event emitter - export function addListener(event: string, listener: Function): void; - export function on(event: string, listener: Function): any; - export function once(event: string, listener: Function): void; - export function removeListener(event: string, listener: Function): void; - export function removeAllListeners(event?: string): void; - export function setMaxListeners(n: number): void; + export var workers: { + [index: string]: Worker + }; + + /** + * events.EventEmitter + * 1. disconnect + * 2. exit + * 3. fork + * 4. listening + * 5. message + * 6. online + * 7. setup + */ + export function addListener(event: string, listener: Function): Cluster; + export function addListener(event: "disconnect", listener: (worker: Worker) => void): Cluster; + export function addListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster; + export function addListener(event: "fork", listener: (worker: Worker) => void): Cluster; + export function addListener(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster; + export function addListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; // the handle is a net.Socket or net.Server object, or undefined. + export function addListener(event: "online", listener: (worker: Worker) => void): Cluster; + export function addListener(event: "setup", listener: (settings: any) => void): Cluster; + + export function emit(event: string, listener: Function): boolean; + export function emit(event: "disconnect", listener: (worker: Worker) => void): boolean; + export function emit(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): boolean; + export function emit(event: "fork", listener: (worker: Worker) => void): boolean; + export function emit(event: "listening", listener: (worker: Worker, address: Address) => void): boolean; + export function emit(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): boolean; + export function emit(event: "online", listener: (worker: Worker) => void): boolean; + export function emit(event: "setup", listener: (settings: any) => void): boolean; + + export function on(event: string, listener: Function): Cluster; + export function on(event: "disconnect", listener: (worker: Worker) => void): Cluster; + export function on(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster; + export function on(event: "fork", listener: (worker: Worker) => void): Cluster; + export function on(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster; + export function on(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; // the handle is a net.Socket or net.Server object, or undefined. + export function on(event: "online", listener: (worker: Worker) => void): Cluster; + export function on(event: "setup", listener: (settings: any) => void): Cluster; + + export function once(event: string, listener: Function): Cluster; + export function once(event: "disconnect", listener: (worker: Worker) => void): Cluster; + export function once(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster; + export function once(event: "fork", listener: (worker: Worker) => void): Cluster; + export function once(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster; + export function once(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; // the handle is a net.Socket or net.Server object, or undefined. + export function once(event: "online", listener: (worker: Worker) => void): Cluster; + export function once(event: "setup", listener: (settings: any) => void): Cluster; + + export function removeListener(event: string, listener: Function): Cluster; + export function removeAllListeners(event?: string): Cluster; + export function setMaxListeners(n: number): Cluster; + export function getMaxListeners(): number; export function listeners(event: string): Function[]; - export function emit(event: string, ...args: any[]): boolean; + export function listenerCount(type: string): number; + + export function prependListener(event: string, listener: Function): Cluster; + export function prependListener(event: "disconnect", listener: (worker: Worker) => void): Cluster; + export function prependListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster; + export function prependListener(event: "fork", listener: (worker: Worker) => void): Cluster; + export function prependListener(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster; + export function prependListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; // the handle is a net.Socket or net.Server object, or undefined. + export function prependListener(event: "online", listener: (worker: Worker) => void): Cluster; + export function prependListener(event: "setup", listener: (settings: any) => void): Cluster; + + export function prependOnceListener(event: string, listener: Function): Cluster; + export function prependOnceListener(event: "disconnect", listener: (worker: Worker) => void): Cluster; + export function prependOnceListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster; + export function prependOnceListener(event: "fork", listener: (worker: Worker) => void): Cluster; + export function prependOnceListener(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster; + export function prependOnceListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; // the handle is a net.Socket or net.Server object, or undefined. + export function prependOnceListener(event: "online", listener: (worker: Worker) => void): Cluster; + export function prependOnceListener(event: "setup", listener: (settings: any) => void): Cluster; + + export function eventNames(): string[]; } declare module "zlib" { @@ -627,19 +1025,19 @@ declare module "zlib" { export function createInflateRaw(options?: ZlibOptions): InflateRaw; export function createUnzip(options?: ZlibOptions): Unzip; - export function deflate(buf: Buffer, callback: (error: Error, result: any) =>void ): void; + export function deflate(buf: Buffer, callback: (error: Error, result: any) => void): void; export function deflateSync(buf: Buffer, options?: ZlibOptions): any; - export function deflateRaw(buf: Buffer, callback: (error: Error, result: any) =>void ): void; + export function deflateRaw(buf: Buffer, callback: (error: Error, result: any) => void): void; export function deflateRawSync(buf: Buffer, options?: ZlibOptions): any; - export function gzip(buf: Buffer, callback: (error: Error, result: any) =>void ): void; + export function gzip(buf: Buffer, callback: (error: Error, result: any) => void): void; export function gzipSync(buf: Buffer, options?: ZlibOptions): any; - export function gunzip(buf: Buffer, callback: (error: Error, result: any) =>void ): void; + export function gunzip(buf: Buffer, callback: (error: Error, result: any) => void): void; export function gunzipSync(buf: Buffer, options?: ZlibOptions): any; - export function inflate(buf: Buffer, callback: (error: Error, result: any) =>void ): void; + export function inflate(buf: Buffer, callback: (error: Error, result: any) => void): void; export function inflateSync(buf: Buffer, options?: ZlibOptions): any; - export function inflateRaw(buf: Buffer, callback: (error: Error, result: any) =>void ): void; + export function inflateRaw(buf: Buffer, callback: (error: Error, result: any) => void): void; export function inflateRawSync(buf: Buffer, options?: ZlibOptions): any; - export function unzip(buf: Buffer, callback: (error: Error, result: any) =>void ): void; + export function unzip(buf: Buffer, callback: (error: Error, result: any) => void): void; export function unzipSync(buf: Buffer, options?: ZlibOptions): any; // Constants @@ -677,19 +1075,162 @@ declare module "zlib" { } declare module "os" { - export function tmpdir(): string; + export interface CpuInfo { + model: string; + speed: number; + times: { + user: number; + nice: number; + sys: number; + idle: number; + irq: number; + }; + } + + export interface NetworkInterfaceInfo { + address: string; + netmask: string; + family: string; + mac: string; + internal: boolean; + } + export function hostname(): string; - export function type(): string; - export function platform(): string; - export function arch(): string; - export function release(): string; - export function uptime(): number; export function loadavg(): number[]; - export function totalmem(): number; + export function uptime(): number; export function freemem(): number; - export function cpus(): { model: string; speed: number; times: { user: number; nice: number; sys: number; idle: number; irq: number; }; }[]; - export function networkInterfaces(): any; + export function totalmem(): number; + export function cpus(): CpuInfo[]; + export function type(): string; + export function release(): string; + export function networkInterfaces(): { [index: string]: NetworkInterfaceInfo[] }; + export function homedir(): string; + export function userInfo(options?: { encoding: string }): { username: string, uid: number, gid: number, shell: any, homedir: string } + export var constants: { + UV_UDP_REUSEADDR: number, + errno: { + SIGHUP: number; + SIGINT: number; + SIGQUIT: number; + SIGILL: number; + SIGTRAP: number; + SIGABRT: number; + SIGIOT: number; + SIGBUS: number; + SIGFPE: number; + SIGKILL: number; + SIGUSR1: number; + SIGSEGV: number; + SIGUSR2: number; + SIGPIPE: number; + SIGALRM: number; + SIGTERM: number; + SIGCHLD: number; + SIGSTKFLT: number; + SIGCONT: number; + SIGSTOP: number; + SIGTSTP: number; + SIGTTIN: number; + SIGTTOU: number; + SIGURG: number; + SIGXCPU: number; + SIGXFSZ: number; + SIGVTALRM: number; + SIGPROF: number; + SIGWINCH: number; + SIGIO: number; + SIGPOLL: number; + SIGPWR: number; + SIGSYS: number; + SIGUNUSED: number; + }, + signals: { + E2BIG: number; + EACCES: number; + EADDRINUSE: number; + EADDRNOTAVAIL: number; + EAFNOSUPPORT: number; + EAGAIN: number; + EALREADY: number; + EBADF: number; + EBADMSG: number; + EBUSY: number; + ECANCELED: number; + ECHILD: number; + ECONNABORTED: number; + ECONNREFUSED: number; + ECONNRESET: number; + EDEADLK: number; + EDESTADDRREQ: number; + EDOM: number; + EDQUOT: number; + EEXIST: number; + EFAULT: number; + EFBIG: number; + EHOSTUNREACH: number; + EIDRM: number; + EILSEQ: number; + EINPROGRESS: number; + EINTR: number; + EINVAL: number; + EIO: number; + EISCONN: number; + EISDIR: number; + ELOOP: number; + EMFILE: number; + EMLINK: number; + EMSGSIZE: number; + EMULTIHOP: number; + ENAMETOOLONG: number; + ENETDOWN: number; + ENETRESET: number; + ENETUNREACH: number; + ENFILE: number; + ENOBUFS: number; + ENODATA: number; + ENODEV: number; + ENOENT: number; + ENOEXEC: number; + ENOLCK: number; + ENOLINK: number; + ENOMEM: number; + ENOMSG: number; + ENOPROTOOPT: number; + ENOSPC: number; + ENOSR: number; + ENOSTR: number; + ENOSYS: number; + ENOTCONN: number; + ENOTDIR: number; + ENOTEMPTY: number; + ENOTSOCK: number; + ENOTSUP: number; + ENOTTY: number; + ENXIO: number; + EOPNOTSUPP: number; + EOVERFLOW: number; + EPERM: number; + EPIPE: number; + EPROTO: number; + EPROTONOSUPPORT: number; + EPROTOTYPE: number; + ERANGE: number; + EROFS: number; + ESPIPE: number; + ESRCH: number; + ESTALE: number; + ETIME: number; + ETIMEDOUT: number; + ETXTBSY: number; + EWOULDBLOCK: number; + EXDEV: number; + }, + }; + export function arch(): string; + export function platform(): string; + export function tmpdir(): string; export var EOL: string; + export function endianness(): "BE" | "LE"; } declare module "https" { @@ -709,18 +1250,10 @@ declare module "https" { requestCert?: boolean; rejectUnauthorized?: boolean; NPNProtocols?: any; - SNICallback?: (servername: string) => any; + SNICallback?: (servername: string, cb: (err: Error, ctx: tls.SecureContext) => any) => any; } - export interface RequestOptions { - host?: string; - hostname?: string; - port?: number; - path?: string; - method?: string; - headers?: any; - auth?: string; - agent?: any; + export interface RequestOptions extends http.RequestOptions { pfx?: any; key?: any; passphrase?: string; @@ -728,20 +1261,30 @@ declare module "https" { ca?: any; ciphers?: string; rejectUnauthorized?: boolean; + secureProtocol?: string; } - export interface Agent { - maxSockets: number; - sockets: any; - requests: any; + export interface Agent extends http.Agent { } + + export interface AgentOptions extends http.AgentOptions { + pfx?: any; + key?: any; + passphrase?: string; + cert?: any; + ca?: any; + ciphers?: string; + rejectUnauthorized?: boolean; + secureProtocol?: string; + maxCachedSessions?: number; } + export var Agent: { - new (options?: RequestOptions): Agent; + new (options?: AgentOptions): Agent; }; export interface Server extends tls.Server { } export function createServer(options: ServerOptions, requestListener?: Function): Server; - export function request(options: RequestOptions, callback?: (res: http.IncomingMessage) =>void ): http.ClientRequest; - export function get(options: RequestOptions, callback?: (res: http.IncomingMessage) =>void ): http.ClientRequest; + export function request(options: RequestOptions, callback?: (res: http.IncomingMessage) => void): http.ClientRequest; + export function get(options: RequestOptions, callback?: (res: http.IncomingMessage) => void): http.ClientRequest; export var globalAgent: Agent; } @@ -752,7 +1295,7 @@ declare module "punycode" { export function toASCII(domain: string): string; export var ucs2: ucs2; interface ucs2 { - decode(string: string): string; + decode(string: string): number[]; encode(codePoints: number[]): string; } export var version: any; @@ -760,7 +1303,7 @@ declare module "punycode" { declare module "repl" { import * as stream from "stream"; - import * as events from "events"; + import * as readline from "readline"; export interface ReplOptions { prompt?: string; @@ -772,43 +1315,98 @@ declare module "repl" { useGlobal?: boolean; ignoreUndefined?: boolean; writer?: Function; + completer?: Function; + replMode?: any; + breakEvalOnSigint?: any; } - export function start(options: ReplOptions): events.EventEmitter; + + export interface REPLServer extends readline.ReadLine { + defineCommand(keyword: string, cmd: Function | { help: string, action: Function }): void; + displayPrompt(preserveCursor?: boolean): void + } + + export function start(options: ReplOptions): REPLServer; } declare module "readline" { import * as events from "events"; import * as stream from "stream"; + export interface Key { + sequence?: string; + name?: string; + ctrl?: boolean; + meta?: boolean; + shift?: boolean; + } + export interface ReadLine extends events.EventEmitter { - setPrompt(prompt: string, length: number): void; + setPrompt(prompt: string): void; prompt(preserveCursor?: boolean): void; - question(query: string, callback: Function): void; - pause(): void; - resume(): void; + question(query: string, callback: (answer: string) => void): void; + pause(): ReadLine; + resume(): ReadLine; close(): void; - write(data: any, key?: any): void; + write(data: string | Buffer, key?: Key): void; + } + + export interface Completer { + (line: string): CompleterResult; + (line: string, callback: (err: any, result: CompleterResult) => void): any; } + + export interface CompleterResult { + completions: string[]; + line: string; + } + export interface ReadLineOptions { input: NodeJS.ReadableStream; - output: NodeJS.WritableStream; - completer?: Function; + output?: NodeJS.WritableStream; + completer?: Completer; terminal?: boolean; + historySize?: number; } + + export function createInterface(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer, terminal?: boolean): ReadLine; export function createInterface(options: ReadLineOptions): ReadLine; + + export function cursorTo(stream: NodeJS.WritableStream, x: number, y: number): void; + export function moveCursor(stream: NodeJS.WritableStream, dx: number | string, dy: number | string): void; + export function clearLine(stream: NodeJS.WritableStream, dir: number): void; + export function clearScreenDown(stream: NodeJS.WritableStream): void; } declare module "vm" { export interface Context { } - export interface Script { - runInThisContext(): void; - runInNewContext(sandbox?: Context): void; - } - export function runInThisContext(code: string, filename?: string): void; - export function runInNewContext(code: string, sandbox?: Context, filename?: string): void; - export function runInContext(code: string, context: Context, filename?: string): void; - export function createContext(initSandbox?: Context): Context; - export function createScript(code: string, filename?: string): Script; + export interface ScriptOptions { + filename?: string; + lineOffset?: number; + columnOffset?: number; + displayErrors?: boolean; + timeout?: number; + cachedData?: Buffer; + produceCachedData?: boolean; + } + export interface RunningScriptOptions { + filename?: string; + lineOffset?: number; + columnOffset?: number; + displayErrors?: boolean; + timeout?: number; + } + export class Script { + constructor(code: string, options?: ScriptOptions); + runInContext(contextifiedSandbox: Context, options?: RunningScriptOptions): any; + runInNewContext(sandbox?: Context, options?: RunningScriptOptions): any; + runInThisContext(options?: RunningScriptOptions): any; + } + export function createContext(sandbox?: Context): Context; + export function isContext(sandbox: Context): boolean; + export function runInContext(code: string, contextifiedSandbox: Context, options?: RunningScriptOptions): any; + export function runInDebugContext(code: string): any; + export function runInNewContext(code: string, sandbox?: Context, options?: RunningScriptOptions): any; + export function runInThisContext(code: string, options?: RunningScriptOptions): any; } declare module "child_process" { @@ -816,96 +1414,179 @@ declare module "child_process" { import * as stream from "stream"; export interface ChildProcess extends events.EventEmitter { - stdin: stream.Writable; + stdin: stream.Writable; stdout: stream.Readable; stderr: stream.Readable; + stdio: [stream.Writable, stream.Readable, stream.Readable]; pid: number; kill(signal?: string): void; - send(message: any, sendHandle?: any): void; + send(message: any, sendHandle?: any): boolean; + connected: boolean; disconnect(): void; unref(): void; + ref(): void; } - export function spawn(command: string, args?: string[], options?: { + export interface SpawnOptions { cwd?: string; - stdio?: any; - custom?: any; env?: any; + stdio?: any; detached?: boolean; - }): ChildProcess; - export function exec(command: string, options: { + uid?: number; + gid?: number; + shell?: boolean | string; + } + export function spawn(command: string, args?: string[], options?: SpawnOptions): ChildProcess; + + export interface ExecOptions { cwd?: string; - stdio?: any; - customFds?: any; env?: any; - encoding?: string; + shell?: string; timeout?: number; maxBuffer?: number; killSignal?: string; - }, callback?: (error: Error, stdout: Buffer, stderr: Buffer) =>void ): ChildProcess; - export function exec(command: string, callback?: (error: Error, stdout: Buffer, stderr: Buffer) =>void ): ChildProcess; - export function execFile(file: string, - callback?: (error: Error, stdout: Buffer, stderr: Buffer) =>void ): ChildProcess; - export function execFile(file: string, args?: string[], - callback?: (error: Error, stdout: Buffer, stderr: Buffer) =>void ): ChildProcess; - export function execFile(file: string, args?: string[], options?: { + uid?: number; + gid?: number; + } + export interface ExecOptionsWithStringEncoding extends ExecOptions { + encoding: BufferEncoding; + } + export interface ExecOptionsWithBufferEncoding extends ExecOptions { + encoding: string; // specify `null`. + } + export function exec(command: string, callback?: (error: Error, stdout: string, stderr: string) => void): ChildProcess; + export function exec(command: string, options: ExecOptionsWithStringEncoding, callback?: (error: Error, stdout: string, stderr: string) => void): ChildProcess; + // usage. child_process.exec("tsc", {encoding: null as string}, (err, stdout, stderr) => {}); + export function exec(command: string, options: ExecOptionsWithBufferEncoding, callback?: (error: Error, stdout: Buffer, stderr: Buffer) => void): ChildProcess; + export function exec(command: string, options: ExecOptions, callback?: (error: Error, stdout: string, stderr: string) => void): ChildProcess; + + export interface ExecFileOptions { cwd?: string; - stdio?: any; - customFds?: any; env?: any; - encoding?: string; timeout?: number; - maxBuffer?: string; + maxBuffer?: number; killSignal?: string; - }, callback?: (error: Error, stdout: Buffer, stderr: Buffer) =>void ): ChildProcess; - export function fork(modulePath: string, args?: string[], options?: { + uid?: number; + gid?: number; + } + export interface ExecFileOptionsWithStringEncoding extends ExecFileOptions { + encoding: BufferEncoding; + } + export interface ExecFileOptionsWithBufferEncoding extends ExecFileOptions { + encoding: string; // specify `null`. + } + export function execFile(file: string, callback?: (error: Error, stdout: string, stderr: string) => void): ChildProcess; + export function execFile(file: string, options?: ExecFileOptionsWithStringEncoding, callback?: (error: Error, stdout: string, stderr: string) => void): ChildProcess; + // usage. child_process.execFile("file.sh", {encoding: null as string}, (err, stdout, stderr) => {}); + export function execFile(file: string, options?: ExecFileOptionsWithBufferEncoding, callback?: (error: Error, stdout: Buffer, stderr: Buffer) => void): ChildProcess; + export function execFile(file: string, options?: ExecFileOptions, callback?: (error: Error, stdout: string, stderr: string) => void): ChildProcess; + export function execFile(file: string, args?: string[], callback?: (error: Error, stdout: string, stderr: string) => void): ChildProcess; + export function execFile(file: string, args?: string[], options?: ExecFileOptionsWithStringEncoding, callback?: (error: Error, stdout: string, stderr: string) => void): ChildProcess; + // usage. child_process.execFile("file.sh", ["foo"], {encoding: null as string}, (err, stdout, stderr) => {}); + export function execFile(file: string, args?: string[], options?: ExecFileOptionsWithBufferEncoding, callback?: (error: Error, stdout: Buffer, stderr: Buffer) => void): ChildProcess; + export function execFile(file: string, args?: string[], options?: ExecFileOptions, callback?: (error: Error, stdout: string, stderr: string) => void): ChildProcess; + + export interface ForkOptions { cwd?: string; env?: any; - encoding?: string; - }): ChildProcess; - export function execSync(command: string, options?: { + execPath?: string; + execArgv?: string[]; + silent?: boolean; + uid?: number; + gid?: number; + } + export function fork(modulePath: string, args?: string[], options?: ForkOptions): ChildProcess; + + export interface SpawnSyncOptions { cwd?: string; - input?: string|Buffer; + input?: string | Buffer; stdio?: any; env?: any; uid?: number; gid?: number; timeout?: number; - maxBuffer?: number; killSignal?: string; + maxBuffer?: number; encoding?: string; - }): ChildProcess; - export function execFileSync(command: string, args?: string[], options?: { + shell?: boolean | string; + } + export interface SpawnSyncOptionsWithStringEncoding extends SpawnSyncOptions { + encoding: BufferEncoding; + } + export interface SpawnSyncOptionsWithBufferEncoding extends SpawnSyncOptions { + encoding: string; // specify `null`. + } + export interface SpawnSyncReturns { + pid: number; + output: string[]; + stdout: T; + stderr: T; + status: number; + signal: string; + error: Error; + } + export function spawnSync(command: string): SpawnSyncReturns; + export function spawnSync(command: string, options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns; + export function spawnSync(command: string, options?: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns; + export function spawnSync(command: string, options?: SpawnSyncOptions): SpawnSyncReturns; + export function spawnSync(command: string, args?: string[], options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns; + export function spawnSync(command: string, args?: string[], options?: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns; + export function spawnSync(command: string, args?: string[], options?: SpawnSyncOptions): SpawnSyncReturns; + + export interface ExecSyncOptions { cwd?: string; - input?: string|Buffer; + input?: string | Buffer; stdio?: any; env?: any; + shell?: string; uid?: number; gid?: number; timeout?: number; + killSignal?: string; maxBuffer?: number; + encoding?: string; + } + export interface ExecSyncOptionsWithStringEncoding extends ExecSyncOptions { + encoding: BufferEncoding; + } + export interface ExecSyncOptionsWithBufferEncoding extends ExecSyncOptions { + encoding: string; // specify `null`. + } + export function execSync(command: string): Buffer; + export function execSync(command: string, options?: ExecSyncOptionsWithStringEncoding): string; + export function execSync(command: string, options?: ExecSyncOptionsWithBufferEncoding): Buffer; + export function execSync(command: string, options?: ExecSyncOptions): Buffer; + + export interface ExecFileSyncOptions { + cwd?: string; + input?: string | Buffer; + stdio?: any; + env?: any; + uid?: number; + gid?: number; + timeout?: number; killSignal?: string; + maxBuffer?: number; encoding?: string; - }): ChildProcess; + } + export interface ExecFileSyncOptionsWithStringEncoding extends ExecFileSyncOptions { + encoding: BufferEncoding; + } + export interface ExecFileSyncOptionsWithBufferEncoding extends ExecFileSyncOptions { + encoding: string; // specify `null`. + } + export function execFileSync(command: string): Buffer; + export function execFileSync(command: string, options?: ExecFileSyncOptionsWithStringEncoding): string; + export function execFileSync(command: string, options?: ExecFileSyncOptionsWithBufferEncoding): Buffer; + export function execFileSync(command: string, options?: ExecFileSyncOptions): Buffer; + export function execFileSync(command: string, args?: string[], options?: ExecFileSyncOptionsWithStringEncoding): string; + export function execFileSync(command: string, args?: string[], options?: ExecFileSyncOptionsWithBufferEncoding): Buffer; + export function execFileSync(command: string, args?: string[], options?: ExecFileSyncOptions): Buffer; } declare module "url" { export interface Url { - href: string; - protocol: string; - auth: string; - hostname: string; - port: string; - host: string; - pathname: string; - search: string; - query: any; // string | Object - slashes: boolean; - hash?: string; - path?: string; - } - - export interface UrlOptions { + href?: string; protocol?: string; auth?: string; hostname?: string; @@ -913,29 +1594,62 @@ declare module "url" { host?: string; pathname?: string; search?: string; - query?: any; + query?: string | any; + slashes?: boolean; hash?: string; path?: string; } - export function parse(urlStr: string, parseQueryString?: boolean , slashesDenoteHost?: boolean ): Url; - export function format(url: UrlOptions): string; + export function parse(urlStr: string, parseQueryString?: boolean, slashesDenoteHost?: boolean): Url; + export function format(url: Url): string; export function resolve(from: string, to: string): string; } declare module "dns" { - export function lookup(domain: string, family: number, callback: (err: Error, address: string, family: number) =>void ): string; - export function lookup(domain: string, callback: (err: Error, address: string, family: number) =>void ): string; - export function resolve(domain: string, rrtype: string, callback: (err: Error, addresses: string[]) =>void ): string[]; - export function resolve(domain: string, callback: (err: Error, addresses: string[]) =>void ): string[]; - export function resolve4(domain: string, callback: (err: Error, addresses: string[]) =>void ): string[]; - export function resolve6(domain: string, callback: (err: Error, addresses: string[]) =>void ): string[]; - export function resolveMx(domain: string, callback: (err: Error, addresses: string[]) =>void ): string[]; - export function resolveTxt(domain: string, callback: (err: Error, addresses: string[]) =>void ): string[]; - export function resolveSrv(domain: string, callback: (err: Error, addresses: string[]) =>void ): string[]; - export function resolveNs(domain: string, callback: (err: Error, addresses: string[]) =>void ): string[]; - export function resolveCname(domain: string, callback: (err: Error, addresses: string[]) =>void ): string[]; - export function reverse(ip: string, callback: (err: Error, domains: string[]) =>void ): string[]; + export interface MxRecord { + exchange: string, + priority: number + } + + export function lookup(domain: string, family: number, callback: (err: Error, address: string, family: number) => void): string; + export function lookup(domain: string, callback: (err: Error, address: string, family: number) => void): string; + export function resolve(domain: string, rrtype: string, callback: (err: Error, addresses: string[]) => void): string[]; + export function resolve(domain: string, callback: (err: Error, addresses: string[]) => void): string[]; + export function resolve4(domain: string, callback: (err: Error, addresses: string[]) => void): string[]; + export function resolve6(domain: string, callback: (err: Error, addresses: string[]) => void): string[]; + export function resolveMx(domain: string, callback: (err: Error, addresses: MxRecord[]) => void): string[]; + export function resolveTxt(domain: string, callback: (err: Error, addresses: string[]) => void): string[]; + export function resolveSrv(domain: string, callback: (err: Error, addresses: string[]) => void): string[]; + export function resolveNs(domain: string, callback: (err: Error, addresses: string[]) => void): string[]; + export function resolveCname(domain: string, callback: (err: Error, addresses: string[]) => void): string[]; + export function reverse(ip: string, callback: (err: Error, domains: string[]) => void): string[]; + export function setServers(servers: string[]): void; + + //Error codes + export var NODATA: string; + export var FORMERR: string; + export var SERVFAIL: string; + export var NOTFOUND: string; + export var NOTIMP: string; + export var REFUSED: string; + export var BADQUERY: string; + export var BADNAME: string; + export var BADFAMILY: string; + export var BADRESP: string; + export var CONNREFUSED: string; + export var TIMEOUT: string; + export var EOF: string; + export var FILE: string; + export var NOMEM: string; + export var DESTRUCTION: string; + export var BADSTR: string; + export var BADFLAGS: string; + export var NONAME: string; + export var BADHINTS: string; + export var NOTINITIALIZED: string; + export var LOADIPHLPAPI: string; + export var ADDRGETNETWORKPARAMS: string; + export var CANCELLED: string; } declare module "net" { @@ -955,8 +1669,8 @@ declare module "net" { setEncoding(encoding?: string): void; write(data: any, encoding?: string, callback?: Function): void; destroy(): void; - pause(): void; - resume(): void; + pause(): Socket; + resume(): Socket; setTimeout(timeout: number, callback?: Function): void; setNoDelay(noDelay?: boolean): void; setKeepAlive(enable?: boolean, initialDelay?: number): void; @@ -978,27 +1692,158 @@ declare module "net" { end(str: string, cb?: Function): void; end(str: string, encoding?: string, cb?: Function): void; end(data?: any, encoding?: string): void; + + /** + * events.EventEmitter + * 1. close + * 2. connect + * 3. data + * 4. drain + * 5. end + * 6. error + * 7. lookup + * 8. timeout + */ + addListener(event: string, listener: Function): this; + addListener(event: "close", listener: (had_error: boolean) => void): this; + addListener(event: "connect", listener: () => void): this; + addListener(event: "data", listener: (data: Buffer) => void): this; + addListener(event: "drain", listener: () => void): this; + addListener(event: "end", listener: () => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this; + addListener(event: "timeout", listener: () => void): this; + + emit(event: string, ...args: any[]): boolean; + emit(event: "close", had_error: boolean): boolean; + emit(event: "connect"): boolean; + emit(event: "data", data: Buffer): boolean; + emit(event: "drain"): boolean; + emit(event: "end"): boolean; + emit(event: "error", err: Error): boolean; + emit(event: "lookup", err: Error, address: string, family: string | number, host: string): boolean; + emit(event: "timeout"): boolean; + + on(event: string, listener: Function): this; + on(event: "close", listener: (had_error: boolean) => void): this; + on(event: "connect", listener: () => void): this; + on(event: "data", listener: (data: Buffer) => void): this; + on(event: "drain", listener: () => void): this; + on(event: "end", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this; + on(event: "timeout", listener: () => void): this; + + once(event: string, listener: Function): this; + once(event: "close", listener: (had_error: boolean) => void): this; + once(event: "connect", listener: () => void): this; + once(event: "data", listener: (data: Buffer) => void): this; + once(event: "drain", listener: () => void): this; + once(event: "end", listener: () => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this; + once(event: "timeout", listener: () => void): this; + + prependListener(event: string, listener: Function): this; + prependListener(event: "close", listener: (had_error: boolean) => void): this; + prependListener(event: "connect", listener: () => void): this; + prependListener(event: "data", listener: (data: Buffer) => void): this; + prependListener(event: "drain", listener: () => void): this; + prependListener(event: "end", listener: () => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this; + prependListener(event: "timeout", listener: () => void): this; + + prependOnceListener(event: string, listener: Function): this; + prependOnceListener(event: "close", listener: (had_error: boolean) => void): this; + prependOnceListener(event: "connect", listener: () => void): this; + prependOnceListener(event: "data", listener: (data: Buffer) => void): this; + prependOnceListener(event: "drain", listener: () => void): this; + prependOnceListener(event: "end", listener: () => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this; + prependOnceListener(event: "timeout", listener: () => void): this; } export var Socket: { new (options?: { fd?: string; type?: string; allowHalfOpen?: boolean; }): Socket; }; + export interface ListenOptions { + port?: number; + host?: string; + backlog?: number; + path?: string; + exclusive?: boolean; + } + export interface Server extends Socket { - listen(port: number, host?: string, backlog?: number, listeningListener?: Function): Server; + listen(port: number, hostname?: string, backlog?: number, listeningListener?: Function): Server; + listen(port: number, hostname?: string, listeningListener?: Function): Server; + listen(port: number, backlog?: number, listeningListener?: Function): Server; + listen(port: number, listeningListener?: Function): Server; + listen(path: string, backlog?: number, listeningListener?: Function): Server; listen(path: string, listeningListener?: Function): Server; + listen(handle: any, backlog?: number, listeningListener?: Function): Server; listen(handle: any, listeningListener?: Function): Server; + listen(options: ListenOptions, listeningListener?: Function): Server; close(callback?: Function): Server; address(): { port: number; family: string; address: string; }; + getConnections(cb: (error: Error, count: number) => void): void; + ref(): Server; + unref(): Server; maxConnections: number; connections: number; - } - export function createServer(connectionListener?: (socket: Socket) =>void ): Server; - export function createServer(options?: { allowHalfOpen?: boolean; }, connectionListener?: (socket: Socket) =>void ): Server; - export function connect(options: { allowHalfOpen?: boolean; }, connectionListener?: Function): Socket; + + /** + * events.EventEmitter + * 1. close + * 2. connection + * 3. error + * 4. listening + */ + addListener(event: string, listener: Function): this; + addListener(event: "close", listener: () => void): this; + addListener(event: "connection", listener: (socket: Socket) => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: "listening", listener: () => void): this; + + emit(event: string, ...args: any[]): boolean; + emit(event: "close"): boolean; + emit(event: "connection", socket: Socket): boolean; + emit(event: "error", err: Error): boolean; + emit(event: "listening"): boolean; + + on(event: string, listener: Function): this; + on(event: "close", listener: () => void): this; + on(event: "connection", listener: (socket: Socket) => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: "listening", listener: () => void): this; + + once(event: string, listener: Function): this; + once(event: "close", listener: () => void): this; + once(event: "connection", listener: (socket: Socket) => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: "listening", listener: () => void): this; + + prependListener(event: string, listener: Function): this; + prependListener(event: "close", listener: () => void): this; + prependListener(event: "connection", listener: (socket: Socket) => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: "listening", listener: () => void): this; + + prependOnceListener(event: string, listener: Function): this; + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "connection", listener: (socket: Socket) => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: "listening", listener: () => void): this; + } + export function createServer(connectionListener?: (socket: Socket) => void): Server; + export function createServer(options?: { allowHalfOpen?: boolean; }, connectionListener?: (socket: Socket) => void): Server; + export function connect(options: { port: number, host?: string, localAddress?: string, localPort?: string, family?: number, allowHalfOpen?: boolean; }, connectionListener?: Function): Socket; export function connect(port: number, host?: string, connectionListener?: Function): Socket; export function connect(path: string, connectionListener?: Function): Socket; - export function createConnection(options: { allowHalfOpen?: boolean; }, connectionListener?: Function): Socket; + export function createConnection(options: { port: number, host?: string, localAddress?: string, localPort?: string, family?: number, allowHalfOpen?: boolean; }, connectionListener?: Function): Socket; export function createConnection(port: number, host?: string, connectionListener?: Function): Socket; export function createConnection(path: string, connectionListener?: Function): Socket; export function isIP(input: string): number; @@ -1011,8 +1856,8 @@ declare module "dgram" { interface RemoteInfo { address: string; + family: string; port: number; - size: number; } interface AddressInfo { @@ -1021,18 +1866,78 @@ declare module "dgram" { port: number; } - export function createSocket(type: string, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket; + interface BindOptions { + port: number; + address?: string; + exclusive?: boolean; + } - interface Socket extends events.EventEmitter { - send(buf: Buffer, offset: number, length: number, port: number, address: string, callback?: (error: Error, bytes: number) => void): void; - bind(port: number, address?: string, callback?: () => void): void; - close(): void; + interface SocketOptions { + type: "udp4" | "udp6"; + reuseAddr?: boolean; + } + + export function createSocket(type: string, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket; + export function createSocket(options: SocketOptions, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket; + + export interface Socket extends events.EventEmitter { + send(msg: Buffer | String | any[], port: number, address: string, callback?: (error: Error, bytes: number) => void): void; + send(msg: Buffer | String | any[], offset: number, length: number, port: number, address: string, callback?: (error: Error, bytes: number) => void): void; + bind(port?: number, address?: string, callback?: () => void): void; + bind(options: BindOptions, callback?: Function): void; + close(callback?: any): void; address(): AddressInfo; setBroadcast(flag: boolean): void; + setTTL(ttl: number): void; setMulticastTTL(ttl: number): void; setMulticastLoopback(flag: boolean): void; addMembership(multicastAddress: string, multicastInterface?: string): void; dropMembership(multicastAddress: string, multicastInterface?: string): void; + ref(): void; + unref(): void; + + /** + * events.EventEmitter + * 1. close + * 2. error + * 3. listening + * 4. message + **/ + addListener(event: string, listener: Function): this; + addListener(event: "close", listener: () => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: "listening", listener: () => void): this; + addListener(event: "message", listener: (msg: string, rinfo: AddressInfo) => void): this; + + emit(event: string, ...args: any[]): boolean; + emit(event: "close"): boolean; + emit(event: "error", err: Error): boolean; + emit(event: "listening"): boolean; + emit(event: "message", msg: string, rinfo: AddressInfo): boolean; + + on(event: string, listener: Function): this; + on(event: "close", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: "listening", listener: () => void): this; + on(event: "message", listener: (msg: string, rinfo: AddressInfo) => void): this; + + once(event: string, listener: Function): this; + once(event: "close", listener: () => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: "listening", listener: () => void): this; + once(event: "message", listener: (msg: string, rinfo: AddressInfo) => void): this; + + prependListener(event: string, listener: Function): this; + prependListener(event: "close", listener: () => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: "listening", listener: () => void): this; + prependListener(event: "message", listener: (msg: string, rinfo: AddressInfo) => void): this; + + prependOnceListener(event: string, listener: Function): this; + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: "listening", listener: () => void): this; + prependOnceListener(event: "message", listener: (msg: string, rinfo: AddressInfo) => void): this; } } @@ -1061,18 +1966,97 @@ declare module "fs" { atime: Date; mtime: Date; ctime: Date; + birthtime: Date; } interface FSWatcher extends events.EventEmitter { close(): void; + + /** + * events.EventEmitter + * 1. change + * 2. error + */ + addListener(event: string, listener: Function): this; + addListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; + addListener(event: "error", listener: (code: number, signal: string) => void): this; + + on(event: string, listener: Function): this; + on(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; + on(event: "error", listener: (code: number, signal: string) => void): this; + + once(event: string, listener: Function): this; + once(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; + once(event: "error", listener: (code: number, signal: string) => void): this; + + prependListener(event: string, listener: Function): this; + prependListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; + prependListener(event: "error", listener: (code: number, signal: string) => void): this; + + prependOnceListener(event: string, listener: Function): this; + prependOnceListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; + prependOnceListener(event: "error", listener: (code: number, signal: string) => void): this; } export interface ReadStream extends stream.Readable { close(): void; + destroy(): void; + + /** + * events.EventEmitter + * 1. open + * 2. close + */ + addListener(event: string, listener: Function): this; + addListener(event: "open", listener: (fd: number) => void): this; + addListener(event: "close", listener: () => void): this; + + on(event: string, listener: Function): this; + on(event: "open", listener: (fd: number) => void): this; + on(event: "close", listener: () => void): this; + + once(event: string, listener: Function): this; + once(event: "open", listener: (fd: number) => void): this; + once(event: "close", listener: () => void): this; + + prependListener(event: string, listener: Function): this; + prependListener(event: "open", listener: (fd: number) => void): this; + prependListener(event: "close", listener: () => void): this; + + prependOnceListener(event: string, listener: Function): this; + prependOnceListener(event: "open", listener: (fd: number) => void): this; + prependOnceListener(event: "close", listener: () => void): this; } + export interface WriteStream extends stream.Writable { close(): void; bytesWritten: number; + path: string | Buffer; + + /** + * events.EventEmitter + * 1. open + * 2. close + */ + addListener(event: string, listener: Function): this; + addListener(event: "open", listener: (fd: number) => void): this; + addListener(event: "close", listener: () => void): this; + + on(event: string, listener: Function): this; + on(event: "open", listener: (fd: number) => void): this; + on(event: "close", listener: () => void): this; + + once(event: string, listener: Function): this; + once(event: "open", listener: (fd: number) => void): this; + once(event: "close", listener: () => void): this; + + prependListener(event: string, listener: Function): this; + prependListener(event: "open", listener: (fd: number) => void): this; + prependListener(event: "close", listener: () => void): this; + + prependOnceListener(event: string, listener: Function): this; + prependOnceListener(event: "open", listener: (fd: number) => void): this; + prependOnceListener(event: "close", listener: () => void): this; } /** @@ -1088,78 +2072,78 @@ declare module "fs" { * @param newPath */ export function renameSync(oldPath: string, newPath: string): void; - export function truncate(path: string, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function truncate(path: string, len: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function truncateSync(path: string, len?: number): void; + export function truncate(path: string | Buffer, callback?: (err?: NodeJS.ErrnoException) => void): void; + export function truncate(path: string | Buffer, len: number, callback?: (err?: NodeJS.ErrnoException) => void): void; + export function truncateSync(path: string | Buffer, len?: number): void; export function ftruncate(fd: number, callback?: (err?: NodeJS.ErrnoException) => void): void; export function ftruncate(fd: number, len: number, callback?: (err?: NodeJS.ErrnoException) => void): void; export function ftruncateSync(fd: number, len?: number): void; - export function chown(path: string, uid: number, gid: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function chownSync(path: string, uid: number, gid: number): void; + export function chown(path: string | Buffer, uid: number, gid: number, callback?: (err?: NodeJS.ErrnoException) => void): void; + export function chownSync(path: string | Buffer, uid: number, gid: number): void; export function fchown(fd: number, uid: number, gid: number, callback?: (err?: NodeJS.ErrnoException) => void): void; export function fchownSync(fd: number, uid: number, gid: number): void; - export function lchown(path: string, uid: number, gid: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function lchownSync(path: string, uid: number, gid: number): void; - export function chmod(path: string, mode: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function chmod(path: string, mode: string, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function chmodSync(path: string, mode: number): void; - export function chmodSync(path: string, mode: string): void; + export function lchown(path: string | Buffer, uid: number, gid: number, callback?: (err?: NodeJS.ErrnoException) => void): void; + export function lchownSync(path: string | Buffer, uid: number, gid: number): void; + export function chmod(path: string | Buffer, mode: number, callback?: (err?: NodeJS.ErrnoException) => void): void; + export function chmod(path: string | Buffer, mode: string, callback?: (err?: NodeJS.ErrnoException) => void): void; + export function chmodSync(path: string | Buffer, mode: number): void; + export function chmodSync(path: string | Buffer, mode: string): void; export function fchmod(fd: number, mode: number, callback?: (err?: NodeJS.ErrnoException) => void): void; export function fchmod(fd: number, mode: string, callback?: (err?: NodeJS.ErrnoException) => void): void; export function fchmodSync(fd: number, mode: number): void; export function fchmodSync(fd: number, mode: string): void; - export function lchmod(path: string, mode: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function lchmod(path: string, mode: string, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function lchmodSync(path: string, mode: number): void; - export function lchmodSync(path: string, mode: string): void; - export function stat(path: string, callback?: (err: NodeJS.ErrnoException, stats: Stats) => any): void; - export function lstat(path: string, callback?: (err: NodeJS.ErrnoException, stats: Stats) => any): void; + export function lchmod(path: string | Buffer, mode: number, callback?: (err?: NodeJS.ErrnoException) => void): void; + export function lchmod(path: string | Buffer, mode: string, callback?: (err?: NodeJS.ErrnoException) => void): void; + export function lchmodSync(path: string | Buffer, mode: number): void; + export function lchmodSync(path: string | Buffer, mode: string): void; + export function stat(path: string | Buffer, callback?: (err: NodeJS.ErrnoException, stats: Stats) => any): void; + export function lstat(path: string | Buffer, callback?: (err: NodeJS.ErrnoException, stats: Stats) => any): void; export function fstat(fd: number, callback?: (err: NodeJS.ErrnoException, stats: Stats) => any): void; - export function statSync(path: string): Stats; - export function lstatSync(path: string): Stats; + export function statSync(path: string | Buffer): Stats; + export function lstatSync(path: string | Buffer): Stats; export function fstatSync(fd: number): Stats; - export function link(srcpath: string, dstpath: string, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function linkSync(srcpath: string, dstpath: string): void; - export function symlink(srcpath: string, dstpath: string, type?: string, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function symlinkSync(srcpath: string, dstpath: string, type?: string): void; - export function readlink(path: string, callback?: (err: NodeJS.ErrnoException, linkString: string) => any): void; - export function readlinkSync(path: string): string; - export function realpath(path: string, callback?: (err: NodeJS.ErrnoException, resolvedPath: string) => any): void; - export function realpath(path: string, cache: {[path: string]: string}, callback: (err: NodeJS.ErrnoException, resolvedPath: string) =>any): void; - export function realpathSync(path: string, cache?: { [path: string]: string }): string; + export function link(srcpath: string | Buffer, dstpath: string | Buffer, callback?: (err?: NodeJS.ErrnoException) => void): void; + export function linkSync(srcpath: string | Buffer, dstpath: string | Buffer): void; + export function symlink(srcpath: string | Buffer, dstpath: string | Buffer, type?: string, callback?: (err?: NodeJS.ErrnoException) => void): void; + export function symlinkSync(srcpath: string | Buffer, dstpath: string | Buffer, type?: string): void; + export function readlink(path: string | Buffer, callback?: (err: NodeJS.ErrnoException, linkString: string) => any): void; + export function readlinkSync(path: string | Buffer): string; + export function realpath(path: string | Buffer, callback?: (err: NodeJS.ErrnoException, resolvedPath: string) => any): void; + export function realpath(path: string | Buffer, cache: { [path: string]: string }, callback: (err: NodeJS.ErrnoException, resolvedPath: string) => any): void; + export function realpathSync(path: string | Buffer, cache?: { [path: string]: string }): string; /* * Asynchronous unlink - deletes the file specified in {path} * * @param path * @param callback No arguments other than a possible exception are given to the completion callback. */ - export function unlink(path: string, callback?: (err?: NodeJS.ErrnoException) => void): void; + export function unlink(path: string | Buffer, callback?: (err?: NodeJS.ErrnoException) => void): void; /* * Synchronous unlink - deletes the file specified in {path} * * @param path */ - export function unlinkSync(path: string): void; + export function unlinkSync(path: string | Buffer): void; /* * Asynchronous rmdir - removes the directory specified in {path} * * @param path * @param callback No arguments other than a possible exception are given to the completion callback. */ - export function rmdir(path: string, callback?: (err?: NodeJS.ErrnoException) => void): void; + export function rmdir(path: string | Buffer, callback?: (err?: NodeJS.ErrnoException) => void): void; /* * Synchronous rmdir - removes the directory specified in {path} * * @param path */ - export function rmdirSync(path: string): void; + export function rmdirSync(path: string | Buffer): void; /* * Asynchronous mkdir - creates the directory specified in {path}. Parameter {mode} defaults to 0777. * * @param path * @param callback No arguments other than a possible exception are given to the completion callback. */ - export function mkdir(path: string, callback?: (err?: NodeJS.ErrnoException) => void): void; + export function mkdir(path: string | Buffer, callback?: (err?: NodeJS.ErrnoException) => void): void; /* * Asynchronous mkdir - creates the directory specified in {path}. Parameter {mode} defaults to 0777. * @@ -1167,7 +2151,7 @@ declare module "fs" { * @param mode * @param callback No arguments other than a possible exception are given to the completion callback. */ - export function mkdir(path: string, mode: number, callback?: (err?: NodeJS.ErrnoException) => void): void; + export function mkdir(path: string | Buffer, mode: number, callback?: (err?: NodeJS.ErrnoException) => void): void; /* * Asynchronous mkdir - creates the directory specified in {path}. Parameter {mode} defaults to 0777. * @@ -1175,7 +2159,7 @@ declare module "fs" { * @param mode * @param callback No arguments other than a possible exception are given to the completion callback. */ - export function mkdir(path: string, mode: string, callback?: (err?: NodeJS.ErrnoException) => void): void; + export function mkdir(path: string | Buffer, mode: string, callback?: (err?: NodeJS.ErrnoException) => void): void; /* * Synchronous mkdir - creates the directory specified in {path}. Parameter {mode} defaults to 0777. * @@ -1183,7 +2167,7 @@ declare module "fs" { * @param mode * @param callback No arguments other than a possible exception are given to the completion callback. */ - export function mkdirSync(path: string, mode?: number): void; + export function mkdirSync(path: string | Buffer, mode?: number): void; /* * Synchronous mkdir - creates the directory specified in {path}. Parameter {mode} defaults to 0777. * @@ -1191,20 +2175,32 @@ declare module "fs" { * @param mode * @param callback No arguments other than a possible exception are given to the completion callback. */ - export function mkdirSync(path: string, mode?: string): void; - export function readdir(path: string, callback?: (err: NodeJS.ErrnoException, files: string[]) => void): void; - export function readdirSync(path: string): string[]; + export function mkdirSync(path: string | Buffer, mode?: string): void; + /* + * Asynchronous mkdtemp - Creates a unique temporary directory. Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * + * @param prefix + * @param callback The created folder path is passed as a string to the callback's second parameter. + */ + export function mkdtemp(prefix: string, callback?: (err: NodeJS.ErrnoException, folder: string) => void): void; + /* + * Synchronous mkdtemp - Creates a unique temporary directory. Generates six random characters to be appended behind a required prefix to create a unique temporary directory. + * + * @param prefix + * @returns Returns the created folder path. + */ + export function mkdtempSync(prefix: string): string; + export function readdir(path: string | Buffer, callback?: (err: NodeJS.ErrnoException, files: string[]) => void): void; + export function readdirSync(path: string | Buffer): string[]; export function close(fd: number, callback?: (err?: NodeJS.ErrnoException) => void): void; export function closeSync(fd: number): void; - export function open(path: string, flags: string, callback?: (err: NodeJS.ErrnoException, fd: number) => any): void; - export function open(path: string, flags: string, mode: number, callback?: (err: NodeJS.ErrnoException, fd: number) => any): void; - export function open(path: string, flags: string, mode: string, callback?: (err: NodeJS.ErrnoException, fd: number) => any): void; - export function openSync(path: string, flags: string, mode?: number): number; - export function openSync(path: string, flags: string, mode?: string): number; - export function utimes(path: string, atime: number, mtime: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function utimes(path: string, atime: Date, mtime: Date, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function utimesSync(path: string, atime: number, mtime: number): void; - export function utimesSync(path: string, atime: Date, mtime: Date): void; + export function open(path: string | Buffer, flags: string | number, callback: (err: NodeJS.ErrnoException, fd: number) => void): void; + export function open(path: string | Buffer, flags: string | number, mode: number, callback: (err: NodeJS.ErrnoException, fd: number) => void): void; + export function openSync(path: string | Buffer, flags: string | number, mode?: number): number; + export function utimes(path: string | Buffer, atime: number, mtime: number, callback?: (err?: NodeJS.ErrnoException) => void): void; + export function utimes(path: string | Buffer, atime: Date, mtime: Date, callback?: (err?: NodeJS.ErrnoException) => void): void; + export function utimesSync(path: string | Buffer, atime: number, mtime: number): void; + export function utimesSync(path: string | Buffer, atime: Date, mtime: Date): void; export function futimes(fd: number, atime: number, mtime: number, callback?: (err?: NodeJS.ErrnoException) => void): void; export function futimes(fd: number, atime: Date, mtime: Date, callback?: (err?: NodeJS.ErrnoException) => void): void; export function futimesSync(fd: number, atime: number, mtime: number): void; @@ -1213,7 +2209,11 @@ declare module "fs" { export function fsyncSync(fd: number): void; export function write(fd: number, buffer: Buffer, offset: number, length: number, position: number, callback?: (err: NodeJS.ErrnoException, written: number, buffer: Buffer) => void): void; export function write(fd: number, buffer: Buffer, offset: number, length: number, callback?: (err: NodeJS.ErrnoException, written: number, buffer: Buffer) => void): void; - export function writeSync(fd: number, buffer: Buffer, offset: number, length: number, position: number): number; + export function write(fd: number, data: any, callback?: (err: NodeJS.ErrnoException, written: number, str: string) => void): void; + export function write(fd: number, data: any, offset: number, callback?: (err: NodeJS.ErrnoException, written: number, str: string) => void): void; + export function write(fd: number, data: any, offset: number, encoding: string, callback?: (err: NodeJS.ErrnoException, written: number, str: string) => void): void; + export function writeSync(fd: number, buffer: Buffer, offset: number, length: number, position?: number): number; + export function writeSync(fd: number, data: any, position?: number, enconding?: string): number; export function read(fd: number, buffer: Buffer, offset: number, length: number, position: number, callback?: (err: NodeJS.ErrnoException, bytesRead: number, buffer: Buffer) => void): void; export function readSync(fd: number, buffer: Buffer, offset: number, length: number, position: number): number; /* @@ -1282,41 +2282,162 @@ declare module "fs" { export function watchFile(filename: string, options: { persistent?: boolean; interval?: number; }, listener: (curr: Stats, prev: Stats) => void): void; export function unwatchFile(filename: string, listener?: (curr: Stats, prev: Stats) => void): void; export function watch(filename: string, listener?: (event: string, filename: string) => any): FSWatcher; - export function watch(filename: string, options: { persistent?: boolean; }, listener?: (event: string, filename: string) => any): FSWatcher; - export function exists(path: string, callback?: (exists: boolean) => void): void; - export function existsSync(path: string): boolean; - /** Constant for fs.access(). File is visible to the calling process. */ - export var F_OK: number; - /** Constant for fs.access(). File can be read by the calling process. */ - export var R_OK: number; - /** Constant for fs.access(). File can be written by the calling process. */ - export var W_OK: number; - /** Constant for fs.access(). File can be executed by the calling process. */ - export var X_OK: number; + export function watch(filename: string, encoding: string, listener?: (event: string, filename: string | Buffer) => any): FSWatcher; + export function watch(filename: string, options: { persistent?: boolean; recursive?: boolean; encoding?: string }, listener?: (event: string, filename: string | Buffer) => any): FSWatcher; + export function exists(path: string | Buffer, callback?: (exists: boolean) => void): void; + export function existsSync(path: string | Buffer): boolean; + + export namespace constants { + // File Access Constants + + /** Constant for fs.access(). File is visible to the calling process. */ + export const F_OK: number; + + /** Constant for fs.access(). File can be read by the calling process. */ + export const R_OK: number; + + /** Constant for fs.access(). File can be written by the calling process. */ + export const W_OK: number; + + /** Constant for fs.access(). File can be executed by the calling process. */ + export const X_OK: number; + + // File Open Constants + + /** Constant for fs.open(). Flag indicating to open a file for read-only access. */ + export const O_RDONLY: number; + + /** Constant for fs.open(). Flag indicating to open a file for write-only access. */ + export const O_WRONLY: number; + + /** Constant for fs.open(). Flag indicating to open a file for read-write access. */ + export const O_RDWR: number; + + /** Constant for fs.open(). Flag indicating to create the file if it does not already exist. */ + export const O_CREAT: number; + + /** Constant for fs.open(). Flag indicating that opening a file should fail if the O_CREAT flag is set and the file already exists. */ + export const O_EXCL: number; + + /** Constant for fs.open(). Flag indicating that if path identifies a terminal device, opening the path shall not cause that terminal to become the controlling terminal for the process (if the process does not already have one). */ + export const O_NOCTTY: number; + + /** Constant for fs.open(). Flag indicating that if the file exists and is a regular file, and the file is opened successfully for write access, its length shall be truncated to zero. */ + export const O_TRUNC: number; + + /** Constant for fs.open(). Flag indicating that data will be appended to the end of the file. */ + export const O_APPEND: number; + + /** Constant for fs.open(). Flag indicating that the open should fail if the path is not a directory. */ + export const O_DIRECTORY: number; + + /** Constant for fs.open(). Flag indicating reading accesses to the file system will no longer result in an update to the atime information associated with the file. This flag is available on Linux operating systems only. */ + export const O_NOATIME: number; + + /** Constant for fs.open(). Flag indicating that the open should fail if the path is a symbolic link. */ + export const O_NOFOLLOW: number; + + /** Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O. */ + export const O_SYNC: number; + + /** Constant for fs.open(). Flag indicating to open the symbolic link itself rather than the resource it is pointing to. */ + export const O_SYMLINK: number; + + /** Constant for fs.open(). When set, an attempt will be made to minimize caching effects of file I/O. */ + export const O_DIRECT: number; + + /** Constant for fs.open(). Flag indicating to open the file in nonblocking mode when possible. */ + export const O_NONBLOCK: number; + + // File Type Constants + + /** Constant for fs.Stats mode property for determining a file's type. Bit mask used to extract the file type code. */ + export const S_IFMT: number; + + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a regular file. */ + export const S_IFREG: number; + + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a directory. */ + export const S_IFDIR: number; + + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a character-oriented device file. */ + export const S_IFCHR: number; + + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a block-oriented device file. */ + export const S_IFBLK: number; + + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a FIFO/pipe. */ + export const S_IFIFO: number; + + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a symbolic link. */ + export const S_IFLNK: number; + + /** Constant for fs.Stats mode property for determining a file's type. File type constant for a socket. */ + export const S_IFSOCK: number; + + // File Mode Constants + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by owner. */ + export const S_IRWXU: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by owner. */ + export const S_IRUSR: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by owner. */ + export const S_IWUSR: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by owner. */ + export const S_IXUSR: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by group. */ + export const S_IRWXG: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by group. */ + export const S_IRGRP: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by group. */ + export const S_IWGRP: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by group. */ + export const S_IXGRP: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by others. */ + export const S_IRWXO: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by others. */ + export const S_IROTH: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by others. */ + export const S_IWOTH: number; + + /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by others. */ + export const S_IXOTH: number; + } + /** Tests a user's permissions for the file specified by path. */ - export function access(path: string, callback: (err: NodeJS.ErrnoException) => void): void; - export function access(path: string, mode: number, callback: (err: NodeJS.ErrnoException) => void): void; + export function access(path: string | Buffer, callback: (err: NodeJS.ErrnoException) => void): void; + export function access(path: string | Buffer, mode: number, callback: (err: NodeJS.ErrnoException) => void): void; /** Synchronous version of fs.access. This throws if any accessibility checks fail, and does nothing otherwise. */ - export function accessSync(path: string, mode ?: number): void; - export function createReadStream(path: string, options?: { + export function accessSync(path: string | Buffer, mode?: number): void; + export function createReadStream(path: string | Buffer, options?: { flags?: string; encoding?: string; - fd?: string; + fd?: number; mode?: number; - bufferSize?: number; - }): ReadStream; - export function createReadStream(path: string, options?: { - flags?: string; - encoding?: string; - fd?: string; - mode?: string; - bufferSize?: number; + autoClose?: boolean; + start?: number; + end?: number; }): ReadStream; - export function createWriteStream(path: string, options?: { + export function createWriteStream(path: string | Buffer, options?: { flags?: string; encoding?: string; - string?: string; + fd?: number; + mode?: number; + autoClose?: boolean; + start?: number; }): WriteStream; + export function fdatasync(fd: number, callback: Function): void; + export function fdatasyncSync(fd: number): void; } declare module "path" { @@ -1435,43 +2556,43 @@ declare module "path" { export function format(pathObject: ParsedPath): string; export module posix { - export function normalize(p: string): string; - export function join(...paths: any[]): string; - export function resolve(...pathSegments: any[]): string; - export function isAbsolute(p: string): boolean; - export function relative(from: string, to: string): string; - export function dirname(p: string): string; - export function basename(p: string, ext?: string): string; - export function extname(p: string): string; - export var sep: string; - export var delimiter: string; - export function parse(p: string): ParsedPath; - export function format(pP: ParsedPath): string; + export function normalize(p: string): string; + export function join(...paths: any[]): string; + export function resolve(...pathSegments: any[]): string; + export function isAbsolute(p: string): boolean; + export function relative(from: string, to: string): string; + export function dirname(p: string): string; + export function basename(p: string, ext?: string): string; + export function extname(p: string): string; + export var sep: string; + export var delimiter: string; + export function parse(p: string): ParsedPath; + export function format(pP: ParsedPath): string; } export module win32 { - export function normalize(p: string): string; - export function join(...paths: any[]): string; - export function resolve(...pathSegments: any[]): string; - export function isAbsolute(p: string): boolean; - export function relative(from: string, to: string): string; - export function dirname(p: string): string; - export function basename(p: string, ext?: string): string; - export function extname(p: string): string; - export var sep: string; - export var delimiter: string; - export function parse(p: string): ParsedPath; - export function format(pP: ParsedPath): string; + export function normalize(p: string): string; + export function join(...paths: any[]): string; + export function resolve(...pathSegments: any[]): string; + export function isAbsolute(p: string): boolean; + export function relative(from: string, to: string): string; + export function dirname(p: string): string; + export function basename(p: string, ext?: string): string; + export function extname(p: string): string; + export var sep: string; + export var delimiter: string; + export function parse(p: string): ParsedPath; + export function format(pP: ParsedPath): string; } } declare module "string_decoder" { export interface NodeStringDecoder { write(buffer: Buffer): string; - detectIncompleteChar(buffer: Buffer): number; + end(buffer?: Buffer): string; } export var StringDecoder: { - new (encoding: string): NodeStringDecoder; + new (encoding?: string): NodeStringDecoder; }; } @@ -1483,42 +2604,222 @@ declare module "tls" { var CLIENT_RENEG_LIMIT: number; var CLIENT_RENEG_WINDOW: number; + export interface Certificate { + /** + * Country code. + */ + C: string; + /** + * Street. + */ + ST: string; + /** + * Locality. + */ + L: string; + /** + * Organization. + */ + O: string; + /** + * Organizational unit. + */ + OU: string; + /** + * Common name. + */ + CN: string; + } + + export interface CipherNameAndProtocol { + /** + * The cipher name. + */ + name: string; + /** + * SSL/TLS protocol version. + */ + version: string; + } + + export class TLSSocket extends stream.Duplex { + /** + * Returns the bound address, the address family name and port of the underlying socket as reported by + * the operating system. + * @returns {any} - An object with three properties, e.g. { port: 12346, family: 'IPv4', address: '127.0.0.1' }. + */ + address(): { port: number; family: string; address: string }; + /** + * A boolean that is true if the peer certificate was signed by one of the specified CAs, otherwise false. + */ + authorized: boolean; + /** + * The reason why the peer's certificate has not been verified. + * This property becomes available only when tlsSocket.authorized === false. + */ + authorizationError: Error; + /** + * Static boolean value, always true. + * May be used to distinguish TLS sockets from regular ones. + */ + encrypted: boolean; + /** + * Returns an object representing the cipher name and the SSL/TLS protocol version of the current connection. + * @returns {CipherNameAndProtocol} - Returns an object representing the cipher name + * and the SSL/TLS protocol version of the current connection. + */ + getCipher(): CipherNameAndProtocol; + /** + * Returns an object representing the peer's certificate. + * The returned object has some properties corresponding to the field of the certificate. + * If detailed argument is true the full chain with issuer property will be returned, + * if false only the top certificate without issuer property. + * If the peer does not provide a certificate, it returns null or an empty object. + * @param {boolean} detailed - If true; the full chain with issuer property will be returned. + * @returns {any} - An object representing the peer's certificate. + */ + getPeerCertificate(detailed?: boolean): { + subject: Certificate; + issuerInfo: Certificate; + issuer: Certificate; + raw: any; + valid_from: string; + valid_to: string; + fingerprint: string; + serialNumber: string; + }; + /** + * Could be used to speed up handshake establishment when reconnecting to the server. + * @returns {any} - ASN.1 encoded TLS session or undefined if none was negotiated. + */ + getSession(): any; + /** + * NOTE: Works only with client TLS sockets. + * Useful only for debugging, for session reuse provide session option to tls.connect(). + * @returns {any} - TLS session ticket or undefined if none was negotiated. + */ + getTLSTicket(): any; + /** + * The string representation of the local IP address. + */ + localAddress: string; + /** + * The numeric representation of the local port. + */ + localPort: string; + /** + * The string representation of the remote IP address. + * For example, '74.125.127.100' or '2001:4860:a005::68'. + */ + remoteAddress: string; + /** + * The string representation of the remote IP family. 'IPv4' or 'IPv6'. + */ + remoteFamily: string; + /** + * The numeric representation of the remote port. For example, 443. + */ + remotePort: number; + /** + * Initiate TLS renegotiation process. + * + * NOTE: Can be used to request peer's certificate after the secure connection has been established. + * ANOTHER NOTE: When running as the server, socket will be destroyed with an error after handshakeTimeout timeout. + * @param {TlsOptions} options - The options may contain the following fields: rejectUnauthorized, + * requestCert (See tls.createServer() for details). + * @param {Function} callback - callback(err) will be executed with null as err, once the renegotiation + * is successfully completed. + */ + renegotiate(options: TlsOptions, callback: (err: Error) => any): any; + /** + * Set maximum TLS fragment size (default and maximum value is: 16384, minimum is: 512). + * Smaller fragment size decreases buffering latency on the client: large fragments are buffered by + * the TLS layer until the entire fragment is received and its integrity is verified; + * large fragments can span multiple roundtrips, and their processing can be delayed due to packet + * loss or reordering. However, smaller fragments add extra TLS framing bytes and CPU overhead, + * which may decrease overall server throughput. + * @param {number} size - TLS fragment size (default and maximum value is: 16384, minimum is: 512). + * @returns {boolean} - Returns true on success, false otherwise. + */ + setMaxSendFragment(size: number): boolean; + + /** + * events.EventEmitter + * 1. OCSPResponse + * 2. secureConnect + **/ + addListener(event: string, listener: Function): this; + addListener(event: "OCSPResponse", listener: (response: Buffer) => void): this; + addListener(event: "secureConnect", listener: () => void): this; + + emit(event: string, ...args: any[]): boolean; + emit(event: "OCSPResponse", response: Buffer): boolean; + emit(event: "secureConnect"): boolean; + + on(event: string, listener: Function): this; + on(event: "OCSPResponse", listener: (response: Buffer) => void): this; + on(event: "secureConnect", listener: () => void): this; + + once(event: string, listener: Function): this; + once(event: "OCSPResponse", listener: (response: Buffer) => void): this; + once(event: "secureConnect", listener: () => void): this; + + prependListener(event: string, listener: Function): this; + prependListener(event: "OCSPResponse", listener: (response: Buffer) => void): this; + prependListener(event: "secureConnect", listener: () => void): this; + + prependOnceListener(event: string, listener: Function): this; + prependOnceListener(event: "OCSPResponse", listener: (response: Buffer) => void): this; + prependOnceListener(event: "secureConnect", listener: () => void): this; + } + export interface TlsOptions { - pfx?: any; //string or buffer - key?: any; //string or buffer + host?: string; + port?: number; + pfx?: string | Buffer[]; + key?: string | string[] | Buffer | any[]; passphrase?: string; - cert?: any; - ca?: any; //string or buffer - crl?: any; //string or string array + cert?: string | string[] | Buffer | Buffer[]; + ca?: string | string[] | Buffer | Buffer[]; + crl?: string | string[]; ciphers?: string; - honorCipherOrder?: any; + honorCipherOrder?: boolean; requestCert?: boolean; rejectUnauthorized?: boolean; - NPNProtocols?: any; //array or Buffer; - SNICallback?: (servername: string) => any; + NPNProtocols?: string[] | Buffer; + SNICallback?: (servername: string, cb: (err: Error, ctx: SecureContext) => any) => any; + ecdhCurve?: string; + dhparam?: string | Buffer; + handshakeTimeout?: number; + ALPNProtocols?: string[] | Buffer; + sessionTimeout?: number; + ticketKeys?: any; + sessionIdContext?: string; + secureProtocol?: string; } export interface ConnectionOptions { host?: string; port?: number; socket?: net.Socket; - pfx?: any; //string | Buffer - key?: any; //string | Buffer + pfx?: string | Buffer + key?: string | string[] | Buffer | Buffer[]; passphrase?: string; - cert?: any; //string | Buffer - ca?: any; //Array of string | Buffer + cert?: string | string[] | Buffer | Buffer[]; + ca?: string | Buffer | (string | Buffer)[]; rejectUnauthorized?: boolean; - NPNProtocols?: any; //Array of string | Buffer + NPNProtocols?: (string | Buffer)[]; servername?: string; + path?: string; + ALPNProtocols?: (string | Buffer)[]; + checkServerIdentity?: (servername: string, cert: string | Buffer | (string | Buffer)[]) => any; + secureProtocol?: string; + secureContext?: Object; + session?: Buffer; + minDHSize?: number; } export interface Server extends net.Server { - // Extended base methods - listen(port: number, host?: string, backlog?: number, listeningListener?: Function): Server; - listen(path: string, listeningListener?: Function): Server; - listen(handle: any, listeningListener?: Function): Server; - - listen(port: number, host?: string, callback?: Function): Server; close(): Server; address(): { port: number; family: string; address: string; }; addContext(hostName: string, credentials: { @@ -1528,6 +2829,56 @@ declare module "tls" { }): void; maxConnections: number; connections: number; + + /** + * events.EventEmitter + * 1. tlsClientError + * 2. newSession + * 3. OCSPRequest + * 4. resumeSession + * 5. secureConnection + **/ + addListener(event: string, listener: Function): this; + addListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; + addListener(event: "newSession", listener: (sessionId: any, sessionData: any, callback: (err: Error, resp: Buffer) => void) => void): this; + addListener(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: Function) => void): this; + addListener(event: "resumeSession", listener: (sessionId: any, callback: (err: Error, sessionData: any) => void) => void): this; + addListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; + + emit(event: string, ...args: any[]): boolean; + emit(event: "tlsClientError", err: Error, tlsSocket: TLSSocket): boolean; + emit(event: "newSession", sessionId: any, sessionData: any, callback: (err: Error, resp: Buffer) => void): boolean; + emit(event: "OCSPRequest", certificate: Buffer, issuer: Buffer, callback: Function): boolean; + emit(event: "resumeSession", sessionId: any, callback: (err: Error, sessionData: any) => void): boolean; + emit(event: "secureConnection", tlsSocket: TLSSocket): boolean; + + on(event: string, listener: Function): this; + on(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; + on(event: "newSession", listener: (sessionId: any, sessionData: any, callback: (err: Error, resp: Buffer) => void) => void): this; + on(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: Function) => void): this; + on(event: "resumeSession", listener: (sessionId: any, callback: (err: Error, sessionData: any) => void) => void): this; + on(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; + + once(event: string, listener: Function): this; + once(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; + once(event: "newSession", listener: (sessionId: any, sessionData: any, callback: (err: Error, resp: Buffer) => void) => void): this; + once(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: Function) => void): this; + once(event: "resumeSession", listener: (sessionId: any, callback: (err: Error, sessionData: any) => void) => void): this; + once(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; + + prependListener(event: string, listener: Function): this; + prependListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; + prependListener(event: "newSession", listener: (sessionId: any, sessionData: any, callback: (err: Error, resp: Buffer) => void) => void): this; + prependListener(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: Function) => void): this; + prependListener(event: "resumeSession", listener: (sessionId: any, callback: (err: Error, sessionData: any) => void) => void): this; + prependListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; + + prependOnceListener(event: string, listener: Function): this; + prependOnceListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; + prependOnceListener(event: "newSession", listener: (sessionId: any, sessionData: any, callback: (err: Error, resp: Buffer) => void) => void): this; + prependOnceListener(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: Function) => void): this; + prependOnceListener(event: "resumeSession", listener: (sessionId: any, callback: (err: Error, sessionData: any) => void) => void): this; + prependOnceListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; } export interface ClearTextStream extends stream.Duplex { @@ -1553,12 +2904,12 @@ declare module "tls" { } export interface SecureContextOptions { - pfx?: any; //string | buffer - key?: any; //string | buffer + pfx?: string | Buffer; + key?: string | Buffer; passphrase?: string; - cert?: any; // string | buffer - ca?: any; // string | buffer - crl?: any; // string | string[] + cert?: string | Buffer; + ca?: string | Buffer; + crl?: string | string[] ciphers?: string; honorCipherOrder?: boolean; } @@ -1567,189 +2918,397 @@ declare module "tls" { context: any; } - export function createServer(options: TlsOptions, secureConnectionListener?: (cleartextStream: ClearTextStream) =>void ): Server; - export function connect(options: TlsOptions, secureConnectionListener?: () =>void ): ClearTextStream; - export function connect(port: number, host?: string, options?: ConnectionOptions, secureConnectListener?: () =>void ): ClearTextStream; - export function connect(port: number, options?: ConnectionOptions, secureConnectListener?: () =>void ): ClearTextStream; + export function createServer(options: TlsOptions, secureConnectionListener?: (cleartextStream: ClearTextStream) => void): Server; + export function connect(options: ConnectionOptions, secureConnectionListener?: () => void): ClearTextStream; + export function connect(port: number, host?: string, options?: ConnectionOptions, secureConnectListener?: () => void): ClearTextStream; + export function connect(port: number, options?: ConnectionOptions, secureConnectListener?: () => void): ClearTextStream; export function createSecurePair(credentials?: crypto.Credentials, isServer?: boolean, requestCert?: boolean, rejectUnauthorized?: boolean): SecurePair; export function createSecureContext(details: SecureContextOptions): SecureContext; } declare module "crypto" { + export interface Certificate { + exportChallenge(spkac: string | Buffer): Buffer; + exportPublicKey(spkac: string | Buffer): Buffer; + verifySpkac(spkac: Buffer): boolean; + } + export var Certificate: { + new (): Certificate; + (): Certificate; + } + + export var fips: boolean; + export interface CredentialDetails { pfx: string; key: string; passphrase: string; cert: string; - ca: any; //string | string array - crl: any; //string | string array + ca: string | string[]; + crl: string | string[]; ciphers: string; } export interface Credentials { context?: any; } export function createCredentials(details: CredentialDetails): Credentials; export function createHash(algorithm: string): Hash; - export function createHmac(algorithm: string, key: string): Hmac; - export function createHmac(algorithm: string, key: Buffer): Hmac; - interface Hash { - update(data: any, input_encoding?: string): Hash; - digest(encoding: 'buffer'): Buffer; - digest(encoding: string): any; + export function createHmac(algorithm: string, key: string | Buffer): Hmac; + + type Utf8AsciiLatin1Encoding = "utf8" | "ascii" | "latin1"; + type HexBase64Latin1Encoding = "latin1" | "hex" | "base64"; + type Utf8AsciiBinaryEncoding = "utf8" | "ascii" | "binary"; + type HexBase64BinaryEncoding = "binary" | "base64" | "hex"; + type ECDHKeyFormat = "compressed" | "uncompressed" | "hybrid"; + + export interface Hash extends NodeJS.ReadWriteStream { + update(data: string | Buffer): Hash; + update(data: string | Buffer, input_encoding: Utf8AsciiLatin1Encoding): Hash; digest(): Buffer; + digest(encoding: HexBase64Latin1Encoding): string; } - interface Hmac { - update(data: any, input_encoding?: string): Hmac; - digest(encoding: 'buffer'): Buffer; - digest(encoding: string): any; + export interface Hmac extends NodeJS.ReadWriteStream { + update(data: string | Buffer): Hmac; + update(data: string | Buffer, input_encoding: Utf8AsciiLatin1Encoding): Hmac; digest(): Buffer; + digest(encoding: HexBase64Latin1Encoding): string; } export function createCipher(algorithm: string, password: any): Cipher; export function createCipheriv(algorithm: string, key: any, iv: any): Cipher; - interface Cipher { + export interface Cipher extends NodeJS.ReadWriteStream { update(data: Buffer): Buffer; - update(data: string, input_encoding?: string, output_encoding?: string): string; + update(data: string, input_encoding: Utf8AsciiBinaryEncoding): Buffer; + update(data: Buffer, input_encoding: any, output_encoding: HexBase64BinaryEncoding): string; + update(data: string, input_encoding: Utf8AsciiBinaryEncoding, output_encoding: HexBase64BinaryEncoding): string; final(): Buffer; final(output_encoding: string): string; - setAutoPadding(auto_padding: boolean): void; + setAutoPadding(auto_padding?: boolean): void; + getAuthTag(): Buffer; + setAAD(buffer: Buffer): void; } export function createDecipher(algorithm: string, password: any): Decipher; export function createDecipheriv(algorithm: string, key: any, iv: any): Decipher; - interface Decipher { + export interface Decipher extends NodeJS.ReadWriteStream { update(data: Buffer): Buffer; - update(data: string, input_encoding?: string, output_encoding?: string): string; + update(data: string, input_encoding: HexBase64BinaryEncoding): Buffer; + update(data: Buffer, input_encoding: any, output_encoding: Utf8AsciiBinaryEncoding): string; + update(data: string, input_encoding: HexBase64BinaryEncoding, output_encoding: Utf8AsciiBinaryEncoding): string; final(): Buffer; final(output_encoding: string): string; - setAutoPadding(auto_padding: boolean): void; + setAutoPadding(auto_padding?: boolean): void; + setAuthTag(tag: Buffer): void; + setAAD(buffer: Buffer): void; } export function createSign(algorithm: string): Signer; - interface Signer { - update(data: any): void; - sign(private_key: string, output_format: string): string; + export interface Signer extends NodeJS.WritableStream { + update(data: string | Buffer): Signer; + update(data: string | Buffer, input_encoding: Utf8AsciiLatin1Encoding): Signer; + sign(private_key: string | { key: string; passphrase: string }): Buffer; + sign(private_key: string | { key: string; passphrase: string }, output_format: HexBase64Latin1Encoding): string; } export function createVerify(algorith: string): Verify; - interface Verify { - update(data: any): void; - verify(object: string, signature: string, signature_format?: string): boolean; - } - export function createDiffieHellman(prime_length: number): DiffieHellman; - export function createDiffieHellman(prime: number, encoding?: string): DiffieHellman; - interface DiffieHellman { - generateKeys(encoding?: string): string; - computeSecret(other_public_key: string, input_encoding?: string, output_encoding?: string): string; - getPrime(encoding?: string): string; - getGenerator(encoding: string): string; - getPublicKey(encoding?: string): string; - getPrivateKey(encoding?: string): string; - setPublicKey(public_key: string, encoding?: string): void; - setPrivateKey(public_key: string, encoding?: string): void; + export interface Verify extends NodeJS.WritableStream { + update(data: string | Buffer): Verify; + update(data: string | Buffer, input_encoding: Utf8AsciiLatin1Encoding): Verify; + verify(object: string, signature: Buffer): boolean; + verify(object: string, signature: string, signature_format: HexBase64Latin1Encoding): boolean; + } + export function createDiffieHellman(prime_length: number, generator?: number): DiffieHellman; + export function createDiffieHellman(prime: Buffer): DiffieHellman; + export function createDiffieHellman(prime: string, prime_encoding: HexBase64Latin1Encoding): DiffieHellman; + export function createDiffieHellman(prime: string, prime_encoding: HexBase64Latin1Encoding, generator: number | Buffer): DiffieHellman; + export function createDiffieHellman(prime: string, prime_encoding: HexBase64Latin1Encoding, generator: string, generator_encoding: HexBase64Latin1Encoding): DiffieHellman; + export interface DiffieHellman { + generateKeys(): Buffer; + generateKeys(encoding: HexBase64Latin1Encoding): string; + computeSecret(other_public_key: Buffer): Buffer; + computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding): Buffer; + computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding, output_encoding: HexBase64Latin1Encoding): string; + getPrime(): Buffer; + getPrime(encoding: HexBase64Latin1Encoding): string; + getGenerator(): Buffer; + getGenerator(encoding: HexBase64Latin1Encoding): string; + getPublicKey(): Buffer; + getPublicKey(encoding: HexBase64Latin1Encoding): string; + getPrivateKey(): Buffer; + getPrivateKey(encoding: HexBase64Latin1Encoding): string; + setPublicKey(public_key: Buffer): void; + setPublicKey(public_key: string, encoding: string): void; + setPrivateKey(private_key: Buffer): void; + setPrivateKey(private_key: string, encoding: string): void; + verifyError: number; } export function getDiffieHellman(group_name: string): DiffieHellman; - export function pbkdf2(password: string, salt: string, iterations: number, keylen: number, callback: (err: Error, derivedKey: Buffer) => any): void; - export function pbkdf2(password: string, salt: string, iterations: number, keylen: number, digest: string, callback: (err: Error, derivedKey: Buffer) => any): void; - export function pbkdf2Sync(password: string, salt: string, iterations: number, keylen: number) : Buffer; - export function pbkdf2Sync(password: string, salt: string, iterations: number, keylen: number, digest: string) : Buffer; + export function pbkdf2(password: string | Buffer, salt: string | Buffer, iterations: number, keylen: number, digest: string, callback: (err: Error, derivedKey: Buffer) => any): void; + export function pbkdf2Sync(password: string | Buffer, salt: string | Buffer, iterations: number, keylen: number, digest: string): Buffer; export function randomBytes(size: number): Buffer; - export function randomBytes(size: number, callback: (err: Error, buf: Buffer) =>void ): void; + export function randomBytes(size: number, callback: (err: Error, buf: Buffer) => void): void; export function pseudoRandomBytes(size: number): Buffer; - export function pseudoRandomBytes(size: number, callback: (err: Error, buf: Buffer) =>void ): void; + export function pseudoRandomBytes(size: number, callback: (err: Error, buf: Buffer) => void): void; + export interface RsaPublicKey { + key: string; + padding?: number; + } + export interface RsaPrivateKey { + key: string; + passphrase?: string, + padding?: number; + } + export function publicEncrypt(public_key: string | RsaPublicKey, buffer: Buffer): Buffer + export function privateDecrypt(private_key: string | RsaPrivateKey, buffer: Buffer): Buffer + export function privateEncrypt(private_key: string | RsaPrivateKey, buffer: Buffer): Buffer + export function publicDecrypt(public_key: string | RsaPublicKey, buffer: Buffer): Buffer + export function getCiphers(): string[]; + export function getCurves(): string[]; + export function getHashes(): string[]; + export interface ECDH { + generateKeys(): Buffer; + generateKeys(encoding: HexBase64Latin1Encoding): string; + generateKeys(encoding: HexBase64Latin1Encoding, format: ECDHKeyFormat): string; + computeSecret(other_public_key: Buffer): Buffer; + computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding): Buffer; + computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding, output_encoding: HexBase64Latin1Encoding): string; + getPrivateKey(): Buffer; + getPrivateKey(encoding: HexBase64Latin1Encoding): string; + getPublicKey(): Buffer; + getPublicKey(encoding: HexBase64Latin1Encoding): string; + getPublicKey(encoding: HexBase64Latin1Encoding, format: ECDHKeyFormat): string; + setPrivateKey(private_key: Buffer): void; + setPrivateKey(private_key: string, encoding: HexBase64Latin1Encoding): void; + } + export function createECDH(curve_name: string): ECDH; + export function timingSafeEqual(a: Buffer, b: Buffer): boolean; + export var DEFAULT_ENCODING: string; } declare module "stream" { import * as events from "events"; - export interface Stream extends events.EventEmitter { + class internal extends events.EventEmitter { pipe(destination: T, options?: { end?: boolean; }): T; } + namespace internal { - export interface ReadableOptions { - highWaterMark?: number; - encoding?: string; - objectMode?: boolean; - } + export class Stream extends internal { } - export class Readable extends events.EventEmitter implements NodeJS.ReadableStream { - readable: boolean; - constructor(opts?: ReadableOptions); - _read(size: number): void; - read(size?: number): string|Buffer; - setEncoding(encoding: string): void; - pause(): void; - resume(): void; - pipe(destination: T, options?: { end?: boolean; }): T; - unpipe(destination?: T): void; - unshift(chunk: string): void; - unshift(chunk: Buffer): void; - wrap(oldStream: NodeJS.ReadableStream): NodeJS.ReadableStream; - push(chunk: any, encoding?: string): boolean; - } + export interface ReadableOptions { + highWaterMark?: number; + encoding?: string; + objectMode?: boolean; + read?: (size?: number) => any; + } - export interface WritableOptions { - highWaterMark?: number; - decodeStrings?: boolean; - } + export class Readable extends events.EventEmitter implements NodeJS.ReadableStream { + readable: boolean; + constructor(opts?: ReadableOptions); + protected _read(size: number): void; + read(size?: number): any; + setEncoding(encoding: string): void; + pause(): Readable; + resume(): Readable; + pipe(destination: T, options?: { end?: boolean; }): T; + unpipe(destination?: T): void; + unshift(chunk: any): void; + wrap(oldStream: NodeJS.ReadableStream): NodeJS.ReadableStream; + push(chunk: any, encoding?: string): boolean; + + /** + * Event emitter + * The defined events on documents including: + * 1. close + * 2. data + * 3. end + * 4. readable + * 5. error + **/ + addListener(event: string, listener: Function): this; + addListener(event: string, listener: Function): this; + addListener(event: "close", listener: () => void): this; + addListener(event: "data", listener: (chunk: Buffer | string) => void): this; + addListener(event: "end", listener: () => void): this; + addListener(event: "readable", listener: () => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + + emit(event: string, ...args: any[]): boolean; + emit(event: "close"): boolean; + emit(event: "data", chunk: Buffer | string): boolean; + emit(event: "end"): boolean; + emit(event: "readable"): boolean; + emit(event: "error", err: Error): boolean; + + on(event: string, listener: Function): this; + on(event: "close", listener: () => void): this; + on(event: "data", listener: (chunk: Buffer | string) => void): this; + on(event: "end", listener: () => void): this; + on(event: "readable", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + + once(event: string, listener: Function): this; + once(event: "close", listener: () => void): this; + once(event: "data", listener: (chunk: Buffer | string) => void): this; + once(event: "end", listener: () => void): this; + once(event: "readable", listener: () => void): this; + once(event: "error", listener: (err: Error) => void): this; + + prependListener(event: string, listener: Function): this; + prependListener(event: "close", listener: () => void): this; + prependListener(event: "data", listener: (chunk: Buffer | string) => void): this; + prependListener(event: "end", listener: () => void): this; + prependListener(event: "readable", listener: () => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + + prependOnceListener(event: string, listener: Function): this; + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "data", listener: (chunk: Buffer | string) => void): this; + prependOnceListener(event: "end", listener: () => void): this; + prependOnceListener(event: "readable", listener: () => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + + removeListener(event: string, listener: Function): this; + removeListener(event: "close", listener: () => void): this; + removeListener(event: "data", listener: (chunk: Buffer | string) => void): this; + removeListener(event: "end", listener: () => void): this; + removeListener(event: "readable", listener: () => void): this; + removeListener(event: "error", listener: (err: Error) => void): this; + } - export class Writable extends events.EventEmitter implements NodeJS.WritableStream { - writable: boolean; - constructor(opts?: WritableOptions); - _write(data: Buffer, encoding: string, callback: Function): void; - _write(data: string, encoding: string, callback: Function): void; - write(buffer: Buffer, cb?: Function): boolean; - write(str: string, cb?: Function): boolean; - write(str: string, encoding?: string, cb?: Function): boolean; - end(): void; - end(buffer: Buffer, cb?: Function): void; - end(str: string, cb?: Function): void; - end(str: string, encoding?: string, cb?: Function): void; - } + export interface WritableOptions { + highWaterMark?: number; + decodeStrings?: boolean; + objectMode?: boolean; + write?: (chunk: string | Buffer, encoding: string, callback: Function) => any; + writev?: (chunks: { chunk: string | Buffer, encoding: string }[], callback: Function) => any; + } - export interface DuplexOptions extends ReadableOptions, WritableOptions { - allowHalfOpen?: boolean; - } + export class Writable extends events.EventEmitter implements NodeJS.WritableStream { + writable: boolean; + constructor(opts?: WritableOptions); + protected _write(chunk: any, encoding: string, callback: Function): void; + write(chunk: any, cb?: Function): boolean; + write(chunk: any, encoding?: string, cb?: Function): boolean; + end(): void; + end(chunk: any, cb?: Function): void; + end(chunk: any, encoding?: string, cb?: Function): void; + + /** + * Event emitter + * The defined events on documents including: + * 1. close + * 2. drain + * 3. error + * 4. finish + * 5. pipe + * 6. unpipe + **/ + addListener(event: string, listener: Function): this; + addListener(event: "close", listener: () => void): this; + addListener(event: "drain", listener: () => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: "finish", listener: () => void): this; + addListener(event: "pipe", listener: (src: Readable) => void): this; + addListener(event: "unpipe", listener: (src: Readable) => void): this; + + emit(event: string, ...args: any[]): boolean; + emit(event: "close"): boolean; + emit(event: "drain", chunk: Buffer | string): boolean; + emit(event: "error", err: Error): boolean; + emit(event: "finish"): boolean; + emit(event: "pipe", src: Readable): boolean; + emit(event: "unpipe", src: Readable): boolean; + + on(event: string, listener: Function): this; + on(event: "close", listener: () => void): this; + on(event: "drain", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: "finish", listener: () => void): this; + on(event: "pipe", listener: (src: Readable) => void): this; + on(event: "unpipe", listener: (src: Readable) => void): this; + + once(event: string, listener: Function): this; + once(event: "close", listener: () => void): this; + once(event: "drain", listener: () => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: "finish", listener: () => void): this; + once(event: "pipe", listener: (src: Readable) => void): this; + once(event: "unpipe", listener: (src: Readable) => void): this; + + prependListener(event: string, listener: Function): this; + prependListener(event: "close", listener: () => void): this; + prependListener(event: "drain", listener: () => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: "finish", listener: () => void): this; + prependListener(event: "pipe", listener: (src: Readable) => void): this; + prependListener(event: "unpipe", listener: (src: Readable) => void): this; + + prependOnceListener(event: string, listener: Function): this; + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "drain", listener: () => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: "finish", listener: () => void): this; + prependOnceListener(event: "pipe", listener: (src: Readable) => void): this; + prependOnceListener(event: "unpipe", listener: (src: Readable) => void): this; + + removeListener(event: string, listener: Function): this; + removeListener(event: "close", listener: () => void): this; + removeListener(event: "drain", listener: () => void): this; + removeListener(event: "error", listener: (err: Error) => void): this; + removeListener(event: "finish", listener: () => void): this; + removeListener(event: "pipe", listener: (src: Readable) => void): this; + removeListener(event: "unpipe", listener: (src: Readable) => void): this; + } - // Note: Duplex extends both Readable and Writable. - export class Duplex extends Readable implements NodeJS.ReadWriteStream { - writable: boolean; - constructor(opts?: DuplexOptions); - _write(data: Buffer, encoding: string, callback: Function): void; - _write(data: string, encoding: string, callback: Function): void; - write(buffer: Buffer, cb?: Function): boolean; - write(str: string, cb?: Function): boolean; - write(str: string, encoding?: string, cb?: Function): boolean; - end(): void; - end(buffer: Buffer, cb?: Function): void; - end(str: string, cb?: Function): void; - end(str: string, encoding?: string, cb?: Function): void; - } + export interface DuplexOptions extends ReadableOptions, WritableOptions { + allowHalfOpen?: boolean; + readableObjectMode?: boolean; + writableObjectMode?: boolean; + } - export interface TransformOptions extends ReadableOptions, WritableOptions {} + // Note: Duplex extends both Readable and Writable. + export class Duplex extends Readable implements NodeJS.ReadWriteStream { + // Readable + pause(): Duplex; + resume(): Duplex; + // Writeable + writable: boolean; + constructor(opts?: DuplexOptions); + protected _write(chunk: any, encoding: string, callback: Function): void; + write(chunk: any, cb?: Function): boolean; + write(chunk: any, encoding?: string, cb?: Function): boolean; + end(): void; + end(chunk: any, cb?: Function): void; + end(chunk: any, encoding?: string, cb?: Function): void; + } - // Note: Transform lacks the _read and _write methods of Readable/Writable. - export class Transform extends events.EventEmitter implements NodeJS.ReadWriteStream { - readable: boolean; - writable: boolean; - constructor(opts?: TransformOptions); - _transform(chunk: Buffer, encoding: string, callback: Function): void; - _transform(chunk: string, encoding: string, callback: Function): void; - _flush(callback: Function): void; - read(size?: number): any; - setEncoding(encoding: string): void; - pause(): void; - resume(): void; - pipe(destination: T, options?: { end?: boolean; }): T; - unpipe(destination?: T): void; - unshift(chunk: string): void; - unshift(chunk: Buffer): void; - wrap(oldStream: NodeJS.ReadableStream): NodeJS.ReadableStream; - push(chunk: any, encoding?: string): boolean; - write(buffer: Buffer, cb?: Function): boolean; - write(str: string, cb?: Function): boolean; - write(str: string, encoding?: string, cb?: Function): boolean; - end(): void; - end(buffer: Buffer, cb?: Function): void; - end(str: string, cb?: Function): void; - end(str: string, encoding?: string, cb?: Function): void; + export interface TransformOptions extends DuplexOptions { + transform?: (chunk: string | Buffer, encoding: string, callback: Function) => any; + flush?: (callback: Function) => any; + } + + // Note: Transform lacks the _read and _write methods of Readable/Writable. + export class Transform extends events.EventEmitter implements NodeJS.ReadWriteStream { + readable: boolean; + writable: boolean; + constructor(opts?: TransformOptions); + protected _transform(chunk: any, encoding: string, callback: Function): void; + protected _flush(callback: Function): void; + read(size?: number): any; + setEncoding(encoding: string): void; + pause(): Transform; + resume(): Transform; + pipe(destination: T, options?: { end?: boolean; }): T; + unpipe(destination?: T): void; + unshift(chunk: any): void; + wrap(oldStream: NodeJS.ReadableStream): NodeJS.ReadableStream; + push(chunk: any, encoding?: string): boolean; + write(chunk: any, cb?: Function): boolean; + write(chunk: any, encoding?: string, cb?: Function): boolean; + end(): void; + end(chunk: any, cb?: Function): void; + end(chunk: any, encoding?: string, cb?: Function): void; + } + + export class PassThrough extends Transform { } } - export class PassThrough extends Transform {} + export = internal; } declare module "util" { @@ -1773,11 +3332,24 @@ declare module "util" { export function isDate(object: any): boolean; export function isError(object: any): boolean; export function inherits(constructor: any, superConstructor: any): void; + export function debuglog(key: string): (msg: string, ...param: any[]) => void; + export function isBoolean(object: any): boolean; + export function isBuffer(object: any): boolean; + export function isFunction(object: any): boolean; + export function isNull(object: any): boolean; + export function isNullOrUndefined(object: any): boolean; + export function isNumber(object: any): boolean; + export function isObject(object: any): boolean; + export function isPrimitive(object: any): boolean; + export function isString(object: any): boolean; + export function isSymbol(object: any): boolean; + export function isUndefined(object: any): boolean; + export function deprecate(fn: Function, message: string): Function; } declare module "assert" { - function internal (value: any, message?: string): void; - module internal { + function internal(value: any, message?: string): void; + namespace internal { export class AssertionError implements Error { name: string; message: string; @@ -1786,11 +3358,13 @@ declare module "assert" { operator: string; generatedMessage: boolean; - constructor(options?: {message?: string; actual?: any; expected?: any; - operator?: string; stackStartFunction?: Function}); + constructor(options?: { + message?: string; actual?: any; expected?: any; + operator?: string; stackStartFunction?: Function + }); } - export function fail(actual?: any, expected?: any, message?: string, operator?: string): void; + export function fail(actual: any, expected: any, message: string, operator: string): void; export function ok(value: any, message?: string): void; export function equal(actual: any, expected: any, message?: string): void; export function notEqual(actual: any, expected: any, message?: string): void; @@ -1798,6 +3372,8 @@ declare module "assert" { export function notDeepEqual(acutal: any, expected: any, message?: string): void; export function strictEqual(actual: any, expected: any, message?: string): void; export function notStrictEqual(actual: any, expected: any, message?: string): void; + export function deepStrictEqual(actual: any, expected: any, message?: string): void; + export function notDeepStrictEqual(actual: any, expected: any, message?: string): void; export var throws: { (block: Function, message?: string): void; (block: Function, error: Function, message?: string): void; @@ -1825,29 +3401,28 @@ declare module "tty" { export interface ReadStream extends net.Socket { isRaw: boolean; setRawMode(mode: boolean): void; + isTTY: boolean; } export interface WriteStream extends net.Socket { columns: number; rows: number; + isTTY: boolean; } } declare module "domain" { import * as events from "events"; - export class Domain extends events.EventEmitter { + export class Domain extends events.EventEmitter implements NodeJS.Domain { run(fn: Function): void; add(emitter: events.EventEmitter): void; remove(emitter: events.EventEmitter): void; bind(cb: (err: Error, data: any) => any): any; intercept(cb: (data: any) => any): any; dispose(): void; - - addListener(event: string, listener: Function): Domain; - on(event: string, listener: Function): Domain; - once(event: string, listener: Function): Domain; - removeListener(event: string, listener: Function): Domain; - removeAllListeners(event?: string): Domain; + members: any[]; + enter(): void; + exit(): void; } export function create(): Domain; @@ -2065,9 +3640,32 @@ declare module "constants" { export var S_IFREG: number; export var S_IFDIR: number; export var S_IFCHR: number; + export var S_IFBLK: number; + export var S_IFIFO: number; + export var S_IFSOCK: number; + export var S_IRWXU: number; + export var S_IRUSR: number; + export var S_IWUSR: number; + export var S_IXUSR: number; + export var S_IRWXG: number; + export var S_IRGRP: number; + export var S_IWGRP: number; + export var S_IXGRP: number; + export var S_IRWXO: number; + export var S_IROTH: number; + export var S_IWOTH: number; + export var S_IXOTH: number; export var S_IFLNK: number; export var O_CREAT: number; export var O_EXCL: number; + export var O_NOCTTY: number; + export var O_DIRECTORY: number; + export var O_NOATIME: number; + export var O_NOFOLLOW: number; + export var O_SYNC: number; + export var O_SYMLINK: number; + export var O_DIRECT: number; + export var O_NONBLOCK: number; export var O_TRUNC: number; export var O_APPEND: number; export var F_OK: number; @@ -2075,4 +3673,63 @@ declare module "constants" { export var W_OK: number; export var X_OK: number; export var UV_UDP_REUSEADDR: number; + export var SIGQUIT: number; + export var SIGTRAP: number; + export var SIGIOT: number; + export var SIGBUS: number; + export var SIGUSR1: number; + export var SIGUSR2: number; + export var SIGPIPE: number; + export var SIGALRM: number; + export var SIGCHLD: number; + export var SIGSTKFLT: number; + export var SIGCONT: number; + export var SIGSTOP: number; + export var SIGTSTP: number; + export var SIGTTIN: number; + export var SIGTTOU: number; + export var SIGURG: number; + export var SIGXCPU: number; + export var SIGXFSZ: number; + export var SIGVTALRM: number; + export var SIGPROF: number; + export var SIGIO: number; + export var SIGPOLL: number; + export var SIGPWR: number; + export var SIGSYS: number; + export var SIGUNUSED: number; + export var defaultCoreCipherList: string; + export var defaultCipherList: string; + export var ENGINE_METHOD_RSA: number; + export var ALPN_ENABLED: number; +} + +declare module "process" { + export = process; +} + +declare module "v8" { + interface HeapSpaceInfo { + space_name: string; + space_size: number; + space_used_size: number; + space_available_size: number; + physical_space_size: number; + } + export function getHeapStatistics(): { total_heap_size: number, total_heap_size_executable: number, total_physical_size: number, total_avaialble_size: number, used_heap_size: number, heap_size_limit: number }; + export function getHeapSpaceStatistics(): HeapSpaceInfo[]; + export function setFlagsFromString(flags: string): void; +} + +declare module "timers" { + export function setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timer; + export function clearTimeout(timeoutId: NodeJS.Timer): void; + export function setInterval(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timer; + export function clearInterval(intervalId: NodeJS.Timer): void; + export function setImmediate(callback: (...args: any[]) => void, ...args: any[]): any; + export function clearImmediate(immediateId: any): void; +} + +declare module "console" { + export = console; } diff --git a/typings/q/Q.d.ts b/typings/q/Q.d.ts deleted file mode 100644 index 8e69d8b4..00000000 --- a/typings/q/Q.d.ts +++ /dev/null @@ -1,330 +0,0 @@ -// Type definitions for Q -// Project: https://github.com/kriskowal/q -// Definitions by: Barrie Nemetchek , Andrew Gaspar , John Reilly -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -/** - * If value is a Q promise, returns the promise. - * If value is a promise from another library it is coerced into a Q promise (where possible). - */ -declare function Q(promise: Q.IPromise): Promise; -/** - * If value is not a promise, returns a promise that is fulfilled with value. - */ -declare function Q(value: T): Promise; - -declare module Q { - interface IPromise { - then(onFulfill?: (value: T) => U | IPromise, onReject?: (error: any) => U | IPromise): IPromise; - } - - interface Deferred { - promise: Promise; - resolve(value: T): void; - reject(reason: any): void; - notify(value: any): void; - makeNodeResolver(): (reason: any, value: T) => void; - } - - interface Promise { - /** - * Like a finally clause, allows you to observe either the fulfillment or rejection of a promise, but to do so without modifying the final value. This is useful for collecting resources regardless of whether a job succeeded, like closing a database connection, shutting a server down, or deleting an unneeded key from an object. - - * finally returns a promise, which will become resolved with the same fulfillment value or rejection reason as promise. However, if callback returns a promise, the resolution of the returned promise will be delayed until the promise returned from callback is finished. - */ - fin(finallyCallback: () => any): Promise; - /** - * Like a finally clause, allows you to observe either the fulfillment or rejection of a promise, but to do so without modifying the final value. This is useful for collecting resources regardless of whether a job succeeded, like closing a database connection, shutting a server down, or deleting an unneeded key from an object. - - * finally returns a promise, which will become resolved with the same fulfillment value or rejection reason as promise. However, if callback returns a promise, the resolution of the returned promise will be delayed until the promise returned from callback is finished. - */ - finally(finallyCallback: () => any): Promise; - - /** - * The then method from the Promises/A+ specification, with an additional progress handler. - */ - then(onFulfill?: (value: T) => U | IPromise, onReject?: (error: any) => U | IPromise, onProgress?: Function): Promise; - - /** - * Like then, but "spreads" the array into a variadic fulfillment handler. If any of the promises in the array are rejected, instead calls onRejected with the first rejected promise's rejection reason. - * - * This is especially useful in conjunction with all - */ - spread(onFulfill: (...args: any[]) => IPromise | U, onReject?: (reason: any) => IPromise | U): Promise; - - fail(onRejected: (reason: any) => U | IPromise): Promise; - - /** - * A sugar method, equivalent to promise.then(undefined, onRejected). - */ - catch(onRejected: (reason: any) => U | IPromise): Promise; - - /** - * A sugar method, equivalent to promise.then(undefined, undefined, onProgress). - */ - progress(onProgress: (progress: any) => any): Promise; - - /** - * Much like then, but with different behavior around unhandled rejection. If there is an unhandled rejection, either because promise is rejected and no onRejected callback was provided, or because onFulfilled or onRejected threw an error or returned a rejected promise, the resulting rejection reason is thrown as an exception in a future turn of the event loop. - * - * This method should be used to terminate chains of promises that will not be passed elsewhere. Since exceptions thrown in then callbacks are consumed and transformed into rejections, exceptions at the end of the chain are easy to accidentally, silently ignore. By arranging for the exception to be thrown in a future turn of the event loop, so that it won't be caught, it causes an onerror event on the browser window, or an uncaughtException event on Node.js's process object. - * - * Exceptions thrown by done will have long stack traces, if Q.longStackSupport is set to true. If Q.onerror is set, exceptions will be delivered there instead of thrown in a future turn. - * - * The Golden Rule of done vs. then usage is: either return your promise to someone else, or if the chain ends with you, call done to terminate it. - */ - done(onFulfilled?: (value: T) => any, onRejected?: (reason: any) => any, onProgress?: (progress: any) => any): void; - - /** - * If callback is a function, assumes it's a Node.js-style callback, and calls it as either callback(rejectionReason) when/if promise becomes rejected, or as callback(null, fulfillmentValue) when/if promise becomes fulfilled. If callback is not a function, simply returns promise. - */ - nodeify(callback: (reason: any, value: any) => void): Promise; - - /** - * Returns a promise to get the named property of an object. Essentially equivalent to - * - * promise.then(function (o) { - * return o[propertyName]; - * }); - */ - get(propertyName: String): Promise; - set(propertyName: String, value: any): Promise; - delete(propertyName: String): Promise; - /** - * Returns a promise for the result of calling the named method of an object with the given array of arguments. The object itself is this in the function, just like a synchronous method call. Essentially equivalent to - * - * promise.then(function (o) { - * return o[methodName].apply(o, args); - * }); - */ - post(methodName: String, args: any[]): Promise; - /** - * Returns a promise for the result of calling the named method of an object with the given variadic arguments. The object itself is this in the function, just like a synchronous method call. - */ - invoke(methodName: String, ...args: any[]): Promise; - fapply(args: any[]): Promise; - fcall(...args: any[]): Promise; - - /** - * Returns a promise for an array of the property names of an object. Essentially equivalent to - * - * promise.then(function (o) { - * return Object.keys(o); - * }); - */ - keys(): Promise; - - /** - * A sugar method, equivalent to promise.then(function () { return value; }). - */ - thenResolve(value: U): Promise; - /** - * A sugar method, equivalent to promise.then(function () { throw reason; }). - */ - thenReject(reason: any): Promise; - - /** - * Attaches a handler that will observe the value of the promise when it becomes fulfilled, returning a promise for that same value, perhaps deferred but not replaced by the promise returned by the onFulfilled handler. - */ - tap(onFulfilled: (value: T) => any): Promise; - - timeout(ms: number, message?: string): Promise; - /** - * Returns a promise that will have the same result as promise, but will only be fulfilled or rejected after at least ms milliseconds have passed. - */ - delay(ms: number): Promise; - - /** - * Returns whether a given promise is in the fulfilled state. When the static version is used on non-promises, the result is always true. - */ - isFulfilled(): boolean; - /** - * Returns whether a given promise is in the rejected state. When the static version is used on non-promises, the result is always false. - */ - isRejected(): boolean; - /** - * Returns whether a given promise is in the pending state. When the static version is used on non-promises, the result is always false. - */ - isPending(): boolean; - - valueOf(): any; - - /** - * Returns a "state snapshot" object, which will be in one of three forms: - * - * - { state: "pending" } - * - { state: "fulfilled", value: } - * - { state: "rejected", reason: } - */ - inspect(): PromiseState; - } - - interface PromiseState { - /** - * "fulfilled", "rejected", "pending" - */ - state: string; - value?: T; - reason?: any; - } - - // If no value provided, returned promise will be of void type - export function when(): Promise; - - // if no fulfill, reject, or progress provided, returned promise will be of same type - export function when(value: T | IPromise): Promise; - - // If a non-promise value is provided, it will not reject or progress - export function when(value: T | IPromise, onFulfilled: (val: T) => U | IPromise, onRejected?: (reason: any) => U | IPromise, onProgress?: (progress: any) => any): Promise; - - /** - * Currently "impossible" (and I use the term loosely) to implement due to TypeScript limitations as it is now. - * See: https://github.com/Microsoft/TypeScript/issues/1784 for discussion on it. - */ - // export function try(method: Function, ...args: any[]): Promise; - - export function fbind(method: (...args: any[]) => T | IPromise, ...args: any[]): (...args: any[]) => Promise; - - export function fcall(method: (...args: any[]) => T, ...args: any[]): Promise; - - export function send(obj: any, functionName: string, ...args: any[]): Promise; - export function invoke(obj: any, functionName: string, ...args: any[]): Promise; - export function mcall(obj: any, functionName: string, ...args: any[]): Promise; - - export function denodeify(nodeFunction: Function, ...args: any[]): (...args: any[]) => Promise; - export function nbind(nodeFunction: Function, thisArg: any, ...args: any[]): (...args: any[]) => Promise; - export function nfbind(nodeFunction: Function, ...args: any[]): (...args: any[]) => Promise; - export function nfcall(nodeFunction: Function, ...args: any[]): Promise; - export function nfapply(nodeFunction: Function, args: any[]): Promise; - - export function ninvoke(nodeModule: any, functionName: string, ...args: any[]): Promise; - export function npost(nodeModule: any, functionName: string, args: any[]): Promise; - export function nsend(nodeModule: any, functionName: string, ...args: any[]): Promise; - export function nmcall(nodeModule: any, functionName: string, ...args: any[]): Promise; - - /** - * Returns a promise that is fulfilled with an array containing the fulfillment value of each promise, or is rejected with the same rejection reason as the first promise to be rejected. - */ - export function all(promises: IPromise[]): Promise; - - /** - * Returns a promise that is fulfilled with an array of promise state snapshots, but only after all the original promises have settled, i.e. become either fulfilled or rejected. - */ - export function allSettled(promises: IPromise[]): Promise[]>; - - export function allResolved(promises: IPromise[]): Promise[]>; - - /** - * Like then, but "spreads" the array into a variadic fulfillment handler. If any of the promises in the array are rejected, instead calls onRejected with the first rejected promise's rejection reason. - * This is especially useful in conjunction with all. - */ - export function spread(promises: IPromise[], onFulfilled: (...args: T[]) => U | IPromise, onRejected?: (reason: any) => U | IPromise): Promise; - - /** - * Returns a promise that will have the same result as promise, except that if promise is not fulfilled or rejected before ms milliseconds, the returned promise will be rejected with an Error with the given message. If message is not supplied, the message will be "Timed out after " + ms + " ms". - */ - export function timeout(promise: Promise, ms: number, message?: string): Promise; - - /** - * Returns a promise that will have the same result as promise, but will only be fulfilled or rejected after at least ms milliseconds have passed. - */ - export function delay(promise: Promise, ms: number): Promise; - /** - * Returns a promise that will have the same result as promise, but will only be fulfilled or rejected after at least ms milliseconds have passed. - */ - export function delay(value: T, ms: number): Promise; - /** - * Returns a promise that will be fulfilled with undefined after at least ms milliseconds have passed. - */ - export function delay(ms: number): Promise ; - /** - * Returns whether a given promise is in the fulfilled state. When the static version is used on non-promises, the result is always true. - */ - export function isFulfilled(promise: Promise): boolean; - /** - * Returns whether a given promise is in the rejected state. When the static version is used on non-promises, the result is always false. - */ - export function isRejected(promise: Promise): boolean; - /** - * Returns whether a given promise is in the pending state. When the static version is used on non-promises, the result is always false. - */ - export function isPending(promise: Promise): boolean; - - /** - * Returns a "deferred" object with a: - * promise property - * resolve(value) method - * reject(reason) method - * notify(value) method - * makeNodeResolver() method - */ - export function defer(): Deferred; - - /** - * Returns a promise that is rejected with reason. - */ - export function reject(reason?: any): Promise; - - export function Promise(resolver: (resolve: (val: T | IPromise) => void , reject: (reason: any) => void , notify: (progress: any) => void ) => void ): Promise; - - /** - * Creates a new version of func that accepts any combination of promise and non-promise values, converting them to their fulfillment values before calling the original func. The returned version also always returns a promise: if func does a return or throw, then Q.promised(func) will return fulfilled or rejected promise, respectively. - * - * This can be useful for creating functions that accept either promises or non-promise values, and for ensuring that the function always returns a promise even in the face of unintentional thrown exceptions. - */ - export function promised(callback: (...args: any[]) => T): (...args: any[]) => Promise; - - /** - * Returns whether the given value is a Q promise. - */ - export function isPromise(object: any): boolean; - /** - * Returns whether the given value is a promise (i.e. it's an object with a then function). - */ - export function isPromiseAlike(object: any): boolean; - /** - * Returns whether a given promise is in the pending state. When the static version is used on non-promises, the result is always false. - */ - export function isPending(object: any): boolean; - - /** - * This is an experimental tool for converting a generator function into a deferred function. This has the potential of reducing nested callbacks in engines that support yield. - */ - export function async(generatorFunction: any): (...args: any[]) => Promise; - export function nextTick(callback: Function): void; - - /** - * A settable property that will intercept any uncaught errors that would otherwise be thrown in the next tick of the event loop, usually as a result of done. Can be useful for getting the full stack trace of an error in browsers, which is not usually possible with window.onerror. - */ - export var onerror: (reason: any) => void; - /** - * A settable property that lets you turn on long stack trace support. If turned on, "stack jumps" will be tracked across asynchronous promise operations, so that if an uncaught error is thrown by done or a rejection reason's stack property is inspected in a rejection callback, a long stack trace is produced. - */ - export var longStackSupport: boolean; - - /** - * Calling resolve with a pending promise causes promise to wait on the passed promise, becoming fulfilled with its fulfillment value or rejected with its rejection reason (or staying pending forever, if the passed promise does). - * Calling resolve with a rejected promise causes promise to be rejected with the passed promise's rejection reason. - * Calling resolve with a fulfilled promise causes promise to be fulfilled with the passed promise's fulfillment value. - * Calling resolve with a non-promise value causes promise to be fulfilled with that value. - */ - export function resolve(object: IPromise): Promise; - /** - * Calling resolve with a pending promise causes promise to wait on the passed promise, becoming fulfilled with its fulfillment value or rejected with its rejection reason (or staying pending forever, if the passed promise does). - * Calling resolve with a rejected promise causes promise to be rejected with the passed promise's rejection reason. - * Calling resolve with a fulfilled promise causes promise to be fulfilled with the passed promise's fulfillment value. - * Calling resolve with a non-promise value causes promise to be fulfilled with that value. - */ - export function resolve(object: T): Promise; - - /** - * Resets the global "Q" variable to the value it has before Q was loaded. - * This will either be undefined if there was no version or the version of Q which was already loaded before. - * @returns { The last version of Q. } - */ - export function noConflict(): typeof Q; -} - -declare module "q" { - export = Q; -} \ No newline at end of file diff --git a/typings/read/read.d.ts b/typings/read/read.d.ts deleted file mode 100644 index 9ab7f15d..00000000 --- a/typings/read/read.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -// Type definitions for read -// Project: https://github.com/isaacs/read -// Definitions by: Tim JK -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -declare module 'read' { - function Read(options: Read.Options, callback: (error: any, result: string, isDefault: boolean) => any): void; - - module Read { - interface Options { - prompt?: string; - silent?: boolean; - replace?: string; - timeout?: number; - default?: string; - edit?: boolean; - terminal?: boolean; - input?: any; - output?: any; - } - } - - export = Read; -} diff --git a/typings/request/request.d.ts b/typings/request/request.d.ts deleted file mode 100644 index 78850cbb..00000000 --- a/typings/request/request.d.ts +++ /dev/null @@ -1,182 +0,0 @@ -// Type definitions for request -// Project: https://github.com/mikeal/request -// Definitions by: Carlos Ballesteros Velasco , bonnici , Bart van der Schoor -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -// Imported from: https://github.com/soywiz/typescript-node-definitions/d.ts - - - - -declare module 'request' { - import stream = require('stream'); - import http = require('http'); - import FormData = require('form-data'); - - export = RequestAPI; - - function RequestAPI(uri: string, options?: RequestAPI.Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): RequestAPI.Request; - function RequestAPI(uri: string, callback?: (error: any, response: http.IncomingMessage, body: any) => void): RequestAPI.Request; - function RequestAPI(options: RequestAPI.Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): RequestAPI.Request; - - module RequestAPI { - export function defaults(options: Options): typeof RequestAPI; - - export function request(uri: string, options?: Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; - export function request(uri: string, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; - export function request(options?: Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; - - export function get(uri: string, options?: Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; - export function get(uri: string, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; - export function get(options: Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; - - export function post(uri: string, options?: Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; - export function post(uri: string, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; - export function post(options: Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; - - export function put(uri: string, options?: Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; - export function put(uri: string, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; - export function put(options: Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; - - export function head(uri: string, options?: Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; - export function head(uri: string, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; - export function head(options: Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; - - export function patch(uri: string, options?: Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; - export function patch(uri: string, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; - export function patch(options: Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; - - export function del(uri: string, options?: Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; - export function del(uri: string, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; - export function del(options: Options, callback?: (error: any, response: http.IncomingMessage, body: any) => void): Request; - - export function forever(agentOptions: any, optionsArg: any): Request; - export function jar(): CookieJar; - export function cookie(str: string): Cookie; - - export var initParams: any; - - export interface Options { - url?: string; - uri?: string; - callback?: (error: any, response: http.IncomingMessage, body: any) => void; - jar?: any; // CookieJar - form?: any; // Object or string - auth?: AuthOptions; - oauth?: OAuthOptions; - aws?: AWSOptions; - hawk ?: HawkOptions; - qs?: Object; - json?: any; - multipart?: RequestPart[]; - agentOptions?: any; - agentClass?: any; - forever?: any; - host?: string; - port?: number; - method?: string; - headers?: Headers; - body?: any; - followRedirect?: boolean; - followAllRedirects?: boolean; - maxRedirects?: number; - encoding?: string; - pool?: any; - timeout?: number; - proxy?: any; - strictSSL?: boolean; - } - - export interface RequestPart { - headers?: Headers; - body: any; - } - - export interface Request extends stream.Stream { - readable: boolean; - writable: boolean; - - getAgent(): http.Agent; - //start(): void; - //abort(): void; - pipeDest(dest: any): void; - setHeader(name: string, value: string, clobber?: boolean): Request; - setHeaders(headers: Headers): Request; - qs(q: Object, clobber?: boolean): Request; - form(): FormData.FormData; - form(form: any): Request; - multipart(multipart: RequestPart[]): Request; - json(val: any): Request; - aws(opts: AWSOptions, now?: boolean): Request; - auth(username: string, password: string, sendInmediately?: boolean, bearer?: string): Request; - oauth(oauth: OAuthOptions): Request; - jar(jar: CookieJar): Request; - - on(event: string, listener: Function): Request; - - write(buffer: Buffer, cb?: Function): boolean; - write(str: string, cb?: Function): boolean; - write(str: string, encoding: string, cb?: Function): boolean; - write(str: string, encoding?: string, fd?: string): boolean; - end(): void; - end(chunk: Buffer, cb?: Function): void; - end(chunk: string, cb?: Function): void; - end(chunk: string, encoding: string, cb?: Function): void; - pause(): void; - resume(): void; - abort(): void; - destroy(): void; - toJSON(): string; - } - - export interface Headers { - [key: string]: any; - } - - export interface AuthOptions { - user?: string; - username?: string; - pass?: string; - password?: string; - sendImmediately?: boolean; - } - - export interface OAuthOptions { - callback?: string; - consumer_key?: string; - consumer_secret?: string; - token?: string; - token_secret?: string; - verifier?: string; - } - - export interface HawkOptions { - credentials: any; - } - - export interface AWSOptions { - secret: string; - bucket?: string; - } - - export interface CookieJar { - add(cookie: Cookie): void; - get(req: Request): Cookie; - cookieString(req: Request): string; - } - - export interface CookieValue { - name: string; - value: any; - httpOnly: boolean; - } - - export interface Cookie extends Array { - constructor(name: string, req: Request): void; - str: string; - expires: Date; - path: string; - toString(): string; - } - } -} diff --git a/typings/shelljs/shelljs.d.ts b/typings/shelljs/shelljs.d.ts index c4608cae..5d33833e 100644 --- a/typings/shelljs/shelljs.d.ts +++ b/typings/shelljs/shelljs.d.ts @@ -1,7 +1,7 @@ // Type definitions for ShellJS v0.3.0 // Project: http://shelljs.org // Definitions by: Niklas Mollenhauer -// Definitions: https://github.com/borisyankov/DefinitelyTyped +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -128,7 +128,7 @@ declare module "shelljs" * @param {string} dest The destination. */ export function mv(source: string, dest: string): void; - + /** * Moves files. The wildcard * is accepted. * @param {string[]} source The source. @@ -436,7 +436,7 @@ declare module "shelljs" * Object containing environment variables (both getter and setter). Shortcut to process.env. */ export var env: { [key: string]: string }; - + /** * Executes the given command synchronously. * @param {string} command The command to execute. @@ -465,7 +465,7 @@ declare module "shelljs" export function exec(command: string, callback: ExecCallback): child.ChildProcess; export interface ExecCallback { - (code: number, output: string): any; + (code: number, output: string, error?: string): any; } export interface ExecOptions { @@ -511,6 +511,27 @@ declare module "shelljs" */ export function error(): string; + + + export function touch(...files: string[]): void; + export function touch(files: string[]): void; + + type TouchOptionsLiteral = "-a" | "-c" | "-m" | "-d" | "-r"; + + export function touch(options: TouchOptionsLiteral, ...files: string[]): void; + export function touch(options: TouchOptionsLiteral, files: string[]): void; + + /** + * Update the access and modification times of each FILE to the current time. A FILE argument that does not exist is created empty, unless -c is supplied + */ + type touchOptionsArray = { + '-d'?: string; + '-r'?: string; + }; + + export function touch(options: touchOptionsArray, ...files: string[]): void; + export function touch(options: touchOptionsArray, files: string[]): void; + // Configuration interface ShellConfig diff --git a/typings/validator/validator.d.ts b/typings/validator/validator.d.ts index 05a391fa..02e8eba7 100644 --- a/typings/validator/validator.d.ts +++ b/typings/validator/validator.d.ts @@ -1,190 +1,315 @@ -// Type definitions for validator.js v3.22.1 +// Type definitions for validator.js v5.7.0 // Project: https://github.com/chriso/validator.js -// Definitions by: tgfjt -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -// options for #isURL -interface IURLoptions { - protocols?: string[] - require_tld?: boolean - require_protocol?: boolean - allow_underscores?: boolean -} +// Definitions by: tgfjt , Ilya Mochalov , Ayman Nedjmeddine , Louy Alakkad +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// options for isFQDN -interface IFQDNoptions { - require_tld?: boolean - allow_underscores?: boolean -} +declare namespace ValidatorJS { + type AlphaLocale = "ar" | "ar-AE" | "ar-BH" | "ar-DZ" | "ar-EG" | "ar-IQ" | "ar-JO" | "ar-KW" | "ar-LB" | "ar-LY" | "ar-MA" | "ar-QA" | "ar-QM" | "ar-SA" | "ar-SD" | "ar-SY" | "ar-TN" | "ar-YE" | "cs-CZ" | "de-DE" | "en-AU" | "en-GB" | "en-HK" | "en-IN" | "en-NZ" | "en-US" | "en-ZA" | "en-ZM" | "es-ES" | "fr-FR" | "hu-HU" | "nl-NL" | "pl-PL" | "pt-BR" | "pt-PT" | "ru-RU" | "sr-RS" | "sr-RS@latin" | "tr-TR"; + type AlphanumericLocale = "ar" | "ar-AE" | "ar-BH" | "ar-DZ" | "ar-EG" | "ar-IQ" | "ar-JO" | "ar-KW" | "ar-LB" | "ar-LY" | "ar-MA" | "ar-QA" | "ar-QM" | "ar-SA" | "ar-SD" | "ar-SY" | "ar-TN" | "ar-YE" | "cs-CZ" | "de-DE" | "en-AU" | "en-GB" | "en-HK" | "en-IN" | "en-NZ" | "en-US" | "en-ZA" | "en-ZM" | "es-ES" | "fr-FR" | "fr-BE" | "hu-HU" | "nl-BE" | "nl-NL" | "pl-PL" | "pt-BR" | "pt-PT" | "ru-RU" | "sr-RS" | "sr-RS@latin" | "tr-TR"; + type MobilePhoneLocale = "ar-DZ" | "ar-SA" | "ar-SY" | "cs-CZ" | "de-DE" | "da-DK" | "el-GR" | "en-AU" | "en-GB" | "en-HK" | "en-IN" | "en-NZ" | "en-US" | "en-CA" | "en-ZA" | "en-ZM" | "es-ES" | "fi-FI" | "fr-FR" | "hu-HU" | "it-IT" | "ja-JP" | "ms-MY" | "nb-NO" | "nn-NO" | "pl-PL" | "pt-PT" | "ru-RU" | "sr-RS" | "tr-TR" | "vi-VN" | "zh-CN" | "zh-TW" + + interface ValidatorStatic { -// options for normalizeEmail -interface IEmailoptions { - lowercase?: boolean -} + // ************** + // * Validators * + // ************** -// callback type for #extend -interface IExtendCallback { - (argv: string): any -} + // check if the string contains the seed. + contains(str: string, elem: any): boolean; -// return function for #extend -interface IExtendFunc { - (argv: string): boolean -} - -interface IValidatorStatic { - // add your own validators - extend(name: string, fn: IExtendCallback): IExtendFunc; + // check if the string matches the comparison. + equals(str: string, comparison: string): boolean; - // check if the string matches the comparison. - equals(str: string, comparison: any): boolean; + // check if the string is a date that's after the specified date (defaults to now). + isAfter(str: string, date?: string): boolean; - // check if the string contains the seed. - contains(str: string, elem: any): boolean; + // check if the string contains only letters (a-zA-Z). Locale is one of ['ar', 'ar-AE', 'ar-BH', 'ar-DZ', 'ar-EG', + // 'ar-IQ', 'ar-JO', 'ar-KW', 'ar-LB', 'ar-LY', 'ar-MA', 'ar-QA', 'ar-QM', 'ar-SA', 'ar-SD', 'ar-SY', 'ar-TN', 'ar-YE', + // 'cs-CZ', 'de-DE', 'en-AU', 'en-GB', 'en-HK', 'en-IN', 'en-NZ', 'en-US', 'en-ZA', 'en-ZM', 'es-ES', 'fr-FR', 'hu-HU', + // 'nl-NL', 'pl-PL', 'pt-BR', 'pt-PT', 'ru-RU', 'sr-RS', 'sr-RS@latin', 'tr-TR']) and defaults to en-US + isAlpha(str: string, locale?: AlphaLocale): boolean; - // check if string matches the pattern. - matches(str: string, pattern: any, modifiers?: string): boolean; + // check if the string contains only letters and numbers. Locale is one of ['ar', 'ar-AE', 'ar-BH', 'ar-DZ', 'ar-EG', + // 'ar-IQ', 'ar-JO', 'ar-KW', 'ar-LB', 'ar-LY', 'ar-MA', 'ar-QA', 'ar-QM', 'ar-SA', 'ar-SD', 'ar-SY', 'ar-TN', 'ar-YE', + // 'cs-CZ', 'de-DE', 'en-AU', 'en-GB', 'en-HK', 'en-IN', 'en-NZ', 'en-US', 'en-ZA', 'en-ZM', 'es-ES', 'fr-FR', 'hu-HU', + // 'nl-NL', 'pl-PL', 'pt-BR', 'pt-PT', 'ru-RU', 'sr-RS', 'sr-RS@latin', 'tr-TR']) and defaults to en-US + isAlphanumeric(str: string, locale?: AlphanumericLocale): boolean; - // check if the string is an email. - isEmail(str: string): boolean; + // check if the string contains ASCII chars only. + isAscii(str: string): boolean; - // check if the string is an URL. - isURL(str: string, options?: IURLoptions): boolean; + // check if a string is base64 encoded. + isBase64(str: string): boolean; - // check if the string is a fully qualified domain name (e.g. domain.com). - isFQDN(str: string, options?: IFQDNoptions): boolean; + // check if the string is a date that's before the specified date. + isBefore(str: string, date?: string): boolean; - // check if the string is an IP (version 4 or 6). - isIP(str: string, version?: number): boolean; + // check if a string is a boolean. + isBoolean(str: string): boolean; - // check if the string contains only letters (a-zA-Z). - isAlpha(str: string): boolean; + // check if the string's length (in bytes) falls in a range. + isByteLength(str: string, options: IsByteLengthOptions): boolean; + isByteLength(str: string, min: number, max?: number): boolean; - // check if the string contains only numbers. - isNumeric(str: string): boolean; + // check if the string is a credit card. + isCreditCard(str: string): boolean; - // check if the string contains only letters and numbers. - isAlphanumeric(str: string): boolean; + // check if the string is a valid currency amount. + isCurrency(str: string, options?: IsCurrencyOptions): boolean; - // check if a string is base64 encoded. - isBase64(str: string): boolean; + // check if the string is a data uri format (https://developer.mozilla.org/en-US/docs/Web/HTTP/data_URIs) + isDataURI(str: string): boolean; - // check if the string is a hexadecimal number. - isHexadecimal(str: string): boolean; + // check if the string is a date. + isDate(str: string): boolean; - // check if the string is a hexadecimal color. - isHexColor(str: string): boolean; + // check if the string represents a decimal number, such as 0.1, .3, 1.1, 1.00003, 4.0, etc. + isDecimal(str: string): boolean; - // check if the string is lowercase. - isLowercase(str: string): boolean; + // check if the string is a number that's divisible by another. + isDivisibleBy(str: string, number: number): boolean; - // check if the string is uppercase. - isUppercase(str: string): boolean; + // check if the string is an email. + isEmail(str: string, options?: IsEmailOptions): boolean; - // check if the string is an integer. - isInt(str: string): boolean; + // check if the string is a fully qualified domain name (e.g. domain.com). + isFQDN(str: string, options?: IsFQDNOptions): boolean; - // check if the string is a float. - isFloat(str: string): boolean; + // check if the string is a float. + isFloat(str: string, options?: IsFloatOptions): boolean; - // check if the string is a number that's divisible by another. - isDivisibleBy(str: string, number: number): boolean; + // check if the string contains any full-width chars. + isFullWidth(str: string): boolean; - // check if the string is null. - isNull(str: string): boolean; + // check if the string contains any half-width chars. + isHalfWidth(str: string): boolean; - // check if the string's length falls in a range. Note: this function takes into account surrogate pairs. - isLength(str: string, min: number, max?: number): boolean; + // check if the string is a hexadecimal color. + isHexColor(str: string): boolean; - // check if the string's length (in bytes) falls in a range. - isByteLength(str: string, min: number, max?: number): boolean; + // check if the string is a hexadecimal number. + isHexadecimal(str: string): boolean; - // check if the string is a UUID (version 3, 4 or 5). - isUUID(str: string, version?: number): boolean; + // check if the string is an IP (version 4 or 6). + isIP(str: string, version?: number): boolean; - // check if the string is a date. - isDate(str: string): boolean; + // check if the string is an ISBN (version 10 or 13). + isISBN(str: string, version?: number): boolean; - // check if the string is a date that's after the specified date (defaults to now). - isAfter(str: string, date?: Date): boolean; + // check if the string is an ISIN (https://en.wikipedia.org/wiki/International_Securities_Identification_Number) + // (stock/security identifier). + isISIN(str: string): boolean; - // check if the string is a date that's before the specified date. - isBefore(str: string, date?: Date): boolean; + // check if the string is a valid ISO 8601 (https://en.wikipedia.org/wiki/ISO_8601) date. + isISO8601(str: string): boolean; - // check if the string is in a array of allowed values. - isIn(str: string, values: any[]): boolean; + // check if the string is in a array of allowed values. + isIn(str: string, values: any[]): boolean; - // check if the string is a credit card. - isCreditCard(str: string): boolean; + // check if the string is an integer. + isInt(str: string, options?: IsIntOptions): boolean; - // check if the string is an ISBN (version 10 or 13). - isISBN(str: string, version?: number): boolean; + // check if the string is valid JSON (note: uses JSON.parse). + isJSON(str: string): boolean; - // check if the string is valid JSON (note: uses JSON.parse). - isJSON(str: string): boolean; + // check if the string's length falls in a range. + // Note: this function takes into account surrogate pairs. + isLength(str: string, options: IsLengthOptions): boolean; + isLength(str: string, min: number, max?: number): boolean; - // check if the string contains one or more multibyte chars. - isMultibyte(str: string): boolean; + // check if the string is lowercase. + isLowercase(str: string): boolean; - // check if the string contains ASCII chars only. - isAscii(str: string): boolean; + // check if the string is a MAC address. + isMACAddress(str: string): boolean; - // check if the string contains any full-width chars. - isFullWidth(str: string): boolean; + // check if the string is a MD5 hash. + isMD5(str: string): boolean; - // check if the string contains any half-width chars. - isHalfWidth(str: string): boolean; + // check if the string is a mobile phone number, (locale is one of + // ['ar-DZ', 'ar-SA', 'ar-SY', 'cs-CZ', 'de-DE', 'da-DK', 'el-GR', 'en-AU', 'en-GB', 'en-HK', + // 'en-IN', 'en-NZ', 'en-US', 'en-CA', 'en-ZA', 'en-ZM', 'es-ES', 'fi-FI', 'fr-FR', 'hu-HU', + // 'it-IT', 'ja-JP', 'ms-MY', 'nb-NO', 'nn-NO', 'pl-PL', 'pt-PT', 'ru-RU', 'sr-RS', 'tr-TR', + // 'vi-VN', 'zh-CN', 'zh-TW']). + isMobilePhone(str: string, locale: MobilePhoneLocale): boolean; - // check if the string contains a mixture of full and half-width chars. - isVariableWidth(str: string): boolean; + // check if the string is a valid hex-encoded representation of a MongoDB ObjectId + // (http://docs.mongodb.org/manual/reference/object-id/). + isMongoId(str: string): boolean; - // check if the string contains any surrogate pairs chars. - isSurrogatePair(str: string): boolean; + // check if the string contains one or more multibyte chars. + isMultibyte(str: string): boolean; - // check if the string is a valid hex-encoded representation of a MongoDB ObjectId. - isMongoId(str: string): boolean; + // check if the string is null. + isNull(str: string): boolean; - // convert the input to a string. - toString(input: any): string; + // check if the string contains only numbers. + isNumeric(str: string): boolean; - // convert the input to a date, or null if the input is not a date. - toDate(input: any): any; // Date or null + // check if the string contains any surrogate pairs chars. + isSurrogatePair(str: string): boolean; - // convert the input to a float, or NaN if the input is not a float. - toFloat(input:any): number; // number or NaN + // check if the string is an URL. + isURL(str: string, options?: IsURLOptions): boolean; - // convert the input to an integer, or NaN if the input is not an integer. - toInt(input:any, radix?: number): number; // number or NaN + // check if the string is a UUID. Must be one of ['3', '4', '5', 'all'], default is all. + isUUID(str: string, version?: string | number): boolean; - // convert the input to a boolean. - toBoolean(input:any, strict?: boolean): boolean; + // check if the string is uppercase. + isUppercase(str: string): boolean; - // trim characters (whitespace by default) from both sides of the input. - trim(input: any, chars?: string): string; + // check if the string contains a mixture of full and half-width chars. + isVariableWidth(str: string): boolean; - // trim characters from the left-side of the input. - ltrim(input: any, chars?: string): string; + // checks characters if they appear in the whitelist. + isWhitelisted(str: string, chars: string | string[]): boolean; - // trim characters from the right-side of the input. - rtrim(input: any, chars?: string): string; + // check if string matches the pattern. + matches(str: string, pattern: RegExp | string, modifiers?: string): boolean; - // replace <, >, &, ' and " with HTML entities. - escape(input: string): string; + // ************** + // * Sanitizers * + // ************** - // remove characters with a numerical value < 32 and 127 - stripLow(input: string, keep_new_lines?: boolean): string; + // remove characters that appear in the blacklist. The characters are used in a RegExp and so you will need + // to escape some chars, e.g. blacklist(input, '\\[\\]'). + blacklist(input: string, chars: string): string; - // remove characters that do not appear in the whitelist. - whitelist(input: string, chars: string): string; + // replace <, >, &, ', " and / with HTML entities. + escape(input: string): string; - // remove characters that appear in the blacklist. - blacklist(input: string, chars: string): string; + // replaces HTML encoded entities with <, >, &, ', " and /. + unescape(input: string): string; - // canonicalize an email address. - normalizeEmail(email: string, options?: IEmailoptions): string; + // trim characters from the left-side of the input. + ltrim(input: string, chars?: string): string; + + // canonicalize an email address. + normalizeEmail(email: string, options?: NormalizeEmailOptions): string; + + // trim characters from the right-side of the input. + rtrim(input: string, chars?: string): string; + + // remove characters with a numerical value < 32 and 127, mostly control characters. If keep_new_lines is true, + // newline characters are preserved (\n and \r, hex 0xA and 0xD). Unicode-safe in JavaScript. + stripLow(input: string, keep_new_lines?: boolean): string; + + // convert the input to a boolean. Everything except for '0', 'false' and '' returns true. In strict mode only '1' + // and 'true' return true. + toBoolean(input: string, strict?: boolean): boolean; + + // convert the input to a date, or null if the input is not a date. + toDate(input: string): Date; // Date or null + + // convert the input to a float, or NaN if the input is not a float. + toFloat(input: string): number; // number or NaN + + // convert the input to an integer, or NaN if the input is not an integer. + toInt(input: string, radix?: number): number; // number or NaN + + // trim characters (whitespace by default) from both sides of the input. + trim(input: string, chars?: string): string; + + // remove characters that do not appear in the whitelist. The characters are used in a RegExp and so you will + // need to escape some chars, e.g. whitelist(input, '\\[\\]'). + whitelist(input: string, chars: string): string; + + toString(input: any | any[]): string; + + version: string; + + // ************** + // * Extensions * + // ************** + + // add your own validators. + // Note: that the first argument will be automatically coerced to a string. + extend(name: string, fn: T): void; + } + + // options for IsByteLength + interface IsByteLengthOptions { + min?: number; + max?: number; + } + + // options for IsCurrency + interface IsCurrencyOptions { + symbol?: string; + require_symbol?: boolean; + allow_space_after_symbol?: boolean; + symbol_after_digits?: boolean; + allow_negatives?: boolean; + parens_for_negatives?: boolean; + negative_sign_before_digits?: boolean; + negative_sign_after_digits?: boolean; + allow_negative_sign_placeholder?: boolean; + thousands_separator?: string; + decimal_separator?: string; + allow_space_after_digits?: boolean; + } + + // options for isEmail + interface IsEmailOptions { + allow_display_name?: boolean; + allow_utf8_local_part?: boolean; + require_tld?: boolean; + } + + // options for isFQDN + interface IsFQDNOptions { + require_tld?: boolean; + allow_underscores?: boolean; + allow_trailing_dot?: boolean; + } + + // options for IsFloat + interface IsFloatOptions { + min?: number; + max?: number; + } + + // options for IsInt + interface IsIntOptions { + min?: number; + max?: number; + } + + // options for IsLength + interface IsLengthOptions { + min?: number; + max?: number; + } + + // options for isURL + interface IsURLOptions { + protocols?: string[]; + require_tld?: boolean; + require_protocol?: boolean; + require_host: boolean; + require_valid_protocol?: boolean; + allow_underscores?: boolean; + host_whitelist?: (string | RegExp)[]; + host_blacklist?: (string | RegExp)[]; + allow_trailing_dot?: boolean; + allow_protocol_relative_urls?: boolean; + } + + // options for normalizeEmail + interface NormalizeEmailOptions { + lowercase?: boolean; + remove_dots?: boolean; + remove_extension?: boolean; + } } declare module "validator" { - var validator: IValidatorStatic; + const validator: ValidatorJS.ValidatorStatic; export = validator; } + +// deprecated interfaces for backward compatibility, please use ValidatorJS.* instead the ones +interface IValidatorStatic extends ValidatorJS.ValidatorStatic { } +interface IURLoptions extends ValidatorJS.IsURLOptions { } +interface IFQDNoptions extends ValidatorJS.IsFQDNOptions { } +interface IEmailoptions extends ValidatorJS.NormalizeEmailOptions { } diff --git a/typings/vso-node-api/vso-node-api.d.ts b/typings/vso-node-api/vso-node-api.d.ts deleted file mode 100644 index 9dc50cd5..00000000 --- a/typings/vso-node-api/vso-node-api.d.ts +++ /dev/null @@ -1,18339 +0,0 @@ - - -declare module 'vso-node-api/Serialization' { - /** - * Metadata for deserializing an enum field on a contract/type - */ - export interface ContractEnumMetadata { - enumValues?: { - [name: string]: number; - }; - } - export interface SerializationData { - requestTypeMetadata?: ContractMetadata; - responseTypeMetadata?: ContractMetadata; - responseIsCollection: boolean; - } - /** - * Metadata for deserializing a particular field on a contract/type - */ - export interface ContractFieldMetadata { - isArray?: boolean; - isDate?: boolean; - enumType?: ContractEnumMetadata; - typeInfo?: ContractMetadata; - isDictionary?: boolean; - dictionaryKeyIsDate?: boolean; - dictionaryValueIsDate?: boolean; - dictionaryKeyEnumType?: ContractEnumMetadata; - dictionaryValueEnumType?: ContractEnumMetadata; - dictionaryValueTypeInfo?: ContractMetadata; - dictionaryValueFieldInfo?: ContractFieldMetadata; - } - /** - * Metadata required for deserializing a given type - */ - export interface ContractMetadata { - fields?: { - [fieldName: string]: ContractFieldMetadata; - }; - } - export interface IWebApiArrayResult { - count: number; - value: any[]; - } - /** - * Module for handling serialization and deserialization of data contracts - * (contracts sent from the server using the VSO default REST api serialization settings) - */ - export module ContractSerializer { - /** - * Process a contract in its raw form (e.g. date fields are Dates, and Enums are numbers) and - * return a pure JSON object that can be posted to REST endpoint. - * - * @param data The object to serialize - * @param contractMetadata The type info/metadata for the contract type being serialized - * @param preserveOriginal If true, don't modify the original object. False modifies the original object (the return value points to the data argument). - */ - function serialize(data: any, contractMetadata: ContractMetadata, preserveOriginal?: boolean): any; - /** - * Process a pure JSON object (e.g. that came from a REST call) and transform it into a JS object - * where date strings are converted to Date objects and enum values are converted from strings into - * their numerical value. - * - * @param data The object to deserialize - * @param contractMetadata The type info/metadata for the contract type being deserialize - * @param preserveOriginal If true, don't modify the original object. False modifies the original object (the return value points to the data argument). - * @param unwrapWrappedCollections If true check for wrapped arrays (REST apis will not return arrays directly as the root result but will instead wrap them in a { values: [], count: 0 } object. - */ - function deserialize(data: any, contractMetadata: ContractMetadata, preserveOriginal?: boolean, unwrapWrappedCollections?: boolean): any; - } - -} -declare module 'vso-node-api/interfaces/common/VsoBaseInterfaces' { - import Serialization = require('vso-node-api/Serialization'); - /** - * Information about the location of a REST API resource - */ - export interface ApiResourceLocation { - /** - * Area name for this resource - */ - area: string; - /** - * Unique Identifier for this location - */ - id: string; - /** - * Maximum api version that this resource supports (current server version for this resource) - */ - maxVersion: string; - /** - * Minimum api version that this resource supports - */ - minVersion: string; - /** - * The latest version of this resource location that is in "Release" (non-preview) mode - */ - releasedVersion: string; - /** - * Resource name - */ - resourceName: string; - /** - * The current resource version supported by this resource location - */ - resourceVersion: number; - /** - * This location's route template (templated relative path) - */ - routeTemplate: string; - } - export interface IHeaders { - [key: string]: any; - } - export interface IBasicCredentials { - username: string; - password: string; - } - export interface IRequestHandler { - prepareRequest(options: any): void; - canHandleAuthentication(res: IHttpResponse): boolean; - handleAuthentication(httpClient: any, protocol: any, options: any, objs: any, finalCallback: any): void; - } - export interface IHttpResponse { - statusCode?: number; - headers: any; - } - export interface IQCoreApi { - connect(): Promise; - } - export interface IHttpClient { - get(verb: string, requestUrl: string, headers: any, onResult: (err: any, res: IHttpResponse, contents: string) => void): void; - send(verb: string, requestUrl: string, objs: any, headers: any, onResult: (err: any, res: IHttpResponse, contents: string) => void): void; - sendFile(verb: string, requestUrl: string, content: NodeJS.ReadableStream, headers: any, onResult: (err: any, res: IHttpResponse, contents: string) => void): void; - getStream(requestUrl: string, apiVersion: string, headers: any, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - makeAcceptHeader(type: string, apiVersion: string): string; - request(protocol: any, options: any, body: any, onResult: (err: any, res: IHttpResponse, contents: string) => void): void; - } - export interface IRestClient { - baseUrl: string; - httpClient: IHttpClient; - getJson(relativeUrl: string, apiVersion: string, customHeaders: IHeaders, serializationData: Serialization.SerializationData, onResult: (err: any, statusCode: number, obj: any) => void): void; - options(requestUrl: string, onResult: (err: any, statusCode: number, obj: any) => void): void; - create(relativeUrl: string, apiVersion: string, resources: any, customHeaders: IHeaders, serializationData: Serialization.SerializationData, onResult: (err: any, statusCode: number, obj: any) => void): void; - update(relativeUrl: string, apiVersion: string, resources: any, customHeaders: IHeaders, serializationData: Serialization.SerializationData, onResult: (err: any, statusCode: number, obj: any) => void): void; - uploadFile(verb: string, relativeUrl: string, apiVersion: string, filePath: string, customHeaders: IHeaders, serializationData: Serialization.SerializationData, onResult: (err: any, statusCode: number, obj: any) => void): void; - uploadStream(verb: string, relativeUrl: string, apiVersion: string, contentStream: NodeJS.ReadableStream, customHeaders: IHeaders, serializationData: Serialization.SerializationData, onResult: (err: any, statusCode: number, obj: any) => void): void; - replace(relativeUrl: string, apiVersion: string, resources: any, customHeaders: IHeaders, serializationData: Serialization.SerializationData, onResult: (err: any, statusCode: number, obj: any) => void): void; - } - -} -declare module 'vso-node-api/HttpClient' { - - import http = require("http"); - import ifm = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); - export class HttpClient implements ifm.IHttpClient { - userAgent: string; - handlers: ifm.IRequestHandler[]; - socketTimeout: number; - isSsl: boolean; - constructor(userAgent: string, handlers?: ifm.IRequestHandler[], socketTimeout?: number); - get(verb: string, requestUrl: string, headers: ifm.IHeaders, onResult: (err: any, res: http.ClientResponse, contents: string) => void): void; - send(verb: string, requestUrl: string, objs: any, headers: ifm.IHeaders, onResult: (err: any, res: http.ClientResponse, contents: string) => void): void; - sendFile(verb: string, requestUrl: string, content: NodeJS.ReadableStream, headers: ifm.IHeaders, onResult: (err: any, res: http.ClientResponse, contents: string) => void): void; - getStream(requestUrl: string, apiVersion: string, type: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - makeAcceptHeader(type: string, apiVersion: string): string; - _getOptions(method: string, requestUrl: string, headers: any): any; - request(protocol: any, options: any, objs: any, onResult: (err: any, res: http.ClientResponse, contents: string) => void): void; - requestInternal(protocol: any, options: any, objs: any, onResult: (err: any, res: http.ClientResponse, contents: string) => void): void; - } - -} -declare module 'vso-node-api/RestClient' { - - import ifm = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); - import Serialization = require('vso-node-api/Serialization'); - export function processResponse(url: any, res: any, contents: any, serializationData: Serialization.SerializationData, onResult: any): void; - export function enumToString(enumType: any, enumValue: number, camelCase: boolean): any; - export class RestClient implements ifm.IRestClient { - baseUrl: string; - basePath: string; - httpClient: ifm.IHttpClient; - constructor(httpClient: ifm.IHttpClient); - getJson(url: string, apiVersion: string, customHeaders: ifm.IHeaders, serializationData: Serialization.SerializationData, onResult: (err: any, statusCode: number, obj: any) => void): void; - options(url: string, onResult: (err: any, statusCode: number, obj: any) => void): void; - delete(url: string, apiVersion: string, customHeaders: ifm.IHeaders, serializationData: Serialization.SerializationData, onResult: (err: any, statusCode: number, obj: any) => void): void; - create(url: string, apiVersion: string, resources: any, customHeaders: ifm.IHeaders, serializationData: Serialization.SerializationData, onResult: (err: any, statusCode: number, obj: any) => void): void; - update(url: string, apiVersion: string, resources: any, customHeaders: ifm.IHeaders, serializationData: Serialization.SerializationData, onResult: (err: any, statusCode: number, obj: any) => void): void; - uploadFile(verb: string, url: string, apiVersion: string, filePath: string, customHeaders: ifm.IHeaders, serializationData: Serialization.SerializationData, onResult: (err: any, statusCode: number, obj: any) => void): void; - uploadStream(verb: string, url: string, apiVersion: string, contentStream: NodeJS.ReadableStream, customHeaders: ifm.IHeaders, serializationData: Serialization.SerializationData, onResult: (err: any, statusCode: number, obj: any) => void): void; - replace(url: string, apiVersion: string, resources: any, customHeaders: ifm.IHeaders, serializationData: Serialization.SerializationData, onResult: (err: any, statusCode: number, obj: any) => void): void; - _getJson(verb: string, url: string, apiVersion: string, customHeaders: ifm.IHeaders, serializationData: Serialization.SerializationData, onResult: (err: any, statusCode: number, obj: any) => void): void; - _sendJson(verb: string, url: string, apiVersion: string, data: any, customHeaders: ifm.IHeaders, serializationData: Serialization.SerializationData, onResult: (err: any, statusCode: number, obj: any) => void): void; - } - -} -declare module 'vso-node-api/VsoClient' { - - - import restm = require('vso-node-api/RestClient'); - import ifm = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); - export interface ClientVersioningData { - /** - * The api version string to send in the request (e.g. "1.0" or "2.0-preview.2") - */ - apiVersion?: string; - /** - * The request path string to send the request to. Looked up via an options request with the location id. - */ - requestUrl?: string; - } - export class InvalidApiResourceVersionError implements Error { - name: string; - message: string; - constructor(message?: string); - } - /** - * Base class that should be used (derived from) to make requests to VSS REST apis - */ - export class VsoClient { - private static APIS_RELATIVE_PATH; - private static PREVIEW_INDICATOR; - private _locationsByAreaPromises; - private _initializationPromise; - restClient: ifm.IRestClient; - baseUrl: string; - basePath: string; - constructor(baseUrl: string, restClient: restm.RestClient); - /** - * Compares the version on the server (locationVersion) to the api version given by the client (apiVersion). - * Returns a negative value if the location version is older (less than) the api version - * Returns 0 if the two are equal - * Returns a positive value if the location version is newer (greater than) the api version - */ - private compareResourceVersions(locationVersion, apiVersion); - /** - * Gets the route template for a resource based on its location ID and negotiates the api version - */ - getVersioningData(apiVersion: string, area: string, locationId: string, routeValues: any, queryParams?: any): Promise; - /** - * Sets a promise that is waited on before any requests are issued. Can be used to asynchronously - * set the request url and auth token manager. - */ - _setInitializationPromise(promise: Promise): void; - /** - * Gets information about an API resource location (route template, supported versions, etc.) - * - * @param area resource area name - * @param locationId Guid of the location to get - */ - beginGetLocation(area: string, locationId: string): Promise; - private beginGetAreaLocations(area); - resolveUrl(relativeUrl: string): string; - /** - * Issues an OPTIONS request to get location objects from a location id - */ - _issueOptionsRequest(requestUrl: string, onResult: (err: any, statusCode: number, locationsResult: any) => void): void; - private getSerializedObject(object); - protected getRequestUrl(routeTemplate: string, area: string, resource: string, routeValues: any, queryParams?: any): string; - private replaceRouteValues(routeTemplate, routeValues); - _getLinkResponseHeaders(xhr: XMLHttpRequest): { - [relName: string]: string; - }; - } - -} -declare module 'vso-node-api/ClientApiBases' { - import Q = require('q'); - import restm = require('vso-node-api/RestClient'); - import httpm = require('vso-node-api/HttpClient'); - import vsom = require('vso-node-api/VsoClient'); - import VsoBaseInterfaces = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); - export class ClientApiBase { - baseUrl: string; - userAgent: string; - httpClient: httpm.HttpClient; - restClient: restm.RestClient; - vsoClient: vsom.VsoClient; - constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], userAgent?: string); - setUserAgent(userAgent: string): void; - connect(onResult: (err: any, statusCode: number, obj: any) => void): void; - } - export class QClientApiBase { - api: ClientApiBase; - constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], api: typeof ClientApiBase); - connect(): Promise; - } - -} -declare module 'vso-node-api/interfaces/common/VSSInterfaces' { - export interface IdentityRef { - displayName: string; - id: string; - imageUrl: string; - isAadIdentity: boolean; - isContainer: boolean; - profileUrl: string; - uniqueName: string; - url: string; - } - export interface JsonPatchDocument { - } - /** - * The JSON model for a JSON Patch operation - */ - export interface JsonPatchOperation { - /** - * The path to copy from for the Move/Copy operation. - */ - from: string; - /** - * The patch operation - */ - op: Operation; - /** - * The path for the operation - */ - path: string; - /** - * The value for the operation. This is either a primitive or a JToken. - */ - value: any; - } - export enum Operation { - Add = 0, - Remove = 1, - Replace = 2, - Move = 3, - Copy = 4, - Test = 5, - } - export interface ResourceRef { - id: string; - url: string; - } - export interface VssJsonCollectionWrapper extends VssJsonCollectionWrapperBase { - value: any[]; - } - export interface VssJsonCollectionWrapperV extends VssJsonCollectionWrapperBase { - value: T; - } - export interface VssJsonCollectionWrapperBase { - count: number; - } - export var TypeInfo: { - IdentityRef: { - fields: any; - }; - JsonPatchDocument: { - fields: any; - }; - JsonPatchOperation: { - fields: any; - }; - Operation: { - enumValues: { - "add": number; - "remove": number; - "replace": number; - "move": number; - "copy": number; - "test": number; - }; - }; - OperationReference: { - fields: any; - }; - ResourceRef: { - fields: any; - }; - VssJsonCollectionWrapper: { - fields: any; - }; - VssJsonCollectionWrapperV: { - fields: any; - }; - VssJsonCollectionWrapperBase: { - fields: any; - }; - }; - -} -declare module 'vso-node-api/interfaces/CoreInterfaces' { - import VSSInterfaces = require('vso-node-api/interfaces/common/VSSInterfaces'); - export enum ConnectedServiceKind { - /** - * Custom or unknown service - */ - Custom = 0, - /** - * Azure Subscription - */ - AzureSubscription = 1, - /** - * Chef Connection - */ - Chef = 2, - /** - * Generic Connection - */ - Generic = 3, - } - export interface IdentityData { - identityIds: string[]; - } - export interface Process extends ProcessReference { - _links: any; - description: string; - id: string; - isDefault: boolean; - type: ProcessType; - } - export interface ProcessReference { - name: string; - url: string; - } - export enum ProcessType { - System = 0, - Custom = 1, - Inherited = 2, - } - export enum ProjectChangeType { - Modified = 0, - Deleted = 1, - Added = 2, - } - /** - * Contains information of the project - */ - export interface ProjectInfo { - abbreviation: string; - description: string; - id: string; - lastUpdateTime: Date; - name: string; - properties: ProjectProperty[]; - /** - * Current revision of the project - */ - revision: number; - state: any; - uri: string; - version: number; - } - export interface ProjectMessage { - project: ProjectInfo; - projectChangeType: ProjectChangeType; - } - export interface ProjectProperty { - name: string; - value: string; - } - export interface Proxy { - /** - * This is a description string - */ - description: string; - /** - * The friendly name of the server - */ - friendlyName: string; - globalDefault: boolean; - /** - * This is a string representation of the site that the proxy server is located in (e.g. "NA-WA-RED") - */ - site: string; - siteDefault: boolean; - /** - * The URL of the proxy server - */ - url: string; - } - export enum SourceControlTypes { - Tfvc = 1, - Git = 2, - } - /** - * The Team Context for an operation. - */ - export interface TeamContext { - /** - * The team project Id or name. Ignored if ProjectId is set. - */ - project: string; - /** - * The Team Project ID. Required if Project is not set. - */ - projectId: string; - /** - * The Team Id or name. Ignored if TeamId is set. - */ - team: string; - /** - * The Team Id - */ - teamId: string; - } - /** - * Represents a Team Project object. - */ - export interface TeamProject extends TeamProjectReference { - /** - * The links to other objects related to this object. - */ - _links: any; - /** - * Set of capabilities this project has (such as process template & version control). - */ - capabilities: { - [key: string]: { - [key: string]: string; - }; - }; - /** - * The shallow ref to the default team. - */ - defaultTeam: WebApiTeamRef; - } - /** - * Data contract for a TeamProjectCollection. - */ - export interface TeamProjectCollection extends TeamProjectCollectionReference { - /** - * The links to other objects related to this object. - */ - _links: any; - /** - * Project collection description. - */ - description: string; - /** - * Project collection state. - */ - state: string; - } - /** - * Reference object for a TeamProjectCollection. - */ - export interface TeamProjectCollectionReference { - /** - * Collection Id. - */ - id: string; - /** - * Collection Name. - */ - name: string; - /** - * Collection REST Url. - */ - url: string; - } - /** - * Represents a shallow reference to a TeamProject. - */ - export interface TeamProjectReference { - /** - * Project abbreviation. - */ - abbreviation: string; - /** - * The project's description (if any). - */ - description: string; - /** - * Project identifier. - */ - id: string; - /** - * Project name. - */ - name: string; - /** - * Project revision. - */ - revision: number; - /** - * Project state. - */ - state: any; - /** - * Url to the full version of the object. - */ - url: string; - } - export interface WebApiConnectedService extends WebApiConnectedServiceRef { - /** - * The user who did the OAuth authentication to created this service - */ - authenticatedBy: VSSInterfaces.IdentityRef; - /** - * Extra description on the service. - */ - description: string; - /** - * Friendly Name of service connection - */ - friendlyName: string; - /** - * Id/Name of the connection service. For Ex: Subscription Id for Azure Connection - */ - id: string; - /** - * The kind of service. - */ - kind: string; - /** - * The project associated with this service - */ - project: TeamProjectReference; - /** - * Optional uri to connect directly to the service such as https://windows.azure.com - */ - serviceUri: string; - } - export interface WebApiConnectedServiceDetails extends WebApiConnectedServiceRef { - /** - * Meta data for service connection - */ - connectedServiceMetaData: WebApiConnectedService; - /** - * Credential info - */ - credentialsXml: string; - /** - * Optional uri to connect directly to the service such as https://windows.azure.com - */ - endPoint: string; - } - export interface WebApiConnectedServiceRef { - id: string; - url: string; - } - /** - * The representation of data needed to create a tag definition which is sent across the wire. - */ - export interface WebApiCreateTagRequestData { - name: string; - } - export interface WebApiProject extends TeamProjectReference { - /** - * Set of capabilities this project has - */ - capabilities: { - [key: string]: { - [key: string]: string; - }; - }; - /** - * Reference to collection which contains this project - */ - collection: WebApiProjectCollectionRef; - /** - * Default team for this project - */ - defaultTeam: WebApiTeamRef; - } - export interface WebApiProjectCollection extends WebApiProjectCollectionRef { - /** - * Project collection description - */ - description: string; - /** - * Project collection state - */ - state: string; - } - export interface WebApiProjectCollectionRef { - /** - * Collection Tfs Url (Host Url) - */ - collectionUrl: string; - /** - * Collection Guid - */ - id: string; - /** - * Collection Name - */ - name: string; - /** - * Collection REST Url - */ - url: string; - } - /** - * The representation of a tag definition which is sent across the wire. - */ - export interface WebApiTagDefinition { - active: boolean; - id: string; - name: string; - url: string; - } - export interface WebApiTeam extends WebApiTeamRef { - /** - * Team description - */ - description: string; - /** - * Identity REST API Url to this team - */ - identityUrl: string; - } - export interface WebApiTeamRef { - /** - * Team (Identity) Guid. A Team Foundation ID. - */ - id: string; - /** - * Team name - */ - name: string; - /** - * Team REST API Url - */ - url: string; - } - export var TypeInfo: { - ConnectedServiceKind: { - enumValues: { - "custom": number; - "azureSubscription": number; - "chef": number; - "generic": number; - }; - }; - IdentityData: { - fields: any; - }; - Process: { - fields: any; - }; - ProcessReference: { - fields: any; - }; - ProcessType: { - enumValues: { - "system": number; - "custom": number; - "inherited": number; - }; - }; - ProjectChangeType: { - enumValues: { - "modified": number; - "deleted": number; - "added": number; - }; - }; - ProjectInfo: { - fields: any; - }; - ProjectMessage: { - fields: any; - }; - ProjectProperty: { - fields: any; - }; - Proxy: { - fields: any; - }; - SourceControlTypes: { - enumValues: { - "tfvc": number; - "git": number; - }; - }; - TeamContext: { - fields: any; - }; - TeamProject: { - fields: any; - }; - TeamProjectCollection: { - fields: any; - }; - TeamProjectCollectionReference: { - fields: any; - }; - TeamProjectReference: { - fields: any; - }; - WebApiConnectedService: { - fields: any; - }; - WebApiConnectedServiceDetails: { - fields: any; - }; - WebApiConnectedServiceRef: { - fields: any; - }; - WebApiCreateTagRequestData: { - fields: any; - }; - WebApiProject: { - fields: any; - }; - WebApiProjectCollection: { - fields: any; - }; - WebApiProjectCollectionRef: { - fields: any; - }; - WebApiTagDefinition: { - fields: any; - }; - WebApiTeam: { - fields: any; - }; - WebApiTeamRef: { - fields: any; - }; - }; - -} -declare module 'vso-node-api/interfaces/BuildInterfaces' { - import TfsCoreInterfaces = require('vso-node-api/interfaces/CoreInterfaces'); - import VSSInterfaces = require('vso-node-api/interfaces/common/VSSInterfaces'); - export interface AgentPoolQueue extends ShallowReference { - _links: any; - /** - * The pool used by this queue. - */ - pool: TaskAgentPoolReference; - } - export enum AgentStatus { - /** - * Indicates that the build agent cannot be contacted. - */ - Unavailable = 0, - /** - * Indicates that the build agent is currently available. - */ - Available = 1, - /** - * Indicates that the build agent has taken itself offline. - */ - Offline = 2, - } - export interface ArtifactResource { - _links: any; - /** - * The type-specific resource data. For example, "#/10002/5/drop", "$/drops/5", "\\myshare\myfolder\mydrops\5" - */ - data: string; - /** - * Link to the resource. This might include things like query parameters to download as a zip file - */ - downloadUrl: string; - /** - * Properties of Artifact Resource - */ - properties: { - [key: string]: string; - }; - /** - * The type of the resource: File container, version control folder, UNC path, etc. - */ - type: string; - /** - * Link to the resource - */ - url: string; - } - export enum AuditAction { - Add = 1, - Update = 2, - Delete = 3, - } - /** - * Data representation of a build - */ - export interface Build { - _links: any; - /** - * Build number/name of the build - */ - buildNumber: string; - /** - * Build number revision - */ - buildNumberRevision: number; - /** - * The build controller. This should only be set if the definition type is Xaml. - */ - controller: BuildController; - /** - * The definition associated with the build - */ - definition: DefinitionReference; - /** - * Indicates whether the build has been deleted. - */ - deleted: boolean; - /** - * Demands - */ - demands: any[]; - /** - * Time that the build was completed - */ - finishTime: Date; - /** - * Id of the build - */ - id: number; - keepForever: boolean; - /** - * Process or person that last changed the build - */ - lastChangedBy: VSSInterfaces.IdentityRef; - /** - * Date the build was last changed - */ - lastChangedDate: Date; - /** - * Log location of the build - */ - logs: BuildLogReference; - /** - * Orchestration plan for the build - */ - orchestrationPlan: TaskOrchestrationPlanReference; - /** - * Parameters for the build - */ - parameters: string; - /** - * The build's priority - */ - priority: QueuePriority; - /** - * The team project - */ - project: TfsCoreInterfaces.TeamProjectReference; - properties: any; - /** - * Quality of the xaml build (good, bad, etc.) - */ - quality: string; - /** - * The queue. This should only be set if the definition type is Build. - */ - queue: AgentPoolQueue; - /** - * Queue option of the build. - */ - queueOptions: QueueOptions; - /** - * The current position of the build in the queue - */ - queuePosition: number; - /** - * Time that the build was queued - */ - queueTime: Date; - /** - * Reason that the build was created - */ - reason: BuildReason; - /** - * The repository - */ - repository: BuildRepository; - /** - * The identity that queued the build - */ - requestedBy: VSSInterfaces.IdentityRef; - /** - * The identity on whose behalf the build was queued - */ - requestedFor: VSSInterfaces.IdentityRef; - /** - * The build result - */ - result: BuildResult; - /** - * Source branch - */ - sourceBranch: string; - /** - * Source version - */ - sourceVersion: string; - /** - * Time that the build was started - */ - startTime: Date; - /** - * Status of the build - */ - status: BuildStatus; - tags: string[]; - /** - * Uri of the build - */ - uri: string; - /** - * REST url of the build - */ - url: string; - validationResults: BuildRequestValidationResult[]; - } - export interface BuildAgent { - buildDirectory: string; - controller: ShallowReference; - createdDate: Date; - description: string; - enabled: boolean; - id: number; - messageQueueUrl: string; - name: string; - reservedForBuild: string; - server: ShallowReference; - status: AgentStatus; - statusMessage: string; - updatedDate: Date; - uri: string; - url: string; - } - export interface BuildArtifact { - /** - * The artifact id - */ - id: number; - /** - * The name of the artifact - */ - name: string; - /** - * The actual resource - */ - resource: ArtifactResource; - } - export interface BuildArtifactAddedEvent extends BuildUpdatedEvent { - artifact: BuildArtifact; - } - export enum BuildAuthorizationScope { - /** - * The identity used should have build service account permissions scoped to the project collection. This is useful when resources for a single build are spread across multiple projects. - */ - ProjectCollection = 1, - /** - * The identity used should have build service account permissions scoped to the project in which the build definition resides. This is useful for isolation of build jobs to a particular team project to avoid any unintentional escalation of privilege attacks during a build. - */ - Project = 2, - } - /** - * Data representation of a build badge - */ - export interface BuildBadge { - /** - * Build id, if exists that this badge corresponds to - */ - buildId: number; - /** - * Self Url that generates SVG - */ - imageUrl: string; - } - export interface BuildChangesCalculatedEvent extends BuildUpdatedEvent { - changes: Change[]; - } - export interface BuildCompletedEvent extends BuildUpdatedEvent { - } - export interface BuildController extends ShallowReference { - _links: any; - /** - * The date the controller was created. - */ - createdDate: Date; - /** - * The description of the controller. - */ - description: string; - /** - * Indicates whether the controller is enabled. - */ - enabled: boolean; - /** - * The status of the controller. - */ - status: ControllerStatus; - /** - * The date the controller was last updated. - */ - updatedDate: Date; - /** - * The controller's URI. - */ - uri: string; - } - export interface BuildDefinition extends BuildDefinitionReference { - _links: any; - /** - * Indicates whether badges are enabled for this definition - */ - badgeEnabled: boolean; - build: BuildDefinitionStep[]; - /** - * The build number format - */ - buildNumberFormat: string; - /** - * The comment entered when saving the definition - */ - comment: string; - demands: any[]; - /** - * The description - */ - description: string; - /** - * The drop location for the definition - */ - dropLocation: string; - /** - * Gets or sets the job authorization scope for builds which are queued against this definition - */ - jobAuthorizationScope: BuildAuthorizationScope; - /** - * Gets or sets the job execution timeout in minutes for builds which are queued against this definition - */ - jobTimeoutInMinutes: number; - options: BuildOption[]; - properties: any; - /** - * The repository - */ - repository: BuildRepository; - retentionRules: RetentionPolicy[]; - triggers: BuildTrigger[]; - variables: { - [key: string]: BuildDefinitionVariable; - }; - } - export interface BuildDefinitionChangedEvent { - changeType: AuditAction; - definition: BuildDefinition; - } - export interface BuildDefinitionChangingEvent { - changeType: AuditAction; - newDefinition: BuildDefinition; - originalDefinition: BuildDefinition; - } - export interface BuildDefinitionReference extends DefinitionReference { - /** - * The author of the definition. - */ - authoredBy: VSSInterfaces.IdentityRef; - /** - * If this is a draft definition, it might have a parent - */ - draftOf: DefinitionReference; - /** - * The quality of the definition document (draft, etc.) - */ - quality: DefinitionQuality; - /** - * The default queue which should be used for requests. - */ - queue: AgentPoolQueue; - } - export interface BuildDefinitionRevision { - changedBy: VSSInterfaces.IdentityRef; - changedDate: Date; - changeType: AuditAction; - comment: string; - definitionUrl: string; - name: string; - revision: number; - } - export interface BuildDefinitionSourceProvider { - /** - * Uri of the associated definition - */ - definitionUri: string; - /** - * fields associated with this build definition - */ - fields: { - [key: string]: string; - }; - /** - * Id of this source provider - */ - id: number; - /** - * The lst time this source provider was modified - */ - lastModified: Date; - /** - * Name of the source provider - */ - name: string; - /** - * Which trigger types are supported by this definition source provider - */ - supportedTriggerTypes: DefinitionTriggerType; - } - export interface BuildDefinitionStep { - alwaysRun: boolean; - continueOnError: boolean; - displayName: string; - enabled: boolean; - inputs: { - [key: string]: string; - }; - task: TaskDefinitionReference; - } - export interface BuildDefinitionTemplate { - canDelete: boolean; - category: string; - description: string; - iconTaskId: string; - id: string; - name: string; - template: BuildDefinition; - } - export interface BuildDefinitionVariable { - allowOverride: boolean; - isSecret: boolean; - value: string; - } - export interface BuildDeletedEvent extends RealtimeBuildEvent { - build: Build; - } - export interface BuildDeployment { - deployment: BuildSummary; - sourceBuild: ShallowReference; - } - export interface BuildDestroyedEvent extends RealtimeBuildEvent { - build: Build; - } - /** - * Represents a build log. - */ - export interface BuildLog extends BuildLogReference { - /** - * The date the log was created. - */ - createdOn: Date; - /** - * The date the log was last changed. - */ - lastChangedOn: Date; - /** - * The number of lines in the log. - */ - lineCount: number; - } - /** - * Data representation of a build log reference - */ - export interface BuildLogReference { - /** - * The id of the log. - */ - id: number; - /** - * The type of the log location. - */ - type: string; - /** - * Full link to the log resource. - */ - url: string; - } - export interface BuildOption { - definition: BuildOptionDefinitionReference; - enabled: boolean; - inputs: { - [key: string]: string; - }; - } - export interface BuildOptionDefinition extends BuildOptionDefinitionReference { - description: string; - groups: BuildOptionGroupDefinition[]; - inputs: BuildOptionInputDefinition[]; - name: string; - ordinal: number; - } - export interface BuildOptionDefinitionReference { - id: string; - } - export interface BuildOptionGroupDefinition { - displayName: string; - isExpanded: boolean; - name: string; - } - export interface BuildOptionInputDefinition { - defaultValue: string; - groupName: string; - help: { - [key: string]: string; - }; - label: string; - name: string; - options: { - [key: string]: string; - }; - required: boolean; - type: BuildOptionInputType; - visibleRule: string; - } - export enum BuildOptionInputType { - String = 0, - Boolean = 1, - StringList = 2, - Radio = 3, - PickList = 4, - MultiLine = 5, - } - export enum BuildPhaseStatus { - /** - * The state is not known. - */ - Unknown = 0, - /** - * The build phase completed unsuccessfully. - */ - Failed = 1, - /** - * The build phase completed successfully. - */ - Succeeded = 2, - } - export interface BuildPollingSummaryEvent { - } - export interface BuildProcessTemplate { - description: string; - fileExists: boolean; - id: number; - parameters: string; - serverPath: string; - supportedReasons: BuildReason; - teamProject: string; - templateType: ProcessTemplateType; - url: string; - version: string; - } - export enum BuildQueryOrder { - /** - * Order by finish time ascending. - */ - FinishTimeAscending = 2, - /** - * Order by finish time descending. - */ - FinishTimeDescending = 3, - } - export interface BuildQueuedEvent extends BuildUpdatedEvent { - } - export enum BuildReason { - /** - * No reason. This value should not be used. - */ - None = 0, - /** - * The build was started manually. - */ - Manual = 1, - /** - * The build was started for the trigger TriggerType.ContinuousIntegration. - */ - IndividualCI = 2, - /** - * The build was started for the trigger TriggerType.BatchedContinuousIntegration. - */ - BatchedCI = 4, - /** - * The build was started for the trigger TriggerType.Schedule. - */ - Schedule = 8, - /** - * The build was created by a user. - */ - UserCreated = 32, - /** - * The build was started manually for private validation. - */ - ValidateShelveset = 64, - /** - * The build was started for the trigger ContinuousIntegrationType.Gated. - */ - CheckInShelveset = 128, - /** - * The build was triggered for retention policy purposes. - */ - Triggered = 175, - /** - * All reasons. - */ - All = 239, - } - export interface BuildReference { - _links: any; - /** - * Build number/name of the build - */ - buildNumber: string; - /** - * Time that the build was completed - */ - finishTime: Date; - /** - * Id of the build - */ - id: number; - /** - * Time that the build was queued - */ - queueTime: Date; - /** - * The build result - */ - result: BuildResult; - /** - * Time that the build was started - */ - startTime: Date; - /** - * Status of the build - */ - status: BuildStatus; - } - export interface BuildReportMetadata { - buildId: number; - content: string; - type: string; - } - export interface BuildRepository { - checkoutSubmodules: boolean; - /** - * Indicates whether to clean the target folder when getting code from the repository. This is a String so that it can reference variables. - */ - clean: string; - /** - * Gets or sets the name of the default branch. - */ - defaultBranch: string; - id: string; - /** - * Gets or sets the friendly name of the repository. - */ - name: string; - properties: { - [key: string]: string; - }; - /** - * Gets or sets the root folder. - */ - rootFolder: string; - /** - * Gets or sets the type of the repository. - */ - type: string; - /** - * Gets or sets the url of the repository. - */ - url: string; - } - export interface BuildRequestValidationResult { - message: string; - result: ValidationResult; - } - export interface BuildResourceUsage { - distributedTaskAgents: number; - totalUsage: number; - xamlControllers: number; - } - export enum BuildResult { - /** - * No result - */ - None = 0, - /** - * The build completed successfully. - */ - Succeeded = 2, - /** - * The build completed compilation successfully but had other errors. - */ - PartiallySucceeded = 4, - /** - * The build completed unsuccessfully. - */ - Failed = 8, - /** - * The build was canceled before starting. - */ - Canceled = 32, - } - export interface BuildServer { - agents: ShallowReference[]; - controller: ShallowReference; - id: number; - isVirtual: boolean; - messageQueueUrl: string; - name: string; - requireClientCertificates: boolean; - status: ServiceHostStatus; - statusChangedDate: Date; - uri: string; - url: string; - version: number; - } - export interface BuildSettings { - daysToKeepDeletedBuildsBeforeDestroy: number; - defaultRetentionPolicy: RetentionPolicy; - maximumRetentionPolicy: RetentionPolicy; - } - export interface BuildStartedEvent extends BuildUpdatedEvent { - } - export enum BuildStatus { - /** - * No status. - */ - None = 0, - /** - * The build is currently in progress. - */ - InProgress = 1, - /** - * The build has completed. - */ - Completed = 2, - /** - * The build is cancelling - */ - Cancelling = 4, - /** - * The build is inactive in the queue. - */ - Postponed = 8, - /** - * The build has not yet started. - */ - NotStarted = 32, - /** - * All status. - */ - All = 47, - } - export interface BuildSummary { - build: ShallowReference; - finishTime: Date; - keepForever: boolean; - quality: string; - reason: BuildReason; - requestedFor: VSSInterfaces.IdentityRef; - startTime: Date; - status: BuildStatus; - } - export interface BuildTrigger { - triggerType: DefinitionTriggerType; - } - export interface BuildUpdatedEvent extends RealtimeBuildEvent { - build: Build; - } - export interface BuildWorkspace { - mappings: MappingDetails[]; - } - /** - * Represents a change associated with a build. - */ - export interface Change { - /** - * The author of the change. - */ - author: VSSInterfaces.IdentityRef; - /** - * The location of a user-friendly representation of the resource. - */ - displayUri: string; - /** - * Something that identifies the change. For a commit, this would be the SHA1. For a TFVC changeset, this would be the changeset id. - */ - id: string; - /** - * The location of the full representation of the resource. - */ - location: string; - /** - * A description of the change. This might be a commit message or changeset description. - */ - message: string; - /** - * Indicates whether the message was truncated - */ - messageTruncated: boolean; - /** - * A timestamp for the change. - */ - timestamp: Date; - /** - * The type of change. "commit", "changeset", etc. - */ - type: string; - } - export interface ConsoleLogEvent extends RealtimeBuildEvent { - lines: string[]; - timelineId: string; - timelineRecordId: string; - } - export interface ContinuousDeploymentDefinition { - /** - * The connected service associated with the continuous deployment - */ - connectedService: TfsCoreInterfaces.WebApiConnectedServiceRef; - /** - * The definition associated with the continuous deployment - */ - definition: ShallowReference; - gitBranch: string; - hostedServiceName: string; - project: TfsCoreInterfaces.TeamProjectReference; - repositoryId: string; - storageAccountName: string; - subscriptionId: string; - website: string; - webspace: string; - } - export interface ContinuousIntegrationTrigger extends BuildTrigger { - batchChanges: boolean; - branchFilters: string[]; - maxConcurrentBuildsPerBranch: number; - /** - * The polling interval in seconds. - */ - pollingInterval: number; - /** - * This is the id of the polling job that polls the external repository. Once the build definition is saved/updated, this value is set. - */ - pollingJobId: string; - } - export enum ControllerStatus { - /** - * Indicates that the build controller cannot be contacted. - */ - Unavailable = 0, - /** - * Indicates that the build controller is currently available. - */ - Available = 1, - /** - * Indicates that the build controller has taken itself offline. - */ - Offline = 2, - } - export enum DefinitionQuality { - Definition = 1, - Draft = 2, - } - export enum DefinitionQueryOrder { - /** - * No order - */ - None = 0, - /** - * Order by created on/last modified time ascending. - */ - LastModifiedAscending = 1, - /** - * Order by created on/last modified time descending. - */ - LastModifiedDescending = 2, - /** - * Order by definition name ascending. - */ - DefinitionNameAscending = 3, - /** - * Order by definition name descending. - */ - DefinitionNameDescending = 4, - } - export enum DefinitionQueueStatus { - /** - * When enabled the definition queue allows builds to be queued by users, the system will queue scheduled, gated and continuous integration builds, and the queued builds will be started by the system. - */ - Enabled = 0, - /** - * When paused the definition queue allows builds to be queued by users and the system will queue scheduled, gated and continuous integration builds. Builds in the queue will not be started by the system. - */ - Paused = 1, - /** - * When disabled the definition queue will not allow builds to be queued by users and the system will not queue scheduled, gated or continuous integration builds. Builds already in the queue will not be started by the system. - */ - Disabled = 2, - } - /** - * A reference to a definition. - */ - export interface DefinitionReference extends ShallowReference { - /** - * The date the definition was created - */ - createdDate: Date; - /** - * The project. - */ - project: TfsCoreInterfaces.TeamProjectReference; - /** - * If builds can be queued from this definition - */ - queueStatus: DefinitionQueueStatus; - /** - * The definition revision number. - */ - revision: number; - /** - * The type of the definition. - */ - type: DefinitionType; - /** - * The Uri of the definition - */ - uri: string; - } - export enum DefinitionTriggerType { - /** - * Manual builds only. - */ - None = 1, - /** - * A build should be started for each changeset. - */ - ContinuousIntegration = 2, - /** - * A build should be started for multiple changesets at a time at a specified interval. - */ - BatchedContinuousIntegration = 4, - /** - * A build should be started on a specified schedule whether or not changesets exist. - */ - Schedule = 8, - /** - * A validation build should be started for each check-in. - */ - GatedCheckIn = 16, - /** - * A validation build should be started for each batch of check-ins. - */ - BatchedGatedCheckIn = 32, - /** - * All types. - */ - All = 63, - } - export enum DefinitionType { - Xaml = 1, - Build = 2, - } - export enum DeleteOptions { - /** - * No data should be deleted. This value should not be used. - */ - None = 0, - /** - * The drop location should be deleted. - */ - DropLocation = 1, - /** - * The test results should be deleted. - */ - TestResults = 2, - /** - * The version control label should be deleted. - */ - Label = 4, - /** - * The build should be deleted. - */ - Details = 8, - /** - * Published symbols should be deleted. - */ - Symbols = 16, - /** - * All data should be deleted. - */ - All = 31, - } - /** - * Represents the data from the build information nodes for type "DeploymentInformation" for xaml builds - */ - export interface Deployment { - type: string; - } - /** - * Deployment iformation for type "Build" - */ - export interface DeploymentBuild extends Deployment { - buildId: number; - } - /** - * Deployment iformation for type "Deploy" - */ - export interface DeploymentDeploy extends Deployment { - message: string; - } - /** - * Deployment iformation for type "Test" - */ - export interface DeploymentTest extends Deployment { - runId: number; - } - export interface GatedCheckInTrigger extends BuildTrigger { - pathFilters: string[]; - runContinuousIntegration: boolean; - } - export enum GetOption { - /** - * Use the latest changeset at the time the build is queued. - */ - LatestOnQueue = 0, - /** - * Use the latest changeset at the time the build is started. - */ - LatestOnBuild = 1, - /** - * A user-specified version has been supplied. - */ - Custom = 2, - } - /** - * Data representation of an information node associated with a build - */ - export interface InformationNode { - /** - * Fields of the information node - */ - fields: { - [key: string]: string; - }; - /** - * Process or person that last modified this node - */ - lastModifiedBy: string; - /** - * Date this node was last modified - */ - lastModifiedDate: Date; - /** - * Node Id of this information node - */ - nodeId: number; - /** - * Id of parent node (xml tree) - */ - parentId: number; - /** - * The type of the information node - */ - type: string; - } - export interface Issue { - category: string; - data: { - [key: string]: string; - }; - message: string; - type: IssueType; - } - export enum IssueType { - Error = 1, - Warning = 2, - } - export interface MappingDetails { - localPath: string; - mappingType: string; - serverPath: string; - } - export enum ProcessTemplateType { - /** - * Indicates a custom template. - */ - Custom = 0, - /** - * Indicates a default template. - */ - Default = 1, - /** - * Indicates an upgrade template. - */ - Upgrade = 2, - } - export interface PropertyValue { - /** - * Guid of identity that changed this property value - */ - changedBy: string; - /** - * The date this property value was changed - */ - changedDate: Date; - /** - * Name in the name value mapping - */ - propertyName: string; - /** - * Value in the name value mapping - */ - value: any; - } - export enum QueryDeletedOption { - /** - * Include only non-deleted builds. - */ - ExcludeDeleted = 0, - /** - * Include deleted and non-deleted builds. - */ - IncludeDeleted = 1, - /** - * Include only deleted builds. - */ - OnlyDeleted = 2, - } - export enum QueueOptions { - /** - * No queue options - */ - None = 0, - /** - * Create a plan Id for the build, do not run it - */ - DoNotRun = 1, - } - export enum QueuePriority { - /** - * Low priority. - */ - Low = 5, - /** - * Below normal priority. - */ - BelowNormal = 4, - /** - * Normal priority. - */ - Normal = 3, - /** - * Above normal priority. - */ - AboveNormal = 2, - /** - * High priority. - */ - High = 1, - } - export interface RealtimeBuildEvent { - buildId: number; - } - export interface RequestReference { - /** - * Id of the resource - */ - id: number; - /** - * Name of the requestor - */ - requestedFor: VSSInterfaces.IdentityRef; - /** - * Full http link to the resource - */ - url: string; - } - export interface RetentionPolicy { - artifacts: string[]; - branches: string[]; - daysToKeep: number; - deleteBuildRecord: boolean; - deleteTestResults: boolean; - minimumToKeep: number; - } - export interface Schedule { - branchFilters: string[]; - /** - * Days for a build (flags enum for days of the week) - */ - daysToBuild: ScheduleDays; - /** - * The Job Id of the Scheduled job that will queue the scheduled build. Since a single trigger can have multiple schedules and we want a single job to process a single schedule (since each schedule has a list of branches to build), the schedule itself needs to define the Job Id. This value will be filled in when a definition is added or updated. The UI does not provide it or use it. - */ - scheduleJobId: string; - /** - * Local timezone hour to start - */ - startHours: number; - /** - * Local timezone minute to start - */ - startMinutes: number; - /** - * Time zone of the build schedule (string representation of the time zone id) - */ - timeZoneId: string; - } - export enum ScheduleDays { - /** - * Do not run. - */ - None = 0, - /** - * Run on Monday. - */ - Monday = 1, - /** - * Run on Tuesday. - */ - Tuesday = 2, - /** - * Run on Wednesday. - */ - Wednesday = 4, - /** - * Run on Thursday. - */ - Thursday = 8, - /** - * Run on Friday. - */ - Friday = 16, - /** - * Run on Saturday. - */ - Saturday = 32, - /** - * Run on Sunday. - */ - Sunday = 64, - /** - * Run on all days of the week. - */ - All = 127, - } - export interface ScheduleTrigger extends BuildTrigger { - schedules: Schedule[]; - } - export enum ServiceHostStatus { - /** - * The service host is currently connected and accepting commands. - */ - Online = 1, - /** - * The service host is currently disconnected and not accepting commands. - */ - Offline = 2, - } - /** - * An abstracted reference to some other resource. This class is used to provide the build data contracts with a uniform way to reference other resources in a way that provides easy traversal through links. - */ - export interface ShallowReference { - /** - * Id of the resource - */ - id: number; - /** - * Name of the linked resource (definition name, controller name, etc.) - */ - name: string; - /** - * Full http link to the resource - */ - url: string; - } - export interface SvnMappingDetails { - depth: number; - ignoreExternals: boolean; - localPath: string; - revision: string; - serverPath: string; - } - export interface SvnWorkspace { - mappings: SvnMappingDetails[]; - } - export interface TaskAgentPoolReference { - id: number; - name: string; - } - export interface TaskDefinitionReference { - id: string; - versionSpec: string; - } - export interface TaskOrchestrationPlanReference { - planId: string; - } - export enum TaskResult { - Succeeded = 0, - SucceededWithIssues = 1, - Failed = 2, - Canceled = 3, - Skipped = 4, - Abandoned = 5, - } - export interface Timeline extends TimelineReference { - lastChangedBy: string; - lastChangedOn: Date; - records: TimelineRecord[]; - } - export interface TimelineRecord { - _links: any; - changeId: number; - currentOperation: string; - details: TimelineReference; - errorCount: number; - finishTime: Date; - id: string; - issues: Issue[]; - lastModified: Date; - log: BuildLogReference; - name: string; - order: number; - parentId: string; - percentComplete: number; - result: TaskResult; - resultCode: string; - startTime: Date; - state: TimelineRecordState; - type: string; - url: string; - warningCount: number; - workerName: string; - } - export enum TimelineRecordState { - Pending = 0, - InProgress = 1, - Completed = 2, - } - export interface TimelineRecordsUpdatedEvent extends RealtimeBuildEvent { - timelineRecords: TimelineRecord[]; - } - export interface TimelineReference { - changeId: number; - id: string; - url: string; - } - export enum ValidationResult { - OK = 0, - Warning = 1, - Error = 2, - } - /** - * Mapping for a workspace - */ - export interface WorkspaceMapping { - /** - * Uri of the associated definition - */ - definitionUri: string; - /** - * Depth of this mapping - */ - depth: number; - /** - * local location of the definition - */ - localItem: string; - /** - * type of workspace mapping - */ - mappingType: WorkspaceMappingType; - /** - * Server location of the definition - */ - serverItem: string; - /** - * Id of the workspace - */ - workspaceId: number; - } - export enum WorkspaceMappingType { - /** - * The path is mapped in the workspace. - */ - Map = 0, - /** - * The path is cloaked in the workspace. - */ - Cloak = 1, - } - export interface WorkspaceTemplate { - /** - * Uri of the associated definition - */ - definitionUri: string; - /** - * The identity that last modified this template - */ - lastModifiedBy: string; - /** - * The last time this template was modified - */ - lastModifiedDate: Date; - /** - * List of workspace mappings - */ - mappings: WorkspaceMapping[]; - /** - * Id of the workspace for this template - */ - workspaceId: number; - } - export interface XamlBuildDefinition extends DefinitionReference { - _links: any; - /** - * Batch size of the definition - */ - batchSize: number; - buildArgs: string; - /** - * The continuous integration quiet period - */ - continuousIntegrationQuietPeriod: number; - /** - * The build controller - */ - controller: BuildController; - /** - * The date this definition was created - */ - createdOn: Date; - /** - * Default drop location for builds from this definition - */ - defaultDropLocation: string; - /** - * Description of the definition - */ - description: string; - /** - * The last build on this definition - */ - lastBuild: ShallowReference; - /** - * The repository - */ - repository: BuildRepository; - /** - * The reasons supported by the template - */ - supportedReasons: BuildReason; - /** - * How builds are triggered from this definition - */ - triggerType: DefinitionTriggerType; - } - export var TypeInfo: { - AgentPoolQueue: { - fields: any; - }; - AgentStatus: { - enumValues: { - "unavailable": number; - "available": number; - "offline": number; - }; - }; - ArtifactResource: { - fields: any; - }; - AuditAction: { - enumValues: { - "add": number; - "update": number; - "delete": number; - }; - }; - Build: { - fields: any; - }; - BuildAgent: { - fields: any; - }; - BuildArtifact: { - fields: any; - }; - BuildArtifactAddedEvent: { - fields: any; - }; - BuildAuthorizationScope: { - enumValues: { - "projectCollection": number; - "project": number; - }; - }; - BuildBadge: { - fields: any; - }; - BuildChangesCalculatedEvent: { - fields: any; - }; - BuildCompletedEvent: { - fields: any; - }; - BuildController: { - fields: any; - }; - BuildDefinition: { - fields: any; - }; - BuildDefinitionChangedEvent: { - fields: any; - }; - BuildDefinitionChangingEvent: { - fields: any; - }; - BuildDefinitionReference: { - fields: any; - }; - BuildDefinitionRevision: { - fields: any; - }; - BuildDefinitionSourceProvider: { - fields: any; - }; - BuildDefinitionStep: { - fields: any; - }; - BuildDefinitionTemplate: { - fields: any; - }; - BuildDefinitionVariable: { - fields: any; - }; - BuildDeletedEvent: { - fields: any; - }; - BuildDeployment: { - fields: any; - }; - BuildDestroyedEvent: { - fields: any; - }; - BuildLog: { - fields: any; - }; - BuildLogReference: { - fields: any; - }; - BuildOption: { - fields: any; - }; - BuildOptionDefinition: { - fields: any; - }; - BuildOptionDefinitionReference: { - fields: any; - }; - BuildOptionGroupDefinition: { - fields: any; - }; - BuildOptionInputDefinition: { - fields: any; - }; - BuildOptionInputType: { - enumValues: { - "string": number; - "boolean": number; - "stringList": number; - "radio": number; - "pickList": number; - "multiLine": number; - }; - }; - BuildPhaseStatus: { - enumValues: { - "unknown": number; - "failed": number; - "succeeded": number; - }; - }; - BuildPollingSummaryEvent: { - fields: any; - }; - BuildProcessTemplate: { - fields: any; - }; - BuildQueryOrder: { - enumValues: { - "finishTimeAscending": number; - "finishTimeDescending": number; - }; - }; - BuildQueuedEvent: { - fields: any; - }; - BuildReason: { - enumValues: { - "none": number; - "manual": number; - "individualCI": number; - "batchedCI": number; - "schedule": number; - "userCreated": number; - "validateShelveset": number; - "checkInShelveset": number; - "triggered": number; - "all": number; - }; - }; - BuildReference: { - fields: any; - }; - BuildReportMetadata: { - fields: any; - }; - BuildRepository: { - fields: any; - }; - BuildRequestValidationResult: { - fields: any; - }; - BuildResourceUsage: { - fields: any; - }; - BuildResult: { - enumValues: { - "none": number; - "succeeded": number; - "partiallySucceeded": number; - "failed": number; - "canceled": number; - }; - }; - BuildServer: { - fields: any; - }; - BuildSettings: { - fields: any; - }; - BuildStartedEvent: { - fields: any; - }; - BuildStatus: { - enumValues: { - "none": number; - "inProgress": number; - "completed": number; - "cancelling": number; - "postponed": number; - "notStarted": number; - "all": number; - }; - }; - BuildSummary: { - fields: any; - }; - BuildTrigger: { - fields: any; - }; - BuildUpdatedEvent: { - fields: any; - }; - BuildWorkspace: { - fields: any; - }; - Change: { - fields: any; - }; - ConsoleLogEvent: { - fields: any; - }; - ContinuousDeploymentDefinition: { - fields: any; - }; - ContinuousIntegrationTrigger: { - fields: any; - }; - ControllerStatus: { - enumValues: { - "unavailable": number; - "available": number; - "offline": number; - }; - }; - DefinitionQuality: { - enumValues: { - "definition": number; - "draft": number; - }; - }; - DefinitionQueryOrder: { - enumValues: { - "none": number; - "lastModifiedAscending": number; - "lastModifiedDescending": number; - "definitionNameAscending": number; - "definitionNameDescending": number; - }; - }; - DefinitionQueueStatus: { - enumValues: { - "enabled": number; - "paused": number; - "disabled": number; - }; - }; - DefinitionReference: { - fields: any; - }; - DefinitionTriggerType: { - enumValues: { - "none": number; - "continuousIntegration": number; - "batchedContinuousIntegration": number; - "schedule": number; - "gatedCheckIn": number; - "batchedGatedCheckIn": number; - "all": number; - }; - }; - DefinitionType: { - enumValues: { - "xaml": number; - "build": number; - }; - }; - DeleteOptions: { - enumValues: { - "none": number; - "dropLocation": number; - "testResults": number; - "label": number; - "details": number; - "symbols": number; - "all": number; - }; - }; - Deployment: { - fields: any; - }; - DeploymentBuild: { - fields: any; - }; - DeploymentDeploy: { - fields: any; - }; - DeploymentTest: { - fields: any; - }; - GatedCheckInTrigger: { - fields: any; - }; - GetOption: { - enumValues: { - "latestOnQueue": number; - "latestOnBuild": number; - "custom": number; - }; - }; - InformationNode: { - fields: any; - }; - Issue: { - fields: any; - }; - IssueType: { - enumValues: { - "error": number; - "warning": number; - }; - }; - MappingDetails: { - fields: any; - }; - ProcessTemplateType: { - enumValues: { - "custom": number; - "default": number; - "upgrade": number; - }; - }; - PropertyValue: { - fields: any; - }; - QueryDeletedOption: { - enumValues: { - "excludeDeleted": number; - "includeDeleted": number; - "onlyDeleted": number; - }; - }; - QueueOptions: { - enumValues: { - "none": number; - "doNotRun": number; - }; - }; - QueuePriority: { - enumValues: { - "low": number; - "belowNormal": number; - "normal": number; - "aboveNormal": number; - "high": number; - }; - }; - RealtimeBuildEvent: { - fields: any; - }; - RequestReference: { - fields: any; - }; - RetentionPolicy: { - fields: any; - }; - Schedule: { - fields: any; - }; - ScheduleDays: { - enumValues: { - "none": number; - "monday": number; - "tuesday": number; - "wednesday": number; - "thursday": number; - "friday": number; - "saturday": number; - "sunday": number; - "all": number; - }; - }; - ScheduleTrigger: { - fields: any; - }; - ServiceHostStatus: { - enumValues: { - "online": number; - "offline": number; - }; - }; - ShallowReference: { - fields: any; - }; - SvnMappingDetails: { - fields: any; - }; - SvnWorkspace: { - fields: any; - }; - TaskAgentPoolReference: { - fields: any; - }; - TaskDefinitionReference: { - fields: any; - }; - TaskOrchestrationPlanReference: { - fields: any; - }; - TaskResult: { - enumValues: { - "succeeded": number; - "succeededWithIssues": number; - "failed": number; - "canceled": number; - "skipped": number; - "abandoned": number; - }; - }; - Timeline: { - fields: any; - }; - TimelineRecord: { - fields: any; - }; - TimelineRecordState: { - enumValues: { - "pending": number; - "inProgress": number; - "completed": number; - }; - }; - TimelineRecordsUpdatedEvent: { - fields: any; - }; - TimelineReference: { - fields: any; - }; - ValidationResult: { - enumValues: { - "oK": number; - "warning": number; - "error": number; - }; - }; - WorkspaceMapping: { - fields: any; - }; - WorkspaceMappingType: { - enumValues: { - "map": number; - "cloak": number; - }; - }; - WorkspaceTemplate: { - fields: any; - }; - XamlBuildDefinition: { - fields: any; - }; - }; - -} -declare module 'vso-node-api/BuildApi' { - - - import Q = require('q'); - import basem = require('vso-node-api/ClientApiBases'); - import VsoBaseInterfaces = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); - import BuildInterfaces = require('vso-node-api/interfaces/BuildInterfaces'); - import VSSInterfaces = require('vso-node-api/interfaces/common/VSSInterfaces'); - export interface IBuildApi extends basem.ClientApiBase { - createArtifact(artifact: BuildInterfaces.BuildArtifact, buildId: number, project: string, onResult: (err: any, statusCode: number, artifact: BuildInterfaces.BuildArtifact) => void): void; - getArtifact(buildId: number, artifactName: string, project: string, onResult: (err: any, statusCode: number, artifact: BuildInterfaces.BuildArtifact) => void): void; - getArtifactContentZip(buildId: number, artifactName: string, project: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - getArtifacts(buildId: number, project: string, onResult: (err: any, statusCode: number, artifacts: BuildInterfaces.BuildArtifact[]) => void): void; - getBadge(project: string, definitionId: number, branchName: string, onResult: (err: any, statusCode: number, badge: string) => void): void; - getBuildBadge(project: string, repoType: string, repoId: string, branchName: string, onResult: (err: any, statusCode: number, buildbadge: BuildInterfaces.BuildBadge) => void): void; - getBuildBadgeData(project: string, repoType: string, repoId: string, branchName: string, onResult: (err: any, statusCode: number, buildbadge: string) => void): void; - deleteBuild(buildId: number, project: string, onResult: (err: any, statusCode: number) => void): void; - getBuild(buildId: number, project: string, propertyFilters: string, onResult: (err: any, statusCode: number, build: BuildInterfaces.Build) => void): void; - getBuilds(project: string, definitions: number[], queues: number[], buildNumber: string, minFinishTime: Date, maxFinishTime: Date, requestedFor: string, reasonFilter: BuildInterfaces.BuildReason, statusFilter: BuildInterfaces.BuildStatus, resultFilter: BuildInterfaces.BuildResult, tagFilters: string[], properties: string[], type: BuildInterfaces.DefinitionType, top: number, continuationToken: string, maxBuildsPerDefinition: number, deletedFilter: BuildInterfaces.QueryDeletedOption, queryOrder: BuildInterfaces.BuildQueryOrder, branchName: string, onResult: (err: any, statusCode: number, builds: BuildInterfaces.Build[]) => void): void; - queueBuild(build: BuildInterfaces.Build, project: string, ignoreWarnings: boolean, checkInTicket: string, onResult: (err: any, statusCode: number, build: BuildInterfaces.Build) => void): void; - updateBuild(build: BuildInterfaces.Build, buildId: number, project: string, onResult: (err: any, statusCode: number, build: BuildInterfaces.Build) => void): void; - getBuildChanges(project: string, buildId: number, continuationToken: string, top: number, includeSourceChange: boolean, onResult: (err: any, statusCode: number, changes: BuildInterfaces.Change[]) => void): void; - getChangesBetweenBuilds(project: string, fromBuildId: number, toBuildId: number, top: number, onResult: (err: any, statusCode: number, changes: BuildInterfaces.Change[]) => void): void; - getBuildController(controllerId: number, onResult: (err: any, statusCode: number, Controller: BuildInterfaces.BuildController) => void): void; - getBuildControllers(name: string, onResult: (err: any, statusCode: number, Controllers: BuildInterfaces.BuildController[]) => void): void; - createDefinition(definition: BuildInterfaces.BuildDefinition, project: string, definitionToCloneId: number, definitionToCloneRevision: number, onResult: (err: any, statusCode: number, definition: BuildInterfaces.BuildDefinition) => void): void; - deleteDefinition(definitionId: number, project: string, onResult: (err: any, statusCode: number) => void): void; - getDefinition(definitionId: number, project: string, revision: number, propertyFilters: string[], onResult: (err: any, statusCode: number, definition: BuildInterfaces.DefinitionReference) => void): void; - getDefinitions(project: string, name: string, type: BuildInterfaces.DefinitionType, repositoryId: string, repositoryType: string, queryOrder: BuildInterfaces.DefinitionQueryOrder, top: number, continuationToken: string, onResult: (err: any, statusCode: number, definitions: BuildInterfaces.DefinitionReference[]) => void): void; - updateDefinition(definition: BuildInterfaces.BuildDefinition, definitionId: number, project: string, secretsSourceDefinitionId: number, secretsSourceDefinitionRevision: number, onResult: (err: any, statusCode: number, definition: BuildInterfaces.BuildDefinition) => void): void; - getBuildDeployments(project: string, buildId: number, onResult: (err: any, statusCode: number, deployments: BuildInterfaces.Deployment[]) => void): void; - getBuildLog(project: string, buildId: number, logId: number, startLine: number, endLine: number, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - getBuildLogs(project: string, buildId: number, onResult: (err: any, statusCode: number, logs: BuildInterfaces.BuildLog[]) => void): void; - getBuildLogsZip(project: string, buildId: number, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - getBuildOptionDefinitions(project: string, onResult: (err: any, statusCode: number, options: BuildInterfaces.BuildOptionDefinition[]) => void): void; - createQueue(queue: BuildInterfaces.AgentPoolQueue, onResult: (err: any, statusCode: number, queue: BuildInterfaces.AgentPoolQueue) => void): void; - deleteQueue(id: number, onResult: (err: any, statusCode: number) => void): void; - getAgentPoolQueue(controllerId: number, onResult: (err: any, statusCode: number, queue: BuildInterfaces.AgentPoolQueue) => void): void; - getQueues(name: string, onResult: (err: any, statusCode: number, queues: BuildInterfaces.AgentPoolQueue[]) => void): void; - getBuildReport(project: string, buildId: number, type: string, onResult: (err: any, statusCode: number, report: BuildInterfaces.BuildReportMetadata) => void): void; - getBuildReportHtmlContent(project: string, buildId: number, type: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - getResourceUsage(onResult: (err: any, statusCode: number, ResourceUsage: BuildInterfaces.BuildResourceUsage) => void): void; - getDefinitionRevisions(project: string, definitionId: number, onResult: (err: any, statusCode: number, revisions: BuildInterfaces.BuildDefinitionRevision[]) => void): void; - getBuildSettings(onResult: (err: any, statusCode: number, setting: BuildInterfaces.BuildSettings) => void): void; - updateBuildSettings(settings: BuildInterfaces.BuildSettings, onResult: (err: any, statusCode: number, setting: BuildInterfaces.BuildSettings) => void): void; - addBuildTag(project: string, buildId: number, tag: string, onResult: (err: any, statusCode: number, tags: string[]) => void): void; - addBuildTags(tags: string[], project: string, buildId: number, onResult: (err: any, statusCode: number, tags: string[]) => void): void; - deleteBuildTag(project: string, buildId: number, tag: string, onResult: (err: any, statusCode: number, tags: string[]) => void): void; - getBuildTags(project: string, buildId: number, onResult: (err: any, statusCode: number, tags: string[]) => void): void; - getTags(project: string, onResult: (err: any, statusCode: number, tags: string[]) => void): void; - deleteTemplate(project: string, templateId: string, onResult: (err: any, statusCode: number) => void): void; - getTemplate(project: string, templateId: string, onResult: (err: any, statusCode: number, template: BuildInterfaces.BuildDefinitionTemplate) => void): void; - getTemplates(project: string, onResult: (err: any, statusCode: number, templates: BuildInterfaces.BuildDefinitionTemplate[]) => void): void; - saveTemplate(template: BuildInterfaces.BuildDefinitionTemplate, project: string, templateId: string, onResult: (err: any, statusCode: number, template: BuildInterfaces.BuildDefinitionTemplate) => void): void; - getBuildTimeline(project: string, buildId: number, timelineId: string, changeId: number, onResult: (err: any, statusCode: number, Timeline: BuildInterfaces.Timeline) => void): void; - getBuildWorkItemsRefs(project: string, buildId: number, top: number, onResult: (err: any, statusCode: number, workitems: VSSInterfaces.ResourceRef[]) => void): void; - getBuildWorkItemsRefsFromCommits(commitIds: string[], project: string, buildId: number, top: number, onResult: (err: any, statusCode: number, workitems: VSSInterfaces.ResourceRef[]) => void): void; - getWorkItemsBetweenBuilds(project: string, fromBuildId: number, toBuildId: number, top: number, onResult: (err: any, statusCode: number, workitems: VSSInterfaces.ResourceRef[]) => void): void; - } - export interface IBuildApi extends basem.QClientApiBase { - createArtifact(artifact: BuildInterfaces.BuildArtifact, buildId: number, project?: string): Promise; - getArtifact(buildId: number, artifactName: string, project?: string): Promise; - getArtifactContentZip(buildId: number, artifactName: string, project?: string): Promise; - getArtifacts(buildId: number, project?: string): Promise; - getBadge(project: string, definitionId: number, branchName?: string): Promise; - getBuildBadge(project: string, repoType: string, repoId?: string, branchName?: string): Promise; - getBuildBadgeData(project: string, repoType: string, repoId?: string, branchName?: string): Promise; - deleteBuild(buildId: number, project?: string): Promise; - getBuild(buildId: number, project?: string, propertyFilters?: string): Promise; - getBuilds(project?: string, definitions?: number[], queues?: number[], buildNumber?: string, minFinishTime?: Date, maxFinishTime?: Date, requestedFor?: string, reasonFilter?: BuildInterfaces.BuildReason, statusFilter?: BuildInterfaces.BuildStatus, resultFilter?: BuildInterfaces.BuildResult, tagFilters?: string[], properties?: string[], type?: BuildInterfaces.DefinitionType, top?: number, continuationToken?: string, maxBuildsPerDefinition?: number, deletedFilter?: BuildInterfaces.QueryDeletedOption, queryOrder?: BuildInterfaces.BuildQueryOrder, branchName?: string): Promise; - queueBuild(build: BuildInterfaces.Build, project?: string, ignoreWarnings?: boolean, checkInTicket?: string): Promise; - updateBuild(build: BuildInterfaces.Build, buildId: number, project?: string): Promise; - getBuildChanges(project: string, buildId: number, continuationToken?: string, top?: number, includeSourceChange?: boolean): Promise; - getChangesBetweenBuilds(project: string, fromBuildId?: number, toBuildId?: number, top?: number): Promise; - getBuildController(controllerId: number): Promise; - getBuildControllers(name?: string): Promise; - createDefinition(definition: BuildInterfaces.BuildDefinition, project?: string, definitionToCloneId?: number, definitionToCloneRevision?: number): Promise; - deleteDefinition(definitionId: number, project?: string): Promise; - getDefinition(definitionId: number, project?: string, revision?: number, propertyFilters?: string[]): Promise; - getDefinitions(project?: string, name?: string, type?: BuildInterfaces.DefinitionType, repositoryId?: string, repositoryType?: string, queryOrder?: BuildInterfaces.DefinitionQueryOrder, top?: number, continuationToken?: string): Promise; - updateDefinition(definition: BuildInterfaces.BuildDefinition, definitionId: number, project?: string, secretsSourceDefinitionId?: number, secretsSourceDefinitionRevision?: number): Promise; - getBuildDeployments(project: string, buildId: number): Promise; - getBuildLog(project: string, buildId: number, logId: number, startLine?: number, endLine?: number): Promise; - getBuildLogs(project: string, buildId: number): Promise; - getBuildLogsZip(project: string, buildId: number): Promise; - getBuildOptionDefinitions(project?: string): Promise; - createQueue(queue: BuildInterfaces.AgentPoolQueue): Promise; - deleteQueue(id: number): Promise; - getAgentPoolQueue(controllerId: number): Promise; - getQueues(name?: string): Promise; - getBuildReport(project: string, buildId: number, type?: string): Promise; - getBuildReportHtmlContent(project: string, buildId: number, type?: string): Promise; - getResourceUsage(): Promise; - getDefinitionRevisions(project: string, definitionId: number): Promise; - getBuildSettings(): Promise; - updateBuildSettings(settings: BuildInterfaces.BuildSettings): Promise; - addBuildTag(project: string, buildId: number, tag: string): Promise; - addBuildTags(tags: string[], project: string, buildId: number): Promise; - deleteBuildTag(project: string, buildId: number, tag: string): Promise; - getBuildTags(project: string, buildId: number): Promise; - getTags(project: string): Promise; - deleteTemplate(project: string, templateId: string): Promise; - getTemplate(project: string, templateId: string): Promise; - getTemplates(project: string): Promise; - saveTemplate(template: BuildInterfaces.BuildDefinitionTemplate, project: string, templateId: string): Promise; - getBuildTimeline(project: string, buildId: number, timelineId?: string, changeId?: number): Promise; - getBuildWorkItemsRefs(project: string, buildId: number, top?: number): Promise; - getBuildWorkItemsRefsFromCommits(commitIds: string[], project: string, buildId: number, top?: number): Promise; - getWorkItemsBetweenBuilds(project: string, fromBuildId: number, toBuildId: number, top?: number): Promise; - } - export class BuildApi extends basem.ClientApiBase implements IBuildApi { - constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); - /** - * Associates an artifact with a build - * - * @param {BuildInterfaces.BuildArtifact} artifact - * @param {number} buildId - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting BuildInterfaces.BuildArtifact - */ - createArtifact(artifact: BuildInterfaces.BuildArtifact, buildId: number, project: string, onResult: (err: any, statusCode: number, artifact: BuildInterfaces.BuildArtifact) => void): void; - /** - * Gets a specific artifact for a build - * - * @param {number} buildId - * @param {string} artifactName - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting BuildInterfaces.BuildArtifact - */ - getArtifact(buildId: number, artifactName: string, project: string, onResult: (err: any, statusCode: number, artifact: BuildInterfaces.BuildArtifact) => void): void; - /** - * Gets a specific artifact for a build - * - * @param {number} buildId - * @param {string} artifactName - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting ArrayBuffer - */ - getArtifactContentZip(buildId: number, artifactName: string, project: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * Gets all artifacts for a build - * - * @param {number} buildId - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting BuildInterfaces.BuildArtifact[] - */ - getArtifacts(buildId: number, project: string, onResult: (err: any, statusCode: number, artifacts: BuildInterfaces.BuildArtifact[]) => void): void; - /** - * @param {string} project - * @param {number} definitionId - * @param {string} branchName - * @param onResult callback function with the resulting string - */ - getBadge(project: string, definitionId: number, branchName: string, onResult: (err: any, statusCode: number, badge: string) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {string} repoType - * @param {string} repoId - * @param {string} branchName - * @param onResult callback function with the resulting BuildInterfaces.BuildBadge - */ - getBuildBadge(project: string, repoType: string, repoId: string, branchName: string, onResult: (err: any, statusCode: number, buildbadge: BuildInterfaces.BuildBadge) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {string} repoType - * @param {string} repoId - * @param {string} branchName - * @param onResult callback function with the resulting string - */ - getBuildBadgeData(project: string, repoType: string, repoId: string, branchName: string, onResult: (err: any, statusCode: number, buildbadge: string) => void): void; - /** - * Deletes a build - * - * @param {number} buildId - * @param {string} project - Project ID or project name - * @param onResult callback function - */ - deleteBuild(buildId: number, project: string, onResult: (err: any, statusCode: number) => void): void; - /** - * Gets a build - * - * @param {number} buildId - * @param {string} project - Project ID or project name - * @param {string} propertyFilters - A comma-delimited list of properties to include in the results - * @param onResult callback function with the resulting BuildInterfaces.Build - */ - getBuild(buildId: number, project: string, propertyFilters: string, onResult: (err: any, statusCode: number, build: BuildInterfaces.Build) => void): void; - /** - * Gets builds - * - * @param {string} project - Project ID or project name - * @param {number[]} definitions - A comma-delimited list of definition ids - * @param {number[]} queues - A comma-delimited list of queue ids - * @param {string} buildNumber - * @param {Date} minFinishTime - * @param {Date} maxFinishTime - * @param {string} requestedFor - * @param {BuildInterfaces.BuildReason} reasonFilter - * @param {BuildInterfaces.BuildStatus} statusFilter - * @param {BuildInterfaces.BuildResult} resultFilter - * @param {string[]} tagFilters - A comma-delimited list of tags - * @param {string[]} properties - A comma-delimited list of properties to include in the results - * @param {BuildInterfaces.DefinitionType} type - The definition type - * @param {number} top - The maximum number of builds to retrieve - * @param {string} continuationToken - * @param {number} maxBuildsPerDefinition - * @param {BuildInterfaces.QueryDeletedOption} deletedFilter - * @param {BuildInterfaces.BuildQueryOrder} queryOrder - * @param {string} branchName - * @param onResult callback function with the resulting BuildInterfaces.Build[] - */ - getBuilds(project: string, definitions: number[], queues: number[], buildNumber: string, minFinishTime: Date, maxFinishTime: Date, requestedFor: string, reasonFilter: BuildInterfaces.BuildReason, statusFilter: BuildInterfaces.BuildStatus, resultFilter: BuildInterfaces.BuildResult, tagFilters: string[], properties: string[], type: BuildInterfaces.DefinitionType, top: number, continuationToken: string, maxBuildsPerDefinition: number, deletedFilter: BuildInterfaces.QueryDeletedOption, queryOrder: BuildInterfaces.BuildQueryOrder, branchName: string, onResult: (err: any, statusCode: number, builds: BuildInterfaces.Build[]) => void): void; - /** - * Queues a build - * - * @param {BuildInterfaces.Build} build - * @param {string} project - Project ID or project name - * @param {boolean} ignoreWarnings - * @param {string} checkInTicket - * @param onResult callback function with the resulting BuildInterfaces.Build - */ - queueBuild(build: BuildInterfaces.Build, project: string, ignoreWarnings: boolean, checkInTicket: string, onResult: (err: any, statusCode: number, build: BuildInterfaces.Build) => void): void; - /** - * Updates a build - * - * @param {BuildInterfaces.Build} build - * @param {number} buildId - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting BuildInterfaces.Build - */ - updateBuild(build: BuildInterfaces.Build, buildId: number, project: string, onResult: (err: any, statusCode: number, build: BuildInterfaces.Build) => void): void; - /** - * Gets the changes associated with a build - * - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {string} continuationToken - * @param {number} top - The maximum number of changes to return - * @param {boolean} includeSourceChange - * @param onResult callback function with the resulting BuildInterfaces.Change[] - */ - getBuildChanges(project: string, buildId: number, continuationToken: string, top: number, includeSourceChange: boolean, onResult: (err: any, statusCode: number, changes: BuildInterfaces.Change[]) => void): void; - /** - * Gets the changes associated between given builds - * - * @param {string} project - Project ID or project name - * @param {number} fromBuildId - * @param {number} toBuildId - * @param {number} top - The maximum number of changes to return - * @param onResult callback function with the resulting BuildInterfaces.Change[] - */ - getChangesBetweenBuilds(project: string, fromBuildId: number, toBuildId: number, top: number, onResult: (err: any, statusCode: number, changes: BuildInterfaces.Change[]) => void): void; - /** - * Gets a controller - * - * @param {number} controllerId - * @param onResult callback function with the resulting BuildInterfaces.BuildController - */ - getBuildController(controllerId: number, onResult: (err: any, statusCode: number, Controller: BuildInterfaces.BuildController) => void): void; - /** - * Gets controller, optionally filtered by name - * - * @param {string} name - * @param onResult callback function with the resulting BuildInterfaces.BuildController[] - */ - getBuildControllers(name: string, onResult: (err: any, statusCode: number, Controllers: BuildInterfaces.BuildController[]) => void): void; - /** - * Creates a new definition - * - * @param {BuildInterfaces.BuildDefinition} definition - * @param {string} project - Project ID or project name - * @param {number} definitionToCloneId - * @param {number} definitionToCloneRevision - * @param onResult callback function with the resulting BuildInterfaces.BuildDefinition - */ - createDefinition(definition: BuildInterfaces.BuildDefinition, project: string, definitionToCloneId: number, definitionToCloneRevision: number, onResult: (err: any, statusCode: number, definition: BuildInterfaces.BuildDefinition) => void): void; - /** - * Deletes a definition and all associated builds - * - * @param {number} definitionId - * @param {string} project - Project ID or project name - * @param onResult callback function - */ - deleteDefinition(definitionId: number, project: string, onResult: (err: any, statusCode: number) => void): void; - /** - * Gets a definition, optionally at a specific revision - * - * @param {number} definitionId - * @param {string} project - Project ID or project name - * @param {number} revision - * @param {string[]} propertyFilters - * @param onResult callback function with the resulting BuildInterfaces.DefinitionReference - */ - getDefinition(definitionId: number, project: string, revision: number, propertyFilters: string[], onResult: (err: any, statusCode: number, definition: BuildInterfaces.DefinitionReference) => void): void; - /** - * Gets definitions, optionally filtered by name - * - * @param {string} project - Project ID or project name - * @param {string} name - * @param {BuildInterfaces.DefinitionType} type - * @param {string} repositoryId - * @param {string} repositoryType - * @param {BuildInterfaces.DefinitionQueryOrder} queryOrder - * @param {number} top - * @param {string} continuationToken - * @param onResult callback function with the resulting BuildInterfaces.DefinitionReference[] - */ - getDefinitions(project: string, name: string, type: BuildInterfaces.DefinitionType, repositoryId: string, repositoryType: string, queryOrder: BuildInterfaces.DefinitionQueryOrder, top: number, continuationToken: string, onResult: (err: any, statusCode: number, definitions: BuildInterfaces.DefinitionReference[]) => void): void; - /** - * Updates an existing definition - * - * @param {BuildInterfaces.BuildDefinition} definition - * @param {number} definitionId - * @param {string} project - Project ID or project name - * @param {number} secretsSourceDefinitionId - * @param {number} secretsSourceDefinitionRevision - * @param onResult callback function with the resulting BuildInterfaces.BuildDefinition - */ - updateDefinition(definition: BuildInterfaces.BuildDefinition, definitionId: number, project: string, secretsSourceDefinitionId: number, secretsSourceDefinitionRevision: number, onResult: (err: any, statusCode: number, definition: BuildInterfaces.BuildDefinition) => void): void; - /** - * Gets the deployment information associated with a build - * - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param onResult callback function with the resulting BuildInterfaces.Deployment[] - */ - getBuildDeployments(project: string, buildId: number, onResult: (err: any, statusCode: number, deployments: BuildInterfaces.Deployment[]) => void): void; - /** - * Gets a log - * - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {number} logId - * @param {number} startLine - * @param {number} endLine - * @param onResult callback function with the resulting ArrayBuffer - */ - getBuildLog(project: string, buildId: number, logId: number, startLine: number, endLine: number, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * Gets logs for a build - * - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param onResult callback function with the resulting BuildInterfaces.BuildLog[] - */ - getBuildLogs(project: string, buildId: number, onResult: (err: any, statusCode: number, logs: BuildInterfaces.BuildLog[]) => void): void; - /** - * Gets logs for a build - * - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param onResult callback function with the resulting ArrayBuffer - */ - getBuildLogsZip(project: string, buildId: number, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting BuildInterfaces.BuildOptionDefinition[] - */ - getBuildOptionDefinitions(project: string, onResult: (err: any, statusCode: number, options: BuildInterfaces.BuildOptionDefinition[]) => void): void; - /** - * Creates a build queue - * - * @param {BuildInterfaces.AgentPoolQueue} queue - * @param onResult callback function with the resulting BuildInterfaces.AgentPoolQueue - */ - createQueue(queue: BuildInterfaces.AgentPoolQueue, onResult: (err: any, statusCode: number, queue: BuildInterfaces.AgentPoolQueue) => void): void; - /** - * Deletes a build queue - * - * @param {number} id - * @param onResult callback function - */ - deleteQueue(id: number, onResult: (err: any, statusCode: number) => void): void; - /** - * Gets a queue - * - * @param {number} controllerId - * @param onResult callback function with the resulting BuildInterfaces.AgentPoolQueue - */ - getAgentPoolQueue(controllerId: number, onResult: (err: any, statusCode: number, queue: BuildInterfaces.AgentPoolQueue) => void): void; - /** - * Gets queues, optionally filtered by name - * - * @param {string} name - * @param onResult callback function with the resulting BuildInterfaces.AgentPoolQueue[] - */ - getQueues(name: string, onResult: (err: any, statusCode: number, queues: BuildInterfaces.AgentPoolQueue[]) => void): void; - /** - * Gets report for a build - * - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {string} type - * @param onResult callback function with the resulting BuildInterfaces.BuildReportMetadata - */ - getBuildReport(project: string, buildId: number, type: string, onResult: (err: any, statusCode: number, report: BuildInterfaces.BuildReportMetadata) => void): void; - /** - * Gets report for a build - * - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {string} type - * @param onResult callback function with the resulting any - */ - getBuildReportHtmlContent(project: string, buildId: number, type: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * @param onResult callback function with the resulting BuildInterfaces.BuildResourceUsage - */ - getResourceUsage(onResult: (err: any, statusCode: number, ResourceUsage: BuildInterfaces.BuildResourceUsage) => void): void; - /** - * Gets revisions of a definition - * - * @param {string} project - Project ID or project name - * @param {number} definitionId - * @param onResult callback function with the resulting BuildInterfaces.BuildDefinitionRevision[] - */ - getDefinitionRevisions(project: string, definitionId: number, onResult: (err: any, statusCode: number, revisions: BuildInterfaces.BuildDefinitionRevision[]) => void): void; - /** - * @param onResult callback function with the resulting BuildInterfaces.BuildSettings - */ - getBuildSettings(onResult: (err: any, statusCode: number, setting: BuildInterfaces.BuildSettings) => void): void; - /** - * Updates the build settings - * - * @param {BuildInterfaces.BuildSettings} settings - * @param onResult callback function with the resulting BuildInterfaces.BuildSettings - */ - updateBuildSettings(settings: BuildInterfaces.BuildSettings, onResult: (err: any, statusCode: number, setting: BuildInterfaces.BuildSettings) => void): void; - /** - * Adds a tag to a build - * - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {string} tag - * @param onResult callback function with the resulting string[] - */ - addBuildTag(project: string, buildId: number, tag: string, onResult: (err: any, statusCode: number, tags: string[]) => void): void; - /** - * Adds tag to a build - * - * @param {string[]} tags - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param onResult callback function with the resulting string[] - */ - addBuildTags(tags: string[], project: string, buildId: number, onResult: (err: any, statusCode: number, tags: string[]) => void): void; - /** - * Deletes a tag from a build - * - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {string} tag - * @param onResult callback function with the resulting string[] - */ - deleteBuildTag(project: string, buildId: number, tag: string, onResult: (err: any, statusCode: number, tags: string[]) => void): void; - /** - * Gets the tags for a build - * - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param onResult callback function with the resulting string[] - */ - getBuildTags(project: string, buildId: number, onResult: (err: any, statusCode: number, tags: string[]) => void): void; - /** - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting string[] - */ - getTags(project: string, onResult: (err: any, statusCode: number, tags: string[]) => void): void; - /** - * Deletes a definition template - * - * @param {string} project - Project ID or project name - * @param {string} templateId - * @param onResult callback function - */ - deleteTemplate(project: string, templateId: string, onResult: (err: any, statusCode: number) => void): void; - /** - * Gets definition template filtered by id - * - * @param {string} project - Project ID or project name - * @param {string} templateId - * @param onResult callback function with the resulting BuildInterfaces.BuildDefinitionTemplate - */ - getTemplate(project: string, templateId: string, onResult: (err: any, statusCode: number, template: BuildInterfaces.BuildDefinitionTemplate) => void): void; - /** - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting BuildInterfaces.BuildDefinitionTemplate[] - */ - getTemplates(project: string, onResult: (err: any, statusCode: number, templates: BuildInterfaces.BuildDefinitionTemplate[]) => void): void; - /** - * Saves a definition template - * - * @param {BuildInterfaces.BuildDefinitionTemplate} template - * @param {string} project - Project ID or project name - * @param {string} templateId - * @param onResult callback function with the resulting BuildInterfaces.BuildDefinitionTemplate - */ - saveTemplate(template: BuildInterfaces.BuildDefinitionTemplate, project: string, templateId: string, onResult: (err: any, statusCode: number, template: BuildInterfaces.BuildDefinitionTemplate) => void): void; - /** - * Gets details for a build - * - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {string} timelineId - * @param {number} changeId - * @param onResult callback function with the resulting BuildInterfaces.Timeline - */ - getBuildTimeline(project: string, buildId: number, timelineId: string, changeId: number, onResult: (err: any, statusCode: number, Timeline: BuildInterfaces.Timeline) => void): void; - /** - * Gets the work item ids associated with a build - * - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {number} top - The maximum number of workitems to return - * @param onResult callback function with the resulting VSSInterfaces.ResourceRef[] - */ - getBuildWorkItemsRefs(project: string, buildId: number, top: number, onResult: (err: any, statusCode: number, workitems: VSSInterfaces.ResourceRef[]) => void): void; - /** - * Gets the work item ids associated with build commits - * - * @param {string[]} commitIds - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {number} top - The maximum number of workitems to return, also number of commits to consider if commitids are not sent - * @param onResult callback function with the resulting VSSInterfaces.ResourceRef[] - */ - getBuildWorkItemsRefsFromCommits(commitIds: string[], project: string, buildId: number, top: number, onResult: (err: any, statusCode: number, workitems: VSSInterfaces.ResourceRef[]) => void): void; - /** - * Gets all the work item ids inbetween fromBuildId to toBuildId - * - * @param {string} project - Project ID or project name - * @param {number} fromBuildId - * @param {number} toBuildId - * @param {number} top - The maximum number of workitems to return - * @param onResult callback function with the resulting VSSInterfaces.ResourceRef[] - */ - getWorkItemsBetweenBuilds(project: string, fromBuildId: number, toBuildId: number, top: number, onResult: (err: any, statusCode: number, workitems: VSSInterfaces.ResourceRef[]) => void): void; - } - export class QBuildApi extends basem.QClientApiBase implements IBuildApi { - api: BuildApi; - constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); - /** - * Associates an artifact with a build - * - * @param {BuildInterfaces.BuildArtifact} artifact - * @param {number} buildId - * @param {string} project - Project ID or project name - */ - createArtifact(artifact: BuildInterfaces.BuildArtifact, buildId: number, project?: string): Promise; - /** - * Gets a specific artifact for a build - * - * @param {number} buildId - * @param {string} artifactName - * @param {string} project - Project ID or project name - */ - getArtifact(buildId: number, artifactName: string, project?: string): Promise; - /** - * Gets a specific artifact for a build - * - * @param {number} buildId - * @param {string} artifactName - * @param {string} project - Project ID or project name - */ - getArtifactContentZip(buildId: number, artifactName: string, project?: string): Promise; - /** - * Gets all artifacts for a build - * - * @param {number} buildId - * @param {string} project - Project ID or project name - */ - getArtifacts(buildId: number, project?: string): Promise; - /** - * @param {string} project - * @param {number} definitionId - * @param {string} branchName - */ - getBadge(project: string, definitionId: number, branchName?: string): Promise; - /** - * @param {string} project - Project ID or project name - * @param {string} repoType - * @param {string} repoId - * @param {string} branchName - */ - getBuildBadge(project: string, repoType: string, repoId?: string, branchName?: string): Promise; - /** - * @param {string} project - Project ID or project name - * @param {string} repoType - * @param {string} repoId - * @param {string} branchName - */ - getBuildBadgeData(project: string, repoType: string, repoId?: string, branchName?: string): Promise; - /** - * Deletes a build - * - * @param {number} buildId - * @param {string} project - Project ID or project name - */ - deleteBuild(buildId: number, project?: string): Promise; - /** - * Gets a build - * - * @param {number} buildId - * @param {string} project - Project ID or project name - * @param {string} propertyFilters - A comma-delimited list of properties to include in the results - */ - getBuild(buildId: number, project?: string, propertyFilters?: string): Promise; - /** - * Gets builds - * - * @param {string} project - Project ID or project name - * @param {number[]} definitions - A comma-delimited list of definition ids - * @param {number[]} queues - A comma-delimited list of queue ids - * @param {string} buildNumber - * @param {Date} minFinishTime - * @param {Date} maxFinishTime - * @param {string} requestedFor - * @param {BuildInterfaces.BuildReason} reasonFilter - * @param {BuildInterfaces.BuildStatus} statusFilter - * @param {BuildInterfaces.BuildResult} resultFilter - * @param {string[]} tagFilters - A comma-delimited list of tags - * @param {string[]} properties - A comma-delimited list of properties to include in the results - * @param {BuildInterfaces.DefinitionType} type - The definition type - * @param {number} top - The maximum number of builds to retrieve - * @param {string} continuationToken - * @param {number} maxBuildsPerDefinition - * @param {BuildInterfaces.QueryDeletedOption} deletedFilter - * @param {BuildInterfaces.BuildQueryOrder} queryOrder - * @param {string} branchName - */ - getBuilds(project?: string, definitions?: number[], queues?: number[], buildNumber?: string, minFinishTime?: Date, maxFinishTime?: Date, requestedFor?: string, reasonFilter?: BuildInterfaces.BuildReason, statusFilter?: BuildInterfaces.BuildStatus, resultFilter?: BuildInterfaces.BuildResult, tagFilters?: string[], properties?: string[], type?: BuildInterfaces.DefinitionType, top?: number, continuationToken?: string, maxBuildsPerDefinition?: number, deletedFilter?: BuildInterfaces.QueryDeletedOption, queryOrder?: BuildInterfaces.BuildQueryOrder, branchName?: string): Promise; - /** - * Queues a build - * - * @param {BuildInterfaces.Build} build - * @param {string} project - Project ID or project name - * @param {boolean} ignoreWarnings - * @param {string} checkInTicket - */ - queueBuild(build: BuildInterfaces.Build, project?: string, ignoreWarnings?: boolean, checkInTicket?: string): Promise; - /** - * Updates a build - * - * @param {BuildInterfaces.Build} build - * @param {number} buildId - * @param {string} project - Project ID or project name - */ - updateBuild(build: BuildInterfaces.Build, buildId: number, project?: string): Promise; - /** - * Gets the changes associated with a build - * - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {string} continuationToken - * @param {number} top - The maximum number of changes to return - * @param {boolean} includeSourceChange - */ - getBuildChanges(project: string, buildId: number, continuationToken?: string, top?: number, includeSourceChange?: boolean): Promise; - /** - * Gets the changes associated between given builds - * - * @param {string} project - Project ID or project name - * @param {number} fromBuildId - * @param {number} toBuildId - * @param {number} top - The maximum number of changes to return - */ - getChangesBetweenBuilds(project: string, fromBuildId?: number, toBuildId?: number, top?: number): Promise; - /** - * Gets a controller - * - * @param {number} controllerId - */ - getBuildController(controllerId: number): Promise; - /** - * Gets controller, optionally filtered by name - * - * @param {string} name - */ - getBuildControllers(name?: string): Promise; - /** - * Creates a new definition - * - * @param {BuildInterfaces.BuildDefinition} definition - * @param {string} project - Project ID or project name - * @param {number} definitionToCloneId - * @param {number} definitionToCloneRevision - */ - createDefinition(definition: BuildInterfaces.BuildDefinition, project?: string, definitionToCloneId?: number, definitionToCloneRevision?: number): Promise; - /** - * Deletes a definition and all associated builds - * - * @param {number} definitionId - * @param {string} project - Project ID or project name - */ - deleteDefinition(definitionId: number, project?: string): Promise; - /** - * Gets a definition, optionally at a specific revision - * - * @param {number} definitionId - * @param {string} project - Project ID or project name - * @param {number} revision - * @param {string[]} propertyFilters - */ - getDefinition(definitionId: number, project?: string, revision?: number, propertyFilters?: string[]): Promise; - /** - * Gets definitions, optionally filtered by name - * - * @param {string} project - Project ID or project name - * @param {string} name - * @param {BuildInterfaces.DefinitionType} type - * @param {string} repositoryId - * @param {string} repositoryType - * @param {BuildInterfaces.DefinitionQueryOrder} queryOrder - * @param {number} top - * @param {string} continuationToken - */ - getDefinitions(project?: string, name?: string, type?: BuildInterfaces.DefinitionType, repositoryId?: string, repositoryType?: string, queryOrder?: BuildInterfaces.DefinitionQueryOrder, top?: number, continuationToken?: string): Promise; - /** - * Updates an existing definition - * - * @param {BuildInterfaces.BuildDefinition} definition - * @param {number} definitionId - * @param {string} project - Project ID or project name - * @param {number} secretsSourceDefinitionId - * @param {number} secretsSourceDefinitionRevision - */ - updateDefinition(definition: BuildInterfaces.BuildDefinition, definitionId: number, project?: string, secretsSourceDefinitionId?: number, secretsSourceDefinitionRevision?: number): Promise; - /** - * Gets the deployment information associated with a build - * - * @param {string} project - Project ID or project name - * @param {number} buildId - */ - getBuildDeployments(project: string, buildId: number): Promise; - /** - * Gets a log - * - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {number} logId - * @param {number} startLine - * @param {number} endLine - */ - getBuildLog(project: string, buildId: number, logId: number, startLine?: number, endLine?: number): Promise; - /** - * Gets logs for a build - * - * @param {string} project - Project ID or project name - * @param {number} buildId - */ - getBuildLogs(project: string, buildId: number): Promise; - /** - * Gets logs for a build - * - * @param {string} project - Project ID or project name - * @param {number} buildId - */ - getBuildLogsZip(project: string, buildId: number): Promise; - /** - * @param {string} project - Project ID or project name - */ - getBuildOptionDefinitions(project?: string): Promise; - /** - * Creates a build queue - * - * @param {BuildInterfaces.AgentPoolQueue} queue - */ - createQueue(queue: BuildInterfaces.AgentPoolQueue): Promise; - /** - * Deletes a build queue - * - * @param {number} id - */ - deleteQueue(id: number): Promise; - /** - * Gets a queue - * - * @param {number} controllerId - */ - getAgentPoolQueue(controllerId: number): Promise; - /** - * Gets queues, optionally filtered by name - * - * @param {string} name - */ - getQueues(name?: string): Promise; - /** - * Gets report for a build - * - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {string} type - */ - getBuildReport(project: string, buildId: number, type?: string): Promise; - /** - * Gets report for a build - * - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {string} type - */ - getBuildReportHtmlContent(project: string, buildId: number, type?: string): Promise; - /** - */ - getResourceUsage(): Promise; - /** - * Gets revisions of a definition - * - * @param {string} project - Project ID or project name - * @param {number} definitionId - */ - getDefinitionRevisions(project: string, definitionId: number): Promise; - /** - */ - getBuildSettings(): Promise; - /** - * Updates the build settings - * - * @param {BuildInterfaces.BuildSettings} settings - */ - updateBuildSettings(settings: BuildInterfaces.BuildSettings): Promise; - /** - * Adds a tag to a build - * - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {string} tag - */ - addBuildTag(project: string, buildId: number, tag: string): Promise; - /** - * Adds tag to a build - * - * @param {string[]} tags - * @param {string} project - Project ID or project name - * @param {number} buildId - */ - addBuildTags(tags: string[], project: string, buildId: number): Promise; - /** - * Deletes a tag from a build - * - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {string} tag - */ - deleteBuildTag(project: string, buildId: number, tag: string): Promise; - /** - * Gets the tags for a build - * - * @param {string} project - Project ID or project name - * @param {number} buildId - */ - getBuildTags(project: string, buildId: number): Promise; - /** - * @param {string} project - Project ID or project name - */ - getTags(project: string): Promise; - /** - * Deletes a definition template - * - * @param {string} project - Project ID or project name - * @param {string} templateId - */ - deleteTemplate(project: string, templateId: string): Promise; - /** - * Gets definition template filtered by id - * - * @param {string} project - Project ID or project name - * @param {string} templateId - */ - getTemplate(project: string, templateId: string): Promise; - /** - * @param {string} project - Project ID or project name - */ - getTemplates(project: string): Promise; - /** - * Saves a definition template - * - * @param {BuildInterfaces.BuildDefinitionTemplate} template - * @param {string} project - Project ID or project name - * @param {string} templateId - */ - saveTemplate(template: BuildInterfaces.BuildDefinitionTemplate, project: string, templateId: string): Promise; - /** - * Gets details for a build - * - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {string} timelineId - * @param {number} changeId - */ - getBuildTimeline(project: string, buildId: number, timelineId?: string, changeId?: number): Promise; - /** - * Gets the work item ids associated with a build - * - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {number} top - The maximum number of workitems to return - */ - getBuildWorkItemsRefs(project: string, buildId: number, top?: number): Promise; - /** - * Gets the work item ids associated with build commits - * - * @param {string[]} commitIds - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {number} top - The maximum number of workitems to return, also number of commits to consider if commitids are not sent - */ - getBuildWorkItemsRefsFromCommits(commitIds: string[], project: string, buildId: number, top?: number): Promise; - /** - * Gets all the work item ids inbetween fromBuildId to toBuildId - * - * @param {string} project - Project ID or project name - * @param {number} fromBuildId - * @param {number} toBuildId - * @param {number} top - The maximum number of workitems to return - */ - getWorkItemsBetweenBuilds(project: string, fromBuildId: number, toBuildId: number, top?: number): Promise; - } - -} -declare module 'vso-node-api/interfaces/common/OperationsInterfaces' { - /** - * Reference for an async operation. - */ - export interface OperationReference { - /** - * The identifier for this operation. - */ - id: string; - /** - * The current status of the operation. - */ - status: OperationStatus; - /** - * Url to get the full object. - */ - url: string; - } - export enum OperationStatus { - /** - * The operation object does not have the status set. - */ - NotSet = 0, - /** - * The operation has been queued. - */ - Queued = 1, - /** - * The operation is in progress. - */ - InProgress = 2, - /** - * The operation was cancelled by the user. - */ - Cancelled = 3, - /** - * The operation completed successfully. - */ - Succeeded = 4, - /** - * The operation completed with a failure. - */ - Failed = 5, - } - export var TypeInfo: { - OperationReference: { - fields: any; - }; - OperationStatus: { - enumValues: { - "notSet": number; - "queued": number; - "inProgress": number; - "cancelled": number; - "succeeded": number; - "failed": number; - }; - }; - }; - -} -declare module 'vso-node-api/CoreApi' { - - - import Q = require('q'); - import basem = require('vso-node-api/ClientApiBases'); - import VsoBaseInterfaces = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); - import CoreInterfaces = require('vso-node-api/interfaces/CoreInterfaces'); - import OperationsInterfaces = require('vso-node-api/interfaces/common/OperationsInterfaces'); - import VSSInterfaces = require('vso-node-api/interfaces/common/VSSInterfaces'); - export interface ICoreApi extends basem.ClientApiBase { - createConnectedService(connectedServiceCreationData: CoreInterfaces.WebApiConnectedServiceDetails, projectId: string, onResult: (err: any, statusCode: number, connectedService: CoreInterfaces.WebApiConnectedService) => void): void; - getConnectedServiceDetails(projectId: string, name: string, onResult: (err: any, statusCode: number, connectedService: CoreInterfaces.WebApiConnectedServiceDetails) => void): void; - getConnectedServices(projectId: string, kind: CoreInterfaces.ConnectedServiceKind, onResult: (err: any, statusCode: number, connectedServices: CoreInterfaces.WebApiConnectedService[]) => void): void; - createIdentityMru(mruData: CoreInterfaces.IdentityData, mruName: string, onResult: (err: any, statusCode: number) => void): void; - deleteIdentityMru(mruData: CoreInterfaces.IdentityData, mruName: string, onResult: (err: any, statusCode: number) => void): void; - getIdentityMru(mruName: string, onResult: (err: any, statusCode: number, identityMru: VSSInterfaces.IdentityRef[]) => void): void; - updateIdentityMru(mruData: CoreInterfaces.IdentityData, mruName: string, onResult: (err: any, statusCode: number) => void): void; - getTeamMembers(projectId: string, teamId: string, top: number, skip: number, onResult: (err: any, statusCode: number, members: VSSInterfaces.IdentityRef[]) => void): void; - getProcessById(processId: string, onResult: (err: any, statusCode: number, processe: CoreInterfaces.Process) => void): void; - getProcesses(onResult: (err: any, statusCode: number, processes: CoreInterfaces.Process[]) => void): void; - getProjectCollection(collectionId: string, onResult: (err: any, statusCode: number, projectCollection: CoreInterfaces.TeamProjectCollection) => void): void; - getProjectCollections(top: number, skip: number, onResult: (err: any, statusCode: number, projectCollections: CoreInterfaces.TeamProjectCollectionReference[]) => void): void; - getProjectHistory(minRevision: number, onResult: (err: any, statusCode: number, projectHistory: CoreInterfaces.TeamProjectReference[]) => void): void; - getProject(projectId: string, includeCapabilities: boolean, includeHistory: boolean, onResult: (err: any, statusCode: number, project: CoreInterfaces.TeamProject) => void): void; - getProjects(stateFilter: any, top: number, skip: number, onResult: (err: any, statusCode: number, projects: CoreInterfaces.TeamProjectReference[]) => void): void; - queueCreateProject(projectToCreate: CoreInterfaces.TeamProject, onResult: (err: any, statusCode: number, project: OperationsInterfaces.OperationReference) => void): void; - queueDeleteProject(projectId: string, onResult: (err: any, statusCode: number, project: OperationsInterfaces.OperationReference) => void): void; - updateProject(projectUpdate: CoreInterfaces.TeamProject, projectId: string, onResult: (err: any, statusCode: number, project: OperationsInterfaces.OperationReference) => void): void; - getProxies(proxyUrl: string, onResult: (err: any, statusCode: number, proxies: CoreInterfaces.Proxy[]) => void): void; - createTeam(team: CoreInterfaces.WebApiTeam, projectId: string, onResult: (err: any, statusCode: number, team: CoreInterfaces.WebApiTeam) => void): void; - deleteTeam(projectId: string, teamId: string, onResult: (err: any, statusCode: number) => void): void; - getTeam(projectId: string, teamId: string, onResult: (err: any, statusCode: number, team: CoreInterfaces.WebApiTeam) => void): void; - getTeams(projectId: string, top: number, skip: number, onResult: (err: any, statusCode: number, teams: CoreInterfaces.WebApiTeam[]) => void): void; - updateTeam(teamData: CoreInterfaces.WebApiTeam, projectId: string, teamId: string, onResult: (err: any, statusCode: number, team: CoreInterfaces.WebApiTeam) => void): void; - } - export interface IQCoreApi extends basem.QClientApiBase { - createConnectedService(connectedServiceCreationData: CoreInterfaces.WebApiConnectedServiceDetails, projectId: string): Promise; - getConnectedServiceDetails(projectId: string, name: string): Promise; - getConnectedServices(projectId: string, kind?: CoreInterfaces.ConnectedServiceKind): Promise; - createIdentityMru(mruData: CoreInterfaces.IdentityData, mruName: string): Promise; - deleteIdentityMru(mruData: CoreInterfaces.IdentityData, mruName: string): Promise; - getIdentityMru(mruName: string): Promise; - updateIdentityMru(mruData: CoreInterfaces.IdentityData, mruName: string): Promise; - getTeamMembers(projectId: string, teamId: string, top?: number, skip?: number): Promise; - getProcessById(processId: string): Promise; - getProcesses(): Promise; - getProjectCollection(collectionId: string): Promise; - getProjectCollections(top?: number, skip?: number): Promise; - getProjectHistory(minRevision?: number): Promise; - getProject(projectId: string, includeCapabilities?: boolean, includeHistory?: boolean): Promise; - getProjects(stateFilter?: any, top?: number, skip?: number): Promise; - queueCreateProject(projectToCreate: CoreInterfaces.TeamProject): Promise; - queueDeleteProject(projectId: string): Promise; - updateProject(projectUpdate: CoreInterfaces.TeamProject, projectId: string): Promise; - getProxies(proxyUrl?: string): Promise; - createTeam(team: CoreInterfaces.WebApiTeam, projectId: string): Promise; - deleteTeam(projectId: string, teamId: string): Promise; - getTeam(projectId: string, teamId: string): Promise; - getTeams(projectId: string, top?: number, skip?: number): Promise; - updateTeam(teamData: CoreInterfaces.WebApiTeam, projectId: string, teamId: string): Promise; - } - export class CoreApi extends basem.ClientApiBase implements ICoreApi { - constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); - /** - * @param {CoreInterfaces.WebApiConnectedServiceDetails} connectedServiceCreationData - * @param {string} projectId - * @param onResult callback function with the resulting CoreInterfaces.WebApiConnectedService - */ - createConnectedService(connectedServiceCreationData: CoreInterfaces.WebApiConnectedServiceDetails, projectId: string, onResult: (err: any, statusCode: number, connectedService: CoreInterfaces.WebApiConnectedService) => void): void; - /** - * @param {string} projectId - * @param {string} name - * @param onResult callback function with the resulting CoreInterfaces.WebApiConnectedServiceDetails - */ - getConnectedServiceDetails(projectId: string, name: string, onResult: (err: any, statusCode: number, connectedService: CoreInterfaces.WebApiConnectedServiceDetails) => void): void; - /** - * @param {string} projectId - * @param {CoreInterfaces.ConnectedServiceKind} kind - * @param onResult callback function with the resulting CoreInterfaces.WebApiConnectedService[] - */ - getConnectedServices(projectId: string, kind: CoreInterfaces.ConnectedServiceKind, onResult: (err: any, statusCode: number, connectedServices: CoreInterfaces.WebApiConnectedService[]) => void): void; - /** - * @param {CoreInterfaces.IdentityData} mruData - * @param {string} mruName - * @param onResult callback function - */ - createIdentityMru(mruData: CoreInterfaces.IdentityData, mruName: string, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {CoreInterfaces.IdentityData} mruData - * @param {string} mruName - * @param onResult callback function - */ - deleteIdentityMru(mruData: CoreInterfaces.IdentityData, mruName: string, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {string} mruName - * @param onResult callback function with the resulting VSSInterfaces.IdentityRef[] - */ - getIdentityMru(mruName: string, onResult: (err: any, statusCode: number, identityMru: VSSInterfaces.IdentityRef[]) => void): void; - /** - * @param {CoreInterfaces.IdentityData} mruData - * @param {string} mruName - * @param onResult callback function - */ - updateIdentityMru(mruData: CoreInterfaces.IdentityData, mruName: string, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {string} projectId - * @param {string} teamId - * @param {number} top - * @param {number} skip - * @param onResult callback function with the resulting VSSInterfaces.IdentityRef[] - */ - getTeamMembers(projectId: string, teamId: string, top: number, skip: number, onResult: (err: any, statusCode: number, members: VSSInterfaces.IdentityRef[]) => void): void; - /** - * Retrieve process by id - * - * @param {string} processId - * @param onResult callback function with the resulting CoreInterfaces.Process - */ - getProcessById(processId: string, onResult: (err: any, statusCode: number, processe: CoreInterfaces.Process) => void): void; - /** - * @param onResult callback function with the resulting CoreInterfaces.Process[] - */ - getProcesses(onResult: (err: any, statusCode: number, processes: CoreInterfaces.Process[]) => void): void; - /** - * Get project collection with the specified id or name. - * - * @param {string} collectionId - * @param onResult callback function with the resulting CoreInterfaces.TeamProjectCollection - */ - getProjectCollection(collectionId: string, onResult: (err: any, statusCode: number, projectCollection: CoreInterfaces.TeamProjectCollection) => void): void; - /** - * Get project collection references for this application. - * - * @param {number} top - * @param {number} skip - * @param onResult callback function with the resulting CoreInterfaces.TeamProjectCollectionReference[] - */ - getProjectCollections(top: number, skip: number, onResult: (err: any, statusCode: number, projectCollections: CoreInterfaces.TeamProjectCollectionReference[]) => void): void; - /** - * @param {number} minRevision - * @param onResult callback function with the resulting CoreInterfaces.TeamProjectReference[] - */ - getProjectHistory(minRevision: number, onResult: (err: any, statusCode: number, projectHistory: CoreInterfaces.TeamProjectReference[]) => void): void; - /** - * Get project with the specified id or name, optionally including capabilities. - * - * @param {string} projectId - * @param {boolean} includeCapabilities - Include capabilities (such as source control) in the team project result (default: false). - * @param {boolean} includeHistory - Search within renamed projects (that had such name in the past). - * @param onResult callback function with the resulting CoreInterfaces.TeamProject - */ - getProject(projectId: string, includeCapabilities: boolean, includeHistory: boolean, onResult: (err: any, statusCode: number, project: CoreInterfaces.TeamProject) => void): void; - /** - * Get project references with the specified state - * - * @param {any} stateFilter - Filter on team projects in a specific team project state (default: WellFormed). - * @param {number} top - * @param {number} skip - * @param onResult callback function with the resulting CoreInterfaces.TeamProjectReference[] - */ - getProjects(stateFilter: any, top: number, skip: number, onResult: (err: any, statusCode: number, projects: CoreInterfaces.TeamProjectReference[]) => void): void; - /** - * Queue a project creation. - * - * @param {CoreInterfaces.TeamProject} projectToCreate - The project to create. - * @param onResult callback function with the resulting OperationsInterfaces.OperationReference - */ - queueCreateProject(projectToCreate: CoreInterfaces.TeamProject, onResult: (err: any, statusCode: number, project: OperationsInterfaces.OperationReference) => void): void; - /** - * Queue a project deletion. - * - * @param {string} projectId - The project id of the project to delete. - * @param onResult callback function with the resulting OperationsInterfaces.OperationReference - */ - queueDeleteProject(projectId: string, onResult: (err: any, statusCode: number, project: OperationsInterfaces.OperationReference) => void): void; - /** - * Update an existing project's name, abbreviation, or description. - * - * @param {CoreInterfaces.TeamProject} projectUpdate - The updates for the project. - * @param {string} projectId - The project id of the project to update. - * @param onResult callback function with the resulting OperationsInterfaces.OperationReference - */ - updateProject(projectUpdate: CoreInterfaces.TeamProject, projectId: string, onResult: (err: any, statusCode: number, project: OperationsInterfaces.OperationReference) => void): void; - /** - * @param {string} proxyUrl - * @param onResult callback function with the resulting CoreInterfaces.Proxy[] - */ - getProxies(proxyUrl: string, onResult: (err: any, statusCode: number, proxies: CoreInterfaces.Proxy[]) => void): void; - /** - * Creates a team - * - * @param {CoreInterfaces.WebApiTeam} team - The team data used to create the team. - * @param {string} projectId - The name or id (GUID) of the team project in which to create the team. - * @param onResult callback function with the resulting CoreInterfaces.WebApiTeam - */ - createTeam(team: CoreInterfaces.WebApiTeam, projectId: string, onResult: (err: any, statusCode: number, team: CoreInterfaces.WebApiTeam) => void): void; - /** - * Deletes a team - * - * @param {string} projectId - The name or id (GUID) of the team project containing the team to delete. - * @param {string} teamId - The name of id of the team to delete. - * @param onResult callback function - */ - deleteTeam(projectId: string, teamId: string, onResult: (err: any, statusCode: number) => void): void; - /** - * Gets a team - * - * @param {string} projectId - * @param {string} teamId - * @param onResult callback function with the resulting CoreInterfaces.WebApiTeam - */ - getTeam(projectId: string, teamId: string, onResult: (err: any, statusCode: number, team: CoreInterfaces.WebApiTeam) => void): void; - /** - * @param {string} projectId - * @param {number} top - * @param {number} skip - * @param onResult callback function with the resulting CoreInterfaces.WebApiTeam[] - */ - getTeams(projectId: string, top: number, skip: number, onResult: (err: any, statusCode: number, teams: CoreInterfaces.WebApiTeam[]) => void): void; - /** - * Updates a team's name and/or description - * - * @param {CoreInterfaces.WebApiTeam} teamData - * @param {string} projectId - The name or id (GUID) of the team project containing the team to update. - * @param {string} teamId - The name of id of the team to update. - * @param onResult callback function with the resulting CoreInterfaces.WebApiTeam - */ - updateTeam(teamData: CoreInterfaces.WebApiTeam, projectId: string, teamId: string, onResult: (err: any, statusCode: number, team: CoreInterfaces.WebApiTeam) => void): void; - } - export class QCoreApi extends basem.QClientApiBase implements IQCoreApi { - api: CoreApi; - constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); - /** - * @param {CoreInterfaces.WebApiConnectedServiceDetails} connectedServiceCreationData - * @param {string} projectId - */ - createConnectedService(connectedServiceCreationData: CoreInterfaces.WebApiConnectedServiceDetails, projectId: string): Promise; - /** - * @param {string} projectId - * @param {string} name - */ - getConnectedServiceDetails(projectId: string, name: string): Promise; - /** - * @param {string} projectId - * @param {CoreInterfaces.ConnectedServiceKind} kind - */ - getConnectedServices(projectId: string, kind?: CoreInterfaces.ConnectedServiceKind): Promise; - /** - * @param {CoreInterfaces.IdentityData} mruData - * @param {string} mruName - */ - createIdentityMru(mruData: CoreInterfaces.IdentityData, mruName: string): Promise; - /** - * @param {CoreInterfaces.IdentityData} mruData - * @param {string} mruName - */ - deleteIdentityMru(mruData: CoreInterfaces.IdentityData, mruName: string): Promise; - /** - * @param {string} mruName - */ - getIdentityMru(mruName: string): Promise; - /** - * @param {CoreInterfaces.IdentityData} mruData - * @param {string} mruName - */ - updateIdentityMru(mruData: CoreInterfaces.IdentityData, mruName: string): Promise; - /** - * @param {string} projectId - * @param {string} teamId - * @param {number} top - * @param {number} skip - */ - getTeamMembers(projectId: string, teamId: string, top?: number, skip?: number): Promise; - /** - * Retrieve process by id - * - * @param {string} processId - */ - getProcessById(processId: string): Promise; - /** - */ - getProcesses(): Promise; - /** - * Get project collection with the specified id or name. - * - * @param {string} collectionId - */ - getProjectCollection(collectionId: string): Promise; - /** - * Get project collection references for this application. - * - * @param {number} top - * @param {number} skip - */ - getProjectCollections(top?: number, skip?: number): Promise; - /** - * @param {number} minRevision - */ - getProjectHistory(minRevision?: number): Promise; - /** - * Get project with the specified id or name, optionally including capabilities. - * - * @param {string} projectId - * @param {boolean} includeCapabilities - Include capabilities (such as source control) in the team project result (default: false). - * @param {boolean} includeHistory - Search within renamed projects (that had such name in the past). - */ - getProject(projectId: string, includeCapabilities?: boolean, includeHistory?: boolean): Promise; - /** - * Get project references with the specified state - * - * @param {any} stateFilter - Filter on team projects in a specific team project state (default: WellFormed). - * @param {number} top - * @param {number} skip - */ - getProjects(stateFilter?: any, top?: number, skip?: number): Promise; - /** - * Queue a project creation. - * - * @param {CoreInterfaces.TeamProject} projectToCreate - The project to create. - */ - queueCreateProject(projectToCreate: CoreInterfaces.TeamProject): Promise; - /** - * Queue a project deletion. - * - * @param {string} projectId - The project id of the project to delete. - */ - queueDeleteProject(projectId: string): Promise; - /** - * Update an existing project's name, abbreviation, or description. - * - * @param {CoreInterfaces.TeamProject} projectUpdate - The updates for the project. - * @param {string} projectId - The project id of the project to update. - */ - updateProject(projectUpdate: CoreInterfaces.TeamProject, projectId: string): Promise; - /** - * @param {string} proxyUrl - */ - getProxies(proxyUrl?: string): Promise; - /** - * Creates a team - * - * @param {CoreInterfaces.WebApiTeam} team - The team data used to create the team. - * @param {string} projectId - The name or id (GUID) of the team project in which to create the team. - */ - createTeam(team: CoreInterfaces.WebApiTeam, projectId: string): Promise; - /** - * Deletes a team - * - * @param {string} projectId - The name or id (GUID) of the team project containing the team to delete. - * @param {string} teamId - The name of id of the team to delete. - */ - deleteTeam(projectId: string, teamId: string): Promise; - /** - * Gets a team - * - * @param {string} projectId - * @param {string} teamId - */ - getTeam(projectId: string, teamId: string): Promise; - /** - * @param {string} projectId - * @param {number} top - * @param {number} skip - */ - getTeams(projectId: string, top?: number, skip?: number): Promise; - /** - * Updates a team's name and/or description - * - * @param {CoreInterfaces.WebApiTeam} teamData - * @param {string} projectId - The name or id (GUID) of the team project containing the team to update. - * @param {string} teamId - The name of id of the team to update. - */ - updateTeam(teamData: CoreInterfaces.WebApiTeam, projectId: string, teamId: string): Promise; - } - -} -declare module 'vso-node-api/interfaces/FileContainerInterfaces' { - export enum ContainerItemStatus { - /** - * Item is created. - */ - Created = 1, - /** - * Item is a file pending for upload. - */ - PendingUpload = 2, - } - export enum ContainerItemType { - /** - * Any item type. - */ - Any = 0, - /** - * Item is a folder which can have child items. - */ - Folder = 1, - /** - * Item is a file which is stored in the file service. - */ - File = 2, - } - export enum ContainerOptions { - /** - * No option. - */ - None = 0, - } - /** - * Represents a container that encapsulates a hierarchical file system. - */ - export interface FileContainer { - /** - * Uri of the artifact associated with the container. - */ - artifactUri: string; - /** - * Download Url for the content of this item. - */ - contentLocation: string; - /** - * Owner. - */ - createdBy: string; - /** - * Creation date. - */ - dateCreated: Date; - /** - * Description. - */ - description: string; - /** - * Id. - */ - id: number; - /** - * Location of the item resource. - */ - itemLocation: string; - /** - * Name. - */ - name: string; - /** - * Options the container can have. - */ - options: ContainerOptions; - /** - * Project Id. - */ - scopeIdentifier: string; - /** - * Security token of the artifact associated with the container. - */ - securityToken: string; - /** - * Identifier of the optional encryption key. - */ - signingKeyId: string; - /** - * Total size of the files in bytes. - */ - size: number; - } - /** - * Represents an item in a container. - */ - export interface FileContainerItem { - /** - * Container Id. - */ - containerId: number; - contentId: number[]; - /** - * Download Url for the content of this item. - */ - contentLocation: string; - /** - * Creator. - */ - createdBy: string; - /** - * Creation date. - */ - dateCreated: Date; - /** - * Last modified date. - */ - dateLastModified: Date; - /** - * Encoding of the file. Zero if not a file. - */ - fileEncoding: number; - /** - * Hash value of the file. Null if not a file. - */ - fileHash: number[]; - /** - * Length of the file. Zero if not of a file. - */ - fileLength: number; - /** - * Type of the file. Zero if not a file. - */ - fileType: number; - /** - * Location of the item resource. - */ - itemLocation: string; - /** - * Type of the item: Folder, File or String. - */ - itemType: ContainerItemType; - /** - * Modifier. - */ - lastModifiedBy: string; - /** - * Unique path that identifies the item. - */ - path: string; - /** - * Project Id. - */ - scopeIdentifier: string; - /** - * Status of the item: Created or Pending Upload. - */ - status: ContainerItemStatus; - ticket: string; - } - export var TypeInfo: { - ContainerItemStatus: { - enumValues: { - "created": number; - "pendingUpload": number; - }; - }; - ContainerItemType: { - enumValues: { - "any": number; - "folder": number; - "file": number; - }; - }; - ContainerOptions: { - enumValues: { - "none": number; - }; - }; - FileContainer: { - fields: any; - }; - FileContainerItem: { - fields: any; - }; - }; - -} -declare module 'vso-node-api/FileContainerApiBase' { - - - import Q = require('q'); - import basem = require('vso-node-api/ClientApiBases'); - import VsoBaseInterfaces = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); - import FileContainerInterfaces = require('vso-node-api/interfaces/FileContainerInterfaces'); - import VSSInterfaces = require('vso-node-api/interfaces/common/VSSInterfaces'); - export interface IFileContainerApiBase extends basem.ClientApiBase { - createItems(items: VSSInterfaces.VssJsonCollectionWrapperV, containerId: number, scope: string, onResult: (err: any, statusCode: number, Container: FileContainerInterfaces.FileContainerItem[]) => void): void; - deleteItem(containerId: number, itemPath: string, scope: string, onResult: (err: any, statusCode: number) => void): void; - getContainers(scope: string, artifactUris: string, onResult: (err: any, statusCode: number, Containers: FileContainerInterfaces.FileContainer[]) => void): void; - getItems(containerId: number, scope: string, itemPath: string, metadata: boolean, format: string, downloadFileName: string, includeDownloadTickets: boolean, isShallow: boolean, onResult: (err: any, statusCode: number, Containers: FileContainerInterfaces.FileContainerItem[]) => void): void; - browseItems(container: number, itemPath: string, onResult: (err: any, statusCode: number, Containers: FileContainerInterfaces.FileContainerItem[]) => void): void; - } - export interface IQFileContainerApiBase extends basem.QClientApiBase { - createItems(items: VSSInterfaces.VssJsonCollectionWrapperV, containerId: number, scope?: string): Promise; - deleteItem(containerId: number, itemPath: string, scope?: string): Promise; - getContainers(scope?: string, artifactUris?: string): Promise; - getItems(containerId: number, scope?: string, itemPath?: string, metadata?: boolean, format?: string, downloadFileName?: string, includeDownloadTickets?: boolean, isShallow?: boolean): Promise; - browseItems(container: number, itemPath?: string): Promise; - } - export class FileContainerApiBase extends basem.ClientApiBase implements IFileContainerApiBase { - constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); - /** - * Creates the specified items in in the referenced container. - * - * @param {VSSInterfaces.VssJsonCollectionWrapperV} items - * @param {number} containerId - * @param {string} scope - A guid representing the scope of the container. This is often the project id. - * @param onResult callback function with the resulting FileContainerInterfaces.FileContainerItem[] - */ - createItems(items: VSSInterfaces.VssJsonCollectionWrapperV, containerId: number, scope: string, onResult: (err: any, statusCode: number, Container: FileContainerInterfaces.FileContainerItem[]) => void): void; - /** - * Deletes the specified items in a container. - * - * @param {number} containerId - Container Id. - * @param {string} itemPath - Path to delete. - * @param {string} scope - A guid representing the scope of the container. This is often the project id. - * @param onResult callback function - */ - deleteItem(containerId: number, itemPath: string, scope: string, onResult: (err: any, statusCode: number) => void): void; - /** - * Gets containers filtered by a comma separated list of artifact uris within the same scope, if not specified returns all containers - * - * @param {string} scope - A guid representing the scope of the container. This is often the project id. - * @param {string} artifactUris - * @param onResult callback function with the resulting FileContainerInterfaces.FileContainer[] - */ - getContainers(scope: string, artifactUris: string, onResult: (err: any, statusCode: number, Containers: FileContainerInterfaces.FileContainer[]) => void): void; - /** - * @param {number} containerId - * @param {string} scope - * @param {string} itemPath - * @param {boolean} metadata - * @param {string} format - * @param {string} downloadFileName - * @param {boolean} includeDownloadTickets - * @param {boolean} isShallow - * @param onResult callback function with the resulting FileContainerInterfaces.FileContainerItem[] - */ - getItems(containerId: number, scope: string, itemPath: string, metadata: boolean, format: string, downloadFileName: string, includeDownloadTickets: boolean, isShallow: boolean, onResult: (err: any, statusCode: number, Containers: FileContainerInterfaces.FileContainerItem[]) => void): void; - /** - * Allow browsing of file ,the contentDisposition is inline and Content-Type is determined by FileExtension - * - * @param {number} container - * @param {string} itemPath - The path to the item of interest - * @param onResult callback function with the resulting FileContainerInterfaces.FileContainerItem[] - */ - browseItems(container: number, itemPath: string, onResult: (err: any, statusCode: number, Containers: FileContainerInterfaces.FileContainerItem[]) => void): void; - } - export class QFileContainerApiBase extends basem.QClientApiBase implements IQFileContainerApiBase { - api: FileContainerApiBase; - constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], api: typeof basem.ClientApiBase); - /** - * Creates the specified items in in the referenced container. - * - * @param {VSSInterfaces.VssJsonCollectionWrapperV} items - * @param {number} containerId - * @param {string} scope - A guid representing the scope of the container. This is often the project id. - */ - createItems(items: VSSInterfaces.VssJsonCollectionWrapperV, containerId: number, scope?: string): Promise; - /** - * Deletes the specified items in a container. - * - * @param {number} containerId - Container Id. - * @param {string} itemPath - Path to delete. - * @param {string} scope - A guid representing the scope of the container. This is often the project id. - */ - deleteItem(containerId: number, itemPath: string, scope?: string): Promise; - /** - * Gets containers filtered by a comma separated list of artifact uris within the same scope, if not specified returns all containers - * - * @param {string} scope - A guid representing the scope of the container. This is often the project id. - * @param {string} artifactUris - */ - getContainers(scope?: string, artifactUris?: string): Promise; - /** - * @param {number} containerId - * @param {string} scope - * @param {string} itemPath - * @param {boolean} metadata - * @param {string} format - * @param {string} downloadFileName - * @param {boolean} includeDownloadTickets - * @param {boolean} isShallow - */ - getItems(containerId: number, scope?: string, itemPath?: string, metadata?: boolean, format?: string, downloadFileName?: string, includeDownloadTickets?: boolean, isShallow?: boolean): Promise; - /** - * Allow browsing of file ,the contentDisposition is inline and Content-Type is determined by FileExtension - * - * @param {number} container - * @param {string} itemPath - The path to the item of interest - */ - browseItems(container: number, itemPath?: string): Promise; - } - -} -declare module 'vso-node-api/FileContainerApi' { - - - import Q = require('q'); - import VsoBaseInterfaces = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); - import FileContainerApiBase = require('vso-node-api/FileContainerApiBase'); - import FileContainerInterfaces = require('vso-node-api/interfaces/FileContainerInterfaces'); - export interface IFileContainerApi extends FileContainerApiBase.IFileContainerApiBase { - createItem(contentStream: NodeJS.ReadableStream, uncompressedLength: number, containerId: number, itemPath: string, scope: string, options: any, onResult: (err: any, statusCode: number, Container: FileContainerInterfaces.FileContainerItem) => void): void; - } - export interface IQFileContainerApi extends FileContainerApiBase.IQFileContainerApiBase { - createItem(contentStream: NodeJS.ReadableStream, uncompressedLength: number, containerId: number, itemPath: string, scope: string, options: any): Promise; - } - export class FileContainerApi extends FileContainerApiBase.FileContainerApiBase implements IFileContainerApi { - constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); - createItem(contentStream: NodeJS.ReadableStream, uncompressedLength: number, containerId: number, itemPath: string, scope: string, options: any, onResult: (err: any, statusCode: number, Container: FileContainerInterfaces.FileContainerItem) => void): void; - _createItem(customHeaders: VsoBaseInterfaces.IHeaders, contentStream: NodeJS.ReadableStream, containerId: number, itemPath: string, scope: string, onResult: (err: any, statusCode: number, Container: FileContainerInterfaces.FileContainerItem) => void): void; - } - export class QFileContainerApi extends FileContainerApiBase.QFileContainerApiBase implements IQFileContainerApi { - api: FileContainerApi; - constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); - createItem(contentStream: NodeJS.ReadableStream, uncompressedLength: number, containerId: number, itemPath: string, scope: string, options: any): Promise; - } - -} -declare module 'vso-node-api/interfaces/GalleryInterfaces' { - export enum AcquisitionAssignmentType { - None = 0, - /** - * Just assign for me - */ - Me = 1, - /** - * Assign for all users in the account - */ - All = 2, - } - export interface AcquisitionOperation { - /** - * State of the the AcquisitionOperation for the current user - */ - operationState: AcquisitionOperationState; - /** - * AcquisitionOperationType: install, request, buy, etc... - */ - operationType: AcquisitionOperationType; - /** - * Optional reason to justify current state. Typically used with Disallow state. - */ - reason: string; - } - export enum AcquisitionOperationState { - /** - * Not allowed to use this AcquisitionOperation - */ - Disallow = 0, - /** - * Allowed to use this AcquisitionOperation - */ - Allow = 1, - /** - * Operation has already been completed and is no longer available - */ - Completed = 3, - } - export enum AcquisitionOperationType { - /** - * Not yet used - */ - Get = 0, - /** - * Install this extension into the host provided - */ - Install = 1, - /** - * Buy licenses for this extension and install into the host provided - */ - Buy = 2, - /** - * Not yet used - */ - Try = 3, - /** - * Not yet used - */ - Request = 4, - /** - * No action found - */ - None = 5, - } - /** - * Market item acquisition options (install, buy, etc) for an installation target. - */ - export interface AcquisitionOptions { - /** - * Default Operation for the ItemId in this target - */ - defaultOperation: AcquisitionOperation; - /** - * The item id that this options refer to - */ - itemId: string; - /** - * Operations allowed for the ItemId in this target - */ - operations: AcquisitionOperation[]; - /** - * The target that this options refer to - */ - target: string; - } - export enum ConcernCategory { - General = 1, - Abusive = 2, - Spam = 4, - } - /** - * Contract for handling the extension acquisition process - */ - export interface ExtensionAcquisitionRequest { - /** - * How the item is being assigned - */ - assignmentType: AcquisitionAssignmentType; - /** - * The id of the subscription used for purchase - */ - billingId: string; - /** - * The marketplace id (publisherName.extensionName) for the item - */ - itemId: string; - /** - * The type of operation, such as install, request, purchase - */ - operationType: AcquisitionOperationType; - /** - * Additional properties which can be added to the request. - */ - properties: any; - /** - * How many licenses should be purchased - */ - quantity: number; - /** - * A list of target guids where the item should be acquired (installed, requested, etc.), such as account id - */ - targets: string[]; - } - export interface ExtensionFile { - assetType: string; - contentType: string; - fileId: number; - isDefault: boolean; - isPublic: boolean; - language: string; - shortDescription: string; - source: string; - version: string; - } - /** - * The FilterResult is the set of extensions that matched a particular query filter. - */ - export interface ExtensionFilterResult { - /** - * This is the set of appplications that matched the query filter supplied. - */ - extensions: PublishedExtension[]; - /** - * The PagingToken is returned from a request when more records exist that match the result than were requested or could be returned. A follow-up query with this paging token can be used to retrieve more results. - */ - pagingToken: string; - /** - * This is the additional optional metadata for the given result. E.g. Total count of results which is useful in case of paged results - */ - resultMetadata: ExtensionFilterResultMetadata[]; - } - /** - * ExtensionFilterResultMetadata is one set of metadata for the result e.g. Total count. There can be multiple metadata items for one metadata. - */ - export interface ExtensionFilterResultMetadata { - /** - * The metadata items for the category - */ - metadataItems: MetadataItem[]; - /** - * Defines the category of metadata items - */ - metadataType: string; - } - /** - * Represents the component pieces of an extensions fully qualified name, along with the fully qualified name. - */ - export interface ExtensionIdentifier { - /** - * The ExtensionName component part of the fully qualified ExtensionIdentifier - */ - extensionName: string; - /** - * The PublisherName component part of the fully qualified ExtensionIdentifier - */ - publisherName: string; - } - /** - * Package that will be used to create or update a published extension - */ - export interface ExtensionPackage { - /** - * Base 64 encoded extension package - */ - extensionManifest: string; - } - /** - * Policy with a set of permissions on extension operations - */ - export interface ExtensionPolicy { - /** - * Permissions on 'Install' operation - */ - install: ExtensionPolicyFlags; - /** - * Permission on 'Request' operation - */ - request: ExtensionPolicyFlags; - } - export enum ExtensionPolicyFlags { - /** - * No permission - */ - None = 0, - /** - * Permission on private extensions - */ - Private = 1, - /** - * Permission on public extensions - */ - Public = 2, - /** - * Premission in extensions that are in preview - */ - Preview = 4, - /** - * Premission in relased extensions - */ - Released = 8, - /** - * Permission in 1st party extensions - */ - FirstParty = 16, - /** - * Mask that defines all permissions - */ - All = 31, - } - /** - * An ExtensionQuery is used to search the gallery for a set of extensions that match one of many filter values. - */ - export interface ExtensionQuery { - /** - * When retrieving extensions with a query; frequently the caller only needs a small subset of the assets. The caller may specify a list of asset types that should be returned if the extension contains it. All other assets will not be returned. - */ - assetTypes: string[]; - /** - * Each filter is a unique query and will have matching set of extensions returned from the request. Each result will have the same index in the resulting array that the filter had in the incoming query. - */ - filters: QueryFilter[]; - /** - * The Flags are used to deterine which set of information the caller would like returned for the matched extensions. - */ - flags: ExtensionQueryFlags; - } - export enum ExtensionQueryFilterType { - /** - * The values are used as tags. All tags are treated as "OR" conditions with each other. There may be some value put on the number of matched tags from the query. - */ - Tag = 1, - /** - * The Values are an ExtensionName or fragment that is used to match other extension names. - */ - DisplayName = 2, - /** - * The Filter is one or more tokens that define what scope to return private extensions for. - */ - Private = 3, - /** - * Retrieve a set of extensions based on their id's. The values should be the extension id's encoded as strings. - */ - Id = 4, - /** - * The catgeory is unlike other filters. It is AND'd with the other filters instead of being a seperate query. - */ - Category = 5, - /** - * Certain contribution types may be indexed to allow for query by type. User defined types can't be indexed at the moment. - */ - ContributionType = 6, - /** - * Retrieve an set extension based on the name based identifier. This differs from the internal id (which is being deprecated). - */ - Name = 7, - /** - * The InstallationTarget for an extension defines the target consumer for the extension. This may be something like VS, VSOnline, or VSCode - */ - InstallationTarget = 8, - /** - * Query for featured extensions, no value is allowed when using the query type. - */ - Featured = 9, - /** - * The SearchText provided by the user to search for extensions - */ - SearchText = 10, - } - export enum ExtensionQueryFlags { - /** - * None is used to retrieve only the basic extension details. - */ - None = 0, - /** - * IncludeVersions will return version information for extensions returned - */ - IncludeVersions = 1, - /** - * IncludeFiles will return information about which files were found within the extension that were stored independant of the manifest. When asking for files, versions will be included as well since files are returned as a property of the versions. These files can be retrieved using the path to the file without requiring the entire manifest be downloaded. - */ - IncludeFiles = 2, - /** - * Include the Categories and Tags that were added to the extension definition. - */ - IncludeCategoryAndTags = 4, - /** - * Include the details about which accounts the extension has been shared with if the extesion is a private extension. - */ - IncludeSharedAccounts = 8, - /** - * Include properties associated with versions of the extension - */ - IncludeVersionProperties = 16, - /** - * Excluding non-validated extensions will remove any extension versions that either are in the process of being validated or have failed validation. - */ - ExcludeNonValidated = 32, - /** - * Include the set of installation targets the extension has requested. - */ - IncludeInstallationTargets = 64, - /** - * Include the base uri for assets of this extension - */ - IncludeAssetUri = 128, - /** - * Include the statistics associated with this extension - */ - IncludeStatistics = 256, - /** - * When retrieving versions from a query, only include the latest version of the extensions that matched. This is useful when the caller doesn't need all the published versions. It will save a significant size in the returned payload. - */ - IncludeLatestVersionOnly = 512, - /** - * AllAttributes is designed to be a mask that defines all sub-elements of the extension should be returned. NOTE: This is not actually All flags. This is now locked to the set defined since changing this enum would be a breaking change and would change the behavior of anyone using it. Try not to use this value when making calls to the service, instead be explicit about the options required. - */ - AllAttributes = 479, - } - /** - * This is the set of extensions that matched a supplied query through the filters given. - */ - export interface ExtensionQueryResult { - /** - * For each filter supplied in the query, a filter result will be returned in the query result. - */ - results: ExtensionFilterResult[]; - } - export interface ExtensionShare { - id: string; - name: string; - type: string; - } - export interface ExtensionStatistic { - statisticName: string; - value: number; - } - export enum ExtensionStatisticOperation { - None = 0, - Set = 1, - Increment = 2, - Decrement = 3, - } - export interface ExtensionVersion { - assetUri: string; - files: ExtensionFile[]; - flags: ExtensionVersionFlags; - lastUpdated: Date; - properties: { - key: string; - value: string; - }[]; - validationResultMessage: string; - version: string; - versionDescription: string; - } - export enum ExtensionVersionFlags { - /** - * No flags exist for this version. - */ - None = 0, - /** - * The Validated flag for a version means the extension version has passed validation and can be used.. - */ - Validated = 1, - } - /** - * One condition in a QueryFilter. - */ - export interface FilterCriteria { - filterType: number; - /** - * The value used in the match based on the filter type. - */ - value: string; - } - export interface InstallationTarget { - target: string; - } - /** - * MetadataItem is one value of metadata under a given category of metadata - */ - export interface MetadataItem { - /** - * The count of the metadata item - */ - count: number; - /** - * The name of the metadata item - */ - name: string; - } - export enum PagingDirection { - /** - * Backward will return results from earlier in the resultset. - */ - Backward = 1, - /** - * Forward will return results from later in the resultset. - */ - Forward = 2, - } - export interface PublishedExtension { - categories: string[]; - displayName: string; - extensionId: string; - extensionName: string; - flags: PublishedExtensionFlags; - installationTargets: InstallationTarget[]; - lastUpdated: Date; - longDescription: string; - publisher: PublisherFacts; - sharedWith: ExtensionShare[]; - shortDescription: string; - statistics: ExtensionStatistic[]; - tags: string[]; - versions: ExtensionVersion[]; - } - export enum PublishedExtensionFlags { - /** - * No flags exist for this extension. - */ - None = 0, - /** - * The Disabled flag for an extension means the extension can't be changed and won't be used by consumers. The disabled flag is managed by the service and can't be supplied by the Extension Developers. - */ - Disabled = 1, - /** - * BuiltIn Extension are available to all Tenants. An explicit registration is not required. This attribute is reserved and can't be supplied by Extension Developers. BuiltIn extensions are by definition Public. There is no need to set the public flag for extensions marked BuiltIn. - */ - BuiltIn = 2, - /** - * This extension has been validated by the service. The extension meets the requirements specified. This attribute is reserved and can't be supplied by the Extension Developers. Validation is a process that ensures that all contributions are well formed. They meet the requirements defined by the contribution type they are extending. Note this attribute will be updated asynchronously as the extension is validated by the developer of the contribution type. There will be restricted access to the extension while this process is performed. - */ - Validated = 4, - /** - * Trusted extensions are ones that are given special capabilities. These tend to come from Microsoft and can't be published by the general public. Note: BuiltIn extensions are always trusted. - */ - Trusted = 8, - /** - * This extension registration is public, making its visibilty open to the public. This means all tenants have the ability to install this extension. Without this flag the extension will be private and will need to be shared with the tenants that can install it. - */ - Public = 256, - /** - * This extension has multiple versions active at one time and version discovery should be done usig the defined "Version Discovery" protocol to determine the version available to a specific user or tenant. @TODO: Link to Version Discovery Protocol. - */ - MultiVersion = 512, - /** - * The system flag is reserved, and cant be used by publishers. - */ - System = 1024, - /** - * The Preview flag indicates that the extension is still under preview (not yet of "release" quality). These extensions may be decorated differently in the gallery and may have different policies applied to them. - */ - Preview = 2048, - } - export interface Publisher { - displayName: string; - extensions: PublishedExtension[]; - flags: PublisherFlags; - lastUpdated: Date; - longDescription: string; - publisherId: string; - publisherName: string; - shortDescription: string; - } - /** - * High-level information about the publisher, like id's and names - */ - export interface PublisherFacts { - displayName: string; - flags: PublisherFlags; - publisherId: string; - publisherName: string; - } - /** - * The FilterResult is the set of publishers that matched a particular query filter. - */ - export interface PublisherFilterResult { - /** - * This is the set of appplications that matched the query filter supplied. - */ - publishers: Publisher[]; - } - export enum PublisherFlags { - /** - * This should never be returned, it is used to represent a publisher who's flags havent changed during update calls. - */ - UnChanged = 1073741824, - /** - * No flags exist for this publisher. - */ - None = 0, - /** - * The Disabled flag for a publisher means the publisher can't be changed and won't be used by consumers, this extends to extensions owned by the publisher as well. The disabled flag is managed by the service and can't be supplied by the Extension Developers. - */ - Disabled = 1, - /** - * A verified publisher is one that Microsoft has done some review of and ensured the publisher meets a set of requirements. The requirements to become a verified publisher are not listed here. They can be found in public documentation (TBD). - */ - Verified = 2, - /** - * This is the set of flags that can't be supplied by the developer and is managed by the service itself. - */ - ServiceFlags = 3, - } - export enum PublisherPermissions { - /** - * This gives the bearer the rights to read Publishers and Extensions. - */ - Read = 1, - /** - * This gives the bearer the rights to update, delete, and share Extensions (but not the ability to create them). - */ - UpdateExtension = 2, - /** - * This gives the bearer the rights to create new Publishers at the root of the namespace. - */ - CreatePublisher = 4, - /** - * This gives the bearer the rights to create new Extensions within a publisher. - */ - PublishExtension = 8, - /** - * Admin gives the bearer the rights to manage restricted attributes of Publishers and Extensions. - */ - Admin = 16, - /** - * TrustedPartner gives the bearer the rights to publish a extensions with restricted capabilities. - */ - TrustedPartner = 32, - /** - * PrivateRead is another form of read designed to allow higher privilege accessors the ability to read private extensions. - */ - PrivateRead = 64, - /** - * This gives the bearer the rights to delete any extension. - */ - DeleteExtension = 128, - /** - * This gives the bearer the rights edit the publisher settings. - */ - EditSettings = 256, - /** - * This gives the bearer the rights to see all permissions on the publisher. - */ - ViewPermissions = 512, - /** - * This gives the bearer the rights to assign permissions on the publisher. - */ - ManagePermissions = 1024, - /** - * This gives the bearer the rights to delete the publisher. - */ - DeletePublisher = 2048, - } - /** - * An PublisherQuery is used to search the gallery for a set of publishers that match one of many filter values. - */ - export interface PublisherQuery { - /** - * Each filter is a unique query and will have matching set of publishers returned from the request. Each result will have the same index in the resulting array that the filter had in the incoming query. - */ - filters: QueryFilter[]; - /** - * The Flags are used to deterine which set of information the caller would like returned for the matched publishers. - */ - flags: PublisherQueryFlags; - } - export enum PublisherQueryFilterType { - /** - * The values are used as tags. All tags are treated as "OR" conditions with each other. There may be some value put on the number of matched tags from the query. - */ - Tag = 1, - /** - * The Values are an PublisherName or fragment that is used to match other extension names. - */ - DisplayName = 2, - /** - * The My Query filter is used to retrieve the set of publishers that I have access to publish extesions into. All Values are ignored and the calling user is used as the filter in this case. - */ - My = 3, - } - export enum PublisherQueryFlags { - /** - * None is used to retrieve only the basic publisher details. - */ - None = 0, - /** - * Is used to include a list of basic extension details for all extensions published by the requested publisher. - */ - IncludeExtensions = 1, - } - /** - * This is the set of publishers that matched a supplied query through the filters given. - */ - export interface PublisherQueryResult { - /** - * For each filter supplied in the query, a filter result will be returned in the query result. - */ - results: PublisherFilterResult[]; - } - /** - * A filter used to define a set of extensions to return during a query. - */ - export interface QueryFilter { - /** - * The filter values define the set of values in this query. They are applied based on the QueryFilterType. - */ - criteria: FilterCriteria[]; - /** - * The PagingDirection is applied to a paging token if one exists. If not the direction is ignored, and Forward from the start of the resultset is used. Direction should be left out of the request unless a paging token is used to help prevent future issues. - */ - direction: PagingDirection; - /** - * The page number requested by the user. If not provided 1 is assumed by default. - */ - pageNumber: number; - /** - * The page size defines the number of results the caller wants for this filter. The count can't exceed the overall query size limits. - */ - pageSize: number; - /** - * The paging token is a distinct type of filter and the other filter fields are ignored. The paging token represents the continuation of a previously executed query. The information about where in the result and what fields are being filtered are embeded in the token. - */ - pagingToken: string; - /** - * Defines the type of sorting to be applied on the results. The page slice is cut of the sorted results only. - */ - sortBy: number; - /** - * Defines the order of sorting, 1 for Ascending, 2 for Descending, else default ordering based on the SortBy value - */ - sortOrder: number; - } - export interface Review { - /** - * Unique identifier of a review item - */ - id: number; - /** - * Flag for soft deletion - */ - isDeleted: boolean; - /** - * Version of the product for which review was submitted - */ - productVersion: string; - /** - * Rating procided by the user - */ - rating: number; - /** - * Text description of the review - */ - text: string; - /** - * Title of the review - */ - title: string; - /** - * Time when the review was edited/updated - */ - updatedDate: Date; - /** - * Id of the user who submitted the review - */ - userId: string; - } - export interface ReviewsResult { - /** - * Flag indicating if there are more reviews to be shown (for paging) - */ - hasMoreReviews: boolean; - /** - * List of reviews - */ - reviews: Review[]; - /** - * Count of total review items - */ - totalReviewCount: number; - } - export enum SigningKeyPermissions { - Read = 1, - Write = 2, - } - export enum SortByType { - /** - * The results will be sorted by relevance in case search query is given, if no search query resutls will be provided as is - */ - Relevance = 0, - /** - * The results will be sorted as per Last Updated date of the extensions with recently updated at the top - */ - LastUpdatedDate = 1, - /** - * Results will be sorted Alphabetically as per the title of the extension - */ - Title = 2, - /** - * Results will be sorted Alphabetically as per Publisher title - */ - Publisher = 3, - /** - * Results will be sorted by Install Count - */ - InstallCount = 4, - } - export enum SortOrderType { - /** - * Results will be sorted in the default order as per the sorting type defined. The default varies for each type, e.g. for Relevance, default is Descnding, for Title default is Ascending etc. - */ - Default = 0, - /** - * The results will be sorted in Ascending order - */ - Ascending = 1, - /** - * The results will be sorted in Descending order - */ - Descending = 2, - } - /** - * Represents the extension policy applied to a given user - */ - export interface UserExtensionPolicy { - /** - * User display name that this policy refers to - */ - displayName: string; - /** - * The extension policy applied to the user - */ - permissions: ExtensionPolicy; - /** - * User id that this policy refers to - */ - userId: string; - } - export interface UserReportedConcern { - /** - * Category of the concern - */ - category: ConcernCategory; - /** - * User comment associated with the report - */ - concernText: string; - /** - * Id of the review which was reported - */ - reviewId: number; - /** - * Date the report was submitted - */ - submittedDate: Date; - /** - * Id of the user who reported a review - */ - userId: string; - } - export var TypeInfo: { - AcquisitionAssignmentType: { - enumValues: { - "none": number; - "me": number; - "all": number; - }; - }; - AcquisitionOperation: { - fields: any; - }; - AcquisitionOperationState: { - enumValues: { - "disallow": number; - "allow": number; - "completed": number; - }; - }; - AcquisitionOperationType: { - enumValues: { - "get": number; - "install": number; - "buy": number; - "try": number; - "request": number; - "none": number; - }; - }; - AcquisitionOptions: { - fields: any; - }; - ConcernCategory: { - enumValues: { - "general": number; - "abusive": number; - "spam": number; - }; - }; - ExtensionAcquisitionRequest: { - fields: any; - }; - ExtensionFile: { - fields: any; - }; - ExtensionFilterResult: { - fields: any; - }; - ExtensionFilterResultMetadata: { - fields: any; - }; - ExtensionIdentifier: { - fields: any; - }; - ExtensionPackage: { - fields: any; - }; - ExtensionPolicy: { - fields: any; - }; - ExtensionPolicyFlags: { - enumValues: { - "none": number; - "private": number; - "public": number; - "preview": number; - "released": number; - "firstParty": number; - "all": number; - }; - }; - ExtensionQuery: { - fields: any; - }; - ExtensionQueryFilterType: { - enumValues: { - "tag": number; - "displayName": number; - "private": number; - "id": number; - "category": number; - "contributionType": number; - "name": number; - "installationTarget": number; - "featured": number; - "searchText": number; - }; - }; - ExtensionQueryFlags: { - enumValues: { - "none": number; - "includeVersions": number; - "includeFiles": number; - "includeCategoryAndTags": number; - "includeSharedAccounts": number; - "includeVersionProperties": number; - "excludeNonValidated": number; - "includeInstallationTargets": number; - "includeAssetUri": number; - "includeStatistics": number; - "includeLatestVersionOnly": number; - "allAttributes": number; - }; - }; - ExtensionQueryResult: { - fields: any; - }; - ExtensionShare: { - fields: any; - }; - ExtensionStatistic: { - fields: any; - }; - ExtensionStatisticOperation: { - enumValues: { - "none": number; - "set": number; - "increment": number; - "decrement": number; - }; - }; - ExtensionVersion: { - fields: any; - }; - ExtensionVersionFlags: { - enumValues: { - "none": number; - "validated": number; - }; - }; - FilterCriteria: { - fields: any; - }; - InstallationTarget: { - fields: any; - }; - MetadataItem: { - fields: any; - }; - PagingDirection: { - enumValues: { - "backward": number; - "forward": number; - }; - }; - PublishedExtension: { - fields: any; - }; - PublishedExtensionFlags: { - enumValues: { - "none": number; - "disabled": number; - "builtIn": number; - "validated": number; - "trusted": number; - "public": number; - "multiVersion": number; - "system": number; - "preview": number; - }; - }; - Publisher: { - fields: any; - }; - PublisherFacts: { - fields: any; - }; - PublisherFilterResult: { - fields: any; - }; - PublisherFlags: { - enumValues: { - "unChanged": number; - "none": number; - "disabled": number; - "verified": number; - "serviceFlags": number; - }; - }; - PublisherPermissions: { - enumValues: { - "read": number; - "updateExtension": number; - "createPublisher": number; - "publishExtension": number; - "admin": number; - "trustedPartner": number; - "privateRead": number; - "deleteExtension": number; - "editSettings": number; - "viewPermissions": number; - "managePermissions": number; - "deletePublisher": number; - }; - }; - PublisherQuery: { - fields: any; - }; - PublisherQueryFilterType: { - enumValues: { - "tag": number; - "displayName": number; - "my": number; - }; - }; - PublisherQueryFlags: { - enumValues: { - "none": number; - "includeExtensions": number; - }; - }; - PublisherQueryResult: { - fields: any; - }; - QueryFilter: { - fields: any; - }; - Review: { - fields: any; - }; - ReviewsResult: { - fields: any; - }; - SigningKeyPermissions: { - enumValues: { - "read": number; - "write": number; - }; - }; - SortByType: { - enumValues: { - "relevance": number; - "lastUpdatedDate": number; - "title": number; - "publisher": number; - "installCount": number; - }; - }; - SortOrderType: { - enumValues: { - "default": number; - "ascending": number; - "descending": number; - }; - }; - UserExtensionPolicy: { - fields: any; - }; - UserReportedConcern: { - fields: any; - }; - }; - -} -declare module 'vso-node-api/GalleryApi' { - - - import Q = require('q'); - import basem = require('vso-node-api/ClientApiBases'); - import VsoBaseInterfaces = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); - import GalleryInterfaces = require('vso-node-api/interfaces/GalleryInterfaces'); - export interface IGalleryApi extends basem.ClientApiBase { - shareExtensionById(extensionId: string, accountName: string, onResult: (err: any, statusCode: number) => void): void; - unshareExtensionById(extensionId: string, accountName: string, onResult: (err: any, statusCode: number) => void): void; - shareExtension(publisherName: string, extensionName: string, accountName: string, onResult: (err: any, statusCode: number) => void): void; - unshareExtension(publisherName: string, extensionName: string, accountName: string, onResult: (err: any, statusCode: number) => void): void; - getAcquisitionOptions(itemId: string, installationTarget: string, onResult: (err: any, statusCode: number, acquisitionoption: GalleryInterfaces.AcquisitionOptions) => void): void; - requestAcquisition(acquisitionRequest: GalleryInterfaces.ExtensionAcquisitionRequest, onResult: (err: any, statusCode: number, acquisitionrequest: GalleryInterfaces.ExtensionAcquisitionRequest) => void): void; - getAssetByName(publisherName: string, extensionName: string, version: string, assetType: string, accountToken: string, acceptDefault: boolean, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - getAsset(extensionId: string, version: string, assetType: string, accountToken: string, acceptDefault: boolean, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - getCategories(languages: string, onResult: (err: any, statusCode: number, categories: string[]) => void): void; - getCertificate(publisherName: string, extensionName: string, version: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - queryExtensions(extensionQuery: GalleryInterfaces.ExtensionQuery, accountToken: string, onResult: (err: any, statusCode: number, extensionquery: GalleryInterfaces.ExtensionQueryResult) => void): void; - createExtension(extensionPackage: GalleryInterfaces.ExtensionPackage, onResult: (err: any, statusCode: number, extension: GalleryInterfaces.PublishedExtension) => void): void; - deleteExtensionById(extensionId: string, version: string, onResult: (err: any, statusCode: number) => void): void; - getExtensionById(extensionId: string, version: string, flags: GalleryInterfaces.ExtensionQueryFlags, onResult: (err: any, statusCode: number, extension: GalleryInterfaces.PublishedExtension) => void): void; - updateExtensionById(extensionPackage: GalleryInterfaces.ExtensionPackage, extensionId: string, onResult: (err: any, statusCode: number, extension: GalleryInterfaces.PublishedExtension) => void): void; - createExtensionWithPublisher(extensionPackage: GalleryInterfaces.ExtensionPackage, publisherName: string, onResult: (err: any, statusCode: number, extension: GalleryInterfaces.PublishedExtension) => void): void; - deleteExtension(publisherName: string, extensionName: string, version: string, onResult: (err: any, statusCode: number) => void): void; - getExtension(publisherName: string, extensionName: string, version: string, flags: GalleryInterfaces.ExtensionQueryFlags, accountToken: string, onResult: (err: any, statusCode: number, extension: GalleryInterfaces.PublishedExtension) => void): void; - updateExtension(extensionPackage: GalleryInterfaces.ExtensionPackage, publisherName: string, extensionName: string, onResult: (err: any, statusCode: number, extension: GalleryInterfaces.PublishedExtension) => void): void; - getPackage(publisherName: string, extensionName: string, version: string, accountToken: string, acceptDefault: boolean, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - getAssetWithToken(publisherName: string, extensionName: string, version: string, assetType: string, assetToken: string, accountToken: string, acceptDefault: boolean, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - queryPublishers(publisherQuery: GalleryInterfaces.PublisherQuery, onResult: (err: any, statusCode: number, publisherquery: GalleryInterfaces.PublisherQueryResult) => void): void; - createPublisher(publisher: GalleryInterfaces.Publisher, onResult: (err: any, statusCode: number, publisher: GalleryInterfaces.Publisher) => void): void; - deletePublisher(publisherName: string, onResult: (err: any, statusCode: number) => void): void; - getPublisher(publisherName: string, flags: number, onResult: (err: any, statusCode: number, publisher: GalleryInterfaces.Publisher) => void): void; - updatePublisher(publisher: GalleryInterfaces.Publisher, publisherName: string, onResult: (err: any, statusCode: number, publisher: GalleryInterfaces.Publisher) => void): void; - createReview(review: GalleryInterfaces.Review, extensionId: string, onResult: (err: any, statusCode: number, review: GalleryInterfaces.Review) => void): void; - getReviews(extensionId: string, onResult: (err: any, statusCode: number, review: GalleryInterfaces.ReviewsResult) => void): void; - generateKey(keyType: string, expireCurrentSeconds: number, onResult: (err: any, statusCode: number) => void): void; - getSigningKey(keyType: string, onResult: (err: any, statusCode: number, signingkey: string) => void): void; - } - export interface IGalleryApi extends basem.QClientApiBase { - shareExtensionById(extensionId: string, accountName: string): Promise; - unshareExtensionById(extensionId: string, accountName: string): Promise; - shareExtension(publisherName: string, extensionName: string, accountName: string): Promise; - unshareExtension(publisherName: string, extensionName: string, accountName: string): Promise; - getAcquisitionOptions(itemId: string, installationTarget: string): Promise; - requestAcquisition(acquisitionRequest: GalleryInterfaces.ExtensionAcquisitionRequest): Promise; - getAssetByName(publisherName: string, extensionName: string, version: string, assetType: string, accountToken?: string, acceptDefault?: boolean): Promise; - getAsset(extensionId: string, version: string, assetType: string, accountToken?: string, acceptDefault?: boolean): Promise; - getCategories(languages?: string): Promise; - getCertificate(publisherName: string, extensionName: string, version?: string): Promise; - queryExtensions(extensionQuery: GalleryInterfaces.ExtensionQuery, accountToken?: string): Promise; - createExtension(extensionPackage: GalleryInterfaces.ExtensionPackage): Promise; - deleteExtensionById(extensionId: string, version?: string): Promise; - getExtensionById(extensionId: string, version?: string, flags?: GalleryInterfaces.ExtensionQueryFlags): Promise; - updateExtensionById(extensionPackage: GalleryInterfaces.ExtensionPackage, extensionId: string): Promise; - createExtensionWithPublisher(extensionPackage: GalleryInterfaces.ExtensionPackage, publisherName: string): Promise; - deleteExtension(publisherName: string, extensionName: string, version?: string): Promise; - getExtension(publisherName: string, extensionName: string, version?: string, flags?: GalleryInterfaces.ExtensionQueryFlags, accountToken?: string): Promise; - updateExtension(extensionPackage: GalleryInterfaces.ExtensionPackage, publisherName: string, extensionName: string): Promise; - getPackage(publisherName: string, extensionName: string, version: string, accountToken?: string, acceptDefault?: boolean): Promise; - getAssetWithToken(publisherName: string, extensionName: string, version: string, assetType: string, assetToken?: string, accountToken?: string, acceptDefault?: boolean): Promise; - queryPublishers(publisherQuery: GalleryInterfaces.PublisherQuery): Promise; - createPublisher(publisher: GalleryInterfaces.Publisher): Promise; - deletePublisher(publisherName: string): Promise; - getPublisher(publisherName: string, flags?: number): Promise; - updatePublisher(publisher: GalleryInterfaces.Publisher, publisherName: string): Promise; - createReview(review: GalleryInterfaces.Review, extensionId: string): Promise; - getReviews(extensionId: string): Promise; - generateKey(keyType: string, expireCurrentSeconds?: number): Promise; - getSigningKey(keyType: string): Promise; - } - export class GalleryApi extends basem.ClientApiBase implements IGalleryApi { - constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); - /** - * @param {string} extensionId - * @param {string} accountName - * @param onResult callback function - */ - shareExtensionById(extensionId: string, accountName: string, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {string} extensionId - * @param {string} accountName - * @param onResult callback function - */ - unshareExtensionById(extensionId: string, accountName: string, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {string} publisherName - * @param {string} extensionName - * @param {string} accountName - * @param onResult callback function - */ - shareExtension(publisherName: string, extensionName: string, accountName: string, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {string} publisherName - * @param {string} extensionName - * @param {string} accountName - * @param onResult callback function - */ - unshareExtension(publisherName: string, extensionName: string, accountName: string, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {string} itemId - * @param {string} installationTarget - * @param onResult callback function with the resulting GalleryInterfaces.AcquisitionOptions - */ - getAcquisitionOptions(itemId: string, installationTarget: string, onResult: (err: any, statusCode: number, acquisitionoption: GalleryInterfaces.AcquisitionOptions) => void): void; - /** - * @param {GalleryInterfaces.ExtensionAcquisitionRequest} acquisitionRequest - * @param onResult callback function with the resulting GalleryInterfaces.ExtensionAcquisitionRequest - */ - requestAcquisition(acquisitionRequest: GalleryInterfaces.ExtensionAcquisitionRequest, onResult: (err: any, statusCode: number, acquisitionrequest: GalleryInterfaces.ExtensionAcquisitionRequest) => void): void; - /** - * @param {string} publisherName - * @param {string} extensionName - * @param {string} version - * @param {string} assetType - * @param {string} accountToken - * @param {boolean} acceptDefault - * @param onResult callback function with the resulting ArrayBuffer - */ - getAssetByName(publisherName: string, extensionName: string, version: string, assetType: string, accountToken: string, acceptDefault: boolean, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * @param {string} extensionId - * @param {string} version - * @param {string} assetType - * @param {string} accountToken - * @param {boolean} acceptDefault - * @param onResult callback function with the resulting ArrayBuffer - */ - getAsset(extensionId: string, version: string, assetType: string, accountToken: string, acceptDefault: boolean, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * @param {string} languages - * @param onResult callback function with the resulting string[] - */ - getCategories(languages: string, onResult: (err: any, statusCode: number, categories: string[]) => void): void; - /** - * @param {string} publisherName - * @param {string} extensionName - * @param {string} version - * @param onResult callback function with the resulting ArrayBuffer - */ - getCertificate(publisherName: string, extensionName: string, version: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * @param {GalleryInterfaces.ExtensionQuery} extensionQuery - * @param {string} accountToken - * @param onResult callback function with the resulting GalleryInterfaces.ExtensionQueryResult - */ - queryExtensions(extensionQuery: GalleryInterfaces.ExtensionQuery, accountToken: string, onResult: (err: any, statusCode: number, extensionquery: GalleryInterfaces.ExtensionQueryResult) => void): void; - /** - * @param {GalleryInterfaces.ExtensionPackage} extensionPackage - * @param onResult callback function with the resulting GalleryInterfaces.PublishedExtension - */ - createExtension(extensionPackage: GalleryInterfaces.ExtensionPackage, onResult: (err: any, statusCode: number, extension: GalleryInterfaces.PublishedExtension) => void): void; - /** - * @param {string} extensionId - * @param {string} version - * @param onResult callback function - */ - deleteExtensionById(extensionId: string, version: string, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {string} extensionId - * @param {string} version - * @param {GalleryInterfaces.ExtensionQueryFlags} flags - * @param onResult callback function with the resulting GalleryInterfaces.PublishedExtension - */ - getExtensionById(extensionId: string, version: string, flags: GalleryInterfaces.ExtensionQueryFlags, onResult: (err: any, statusCode: number, extension: GalleryInterfaces.PublishedExtension) => void): void; - /** - * @param {GalleryInterfaces.ExtensionPackage} extensionPackage - * @param {string} extensionId - * @param onResult callback function with the resulting GalleryInterfaces.PublishedExtension - */ - updateExtensionById(extensionPackage: GalleryInterfaces.ExtensionPackage, extensionId: string, onResult: (err: any, statusCode: number, extension: GalleryInterfaces.PublishedExtension) => void): void; - /** - * @param {GalleryInterfaces.ExtensionPackage} extensionPackage - * @param {string} publisherName - * @param onResult callback function with the resulting GalleryInterfaces.PublishedExtension - */ - createExtensionWithPublisher(extensionPackage: GalleryInterfaces.ExtensionPackage, publisherName: string, onResult: (err: any, statusCode: number, extension: GalleryInterfaces.PublishedExtension) => void): void; - /** - * @param {string} publisherName - * @param {string} extensionName - * @param {string} version - * @param onResult callback function - */ - deleteExtension(publisherName: string, extensionName: string, version: string, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {string} publisherName - * @param {string} extensionName - * @param {string} version - * @param {GalleryInterfaces.ExtensionQueryFlags} flags - * @param {string} accountToken - * @param onResult callback function with the resulting GalleryInterfaces.PublishedExtension - */ - getExtension(publisherName: string, extensionName: string, version: string, flags: GalleryInterfaces.ExtensionQueryFlags, accountToken: string, onResult: (err: any, statusCode: number, extension: GalleryInterfaces.PublishedExtension) => void): void; - /** - * @param {GalleryInterfaces.ExtensionPackage} extensionPackage - * @param {string} publisherName - * @param {string} extensionName - * @param onResult callback function with the resulting GalleryInterfaces.PublishedExtension - */ - updateExtension(extensionPackage: GalleryInterfaces.ExtensionPackage, publisherName: string, extensionName: string, onResult: (err: any, statusCode: number, extension: GalleryInterfaces.PublishedExtension) => void): void; - /** - * @param {string} publisherName - * @param {string} extensionName - * @param {string} version - * @param {string} accountToken - * @param {boolean} acceptDefault - * @param onResult callback function with the resulting ArrayBuffer - */ - getPackage(publisherName: string, extensionName: string, version: string, accountToken: string, acceptDefault: boolean, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * @param {string} publisherName - * @param {string} extensionName - * @param {string} version - * @param {string} assetType - * @param {string} assetToken - * @param {string} accountToken - * @param {boolean} acceptDefault - * @param onResult callback function with the resulting ArrayBuffer - */ - getAssetWithToken(publisherName: string, extensionName: string, version: string, assetType: string, assetToken: string, accountToken: string, acceptDefault: boolean, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * @param {GalleryInterfaces.PublisherQuery} publisherQuery - * @param onResult callback function with the resulting GalleryInterfaces.PublisherQueryResult - */ - queryPublishers(publisherQuery: GalleryInterfaces.PublisherQuery, onResult: (err: any, statusCode: number, publisherquery: GalleryInterfaces.PublisherQueryResult) => void): void; - /** - * @param {GalleryInterfaces.Publisher} publisher - * @param onResult callback function with the resulting GalleryInterfaces.Publisher - */ - createPublisher(publisher: GalleryInterfaces.Publisher, onResult: (err: any, statusCode: number, publisher: GalleryInterfaces.Publisher) => void): void; - /** - * @param {string} publisherName - * @param onResult callback function - */ - deletePublisher(publisherName: string, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {string} publisherName - * @param {number} flags - * @param onResult callback function with the resulting GalleryInterfaces.Publisher - */ - getPublisher(publisherName: string, flags: number, onResult: (err: any, statusCode: number, publisher: GalleryInterfaces.Publisher) => void): void; - /** - * @param {GalleryInterfaces.Publisher} publisher - * @param {string} publisherName - * @param onResult callback function with the resulting GalleryInterfaces.Publisher - */ - updatePublisher(publisher: GalleryInterfaces.Publisher, publisherName: string, onResult: (err: any, statusCode: number, publisher: GalleryInterfaces.Publisher) => void): void; - /** - * Creates a new review item - * - * @param {GalleryInterfaces.Review} review - Contains details about the review item to be created like rating, reviewText, productId - * @param {string} extensionId - * @param onResult callback function with the resulting GalleryInterfaces.Review - */ - createReview(review: GalleryInterfaces.Review, extensionId: string, onResult: (err: any, statusCode: number, review: GalleryInterfaces.Review) => void): void; - /** - * Returns all reviews associated with a product - * - * @param {string} extensionId - Guid of the extension whose reviews need to be retrieved - * @param onResult callback function with the resulting GalleryInterfaces.ReviewsResult - */ - getReviews(extensionId: string, onResult: (err: any, statusCode: number, review: GalleryInterfaces.ReviewsResult) => void): void; - /** - * @param {string} keyType - * @param {number} expireCurrentSeconds - * @param onResult callback function - */ - generateKey(keyType: string, expireCurrentSeconds: number, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {string} keyType - * @param onResult callback function with the resulting string - */ - getSigningKey(keyType: string, onResult: (err: any, statusCode: number, signingkey: string) => void): void; - } - export class QGalleryApi extends basem.QClientApiBase implements IGalleryApi { - api: GalleryApi; - constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); - /** - * @param {string} extensionId - * @param {string} accountName - */ - shareExtensionById(extensionId: string, accountName: string): Promise; - /** - * @param {string} extensionId - * @param {string} accountName - */ - unshareExtensionById(extensionId: string, accountName: string): Promise; - /** - * @param {string} publisherName - * @param {string} extensionName - * @param {string} accountName - */ - shareExtension(publisherName: string, extensionName: string, accountName: string): Promise; - /** - * @param {string} publisherName - * @param {string} extensionName - * @param {string} accountName - */ - unshareExtension(publisherName: string, extensionName: string, accountName: string): Promise; - /** - * @param {string} itemId - * @param {string} installationTarget - */ - getAcquisitionOptions(itemId: string, installationTarget: string): Promise; - /** - * @param {GalleryInterfaces.ExtensionAcquisitionRequest} acquisitionRequest - */ - requestAcquisition(acquisitionRequest: GalleryInterfaces.ExtensionAcquisitionRequest): Promise; - /** - * @param {string} publisherName - * @param {string} extensionName - * @param {string} version - * @param {string} assetType - * @param {string} accountToken - * @param {boolean} acceptDefault - */ - getAssetByName(publisherName: string, extensionName: string, version: string, assetType: string, accountToken?: string, acceptDefault?: boolean): Promise; - /** - * @param {string} extensionId - * @param {string} version - * @param {string} assetType - * @param {string} accountToken - * @param {boolean} acceptDefault - */ - getAsset(extensionId: string, version: string, assetType: string, accountToken?: string, acceptDefault?: boolean): Promise; - /** - * @param {string} languages - */ - getCategories(languages?: string): Promise; - /** - * @param {string} publisherName - * @param {string} extensionName - * @param {string} version - */ - getCertificate(publisherName: string, extensionName: string, version?: string): Promise; - /** - * @param {GalleryInterfaces.ExtensionQuery} extensionQuery - * @param {string} accountToken - */ - queryExtensions(extensionQuery: GalleryInterfaces.ExtensionQuery, accountToken?: string): Promise; - /** - * @param {GalleryInterfaces.ExtensionPackage} extensionPackage - */ - createExtension(extensionPackage: GalleryInterfaces.ExtensionPackage): Promise; - /** - * @param {string} extensionId - * @param {string} version - */ - deleteExtensionById(extensionId: string, version?: string): Promise; - /** - * @param {string} extensionId - * @param {string} version - * @param {GalleryInterfaces.ExtensionQueryFlags} flags - */ - getExtensionById(extensionId: string, version?: string, flags?: GalleryInterfaces.ExtensionQueryFlags): Promise; - /** - * @param {GalleryInterfaces.ExtensionPackage} extensionPackage - * @param {string} extensionId - */ - updateExtensionById(extensionPackage: GalleryInterfaces.ExtensionPackage, extensionId: string): Promise; - /** - * @param {GalleryInterfaces.ExtensionPackage} extensionPackage - * @param {string} publisherName - */ - createExtensionWithPublisher(extensionPackage: GalleryInterfaces.ExtensionPackage, publisherName: string): Promise; - /** - * @param {string} publisherName - * @param {string} extensionName - * @param {string} version - */ - deleteExtension(publisherName: string, extensionName: string, version?: string): Promise; - /** - * @param {string} publisherName - * @param {string} extensionName - * @param {string} version - * @param {GalleryInterfaces.ExtensionQueryFlags} flags - * @param {string} accountToken - */ - getExtension(publisherName: string, extensionName: string, version?: string, flags?: GalleryInterfaces.ExtensionQueryFlags, accountToken?: string): Promise; - /** - * @param {GalleryInterfaces.ExtensionPackage} extensionPackage - * @param {string} publisherName - * @param {string} extensionName - */ - updateExtension(extensionPackage: GalleryInterfaces.ExtensionPackage, publisherName: string, extensionName: string): Promise; - /** - * @param {string} publisherName - * @param {string} extensionName - * @param {string} version - * @param {string} accountToken - * @param {boolean} acceptDefault - */ - getPackage(publisherName: string, extensionName: string, version: string, accountToken?: string, acceptDefault?: boolean): Promise; - /** - * @param {string} publisherName - * @param {string} extensionName - * @param {string} version - * @param {string} assetType - * @param {string} assetToken - * @param {string} accountToken - * @param {boolean} acceptDefault - */ - getAssetWithToken(publisherName: string, extensionName: string, version: string, assetType: string, assetToken?: string, accountToken?: string, acceptDefault?: boolean): Promise; - /** - * @param {GalleryInterfaces.PublisherQuery} publisherQuery - */ - queryPublishers(publisherQuery: GalleryInterfaces.PublisherQuery): Promise; - /** - * @param {GalleryInterfaces.Publisher} publisher - */ - createPublisher(publisher: GalleryInterfaces.Publisher): Promise; - /** - * @param {string} publisherName - */ - deletePublisher(publisherName: string): Promise; - /** - * @param {string} publisherName - * @param {number} flags - */ - getPublisher(publisherName: string, flags?: number): Promise; - /** - * @param {GalleryInterfaces.Publisher} publisher - * @param {string} publisherName - */ - updatePublisher(publisher: GalleryInterfaces.Publisher, publisherName: string): Promise; - /** - * Creates a new review item - * - * @param {GalleryInterfaces.Review} review - Contains details about the review item to be created like rating, reviewText, productId - * @param {string} extensionId - */ - createReview(review: GalleryInterfaces.Review, extensionId: string): Promise; - /** - * Returns all reviews associated with a product - * - * @param {string} extensionId - Guid of the extension whose reviews need to be retrieved - */ - getReviews(extensionId: string): Promise; - /** - * @param {string} keyType - * @param {number} expireCurrentSeconds - */ - generateKey(keyType: string, expireCurrentSeconds?: number): Promise; - /** - * @param {string} keyType - */ - getSigningKey(keyType: string): Promise; - } - -} -declare module 'vso-node-api/interfaces/GitInterfaces' { - import TfsCoreInterfaces = require('vso-node-api/interfaces/CoreInterfaces'); - import VSSInterfaces = require('vso-node-api/interfaces/common/VSSInterfaces'); - export interface AssociatedWorkItem { - assignedTo: string; - id: number; - state: string; - title: string; - /** - * REST url - */ - url: string; - webUrl: string; - workItemType: string; - } - export interface Change { - changeType: VersionControlChangeType; - item: T; - newContent: ItemContent; - sourceServerItem: string; - url: string; - } - export interface ChangeCountDictionary { - } - export interface ChangeList { - allChangesIncluded: boolean; - changeCounts: { - [key: number]: number; - }; - changes: Change[]; - comment: string; - commentTruncated: boolean; - creationDate: Date; - notes: CheckinNote[]; - owner: string; - ownerDisplayName: string; - ownerId: string; - sortDate: Date; - version: string; - } - /** - * Criteria used in a search for change lists - */ - export interface ChangeListSearchCriteria { - /** - * If provided, a version descriptor to compare against base - */ - compareVersion: string; - /** - * If true, don't include delete history entries - */ - excludeDeletes: boolean; - /** - * Whether or not to follow renames for the given item being queried - */ - followRenames: boolean; - /** - * If provided, only include history entries created after this date (string) - */ - fromDate: string; - /** - * If provided, a version descriptor for the earliest change list to include - */ - fromVersion: string; - /** - * Path of item to search under - */ - itemPath: string; - /** - * Version of the items to search - */ - itemVersion: string; - /** - * Number of results to skip (used when clicking more...) - */ - skip: number; - /** - * If provided, only include history entries created before this date (string) - */ - toDate: string; - /** - * If provided, the maximum number of history entries to return - */ - top: number; - /** - * If provided, a version descriptor for the latest change list to include - */ - toVersion: string; - /** - * Alias or display name of user who made the changes - */ - user: string; - } - export interface CheckinNote { - name: string; - value: string; - } - export interface FileContentMetadata { - contentType: string; - encoding: number; - extension: string; - fileName: string; - isBinary: boolean; - isImage: boolean; - vsLink: string; - } - export interface GitBaseVersionDescriptor extends GitVersionDescriptor { - /** - * Version string identifier (name of tag/branch, SHA1 of commit) - */ - baseVersion: string; - /** - * Version options - Specify additional modifiers to version (e.g Previous) - */ - baseVersionOptions: GitVersionOptions; - /** - * Version type (branch, tag, or commit). Determines how Id is interpreted - */ - baseVersionType: GitVersionType; - } - export interface GitBlobRef { - _links: any; - /** - * SHA1 hash of git object - */ - objectId: string; - /** - * Size of blob content (in bytes) - */ - size: number; - url: string; - } - export interface GitBranchStats { - aheadCount: number; - behindCount: number; - commit: GitCommitRef; - isBaseVersion: boolean; - name: string; - } - export interface GitChange extends Change { - } - export interface GitCommit extends GitCommitRef { - push: GitPushRef; - treeId: string; - } - export interface GitCommitChanges { - changeCounts: ChangeCountDictionary; - changes: GitChange[]; - } - export interface GitCommitDiffs { - aheadCount: number; - allChangesIncluded: boolean; - baseCommit: string; - behindCount: number; - changeCounts: { - [key: number]: number; - }; - changes: GitChange[]; - commonCommit: string; - targetCommit: string; - } - export interface GitCommitRef { - _links: any; - author: GitUserDate; - changeCounts: ChangeCountDictionary; - changes: GitChange[]; - comment: string; - commentTruncated: boolean; - commitId: string; - committer: GitUserDate; - parents: string[]; - remoteUrl: string; - url: string; - } - export interface GitCommitToCreate { - baseRef: GitRef; - comment: string; - pathActions: GitPathAction[]; - } - export interface GitDeletedRepository { - createdDate: Date; - deletedBy: VSSInterfaces.IdentityRef; - deletedDate: Date; - id: string; - name: string; - project: TfsCoreInterfaces.TeamProjectReference; - } - export interface GitHistoryQueryResults extends HistoryQueryResults { - /** - * Seed commit used for querying history. Used for skip feature. - */ - startingCommitId: string; - unpopulatedCount: number; - unprocessedCount: number; - } - export interface GitItem extends ItemModel { - /** - * SHA1 of commit item was fetched at - */ - commitId: string; - /** - * Type of object (Commit, Tree, Blob, Tag, ...) - */ - gitObjectType: GitObjectType; - /** - * Shallow ref to commit that last changed this item Only populated if latestProcessedChange is requested May not be accurate if latest change is not yet cached - */ - latestProcessedChange: GitCommitRef; - /** - * Git object id - */ - objectId: string; - /** - * Git object id - */ - originalObjectId: string; - } - export interface GitItemDescriptor { - /** - * Path to item - */ - path: string; - /** - * Specifies whether to include children (OneLevel), all descendants (Full), or None - */ - recursionLevel: VersionControlRecursionType; - /** - * Version string (interpretation based on VersionType defined in subclass - */ - version: string; - /** - * Version modifiers (e.g. previous) - */ - versionOptions: GitVersionOptions; - /** - * How to interpret version (branch,tag,commit) - */ - versionType: GitVersionType; - } - export interface GitItemRequestData { - /** - * Whether to include metadata for all items - */ - includeContentMetadata: boolean; - /** - * Whether to include the _links field on the shallow references - */ - includeLinks: boolean; - /** - * Collection of items to fetch, including path, version, and recursion level - */ - itemDescriptors: GitItemDescriptor[]; - /** - * Whether to include shallow ref to commit that last changed each item - */ - latestProcessedChange: boolean; - } - export enum GitObjectType { - Bad = 0, - Commit = 1, - Tree = 2, - Blob = 3, - Tag = 4, - Ext2 = 5, - OfsDelta = 6, - RefDelta = 7, - } - export interface GitPathAction { - action: GitPathActions; - base64Content: string; - path: string; - rawTextContent: string; - targetPath: string; - } - export enum GitPathActions { - None = 0, - Edit = 1, - Delete = 2, - Add = 3, - Rename = 4, - } - export enum GitPermissionScope { - Project = 0, - Repository = 1, - Branch = 2, - } - export interface GitPullRequest { - _links: any; - closedDate: Date; - codeReviewId: number; - commits: GitCommitRef[]; - completionOptions: GitPullRequestCompletionOptions; - completionQueueTime: Date; - createdBy: VSSInterfaces.IdentityRef; - creationDate: Date; - description: string; - lastMergeCommit: GitCommitRef; - lastMergeSourceCommit: GitCommitRef; - lastMergeTargetCommit: GitCommitRef; - mergeId: string; - mergeStatus: PullRequestAsyncStatus; - pullRequestId: number; - remoteUrl: string; - repository: GitRepository; - reviewers: IdentityRefWithVote[]; - sourceRefName: string; - status: PullRequestStatus; - targetRefName: string; - title: string; - upgraded: boolean; - url: string; - workItemRefs: VSSInterfaces.ResourceRef[]; - } - export interface GitPullRequestCompletionOptions { - deleteSourceBranch: boolean; - mergeCommitMessage: string; - squashMerge: boolean; - } - export interface GitPullRequestSearchCriteria { - creatorId: string; - /** - * Whether to include the _links field on the shallow references - */ - includeLinks: boolean; - repositoryId: string; - reviewerId: string; - sourceRefName: string; - status: PullRequestStatus; - targetRefName: string; - } - export interface GitPush extends GitPushRef { - commits: GitCommitRef[]; - refUpdates: GitRefUpdate[]; - repository: GitRepository; - } - export interface GitPushEventData { - afterId: string; - beforeId: string; - branch: string; - commits: GitCommit[]; - repository: GitRepository; - } - export interface GitPushRef { - _links: any; - date: Date; - pushCorrelationId: string; - pushedBy: VSSInterfaces.IdentityRef; - pushId: number; - url: string; - } - export interface GitPushSearchCriteria { - fromDate: Date; - /** - * Whether to include the _links field on the shallow references - */ - includeLinks: boolean; - includeRefUpdates: boolean; - pusherId: string; - refName: string; - toDate: Date; - } - export interface GitQueryCommitsCriteria { - /** - * Number of entries to skip - */ - $skip: number; - /** - * Maximum number of entries to retrieve - */ - $top: number; - /** - * Alias or display name of the author - */ - author: string; - /** - * If provided, the earliest commit in the graph to search - */ - compareVersion: GitVersionDescriptor; - /** - * If true, don't include delete history entries - */ - excludeDeletes: boolean; - /** - * If provided, a lower bound for filtering commits alphabetically - */ - fromCommitId: string; - /** - * If provided, only include history entries created after this date (string) - */ - fromDate: string; - /** - * If provided, specifies the exact commit ids of the commits to fetch. May not be combined with other parameters. - */ - ids: string[]; - /** - * Whether to include the _links field on the shallow references - */ - includeLinks: boolean; - /** - * Path of item to search under - */ - itemPath: string; - /** - * If provided, identifies the commit or branch to search - */ - itemVersion: GitVersionDescriptor; - /** - * If provided, an upper bound for filtering commits alphabetically - */ - toCommitId: string; - /** - * If provided, only include history entries created before this date (string) - */ - toDate: string; - /** - * Alias or display name of the committer - */ - user: string; - } - export interface GitRef { - _links: any; - isLockedBy: VSSInterfaces.IdentityRef; - name: string; - objectId: string; - statuses: GitStatus[]; - url: string; - } - export interface GitRefUpdate { - name: string; - newObjectId: string; - oldObjectId: string; - repositoryId: string; - } - export enum GitRefUpdateMode { - /** - * Indicates the Git protocol model where any refs that can be updated will be updated, but any failures will not prevent other updates from succeeding. - */ - BestEffort = 0, - /** - * Indicates that all ref updates must succeed or none will succeed. All ref updates will be atomically written. If any failure is encountered, previously successful updates will be rolled back and the entire operation will fail. - */ - AllOrNone = 1, - } - export interface GitRefUpdateResult { - /** - * Custom message for the result object For instance, Reason for failing. - */ - customMessage: string; - /** - * Ref name - */ - name: string; - /** - * New object ID - */ - newObjectId: string; - /** - * Old object ID - */ - oldObjectId: string; - /** - * Name of the plugin that rejected the updated. - */ - rejectedBy: string; - /** - * Repository ID - */ - repositoryId: string; - /** - * True if the ref update succeeded, false otherwise - */ - success: boolean; - /** - * Status of the update from the TFS server. - */ - updateStatus: GitRefUpdateStatus; - } - export interface GitRefUpdateResultSet { - countFailed: number; - countSucceeded: number; - pushCorrelationId: string; - pushIds: { - [key: string]: number; - }; - pushTime: Date; - results: GitRefUpdateResult[]; - } - export enum GitRefUpdateStatus { - /** - * Indicates that the ref update request was completed successfully. - */ - Succeeded = 0, - /** - * Indicates that the ref update request could not be completed because part of the graph would be disconnected by this change, and the caller does not have ForcePush permission on the repository. - */ - ForcePushRequired = 1, - /** - * Indicates that the ref update request could not be completed because the old object ID presented in the request was not the object ID of the ref when the database attempted the update. The most likely scenario is that the caller lost a race to update the ref. - */ - StaleOldObjectId = 2, - /** - * Indicates that the ref update request could not be completed because the ref name presented in the request was not valid. - */ - InvalidRefName = 3, - /** - * The request was not processed - */ - Unprocessed = 4, - /** - * The ref update request could not be completed because the new object ID for the ref could not be resolved to a commit object (potentially through any number of tags) - */ - UnresolvableToCommit = 5, - /** - * The ref update request could not be completed because the user lacks write permissions required to write this ref - */ - WritePermissionRequired = 6, - /** - * The ref update request could not be completed because the user lacks note creation permissions required to write this note - */ - ManageNotePermissionRequired = 7, - /** - * The ref update request could not be completed because the user lacks the permission to create a branch - */ - CreateBranchPermissionRequired = 8, - /** - * The ref update request could not be completed because the user lacks the permission to create a tag - */ - CreateTagPermissionRequired = 9, - /** - * The ref update could not be completed because it was rejected by the plugin. - */ - RejectedByPlugin = 10, - /** - * The ref update could not be completed because the ref is locked by another user. - */ - Locked = 11, - /** - * The ref update could not be completed because, in case-insensitive mode, the ref name conflicts with an existing, differently-cased ref name. - */ - RefNameConflict = 12, - /** - * The ref update could not be completed because it was rejected by policy. - */ - RejectedByPolicy = 13, - /** - * Indicates that the ref update request was completed successfully, but the ref doesn't actually exist so no changes were made. This should only happen during deletes. - */ - SucceededNonExistentRef = 14, - /** - * Indicates that the ref update request was completed successfully, but the passed-in ref was corrupt - as in, the old object ID was bad. This should only happen during deletes. - */ - SucceededCorruptRef = 15, - } - export interface GitRepository { - _links: any; - defaultBranch: string; - id: string; - name: string; - project: TfsCoreInterfaces.TeamProjectReference; - remoteUrl: string; - url: string; - } - export enum GitRepositoryPermissions { - None = 0, - Administer = 1, - GenericRead = 2, - GenericContribute = 4, - ForcePush = 8, - CreateBranch = 16, - CreateTag = 32, - ManageNote = 64, - PolicyExempt = 128, - /** - * This defines the set of bits that are valid for the git permission space. When reading or writing git permissions, these are the only bits paid attention too. - */ - All = 255, - BranchLevelPermissions = 141, - } - export interface GitStatus { - _links: any; - context: GitStatusContext; - createdBy: VSSInterfaces.IdentityRef; - creationDate: Date; - description: string; - state: GitStatusState; - targetUrl: string; - } - export interface GitStatusContext { - genre: string; - name: string; - } - export enum GitStatusState { - NotSet = 0, - Pending = 1, - Succeeded = 2, - Failed = 3, - Error = 4, - } - export interface GitSuggestion { - properties: { - [key: string]: any; - }; - type: string; - } - export interface GitTargetVersionDescriptor extends GitVersionDescriptor { - /** - * Version string identifier (name of tag/branch, SHA1 of commit) - */ - targetVersion: string; - /** - * Version options - Specify additional modifiers to version (e.g Previous) - */ - targetVersionOptions: GitVersionOptions; - /** - * Version type (branch, tag, or commit). Determines how Id is interpreted - */ - targetVersionType: GitVersionType; - } - export interface GitTreeEntryRef { - /** - * Blob or tree - */ - gitObjectType: GitObjectType; - /** - * Mode represented as octal string - */ - mode: string; - /** - * SHA1 hash of git object - */ - objectId: string; - /** - * Path relative to parent tree object - */ - relativePath: string; - /** - * Size of content - */ - size: number; - /** - * url to retrieve tree or blob - */ - url: string; - } - export interface GitTreeRef { - _links: any; - /** - * SHA1 hash of git object - */ - objectId: string; - /** - * Sum of sizes of all children - */ - size: number; - /** - * Blobs and trees under this tree - */ - treeEntries: GitTreeEntryRef[]; - /** - * Url to tree - */ - url: string; - } - export interface GitUserDate { - date: Date; - email: string; - name: string; - } - export interface GitVersionDescriptor { - /** - * Version string identifier (name of tag/branch/index, SHA1 of commit) - */ - version: string; - /** - * Version options - Specify additional modifiers to version (e.g Previous) - */ - versionOptions: GitVersionOptions; - /** - * Version type (branch, tag, commit, or index). Determines how Id is interpreted - */ - versionType: GitVersionType; - } - export enum GitVersionOptions { - /** - * Not specified - */ - None = 0, - /** - * Commit that changed item prior to the current version - */ - PreviousChange = 1, - /** - * First parent of commit (HEAD^) - */ - FirstParent = 2, - } - export enum GitVersionType { - /** - * Interpret the version as a branch name - */ - Branch = 0, - /** - * Interpret the version as a tag name - */ - Tag = 1, - /** - * Interpret the version as a commit ID (SHA1) - */ - Commit = 2, - /** - * Interpret the version as an index name - */ - Index = 3, - } - export interface HistoryEntry { - /** - * The Change list (changeset/commit/shelveset) for this point in history - */ - changeList: ChangeList; - /** - * The change made to the item from this change list (only relevant for File history, not folders) - */ - itemChangeType: VersionControlChangeType; - /** - * The path of the item at this point in history (only relevant for File history, not folders) - */ - serverItem: string; - } - export interface HistoryQueryResults { - /** - * True if there are more results available to fetch (we're returning the max # of items requested) A more RESTy solution would be to include a Link header - */ - moreResultsAvailable: boolean; - /** - * The history entries (results) from this query - */ - results: HistoryEntry[]; - } - export interface IdentityRefWithVote extends VSSInterfaces.IdentityRef { - isRequired: boolean; - reviewerUrl: string; - vote: number; - votedFor: IdentityRefWithVote[]; - } - export interface IncludedGitCommit { - commitId: string; - commitTime: Date; - parentCommitIds: string[]; - repositoryId: string; - } - export interface ItemContent { - content: string; - contentType: ItemContentType; - } - export enum ItemContentType { - RawText = 0, - Base64Encoded = 1, - } - /** - * Optional details to include when returning an item model - */ - export interface ItemDetailsOptions { - /** - * If true, include metadata about the file type - */ - includeContentMetadata: boolean; - /** - * Specifies whether to include children (OneLevel), all descendants (Full) or None for folder items - */ - recursionLevel: VersionControlRecursionType; - } - export interface ItemModel { - _links: any; - contentMetadata: FileContentMetadata; - isFolder: boolean; - isSymLink: boolean; - path: string; - url: string; - } - export enum PullRequestAsyncStatus { - NotSet = 0, - Queued = 1, - Conflicts = 2, - Succeeded = 3, - RejectedByPolicy = 4, - Failure = 5, - } - export enum PullRequestStatus { - NotSet = 0, - Active = 1, - Abandoned = 2, - Completed = 3, - All = 4, - } - export interface TfvcBranch extends TfvcBranchRef { - children: TfvcBranch[]; - mappings: TfvcBranchMapping[]; - parent: TfvcShallowBranchRef; - relatedBranches: TfvcShallowBranchRef[]; - } - export interface TfvcBranchMapping { - depth: string; - serverItem: string; - type: string; - } - export interface TfvcBranchRef extends TfvcShallowBranchRef { - _links: any; - createdDate: Date; - description: string; - isDeleted: boolean; - owner: VSSInterfaces.IdentityRef; - url: string; - } - export interface TfvcChange extends Change { - /** - * List of merge sources in case of rename or branch creation. - */ - mergeSources: TfvcMergeSource[]; - /** - * Version at which a (shelved) change was pended against - */ - pendingVersion: number; - } - export interface TfvcChangeset extends TfvcChangesetRef { - accountId: string; - changes: TfvcChange[]; - checkinNotes: CheckinNote[]; - collectionId: string; - hasMoreChanges: boolean; - policyOverride: TfvcPolicyOverrideInfo; - teamProjectIds: string[]; - workItems: AssociatedWorkItem[]; - } - export interface TfvcChangesetRef { - _links: any; - author: VSSInterfaces.IdentityRef; - changesetId: number; - checkedInBy: VSSInterfaces.IdentityRef; - comment: string; - commentTruncated: boolean; - createdDate: Date; - url: string; - } - /** - * Criteria used in a search for change lists - */ - export interface TfvcChangesetSearchCriteria { - /** - * Alias or display name of user who made the changes - */ - author: string; - /** - * Whether or not to follow renames for the given item being queried - */ - followRenames: boolean; - /** - * If provided, only include changesets created after this date (string) Think of a better name for this. - */ - fromDate: string; - /** - * If provided, only include changesets after this changesetID - */ - fromId: number; - /** - * Whether to include the _links field on the shallow references - */ - includeLinks: boolean; - /** - * Path of item to search under - */ - path: string; - /** - * If provided, only include changesets created before this date (string) Think of a better name for this. - */ - toDate: string; - /** - * If provided, a version descriptor for the latest change list to include - */ - toId: number; - } - export interface TfvcChangesetsRequestData { - changesetIds: number[]; - commentLength: number; - /** - * Whether to include the _links field on the shallow references - */ - includeLinks: boolean; - } - export interface TfvcCheckinEventData { - changeset: TfvcChangeset; - project: TfsCoreInterfaces.TeamProjectReference; - } - export interface TfvcHistoryEntry extends HistoryEntry { - /** - * The encoding of the item at this point in history (only relevant for File history, not folders) - */ - encoding: number; - /** - * The file id of the item at this point in history (only relevant for File history, not folders) - */ - fileId: number; - } - export interface TfvcItem extends ItemModel { - changeDate: Date; - deletionId: number; - /** - * MD5 hash as a base 64 string, applies to files only. - */ - hashValue: string; - isBranch: boolean; - isPendingChange: boolean; - /** - * The size of the file, if applicable. - */ - size: number; - version: number; - } - /** - * Item path and Version descriptor properties - */ - export interface TfvcItemDescriptor { - path: string; - recursionLevel: VersionControlRecursionType; - version: string; - versionOption: TfvcVersionOption; - versionType: TfvcVersionType; - } - export interface TfvcItemRequestData { - /** - * If true, include metadata about the file type - */ - includeContentMetadata: boolean; - /** - * Whether to include the _links field on the shallow references - */ - includeLinks: boolean; - itemDescriptors: TfvcItemDescriptor[]; - } - export interface TfvcLabel extends TfvcLabelRef { - items: TfvcItem[]; - } - export interface TfvcLabelRef { - _links: any; - description: string; - id: number; - labelScope: string; - modifiedDate: Date; - name: string; - owner: VSSInterfaces.IdentityRef; - url: string; - } - export interface TfvcLabelRequestData { - /** - * Whether to include the _links field on the shallow references - */ - includeLinks: boolean; - itemLabelFilter: string; - labelScope: string; - maxItemCount: number; - name: string; - owner: string; - } - export interface TfvcMergeSource { - /** - * Indicates if this a rename source. If false, it is a merge source. - */ - isRename: boolean; - /** - * The server item of the merge source - */ - serverItem: string; - /** - * Start of the version range - */ - versionFrom: number; - /** - * End of the version range - */ - versionTo: number; - } - export interface TfvcPolicyFailureInfo { - message: string; - policyName: string; - } - export interface TfvcPolicyOverrideInfo { - comment: string; - policyFailures: TfvcPolicyFailureInfo[]; - } - export interface TfvcShallowBranchRef { - path: string; - } - export interface TfvcShelveset extends TfvcShelvesetRef { - changes: TfvcChange[]; - notes: CheckinNote[]; - policyOverride: TfvcPolicyOverrideInfo; - workItems: AssociatedWorkItem[]; - } - export interface TfvcShelvesetRef { - _links: any; - comment: string; - commentTruncated: boolean; - createdDate: Date; - id: string; - name: string; - owner: VSSInterfaces.IdentityRef; - url: string; - } - export interface TfvcShelvesetRequestData { - /** - * Whether to include policyOverride and notes - */ - includeDetails: boolean; - /** - * Whether to include the _links field on the shallow references - */ - includeLinks: boolean; - /** - * Whether to include workItems - */ - includeWorkItems: boolean; - /** - * Max number of changes to include - */ - maxChangeCount: number; - /** - * Max length of comment - */ - maxCommentLength: number; - /** - * Shelveset's name - */ - name: string; - /** - * Owner's ID. Could be a name or a guid. - */ - owner: string; - } - export interface TfvcVersionDescriptor { - version: string; - versionOption: TfvcVersionOption; - versionType: TfvcVersionType; - } - export enum TfvcVersionOption { - None = 0, - Previous = 1, - UseRename = 2, - } - export enum TfvcVersionType { - None = 0, - Changeset = 1, - Shelveset = 2, - Change = 3, - Date = 4, - Latest = 5, - Tip = 6, - MergeSource = 7, - } - export interface UpdateRefsRequest { - refUpdateRequests: GitRefUpdate[]; - updateMode: GitRefUpdateMode; - } - export enum VersionControlChangeType { - None = 0, - Add = 1, - Edit = 2, - Encoding = 4, - Rename = 8, - Delete = 16, - Undelete = 32, - Branch = 64, - Merge = 128, - Lock = 256, - Rollback = 512, - SourceRename = 1024, - TargetRename = 2048, - Property = 4096, - All = 8191, - } - export interface VersionControlProjectInfo { - defaultSourceControlType: TfsCoreInterfaces.SourceControlTypes; - project: TfsCoreInterfaces.TeamProjectReference; - supportsGit: boolean; - supportsTFVC: boolean; - } - export enum VersionControlRecursionType { - /** - * Only return the specified item. - */ - None = 0, - /** - * Return the specified item and its direct children. - */ - OneLevel = 1, - /** - * Return the specified item and its direct children, as well as recursive chains of nested child folders that only contain a single folder. - */ - OneLevelPlusNestedEmptyFolders = 4, - /** - * Return specified item and all descendants - */ - Full = 120, - } - export var TypeInfo: { - AssociatedWorkItem: { - fields: any; - }; - Change: { - fields: any; - }; - ChangeCountDictionary: { - fields: any; - }; - ChangeList: { - fields: any; - }; - ChangeListSearchCriteria: { - fields: any; - }; - CheckinNote: { - fields: any; - }; - FileContentMetadata: { - fields: any; - }; - GitBaseVersionDescriptor: { - fields: any; - }; - GitBlobRef: { - fields: any; - }; - GitBranchStats: { - fields: any; - }; - GitChange: { - fields: any; - }; - GitCommit: { - fields: any; - }; - GitCommitChanges: { - fields: any; - }; - GitCommitDiffs: { - fields: any; - }; - GitCommitRef: { - fields: any; - }; - GitCommitToCreate: { - fields: any; - }; - GitDeletedRepository: { - fields: any; - }; - GitHistoryQueryResults: { - fields: any; - }; - GitItem: { - fields: any; - }; - GitItemDescriptor: { - fields: any; - }; - GitItemRequestData: { - fields: any; - }; - GitObjectType: { - enumValues: { - "bad": number; - "commit": number; - "tree": number; - "blob": number; - "tag": number; - "ext2": number; - "ofsDelta": number; - "refDelta": number; - }; - }; - GitPathAction: { - fields: any; - }; - GitPathActions: { - enumValues: { - "none": number; - "edit": number; - "delete": number; - "add": number; - "rename": number; - }; - }; - GitPermissionScope: { - enumValues: { - "project": number; - "repository": number; - "branch": number; - }; - }; - GitPullRequest: { - fields: any; - }; - GitPullRequestCompletionOptions: { - fields: any; - }; - GitPullRequestSearchCriteria: { - fields: any; - }; - GitPush: { - fields: any; - }; - GitPushEventData: { - fields: any; - }; - GitPushRef: { - fields: any; - }; - GitPushSearchCriteria: { - fields: any; - }; - GitQueryCommitsCriteria: { - fields: any; - }; - GitRef: { - fields: any; - }; - GitRefUpdate: { - fields: any; - }; - GitRefUpdateMode: { - enumValues: { - "bestEffort": number; - "allOrNone": number; - }; - }; - GitRefUpdateResult: { - fields: any; - }; - GitRefUpdateResultSet: { - fields: any; - }; - GitRefUpdateStatus: { - enumValues: { - "succeeded": number; - "forcePushRequired": number; - "staleOldObjectId": number; - "invalidRefName": number; - "unprocessed": number; - "unresolvableToCommit": number; - "writePermissionRequired": number; - "manageNotePermissionRequired": number; - "createBranchPermissionRequired": number; - "createTagPermissionRequired": number; - "rejectedByPlugin": number; - "locked": number; - "refNameConflict": number; - "rejectedByPolicy": number; - "succeededNonExistentRef": number; - "succeededCorruptRef": number; - }; - }; - GitRepository: { - fields: any; - }; - GitRepositoryPermissions: { - enumValues: { - "none": number; - "administer": number; - "genericRead": number; - "genericContribute": number; - "forcePush": number; - "createBranch": number; - "createTag": number; - "manageNote": number; - "policyExempt": number; - "all": number; - "branchLevelPermissions": number; - }; - }; - GitStatus: { - fields: any; - }; - GitStatusContext: { - fields: any; - }; - GitStatusState: { - enumValues: { - "notSet": number; - "pending": number; - "succeeded": number; - "failed": number; - "error": number; - }; - }; - GitSuggestion: { - fields: any; - }; - GitTargetVersionDescriptor: { - fields: any; - }; - GitTreeEntryRef: { - fields: any; - }; - GitTreeRef: { - fields: any; - }; - GitUserDate: { - fields: any; - }; - GitVersionDescriptor: { - fields: any; - }; - GitVersionOptions: { - enumValues: { - "none": number; - "previousChange": number; - "firstParent": number; - }; - }; - GitVersionType: { - enumValues: { - "branch": number; - "tag": number; - "commit": number; - "index": number; - }; - }; - HistoryEntry: { - fields: any; - }; - HistoryQueryResults: { - fields: any; - }; - IdentityRefWithVote: { - fields: any; - }; - IncludedGitCommit: { - fields: any; - }; - ItemContent: { - fields: any; - }; - ItemContentType: { - enumValues: { - "rawText": number; - "base64Encoded": number; - }; - }; - ItemDetailsOptions: { - fields: any; - }; - ItemModel: { - fields: any; - }; - PullRequestAsyncStatus: { - enumValues: { - "notSet": number; - "queued": number; - "conflicts": number; - "succeeded": number; - "rejectedByPolicy": number; - "failure": number; - }; - }; - PullRequestStatus: { - enumValues: { - "notSet": number; - "active": number; - "abandoned": number; - "completed": number; - "all": number; - }; - }; - TfvcBranch: { - fields: any; - }; - TfvcBranchMapping: { - fields: any; - }; - TfvcBranchRef: { - fields: any; - }; - TfvcChange: { - fields: any; - }; - TfvcChangeset: { - fields: any; - }; - TfvcChangesetRef: { - fields: any; - }; - TfvcChangesetSearchCriteria: { - fields: any; - }; - TfvcChangesetsRequestData: { - fields: any; - }; - TfvcCheckinEventData: { - fields: any; - }; - TfvcHistoryEntry: { - fields: any; - }; - TfvcItem: { - fields: any; - }; - TfvcItemDescriptor: { - fields: any; - }; - TfvcItemRequestData: { - fields: any; - }; - TfvcLabel: { - fields: any; - }; - TfvcLabelRef: { - fields: any; - }; - TfvcLabelRequestData: { - fields: any; - }; - TfvcMergeSource: { - fields: any; - }; - TfvcPolicyFailureInfo: { - fields: any; - }; - TfvcPolicyOverrideInfo: { - fields: any; - }; - TfvcShallowBranchRef: { - fields: any; - }; - TfvcShelveset: { - fields: any; - }; - TfvcShelvesetRef: { - fields: any; - }; - TfvcShelvesetRequestData: { - fields: any; - }; - TfvcVersionDescriptor: { - fields: any; - }; - TfvcVersionOption: { - enumValues: { - "none": number; - "previous": number; - "useRename": number; - }; - }; - TfvcVersionType: { - enumValues: { - "none": number; - "changeset": number; - "shelveset": number; - "change": number; - "date": number; - "latest": number; - "tip": number; - "mergeSource": number; - }; - }; - UpdateRefsRequest: { - fields: any; - }; - VersionControlChangeType: { - enumValues: { - "none": number; - "add": number; - "edit": number; - "encoding": number; - "rename": number; - "delete": number; - "undelete": number; - "branch": number; - "merge": number; - "lock": number; - "rollback": number; - "sourceRename": number; - "targetRename": number; - "property": number; - "all": number; - }; - }; - VersionControlProjectInfo: { - fields: any; - }; - VersionControlRecursionType: { - enumValues: { - "none": number; - "oneLevel": number; - "oneLevelPlusNestedEmptyFolders": number; - "full": number; - }; - }; - }; - -} -declare module 'vso-node-api/GitApi' { - - - import Q = require('q'); - import basem = require('vso-node-api/ClientApiBases'); - import VsoBaseInterfaces = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); - import GitInterfaces = require('vso-node-api/interfaces/GitInterfaces'); - import VSSInterfaces = require('vso-node-api/interfaces/common/VSSInterfaces'); - export interface IGitApi extends basem.ClientApiBase { - getBlob(repositoryId: string, sha1: string, project: string, download: boolean, fileName: string, onResult: (err: any, statusCode: number, Blob: GitInterfaces.GitBlobRef) => void): void; - getBlobContent(repositoryId: string, sha1: string, project: string, download: boolean, fileName: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - getBlobsZip(blobIds: string[], repositoryId: string, project: string, filename: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - getBlobZip(repositoryId: string, sha1: string, project: string, download: boolean, fileName: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - getBranch(repositoryId: string, name: string, project: string, baseVersionDescriptor: GitInterfaces.GitVersionDescriptor, onResult: (err: any, statusCode: number, BranchStat: GitInterfaces.GitBranchStats) => void): void; - getBranches(repositoryId: string, project: string, baseVersionDescriptor: GitInterfaces.GitVersionDescriptor, onResult: (err: any, statusCode: number, BranchStats: GitInterfaces.GitBranchStats[]) => void): void; - getChanges(commitId: string, repositoryId: string, project: string, top: number, skip: number, onResult: (err: any, statusCode: number, Change: GitInterfaces.GitCommitChanges) => void): void; - getCommit(commitId: string, repositoryId: string, project: string, changeCount: number, onResult: (err: any, statusCode: number, Commit: GitInterfaces.GitCommit) => void): void; - getCommits(repositoryId: string, searchCriteria: GitInterfaces.GitQueryCommitsCriteria, project: string, skip: number, top: number, onResult: (err: any, statusCode: number, Commits: GitInterfaces.GitCommitRef[]) => void): void; - getPushCommits(repositoryId: string, pushId: number, project: string, top: number, skip: number, includeLinks: boolean, onResult: (err: any, statusCode: number, Commits: GitInterfaces.GitCommitRef[]) => void): void; - getCommitsBatch(searchCriteria: GitInterfaces.GitQueryCommitsCriteria, repositoryId: string, project: string, skip: number, top: number, onResult: (err: any, statusCode: number, CommitsBatch: GitInterfaces.GitCommitRef[]) => void): void; - getDeletedRepositories(project: string, onResult: (err: any, statusCode: number, DeletedRepositories: GitInterfaces.GitDeletedRepository[]) => void): void; - getItem(repositoryId: string, path: string, project: string, scopePath: string, recursionLevel: GitInterfaces.VersionControlRecursionType, includeContentMetadata: boolean, latestProcessedChange: boolean, download: boolean, versionDescriptor: GitInterfaces.GitVersionDescriptor, onResult: (err: any, statusCode: number, Item: GitInterfaces.GitItem) => void): void; - getItemContent(repositoryId: string, path: string, project: string, scopePath: string, recursionLevel: GitInterfaces.VersionControlRecursionType, includeContentMetadata: boolean, latestProcessedChange: boolean, download: boolean, versionDescriptor: GitInterfaces.GitVersionDescriptor, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - getItems(repositoryId: string, project: string, scopePath: string, recursionLevel: GitInterfaces.VersionControlRecursionType, includeContentMetadata: boolean, latestProcessedChange: boolean, download: boolean, includeLinks: boolean, versionDescriptor: GitInterfaces.GitVersionDescriptor, onResult: (err: any, statusCode: number, Items: GitInterfaces.GitItem[]) => void): void; - getItemText(repositoryId: string, path: string, project: string, scopePath: string, recursionLevel: GitInterfaces.VersionControlRecursionType, includeContentMetadata: boolean, latestProcessedChange: boolean, download: boolean, versionDescriptor: GitInterfaces.GitVersionDescriptor, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - getItemZip(repositoryId: string, path: string, project: string, scopePath: string, recursionLevel: GitInterfaces.VersionControlRecursionType, includeContentMetadata: boolean, latestProcessedChange: boolean, download: boolean, versionDescriptor: GitInterfaces.GitVersionDescriptor, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - getItemsBatch(requestData: GitInterfaces.GitItemRequestData, repositoryId: string, project: string, onResult: (err: any, statusCode: number, ItemsBatch: GitInterfaces.GitItem[][]) => void): void; - getPullRequestCommits(repositoryId: string, pullRequestId: number, project: string, onResult: (err: any, statusCode: number, PullRequestCommits: GitInterfaces.GitCommitRef[]) => void): void; - createPullRequestReviewer(reviewer: GitInterfaces.IdentityRefWithVote, repositoryId: string, pullRequestId: number, reviewerId: string, project: string, onResult: (err: any, statusCode: number, PullRequestReviewer: GitInterfaces.IdentityRefWithVote) => void): void; - createPullRequestReviewers(reviewers: VSSInterfaces.IdentityRef[], repositoryId: string, pullRequestId: number, project: string, onResult: (err: any, statusCode: number, PullRequestReviewers: GitInterfaces.IdentityRefWithVote[]) => void): void; - deletePullRequestReviewer(repositoryId: string, pullRequestId: number, reviewerId: string, project: string, onResult: (err: any, statusCode: number) => void): void; - getPullRequestReviewer(repositoryId: string, pullRequestId: number, reviewerId: string, project: string, onResult: (err: any, statusCode: number, PullRequestReviewer: GitInterfaces.IdentityRefWithVote) => void): void; - getPullRequestReviewers(repositoryId: string, pullRequestId: number, project: string, onResult: (err: any, statusCode: number, PullRequestReviewers: GitInterfaces.IdentityRefWithVote[]) => void): void; - getPullRequestsByProject(project: string, searchCriteria: GitInterfaces.GitPullRequestSearchCriteria, maxCommentLength: number, skip: number, top: number, onResult: (err: any, statusCode: number, PullRequests: GitInterfaces.GitPullRequest[]) => void): void; - createPullRequest(gitPullRequestToCreate: GitInterfaces.GitPullRequest, repositoryId: string, project: string, onResult: (err: any, statusCode: number, PullRequest: GitInterfaces.GitPullRequest) => void): void; - getPullRequest(repositoryId: string, pullRequestId: number, project: string, maxCommentLength: number, skip: number, top: number, includeCommits: boolean, onResult: (err: any, statusCode: number, PullRequest: GitInterfaces.GitPullRequest) => void): void; - getPullRequests(repositoryId: string, searchCriteria: GitInterfaces.GitPullRequestSearchCriteria, project: string, maxCommentLength: number, skip: number, top: number, onResult: (err: any, statusCode: number, PullRequests: GitInterfaces.GitPullRequest[]) => void): void; - updatePullRequest(gitPullRequestToUpdate: GitInterfaces.GitPullRequest, repositoryId: string, pullRequestId: number, project: string, onResult: (err: any, statusCode: number, PullRequest: GitInterfaces.GitPullRequest) => void): void; - getPullRequestWorkItems(repositoryId: string, pullRequestId: number, project: string, commitsTop: number, commitsSkip: number, onResult: (err: any, statusCode: number, PullRequestWorkItems: GitInterfaces.AssociatedWorkItem[]) => void): void; - createPush(push: GitInterfaces.GitPush, repositoryId: string, project: string, onResult: (err: any, statusCode: number, pushe: GitInterfaces.GitPush) => void): void; - getPush(repositoryId: string, pushId: number, project: string, includeCommits: number, includeRefUpdates: boolean, onResult: (err: any, statusCode: number, pushe: GitInterfaces.GitPush) => void): void; - getPushes(repositoryId: string, project: string, skip: number, top: number, searchCriteria: GitInterfaces.GitPushSearchCriteria, onResult: (err: any, statusCode: number, pushes: GitInterfaces.GitPush[]) => void): void; - getRefs(repositoryId: string, project: string, filter: string, includeLinks: boolean, onResult: (err: any, statusCode: number, refs: GitInterfaces.GitRef[]) => void): void; - updateRefs(refUpdates: GitInterfaces.GitRefUpdate[], repositoryId: string, project: string, projectId: string, onResult: (err: any, statusCode: number, refs: GitInterfaces.GitRefUpdateResult[]) => void): void; - createRepository(gitRepositoryToCreate: GitInterfaces.GitRepository, project: string, onResult: (err: any, statusCode: number, Repositorie: GitInterfaces.GitRepository) => void): void; - deleteRepository(repositoryId: string, project: string, onResult: (err: any, statusCode: number) => void): void; - getRepositories(project: string, includeLinks: boolean, onResult: (err: any, statusCode: number, Repositories: GitInterfaces.GitRepository[]) => void): void; - getRepository(repositoryId: string, project: string, onResult: (err: any, statusCode: number, Repositorie: GitInterfaces.GitRepository) => void): void; - updateRepository(newRepositoryInfo: GitInterfaces.GitRepository, repositoryId: string, project: string, onResult: (err: any, statusCode: number, Repositorie: GitInterfaces.GitRepository) => void): void; - createCommitStatus(gitCommitStatusToCreate: GitInterfaces.GitStatus, commitId: string, repositoryId: string, project: string, onResult: (err: any, statusCode: number, Statuse: GitInterfaces.GitStatus) => void): void; - getStatuses(commitId: string, repositoryId: string, project: string, top: number, skip: number, onResult: (err: any, statusCode: number, Statuses: GitInterfaces.GitStatus[]) => void): void; - getTree(repositoryId: string, sha1: string, project: string, projectId: string, recursive: boolean, fileName: string, onResult: (err: any, statusCode: number, Tree: GitInterfaces.GitTreeRef) => void): void; - getTreeZip(repositoryId: string, sha1: string, project: string, projectId: string, recursive: boolean, fileName: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - } - export interface IQGitApi extends basem.QClientApiBase { - getBlob(repositoryId: string, sha1: string, project?: string, download?: boolean, fileName?: string): Promise; - getBlobContent(repositoryId: string, sha1: string, project?: string, download?: boolean, fileName?: string): Promise; - getBlobsZip(blobIds: string[], repositoryId: string, project?: string, filename?: string): Promise; - getBlobZip(repositoryId: string, sha1: string, project?: string, download?: boolean, fileName?: string): Promise; - getBranch(repositoryId: string, name: string, project?: string, baseVersionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise; - getBranches(repositoryId: string, project?: string, baseVersionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise; - getChanges(commitId: string, repositoryId: string, project?: string, top?: number, skip?: number): Promise; - getCommit(commitId: string, repositoryId: string, project?: string, changeCount?: number): Promise; - getCommits(repositoryId: string, searchCriteria: GitInterfaces.GitQueryCommitsCriteria, project?: string, skip?: number, top?: number): Promise; - getPushCommits(repositoryId: string, pushId: number, project?: string, top?: number, skip?: number, includeLinks?: boolean): Promise; - getCommitsBatch(searchCriteria: GitInterfaces.GitQueryCommitsCriteria, repositoryId: string, project?: string, skip?: number, top?: number): Promise; - getDeletedRepositories(project: string): Promise; - getItem(repositoryId: string, path: string, project?: string, scopePath?: string, recursionLevel?: GitInterfaces.VersionControlRecursionType, includeContentMetadata?: boolean, latestProcessedChange?: boolean, download?: boolean, versionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise; - getItemContent(repositoryId: string, path: string, project?: string, scopePath?: string, recursionLevel?: GitInterfaces.VersionControlRecursionType, includeContentMetadata?: boolean, latestProcessedChange?: boolean, download?: boolean, versionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise; - getItems(repositoryId: string, project?: string, scopePath?: string, recursionLevel?: GitInterfaces.VersionControlRecursionType, includeContentMetadata?: boolean, latestProcessedChange?: boolean, download?: boolean, includeLinks?: boolean, versionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise; - getItemText(repositoryId: string, path: string, project?: string, scopePath?: string, recursionLevel?: GitInterfaces.VersionControlRecursionType, includeContentMetadata?: boolean, latestProcessedChange?: boolean, download?: boolean, versionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise; - getItemZip(repositoryId: string, path: string, project?: string, scopePath?: string, recursionLevel?: GitInterfaces.VersionControlRecursionType, includeContentMetadata?: boolean, latestProcessedChange?: boolean, download?: boolean, versionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise; - getItemsBatch(requestData: GitInterfaces.GitItemRequestData, repositoryId: string, project?: string): Promise; - getPullRequestCommits(repositoryId: string, pullRequestId: number, project?: string): Promise; - createPullRequestReviewer(reviewer: GitInterfaces.IdentityRefWithVote, repositoryId: string, pullRequestId: number, reviewerId: string, project?: string): Promise; - createPullRequestReviewers(reviewers: VSSInterfaces.IdentityRef[], repositoryId: string, pullRequestId: number, project?: string): Promise; - deletePullRequestReviewer(repositoryId: string, pullRequestId: number, reviewerId: string, project?: string): Promise; - getPullRequestReviewer(repositoryId: string, pullRequestId: number, reviewerId: string, project?: string): Promise; - getPullRequestReviewers(repositoryId: string, pullRequestId: number, project?: string): Promise; - getPullRequestsByProject(project: string, searchCriteria: GitInterfaces.GitPullRequestSearchCriteria, maxCommentLength?: number, skip?: number, top?: number): Promise; - createPullRequest(gitPullRequestToCreate: GitInterfaces.GitPullRequest, repositoryId: string, project?: string): Promise; - getPullRequest(repositoryId: string, pullRequestId: number, project?: string, maxCommentLength?: number, skip?: number, top?: number, includeCommits?: boolean): Promise; - getPullRequests(repositoryId: string, searchCriteria: GitInterfaces.GitPullRequestSearchCriteria, project?: string, maxCommentLength?: number, skip?: number, top?: number): Promise; - updatePullRequest(gitPullRequestToUpdate: GitInterfaces.GitPullRequest, repositoryId: string, pullRequestId: number, project?: string): Promise; - getPullRequestWorkItems(repositoryId: string, pullRequestId: number, project?: string, commitsTop?: number, commitsSkip?: number): Promise; - createPush(push: GitInterfaces.GitPush, repositoryId: string, project?: string): Promise; - getPush(repositoryId: string, pushId: number, project?: string, includeCommits?: number, includeRefUpdates?: boolean): Promise; - getPushes(repositoryId: string, project?: string, skip?: number, top?: number, searchCriteria?: GitInterfaces.GitPushSearchCriteria): Promise; - getRefs(repositoryId: string, project?: string, filter?: string, includeLinks?: boolean): Promise; - updateRefs(refUpdates: GitInterfaces.GitRefUpdate[], repositoryId: string, project?: string, projectId?: string): Promise; - createRepository(gitRepositoryToCreate: GitInterfaces.GitRepository, project?: string): Promise; - deleteRepository(repositoryId: string, project?: string): Promise; - getRepositories(project?: string, includeLinks?: boolean): Promise; - getRepository(repositoryId: string, project?: string): Promise; - updateRepository(newRepositoryInfo: GitInterfaces.GitRepository, repositoryId: string, project?: string): Promise; - createCommitStatus(gitCommitStatusToCreate: GitInterfaces.GitStatus, commitId: string, repositoryId: string, project?: string): Promise; - getStatuses(commitId: string, repositoryId: string, project?: string, top?: number, skip?: number): Promise; - getTree(repositoryId: string, sha1: string, project?: string, projectId?: string, recursive?: boolean, fileName?: string): Promise; - getTreeZip(repositoryId: string, sha1: string, project?: string, projectId?: string, recursive?: boolean, fileName?: string): Promise; - } - export class GitApi extends basem.ClientApiBase implements IGitApi { - constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); - /** - * Gets a single blob. - * - * @param {string} repositoryId - * @param {string} sha1 - * @param {string} project - Project ID or project name - * @param {boolean} download - * @param {string} fileName - * @param onResult callback function with the resulting GitInterfaces.GitBlobRef - */ - getBlob(repositoryId: string, sha1: string, project: string, download: boolean, fileName: string, onResult: (err: any, statusCode: number, Blob: GitInterfaces.GitBlobRef) => void): void; - /** - * Gets a single blob. - * - * @param {string} repositoryId - * @param {string} sha1 - * @param {string} project - Project ID or project name - * @param {boolean} download - * @param {string} fileName - * @param onResult callback function with the resulting ArrayBuffer - */ - getBlobContent(repositoryId: string, sha1: string, project: string, download: boolean, fileName: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * Gets one or more blobs in a zip file download. - * - * @param {string[]} blobIds - * @param {string} repositoryId - * @param {string} project - Project ID or project name - * @param {string} filename - * @param onResult callback function with the resulting ArrayBuffer - */ - getBlobsZip(blobIds: string[], repositoryId: string, project: string, filename: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * Gets a single blob. - * - * @param {string} repositoryId - * @param {string} sha1 - * @param {string} project - Project ID or project name - * @param {boolean} download - * @param {string} fileName - * @param onResult callback function with the resulting ArrayBuffer - */ - getBlobZip(repositoryId: string, sha1: string, project: string, download: boolean, fileName: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * Retrieve statistics about a single branch. - * - * @param {string} repositoryId - Friendly name or guid of repository - * @param {string} name - Name of the branch - * @param {string} project - Project ID or project name - * @param {GitInterfaces.GitVersionDescriptor} baseVersionDescriptor - * @param onResult callback function with the resulting GitInterfaces.GitBranchStats - */ - getBranch(repositoryId: string, name: string, project: string, baseVersionDescriptor: GitInterfaces.GitVersionDescriptor, onResult: (err: any, statusCode: number, BranchStat: GitInterfaces.GitBranchStats) => void): void; - /** - * Retrieve statistics about all branches within a repository. - * - * @param {string} repositoryId - Friendly name or guid of repository - * @param {string} project - Project ID or project name - * @param {GitInterfaces.GitVersionDescriptor} baseVersionDescriptor - * @param onResult callback function with the resulting GitInterfaces.GitBranchStats[] - */ - getBranches(repositoryId: string, project: string, baseVersionDescriptor: GitInterfaces.GitVersionDescriptor, onResult: (err: any, statusCode: number, BranchStats: GitInterfaces.GitBranchStats[]) => void): void; - /** - * Retrieve changes for a particular commit. - * - * @param {string} commitId - The id of the commit. - * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. - * @param {string} project - Project ID or project name - * @param {number} top - The maximum number of changes to return. - * @param {number} skip - The number of changes to skip. - * @param onResult callback function with the resulting GitInterfaces.GitCommitChanges - */ - getChanges(commitId: string, repositoryId: string, project: string, top: number, skip: number, onResult: (err: any, statusCode: number, Change: GitInterfaces.GitCommitChanges) => void): void; - /** - * Retrieve a particular commit. - * - * @param {string} commitId - The id of the commit. - * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. - * @param {string} project - Project ID or project name - * @param {number} changeCount - The number of changes to include in the result. - * @param onResult callback function with the resulting GitInterfaces.GitCommit - */ - getCommit(commitId: string, repositoryId: string, project: string, changeCount: number, onResult: (err: any, statusCode: number, Commit: GitInterfaces.GitCommit) => void): void; - /** - * Retrieve git commits for a project - * - * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. - * @param {GitInterfaces.GitQueryCommitsCriteria} searchCriteria - * @param {string} project - Project ID or project name - * @param {number} skip - * @param {number} top - * @param onResult callback function with the resulting GitInterfaces.GitCommitRef[] - */ - getCommits(repositoryId: string, searchCriteria: GitInterfaces.GitQueryCommitsCriteria, project: string, skip: number, top: number, onResult: (err: any, statusCode: number, Commits: GitInterfaces.GitCommitRef[]) => void): void; - /** - * Retrieve a list of commits associated with a particular push. - * - * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. - * @param {number} pushId - The id of the push. - * @param {string} project - Project ID or project name - * @param {number} top - The maximum number of commits to return ("get the top x commits"). - * @param {number} skip - The number of commits to skip. - * @param {boolean} includeLinks - * @param onResult callback function with the resulting GitInterfaces.GitCommitRef[] - */ - getPushCommits(repositoryId: string, pushId: number, project: string, top: number, skip: number, includeLinks: boolean, onResult: (err: any, statusCode: number, Commits: GitInterfaces.GitCommitRef[]) => void): void; - /** - * Retrieve git commits for a project - * - * @param {GitInterfaces.GitQueryCommitsCriteria} searchCriteria - Search options - * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. - * @param {string} project - Project ID or project name - * @param {number} skip - * @param {number} top - * @param onResult callback function with the resulting GitInterfaces.GitCommitRef[] - */ - getCommitsBatch(searchCriteria: GitInterfaces.GitQueryCommitsCriteria, repositoryId: string, project: string, skip: number, top: number, onResult: (err: any, statusCode: number, CommitsBatch: GitInterfaces.GitCommitRef[]) => void): void; - /** - * Retrieve deleted git repositories. - * - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting GitInterfaces.GitDeletedRepository[] - */ - getDeletedRepositories(project: string, onResult: (err: any, statusCode: number, DeletedRepositories: GitInterfaces.GitDeletedRepository[]) => void): void; - /** - * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. - * - * @param {string} repositoryId - * @param {string} path - * @param {string} project - Project ID or project name - * @param {string} scopePath - * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - * @param {boolean} includeContentMetadata - * @param {boolean} latestProcessedChange - * @param {boolean} download - * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - * @param onResult callback function with the resulting GitInterfaces.GitItem - */ - getItem(repositoryId: string, path: string, project: string, scopePath: string, recursionLevel: GitInterfaces.VersionControlRecursionType, includeContentMetadata: boolean, latestProcessedChange: boolean, download: boolean, versionDescriptor: GitInterfaces.GitVersionDescriptor, onResult: (err: any, statusCode: number, Item: GitInterfaces.GitItem) => void): void; - /** - * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. - * - * @param {string} repositoryId - * @param {string} path - * @param {string} project - Project ID or project name - * @param {string} scopePath - * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - * @param {boolean} includeContentMetadata - * @param {boolean} latestProcessedChange - * @param {boolean} download - * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - * @param onResult callback function with the resulting ArrayBuffer - */ - getItemContent(repositoryId: string, path: string, project: string, scopePath: string, recursionLevel: GitInterfaces.VersionControlRecursionType, includeContentMetadata: boolean, latestProcessedChange: boolean, download: boolean, versionDescriptor: GitInterfaces.GitVersionDescriptor, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * Get Item Metadata and/or Content for a collection of items. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. - * - * @param {string} repositoryId - * @param {string} project - Project ID or project name - * @param {string} scopePath - * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - * @param {boolean} includeContentMetadata - * @param {boolean} latestProcessedChange - * @param {boolean} download - * @param {boolean} includeLinks - * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - * @param onResult callback function with the resulting GitInterfaces.GitItem[] - */ - getItems(repositoryId: string, project: string, scopePath: string, recursionLevel: GitInterfaces.VersionControlRecursionType, includeContentMetadata: boolean, latestProcessedChange: boolean, download: boolean, includeLinks: boolean, versionDescriptor: GitInterfaces.GitVersionDescriptor, onResult: (err: any, statusCode: number, Items: GitInterfaces.GitItem[]) => void): void; - /** - * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. - * - * @param {string} repositoryId - * @param {string} path - * @param {string} project - Project ID or project name - * @param {string} scopePath - * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - * @param {boolean} includeContentMetadata - * @param {boolean} latestProcessedChange - * @param {boolean} download - * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - * @param onResult callback function with the resulting string - */ - getItemText(repositoryId: string, path: string, project: string, scopePath: string, recursionLevel: GitInterfaces.VersionControlRecursionType, includeContentMetadata: boolean, latestProcessedChange: boolean, download: boolean, versionDescriptor: GitInterfaces.GitVersionDescriptor, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. - * - * @param {string} repositoryId - * @param {string} path - * @param {string} project - Project ID or project name - * @param {string} scopePath - * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - * @param {boolean} includeContentMetadata - * @param {boolean} latestProcessedChange - * @param {boolean} download - * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - * @param onResult callback function with the resulting ArrayBuffer - */ - getItemZip(repositoryId: string, path: string, project: string, scopePath: string, recursionLevel: GitInterfaces.VersionControlRecursionType, includeContentMetadata: boolean, latestProcessedChange: boolean, download: boolean, versionDescriptor: GitInterfaces.GitVersionDescriptor, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * Post for retrieving a creating a batch out of a set of items in a repo / project given a list of paths or a long path - * - * @param {GitInterfaces.GitItemRequestData} requestData - * @param {string} repositoryId - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting GitInterfaces.GitItem[][] - */ - getItemsBatch(requestData: GitInterfaces.GitItemRequestData, repositoryId: string, project: string, onResult: (err: any, statusCode: number, ItemsBatch: GitInterfaces.GitItem[][]) => void): void; - /** - * Retrieve pull request's commits - * - * @param {string} repositoryId - * @param {number} pullRequestId - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting GitInterfaces.GitCommitRef[] - */ - getPullRequestCommits(repositoryId: string, pullRequestId: number, project: string, onResult: (err: any, statusCode: number, PullRequestCommits: GitInterfaces.GitCommitRef[]) => void): void; - /** - * Adds a reviewer to a git pull request - * - * @param {GitInterfaces.IdentityRefWithVote} reviewer - * @param {string} repositoryId - * @param {number} pullRequestId - * @param {string} reviewerId - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting GitInterfaces.IdentityRefWithVote - */ - createPullRequestReviewer(reviewer: GitInterfaces.IdentityRefWithVote, repositoryId: string, pullRequestId: number, reviewerId: string, project: string, onResult: (err: any, statusCode: number, PullRequestReviewer: GitInterfaces.IdentityRefWithVote) => void): void; - /** - * Adds reviewers to a git pull request - * - * @param {VSSInterfaces.IdentityRef[]} reviewers - * @param {string} repositoryId - * @param {number} pullRequestId - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting GitInterfaces.IdentityRefWithVote[] - */ - createPullRequestReviewers(reviewers: VSSInterfaces.IdentityRef[], repositoryId: string, pullRequestId: number, project: string, onResult: (err: any, statusCode: number, PullRequestReviewers: GitInterfaces.IdentityRefWithVote[]) => void): void; - /** - * Adds reviewers to a git pull request - * - * @param {string} repositoryId - * @param {number} pullRequestId - * @param {string} reviewerId - * @param {string} project - Project ID or project name - * @param onResult callback function - */ - deletePullRequestReviewer(repositoryId: string, pullRequestId: number, reviewerId: string, project: string, onResult: (err: any, statusCode: number) => void): void; - /** - * Retrieve a reviewer from a pull request - * - * @param {string} repositoryId - * @param {number} pullRequestId - * @param {string} reviewerId - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting GitInterfaces.IdentityRefWithVote - */ - getPullRequestReviewer(repositoryId: string, pullRequestId: number, reviewerId: string, project: string, onResult: (err: any, statusCode: number, PullRequestReviewer: GitInterfaces.IdentityRefWithVote) => void): void; - /** - * Retrieve a pull request reviewers - * - * @param {string} repositoryId - * @param {number} pullRequestId - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting GitInterfaces.IdentityRefWithVote[] - */ - getPullRequestReviewers(repositoryId: string, pullRequestId: number, project: string, onResult: (err: any, statusCode: number, PullRequestReviewers: GitInterfaces.IdentityRefWithVote[]) => void): void; - /** - * Query pull requests by project - * - * @param {string} project - Project ID or project name - * @param {GitInterfaces.GitPullRequestSearchCriteria} searchCriteria - * @param {number} maxCommentLength - * @param {number} skip - * @param {number} top - * @param onResult callback function with the resulting GitInterfaces.GitPullRequest[] - */ - getPullRequestsByProject(project: string, searchCriteria: GitInterfaces.GitPullRequestSearchCriteria, maxCommentLength: number, skip: number, top: number, onResult: (err: any, statusCode: number, PullRequests: GitInterfaces.GitPullRequest[]) => void): void; - /** - * Create a git pull request - * - * @param {GitInterfaces.GitPullRequest} gitPullRequestToCreate - * @param {string} repositoryId - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting GitInterfaces.GitPullRequest - */ - createPullRequest(gitPullRequestToCreate: GitInterfaces.GitPullRequest, repositoryId: string, project: string, onResult: (err: any, statusCode: number, PullRequest: GitInterfaces.GitPullRequest) => void): void; - /** - * Retrieve a pull request - * - * @param {string} repositoryId - * @param {number} pullRequestId - * @param {string} project - Project ID or project name - * @param {number} maxCommentLength - * @param {number} skip - * @param {number} top - * @param {boolean} includeCommits - * @param onResult callback function with the resulting GitInterfaces.GitPullRequest - */ - getPullRequest(repositoryId: string, pullRequestId: number, project: string, maxCommentLength: number, skip: number, top: number, includeCommits: boolean, onResult: (err: any, statusCode: number, PullRequest: GitInterfaces.GitPullRequest) => void): void; - /** - * Query for pull requests - * - * @param {string} repositoryId - * @param {GitInterfaces.GitPullRequestSearchCriteria} searchCriteria - * @param {string} project - Project ID or project name - * @param {number} maxCommentLength - * @param {number} skip - * @param {number} top - * @param onResult callback function with the resulting GitInterfaces.GitPullRequest[] - */ - getPullRequests(repositoryId: string, searchCriteria: GitInterfaces.GitPullRequestSearchCriteria, project: string, maxCommentLength: number, skip: number, top: number, onResult: (err: any, statusCode: number, PullRequests: GitInterfaces.GitPullRequest[]) => void): void; - /** - * Updates a pull request - * - * @param {GitInterfaces.GitPullRequest} gitPullRequestToUpdate - * @param {string} repositoryId - * @param {number} pullRequestId - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting GitInterfaces.GitPullRequest - */ - updatePullRequest(gitPullRequestToUpdate: GitInterfaces.GitPullRequest, repositoryId: string, pullRequestId: number, project: string, onResult: (err: any, statusCode: number, PullRequest: GitInterfaces.GitPullRequest) => void): void; - /** - * Retrieve a pull request work items - * - * @param {string} repositoryId - * @param {number} pullRequestId - * @param {string} project - Project ID or project name - * @param {number} commitsTop - * @param {number} commitsSkip - * @param onResult callback function with the resulting GitInterfaces.AssociatedWorkItem[] - */ - getPullRequestWorkItems(repositoryId: string, pullRequestId: number, project: string, commitsTop: number, commitsSkip: number, onResult: (err: any, statusCode: number, PullRequestWorkItems: GitInterfaces.AssociatedWorkItem[]) => void): void; - /** - * Push changes to the repository. - * - * @param {GitInterfaces.GitPush} push - * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, a project-scoped route must be used. - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting GitInterfaces.GitPush - */ - createPush(push: GitInterfaces.GitPush, repositoryId: string, project: string, onResult: (err: any, statusCode: number, pushe: GitInterfaces.GitPush) => void): void; - /** - * Retrieve a particular push. - * - * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. - * @param {number} pushId - The id of the push. - * @param {string} project - Project ID or project name - * @param {number} includeCommits - The number of commits to include in the result. - * @param {boolean} includeRefUpdates - * @param onResult callback function with the resulting GitInterfaces.GitPush - */ - getPush(repositoryId: string, pushId: number, project: string, includeCommits: number, includeRefUpdates: boolean, onResult: (err: any, statusCode: number, pushe: GitInterfaces.GitPush) => void): void; - /** - * Retrieves pushes associated with the specified repository. - * - * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. - * @param {string} project - Project ID or project name - * @param {number} skip - * @param {number} top - * @param {GitInterfaces.GitPushSearchCriteria} searchCriteria - * @param onResult callback function with the resulting GitInterfaces.GitPush[] - */ - getPushes(repositoryId: string, project: string, skip: number, top: number, searchCriteria: GitInterfaces.GitPushSearchCriteria, onResult: (err: any, statusCode: number, pushes: GitInterfaces.GitPush[]) => void): void; - /** - * Queries the provided repository for its refs and returns them. - * - * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. - * @param {string} project - Project ID or project name - * @param {string} filter - [optional] A filter to apply to the refs. - * @param {boolean} includeLinks - [optional] Specifies if referenceLinks should be included in the result. default is false. - * @param onResult callback function with the resulting GitInterfaces.GitRef[] - */ - getRefs(repositoryId: string, project: string, filter: string, includeLinks: boolean, onResult: (err: any, statusCode: number, refs: GitInterfaces.GitRef[]) => void): void; - /** - * Creates or updates refs with the given information - * - * @param {GitInterfaces.GitRefUpdate[]} refUpdates - List of ref updates to attempt to perform - * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. - * @param {string} project - Project ID or project name - * @param {string} projectId - The id of the project. - * @param onResult callback function with the resulting GitInterfaces.GitRefUpdateResult[] - */ - updateRefs(refUpdates: GitInterfaces.GitRefUpdate[], repositoryId: string, project: string, projectId: string, onResult: (err: any, statusCode: number, refs: GitInterfaces.GitRefUpdateResult[]) => void): void; - /** - * Create a git repository - * - * @param {GitInterfaces.GitRepository} gitRepositoryToCreate - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting GitInterfaces.GitRepository - */ - createRepository(gitRepositoryToCreate: GitInterfaces.GitRepository, project: string, onResult: (err: any, statusCode: number, Repositorie: GitInterfaces.GitRepository) => void): void; - /** - * Delete a git repository - * - * @param {string} repositoryId - * @param {string} project - Project ID or project name - * @param onResult callback function - */ - deleteRepository(repositoryId: string, project: string, onResult: (err: any, statusCode: number) => void): void; - /** - * Retrieve git repositories. - * - * @param {string} project - Project ID or project name - * @param {boolean} includeLinks - * @param onResult callback function with the resulting GitInterfaces.GitRepository[] - */ - getRepositories(project: string, includeLinks: boolean, onResult: (err: any, statusCode: number, Repositories: GitInterfaces.GitRepository[]) => void): void; - /** - * @param {string} repositoryId - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting GitInterfaces.GitRepository - */ - getRepository(repositoryId: string, project: string, onResult: (err: any, statusCode: number, Repositorie: GitInterfaces.GitRepository) => void): void; - /** - * Updates the Git repository with the single populated change in the specified repository information. - * - * @param {GitInterfaces.GitRepository} newRepositoryInfo - * @param {string} repositoryId - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting GitInterfaces.GitRepository - */ - updateRepository(newRepositoryInfo: GitInterfaces.GitRepository, repositoryId: string, project: string, onResult: (err: any, statusCode: number, Repositorie: GitInterfaces.GitRepository) => void): void; - /** - * @param {GitInterfaces.GitStatus} gitCommitStatusToCreate - * @param {string} commitId - * @param {string} repositoryId - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting GitInterfaces.GitStatus - */ - createCommitStatus(gitCommitStatusToCreate: GitInterfaces.GitStatus, commitId: string, repositoryId: string, project: string, onResult: (err: any, statusCode: number, Statuse: GitInterfaces.GitStatus) => void): void; - /** - * @param {string} commitId - * @param {string} repositoryId - * @param {string} project - Project ID or project name - * @param {number} top - * @param {number} skip - * @param onResult callback function with the resulting GitInterfaces.GitStatus[] - */ - getStatuses(commitId: string, repositoryId: string, project: string, top: number, skip: number, onResult: (err: any, statusCode: number, Statuses: GitInterfaces.GitStatus[]) => void): void; - /** - * @param {string} repositoryId - * @param {string} sha1 - * @param {string} project - Project ID or project name - * @param {string} projectId - * @param {boolean} recursive - * @param {string} fileName - * @param onResult callback function with the resulting GitInterfaces.GitTreeRef - */ - getTree(repositoryId: string, sha1: string, project: string, projectId: string, recursive: boolean, fileName: string, onResult: (err: any, statusCode: number, Tree: GitInterfaces.GitTreeRef) => void): void; - /** - * @param {string} repositoryId - * @param {string} sha1 - * @param {string} project - Project ID or project name - * @param {string} projectId - * @param {boolean} recursive - * @param {string} fileName - * @param onResult callback function with the resulting ArrayBuffer - */ - getTreeZip(repositoryId: string, sha1: string, project: string, projectId: string, recursive: boolean, fileName: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - } - export class QGitApi extends basem.QClientApiBase implements IQGitApi { - api: GitApi; - constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); - /** - * Gets a single blob. - * - * @param {string} repositoryId - * @param {string} sha1 - * @param {string} project - Project ID or project name - * @param {boolean} download - * @param {string} fileName - */ - getBlob(repositoryId: string, sha1: string, project?: string, download?: boolean, fileName?: string): Promise; - /** - * Gets a single blob. - * - * @param {string} repositoryId - * @param {string} sha1 - * @param {string} project - Project ID or project name - * @param {boolean} download - * @param {string} fileName - */ - getBlobContent(repositoryId: string, sha1: string, project?: string, download?: boolean, fileName?: string): Promise; - /** - * Gets one or more blobs in a zip file download. - * - * @param {string[]} blobIds - * @param {string} repositoryId - * @param {string} project - Project ID or project name - * @param {string} filename - */ - getBlobsZip(blobIds: string[], repositoryId: string, project?: string, filename?: string): Promise; - /** - * Gets a single blob. - * - * @param {string} repositoryId - * @param {string} sha1 - * @param {string} project - Project ID or project name - * @param {boolean} download - * @param {string} fileName - */ - getBlobZip(repositoryId: string, sha1: string, project?: string, download?: boolean, fileName?: string): Promise; - /** - * Retrieve statistics about a single branch. - * - * @param {string} repositoryId - Friendly name or guid of repository - * @param {string} name - Name of the branch - * @param {string} project - Project ID or project name - * @param {GitInterfaces.GitVersionDescriptor} baseVersionDescriptor - */ - getBranch(repositoryId: string, name: string, project?: string, baseVersionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise; - /** - * Retrieve statistics about all branches within a repository. - * - * @param {string} repositoryId - Friendly name or guid of repository - * @param {string} project - Project ID or project name - * @param {GitInterfaces.GitVersionDescriptor} baseVersionDescriptor - */ - getBranches(repositoryId: string, project?: string, baseVersionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise; - /** - * Retrieve changes for a particular commit. - * - * @param {string} commitId - The id of the commit. - * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. - * @param {string} project - Project ID or project name - * @param {number} top - The maximum number of changes to return. - * @param {number} skip - The number of changes to skip. - */ - getChanges(commitId: string, repositoryId: string, project?: string, top?: number, skip?: number): Promise; - /** - * Retrieve a particular commit. - * - * @param {string} commitId - The id of the commit. - * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. - * @param {string} project - Project ID or project name - * @param {number} changeCount - The number of changes to include in the result. - */ - getCommit(commitId: string, repositoryId: string, project?: string, changeCount?: number): Promise; - /** - * Retrieve git commits for a project - * - * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. - * @param {GitInterfaces.GitQueryCommitsCriteria} searchCriteria - * @param {string} project - Project ID or project name - * @param {number} skip - * @param {number} top - */ - getCommits(repositoryId: string, searchCriteria: GitInterfaces.GitQueryCommitsCriteria, project?: string, skip?: number, top?: number): Promise; - /** - * Retrieve a list of commits associated with a particular push. - * - * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. - * @param {number} pushId - The id of the push. - * @param {string} project - Project ID or project name - * @param {number} top - The maximum number of commits to return ("get the top x commits"). - * @param {number} skip - The number of commits to skip. - * @param {boolean} includeLinks - */ - getPushCommits(repositoryId: string, pushId: number, project?: string, top?: number, skip?: number, includeLinks?: boolean): Promise; - /** - * Retrieve git commits for a project - * - * @param {GitInterfaces.GitQueryCommitsCriteria} searchCriteria - Search options - * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. - * @param {string} project - Project ID or project name - * @param {number} skip - * @param {number} top - */ - getCommitsBatch(searchCriteria: GitInterfaces.GitQueryCommitsCriteria, repositoryId: string, project?: string, skip?: number, top?: number): Promise; - /** - * Retrieve deleted git repositories. - * - * @param {string} project - Project ID or project name - */ - getDeletedRepositories(project: string): Promise; - /** - * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. - * - * @param {string} repositoryId - * @param {string} path - * @param {string} project - Project ID or project name - * @param {string} scopePath - * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - * @param {boolean} includeContentMetadata - * @param {boolean} latestProcessedChange - * @param {boolean} download - * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - */ - getItem(repositoryId: string, path: string, project?: string, scopePath?: string, recursionLevel?: GitInterfaces.VersionControlRecursionType, includeContentMetadata?: boolean, latestProcessedChange?: boolean, download?: boolean, versionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise; - /** - * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. - * - * @param {string} repositoryId - * @param {string} path - * @param {string} project - Project ID or project name - * @param {string} scopePath - * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - * @param {boolean} includeContentMetadata - * @param {boolean} latestProcessedChange - * @param {boolean} download - * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - */ - getItemContent(repositoryId: string, path: string, project?: string, scopePath?: string, recursionLevel?: GitInterfaces.VersionControlRecursionType, includeContentMetadata?: boolean, latestProcessedChange?: boolean, download?: boolean, versionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise; - /** - * Get Item Metadata and/or Content for a collection of items. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. - * - * @param {string} repositoryId - * @param {string} project - Project ID or project name - * @param {string} scopePath - * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - * @param {boolean} includeContentMetadata - * @param {boolean} latestProcessedChange - * @param {boolean} download - * @param {boolean} includeLinks - * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - */ - getItems(repositoryId: string, project?: string, scopePath?: string, recursionLevel?: GitInterfaces.VersionControlRecursionType, includeContentMetadata?: boolean, latestProcessedChange?: boolean, download?: boolean, includeLinks?: boolean, versionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise; - /** - * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. - * - * @param {string} repositoryId - * @param {string} path - * @param {string} project - Project ID or project name - * @param {string} scopePath - * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - * @param {boolean} includeContentMetadata - * @param {boolean} latestProcessedChange - * @param {boolean} download - * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - */ - getItemText(repositoryId: string, path: string, project?: string, scopePath?: string, recursionLevel?: GitInterfaces.VersionControlRecursionType, includeContentMetadata?: boolean, latestProcessedChange?: boolean, download?: boolean, versionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise; - /** - * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. - * - * @param {string} repositoryId - * @param {string} path - * @param {string} project - Project ID or project name - * @param {string} scopePath - * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - * @param {boolean} includeContentMetadata - * @param {boolean} latestProcessedChange - * @param {boolean} download - * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - */ - getItemZip(repositoryId: string, path: string, project?: string, scopePath?: string, recursionLevel?: GitInterfaces.VersionControlRecursionType, includeContentMetadata?: boolean, latestProcessedChange?: boolean, download?: boolean, versionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise; - /** - * Post for retrieving a creating a batch out of a set of items in a repo / project given a list of paths or a long path - * - * @param {GitInterfaces.GitItemRequestData} requestData - * @param {string} repositoryId - * @param {string} project - Project ID or project name - */ - getItemsBatch(requestData: GitInterfaces.GitItemRequestData, repositoryId: string, project?: string): Promise; - /** - * Retrieve pull request's commits - * - * @param {string} repositoryId - * @param {number} pullRequestId - * @param {string} project - Project ID or project name - */ - getPullRequestCommits(repositoryId: string, pullRequestId: number, project?: string): Promise; - /** - * Adds a reviewer to a git pull request - * - * @param {GitInterfaces.IdentityRefWithVote} reviewer - * @param {string} repositoryId - * @param {number} pullRequestId - * @param {string} reviewerId - * @param {string} project - Project ID or project name - */ - createPullRequestReviewer(reviewer: GitInterfaces.IdentityRefWithVote, repositoryId: string, pullRequestId: number, reviewerId: string, project?: string): Promise; - /** - * Adds reviewers to a git pull request - * - * @param {VSSInterfaces.IdentityRef[]} reviewers - * @param {string} repositoryId - * @param {number} pullRequestId - * @param {string} project - Project ID or project name - */ - createPullRequestReviewers(reviewers: VSSInterfaces.IdentityRef[], repositoryId: string, pullRequestId: number, project?: string): Promise; - /** - * Adds reviewers to a git pull request - * - * @param {string} repositoryId - * @param {number} pullRequestId - * @param {string} reviewerId - * @param {string} project - Project ID or project name - */ - deletePullRequestReviewer(repositoryId: string, pullRequestId: number, reviewerId: string, project?: string): Promise; - /** - * Retrieve a reviewer from a pull request - * - * @param {string} repositoryId - * @param {number} pullRequestId - * @param {string} reviewerId - * @param {string} project - Project ID or project name - */ - getPullRequestReviewer(repositoryId: string, pullRequestId: number, reviewerId: string, project?: string): Promise; - /** - * Retrieve a pull request reviewers - * - * @param {string} repositoryId - * @param {number} pullRequestId - * @param {string} project - Project ID or project name - */ - getPullRequestReviewers(repositoryId: string, pullRequestId: number, project?: string): Promise; - /** - * Query pull requests by project - * - * @param {string} project - Project ID or project name - * @param {GitInterfaces.GitPullRequestSearchCriteria} searchCriteria - * @param {number} maxCommentLength - * @param {number} skip - * @param {number} top - */ - getPullRequestsByProject(project: string, searchCriteria: GitInterfaces.GitPullRequestSearchCriteria, maxCommentLength?: number, skip?: number, top?: number): Promise; - /** - * Create a git pull request - * - * @param {GitInterfaces.GitPullRequest} gitPullRequestToCreate - * @param {string} repositoryId - * @param {string} project - Project ID or project name - */ - createPullRequest(gitPullRequestToCreate: GitInterfaces.GitPullRequest, repositoryId: string, project?: string): Promise; - /** - * Retrieve a pull request - * - * @param {string} repositoryId - * @param {number} pullRequestId - * @param {string} project - Project ID or project name - * @param {number} maxCommentLength - * @param {number} skip - * @param {number} top - * @param {boolean} includeCommits - */ - getPullRequest(repositoryId: string, pullRequestId: number, project?: string, maxCommentLength?: number, skip?: number, top?: number, includeCommits?: boolean): Promise; - /** - * Query for pull requests - * - * @param {string} repositoryId - * @param {GitInterfaces.GitPullRequestSearchCriteria} searchCriteria - * @param {string} project - Project ID or project name - * @param {number} maxCommentLength - * @param {number} skip - * @param {number} top - */ - getPullRequests(repositoryId: string, searchCriteria: GitInterfaces.GitPullRequestSearchCriteria, project?: string, maxCommentLength?: number, skip?: number, top?: number): Promise; - /** - * Updates a pull request - * - * @param {GitInterfaces.GitPullRequest} gitPullRequestToUpdate - * @param {string} repositoryId - * @param {number} pullRequestId - * @param {string} project - Project ID or project name - */ - updatePullRequest(gitPullRequestToUpdate: GitInterfaces.GitPullRequest, repositoryId: string, pullRequestId: number, project?: string): Promise; - /** - * Retrieve a pull request work items - * - * @param {string} repositoryId - * @param {number} pullRequestId - * @param {string} project - Project ID or project name - * @param {number} commitsTop - * @param {number} commitsSkip - */ - getPullRequestWorkItems(repositoryId: string, pullRequestId: number, project?: string, commitsTop?: number, commitsSkip?: number): Promise; - /** - * Push changes to the repository. - * - * @param {GitInterfaces.GitPush} push - * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, a project-scoped route must be used. - * @param {string} project - Project ID or project name - */ - createPush(push: GitInterfaces.GitPush, repositoryId: string, project?: string): Promise; - /** - * Retrieve a particular push. - * - * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. - * @param {number} pushId - The id of the push. - * @param {string} project - Project ID or project name - * @param {number} includeCommits - The number of commits to include in the result. - * @param {boolean} includeRefUpdates - */ - getPush(repositoryId: string, pushId: number, project?: string, includeCommits?: number, includeRefUpdates?: boolean): Promise; - /** - * Retrieves pushes associated with the specified repository. - * - * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. - * @param {string} project - Project ID or project name - * @param {number} skip - * @param {number} top - * @param {GitInterfaces.GitPushSearchCriteria} searchCriteria - */ - getPushes(repositoryId: string, project?: string, skip?: number, top?: number, searchCriteria?: GitInterfaces.GitPushSearchCriteria): Promise; - /** - * Queries the provided repository for its refs and returns them. - * - * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. - * @param {string} project - Project ID or project name - * @param {string} filter - [optional] A filter to apply to the refs. - * @param {boolean} includeLinks - [optional] Specifies if referenceLinks should be included in the result. default is false. - */ - getRefs(repositoryId: string, project?: string, filter?: string, includeLinks?: boolean): Promise; - /** - * Creates or updates refs with the given information - * - * @param {GitInterfaces.GitRefUpdate[]} refUpdates - List of ref updates to attempt to perform - * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. - * @param {string} project - Project ID or project name - * @param {string} projectId - The id of the project. - */ - updateRefs(refUpdates: GitInterfaces.GitRefUpdate[], repositoryId: string, project?: string, projectId?: string): Promise; - /** - * Create a git repository - * - * @param {GitInterfaces.GitRepository} gitRepositoryToCreate - * @param {string} project - Project ID or project name - */ - createRepository(gitRepositoryToCreate: GitInterfaces.GitRepository, project?: string): Promise; - /** - * Delete a git repository - * - * @param {string} repositoryId - * @param {string} project - Project ID or project name - */ - deleteRepository(repositoryId: string, project?: string): Promise; - /** - * Retrieve git repositories. - * - * @param {string} project - Project ID or project name - * @param {boolean} includeLinks - */ - getRepositories(project?: string, includeLinks?: boolean): Promise; - /** - * @param {string} repositoryId - * @param {string} project - Project ID or project name - */ - getRepository(repositoryId: string, project?: string): Promise; - /** - * Updates the Git repository with the single populated change in the specified repository information. - * - * @param {GitInterfaces.GitRepository} newRepositoryInfo - * @param {string} repositoryId - * @param {string} project - Project ID or project name - */ - updateRepository(newRepositoryInfo: GitInterfaces.GitRepository, repositoryId: string, project?: string): Promise; - /** - * @param {GitInterfaces.GitStatus} gitCommitStatusToCreate - * @param {string} commitId - * @param {string} repositoryId - * @param {string} project - Project ID or project name - */ - createCommitStatus(gitCommitStatusToCreate: GitInterfaces.GitStatus, commitId: string, repositoryId: string, project?: string): Promise; - /** - * @param {string} commitId - * @param {string} repositoryId - * @param {string} project - Project ID or project name - * @param {number} top - * @param {number} skip - */ - getStatuses(commitId: string, repositoryId: string, project?: string, top?: number, skip?: number): Promise; - /** - * @param {string} repositoryId - * @param {string} sha1 - * @param {string} project - Project ID or project name - * @param {string} projectId - * @param {boolean} recursive - * @param {string} fileName - */ - getTree(repositoryId: string, sha1: string, project?: string, projectId?: string, recursive?: boolean, fileName?: string): Promise; - /** - * @param {string} repositoryId - * @param {string} sha1 - * @param {string} project - Project ID or project name - * @param {string} projectId - * @param {boolean} recursive - * @param {string} fileName - */ - getTreeZip(repositoryId: string, sha1: string, project?: string, projectId?: string, recursive?: boolean, fileName?: string): Promise; - } - -} -declare module 'vso-node-api/interfaces/common/FormInputInterfaces' { - export enum InputDataType { - /** - * No data type is specified. - */ - None = 0, - /** - * Represents a textual value. - */ - String = 10, - /** - * Represents a numberic value. - */ - Number = 20, - /** - * Represents a value of true or false. - */ - Boolean = 30, - /** - * Represents a Guid. - */ - Guid = 40, - /** - * Represents a URI. - */ - Uri = 50, - } - /** - * Describes an input for subscriptions. - */ - export interface InputDescriptor { - /** - * The ids of all inputs that the value of this input is dependent on. - */ - dependencyInputIds: string[]; - /** - * Description of what this input is used for - */ - description: string; - /** - * The group localized name to which this input belongs and can be shown as a header for the container that will include all the inputs in the group. - */ - groupName: string; - /** - * If true, the value information for this input is dynamic and should be fetched when the value of dependency inputs change. - */ - hasDynamicValueInformation: boolean; - /** - * Identifier for the subscription input - */ - id: string; - /** - * Mode in which the value of this input should be entered - */ - inputMode: InputMode; - /** - * Gets whether this input is confidential, such as for a password or application key - */ - isConfidential: boolean; - /** - * Localized name which can be shown as a label for the subscription input - */ - name: string; - /** - * Gets whether this input is included in the default generated action description. - */ - useInDefaultDescription: boolean; - /** - * Information to use to validate this input's value - */ - validation: InputValidation; - /** - * A hint for input value. It can be used in the UI as the input placeholder. - */ - valueHint: string; - /** - * Information about possible values for this input - */ - values: InputValues; - } - /** - * Defines a filter for subscription inputs. The filter matches a set of inputs if any (one or more) of the groups evaluates to true. - */ - export interface InputFilter { - /** - * Groups of input filter expressions. This filter matches a set of inputs if any (one or more) of the groups evaluates to true. - */ - conditions: InputFilterCondition[]; - } - /** - * An expression which can be applied to filter a list of subscription inputs - */ - export interface InputFilterCondition { - /** - * Whether or not to do a case sensitive match - */ - caseSensitive: boolean; - /** - * The Id of the input to filter on - */ - inputId: string; - /** - * The "expected" input value to compare with the actual input value - */ - inputValue: string; - /** - * The operator applied between the expected and actual input value - */ - operator: InputFilterOperator; - } - export enum InputFilterOperator { - Equals = 0, - NotEquals = 1, - } - export enum InputMode { - /** - * This input should not be shown in the UI - */ - None = 0, - /** - * An input text box should be shown - */ - TextBox = 10, - /** - * An password input box should be shown - */ - PasswordBox = 20, - /** - * A select/combo control should be shown - */ - Combo = 30, - /** - * Radio buttons should be shown - */ - RadioButtons = 40, - /** - * Checkbox should be shown(for true/false values) - */ - CheckBox = 50, - /** - * A multi-line text area should be shown - */ - TextArea = 60, - } - /** - * Describes what values are valid for a subscription input - */ - export interface InputValidation { - dataType: InputDataType; - isRequired: boolean; - maxLength: number; - maxValue: number; - minLength: number; - minValue: number; - pattern: string; - patternMismatchErrorMessage: string; - } - /** - * Information about a single value for an input - */ - export interface InputValue { - /** - * Any other data about this input - */ - data: { - [key: string]: any; - }; - /** - * The text to show for the display of this value - */ - displayValue: string; - /** - * The value to store for this input - */ - value: string; - } - /** - * Information about the possible/allowed values for a given subscription input - */ - export interface InputValues { - /** - * The default value to use for this input - */ - defaultValue: string; - /** - * Errors encountered while computing dynamic values. - */ - error: InputValuesError; - /** - * The id of the input - */ - inputId: string; - /** - * Should this input be disabled - */ - isDisabled: boolean; - /** - * Should the value be restricted to one of the values in the PossibleValues (True) or are the values in PossibleValues just a suggestion (False) - */ - isLimitedToPossibleValues: boolean; - /** - * Should this input be made read-only - */ - isReadOnly: boolean; - /** - * Possible values that this input can take - */ - possibleValues: InputValue[]; - } - /** - * Error information related to a subscription input value. - */ - export interface InputValuesError { - /** - * The error message. - */ - message: string; - } - export interface InputValuesQuery { - currentValues: { - [key: string]: string; - }; - /** - * The input values to return on input, and the result from the consumer on output. - */ - inputValues: InputValues[]; - /** - * Subscription containing information about the publisher/consumer and the current input values - */ - resource: any; - } - export var TypeInfo: { - InputDataType: { - enumValues: { - "none": number; - "string": number; - "number": number; - "boolean": number; - "guid": number; - "uri": number; - }; - }; - InputDescriptor: { - fields: any; - }; - InputFilter: { - fields: any; - }; - InputFilterCondition: { - fields: any; - }; - InputFilterOperator: { - enumValues: { - "equals": number; - "notEquals": number; - }; - }; - InputMode: { - enumValues: { - "none": number; - "textBox": number; - "passwordBox": number; - "combo": number; - "radioButtons": number; - "checkBox": number; - "textArea": number; - }; - }; - InputValidation: { - fields: any; - }; - InputValue: { - fields: any; - }; - InputValues: { - fields: any; - }; - InputValuesError: { - fields: any; - }; - InputValuesQuery: { - fields: any; - }; - }; - -} -declare module 'vso-node-api/interfaces/TaskAgentInterfaces' { - import FormInputInterfaces = require('vso-node-api/interfaces/common/FormInputInterfaces'); - import VSSInterfaces = require('vso-node-api/interfaces/common/VSSInterfaces'); - export interface AgentPoolEvent { - eventType: string; - pool: TaskAgentPool; - } - export interface AgentQueueEvent { - eventType: string; - queue: TaskAgentQueue; - } - export interface AgentRefreshMessage { - agentId: number; - timeout: any; - } - export interface AuthorizationHeader { - name: string; - value: string; - } - export enum ConnectedServiceKind { - /** - * Custom or unknown service - */ - Custom = 0, - /** - * Azure Subscription - */ - AzureSubscription = 1, - /** - * Chef Connection - */ - Chef = 2, - /** - * Generic Connection - */ - Generic = 3, - /** - * GitHub Connection - */ - GitHub = 4, - } - export interface DataSource { - endpointUrl: string; - name: string; - resultSelector: string; - } - export interface DataSourceBinding { - dataSourceName: string; - endpointId: string; - parameters: { - [key: string]: string; - }; - resultTemplate: string; - target: string; - } - export interface EndpointAuthorization { - parameters: { - [key: string]: string; - }; - scheme: string; - } - export interface EndpointUrl { - displayName: string; - helpText: string; - value: string; - } - export interface HelpLink { - text: string; - url: string; - } - export interface Issue { - category: string; - data: { - [key: string]: string; - }; - message: string; - type: IssueType; - } - export enum IssueType { - Error = 1, - Warning = 2, - } - export interface JobAssignedEvent extends JobEvent { - request: TaskAgentJobRequest; - } - export interface JobCancelMessage { - jobId: string; - timeout: any; - } - export interface JobCompletedEvent extends JobEvent { - requestId: number; - result: TaskResult; - } - /** - * Represents the context of variables and vectors for a job request. - */ - export interface JobEnvironment { - endpoints: ServiceEndpoint[]; - mask: MaskHint[]; - options: { - [key: string]: JobOption; - }; - /** - * Gets or sets the endpoint used for communicating back to the calling service. - */ - systemConnection: ServiceEndpoint; - variables: { - [key: string]: string; - }; - } - export interface JobEvent { - jobId: string; - name: string; - } - /** - * Represents an option that may affect the way an agent runs the job. - */ - export interface JobOption { - data: { - [key: string]: string; - }; - /** - * Gets the id of the option. - */ - id: string; - } - export interface JobRequestMessage { - environment: JobEnvironment; - jobId: string; - jobName: string; - lockedUntil: Date; - lockToken: string; - plan: TaskOrchestrationPlanReference; - requestId: number; - tasks: TaskInstance[]; - timeline: TimelineReference; - } - export interface MaskHint { - type: MaskType; - value: string; - } - export enum MaskType { - Variable = 1, - Regex = 2, - } - export interface PlanEnvironment { - mask: MaskHint[]; - options: { - [key: string]: JobOption; - }; - variables: { - [key: string]: string; - }; - } - /** - * Represents an endpoint which may be used by an orchestration job. - */ - export interface ServiceEndpoint { - administratorsGroup: VSSInterfaces.IdentityRef; - /** - * Gets or sets the authorization data for talking to the endpoint. - */ - authorization: EndpointAuthorization; - /** - * The Gets or sets Identity reference for the user who created the Service endpoint - */ - createdBy: VSSInterfaces.IdentityRef; - data: { - [key: string]: string; - }; - /** - * Gets or Sets description of endpoint - */ - description: string; - groupScopeId: string; - /** - * Gets or sets the identifier of this endpoint. - */ - id: string; - /** - * Gets or sets the friendly name of the endpoint. - */ - name: string; - readersGroup: VSSInterfaces.IdentityRef; - /** - * Gets or sets the type of the endpoint. - */ - type: string; - /** - * Gets or sets the url of the endpoint. - */ - url: string; - } - export interface ServiceEndpointAuthenticationScheme { - authorizationHeaders: AuthorizationHeader[]; - displayName: string; - endpointHeaders: AuthorizationHeader[]; - inputDescriptors: FormInputInterfaces.InputDescriptor[]; - scheme: string; - } - export interface ServiceEndpointType { - authenticationSchemes: ServiceEndpointAuthenticationScheme[]; - dataSources: DataSource[]; - description: string; - displayName: string; - endpointUrl: EndpointUrl; - helpLink: HelpLink; - helpMarkDown: string; - name: string; - } - export interface TaskAgent extends TaskAgentReference { - /** - * Gets the request which is currently assigned to this agent. - */ - assignedRequest: TaskAgentJobRequest; - /** - * Gets the date on which this agent was created. - */ - createdOn: Date; - /** - * Gets or sets the maximum job parallelism allowed on this host. - */ - maxParallelism: number; - properties: any; - /** - * Gets the date on which the last connectivity status change occurred. - */ - statusChangedOn: Date; - systemCapabilities: { - [key: string]: string; - }; - userCapabilities: { - [key: string]: string; - }; - } - export interface TaskAgentJobRequest { - assignTime: Date; - definition: TaskOrchestrationOwner; - demands: any[]; - finishTime: Date; - hostId: string; - jobId: string; - lockedUntil: Date; - matchedAgents: TaskAgentReference[]; - owner: TaskOrchestrationOwner; - planId: string; - planType: string; - queueTime: Date; - receiveTime: Date; - requestId: number; - reservedAgent: TaskAgentReference; - result: TaskResult; - scopeId: string; - serviceOwner: string; - } - export interface TaskAgentMessage { - body: string; - messageId: number; - messageType: string; - } - export interface TaskAgentPool extends TaskAgentPoolReference { - /** - * Gets the administrators group for this agent pool. - */ - administratorsGroup: VSSInterfaces.IdentityRef; - /** - * Gets or sets a value indicating whether or not a queue should be automatically provisioned for each project collection or not. - */ - autoProvision: boolean; - /** - * Gets the identity who created this pool. The creator of the pool is automatically added into the administrators group for the pool on creation. - */ - createdBy: VSSInterfaces.IdentityRef; - /** - * Gets the date/time of the pool creation. - */ - createdOn: Date; - /** - * Gets the scope identifier for groups/roles which are owned by this pool. - */ - groupScopeId: string; - /** - * Gets or sets a value indicating whether or not this pool is managed by the service. - */ - isHosted: boolean; - properties: any; - /** - * Gets a value indicating whether or not roles have been provisioned for this pool. - */ - provisioned: boolean; - /** - * Gets the service accounts group for this agent pool. - */ - serviceAccountsGroup: VSSInterfaces.IdentityRef; - /** - * Gets the current size of the pool. - */ - size: number; - } - export interface TaskAgentPoolReference { - id: number; - name: string; - scope: string; - } - export interface TaskAgentQueue { - groupScopeId: string; - id: number; - name: string; - pool: TaskAgentPoolReference; - provisioned: boolean; - } - export enum TaskAgentQueueActionFilter { - None = 0, - Manage = 2, - Use = 16, - } - export interface TaskAgentReference { - _links: any; - /** - * Gets or sets a value indicating whether or not this agent should be enabled for job execution. - */ - enabled: boolean; - /** - * Gets the identifier of the agent. - */ - id: number; - /** - * Gets the name of the agent. - */ - name: string; - /** - * Gets the current connectivity status of the agent. - */ - status: TaskAgentStatus; - /** - * Gets the version of the agent. - */ - version: string; - } - export interface TaskAgentSession { - agent: TaskAgentReference; - ownerName: string; - sessionId: string; - systemCapabilities: { - [key: string]: string; - }; - } - export enum TaskAgentStatus { - Offline = 1, - Online = 2, - } - export interface TaskAttachment { - _links: any; - createdOn: Date; - lastChangedBy: string; - lastChangedOn: Date; - name: string; - recordId: string; - timelineId: string; - type: string; - } - export interface TaskChangeEvent { - } - export interface TaskDefinition { - agentExecution: TaskExecution; - author: string; - category: string; - contentsUploaded: boolean; - contributionIdentifier: string; - contributionVersion: string; - dataSourceBindings: DataSourceBinding[]; - demands: any[]; - description: string; - disabled: boolean; - friendlyName: string; - groups: TaskGroupDefinition[]; - helpMarkDown: string; - hostType: string; - iconUrl: string; - id: string; - inputs: TaskInputDefinition[]; - instanceNameFormat: string; - minimumAgentVersion: string; - name: string; - packageLocation: string; - packageType: string; - serverOwned: boolean; - sourceDefinitions: TaskSourceDefinition[]; - sourceLocation: string; - version: TaskVersion; - visibility: string[]; - } - export interface TaskDefinitionEndpoint { - /** - * An ID that identifies a service connection to be used for authenticating endpoint requests. - */ - connectionId: string; - /** - * An Json based keyselector to filter response returned by fetching the endpoint Url.A Json based keyselector must be prefixed with "jsonpath:". KeySelector can be used to specify the filter to get the keys for the values specified with Selector. The following keyselector defines an Json for extracting nodes named 'ServiceName'. endpoint.KeySelector = "jsonpath://ServiceName"; - */ - keySelector: string; - /** - * The scope as understood by Connected Services. Essentialy, a project-id for now. - */ - scope: string; - /** - * An XPath/Json based selector to filter response returned by fetching the endpoint Url. An XPath based selector must be prefixed with the string "xpath:". A Json based selector must be prefixed with "jsonpath:". The following selector defines an XPath for extracting nodes named 'ServiceName'. endpoint.Selector = "xpath://ServiceName"; - */ - selector: string; - /** - * TaskId that this endpoint belongs to. - */ - taskId: string; - /** - * URL to GET. - */ - url: string; - } - export interface TaskExecution { - /** - * The utility task to run. Specifying this means that this task definition is simply a meta task to call another task. This is useful for tasks that call utility tasks like powershell and commandline - */ - execTask: TaskReference; - /** - * If a task is going to run code, then this provides the type/script etc... information by platform. For example, it might look like. net45: { typeName: "Microsoft.TeamFoundation.Automation.Tasks.PowerShellTask", assemblyName: "Microsoft.TeamFoundation.Automation.Tasks.PowerShell.dll" } net20: { typeName: "Microsoft.TeamFoundation.Automation.Tasks.PowerShellTask", assemblyName: "Microsoft.TeamFoundation.Automation.Tasks.PowerShell.dll" } java: { jar: "powershelltask.tasks.automation.teamfoundation.microsoft.com", } node: { script: "powershellhost.js", } - */ - platformInstructions: { - [key: string]: { - [key: string]: string; - }; - }; - } - export interface TaskGroupDefinition { - displayName: string; - isExpanded: boolean; - name: string; - tags: string[]; - } - export interface TaskInputDefinition { - defaultValue: string; - groupName: string; - helpMarkDown: string; - label: string; - name: string; - options: { - [key: string]: string; - }; - properties: { - [key: string]: string; - }; - required: boolean; - type: string; - visibleRule: string; - } - export interface TaskInstance extends TaskReference { - alwaysRun: boolean; - continueOnError: boolean; - displayName: string; - enabled: boolean; - instanceId: string; - } - export interface TaskLog extends TaskLogReference { - createdOn: Date; - indexLocation: string; - lastChangedOn: Date; - lineCount: number; - path: string; - } - export interface TaskLogReference { - id: number; - location: string; - } - export interface TaskOrchestrationContainer extends TaskOrchestrationItem { - children: TaskOrchestrationItem[]; - continueOnError: boolean; - parallel: boolean; - rollback: TaskOrchestrationContainer; - } - export interface TaskOrchestrationItem { - itemType: TaskOrchestrationItemType; - } - export enum TaskOrchestrationItemType { - Container = 0, - Job = 1, - } - export interface TaskOrchestrationJob extends TaskOrchestrationItem { - demands: any[]; - executeAs: VSSInterfaces.IdentityRef; - executionTimeout: any; - instanceId: string; - name: string; - tasks: TaskInstance[]; - variables: { - [key: string]: string; - }; - } - export interface TaskOrchestrationOwner { - _links: any; - id: number; - name: string; - } - export interface TaskOrchestrationPlan extends TaskOrchestrationPlanReference { - environment: PlanEnvironment; - finishTime: Date; - implementation: TaskOrchestrationContainer; - requestedById: string; - requestedForId: string; - result: TaskResult; - resultCode: string; - startTime: Date; - state: TaskOrchestrationPlanState; - timeline: TimelineReference; - } - export interface TaskOrchestrationPlanReference { - artifactLocation: string; - artifactUri: string; - planId: string; - planType: string; - scopeIdentifier: string; - version: number; - } - export enum TaskOrchestrationPlanState { - InProgress = 1, - Queued = 2, - Completed = 4, - } - export interface TaskPackageMetadata { - /** - * Gets the name of the package. - */ - type: string; - /** - * Gets the url of the package. - */ - url: string; - /** - * Gets the version of the package. - */ - version: string; - } - export interface TaskReference { - id: string; - inputs: { - [key: string]: string; - }; - name: string; - version: string; - } - export enum TaskResult { - Succeeded = 0, - SucceededWithIssues = 1, - Failed = 2, - Canceled = 3, - Skipped = 4, - Abandoned = 5, - } - export interface TaskSourceDefinition { - authKey: string; - endpoint: string; - keySelector: string; - selector: string; - target: string; - } - export interface TaskVersion { - isTest: boolean; - major: number; - minor: number; - patch: number; - } - /** - * Represents a shallow reference to a TeamProject. - */ - export interface TeamProjectReference { - /** - * Project abbreviation. - */ - abbreviation: string; - /** - * The project's description (if any). - */ - description: string; - /** - * Project identifier. - */ - id: string; - /** - * Project name. - */ - name: string; - /** - * Project state. - */ - state: any; - /** - * Url to the full version of the object. - */ - url: string; - } - export interface Timeline extends TimelineReference { - lastChangedBy: string; - lastChangedOn: Date; - records: TimelineRecord[]; - } - export interface TimelineRecord { - changeId: number; - currentOperation: string; - details: TimelineReference; - errorCount: number; - finishTime: Date; - id: string; - issues: Issue[]; - lastModified: Date; - location: string; - log: TaskLogReference; - name: string; - order: number; - parentId: string; - percentComplete: number; - result: TaskResult; - resultCode: string; - startTime: Date; - state: TimelineRecordState; - type: string; - warningCount: number; - workerName: string; - } - export enum TimelineRecordState { - Pending = 0, - InProgress = 1, - Completed = 2, - } - export interface TimelineReference { - changeId: number; - id: string; - location: string; - } - export interface WebApiConnectedService extends WebApiConnectedServiceRef { - /** - * The user who did the OAuth authentication to created this service - */ - authenticatedBy: VSSInterfaces.IdentityRef; - /** - * Extra description on the service. - */ - description: string; - /** - * Friendly Name of service connection - */ - friendlyName: string; - /** - * Id/Name of the connection service. For Ex: Subscription Id for Azure Connection - */ - id: string; - /** - * The kind of service. - */ - kind: string; - /** - * The project associated with this service - */ - project: TeamProjectReference; - /** - * Optional uri to connect directly to the service such as https://windows.azure.com - */ - serviceUri: string; - } - export interface WebApiConnectedServiceDetails extends WebApiConnectedServiceRef { - /** - * Meta data for service connection - */ - connectedServiceMetaData: WebApiConnectedService; - /** - * Credential info - */ - credentialsXml: string; - /** - * Optional uri to connect directly to the service such as https://windows.azure.com - */ - endPoint: string; - } - export interface WebApiConnectedServiceRef { - id: string; - url: string; - } - export var TypeInfo: { - AgentPoolEvent: { - fields: any; - }; - AgentQueueEvent: { - fields: any; - }; - AgentRefreshMessage: { - fields: any; - }; - AuthorizationHeader: { - fields: any; - }; - ConnectedServiceKind: { - enumValues: { - "custom": number; - "azureSubscription": number; - "chef": number; - "generic": number; - "gitHub": number; - }; - }; - DataSource: { - fields: any; - }; - DataSourceBinding: { - fields: any; - }; - EndpointAuthorization: { - fields: any; - }; - EndpointUrl: { - fields: any; - }; - HelpLink: { - fields: any; - }; - Issue: { - fields: any; - }; - IssueType: { - enumValues: { - "error": number; - "warning": number; - }; - }; - JobAssignedEvent: { - fields: any; - }; - JobCancelMessage: { - fields: any; - }; - JobCompletedEvent: { - fields: any; - }; - JobEnvironment: { - fields: any; - }; - JobEvent: { - fields: any; - }; - JobOption: { - fields: any; - }; - JobRequestMessage: { - fields: any; - }; - MaskHint: { - fields: any; - }; - MaskType: { - enumValues: { - "variable": number; - "regex": number; - }; - }; - PlanEnvironment: { - fields: any; - }; - ServiceEndpoint: { - fields: any; - }; - ServiceEndpointAuthenticationScheme: { - fields: any; - }; - ServiceEndpointType: { - fields: any; - }; - TaskAgent: { - fields: any; - }; - TaskAgentJobRequest: { - fields: any; - }; - TaskAgentMessage: { - fields: any; - }; - TaskAgentPool: { - fields: any; - }; - TaskAgentPoolReference: { - fields: any; - }; - TaskAgentQueue: { - fields: any; - }; - TaskAgentQueueActionFilter: { - enumValues: { - "none": number; - "manage": number; - "use": number; - }; - }; - TaskAgentReference: { - fields: any; - }; - TaskAgentSession: { - fields: any; - }; - TaskAgentStatus: { - enumValues: { - "offline": number; - "online": number; - }; - }; - TaskAttachment: { - fields: any; - }; - TaskChangeEvent: { - fields: any; - }; - TaskDefinition: { - fields: any; - }; - TaskDefinitionEndpoint: { - fields: any; - }; - TaskExecution: { - fields: any; - }; - TaskGroupDefinition: { - fields: any; - }; - TaskInputDefinition: { - fields: any; - }; - TaskInstance: { - fields: any; - }; - TaskLog: { - fields: any; - }; - TaskLogReference: { - fields: any; - }; - TaskOrchestrationContainer: { - fields: any; - }; - TaskOrchestrationItem: { - fields: any; - }; - TaskOrchestrationItemType: { - enumValues: { - "container": number; - "job": number; - }; - }; - TaskOrchestrationJob: { - fields: any; - }; - TaskOrchestrationOwner: { - fields: any; - }; - TaskOrchestrationPlan: { - fields: any; - }; - TaskOrchestrationPlanReference: { - fields: any; - }; - TaskOrchestrationPlanState: { - enumValues: { - "inProgress": number; - "queued": number; - "completed": number; - }; - }; - TaskPackageMetadata: { - fields: any; - }; - TaskReference: { - fields: any; - }; - TaskResult: { - enumValues: { - "succeeded": number; - "succeededWithIssues": number; - "failed": number; - "canceled": number; - "skipped": number; - "abandoned": number; - }; - }; - TaskSourceDefinition: { - fields: any; - }; - TaskVersion: { - fields: any; - }; - TeamProjectReference: { - fields: any; - }; - Timeline: { - fields: any; - }; - TimelineRecord: { - fields: any; - }; - TimelineRecordState: { - enumValues: { - "pending": number; - "inProgress": number; - "completed": number; - }; - }; - TimelineReference: { - fields: any; - }; - WebApiConnectedService: { - fields: any; - }; - WebApiConnectedServiceDetails: { - fields: any; - }; - WebApiConnectedServiceRef: { - fields: any; - }; - }; - -} -declare module 'vso-node-api/TaskAgentApiBase' { - - - import Q = require('q'); - import basem = require('vso-node-api/ClientApiBases'); - import VsoBaseInterfaces = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); - import TaskAgentInterfaces = require('vso-node-api/interfaces/TaskAgentInterfaces'); - import VSSInterfaces = require('vso-node-api/interfaces/common/VSSInterfaces'); - export interface ITaskAgentApiBase extends basem.ClientApiBase { - addAgent(agent: TaskAgentInterfaces.TaskAgent, poolId: number, onResult: (err: any, statusCode: number, agent: TaskAgentInterfaces.TaskAgent) => void): void; - deleteAgent(poolId: number, agentId: number, onResult: (err: any, statusCode: number) => void): void; - getAgent(poolId: number, agentId: number, includeCapabilities: boolean, includeAssignedRequest: boolean, propertyFilters: string[], onResult: (err: any, statusCode: number, agent: TaskAgentInterfaces.TaskAgent) => void): void; - getAgents(poolId: number, agentName: string, includeCapabilities: boolean, includeAssignedRequest: boolean, propertyFilters: string[], demands: string[], onResult: (err: any, statusCode: number, agents: TaskAgentInterfaces.TaskAgent[]) => void): void; - replaceAgent(agent: TaskAgentInterfaces.TaskAgent, poolId: number, agentId: number, onResult: (err: any, statusCode: number, agent: TaskAgentInterfaces.TaskAgent) => void): void; - updateAgent(agent: TaskAgentInterfaces.TaskAgent, poolId: number, agentId: number, onResult: (err: any, statusCode: number, agent: TaskAgentInterfaces.TaskAgent) => void): void; - queryEndpoint(endpoint: TaskAgentInterfaces.TaskDefinitionEndpoint, onResult: (err: any, statusCode: number, endpoint: string[]) => void): void; - deleteAgentRequest(poolId: number, requestId: number, lockToken: string, onResult: (err: any, statusCode: number) => void): void; - getAgentRequest(poolId: number, requestId: number, onResult: (err: any, statusCode: number, jobrequest: TaskAgentInterfaces.TaskAgentJobRequest) => void): void; - getAgentRequestsForAgent(poolId: number, agentId: number, completedRequestCount: number, onResult: (err: any, statusCode: number, jobrequests: TaskAgentInterfaces.TaskAgentJobRequest[]) => void): void; - getAgentRequestsForAgents(poolId: number, agentIds: number[], completedRequestCount: number, onResult: (err: any, statusCode: number, jobrequests: TaskAgentInterfaces.TaskAgentJobRequest[]) => void): void; - getAgentRequestsForPlan(poolId: number, planId: string, jobId: string, onResult: (err: any, statusCode: number, jobrequests: TaskAgentInterfaces.TaskAgentJobRequest[]) => void): void; - queueAgentRequest(request: TaskAgentInterfaces.TaskAgentJobRequest, poolId: number, onResult: (err: any, statusCode: number, jobrequest: TaskAgentInterfaces.TaskAgentJobRequest) => void): void; - updateAgentRequest(request: TaskAgentInterfaces.TaskAgentJobRequest, poolId: number, requestId: number, lockToken: string, onResult: (err: any, statusCode: number, jobrequest: TaskAgentInterfaces.TaskAgentJobRequest) => void): void; - deleteMessage(poolId: number, messageId: number, sessionId: string, onResult: (err: any, statusCode: number) => void): void; - getMessage(poolId: number, sessionId: string, lastMessageId: number, onResult: (err: any, statusCode: number, message: TaskAgentInterfaces.TaskAgentMessage) => void): void; - refreshAgent(poolId: number, agentId: number, onResult: (err: any, statusCode: number) => void): void; - refreshAgents(poolId: number, onResult: (err: any, statusCode: number) => void): void; - sendMessage(message: TaskAgentInterfaces.TaskAgentMessage, poolId: number, requestId: number, onResult: (err: any, statusCode: number) => void): void; - getPackage(packageType: string, onResult: (err: any, statusCode: number, _package: TaskAgentInterfaces.TaskPackageMetadata) => void): void; - getPackages(onResult: (err: any, statusCode: number, packages: TaskAgentInterfaces.TaskPackageMetadata[]) => void): void; - getPackageZip(packageType: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - getAgentPoolRoles(poolId: number, onResult: (err: any, statusCode: number, poolroles: VSSInterfaces.IdentityRef[]) => void): void; - addAgentPool(pool: TaskAgentInterfaces.TaskAgentPool, onResult: (err: any, statusCode: number, pool: TaskAgentInterfaces.TaskAgentPool) => void): void; - deleteAgentPool(poolId: number, onResult: (err: any, statusCode: number) => void): void; - getAgentPool(poolId: number, properties: string[], onResult: (err: any, statusCode: number, pool: TaskAgentInterfaces.TaskAgentPool) => void): void; - getAgentPools(poolName: string, properties: string[], onResult: (err: any, statusCode: number, pools: TaskAgentInterfaces.TaskAgentPool[]) => void): void; - updateAgentPool(pool: TaskAgentInterfaces.TaskAgentPool, poolId: number, onResult: (err: any, statusCode: number, pool: TaskAgentInterfaces.TaskAgentPool) => void): void; - getAgentQueueRoles(queueId: number, onResult: (err: any, statusCode: number, queueroles: VSSInterfaces.IdentityRef[]) => void): void; - addAgentQueue(queue: TaskAgentInterfaces.TaskAgentQueue, onResult: (err: any, statusCode: number, queue: TaskAgentInterfaces.TaskAgentQueue) => void): void; - deleteAgentQueue(queueId: number, onResult: (err: any, statusCode: number) => void): void; - getAgentQueue(queueId: number, actionFilter: TaskAgentInterfaces.TaskAgentQueueActionFilter, onResult: (err: any, statusCode: number, queue: TaskAgentInterfaces.TaskAgentQueue) => void): void; - getAgentQueues(queueName: string, actionFilter: TaskAgentInterfaces.TaskAgentQueueActionFilter, onResult: (err: any, statusCode: number, queues: TaskAgentInterfaces.TaskAgentQueue[]) => void): void; - queryServiceEndpoint(binding: TaskAgentInterfaces.DataSourceBinding, scopeIdentifier: string, onResult: (err: any, statusCode: number, serviceendpointproxy: string[]) => void): void; - createServiceEndpoint(endpoint: TaskAgentInterfaces.ServiceEndpoint, scopeIdentifier: string, onResult: (err: any, statusCode: number, serviceendpoint: TaskAgentInterfaces.ServiceEndpoint) => void): void; - deleteServiceEndpoint(scopeIdentifier: string, endpointId: string, onResult: (err: any, statusCode: number) => void): void; - getServiceEndpointDetails(scopeIdentifier: string, endpointId: string, onResult: (err: any, statusCode: number, serviceendpoint: TaskAgentInterfaces.ServiceEndpoint) => void): void; - getServiceEndpoints(scopeIdentifier: string, type: string, authSchemes: string[], endpointIds: string[], onResult: (err: any, statusCode: number, serviceendpoints: TaskAgentInterfaces.ServiceEndpoint[]) => void): void; - updateServiceEndpoint(endpoint: TaskAgentInterfaces.ServiceEndpoint, scopeIdentifier: string, endpointId: string, onResult: (err: any, statusCode: number, serviceendpoint: TaskAgentInterfaces.ServiceEndpoint) => void): void; - getServiceEndpointTypes(scopeIdentifier: string, type: string, scheme: string, onResult: (err: any, statusCode: number, serviceendpointtypes: TaskAgentInterfaces.ServiceEndpointType[]) => void): void; - createAgentSession(session: TaskAgentInterfaces.TaskAgentSession, poolId: number, onResult: (err: any, statusCode: number, session: TaskAgentInterfaces.TaskAgentSession) => void): void; - deleteAgentSession(poolId: number, sessionId: string, onResult: (err: any, statusCode: number) => void): void; - deleteTaskDefinition(taskId: string, onResult: (err: any, statusCode: number) => void): void; - getTaskContentZip(taskId: string, versionString: string, visibility: string[], scopeLocal: boolean, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - getTaskDefinition(taskId: string, versionString: string, visibility: string[], scopeLocal: boolean, onResult: (err: any, statusCode: number, task: TaskAgentInterfaces.TaskDefinition) => void): void; - getTaskDefinitions(taskId: string, visibility: string[], scopeLocal: boolean, onResult: (err: any, statusCode: number, tasks: TaskAgentInterfaces.TaskDefinition[]) => void): void; - updateAgentUserCapabilities(userCapabilities: { - [key: string]: string; - }, poolId: number, agentId: number, onResult: (err: any, statusCode: number, usercapabilitie: TaskAgentInterfaces.TaskAgent) => void): void; - } - export interface IQTaskAgentApiBase extends basem.QClientApiBase { - addAgent(agent: TaskAgentInterfaces.TaskAgent, poolId: number): Promise; - deleteAgent(poolId: number, agentId: number): Promise; - getAgent(poolId: number, agentId: number, includeCapabilities?: boolean, includeAssignedRequest?: boolean, propertyFilters?: string[]): Promise; - getAgents(poolId: number, agentName?: string, includeCapabilities?: boolean, includeAssignedRequest?: boolean, propertyFilters?: string[], demands?: string[]): Promise; - replaceAgent(agent: TaskAgentInterfaces.TaskAgent, poolId: number, agentId: number): Promise; - updateAgent(agent: TaskAgentInterfaces.TaskAgent, poolId: number, agentId: number): Promise; - queryEndpoint(endpoint: TaskAgentInterfaces.TaskDefinitionEndpoint): Promise; - deleteAgentRequest(poolId: number, requestId: number, lockToken: string): Promise; - getAgentRequest(poolId: number, requestId: number): Promise; - getAgentRequestsForAgent(poolId: number, agentId: number, completedRequestCount?: number): Promise; - getAgentRequestsForAgents(poolId: number, agentIds: number[], completedRequestCount?: number): Promise; - getAgentRequestsForPlan(poolId: number, planId: string, jobId?: string): Promise; - queueAgentRequest(request: TaskAgentInterfaces.TaskAgentJobRequest, poolId: number): Promise; - updateAgentRequest(request: TaskAgentInterfaces.TaskAgentJobRequest, poolId: number, requestId: number, lockToken: string): Promise; - deleteMessage(poolId: number, messageId: number, sessionId: string): Promise; - getMessage(poolId: number, sessionId: string, lastMessageId?: number): Promise; - refreshAgent(poolId: number, agentId: number): Promise; - refreshAgents(poolId: number): Promise; - sendMessage(message: TaskAgentInterfaces.TaskAgentMessage, poolId: number, requestId: number): Promise; - getPackage(packageType: string): Promise; - getPackages(): Promise; - getPackageZip(packageType: string): Promise; - getAgentPoolRoles(poolId?: number): Promise; - addAgentPool(pool: TaskAgentInterfaces.TaskAgentPool): Promise; - deleteAgentPool(poolId: number): Promise; - getAgentPool(poolId: number, properties?: string[]): Promise; - getAgentPools(poolName?: string, properties?: string[]): Promise; - updateAgentPool(pool: TaskAgentInterfaces.TaskAgentPool, poolId: number): Promise; - getAgentQueueRoles(queueId?: number): Promise; - addAgentQueue(queue: TaskAgentInterfaces.TaskAgentQueue): Promise; - deleteAgentQueue(queueId: number): Promise; - getAgentQueue(queueId: number, actionFilter?: TaskAgentInterfaces.TaskAgentQueueActionFilter): Promise; - getAgentQueues(queueName?: string, actionFilter?: TaskAgentInterfaces.TaskAgentQueueActionFilter): Promise; - queryServiceEndpoint(binding: TaskAgentInterfaces.DataSourceBinding, scopeIdentifier: string): Promise; - createServiceEndpoint(endpoint: TaskAgentInterfaces.ServiceEndpoint, scopeIdentifier: string): Promise; - deleteServiceEndpoint(scopeIdentifier: string, endpointId: string): Promise; - getServiceEndpointDetails(scopeIdentifier: string, endpointId: string): Promise; - getServiceEndpoints(scopeIdentifier: string, type?: string, authSchemes?: string[], endpointIds?: string[]): Promise; - updateServiceEndpoint(endpoint: TaskAgentInterfaces.ServiceEndpoint, scopeIdentifier: string, endpointId: string): Promise; - getServiceEndpointTypes(scopeIdentifier: string, type?: string, scheme?: string): Promise; - createAgentSession(session: TaskAgentInterfaces.TaskAgentSession, poolId: number): Promise; - deleteAgentSession(poolId: number, sessionId: string): Promise; - deleteTaskDefinition(taskId: string): Promise; - getTaskContentZip(taskId: string, versionString: string, visibility?: string[], scopeLocal?: boolean): Promise; - getTaskDefinition(taskId: string, versionString: string, visibility?: string[], scopeLocal?: boolean): Promise; - getTaskDefinitions(taskId?: string, visibility?: string[], scopeLocal?: boolean): Promise; - updateAgentUserCapabilities(userCapabilities: { - [key: string]: string; - }, poolId: number, agentId: number): Promise; - } - export class TaskAgentApiBase extends basem.ClientApiBase implements ITaskAgentApiBase { - constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); - /** - * @param {TaskAgentInterfaces.TaskAgent} agent - * @param {number} poolId - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAgent - */ - addAgent(agent: TaskAgentInterfaces.TaskAgent, poolId: number, onResult: (err: any, statusCode: number, agent: TaskAgentInterfaces.TaskAgent) => void): void; - /** - * @param {number} poolId - * @param {number} agentId - * @param onResult callback function - */ - deleteAgent(poolId: number, agentId: number, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {number} poolId - * @param {number} agentId - * @param {boolean} includeCapabilities - * @param {boolean} includeAssignedRequest - * @param {string[]} propertyFilters - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAgent - */ - getAgent(poolId: number, agentId: number, includeCapabilities: boolean, includeAssignedRequest: boolean, propertyFilters: string[], onResult: (err: any, statusCode: number, agent: TaskAgentInterfaces.TaskAgent) => void): void; - /** - * @param {number} poolId - * @param {string} agentName - * @param {boolean} includeCapabilities - * @param {boolean} includeAssignedRequest - * @param {string[]} propertyFilters - * @param {string[]} demands - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAgent[] - */ - getAgents(poolId: number, agentName: string, includeCapabilities: boolean, includeAssignedRequest: boolean, propertyFilters: string[], demands: string[], onResult: (err: any, statusCode: number, agents: TaskAgentInterfaces.TaskAgent[]) => void): void; - /** - * @param {TaskAgentInterfaces.TaskAgent} agent - * @param {number} poolId - * @param {number} agentId - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAgent - */ - replaceAgent(agent: TaskAgentInterfaces.TaskAgent, poolId: number, agentId: number, onResult: (err: any, statusCode: number, agent: TaskAgentInterfaces.TaskAgent) => void): void; - /** - * @param {TaskAgentInterfaces.TaskAgent} agent - * @param {number} poolId - * @param {number} agentId - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAgent - */ - updateAgent(agent: TaskAgentInterfaces.TaskAgent, poolId: number, agentId: number, onResult: (err: any, statusCode: number, agent: TaskAgentInterfaces.TaskAgent) => void): void; - /** - * Proxy for a GET request defined by an 'endpoint'. The request is authorized using a service connection. The response is filtered using an XPath/Json based selector. - * - * @param {TaskAgentInterfaces.TaskDefinitionEndpoint} endpoint - Describes the URL to fetch. - * @param onResult callback function with the resulting string[] - */ - queryEndpoint(endpoint: TaskAgentInterfaces.TaskDefinitionEndpoint, onResult: (err: any, statusCode: number, endpoint: string[]) => void): void; - /** - * @param {number} poolId - * @param {number} requestId - * @param {string} lockToken - * @param onResult callback function - */ - deleteAgentRequest(poolId: number, requestId: number, lockToken: string, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {number} poolId - * @param {number} requestId - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAgentJobRequest - */ - getAgentRequest(poolId: number, requestId: number, onResult: (err: any, statusCode: number, jobrequest: TaskAgentInterfaces.TaskAgentJobRequest) => void): void; - /** - * @param {number} poolId - * @param {number} agentId - * @param {number} completedRequestCount - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAgentJobRequest[] - */ - getAgentRequestsForAgent(poolId: number, agentId: number, completedRequestCount: number, onResult: (err: any, statusCode: number, jobrequests: TaskAgentInterfaces.TaskAgentJobRequest[]) => void): void; - /** - * @param {number} poolId - * @param {number[]} agentIds - * @param {number} completedRequestCount - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAgentJobRequest[] - */ - getAgentRequestsForAgents(poolId: number, agentIds: number[], completedRequestCount: number, onResult: (err: any, statusCode: number, jobrequests: TaskAgentInterfaces.TaskAgentJobRequest[]) => void): void; - /** - * @param {number} poolId - * @param {string} planId - * @param {string} jobId - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAgentJobRequest[] - */ - getAgentRequestsForPlan(poolId: number, planId: string, jobId: string, onResult: (err: any, statusCode: number, jobrequests: TaskAgentInterfaces.TaskAgentJobRequest[]) => void): void; - /** - * @param {TaskAgentInterfaces.TaskAgentJobRequest} request - * @param {number} poolId - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAgentJobRequest - */ - queueAgentRequest(request: TaskAgentInterfaces.TaskAgentJobRequest, poolId: number, onResult: (err: any, statusCode: number, jobrequest: TaskAgentInterfaces.TaskAgentJobRequest) => void): void; - /** - * @param {TaskAgentInterfaces.TaskAgentJobRequest} request - * @param {number} poolId - * @param {number} requestId - * @param {string} lockToken - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAgentJobRequest - */ - updateAgentRequest(request: TaskAgentInterfaces.TaskAgentJobRequest, poolId: number, requestId: number, lockToken: string, onResult: (err: any, statusCode: number, jobrequest: TaskAgentInterfaces.TaskAgentJobRequest) => void): void; - /** - * @param {number} poolId - * @param {number} messageId - * @param {string} sessionId - * @param onResult callback function - */ - deleteMessage(poolId: number, messageId: number, sessionId: string, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {number} poolId - * @param {string} sessionId - * @param {number} lastMessageId - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAgentMessage - */ - getMessage(poolId: number, sessionId: string, lastMessageId: number, onResult: (err: any, statusCode: number, message: TaskAgentInterfaces.TaskAgentMessage) => void): void; - /** - * @param {number} poolId - * @param {number} agentId - * @param onResult callback function - */ - refreshAgent(poolId: number, agentId: number, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {number} poolId - * @param onResult callback function - */ - refreshAgents(poolId: number, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {TaskAgentInterfaces.TaskAgentMessage} message - * @param {number} poolId - * @param {number} requestId - * @param onResult callback function - */ - sendMessage(message: TaskAgentInterfaces.TaskAgentMessage, poolId: number, requestId: number, onResult: (err: any, statusCode: number) => void): void; - /** - * This method can return packages/{packageType} -- package stream OR TaskPackageMetadata if requested for json - * - * @param {string} packageType - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskPackageMetadata - */ - getPackage(packageType: string, onResult: (err: any, statusCode: number, _package: TaskAgentInterfaces.TaskPackageMetadata) => void): void; - /** - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskPackageMetadata[] - */ - getPackages(onResult: (err: any, statusCode: number, packages: TaskAgentInterfaces.TaskPackageMetadata[]) => void): void; - /** - * This method can return packages/{packageType} -- package stream OR TaskPackageMetadata if requested for json - * - * @param {string} packageType - * @param onResult callback function with the resulting ArrayBuffer - */ - getPackageZip(packageType: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * @param {number} poolId - * @param onResult callback function with the resulting VSSInterfaces.IdentityRef[] - */ - getAgentPoolRoles(poolId: number, onResult: (err: any, statusCode: number, poolroles: VSSInterfaces.IdentityRef[]) => void): void; - /** - * @param {TaskAgentInterfaces.TaskAgentPool} pool - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAgentPool - */ - addAgentPool(pool: TaskAgentInterfaces.TaskAgentPool, onResult: (err: any, statusCode: number, pool: TaskAgentInterfaces.TaskAgentPool) => void): void; - /** - * @param {number} poolId - * @param onResult callback function - */ - deleteAgentPool(poolId: number, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {number} poolId - * @param {string[]} properties - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAgentPool - */ - getAgentPool(poolId: number, properties: string[], onResult: (err: any, statusCode: number, pool: TaskAgentInterfaces.TaskAgentPool) => void): void; - /** - * @param {string} poolName - * @param {string[]} properties - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAgentPool[] - */ - getAgentPools(poolName: string, properties: string[], onResult: (err: any, statusCode: number, pools: TaskAgentInterfaces.TaskAgentPool[]) => void): void; - /** - * @param {TaskAgentInterfaces.TaskAgentPool} pool - * @param {number} poolId - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAgentPool - */ - updateAgentPool(pool: TaskAgentInterfaces.TaskAgentPool, poolId: number, onResult: (err: any, statusCode: number, pool: TaskAgentInterfaces.TaskAgentPool) => void): void; - /** - * @param {number} queueId - * @param onResult callback function with the resulting VSSInterfaces.IdentityRef[] - */ - getAgentQueueRoles(queueId: number, onResult: (err: any, statusCode: number, queueroles: VSSInterfaces.IdentityRef[]) => void): void; - /** - * @param {TaskAgentInterfaces.TaskAgentQueue} queue - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAgentQueue - */ - addAgentQueue(queue: TaskAgentInterfaces.TaskAgentQueue, onResult: (err: any, statusCode: number, queue: TaskAgentInterfaces.TaskAgentQueue) => void): void; - /** - * @param {number} queueId - * @param onResult callback function - */ - deleteAgentQueue(queueId: number, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {number} queueId - * @param {TaskAgentInterfaces.TaskAgentQueueActionFilter} actionFilter - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAgentQueue - */ - getAgentQueue(queueId: number, actionFilter: TaskAgentInterfaces.TaskAgentQueueActionFilter, onResult: (err: any, statusCode: number, queue: TaskAgentInterfaces.TaskAgentQueue) => void): void; - /** - * @param {string} queueName - * @param {TaskAgentInterfaces.TaskAgentQueueActionFilter} actionFilter - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAgentQueue[] - */ - getAgentQueues(queueName: string, actionFilter: TaskAgentInterfaces.TaskAgentQueueActionFilter, onResult: (err: any, statusCode: number, queues: TaskAgentInterfaces.TaskAgentQueue[]) => void): void; - /** - * Proxy for a GET request defined by an service endpoint. The request is authorized using a data source in service endpoint. The response is filtered using an XPath/Json based selector. - * - * @param {TaskAgentInterfaces.DataSourceBinding} binding - Describes the data source to fetch. - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param onResult callback function with the resulting string[] - */ - queryServiceEndpoint(binding: TaskAgentInterfaces.DataSourceBinding, scopeIdentifier: string, onResult: (err: any, statusCode: number, serviceendpointproxy: string[]) => void): void; - /** - * @param {TaskAgentInterfaces.ServiceEndpoint} endpoint - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param onResult callback function with the resulting TaskAgentInterfaces.ServiceEndpoint - */ - createServiceEndpoint(endpoint: TaskAgentInterfaces.ServiceEndpoint, scopeIdentifier: string, onResult: (err: any, statusCode: number, serviceendpoint: TaskAgentInterfaces.ServiceEndpoint) => void): void; - /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} endpointId - * @param onResult callback function - */ - deleteServiceEndpoint(scopeIdentifier: string, endpointId: string, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} endpointId - * @param onResult callback function with the resulting TaskAgentInterfaces.ServiceEndpoint - */ - getServiceEndpointDetails(scopeIdentifier: string, endpointId: string, onResult: (err: any, statusCode: number, serviceendpoint: TaskAgentInterfaces.ServiceEndpoint) => void): void; - /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} type - * @param {string[]} authSchemes - * @param {string[]} endpointIds - * @param onResult callback function with the resulting TaskAgentInterfaces.ServiceEndpoint[] - */ - getServiceEndpoints(scopeIdentifier: string, type: string, authSchemes: string[], endpointIds: string[], onResult: (err: any, statusCode: number, serviceendpoints: TaskAgentInterfaces.ServiceEndpoint[]) => void): void; - /** - * @param {TaskAgentInterfaces.ServiceEndpoint} endpoint - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} endpointId - * @param onResult callback function with the resulting TaskAgentInterfaces.ServiceEndpoint - */ - updateServiceEndpoint(endpoint: TaskAgentInterfaces.ServiceEndpoint, scopeIdentifier: string, endpointId: string, onResult: (err: any, statusCode: number, serviceendpoint: TaskAgentInterfaces.ServiceEndpoint) => void): void; - /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} type - * @param {string} scheme - * @param onResult callback function with the resulting TaskAgentInterfaces.ServiceEndpointType[] - */ - getServiceEndpointTypes(scopeIdentifier: string, type: string, scheme: string, onResult: (err: any, statusCode: number, serviceendpointtypes: TaskAgentInterfaces.ServiceEndpointType[]) => void): void; - /** - * @param {TaskAgentInterfaces.TaskAgentSession} session - * @param {number} poolId - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAgentSession - */ - createAgentSession(session: TaskAgentInterfaces.TaskAgentSession, poolId: number, onResult: (err: any, statusCode: number, session: TaskAgentInterfaces.TaskAgentSession) => void): void; - /** - * @param {number} poolId - * @param {string} sessionId - * @param onResult callback function - */ - deleteAgentSession(poolId: number, sessionId: string, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {string} taskId - * @param onResult callback function - */ - deleteTaskDefinition(taskId: string, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {string} taskId - * @param {string} versionString - * @param {string[]} visibility - * @param {boolean} scopeLocal - * @param onResult callback function with the resulting ArrayBuffer - */ - getTaskContentZip(taskId: string, versionString: string, visibility: string[], scopeLocal: boolean, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * @param {string} taskId - * @param {string} versionString - * @param {string[]} visibility - * @param {boolean} scopeLocal - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskDefinition - */ - getTaskDefinition(taskId: string, versionString: string, visibility: string[], scopeLocal: boolean, onResult: (err: any, statusCode: number, task: TaskAgentInterfaces.TaskDefinition) => void): void; - /** - * @param {string} taskId - * @param {string[]} visibility - * @param {boolean} scopeLocal - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskDefinition[] - */ - getTaskDefinitions(taskId: string, visibility: string[], scopeLocal: boolean, onResult: (err: any, statusCode: number, tasks: TaskAgentInterfaces.TaskDefinition[]) => void): void; - /** - * @param {{ [key: string] : string; }} userCapabilities - * @param {number} poolId - * @param {number} agentId - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAgent - */ - updateAgentUserCapabilities(userCapabilities: { - [key: string]: string; - }, poolId: number, agentId: number, onResult: (err: any, statusCode: number, usercapabilitie: TaskAgentInterfaces.TaskAgent) => void): void; - } - export class QTaskAgentApiBase extends basem.QClientApiBase implements IQTaskAgentApiBase { - api: TaskAgentApiBase; - constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], api: typeof basem.ClientApiBase); - /** - * @param {TaskAgentInterfaces.TaskAgent} agent - * @param {number} poolId - */ - addAgent(agent: TaskAgentInterfaces.TaskAgent, poolId: number): Promise; - /** - * @param {number} poolId - * @param {number} agentId - */ - deleteAgent(poolId: number, agentId: number): Promise; - /** - * @param {number} poolId - * @param {number} agentId - * @param {boolean} includeCapabilities - * @param {boolean} includeAssignedRequest - * @param {string[]} propertyFilters - */ - getAgent(poolId: number, agentId: number, includeCapabilities?: boolean, includeAssignedRequest?: boolean, propertyFilters?: string[]): Promise; - /** - * @param {number} poolId - * @param {string} agentName - * @param {boolean} includeCapabilities - * @param {boolean} includeAssignedRequest - * @param {string[]} propertyFilters - * @param {string[]} demands - */ - getAgents(poolId: number, agentName?: string, includeCapabilities?: boolean, includeAssignedRequest?: boolean, propertyFilters?: string[], demands?: string[]): Promise; - /** - * @param {TaskAgentInterfaces.TaskAgent} agent - * @param {number} poolId - * @param {number} agentId - */ - replaceAgent(agent: TaskAgentInterfaces.TaskAgent, poolId: number, agentId: number): Promise; - /** - * @param {TaskAgentInterfaces.TaskAgent} agent - * @param {number} poolId - * @param {number} agentId - */ - updateAgent(agent: TaskAgentInterfaces.TaskAgent, poolId: number, agentId: number): Promise; - /** - * Proxy for a GET request defined by an 'endpoint'. The request is authorized using a service connection. The response is filtered using an XPath/Json based selector. - * - * @param {TaskAgentInterfaces.TaskDefinitionEndpoint} endpoint - Describes the URL to fetch. - */ - queryEndpoint(endpoint: TaskAgentInterfaces.TaskDefinitionEndpoint): Promise; - /** - * @param {number} poolId - * @param {number} requestId - * @param {string} lockToken - */ - deleteAgentRequest(poolId: number, requestId: number, lockToken: string): Promise; - /** - * @param {number} poolId - * @param {number} requestId - */ - getAgentRequest(poolId: number, requestId: number): Promise; - /** - * @param {number} poolId - * @param {number} agentId - * @param {number} completedRequestCount - */ - getAgentRequestsForAgent(poolId: number, agentId: number, completedRequestCount?: number): Promise; - /** - * @param {number} poolId - * @param {number[]} agentIds - * @param {number} completedRequestCount - */ - getAgentRequestsForAgents(poolId: number, agentIds: number[], completedRequestCount?: number): Promise; - /** - * @param {number} poolId - * @param {string} planId - * @param {string} jobId - */ - getAgentRequestsForPlan(poolId: number, planId: string, jobId?: string): Promise; - /** - * @param {TaskAgentInterfaces.TaskAgentJobRequest} request - * @param {number} poolId - */ - queueAgentRequest(request: TaskAgentInterfaces.TaskAgentJobRequest, poolId: number): Promise; - /** - * @param {TaskAgentInterfaces.TaskAgentJobRequest} request - * @param {number} poolId - * @param {number} requestId - * @param {string} lockToken - */ - updateAgentRequest(request: TaskAgentInterfaces.TaskAgentJobRequest, poolId: number, requestId: number, lockToken: string): Promise; - /** - * @param {number} poolId - * @param {number} messageId - * @param {string} sessionId - */ - deleteMessage(poolId: number, messageId: number, sessionId: string): Promise; - /** - * @param {number} poolId - * @param {string} sessionId - * @param {number} lastMessageId - */ - getMessage(poolId: number, sessionId: string, lastMessageId?: number): Promise; - /** - * @param {number} poolId - * @param {number} agentId - */ - refreshAgent(poolId: number, agentId: number): Promise; - /** - * @param {number} poolId - */ - refreshAgents(poolId: number): Promise; - /** - * @param {TaskAgentInterfaces.TaskAgentMessage} message - * @param {number} poolId - * @param {number} requestId - */ - sendMessage(message: TaskAgentInterfaces.TaskAgentMessage, poolId: number, requestId: number): Promise; - /** - * This method can return packages/{packageType} -- package stream OR TaskPackageMetadata if requested for json - * - * @param {string} packageType - */ - getPackage(packageType: string): Promise; - /** - */ - getPackages(): Promise; - /** - * This method can return packages/{packageType} -- package stream OR TaskPackageMetadata if requested for json - * - * @param {string} packageType - */ - getPackageZip(packageType: string): Promise; - /** - * @param {number} poolId - */ - getAgentPoolRoles(poolId?: number): Promise; - /** - * @param {TaskAgentInterfaces.TaskAgentPool} pool - */ - addAgentPool(pool: TaskAgentInterfaces.TaskAgentPool): Promise; - /** - * @param {number} poolId - */ - deleteAgentPool(poolId: number): Promise; - /** - * @param {number} poolId - * @param {string[]} properties - */ - getAgentPool(poolId: number, properties?: string[]): Promise; - /** - * @param {string} poolName - * @param {string[]} properties - */ - getAgentPools(poolName?: string, properties?: string[]): Promise; - /** - * @param {TaskAgentInterfaces.TaskAgentPool} pool - * @param {number} poolId - */ - updateAgentPool(pool: TaskAgentInterfaces.TaskAgentPool, poolId: number): Promise; - /** - * @param {number} queueId - */ - getAgentQueueRoles(queueId?: number): Promise; - /** - * @param {TaskAgentInterfaces.TaskAgentQueue} queue - */ - addAgentQueue(queue: TaskAgentInterfaces.TaskAgentQueue): Promise; - /** - * @param {number} queueId - */ - deleteAgentQueue(queueId: number): Promise; - /** - * @param {number} queueId - * @param {TaskAgentInterfaces.TaskAgentQueueActionFilter} actionFilter - */ - getAgentQueue(queueId: number, actionFilter?: TaskAgentInterfaces.TaskAgentQueueActionFilter): Promise; - /** - * @param {string} queueName - * @param {TaskAgentInterfaces.TaskAgentQueueActionFilter} actionFilter - */ - getAgentQueues(queueName?: string, actionFilter?: TaskAgentInterfaces.TaskAgentQueueActionFilter): Promise; - /** - * Proxy for a GET request defined by an service endpoint. The request is authorized using a data source in service endpoint. The response is filtered using an XPath/Json based selector. - * - * @param {TaskAgentInterfaces.DataSourceBinding} binding - Describes the data source to fetch. - * @param {string} scopeIdentifier - The project GUID to scope the request - */ - queryServiceEndpoint(binding: TaskAgentInterfaces.DataSourceBinding, scopeIdentifier: string): Promise; - /** - * @param {TaskAgentInterfaces.ServiceEndpoint} endpoint - * @param {string} scopeIdentifier - The project GUID to scope the request - */ - createServiceEndpoint(endpoint: TaskAgentInterfaces.ServiceEndpoint, scopeIdentifier: string): Promise; - /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} endpointId - */ - deleteServiceEndpoint(scopeIdentifier: string, endpointId: string): Promise; - /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} endpointId - */ - getServiceEndpointDetails(scopeIdentifier: string, endpointId: string): Promise; - /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} type - * @param {string[]} authSchemes - * @param {string[]} endpointIds - */ - getServiceEndpoints(scopeIdentifier: string, type?: string, authSchemes?: string[], endpointIds?: string[]): Promise; - /** - * @param {TaskAgentInterfaces.ServiceEndpoint} endpoint - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} endpointId - */ - updateServiceEndpoint(endpoint: TaskAgentInterfaces.ServiceEndpoint, scopeIdentifier: string, endpointId: string): Promise; - /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} type - * @param {string} scheme - */ - getServiceEndpointTypes(scopeIdentifier: string, type?: string, scheme?: string): Promise; - /** - * @param {TaskAgentInterfaces.TaskAgentSession} session - * @param {number} poolId - */ - createAgentSession(session: TaskAgentInterfaces.TaskAgentSession, poolId: number): Promise; - /** - * @param {number} poolId - * @param {string} sessionId - */ - deleteAgentSession(poolId: number, sessionId: string): Promise; - /** - * @param {string} taskId - */ - deleteTaskDefinition(taskId: string): Promise; - /** - * @param {string} taskId - * @param {string} versionString - * @param {string[]} visibility - * @param {boolean} scopeLocal - */ - getTaskContentZip(taskId: string, versionString: string, visibility?: string[], scopeLocal?: boolean): Promise; - /** - * @param {string} taskId - * @param {string} versionString - * @param {string[]} visibility - * @param {boolean} scopeLocal - */ - getTaskDefinition(taskId: string, versionString: string, visibility?: string[], scopeLocal?: boolean): Promise; - /** - * @param {string} taskId - * @param {string[]} visibility - * @param {boolean} scopeLocal - */ - getTaskDefinitions(taskId?: string, visibility?: string[], scopeLocal?: boolean): Promise; - /** - * @param {{ [key: string] : string; }} userCapabilities - * @param {number} poolId - * @param {number} agentId - */ - updateAgentUserCapabilities(userCapabilities: { - [key: string]: string; - }, poolId: number, agentId: number): Promise; - } - -} -declare module 'vso-node-api/TaskAgentApi' { - import taskagentbasem = require('vso-node-api/TaskAgentApiBase'); - - import TaskAgentInterfaces = require('vso-node-api/interfaces/TaskAgentInterfaces'); - import VsoBaseInterfaces = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); - export interface ITaskAgentApi extends taskagentbasem.ITaskAgentApiBase { - uploadTaskDefinition(customHeaders: VsoBaseInterfaces.IHeaders, contentStream: NodeJS.ReadableStream, taskId: string, overwrite: boolean, onResult: (err: any, statusCode: number, obj: any) => void): void; - } - export interface IQTaskAgentApi extends taskagentbasem.IQTaskAgentApiBase { - uploadTaskDefinition(customHeaders: VsoBaseInterfaces.IHeaders, contentStream: NodeJS.ReadableStream, taskId: string, overwrite: boolean): Promise; - } - export class TaskAgentApi extends taskagentbasem.TaskAgentApiBase implements ITaskAgentApi { - private _handlers; - private _fallbackClient; - constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); - /** - * @param {string} taskId - * @param onResult callback function - */ - deleteTaskDefinition(taskId: string, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {string} taskId - * @param {string} versionString - * @param {string[]} visibility - * @param {boolean} scopeLocal - * @param onResult callback function with the resulting ArrayBuffer - */ - getTaskContentZip(taskId: string, versionString: string, visibility: string[], scopeLocal: boolean, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * @param {string} taskId - * @param {string} versionString - * @param {string[]} visibility - * @param {boolean} scopeLocal - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskDefinition - */ - getTaskDefinition(taskId: string, versionString: string, visibility: string[], scopeLocal: boolean, onResult: (err: any, statusCode: number, task: TaskAgentInterfaces.TaskDefinition) => void): void; - /** - * @param {string} taskId - * @param {string[]} visibility - * @param {boolean} scopeLocal - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskDefinition[] - */ - getTaskDefinitions(taskId: string, visibility: string[], scopeLocal: boolean, onResult: (err: any, statusCode: number, tasks: TaskAgentInterfaces.TaskDefinition[]) => void): void; - /** - * @param {NodeJS.ReadableStream} contentStream - * @param {string} taskId - * @param {boolean} overwrite - * @param onResult callback function - */ - uploadTaskDefinition(customHeaders: VsoBaseInterfaces.IHeaders, contentStream: NodeJS.ReadableStream, taskId: string, overwrite: boolean, onResult: (err: any, statusCode: number, obj: any) => void): void; - /** - * @param {NodeJS.ReadableStream} contentStream - * @param {string} taskId - * @param {boolean} overwrite - * @param onResult callback function - */ - private _uploadTaskDefinition(customHeaders, contentStream, taskId, overwrite, onResult); - private _getFallbackClient(baseUrl); - private _getAccountUrl(collectionUrl); - } - export class QTaskAgentApi extends taskagentbasem.QTaskAgentApiBase implements IQTaskAgentApi { - api: TaskAgentApi; - constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); - /** - * @param {NodeJS.ReadableStream} contentStream - * @param {string} taskId - * @param {boolean} overwrite - */ - uploadTaskDefinition(customHeaders: VsoBaseInterfaces.IHeaders, contentStream: NodeJS.ReadableStream, taskId: string, overwrite: boolean): Promise; - } - -} -declare module 'vso-node-api/TaskApi' { - - - import Q = require('q'); - import basem = require('vso-node-api/ClientApiBases'); - import VsoBaseInterfaces = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); - import TaskAgentInterfaces = require('vso-node-api/interfaces/TaskAgentInterfaces'); - import VSSInterfaces = require('vso-node-api/interfaces/common/VSSInterfaces'); - export interface ITaskApi extends basem.ClientApiBase { - getPlanAttachments(scopeIdentifier: string, hubName: string, planId: string, type: string, onResult: (err: any, statusCode: number, attachments: TaskAgentInterfaces.TaskAttachment[]) => void): void; - createAttachment(customHeaders: any, contentStream: NodeJS.ReadableStream, scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string, name: string, onResult: (err: any, statusCode: number, attachment: TaskAgentInterfaces.TaskAttachment) => void): void; - getAttachment(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string, name: string, onResult: (err: any, statusCode: number, attachment: TaskAgentInterfaces.TaskAttachment) => void): void; - getAttachmentContent(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string, name: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - getAttachments(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string, onResult: (err: any, statusCode: number, attachments: TaskAgentInterfaces.TaskAttachment[]) => void): void; - appendTimelineRecordFeed(lines: VSSInterfaces.VssJsonCollectionWrapperV, scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, onResult: (err: any, statusCode: number) => void): void; - appendLogContent(customHeaders: any, contentStream: NodeJS.ReadableStream, scopeIdentifier: string, hubName: string, planId: string, logId: number, onResult: (err: any, statusCode: number, log: TaskAgentInterfaces.TaskLog) => void): void; - createLog(log: TaskAgentInterfaces.TaskLog, scopeIdentifier: string, hubName: string, planId: string, onResult: (err: any, statusCode: number, log: TaskAgentInterfaces.TaskLog) => void): void; - getLog(scopeIdentifier: string, hubName: string, planId: string, logId: number, startLine: number, endLine: number, onResult: (err: any, statusCode: number, logs: string[]) => void): void; - getLogs(scopeIdentifier: string, hubName: string, planId: string, onResult: (err: any, statusCode: number, logs: TaskAgentInterfaces.TaskLog[]) => void): void; - getPlan(scopeIdentifier: string, hubName: string, planId: string, onResult: (err: any, statusCode: number, plan: TaskAgentInterfaces.TaskOrchestrationPlan) => void): void; - getRecords(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, changeId: number, onResult: (err: any, statusCode: number, records: TaskAgentInterfaces.TimelineRecord[]) => void): void; - updateRecords(records: VSSInterfaces.VssJsonCollectionWrapperV, scopeIdentifier: string, hubName: string, planId: string, timelineId: string, onResult: (err: any, statusCode: number, record: TaskAgentInterfaces.TimelineRecord[]) => void): void; - createTimeline(timeline: TaskAgentInterfaces.Timeline, scopeIdentifier: string, hubName: string, planId: string, onResult: (err: any, statusCode: number, timeline: TaskAgentInterfaces.Timeline) => void): void; - deleteTimeline(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, onResult: (err: any, statusCode: number) => void): void; - getTimeline(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, changeId: number, includeRecords: boolean, onResult: (err: any, statusCode: number, timeline: TaskAgentInterfaces.Timeline) => void): void; - getTimelines(scopeIdentifier: string, hubName: string, planId: string, onResult: (err: any, statusCode: number, timelines: TaskAgentInterfaces.Timeline[]) => void): void; - } - export interface IQTaskApi extends basem.QClientApiBase { - getPlanAttachments(scopeIdentifier: string, hubName: string, planId: string, type: string): Promise; - createAttachment(customHeaders: any, contentStream: NodeJS.ReadableStream, scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string, name: string): Promise; - getAttachment(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string, name: string): Promise; - getAttachmentContent(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string, name: string): Promise; - getAttachments(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string): Promise; - appendTimelineRecordFeed(lines: VSSInterfaces.VssJsonCollectionWrapperV, scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string): Promise; - appendLogContent(customHeaders: any, contentStream: NodeJS.ReadableStream, scopeIdentifier: string, hubName: string, planId: string, logId: number): Promise; - createLog(log: TaskAgentInterfaces.TaskLog, scopeIdentifier: string, hubName: string, planId: string): Promise; - getLog(scopeIdentifier: string, hubName: string, planId: string, logId: number, startLine?: number, endLine?: number): Promise; - getLogs(scopeIdentifier: string, hubName: string, planId: string): Promise; - getPlan(scopeIdentifier: string, hubName: string, planId: string): Promise; - getRecords(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, changeId?: number): Promise; - updateRecords(records: VSSInterfaces.VssJsonCollectionWrapperV, scopeIdentifier: string, hubName: string, planId: string, timelineId: string): Promise; - createTimeline(timeline: TaskAgentInterfaces.Timeline, scopeIdentifier: string, hubName: string, planId: string): Promise; - deleteTimeline(scopeIdentifier: string, hubName: string, planId: string, timelineId: string): Promise; - getTimeline(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, changeId?: number, includeRecords?: boolean): Promise; - getTimelines(scopeIdentifier: string, hubName: string, planId: string): Promise; - } - export class TaskApi extends basem.ClientApiBase implements ITaskApi { - constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); - /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - * @param {string} type - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAttachment[] - */ - getPlanAttachments(scopeIdentifier: string, hubName: string, planId: string, type: string, onResult: (err: any, statusCode: number, attachments: TaskAgentInterfaces.TaskAttachment[]) => void): void; - /** - * @param {NodeJS.ReadableStream} contentStream - Content to upload - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - * @param {string} timelineId - * @param {string} recordId - * @param {string} type - * @param {string} name - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAttachment - */ - createAttachment(customHeaders: VsoBaseInterfaces.IHeaders, contentStream: NodeJS.ReadableStream, scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string, name: string, onResult: (err: any, statusCode: number, attachment: TaskAgentInterfaces.TaskAttachment) => void): void; - /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - * @param {string} timelineId - * @param {string} recordId - * @param {string} type - * @param {string} name - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAttachment - */ - getAttachment(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string, name: string, onResult: (err: any, statusCode: number, attachment: TaskAgentInterfaces.TaskAttachment) => void): void; - /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - * @param {string} timelineId - * @param {string} recordId - * @param {string} type - * @param {string} name - * @param onResult callback function with the resulting ArrayBuffer - */ - getAttachmentContent(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string, name: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - * @param {string} timelineId - * @param {string} recordId - * @param {string} type - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAttachment[] - */ - getAttachments(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string, onResult: (err: any, statusCode: number, attachments: TaskAgentInterfaces.TaskAttachment[]) => void): void; - /** - * @param {VSSInterfaces.VssJsonCollectionWrapperV} lines - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - * @param {string} timelineId - * @param {string} recordId - * @param onResult callback function - */ - appendTimelineRecordFeed(lines: VSSInterfaces.VssJsonCollectionWrapperV, scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {NodeJS.ReadableStream} contentStream - Content to upload - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - * @param {number} logId - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskLog - */ - appendLogContent(customHeaders: VsoBaseInterfaces.IHeaders, contentStream: NodeJS.ReadableStream, scopeIdentifier: string, hubName: string, planId: string, logId: number, onResult: (err: any, statusCode: number, log: TaskAgentInterfaces.TaskLog) => void): void; - /** - * @param {TaskAgentInterfaces.TaskLog} log - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskLog - */ - createLog(log: TaskAgentInterfaces.TaskLog, scopeIdentifier: string, hubName: string, planId: string, onResult: (err: any, statusCode: number, log: TaskAgentInterfaces.TaskLog) => void): void; - /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - * @param {number} logId - * @param {number} startLine - * @param {number} endLine - * @param onResult callback function with the resulting string[] - */ - getLog(scopeIdentifier: string, hubName: string, planId: string, logId: number, startLine: number, endLine: number, onResult: (err: any, statusCode: number, logs: string[]) => void): void; - /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskLog[] - */ - getLogs(scopeIdentifier: string, hubName: string, planId: string, onResult: (err: any, statusCode: number, logs: TaskAgentInterfaces.TaskLog[]) => void): void; - /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskOrchestrationPlan - */ - getPlan(scopeIdentifier: string, hubName: string, planId: string, onResult: (err: any, statusCode: number, plan: TaskAgentInterfaces.TaskOrchestrationPlan) => void): void; - /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - * @param {string} timelineId - * @param {number} changeId - * @param onResult callback function with the resulting TaskAgentInterfaces.TimelineRecord[] - */ - getRecords(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, changeId: number, onResult: (err: any, statusCode: number, records: TaskAgentInterfaces.TimelineRecord[]) => void): void; - /** - * @param {VSSInterfaces.VssJsonCollectionWrapperV} records - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - * @param {string} timelineId - * @param onResult callback function with the resulting TaskAgentInterfaces.TimelineRecord[] - */ - updateRecords(records: VSSInterfaces.VssJsonCollectionWrapperV, scopeIdentifier: string, hubName: string, planId: string, timelineId: string, onResult: (err: any, statusCode: number, record: TaskAgentInterfaces.TimelineRecord[]) => void): void; - /** - * @param {TaskAgentInterfaces.Timeline} timeline - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - * @param onResult callback function with the resulting TaskAgentInterfaces.Timeline - */ - createTimeline(timeline: TaskAgentInterfaces.Timeline, scopeIdentifier: string, hubName: string, planId: string, onResult: (err: any, statusCode: number, timeline: TaskAgentInterfaces.Timeline) => void): void; - /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - * @param {string} timelineId - * @param onResult callback function - */ - deleteTimeline(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - * @param {string} timelineId - * @param {number} changeId - * @param {boolean} includeRecords - * @param onResult callback function with the resulting TaskAgentInterfaces.Timeline - */ - getTimeline(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, changeId: number, includeRecords: boolean, onResult: (err: any, statusCode: number, timeline: TaskAgentInterfaces.Timeline) => void): void; - /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - * @param onResult callback function with the resulting TaskAgentInterfaces.Timeline[] - */ - getTimelines(scopeIdentifier: string, hubName: string, planId: string, onResult: (err: any, statusCode: number, timelines: TaskAgentInterfaces.Timeline[]) => void): void; - } - export class QTaskApi extends basem.QClientApiBase implements IQTaskApi { - api: TaskApi; - constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); - /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - * @param {string} type - */ - getPlanAttachments(scopeIdentifier: string, hubName: string, planId: string, type: string): Promise; - /** - * @param {NodeJS.ReadableStream} contentStream - Content to upload - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - * @param {string} timelineId - * @param {string} recordId - * @param {string} type - * @param {string} name - */ - createAttachment(customHeaders: any, contentStream: NodeJS.ReadableStream, scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string, name: string): Promise; - /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - * @param {string} timelineId - * @param {string} recordId - * @param {string} type - * @param {string} name - */ - getAttachment(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string, name: string): Promise; - /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - * @param {string} timelineId - * @param {string} recordId - * @param {string} type - * @param {string} name - */ - getAttachmentContent(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string, name: string): Promise; - /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - * @param {string} timelineId - * @param {string} recordId - * @param {string} type - */ - getAttachments(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string): Promise; - /** - * @param {VSSInterfaces.VssJsonCollectionWrapperV} lines - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - * @param {string} timelineId - * @param {string} recordId - */ - appendTimelineRecordFeed(lines: VSSInterfaces.VssJsonCollectionWrapperV, scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string): Promise; - /** - * @param {NodeJS.ReadableStream} contentStream - Content to upload - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - * @param {number} logId - */ - appendLogContent(customHeaders: any, contentStream: NodeJS.ReadableStream, scopeIdentifier: string, hubName: string, planId: string, logId: number): Promise; - /** - * @param {TaskAgentInterfaces.TaskLog} log - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - */ - createLog(log: TaskAgentInterfaces.TaskLog, scopeIdentifier: string, hubName: string, planId: string): Promise; - /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - * @param {number} logId - * @param {number} startLine - * @param {number} endLine - */ - getLog(scopeIdentifier: string, hubName: string, planId: string, logId: number, startLine?: number, endLine?: number): Promise; - /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - */ - getLogs(scopeIdentifier: string, hubName: string, planId: string): Promise; - /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - */ - getPlan(scopeIdentifier: string, hubName: string, planId: string): Promise; - /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - * @param {string} timelineId - * @param {number} changeId - */ - getRecords(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, changeId?: number): Promise; - /** - * @param {VSSInterfaces.VssJsonCollectionWrapperV} records - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - * @param {string} timelineId - */ - updateRecords(records: VSSInterfaces.VssJsonCollectionWrapperV, scopeIdentifier: string, hubName: string, planId: string, timelineId: string): Promise; - /** - * @param {TaskAgentInterfaces.Timeline} timeline - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - */ - createTimeline(timeline: TaskAgentInterfaces.Timeline, scopeIdentifier: string, hubName: string, planId: string): Promise; - /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - * @param {string} timelineId - */ - deleteTimeline(scopeIdentifier: string, hubName: string, planId: string, timelineId: string): Promise; - /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - * @param {string} timelineId - * @param {number} changeId - * @param {boolean} includeRecords - */ - getTimeline(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, changeId?: number, includeRecords?: boolean): Promise; - /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - */ - getTimelines(scopeIdentifier: string, hubName: string, planId: string): Promise; - } - -} -declare module 'vso-node-api/interfaces/TestInterfaces' { - import TfsCoreInterfaces = require('vso-node-api/interfaces/CoreInterfaces'); - import VSSInterfaces = require('vso-node-api/interfaces/common/VSSInterfaces'); - export interface AggregatedDataForResultTrend { - /** - * This is tests execution duration. - */ - duration: any; - resultsByOutcome: { - [key: number]: AggregatedResultsByOutcome; - }; - testResultsContext: TestResultsContext; - } - export interface AggregatedResultsAnalysis { - duration: any; - previousContext: TestResultsContext; - resultsByOutcome: { - [key: number]: AggregatedResultsByOutcome; - }; - resultsDifference: AggregatedResultsDifference; - totalTests: number; - } - export interface AggregatedResultsByOutcome { - count: number; - duration: any; - outcome: TestOutcome; - } - export interface AggregatedResultsDifference { - increaseInDuration: any; - increaseInFailures: number; - increaseInPassedTests: number; - increaseInTotalTests: number; - } - export enum AttachmentType { - GeneralAttachment = 0, - AfnStrip = 1, - BugFilingData = 2, - CodeCoverage = 3, - IntermediateCollectorData = 4, - RunConfig = 5, - TestImpactDetails = 6, - TmiTestRunDeploymentFiles = 7, - TmiTestRunReverseDeploymentFiles = 8, - TmiTestResultDetail = 9, - TmiTestRunSummary = 10, - } - export interface BatchResponse { - error: string; - responses: Response[]; - status: string; - } - export interface BuildConfiguration { - branchName: string; - buildDefinitionId: number; - flavor: string; - id: number; - number: string; - platform: string; - project: ShallowReference; - repositoryId: number; - sourceVersion: string; - uri: string; - } - export interface BuildCoverage { - codeCoverageFileUrl: string; - configuration: BuildConfiguration; - lastError: string; - modules: ModuleCoverage[]; - state: string; - } - export interface BuildReference { - branchName: string; - buildSystem: string; - definitionId: number; - id: number; - number: string; - uri: string; - } - export interface CloneOperationInformation { - cloneStatistics: CloneStatistics; - /** - * If the operation is complete, the DateTime of completion. If operation is not complete, this is DateTime.MaxValue - */ - completionDate: Date; - /** - * DateTime when the operation was started - */ - creationDate: Date; - /** - * Shallow reference of the destination - */ - destinationObject: ShallowReference; - /** - * Shallow reference of the destination - */ - destinationPlan: ShallowReference; - /** - * Shallow reference of the destination - */ - destinationProject: ShallowReference; - /** - * If the operation has Failed, Message contains the reason for failure. Null otherwise. - */ - message: string; - /** - * The ID of the operation - */ - opId: number; - /** - * The type of the object generated as a result of the Clone operation - */ - resultObjectType: ResultObjectType; - /** - * Shallow reference of the source - */ - sourceObject: ShallowReference; - /** - * Shallow reference of the source - */ - sourcePlan: ShallowReference; - /** - * Shallow reference of the source - */ - sourceProject: ShallowReference; - /** - * Current state of the operation. When State reaches Suceeded or Failed, the operation is complete - */ - state: CloneOperationState; - /** - * Url for geting the clone information - */ - url: string; - } - export enum CloneOperationState { - Failed = 2, - InProgress = 1, - Queued = 0, - Succeeded = 3, - } - export interface CloneOptions { - /** - * If set to true requirements will be cloned - */ - cloneRequirements: boolean; - /** - * copy all suites from a source plan - */ - copyAllSuites: boolean; - /** - * copy ancestor hieracrchy - */ - copyAncestorHierarchy: boolean; - /** - * Name of the workitem type of the clone - */ - destinationWorkItemType: string; - /** - * Key value pairs where the key value is overridden by the value. - */ - overrideParameters: { - [key: string]: string; - }; - /** - * Comment on the link that will link the new clone test case to the original Set null for no comment - */ - relatedLinkComment: string; - } - export interface CloneStatistics { - /** - * Number of Requirments cloned so far. - */ - clonedRequirementsCount: number; - /** - * Number of shared steps cloned so far. - */ - clonedSharedStepsCount: number; - /** - * Number of test cases cloned so far - */ - clonedTestCasesCount: number; - /** - * Total number of requirements to be cloned - */ - totalRequirementsCount: number; - /** - * Total number of test cases to be cloned - */ - totalTestCasesCount: number; - } - /** - * Represents the build configuration (platform, flavor) and coverage data for the build - */ - export interface CodeCoverageData { - /** - * Flavor of build for which data is retrieved/published - */ - buildFlavor: string; - /** - * Platform of build for which data is retrieved/published - */ - buildPlatform: string; - /** - * List of coverage data for the build - */ - coverageStats: CodeCoverageStatistics[]; - } - /** - * Represents the code coverage statistics for a particular coverage label (modules, statements, blocks, etc.) - */ - export interface CodeCoverageStatistics { - /** - * Covered units - */ - covered: number; - /** - * Delta of coverage - */ - delta: number; - /** - * Is delta valid - */ - isDeltaAvailable: boolean; - /** - * Label of coverage data ("Blocks", "Statements", "Modules", etc.) - */ - label: string; - /** - * Position of label - */ - position: number; - /** - * Total units - */ - total: number; - } - /** - * Represents the code coverage summary results Used to publish or retrieve code coverage summary against a build - */ - export interface CodeCoverageSummary { - /** - * Uri of build for which data is retrieved/published - */ - build: ShallowReference; - /** - * List of coverage data and details for the build - */ - coverageData: CodeCoverageData[]; - /** - * Uri of build against which difference in coverage is computed - */ - deltaBuild: ShallowReference; - } - export enum CoverageQueryFlags { - /** - * If set, the Coverage.Modules property will be populated. - */ - Modules = 1, - /** - * If set, the ModuleCoverage.Functions properties will be populated. - */ - Functions = 2, - /** - * If set, the ModuleCoverage.CoverageData field will be populated. - */ - BlockData = 4, - } - export interface CoverageStatistics { - blocksCovered: number; - blocksNotCovered: number; - linesCovered: number; - linesNotCovered: number; - linesPartiallyCovered: number; - } - export interface CustomTestField { - fieldName: string; - value: any; - } - export interface CustomTestFieldDefinition { - fieldId: number; - fieldName: string; - fieldType: CustomTestFieldType; - scope: CustomTestFieldScope; - } - export enum CustomTestFieldScope { - None = 0, - TestRun = 1, - TestResult = 2, - System = 4, - All = 7, - } - export enum CustomTestFieldType { - Bit = 2, - DateTime = 4, - Int = 8, - Float = 6, - String = 12, - Guid = 14, - } - /** - * This is a temporary class to provide the details for the test run environment. - */ - export interface DtlEnvironmentDetails { - csmContent: string; - csmParameters: string; - subscriptionName: string; - } - export interface FailingSince { - build: BuildReference; - date: Date; - release: ReleaseReference; - } - export interface FunctionCoverage { - class: string; - name: string; - namespace: string; - sourceFile: string; - statistics: CoverageStatistics; - } - export enum GroupTestResultsBy { - None = 0, - AutomatedTestStorage = 1, - } - export interface LastResultDetails { - dateCompleted: Date; - duration: number; - runBy: VSSInterfaces.IdentityRef; - } - export interface ModuleCoverage { - blockCount: number; - blockData: number[]; - functions: FunctionCoverage[]; - name: string; - signature: string; - signatureAge: number; - statistics: CoverageStatistics; - } - export interface NameValuePair { - name: string; - value: string; - } - export interface PlanUpdateModel { - area: ShallowReference; - automatedTestEnvironment: TestEnvironment; - automatedTestSettings: TestSettings; - build: ShallowReference; - configurationIds: number[]; - description: string; - endDate: string; - iteration: string; - manualTestEnvironment: TestEnvironment; - manualTestSettings: TestSettings; - name: string; - owner: VSSInterfaces.IdentityRef; - startDate: string; - state: string; - status: string; - } - export interface PointAssignment { - configuration: ShallowReference; - tester: VSSInterfaces.IdentityRef; - } - export interface PointUpdateModel { - } - export interface PointWorkItemProperty { - workItem: { - key: string; - value: any; - }; - } - export interface QueryModel { - query: string; - } - export interface ReleaseReference { - definitionId: number; - environmentDefinitionId: number; - environmentId: number; - id: number; - } - export interface Response { - error: string; - id: string; - status: string; - url: string; - } - export enum ResultDetails { - None = 0, - Iterations = 1, - WorkItems = 2, - } - export enum ResultObjectType { - TestSuite = 0, - TestPlan = 1, - } - export enum ResultOutcome { - Pass = 1, - Fail = 2, - Pending = 3, - } - export interface ResultRetentionSettings { - automatedResultsRetentionDuration: number; - lastUpdatedBy: VSSInterfaces.IdentityRef; - lastUpdatedDate: Date; - manualResultsRetentionDuration: number; - } - export interface ResultUpdateRequestModel { - actionResultDeletes: TestActionResultModel[]; - actionResults: TestActionResultModel[]; - parameterDeletes: TestResultParameterModel[]; - parameters: TestResultParameterModel[]; - testCaseResult: TestCaseResultUpdateModel; - } - export interface ResultUpdateResponseModel { - revision: number; - } - export interface RunCreateModel { - automated: boolean; - build: ShallowReference; - buildDropLocation: string; - buildFlavor: string; - buildPlatform: string; - comment: string; - completeDate: string; - configurationIds: number[]; - controller: string; - customTestFields: CustomTestField[]; - dtlAutEnvironment: ShallowReference; - dtlTestEnvironment: ShallowReference; - dueDate: string; - environmentDetails: DtlEnvironmentDetails; - errorMessage: string; - filter: RunFilter; - iteration: string; - name: string; - owner: VSSInterfaces.IdentityRef; - plan: ShallowReference; - pointIds: number[]; - releaseEnvironmentUri: string; - releaseUri: string; - runTimeout: any; - sourceWorkflow: string; - startDate: string; - state: string; - testConfigurationsMapping: string; - testEnvironmentId: string; - testSettings: ShallowReference; - type: string; - } - /** - * This class is used to provide the filters used for discovery - */ - export interface RunFilter { - /** - * filter for the test case sources (test containers) - */ - sourceFilter: string; - /** - * filter for the test cases - */ - testCaseFilter: string; - } - export interface RunStatistic { - count: number; - outcome: string; - resolutionState: TestResolutionState; - state: string; - } - export interface RunUpdateModel { - build: ShallowReference; - comment: string; - completedDate: string; - controller: string; - deleteInProgressResults: boolean; - dtlAutEnvironment: ShallowReference; - dtlEnvironment: ShallowReference; - dtlEnvironmentDetails: DtlEnvironmentDetails; - dueDate: string; - errorMessage: string; - iteration: string; - logEntries: TestMessageLogDetails[]; - name: string; - startedDate: string; - state: string; - substate: TestRunSubstate; - testEnvironmentId: string; - testSettings: ShallowReference; - } - /** - * An abstracted reference to some other resource. This class is used to provide the build data contracts with a uniform way to reference other resources in a way that provides easy traversal through links. - */ - export interface ShallowReference { - /** - * Id of the resource - */ - id: string; - /** - * Name of the linked resource (definition name, controller name, etc.) - */ - name: string; - /** - * Full http link to the resource - */ - url: string; - } - export interface SharedStepModel { - id: number; - revision: number; - } - export interface SuiteCreateModel { - } - export interface SuiteTestCase { - pointAssignments: PointAssignment[]; - testCase: WorkItemReference; - } - export interface SuiteUpdateModel { - } - export interface TestActionResultModel extends TestResultModelBase { - actionPath: string; - iterationId: number; - sharedStepModel: SharedStepModel; - url: string; - } - export interface TestAttachmentReference { - id: number; - url: string; - } - export interface TestAttachmentRequestModel { - attachmentType: string; - comment: string; - fileName: string; - stream: string; - } - export interface TestCaseResult { - afnStripId: number; - area: ShallowReference; - associatedBugs: ShallowReference[]; - automatedTestId: string; - automatedTestName: string; - automatedTestStorage: string; - automatedTestType: string; - automatedTestTypeId: string; - build: ShallowReference; - buildReference: BuildReference; - comment: string; - completedDate: Date; - computerName: string; - configuration: ShallowReference; - createdDate: Date; - customFields: CustomTestField[]; - durationInMs: number; - errorMessage: string; - failingSince: FailingSince; - failureType: string; - id: number; - iterationDetails: TestIterationDetailsModel[]; - lastUpdatedBy: VSSInterfaces.IdentityRef; - lastUpdatedDate: Date; - outcome: string; - owner: VSSInterfaces.IdentityRef; - priority: number; - project: ShallowReference; - releaseReference: ReleaseReference; - resetCount: number; - resolutionState: string; - resolutionStateId: number; - revision: number; - runBy: VSSInterfaces.IdentityRef; - stackTrace: string; - startedDate: Date; - state: string; - testCase: ShallowReference; - testCaseTitle: string; - testPoint: ShallowReference; - testRun: ShallowReference; - url: string; - } - export interface TestCaseResult2 { - componentId: string; - custom: any; - endTime: Date; - exceptionStack: string; - externalArtifacts: string[]; - externalRunId: string; - externalSystem: string; - externalTestId: string; - failureReasons: string[]; - failureSummary: string; - investigationNotes: string; - isSuperseded: boolean; - isValid: boolean; - outcome: ResultOutcome; - resultCustomPropertiesTypeName: string; - resultId: string; - resultName: string; - runId: string; - startTime: Date; - testId: string; - tfsSecurityKey: string; - } - export interface TestCaseResultAttachmentModel { - id: number; - iterationId: number; - name: string; - size: number; - url: string; - } - export interface TestCaseResultIdentifier { - testResultId: number; - testRunId: number; - } - export interface TestCaseResultUpdateModel { - associatedWorkItems: number[]; - automatedTestTypeId: string; - comment: string; - completedDate: string; - computerName: string; - customFields: CustomTestField[]; - durationInMs: string; - errorMessage: string; - failureType: string; - outcome: string; - owner: VSSInterfaces.IdentityRef; - resolutionState: string; - runBy: VSSInterfaces.IdentityRef; - stackTrace: string; - startedDate: string; - state: string; - testCasePriority: string; - testResult: ShallowReference; - } - export interface TestConfiguration { - /** - * Area of the configuration - */ - area: ShallowReference; - /** - * Description of the configuration - */ - description: string; - /** - * Id of the configuration - */ - id: number; - /** - * Is the configuration a default for the test plans - */ - isDefault: boolean; - /** - * Last Updated By Reference - */ - lastUpdatedBy: VSSInterfaces.IdentityRef; - /** - * Last Updated Data - */ - lastUpdatedDate: Date; - /** - * Name of the configuration - */ - name: string; - /** - * Project to which the configuration belongs - */ - project: ShallowReference; - /** - * Revision of the the configuration - */ - revision: number; - /** - * State of the configuration - */ - state: TestConfigurationState; - /** - * Url of Configuration Resource - */ - url: string; - /** - * Dictionary of Test Variable, Selected Value - */ - values: NameValuePair[]; - } - export enum TestConfigurationState { - /** - * The configuration can be used for new test runs. - */ - Active = 1, - /** - * The configuration has been retired and should not be used for new test runs. - */ - Inactive = 2, - } - export interface TestEnvironment { - environmentId: string; - environmentName: string; - } - export interface TestFailureDetails { - count: number; - testResults: ShallowReference[]; - } - export interface TestFailuresAnalysis { - existingFailures: TestFailureDetails; - fixedTests: TestFailureDetails; - newFailures: TestFailureDetails; - previousContext: TestResultsContext; - } - export interface TestIterationDetailsModel { - actionResults: TestActionResultModel[]; - attachments: TestCaseResultAttachmentModel[]; - comment: string; - completedDate: Date; - durationInMs: number; - errorMessage: string; - id: number; - outcome: string; - parameters: TestResultParameterModel[]; - startedDate: Date; - url: string; - } - /** - * An abstracted reference to some other resource. This class is used to provide the build data contracts with a uniform way to reference other resources in a way that provides easy traversal through links. - */ - export interface TestMessageLogDetails { - /** - * Date when the resource is created - */ - dateCreated: Date; - /** - * Id of the resource - */ - entryId: number; - /** - * Message of the resource - */ - message: string; - } - export enum TestOutcome { - /** - * Only used during an update to preserve the existing value. - */ - Unspecified = 0, - /** - * Test has not been completed, or the test type does not report pass/failure. - */ - None = 1, - /** - * Test was executed w/o any issues. - */ - Passed = 2, - /** - * Test was executed, but there were issues. Issues may involve exceptions or failed assertions. - */ - Failed = 3, - /** - * Test has completed, but we can't say if it passed or failed. May be used for aborted tests... - */ - Inconclusive = 4, - /** - * The test timed out - */ - Timeout = 5, - /** - * Test was aborted. This was not caused by a user gesture, but rather by a framework decision. - */ - Aborted = 6, - /** - * Test had it chance for been executed but was not, as ITestElement.IsRunnable == false. - */ - Blocked = 7, - /** - * Test was not executed. This was caused by a user gesture - e.g. user hit stop button. - */ - NotExecuted = 8, - /** - * To be used by Run level results. This is not a failure. - */ - Warning = 9, - /** - * There was a system error while we were trying to execute a test. - */ - Error = 10, - /** - * Test is Not Applicable for execution. - */ - NotApplicable = 11, - /** - * Test is paused. - */ - Paused = 12, - /** - * Test is currently executing. Added this for TCM charts - */ - InProgress = 13, - MaxValue = 13, - } - export interface TestPlan { - area: ShallowReference; - automatedTestEnvironment: TestEnvironment; - automatedTestSettings: TestSettings; - build: ShallowReference; - clientUrl: string; - description: string; - endDate: Date; - id: number; - iteration: string; - manualTestEnvironment: TestEnvironment; - manualTestSettings: TestSettings; - name: string; - owner: VSSInterfaces.IdentityRef; - previousBuild: ShallowReference; - project: ShallowReference; - revision: number; - rootSuite: ShallowReference; - startDate: Date; - state: string; - updatedBy: VSSInterfaces.IdentityRef; - updatedDate: Date; - url: string; - } - export interface TestPlanCloneRequest { - cloneOptions: CloneOptions; - destinationTestPlan: TestPlan; - suiteIds: number[]; - } - export interface TestPlansWithSelection { - lastSelectedPlan: number; - lastSelectedSuite: number; - plans: TestPlan[]; - } - export interface TestPoint { - assignedTo: VSSInterfaces.IdentityRef; - automated: boolean; - comment: string; - configuration: ShallowReference; - failureType: string; - id: number; - lastResolutionStateId: number; - lastResult: ShallowReference; - lastResultDetails: LastResultDetails; - lastRunBuildNumber: string; - lastTestRun: ShallowReference; - lastUpdatedBy: VSSInterfaces.IdentityRef; - lastUpdatedDate: Date; - outcome: string; - revision: number; - state: string; - suite: ShallowReference; - testCase: WorkItemReference; - testPlan: ShallowReference; - url: string; - workItemProperties: any[]; - } - export interface TestResolutionState { - id: number; - name: string; - project: ShallowReference; - } - export interface TestResultCreateModel { - area: ShallowReference; - associatedWorkItems: number[]; - automatedTestId: string; - automatedTestName: string; - automatedTestStorage: string; - automatedTestType: string; - automatedTestTypeId: string; - comment: string; - completedDate: string; - computerName: string; - configuration: ShallowReference; - customFields: CustomTestField[]; - durationInMs: string; - errorMessage: string; - failureType: string; - outcome: string; - owner: VSSInterfaces.IdentityRef; - resolutionState: string; - runBy: VSSInterfaces.IdentityRef; - stackTrace: string; - startedDate: string; - state: string; - testCase: ShallowReference; - testCasePriority: string; - testCaseTitle: string; - testPoint: ShallowReference; - } - export interface TestResultModelBase { - comment: string; - completedDate: Date; - durationInMs: number; - errorMessage: string; - outcome: string; - startedDate: Date; - } - export interface TestResultParameterModel { - actionPath: string; - iterationId: number; - parameterName: string; - url: string; - value: string; - } - export interface TestResultsContext { - build: BuildReference; - contextType: TestResultsContextType; - release: ReleaseReference; - } - export enum TestResultsContextType { - Build = 1, - Release = 2, - } - export interface TestResultsDetails { - groupByField: string; - resultsForGroup: TestResultsDetailsForGroup[]; - } - export interface TestResultsDetailsForGroup { - groupByValue: any; - ids: TestCaseResultIdentifier[]; - resultsCountByOutcome: { - [key: number]: AggregatedResultsByOutcome; - }; - } - export interface TestResultSummary { - aggregatedResultsAnalysis: AggregatedResultsAnalysis; - teamProject: TfsCoreInterfaces.TeamProjectReference; - testFailures: TestFailuresAnalysis; - testResultsContext: TestResultsContext; - } - export interface TestResultTrendFilter { - branchNames: string[]; - buildCount: number; - definitionIds: number[]; - publishContext: string; - testRunTitles: string[]; - } - export interface TestRun { - build: ShallowReference; - buildConfiguration: BuildConfiguration; - comment: string; - completedDate: Date; - controller: string; - createdDate: Date; - customFields: CustomTestField[]; - dropLocation: string; - dtlAutEnvironment: ShallowReference; - dtlEnvironment: ShallowReference; - dtlEnvironmentCreationDetails: DtlEnvironmentDetails; - dueDate: Date; - errorMessage: string; - filter: RunFilter; - id: number; - incompleteTests: number; - isAutomated: boolean; - iteration: string; - lastUpdatedBy: VSSInterfaces.IdentityRef; - lastUpdatedDate: Date; - name: string; - notApplicableTests: number; - owner: VSSInterfaces.IdentityRef; - passedTests: number; - phase: string; - plan: ShallowReference; - postProcessState: string; - project: ShallowReference; - releaseEnvironmentUri: string; - releaseUri: string; - revision: number; - runStatistics: RunStatistic[]; - startedDate: Date; - state: string; - substate: TestRunSubstate; - testEnvironment: TestEnvironment; - testMessageLogId: number; - testSettings: ShallowReference; - totalTests: number; - unanalyzedTests: number; - url: string; - webAccessUrl: string; - } - export interface TestRunCoverage { - lastError: string; - modules: ModuleCoverage[]; - state: string; - testRun: ShallowReference; - } - export enum TestRunState { - /** - * Only used during an update to preserve the existing value. - */ - Unspecified = 0, - /** - * The run is still being created. No tests have started yet. - */ - NotStarted = 1, - /** - * Tests are running. - */ - InProgress = 2, - /** - * All tests have completed or been skipped. - */ - Completed = 3, - /** - * Run is stopped and remaing tests have been aborted - */ - Aborted = 4, - /** - * Run is currently initializing This is a legacy state and should not be used any more - */ - Waiting = 5, - /** - * Run requires investigation because of a test point failure This is a legacy state and should not be used any more - */ - NeedsInvestigation = 6, - } - export interface TestRunStatistic { - run: ShallowReference; - runStatistics: RunStatistic[]; - } - export enum TestRunSubstate { - None = 0, - CreatingEnvironment = 1, - RunningTests = 2, - CanceledByUser = 3, - AbortedBySystem = 4, - TimedOut = 5, - PendingAnalysis = 6, - Analyzed = 7, - CancellationInProgress = 8, - } - /** - * Represents the test settings of the run. Used to create test settings and fetch test settings - */ - export interface TestSettings { - /** - * Area path required to create test settings - */ - areaPath: string; - /** - * Description of the test settings. Used in create test settings. - */ - description: string; - /** - * Indicates if the tests settings is public or private.Used in create test settings. - */ - isPublic: boolean; - /** - * Xml string of machine roles. Used in create test settings. - */ - machineRoles: string; - /** - * Test settings content. - */ - testSettingsContent: string; - /** - * Test settings id. - */ - testSettingsId: number; - /** - * Test settings name. - */ - testSettingsName: string; - } - export interface TestSuite { - areaUri: string; - children: TestSuite[]; - defaultConfigurations: ShallowReference[]; - id: number; - inheritDefaultConfigurations: boolean; - lastError: string; - lastPopulatedDate: Date; - lastUpdatedBy: VSSInterfaces.IdentityRef; - lastUpdatedDate: Date; - name: string; - parent: ShallowReference; - plan: ShallowReference; - project: ShallowReference; - queryString: string; - requirementId: number; - revision: number; - state: string; - suites: ShallowReference[]; - suiteType: string; - testCaseCount: number; - testCasesUrl: string; - text: string; - url: string; - } - export interface TestSuiteCloneRequest { - cloneOptions: CloneOptions; - destinationSuiteId: number; - destinationSuiteProjectName: string; - } - export interface TestVariable { - /** - * Description of the test variable - */ - description: string; - /** - * Id of the test variable - */ - id: number; - /** - * Name of the test variable - */ - name: string; - /** - * Project to which the test variable belongs - */ - project: ShallowReference; - /** - * Revision - */ - revision: number; - /** - * Url of the test variable - */ - url: string; - /** - * List of allowed values - */ - values: string[]; - } - export interface WorkItemReference { - id: string; - name: string; - url: string; - webUrl: string; - } - export var TypeInfo: { - AggregatedDataForResultTrend: { - fields: any; - }; - AggregatedResultsAnalysis: { - fields: any; - }; - AggregatedResultsByOutcome: { - fields: any; - }; - AggregatedResultsDifference: { - fields: any; - }; - AttachmentType: { - enumValues: { - "generalAttachment": number; - "afnStrip": number; - "bugFilingData": number; - "codeCoverage": number; - "intermediateCollectorData": number; - "runConfig": number; - "testImpactDetails": number; - "tmiTestRunDeploymentFiles": number; - "tmiTestRunReverseDeploymentFiles": number; - "tmiTestResultDetail": number; - "tmiTestRunSummary": number; - }; - }; - BatchResponse: { - fields: any; - }; - BuildConfiguration: { - fields: any; - }; - BuildCoverage: { - fields: any; - }; - BuildReference: { - fields: any; - }; - CloneOperationInformation: { - fields: any; - }; - CloneOperationState: { - enumValues: { - "failed": number; - "inProgress": number; - "queued": number; - "succeeded": number; - }; - }; - CloneOptions: { - fields: any; - }; - CloneStatistics: { - fields: any; - }; - CodeCoverageData: { - fields: any; - }; - CodeCoverageStatistics: { - fields: any; - }; - CodeCoverageSummary: { - fields: any; - }; - CoverageQueryFlags: { - enumValues: { - "modules": number; - "functions": number; - "blockData": number; - }; - }; - CoverageStatistics: { - fields: any; - }; - CustomTestField: { - fields: any; - }; - CustomTestFieldDefinition: { - fields: any; - }; - CustomTestFieldScope: { - enumValues: { - "none": number; - "testRun": number; - "testResult": number; - "system": number; - "all": number; - }; - }; - CustomTestFieldType: { - enumValues: { - "bit": number; - "dateTime": number; - "int": number; - "float": number; - "string": number; - "guid": number; - }; - }; - DtlEnvironmentDetails: { - fields: any; - }; - FailingSince: { - fields: any; - }; - FunctionCoverage: { - fields: any; - }; - GroupTestResultsBy: { - enumValues: { - "none": number; - "automatedTestStorage": number; - }; - }; - LastResultDetails: { - fields: any; - }; - ModuleCoverage: { - fields: any; - }; - NameValuePair: { - fields: any; - }; - PlanUpdateModel: { - fields: any; - }; - PointAssignment: { - fields: any; - }; - PointUpdateModel: { - fields: any; - }; - PointWorkItemProperty: { - fields: any; - }; - QueryModel: { - fields: any; - }; - ReleaseReference: { - fields: any; - }; - Response: { - fields: any; - }; - ResultDetails: { - enumValues: { - "none": number; - "iterations": number; - "workItems": number; - }; - }; - ResultObjectType: { - enumValues: { - "testSuite": number; - "testPlan": number; - }; - }; - ResultOutcome: { - enumValues: { - "pass": number; - "fail": number; - "pending": number; - }; - }; - ResultRetentionSettings: { - fields: any; - }; - ResultUpdateRequestModel: { - fields: any; - }; - ResultUpdateResponseModel: { - fields: any; - }; - RunCreateModel: { - fields: any; - }; - RunFilter: { - fields: any; - }; - RunStatistic: { - fields: any; - }; - RunUpdateModel: { - fields: any; - }; - ShallowReference: { - fields: any; - }; - SharedStepModel: { - fields: any; - }; - SuiteCreateModel: { - fields: any; - }; - SuiteTestCase: { - fields: any; - }; - SuiteUpdateModel: { - fields: any; - }; - TestActionResultModel: { - fields: any; - }; - TestAttachmentReference: { - fields: any; - }; - TestAttachmentRequestModel: { - fields: any; - }; - TestCaseResult: { - fields: any; - }; - TestCaseResult2: { - fields: any; - }; - TestCaseResultAttachmentModel: { - fields: any; - }; - TestCaseResultIdentifier: { - fields: any; - }; - TestCaseResultUpdateModel: { - fields: any; - }; - TestConfiguration: { - fields: any; - }; - TestConfigurationState: { - enumValues: { - "active": number; - "inactive": number; - }; - }; - TestEnvironment: { - fields: any; - }; - TestFailureDetails: { - fields: any; - }; - TestFailuresAnalysis: { - fields: any; - }; - TestIterationDetailsModel: { - fields: any; - }; - TestMessageLogDetails: { - fields: any; - }; - TestOutcome: { - enumValues: { - "unspecified": number; - "none": number; - "passed": number; - "failed": number; - "inconclusive": number; - "timeout": number; - "aborted": number; - "blocked": number; - "notExecuted": number; - "warning": number; - "error": number; - "notApplicable": number; - "paused": number; - "inProgress": number; - "maxValue": number; - }; - }; - TestPlan: { - fields: any; - }; - TestPlanCloneRequest: { - fields: any; - }; - TestPlansWithSelection: { - fields: any; - }; - TestPoint: { - fields: any; - }; - TestResolutionState: { - fields: any; - }; - TestResultCreateModel: { - fields: any; - }; - TestResultModelBase: { - fields: any; - }; - TestResultParameterModel: { - fields: any; - }; - TestResultsContext: { - fields: any; - }; - TestResultsContextType: { - enumValues: { - "build": number; - "release": number; - }; - }; - TestResultsDetails: { - fields: any; - }; - TestResultsDetailsForGroup: { - fields: any; - }; - TestResultSummary: { - fields: any; - }; - TestResultTrendFilter: { - fields: any; - }; - TestRun: { - fields: any; - }; - TestRunCoverage: { - fields: any; - }; - TestRunState: { - enumValues: { - "unspecified": number; - "notStarted": number; - "inProgress": number; - "completed": number; - "aborted": number; - "waiting": number; - "needsInvestigation": number; - }; - }; - TestRunStatistic: { - fields: any; - }; - TestRunSubstate: { - enumValues: { - "none": number; - "creatingEnvironment": number; - "runningTests": number; - "canceledByUser": number; - "abortedBySystem": number; - "timedOut": number; - "pendingAnalysis": number; - "analyzed": number; - "cancellationInProgress": number; - }; - }; - TestSettings: { - fields: any; - }; - TestSuite: { - fields: any; - }; - TestSuiteCloneRequest: { - fields: any; - }; - TestVariable: { - fields: any; - }; - WorkItemReference: { - fields: any; - }; - }; - -} -declare module 'vso-node-api/TestApi' { - - - import Q = require('q'); - import basem = require('vso-node-api/ClientApiBases'); - import VsoBaseInterfaces = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); - import TestInterfaces = require('vso-node-api/interfaces/TestInterfaces'); - export interface ITestApi extends basem.ClientApiBase { - createTestResultAttachment(attachmentRequestModel: TestInterfaces.TestAttachmentRequestModel, project: string, runId: number, testCaseResultId: number, onResult: (err: any, statusCode: number, Attachment: TestInterfaces.TestAttachmentReference) => void): void; - getTestResultAttachmentContent(project: string, runId: number, testCaseResultId: number, attachmentId: number, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - getTestResultAttachmentZip(project: string, runId: number, testCaseResultId: number, attachmentId: number, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - createTestRunAttachment(attachmentRequestModel: TestInterfaces.TestAttachmentRequestModel, project: string, runId: number, onResult: (err: any, statusCode: number, Attachment: TestInterfaces.TestAttachmentReference) => void): void; - getTestRunAttachmentContent(project: string, runId: number, attachmentId: number, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - getTestRunAttachmentZip(project: string, runId: number, attachmentId: number, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - getBugsLinkedToTestResult(project: string, runId: number, testCaseResultId: number, onResult: (err: any, statusCode: number, Bugs: TestInterfaces.WorkItemReference[]) => void): void; - getBuildCodeCoverage(project: string, buildId: number, flags: number, onResult: (err: any, statusCode: number, CodeCoverage: TestInterfaces.BuildCoverage[]) => void): void; - getCodeCoverageSummary(project: string, buildId: number, deltaBuildId: number, onResult: (err: any, statusCode: number, CodeCoverage: TestInterfaces.CodeCoverageSummary) => void): void; - updateCodeCoverageSummary(coverageData: TestInterfaces.CodeCoverageData, project: string, buildId: number, onResult: (err: any, statusCode: number) => void): void; - getTestRunCodeCoverage(project: string, runId: number, flags: number, onResult: (err: any, statusCode: number, CodeCoverage: TestInterfaces.TestRunCoverage[]) => void): void; - createTestConfiguration(testConfiguration: TestInterfaces.TestConfiguration, project: string, onResult: (err: any, statusCode: number, Configuration: TestInterfaces.TestConfiguration) => void): void; - deleteTestConfiguration(project: string, testConfigurationId: number, onResult: (err: any, statusCode: number) => void): void; - getTestConfigurationById(project: string, testConfigurationId: number, onResult: (err: any, statusCode: number, Configuration: TestInterfaces.TestConfiguration) => void): void; - getTestConfigurations(project: string, skip: number, top: number, includeAllProperties: boolean, onResult: (err: any, statusCode: number, Configurations: TestInterfaces.TestConfiguration[]) => void): void; - updateTestConfiguration(testConfiguration: TestInterfaces.TestConfiguration, project: string, testConfigurationId: number, onResult: (err: any, statusCode: number, Configuration: TestInterfaces.TestConfiguration) => void): void; - addCustomFields(newFields: TestInterfaces.CustomTestFieldDefinition[], project: string, onResult: (err: any, statusCode: number, ExtensionFields: TestInterfaces.CustomTestFieldDefinition[]) => void): void; - queryCustomFields(project: string, scopeFilter: TestInterfaces.CustomTestFieldScope, onResult: (err: any, statusCode: number, ExtensionFields: TestInterfaces.CustomTestFieldDefinition[]) => void): void; - getTestRunLogs(project: string, runId: number, onResult: (err: any, statusCode: number, MessageLogs: TestInterfaces.TestMessageLogDetails[]) => void): void; - getPlanCloneInformation(project: string, operationId: number, includeDetails: boolean, onResult: (err: any, statusCode: number, Plan: TestInterfaces.CloneOperationInformation) => void): void; - createTestPlan(testPlan: TestInterfaces.PlanUpdateModel, project: string, onResult: (err: any, statusCode: number, Plan: TestInterfaces.TestPlan) => void): void; - deleteTestPlan(project: string, planId: number, onResult: (err: any, statusCode: number) => void): void; - getPlanById(project: string, planId: number, onResult: (err: any, statusCode: number, Plan: TestInterfaces.TestPlan) => void): void; - getPlans(project: string, owner: string, skip: number, top: number, includePlanDetails: boolean, filterActivePlans: boolean, onResult: (err: any, statusCode: number, Plans: TestInterfaces.TestPlan[]) => void): void; - updateTestPlan(planUpdateModel: TestInterfaces.PlanUpdateModel, project: string, planId: number, onResult: (err: any, statusCode: number, Plan: TestInterfaces.TestPlan) => void): void; - cloneTestPlan(cloneRequestBody: TestInterfaces.TestPlanCloneRequest, project: string, sourcePlanId: number, onResult: (err: any, statusCode: number, Plan: TestInterfaces.CloneOperationInformation) => void): void; - getPoint(project: string, planId: number, suiteId: number, pointIds: number, witFields: string, onResult: (err: any, statusCode: number, Point: TestInterfaces.TestPoint) => void): void; - getPoints(project: string, planId: number, suiteId: number, witFields: string, configurationId: string, testCaseId: string, testPointIds: string, includePointDetails: boolean, skip: number, top: number, onResult: (err: any, statusCode: number, Points: TestInterfaces.TestPoint[]) => void): void; - updateTestPoints(pointUpdateModel: TestInterfaces.PointUpdateModel, project: string, planId: number, suiteId: number, pointIds: string, onResult: (err: any, statusCode: number, Point: TestInterfaces.TestPoint[]) => void): void; - queryTestResultRecentBugs(project: string, testRunId: number, testResultId: number, recentDays: number, onResult: (err: any, statusCode: number, RecentBugs: TestInterfaces.WorkItemReference[]) => void): void; - getTestResultDetailsForBuild(project: string, buildId: number, publishContext: string, groupBy: string, filter: string, onResult: (err: any, statusCode: number, ResultDetailsByBuild: TestInterfaces.TestResultsDetails) => void): void; - getTestResultDetailsForRelease(project: string, releaseId: number, releaseEnvId: number, publishContext: string, groupBy: string, filter: string, onResult: (err: any, statusCode: number, ResultDetailsByRelease: TestInterfaces.TestResultsDetails) => void): void; - createResultRetentionSettings(retentionSettings: TestInterfaces.ResultRetentionSettings, project: string, onResult: (err: any, statusCode: number, ResultRetentionSetting: TestInterfaces.ResultRetentionSettings) => void): void; - deleteResultRetentionSettings(project: string, onResult: (err: any, statusCode: number) => void): void; - getResultRetentionSettings(project: string, onResult: (err: any, statusCode: number, ResultRetentionSetting: TestInterfaces.ResultRetentionSettings) => void): void; - updateResultRetentionSettings(retentionSettings: TestInterfaces.ResultRetentionSettings, project: string, onResult: (err: any, statusCode: number, ResultRetentionSetting: TestInterfaces.ResultRetentionSettings) => void): void; - getTestIteration(project: string, runId: number, testCaseResultId: number, iterationId: number, includeActionResults: boolean, onResult: (err: any, statusCode: number, Result: TestInterfaces.TestIterationDetailsModel) => void): void; - getTestIterations(project: string, runId: number, testCaseResultId: number, includeActionResults: boolean, onResult: (err: any, statusCode: number, Results: TestInterfaces.TestIterationDetailsModel[]) => void): void; - addTestResultsToTestRun(resultCreateModels: TestInterfaces.TestResultCreateModel[], project: string, runId: number, onResult: (err: any, statusCode: number, Results: TestInterfaces.TestCaseResult[]) => void): void; - bulkUpdateTestResults(resultUpdateModel: TestInterfaces.TestCaseResultUpdateModel, project: string, runId: number, resultIds: number[], onResult: (err: any, statusCode: number, Result: TestInterfaces.TestCaseResult[]) => void): void; - getTestCaseResultById(project: string, runId: number, testCaseResultId: number, includeIterationDetails: boolean, includeAssociatedBugs: boolean, onResult: (err: any, statusCode: number, Result: TestInterfaces.TestCaseResult) => void): void; - getTestCaseResults(project: string, runId: number, includeIterationDetails: boolean, onResult: (err: any, statusCode: number, Results: TestInterfaces.TestCaseResult[]) => void): void; - getTestResultById(project: string, runId: number, testCaseResultId: number, detailsToInclude: TestInterfaces.ResultDetails, onResult: (err: any, statusCode: number, Results: TestInterfaces.TestCaseResult[]) => void): void; - getTestResults(project: string, runId: number, detailsToInclude: TestInterfaces.ResultDetails, skip: number, top: number, onResult: (err: any, statusCode: number, Results: TestInterfaces.TestCaseResult[]) => void): void; - updateTestResults(resultUpdateModels: TestInterfaces.TestCaseResultUpdateModel[], project: string, runId: number, onResult: (err: any, statusCode: number, Results: TestInterfaces.TestCaseResult[]) => void): void; - getTestResultsByIds(ids: TestInterfaces.TestCaseResultIdentifier[], project: string, fields: string[], onResult: (err: any, statusCode: number, Results: TestInterfaces.TestCaseResult[]) => void): void; - getActionResults(project: string, runId: number, testCaseResultId: number, iterationId: number, actionPath: string, onResult: (err: any, statusCode: number, Results: TestInterfaces.TestActionResultModel[]) => void): void; - getResultParameters(project: string, runId: number, testCaseResultId: number, iterationId: number, paramName: string, onResult: (err: any, statusCode: number, Results: TestInterfaces.TestResultParameterModel[]) => void): void; - getTestResultsByQuery(query: TestInterfaces.QueryModel, project: string, includeResultDetails: boolean, includeIterationDetails: boolean, skip: number, top: number, onResult: (err: any, statusCode: number, Result: TestInterfaces.TestCaseResult[]) => void): void; - queryTestResultsReportForBuild(project: string, buildId: number, publishContext: string, includeFailureDetails: boolean, buildToCompare: TestInterfaces.BuildReference, onResult: (err: any, statusCode: number, ResultSummaryByBuild: TestInterfaces.TestResultSummary) => void): void; - queryTestResultsReportForRelease(project: string, releaseId: number, releaseEnvId: number, publishContext: string, includeFailureDetails: boolean, releaseToCompare: TestInterfaces.ReleaseReference, onResult: (err: any, statusCode: number, ResultSummaryByRelease: TestInterfaces.TestResultSummary) => void): void; - queryTestResultTrendReport(project: string, testRunId: number, testResultId: number, historyDays: number, top: number, onResult: (err: any, statusCode: number, ResultTrend: TestInterfaces.TestCaseResult[]) => void): void; - queryResultTrendForBuild(filter: TestInterfaces.TestResultTrendFilter, project: string, onResult: (err: any, statusCode: number, ResultTrendByBuild: TestInterfaces.AggregatedDataForResultTrend[]) => void): void; - getTestRunStatistics(project: string, runId: number, onResult: (err: any, statusCode: number, Run: TestInterfaces.TestRunStatistic) => void): void; - getTestRunsByQuery(query: TestInterfaces.QueryModel, project: string, includeRunDetails: boolean, skip: number, top: number, onResult: (err: any, statusCode: number, Run: TestInterfaces.TestRun[]) => void): void; - createTestRun(testRun: TestInterfaces.RunCreateModel, project: string, onResult: (err: any, statusCode: number, Run: TestInterfaces.TestRun) => void): void; - deleteTestRun(project: string, runId: number, onResult: (err: any, statusCode: number) => void): void; - getTestRunById(project: string, runId: number, onResult: (err: any, statusCode: number, Run: TestInterfaces.TestRun) => void): void; - getTestRuns(project: string, buildUri: string, owner: string, tmiRunId: string, planId: number, includeRunDetails: boolean, automated: boolean, skip: number, top: number, onResult: (err: any, statusCode: number, Runs: TestInterfaces.TestRun[]) => void): void; - updateTestRun(runUpdateModel: TestInterfaces.RunUpdateModel, project: string, runId: number, onResult: (err: any, statusCode: number, Run: TestInterfaces.TestRun) => void): void; - getSuiteCloneInformation(project: string, operationId: number, includeDetails: boolean, onResult: (err: any, statusCode: number, Suite: TestInterfaces.CloneOperationInformation) => void): void; - addTestCasesToSuite(project: string, planId: number, suiteId: number, testCaseIds: string, onResult: (err: any, statusCode: number, Suites: TestInterfaces.SuiteTestCase[]) => void): void; - getTestCaseById(project: string, planId: number, suiteId: number, testCaseIds: number, onResult: (err: any, statusCode: number, Suite: TestInterfaces.SuiteTestCase) => void): void; - getTestCases(project: string, planId: number, suiteId: number, onResult: (err: any, statusCode: number, Suites: TestInterfaces.SuiteTestCase[]) => void): void; - removeTestCasesFromSuiteUrl(project: string, planId: number, suiteId: number, testCaseIds: string, onResult: (err: any, statusCode: number) => void): void; - createTestSuite(testSuite: TestInterfaces.SuiteCreateModel, project: string, planId: number, suiteId: number, onResult: (err: any, statusCode: number, Suite: TestInterfaces.TestSuite[]) => void): void; - deleteTestSuite(project: string, planId: number, suiteId: number, onResult: (err: any, statusCode: number) => void): void; - getTestSuiteById(project: string, planId: number, suiteId: number, includeChildSuites: boolean, onResult: (err: any, statusCode: number, Suite: TestInterfaces.TestSuite) => void): void; - getTestSuitesForPlan(project: string, planId: number, includeSuites: boolean, skip: number, top: number, asTreeView: boolean, onResult: (err: any, statusCode: number, Suites: TestInterfaces.TestSuite[]) => void): void; - updateTestSuite(suiteUpdateModel: TestInterfaces.SuiteUpdateModel, project: string, planId: number, suiteId: number, onResult: (err: any, statusCode: number, Suite: TestInterfaces.TestSuite) => void): void; - cloneTestSuite(cloneRequestBody: TestInterfaces.TestSuiteCloneRequest, project: string, sourceSuiteId: number, planId: number, onResult: (err: any, statusCode: number, Suite: TestInterfaces.CloneOperationInformation) => void): void; - getSuitesByTestCaseId(testCaseId: number, onResult: (err: any, statusCode: number, Suites: TestInterfaces.TestSuite[]) => void): void; - createTestSettings(testSettings: TestInterfaces.TestSettings, project: string, onResult: (err: any, statusCode: number, TestSetting: number) => void): void; - deleteTestSettings(project: string, testSettingsId: number, onResult: (err: any, statusCode: number) => void): void; - getTestSettingsById(project: string, testSettingsId: number, onResult: (err: any, statusCode: number, TestSetting: TestInterfaces.TestSettings) => void): void; - createTestVariable(testVariable: TestInterfaces.TestVariable, project: string, onResult: (err: any, statusCode: number, Variable: TestInterfaces.TestVariable) => void): void; - deleteTestVariable(project: string, testVariableId: number, onResult: (err: any, statusCode: number) => void): void; - getTestVariable(project: string, testVariableId: number, onResult: (err: any, statusCode: number, Variable: TestInterfaces.TestVariable) => void): void; - getTestVariables(project: string, skip: number, top: number, onResult: (err: any, statusCode: number, Variables: TestInterfaces.TestVariable[]) => void): void; - updateTestVariable(testVariable: TestInterfaces.TestVariable, project: string, testVariableId: number, onResult: (err: any, statusCode: number, Variable: TestInterfaces.TestVariable) => void): void; - } - export interface IQTestApi extends basem.QClientApiBase { - createTestResultAttachment(attachmentRequestModel: TestInterfaces.TestAttachmentRequestModel, project: string, runId: number, testCaseResultId: number): Promise; - getTestResultAttachmentContent(project: string, runId: number, testCaseResultId: number, attachmentId: number): Promise; - getTestResultAttachmentZip(project: string, runId: number, testCaseResultId: number, attachmentId: number): Promise; - createTestRunAttachment(attachmentRequestModel: TestInterfaces.TestAttachmentRequestModel, project: string, runId: number): Promise; - getTestRunAttachmentContent(project: string, runId: number, attachmentId: number): Promise; - getTestRunAttachmentZip(project: string, runId: number, attachmentId: number): Promise; - getBugsLinkedToTestResult(project: string, runId: number, testCaseResultId: number): Promise; - getBuildCodeCoverage(project: string, buildId: number, flags: number): Promise; - getCodeCoverageSummary(project: string, buildId: number, deltaBuildId?: number): Promise; - updateCodeCoverageSummary(coverageData: TestInterfaces.CodeCoverageData, project: string, buildId: number): Promise; - getTestRunCodeCoverage(project: string, runId: number, flags: number): Promise; - createTestConfiguration(testConfiguration: TestInterfaces.TestConfiguration, project: string): Promise; - deleteTestConfiguration(project: string, testConfigurationId: number): Promise; - getTestConfigurationById(project: string, testConfigurationId: number): Promise; - getTestConfigurations(project: string, skip?: number, top?: number, includeAllProperties?: boolean): Promise; - updateTestConfiguration(testConfiguration: TestInterfaces.TestConfiguration, project: string, testConfigurationId: number): Promise; - addCustomFields(newFields: TestInterfaces.CustomTestFieldDefinition[], project: string): Promise; - queryCustomFields(project: string, scopeFilter: TestInterfaces.CustomTestFieldScope): Promise; - getTestRunLogs(project: string, runId: number): Promise; - getPlanCloneInformation(project: string, operationId: number, includeDetails?: boolean): Promise; - createTestPlan(testPlan: TestInterfaces.PlanUpdateModel, project: string): Promise; - deleteTestPlan(project: string, planId: number): Promise; - getPlanById(project: string, planId: number): Promise; - getPlans(project: string, owner?: string, skip?: number, top?: number, includePlanDetails?: boolean, filterActivePlans?: boolean): Promise; - updateTestPlan(planUpdateModel: TestInterfaces.PlanUpdateModel, project: string, planId: number): Promise; - cloneTestPlan(cloneRequestBody: TestInterfaces.TestPlanCloneRequest, project: string, sourcePlanId: number): Promise; - getPoint(project: string, planId: number, suiteId: number, pointIds: number, witFields?: string): Promise; - getPoints(project: string, planId: number, suiteId: number, witFields?: string, configurationId?: string, testCaseId?: string, testPointIds?: string, includePointDetails?: boolean, skip?: number, top?: number): Promise; - updateTestPoints(pointUpdateModel: TestInterfaces.PointUpdateModel, project: string, planId: number, suiteId: number, pointIds: string): Promise; - queryTestResultRecentBugs(project: string, testRunId: number, testResultId: number, recentDays?: number): Promise; - getTestResultDetailsForBuild(project: string, buildId: number, publishContext?: string, groupBy?: string, filter?: string): Promise; - getTestResultDetailsForRelease(project: string, releaseId: number, releaseEnvId: number, publishContext?: string, groupBy?: string, filter?: string): Promise; - createResultRetentionSettings(retentionSettings: TestInterfaces.ResultRetentionSettings, project: string): Promise; - deleteResultRetentionSettings(project: string): Promise; - getResultRetentionSettings(project: string): Promise; - updateResultRetentionSettings(retentionSettings: TestInterfaces.ResultRetentionSettings, project: string): Promise; - getTestIteration(project: string, runId: number, testCaseResultId: number, iterationId: number, includeActionResults?: boolean): Promise; - getTestIterations(project: string, runId: number, testCaseResultId: number, includeActionResults?: boolean): Promise; - addTestResultsToTestRun(resultCreateModels: TestInterfaces.TestResultCreateModel[], project: string, runId: number): Promise; - bulkUpdateTestResults(resultUpdateModel: TestInterfaces.TestCaseResultUpdateModel, project: string, runId: number, resultIds: number[]): Promise; - getTestCaseResultById(project: string, runId: number, testCaseResultId: number, includeIterationDetails: boolean, includeAssociatedBugs?: boolean): Promise; - getTestCaseResults(project: string, runId: number, includeIterationDetails: boolean): Promise; - getTestResultById(project: string, runId: number, testCaseResultId: number, detailsToInclude?: TestInterfaces.ResultDetails): Promise; - getTestResults(project: string, runId: number, detailsToInclude?: TestInterfaces.ResultDetails, skip?: number, top?: number): Promise; - updateTestResults(resultUpdateModels: TestInterfaces.TestCaseResultUpdateModel[], project: string, runId: number): Promise; - getTestResultsByIds(ids: TestInterfaces.TestCaseResultIdentifier[], project: string, fields: string[]): Promise; - getActionResults(project: string, runId: number, testCaseResultId: number, iterationId: number, actionPath?: string): Promise; - getResultParameters(project: string, runId: number, testCaseResultId: number, iterationId: number, paramName?: string): Promise; - getTestResultsByQuery(query: TestInterfaces.QueryModel, project: string, includeResultDetails?: boolean, includeIterationDetails?: boolean, skip?: number, top?: number): Promise; - queryTestResultsReportForBuild(project: string, buildId: number, publishContext?: string, includeFailureDetails?: boolean, buildToCompare?: TestInterfaces.BuildReference): Promise; - queryTestResultsReportForRelease(project: string, releaseId: number, releaseEnvId: number, publishContext?: string, includeFailureDetails?: boolean, releaseToCompare?: TestInterfaces.ReleaseReference): Promise; - queryTestResultTrendReport(project: string, testRunId: number, testResultId: number, historyDays?: number, top?: number): Promise; - queryResultTrendForBuild(filter: TestInterfaces.TestResultTrendFilter, project: string): Promise; - getTestRunStatistics(project: string, runId: number): Promise; - getTestRunsByQuery(query: TestInterfaces.QueryModel, project: string, includeRunDetails?: boolean, skip?: number, top?: number): Promise; - createTestRun(testRun: TestInterfaces.RunCreateModel, project: string): Promise; - deleteTestRun(project: string, runId: number): Promise; - getTestRunById(project: string, runId: number): Promise; - getTestRuns(project: string, buildUri?: string, owner?: string, tmiRunId?: string, planId?: number, includeRunDetails?: boolean, automated?: boolean, skip?: number, top?: number): Promise; - updateTestRun(runUpdateModel: TestInterfaces.RunUpdateModel, project: string, runId: number): Promise; - getSuiteCloneInformation(project: string, operationId: number, includeDetails?: boolean): Promise; - addTestCasesToSuite(project: string, planId: number, suiteId: number, testCaseIds: string): Promise; - getTestCaseById(project: string, planId: number, suiteId: number, testCaseIds: number): Promise; - getTestCases(project: string, planId: number, suiteId: number): Promise; - removeTestCasesFromSuiteUrl(project: string, planId: number, suiteId: number, testCaseIds: string): Promise; - createTestSuite(testSuite: TestInterfaces.SuiteCreateModel, project: string, planId: number, suiteId: number): Promise; - deleteTestSuite(project: string, planId: number, suiteId: number): Promise; - getTestSuiteById(project: string, planId: number, suiteId: number, includeChildSuites?: boolean): Promise; - getTestSuitesForPlan(project: string, planId: number, includeSuites?: boolean, skip?: number, top?: number, asTreeView?: boolean): Promise; - updateTestSuite(suiteUpdateModel: TestInterfaces.SuiteUpdateModel, project: string, planId: number, suiteId: number): Promise; - cloneTestSuite(cloneRequestBody: TestInterfaces.TestSuiteCloneRequest, project: string, sourceSuiteId: number, planId: number): Promise; - getSuitesByTestCaseId(testCaseId: number): Promise; - createTestSettings(testSettings: TestInterfaces.TestSettings, project: string): Promise; - deleteTestSettings(project: string, testSettingsId: number): Promise; - getTestSettingsById(project: string, testSettingsId: number): Promise; - createTestVariable(testVariable: TestInterfaces.TestVariable, project: string): Promise; - deleteTestVariable(project: string, testVariableId: number): Promise; - getTestVariable(project: string, testVariableId: number): Promise; - getTestVariables(project: string, skip?: number, top?: number): Promise; - updateTestVariable(testVariable: TestInterfaces.TestVariable, project: string, testVariableId: number): Promise; - } - export class TestApi extends basem.ClientApiBase implements ITestApi { - constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); - /** - * @param {TestInterfaces.TestAttachmentRequestModel} attachmentRequestModel - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} testCaseResultId - * @param onResult callback function with the resulting TestInterfaces.TestAttachmentReference - */ - createTestResultAttachment(attachmentRequestModel: TestInterfaces.TestAttachmentRequestModel, project: string, runId: number, testCaseResultId: number, onResult: (err: any, statusCode: number, Attachment: TestInterfaces.TestAttachmentReference) => void): void; - /** - * Returns a test result attachment - * - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} testCaseResultId - * @param {number} attachmentId - * @param onResult callback function with the resulting ArrayBuffer - */ - getTestResultAttachmentContent(project: string, runId: number, testCaseResultId: number, attachmentId: number, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * Returns a test result attachment - * - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} testCaseResultId - * @param {number} attachmentId - * @param onResult callback function with the resulting ArrayBuffer - */ - getTestResultAttachmentZip(project: string, runId: number, testCaseResultId: number, attachmentId: number, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * @param {TestInterfaces.TestAttachmentRequestModel} attachmentRequestModel - * @param {string} project - Project ID or project name - * @param {number} runId - * @param onResult callback function with the resulting TestInterfaces.TestAttachmentReference - */ - createTestRunAttachment(attachmentRequestModel: TestInterfaces.TestAttachmentRequestModel, project: string, runId: number, onResult: (err: any, statusCode: number, Attachment: TestInterfaces.TestAttachmentReference) => void): void; - /** - * Returns a test run attachment - * - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} attachmentId - * @param onResult callback function with the resulting ArrayBuffer - */ - getTestRunAttachmentContent(project: string, runId: number, attachmentId: number, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * Returns a test run attachment - * - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} attachmentId - * @param onResult callback function with the resulting ArrayBuffer - */ - getTestRunAttachmentZip(project: string, runId: number, attachmentId: number, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} testCaseResultId - * @param onResult callback function with the resulting TestInterfaces.WorkItemReference[] - */ - getBugsLinkedToTestResult(project: string, runId: number, testCaseResultId: number, onResult: (err: any, statusCode: number, Bugs: TestInterfaces.WorkItemReference[]) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {number} flags - * @param onResult callback function with the resulting TestInterfaces.BuildCoverage[] - */ - getBuildCodeCoverage(project: string, buildId: number, flags: number, onResult: (err: any, statusCode: number, CodeCoverage: TestInterfaces.BuildCoverage[]) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {number} deltaBuildId - * @param onResult callback function with the resulting TestInterfaces.CodeCoverageSummary - */ - getCodeCoverageSummary(project: string, buildId: number, deltaBuildId: number, onResult: (err: any, statusCode: number, CodeCoverage: TestInterfaces.CodeCoverageSummary) => void): void; - /** - * http://(tfsserver):8080/tfs/DefaultCollection/_apis/test/CodeCoverage?buildId=10 Request: Json of code coverage summary - * - * @param {TestInterfaces.CodeCoverageData} coverageData - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param onResult callback function - */ - updateCodeCoverageSummary(coverageData: TestInterfaces.CodeCoverageData, project: string, buildId: number, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} flags - * @param onResult callback function with the resulting TestInterfaces.TestRunCoverage[] - */ - getTestRunCodeCoverage(project: string, runId: number, flags: number, onResult: (err: any, statusCode: number, CodeCoverage: TestInterfaces.TestRunCoverage[]) => void): void; - /** - * @param {TestInterfaces.TestConfiguration} testConfiguration - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting TestInterfaces.TestConfiguration - */ - createTestConfiguration(testConfiguration: TestInterfaces.TestConfiguration, project: string, onResult: (err: any, statusCode: number, Configuration: TestInterfaces.TestConfiguration) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} testConfigurationId - * @param onResult callback function - */ - deleteTestConfiguration(project: string, testConfigurationId: number, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} testConfigurationId - * @param onResult callback function with the resulting TestInterfaces.TestConfiguration - */ - getTestConfigurationById(project: string, testConfigurationId: number, onResult: (err: any, statusCode: number, Configuration: TestInterfaces.TestConfiguration) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} skip - * @param {number} top - * @param {boolean} includeAllProperties - * @param onResult callback function with the resulting TestInterfaces.TestConfiguration[] - */ - getTestConfigurations(project: string, skip: number, top: number, includeAllProperties: boolean, onResult: (err: any, statusCode: number, Configurations: TestInterfaces.TestConfiguration[]) => void): void; - /** - * @param {TestInterfaces.TestConfiguration} testConfiguration - * @param {string} project - Project ID or project name - * @param {number} testConfigurationId - * @param onResult callback function with the resulting TestInterfaces.TestConfiguration - */ - updateTestConfiguration(testConfiguration: TestInterfaces.TestConfiguration, project: string, testConfigurationId: number, onResult: (err: any, statusCode: number, Configuration: TestInterfaces.TestConfiguration) => void): void; - /** - * @param {TestInterfaces.CustomTestFieldDefinition[]} newFields - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting TestInterfaces.CustomTestFieldDefinition[] - */ - addCustomFields(newFields: TestInterfaces.CustomTestFieldDefinition[], project: string, onResult: (err: any, statusCode: number, ExtensionFields: TestInterfaces.CustomTestFieldDefinition[]) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {TestInterfaces.CustomTestFieldScope} scopeFilter - * @param onResult callback function with the resulting TestInterfaces.CustomTestFieldDefinition[] - */ - queryCustomFields(project: string, scopeFilter: TestInterfaces.CustomTestFieldScope, onResult: (err: any, statusCode: number, ExtensionFields: TestInterfaces.CustomTestFieldDefinition[]) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} runId - * @param onResult callback function with the resulting TestInterfaces.TestMessageLogDetails[] - */ - getTestRunLogs(project: string, runId: number, onResult: (err: any, statusCode: number, MessageLogs: TestInterfaces.TestMessageLogDetails[]) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} operationId - * @param {boolean} includeDetails - * @param onResult callback function with the resulting TestInterfaces.CloneOperationInformation - */ - getPlanCloneInformation(project: string, operationId: number, includeDetails: boolean, onResult: (err: any, statusCode: number, Plan: TestInterfaces.CloneOperationInformation) => void): void; - /** - * @param {TestInterfaces.PlanUpdateModel} testPlan - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting TestInterfaces.TestPlan - */ - createTestPlan(testPlan: TestInterfaces.PlanUpdateModel, project: string, onResult: (err: any, statusCode: number, Plan: TestInterfaces.TestPlan) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} planId - * @param onResult callback function - */ - deleteTestPlan(project: string, planId: number, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} planId - * @param onResult callback function with the resulting TestInterfaces.TestPlan - */ - getPlanById(project: string, planId: number, onResult: (err: any, statusCode: number, Plan: TestInterfaces.TestPlan) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {string} owner - * @param {number} skip - * @param {number} top - * @param {boolean} includePlanDetails - * @param {boolean} filterActivePlans - * @param onResult callback function with the resulting TestInterfaces.TestPlan[] - */ - getPlans(project: string, owner: string, skip: number, top: number, includePlanDetails: boolean, filterActivePlans: boolean, onResult: (err: any, statusCode: number, Plans: TestInterfaces.TestPlan[]) => void): void; - /** - * @param {TestInterfaces.PlanUpdateModel} planUpdateModel - * @param {string} project - Project ID or project name - * @param {number} planId - * @param onResult callback function with the resulting TestInterfaces.TestPlan - */ - updateTestPlan(planUpdateModel: TestInterfaces.PlanUpdateModel, project: string, planId: number, onResult: (err: any, statusCode: number, Plan: TestInterfaces.TestPlan) => void): void; - /** - * @param {TestInterfaces.TestPlanCloneRequest} cloneRequestBody - * @param {string} project - Project ID or project name - * @param {number} sourcePlanId - * @param onResult callback function with the resulting TestInterfaces.CloneOperationInformation - */ - cloneTestPlan(cloneRequestBody: TestInterfaces.TestPlanCloneRequest, project: string, sourcePlanId: number, onResult: (err: any, statusCode: number, Plan: TestInterfaces.CloneOperationInformation) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} planId - * @param {number} suiteId - * @param {number} pointIds - * @param {string} witFields - * @param onResult callback function with the resulting TestInterfaces.TestPoint - */ - getPoint(project: string, planId: number, suiteId: number, pointIds: number, witFields: string, onResult: (err: any, statusCode: number, Point: TestInterfaces.TestPoint) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} planId - * @param {number} suiteId - * @param {string} witFields - * @param {string} configurationId - * @param {string} testCaseId - * @param {string} testPointIds - * @param {boolean} includePointDetails - * @param {number} skip - * @param {number} top - * @param onResult callback function with the resulting TestInterfaces.TestPoint[] - */ - getPoints(project: string, planId: number, suiteId: number, witFields: string, configurationId: string, testCaseId: string, testPointIds: string, includePointDetails: boolean, skip: number, top: number, onResult: (err: any, statusCode: number, Points: TestInterfaces.TestPoint[]) => void): void; - /** - * @param {TestInterfaces.PointUpdateModel} pointUpdateModel - * @param {string} project - Project ID or project name - * @param {number} planId - * @param {number} suiteId - * @param {string} pointIds - * @param onResult callback function with the resulting TestInterfaces.TestPoint[] - */ - updateTestPoints(pointUpdateModel: TestInterfaces.PointUpdateModel, project: string, planId: number, suiteId: number, pointIds: string, onResult: (err: any, statusCode: number, Point: TestInterfaces.TestPoint[]) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} testRunId - * @param {number} testResultId - * @param {number} recentDays - * @param onResult callback function with the resulting TestInterfaces.WorkItemReference[] - */ - queryTestResultRecentBugs(project: string, testRunId: number, testResultId: number, recentDays: number, onResult: (err: any, statusCode: number, RecentBugs: TestInterfaces.WorkItemReference[]) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {string} publishContext - * @param {string} groupBy - * @param {string} filter - * @param onResult callback function with the resulting TestInterfaces.TestResultsDetails - */ - getTestResultDetailsForBuild(project: string, buildId: number, publishContext: string, groupBy: string, filter: string, onResult: (err: any, statusCode: number, ResultDetailsByBuild: TestInterfaces.TestResultsDetails) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} releaseId - * @param {number} releaseEnvId - * @param {string} publishContext - * @param {string} groupBy - * @param {string} filter - * @param onResult callback function with the resulting TestInterfaces.TestResultsDetails - */ - getTestResultDetailsForRelease(project: string, releaseId: number, releaseEnvId: number, publishContext: string, groupBy: string, filter: string, onResult: (err: any, statusCode: number, ResultDetailsByRelease: TestInterfaces.TestResultsDetails) => void): void; - /** - * @param {TestInterfaces.ResultRetentionSettings} retentionSettings - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting TestInterfaces.ResultRetentionSettings - */ - createResultRetentionSettings(retentionSettings: TestInterfaces.ResultRetentionSettings, project: string, onResult: (err: any, statusCode: number, ResultRetentionSetting: TestInterfaces.ResultRetentionSettings) => void): void; - /** - * @param {string} project - Project ID or project name - * @param onResult callback function - */ - deleteResultRetentionSettings(project: string, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting TestInterfaces.ResultRetentionSettings - */ - getResultRetentionSettings(project: string, onResult: (err: any, statusCode: number, ResultRetentionSetting: TestInterfaces.ResultRetentionSettings) => void): void; - /** - * @param {TestInterfaces.ResultRetentionSettings} retentionSettings - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting TestInterfaces.ResultRetentionSettings - */ - updateResultRetentionSettings(retentionSettings: TestInterfaces.ResultRetentionSettings, project: string, onResult: (err: any, statusCode: number, ResultRetentionSetting: TestInterfaces.ResultRetentionSettings) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} testCaseResultId - * @param {number} iterationId - * @param {boolean} includeActionResults - * @param onResult callback function with the resulting TestInterfaces.TestIterationDetailsModel - */ - getTestIteration(project: string, runId: number, testCaseResultId: number, iterationId: number, includeActionResults: boolean, onResult: (err: any, statusCode: number, Result: TestInterfaces.TestIterationDetailsModel) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} testCaseResultId - * @param {boolean} includeActionResults - * @param onResult callback function with the resulting TestInterfaces.TestIterationDetailsModel[] - */ - getTestIterations(project: string, runId: number, testCaseResultId: number, includeActionResults: boolean, onResult: (err: any, statusCode: number, Results: TestInterfaces.TestIterationDetailsModel[]) => void): void; - /** - * @param {TestInterfaces.TestResultCreateModel[]} resultCreateModels - * @param {string} project - Project ID or project name - * @param {number} runId - * @param onResult callback function with the resulting TestInterfaces.TestCaseResult[] - */ - addTestResultsToTestRun(resultCreateModels: TestInterfaces.TestResultCreateModel[], project: string, runId: number, onResult: (err: any, statusCode: number, Results: TestInterfaces.TestCaseResult[]) => void): void; - /** - * @param {TestInterfaces.TestCaseResultUpdateModel} resultUpdateModel - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number[]} resultIds - * @param onResult callback function with the resulting TestInterfaces.TestCaseResult[] - */ - bulkUpdateTestResults(resultUpdateModel: TestInterfaces.TestCaseResultUpdateModel, project: string, runId: number, resultIds: number[], onResult: (err: any, statusCode: number, Result: TestInterfaces.TestCaseResult[]) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} testCaseResultId - * @param {boolean} includeIterationDetails - * @param {boolean} includeAssociatedBugs - * @param onResult callback function with the resulting TestInterfaces.TestCaseResult - */ - getTestCaseResultById(project: string, runId: number, testCaseResultId: number, includeIterationDetails: boolean, includeAssociatedBugs: boolean, onResult: (err: any, statusCode: number, Result: TestInterfaces.TestCaseResult) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {boolean} includeIterationDetails - * @param onResult callback function with the resulting TestInterfaces.TestCaseResult[] - */ - getTestCaseResults(project: string, runId: number, includeIterationDetails: boolean, onResult: (err: any, statusCode: number, Results: TestInterfaces.TestCaseResult[]) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} testCaseResultId - * @param {TestInterfaces.ResultDetails} detailsToInclude - * @param onResult callback function with the resulting TestInterfaces.TestCaseResult[] - */ - getTestResultById(project: string, runId: number, testCaseResultId: number, detailsToInclude: TestInterfaces.ResultDetails, onResult: (err: any, statusCode: number, Results: TestInterfaces.TestCaseResult[]) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {TestInterfaces.ResultDetails} detailsToInclude - * @param {number} skip - * @param {number} top - * @param onResult callback function with the resulting TestInterfaces.TestCaseResult[] - */ - getTestResults(project: string, runId: number, detailsToInclude: TestInterfaces.ResultDetails, skip: number, top: number, onResult: (err: any, statusCode: number, Results: TestInterfaces.TestCaseResult[]) => void): void; - /** - * @param {TestInterfaces.TestCaseResultUpdateModel[]} resultUpdateModels - * @param {string} project - Project ID or project name - * @param {number} runId - * @param onResult callback function with the resulting TestInterfaces.TestCaseResult[] - */ - updateTestResults(resultUpdateModels: TestInterfaces.TestCaseResultUpdateModel[], project: string, runId: number, onResult: (err: any, statusCode: number, Results: TestInterfaces.TestCaseResult[]) => void): void; - /** - * @param {TestInterfaces.TestCaseResultIdentifier[]} ids - * @param {string} project - Project ID or project name - * @param {string[]} fields - * @param onResult callback function with the resulting TestInterfaces.TestCaseResult[] - */ - getTestResultsByIds(ids: TestInterfaces.TestCaseResultIdentifier[], project: string, fields: string[], onResult: (err: any, statusCode: number, Results: TestInterfaces.TestCaseResult[]) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} testCaseResultId - * @param {number} iterationId - * @param {string} actionPath - * @param onResult callback function with the resulting TestInterfaces.TestActionResultModel[] - */ - getActionResults(project: string, runId: number, testCaseResultId: number, iterationId: number, actionPath: string, onResult: (err: any, statusCode: number, Results: TestInterfaces.TestActionResultModel[]) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} testCaseResultId - * @param {number} iterationId - * @param {string} paramName - * @param onResult callback function with the resulting TestInterfaces.TestResultParameterModel[] - */ - getResultParameters(project: string, runId: number, testCaseResultId: number, iterationId: number, paramName: string, onResult: (err: any, statusCode: number, Results: TestInterfaces.TestResultParameterModel[]) => void): void; - /** - * @param {TestInterfaces.QueryModel} query - * @param {string} project - Project ID or project name - * @param {boolean} includeResultDetails - * @param {boolean} includeIterationDetails - * @param {number} skip - * @param {number} top - * @param onResult callback function with the resulting TestInterfaces.TestCaseResult[] - */ - getTestResultsByQuery(query: TestInterfaces.QueryModel, project: string, includeResultDetails: boolean, includeIterationDetails: boolean, skip: number, top: number, onResult: (err: any, statusCode: number, Result: TestInterfaces.TestCaseResult[]) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {string} publishContext - * @param {boolean} includeFailureDetails - * @param {TestInterfaces.BuildReference} buildToCompare - * @param onResult callback function with the resulting TestInterfaces.TestResultSummary - */ - queryTestResultsReportForBuild(project: string, buildId: number, publishContext: string, includeFailureDetails: boolean, buildToCompare: TestInterfaces.BuildReference, onResult: (err: any, statusCode: number, ResultSummaryByBuild: TestInterfaces.TestResultSummary) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} releaseId - * @param {number} releaseEnvId - * @param {string} publishContext - * @param {boolean} includeFailureDetails - * @param {TestInterfaces.ReleaseReference} releaseToCompare - * @param onResult callback function with the resulting TestInterfaces.TestResultSummary - */ - queryTestResultsReportForRelease(project: string, releaseId: number, releaseEnvId: number, publishContext: string, includeFailureDetails: boolean, releaseToCompare: TestInterfaces.ReleaseReference, onResult: (err: any, statusCode: number, ResultSummaryByRelease: TestInterfaces.TestResultSummary) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} testRunId - * @param {number} testResultId - * @param {number} historyDays - * @param {number} top - * @param onResult callback function with the resulting TestInterfaces.TestCaseResult[] - */ - queryTestResultTrendReport(project: string, testRunId: number, testResultId: number, historyDays: number, top: number, onResult: (err: any, statusCode: number, ResultTrend: TestInterfaces.TestCaseResult[]) => void): void; - /** - * @param {TestInterfaces.TestResultTrendFilter} filter - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting TestInterfaces.AggregatedDataForResultTrend[] - */ - queryResultTrendForBuild(filter: TestInterfaces.TestResultTrendFilter, project: string, onResult: (err: any, statusCode: number, ResultTrendByBuild: TestInterfaces.AggregatedDataForResultTrend[]) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} runId - * @param onResult callback function with the resulting TestInterfaces.TestRunStatistic - */ - getTestRunStatistics(project: string, runId: number, onResult: (err: any, statusCode: number, Run: TestInterfaces.TestRunStatistic) => void): void; - /** - * @param {TestInterfaces.QueryModel} query - * @param {string} project - Project ID or project name - * @param {boolean} includeRunDetails - * @param {number} skip - * @param {number} top - * @param onResult callback function with the resulting TestInterfaces.TestRun[] - */ - getTestRunsByQuery(query: TestInterfaces.QueryModel, project: string, includeRunDetails: boolean, skip: number, top: number, onResult: (err: any, statusCode: number, Run: TestInterfaces.TestRun[]) => void): void; - /** - * @param {TestInterfaces.RunCreateModel} testRun - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting TestInterfaces.TestRun - */ - createTestRun(testRun: TestInterfaces.RunCreateModel, project: string, onResult: (err: any, statusCode: number, Run: TestInterfaces.TestRun) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} runId - * @param onResult callback function - */ - deleteTestRun(project: string, runId: number, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} runId - * @param onResult callback function with the resulting TestInterfaces.TestRun - */ - getTestRunById(project: string, runId: number, onResult: (err: any, statusCode: number, Run: TestInterfaces.TestRun) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {string} buildUri - * @param {string} owner - * @param {string} tmiRunId - * @param {number} planId - * @param {boolean} includeRunDetails - * @param {boolean} automated - * @param {number} skip - * @param {number} top - * @param onResult callback function with the resulting TestInterfaces.TestRun[] - */ - getTestRuns(project: string, buildUri: string, owner: string, tmiRunId: string, planId: number, includeRunDetails: boolean, automated: boolean, skip: number, top: number, onResult: (err: any, statusCode: number, Runs: TestInterfaces.TestRun[]) => void): void; - /** - * @param {TestInterfaces.RunUpdateModel} runUpdateModel - * @param {string} project - Project ID or project name - * @param {number} runId - * @param onResult callback function with the resulting TestInterfaces.TestRun - */ - updateTestRun(runUpdateModel: TestInterfaces.RunUpdateModel, project: string, runId: number, onResult: (err: any, statusCode: number, Run: TestInterfaces.TestRun) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} operationId - * @param {boolean} includeDetails - * @param onResult callback function with the resulting TestInterfaces.CloneOperationInformation - */ - getSuiteCloneInformation(project: string, operationId: number, includeDetails: boolean, onResult: (err: any, statusCode: number, Suite: TestInterfaces.CloneOperationInformation) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} planId - * @param {number} suiteId - * @param {string} testCaseIds - * @param onResult callback function with the resulting TestInterfaces.SuiteTestCase[] - */ - addTestCasesToSuite(project: string, planId: number, suiteId: number, testCaseIds: string, onResult: (err: any, statusCode: number, Suites: TestInterfaces.SuiteTestCase[]) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} planId - * @param {number} suiteId - * @param {number} testCaseIds - * @param onResult callback function with the resulting TestInterfaces.SuiteTestCase - */ - getTestCaseById(project: string, planId: number, suiteId: number, testCaseIds: number, onResult: (err: any, statusCode: number, Suite: TestInterfaces.SuiteTestCase) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} planId - * @param {number} suiteId - * @param onResult callback function with the resulting TestInterfaces.SuiteTestCase[] - */ - getTestCases(project: string, planId: number, suiteId: number, onResult: (err: any, statusCode: number, Suites: TestInterfaces.SuiteTestCase[]) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} planId - * @param {number} suiteId - * @param {string} testCaseIds - * @param onResult callback function - */ - removeTestCasesFromSuiteUrl(project: string, planId: number, suiteId: number, testCaseIds: string, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {TestInterfaces.SuiteCreateModel} testSuite - * @param {string} project - Project ID or project name - * @param {number} planId - * @param {number} suiteId - * @param onResult callback function with the resulting TestInterfaces.TestSuite[] - */ - createTestSuite(testSuite: TestInterfaces.SuiteCreateModel, project: string, planId: number, suiteId: number, onResult: (err: any, statusCode: number, Suite: TestInterfaces.TestSuite[]) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} planId - * @param {number} suiteId - * @param onResult callback function - */ - deleteTestSuite(project: string, planId: number, suiteId: number, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} planId - * @param {number} suiteId - * @param {boolean} includeChildSuites - * @param onResult callback function with the resulting TestInterfaces.TestSuite - */ - getTestSuiteById(project: string, planId: number, suiteId: number, includeChildSuites: boolean, onResult: (err: any, statusCode: number, Suite: TestInterfaces.TestSuite) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} planId - * @param {boolean} includeSuites - * @param {number} skip - * @param {number} top - * @param {boolean} asTreeView - * @param onResult callback function with the resulting TestInterfaces.TestSuite[] - */ - getTestSuitesForPlan(project: string, planId: number, includeSuites: boolean, skip: number, top: number, asTreeView: boolean, onResult: (err: any, statusCode: number, Suites: TestInterfaces.TestSuite[]) => void): void; - /** - * @param {TestInterfaces.SuiteUpdateModel} suiteUpdateModel - * @param {string} project - Project ID or project name - * @param {number} planId - * @param {number} suiteId - * @param onResult callback function with the resulting TestInterfaces.TestSuite - */ - updateTestSuite(suiteUpdateModel: TestInterfaces.SuiteUpdateModel, project: string, planId: number, suiteId: number, onResult: (err: any, statusCode: number, Suite: TestInterfaces.TestSuite) => void): void; - /** - * @param {TestInterfaces.TestSuiteCloneRequest} cloneRequestBody - * @param {string} project - Project ID or project name - * @param {number} sourceSuiteId - * @param {number} planId - * @param onResult callback function with the resulting TestInterfaces.CloneOperationInformation - */ - cloneTestSuite(cloneRequestBody: TestInterfaces.TestSuiteCloneRequest, project: string, sourceSuiteId: number, planId: number, onResult: (err: any, statusCode: number, Suite: TestInterfaces.CloneOperationInformation) => void): void; - /** - * @param {number} testCaseId - * @param onResult callback function with the resulting TestInterfaces.TestSuite[] - */ - getSuitesByTestCaseId(testCaseId: number, onResult: (err: any, statusCode: number, Suites: TestInterfaces.TestSuite[]) => void): void; - /** - * @param {TestInterfaces.TestSettings} testSettings - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting number - */ - createTestSettings(testSettings: TestInterfaces.TestSettings, project: string, onResult: (err: any, statusCode: number, TestSetting: number) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} testSettingsId - * @param onResult callback function - */ - deleteTestSettings(project: string, testSettingsId: number, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} testSettingsId - * @param onResult callback function with the resulting TestInterfaces.TestSettings - */ - getTestSettingsById(project: string, testSettingsId: number, onResult: (err: any, statusCode: number, TestSetting: TestInterfaces.TestSettings) => void): void; - /** - * @param {TestInterfaces.TestVariable} testVariable - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting TestInterfaces.TestVariable - */ - createTestVariable(testVariable: TestInterfaces.TestVariable, project: string, onResult: (err: any, statusCode: number, Variable: TestInterfaces.TestVariable) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} testVariableId - * @param onResult callback function - */ - deleteTestVariable(project: string, testVariableId: number, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} testVariableId - * @param onResult callback function with the resulting TestInterfaces.TestVariable - */ - getTestVariable(project: string, testVariableId: number, onResult: (err: any, statusCode: number, Variable: TestInterfaces.TestVariable) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} skip - * @param {number} top - * @param onResult callback function with the resulting TestInterfaces.TestVariable[] - */ - getTestVariables(project: string, skip: number, top: number, onResult: (err: any, statusCode: number, Variables: TestInterfaces.TestVariable[]) => void): void; - /** - * @param {TestInterfaces.TestVariable} testVariable - * @param {string} project - Project ID or project name - * @param {number} testVariableId - * @param onResult callback function with the resulting TestInterfaces.TestVariable - */ - updateTestVariable(testVariable: TestInterfaces.TestVariable, project: string, testVariableId: number, onResult: (err: any, statusCode: number, Variable: TestInterfaces.TestVariable) => void): void; - } - export class QTestApi extends basem.QClientApiBase implements IQTestApi { - api: TestApi; - constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); - /** - * @param {TestInterfaces.TestAttachmentRequestModel} attachmentRequestModel - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} testCaseResultId - */ - createTestResultAttachment(attachmentRequestModel: TestInterfaces.TestAttachmentRequestModel, project: string, runId: number, testCaseResultId: number): Promise; - /** - * Returns a test result attachment - * - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} testCaseResultId - * @param {number} attachmentId - */ - getTestResultAttachmentContent(project: string, runId: number, testCaseResultId: number, attachmentId: number): Promise; - /** - * Returns a test result attachment - * - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} testCaseResultId - * @param {number} attachmentId - */ - getTestResultAttachmentZip(project: string, runId: number, testCaseResultId: number, attachmentId: number): Promise; - /** - * @param {TestInterfaces.TestAttachmentRequestModel} attachmentRequestModel - * @param {string} project - Project ID or project name - * @param {number} runId - */ - createTestRunAttachment(attachmentRequestModel: TestInterfaces.TestAttachmentRequestModel, project: string, runId: number): Promise; - /** - * Returns a test run attachment - * - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} attachmentId - */ - getTestRunAttachmentContent(project: string, runId: number, attachmentId: number): Promise; - /** - * Returns a test run attachment - * - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} attachmentId - */ - getTestRunAttachmentZip(project: string, runId: number, attachmentId: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} testCaseResultId - */ - getBugsLinkedToTestResult(project: string, runId: number, testCaseResultId: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {number} flags - */ - getBuildCodeCoverage(project: string, buildId: number, flags: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {number} deltaBuildId - */ - getCodeCoverageSummary(project: string, buildId: number, deltaBuildId?: number): Promise; - /** - * http://(tfsserver):8080/tfs/DefaultCollection/_apis/test/CodeCoverage?buildId=10 Request: Json of code coverage summary - * - * @param {TestInterfaces.CodeCoverageData} coverageData - * @param {string} project - Project ID or project name - * @param {number} buildId - */ - updateCodeCoverageSummary(coverageData: TestInterfaces.CodeCoverageData, project: string, buildId: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} flags - */ - getTestRunCodeCoverage(project: string, runId: number, flags: number): Promise; - /** - * @param {TestInterfaces.TestConfiguration} testConfiguration - * @param {string} project - Project ID or project name - */ - createTestConfiguration(testConfiguration: TestInterfaces.TestConfiguration, project: string): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} testConfigurationId - */ - deleteTestConfiguration(project: string, testConfigurationId: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} testConfigurationId - */ - getTestConfigurationById(project: string, testConfigurationId: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} skip - * @param {number} top - * @param {boolean} includeAllProperties - */ - getTestConfigurations(project: string, skip?: number, top?: number, includeAllProperties?: boolean): Promise; - /** - * @param {TestInterfaces.TestConfiguration} testConfiguration - * @param {string} project - Project ID or project name - * @param {number} testConfigurationId - */ - updateTestConfiguration(testConfiguration: TestInterfaces.TestConfiguration, project: string, testConfigurationId: number): Promise; - /** - * @param {TestInterfaces.CustomTestFieldDefinition[]} newFields - * @param {string} project - Project ID or project name - */ - addCustomFields(newFields: TestInterfaces.CustomTestFieldDefinition[], project: string): Promise; - /** - * @param {string} project - Project ID or project name - * @param {TestInterfaces.CustomTestFieldScope} scopeFilter - */ - queryCustomFields(project: string, scopeFilter: TestInterfaces.CustomTestFieldScope): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} runId - */ - getTestRunLogs(project: string, runId: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} operationId - * @param {boolean} includeDetails - */ - getPlanCloneInformation(project: string, operationId: number, includeDetails?: boolean): Promise; - /** - * @param {TestInterfaces.PlanUpdateModel} testPlan - * @param {string} project - Project ID or project name - */ - createTestPlan(testPlan: TestInterfaces.PlanUpdateModel, project: string): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} planId - */ - deleteTestPlan(project: string, planId: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} planId - */ - getPlanById(project: string, planId: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {string} owner - * @param {number} skip - * @param {number} top - * @param {boolean} includePlanDetails - * @param {boolean} filterActivePlans - */ - getPlans(project: string, owner?: string, skip?: number, top?: number, includePlanDetails?: boolean, filterActivePlans?: boolean): Promise; - /** - * @param {TestInterfaces.PlanUpdateModel} planUpdateModel - * @param {string} project - Project ID or project name - * @param {number} planId - */ - updateTestPlan(planUpdateModel: TestInterfaces.PlanUpdateModel, project: string, planId: number): Promise; - /** - * @param {TestInterfaces.TestPlanCloneRequest} cloneRequestBody - * @param {string} project - Project ID or project name - * @param {number} sourcePlanId - */ - cloneTestPlan(cloneRequestBody: TestInterfaces.TestPlanCloneRequest, project: string, sourcePlanId: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} planId - * @param {number} suiteId - * @param {number} pointIds - * @param {string} witFields - */ - getPoint(project: string, planId: number, suiteId: number, pointIds: number, witFields?: string): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} planId - * @param {number} suiteId - * @param {string} witFields - * @param {string} configurationId - * @param {string} testCaseId - * @param {string} testPointIds - * @param {boolean} includePointDetails - * @param {number} skip - * @param {number} top - */ - getPoints(project: string, planId: number, suiteId: number, witFields?: string, configurationId?: string, testCaseId?: string, testPointIds?: string, includePointDetails?: boolean, skip?: number, top?: number): Promise; - /** - * @param {TestInterfaces.PointUpdateModel} pointUpdateModel - * @param {string} project - Project ID or project name - * @param {number} planId - * @param {number} suiteId - * @param {string} pointIds - */ - updateTestPoints(pointUpdateModel: TestInterfaces.PointUpdateModel, project: string, planId: number, suiteId: number, pointIds: string): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} testRunId - * @param {number} testResultId - * @param {number} recentDays - */ - queryTestResultRecentBugs(project: string, testRunId: number, testResultId: number, recentDays?: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {string} publishContext - * @param {string} groupBy - * @param {string} filter - */ - getTestResultDetailsForBuild(project: string, buildId: number, publishContext?: string, groupBy?: string, filter?: string): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} releaseId - * @param {number} releaseEnvId - * @param {string} publishContext - * @param {string} groupBy - * @param {string} filter - */ - getTestResultDetailsForRelease(project: string, releaseId: number, releaseEnvId: number, publishContext?: string, groupBy?: string, filter?: string): Promise; - /** - * @param {TestInterfaces.ResultRetentionSettings} retentionSettings - * @param {string} project - Project ID or project name - */ - createResultRetentionSettings(retentionSettings: TestInterfaces.ResultRetentionSettings, project: string): Promise; - /** - * @param {string} project - Project ID or project name - */ - deleteResultRetentionSettings(project: string): Promise; - /** - * @param {string} project - Project ID or project name - */ - getResultRetentionSettings(project: string): Promise; - /** - * @param {TestInterfaces.ResultRetentionSettings} retentionSettings - * @param {string} project - Project ID or project name - */ - updateResultRetentionSettings(retentionSettings: TestInterfaces.ResultRetentionSettings, project: string): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} testCaseResultId - * @param {number} iterationId - * @param {boolean} includeActionResults - */ - getTestIteration(project: string, runId: number, testCaseResultId: number, iterationId: number, includeActionResults?: boolean): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} testCaseResultId - * @param {boolean} includeActionResults - */ - getTestIterations(project: string, runId: number, testCaseResultId: number, includeActionResults?: boolean): Promise; - /** - * @param {TestInterfaces.TestResultCreateModel[]} resultCreateModels - * @param {string} project - Project ID or project name - * @param {number} runId - */ - addTestResultsToTestRun(resultCreateModels: TestInterfaces.TestResultCreateModel[], project: string, runId: number): Promise; - /** - * @param {TestInterfaces.TestCaseResultUpdateModel} resultUpdateModel - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number[]} resultIds - */ - bulkUpdateTestResults(resultUpdateModel: TestInterfaces.TestCaseResultUpdateModel, project: string, runId: number, resultIds: number[]): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} testCaseResultId - * @param {boolean} includeIterationDetails - * @param {boolean} includeAssociatedBugs - */ - getTestCaseResultById(project: string, runId: number, testCaseResultId: number, includeIterationDetails: boolean, includeAssociatedBugs?: boolean): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {boolean} includeIterationDetails - */ - getTestCaseResults(project: string, runId: number, includeIterationDetails: boolean): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} testCaseResultId - * @param {TestInterfaces.ResultDetails} detailsToInclude - */ - getTestResultById(project: string, runId: number, testCaseResultId: number, detailsToInclude?: TestInterfaces.ResultDetails): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {TestInterfaces.ResultDetails} detailsToInclude - * @param {number} skip - * @param {number} top - */ - getTestResults(project: string, runId: number, detailsToInclude?: TestInterfaces.ResultDetails, skip?: number, top?: number): Promise; - /** - * @param {TestInterfaces.TestCaseResultUpdateModel[]} resultUpdateModels - * @param {string} project - Project ID or project name - * @param {number} runId - */ - updateTestResults(resultUpdateModels: TestInterfaces.TestCaseResultUpdateModel[], project: string, runId: number): Promise; - /** - * @param {TestInterfaces.TestCaseResultIdentifier[]} ids - * @param {string} project - Project ID or project name - * @param {string[]} fields - */ - getTestResultsByIds(ids: TestInterfaces.TestCaseResultIdentifier[], project: string, fields: string[]): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} testCaseResultId - * @param {number} iterationId - * @param {string} actionPath - */ - getActionResults(project: string, runId: number, testCaseResultId: number, iterationId: number, actionPath?: string): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} testCaseResultId - * @param {number} iterationId - * @param {string} paramName - */ - getResultParameters(project: string, runId: number, testCaseResultId: number, iterationId: number, paramName?: string): Promise; - /** - * @param {TestInterfaces.QueryModel} query - * @param {string} project - Project ID or project name - * @param {boolean} includeResultDetails - * @param {boolean} includeIterationDetails - * @param {number} skip - * @param {number} top - */ - getTestResultsByQuery(query: TestInterfaces.QueryModel, project: string, includeResultDetails?: boolean, includeIterationDetails?: boolean, skip?: number, top?: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {string} publishContext - * @param {boolean} includeFailureDetails - * @param {TestInterfaces.BuildReference} buildToCompare - */ - queryTestResultsReportForBuild(project: string, buildId: number, publishContext?: string, includeFailureDetails?: boolean, buildToCompare?: TestInterfaces.BuildReference): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} releaseId - * @param {number} releaseEnvId - * @param {string} publishContext - * @param {boolean} includeFailureDetails - * @param {TestInterfaces.ReleaseReference} releaseToCompare - */ - queryTestResultsReportForRelease(project: string, releaseId: number, releaseEnvId: number, publishContext?: string, includeFailureDetails?: boolean, releaseToCompare?: TestInterfaces.ReleaseReference): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} testRunId - * @param {number} testResultId - * @param {number} historyDays - * @param {number} top - */ - queryTestResultTrendReport(project: string, testRunId: number, testResultId: number, historyDays?: number, top?: number): Promise; - /** - * @param {TestInterfaces.TestResultTrendFilter} filter - * @param {string} project - Project ID or project name - */ - queryResultTrendForBuild(filter: TestInterfaces.TestResultTrendFilter, project: string): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} runId - */ - getTestRunStatistics(project: string, runId: number): Promise; - /** - * @param {TestInterfaces.QueryModel} query - * @param {string} project - Project ID or project name - * @param {boolean} includeRunDetails - * @param {number} skip - * @param {number} top - */ - getTestRunsByQuery(query: TestInterfaces.QueryModel, project: string, includeRunDetails?: boolean, skip?: number, top?: number): Promise; - /** - * @param {TestInterfaces.RunCreateModel} testRun - * @param {string} project - Project ID or project name - */ - createTestRun(testRun: TestInterfaces.RunCreateModel, project: string): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} runId - */ - deleteTestRun(project: string, runId: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} runId - */ - getTestRunById(project: string, runId: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {string} buildUri - * @param {string} owner - * @param {string} tmiRunId - * @param {number} planId - * @param {boolean} includeRunDetails - * @param {boolean} automated - * @param {number} skip - * @param {number} top - */ - getTestRuns(project: string, buildUri?: string, owner?: string, tmiRunId?: string, planId?: number, includeRunDetails?: boolean, automated?: boolean, skip?: number, top?: number): Promise; - /** - * @param {TestInterfaces.RunUpdateModel} runUpdateModel - * @param {string} project - Project ID or project name - * @param {number} runId - */ - updateTestRun(runUpdateModel: TestInterfaces.RunUpdateModel, project: string, runId: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} operationId - * @param {boolean} includeDetails - */ - getSuiteCloneInformation(project: string, operationId: number, includeDetails?: boolean): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} planId - * @param {number} suiteId - * @param {string} testCaseIds - */ - addTestCasesToSuite(project: string, planId: number, suiteId: number, testCaseIds: string): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} planId - * @param {number} suiteId - * @param {number} testCaseIds - */ - getTestCaseById(project: string, planId: number, suiteId: number, testCaseIds: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} planId - * @param {number} suiteId - */ - getTestCases(project: string, planId: number, suiteId: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} planId - * @param {number} suiteId - * @param {string} testCaseIds - */ - removeTestCasesFromSuiteUrl(project: string, planId: number, suiteId: number, testCaseIds: string): Promise; - /** - * @param {TestInterfaces.SuiteCreateModel} testSuite - * @param {string} project - Project ID or project name - * @param {number} planId - * @param {number} suiteId - */ - createTestSuite(testSuite: TestInterfaces.SuiteCreateModel, project: string, planId: number, suiteId: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} planId - * @param {number} suiteId - */ - deleteTestSuite(project: string, planId: number, suiteId: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} planId - * @param {number} suiteId - * @param {boolean} includeChildSuites - */ - getTestSuiteById(project: string, planId: number, suiteId: number, includeChildSuites?: boolean): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} planId - * @param {boolean} includeSuites - * @param {number} skip - * @param {number} top - * @param {boolean} asTreeView - */ - getTestSuitesForPlan(project: string, planId: number, includeSuites?: boolean, skip?: number, top?: number, asTreeView?: boolean): Promise; - /** - * @param {TestInterfaces.SuiteUpdateModel} suiteUpdateModel - * @param {string} project - Project ID or project name - * @param {number} planId - * @param {number} suiteId - */ - updateTestSuite(suiteUpdateModel: TestInterfaces.SuiteUpdateModel, project: string, planId: number, suiteId: number): Promise; - /** - * @param {TestInterfaces.TestSuiteCloneRequest} cloneRequestBody - * @param {string} project - Project ID or project name - * @param {number} sourceSuiteId - * @param {number} planId - */ - cloneTestSuite(cloneRequestBody: TestInterfaces.TestSuiteCloneRequest, project: string, sourceSuiteId: number, planId: number): Promise; - /** - * @param {number} testCaseId - */ - getSuitesByTestCaseId(testCaseId: number): Promise; - /** - * @param {TestInterfaces.TestSettings} testSettings - * @param {string} project - Project ID or project name - */ - createTestSettings(testSettings: TestInterfaces.TestSettings, project: string): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} testSettingsId - */ - deleteTestSettings(project: string, testSettingsId: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} testSettingsId - */ - getTestSettingsById(project: string, testSettingsId: number): Promise; - /** - * @param {TestInterfaces.TestVariable} testVariable - * @param {string} project - Project ID or project name - */ - createTestVariable(testVariable: TestInterfaces.TestVariable, project: string): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} testVariableId - */ - deleteTestVariable(project: string, testVariableId: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} testVariableId - */ - getTestVariable(project: string, testVariableId: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} skip - * @param {number} top - */ - getTestVariables(project: string, skip?: number, top?: number): Promise; - /** - * @param {TestInterfaces.TestVariable} testVariable - * @param {string} project - Project ID or project name - * @param {number} testVariableId - */ - updateTestVariable(testVariable: TestInterfaces.TestVariable, project: string, testVariableId: number): Promise; - } - -} -declare module 'vso-node-api/interfaces/TfvcInterfaces' { - import TfsCoreInterfaces = require('vso-node-api/interfaces/CoreInterfaces'); - import VSSInterfaces = require('vso-node-api/interfaces/common/VSSInterfaces'); - export interface AssociatedWorkItem { - assignedTo: string; - id: number; - state: string; - title: string; - /** - * REST url - */ - url: string; - webUrl: string; - workItemType: string; - } - export interface Change { - changeType: VersionControlChangeType; - item: T; - newContent: ItemContent; - sourceServerItem: string; - url: string; - } - export interface ChangeCountDictionary { - } - export interface ChangeList { - allChangesIncluded: boolean; - changeCounts: { - [key: number]: number; - }; - changes: Change[]; - comment: string; - commentTruncated: boolean; - creationDate: Date; - notes: CheckinNote[]; - owner: string; - ownerDisplayName: string; - ownerId: string; - sortDate: Date; - version: string; - } - /** - * Criteria used in a search for change lists - */ - export interface ChangeListSearchCriteria { - /** - * If provided, a version descriptor to compare against base - */ - compareVersion: string; - /** - * If true, don't include delete history entries - */ - excludeDeletes: boolean; - /** - * Whether or not to follow renames for the given item being queried - */ - followRenames: boolean; - /** - * If provided, only include history entries created after this date (string) - */ - fromDate: string; - /** - * If provided, a version descriptor for the earliest change list to include - */ - fromVersion: string; - /** - * Path of item to search under - */ - itemPath: string; - /** - * Version of the items to search - */ - itemVersion: string; - /** - * Number of results to skip (used when clicking more...) - */ - skip: number; - /** - * If provided, only include history entries created before this date (string) - */ - toDate: string; - /** - * If provided, the maximum number of history entries to return - */ - top: number; - /** - * If provided, a version descriptor for the latest change list to include - */ - toVersion: string; - /** - * Alias or display name of user who made the changes - */ - user: string; - } - export interface CheckinNote { - name: string; - value: string; - } - export interface FileContentMetadata { - contentType: string; - encoding: number; - extension: string; - fileName: string; - isBinary: boolean; - isImage: boolean; - vsLink: string; - } - export interface GitBaseVersionDescriptor extends GitVersionDescriptor { - /** - * Version string identifier (name of tag/branch, SHA1 of commit) - */ - baseVersion: string; - /** - * Version options - Specify additional modifiers to version (e.g Previous) - */ - baseVersionOptions: GitVersionOptions; - /** - * Version type (branch, tag, or commit). Determines how Id is interpreted - */ - baseVersionType: GitVersionType; - } - export interface GitBlobRef { - _links: any; - /** - * SHA1 hash of git object - */ - objectId: string; - /** - * Size of blob content (in bytes) - */ - size: number; - url: string; - } - export interface GitBranchStats { - aheadCount: number; - behindCount: number; - commit: GitCommitRef; - isBaseVersion: boolean; - name: string; - } - export interface GitChange extends Change { - } - export interface GitCommit extends GitCommitRef { - push: GitPushRef; - treeId: string; - } - export interface GitCommitChanges { - changeCounts: ChangeCountDictionary; - changes: GitChange[]; - } - export interface GitCommitDiffs { - aheadCount: number; - allChangesIncluded: boolean; - baseCommit: string; - behindCount: number; - changeCounts: { - [key: number]: number; - }; - changes: GitChange[]; - commonCommit: string; - targetCommit: string; - } - export interface GitCommitRef { - _links: any; - author: GitUserDate; - changeCounts: ChangeCountDictionary; - changes: GitChange[]; - comment: string; - commentTruncated: boolean; - commitId: string; - committer: GitUserDate; - parents: string[]; - remoteUrl: string; - url: string; - } - export interface GitCommitToCreate { - baseRef: GitRef; - comment: string; - pathActions: GitPathAction[]; - } - export interface GitDeletedRepository { - createdDate: Date; - deletedBy: VSSInterfaces.IdentityRef; - deletedDate: Date; - id: string; - name: string; - project: TfsCoreInterfaces.TeamProjectReference; - } - export interface GitHistoryQueryResults extends HistoryQueryResults { - /** - * Seed commit used for querying history. Used for skip feature. - */ - startingCommitId: string; - unpopulatedCount: number; - unprocessedCount: number; - } - export interface GitItem extends ItemModel { - /** - * SHA1 of commit item was fetched at - */ - commitId: string; - /** - * Type of object (Commit, Tree, Blob, Tag, ...) - */ - gitObjectType: GitObjectType; - /** - * Shallow ref to commit that last changed this item Only populated if latestProcessedChange is requested May not be accurate if latest change is not yet cached - */ - latestProcessedChange: GitCommitRef; - /** - * Git object id - */ - objectId: string; - /** - * Git object id - */ - originalObjectId: string; - } - export interface GitItemDescriptor { - /** - * Path to item - */ - path: string; - /** - * Specifies whether to include children (OneLevel), all descendants (Full), or None - */ - recursionLevel: VersionControlRecursionType; - /** - * Version string (interpretation based on VersionType defined in subclass - */ - version: string; - /** - * Version modifiers (e.g. previous) - */ - versionOptions: GitVersionOptions; - /** - * How to interpret version (branch,tag,commit) - */ - versionType: GitVersionType; - } - export interface GitItemRequestData { - /** - * Whether to include metadata for all items - */ - includeContentMetadata: boolean; - /** - * Whether to include the _links field on the shallow references - */ - includeLinks: boolean; - /** - * Collection of items to fetch, including path, version, and recursion level - */ - itemDescriptors: GitItemDescriptor[]; - /** - * Whether to include shallow ref to commit that last changed each item - */ - latestProcessedChange: boolean; - } - export interface GitLimitedRefCriteria { - _links: any; - refExactMatches: string[]; - refNamespaces: string[]; - url: string; - } - export enum GitObjectType { - Bad = 0, - Commit = 1, - Tree = 2, - Blob = 3, - Tag = 4, - Ext2 = 5, - OfsDelta = 6, - RefDelta = 7, - } - export interface GitPathAction { - action: GitPathActions; - base64Content: string; - path: string; - rawTextContent: string; - targetPath: string; - } - export enum GitPathActions { - None = 0, - Edit = 1, - Delete = 2, - Add = 3, - Rename = 4, - } - export enum GitPermissionScope { - Project = 0, - Repository = 1, - Branch = 2, - } - export interface GitPullRequest { - _links: any; - closedDate: Date; - codeReviewId: number; - commits: GitCommitRef[]; - completionOptions: GitPullRequestCompletionOptions; - completionQueueTime: Date; - createdBy: VSSInterfaces.IdentityRef; - creationDate: Date; - description: string; - lastMergeCommit: GitCommitRef; - lastMergeSourceCommit: GitCommitRef; - lastMergeTargetCommit: GitCommitRef; - mergeId: string; - mergeStatus: PullRequestAsyncStatus; - pullRequestId: number; - remoteUrl: string; - repository: GitRepository; - reviewers: IdentityRefWithVote[]; - sourceRefName: string; - status: PullRequestStatus; - targetRefName: string; - title: string; - upgraded: boolean; - url: string; - workItemRefs: VSSInterfaces.ResourceRef[]; - } - export interface GitPullRequestCompletionOptions { - deleteSourceBranch: boolean; - mergeCommitMessage: string; - squashMerge: boolean; - } - export interface GitPullRequestSearchCriteria { - creatorId: string; - /** - * Whether to include the _links field on the shallow references - */ - includeLinks: boolean; - repositoryId: string; - reviewerId: string; - sourceRefName: string; - status: PullRequestStatus; - targetRefName: string; - } - export interface GitPush extends GitPushRef { - commits: GitCommitRef[]; - refUpdates: GitRefUpdate[]; - repository: GitRepository; - } - export interface GitPushEventData { - afterId: string; - beforeId: string; - branch: string; - commits: GitCommit[]; - repository: GitRepository; - } - export interface GitPushRef { - _links: any; - date: Date; - pushCorrelationId: string; - pushedBy: VSSInterfaces.IdentityRef; - pushId: number; - url: string; - } - export interface GitPushSearchCriteria { - fromDate: Date; - /** - * Whether to include the _links field on the shallow references - */ - includeLinks: boolean; - includeRefUpdates: boolean; - pusherId: string; - refName: string; - toDate: Date; - } - export interface GitQueryCommitsCriteria { - /** - * Number of entries to skip - */ - $skip: number; - /** - * Maximum number of entries to retrieve - */ - $top: number; - /** - * Alias or display name of the author - */ - author: string; - /** - * If provided, the earliest commit in the graph to search - */ - compareVersion: GitVersionDescriptor; - /** - * If true, don't include delete history entries - */ - excludeDeletes: boolean; - /** - * If provided, a lower bound for filtering commits alphabetically - */ - fromCommitId: string; - /** - * If provided, only include history entries created after this date (string) - */ - fromDate: string; - /** - * If provided, specifies the exact commit ids of the commits to fetch. May not be combined with other parameters. - */ - ids: string[]; - /** - * Whether to include the _links field on the shallow references - */ - includeLinks: boolean; - /** - * Path of item to search under - */ - itemPath: string; - /** - * If provided, identifies the commit or branch to search - */ - itemVersion: GitVersionDescriptor; - /** - * If provided, an upper bound for filtering commits alphabetically - */ - toCommitId: string; - /** - * If provided, only include history entries created before this date (string) - */ - toDate: string; - /** - * Alias or display name of the committer - */ - user: string; - } - export interface GitRef { - _links: any; - isLockedBy: VSSInterfaces.IdentityRef; - name: string; - objectId: string; - statuses: GitStatus[]; - url: string; - } - export interface GitRefUpdate { - name: string; - newObjectId: string; - oldObjectId: string; - repositoryId: string; - } - export enum GitRefUpdateMode { - /** - * Indicates the Git protocol model where any refs that can be updated will be updated, but any failures will not prevent other updates from succeeding. - */ - BestEffort = 0, - /** - * Indicates that all ref updates must succeed or none will succeed. All ref updates will be atomically written. If any failure is encountered, previously successful updates will be rolled back and the entire operation will fail. - */ - AllOrNone = 1, - } - export interface GitRefUpdateResult { - /** - * Custom message for the result object For instance, Reason for failing. - */ - customMessage: string; - /** - * Ref name - */ - name: string; - /** - * New object ID - */ - newObjectId: string; - /** - * Old object ID - */ - oldObjectId: string; - /** - * Name of the plugin that rejected the updated. - */ - rejectedBy: string; - /** - * Repository ID - */ - repositoryId: string; - /** - * True if the ref update succeeded, false otherwise - */ - success: boolean; - /** - * Status of the update from the TFS server. - */ - updateStatus: GitRefUpdateStatus; - } - export interface GitRefUpdateResultSet { - countFailed: number; - countSucceeded: number; - pushCorrelationId: string; - pushIds: { - [key: string]: number; - }; - pushTime: Date; - results: GitRefUpdateResult[]; - } - export enum GitRefUpdateStatus { - /** - * Indicates that the ref update request was completed successfully. - */ - Succeeded = 0, - /** - * Indicates that the ref update request could not be completed because part of the graph would be disconnected by this change, and the caller does not have ForcePush permission on the repository. - */ - ForcePushRequired = 1, - /** - * Indicates that the ref update request could not be completed because the old object ID presented in the request was not the object ID of the ref when the database attempted the update. The most likely scenario is that the caller lost a race to update the ref. - */ - StaleOldObjectId = 2, - /** - * Indicates that the ref update request could not be completed because the ref name presented in the request was not valid. - */ - InvalidRefName = 3, - /** - * The request was not processed - */ - Unprocessed = 4, - /** - * The ref update request could not be completed because the new object ID for the ref could not be resolved to a commit object (potentially through any number of tags) - */ - UnresolvableToCommit = 5, - /** - * The ref update request could not be completed because the user lacks write permissions required to write this ref - */ - WritePermissionRequired = 6, - /** - * The ref update request could not be completed because the user lacks note creation permissions required to write this note - */ - ManageNotePermissionRequired = 7, - /** - * The ref update request could not be completed because the user lacks the permission to create a branch - */ - CreateBranchPermissionRequired = 8, - /** - * The ref update request could not be completed because the user lacks the permission to create a tag - */ - CreateTagPermissionRequired = 9, - /** - * The ref update could not be completed because it was rejected by the plugin. - */ - RejectedByPlugin = 10, - /** - * The ref update could not be completed because the ref is locked by another user. - */ - Locked = 11, - /** - * The ref update could not be completed because, in case-insensitive mode, the ref name conflicts with an existing, differently-cased ref name. - */ - RefNameConflict = 12, - /** - * The ref update could not be completed because it was rejected by policy. - */ - RejectedByPolicy = 13, - /** - * Indicates that the ref update request was completed successfully, but the ref doesn't actually exist so no changes were made. This should only happen during deletes. - */ - SucceededNonExistentRef = 14, - /** - * Indicates that the ref update request was completed successfully, but the passed-in ref was corrupt - as in, the old object ID was bad. This should only happen during deletes. - */ - SucceededCorruptRef = 15, - } - export interface GitRepository { - _links: any; - defaultBranch: string; - id: string; - name: string; - project: TfsCoreInterfaces.TeamProjectReference; - remoteUrl: string; - url: string; - } - export enum GitRepositoryPermissions { - None = 0, - Administer = 1, - GenericRead = 2, - GenericContribute = 4, - ForcePush = 8, - CreateBranch = 16, - CreateTag = 32, - ManageNote = 64, - PolicyExempt = 128, - /** - * This defines the set of bits that are valid for the git permission space. When reading or writing git permissions, these are the only bits paid attention too. - */ - All = 255, - BranchLevelPermissions = 141, - } - export interface GitStatus { - _links: any; - context: GitStatusContext; - createdBy: VSSInterfaces.IdentityRef; - creationDate: Date; - description: string; - state: GitStatusState; - targetUrl: string; - } - export interface GitStatusContext { - genre: string; - name: string; - } - export enum GitStatusState { - NotSet = 0, - Pending = 1, - Succeeded = 2, - Failed = 3, - Error = 4, - } - export interface GitSuggestion { - properties: { - [key: string]: any; - }; - type: string; - } - export interface GitTargetVersionDescriptor extends GitVersionDescriptor { - /** - * Version string identifier (name of tag/branch, SHA1 of commit) - */ - targetVersion: string; - /** - * Version options - Specify additional modifiers to version (e.g Previous) - */ - targetVersionOptions: GitVersionOptions; - /** - * Version type (branch, tag, or commit). Determines how Id is interpreted - */ - targetVersionType: GitVersionType; - } - export interface GitTreeEntryRef { - /** - * Blob or tree - */ - gitObjectType: GitObjectType; - /** - * Mode represented as octal string - */ - mode: string; - /** - * SHA1 hash of git object - */ - objectId: string; - /** - * Path relative to parent tree object - */ - relativePath: string; - /** - * Size of content - */ - size: number; - /** - * url to retrieve tree or blob - */ - url: string; - } - export interface GitTreeRef { - _links: any; - /** - * SHA1 hash of git object - */ - objectId: string; - /** - * Sum of sizes of all children - */ - size: number; - /** - * Blobs and trees under this tree - */ - treeEntries: GitTreeEntryRef[]; - /** - * Url to tree - */ - url: string; - } - export interface GitUserDate { - date: Date; - email: string; - name: string; - } - export interface GitVersionDescriptor { - /** - * Version string identifier (name of tag/branch/index, SHA1 of commit) - */ - version: string; - /** - * Version options - Specify additional modifiers to version (e.g Previous) - */ - versionOptions: GitVersionOptions; - /** - * Version type (branch, tag, commit, or index). Determines how Id is interpreted - */ - versionType: GitVersionType; - } - export enum GitVersionOptions { - /** - * Not specified - */ - None = 0, - /** - * Commit that changed item prior to the current version - */ - PreviousChange = 1, - /** - * First parent of commit (HEAD^) - */ - FirstParent = 2, - } - export enum GitVersionType { - /** - * Interpret the version as a branch name - */ - Branch = 0, - /** - * Interpret the version as a tag name - */ - Tag = 1, - /** - * Interpret the version as a commit ID (SHA1) - */ - Commit = 2, - /** - * Interpret the version as an index name - */ - Index = 3, - } - export interface HistoryEntry { - /** - * The Change list (changeset/commit/shelveset) for this point in history - */ - changeList: ChangeList; - /** - * The change made to the item from this change list (only relevant for File history, not folders) - */ - itemChangeType: VersionControlChangeType; - /** - * The path of the item at this point in history (only relevant for File history, not folders) - */ - serverItem: string; - } - export interface HistoryQueryResults { - /** - * True if there are more results available to fetch (we're returning the max # of items requested) A more RESTy solution would be to include a Link header - */ - moreResultsAvailable: boolean; - /** - * The history entries (results) from this query - */ - results: HistoryEntry[]; - } - export interface IdentityRefWithVote extends VSSInterfaces.IdentityRef { - isRequired: boolean; - reviewerUrl: string; - vote: number; - votedFor: IdentityRefWithVote[]; - } - export interface IncludedGitCommit { - commitId: string; - commitTime: Date; - parentCommitIds: string[]; - repositoryId: string; - } - export interface ItemContent { - content: string; - contentType: ItemContentType; - } - export enum ItemContentType { - RawText = 0, - Base64Encoded = 1, - } - /** - * Optional details to include when returning an item model - */ - export interface ItemDetailsOptions { - /** - * If true, include metadata about the file type - */ - includeContentMetadata: boolean; - /** - * Specifies whether to include children (OneLevel), all descendants (Full) or None for folder items - */ - recursionLevel: VersionControlRecursionType; - } - export interface ItemModel { - _links: any; - contentMetadata: FileContentMetadata; - isFolder: boolean; - isSymLink: boolean; - path: string; - url: string; - } - export enum PullRequestAsyncStatus { - NotSet = 0, - Queued = 1, - Conflicts = 2, - Succeeded = 3, - RejectedByPolicy = 4, - Failure = 5, - } - export enum PullRequestStatus { - NotSet = 0, - Active = 1, - Abandoned = 2, - Completed = 3, - All = 4, - } - export interface TfvcBranch extends TfvcBranchRef { - children: TfvcBranch[]; - mappings: TfvcBranchMapping[]; - parent: TfvcShallowBranchRef; - relatedBranches: TfvcShallowBranchRef[]; - } - export interface TfvcBranchMapping { - depth: string; - serverItem: string; - type: string; - } - export interface TfvcBranchRef extends TfvcShallowBranchRef { - _links: any; - createdDate: Date; - description: string; - isDeleted: boolean; - owner: VSSInterfaces.IdentityRef; - url: string; - } - export interface TfvcChange extends Change { - /** - * List of merge sources in case of rename or branch creation. - */ - mergeSources: TfvcMergeSource[]; - /** - * Version at which a (shelved) change was pended against - */ - pendingVersion: number; - } - export interface TfvcChangeset extends TfvcChangesetRef { - accountId: string; - changes: TfvcChange[]; - checkinNotes: CheckinNote[]; - collectionId: string; - hasMoreChanges: boolean; - policyOverride: TfvcPolicyOverrideInfo; - teamProjectIds: string[]; - workItems: AssociatedWorkItem[]; - } - export interface TfvcChangesetRef { - _links: any; - author: VSSInterfaces.IdentityRef; - changesetId: number; - checkedInBy: VSSInterfaces.IdentityRef; - comment: string; - commentTruncated: boolean; - createdDate: Date; - url: string; - } - /** - * Criteria used in a search for change lists - */ - export interface TfvcChangesetSearchCriteria { - /** - * Alias or display name of user who made the changes - */ - author: string; - /** - * Whether or not to follow renames for the given item being queried - */ - followRenames: boolean; - /** - * If provided, only include changesets created after this date (string) Think of a better name for this. - */ - fromDate: string; - /** - * If provided, only include changesets after this changesetID - */ - fromId: number; - /** - * Whether to include the _links field on the shallow references - */ - includeLinks: boolean; - /** - * Path of item to search under - */ - path: string; - /** - * If provided, only include changesets created before this date (string) Think of a better name for this. - */ - toDate: string; - /** - * If provided, a version descriptor for the latest change list to include - */ - toId: number; - } - export interface TfvcChangesetsRequestData { - changesetIds: number[]; - commentLength: number; - /** - * Whether to include the _links field on the shallow references - */ - includeLinks: boolean; - } - export interface TfvcCheckinEventData { - changeset: TfvcChangeset; - project: TfsCoreInterfaces.TeamProjectReference; - } - export interface TfvcHistoryEntry extends HistoryEntry { - /** - * The encoding of the item at this point in history (only relevant for File history, not folders) - */ - encoding: number; - /** - * The file id of the item at this point in history (only relevant for File history, not folders) - */ - fileId: number; - } - export interface TfvcItem extends ItemModel { - changeDate: Date; - deletionId: number; - /** - * MD5 hash as a base 64 string, applies to files only. - */ - hashValue: string; - isBranch: boolean; - isPendingChange: boolean; - /** - * The size of the file, if applicable. - */ - size: number; - version: number; - } - /** - * Item path and Version descriptor properties - */ - export interface TfvcItemDescriptor { - path: string; - recursionLevel: VersionControlRecursionType; - version: string; - versionOption: TfvcVersionOption; - versionType: TfvcVersionType; - } - export interface TfvcItemRequestData { - /** - * If true, include metadata about the file type - */ - includeContentMetadata: boolean; - /** - * Whether to include the _links field on the shallow references - */ - includeLinks: boolean; - itemDescriptors: TfvcItemDescriptor[]; - } - export interface TfvcLabel extends TfvcLabelRef { - items: TfvcItem[]; - } - export interface TfvcLabelRef { - _links: any; - description: string; - id: number; - labelScope: string; - modifiedDate: Date; - name: string; - owner: VSSInterfaces.IdentityRef; - url: string; - } - export interface TfvcLabelRequestData { - /** - * Whether to include the _links field on the shallow references - */ - includeLinks: boolean; - itemLabelFilter: string; - labelScope: string; - maxItemCount: number; - name: string; - owner: string; - } - export interface TfvcMergeSource { - /** - * Indicates if this a rename source. If false, it is a merge source. - */ - isRename: boolean; - /** - * The server item of the merge source - */ - serverItem: string; - /** - * Start of the version range - */ - versionFrom: number; - /** - * End of the version range - */ - versionTo: number; - } - export interface TfvcPolicyFailureInfo { - message: string; - policyName: string; - } - export interface TfvcPolicyOverrideInfo { - comment: string; - policyFailures: TfvcPolicyFailureInfo[]; - } - export interface TfvcShallowBranchRef { - path: string; - } - export interface TfvcShelveset extends TfvcShelvesetRef { - changes: TfvcChange[]; - notes: CheckinNote[]; - policyOverride: TfvcPolicyOverrideInfo; - workItems: AssociatedWorkItem[]; - } - export interface TfvcShelvesetRef { - _links: any; - comment: string; - commentTruncated: boolean; - createdDate: Date; - id: string; - name: string; - owner: VSSInterfaces.IdentityRef; - url: string; - } - export interface TfvcShelvesetRequestData { - /** - * Whether to include policyOverride and notes - */ - includeDetails: boolean; - /** - * Whether to include the _links field on the shallow references - */ - includeLinks: boolean; - /** - * Whether to include workItems - */ - includeWorkItems: boolean; - /** - * Max number of changes to include - */ - maxChangeCount: number; - /** - * Max length of comment - */ - maxCommentLength: number; - /** - * Shelveset's name - */ - name: string; - /** - * Owner's ID. Could be a name or a guid. - */ - owner: string; - } - export interface TfvcVersionDescriptor { - version: string; - versionOption: TfvcVersionOption; - versionType: TfvcVersionType; - } - export enum TfvcVersionOption { - None = 0, - Previous = 1, - UseRename = 2, - } - export enum TfvcVersionType { - None = 0, - Changeset = 1, - Shelveset = 2, - Change = 3, - Date = 4, - Latest = 5, - Tip = 6, - MergeSource = 7, - } - export interface UpdateRefsRequest { - refUpdateRequests: GitRefUpdate[]; - updateMode: GitRefUpdateMode; - } - export enum VersionControlChangeType { - None = 0, - Add = 1, - Edit = 2, - Encoding = 4, - Rename = 8, - Delete = 16, - Undelete = 32, - Branch = 64, - Merge = 128, - Lock = 256, - Rollback = 512, - SourceRename = 1024, - TargetRename = 2048, - Property = 4096, - All = 8191, - } - export interface VersionControlProjectInfo { - defaultSourceControlType: TfsCoreInterfaces.SourceControlTypes; - project: TfsCoreInterfaces.TeamProjectReference; - supportsGit: boolean; - supportsTFVC: boolean; - } - export enum VersionControlRecursionType { - /** - * Only return the specified item. - */ - None = 0, - /** - * Return the specified item and its direct children. - */ - OneLevel = 1, - /** - * Return the specified item and its direct children, as well as recursive chains of nested child folders that only contain a single folder. - */ - OneLevelPlusNestedEmptyFolders = 4, - /** - * Return specified item and all descendants - */ - Full = 120, - } - export var TypeInfo: { - AssociatedWorkItem: { - fields: any; - }; - Change: { - fields: any; - }; - ChangeCountDictionary: { - fields: any; - }; - ChangeList: { - fields: any; - }; - ChangeListSearchCriteria: { - fields: any; - }; - CheckinNote: { - fields: any; - }; - FileContentMetadata: { - fields: any; - }; - GitBaseVersionDescriptor: { - fields: any; - }; - GitBlobRef: { - fields: any; - }; - GitBranchStats: { - fields: any; - }; - GitChange: { - fields: any; - }; - GitCommit: { - fields: any; - }; - GitCommitChanges: { - fields: any; - }; - GitCommitDiffs: { - fields: any; - }; - GitCommitRef: { - fields: any; - }; - GitCommitToCreate: { - fields: any; - }; - GitDeletedRepository: { - fields: any; - }; - GitHistoryQueryResults: { - fields: any; - }; - GitItem: { - fields: any; - }; - GitItemDescriptor: { - fields: any; - }; - GitItemRequestData: { - fields: any; - }; - GitLimitedRefCriteria: { - fields: any; - }; - GitObjectType: { - enumValues: { - "bad": number; - "commit": number; - "tree": number; - "blob": number; - "tag": number; - "ext2": number; - "ofsDelta": number; - "refDelta": number; - }; - }; - GitPathAction: { - fields: any; - }; - GitPathActions: { - enumValues: { - "none": number; - "edit": number; - "delete": number; - "add": number; - "rename": number; - }; - }; - GitPermissionScope: { - enumValues: { - "project": number; - "repository": number; - "branch": number; - }; - }; - GitPullRequest: { - fields: any; - }; - GitPullRequestCompletionOptions: { - fields: any; - }; - GitPullRequestSearchCriteria: { - fields: any; - }; - GitPush: { - fields: any; - }; - GitPushEventData: { - fields: any; - }; - GitPushRef: { - fields: any; - }; - GitPushSearchCriteria: { - fields: any; - }; - GitQueryCommitsCriteria: { - fields: any; - }; - GitRef: { - fields: any; - }; - GitRefUpdate: { - fields: any; - }; - GitRefUpdateMode: { - enumValues: { - "bestEffort": number; - "allOrNone": number; - }; - }; - GitRefUpdateResult: { - fields: any; - }; - GitRefUpdateResultSet: { - fields: any; - }; - GitRefUpdateStatus: { - enumValues: { - "succeeded": number; - "forcePushRequired": number; - "staleOldObjectId": number; - "invalidRefName": number; - "unprocessed": number; - "unresolvableToCommit": number; - "writePermissionRequired": number; - "manageNotePermissionRequired": number; - "createBranchPermissionRequired": number; - "createTagPermissionRequired": number; - "rejectedByPlugin": number; - "locked": number; - "refNameConflict": number; - "rejectedByPolicy": number; - "succeededNonExistentRef": number; - "succeededCorruptRef": number; - }; - }; - GitRepository: { - fields: any; - }; - GitRepositoryPermissions: { - enumValues: { - "none": number; - "administer": number; - "genericRead": number; - "genericContribute": number; - "forcePush": number; - "createBranch": number; - "createTag": number; - "manageNote": number; - "policyExempt": number; - "all": number; - "branchLevelPermissions": number; - }; - }; - GitStatus: { - fields: any; - }; - GitStatusContext: { - fields: any; - }; - GitStatusState: { - enumValues: { - "notSet": number; - "pending": number; - "succeeded": number; - "failed": number; - "error": number; - }; - }; - GitSuggestion: { - fields: any; - }; - GitTargetVersionDescriptor: { - fields: any; - }; - GitTreeEntryRef: { - fields: any; - }; - GitTreeRef: { - fields: any; - }; - GitUserDate: { - fields: any; - }; - GitVersionDescriptor: { - fields: any; - }; - GitVersionOptions: { - enumValues: { - "none": number; - "previousChange": number; - "firstParent": number; - }; - }; - GitVersionType: { - enumValues: { - "branch": number; - "tag": number; - "commit": number; - "index": number; - }; - }; - HistoryEntry: { - fields: any; - }; - HistoryQueryResults: { - fields: any; - }; - IdentityRefWithVote: { - fields: any; - }; - IncludedGitCommit: { - fields: any; - }; - ItemContent: { - fields: any; - }; - ItemContentType: { - enumValues: { - "rawText": number; - "base64Encoded": number; - }; - }; - ItemDetailsOptions: { - fields: any; - }; - ItemModel: { - fields: any; - }; - PullRequestAsyncStatus: { - enumValues: { - "notSet": number; - "queued": number; - "conflicts": number; - "succeeded": number; - "rejectedByPolicy": number; - "failure": number; - }; - }; - PullRequestStatus: { - enumValues: { - "notSet": number; - "active": number; - "abandoned": number; - "completed": number; - "all": number; - }; - }; - TfvcBranch: { - fields: any; - }; - TfvcBranchMapping: { - fields: any; - }; - TfvcBranchRef: { - fields: any; - }; - TfvcChange: { - fields: any; - }; - TfvcChangeset: { - fields: any; - }; - TfvcChangesetRef: { - fields: any; - }; - TfvcChangesetSearchCriteria: { - fields: any; - }; - TfvcChangesetsRequestData: { - fields: any; - }; - TfvcCheckinEventData: { - fields: any; - }; - TfvcHistoryEntry: { - fields: any; - }; - TfvcItem: { - fields: any; - }; - TfvcItemDescriptor: { - fields: any; - }; - TfvcItemRequestData: { - fields: any; - }; - TfvcLabel: { - fields: any; - }; - TfvcLabelRef: { - fields: any; - }; - TfvcLabelRequestData: { - fields: any; - }; - TfvcMergeSource: { - fields: any; - }; - TfvcPolicyFailureInfo: { - fields: any; - }; - TfvcPolicyOverrideInfo: { - fields: any; - }; - TfvcShallowBranchRef: { - fields: any; - }; - TfvcShelveset: { - fields: any; - }; - TfvcShelvesetRef: { - fields: any; - }; - TfvcShelvesetRequestData: { - fields: any; - }; - TfvcVersionDescriptor: { - fields: any; - }; - TfvcVersionOption: { - enumValues: { - "none": number; - "previous": number; - "useRename": number; - }; - }; - TfvcVersionType: { - enumValues: { - "none": number; - "changeset": number; - "shelveset": number; - "change": number; - "date": number; - "latest": number; - "tip": number; - "mergeSource": number; - }; - }; - UpdateRefsRequest: { - fields: any; - }; - VersionControlChangeType: { - enumValues: { - "none": number; - "add": number; - "edit": number; - "encoding": number; - "rename": number; - "delete": number; - "undelete": number; - "branch": number; - "merge": number; - "lock": number; - "rollback": number; - "sourceRename": number; - "targetRename": number; - "property": number; - "all": number; - }; - }; - VersionControlProjectInfo: { - fields: any; - }; - VersionControlRecursionType: { - enumValues: { - "none": number; - "oneLevel": number; - "oneLevelPlusNestedEmptyFolders": number; - "full": number; - }; - }; - }; - -} -declare module 'vso-node-api/TfvcApi' { - - - import Q = require('q'); - import basem = require('vso-node-api/ClientApiBases'); - import VsoBaseInterfaces = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); - import TfvcInterfaces = require('vso-node-api/interfaces/TfvcInterfaces'); - export interface ITfvcApi extends basem.ClientApiBase { - getBranch(path: string, project: string, includeParent: boolean, includeChildren: boolean, onResult: (err: any, statusCode: number, Branche: TfvcInterfaces.TfvcBranch) => void): void; - getBranches(project: string, includeParent: boolean, includeChildren: boolean, includeDeleted: boolean, includeLinks: boolean, onResult: (err: any, statusCode: number, Branches: TfvcInterfaces.TfvcBranch[]) => void): void; - getBranchRefs(scopePath: string, project: string, includeDeleted: boolean, includeLinks: boolean, onResult: (err: any, statusCode: number, Branches: TfvcInterfaces.TfvcBranchRef[]) => void): void; - getChangesetChanges(id: number, skip: number, top: number, onResult: (err: any, statusCode: number, ChangesetChanges: TfvcInterfaces.TfvcChange[]) => void): void; - createChangeset(changeset: TfvcInterfaces.TfvcChangeset, project: string, onResult: (err: any, statusCode: number, Changeset: TfvcInterfaces.TfvcChangesetRef) => void): void; - getChangeset(id: number, project: string, maxChangeCount: number, includeDetails: boolean, includeWorkItems: boolean, maxCommentLength: number, includeSourceRename: boolean, skip: number, top: number, orderby: string, searchCriteria: TfvcInterfaces.TfvcChangesetSearchCriteria, onResult: (err: any, statusCode: number, Changeset: TfvcInterfaces.TfvcChangeset) => void): void; - getChangesets(project: string, maxChangeCount: number, includeDetails: boolean, includeWorkItems: boolean, maxCommentLength: number, includeSourceRename: boolean, skip: number, top: number, orderby: string, searchCriteria: TfvcInterfaces.TfvcChangesetSearchCriteria, onResult: (err: any, statusCode: number, Changesets: TfvcInterfaces.TfvcChangesetRef[]) => void): void; - getBatchedChangesets(changesetsRequestData: TfvcInterfaces.TfvcChangesetsRequestData, onResult: (err: any, statusCode: number, ChangesetsBatch: TfvcInterfaces.TfvcChangesetRef[]) => void): void; - getChangesetWorkItems(id: number, onResult: (err: any, statusCode: number, ChangesetWorkItems: TfvcInterfaces.AssociatedWorkItem[]) => void): void; - getItemsBatch(itemRequestData: TfvcInterfaces.TfvcItemRequestData, project: string, onResult: (err: any, statusCode: number, ItemBatch: TfvcInterfaces.TfvcItem[][]) => void): void; - getItemsBatchZip(itemRequestData: TfvcInterfaces.TfvcItemRequestData, project: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - getItem(path: string, project: string, fileName: string, download: boolean, scopePath: string, recursionLevel: TfvcInterfaces.VersionControlRecursionType, versionDescriptor: TfvcInterfaces.TfvcVersionDescriptor, onResult: (err: any, statusCode: number, Item: TfvcInterfaces.TfvcItem) => void): void; - getItemContent(path: string, project: string, fileName: string, download: boolean, scopePath: string, recursionLevel: TfvcInterfaces.VersionControlRecursionType, versionDescriptor: TfvcInterfaces.TfvcVersionDescriptor, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - getItems(project: string, scopePath: string, recursionLevel: TfvcInterfaces.VersionControlRecursionType, includeLinks: boolean, versionDescriptor: TfvcInterfaces.TfvcVersionDescriptor, onResult: (err: any, statusCode: number, Items: TfvcInterfaces.TfvcItem[]) => void): void; - getItemText(path: string, project: string, fileName: string, download: boolean, scopePath: string, recursionLevel: TfvcInterfaces.VersionControlRecursionType, versionDescriptor: TfvcInterfaces.TfvcVersionDescriptor, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - getItemZip(path: string, project: string, fileName: string, download: boolean, scopePath: string, recursionLevel: TfvcInterfaces.VersionControlRecursionType, versionDescriptor: TfvcInterfaces.TfvcVersionDescriptor, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - getLabelItems(labelId: string, top: number, skip: number, onResult: (err: any, statusCode: number, LabelItems: TfvcInterfaces.TfvcItem[]) => void): void; - getLabel(labelId: string, requestData: TfvcInterfaces.TfvcLabelRequestData, project: string, onResult: (err: any, statusCode: number, Label: TfvcInterfaces.TfvcLabel) => void): void; - getLabels(requestData: TfvcInterfaces.TfvcLabelRequestData, project: string, top: number, skip: number, onResult: (err: any, statusCode: number, Labels: TfvcInterfaces.TfvcLabelRef[]) => void): void; - getShelvesetChanges(shelvesetId: string, top: number, skip: number, onResult: (err: any, statusCode: number, ShelvesetChanges: TfvcInterfaces.TfvcChange[]) => void): void; - getShelveset(shelvesetId: string, requestData: TfvcInterfaces.TfvcShelvesetRequestData, onResult: (err: any, statusCode: number, Shelveset: TfvcInterfaces.TfvcShelveset) => void): void; - getShelvesets(requestData: TfvcInterfaces.TfvcShelvesetRequestData, top: number, skip: number, onResult: (err: any, statusCode: number, Shelvesets: TfvcInterfaces.TfvcShelvesetRef[]) => void): void; - getShelvesetWorkItems(shelvesetId: string, onResult: (err: any, statusCode: number, ShelvesetWorkItems: TfvcInterfaces.AssociatedWorkItem[]) => void): void; - } - export interface IQTfvcApi extends basem.QClientApiBase { - getBranch(path: string, project?: string, includeParent?: boolean, includeChildren?: boolean): Promise; - getBranches(project?: string, includeParent?: boolean, includeChildren?: boolean, includeDeleted?: boolean, includeLinks?: boolean): Promise; - getBranchRefs(scopePath: string, project?: string, includeDeleted?: boolean, includeLinks?: boolean): Promise; - getChangesetChanges(id?: number, skip?: number, top?: number): Promise; - createChangeset(changeset: TfvcInterfaces.TfvcChangeset, project?: string): Promise; - getChangeset(id: number, project?: string, maxChangeCount?: number, includeDetails?: boolean, includeWorkItems?: boolean, maxCommentLength?: number, includeSourceRename?: boolean, skip?: number, top?: number, orderby?: string, searchCriteria?: TfvcInterfaces.TfvcChangesetSearchCriteria): Promise; - getChangesets(project?: string, maxChangeCount?: number, includeDetails?: boolean, includeWorkItems?: boolean, maxCommentLength?: number, includeSourceRename?: boolean, skip?: number, top?: number, orderby?: string, searchCriteria?: TfvcInterfaces.TfvcChangesetSearchCriteria): Promise; - getBatchedChangesets(changesetsRequestData: TfvcInterfaces.TfvcChangesetsRequestData): Promise; - getChangesetWorkItems(id?: number): Promise; - getItemsBatch(itemRequestData: TfvcInterfaces.TfvcItemRequestData, project?: string): Promise; - getItemsBatchZip(itemRequestData: TfvcInterfaces.TfvcItemRequestData, project?: string): Promise; - getItem(path: string, project?: string, fileName?: string, download?: boolean, scopePath?: string, recursionLevel?: TfvcInterfaces.VersionControlRecursionType, versionDescriptor?: TfvcInterfaces.TfvcVersionDescriptor): Promise; - getItemContent(path: string, project?: string, fileName?: string, download?: boolean, scopePath?: string, recursionLevel?: TfvcInterfaces.VersionControlRecursionType, versionDescriptor?: TfvcInterfaces.TfvcVersionDescriptor): Promise; - getItems(project?: string, scopePath?: string, recursionLevel?: TfvcInterfaces.VersionControlRecursionType, includeLinks?: boolean, versionDescriptor?: TfvcInterfaces.TfvcVersionDescriptor): Promise; - getItemText(path: string, project?: string, fileName?: string, download?: boolean, scopePath?: string, recursionLevel?: TfvcInterfaces.VersionControlRecursionType, versionDescriptor?: TfvcInterfaces.TfvcVersionDescriptor): Promise; - getItemZip(path: string, project?: string, fileName?: string, download?: boolean, scopePath?: string, recursionLevel?: TfvcInterfaces.VersionControlRecursionType, versionDescriptor?: TfvcInterfaces.TfvcVersionDescriptor): Promise; - getLabelItems(labelId: string, top?: number, skip?: number): Promise; - getLabel(labelId: string, requestData: TfvcInterfaces.TfvcLabelRequestData, project?: string): Promise; - getLabels(requestData: TfvcInterfaces.TfvcLabelRequestData, project?: string, top?: number, skip?: number): Promise; - getShelvesetChanges(shelvesetId: string, top?: number, skip?: number): Promise; - getShelveset(shelvesetId: string, requestData: TfvcInterfaces.TfvcShelvesetRequestData): Promise; - getShelvesets(requestData: TfvcInterfaces.TfvcShelvesetRequestData, top?: number, skip?: number): Promise; - getShelvesetWorkItems(shelvesetId: string): Promise; - } - export class TfvcApi extends basem.ClientApiBase implements ITfvcApi { - constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); - /** - * Get a single branch hierarchy at the given path with parents or children (if specified) - * - * @param {string} path - * @param {string} project - Project ID or project name - * @param {boolean} includeParent - * @param {boolean} includeChildren - * @param onResult callback function with the resulting TfvcInterfaces.TfvcBranch - */ - getBranch(path: string, project: string, includeParent: boolean, includeChildren: boolean, onResult: (err: any, statusCode: number, Branche: TfvcInterfaces.TfvcBranch) => void): void; - /** - * Get a collection of branch roots -- first-level children, branches with no parents - * - * @param {string} project - Project ID or project name - * @param {boolean} includeParent - * @param {boolean} includeChildren - * @param {boolean} includeDeleted - * @param {boolean} includeLinks - * @param onResult callback function with the resulting TfvcInterfaces.TfvcBranch[] - */ - getBranches(project: string, includeParent: boolean, includeChildren: boolean, includeDeleted: boolean, includeLinks: boolean, onResult: (err: any, statusCode: number, Branches: TfvcInterfaces.TfvcBranch[]) => void): void; - /** - * Get branch hierarchies below the specified scopePath - * - * @param {string} scopePath - * @param {string} project - Project ID or project name - * @param {boolean} includeDeleted - * @param {boolean} includeLinks - * @param onResult callback function with the resulting TfvcInterfaces.TfvcBranchRef[] - */ - getBranchRefs(scopePath: string, project: string, includeDeleted: boolean, includeLinks: boolean, onResult: (err: any, statusCode: number, Branches: TfvcInterfaces.TfvcBranchRef[]) => void): void; - /** - * Retrieve Tfvc changes for a given changeset - * - * @param {number} id - * @param {number} skip - * @param {number} top - * @param onResult callback function with the resulting TfvcInterfaces.TfvcChange[] - */ - getChangesetChanges(id: number, skip: number, top: number, onResult: (err: any, statusCode: number, ChangesetChanges: TfvcInterfaces.TfvcChange[]) => void): void; - /** - * @param {TfvcInterfaces.TfvcChangeset} changeset - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting TfvcInterfaces.TfvcChangesetRef - */ - createChangeset(changeset: TfvcInterfaces.TfvcChangeset, project: string, onResult: (err: any, statusCode: number, Changeset: TfvcInterfaces.TfvcChangesetRef) => void): void; - /** - * Retrieve a Tfvc Changeset - * - * @param {number} id - * @param {string} project - Project ID or project name - * @param {number} maxChangeCount - * @param {boolean} includeDetails - * @param {boolean} includeWorkItems - * @param {number} maxCommentLength - * @param {boolean} includeSourceRename - * @param {number} skip - * @param {number} top - * @param {string} orderby - * @param {TfvcInterfaces.TfvcChangesetSearchCriteria} searchCriteria - * @param onResult callback function with the resulting TfvcInterfaces.TfvcChangeset - */ - getChangeset(id: number, project: string, maxChangeCount: number, includeDetails: boolean, includeWorkItems: boolean, maxCommentLength: number, includeSourceRename: boolean, skip: number, top: number, orderby: string, searchCriteria: TfvcInterfaces.TfvcChangesetSearchCriteria, onResult: (err: any, statusCode: number, Changeset: TfvcInterfaces.TfvcChangeset) => void): void; - /** - * Retrieve Tfvc changesets - * - * @param {string} project - Project ID or project name - * @param {number} maxChangeCount - * @param {boolean} includeDetails - * @param {boolean} includeWorkItems - * @param {number} maxCommentLength - * @param {boolean} includeSourceRename - * @param {number} skip - * @param {number} top - * @param {string} orderby - * @param {TfvcInterfaces.TfvcChangesetSearchCriteria} searchCriteria - * @param onResult callback function with the resulting TfvcInterfaces.TfvcChangesetRef[] - */ - getChangesets(project: string, maxChangeCount: number, includeDetails: boolean, includeWorkItems: boolean, maxCommentLength: number, includeSourceRename: boolean, skip: number, top: number, orderby: string, searchCriteria: TfvcInterfaces.TfvcChangesetSearchCriteria, onResult: (err: any, statusCode: number, Changesets: TfvcInterfaces.TfvcChangesetRef[]) => void): void; - /** - * @param {TfvcInterfaces.TfvcChangesetsRequestData} changesetsRequestData - * @param onResult callback function with the resulting TfvcInterfaces.TfvcChangesetRef[] - */ - getBatchedChangesets(changesetsRequestData: TfvcInterfaces.TfvcChangesetsRequestData, onResult: (err: any, statusCode: number, ChangesetsBatch: TfvcInterfaces.TfvcChangesetRef[]) => void): void; - /** - * @param {number} id - * @param onResult callback function with the resulting TfvcInterfaces.AssociatedWorkItem[] - */ - getChangesetWorkItems(id: number, onResult: (err: any, statusCode: number, ChangesetWorkItems: TfvcInterfaces.AssociatedWorkItem[]) => void): void; - /** - * Post for retrieving a set of items given a list of paths or a long path. Allows for specifying the recursionLevel and version descriptors for each path. - * - * @param {TfvcInterfaces.TfvcItemRequestData} itemRequestData - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting TfvcInterfaces.TfvcItem[][] - */ - getItemsBatch(itemRequestData: TfvcInterfaces.TfvcItemRequestData, project: string, onResult: (err: any, statusCode: number, ItemBatch: TfvcInterfaces.TfvcItem[][]) => void): void; - /** - * Post for retrieving a set of items given a list of paths or a long path. Allows for specifying the recursionLevel and version descriptors for each path. - * - * @param {TfvcInterfaces.TfvcItemRequestData} itemRequestData - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting ArrayBuffer - */ - getItemsBatchZip(itemRequestData: TfvcInterfaces.TfvcItemRequestData, project: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * Get Item Metadata and/or Content. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. - * - * @param {string} path - * @param {string} project - Project ID or project name - * @param {string} fileName - * @param {boolean} download - * @param {string} scopePath - * @param {TfvcInterfaces.VersionControlRecursionType} recursionLevel - * @param {TfvcInterfaces.TfvcVersionDescriptor} versionDescriptor - * @param onResult callback function with the resulting TfvcInterfaces.TfvcItem - */ - getItem(path: string, project: string, fileName: string, download: boolean, scopePath: string, recursionLevel: TfvcInterfaces.VersionControlRecursionType, versionDescriptor: TfvcInterfaces.TfvcVersionDescriptor, onResult: (err: any, statusCode: number, Item: TfvcInterfaces.TfvcItem) => void): void; - /** - * Get Item Metadata and/or Content. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. - * - * @param {string} path - * @param {string} project - Project ID or project name - * @param {string} fileName - * @param {boolean} download - * @param {string} scopePath - * @param {TfvcInterfaces.VersionControlRecursionType} recursionLevel - * @param {TfvcInterfaces.TfvcVersionDescriptor} versionDescriptor - * @param onResult callback function with the resulting ArrayBuffer - */ - getItemContent(path: string, project: string, fileName: string, download: boolean, scopePath: string, recursionLevel: TfvcInterfaces.VersionControlRecursionType, versionDescriptor: TfvcInterfaces.TfvcVersionDescriptor, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * Get a list of Tfvc items - * - * @param {string} project - Project ID or project name - * @param {string} scopePath - * @param {TfvcInterfaces.VersionControlRecursionType} recursionLevel - * @param {boolean} includeLinks - * @param {TfvcInterfaces.TfvcVersionDescriptor} versionDescriptor - * @param onResult callback function with the resulting TfvcInterfaces.TfvcItem[] - */ - getItems(project: string, scopePath: string, recursionLevel: TfvcInterfaces.VersionControlRecursionType, includeLinks: boolean, versionDescriptor: TfvcInterfaces.TfvcVersionDescriptor, onResult: (err: any, statusCode: number, Items: TfvcInterfaces.TfvcItem[]) => void): void; - /** - * Get Item Metadata and/or Content. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. - * - * @param {string} path - * @param {string} project - Project ID or project name - * @param {string} fileName - * @param {boolean} download - * @param {string} scopePath - * @param {TfvcInterfaces.VersionControlRecursionType} recursionLevel - * @param {TfvcInterfaces.TfvcVersionDescriptor} versionDescriptor - * @param onResult callback function with the resulting string - */ - getItemText(path: string, project: string, fileName: string, download: boolean, scopePath: string, recursionLevel: TfvcInterfaces.VersionControlRecursionType, versionDescriptor: TfvcInterfaces.TfvcVersionDescriptor, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * Get Item Metadata and/or Content. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. - * - * @param {string} path - * @param {string} project - Project ID or project name - * @param {string} fileName - * @param {boolean} download - * @param {string} scopePath - * @param {TfvcInterfaces.VersionControlRecursionType} recursionLevel - * @param {TfvcInterfaces.TfvcVersionDescriptor} versionDescriptor - * @param onResult callback function with the resulting ArrayBuffer - */ - getItemZip(path: string, project: string, fileName: string, download: boolean, scopePath: string, recursionLevel: TfvcInterfaces.VersionControlRecursionType, versionDescriptor: TfvcInterfaces.TfvcVersionDescriptor, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * Get items under a label. - * - * @param {string} labelId - Unique identifier of label - * @param {number} top - Max number of items to return - * @param {number} skip - Number of items to skip - * @param onResult callback function with the resulting TfvcInterfaces.TfvcItem[] - */ - getLabelItems(labelId: string, top: number, skip: number, onResult: (err: any, statusCode: number, LabelItems: TfvcInterfaces.TfvcItem[]) => void): void; - /** - * Get a single deep label. - * - * @param {string} labelId - Unique identifier of label - * @param {TfvcInterfaces.TfvcLabelRequestData} requestData - maxItemCount - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting TfvcInterfaces.TfvcLabel - */ - getLabel(labelId: string, requestData: TfvcInterfaces.TfvcLabelRequestData, project: string, onResult: (err: any, statusCode: number, Label: TfvcInterfaces.TfvcLabel) => void): void; - /** - * Get a collection of shallow label references. - * - * @param {TfvcInterfaces.TfvcLabelRequestData} requestData - labelScope, name, owner, and itemLabelFilter - * @param {string} project - Project ID or project name - * @param {number} top - Max number of labels to return - * @param {number} skip - Number of labels to skip - * @param onResult callback function with the resulting TfvcInterfaces.TfvcLabelRef[] - */ - getLabels(requestData: TfvcInterfaces.TfvcLabelRequestData, project: string, top: number, skip: number, onResult: (err: any, statusCode: number, Labels: TfvcInterfaces.TfvcLabelRef[]) => void): void; - /** - * Get changes included in a shelveset. - * - * @param {string} shelvesetId - Shelveset's unique ID - * @param {number} top - Max number of changes to return - * @param {number} skip - Number of changes to skip - * @param onResult callback function with the resulting TfvcInterfaces.TfvcChange[] - */ - getShelvesetChanges(shelvesetId: string, top: number, skip: number, onResult: (err: any, statusCode: number, ShelvesetChanges: TfvcInterfaces.TfvcChange[]) => void): void; - /** - * Get a single deep shelveset. - * - * @param {string} shelvesetId - Shelveset's unique ID - * @param {TfvcInterfaces.TfvcShelvesetRequestData} requestData - includeDetails, includeWorkItems, maxChangeCount, and maxCommentLength - * @param onResult callback function with the resulting TfvcInterfaces.TfvcShelveset - */ - getShelveset(shelvesetId: string, requestData: TfvcInterfaces.TfvcShelvesetRequestData, onResult: (err: any, statusCode: number, Shelveset: TfvcInterfaces.TfvcShelveset) => void): void; - /** - * Return a collection of shallow shelveset references. - * - * @param {TfvcInterfaces.TfvcShelvesetRequestData} requestData - name, owner, and maxCommentLength - * @param {number} top - Max number of shelvesets to return - * @param {number} skip - Number of shelvesets to skip - * @param onResult callback function with the resulting TfvcInterfaces.TfvcShelvesetRef[] - */ - getShelvesets(requestData: TfvcInterfaces.TfvcShelvesetRequestData, top: number, skip: number, onResult: (err: any, statusCode: number, Shelvesets: TfvcInterfaces.TfvcShelvesetRef[]) => void): void; - /** - * Get work items associated with a shelveset. - * - * @param {string} shelvesetId - Shelveset's unique ID - * @param onResult callback function with the resulting TfvcInterfaces.AssociatedWorkItem[] - */ - getShelvesetWorkItems(shelvesetId: string, onResult: (err: any, statusCode: number, ShelvesetWorkItems: TfvcInterfaces.AssociatedWorkItem[]) => void): void; - } - export class QTfvcApi extends basem.QClientApiBase implements IQTfvcApi { - api: TfvcApi; - constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); - /** - * Get a single branch hierarchy at the given path with parents or children (if specified) - * - * @param {string} path - * @param {string} project - Project ID or project name - * @param {boolean} includeParent - * @param {boolean} includeChildren - */ - getBranch(path: string, project?: string, includeParent?: boolean, includeChildren?: boolean): Promise; - /** - * Get a collection of branch roots -- first-level children, branches with no parents - * - * @param {string} project - Project ID or project name - * @param {boolean} includeParent - * @param {boolean} includeChildren - * @param {boolean} includeDeleted - * @param {boolean} includeLinks - */ - getBranches(project?: string, includeParent?: boolean, includeChildren?: boolean, includeDeleted?: boolean, includeLinks?: boolean): Promise; - /** - * Get branch hierarchies below the specified scopePath - * - * @param {string} scopePath - * @param {string} project - Project ID or project name - * @param {boolean} includeDeleted - * @param {boolean} includeLinks - */ - getBranchRefs(scopePath: string, project?: string, includeDeleted?: boolean, includeLinks?: boolean): Promise; - /** - * Retrieve Tfvc changes for a given changeset - * - * @param {number} id - * @param {number} skip - * @param {number} top - */ - getChangesetChanges(id?: number, skip?: number, top?: number): Promise; - /** - * @param {TfvcInterfaces.TfvcChangeset} changeset - * @param {string} project - Project ID or project name - */ - createChangeset(changeset: TfvcInterfaces.TfvcChangeset, project?: string): Promise; - /** - * Retrieve a Tfvc Changeset - * - * @param {number} id - * @param {string} project - Project ID or project name - * @param {number} maxChangeCount - * @param {boolean} includeDetails - * @param {boolean} includeWorkItems - * @param {number} maxCommentLength - * @param {boolean} includeSourceRename - * @param {number} skip - * @param {number} top - * @param {string} orderby - * @param {TfvcInterfaces.TfvcChangesetSearchCriteria} searchCriteria - */ - getChangeset(id: number, project?: string, maxChangeCount?: number, includeDetails?: boolean, includeWorkItems?: boolean, maxCommentLength?: number, includeSourceRename?: boolean, skip?: number, top?: number, orderby?: string, searchCriteria?: TfvcInterfaces.TfvcChangesetSearchCriteria): Promise; - /** - * Retrieve Tfvc changesets - * - * @param {string} project - Project ID or project name - * @param {number} maxChangeCount - * @param {boolean} includeDetails - * @param {boolean} includeWorkItems - * @param {number} maxCommentLength - * @param {boolean} includeSourceRename - * @param {number} skip - * @param {number} top - * @param {string} orderby - * @param {TfvcInterfaces.TfvcChangesetSearchCriteria} searchCriteria - */ - getChangesets(project?: string, maxChangeCount?: number, includeDetails?: boolean, includeWorkItems?: boolean, maxCommentLength?: number, includeSourceRename?: boolean, skip?: number, top?: number, orderby?: string, searchCriteria?: TfvcInterfaces.TfvcChangesetSearchCriteria): Promise; - /** - * @param {TfvcInterfaces.TfvcChangesetsRequestData} changesetsRequestData - */ - getBatchedChangesets(changesetsRequestData: TfvcInterfaces.TfvcChangesetsRequestData): Promise; - /** - * @param {number} id - */ - getChangesetWorkItems(id?: number): Promise; - /** - * Post for retrieving a set of items given a list of paths or a long path. Allows for specifying the recursionLevel and version descriptors for each path. - * - * @param {TfvcInterfaces.TfvcItemRequestData} itemRequestData - * @param {string} project - Project ID or project name - */ - getItemsBatch(itemRequestData: TfvcInterfaces.TfvcItemRequestData, project?: string): Promise; - /** - * Post for retrieving a set of items given a list of paths or a long path. Allows for specifying the recursionLevel and version descriptors for each path. - * - * @param {TfvcInterfaces.TfvcItemRequestData} itemRequestData - * @param {string} project - Project ID or project name - */ - getItemsBatchZip(itemRequestData: TfvcInterfaces.TfvcItemRequestData, project?: string): Promise; - /** - * Get Item Metadata and/or Content. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. - * - * @param {string} path - * @param {string} project - Project ID or project name - * @param {string} fileName - * @param {boolean} download - * @param {string} scopePath - * @param {TfvcInterfaces.VersionControlRecursionType} recursionLevel - * @param {TfvcInterfaces.TfvcVersionDescriptor} versionDescriptor - */ - getItem(path: string, project?: string, fileName?: string, download?: boolean, scopePath?: string, recursionLevel?: TfvcInterfaces.VersionControlRecursionType, versionDescriptor?: TfvcInterfaces.TfvcVersionDescriptor): Promise; - /** - * Get Item Metadata and/or Content. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. - * - * @param {string} path - * @param {string} project - Project ID or project name - * @param {string} fileName - * @param {boolean} download - * @param {string} scopePath - * @param {TfvcInterfaces.VersionControlRecursionType} recursionLevel - * @param {TfvcInterfaces.TfvcVersionDescriptor} versionDescriptor - */ - getItemContent(path: string, project?: string, fileName?: string, download?: boolean, scopePath?: string, recursionLevel?: TfvcInterfaces.VersionControlRecursionType, versionDescriptor?: TfvcInterfaces.TfvcVersionDescriptor): Promise; - /** - * Get a list of Tfvc items - * - * @param {string} project - Project ID or project name - * @param {string} scopePath - * @param {TfvcInterfaces.VersionControlRecursionType} recursionLevel - * @param {boolean} includeLinks - * @param {TfvcInterfaces.TfvcVersionDescriptor} versionDescriptor - */ - getItems(project?: string, scopePath?: string, recursionLevel?: TfvcInterfaces.VersionControlRecursionType, includeLinks?: boolean, versionDescriptor?: TfvcInterfaces.TfvcVersionDescriptor): Promise; - /** - * Get Item Metadata and/or Content. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. - * - * @param {string} path - * @param {string} project - Project ID or project name - * @param {string} fileName - * @param {boolean} download - * @param {string} scopePath - * @param {TfvcInterfaces.VersionControlRecursionType} recursionLevel - * @param {TfvcInterfaces.TfvcVersionDescriptor} versionDescriptor - */ - getItemText(path: string, project?: string, fileName?: string, download?: boolean, scopePath?: string, recursionLevel?: TfvcInterfaces.VersionControlRecursionType, versionDescriptor?: TfvcInterfaces.TfvcVersionDescriptor): Promise; - /** - * Get Item Metadata and/or Content. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. - * - * @param {string} path - * @param {string} project - Project ID or project name - * @param {string} fileName - * @param {boolean} download - * @param {string} scopePath - * @param {TfvcInterfaces.VersionControlRecursionType} recursionLevel - * @param {TfvcInterfaces.TfvcVersionDescriptor} versionDescriptor - */ - getItemZip(path: string, project?: string, fileName?: string, download?: boolean, scopePath?: string, recursionLevel?: TfvcInterfaces.VersionControlRecursionType, versionDescriptor?: TfvcInterfaces.TfvcVersionDescriptor): Promise; - /** - * Get items under a label. - * - * @param {string} labelId - Unique identifier of label - * @param {number} top - Max number of items to return - * @param {number} skip - Number of items to skip - */ - getLabelItems(labelId: string, top?: number, skip?: number): Promise; - /** - * Get a single deep label. - * - * @param {string} labelId - Unique identifier of label - * @param {TfvcInterfaces.TfvcLabelRequestData} requestData - maxItemCount - * @param {string} project - Project ID or project name - */ - getLabel(labelId: string, requestData: TfvcInterfaces.TfvcLabelRequestData, project?: string): Promise; - /** - * Get a collection of shallow label references. - * - * @param {TfvcInterfaces.TfvcLabelRequestData} requestData - labelScope, name, owner, and itemLabelFilter - * @param {string} project - Project ID or project name - * @param {number} top - Max number of labels to return - * @param {number} skip - Number of labels to skip - */ - getLabels(requestData: TfvcInterfaces.TfvcLabelRequestData, project?: string, top?: number, skip?: number): Promise; - /** - * Get changes included in a shelveset. - * - * @param {string} shelvesetId - Shelveset's unique ID - * @param {number} top - Max number of changes to return - * @param {number} skip - Number of changes to skip - */ - getShelvesetChanges(shelvesetId: string, top?: number, skip?: number): Promise; - /** - * Get a single deep shelveset. - * - * @param {string} shelvesetId - Shelveset's unique ID - * @param {TfvcInterfaces.TfvcShelvesetRequestData} requestData - includeDetails, includeWorkItems, maxChangeCount, and maxCommentLength - */ - getShelveset(shelvesetId: string, requestData: TfvcInterfaces.TfvcShelvesetRequestData): Promise; - /** - * Return a collection of shallow shelveset references. - * - * @param {TfvcInterfaces.TfvcShelvesetRequestData} requestData - name, owner, and maxCommentLength - * @param {number} top - Max number of shelvesets to return - * @param {number} skip - Number of shelvesets to skip - */ - getShelvesets(requestData: TfvcInterfaces.TfvcShelvesetRequestData, top?: number, skip?: number): Promise; - /** - * Get work items associated with a shelveset. - * - * @param {string} shelvesetId - Shelveset's unique ID - */ - getShelvesetWorkItems(shelvesetId: string): Promise; - } - -} -declare module 'vso-node-api/interfaces/WorkItemTrackingInterfaces' { - export interface AttachmentReference { - id: string; - url: string; - } - export interface FieldDependentRule extends WorkItemTrackingResource { - dependentFields: WorkItemFieldReference[]; - } - export interface FieldsToEvaluate { - fields: string[]; - fieldUpdates: { - [key: string]: any; - }; - fieldValues: { - [key: string]: any; - }; - rulesFrom: string[]; - } - export enum FieldType { - String = 0, - Integer = 1, - DateTime = 2, - PlainText = 3, - Html = 4, - TreePath = 5, - History = 6, - Double = 7, - Guid = 8, - Boolean = 9, - } - export enum FieldUsage { - None = 0, - WorkItem = 1, - WorkItemLink = 2, - Tree = 3, - WorkItemTypeExtension = 4, - } - export interface IdentityReference { - id: string; - name: string; - url: string; - } - export interface Link { - attributes: { - [key: string]: any; - }; - rel: string; - title: string; - url: string; - } - export enum LinkQueryMode { - WorkItems = 0, - LinksOneHopMustContain = 1, - LinksOneHopMayContain = 2, - LinksOneHopDoesNotContain = 3, - LinksRecursiveMustContain = 4, - LinksRecursiveMayContain = 5, - LinksRecursiveDoesNotContain = 6, - } - export enum LogicalOperation { - NONE = 0, - AND = 1, - OR = 2, - } - export interface ProjectReference { - id: string; - name: string; - url: string; - } - export enum ProvisioningActionType { - Import = 0, - Validate = 1, - } - export interface ProvisioningResult { - provisioningImportEvents: string[]; - } - export enum QueryExpand { - None = 0, - Wiql = 1, - Clauses = 2, - All = 3, - } - export interface QueryHierarchyItem extends WorkItemTrackingResource { - children: QueryHierarchyItem[]; - clauses: WorkItemQueryClause; - columns: WorkItemFieldReference[]; - filterOptions: LinkQueryMode; - hasChildren: boolean; - id: string; - isDeleted: boolean; - isFolder: boolean; - isInvalidSyntax: boolean; - isPublic: boolean; - linkClauses: WorkItemQueryClause; - name: string; - path: string; - queryType: QueryType; - sortColumns: WorkItemQuerySortColumn[]; - sourceClauses: WorkItemQueryClause; - targetClauses: WorkItemQueryClause; - wiql: string; - } - export enum QueryResultType { - WorkItem = 1, - WorkItemLink = 2, - } - export enum QueryType { - Flat = 1, - Tree = 2, - OneHop = 3, - } - export interface ReportingWorkItemLink { - changedDate: Date; - isActive: boolean; - rel: string; - sourceId: number; - targetId: number; - } - export interface ReportingWorkItemLinksBatch extends StreamedBatch { - } - export interface ReportingWorkItemRevisionsBatch extends StreamedBatch { - } - export interface ReportingWorkItemRevisionsFilter { - /** - * A list of fields to return in work item revisions. Omit this parameter to get all reportable fields. - */ - fields: string[]; - /** - * Return an identity reference instead of a string value for identity fields. - */ - includeIdentityRef: boolean; - /** - * A list of types to filter the results to specific work item types. Omit this parameter to get work item revisions of all work item types. - */ - types: string[]; - } - export interface StreamedBatch { - continuationToken: string; - isLastBatch: boolean; - nextLink: string; - values: T[]; - } - export enum TemplateType { - WorkItemType = 0, - GlobalWorkflow = 1, - } - export enum TreeNodeStructureType { - Area = 0, - Iteration = 1, - } - export enum TreeStructureGroup { - Areas = 0, - Iterations = 1, - } - export interface Wiql { - query: string; - } - export interface WitBatchRequest { - body: string; - headers: { - [key: string]: string; - }; - method: string; - uri: string; - } - export interface WitBatchResponse { - body: string; - code: number; - headers: { - [key: string]: string; - }; - } - export interface WorkItem extends WorkItemTrackingResource { - fields: { - [key: string]: any; - }; - id: number; - relations: WorkItemRelation[]; - rev: number; - } - export interface WorkItemClassificationNode extends WorkItemTrackingResource { - attributes: { - [key: string]: any; - }; - children: WorkItemClassificationNode[]; - id: number; - identifier: string; - name: string; - structureType: TreeNodeStructureType; - } - export interface WorkItemDelete extends WorkItemDeleteReference { - resource: WorkItem; - } - export interface WorkItemDeleteReference { - code: number; - deletedBy: string; - deletedDate: string; - id: number; - message: string; - name: string; - project: string; - type: string; - url: string; - } - export interface WorkItemDeleteUpdate { - isDeleted: boolean; - } - export enum WorkItemExpand { - None = 0, - Relations = 1, - Fields = 2, - All = 3, - } - export interface WorkItemField extends WorkItemTrackingResource { - name: string; - readOnly: boolean; - referenceName: string; - supportedOperations: WorkItemFieldOperation[]; - type: FieldType; - } - export interface WorkItemFieldOperation { - name: string; - referenceName: string; - } - export interface WorkItemFieldReference { - name: string; - referenceName: string; - url: string; - } - export interface WorkItemFieldUpdate { - newValue: any; - oldValue: any; - } - export interface WorkItemHistory extends WorkItemTrackingResource { - rev: number; - revisedBy: IdentityReference; - revisedDate: Date; - value: string; - } - export interface WorkItemLink { - rel: string; - source: WorkItemReference; - target: WorkItemReference; - } - export interface WorkItemQueryClause { - clauses: WorkItemQueryClause[]; - field: WorkItemFieldReference; - fieldValue: WorkItemFieldReference; - isFieldValue: boolean; - logicalOperator: LogicalOperation; - operator: WorkItemFieldOperation; - value: string; - } - export interface WorkItemQueryResult { - asOf: Date; - columns: WorkItemFieldReference[]; - queryResultType: QueryResultType; - queryType: QueryType; - sortColumns: WorkItemQuerySortColumn[]; - workItemRelations: WorkItemLink[]; - workItems: WorkItemReference[]; - } - export interface WorkItemQuerySortColumn { - descending: boolean; - field: WorkItemFieldReference; - } - export interface WorkItemReference { - id: number; - url: string; - } - export interface WorkItemRelation extends Link { - } - export interface WorkItemRelationType extends WorkItemTrackingReference { - attributes: { - [key: string]: any; - }; - } - export interface WorkItemRelationUpdates { - added: WorkItemRelation[]; - removed: WorkItemRelation[]; - updated: WorkItemRelation[]; - } - export interface WorkItemRevisionReference extends WorkItemReference { - rev: number; - } - export interface WorkItemTrackingReference extends WorkItemTrackingResource { - name: string; - referenceName: string; - } - export interface WorkItemTrackingResource extends WorkItemTrackingResourceReference { - _links: any; - } - export interface WorkItemTrackingResourceReference { - url: string; - } - export interface WorkItemType extends WorkItemTrackingResource { - description: string; - fields: WorkItemTypeFieldInstance[]; - name: string; - xmlForm: string; - } - export interface WorkItemTypeCategory extends WorkItemTrackingResource { - defaultWorkItemType: WorkItemTypeReference; - name: string; - referenceName: string; - workItemTypes: WorkItemTypeReference[]; - } - export interface WorkItemTypeFieldInstance { - field: WorkItemFieldReference; - helpText: string; - } - export interface WorkItemTypeReference extends WorkItemTrackingResourceReference { - name: string; - } - export interface WorkItemTypeTemplate { - template: string; - } - export interface WorkItemTypeTemplateUpdateModel { - actionType: ProvisioningActionType; - methodology: string; - template: string; - templateType: TemplateType; - } - export interface WorkItemUpdate extends WorkItemTrackingResourceReference { - fields: { - [key: string]: WorkItemFieldUpdate; - }; - id: number; - relations: WorkItemRelationUpdates; - rev: number; - revisedBy: IdentityReference; - revisedDate: Date; - workItemId: number; - } - export var TypeInfo: { - AttachmentReference: { - fields: any; - }; - FieldDependentRule: { - fields: any; - }; - FieldsToEvaluate: { - fields: any; - }; - FieldType: { - enumValues: { - "string": number; - "integer": number; - "dateTime": number; - "plainText": number; - "html": number; - "treePath": number; - "history": number; - "double": number; - "guid": number; - "boolean": number; - }; - }; - FieldUsage: { - enumValues: { - "none": number; - "workItem": number; - "workItemLink": number; - "tree": number; - "workItemTypeExtension": number; - }; - }; - IdentityReference: { - fields: any; - }; - Link: { - fields: any; - }; - LinkQueryMode: { - enumValues: { - "workItems": number; - "linksOneHopMustContain": number; - "linksOneHopMayContain": number; - "linksOneHopDoesNotContain": number; - "linksRecursiveMustContain": number; - "linksRecursiveMayContain": number; - "linksRecursiveDoesNotContain": number; - }; - }; - LogicalOperation: { - enumValues: { - "nONE": number; - "aND": number; - "oR": number; - }; - }; - ProjectReference: { - fields: any; - }; - ProvisioningActionType: { - enumValues: { - "import": number; - "validate": number; - }; - }; - ProvisioningResult: { - fields: any; - }; - QueryExpand: { - enumValues: { - "none": number; - "wiql": number; - "clauses": number; - "all": number; - }; - }; - QueryHierarchyItem: { - fields: any; - }; - QueryResultType: { - enumValues: { - "workItem": number; - "workItemLink": number; - }; - }; - QueryType: { - enumValues: { - "flat": number; - "tree": number; - "oneHop": number; - }; - }; - ReportingWorkItemLink: { - fields: any; - }; - ReportingWorkItemLinksBatch: { - fields: any; - }; - ReportingWorkItemRevisionsBatch: { - fields: any; - }; - ReportingWorkItemRevisionsFilter: { - fields: any; - }; - StreamedBatch: { - fields: any; - }; - TemplateType: { - enumValues: { - "workItemType": number; - "globalWorkflow": number; - }; - }; - TreeNodeStructureType: { - enumValues: { - "area": number; - "iteration": number; - }; - }; - TreeStructureGroup: { - enumValues: { - "areas": number; - "iterations": number; - }; - }; - Wiql: { - fields: any; - }; - WitBatchRequest: { - fields: any; - }; - WitBatchResponse: { - fields: any; - }; - WorkItem: { - fields: any; - }; - WorkItemClassificationNode: { - fields: any; - }; - WorkItemDelete: { - fields: any; - }; - WorkItemDeleteReference: { - fields: any; - }; - WorkItemDeleteUpdate: { - fields: any; - }; - WorkItemExpand: { - enumValues: { - "none": number; - "relations": number; - "fields": number; - "all": number; - }; - }; - WorkItemField: { - fields: any; - }; - WorkItemFieldOperation: { - fields: any; - }; - WorkItemFieldReference: { - fields: any; - }; - WorkItemFieldUpdate: { - fields: any; - }; - WorkItemHistory: { - fields: any; - }; - WorkItemLink: { - fields: any; - }; - WorkItemQueryClause: { - fields: any; - }; - WorkItemQueryResult: { - fields: any; - }; - WorkItemQuerySortColumn: { - fields: any; - }; - WorkItemReference: { - fields: any; - }; - WorkItemRelation: { - fields: any; - }; - WorkItemRelationType: { - fields: any; - }; - WorkItemRelationUpdates: { - fields: any; - }; - WorkItemRevisionReference: { - fields: any; - }; - WorkItemTrackingReference: { - fields: any; - }; - WorkItemTrackingResource: { - fields: any; - }; - WorkItemTrackingResourceReference: { - fields: any; - }; - WorkItemType: { - fields: any; - }; - WorkItemTypeCategory: { - fields: any; - }; - WorkItemTypeFieldInstance: { - fields: any; - }; - WorkItemTypeReference: { - fields: any; - }; - WorkItemTypeTemplate: { - fields: any; - }; - WorkItemTypeTemplateUpdateModel: { - fields: any; - }; - WorkItemUpdate: { - fields: any; - }; - }; - -} -declare module 'vso-node-api/WorkItemTrackingApi' { - - - import Q = require('q'); - import basem = require('vso-node-api/ClientApiBases'); - import VsoBaseInterfaces = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); - import TfsCoreInterfaces = require('vso-node-api/interfaces/CoreInterfaces'); - import VSSInterfaces = require('vso-node-api/interfaces/common/VSSInterfaces'); - import WorkItemTrackingInterfaces = require('vso-node-api/interfaces/WorkItemTrackingInterfaces'); - export interface IWorkItemTrackingApi extends basem.ClientApiBase { - createAttachment(customHeaders: any, contentStream: NodeJS.ReadableStream, fileName: string, uploadType: string, onResult: (err: any, statusCode: number, attachment: WorkItemTrackingInterfaces.AttachmentReference) => void): void; - getAttachmentContent(id: string, fileName: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - getAttachmentZip(id: string, fileName: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - getRootNodes(project: string, depth: number, onResult: (err: any, statusCode: number, classificationNodes: WorkItemTrackingInterfaces.WorkItemClassificationNode[]) => void): void; - createOrUpdateClassificationNode(postedNode: WorkItemTrackingInterfaces.WorkItemClassificationNode, project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path: string, onResult: (err: any, statusCode: number, classificationNode: WorkItemTrackingInterfaces.WorkItemClassificationNode) => void): void; - deleteClassificationNode(project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path: string, reclassifyId: number, onResult: (err: any, statusCode: number) => void): void; - getClassificationNode(project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path: string, depth: number, onResult: (err: any, statusCode: number, classificationNode: WorkItemTrackingInterfaces.WorkItemClassificationNode) => void): void; - updateClassificationNode(postedNode: WorkItemTrackingInterfaces.WorkItemClassificationNode, project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path: string, onResult: (err: any, statusCode: number, classificationNode: WorkItemTrackingInterfaces.WorkItemClassificationNode) => void): void; - getField(field: string, onResult: (err: any, statusCode: number, field: WorkItemTrackingInterfaces.WorkItemField) => void): void; - getFields(onResult: (err: any, statusCode: number, fields: WorkItemTrackingInterfaces.WorkItemField[]) => void): void; - getHistory(id: number, top: number, skip: number, onResult: (err: any, statusCode: number, history: WorkItemTrackingInterfaces.WorkItemHistory[]) => void): void; - getHistoryById(id: number, revisionNumber: number, onResult: (err: any, statusCode: number, history: WorkItemTrackingInterfaces.WorkItemHistory) => void): void; - createQuery(postedQuery: WorkItemTrackingInterfaces.QueryHierarchyItem, project: string, query: string, onResult: (err: any, statusCode: number, querie: WorkItemTrackingInterfaces.QueryHierarchyItem) => void): void; - deleteQuery(project: string, query: string, onResult: (err: any, statusCode: number) => void): void; - getQueries(project: string, expand: WorkItemTrackingInterfaces.QueryExpand, depth: number, includeDeleted: boolean, onResult: (err: any, statusCode: number, queries: WorkItemTrackingInterfaces.QueryHierarchyItem[]) => void): void; - getQuery(project: string, query: string, expand: WorkItemTrackingInterfaces.QueryExpand, depth: number, includeDeleted: boolean, onResult: (err: any, statusCode: number, querie: WorkItemTrackingInterfaces.QueryHierarchyItem) => void): void; - updateQuery(queryUpdate: WorkItemTrackingInterfaces.QueryHierarchyItem, project: string, query: string, undeleteDescendants: boolean, onResult: (err: any, statusCode: number, querie: WorkItemTrackingInterfaces.QueryHierarchyItem) => void): void; - destroyWorkItem(id: number, project: string, onResult: (err: any, statusCode: number) => void): void; - getDeletedWorkItem(id: number, project: string, onResult: (err: any, statusCode: number, recyclebin: WorkItemTrackingInterfaces.WorkItemDelete) => void): void; - getDeletedWorkItems(project: string, ids: number[], onResult: (err: any, statusCode: number, recyclebin: WorkItemTrackingInterfaces.WorkItemDeleteReference[]) => void): void; - restoreWorkItem(payload: WorkItemTrackingInterfaces.WorkItemDeleteUpdate, id: number, project: string, onResult: (err: any, statusCode: number, recyclebin: WorkItemTrackingInterfaces.WorkItemDelete) => void): void; - getRevision(id: number, revisionNumber: number, expand: WorkItemTrackingInterfaces.WorkItemExpand, onResult: (err: any, statusCode: number, revision: WorkItemTrackingInterfaces.WorkItem) => void): void; - getRevisions(id: number, top: number, skip: number, expand: WorkItemTrackingInterfaces.WorkItemExpand, onResult: (err: any, statusCode: number, revisions: WorkItemTrackingInterfaces.WorkItem[]) => void): void; - evaluateRulesOnField(ruleEngineInput: WorkItemTrackingInterfaces.FieldsToEvaluate, onResult: (err: any, statusCode: number) => void): void; - getUpdate(id: number, updateNumber: number, onResult: (err: any, statusCode: number, update: WorkItemTrackingInterfaces.WorkItemUpdate) => void): void; - getUpdates(id: number, top: number, skip: number, onResult: (err: any, statusCode: number, updates: WorkItemTrackingInterfaces.WorkItemUpdate[]) => void): void; - queryByWiql(wiql: WorkItemTrackingInterfaces.Wiql, teamContext: TfsCoreInterfaces.TeamContext, timePrecision: boolean, onResult: (err: any, statusCode: number, wiql: WorkItemTrackingInterfaces.WorkItemQueryResult) => void): void; - queryById(id: string, teamContext: TfsCoreInterfaces.TeamContext, timePrecision: boolean, onResult: (err: any, statusCode: number, wiql: WorkItemTrackingInterfaces.WorkItemQueryResult) => void): void; - getReportingLinks(project: string, types: string[], continuationToken: string, startDateTime: Date, onResult: (err: any, statusCode: number, workItemLink: WorkItemTrackingInterfaces.ReportingWorkItemLinksBatch) => void): void; - getRelationType(relation: string, onResult: (err: any, statusCode: number, workItemRelationType: WorkItemTrackingInterfaces.WorkItemRelationType) => void): void; - getRelationTypes(onResult: (err: any, statusCode: number, workItemRelationTypes: WorkItemTrackingInterfaces.WorkItemRelationType[]) => void): void; - readReportingRevisionsGet(project: string, fields: string[], types: string[], continuationToken: string, startDateTime: Date, includeIdentityRef: boolean, includeDeleted: boolean, includeTagRef: boolean, onResult: (err: any, statusCode: number, workItemRevision: WorkItemTrackingInterfaces.ReportingWorkItemRevisionsBatch) => void): void; - readReportingRevisionsPost(filter: WorkItemTrackingInterfaces.ReportingWorkItemRevisionsFilter, project: string, continuationToken: string, startDateTime: Date, onResult: (err: any, statusCode: number, workItemRevision: WorkItemTrackingInterfaces.ReportingWorkItemRevisionsBatch) => void): void; - deleteWorkItem(id: number, destroy: boolean, onResult: (err: any, statusCode: number, workItem: WorkItemTrackingInterfaces.WorkItemDelete) => void): void; - getWorkItem(id: number, fields: string[], asOf: Date, expand: WorkItemTrackingInterfaces.WorkItemExpand, onResult: (err: any, statusCode: number, workItem: WorkItemTrackingInterfaces.WorkItem) => void): void; - getWorkItems(ids: number[], fields: string[], asOf: Date, expand: WorkItemTrackingInterfaces.WorkItemExpand, onResult: (err: any, statusCode: number, workItems: WorkItemTrackingInterfaces.WorkItem[]) => void): void; - updateWorkItem(customHeaders: any, document: VSSInterfaces.JsonPatchDocument, id: number, validateOnly: boolean, bypassRules: boolean, onResult: (err: any, statusCode: number, workItem: WorkItemTrackingInterfaces.WorkItem) => void): void; - createWorkItem(customHeaders: any, document: VSSInterfaces.JsonPatchDocument, project: string, type: string, validateOnly: boolean, bypassRules: boolean, onResult: (err: any, statusCode: number, workItem: WorkItemTrackingInterfaces.WorkItem) => void): void; - getWorkItemTemplate(project: string, type: string, fields: string, asOf: Date, expand: WorkItemTrackingInterfaces.WorkItemExpand, onResult: (err: any, statusCode: number, workItem: WorkItemTrackingInterfaces.WorkItem) => void): void; - getWorkItemTypeCategories(project: string, onResult: (err: any, statusCode: number, workItemTypeCategories: WorkItemTrackingInterfaces.WorkItemTypeCategory[]) => void): void; - getWorkItemTypeCategory(project: string, category: string, onResult: (err: any, statusCode: number, workItemTypeCategorie: WorkItemTrackingInterfaces.WorkItemTypeCategory) => void): void; - getWorkItemType(project: string, type: string, onResult: (err: any, statusCode: number, workItemType: WorkItemTrackingInterfaces.WorkItemType) => void): void; - getWorkItemTypes(project: string, onResult: (err: any, statusCode: number, workItemTypes: WorkItemTrackingInterfaces.WorkItemType[]) => void): void; - getDependentFields(project: string, type: string, field: string, onResult: (err: any, statusCode: number, workItemTypesField: WorkItemTrackingInterfaces.FieldDependentRule) => void): void; - exportWorkItemTypeDefinition(project: string, type: string, exportGlobalLists: boolean, onResult: (err: any, statusCode: number, workItemTypeTemplate: WorkItemTrackingInterfaces.WorkItemTypeTemplate) => void): void; - updateWorkItemTypeDefinition(updateModel: WorkItemTrackingInterfaces.WorkItemTypeTemplateUpdateModel, project: string, onResult: (err: any, statusCode: number, workItemTypeTemplate: WorkItemTrackingInterfaces.ProvisioningResult) => void): void; - } - export interface IQWorkItemTrackingApi extends basem.QClientApiBase { - createAttachment(customHeaders: any, contentStream: NodeJS.ReadableStream, fileName?: string, uploadType?: string): Promise; - getAttachmentContent(id: string, fileName?: string): Promise; - getAttachmentZip(id: string, fileName?: string): Promise; - getRootNodes(project: string, depth?: number): Promise; - createOrUpdateClassificationNode(postedNode: WorkItemTrackingInterfaces.WorkItemClassificationNode, project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path?: string): Promise; - deleteClassificationNode(project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path?: string, reclassifyId?: number): Promise; - getClassificationNode(project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path?: string, depth?: number): Promise; - updateClassificationNode(postedNode: WorkItemTrackingInterfaces.WorkItemClassificationNode, project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path?: string): Promise; - getField(field: string): Promise; - getFields(): Promise; - getHistory(id: number, top?: number, skip?: number): Promise; - getHistoryById(id: number, revisionNumber: number): Promise; - createQuery(postedQuery: WorkItemTrackingInterfaces.QueryHierarchyItem, project: string, query: string): Promise; - deleteQuery(project: string, query: string): Promise; - getQueries(project: string, expand?: WorkItemTrackingInterfaces.QueryExpand, depth?: number, includeDeleted?: boolean): Promise; - getQuery(project: string, query: string, expand?: WorkItemTrackingInterfaces.QueryExpand, depth?: number, includeDeleted?: boolean): Promise; - updateQuery(queryUpdate: WorkItemTrackingInterfaces.QueryHierarchyItem, project: string, query: string, undeleteDescendants?: boolean): Promise; - destroyWorkItem(id: number, project?: string): Promise; - getDeletedWorkItem(id: number, project?: string): Promise; - getDeletedWorkItems(project?: string, ids?: number[]): Promise; - restoreWorkItem(payload: WorkItemTrackingInterfaces.WorkItemDeleteUpdate, id: number, project?: string): Promise; - getRevision(id: number, revisionNumber: number, expand?: WorkItemTrackingInterfaces.WorkItemExpand): Promise; - getRevisions(id: number, top?: number, skip?: number, expand?: WorkItemTrackingInterfaces.WorkItemExpand): Promise; - evaluateRulesOnField(ruleEngineInput: WorkItemTrackingInterfaces.FieldsToEvaluate): Promise; - getUpdate(id: number, updateNumber: number): Promise; - getUpdates(id: number, top?: number, skip?: number): Promise; - queryByWiql(wiql: WorkItemTrackingInterfaces.Wiql, teamContext?: TfsCoreInterfaces.TeamContext, timePrecision?: boolean): Promise; - queryById(id: string, teamContext?: TfsCoreInterfaces.TeamContext, timePrecision?: boolean): Promise; - getReportingLinks(project?: string, types?: string[], continuationToken?: string, startDateTime?: Date): Promise; - getRelationType(relation: string): Promise; - getRelationTypes(): Promise; - readReportingRevisionsGet(project?: string, fields?: string[], types?: string[], continuationToken?: string, startDateTime?: Date, includeIdentityRef?: boolean, includeDeleted?: boolean, includeTagRef?: boolean): Promise; - readReportingRevisionsPost(filter: WorkItemTrackingInterfaces.ReportingWorkItemRevisionsFilter, project?: string, continuationToken?: string, startDateTime?: Date): Promise; - deleteWorkItem(id: number, destroy?: boolean): Promise; - getWorkItem(id: number, fields?: string[], asOf?: Date, expand?: WorkItemTrackingInterfaces.WorkItemExpand): Promise; - getWorkItems(ids: number[], fields?: string[], asOf?: Date, expand?: WorkItemTrackingInterfaces.WorkItemExpand): Promise; - updateWorkItem(customHeaders: any, document: VSSInterfaces.JsonPatchDocument, id: number, validateOnly?: boolean, bypassRules?: boolean): Promise; - createWorkItem(customHeaders: any, document: VSSInterfaces.JsonPatchDocument, project: string, type: string, validateOnly?: boolean, bypassRules?: boolean): Promise; - getWorkItemTemplate(project: string, type: string, fields?: string, asOf?: Date, expand?: WorkItemTrackingInterfaces.WorkItemExpand): Promise; - getWorkItemTypeCategories(project: string): Promise; - getWorkItemTypeCategory(project: string, category: string): Promise; - getWorkItemType(project: string, type: string): Promise; - getWorkItemTypes(project: string): Promise; - getDependentFields(project: string, type: string, field: string): Promise; - exportWorkItemTypeDefinition(project?: string, type?: string, exportGlobalLists?: boolean): Promise; - updateWorkItemTypeDefinition(updateModel: WorkItemTrackingInterfaces.WorkItemTypeTemplateUpdateModel, project?: string): Promise; - } - export class WorkItemTrackingApi extends basem.ClientApiBase implements IWorkItemTrackingApi { - constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); - /** - * Creates an attachment. - * - * @param {NodeJS.ReadableStream} contentStream - Content to upload - * @param {string} fileName - * @param {string} uploadType - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.AttachmentReference - */ - createAttachment(customHeaders: VsoBaseInterfaces.IHeaders, contentStream: NodeJS.ReadableStream, fileName: string, uploadType: string, onResult: (err: any, statusCode: number, attachment: WorkItemTrackingInterfaces.AttachmentReference) => void): void; - /** - * Returns an attachment - * - * @param {string} id - * @param {string} fileName - * @param onResult callback function with the resulting ArrayBuffer - */ - getAttachmentContent(id: string, fileName: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * Returns an attachment - * - * @param {string} id - * @param {string} fileName - * @param onResult callback function with the resulting ArrayBuffer - */ - getAttachmentZip(id: string, fileName: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} depth - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemClassificationNode[] - */ - getRootNodes(project: string, depth: number, onResult: (err: any, statusCode: number, classificationNodes: WorkItemTrackingInterfaces.WorkItemClassificationNode[]) => void): void; - /** - * @param {WorkItemTrackingInterfaces.WorkItemClassificationNode} postedNode - * @param {string} project - Project ID or project name - * @param {WorkItemTrackingInterfaces.TreeStructureGroup} structureGroup - * @param {string} path - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemClassificationNode - */ - createOrUpdateClassificationNode(postedNode: WorkItemTrackingInterfaces.WorkItemClassificationNode, project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path: string, onResult: (err: any, statusCode: number, classificationNode: WorkItemTrackingInterfaces.WorkItemClassificationNode) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {WorkItemTrackingInterfaces.TreeStructureGroup} structureGroup - * @param {string} path - * @param {number} reclassifyId - * @param onResult callback function - */ - deleteClassificationNode(project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path: string, reclassifyId: number, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {WorkItemTrackingInterfaces.TreeStructureGroup} structureGroup - * @param {string} path - * @param {number} depth - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemClassificationNode - */ - getClassificationNode(project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path: string, depth: number, onResult: (err: any, statusCode: number, classificationNode: WorkItemTrackingInterfaces.WorkItemClassificationNode) => void): void; - /** - * @param {WorkItemTrackingInterfaces.WorkItemClassificationNode} postedNode - * @param {string} project - Project ID or project name - * @param {WorkItemTrackingInterfaces.TreeStructureGroup} structureGroup - * @param {string} path - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemClassificationNode - */ - updateClassificationNode(postedNode: WorkItemTrackingInterfaces.WorkItemClassificationNode, project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path: string, onResult: (err: any, statusCode: number, classificationNode: WorkItemTrackingInterfaces.WorkItemClassificationNode) => void): void; - /** - * @param {string} field - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemField - */ - getField(field: string, onResult: (err: any, statusCode: number, field: WorkItemTrackingInterfaces.WorkItemField) => void): void; - /** - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemField[] - */ - getFields(onResult: (err: any, statusCode: number, fields: WorkItemTrackingInterfaces.WorkItemField[]) => void): void; - /** - * Returns history of all revision for a given work item ID - * - * @param {number} id - * @param {number} top - * @param {number} skip - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemHistory[] - */ - getHistory(id: number, top: number, skip: number, onResult: (err: any, statusCode: number, history: WorkItemTrackingInterfaces.WorkItemHistory[]) => void): void; - /** - * Returns the history value of particular revision - * - * @param {number} id - * @param {number} revisionNumber - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemHistory - */ - getHistoryById(id: number, revisionNumber: number, onResult: (err: any, statusCode: number, history: WorkItemTrackingInterfaces.WorkItemHistory) => void): void; - /** - * Creates a query, or moves a query. - * - * @param {WorkItemTrackingInterfaces.QueryHierarchyItem} postedQuery - The query to create. - * @param {string} project - Project ID or project name - * @param {string} query - The parent path for the query to create. - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.QueryHierarchyItem - */ - createQuery(postedQuery: WorkItemTrackingInterfaces.QueryHierarchyItem, project: string, query: string, onResult: (err: any, statusCode: number, querie: WorkItemTrackingInterfaces.QueryHierarchyItem) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {string} query - * @param onResult callback function - */ - deleteQuery(project: string, query: string, onResult: (err: any, statusCode: number) => void): void; - /** - * Retrieves all queries the user has access to in the current project - * - * @param {string} project - Project ID or project name - * @param {WorkItemTrackingInterfaces.QueryExpand} expand - * @param {number} depth - * @param {boolean} includeDeleted - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.QueryHierarchyItem[] - */ - getQueries(project: string, expand: WorkItemTrackingInterfaces.QueryExpand, depth: number, includeDeleted: boolean, onResult: (err: any, statusCode: number, queries: WorkItemTrackingInterfaces.QueryHierarchyItem[]) => void): void; - /** - * Retrieves a single query by project and either id or path - * - * @param {string} project - Project ID or project name - * @param {string} query - * @param {WorkItemTrackingInterfaces.QueryExpand} expand - * @param {number} depth - * @param {boolean} includeDeleted - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.QueryHierarchyItem - */ - getQuery(project: string, query: string, expand: WorkItemTrackingInterfaces.QueryExpand, depth: number, includeDeleted: boolean, onResult: (err: any, statusCode: number, querie: WorkItemTrackingInterfaces.QueryHierarchyItem) => void): void; - /** - * @param {WorkItemTrackingInterfaces.QueryHierarchyItem} queryUpdate - * @param {string} project - Project ID or project name - * @param {string} query - * @param {boolean} undeleteDescendants - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.QueryHierarchyItem - */ - updateQuery(queryUpdate: WorkItemTrackingInterfaces.QueryHierarchyItem, project: string, query: string, undeleteDescendants: boolean, onResult: (err: any, statusCode: number, querie: WorkItemTrackingInterfaces.QueryHierarchyItem) => void): void; - /** - * @param {number} id - * @param {string} project - Project ID or project name - * @param onResult callback function - */ - destroyWorkItem(id: number, project: string, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {number} id - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemDelete - */ - getDeletedWorkItem(id: number, project: string, onResult: (err: any, statusCode: number, recyclebin: WorkItemTrackingInterfaces.WorkItemDelete) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number[]} ids - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemDeleteReference[] - */ - getDeletedWorkItems(project: string, ids: number[], onResult: (err: any, statusCode: number, recyclebin: WorkItemTrackingInterfaces.WorkItemDeleteReference[]) => void): void; - /** - * @param {WorkItemTrackingInterfaces.WorkItemDeleteUpdate} payload - * @param {number} id - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemDelete - */ - restoreWorkItem(payload: WorkItemTrackingInterfaces.WorkItemDeleteUpdate, id: number, project: string, onResult: (err: any, statusCode: number, recyclebin: WorkItemTrackingInterfaces.WorkItemDelete) => void): void; - /** - * Returns a fully hydrated work item for the requested revision - * - * @param {number} id - * @param {number} revisionNumber - * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItem - */ - getRevision(id: number, revisionNumber: number, expand: WorkItemTrackingInterfaces.WorkItemExpand, onResult: (err: any, statusCode: number, revision: WorkItemTrackingInterfaces.WorkItem) => void): void; - /** - * Returns the list of fully hydrated work item revisions, paged. - * - * @param {number} id - * @param {number} top - * @param {number} skip - * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItem[] - */ - getRevisions(id: number, top: number, skip: number, expand: WorkItemTrackingInterfaces.WorkItemExpand, onResult: (err: any, statusCode: number, revisions: WorkItemTrackingInterfaces.WorkItem[]) => void): void; - /** - * Validates the fields values. - * - * @param {WorkItemTrackingInterfaces.FieldsToEvaluate} ruleEngineInput - * @param onResult callback function - */ - evaluateRulesOnField(ruleEngineInput: WorkItemTrackingInterfaces.FieldsToEvaluate, onResult: (err: any, statusCode: number) => void): void; - /** - * Returns a single update for a work item - * - * @param {number} id - * @param {number} updateNumber - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemUpdate - */ - getUpdate(id: number, updateNumber: number, onResult: (err: any, statusCode: number, update: WorkItemTrackingInterfaces.WorkItemUpdate) => void): void; - /** - * Returns a the deltas between work item revisions - * - * @param {number} id - * @param {number} top - * @param {number} skip - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemUpdate[] - */ - getUpdates(id: number, top: number, skip: number, onResult: (err: any, statusCode: number, updates: WorkItemTrackingInterfaces.WorkItemUpdate[]) => void): void; - /** - * Gets the results of the query. - * - * @param {WorkItemTrackingInterfaces.Wiql} wiql - The query containing the wiql. - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - * @param {boolean} timePrecision - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemQueryResult - */ - queryByWiql(wiql: WorkItemTrackingInterfaces.Wiql, teamContext: TfsCoreInterfaces.TeamContext, timePrecision: boolean, onResult: (err: any, statusCode: number, wiql: WorkItemTrackingInterfaces.WorkItemQueryResult) => void): void; - /** - * Gets the results of the query by id. - * - * @param {string} id - The query id. - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - * @param {boolean} timePrecision - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemQueryResult - */ - queryById(id: string, teamContext: TfsCoreInterfaces.TeamContext, timePrecision: boolean, onResult: (err: any, statusCode: number, wiql: WorkItemTrackingInterfaces.WorkItemQueryResult) => void): void; - /** - * Get a batch of work item links - * - * @param {string} project - Project ID or project name - * @param {string[]} types - A list of types to filter the results to specific work item types. Omit this parameter to get work item links of all work item types. - * @param {string} continuationToken - Specifies the continuationToken to start the batch from. Omit this parameter to get the first batch of links. - * @param {Date} startDateTime - Date/time to use as a starting point for link changes. Only link changes that occurred after that date/time will be returned. Cannot be used in conjunction with 'watermark' parameter. - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.ReportingWorkItemLinksBatch - */ - getReportingLinks(project: string, types: string[], continuationToken: string, startDateTime: Date, onResult: (err: any, statusCode: number, workItemLink: WorkItemTrackingInterfaces.ReportingWorkItemLinksBatch) => void): void; - /** - * Gets the work item relation types. - * - * @param {string} relation - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemRelationType - */ - getRelationType(relation: string, onResult: (err: any, statusCode: number, workItemRelationType: WorkItemTrackingInterfaces.WorkItemRelationType) => void): void; - /** - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemRelationType[] - */ - getRelationTypes(onResult: (err: any, statusCode: number, workItemRelationTypes: WorkItemTrackingInterfaces.WorkItemRelationType[]) => void): void; - /** - * Get a batch of work item revisions with the option of including deleted items - * - * @param {string} project - Project ID or project name - * @param {string[]} fields - A list of fields to return in work item revisions. Omit this parameter to get all reportable fields. - * @param {string[]} types - A list of types to filter the results to specific work item types. Omit this parameter to get work item revisions of all work item types. - * @param {string} continuationToken - Specifies the watermark to start the batch from. Omit this parameter to get the first batch of revisions. - * @param {Date} startDateTime - Date/time to use as a starting point for revisions, all revisions will occur after this date/time. Cannot be used in conjunction with 'watermark' parameter. - * @param {boolean} includeIdentityRef - Return an identity reference instead of a string value for identity fields. - * @param {boolean} includeDeleted - Specify if the deleted item should be returned. - * @param {boolean} includeTagRef - Specify if the tag objects should be returned for System.Tags field. - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.ReportingWorkItemRevisionsBatch - */ - readReportingRevisionsGet(project: string, fields: string[], types: string[], continuationToken: string, startDateTime: Date, includeIdentityRef: boolean, includeDeleted: boolean, includeTagRef: boolean, onResult: (err: any, statusCode: number, workItemRevision: WorkItemTrackingInterfaces.ReportingWorkItemRevisionsBatch) => void): void; - /** - * Get a batch of work item revisions - * - * @param {WorkItemTrackingInterfaces.ReportingWorkItemRevisionsFilter} filter - An object that contains request settings: field filter, type filter, identity format - * @param {string} project - Project ID or project name - * @param {string} continuationToken - Specifies the watermark to start the batch from. Omit this parameter to get the first batch of revisions. - * @param {Date} startDateTime - Date/time to use as a starting point for revisions, all revisions will occur after this date/time. Cannot be used in conjunction with 'watermark' parameter. - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.ReportingWorkItemRevisionsBatch - */ - readReportingRevisionsPost(filter: WorkItemTrackingInterfaces.ReportingWorkItemRevisionsFilter, project: string, continuationToken: string, startDateTime: Date, onResult: (err: any, statusCode: number, workItemRevision: WorkItemTrackingInterfaces.ReportingWorkItemRevisionsBatch) => void): void; - /** - * @param {number} id - * @param {boolean} destroy - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemDelete - */ - deleteWorkItem(id: number, destroy: boolean, onResult: (err: any, statusCode: number, workItem: WorkItemTrackingInterfaces.WorkItemDelete) => void): void; - /** - * Returns a single work item - * - * @param {number} id - * @param {string[]} fields - * @param {Date} asOf - * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItem - */ - getWorkItem(id: number, fields: string[], asOf: Date, expand: WorkItemTrackingInterfaces.WorkItemExpand, onResult: (err: any, statusCode: number, workItem: WorkItemTrackingInterfaces.WorkItem) => void): void; - /** - * Returns a list of work items - * - * @param {number[]} ids - * @param {string[]} fields - * @param {Date} asOf - * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItem[] - */ - getWorkItems(ids: number[], fields: string[], asOf: Date, expand: WorkItemTrackingInterfaces.WorkItemExpand, onResult: (err: any, statusCode: number, workItems: WorkItemTrackingInterfaces.WorkItem[]) => void): void; - /** - * @param {VSSInterfaces.JsonPatchDocument} document - * @param {number} id - * @param {boolean} validateOnly - * @param {boolean} bypassRules - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItem - */ - updateWorkItem(customHeaders: VsoBaseInterfaces.IHeaders, document: VSSInterfaces.JsonPatchDocument, id: number, validateOnly: boolean, bypassRules: boolean, onResult: (err: any, statusCode: number, workItem: WorkItemTrackingInterfaces.WorkItem) => void): void; - /** - * @param {VSSInterfaces.JsonPatchDocument} document - * @param {string} project - Project ID or project name - * @param {string} type - * @param {boolean} validateOnly - * @param {boolean} bypassRules - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItem - */ - createWorkItem(customHeaders: VsoBaseInterfaces.IHeaders, document: VSSInterfaces.JsonPatchDocument, project: string, type: string, validateOnly: boolean, bypassRules: boolean, onResult: (err: any, statusCode: number, workItem: WorkItemTrackingInterfaces.WorkItem) => void): void; - /** - * Returns a single work item from a template - * - * @param {string} project - Project ID or project name - * @param {string} type - * @param {string} fields - * @param {Date} asOf - * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItem - */ - getWorkItemTemplate(project: string, type: string, fields: string, asOf: Date, expand: WorkItemTrackingInterfaces.WorkItemExpand, onResult: (err: any, statusCode: number, workItem: WorkItemTrackingInterfaces.WorkItem) => void): void; - /** - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemTypeCategory[] - */ - getWorkItemTypeCategories(project: string, onResult: (err: any, statusCode: number, workItemTypeCategories: WorkItemTrackingInterfaces.WorkItemTypeCategory[]) => void): void; - /** - * Returns a the deltas between work item revisions - * - * @param {string} project - Project ID or project name - * @param {string} category - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemTypeCategory - */ - getWorkItemTypeCategory(project: string, category: string, onResult: (err: any, statusCode: number, workItemTypeCategorie: WorkItemTrackingInterfaces.WorkItemTypeCategory) => void): void; - /** - * Returns a the deltas between work item revisions - * - * @param {string} project - Project ID or project name - * @param {string} type - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemType - */ - getWorkItemType(project: string, type: string, onResult: (err: any, statusCode: number, workItemType: WorkItemTrackingInterfaces.WorkItemType) => void): void; - /** - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemType[] - */ - getWorkItemTypes(project: string, onResult: (err: any, statusCode: number, workItemTypes: WorkItemTrackingInterfaces.WorkItemType[]) => void): void; - /** - * Returns the dependent fields for the corresponding workitem type and fieldname - * - * @param {string} project - Project ID or project name - * @param {string} type - * @param {string} field - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.FieldDependentRule - */ - getDependentFields(project: string, type: string, field: string, onResult: (err: any, statusCode: number, workItemTypesField: WorkItemTrackingInterfaces.FieldDependentRule) => void): void; - /** - * Export work item type - * - * @param {string} project - Project ID or project name - * @param {string} type - * @param {boolean} exportGlobalLists - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemTypeTemplate - */ - exportWorkItemTypeDefinition(project: string, type: string, exportGlobalLists: boolean, onResult: (err: any, statusCode: number, workItemTypeTemplate: WorkItemTrackingInterfaces.WorkItemTypeTemplate) => void): void; - /** - * Add/updates a work item type - * - * @param {WorkItemTrackingInterfaces.WorkItemTypeTemplateUpdateModel} updateModel - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.ProvisioningResult - */ - updateWorkItemTypeDefinition(updateModel: WorkItemTrackingInterfaces.WorkItemTypeTemplateUpdateModel, project: string, onResult: (err: any, statusCode: number, workItemTypeTemplate: WorkItemTrackingInterfaces.ProvisioningResult) => void): void; - } - export class QWorkItemTrackingApi extends basem.QClientApiBase implements IQWorkItemTrackingApi { - api: WorkItemTrackingApi; - constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); - /** - * Creates an attachment. - * - * @param {NodeJS.ReadableStream} contentStream - Content to upload - * @param {string} fileName - * @param {string} uploadType - */ - createAttachment(customHeaders: any, contentStream: NodeJS.ReadableStream, fileName?: string, uploadType?: string): Promise; - /** - * Returns an attachment - * - * @param {string} id - * @param {string} fileName - */ - getAttachmentContent(id: string, fileName?: string): Promise; - /** - * Returns an attachment - * - * @param {string} id - * @param {string} fileName - */ - getAttachmentZip(id: string, fileName?: string): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} depth - */ - getRootNodes(project: string, depth?: number): Promise; - /** - * @param {WorkItemTrackingInterfaces.WorkItemClassificationNode} postedNode - * @param {string} project - Project ID or project name - * @param {WorkItemTrackingInterfaces.TreeStructureGroup} structureGroup - * @param {string} path - */ - createOrUpdateClassificationNode(postedNode: WorkItemTrackingInterfaces.WorkItemClassificationNode, project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path?: string): Promise; - /** - * @param {string} project - Project ID or project name - * @param {WorkItemTrackingInterfaces.TreeStructureGroup} structureGroup - * @param {string} path - * @param {number} reclassifyId - */ - deleteClassificationNode(project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path?: string, reclassifyId?: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {WorkItemTrackingInterfaces.TreeStructureGroup} structureGroup - * @param {string} path - * @param {number} depth - */ - getClassificationNode(project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path?: string, depth?: number): Promise; - /** - * @param {WorkItemTrackingInterfaces.WorkItemClassificationNode} postedNode - * @param {string} project - Project ID or project name - * @param {WorkItemTrackingInterfaces.TreeStructureGroup} structureGroup - * @param {string} path - */ - updateClassificationNode(postedNode: WorkItemTrackingInterfaces.WorkItemClassificationNode, project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path?: string): Promise; - /** - * @param {string} field - */ - getField(field: string): Promise; - /** - */ - getFields(): Promise; - /** - * Returns history of all revision for a given work item ID - * - * @param {number} id - * @param {number} top - * @param {number} skip - */ - getHistory(id: number, top?: number, skip?: number): Promise; - /** - * Returns the history value of particular revision - * - * @param {number} id - * @param {number} revisionNumber - */ - getHistoryById(id: number, revisionNumber: number): Promise; - /** - * Creates a query, or moves a query. - * - * @param {WorkItemTrackingInterfaces.QueryHierarchyItem} postedQuery - The query to create. - * @param {string} project - Project ID or project name - * @param {string} query - The parent path for the query to create. - */ - createQuery(postedQuery: WorkItemTrackingInterfaces.QueryHierarchyItem, project: string, query: string): Promise; - /** - * @param {string} project - Project ID or project name - * @param {string} query - */ - deleteQuery(project: string, query: string): Promise; - /** - * Retrieves all queries the user has access to in the current project - * - * @param {string} project - Project ID or project name - * @param {WorkItemTrackingInterfaces.QueryExpand} expand - * @param {number} depth - * @param {boolean} includeDeleted - */ - getQueries(project: string, expand?: WorkItemTrackingInterfaces.QueryExpand, depth?: number, includeDeleted?: boolean): Promise; - /** - * Retrieves a single query by project and either id or path - * - * @param {string} project - Project ID or project name - * @param {string} query - * @param {WorkItemTrackingInterfaces.QueryExpand} expand - * @param {number} depth - * @param {boolean} includeDeleted - */ - getQuery(project: string, query: string, expand?: WorkItemTrackingInterfaces.QueryExpand, depth?: number, includeDeleted?: boolean): Promise; - /** - * @param {WorkItemTrackingInterfaces.QueryHierarchyItem} queryUpdate - * @param {string} project - Project ID or project name - * @param {string} query - * @param {boolean} undeleteDescendants - */ - updateQuery(queryUpdate: WorkItemTrackingInterfaces.QueryHierarchyItem, project: string, query: string, undeleteDescendants?: boolean): Promise; - /** - * @param {number} id - * @param {string} project - Project ID or project name - */ - destroyWorkItem(id: number, project?: string): Promise; - /** - * @param {number} id - * @param {string} project - Project ID or project name - */ - getDeletedWorkItem(id: number, project?: string): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number[]} ids - */ - getDeletedWorkItems(project?: string, ids?: number[]): Promise; - /** - * @param {WorkItemTrackingInterfaces.WorkItemDeleteUpdate} payload - * @param {number} id - * @param {string} project - Project ID or project name - */ - restoreWorkItem(payload: WorkItemTrackingInterfaces.WorkItemDeleteUpdate, id: number, project?: string): Promise; - /** - * Returns a fully hydrated work item for the requested revision - * - * @param {number} id - * @param {number} revisionNumber - * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand - */ - getRevision(id: number, revisionNumber: number, expand?: WorkItemTrackingInterfaces.WorkItemExpand): Promise; - /** - * Returns the list of fully hydrated work item revisions, paged. - * - * @param {number} id - * @param {number} top - * @param {number} skip - * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand - */ - getRevisions(id: number, top?: number, skip?: number, expand?: WorkItemTrackingInterfaces.WorkItemExpand): Promise; - /** - * Validates the fields values. - * - * @param {WorkItemTrackingInterfaces.FieldsToEvaluate} ruleEngineInput - */ - evaluateRulesOnField(ruleEngineInput: WorkItemTrackingInterfaces.FieldsToEvaluate): Promise; - /** - * Returns a single update for a work item - * - * @param {number} id - * @param {number} updateNumber - */ - getUpdate(id: number, updateNumber: number): Promise; - /** - * Returns a the deltas between work item revisions - * - * @param {number} id - * @param {number} top - * @param {number} skip - */ - getUpdates(id: number, top?: number, skip?: number): Promise; - /** - * Gets the results of the query. - * - * @param {WorkItemTrackingInterfaces.Wiql} wiql - The query containing the wiql. - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - * @param {boolean} timePrecision - */ - queryByWiql(wiql: WorkItemTrackingInterfaces.Wiql, teamContext?: TfsCoreInterfaces.TeamContext, timePrecision?: boolean): Promise; - /** - * Gets the results of the query by id. - * - * @param {string} id - The query id. - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - * @param {boolean} timePrecision - */ - queryById(id: string, teamContext?: TfsCoreInterfaces.TeamContext, timePrecision?: boolean): Promise; - /** - * Get a batch of work item links - * - * @param {string} project - Project ID or project name - * @param {string[]} types - A list of types to filter the results to specific work item types. Omit this parameter to get work item links of all work item types. - * @param {string} continuationToken - Specifies the continuationToken to start the batch from. Omit this parameter to get the first batch of links. - * @param {Date} startDateTime - Date/time to use as a starting point for link changes. Only link changes that occurred after that date/time will be returned. Cannot be used in conjunction with 'watermark' parameter. - */ - getReportingLinks(project?: string, types?: string[], continuationToken?: string, startDateTime?: Date): Promise; - /** - * Gets the work item relation types. - * - * @param {string} relation - */ - getRelationType(relation: string): Promise; - /** - */ - getRelationTypes(): Promise; - /** - * Get a batch of work item revisions with the option of including deleted items - * - * @param {string} project - Project ID or project name - * @param {string[]} fields - A list of fields to return in work item revisions. Omit this parameter to get all reportable fields. - * @param {string[]} types - A list of types to filter the results to specific work item types. Omit this parameter to get work item revisions of all work item types. - * @param {string} continuationToken - Specifies the watermark to start the batch from. Omit this parameter to get the first batch of revisions. - * @param {Date} startDateTime - Date/time to use as a starting point for revisions, all revisions will occur after this date/time. Cannot be used in conjunction with 'watermark' parameter. - * @param {boolean} includeIdentityRef - Return an identity reference instead of a string value for identity fields. - * @param {boolean} includeDeleted - Specify if the deleted item should be returned. - * @param {boolean} includeTagRef - Specify if the tag objects should be returned for System.Tags field. - */ - readReportingRevisionsGet(project?: string, fields?: string[], types?: string[], continuationToken?: string, startDateTime?: Date, includeIdentityRef?: boolean, includeDeleted?: boolean, includeTagRef?: boolean): Promise; - /** - * Get a batch of work item revisions - * - * @param {WorkItemTrackingInterfaces.ReportingWorkItemRevisionsFilter} filter - An object that contains request settings: field filter, type filter, identity format - * @param {string} project - Project ID or project name - * @param {string} continuationToken - Specifies the watermark to start the batch from. Omit this parameter to get the first batch of revisions. - * @param {Date} startDateTime - Date/time to use as a starting point for revisions, all revisions will occur after this date/time. Cannot be used in conjunction with 'watermark' parameter. - */ - readReportingRevisionsPost(filter: WorkItemTrackingInterfaces.ReportingWorkItemRevisionsFilter, project?: string, continuationToken?: string, startDateTime?: Date): Promise; - /** - * @param {number} id - * @param {boolean} destroy - */ - deleteWorkItem(id: number, destroy?: boolean): Promise; - /** - * Returns a single work item - * - * @param {number} id - * @param {string[]} fields - * @param {Date} asOf - * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand - */ - getWorkItem(id: number, fields?: string[], asOf?: Date, expand?: WorkItemTrackingInterfaces.WorkItemExpand): Promise; - /** - * Returns a list of work items - * - * @param {number[]} ids - * @param {string[]} fields - * @param {Date} asOf - * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand - */ - getWorkItems(ids: number[], fields?: string[], asOf?: Date, expand?: WorkItemTrackingInterfaces.WorkItemExpand): Promise; - /** - * @param {VSSInterfaces.JsonPatchDocument} document - * @param {number} id - * @param {boolean} validateOnly - * @param {boolean} bypassRules - */ - updateWorkItem(customHeaders: any, document: VSSInterfaces.JsonPatchDocument, id: number, validateOnly?: boolean, bypassRules?: boolean): Promise; - /** - * @param {VSSInterfaces.JsonPatchDocument} document - * @param {string} project - Project ID or project name - * @param {string} type - * @param {boolean} validateOnly - * @param {boolean} bypassRules - */ - createWorkItem(customHeaders: any, document: VSSInterfaces.JsonPatchDocument, project: string, type: string, validateOnly?: boolean, bypassRules?: boolean): Promise; - /** - * Returns a single work item from a template - * - * @param {string} project - Project ID or project name - * @param {string} type - * @param {string} fields - * @param {Date} asOf - * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand - */ - getWorkItemTemplate(project: string, type: string, fields?: string, asOf?: Date, expand?: WorkItemTrackingInterfaces.WorkItemExpand): Promise; - /** - * @param {string} project - Project ID or project name - */ - getWorkItemTypeCategories(project: string): Promise; - /** - * Returns a the deltas between work item revisions - * - * @param {string} project - Project ID or project name - * @param {string} category - */ - getWorkItemTypeCategory(project: string, category: string): Promise; - /** - * Returns a the deltas between work item revisions - * - * @param {string} project - Project ID or project name - * @param {string} type - */ - getWorkItemType(project: string, type: string): Promise; - /** - * @param {string} project - Project ID or project name - */ - getWorkItemTypes(project: string): Promise; - /** - * Returns the dependent fields for the corresponding workitem type and fieldname - * - * @param {string} project - Project ID or project name - * @param {string} type - * @param {string} field - */ - getDependentFields(project: string, type: string, field: string): Promise; - /** - * Export work item type - * - * @param {string} project - Project ID or project name - * @param {string} type - * @param {boolean} exportGlobalLists - */ - exportWorkItemTypeDefinition(project?: string, type?: string, exportGlobalLists?: boolean): Promise; - /** - * Add/updates a work item type - * - * @param {WorkItemTrackingInterfaces.WorkItemTypeTemplateUpdateModel} updateModel - * @param {string} project - Project ID or project name - */ - updateWorkItemTypeDefinition(updateModel: WorkItemTrackingInterfaces.WorkItemTypeTemplateUpdateModel, project?: string): Promise; - } - -} -declare module 'vso-node-api/interfaces/ReleaseInterfaces' { - import FormInputInterfaces = require('vso-node-api/interfaces/common/FormInputInterfaces'); - import VSSInterfaces = require('vso-node-api/interfaces/common/VSSInterfaces'); - export interface AgentArtifactDefinition { - alias: string; - artifactType: AgentArtifactType; - details: string; - name: string; - version: string; - } - export enum AgentArtifactType { - XamlBuild = 0, - Build = 1, - Jenkins = 2, - FileShare = 3, - Nuget = 4, - TfsOnPrem = 5, - GitHub = 6, - TFGit = 7, - ExternalTfsBuild = 8, - } - export interface ApprovalOptions { - releaseCreatorCanBeApprover: boolean; - requiredApproverCount: number; - } - export interface ApprovalPendingEvent { - } - export enum ApprovalStatus { - Undefined = 0, - Pending = 1, - Approved = 2, - Rejected = 4, - Reassigned = 6, - Canceled = 7, - Skipped = 8, - } - export enum ApprovalType { - Undefined = 0, - PreDeploy = 1, - PostDeploy = 2, - } - export interface Artifact { - alias: string; - definitionReference: { - [key: string]: ArtifactSourceReference; - }; - id: number; - isPrimary: boolean; - type: string; - } - export interface ArtifactInstanceData { - accountName: string; - authenticationToken: string; - tfsUrl: string; - version: string; - } - export interface ArtifactMetadata { - alias: string; - instanceReference: BuildVersion; - } - export interface ArtifactProvider { - id: number; - name: string; - sourceUri: string; - version: string; - } - export interface ArtifactSourceId { - artifactTypeId: string; - sourceIdInputs: SourceIdInput[]; - } - export interface ArtifactSourceIdsQueryResult { - artifactSourceIds: ArtifactSourceId[]; - } - export interface ArtifactSourceReference { - id: string; - name: string; - } - export interface ArtifactTypeDefinition { - inputDescriptors: FormInputInterfaces.InputDescriptor[]; - name: string; - } - export interface ArtifactVersion { - artifactSourceId: number; - errorMessage: string; - versions: BuildVersion[]; - } - export interface ArtifactVersionQueryResult { - artifactVersions: ArtifactVersion[]; - } - export enum AuditAction { - Add = 1, - Update = 2, - Delete = 3, - } - export interface BuildVersion { - id: string; - name: string; - sourceBranch: string; - } - /** - * Represents a change associated with a build. - */ - export interface Change { - /** - * The author of the change. - */ - author: VSSInterfaces.IdentityRef; - /** - * The type of change. "commit", "changeset", etc. - */ - changeType: string; - /** - * The location of a user-friendly representation of the resource. - */ - displayUri: string; - /** - * Something that identifies the change. For a commit, this would be the SHA1. For a TFVC changeset, this would be the changeset id. - */ - id: string; - /** - * The location of the full representation of the resource. - */ - location: string; - /** - * A description of the change. This might be a commit message or changeset description. - */ - message: string; - /** - * A timestamp for the change. - */ - timestamp: Date; - } - export interface Condition { - conditionType: ConditionType; - name: string; - value: string; - } - export enum ConditionType { - Undefined = 0, - Event = 1, - EnvironmentState = 2, - } - export interface ConfigurationVariableValue { - isSecret: boolean; - value: string; - } - export interface Consumer { - consumerId: number; - consumerName: string; - } - export interface DeploymentAttempt { - attempt: number; - /** - * Error log to show any unexpected error that occurred during executing deploy step - */ - errorLog: string; - id: number; - job: ReleaseTask; - runPlanId: string; - tasks: ReleaseTask[]; - } - /** - * Defines policy on environment queuing at Release Management side queue. We will send to Environment Runner [creating pre-deploy and other steps] only when the policies mentioned are satisfied. - */ - export interface EnvironmentExecutionPolicy { - /** - * This policy decides, how many environments would be with Environment Runner. - */ - concurrencyCount: number; - /** - * Queue depth in the EnvironmentQueue table, this table keeps the environment entries till Environment Runner is free [as per it's policy] to take another environment for running. - */ - queueDepthCount: number; - } - export enum EnvironmentStatus { - Undefined = 0, - NotStarted = 1, - Pending = 2, - Succeeded = 3, - Rejected = 4, - InProgress = 5, - Canceled = 6, - Queued = 7, - } - export interface Issue { - issueType: string; - message: string; - } - export interface RealtimeReleaseEvent { - projectId: string; - releaseId: number; - } - export interface Release { - artifacts: Artifact[]; - createdBy: VSSInterfaces.IdentityRef; - createdOn: Date; - description: string; - environments: ReleaseEnvironment[]; - id: number; - keepForever: boolean; - modifiedBy: VSSInterfaces.IdentityRef; - modifiedOn: Date; - name: string; - poolName: string; - reason: ReleaseReason; - releaseDefinition: ShallowReference; - releaseNameFormat: string; - status: ReleaseStatus; - variables: { - [key: string]: ConfigurationVariableValue; - }; - } - export interface ReleaseApproval { - approvalType: ApprovalType; - approvedBy: VSSInterfaces.IdentityRef; - approver: VSSInterfaces.IdentityRef; - attempt: number; - comments: string; - createdOn: Date; - history: ReleaseApprovalHistory[]; - id: number; - isAutomated: boolean; - isNotificationOn: boolean; - modifiedOn: Date; - rank: number; - release: ShallowReference; - releaseDefinition: ShallowReference; - releaseEnvironment: ShallowReference; - revision: number; - status: ApprovalStatus; - trialNumber: number; - } - export interface ReleaseApprovalHistory { - approver: VSSInterfaces.IdentityRef; - changedBy: VSSInterfaces.IdentityRef; - comments: string; - createdOn: Date; - modifiedOn: Date; - revision: number; - } - export interface ReleaseArtifact { - artifactProvider: ArtifactProvider; - artifactType: string; - definitionData: string; - definitionId: number; - description: string; - id: number; - name: string; - releaseId: number; - } - export interface ReleaseDefinition { - artifacts: Artifact[]; - createdBy: VSSInterfaces.IdentityRef; - createdOn: Date; - environments: ReleaseDefinitionEnvironment[]; - id: number; - modifiedBy: VSSInterfaces.IdentityRef; - modifiedOn: Date; - name: string; - releaseNameFormat: string; - retentionPolicy: RetentionPolicy; - revision: number; - triggers: ReleaseTrigger[]; - variables: { - [key: string]: ConfigurationVariableValue; - }; - } - export interface ReleaseDefinitionApprovals { - approvalOptions: ApprovalOptions; - approvals: ReleaseDefinitionApprovalStep[]; - } - export interface ReleaseDefinitionApprovalStep extends ReleaseDefinitionEnvironmentStep { - approver: VSSInterfaces.IdentityRef; - isAutomated: boolean; - isNotificationOn: boolean; - rank: number; - } - export interface ReleaseDefinitionDeployStep extends ReleaseDefinitionEnvironmentStep { - /** - * The list of steps for this definition. - */ - tasks: WorkflowTask[]; - } - export interface ReleaseDefinitionEnvironment { - conditions: Condition[]; - demands: any[]; - deployStep: ReleaseDefinitionDeployStep; - executionPolicy: EnvironmentExecutionPolicy; - id: number; - name: string; - owner: VSSInterfaces.IdentityRef; - postDeployApprovals: ReleaseDefinitionApprovals; - preDeployApprovals: ReleaseDefinitionApprovals; - queueId: number; - rank: number; - runOptions: { - [key: string]: string; - }; - variables: { - [key: string]: ConfigurationVariableValue; - }; - } - export interface ReleaseDefinitionEnvironmentStep { - id: number; - } - export interface ReleaseDefinitionEnvironmentSummary { - id: number; - lastReleases: ShallowReference[]; - name: string; - } - export interface ReleaseDefinitionEnvironmentTemplate { - canDelete: boolean; - category: string; - description: string; - environment: ReleaseDefinitionEnvironment; - iconTaskId: string; - id: string; - name: string; - } - export enum ReleaseDefinitionExpands { - None = 0, - Environments = 2, - Artifacts = 4, - } - export interface ReleaseDefinitionRevision { - changedBy: VSSInterfaces.IdentityRef; - changedDate: Date; - changeType: AuditAction; - definitionId: number; - definitionUrl: string; - revision: number; - } - export interface ReleaseDefinitionSummary { - environments: ReleaseDefinitionEnvironmentSummary[]; - releaseDefinition: ShallowReference; - releases: Release[]; - } - export interface ReleaseEnvironment { - conditions: Condition[]; - createdOn: Date; - definitionEnvironmentId: number; - demands: any[]; - deploySteps: DeploymentAttempt[]; - id: number; - modifiedOn: Date; - name: string; - owner: VSSInterfaces.IdentityRef; - postApprovalsSnapshot: ReleaseDefinitionApprovals; - postDeployApprovals: ReleaseApproval[]; - preApprovalsSnapshot: ReleaseDefinitionApprovals; - preDeployApprovals: ReleaseApproval[]; - queueId: number; - rank: number; - releaseId: number; - runOptions: { - [key: string]: string; - }; - scheduledDeploymentTime: Date; - status: EnvironmentStatus; - variables: { - [key: string]: ConfigurationVariableValue; - }; - workflowTasks: WorkflowTask[]; - } - export interface ReleaseEnvironmentCompletedEvent { - createdByName: string; - definitionName: string; - environment: ReleaseEnvironment; - projectName: string; - releaseCreatedBy: VSSInterfaces.IdentityRef; - releaseLogsUri: string; - releaseName: string; - status: string; - title: string; - webAccessUri: string; - } - export enum ReleaseExpands { - None = 0, - Environments = 2, - Artifacts = 4, - Approvals = 8, - } - export enum ReleaseQueryOrder { - Descending = 0, - Ascending = 1, - } - export enum ReleaseReason { - None = 0, - Manual = 1, - ContinuousIntegration = 2, - Schedule = 3, - } - export interface ReleaseSchedule { - /** - * Days of the week to release - */ - daysToRelease: ScheduleDays; - /** - * Team Foundation Job Definition Job Id - */ - jobId: string; - /** - * Local time zone hour to start - */ - startHours: number; - /** - * Local time zone minute to start - */ - startMinutes: number; - /** - * Time zone Id of release schedule, such as 'UTC' - */ - timeZoneId: string; - } - export interface ReleaseStartMetadata { - artifacts: ArtifactMetadata[]; - definitionId: number; - description: string; - isDraft: boolean; - reason: ReleaseReason; - } - export enum ReleaseStatus { - Undefined = 0, - Draft = 1, - Abandoned = 2, - Active = 3, - } - export interface ReleaseTask { - agentName: string; - dateEnded: Date; - dateStarted: Date; - id: number; - issues: Issue[]; - lineCount: number; - name: string; - rank: number; - status: TaskStatus; - timelineRecordId: string; - } - export interface ReleaseTaskLogUpdatedEvent extends RealtimeReleaseEvent { - environmentId: number; - lines: string[]; - timelineRecordId: string; - } - export interface ReleaseTasksUpdatedEvent extends RealtimeReleaseEvent { - environmentId: number; - job: ReleaseTask; - releaseStepId: number; - tasks: ReleaseTask[]; - } - export interface ReleaseTrigger { - /** - * Artifact source alias for ArtifactSource trigger type - value is null for all other trigger types - */ - artifactAlias: string; - /** - * Release schedule for Schedule trigger type - value is null for all other trigger types - */ - schedule: ReleaseSchedule; - triggerType: ReleaseTriggerType; - } - export enum ReleaseTriggerType { - Undefined = 0, - ArtifactSource = 1, - Schedule = 2, - } - export interface ReleaseUpdatedEvent extends RealtimeReleaseEvent { - release: Release; - } - export interface ReleaseUpdateMetadata { - keepForever: boolean; - status: ReleaseStatus; - } - export interface ReleaseWorkItemRef { - id: string; - url: string; - } - export interface RetentionPolicy { - daysToKeep: number; - } - export enum ScheduleDays { - None = 0, - Monday = 1, - Tuesday = 2, - Wednesday = 4, - Thursday = 8, - Friday = 16, - Saturday = 32, - Sunday = 64, - All = 127, - } - export interface ShallowReference { - id: number; - name: string; - url: string; - } - export interface SourceIdInput { - id: string; - name: string; - } - export enum TaskStatus { - Unknown = 0, - Pending = 1, - InProgress = 2, - Success = 3, - Failure = 4, - Canceled = 5, - Skipped = 6, - } - export interface TimeZone { - displayName: string; - id: string; - } - export interface TimeZoneList { - utcTimeZone: TimeZone; - validTimeZones: TimeZone[]; - } - export interface WorkflowTask { - alwaysRun: boolean; - continueOnError: boolean; - enabled: boolean; - inputs: { - [key: string]: string; - }; - name: string; - taskId: string; - version: string; - } - export var TypeInfo: { - AgentArtifactDefinition: { - fields: any; - }; - AgentArtifactType: { - enumValues: { - "xamlBuild": number; - "build": number; - "jenkins": number; - "fileShare": number; - "nuget": number; - "tfsOnPrem": number; - "gitHub": number; - "tFGit": number; - "externalTfsBuild": number; - }; - }; - ApprovalOptions: { - fields: any; - }; - ApprovalPendingEvent: { - fields: any; - }; - ApprovalStatus: { - enumValues: { - "undefined": number; - "pending": number; - "approved": number; - "rejected": number; - "reassigned": number; - "canceled": number; - "skipped": number; - }; - }; - ApprovalType: { - enumValues: { - "undefined": number; - "preDeploy": number; - "postDeploy": number; - }; - }; - Artifact: { - fields: any; - }; - ArtifactInstanceData: { - fields: any; - }; - ArtifactMetadata: { - fields: any; - }; - ArtifactProvider: { - fields: any; - }; - ArtifactSourceId: { - fields: any; - }; - ArtifactSourceIdsQueryResult: { - fields: any; - }; - ArtifactSourceReference: { - fields: any; - }; - ArtifactTypeDefinition: { - fields: any; - }; - ArtifactVersion: { - fields: any; - }; - ArtifactVersionQueryResult: { - fields: any; - }; - AuditAction: { - enumValues: { - "add": number; - "update": number; - "delete": number; - }; - }; - BuildVersion: { - fields: any; - }; - Change: { - fields: any; - }; - Condition: { - fields: any; - }; - ConditionType: { - enumValues: { - "undefined": number; - "event": number; - "environmentState": number; - }; - }; - ConfigurationVariableValue: { - fields: any; - }; - Consumer: { - fields: any; - }; - DeploymentAttempt: { - fields: any; - }; - EnvironmentExecutionPolicy: { - fields: any; - }; - EnvironmentStatus: { - enumValues: { - "undefined": number; - "notStarted": number; - "pending": number; - "succeeded": number; - "rejected": number; - "inProgress": number; - "canceled": number; - "queued": number; - }; - }; - Issue: { - fields: any; - }; - RealtimeReleaseEvent: { - fields: any; - }; - Release: { - fields: any; - }; - ReleaseApproval: { - fields: any; - }; - ReleaseApprovalHistory: { - fields: any; - }; - ReleaseArtifact: { - fields: any; - }; - ReleaseDefinition: { - fields: any; - }; - ReleaseDefinitionApprovals: { - fields: any; - }; - ReleaseDefinitionApprovalStep: { - fields: any; - }; - ReleaseDefinitionDeployStep: { - fields: any; - }; - ReleaseDefinitionEnvironment: { - fields: any; - }; - ReleaseDefinitionEnvironmentStep: { - fields: any; - }; - ReleaseDefinitionEnvironmentSummary: { - fields: any; - }; - ReleaseDefinitionEnvironmentTemplate: { - fields: any; - }; - ReleaseDefinitionExpands: { - enumValues: { - "none": number; - "environments": number; - "artifacts": number; - }; - }; - ReleaseDefinitionRevision: { - fields: any; - }; - ReleaseDefinitionSummary: { - fields: any; - }; - ReleaseEnvironment: { - fields: any; - }; - ReleaseEnvironmentCompletedEvent: { - fields: any; - }; - ReleaseExpands: { - enumValues: { - "none": number; - "environments": number; - "artifacts": number; - "approvals": number; - }; - }; - ReleaseQueryOrder: { - enumValues: { - "descending": number; - "ascending": number; - }; - }; - ReleaseReason: { - enumValues: { - "none": number; - "manual": number; - "continuousIntegration": number; - "schedule": number; - }; - }; - ReleaseSchedule: { - fields: any; - }; - ReleaseStartMetadata: { - fields: any; - }; - ReleaseStatus: { - enumValues: { - "undefined": number; - "draft": number; - "abandoned": number; - "active": number; - }; - }; - ReleaseTask: { - fields: any; - }; - ReleaseTaskLogUpdatedEvent: { - fields: any; - }; - ReleaseTasksUpdatedEvent: { - fields: any; - }; - ReleaseTrigger: { - fields: any; - }; - ReleaseTriggerType: { - enumValues: { - "undefined": number; - "artifactSource": number; - "schedule": number; - }; - }; - ReleaseUpdatedEvent: { - fields: any; - }; - ReleaseUpdateMetadata: { - fields: any; - }; - ReleaseWorkItemRef: { - fields: any; - }; - RetentionPolicy: { - fields: any; - }; - ScheduleDays: { - enumValues: { - "none": number; - "monday": number; - "tuesday": number; - "wednesday": number; - "thursday": number; - "friday": number; - "saturday": number; - "sunday": number; - "all": number; - }; - }; - ShallowReference: { - fields: any; - }; - SourceIdInput: { - fields: any; - }; - TaskStatus: { - enumValues: { - "unknown": number; - "pending": number; - "inProgress": number; - "success": number; - "failure": number; - "canceled": number; - "skipped": number; - }; - }; - TimeZone: { - fields: any; - }; - TimeZoneList: { - fields: any; - }; - WorkflowTask: { - fields: any; - }; - }; - -} -declare module 'vso-node-api/ReleaseApi' { - - - import Q = require('q'); - import basem = require('vso-node-api/ClientApiBases'); - import VsoBaseInterfaces = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); - import FormInputInterfaces = require('vso-node-api/interfaces/common/FormInputInterfaces'); - import ReleaseInterfaces = require('vso-node-api/interfaces/ReleaseInterfaces'); - export interface IReleaseApi extends basem.ClientApiBase { - getAgentArtifactDefinitions(project: string, releaseId: number, onResult: (err: any, statusCode: number, agentartifacts: ReleaseInterfaces.AgentArtifactDefinition[]) => void): void; - getApprovals(project: string, assignedToFilter: string, statusFilter: ReleaseInterfaces.ApprovalStatus, releaseIdsFilter: number[], onResult: (err: any, statusCode: number, approvals: ReleaseInterfaces.ReleaseApproval[]) => void): void; - getApprovalHistory(project: string, approvalStepId: number, onResult: (err: any, statusCode: number, approval: ReleaseInterfaces.ReleaseApproval) => void): void; - updateReleaseApproval(approval: ReleaseInterfaces.ReleaseApproval, project: string, approvalId: number, onResult: (err: any, statusCode: number, approval: ReleaseInterfaces.ReleaseApproval) => void): void; - getReleaseChanges(project: string, releaseId: number, baseReleaseId: number, top: number, onResult: (err: any, statusCode: number, changes: ReleaseInterfaces.Change[]) => void): void; - createReleaseDefinition(releaseDefinition: ReleaseInterfaces.ReleaseDefinition, project: string, onResult: (err: any, statusCode: number, definition: ReleaseInterfaces.ReleaseDefinition) => void): void; - deleteReleaseDefinition(project: string, definitionId: number, onResult: (err: any, statusCode: number) => void): void; - getReleaseDefinition(project: string, definitionId: number, onResult: (err: any, statusCode: number, definition: ReleaseInterfaces.ReleaseDefinition) => void): void; - getReleaseDefinitions(project: string, searchText: string, artifactIdFilter: number, expand: ReleaseInterfaces.ReleaseDefinitionExpands, onResult: (err: any, statusCode: number, definitions: ReleaseInterfaces.ReleaseDefinition[]) => void): void; - getReleaseDefinitionsForArtifactSource(project: string, artifactType: string, artifactSourceId: string, expand: ReleaseInterfaces.ReleaseDefinitionExpands, onResult: (err: any, statusCode: number, definitions: ReleaseInterfaces.ReleaseDefinition[]) => void): void; - updateReleaseDefinition(releaseDefinition: ReleaseInterfaces.ReleaseDefinition, project: string, onResult: (err: any, statusCode: number, definition: ReleaseInterfaces.ReleaseDefinition) => void): void; - getReleaseEnvironment(project: string, releaseId: number, environmentId: number, onResult: (err: any, statusCode: number, environment: ReleaseInterfaces.ReleaseEnvironment) => void): void; - updateReleaseEnvironment(environmentUpdateData: any, project: string, releaseId: number, environmentId: number, onResult: (err: any, statusCode: number, environment: ReleaseInterfaces.ReleaseEnvironment) => void): void; - createDefinitionEnvironmentTemplate(template: ReleaseInterfaces.ReleaseDefinitionEnvironmentTemplate, project: string, onResult: (err: any, statusCode: number, environmenttemplate: ReleaseInterfaces.ReleaseDefinitionEnvironmentTemplate) => void): void; - deleteDefinitionEnvironmentTemplate(project: string, templateId: string, onResult: (err: any, statusCode: number) => void): void; - getDefinitionEnvironmentTemplate(project: string, templateId: string, onResult: (err: any, statusCode: number, environmenttemplate: ReleaseInterfaces.ReleaseDefinitionEnvironmentTemplate) => void): void; - listDefinitionEnvironmentTemplates(project: string, onResult: (err: any, statusCode: number, environmenttemplates: ReleaseInterfaces.ReleaseDefinitionEnvironmentTemplate[]) => void): void; - getInputValues(query: FormInputInterfaces.InputValuesQuery, project: string, onResult: (err: any, statusCode: number, inputvaluesquery: FormInputInterfaces.InputValuesQuery) => void): void; - getLogs(project: string, releaseId: number, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - getLog(project: string, releaseId: number, environmentId: number, taskId: number, attemptId: number, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - createRelease(releaseStartMetadata: ReleaseInterfaces.ReleaseStartMetadata, project: string, onResult: (err: any, statusCode: number, release: ReleaseInterfaces.Release) => void): void; - deleteRelease(project: string, releaseId: number, onResult: (err: any, statusCode: number) => void): void; - getRelease(project: string, releaseId: number, includeAllApprovals: boolean, onResult: (err: any, statusCode: number, release: ReleaseInterfaces.Release) => void): void; - getReleaseDefinitionSummary(project: string, definitionId: number, releaseCount: number, includeArtifact: boolean, onResult: (err: any, statusCode: number, release: ReleaseInterfaces.ReleaseDefinitionSummary) => void): void; - getReleases(project: string, definitionId: number, definitionEnvironmentId: number, searchText: string, createdBy: string, statusFilter: ReleaseInterfaces.ReleaseStatus, minCreatedTime: Date, maxCreatedTime: Date, queryOrder: ReleaseInterfaces.ReleaseQueryOrder, top: number, continuationToken: number, expand: ReleaseInterfaces.ReleaseExpands, artifactTypeId: string, artifactSourceId: number, artifactVersionId: string, onResult: (err: any, statusCode: number, releases: ReleaseInterfaces.Release[]) => void): void; - updateRelease(release: ReleaseInterfaces.Release, project: string, releaseId: number, onResult: (err: any, statusCode: number, release: ReleaseInterfaces.Release) => void): void; - updateReleaseResource(releaseUpdateMetadata: ReleaseInterfaces.ReleaseUpdateMetadata, project: string, releaseId: number, onResult: (err: any, statusCode: number, release: ReleaseInterfaces.Release) => void): void; - getReleaseDefinitionHistory(project: string, definitionId: number, onResult: (err: any, statusCode: number, revisions: ReleaseInterfaces.ReleaseDefinitionRevision[]) => void): void; - getReleaseDefinitionRevision(project: string, definitionId: number, revision: number, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - getArtifactsSources(project: string, typeId: string, onResult: (err: any, statusCode: number, source: ReleaseInterfaces.ArtifactSourceIdsQueryResult) => void): void; - getTasks(project: string, releaseId: number, environmentId: number, attemptId: number, onResult: (err: any, statusCode: number, tasks: ReleaseInterfaces.ReleaseTask[]) => void): void; - getArtifactTypeDefinitions(project: string, onResult: (err: any, statusCode: number, types: ReleaseInterfaces.ArtifactTypeDefinition[]) => void): void; - getArtifactVersions(project: string, releaseDefinitionId: number, onResult: (err: any, statusCode: number, version: ReleaseInterfaces.ArtifactVersionQueryResult) => void): void; - getArtifactVersionsForSources(artifacts: ReleaseInterfaces.Artifact[], project: string, onResult: (err: any, statusCode: number, version: ReleaseInterfaces.ArtifactVersionQueryResult) => void): void; - getReleaseWorkItemsRefs(project: string, releaseId: number, baseReleaseId: number, top: number, onResult: (err: any, statusCode: number, workitems: ReleaseInterfaces.ReleaseWorkItemRef[]) => void): void; - } - export interface IQReleaseApi extends basem.QClientApiBase { - getAgentArtifactDefinitions(project: string, releaseId: number): Promise; - getApprovals(project: string, assignedToFilter?: string, statusFilter?: ReleaseInterfaces.ApprovalStatus, releaseIdsFilter?: number[]): Promise; - getApprovalHistory(project: string, approvalStepId: number): Promise; - updateReleaseApproval(approval: ReleaseInterfaces.ReleaseApproval, project: string, approvalId: number): Promise; - getReleaseChanges(project: string, releaseId: number, baseReleaseId?: number, top?: number): Promise; - createReleaseDefinition(releaseDefinition: ReleaseInterfaces.ReleaseDefinition, project: string): Promise; - deleteReleaseDefinition(project: string, definitionId: number): Promise; - getReleaseDefinition(project: string, definitionId: number): Promise; - getReleaseDefinitions(project: string, searchText?: string, artifactIdFilter?: number, expand?: ReleaseInterfaces.ReleaseDefinitionExpands): Promise; - getReleaseDefinitionsForArtifactSource(project: string, artifactType: string, artifactSourceId: string, expand?: ReleaseInterfaces.ReleaseDefinitionExpands): Promise; - updateReleaseDefinition(releaseDefinition: ReleaseInterfaces.ReleaseDefinition, project: string): Promise; - getReleaseEnvironment(project: string, releaseId: number, environmentId: number): Promise; - updateReleaseEnvironment(environmentUpdateData: any, project: string, releaseId: number, environmentId: number): Promise; - createDefinitionEnvironmentTemplate(template: ReleaseInterfaces.ReleaseDefinitionEnvironmentTemplate, project: string): Promise; - deleteDefinitionEnvironmentTemplate(project: string, templateId: string): Promise; - getDefinitionEnvironmentTemplate(project: string, templateId: string): Promise; - listDefinitionEnvironmentTemplates(project: string): Promise; - getInputValues(query: FormInputInterfaces.InputValuesQuery, project: string): Promise; - getLogs(project: string, releaseId: number): Promise; - getLog(project: string, releaseId: number, environmentId: number, taskId: number, attemptId?: number): Promise; - createRelease(releaseStartMetadata: ReleaseInterfaces.ReleaseStartMetadata, project: string): Promise; - deleteRelease(project: string, releaseId: number): Promise; - getRelease(project: string, releaseId: number, includeAllApprovals?: boolean): Promise; - getReleaseDefinitionSummary(project: string, definitionId: number, releaseCount: number, includeArtifact?: boolean): Promise; - getReleases(project: string, definitionId?: number, definitionEnvironmentId?: number, searchText?: string, createdBy?: string, statusFilter?: ReleaseInterfaces.ReleaseStatus, minCreatedTime?: Date, maxCreatedTime?: Date, queryOrder?: ReleaseInterfaces.ReleaseQueryOrder, top?: number, continuationToken?: number, expand?: ReleaseInterfaces.ReleaseExpands, artifactTypeId?: string, artifactSourceId?: number, artifactVersionId?: string): Promise; - updateRelease(release: ReleaseInterfaces.Release, project: string, releaseId: number): Promise; - updateReleaseResource(releaseUpdateMetadata: ReleaseInterfaces.ReleaseUpdateMetadata, project: string, releaseId: number): Promise; - getReleaseDefinitionHistory(project: string, definitionId: number): Promise; - getReleaseDefinitionRevision(project: string, definitionId: number, revision: number): Promise; - getArtifactsSources(project: string, typeId?: string): Promise; - getTasks(project: string, releaseId: number, environmentId: number, attemptId?: number): Promise; - getArtifactTypeDefinitions(project: string): Promise; - getArtifactVersions(project: string, releaseDefinitionId: number): Promise; - getArtifactVersionsForSources(artifacts: ReleaseInterfaces.Artifact[], project: string): Promise; - getReleaseWorkItemsRefs(project: string, releaseId: number, baseReleaseId?: number, top?: number): Promise; - } - export class ReleaseApi extends basem.ClientApiBase implements IReleaseApi { - constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); - /** - * Returns the artifact details that automation agent requires - * - * @param {string} project - Project ID or project name - * @param {number} releaseId - * @param onResult callback function with the resulting ReleaseInterfaces.AgentArtifactDefinition[] - */ - getAgentArtifactDefinitions(project: string, releaseId: number, onResult: (err: any, statusCode: number, agentartifacts: ReleaseInterfaces.AgentArtifactDefinition[]) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {string} assignedToFilter - * @param {ReleaseInterfaces.ApprovalStatus} statusFilter - * @param {number[]} releaseIdsFilter - * @param onResult callback function with the resulting ReleaseInterfaces.ReleaseApproval[] - */ - getApprovals(project: string, assignedToFilter: string, statusFilter: ReleaseInterfaces.ApprovalStatus, releaseIdsFilter: number[], onResult: (err: any, statusCode: number, approvals: ReleaseInterfaces.ReleaseApproval[]) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} approvalStepId - * @param onResult callback function with the resulting ReleaseInterfaces.ReleaseApproval - */ - getApprovalHistory(project: string, approvalStepId: number, onResult: (err: any, statusCode: number, approval: ReleaseInterfaces.ReleaseApproval) => void): void; - /** - * @param {ReleaseInterfaces.ReleaseApproval} approval - * @param {string} project - Project ID or project name - * @param {number} approvalId - * @param onResult callback function with the resulting ReleaseInterfaces.ReleaseApproval - */ - updateReleaseApproval(approval: ReleaseInterfaces.ReleaseApproval, project: string, approvalId: number, onResult: (err: any, statusCode: number, approval: ReleaseInterfaces.ReleaseApproval) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} releaseId - * @param {number} baseReleaseId - * @param {number} top - * @param onResult callback function with the resulting ReleaseInterfaces.Change[] - */ - getReleaseChanges(project: string, releaseId: number, baseReleaseId: number, top: number, onResult: (err: any, statusCode: number, changes: ReleaseInterfaces.Change[]) => void): void; - /** - * @param {ReleaseInterfaces.ReleaseDefinition} releaseDefinition - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting ReleaseInterfaces.ReleaseDefinition - */ - createReleaseDefinition(releaseDefinition: ReleaseInterfaces.ReleaseDefinition, project: string, onResult: (err: any, statusCode: number, definition: ReleaseInterfaces.ReleaseDefinition) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} definitionId - * @param onResult callback function - */ - deleteReleaseDefinition(project: string, definitionId: number, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} definitionId - * @param onResult callback function with the resulting ReleaseInterfaces.ReleaseDefinition - */ - getReleaseDefinition(project: string, definitionId: number, onResult: (err: any, statusCode: number, definition: ReleaseInterfaces.ReleaseDefinition) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {string} searchText - * @param {number} artifactIdFilter - * @param {ReleaseInterfaces.ReleaseDefinitionExpands} expand - * @param onResult callback function with the resulting ReleaseInterfaces.ReleaseDefinition[] - */ - getReleaseDefinitions(project: string, searchText: string, artifactIdFilter: number, expand: ReleaseInterfaces.ReleaseDefinitionExpands, onResult: (err: any, statusCode: number, definitions: ReleaseInterfaces.ReleaseDefinition[]) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {string} artifactType - * @param {string} artifactSourceId - * @param {ReleaseInterfaces.ReleaseDefinitionExpands} expand - * @param onResult callback function with the resulting ReleaseInterfaces.ReleaseDefinition[] - */ - getReleaseDefinitionsForArtifactSource(project: string, artifactType: string, artifactSourceId: string, expand: ReleaseInterfaces.ReleaseDefinitionExpands, onResult: (err: any, statusCode: number, definitions: ReleaseInterfaces.ReleaseDefinition[]) => void): void; - /** - * @param {ReleaseInterfaces.ReleaseDefinition} releaseDefinition - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting ReleaseInterfaces.ReleaseDefinition - */ - updateReleaseDefinition(releaseDefinition: ReleaseInterfaces.ReleaseDefinition, project: string, onResult: (err: any, statusCode: number, definition: ReleaseInterfaces.ReleaseDefinition) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} releaseId - * @param {number} environmentId - * @param onResult callback function with the resulting ReleaseInterfaces.ReleaseEnvironment - */ - getReleaseEnvironment(project: string, releaseId: number, environmentId: number, onResult: (err: any, statusCode: number, environment: ReleaseInterfaces.ReleaseEnvironment) => void): void; - /** - * @param {any} environmentUpdateData - * @param {string} project - Project ID or project name - * @param {number} releaseId - * @param {number} environmentId - * @param onResult callback function with the resulting ReleaseInterfaces.ReleaseEnvironment - */ - updateReleaseEnvironment(environmentUpdateData: any, project: string, releaseId: number, environmentId: number, onResult: (err: any, statusCode: number, environment: ReleaseInterfaces.ReleaseEnvironment) => void): void; - /** - * @param {ReleaseInterfaces.ReleaseDefinitionEnvironmentTemplate} template - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting ReleaseInterfaces.ReleaseDefinitionEnvironmentTemplate - */ - createDefinitionEnvironmentTemplate(template: ReleaseInterfaces.ReleaseDefinitionEnvironmentTemplate, project: string, onResult: (err: any, statusCode: number, environmenttemplate: ReleaseInterfaces.ReleaseDefinitionEnvironmentTemplate) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {string} templateId - * @param onResult callback function - */ - deleteDefinitionEnvironmentTemplate(project: string, templateId: string, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {string} templateId - * @param onResult callback function with the resulting ReleaseInterfaces.ReleaseDefinitionEnvironmentTemplate - */ - getDefinitionEnvironmentTemplate(project: string, templateId: string, onResult: (err: any, statusCode: number, environmenttemplate: ReleaseInterfaces.ReleaseDefinitionEnvironmentTemplate) => void): void; - /** - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting ReleaseInterfaces.ReleaseDefinitionEnvironmentTemplate[] - */ - listDefinitionEnvironmentTemplates(project: string, onResult: (err: any, statusCode: number, environmenttemplates: ReleaseInterfaces.ReleaseDefinitionEnvironmentTemplate[]) => void): void; - /** - * @param {FormInputInterfaces.InputValuesQuery} query - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting FormInputInterfaces.InputValuesQuery - */ - getInputValues(query: FormInputInterfaces.InputValuesQuery, project: string, onResult: (err: any, statusCode: number, inputvaluesquery: FormInputInterfaces.InputValuesQuery) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} releaseId - * @param onResult callback function with the resulting ArrayBuffer - */ - getLogs(project: string, releaseId: number, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} releaseId - * @param {number} environmentId - * @param {number} taskId - * @param {number} attemptId - * @param onResult callback function with the resulting string - */ - getLog(project: string, releaseId: number, environmentId: number, taskId: number, attemptId: number, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * @param {ReleaseInterfaces.ReleaseStartMetadata} releaseStartMetadata - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting ReleaseInterfaces.Release - */ - createRelease(releaseStartMetadata: ReleaseInterfaces.ReleaseStartMetadata, project: string, onResult: (err: any, statusCode: number, release: ReleaseInterfaces.Release) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} releaseId - * @param onResult callback function - */ - deleteRelease(project: string, releaseId: number, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} releaseId - * @param {boolean} includeAllApprovals - * @param onResult callback function with the resulting ReleaseInterfaces.Release - */ - getRelease(project: string, releaseId: number, includeAllApprovals: boolean, onResult: (err: any, statusCode: number, release: ReleaseInterfaces.Release) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} definitionId - * @param {number} releaseCount - * @param {boolean} includeArtifact - * @param onResult callback function with the resulting ReleaseInterfaces.ReleaseDefinitionSummary - */ - getReleaseDefinitionSummary(project: string, definitionId: number, releaseCount: number, includeArtifact: boolean, onResult: (err: any, statusCode: number, release: ReleaseInterfaces.ReleaseDefinitionSummary) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} definitionId - * @param {number} definitionEnvironmentId - * @param {string} searchText - * @param {string} createdBy - * @param {ReleaseInterfaces.ReleaseStatus} statusFilter - * @param {Date} minCreatedTime - * @param {Date} maxCreatedTime - * @param {ReleaseInterfaces.ReleaseQueryOrder} queryOrder - * @param {number} top - * @param {number} continuationToken - * @param {ReleaseInterfaces.ReleaseExpands} expand - * @param {string} artifactTypeId - * @param {number} artifactSourceId - * @param {string} artifactVersionId - * @param onResult callback function with the resulting ReleaseInterfaces.Release[] - */ - getReleases(project: string, definitionId: number, definitionEnvironmentId: number, searchText: string, createdBy: string, statusFilter: ReleaseInterfaces.ReleaseStatus, minCreatedTime: Date, maxCreatedTime: Date, queryOrder: ReleaseInterfaces.ReleaseQueryOrder, top: number, continuationToken: number, expand: ReleaseInterfaces.ReleaseExpands, artifactTypeId: string, artifactSourceId: number, artifactVersionId: string, onResult: (err: any, statusCode: number, releases: ReleaseInterfaces.Release[]) => void): void; - /** - * @param {ReleaseInterfaces.Release} release - * @param {string} project - Project ID or project name - * @param {number} releaseId - * @param onResult callback function with the resulting ReleaseInterfaces.Release - */ - updateRelease(release: ReleaseInterfaces.Release, project: string, releaseId: number, onResult: (err: any, statusCode: number, release: ReleaseInterfaces.Release) => void): void; - /** - * @param {ReleaseInterfaces.ReleaseUpdateMetadata} releaseUpdateMetadata - * @param {string} project - Project ID or project name - * @param {number} releaseId - * @param onResult callback function with the resulting ReleaseInterfaces.Release - */ - updateReleaseResource(releaseUpdateMetadata: ReleaseInterfaces.ReleaseUpdateMetadata, project: string, releaseId: number, onResult: (err: any, statusCode: number, release: ReleaseInterfaces.Release) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} definitionId - * @param onResult callback function with the resulting ReleaseInterfaces.ReleaseDefinitionRevision[] - */ - getReleaseDefinitionHistory(project: string, definitionId: number, onResult: (err: any, statusCode: number, revisions: ReleaseInterfaces.ReleaseDefinitionRevision[]) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} definitionId - * @param {number} revision - * @param onResult callback function with the resulting string - */ - getReleaseDefinitionRevision(project: string, definitionId: number, revision: number, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {string} typeId - * @param onResult callback function with the resulting ReleaseInterfaces.ArtifactSourceIdsQueryResult - */ - getArtifactsSources(project: string, typeId: string, onResult: (err: any, statusCode: number, source: ReleaseInterfaces.ArtifactSourceIdsQueryResult) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} releaseId - * @param {number} environmentId - * @param {number} attemptId - * @param onResult callback function with the resulting ReleaseInterfaces.ReleaseTask[] - */ - getTasks(project: string, releaseId: number, environmentId: number, attemptId: number, onResult: (err: any, statusCode: number, tasks: ReleaseInterfaces.ReleaseTask[]) => void): void; - /** - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting ReleaseInterfaces.ArtifactTypeDefinition[] - */ - getArtifactTypeDefinitions(project: string, onResult: (err: any, statusCode: number, types: ReleaseInterfaces.ArtifactTypeDefinition[]) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} releaseDefinitionId - * @param onResult callback function with the resulting ReleaseInterfaces.ArtifactVersionQueryResult - */ - getArtifactVersions(project: string, releaseDefinitionId: number, onResult: (err: any, statusCode: number, version: ReleaseInterfaces.ArtifactVersionQueryResult) => void): void; - /** - * @param {ReleaseInterfaces.Artifact[]} artifacts - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting ReleaseInterfaces.ArtifactVersionQueryResult - */ - getArtifactVersionsForSources(artifacts: ReleaseInterfaces.Artifact[], project: string, onResult: (err: any, statusCode: number, version: ReleaseInterfaces.ArtifactVersionQueryResult) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} releaseId - * @param {number} baseReleaseId - * @param {number} top - * @param onResult callback function with the resulting ReleaseInterfaces.ReleaseWorkItemRef[] - */ - getReleaseWorkItemsRefs(project: string, releaseId: number, baseReleaseId: number, top: number, onResult: (err: any, statusCode: number, workitems: ReleaseInterfaces.ReleaseWorkItemRef[]) => void): void; - } - export class QReleaseApi extends basem.QClientApiBase implements IQReleaseApi { - api: ReleaseApi; - constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); - /** - * Returns the artifact details that automation agent requires - * - * @param {string} project - Project ID or project name - * @param {number} releaseId - */ - getAgentArtifactDefinitions(project: string, releaseId: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {string} assignedToFilter - * @param {ReleaseInterfaces.ApprovalStatus} statusFilter - * @param {number[]} releaseIdsFilter - */ - getApprovals(project: string, assignedToFilter?: string, statusFilter?: ReleaseInterfaces.ApprovalStatus, releaseIdsFilter?: number[]): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} approvalStepId - */ - getApprovalHistory(project: string, approvalStepId: number): Promise; - /** - * @param {ReleaseInterfaces.ReleaseApproval} approval - * @param {string} project - Project ID or project name - * @param {number} approvalId - */ - updateReleaseApproval(approval: ReleaseInterfaces.ReleaseApproval, project: string, approvalId: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} releaseId - * @param {number} baseReleaseId - * @param {number} top - */ - getReleaseChanges(project: string, releaseId: number, baseReleaseId?: number, top?: number): Promise; - /** - * @param {ReleaseInterfaces.ReleaseDefinition} releaseDefinition - * @param {string} project - Project ID or project name - */ - createReleaseDefinition(releaseDefinition: ReleaseInterfaces.ReleaseDefinition, project: string): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} definitionId - */ - deleteReleaseDefinition(project: string, definitionId: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} definitionId - */ - getReleaseDefinition(project: string, definitionId: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {string} searchText - * @param {number} artifactIdFilter - * @param {ReleaseInterfaces.ReleaseDefinitionExpands} expand - */ - getReleaseDefinitions(project: string, searchText?: string, artifactIdFilter?: number, expand?: ReleaseInterfaces.ReleaseDefinitionExpands): Promise; - /** - * @param {string} project - Project ID or project name - * @param {string} artifactType - * @param {string} artifactSourceId - * @param {ReleaseInterfaces.ReleaseDefinitionExpands} expand - */ - getReleaseDefinitionsForArtifactSource(project: string, artifactType: string, artifactSourceId: string, expand?: ReleaseInterfaces.ReleaseDefinitionExpands): Promise; - /** - * @param {ReleaseInterfaces.ReleaseDefinition} releaseDefinition - * @param {string} project - Project ID or project name - */ - updateReleaseDefinition(releaseDefinition: ReleaseInterfaces.ReleaseDefinition, project: string): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} releaseId - * @param {number} environmentId - */ - getReleaseEnvironment(project: string, releaseId: number, environmentId: number): Promise; - /** - * @param {any} environmentUpdateData - * @param {string} project - Project ID or project name - * @param {number} releaseId - * @param {number} environmentId - */ - updateReleaseEnvironment(environmentUpdateData: any, project: string, releaseId: number, environmentId: number): Promise; - /** - * @param {ReleaseInterfaces.ReleaseDefinitionEnvironmentTemplate} template - * @param {string} project - Project ID or project name - */ - createDefinitionEnvironmentTemplate(template: ReleaseInterfaces.ReleaseDefinitionEnvironmentTemplate, project: string): Promise; - /** - * @param {string} project - Project ID or project name - * @param {string} templateId - */ - deleteDefinitionEnvironmentTemplate(project: string, templateId: string): Promise; - /** - * @param {string} project - Project ID or project name - * @param {string} templateId - */ - getDefinitionEnvironmentTemplate(project: string, templateId: string): Promise; - /** - * @param {string} project - Project ID or project name - */ - listDefinitionEnvironmentTemplates(project: string): Promise; - /** - * @param {FormInputInterfaces.InputValuesQuery} query - * @param {string} project - Project ID or project name - */ - getInputValues(query: FormInputInterfaces.InputValuesQuery, project: string): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} releaseId - */ - getLogs(project: string, releaseId: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} releaseId - * @param {number} environmentId - * @param {number} taskId - * @param {number} attemptId - */ - getLog(project: string, releaseId: number, environmentId: number, taskId: number, attemptId?: number): Promise; - /** - * @param {ReleaseInterfaces.ReleaseStartMetadata} releaseStartMetadata - * @param {string} project - Project ID or project name - */ - createRelease(releaseStartMetadata: ReleaseInterfaces.ReleaseStartMetadata, project: string): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} releaseId - */ - deleteRelease(project: string, releaseId: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} releaseId - * @param {boolean} includeAllApprovals - */ - getRelease(project: string, releaseId: number, includeAllApprovals?: boolean): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} definitionId - * @param {number} releaseCount - * @param {boolean} includeArtifact - */ - getReleaseDefinitionSummary(project: string, definitionId: number, releaseCount: number, includeArtifact?: boolean): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} definitionId - * @param {number} definitionEnvironmentId - * @param {string} searchText - * @param {string} createdBy - * @param {ReleaseInterfaces.ReleaseStatus} statusFilter - * @param {Date} minCreatedTime - * @param {Date} maxCreatedTime - * @param {ReleaseInterfaces.ReleaseQueryOrder} queryOrder - * @param {number} top - * @param {number} continuationToken - * @param {ReleaseInterfaces.ReleaseExpands} expand - * @param {string} artifactTypeId - * @param {number} artifactSourceId - * @param {string} artifactVersionId - */ - getReleases(project: string, definitionId?: number, definitionEnvironmentId?: number, searchText?: string, createdBy?: string, statusFilter?: ReleaseInterfaces.ReleaseStatus, minCreatedTime?: Date, maxCreatedTime?: Date, queryOrder?: ReleaseInterfaces.ReleaseQueryOrder, top?: number, continuationToken?: number, expand?: ReleaseInterfaces.ReleaseExpands, artifactTypeId?: string, artifactSourceId?: number, artifactVersionId?: string): Promise; - /** - * @param {ReleaseInterfaces.Release} release - * @param {string} project - Project ID or project name - * @param {number} releaseId - */ - updateRelease(release: ReleaseInterfaces.Release, project: string, releaseId: number): Promise; - /** - * @param {ReleaseInterfaces.ReleaseUpdateMetadata} releaseUpdateMetadata - * @param {string} project - Project ID or project name - * @param {number} releaseId - */ - updateReleaseResource(releaseUpdateMetadata: ReleaseInterfaces.ReleaseUpdateMetadata, project: string, releaseId: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} definitionId - */ - getReleaseDefinitionHistory(project: string, definitionId: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} definitionId - * @param {number} revision - */ - getReleaseDefinitionRevision(project: string, definitionId: number, revision: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {string} typeId - */ - getArtifactsSources(project: string, typeId?: string): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} releaseId - * @param {number} environmentId - * @param {number} attemptId - */ - getTasks(project: string, releaseId: number, environmentId: number, attemptId?: number): Promise; - /** - * @param {string} project - Project ID or project name - */ - getArtifactTypeDefinitions(project: string): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} releaseDefinitionId - */ - getArtifactVersions(project: string, releaseDefinitionId: number): Promise; - /** - * @param {ReleaseInterfaces.Artifact[]} artifacts - * @param {string} project - Project ID or project name - */ - getArtifactVersionsForSources(artifacts: ReleaseInterfaces.Artifact[], project: string): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} releaseId - * @param {number} baseReleaseId - * @param {number} top - */ - getReleaseWorkItemsRefs(project: string, releaseId: number, baseReleaseId?: number, top?: number): Promise; - } - -} -declare module 'vso-node-api/handlers/apiversion' { - - import VsoBaseInterfaces = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); - export class ApiVersionHandler implements VsoBaseInterfaces.IRequestHandler { - apiVersion: string; - constructor(apiVersion: string); - prepareRequest(options: any): void; - canHandleAuthentication(res: VsoBaseInterfaces.IHttpResponse): boolean; - handleAuthentication(httpClient: any, protocol: any, options: any, objs: any, finalCallback: any): void; - } - -} -declare module 'vso-node-api/handlers/basiccreds' { - - import VsoBaseInterfaces = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); - export class BasicCredentialHandler implements VsoBaseInterfaces.IRequestHandler { - username: string; - password: string; - constructor(username: string, password: string); - prepareRequest(options: any): void; - canHandleAuthentication(res: VsoBaseInterfaces.IHttpResponse): boolean; - handleAuthentication(httpClient: any, protocol: any, options: any, objs: any, finalCallback: any): void; - } - -} -declare module 'vso-node-api/handlers/bearertoken' { - - import VsoBaseInterfaces = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); - export class BearerCredentialHandler implements VsoBaseInterfaces.IRequestHandler { - token: string; - constructor(token: string); - prepareRequest(options: any): void; - canHandleAuthentication(res: VsoBaseInterfaces.IHttpResponse): boolean; - handleAuthentication(httpClient: any, protocol: any, options: any, objs: any, finalCallback: any): void; - } - -} -declare module 'vso-node-api/handlers/ntlm' { - - import VsoBaseInterfaces = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); - export class NtlmCredentialHandler implements VsoBaseInterfaces.IRequestHandler { - username: string; - password: string; - workstation: string; - domain: string; - constructor(username: string, password: string, domain?: string, workstation?: string); - prepareRequest(options: any): void; - canHandleAuthentication(res: VsoBaseInterfaces.IHttpResponse): boolean; - handleAuthentication(httpClient: any, protocol: any, options: any, objs: any, finalCallback: any): void; - private sendType1Message(httpClient, protocol, options, objs, keepaliveAgent, callback); - private sendType3Message(httpClient, protocol, options, objs, keepaliveAgent, res, callback); - } - -} -declare module 'vso-node-api/WebApi' { - import VsoBaseInterfaces = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); - import buildm = require('vso-node-api/BuildApi'); - import corem = require('vso-node-api/CoreApi'); - import filecontainerm = require('vso-node-api/FileContainerApi'); - import gallerym = require('vso-node-api/GalleryApi'); - import gitm = require('vso-node-api/GitApi'); - import taskagentm = require('vso-node-api/TaskAgentApi'); - import taskm = require('vso-node-api/TaskApi'); - import testm = require('vso-node-api/TestApi'); - import tfvcm = require('vso-node-api/TfvcApi'); - import workitemtrackingm = require('vso-node-api/WorkItemTrackingApi'); - import releasem = require('vso-node-api/ReleaseApi'); - import apivm = require('vso-node-api/handlers/apiversion'); - import basicm = require('vso-node-api/handlers/basiccreds'); - import bearm = require('vso-node-api/handlers/bearertoken'); - import ntlmm = require('vso-node-api/handlers/ntlm'); - /** - * Methods to return handler objects (see handlers folder) - */ - export function getVersionHandler(apiVersion: string): apivm.ApiVersionHandler; - export function getBasicHandler(username: string, password: string): basicm.BasicCredentialHandler; - export function getNtlmHandler(username: string, password: string, workstation?: string, domain?: string): ntlmm.NtlmCredentialHandler; - export function getBearerHandler(token: any): bearm.BearerCredentialHandler; - export class WebApi { - serverUrl: string; - authHandler: VsoBaseInterfaces.IRequestHandler; - constructor(serverUrl: string, authHandler: VsoBaseInterfaces.IRequestHandler); - /** - * Each factory method can take a serverUrl and a list of handlers - * if these aren't provided, the default url and auth handler given to the constructor for this class will be used - */ - getBuildApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): buildm.IBuildApi; - /** - * Each API has a method here to create the "vanilla" API as well as one with a Q Promise wrapper. - */ - getBuildApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): buildm.IBuildApi; - getCoreApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): corem.ICoreApi; - getQCoreApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): corem.IQCoreApi; - getFileContainerApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): filecontainerm.IFileContainerApi; - getQFileContainerApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): filecontainerm.IQFileContainerApi; - getGalleryApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): gallerym.IGalleryApi; - getGalleryApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): gallerym.IGalleryApi; - getGitApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): gitm.IGitApi; - getQGitApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): gitm.IQGitApi; - getTaskApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): taskm.ITaskApi; - getQTaskApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): taskm.IQTaskApi; - getTaskAgentApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): taskagentm.ITaskAgentApi; - getTaskAgentApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): taskagentm.IQTaskAgentApi; - getTestApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): testm.ITestApi; - getQTestApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): testm.IQTestApi; - getTfvcApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): tfvcm.ITfvcApi; - getQTfvcApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): tfvcm.IQTfvcApi; - getWorkItemTrackingApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): workitemtrackingm.IWorkItemTrackingApi; - getQWorkItemTrackingApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): workitemtrackingm.IQWorkItemTrackingApi; - getReleaseApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): releasem.IReleaseApi; - getQReleaseApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): releasem.IQReleaseApi; - } - -} diff --git a/typings/winreg/winreg.d.ts b/typings/winreg/winreg.d.ts index 53c818ba..3860bc23 100644 --- a/typings/winreg/winreg.d.ts +++ b/typings/winreg/winreg.d.ts @@ -1,57 +1,338 @@ -// Type definitions for winreg 0.0.12 -// Project: https://www.npmjs.com/package/winreg +// Type definitions for Winreg v1.2.0 +// Project: http://fresc81.github.io/node-winreg/ +// Definitions by: RX14 , BobBuehler +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -declare module "winreg" { - export = winreg; -} - -interface WinregOptions { - host?: string; - hive: Hive; - key: string; -} +declare var Winreg: WinregStatic; -declare enum Hive { - HKLM, - HKCU, - HKCR, - HKCC, - HKU -} +interface WinregStatic { + /** + * Creates a registry object, which provides access to a single registry key. + * Note: This class is returned by a call to ```require('winreg')```. + * + * @public + * @class + * + * @param {@link Options} options - the options + * + * @example + * var Registry = require('winreg') + * , autoStartCurrentUser = new Registry({ + * hive: Registry.HKCU, + * key: '\\Software\\Microsoft\\Windows\\CurrentVersion\\Run' + * }); + */ + new (options: Winreg.Options): Winreg.Registry; + + /** + * Registry hive key HKEY_LOCAL_MACHINE. + * Note: For writing to this hive your program has to run with admin privileges. + */ + HKLM: string; + + /** + * Registry hive key HKEY_CURRENT_USER. + */ + HKCU: string; + + /** + * Registry hive key HKEY_CLASSES_ROOT. + * Note: For writing to this hive your program has to run with admin privileges. + */ + HKCR: string; + + /** + * Registry hive key HKEY_USERS. + * Note: For writing to this hive your program has to run with admin privileges. + */ + HKU: string; + + /** + * Registry hive key HKEY_CURRENT_CONFIG. + * Note: For writing to this hive your program has to run with admin privileges. + */ + HKCC: string; + + /** + * Collection of available registry hive keys. + */ + HIVES: Array; + + /** + * Registry value type STRING. + * + * Values of this type contain a string. + */ + REG_SZ: string; + + /** + * Registry value type MULTILINE_STRING. + * + * Values of this type contain a multiline string. + */ + REG_MULTI_SZ: string; -interface WinregValue { - host: string; - hive: string; - key: string; - name: string; - type: string; - value: string; + /** + * Registry value type EXPANDABLE_STRING. + * + * Values of this type contain an expandable string. + */ + REG_EXPAND_SZ: string; + + /** + * Registry value type DOUBLE_WORD. + * + * Values of this type contain a double word (32 bit integer). + */ + REG_DWORD: string; + + /** + * Registry value type QUAD_WORD. + * + * Values of this type contain a quad word (64 bit integer). + */ + REG_QWORD: string; + + /** + * Registry value type BINARY. + * + * Values of this type contain a binary value. + */ + REG_BINARY: string; + + /** + * Registry value type UNKNOWN. + * + * Values of this type contain a value of an unknown type. + */ + REG_NONE: string; + + /** + * Collection of available registry value types. + */ + REG_TYPES: Array; + + /** + * The name of the default value. May be used instead of the empty string literal for better readability. + */ + DEFAULT_VALUE: string; } -interface Winreg { - new (options: WinregOptions): Winreg; - host: string; - hive: string; - key: string; - path: string; - parent: Winreg; - - values: (callback: WinregCallback) => void; - keys: (callback: WinregCallback) => void; - get: (name: string, callback: WinregCallback) => void; - set: (name: string, type: string, value: WinregValue, callback: WinregCallback) => void; - remove: (name: string, callback: WinregCallback) => void; - create: (callback: WinregCallback) => void; - erase: (callback: WinregCallback) => void; - - HKLM: Hive; - HKCU: Hive; - HKCR: Hive; - HKCC: Hive; - HKU: Hive; +declare namespace Winreg { + export interface Options { + /** + * Optional hostname, must start with '\\' sequence. + */ + host?: string; + + /** + * Optional hive ID, default is HKLM. + */ + hive?: string; + + /** + * Optional key, default is the root key. + */ + key?: string; + + /** + * Optional registry hive architecture ('x86' or 'x64'; only valid on Windows 64 Bit Operating Systems). + */ + arch?: string; + } + + /** + * A registry object, which provides access to a single registry key. + */ + export interface Registry { + /** + * The hostname. + * @readonly + */ + host: string; + + /** + * The hive id. + * @readonly + */ + hive: string; + + /** + * The registry key name. + * @readonly + */ + key: string; + + /** + * The full path to the registry key. + * @readonly + */ + path: string; + + /** + * The registry hive architecture ('x86' or 'x64'). + * @readonly + */ + arch: string; + + /** + * Creates a new {@link Registry} instance that points to the parent registry key. + * @readonly + */ + parent: Registry; + + /** + * Retrieve all values from this registry key. + * @param {valuesCallback} cb - callback function + * @param {error=} cb.err - error object or null if successful + * @param {array=} cb.items - an array of {@link RegistryItem} objects + * @returns {Registry} this registry key object + */ + values(cb: (err: Error, result: Array) => void): Registry; + + /** + * Retrieve all subkeys from this registry key. + * @param {function (err, items)} cb - callback function + * @param {error=} cb.err - error object or null if successful + * @param {array=} cb.items - an array of {@link Registry} objects + * @returns {Registry} this registry key object + */ + keys(cb: (err: Error, result: Array) => void): Registry; + + /** + * Gets a named value from this registry key. + * @param {string} name - the value name, use {@link Registry.DEFAULT_VALUE} or an empty string for the default value + * @param {function (err, item)} cb - callback function + * @param {error=} cb.err - error object or null if successful + * @param {RegistryItem=} cb.item - the retrieved registry item + * @returns {Registry} this registry key object + */ + get(name: string, cb: (err: Error, result: Winreg.RegistryItem) => void): Registry; + + /** + * Sets a named value in this registry key, overwriting an already existing value. + * @param {string} name - the value name, use {@link Registry.DEFAULT_VALUE} or an empty string for the default value + * @param {string} type - the value type + * @param {string} value - the value + * @param {function (err)} cb - callback function + * @param {error=} cb.err - error object or null if successful + * @returns {Registry} this registry key object + */ + set(name: string, type: string, value: string, cb: (err: Error) => void): Registry; + + /** + * Remove a named value from this registry key. If name is empty, sets the default value of this key. + * Note: This key must be already existing. + * @param {string} name - the value name, use {@link Registry.DEFAULT_VALUE} or an empty string for the default value + * @param {function (err)} cb - callback function + * @param {error=} cb.err - error object or null if successful + * @returns {Registry} this registry key object + */ + remove(name: string, cb: (err: Error) => void): Registry; + + /** + * Remove all subkeys and values (including the default value) from this registry key. + * @param {function (err)} cb - callback function + * @param {error=} cb.err - error object or null if successful + * @returns {Registry} this registry key object + */ + clear(cb: (err: Error) => void): Registry; + + /** + * Alias for the clear method to keep it backward compatible. + * @method + * @deprecated Use {@link Registry#clear} or {@link Registry#destroy} in favour of this method. + * @param {function (err)} cb - callback function + * @param {error=} cb.err - error object or null if successful + * @returns {Registry} this registry key object + */ + erase(cb: (err: Error) => void): Registry; + + /** + * Delete this key and all subkeys from the registry. + * @param {function (err)} cb - callback function + * @param {error=} cb.err - error object or null if successful + * @returns {Registry} this registry key object + */ + destroy(cb: (err: Error) => void): Registry; + + /** + * Create this registry key. Note that this is a no-op if the key already exists. + * @param {function (err)} cb - callback function + * @param {error=} cb.err - error object or null if successful + * @returns {Registry} this registry key object + */ + create(cb: (err: Error) => void): Registry; + + /** + * Checks if this key already exists. + * @param {function (err, exists)} cb - callback function + * @param {error=} cb.err - error object or null if successful + * @param {boolean=} cb.exists - true if a registry key with this name already exists + * @returns {Registry} this registry key object + */ + keyExists(cb: (err: Error, exists: boolean) => void): Registry; + + /** + * Checks if a value with the given name already exists within this key. + * @param {string} name - the value name, use {@link Registry.DEFAULT_VALUE} or an empty string for the default value + * @param {function (err, exists)} cb - callback function + * @param {error=} cb.err - error object or null if successful + * @param {boolean=} cb.exists - true if a value with the given name was found in this key + * @returns {Registry} this registry key object + */ + valueExists(name: string, cb: (err: Error, exists: boolean) => void): Registry; + } + + /** + * A single registry value record. + * Objects of this type are created internally and returned by methods of {@link Registry} objects. + */ + export interface RegistryItem { + /** + * The hostname. + * @readonly + */ + host: string; + + /** + * The hive id. + * @readonly + */ + hive: string; + + /** + * The registry key. + * @readonly + */ + key: string; + + /** + * The value name. + * @readonly + */ + name: string; + + /** + * The value type. + * @readonly + */ + type: string; + + /** + * The value. + * @readonly + */ + value: string; + + /** + * The hive architecture. + * @readonly + */ + arch: string; + } } -interface WinregCallback { - (err: NodeJS.ErrnoException, val: T): void; +declare module "winreg" { + export = Winreg; } -declare var winreg: Winreg; \ No newline at end of file diff --git a/typings/xml2js/xml2js.d.ts b/typings/xml2js/xml2js.d.ts index 33ad6497..5fb4542d 100644 --- a/typings/xml2js/xml2js.d.ts +++ b/typings/xml2js/xml2js.d.ts @@ -1,16 +1,21 @@ // Type definitions for node-xml2js // Project: https://github.com/Leonidas-from-XIV/node-xml2js -// Definitions by: Michel Salib , Jason McNeil -// Definitions: https://github.com/borisyankov/DefinitelyTyped +// Definitions by: Michel Salib , Jason McNeil , Christopher Currens +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare module 'xml2js' { export = xml2js; - module xml2js { + namespace xml2js { function parseString(xml: string, callback: (err: any, result: any) => void): void; function parseString(xml: string, options: Options, callback: (err: any, result: any) => void): void; + var defaults: { + '0.1': Options; + '0.2': OptionsV2; + } + class Builder { constructor(options?: BuilderOptions); buildObject(rootObj: any): string; @@ -50,7 +55,8 @@ declare module 'xml2js' { interface Options { async?: boolean; attrkey?: string; - attrNameProcessors?: (name: string) => string; + attrNameProcessors?: [(name: string) => string]; + attrValueProcessors?: [(name: string) => string]; charkey?: string; charsAsChildren?: boolean; childkey?: string; @@ -64,10 +70,30 @@ declare module 'xml2js' { normalize?: boolean; normalizeTags?: boolean; strict?: boolean; - tagNameProcessors?: (name: string) => string; + tagNameProcessors?: [(name: string) => string]; trim?: boolean; validator?: Function; + valueProcessors?: [(name: string) => string]; xmlns?: boolean; } + + interface OptionsV2 extends Options { + preserveChildrenOrder?: boolean; + rootName?: string; + xmldec?: { + version: string; + encoding?: string; + standalone?: boolean; + }; + doctype?: any; + renderOpts?: { + pretty?: boolean; + indent?: string; + newline?: string; + }; + headless?: boolean; + chunkSize?: number; + cdata?: boolean; + } } } From c5816f1b2d0665c2bb2ad0cc0877fc2f83cc635d Mon Sep 17 00:00:00 2001 From: sfeldman Date: Tue, 20 Dec 2016 14:32:17 +0200 Subject: [PATCH 106/235] remove old vso-node-api from typings --- oldtypings/vso-node-api/vso-node-api.d.ts | 18339 -------------------- 1 file changed, 18339 deletions(-) delete mode 100644 oldtypings/vso-node-api/vso-node-api.d.ts diff --git a/oldtypings/vso-node-api/vso-node-api.d.ts b/oldtypings/vso-node-api/vso-node-api.d.ts deleted file mode 100644 index 9dc50cd5..00000000 --- a/oldtypings/vso-node-api/vso-node-api.d.ts +++ /dev/null @@ -1,18339 +0,0 @@ - - -declare module 'vso-node-api/Serialization' { - /** - * Metadata for deserializing an enum field on a contract/type - */ - export interface ContractEnumMetadata { - enumValues?: { - [name: string]: number; - }; - } - export interface SerializationData { - requestTypeMetadata?: ContractMetadata; - responseTypeMetadata?: ContractMetadata; - responseIsCollection: boolean; - } - /** - * Metadata for deserializing a particular field on a contract/type - */ - export interface ContractFieldMetadata { - isArray?: boolean; - isDate?: boolean; - enumType?: ContractEnumMetadata; - typeInfo?: ContractMetadata; - isDictionary?: boolean; - dictionaryKeyIsDate?: boolean; - dictionaryValueIsDate?: boolean; - dictionaryKeyEnumType?: ContractEnumMetadata; - dictionaryValueEnumType?: ContractEnumMetadata; - dictionaryValueTypeInfo?: ContractMetadata; - dictionaryValueFieldInfo?: ContractFieldMetadata; - } - /** - * Metadata required for deserializing a given type - */ - export interface ContractMetadata { - fields?: { - [fieldName: string]: ContractFieldMetadata; - }; - } - export interface IWebApiArrayResult { - count: number; - value: any[]; - } - /** - * Module for handling serialization and deserialization of data contracts - * (contracts sent from the server using the VSO default REST api serialization settings) - */ - export module ContractSerializer { - /** - * Process a contract in its raw form (e.g. date fields are Dates, and Enums are numbers) and - * return a pure JSON object that can be posted to REST endpoint. - * - * @param data The object to serialize - * @param contractMetadata The type info/metadata for the contract type being serialized - * @param preserveOriginal If true, don't modify the original object. False modifies the original object (the return value points to the data argument). - */ - function serialize(data: any, contractMetadata: ContractMetadata, preserveOriginal?: boolean): any; - /** - * Process a pure JSON object (e.g. that came from a REST call) and transform it into a JS object - * where date strings are converted to Date objects and enum values are converted from strings into - * their numerical value. - * - * @param data The object to deserialize - * @param contractMetadata The type info/metadata for the contract type being deserialize - * @param preserveOriginal If true, don't modify the original object. False modifies the original object (the return value points to the data argument). - * @param unwrapWrappedCollections If true check for wrapped arrays (REST apis will not return arrays directly as the root result but will instead wrap them in a { values: [], count: 0 } object. - */ - function deserialize(data: any, contractMetadata: ContractMetadata, preserveOriginal?: boolean, unwrapWrappedCollections?: boolean): any; - } - -} -declare module 'vso-node-api/interfaces/common/VsoBaseInterfaces' { - import Serialization = require('vso-node-api/Serialization'); - /** - * Information about the location of a REST API resource - */ - export interface ApiResourceLocation { - /** - * Area name for this resource - */ - area: string; - /** - * Unique Identifier for this location - */ - id: string; - /** - * Maximum api version that this resource supports (current server version for this resource) - */ - maxVersion: string; - /** - * Minimum api version that this resource supports - */ - minVersion: string; - /** - * The latest version of this resource location that is in "Release" (non-preview) mode - */ - releasedVersion: string; - /** - * Resource name - */ - resourceName: string; - /** - * The current resource version supported by this resource location - */ - resourceVersion: number; - /** - * This location's route template (templated relative path) - */ - routeTemplate: string; - } - export interface IHeaders { - [key: string]: any; - } - export interface IBasicCredentials { - username: string; - password: string; - } - export interface IRequestHandler { - prepareRequest(options: any): void; - canHandleAuthentication(res: IHttpResponse): boolean; - handleAuthentication(httpClient: any, protocol: any, options: any, objs: any, finalCallback: any): void; - } - export interface IHttpResponse { - statusCode?: number; - headers: any; - } - export interface IQCoreApi { - connect(): Promise; - } - export interface IHttpClient { - get(verb: string, requestUrl: string, headers: any, onResult: (err: any, res: IHttpResponse, contents: string) => void): void; - send(verb: string, requestUrl: string, objs: any, headers: any, onResult: (err: any, res: IHttpResponse, contents: string) => void): void; - sendFile(verb: string, requestUrl: string, content: NodeJS.ReadableStream, headers: any, onResult: (err: any, res: IHttpResponse, contents: string) => void): void; - getStream(requestUrl: string, apiVersion: string, headers: any, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - makeAcceptHeader(type: string, apiVersion: string): string; - request(protocol: any, options: any, body: any, onResult: (err: any, res: IHttpResponse, contents: string) => void): void; - } - export interface IRestClient { - baseUrl: string; - httpClient: IHttpClient; - getJson(relativeUrl: string, apiVersion: string, customHeaders: IHeaders, serializationData: Serialization.SerializationData, onResult: (err: any, statusCode: number, obj: any) => void): void; - options(requestUrl: string, onResult: (err: any, statusCode: number, obj: any) => void): void; - create(relativeUrl: string, apiVersion: string, resources: any, customHeaders: IHeaders, serializationData: Serialization.SerializationData, onResult: (err: any, statusCode: number, obj: any) => void): void; - update(relativeUrl: string, apiVersion: string, resources: any, customHeaders: IHeaders, serializationData: Serialization.SerializationData, onResult: (err: any, statusCode: number, obj: any) => void): void; - uploadFile(verb: string, relativeUrl: string, apiVersion: string, filePath: string, customHeaders: IHeaders, serializationData: Serialization.SerializationData, onResult: (err: any, statusCode: number, obj: any) => void): void; - uploadStream(verb: string, relativeUrl: string, apiVersion: string, contentStream: NodeJS.ReadableStream, customHeaders: IHeaders, serializationData: Serialization.SerializationData, onResult: (err: any, statusCode: number, obj: any) => void): void; - replace(relativeUrl: string, apiVersion: string, resources: any, customHeaders: IHeaders, serializationData: Serialization.SerializationData, onResult: (err: any, statusCode: number, obj: any) => void): void; - } - -} -declare module 'vso-node-api/HttpClient' { - - import http = require("http"); - import ifm = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); - export class HttpClient implements ifm.IHttpClient { - userAgent: string; - handlers: ifm.IRequestHandler[]; - socketTimeout: number; - isSsl: boolean; - constructor(userAgent: string, handlers?: ifm.IRequestHandler[], socketTimeout?: number); - get(verb: string, requestUrl: string, headers: ifm.IHeaders, onResult: (err: any, res: http.ClientResponse, contents: string) => void): void; - send(verb: string, requestUrl: string, objs: any, headers: ifm.IHeaders, onResult: (err: any, res: http.ClientResponse, contents: string) => void): void; - sendFile(verb: string, requestUrl: string, content: NodeJS.ReadableStream, headers: ifm.IHeaders, onResult: (err: any, res: http.ClientResponse, contents: string) => void): void; - getStream(requestUrl: string, apiVersion: string, type: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - makeAcceptHeader(type: string, apiVersion: string): string; - _getOptions(method: string, requestUrl: string, headers: any): any; - request(protocol: any, options: any, objs: any, onResult: (err: any, res: http.ClientResponse, contents: string) => void): void; - requestInternal(protocol: any, options: any, objs: any, onResult: (err: any, res: http.ClientResponse, contents: string) => void): void; - } - -} -declare module 'vso-node-api/RestClient' { - - import ifm = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); - import Serialization = require('vso-node-api/Serialization'); - export function processResponse(url: any, res: any, contents: any, serializationData: Serialization.SerializationData, onResult: any): void; - export function enumToString(enumType: any, enumValue: number, camelCase: boolean): any; - export class RestClient implements ifm.IRestClient { - baseUrl: string; - basePath: string; - httpClient: ifm.IHttpClient; - constructor(httpClient: ifm.IHttpClient); - getJson(url: string, apiVersion: string, customHeaders: ifm.IHeaders, serializationData: Serialization.SerializationData, onResult: (err: any, statusCode: number, obj: any) => void): void; - options(url: string, onResult: (err: any, statusCode: number, obj: any) => void): void; - delete(url: string, apiVersion: string, customHeaders: ifm.IHeaders, serializationData: Serialization.SerializationData, onResult: (err: any, statusCode: number, obj: any) => void): void; - create(url: string, apiVersion: string, resources: any, customHeaders: ifm.IHeaders, serializationData: Serialization.SerializationData, onResult: (err: any, statusCode: number, obj: any) => void): void; - update(url: string, apiVersion: string, resources: any, customHeaders: ifm.IHeaders, serializationData: Serialization.SerializationData, onResult: (err: any, statusCode: number, obj: any) => void): void; - uploadFile(verb: string, url: string, apiVersion: string, filePath: string, customHeaders: ifm.IHeaders, serializationData: Serialization.SerializationData, onResult: (err: any, statusCode: number, obj: any) => void): void; - uploadStream(verb: string, url: string, apiVersion: string, contentStream: NodeJS.ReadableStream, customHeaders: ifm.IHeaders, serializationData: Serialization.SerializationData, onResult: (err: any, statusCode: number, obj: any) => void): void; - replace(url: string, apiVersion: string, resources: any, customHeaders: ifm.IHeaders, serializationData: Serialization.SerializationData, onResult: (err: any, statusCode: number, obj: any) => void): void; - _getJson(verb: string, url: string, apiVersion: string, customHeaders: ifm.IHeaders, serializationData: Serialization.SerializationData, onResult: (err: any, statusCode: number, obj: any) => void): void; - _sendJson(verb: string, url: string, apiVersion: string, data: any, customHeaders: ifm.IHeaders, serializationData: Serialization.SerializationData, onResult: (err: any, statusCode: number, obj: any) => void): void; - } - -} -declare module 'vso-node-api/VsoClient' { - - - import restm = require('vso-node-api/RestClient'); - import ifm = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); - export interface ClientVersioningData { - /** - * The api version string to send in the request (e.g. "1.0" or "2.0-preview.2") - */ - apiVersion?: string; - /** - * The request path string to send the request to. Looked up via an options request with the location id. - */ - requestUrl?: string; - } - export class InvalidApiResourceVersionError implements Error { - name: string; - message: string; - constructor(message?: string); - } - /** - * Base class that should be used (derived from) to make requests to VSS REST apis - */ - export class VsoClient { - private static APIS_RELATIVE_PATH; - private static PREVIEW_INDICATOR; - private _locationsByAreaPromises; - private _initializationPromise; - restClient: ifm.IRestClient; - baseUrl: string; - basePath: string; - constructor(baseUrl: string, restClient: restm.RestClient); - /** - * Compares the version on the server (locationVersion) to the api version given by the client (apiVersion). - * Returns a negative value if the location version is older (less than) the api version - * Returns 0 if the two are equal - * Returns a positive value if the location version is newer (greater than) the api version - */ - private compareResourceVersions(locationVersion, apiVersion); - /** - * Gets the route template for a resource based on its location ID and negotiates the api version - */ - getVersioningData(apiVersion: string, area: string, locationId: string, routeValues: any, queryParams?: any): Promise; - /** - * Sets a promise that is waited on before any requests are issued. Can be used to asynchronously - * set the request url and auth token manager. - */ - _setInitializationPromise(promise: Promise): void; - /** - * Gets information about an API resource location (route template, supported versions, etc.) - * - * @param area resource area name - * @param locationId Guid of the location to get - */ - beginGetLocation(area: string, locationId: string): Promise; - private beginGetAreaLocations(area); - resolveUrl(relativeUrl: string): string; - /** - * Issues an OPTIONS request to get location objects from a location id - */ - _issueOptionsRequest(requestUrl: string, onResult: (err: any, statusCode: number, locationsResult: any) => void): void; - private getSerializedObject(object); - protected getRequestUrl(routeTemplate: string, area: string, resource: string, routeValues: any, queryParams?: any): string; - private replaceRouteValues(routeTemplate, routeValues); - _getLinkResponseHeaders(xhr: XMLHttpRequest): { - [relName: string]: string; - }; - } - -} -declare module 'vso-node-api/ClientApiBases' { - import Q = require('q'); - import restm = require('vso-node-api/RestClient'); - import httpm = require('vso-node-api/HttpClient'); - import vsom = require('vso-node-api/VsoClient'); - import VsoBaseInterfaces = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); - export class ClientApiBase { - baseUrl: string; - userAgent: string; - httpClient: httpm.HttpClient; - restClient: restm.RestClient; - vsoClient: vsom.VsoClient; - constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], userAgent?: string); - setUserAgent(userAgent: string): void; - connect(onResult: (err: any, statusCode: number, obj: any) => void): void; - } - export class QClientApiBase { - api: ClientApiBase; - constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], api: typeof ClientApiBase); - connect(): Promise; - } - -} -declare module 'vso-node-api/interfaces/common/VSSInterfaces' { - export interface IdentityRef { - displayName: string; - id: string; - imageUrl: string; - isAadIdentity: boolean; - isContainer: boolean; - profileUrl: string; - uniqueName: string; - url: string; - } - export interface JsonPatchDocument { - } - /** - * The JSON model for a JSON Patch operation - */ - export interface JsonPatchOperation { - /** - * The path to copy from for the Move/Copy operation. - */ - from: string; - /** - * The patch operation - */ - op: Operation; - /** - * The path for the operation - */ - path: string; - /** - * The value for the operation. This is either a primitive or a JToken. - */ - value: any; - } - export enum Operation { - Add = 0, - Remove = 1, - Replace = 2, - Move = 3, - Copy = 4, - Test = 5, - } - export interface ResourceRef { - id: string; - url: string; - } - export interface VssJsonCollectionWrapper extends VssJsonCollectionWrapperBase { - value: any[]; - } - export interface VssJsonCollectionWrapperV extends VssJsonCollectionWrapperBase { - value: T; - } - export interface VssJsonCollectionWrapperBase { - count: number; - } - export var TypeInfo: { - IdentityRef: { - fields: any; - }; - JsonPatchDocument: { - fields: any; - }; - JsonPatchOperation: { - fields: any; - }; - Operation: { - enumValues: { - "add": number; - "remove": number; - "replace": number; - "move": number; - "copy": number; - "test": number; - }; - }; - OperationReference: { - fields: any; - }; - ResourceRef: { - fields: any; - }; - VssJsonCollectionWrapper: { - fields: any; - }; - VssJsonCollectionWrapperV: { - fields: any; - }; - VssJsonCollectionWrapperBase: { - fields: any; - }; - }; - -} -declare module 'vso-node-api/interfaces/CoreInterfaces' { - import VSSInterfaces = require('vso-node-api/interfaces/common/VSSInterfaces'); - export enum ConnectedServiceKind { - /** - * Custom or unknown service - */ - Custom = 0, - /** - * Azure Subscription - */ - AzureSubscription = 1, - /** - * Chef Connection - */ - Chef = 2, - /** - * Generic Connection - */ - Generic = 3, - } - export interface IdentityData { - identityIds: string[]; - } - export interface Process extends ProcessReference { - _links: any; - description: string; - id: string; - isDefault: boolean; - type: ProcessType; - } - export interface ProcessReference { - name: string; - url: string; - } - export enum ProcessType { - System = 0, - Custom = 1, - Inherited = 2, - } - export enum ProjectChangeType { - Modified = 0, - Deleted = 1, - Added = 2, - } - /** - * Contains information of the project - */ - export interface ProjectInfo { - abbreviation: string; - description: string; - id: string; - lastUpdateTime: Date; - name: string; - properties: ProjectProperty[]; - /** - * Current revision of the project - */ - revision: number; - state: any; - uri: string; - version: number; - } - export interface ProjectMessage { - project: ProjectInfo; - projectChangeType: ProjectChangeType; - } - export interface ProjectProperty { - name: string; - value: string; - } - export interface Proxy { - /** - * This is a description string - */ - description: string; - /** - * The friendly name of the server - */ - friendlyName: string; - globalDefault: boolean; - /** - * This is a string representation of the site that the proxy server is located in (e.g. "NA-WA-RED") - */ - site: string; - siteDefault: boolean; - /** - * The URL of the proxy server - */ - url: string; - } - export enum SourceControlTypes { - Tfvc = 1, - Git = 2, - } - /** - * The Team Context for an operation. - */ - export interface TeamContext { - /** - * The team project Id or name. Ignored if ProjectId is set. - */ - project: string; - /** - * The Team Project ID. Required if Project is not set. - */ - projectId: string; - /** - * The Team Id or name. Ignored if TeamId is set. - */ - team: string; - /** - * The Team Id - */ - teamId: string; - } - /** - * Represents a Team Project object. - */ - export interface TeamProject extends TeamProjectReference { - /** - * The links to other objects related to this object. - */ - _links: any; - /** - * Set of capabilities this project has (such as process template & version control). - */ - capabilities: { - [key: string]: { - [key: string]: string; - }; - }; - /** - * The shallow ref to the default team. - */ - defaultTeam: WebApiTeamRef; - } - /** - * Data contract for a TeamProjectCollection. - */ - export interface TeamProjectCollection extends TeamProjectCollectionReference { - /** - * The links to other objects related to this object. - */ - _links: any; - /** - * Project collection description. - */ - description: string; - /** - * Project collection state. - */ - state: string; - } - /** - * Reference object for a TeamProjectCollection. - */ - export interface TeamProjectCollectionReference { - /** - * Collection Id. - */ - id: string; - /** - * Collection Name. - */ - name: string; - /** - * Collection REST Url. - */ - url: string; - } - /** - * Represents a shallow reference to a TeamProject. - */ - export interface TeamProjectReference { - /** - * Project abbreviation. - */ - abbreviation: string; - /** - * The project's description (if any). - */ - description: string; - /** - * Project identifier. - */ - id: string; - /** - * Project name. - */ - name: string; - /** - * Project revision. - */ - revision: number; - /** - * Project state. - */ - state: any; - /** - * Url to the full version of the object. - */ - url: string; - } - export interface WebApiConnectedService extends WebApiConnectedServiceRef { - /** - * The user who did the OAuth authentication to created this service - */ - authenticatedBy: VSSInterfaces.IdentityRef; - /** - * Extra description on the service. - */ - description: string; - /** - * Friendly Name of service connection - */ - friendlyName: string; - /** - * Id/Name of the connection service. For Ex: Subscription Id for Azure Connection - */ - id: string; - /** - * The kind of service. - */ - kind: string; - /** - * The project associated with this service - */ - project: TeamProjectReference; - /** - * Optional uri to connect directly to the service such as https://windows.azure.com - */ - serviceUri: string; - } - export interface WebApiConnectedServiceDetails extends WebApiConnectedServiceRef { - /** - * Meta data for service connection - */ - connectedServiceMetaData: WebApiConnectedService; - /** - * Credential info - */ - credentialsXml: string; - /** - * Optional uri to connect directly to the service such as https://windows.azure.com - */ - endPoint: string; - } - export interface WebApiConnectedServiceRef { - id: string; - url: string; - } - /** - * The representation of data needed to create a tag definition which is sent across the wire. - */ - export interface WebApiCreateTagRequestData { - name: string; - } - export interface WebApiProject extends TeamProjectReference { - /** - * Set of capabilities this project has - */ - capabilities: { - [key: string]: { - [key: string]: string; - }; - }; - /** - * Reference to collection which contains this project - */ - collection: WebApiProjectCollectionRef; - /** - * Default team for this project - */ - defaultTeam: WebApiTeamRef; - } - export interface WebApiProjectCollection extends WebApiProjectCollectionRef { - /** - * Project collection description - */ - description: string; - /** - * Project collection state - */ - state: string; - } - export interface WebApiProjectCollectionRef { - /** - * Collection Tfs Url (Host Url) - */ - collectionUrl: string; - /** - * Collection Guid - */ - id: string; - /** - * Collection Name - */ - name: string; - /** - * Collection REST Url - */ - url: string; - } - /** - * The representation of a tag definition which is sent across the wire. - */ - export interface WebApiTagDefinition { - active: boolean; - id: string; - name: string; - url: string; - } - export interface WebApiTeam extends WebApiTeamRef { - /** - * Team description - */ - description: string; - /** - * Identity REST API Url to this team - */ - identityUrl: string; - } - export interface WebApiTeamRef { - /** - * Team (Identity) Guid. A Team Foundation ID. - */ - id: string; - /** - * Team name - */ - name: string; - /** - * Team REST API Url - */ - url: string; - } - export var TypeInfo: { - ConnectedServiceKind: { - enumValues: { - "custom": number; - "azureSubscription": number; - "chef": number; - "generic": number; - }; - }; - IdentityData: { - fields: any; - }; - Process: { - fields: any; - }; - ProcessReference: { - fields: any; - }; - ProcessType: { - enumValues: { - "system": number; - "custom": number; - "inherited": number; - }; - }; - ProjectChangeType: { - enumValues: { - "modified": number; - "deleted": number; - "added": number; - }; - }; - ProjectInfo: { - fields: any; - }; - ProjectMessage: { - fields: any; - }; - ProjectProperty: { - fields: any; - }; - Proxy: { - fields: any; - }; - SourceControlTypes: { - enumValues: { - "tfvc": number; - "git": number; - }; - }; - TeamContext: { - fields: any; - }; - TeamProject: { - fields: any; - }; - TeamProjectCollection: { - fields: any; - }; - TeamProjectCollectionReference: { - fields: any; - }; - TeamProjectReference: { - fields: any; - }; - WebApiConnectedService: { - fields: any; - }; - WebApiConnectedServiceDetails: { - fields: any; - }; - WebApiConnectedServiceRef: { - fields: any; - }; - WebApiCreateTagRequestData: { - fields: any; - }; - WebApiProject: { - fields: any; - }; - WebApiProjectCollection: { - fields: any; - }; - WebApiProjectCollectionRef: { - fields: any; - }; - WebApiTagDefinition: { - fields: any; - }; - WebApiTeam: { - fields: any; - }; - WebApiTeamRef: { - fields: any; - }; - }; - -} -declare module 'vso-node-api/interfaces/BuildInterfaces' { - import TfsCoreInterfaces = require('vso-node-api/interfaces/CoreInterfaces'); - import VSSInterfaces = require('vso-node-api/interfaces/common/VSSInterfaces'); - export interface AgentPoolQueue extends ShallowReference { - _links: any; - /** - * The pool used by this queue. - */ - pool: TaskAgentPoolReference; - } - export enum AgentStatus { - /** - * Indicates that the build agent cannot be contacted. - */ - Unavailable = 0, - /** - * Indicates that the build agent is currently available. - */ - Available = 1, - /** - * Indicates that the build agent has taken itself offline. - */ - Offline = 2, - } - export interface ArtifactResource { - _links: any; - /** - * The type-specific resource data. For example, "#/10002/5/drop", "$/drops/5", "\\myshare\myfolder\mydrops\5" - */ - data: string; - /** - * Link to the resource. This might include things like query parameters to download as a zip file - */ - downloadUrl: string; - /** - * Properties of Artifact Resource - */ - properties: { - [key: string]: string; - }; - /** - * The type of the resource: File container, version control folder, UNC path, etc. - */ - type: string; - /** - * Link to the resource - */ - url: string; - } - export enum AuditAction { - Add = 1, - Update = 2, - Delete = 3, - } - /** - * Data representation of a build - */ - export interface Build { - _links: any; - /** - * Build number/name of the build - */ - buildNumber: string; - /** - * Build number revision - */ - buildNumberRevision: number; - /** - * The build controller. This should only be set if the definition type is Xaml. - */ - controller: BuildController; - /** - * The definition associated with the build - */ - definition: DefinitionReference; - /** - * Indicates whether the build has been deleted. - */ - deleted: boolean; - /** - * Demands - */ - demands: any[]; - /** - * Time that the build was completed - */ - finishTime: Date; - /** - * Id of the build - */ - id: number; - keepForever: boolean; - /** - * Process or person that last changed the build - */ - lastChangedBy: VSSInterfaces.IdentityRef; - /** - * Date the build was last changed - */ - lastChangedDate: Date; - /** - * Log location of the build - */ - logs: BuildLogReference; - /** - * Orchestration plan for the build - */ - orchestrationPlan: TaskOrchestrationPlanReference; - /** - * Parameters for the build - */ - parameters: string; - /** - * The build's priority - */ - priority: QueuePriority; - /** - * The team project - */ - project: TfsCoreInterfaces.TeamProjectReference; - properties: any; - /** - * Quality of the xaml build (good, bad, etc.) - */ - quality: string; - /** - * The queue. This should only be set if the definition type is Build. - */ - queue: AgentPoolQueue; - /** - * Queue option of the build. - */ - queueOptions: QueueOptions; - /** - * The current position of the build in the queue - */ - queuePosition: number; - /** - * Time that the build was queued - */ - queueTime: Date; - /** - * Reason that the build was created - */ - reason: BuildReason; - /** - * The repository - */ - repository: BuildRepository; - /** - * The identity that queued the build - */ - requestedBy: VSSInterfaces.IdentityRef; - /** - * The identity on whose behalf the build was queued - */ - requestedFor: VSSInterfaces.IdentityRef; - /** - * The build result - */ - result: BuildResult; - /** - * Source branch - */ - sourceBranch: string; - /** - * Source version - */ - sourceVersion: string; - /** - * Time that the build was started - */ - startTime: Date; - /** - * Status of the build - */ - status: BuildStatus; - tags: string[]; - /** - * Uri of the build - */ - uri: string; - /** - * REST url of the build - */ - url: string; - validationResults: BuildRequestValidationResult[]; - } - export interface BuildAgent { - buildDirectory: string; - controller: ShallowReference; - createdDate: Date; - description: string; - enabled: boolean; - id: number; - messageQueueUrl: string; - name: string; - reservedForBuild: string; - server: ShallowReference; - status: AgentStatus; - statusMessage: string; - updatedDate: Date; - uri: string; - url: string; - } - export interface BuildArtifact { - /** - * The artifact id - */ - id: number; - /** - * The name of the artifact - */ - name: string; - /** - * The actual resource - */ - resource: ArtifactResource; - } - export interface BuildArtifactAddedEvent extends BuildUpdatedEvent { - artifact: BuildArtifact; - } - export enum BuildAuthorizationScope { - /** - * The identity used should have build service account permissions scoped to the project collection. This is useful when resources for a single build are spread across multiple projects. - */ - ProjectCollection = 1, - /** - * The identity used should have build service account permissions scoped to the project in which the build definition resides. This is useful for isolation of build jobs to a particular team project to avoid any unintentional escalation of privilege attacks during a build. - */ - Project = 2, - } - /** - * Data representation of a build badge - */ - export interface BuildBadge { - /** - * Build id, if exists that this badge corresponds to - */ - buildId: number; - /** - * Self Url that generates SVG - */ - imageUrl: string; - } - export interface BuildChangesCalculatedEvent extends BuildUpdatedEvent { - changes: Change[]; - } - export interface BuildCompletedEvent extends BuildUpdatedEvent { - } - export interface BuildController extends ShallowReference { - _links: any; - /** - * The date the controller was created. - */ - createdDate: Date; - /** - * The description of the controller. - */ - description: string; - /** - * Indicates whether the controller is enabled. - */ - enabled: boolean; - /** - * The status of the controller. - */ - status: ControllerStatus; - /** - * The date the controller was last updated. - */ - updatedDate: Date; - /** - * The controller's URI. - */ - uri: string; - } - export interface BuildDefinition extends BuildDefinitionReference { - _links: any; - /** - * Indicates whether badges are enabled for this definition - */ - badgeEnabled: boolean; - build: BuildDefinitionStep[]; - /** - * The build number format - */ - buildNumberFormat: string; - /** - * The comment entered when saving the definition - */ - comment: string; - demands: any[]; - /** - * The description - */ - description: string; - /** - * The drop location for the definition - */ - dropLocation: string; - /** - * Gets or sets the job authorization scope for builds which are queued against this definition - */ - jobAuthorizationScope: BuildAuthorizationScope; - /** - * Gets or sets the job execution timeout in minutes for builds which are queued against this definition - */ - jobTimeoutInMinutes: number; - options: BuildOption[]; - properties: any; - /** - * The repository - */ - repository: BuildRepository; - retentionRules: RetentionPolicy[]; - triggers: BuildTrigger[]; - variables: { - [key: string]: BuildDefinitionVariable; - }; - } - export interface BuildDefinitionChangedEvent { - changeType: AuditAction; - definition: BuildDefinition; - } - export interface BuildDefinitionChangingEvent { - changeType: AuditAction; - newDefinition: BuildDefinition; - originalDefinition: BuildDefinition; - } - export interface BuildDefinitionReference extends DefinitionReference { - /** - * The author of the definition. - */ - authoredBy: VSSInterfaces.IdentityRef; - /** - * If this is a draft definition, it might have a parent - */ - draftOf: DefinitionReference; - /** - * The quality of the definition document (draft, etc.) - */ - quality: DefinitionQuality; - /** - * The default queue which should be used for requests. - */ - queue: AgentPoolQueue; - } - export interface BuildDefinitionRevision { - changedBy: VSSInterfaces.IdentityRef; - changedDate: Date; - changeType: AuditAction; - comment: string; - definitionUrl: string; - name: string; - revision: number; - } - export interface BuildDefinitionSourceProvider { - /** - * Uri of the associated definition - */ - definitionUri: string; - /** - * fields associated with this build definition - */ - fields: { - [key: string]: string; - }; - /** - * Id of this source provider - */ - id: number; - /** - * The lst time this source provider was modified - */ - lastModified: Date; - /** - * Name of the source provider - */ - name: string; - /** - * Which trigger types are supported by this definition source provider - */ - supportedTriggerTypes: DefinitionTriggerType; - } - export interface BuildDefinitionStep { - alwaysRun: boolean; - continueOnError: boolean; - displayName: string; - enabled: boolean; - inputs: { - [key: string]: string; - }; - task: TaskDefinitionReference; - } - export interface BuildDefinitionTemplate { - canDelete: boolean; - category: string; - description: string; - iconTaskId: string; - id: string; - name: string; - template: BuildDefinition; - } - export interface BuildDefinitionVariable { - allowOverride: boolean; - isSecret: boolean; - value: string; - } - export interface BuildDeletedEvent extends RealtimeBuildEvent { - build: Build; - } - export interface BuildDeployment { - deployment: BuildSummary; - sourceBuild: ShallowReference; - } - export interface BuildDestroyedEvent extends RealtimeBuildEvent { - build: Build; - } - /** - * Represents a build log. - */ - export interface BuildLog extends BuildLogReference { - /** - * The date the log was created. - */ - createdOn: Date; - /** - * The date the log was last changed. - */ - lastChangedOn: Date; - /** - * The number of lines in the log. - */ - lineCount: number; - } - /** - * Data representation of a build log reference - */ - export interface BuildLogReference { - /** - * The id of the log. - */ - id: number; - /** - * The type of the log location. - */ - type: string; - /** - * Full link to the log resource. - */ - url: string; - } - export interface BuildOption { - definition: BuildOptionDefinitionReference; - enabled: boolean; - inputs: { - [key: string]: string; - }; - } - export interface BuildOptionDefinition extends BuildOptionDefinitionReference { - description: string; - groups: BuildOptionGroupDefinition[]; - inputs: BuildOptionInputDefinition[]; - name: string; - ordinal: number; - } - export interface BuildOptionDefinitionReference { - id: string; - } - export interface BuildOptionGroupDefinition { - displayName: string; - isExpanded: boolean; - name: string; - } - export interface BuildOptionInputDefinition { - defaultValue: string; - groupName: string; - help: { - [key: string]: string; - }; - label: string; - name: string; - options: { - [key: string]: string; - }; - required: boolean; - type: BuildOptionInputType; - visibleRule: string; - } - export enum BuildOptionInputType { - String = 0, - Boolean = 1, - StringList = 2, - Radio = 3, - PickList = 4, - MultiLine = 5, - } - export enum BuildPhaseStatus { - /** - * The state is not known. - */ - Unknown = 0, - /** - * The build phase completed unsuccessfully. - */ - Failed = 1, - /** - * The build phase completed successfully. - */ - Succeeded = 2, - } - export interface BuildPollingSummaryEvent { - } - export interface BuildProcessTemplate { - description: string; - fileExists: boolean; - id: number; - parameters: string; - serverPath: string; - supportedReasons: BuildReason; - teamProject: string; - templateType: ProcessTemplateType; - url: string; - version: string; - } - export enum BuildQueryOrder { - /** - * Order by finish time ascending. - */ - FinishTimeAscending = 2, - /** - * Order by finish time descending. - */ - FinishTimeDescending = 3, - } - export interface BuildQueuedEvent extends BuildUpdatedEvent { - } - export enum BuildReason { - /** - * No reason. This value should not be used. - */ - None = 0, - /** - * The build was started manually. - */ - Manual = 1, - /** - * The build was started for the trigger TriggerType.ContinuousIntegration. - */ - IndividualCI = 2, - /** - * The build was started for the trigger TriggerType.BatchedContinuousIntegration. - */ - BatchedCI = 4, - /** - * The build was started for the trigger TriggerType.Schedule. - */ - Schedule = 8, - /** - * The build was created by a user. - */ - UserCreated = 32, - /** - * The build was started manually for private validation. - */ - ValidateShelveset = 64, - /** - * The build was started for the trigger ContinuousIntegrationType.Gated. - */ - CheckInShelveset = 128, - /** - * The build was triggered for retention policy purposes. - */ - Triggered = 175, - /** - * All reasons. - */ - All = 239, - } - export interface BuildReference { - _links: any; - /** - * Build number/name of the build - */ - buildNumber: string; - /** - * Time that the build was completed - */ - finishTime: Date; - /** - * Id of the build - */ - id: number; - /** - * Time that the build was queued - */ - queueTime: Date; - /** - * The build result - */ - result: BuildResult; - /** - * Time that the build was started - */ - startTime: Date; - /** - * Status of the build - */ - status: BuildStatus; - } - export interface BuildReportMetadata { - buildId: number; - content: string; - type: string; - } - export interface BuildRepository { - checkoutSubmodules: boolean; - /** - * Indicates whether to clean the target folder when getting code from the repository. This is a String so that it can reference variables. - */ - clean: string; - /** - * Gets or sets the name of the default branch. - */ - defaultBranch: string; - id: string; - /** - * Gets or sets the friendly name of the repository. - */ - name: string; - properties: { - [key: string]: string; - }; - /** - * Gets or sets the root folder. - */ - rootFolder: string; - /** - * Gets or sets the type of the repository. - */ - type: string; - /** - * Gets or sets the url of the repository. - */ - url: string; - } - export interface BuildRequestValidationResult { - message: string; - result: ValidationResult; - } - export interface BuildResourceUsage { - distributedTaskAgents: number; - totalUsage: number; - xamlControllers: number; - } - export enum BuildResult { - /** - * No result - */ - None = 0, - /** - * The build completed successfully. - */ - Succeeded = 2, - /** - * The build completed compilation successfully but had other errors. - */ - PartiallySucceeded = 4, - /** - * The build completed unsuccessfully. - */ - Failed = 8, - /** - * The build was canceled before starting. - */ - Canceled = 32, - } - export interface BuildServer { - agents: ShallowReference[]; - controller: ShallowReference; - id: number; - isVirtual: boolean; - messageQueueUrl: string; - name: string; - requireClientCertificates: boolean; - status: ServiceHostStatus; - statusChangedDate: Date; - uri: string; - url: string; - version: number; - } - export interface BuildSettings { - daysToKeepDeletedBuildsBeforeDestroy: number; - defaultRetentionPolicy: RetentionPolicy; - maximumRetentionPolicy: RetentionPolicy; - } - export interface BuildStartedEvent extends BuildUpdatedEvent { - } - export enum BuildStatus { - /** - * No status. - */ - None = 0, - /** - * The build is currently in progress. - */ - InProgress = 1, - /** - * The build has completed. - */ - Completed = 2, - /** - * The build is cancelling - */ - Cancelling = 4, - /** - * The build is inactive in the queue. - */ - Postponed = 8, - /** - * The build has not yet started. - */ - NotStarted = 32, - /** - * All status. - */ - All = 47, - } - export interface BuildSummary { - build: ShallowReference; - finishTime: Date; - keepForever: boolean; - quality: string; - reason: BuildReason; - requestedFor: VSSInterfaces.IdentityRef; - startTime: Date; - status: BuildStatus; - } - export interface BuildTrigger { - triggerType: DefinitionTriggerType; - } - export interface BuildUpdatedEvent extends RealtimeBuildEvent { - build: Build; - } - export interface BuildWorkspace { - mappings: MappingDetails[]; - } - /** - * Represents a change associated with a build. - */ - export interface Change { - /** - * The author of the change. - */ - author: VSSInterfaces.IdentityRef; - /** - * The location of a user-friendly representation of the resource. - */ - displayUri: string; - /** - * Something that identifies the change. For a commit, this would be the SHA1. For a TFVC changeset, this would be the changeset id. - */ - id: string; - /** - * The location of the full representation of the resource. - */ - location: string; - /** - * A description of the change. This might be a commit message or changeset description. - */ - message: string; - /** - * Indicates whether the message was truncated - */ - messageTruncated: boolean; - /** - * A timestamp for the change. - */ - timestamp: Date; - /** - * The type of change. "commit", "changeset", etc. - */ - type: string; - } - export interface ConsoleLogEvent extends RealtimeBuildEvent { - lines: string[]; - timelineId: string; - timelineRecordId: string; - } - export interface ContinuousDeploymentDefinition { - /** - * The connected service associated with the continuous deployment - */ - connectedService: TfsCoreInterfaces.WebApiConnectedServiceRef; - /** - * The definition associated with the continuous deployment - */ - definition: ShallowReference; - gitBranch: string; - hostedServiceName: string; - project: TfsCoreInterfaces.TeamProjectReference; - repositoryId: string; - storageAccountName: string; - subscriptionId: string; - website: string; - webspace: string; - } - export interface ContinuousIntegrationTrigger extends BuildTrigger { - batchChanges: boolean; - branchFilters: string[]; - maxConcurrentBuildsPerBranch: number; - /** - * The polling interval in seconds. - */ - pollingInterval: number; - /** - * This is the id of the polling job that polls the external repository. Once the build definition is saved/updated, this value is set. - */ - pollingJobId: string; - } - export enum ControllerStatus { - /** - * Indicates that the build controller cannot be contacted. - */ - Unavailable = 0, - /** - * Indicates that the build controller is currently available. - */ - Available = 1, - /** - * Indicates that the build controller has taken itself offline. - */ - Offline = 2, - } - export enum DefinitionQuality { - Definition = 1, - Draft = 2, - } - export enum DefinitionQueryOrder { - /** - * No order - */ - None = 0, - /** - * Order by created on/last modified time ascending. - */ - LastModifiedAscending = 1, - /** - * Order by created on/last modified time descending. - */ - LastModifiedDescending = 2, - /** - * Order by definition name ascending. - */ - DefinitionNameAscending = 3, - /** - * Order by definition name descending. - */ - DefinitionNameDescending = 4, - } - export enum DefinitionQueueStatus { - /** - * When enabled the definition queue allows builds to be queued by users, the system will queue scheduled, gated and continuous integration builds, and the queued builds will be started by the system. - */ - Enabled = 0, - /** - * When paused the definition queue allows builds to be queued by users and the system will queue scheduled, gated and continuous integration builds. Builds in the queue will not be started by the system. - */ - Paused = 1, - /** - * When disabled the definition queue will not allow builds to be queued by users and the system will not queue scheduled, gated or continuous integration builds. Builds already in the queue will not be started by the system. - */ - Disabled = 2, - } - /** - * A reference to a definition. - */ - export interface DefinitionReference extends ShallowReference { - /** - * The date the definition was created - */ - createdDate: Date; - /** - * The project. - */ - project: TfsCoreInterfaces.TeamProjectReference; - /** - * If builds can be queued from this definition - */ - queueStatus: DefinitionQueueStatus; - /** - * The definition revision number. - */ - revision: number; - /** - * The type of the definition. - */ - type: DefinitionType; - /** - * The Uri of the definition - */ - uri: string; - } - export enum DefinitionTriggerType { - /** - * Manual builds only. - */ - None = 1, - /** - * A build should be started for each changeset. - */ - ContinuousIntegration = 2, - /** - * A build should be started for multiple changesets at a time at a specified interval. - */ - BatchedContinuousIntegration = 4, - /** - * A build should be started on a specified schedule whether or not changesets exist. - */ - Schedule = 8, - /** - * A validation build should be started for each check-in. - */ - GatedCheckIn = 16, - /** - * A validation build should be started for each batch of check-ins. - */ - BatchedGatedCheckIn = 32, - /** - * All types. - */ - All = 63, - } - export enum DefinitionType { - Xaml = 1, - Build = 2, - } - export enum DeleteOptions { - /** - * No data should be deleted. This value should not be used. - */ - None = 0, - /** - * The drop location should be deleted. - */ - DropLocation = 1, - /** - * The test results should be deleted. - */ - TestResults = 2, - /** - * The version control label should be deleted. - */ - Label = 4, - /** - * The build should be deleted. - */ - Details = 8, - /** - * Published symbols should be deleted. - */ - Symbols = 16, - /** - * All data should be deleted. - */ - All = 31, - } - /** - * Represents the data from the build information nodes for type "DeploymentInformation" for xaml builds - */ - export interface Deployment { - type: string; - } - /** - * Deployment iformation for type "Build" - */ - export interface DeploymentBuild extends Deployment { - buildId: number; - } - /** - * Deployment iformation for type "Deploy" - */ - export interface DeploymentDeploy extends Deployment { - message: string; - } - /** - * Deployment iformation for type "Test" - */ - export interface DeploymentTest extends Deployment { - runId: number; - } - export interface GatedCheckInTrigger extends BuildTrigger { - pathFilters: string[]; - runContinuousIntegration: boolean; - } - export enum GetOption { - /** - * Use the latest changeset at the time the build is queued. - */ - LatestOnQueue = 0, - /** - * Use the latest changeset at the time the build is started. - */ - LatestOnBuild = 1, - /** - * A user-specified version has been supplied. - */ - Custom = 2, - } - /** - * Data representation of an information node associated with a build - */ - export interface InformationNode { - /** - * Fields of the information node - */ - fields: { - [key: string]: string; - }; - /** - * Process or person that last modified this node - */ - lastModifiedBy: string; - /** - * Date this node was last modified - */ - lastModifiedDate: Date; - /** - * Node Id of this information node - */ - nodeId: number; - /** - * Id of parent node (xml tree) - */ - parentId: number; - /** - * The type of the information node - */ - type: string; - } - export interface Issue { - category: string; - data: { - [key: string]: string; - }; - message: string; - type: IssueType; - } - export enum IssueType { - Error = 1, - Warning = 2, - } - export interface MappingDetails { - localPath: string; - mappingType: string; - serverPath: string; - } - export enum ProcessTemplateType { - /** - * Indicates a custom template. - */ - Custom = 0, - /** - * Indicates a default template. - */ - Default = 1, - /** - * Indicates an upgrade template. - */ - Upgrade = 2, - } - export interface PropertyValue { - /** - * Guid of identity that changed this property value - */ - changedBy: string; - /** - * The date this property value was changed - */ - changedDate: Date; - /** - * Name in the name value mapping - */ - propertyName: string; - /** - * Value in the name value mapping - */ - value: any; - } - export enum QueryDeletedOption { - /** - * Include only non-deleted builds. - */ - ExcludeDeleted = 0, - /** - * Include deleted and non-deleted builds. - */ - IncludeDeleted = 1, - /** - * Include only deleted builds. - */ - OnlyDeleted = 2, - } - export enum QueueOptions { - /** - * No queue options - */ - None = 0, - /** - * Create a plan Id for the build, do not run it - */ - DoNotRun = 1, - } - export enum QueuePriority { - /** - * Low priority. - */ - Low = 5, - /** - * Below normal priority. - */ - BelowNormal = 4, - /** - * Normal priority. - */ - Normal = 3, - /** - * Above normal priority. - */ - AboveNormal = 2, - /** - * High priority. - */ - High = 1, - } - export interface RealtimeBuildEvent { - buildId: number; - } - export interface RequestReference { - /** - * Id of the resource - */ - id: number; - /** - * Name of the requestor - */ - requestedFor: VSSInterfaces.IdentityRef; - /** - * Full http link to the resource - */ - url: string; - } - export interface RetentionPolicy { - artifacts: string[]; - branches: string[]; - daysToKeep: number; - deleteBuildRecord: boolean; - deleteTestResults: boolean; - minimumToKeep: number; - } - export interface Schedule { - branchFilters: string[]; - /** - * Days for a build (flags enum for days of the week) - */ - daysToBuild: ScheduleDays; - /** - * The Job Id of the Scheduled job that will queue the scheduled build. Since a single trigger can have multiple schedules and we want a single job to process a single schedule (since each schedule has a list of branches to build), the schedule itself needs to define the Job Id. This value will be filled in when a definition is added or updated. The UI does not provide it or use it. - */ - scheduleJobId: string; - /** - * Local timezone hour to start - */ - startHours: number; - /** - * Local timezone minute to start - */ - startMinutes: number; - /** - * Time zone of the build schedule (string representation of the time zone id) - */ - timeZoneId: string; - } - export enum ScheduleDays { - /** - * Do not run. - */ - None = 0, - /** - * Run on Monday. - */ - Monday = 1, - /** - * Run on Tuesday. - */ - Tuesday = 2, - /** - * Run on Wednesday. - */ - Wednesday = 4, - /** - * Run on Thursday. - */ - Thursday = 8, - /** - * Run on Friday. - */ - Friday = 16, - /** - * Run on Saturday. - */ - Saturday = 32, - /** - * Run on Sunday. - */ - Sunday = 64, - /** - * Run on all days of the week. - */ - All = 127, - } - export interface ScheduleTrigger extends BuildTrigger { - schedules: Schedule[]; - } - export enum ServiceHostStatus { - /** - * The service host is currently connected and accepting commands. - */ - Online = 1, - /** - * The service host is currently disconnected and not accepting commands. - */ - Offline = 2, - } - /** - * An abstracted reference to some other resource. This class is used to provide the build data contracts with a uniform way to reference other resources in a way that provides easy traversal through links. - */ - export interface ShallowReference { - /** - * Id of the resource - */ - id: number; - /** - * Name of the linked resource (definition name, controller name, etc.) - */ - name: string; - /** - * Full http link to the resource - */ - url: string; - } - export interface SvnMappingDetails { - depth: number; - ignoreExternals: boolean; - localPath: string; - revision: string; - serverPath: string; - } - export interface SvnWorkspace { - mappings: SvnMappingDetails[]; - } - export interface TaskAgentPoolReference { - id: number; - name: string; - } - export interface TaskDefinitionReference { - id: string; - versionSpec: string; - } - export interface TaskOrchestrationPlanReference { - planId: string; - } - export enum TaskResult { - Succeeded = 0, - SucceededWithIssues = 1, - Failed = 2, - Canceled = 3, - Skipped = 4, - Abandoned = 5, - } - export interface Timeline extends TimelineReference { - lastChangedBy: string; - lastChangedOn: Date; - records: TimelineRecord[]; - } - export interface TimelineRecord { - _links: any; - changeId: number; - currentOperation: string; - details: TimelineReference; - errorCount: number; - finishTime: Date; - id: string; - issues: Issue[]; - lastModified: Date; - log: BuildLogReference; - name: string; - order: number; - parentId: string; - percentComplete: number; - result: TaskResult; - resultCode: string; - startTime: Date; - state: TimelineRecordState; - type: string; - url: string; - warningCount: number; - workerName: string; - } - export enum TimelineRecordState { - Pending = 0, - InProgress = 1, - Completed = 2, - } - export interface TimelineRecordsUpdatedEvent extends RealtimeBuildEvent { - timelineRecords: TimelineRecord[]; - } - export interface TimelineReference { - changeId: number; - id: string; - url: string; - } - export enum ValidationResult { - OK = 0, - Warning = 1, - Error = 2, - } - /** - * Mapping for a workspace - */ - export interface WorkspaceMapping { - /** - * Uri of the associated definition - */ - definitionUri: string; - /** - * Depth of this mapping - */ - depth: number; - /** - * local location of the definition - */ - localItem: string; - /** - * type of workspace mapping - */ - mappingType: WorkspaceMappingType; - /** - * Server location of the definition - */ - serverItem: string; - /** - * Id of the workspace - */ - workspaceId: number; - } - export enum WorkspaceMappingType { - /** - * The path is mapped in the workspace. - */ - Map = 0, - /** - * The path is cloaked in the workspace. - */ - Cloak = 1, - } - export interface WorkspaceTemplate { - /** - * Uri of the associated definition - */ - definitionUri: string; - /** - * The identity that last modified this template - */ - lastModifiedBy: string; - /** - * The last time this template was modified - */ - lastModifiedDate: Date; - /** - * List of workspace mappings - */ - mappings: WorkspaceMapping[]; - /** - * Id of the workspace for this template - */ - workspaceId: number; - } - export interface XamlBuildDefinition extends DefinitionReference { - _links: any; - /** - * Batch size of the definition - */ - batchSize: number; - buildArgs: string; - /** - * The continuous integration quiet period - */ - continuousIntegrationQuietPeriod: number; - /** - * The build controller - */ - controller: BuildController; - /** - * The date this definition was created - */ - createdOn: Date; - /** - * Default drop location for builds from this definition - */ - defaultDropLocation: string; - /** - * Description of the definition - */ - description: string; - /** - * The last build on this definition - */ - lastBuild: ShallowReference; - /** - * The repository - */ - repository: BuildRepository; - /** - * The reasons supported by the template - */ - supportedReasons: BuildReason; - /** - * How builds are triggered from this definition - */ - triggerType: DefinitionTriggerType; - } - export var TypeInfo: { - AgentPoolQueue: { - fields: any; - }; - AgentStatus: { - enumValues: { - "unavailable": number; - "available": number; - "offline": number; - }; - }; - ArtifactResource: { - fields: any; - }; - AuditAction: { - enumValues: { - "add": number; - "update": number; - "delete": number; - }; - }; - Build: { - fields: any; - }; - BuildAgent: { - fields: any; - }; - BuildArtifact: { - fields: any; - }; - BuildArtifactAddedEvent: { - fields: any; - }; - BuildAuthorizationScope: { - enumValues: { - "projectCollection": number; - "project": number; - }; - }; - BuildBadge: { - fields: any; - }; - BuildChangesCalculatedEvent: { - fields: any; - }; - BuildCompletedEvent: { - fields: any; - }; - BuildController: { - fields: any; - }; - BuildDefinition: { - fields: any; - }; - BuildDefinitionChangedEvent: { - fields: any; - }; - BuildDefinitionChangingEvent: { - fields: any; - }; - BuildDefinitionReference: { - fields: any; - }; - BuildDefinitionRevision: { - fields: any; - }; - BuildDefinitionSourceProvider: { - fields: any; - }; - BuildDefinitionStep: { - fields: any; - }; - BuildDefinitionTemplate: { - fields: any; - }; - BuildDefinitionVariable: { - fields: any; - }; - BuildDeletedEvent: { - fields: any; - }; - BuildDeployment: { - fields: any; - }; - BuildDestroyedEvent: { - fields: any; - }; - BuildLog: { - fields: any; - }; - BuildLogReference: { - fields: any; - }; - BuildOption: { - fields: any; - }; - BuildOptionDefinition: { - fields: any; - }; - BuildOptionDefinitionReference: { - fields: any; - }; - BuildOptionGroupDefinition: { - fields: any; - }; - BuildOptionInputDefinition: { - fields: any; - }; - BuildOptionInputType: { - enumValues: { - "string": number; - "boolean": number; - "stringList": number; - "radio": number; - "pickList": number; - "multiLine": number; - }; - }; - BuildPhaseStatus: { - enumValues: { - "unknown": number; - "failed": number; - "succeeded": number; - }; - }; - BuildPollingSummaryEvent: { - fields: any; - }; - BuildProcessTemplate: { - fields: any; - }; - BuildQueryOrder: { - enumValues: { - "finishTimeAscending": number; - "finishTimeDescending": number; - }; - }; - BuildQueuedEvent: { - fields: any; - }; - BuildReason: { - enumValues: { - "none": number; - "manual": number; - "individualCI": number; - "batchedCI": number; - "schedule": number; - "userCreated": number; - "validateShelveset": number; - "checkInShelveset": number; - "triggered": number; - "all": number; - }; - }; - BuildReference: { - fields: any; - }; - BuildReportMetadata: { - fields: any; - }; - BuildRepository: { - fields: any; - }; - BuildRequestValidationResult: { - fields: any; - }; - BuildResourceUsage: { - fields: any; - }; - BuildResult: { - enumValues: { - "none": number; - "succeeded": number; - "partiallySucceeded": number; - "failed": number; - "canceled": number; - }; - }; - BuildServer: { - fields: any; - }; - BuildSettings: { - fields: any; - }; - BuildStartedEvent: { - fields: any; - }; - BuildStatus: { - enumValues: { - "none": number; - "inProgress": number; - "completed": number; - "cancelling": number; - "postponed": number; - "notStarted": number; - "all": number; - }; - }; - BuildSummary: { - fields: any; - }; - BuildTrigger: { - fields: any; - }; - BuildUpdatedEvent: { - fields: any; - }; - BuildWorkspace: { - fields: any; - }; - Change: { - fields: any; - }; - ConsoleLogEvent: { - fields: any; - }; - ContinuousDeploymentDefinition: { - fields: any; - }; - ContinuousIntegrationTrigger: { - fields: any; - }; - ControllerStatus: { - enumValues: { - "unavailable": number; - "available": number; - "offline": number; - }; - }; - DefinitionQuality: { - enumValues: { - "definition": number; - "draft": number; - }; - }; - DefinitionQueryOrder: { - enumValues: { - "none": number; - "lastModifiedAscending": number; - "lastModifiedDescending": number; - "definitionNameAscending": number; - "definitionNameDescending": number; - }; - }; - DefinitionQueueStatus: { - enumValues: { - "enabled": number; - "paused": number; - "disabled": number; - }; - }; - DefinitionReference: { - fields: any; - }; - DefinitionTriggerType: { - enumValues: { - "none": number; - "continuousIntegration": number; - "batchedContinuousIntegration": number; - "schedule": number; - "gatedCheckIn": number; - "batchedGatedCheckIn": number; - "all": number; - }; - }; - DefinitionType: { - enumValues: { - "xaml": number; - "build": number; - }; - }; - DeleteOptions: { - enumValues: { - "none": number; - "dropLocation": number; - "testResults": number; - "label": number; - "details": number; - "symbols": number; - "all": number; - }; - }; - Deployment: { - fields: any; - }; - DeploymentBuild: { - fields: any; - }; - DeploymentDeploy: { - fields: any; - }; - DeploymentTest: { - fields: any; - }; - GatedCheckInTrigger: { - fields: any; - }; - GetOption: { - enumValues: { - "latestOnQueue": number; - "latestOnBuild": number; - "custom": number; - }; - }; - InformationNode: { - fields: any; - }; - Issue: { - fields: any; - }; - IssueType: { - enumValues: { - "error": number; - "warning": number; - }; - }; - MappingDetails: { - fields: any; - }; - ProcessTemplateType: { - enumValues: { - "custom": number; - "default": number; - "upgrade": number; - }; - }; - PropertyValue: { - fields: any; - }; - QueryDeletedOption: { - enumValues: { - "excludeDeleted": number; - "includeDeleted": number; - "onlyDeleted": number; - }; - }; - QueueOptions: { - enumValues: { - "none": number; - "doNotRun": number; - }; - }; - QueuePriority: { - enumValues: { - "low": number; - "belowNormal": number; - "normal": number; - "aboveNormal": number; - "high": number; - }; - }; - RealtimeBuildEvent: { - fields: any; - }; - RequestReference: { - fields: any; - }; - RetentionPolicy: { - fields: any; - }; - Schedule: { - fields: any; - }; - ScheduleDays: { - enumValues: { - "none": number; - "monday": number; - "tuesday": number; - "wednesday": number; - "thursday": number; - "friday": number; - "saturday": number; - "sunday": number; - "all": number; - }; - }; - ScheduleTrigger: { - fields: any; - }; - ServiceHostStatus: { - enumValues: { - "online": number; - "offline": number; - }; - }; - ShallowReference: { - fields: any; - }; - SvnMappingDetails: { - fields: any; - }; - SvnWorkspace: { - fields: any; - }; - TaskAgentPoolReference: { - fields: any; - }; - TaskDefinitionReference: { - fields: any; - }; - TaskOrchestrationPlanReference: { - fields: any; - }; - TaskResult: { - enumValues: { - "succeeded": number; - "succeededWithIssues": number; - "failed": number; - "canceled": number; - "skipped": number; - "abandoned": number; - }; - }; - Timeline: { - fields: any; - }; - TimelineRecord: { - fields: any; - }; - TimelineRecordState: { - enumValues: { - "pending": number; - "inProgress": number; - "completed": number; - }; - }; - TimelineRecordsUpdatedEvent: { - fields: any; - }; - TimelineReference: { - fields: any; - }; - ValidationResult: { - enumValues: { - "oK": number; - "warning": number; - "error": number; - }; - }; - WorkspaceMapping: { - fields: any; - }; - WorkspaceMappingType: { - enumValues: { - "map": number; - "cloak": number; - }; - }; - WorkspaceTemplate: { - fields: any; - }; - XamlBuildDefinition: { - fields: any; - }; - }; - -} -declare module 'vso-node-api/BuildApi' { - - - import Q = require('q'); - import basem = require('vso-node-api/ClientApiBases'); - import VsoBaseInterfaces = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); - import BuildInterfaces = require('vso-node-api/interfaces/BuildInterfaces'); - import VSSInterfaces = require('vso-node-api/interfaces/common/VSSInterfaces'); - export interface IBuildApi extends basem.ClientApiBase { - createArtifact(artifact: BuildInterfaces.BuildArtifact, buildId: number, project: string, onResult: (err: any, statusCode: number, artifact: BuildInterfaces.BuildArtifact) => void): void; - getArtifact(buildId: number, artifactName: string, project: string, onResult: (err: any, statusCode: number, artifact: BuildInterfaces.BuildArtifact) => void): void; - getArtifactContentZip(buildId: number, artifactName: string, project: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - getArtifacts(buildId: number, project: string, onResult: (err: any, statusCode: number, artifacts: BuildInterfaces.BuildArtifact[]) => void): void; - getBadge(project: string, definitionId: number, branchName: string, onResult: (err: any, statusCode: number, badge: string) => void): void; - getBuildBadge(project: string, repoType: string, repoId: string, branchName: string, onResult: (err: any, statusCode: number, buildbadge: BuildInterfaces.BuildBadge) => void): void; - getBuildBadgeData(project: string, repoType: string, repoId: string, branchName: string, onResult: (err: any, statusCode: number, buildbadge: string) => void): void; - deleteBuild(buildId: number, project: string, onResult: (err: any, statusCode: number) => void): void; - getBuild(buildId: number, project: string, propertyFilters: string, onResult: (err: any, statusCode: number, build: BuildInterfaces.Build) => void): void; - getBuilds(project: string, definitions: number[], queues: number[], buildNumber: string, minFinishTime: Date, maxFinishTime: Date, requestedFor: string, reasonFilter: BuildInterfaces.BuildReason, statusFilter: BuildInterfaces.BuildStatus, resultFilter: BuildInterfaces.BuildResult, tagFilters: string[], properties: string[], type: BuildInterfaces.DefinitionType, top: number, continuationToken: string, maxBuildsPerDefinition: number, deletedFilter: BuildInterfaces.QueryDeletedOption, queryOrder: BuildInterfaces.BuildQueryOrder, branchName: string, onResult: (err: any, statusCode: number, builds: BuildInterfaces.Build[]) => void): void; - queueBuild(build: BuildInterfaces.Build, project: string, ignoreWarnings: boolean, checkInTicket: string, onResult: (err: any, statusCode: number, build: BuildInterfaces.Build) => void): void; - updateBuild(build: BuildInterfaces.Build, buildId: number, project: string, onResult: (err: any, statusCode: number, build: BuildInterfaces.Build) => void): void; - getBuildChanges(project: string, buildId: number, continuationToken: string, top: number, includeSourceChange: boolean, onResult: (err: any, statusCode: number, changes: BuildInterfaces.Change[]) => void): void; - getChangesBetweenBuilds(project: string, fromBuildId: number, toBuildId: number, top: number, onResult: (err: any, statusCode: number, changes: BuildInterfaces.Change[]) => void): void; - getBuildController(controllerId: number, onResult: (err: any, statusCode: number, Controller: BuildInterfaces.BuildController) => void): void; - getBuildControllers(name: string, onResult: (err: any, statusCode: number, Controllers: BuildInterfaces.BuildController[]) => void): void; - createDefinition(definition: BuildInterfaces.BuildDefinition, project: string, definitionToCloneId: number, definitionToCloneRevision: number, onResult: (err: any, statusCode: number, definition: BuildInterfaces.BuildDefinition) => void): void; - deleteDefinition(definitionId: number, project: string, onResult: (err: any, statusCode: number) => void): void; - getDefinition(definitionId: number, project: string, revision: number, propertyFilters: string[], onResult: (err: any, statusCode: number, definition: BuildInterfaces.DefinitionReference) => void): void; - getDefinitions(project: string, name: string, type: BuildInterfaces.DefinitionType, repositoryId: string, repositoryType: string, queryOrder: BuildInterfaces.DefinitionQueryOrder, top: number, continuationToken: string, onResult: (err: any, statusCode: number, definitions: BuildInterfaces.DefinitionReference[]) => void): void; - updateDefinition(definition: BuildInterfaces.BuildDefinition, definitionId: number, project: string, secretsSourceDefinitionId: number, secretsSourceDefinitionRevision: number, onResult: (err: any, statusCode: number, definition: BuildInterfaces.BuildDefinition) => void): void; - getBuildDeployments(project: string, buildId: number, onResult: (err: any, statusCode: number, deployments: BuildInterfaces.Deployment[]) => void): void; - getBuildLog(project: string, buildId: number, logId: number, startLine: number, endLine: number, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - getBuildLogs(project: string, buildId: number, onResult: (err: any, statusCode: number, logs: BuildInterfaces.BuildLog[]) => void): void; - getBuildLogsZip(project: string, buildId: number, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - getBuildOptionDefinitions(project: string, onResult: (err: any, statusCode: number, options: BuildInterfaces.BuildOptionDefinition[]) => void): void; - createQueue(queue: BuildInterfaces.AgentPoolQueue, onResult: (err: any, statusCode: number, queue: BuildInterfaces.AgentPoolQueue) => void): void; - deleteQueue(id: number, onResult: (err: any, statusCode: number) => void): void; - getAgentPoolQueue(controllerId: number, onResult: (err: any, statusCode: number, queue: BuildInterfaces.AgentPoolQueue) => void): void; - getQueues(name: string, onResult: (err: any, statusCode: number, queues: BuildInterfaces.AgentPoolQueue[]) => void): void; - getBuildReport(project: string, buildId: number, type: string, onResult: (err: any, statusCode: number, report: BuildInterfaces.BuildReportMetadata) => void): void; - getBuildReportHtmlContent(project: string, buildId: number, type: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - getResourceUsage(onResult: (err: any, statusCode: number, ResourceUsage: BuildInterfaces.BuildResourceUsage) => void): void; - getDefinitionRevisions(project: string, definitionId: number, onResult: (err: any, statusCode: number, revisions: BuildInterfaces.BuildDefinitionRevision[]) => void): void; - getBuildSettings(onResult: (err: any, statusCode: number, setting: BuildInterfaces.BuildSettings) => void): void; - updateBuildSettings(settings: BuildInterfaces.BuildSettings, onResult: (err: any, statusCode: number, setting: BuildInterfaces.BuildSettings) => void): void; - addBuildTag(project: string, buildId: number, tag: string, onResult: (err: any, statusCode: number, tags: string[]) => void): void; - addBuildTags(tags: string[], project: string, buildId: number, onResult: (err: any, statusCode: number, tags: string[]) => void): void; - deleteBuildTag(project: string, buildId: number, tag: string, onResult: (err: any, statusCode: number, tags: string[]) => void): void; - getBuildTags(project: string, buildId: number, onResult: (err: any, statusCode: number, tags: string[]) => void): void; - getTags(project: string, onResult: (err: any, statusCode: number, tags: string[]) => void): void; - deleteTemplate(project: string, templateId: string, onResult: (err: any, statusCode: number) => void): void; - getTemplate(project: string, templateId: string, onResult: (err: any, statusCode: number, template: BuildInterfaces.BuildDefinitionTemplate) => void): void; - getTemplates(project: string, onResult: (err: any, statusCode: number, templates: BuildInterfaces.BuildDefinitionTemplate[]) => void): void; - saveTemplate(template: BuildInterfaces.BuildDefinitionTemplate, project: string, templateId: string, onResult: (err: any, statusCode: number, template: BuildInterfaces.BuildDefinitionTemplate) => void): void; - getBuildTimeline(project: string, buildId: number, timelineId: string, changeId: number, onResult: (err: any, statusCode: number, Timeline: BuildInterfaces.Timeline) => void): void; - getBuildWorkItemsRefs(project: string, buildId: number, top: number, onResult: (err: any, statusCode: number, workitems: VSSInterfaces.ResourceRef[]) => void): void; - getBuildWorkItemsRefsFromCommits(commitIds: string[], project: string, buildId: number, top: number, onResult: (err: any, statusCode: number, workitems: VSSInterfaces.ResourceRef[]) => void): void; - getWorkItemsBetweenBuilds(project: string, fromBuildId: number, toBuildId: number, top: number, onResult: (err: any, statusCode: number, workitems: VSSInterfaces.ResourceRef[]) => void): void; - } - export interface IBuildApi extends basem.QClientApiBase { - createArtifact(artifact: BuildInterfaces.BuildArtifact, buildId: number, project?: string): Promise; - getArtifact(buildId: number, artifactName: string, project?: string): Promise; - getArtifactContentZip(buildId: number, artifactName: string, project?: string): Promise; - getArtifacts(buildId: number, project?: string): Promise; - getBadge(project: string, definitionId: number, branchName?: string): Promise; - getBuildBadge(project: string, repoType: string, repoId?: string, branchName?: string): Promise; - getBuildBadgeData(project: string, repoType: string, repoId?: string, branchName?: string): Promise; - deleteBuild(buildId: number, project?: string): Promise; - getBuild(buildId: number, project?: string, propertyFilters?: string): Promise; - getBuilds(project?: string, definitions?: number[], queues?: number[], buildNumber?: string, minFinishTime?: Date, maxFinishTime?: Date, requestedFor?: string, reasonFilter?: BuildInterfaces.BuildReason, statusFilter?: BuildInterfaces.BuildStatus, resultFilter?: BuildInterfaces.BuildResult, tagFilters?: string[], properties?: string[], type?: BuildInterfaces.DefinitionType, top?: number, continuationToken?: string, maxBuildsPerDefinition?: number, deletedFilter?: BuildInterfaces.QueryDeletedOption, queryOrder?: BuildInterfaces.BuildQueryOrder, branchName?: string): Promise; - queueBuild(build: BuildInterfaces.Build, project?: string, ignoreWarnings?: boolean, checkInTicket?: string): Promise; - updateBuild(build: BuildInterfaces.Build, buildId: number, project?: string): Promise; - getBuildChanges(project: string, buildId: number, continuationToken?: string, top?: number, includeSourceChange?: boolean): Promise; - getChangesBetweenBuilds(project: string, fromBuildId?: number, toBuildId?: number, top?: number): Promise; - getBuildController(controllerId: number): Promise; - getBuildControllers(name?: string): Promise; - createDefinition(definition: BuildInterfaces.BuildDefinition, project?: string, definitionToCloneId?: number, definitionToCloneRevision?: number): Promise; - deleteDefinition(definitionId: number, project?: string): Promise; - getDefinition(definitionId: number, project?: string, revision?: number, propertyFilters?: string[]): Promise; - getDefinitions(project?: string, name?: string, type?: BuildInterfaces.DefinitionType, repositoryId?: string, repositoryType?: string, queryOrder?: BuildInterfaces.DefinitionQueryOrder, top?: number, continuationToken?: string): Promise; - updateDefinition(definition: BuildInterfaces.BuildDefinition, definitionId: number, project?: string, secretsSourceDefinitionId?: number, secretsSourceDefinitionRevision?: number): Promise; - getBuildDeployments(project: string, buildId: number): Promise; - getBuildLog(project: string, buildId: number, logId: number, startLine?: number, endLine?: number): Promise; - getBuildLogs(project: string, buildId: number): Promise; - getBuildLogsZip(project: string, buildId: number): Promise; - getBuildOptionDefinitions(project?: string): Promise; - createQueue(queue: BuildInterfaces.AgentPoolQueue): Promise; - deleteQueue(id: number): Promise; - getAgentPoolQueue(controllerId: number): Promise; - getQueues(name?: string): Promise; - getBuildReport(project: string, buildId: number, type?: string): Promise; - getBuildReportHtmlContent(project: string, buildId: number, type?: string): Promise; - getResourceUsage(): Promise; - getDefinitionRevisions(project: string, definitionId: number): Promise; - getBuildSettings(): Promise; - updateBuildSettings(settings: BuildInterfaces.BuildSettings): Promise; - addBuildTag(project: string, buildId: number, tag: string): Promise; - addBuildTags(tags: string[], project: string, buildId: number): Promise; - deleteBuildTag(project: string, buildId: number, tag: string): Promise; - getBuildTags(project: string, buildId: number): Promise; - getTags(project: string): Promise; - deleteTemplate(project: string, templateId: string): Promise; - getTemplate(project: string, templateId: string): Promise; - getTemplates(project: string): Promise; - saveTemplate(template: BuildInterfaces.BuildDefinitionTemplate, project: string, templateId: string): Promise; - getBuildTimeline(project: string, buildId: number, timelineId?: string, changeId?: number): Promise; - getBuildWorkItemsRefs(project: string, buildId: number, top?: number): Promise; - getBuildWorkItemsRefsFromCommits(commitIds: string[], project: string, buildId: number, top?: number): Promise; - getWorkItemsBetweenBuilds(project: string, fromBuildId: number, toBuildId: number, top?: number): Promise; - } - export class BuildApi extends basem.ClientApiBase implements IBuildApi { - constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); - /** - * Associates an artifact with a build - * - * @param {BuildInterfaces.BuildArtifact} artifact - * @param {number} buildId - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting BuildInterfaces.BuildArtifact - */ - createArtifact(artifact: BuildInterfaces.BuildArtifact, buildId: number, project: string, onResult: (err: any, statusCode: number, artifact: BuildInterfaces.BuildArtifact) => void): void; - /** - * Gets a specific artifact for a build - * - * @param {number} buildId - * @param {string} artifactName - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting BuildInterfaces.BuildArtifact - */ - getArtifact(buildId: number, artifactName: string, project: string, onResult: (err: any, statusCode: number, artifact: BuildInterfaces.BuildArtifact) => void): void; - /** - * Gets a specific artifact for a build - * - * @param {number} buildId - * @param {string} artifactName - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting ArrayBuffer - */ - getArtifactContentZip(buildId: number, artifactName: string, project: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * Gets all artifacts for a build - * - * @param {number} buildId - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting BuildInterfaces.BuildArtifact[] - */ - getArtifacts(buildId: number, project: string, onResult: (err: any, statusCode: number, artifacts: BuildInterfaces.BuildArtifact[]) => void): void; - /** - * @param {string} project - * @param {number} definitionId - * @param {string} branchName - * @param onResult callback function with the resulting string - */ - getBadge(project: string, definitionId: number, branchName: string, onResult: (err: any, statusCode: number, badge: string) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {string} repoType - * @param {string} repoId - * @param {string} branchName - * @param onResult callback function with the resulting BuildInterfaces.BuildBadge - */ - getBuildBadge(project: string, repoType: string, repoId: string, branchName: string, onResult: (err: any, statusCode: number, buildbadge: BuildInterfaces.BuildBadge) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {string} repoType - * @param {string} repoId - * @param {string} branchName - * @param onResult callback function with the resulting string - */ - getBuildBadgeData(project: string, repoType: string, repoId: string, branchName: string, onResult: (err: any, statusCode: number, buildbadge: string) => void): void; - /** - * Deletes a build - * - * @param {number} buildId - * @param {string} project - Project ID or project name - * @param onResult callback function - */ - deleteBuild(buildId: number, project: string, onResult: (err: any, statusCode: number) => void): void; - /** - * Gets a build - * - * @param {number} buildId - * @param {string} project - Project ID or project name - * @param {string} propertyFilters - A comma-delimited list of properties to include in the results - * @param onResult callback function with the resulting BuildInterfaces.Build - */ - getBuild(buildId: number, project: string, propertyFilters: string, onResult: (err: any, statusCode: number, build: BuildInterfaces.Build) => void): void; - /** - * Gets builds - * - * @param {string} project - Project ID or project name - * @param {number[]} definitions - A comma-delimited list of definition ids - * @param {number[]} queues - A comma-delimited list of queue ids - * @param {string} buildNumber - * @param {Date} minFinishTime - * @param {Date} maxFinishTime - * @param {string} requestedFor - * @param {BuildInterfaces.BuildReason} reasonFilter - * @param {BuildInterfaces.BuildStatus} statusFilter - * @param {BuildInterfaces.BuildResult} resultFilter - * @param {string[]} tagFilters - A comma-delimited list of tags - * @param {string[]} properties - A comma-delimited list of properties to include in the results - * @param {BuildInterfaces.DefinitionType} type - The definition type - * @param {number} top - The maximum number of builds to retrieve - * @param {string} continuationToken - * @param {number} maxBuildsPerDefinition - * @param {BuildInterfaces.QueryDeletedOption} deletedFilter - * @param {BuildInterfaces.BuildQueryOrder} queryOrder - * @param {string} branchName - * @param onResult callback function with the resulting BuildInterfaces.Build[] - */ - getBuilds(project: string, definitions: number[], queues: number[], buildNumber: string, minFinishTime: Date, maxFinishTime: Date, requestedFor: string, reasonFilter: BuildInterfaces.BuildReason, statusFilter: BuildInterfaces.BuildStatus, resultFilter: BuildInterfaces.BuildResult, tagFilters: string[], properties: string[], type: BuildInterfaces.DefinitionType, top: number, continuationToken: string, maxBuildsPerDefinition: number, deletedFilter: BuildInterfaces.QueryDeletedOption, queryOrder: BuildInterfaces.BuildQueryOrder, branchName: string, onResult: (err: any, statusCode: number, builds: BuildInterfaces.Build[]) => void): void; - /** - * Queues a build - * - * @param {BuildInterfaces.Build} build - * @param {string} project - Project ID or project name - * @param {boolean} ignoreWarnings - * @param {string} checkInTicket - * @param onResult callback function with the resulting BuildInterfaces.Build - */ - queueBuild(build: BuildInterfaces.Build, project: string, ignoreWarnings: boolean, checkInTicket: string, onResult: (err: any, statusCode: number, build: BuildInterfaces.Build) => void): void; - /** - * Updates a build - * - * @param {BuildInterfaces.Build} build - * @param {number} buildId - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting BuildInterfaces.Build - */ - updateBuild(build: BuildInterfaces.Build, buildId: number, project: string, onResult: (err: any, statusCode: number, build: BuildInterfaces.Build) => void): void; - /** - * Gets the changes associated with a build - * - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {string} continuationToken - * @param {number} top - The maximum number of changes to return - * @param {boolean} includeSourceChange - * @param onResult callback function with the resulting BuildInterfaces.Change[] - */ - getBuildChanges(project: string, buildId: number, continuationToken: string, top: number, includeSourceChange: boolean, onResult: (err: any, statusCode: number, changes: BuildInterfaces.Change[]) => void): void; - /** - * Gets the changes associated between given builds - * - * @param {string} project - Project ID or project name - * @param {number} fromBuildId - * @param {number} toBuildId - * @param {number} top - The maximum number of changes to return - * @param onResult callback function with the resulting BuildInterfaces.Change[] - */ - getChangesBetweenBuilds(project: string, fromBuildId: number, toBuildId: number, top: number, onResult: (err: any, statusCode: number, changes: BuildInterfaces.Change[]) => void): void; - /** - * Gets a controller - * - * @param {number} controllerId - * @param onResult callback function with the resulting BuildInterfaces.BuildController - */ - getBuildController(controllerId: number, onResult: (err: any, statusCode: number, Controller: BuildInterfaces.BuildController) => void): void; - /** - * Gets controller, optionally filtered by name - * - * @param {string} name - * @param onResult callback function with the resulting BuildInterfaces.BuildController[] - */ - getBuildControllers(name: string, onResult: (err: any, statusCode: number, Controllers: BuildInterfaces.BuildController[]) => void): void; - /** - * Creates a new definition - * - * @param {BuildInterfaces.BuildDefinition} definition - * @param {string} project - Project ID or project name - * @param {number} definitionToCloneId - * @param {number} definitionToCloneRevision - * @param onResult callback function with the resulting BuildInterfaces.BuildDefinition - */ - createDefinition(definition: BuildInterfaces.BuildDefinition, project: string, definitionToCloneId: number, definitionToCloneRevision: number, onResult: (err: any, statusCode: number, definition: BuildInterfaces.BuildDefinition) => void): void; - /** - * Deletes a definition and all associated builds - * - * @param {number} definitionId - * @param {string} project - Project ID or project name - * @param onResult callback function - */ - deleteDefinition(definitionId: number, project: string, onResult: (err: any, statusCode: number) => void): void; - /** - * Gets a definition, optionally at a specific revision - * - * @param {number} definitionId - * @param {string} project - Project ID or project name - * @param {number} revision - * @param {string[]} propertyFilters - * @param onResult callback function with the resulting BuildInterfaces.DefinitionReference - */ - getDefinition(definitionId: number, project: string, revision: number, propertyFilters: string[], onResult: (err: any, statusCode: number, definition: BuildInterfaces.DefinitionReference) => void): void; - /** - * Gets definitions, optionally filtered by name - * - * @param {string} project - Project ID or project name - * @param {string} name - * @param {BuildInterfaces.DefinitionType} type - * @param {string} repositoryId - * @param {string} repositoryType - * @param {BuildInterfaces.DefinitionQueryOrder} queryOrder - * @param {number} top - * @param {string} continuationToken - * @param onResult callback function with the resulting BuildInterfaces.DefinitionReference[] - */ - getDefinitions(project: string, name: string, type: BuildInterfaces.DefinitionType, repositoryId: string, repositoryType: string, queryOrder: BuildInterfaces.DefinitionQueryOrder, top: number, continuationToken: string, onResult: (err: any, statusCode: number, definitions: BuildInterfaces.DefinitionReference[]) => void): void; - /** - * Updates an existing definition - * - * @param {BuildInterfaces.BuildDefinition} definition - * @param {number} definitionId - * @param {string} project - Project ID or project name - * @param {number} secretsSourceDefinitionId - * @param {number} secretsSourceDefinitionRevision - * @param onResult callback function with the resulting BuildInterfaces.BuildDefinition - */ - updateDefinition(definition: BuildInterfaces.BuildDefinition, definitionId: number, project: string, secretsSourceDefinitionId: number, secretsSourceDefinitionRevision: number, onResult: (err: any, statusCode: number, definition: BuildInterfaces.BuildDefinition) => void): void; - /** - * Gets the deployment information associated with a build - * - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param onResult callback function with the resulting BuildInterfaces.Deployment[] - */ - getBuildDeployments(project: string, buildId: number, onResult: (err: any, statusCode: number, deployments: BuildInterfaces.Deployment[]) => void): void; - /** - * Gets a log - * - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {number} logId - * @param {number} startLine - * @param {number} endLine - * @param onResult callback function with the resulting ArrayBuffer - */ - getBuildLog(project: string, buildId: number, logId: number, startLine: number, endLine: number, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * Gets logs for a build - * - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param onResult callback function with the resulting BuildInterfaces.BuildLog[] - */ - getBuildLogs(project: string, buildId: number, onResult: (err: any, statusCode: number, logs: BuildInterfaces.BuildLog[]) => void): void; - /** - * Gets logs for a build - * - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param onResult callback function with the resulting ArrayBuffer - */ - getBuildLogsZip(project: string, buildId: number, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting BuildInterfaces.BuildOptionDefinition[] - */ - getBuildOptionDefinitions(project: string, onResult: (err: any, statusCode: number, options: BuildInterfaces.BuildOptionDefinition[]) => void): void; - /** - * Creates a build queue - * - * @param {BuildInterfaces.AgentPoolQueue} queue - * @param onResult callback function with the resulting BuildInterfaces.AgentPoolQueue - */ - createQueue(queue: BuildInterfaces.AgentPoolQueue, onResult: (err: any, statusCode: number, queue: BuildInterfaces.AgentPoolQueue) => void): void; - /** - * Deletes a build queue - * - * @param {number} id - * @param onResult callback function - */ - deleteQueue(id: number, onResult: (err: any, statusCode: number) => void): void; - /** - * Gets a queue - * - * @param {number} controllerId - * @param onResult callback function with the resulting BuildInterfaces.AgentPoolQueue - */ - getAgentPoolQueue(controllerId: number, onResult: (err: any, statusCode: number, queue: BuildInterfaces.AgentPoolQueue) => void): void; - /** - * Gets queues, optionally filtered by name - * - * @param {string} name - * @param onResult callback function with the resulting BuildInterfaces.AgentPoolQueue[] - */ - getQueues(name: string, onResult: (err: any, statusCode: number, queues: BuildInterfaces.AgentPoolQueue[]) => void): void; - /** - * Gets report for a build - * - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {string} type - * @param onResult callback function with the resulting BuildInterfaces.BuildReportMetadata - */ - getBuildReport(project: string, buildId: number, type: string, onResult: (err: any, statusCode: number, report: BuildInterfaces.BuildReportMetadata) => void): void; - /** - * Gets report for a build - * - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {string} type - * @param onResult callback function with the resulting any - */ - getBuildReportHtmlContent(project: string, buildId: number, type: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * @param onResult callback function with the resulting BuildInterfaces.BuildResourceUsage - */ - getResourceUsage(onResult: (err: any, statusCode: number, ResourceUsage: BuildInterfaces.BuildResourceUsage) => void): void; - /** - * Gets revisions of a definition - * - * @param {string} project - Project ID or project name - * @param {number} definitionId - * @param onResult callback function with the resulting BuildInterfaces.BuildDefinitionRevision[] - */ - getDefinitionRevisions(project: string, definitionId: number, onResult: (err: any, statusCode: number, revisions: BuildInterfaces.BuildDefinitionRevision[]) => void): void; - /** - * @param onResult callback function with the resulting BuildInterfaces.BuildSettings - */ - getBuildSettings(onResult: (err: any, statusCode: number, setting: BuildInterfaces.BuildSettings) => void): void; - /** - * Updates the build settings - * - * @param {BuildInterfaces.BuildSettings} settings - * @param onResult callback function with the resulting BuildInterfaces.BuildSettings - */ - updateBuildSettings(settings: BuildInterfaces.BuildSettings, onResult: (err: any, statusCode: number, setting: BuildInterfaces.BuildSettings) => void): void; - /** - * Adds a tag to a build - * - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {string} tag - * @param onResult callback function with the resulting string[] - */ - addBuildTag(project: string, buildId: number, tag: string, onResult: (err: any, statusCode: number, tags: string[]) => void): void; - /** - * Adds tag to a build - * - * @param {string[]} tags - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param onResult callback function with the resulting string[] - */ - addBuildTags(tags: string[], project: string, buildId: number, onResult: (err: any, statusCode: number, tags: string[]) => void): void; - /** - * Deletes a tag from a build - * - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {string} tag - * @param onResult callback function with the resulting string[] - */ - deleteBuildTag(project: string, buildId: number, tag: string, onResult: (err: any, statusCode: number, tags: string[]) => void): void; - /** - * Gets the tags for a build - * - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param onResult callback function with the resulting string[] - */ - getBuildTags(project: string, buildId: number, onResult: (err: any, statusCode: number, tags: string[]) => void): void; - /** - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting string[] - */ - getTags(project: string, onResult: (err: any, statusCode: number, tags: string[]) => void): void; - /** - * Deletes a definition template - * - * @param {string} project - Project ID or project name - * @param {string} templateId - * @param onResult callback function - */ - deleteTemplate(project: string, templateId: string, onResult: (err: any, statusCode: number) => void): void; - /** - * Gets definition template filtered by id - * - * @param {string} project - Project ID or project name - * @param {string} templateId - * @param onResult callback function with the resulting BuildInterfaces.BuildDefinitionTemplate - */ - getTemplate(project: string, templateId: string, onResult: (err: any, statusCode: number, template: BuildInterfaces.BuildDefinitionTemplate) => void): void; - /** - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting BuildInterfaces.BuildDefinitionTemplate[] - */ - getTemplates(project: string, onResult: (err: any, statusCode: number, templates: BuildInterfaces.BuildDefinitionTemplate[]) => void): void; - /** - * Saves a definition template - * - * @param {BuildInterfaces.BuildDefinitionTemplate} template - * @param {string} project - Project ID or project name - * @param {string} templateId - * @param onResult callback function with the resulting BuildInterfaces.BuildDefinitionTemplate - */ - saveTemplate(template: BuildInterfaces.BuildDefinitionTemplate, project: string, templateId: string, onResult: (err: any, statusCode: number, template: BuildInterfaces.BuildDefinitionTemplate) => void): void; - /** - * Gets details for a build - * - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {string} timelineId - * @param {number} changeId - * @param onResult callback function with the resulting BuildInterfaces.Timeline - */ - getBuildTimeline(project: string, buildId: number, timelineId: string, changeId: number, onResult: (err: any, statusCode: number, Timeline: BuildInterfaces.Timeline) => void): void; - /** - * Gets the work item ids associated with a build - * - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {number} top - The maximum number of workitems to return - * @param onResult callback function with the resulting VSSInterfaces.ResourceRef[] - */ - getBuildWorkItemsRefs(project: string, buildId: number, top: number, onResult: (err: any, statusCode: number, workitems: VSSInterfaces.ResourceRef[]) => void): void; - /** - * Gets the work item ids associated with build commits - * - * @param {string[]} commitIds - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {number} top - The maximum number of workitems to return, also number of commits to consider if commitids are not sent - * @param onResult callback function with the resulting VSSInterfaces.ResourceRef[] - */ - getBuildWorkItemsRefsFromCommits(commitIds: string[], project: string, buildId: number, top: number, onResult: (err: any, statusCode: number, workitems: VSSInterfaces.ResourceRef[]) => void): void; - /** - * Gets all the work item ids inbetween fromBuildId to toBuildId - * - * @param {string} project - Project ID or project name - * @param {number} fromBuildId - * @param {number} toBuildId - * @param {number} top - The maximum number of workitems to return - * @param onResult callback function with the resulting VSSInterfaces.ResourceRef[] - */ - getWorkItemsBetweenBuilds(project: string, fromBuildId: number, toBuildId: number, top: number, onResult: (err: any, statusCode: number, workitems: VSSInterfaces.ResourceRef[]) => void): void; - } - export class QBuildApi extends basem.QClientApiBase implements IBuildApi { - api: BuildApi; - constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); - /** - * Associates an artifact with a build - * - * @param {BuildInterfaces.BuildArtifact} artifact - * @param {number} buildId - * @param {string} project - Project ID or project name - */ - createArtifact(artifact: BuildInterfaces.BuildArtifact, buildId: number, project?: string): Promise; - /** - * Gets a specific artifact for a build - * - * @param {number} buildId - * @param {string} artifactName - * @param {string} project - Project ID or project name - */ - getArtifact(buildId: number, artifactName: string, project?: string): Promise; - /** - * Gets a specific artifact for a build - * - * @param {number} buildId - * @param {string} artifactName - * @param {string} project - Project ID or project name - */ - getArtifactContentZip(buildId: number, artifactName: string, project?: string): Promise; - /** - * Gets all artifacts for a build - * - * @param {number} buildId - * @param {string} project - Project ID or project name - */ - getArtifacts(buildId: number, project?: string): Promise; - /** - * @param {string} project - * @param {number} definitionId - * @param {string} branchName - */ - getBadge(project: string, definitionId: number, branchName?: string): Promise; - /** - * @param {string} project - Project ID or project name - * @param {string} repoType - * @param {string} repoId - * @param {string} branchName - */ - getBuildBadge(project: string, repoType: string, repoId?: string, branchName?: string): Promise; - /** - * @param {string} project - Project ID or project name - * @param {string} repoType - * @param {string} repoId - * @param {string} branchName - */ - getBuildBadgeData(project: string, repoType: string, repoId?: string, branchName?: string): Promise; - /** - * Deletes a build - * - * @param {number} buildId - * @param {string} project - Project ID or project name - */ - deleteBuild(buildId: number, project?: string): Promise; - /** - * Gets a build - * - * @param {number} buildId - * @param {string} project - Project ID or project name - * @param {string} propertyFilters - A comma-delimited list of properties to include in the results - */ - getBuild(buildId: number, project?: string, propertyFilters?: string): Promise; - /** - * Gets builds - * - * @param {string} project - Project ID or project name - * @param {number[]} definitions - A comma-delimited list of definition ids - * @param {number[]} queues - A comma-delimited list of queue ids - * @param {string} buildNumber - * @param {Date} minFinishTime - * @param {Date} maxFinishTime - * @param {string} requestedFor - * @param {BuildInterfaces.BuildReason} reasonFilter - * @param {BuildInterfaces.BuildStatus} statusFilter - * @param {BuildInterfaces.BuildResult} resultFilter - * @param {string[]} tagFilters - A comma-delimited list of tags - * @param {string[]} properties - A comma-delimited list of properties to include in the results - * @param {BuildInterfaces.DefinitionType} type - The definition type - * @param {number} top - The maximum number of builds to retrieve - * @param {string} continuationToken - * @param {number} maxBuildsPerDefinition - * @param {BuildInterfaces.QueryDeletedOption} deletedFilter - * @param {BuildInterfaces.BuildQueryOrder} queryOrder - * @param {string} branchName - */ - getBuilds(project?: string, definitions?: number[], queues?: number[], buildNumber?: string, minFinishTime?: Date, maxFinishTime?: Date, requestedFor?: string, reasonFilter?: BuildInterfaces.BuildReason, statusFilter?: BuildInterfaces.BuildStatus, resultFilter?: BuildInterfaces.BuildResult, tagFilters?: string[], properties?: string[], type?: BuildInterfaces.DefinitionType, top?: number, continuationToken?: string, maxBuildsPerDefinition?: number, deletedFilter?: BuildInterfaces.QueryDeletedOption, queryOrder?: BuildInterfaces.BuildQueryOrder, branchName?: string): Promise; - /** - * Queues a build - * - * @param {BuildInterfaces.Build} build - * @param {string} project - Project ID or project name - * @param {boolean} ignoreWarnings - * @param {string} checkInTicket - */ - queueBuild(build: BuildInterfaces.Build, project?: string, ignoreWarnings?: boolean, checkInTicket?: string): Promise; - /** - * Updates a build - * - * @param {BuildInterfaces.Build} build - * @param {number} buildId - * @param {string} project - Project ID or project name - */ - updateBuild(build: BuildInterfaces.Build, buildId: number, project?: string): Promise; - /** - * Gets the changes associated with a build - * - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {string} continuationToken - * @param {number} top - The maximum number of changes to return - * @param {boolean} includeSourceChange - */ - getBuildChanges(project: string, buildId: number, continuationToken?: string, top?: number, includeSourceChange?: boolean): Promise; - /** - * Gets the changes associated between given builds - * - * @param {string} project - Project ID or project name - * @param {number} fromBuildId - * @param {number} toBuildId - * @param {number} top - The maximum number of changes to return - */ - getChangesBetweenBuilds(project: string, fromBuildId?: number, toBuildId?: number, top?: number): Promise; - /** - * Gets a controller - * - * @param {number} controllerId - */ - getBuildController(controllerId: number): Promise; - /** - * Gets controller, optionally filtered by name - * - * @param {string} name - */ - getBuildControllers(name?: string): Promise; - /** - * Creates a new definition - * - * @param {BuildInterfaces.BuildDefinition} definition - * @param {string} project - Project ID or project name - * @param {number} definitionToCloneId - * @param {number} definitionToCloneRevision - */ - createDefinition(definition: BuildInterfaces.BuildDefinition, project?: string, definitionToCloneId?: number, definitionToCloneRevision?: number): Promise; - /** - * Deletes a definition and all associated builds - * - * @param {number} definitionId - * @param {string} project - Project ID or project name - */ - deleteDefinition(definitionId: number, project?: string): Promise; - /** - * Gets a definition, optionally at a specific revision - * - * @param {number} definitionId - * @param {string} project - Project ID or project name - * @param {number} revision - * @param {string[]} propertyFilters - */ - getDefinition(definitionId: number, project?: string, revision?: number, propertyFilters?: string[]): Promise; - /** - * Gets definitions, optionally filtered by name - * - * @param {string} project - Project ID or project name - * @param {string} name - * @param {BuildInterfaces.DefinitionType} type - * @param {string} repositoryId - * @param {string} repositoryType - * @param {BuildInterfaces.DefinitionQueryOrder} queryOrder - * @param {number} top - * @param {string} continuationToken - */ - getDefinitions(project?: string, name?: string, type?: BuildInterfaces.DefinitionType, repositoryId?: string, repositoryType?: string, queryOrder?: BuildInterfaces.DefinitionQueryOrder, top?: number, continuationToken?: string): Promise; - /** - * Updates an existing definition - * - * @param {BuildInterfaces.BuildDefinition} definition - * @param {number} definitionId - * @param {string} project - Project ID or project name - * @param {number} secretsSourceDefinitionId - * @param {number} secretsSourceDefinitionRevision - */ - updateDefinition(definition: BuildInterfaces.BuildDefinition, definitionId: number, project?: string, secretsSourceDefinitionId?: number, secretsSourceDefinitionRevision?: number): Promise; - /** - * Gets the deployment information associated with a build - * - * @param {string} project - Project ID or project name - * @param {number} buildId - */ - getBuildDeployments(project: string, buildId: number): Promise; - /** - * Gets a log - * - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {number} logId - * @param {number} startLine - * @param {number} endLine - */ - getBuildLog(project: string, buildId: number, logId: number, startLine?: number, endLine?: number): Promise; - /** - * Gets logs for a build - * - * @param {string} project - Project ID or project name - * @param {number} buildId - */ - getBuildLogs(project: string, buildId: number): Promise; - /** - * Gets logs for a build - * - * @param {string} project - Project ID or project name - * @param {number} buildId - */ - getBuildLogsZip(project: string, buildId: number): Promise; - /** - * @param {string} project - Project ID or project name - */ - getBuildOptionDefinitions(project?: string): Promise; - /** - * Creates a build queue - * - * @param {BuildInterfaces.AgentPoolQueue} queue - */ - createQueue(queue: BuildInterfaces.AgentPoolQueue): Promise; - /** - * Deletes a build queue - * - * @param {number} id - */ - deleteQueue(id: number): Promise; - /** - * Gets a queue - * - * @param {number} controllerId - */ - getAgentPoolQueue(controllerId: number): Promise; - /** - * Gets queues, optionally filtered by name - * - * @param {string} name - */ - getQueues(name?: string): Promise; - /** - * Gets report for a build - * - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {string} type - */ - getBuildReport(project: string, buildId: number, type?: string): Promise; - /** - * Gets report for a build - * - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {string} type - */ - getBuildReportHtmlContent(project: string, buildId: number, type?: string): Promise; - /** - */ - getResourceUsage(): Promise; - /** - * Gets revisions of a definition - * - * @param {string} project - Project ID or project name - * @param {number} definitionId - */ - getDefinitionRevisions(project: string, definitionId: number): Promise; - /** - */ - getBuildSettings(): Promise; - /** - * Updates the build settings - * - * @param {BuildInterfaces.BuildSettings} settings - */ - updateBuildSettings(settings: BuildInterfaces.BuildSettings): Promise; - /** - * Adds a tag to a build - * - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {string} tag - */ - addBuildTag(project: string, buildId: number, tag: string): Promise; - /** - * Adds tag to a build - * - * @param {string[]} tags - * @param {string} project - Project ID or project name - * @param {number} buildId - */ - addBuildTags(tags: string[], project: string, buildId: number): Promise; - /** - * Deletes a tag from a build - * - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {string} tag - */ - deleteBuildTag(project: string, buildId: number, tag: string): Promise; - /** - * Gets the tags for a build - * - * @param {string} project - Project ID or project name - * @param {number} buildId - */ - getBuildTags(project: string, buildId: number): Promise; - /** - * @param {string} project - Project ID or project name - */ - getTags(project: string): Promise; - /** - * Deletes a definition template - * - * @param {string} project - Project ID or project name - * @param {string} templateId - */ - deleteTemplate(project: string, templateId: string): Promise; - /** - * Gets definition template filtered by id - * - * @param {string} project - Project ID or project name - * @param {string} templateId - */ - getTemplate(project: string, templateId: string): Promise; - /** - * @param {string} project - Project ID or project name - */ - getTemplates(project: string): Promise; - /** - * Saves a definition template - * - * @param {BuildInterfaces.BuildDefinitionTemplate} template - * @param {string} project - Project ID or project name - * @param {string} templateId - */ - saveTemplate(template: BuildInterfaces.BuildDefinitionTemplate, project: string, templateId: string): Promise; - /** - * Gets details for a build - * - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {string} timelineId - * @param {number} changeId - */ - getBuildTimeline(project: string, buildId: number, timelineId?: string, changeId?: number): Promise; - /** - * Gets the work item ids associated with a build - * - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {number} top - The maximum number of workitems to return - */ - getBuildWorkItemsRefs(project: string, buildId: number, top?: number): Promise; - /** - * Gets the work item ids associated with build commits - * - * @param {string[]} commitIds - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {number} top - The maximum number of workitems to return, also number of commits to consider if commitids are not sent - */ - getBuildWorkItemsRefsFromCommits(commitIds: string[], project: string, buildId: number, top?: number): Promise; - /** - * Gets all the work item ids inbetween fromBuildId to toBuildId - * - * @param {string} project - Project ID or project name - * @param {number} fromBuildId - * @param {number} toBuildId - * @param {number} top - The maximum number of workitems to return - */ - getWorkItemsBetweenBuilds(project: string, fromBuildId: number, toBuildId: number, top?: number): Promise; - } - -} -declare module 'vso-node-api/interfaces/common/OperationsInterfaces' { - /** - * Reference for an async operation. - */ - export interface OperationReference { - /** - * The identifier for this operation. - */ - id: string; - /** - * The current status of the operation. - */ - status: OperationStatus; - /** - * Url to get the full object. - */ - url: string; - } - export enum OperationStatus { - /** - * The operation object does not have the status set. - */ - NotSet = 0, - /** - * The operation has been queued. - */ - Queued = 1, - /** - * The operation is in progress. - */ - InProgress = 2, - /** - * The operation was cancelled by the user. - */ - Cancelled = 3, - /** - * The operation completed successfully. - */ - Succeeded = 4, - /** - * The operation completed with a failure. - */ - Failed = 5, - } - export var TypeInfo: { - OperationReference: { - fields: any; - }; - OperationStatus: { - enumValues: { - "notSet": number; - "queued": number; - "inProgress": number; - "cancelled": number; - "succeeded": number; - "failed": number; - }; - }; - }; - -} -declare module 'vso-node-api/CoreApi' { - - - import Q = require('q'); - import basem = require('vso-node-api/ClientApiBases'); - import VsoBaseInterfaces = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); - import CoreInterfaces = require('vso-node-api/interfaces/CoreInterfaces'); - import OperationsInterfaces = require('vso-node-api/interfaces/common/OperationsInterfaces'); - import VSSInterfaces = require('vso-node-api/interfaces/common/VSSInterfaces'); - export interface ICoreApi extends basem.ClientApiBase { - createConnectedService(connectedServiceCreationData: CoreInterfaces.WebApiConnectedServiceDetails, projectId: string, onResult: (err: any, statusCode: number, connectedService: CoreInterfaces.WebApiConnectedService) => void): void; - getConnectedServiceDetails(projectId: string, name: string, onResult: (err: any, statusCode: number, connectedService: CoreInterfaces.WebApiConnectedServiceDetails) => void): void; - getConnectedServices(projectId: string, kind: CoreInterfaces.ConnectedServiceKind, onResult: (err: any, statusCode: number, connectedServices: CoreInterfaces.WebApiConnectedService[]) => void): void; - createIdentityMru(mruData: CoreInterfaces.IdentityData, mruName: string, onResult: (err: any, statusCode: number) => void): void; - deleteIdentityMru(mruData: CoreInterfaces.IdentityData, mruName: string, onResult: (err: any, statusCode: number) => void): void; - getIdentityMru(mruName: string, onResult: (err: any, statusCode: number, identityMru: VSSInterfaces.IdentityRef[]) => void): void; - updateIdentityMru(mruData: CoreInterfaces.IdentityData, mruName: string, onResult: (err: any, statusCode: number) => void): void; - getTeamMembers(projectId: string, teamId: string, top: number, skip: number, onResult: (err: any, statusCode: number, members: VSSInterfaces.IdentityRef[]) => void): void; - getProcessById(processId: string, onResult: (err: any, statusCode: number, processe: CoreInterfaces.Process) => void): void; - getProcesses(onResult: (err: any, statusCode: number, processes: CoreInterfaces.Process[]) => void): void; - getProjectCollection(collectionId: string, onResult: (err: any, statusCode: number, projectCollection: CoreInterfaces.TeamProjectCollection) => void): void; - getProjectCollections(top: number, skip: number, onResult: (err: any, statusCode: number, projectCollections: CoreInterfaces.TeamProjectCollectionReference[]) => void): void; - getProjectHistory(minRevision: number, onResult: (err: any, statusCode: number, projectHistory: CoreInterfaces.TeamProjectReference[]) => void): void; - getProject(projectId: string, includeCapabilities: boolean, includeHistory: boolean, onResult: (err: any, statusCode: number, project: CoreInterfaces.TeamProject) => void): void; - getProjects(stateFilter: any, top: number, skip: number, onResult: (err: any, statusCode: number, projects: CoreInterfaces.TeamProjectReference[]) => void): void; - queueCreateProject(projectToCreate: CoreInterfaces.TeamProject, onResult: (err: any, statusCode: number, project: OperationsInterfaces.OperationReference) => void): void; - queueDeleteProject(projectId: string, onResult: (err: any, statusCode: number, project: OperationsInterfaces.OperationReference) => void): void; - updateProject(projectUpdate: CoreInterfaces.TeamProject, projectId: string, onResult: (err: any, statusCode: number, project: OperationsInterfaces.OperationReference) => void): void; - getProxies(proxyUrl: string, onResult: (err: any, statusCode: number, proxies: CoreInterfaces.Proxy[]) => void): void; - createTeam(team: CoreInterfaces.WebApiTeam, projectId: string, onResult: (err: any, statusCode: number, team: CoreInterfaces.WebApiTeam) => void): void; - deleteTeam(projectId: string, teamId: string, onResult: (err: any, statusCode: number) => void): void; - getTeam(projectId: string, teamId: string, onResult: (err: any, statusCode: number, team: CoreInterfaces.WebApiTeam) => void): void; - getTeams(projectId: string, top: number, skip: number, onResult: (err: any, statusCode: number, teams: CoreInterfaces.WebApiTeam[]) => void): void; - updateTeam(teamData: CoreInterfaces.WebApiTeam, projectId: string, teamId: string, onResult: (err: any, statusCode: number, team: CoreInterfaces.WebApiTeam) => void): void; - } - export interface IQCoreApi extends basem.QClientApiBase { - createConnectedService(connectedServiceCreationData: CoreInterfaces.WebApiConnectedServiceDetails, projectId: string): Promise; - getConnectedServiceDetails(projectId: string, name: string): Promise; - getConnectedServices(projectId: string, kind?: CoreInterfaces.ConnectedServiceKind): Promise; - createIdentityMru(mruData: CoreInterfaces.IdentityData, mruName: string): Promise; - deleteIdentityMru(mruData: CoreInterfaces.IdentityData, mruName: string): Promise; - getIdentityMru(mruName: string): Promise; - updateIdentityMru(mruData: CoreInterfaces.IdentityData, mruName: string): Promise; - getTeamMembers(projectId: string, teamId: string, top?: number, skip?: number): Promise; - getProcessById(processId: string): Promise; - getProcesses(): Promise; - getProjectCollection(collectionId: string): Promise; - getProjectCollections(top?: number, skip?: number): Promise; - getProjectHistory(minRevision?: number): Promise; - getProject(projectId: string, includeCapabilities?: boolean, includeHistory?: boolean): Promise; - getProjects(stateFilter?: any, top?: number, skip?: number): Promise; - queueCreateProject(projectToCreate: CoreInterfaces.TeamProject): Promise; - queueDeleteProject(projectId: string): Promise; - updateProject(projectUpdate: CoreInterfaces.TeamProject, projectId: string): Promise; - getProxies(proxyUrl?: string): Promise; - createTeam(team: CoreInterfaces.WebApiTeam, projectId: string): Promise; - deleteTeam(projectId: string, teamId: string): Promise; - getTeam(projectId: string, teamId: string): Promise; - getTeams(projectId: string, top?: number, skip?: number): Promise; - updateTeam(teamData: CoreInterfaces.WebApiTeam, projectId: string, teamId: string): Promise; - } - export class CoreApi extends basem.ClientApiBase implements ICoreApi { - constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); - /** - * @param {CoreInterfaces.WebApiConnectedServiceDetails} connectedServiceCreationData - * @param {string} projectId - * @param onResult callback function with the resulting CoreInterfaces.WebApiConnectedService - */ - createConnectedService(connectedServiceCreationData: CoreInterfaces.WebApiConnectedServiceDetails, projectId: string, onResult: (err: any, statusCode: number, connectedService: CoreInterfaces.WebApiConnectedService) => void): void; - /** - * @param {string} projectId - * @param {string} name - * @param onResult callback function with the resulting CoreInterfaces.WebApiConnectedServiceDetails - */ - getConnectedServiceDetails(projectId: string, name: string, onResult: (err: any, statusCode: number, connectedService: CoreInterfaces.WebApiConnectedServiceDetails) => void): void; - /** - * @param {string} projectId - * @param {CoreInterfaces.ConnectedServiceKind} kind - * @param onResult callback function with the resulting CoreInterfaces.WebApiConnectedService[] - */ - getConnectedServices(projectId: string, kind: CoreInterfaces.ConnectedServiceKind, onResult: (err: any, statusCode: number, connectedServices: CoreInterfaces.WebApiConnectedService[]) => void): void; - /** - * @param {CoreInterfaces.IdentityData} mruData - * @param {string} mruName - * @param onResult callback function - */ - createIdentityMru(mruData: CoreInterfaces.IdentityData, mruName: string, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {CoreInterfaces.IdentityData} mruData - * @param {string} mruName - * @param onResult callback function - */ - deleteIdentityMru(mruData: CoreInterfaces.IdentityData, mruName: string, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {string} mruName - * @param onResult callback function with the resulting VSSInterfaces.IdentityRef[] - */ - getIdentityMru(mruName: string, onResult: (err: any, statusCode: number, identityMru: VSSInterfaces.IdentityRef[]) => void): void; - /** - * @param {CoreInterfaces.IdentityData} mruData - * @param {string} mruName - * @param onResult callback function - */ - updateIdentityMru(mruData: CoreInterfaces.IdentityData, mruName: string, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {string} projectId - * @param {string} teamId - * @param {number} top - * @param {number} skip - * @param onResult callback function with the resulting VSSInterfaces.IdentityRef[] - */ - getTeamMembers(projectId: string, teamId: string, top: number, skip: number, onResult: (err: any, statusCode: number, members: VSSInterfaces.IdentityRef[]) => void): void; - /** - * Retrieve process by id - * - * @param {string} processId - * @param onResult callback function with the resulting CoreInterfaces.Process - */ - getProcessById(processId: string, onResult: (err: any, statusCode: number, processe: CoreInterfaces.Process) => void): void; - /** - * @param onResult callback function with the resulting CoreInterfaces.Process[] - */ - getProcesses(onResult: (err: any, statusCode: number, processes: CoreInterfaces.Process[]) => void): void; - /** - * Get project collection with the specified id or name. - * - * @param {string} collectionId - * @param onResult callback function with the resulting CoreInterfaces.TeamProjectCollection - */ - getProjectCollection(collectionId: string, onResult: (err: any, statusCode: number, projectCollection: CoreInterfaces.TeamProjectCollection) => void): void; - /** - * Get project collection references for this application. - * - * @param {number} top - * @param {number} skip - * @param onResult callback function with the resulting CoreInterfaces.TeamProjectCollectionReference[] - */ - getProjectCollections(top: number, skip: number, onResult: (err: any, statusCode: number, projectCollections: CoreInterfaces.TeamProjectCollectionReference[]) => void): void; - /** - * @param {number} minRevision - * @param onResult callback function with the resulting CoreInterfaces.TeamProjectReference[] - */ - getProjectHistory(minRevision: number, onResult: (err: any, statusCode: number, projectHistory: CoreInterfaces.TeamProjectReference[]) => void): void; - /** - * Get project with the specified id or name, optionally including capabilities. - * - * @param {string} projectId - * @param {boolean} includeCapabilities - Include capabilities (such as source control) in the team project result (default: false). - * @param {boolean} includeHistory - Search within renamed projects (that had such name in the past). - * @param onResult callback function with the resulting CoreInterfaces.TeamProject - */ - getProject(projectId: string, includeCapabilities: boolean, includeHistory: boolean, onResult: (err: any, statusCode: number, project: CoreInterfaces.TeamProject) => void): void; - /** - * Get project references with the specified state - * - * @param {any} stateFilter - Filter on team projects in a specific team project state (default: WellFormed). - * @param {number} top - * @param {number} skip - * @param onResult callback function with the resulting CoreInterfaces.TeamProjectReference[] - */ - getProjects(stateFilter: any, top: number, skip: number, onResult: (err: any, statusCode: number, projects: CoreInterfaces.TeamProjectReference[]) => void): void; - /** - * Queue a project creation. - * - * @param {CoreInterfaces.TeamProject} projectToCreate - The project to create. - * @param onResult callback function with the resulting OperationsInterfaces.OperationReference - */ - queueCreateProject(projectToCreate: CoreInterfaces.TeamProject, onResult: (err: any, statusCode: number, project: OperationsInterfaces.OperationReference) => void): void; - /** - * Queue a project deletion. - * - * @param {string} projectId - The project id of the project to delete. - * @param onResult callback function with the resulting OperationsInterfaces.OperationReference - */ - queueDeleteProject(projectId: string, onResult: (err: any, statusCode: number, project: OperationsInterfaces.OperationReference) => void): void; - /** - * Update an existing project's name, abbreviation, or description. - * - * @param {CoreInterfaces.TeamProject} projectUpdate - The updates for the project. - * @param {string} projectId - The project id of the project to update. - * @param onResult callback function with the resulting OperationsInterfaces.OperationReference - */ - updateProject(projectUpdate: CoreInterfaces.TeamProject, projectId: string, onResult: (err: any, statusCode: number, project: OperationsInterfaces.OperationReference) => void): void; - /** - * @param {string} proxyUrl - * @param onResult callback function with the resulting CoreInterfaces.Proxy[] - */ - getProxies(proxyUrl: string, onResult: (err: any, statusCode: number, proxies: CoreInterfaces.Proxy[]) => void): void; - /** - * Creates a team - * - * @param {CoreInterfaces.WebApiTeam} team - The team data used to create the team. - * @param {string} projectId - The name or id (GUID) of the team project in which to create the team. - * @param onResult callback function with the resulting CoreInterfaces.WebApiTeam - */ - createTeam(team: CoreInterfaces.WebApiTeam, projectId: string, onResult: (err: any, statusCode: number, team: CoreInterfaces.WebApiTeam) => void): void; - /** - * Deletes a team - * - * @param {string} projectId - The name or id (GUID) of the team project containing the team to delete. - * @param {string} teamId - The name of id of the team to delete. - * @param onResult callback function - */ - deleteTeam(projectId: string, teamId: string, onResult: (err: any, statusCode: number) => void): void; - /** - * Gets a team - * - * @param {string} projectId - * @param {string} teamId - * @param onResult callback function with the resulting CoreInterfaces.WebApiTeam - */ - getTeam(projectId: string, teamId: string, onResult: (err: any, statusCode: number, team: CoreInterfaces.WebApiTeam) => void): void; - /** - * @param {string} projectId - * @param {number} top - * @param {number} skip - * @param onResult callback function with the resulting CoreInterfaces.WebApiTeam[] - */ - getTeams(projectId: string, top: number, skip: number, onResult: (err: any, statusCode: number, teams: CoreInterfaces.WebApiTeam[]) => void): void; - /** - * Updates a team's name and/or description - * - * @param {CoreInterfaces.WebApiTeam} teamData - * @param {string} projectId - The name or id (GUID) of the team project containing the team to update. - * @param {string} teamId - The name of id of the team to update. - * @param onResult callback function with the resulting CoreInterfaces.WebApiTeam - */ - updateTeam(teamData: CoreInterfaces.WebApiTeam, projectId: string, teamId: string, onResult: (err: any, statusCode: number, team: CoreInterfaces.WebApiTeam) => void): void; - } - export class QCoreApi extends basem.QClientApiBase implements IQCoreApi { - api: CoreApi; - constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); - /** - * @param {CoreInterfaces.WebApiConnectedServiceDetails} connectedServiceCreationData - * @param {string} projectId - */ - createConnectedService(connectedServiceCreationData: CoreInterfaces.WebApiConnectedServiceDetails, projectId: string): Promise; - /** - * @param {string} projectId - * @param {string} name - */ - getConnectedServiceDetails(projectId: string, name: string): Promise; - /** - * @param {string} projectId - * @param {CoreInterfaces.ConnectedServiceKind} kind - */ - getConnectedServices(projectId: string, kind?: CoreInterfaces.ConnectedServiceKind): Promise; - /** - * @param {CoreInterfaces.IdentityData} mruData - * @param {string} mruName - */ - createIdentityMru(mruData: CoreInterfaces.IdentityData, mruName: string): Promise; - /** - * @param {CoreInterfaces.IdentityData} mruData - * @param {string} mruName - */ - deleteIdentityMru(mruData: CoreInterfaces.IdentityData, mruName: string): Promise; - /** - * @param {string} mruName - */ - getIdentityMru(mruName: string): Promise; - /** - * @param {CoreInterfaces.IdentityData} mruData - * @param {string} mruName - */ - updateIdentityMru(mruData: CoreInterfaces.IdentityData, mruName: string): Promise; - /** - * @param {string} projectId - * @param {string} teamId - * @param {number} top - * @param {number} skip - */ - getTeamMembers(projectId: string, teamId: string, top?: number, skip?: number): Promise; - /** - * Retrieve process by id - * - * @param {string} processId - */ - getProcessById(processId: string): Promise; - /** - */ - getProcesses(): Promise; - /** - * Get project collection with the specified id or name. - * - * @param {string} collectionId - */ - getProjectCollection(collectionId: string): Promise; - /** - * Get project collection references for this application. - * - * @param {number} top - * @param {number} skip - */ - getProjectCollections(top?: number, skip?: number): Promise; - /** - * @param {number} minRevision - */ - getProjectHistory(minRevision?: number): Promise; - /** - * Get project with the specified id or name, optionally including capabilities. - * - * @param {string} projectId - * @param {boolean} includeCapabilities - Include capabilities (such as source control) in the team project result (default: false). - * @param {boolean} includeHistory - Search within renamed projects (that had such name in the past). - */ - getProject(projectId: string, includeCapabilities?: boolean, includeHistory?: boolean): Promise; - /** - * Get project references with the specified state - * - * @param {any} stateFilter - Filter on team projects in a specific team project state (default: WellFormed). - * @param {number} top - * @param {number} skip - */ - getProjects(stateFilter?: any, top?: number, skip?: number): Promise; - /** - * Queue a project creation. - * - * @param {CoreInterfaces.TeamProject} projectToCreate - The project to create. - */ - queueCreateProject(projectToCreate: CoreInterfaces.TeamProject): Promise; - /** - * Queue a project deletion. - * - * @param {string} projectId - The project id of the project to delete. - */ - queueDeleteProject(projectId: string): Promise; - /** - * Update an existing project's name, abbreviation, or description. - * - * @param {CoreInterfaces.TeamProject} projectUpdate - The updates for the project. - * @param {string} projectId - The project id of the project to update. - */ - updateProject(projectUpdate: CoreInterfaces.TeamProject, projectId: string): Promise; - /** - * @param {string} proxyUrl - */ - getProxies(proxyUrl?: string): Promise; - /** - * Creates a team - * - * @param {CoreInterfaces.WebApiTeam} team - The team data used to create the team. - * @param {string} projectId - The name or id (GUID) of the team project in which to create the team. - */ - createTeam(team: CoreInterfaces.WebApiTeam, projectId: string): Promise; - /** - * Deletes a team - * - * @param {string} projectId - The name or id (GUID) of the team project containing the team to delete. - * @param {string} teamId - The name of id of the team to delete. - */ - deleteTeam(projectId: string, teamId: string): Promise; - /** - * Gets a team - * - * @param {string} projectId - * @param {string} teamId - */ - getTeam(projectId: string, teamId: string): Promise; - /** - * @param {string} projectId - * @param {number} top - * @param {number} skip - */ - getTeams(projectId: string, top?: number, skip?: number): Promise; - /** - * Updates a team's name and/or description - * - * @param {CoreInterfaces.WebApiTeam} teamData - * @param {string} projectId - The name or id (GUID) of the team project containing the team to update. - * @param {string} teamId - The name of id of the team to update. - */ - updateTeam(teamData: CoreInterfaces.WebApiTeam, projectId: string, teamId: string): Promise; - } - -} -declare module 'vso-node-api/interfaces/FileContainerInterfaces' { - export enum ContainerItemStatus { - /** - * Item is created. - */ - Created = 1, - /** - * Item is a file pending for upload. - */ - PendingUpload = 2, - } - export enum ContainerItemType { - /** - * Any item type. - */ - Any = 0, - /** - * Item is a folder which can have child items. - */ - Folder = 1, - /** - * Item is a file which is stored in the file service. - */ - File = 2, - } - export enum ContainerOptions { - /** - * No option. - */ - None = 0, - } - /** - * Represents a container that encapsulates a hierarchical file system. - */ - export interface FileContainer { - /** - * Uri of the artifact associated with the container. - */ - artifactUri: string; - /** - * Download Url for the content of this item. - */ - contentLocation: string; - /** - * Owner. - */ - createdBy: string; - /** - * Creation date. - */ - dateCreated: Date; - /** - * Description. - */ - description: string; - /** - * Id. - */ - id: number; - /** - * Location of the item resource. - */ - itemLocation: string; - /** - * Name. - */ - name: string; - /** - * Options the container can have. - */ - options: ContainerOptions; - /** - * Project Id. - */ - scopeIdentifier: string; - /** - * Security token of the artifact associated with the container. - */ - securityToken: string; - /** - * Identifier of the optional encryption key. - */ - signingKeyId: string; - /** - * Total size of the files in bytes. - */ - size: number; - } - /** - * Represents an item in a container. - */ - export interface FileContainerItem { - /** - * Container Id. - */ - containerId: number; - contentId: number[]; - /** - * Download Url for the content of this item. - */ - contentLocation: string; - /** - * Creator. - */ - createdBy: string; - /** - * Creation date. - */ - dateCreated: Date; - /** - * Last modified date. - */ - dateLastModified: Date; - /** - * Encoding of the file. Zero if not a file. - */ - fileEncoding: number; - /** - * Hash value of the file. Null if not a file. - */ - fileHash: number[]; - /** - * Length of the file. Zero if not of a file. - */ - fileLength: number; - /** - * Type of the file. Zero if not a file. - */ - fileType: number; - /** - * Location of the item resource. - */ - itemLocation: string; - /** - * Type of the item: Folder, File or String. - */ - itemType: ContainerItemType; - /** - * Modifier. - */ - lastModifiedBy: string; - /** - * Unique path that identifies the item. - */ - path: string; - /** - * Project Id. - */ - scopeIdentifier: string; - /** - * Status of the item: Created or Pending Upload. - */ - status: ContainerItemStatus; - ticket: string; - } - export var TypeInfo: { - ContainerItemStatus: { - enumValues: { - "created": number; - "pendingUpload": number; - }; - }; - ContainerItemType: { - enumValues: { - "any": number; - "folder": number; - "file": number; - }; - }; - ContainerOptions: { - enumValues: { - "none": number; - }; - }; - FileContainer: { - fields: any; - }; - FileContainerItem: { - fields: any; - }; - }; - -} -declare module 'vso-node-api/FileContainerApiBase' { - - - import Q = require('q'); - import basem = require('vso-node-api/ClientApiBases'); - import VsoBaseInterfaces = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); - import FileContainerInterfaces = require('vso-node-api/interfaces/FileContainerInterfaces'); - import VSSInterfaces = require('vso-node-api/interfaces/common/VSSInterfaces'); - export interface IFileContainerApiBase extends basem.ClientApiBase { - createItems(items: VSSInterfaces.VssJsonCollectionWrapperV, containerId: number, scope: string, onResult: (err: any, statusCode: number, Container: FileContainerInterfaces.FileContainerItem[]) => void): void; - deleteItem(containerId: number, itemPath: string, scope: string, onResult: (err: any, statusCode: number) => void): void; - getContainers(scope: string, artifactUris: string, onResult: (err: any, statusCode: number, Containers: FileContainerInterfaces.FileContainer[]) => void): void; - getItems(containerId: number, scope: string, itemPath: string, metadata: boolean, format: string, downloadFileName: string, includeDownloadTickets: boolean, isShallow: boolean, onResult: (err: any, statusCode: number, Containers: FileContainerInterfaces.FileContainerItem[]) => void): void; - browseItems(container: number, itemPath: string, onResult: (err: any, statusCode: number, Containers: FileContainerInterfaces.FileContainerItem[]) => void): void; - } - export interface IQFileContainerApiBase extends basem.QClientApiBase { - createItems(items: VSSInterfaces.VssJsonCollectionWrapperV, containerId: number, scope?: string): Promise; - deleteItem(containerId: number, itemPath: string, scope?: string): Promise; - getContainers(scope?: string, artifactUris?: string): Promise; - getItems(containerId: number, scope?: string, itemPath?: string, metadata?: boolean, format?: string, downloadFileName?: string, includeDownloadTickets?: boolean, isShallow?: boolean): Promise; - browseItems(container: number, itemPath?: string): Promise; - } - export class FileContainerApiBase extends basem.ClientApiBase implements IFileContainerApiBase { - constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); - /** - * Creates the specified items in in the referenced container. - * - * @param {VSSInterfaces.VssJsonCollectionWrapperV} items - * @param {number} containerId - * @param {string} scope - A guid representing the scope of the container. This is often the project id. - * @param onResult callback function with the resulting FileContainerInterfaces.FileContainerItem[] - */ - createItems(items: VSSInterfaces.VssJsonCollectionWrapperV, containerId: number, scope: string, onResult: (err: any, statusCode: number, Container: FileContainerInterfaces.FileContainerItem[]) => void): void; - /** - * Deletes the specified items in a container. - * - * @param {number} containerId - Container Id. - * @param {string} itemPath - Path to delete. - * @param {string} scope - A guid representing the scope of the container. This is often the project id. - * @param onResult callback function - */ - deleteItem(containerId: number, itemPath: string, scope: string, onResult: (err: any, statusCode: number) => void): void; - /** - * Gets containers filtered by a comma separated list of artifact uris within the same scope, if not specified returns all containers - * - * @param {string} scope - A guid representing the scope of the container. This is often the project id. - * @param {string} artifactUris - * @param onResult callback function with the resulting FileContainerInterfaces.FileContainer[] - */ - getContainers(scope: string, artifactUris: string, onResult: (err: any, statusCode: number, Containers: FileContainerInterfaces.FileContainer[]) => void): void; - /** - * @param {number} containerId - * @param {string} scope - * @param {string} itemPath - * @param {boolean} metadata - * @param {string} format - * @param {string} downloadFileName - * @param {boolean} includeDownloadTickets - * @param {boolean} isShallow - * @param onResult callback function with the resulting FileContainerInterfaces.FileContainerItem[] - */ - getItems(containerId: number, scope: string, itemPath: string, metadata: boolean, format: string, downloadFileName: string, includeDownloadTickets: boolean, isShallow: boolean, onResult: (err: any, statusCode: number, Containers: FileContainerInterfaces.FileContainerItem[]) => void): void; - /** - * Allow browsing of file ,the contentDisposition is inline and Content-Type is determined by FileExtension - * - * @param {number} container - * @param {string} itemPath - The path to the item of interest - * @param onResult callback function with the resulting FileContainerInterfaces.FileContainerItem[] - */ - browseItems(container: number, itemPath: string, onResult: (err: any, statusCode: number, Containers: FileContainerInterfaces.FileContainerItem[]) => void): void; - } - export class QFileContainerApiBase extends basem.QClientApiBase implements IQFileContainerApiBase { - api: FileContainerApiBase; - constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], api: typeof basem.ClientApiBase); - /** - * Creates the specified items in in the referenced container. - * - * @param {VSSInterfaces.VssJsonCollectionWrapperV} items - * @param {number} containerId - * @param {string} scope - A guid representing the scope of the container. This is often the project id. - */ - createItems(items: VSSInterfaces.VssJsonCollectionWrapperV, containerId: number, scope?: string): Promise; - /** - * Deletes the specified items in a container. - * - * @param {number} containerId - Container Id. - * @param {string} itemPath - Path to delete. - * @param {string} scope - A guid representing the scope of the container. This is often the project id. - */ - deleteItem(containerId: number, itemPath: string, scope?: string): Promise; - /** - * Gets containers filtered by a comma separated list of artifact uris within the same scope, if not specified returns all containers - * - * @param {string} scope - A guid representing the scope of the container. This is often the project id. - * @param {string} artifactUris - */ - getContainers(scope?: string, artifactUris?: string): Promise; - /** - * @param {number} containerId - * @param {string} scope - * @param {string} itemPath - * @param {boolean} metadata - * @param {string} format - * @param {string} downloadFileName - * @param {boolean} includeDownloadTickets - * @param {boolean} isShallow - */ - getItems(containerId: number, scope?: string, itemPath?: string, metadata?: boolean, format?: string, downloadFileName?: string, includeDownloadTickets?: boolean, isShallow?: boolean): Promise; - /** - * Allow browsing of file ,the contentDisposition is inline and Content-Type is determined by FileExtension - * - * @param {number} container - * @param {string} itemPath - The path to the item of interest - */ - browseItems(container: number, itemPath?: string): Promise; - } - -} -declare module 'vso-node-api/FileContainerApi' { - - - import Q = require('q'); - import VsoBaseInterfaces = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); - import FileContainerApiBase = require('vso-node-api/FileContainerApiBase'); - import FileContainerInterfaces = require('vso-node-api/interfaces/FileContainerInterfaces'); - export interface IFileContainerApi extends FileContainerApiBase.IFileContainerApiBase { - createItem(contentStream: NodeJS.ReadableStream, uncompressedLength: number, containerId: number, itemPath: string, scope: string, options: any, onResult: (err: any, statusCode: number, Container: FileContainerInterfaces.FileContainerItem) => void): void; - } - export interface IQFileContainerApi extends FileContainerApiBase.IQFileContainerApiBase { - createItem(contentStream: NodeJS.ReadableStream, uncompressedLength: number, containerId: number, itemPath: string, scope: string, options: any): Promise; - } - export class FileContainerApi extends FileContainerApiBase.FileContainerApiBase implements IFileContainerApi { - constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); - createItem(contentStream: NodeJS.ReadableStream, uncompressedLength: number, containerId: number, itemPath: string, scope: string, options: any, onResult: (err: any, statusCode: number, Container: FileContainerInterfaces.FileContainerItem) => void): void; - _createItem(customHeaders: VsoBaseInterfaces.IHeaders, contentStream: NodeJS.ReadableStream, containerId: number, itemPath: string, scope: string, onResult: (err: any, statusCode: number, Container: FileContainerInterfaces.FileContainerItem) => void): void; - } - export class QFileContainerApi extends FileContainerApiBase.QFileContainerApiBase implements IQFileContainerApi { - api: FileContainerApi; - constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); - createItem(contentStream: NodeJS.ReadableStream, uncompressedLength: number, containerId: number, itemPath: string, scope: string, options: any): Promise; - } - -} -declare module 'vso-node-api/interfaces/GalleryInterfaces' { - export enum AcquisitionAssignmentType { - None = 0, - /** - * Just assign for me - */ - Me = 1, - /** - * Assign for all users in the account - */ - All = 2, - } - export interface AcquisitionOperation { - /** - * State of the the AcquisitionOperation for the current user - */ - operationState: AcquisitionOperationState; - /** - * AcquisitionOperationType: install, request, buy, etc... - */ - operationType: AcquisitionOperationType; - /** - * Optional reason to justify current state. Typically used with Disallow state. - */ - reason: string; - } - export enum AcquisitionOperationState { - /** - * Not allowed to use this AcquisitionOperation - */ - Disallow = 0, - /** - * Allowed to use this AcquisitionOperation - */ - Allow = 1, - /** - * Operation has already been completed and is no longer available - */ - Completed = 3, - } - export enum AcquisitionOperationType { - /** - * Not yet used - */ - Get = 0, - /** - * Install this extension into the host provided - */ - Install = 1, - /** - * Buy licenses for this extension and install into the host provided - */ - Buy = 2, - /** - * Not yet used - */ - Try = 3, - /** - * Not yet used - */ - Request = 4, - /** - * No action found - */ - None = 5, - } - /** - * Market item acquisition options (install, buy, etc) for an installation target. - */ - export interface AcquisitionOptions { - /** - * Default Operation for the ItemId in this target - */ - defaultOperation: AcquisitionOperation; - /** - * The item id that this options refer to - */ - itemId: string; - /** - * Operations allowed for the ItemId in this target - */ - operations: AcquisitionOperation[]; - /** - * The target that this options refer to - */ - target: string; - } - export enum ConcernCategory { - General = 1, - Abusive = 2, - Spam = 4, - } - /** - * Contract for handling the extension acquisition process - */ - export interface ExtensionAcquisitionRequest { - /** - * How the item is being assigned - */ - assignmentType: AcquisitionAssignmentType; - /** - * The id of the subscription used for purchase - */ - billingId: string; - /** - * The marketplace id (publisherName.extensionName) for the item - */ - itemId: string; - /** - * The type of operation, such as install, request, purchase - */ - operationType: AcquisitionOperationType; - /** - * Additional properties which can be added to the request. - */ - properties: any; - /** - * How many licenses should be purchased - */ - quantity: number; - /** - * A list of target guids where the item should be acquired (installed, requested, etc.), such as account id - */ - targets: string[]; - } - export interface ExtensionFile { - assetType: string; - contentType: string; - fileId: number; - isDefault: boolean; - isPublic: boolean; - language: string; - shortDescription: string; - source: string; - version: string; - } - /** - * The FilterResult is the set of extensions that matched a particular query filter. - */ - export interface ExtensionFilterResult { - /** - * This is the set of appplications that matched the query filter supplied. - */ - extensions: PublishedExtension[]; - /** - * The PagingToken is returned from a request when more records exist that match the result than were requested or could be returned. A follow-up query with this paging token can be used to retrieve more results. - */ - pagingToken: string; - /** - * This is the additional optional metadata for the given result. E.g. Total count of results which is useful in case of paged results - */ - resultMetadata: ExtensionFilterResultMetadata[]; - } - /** - * ExtensionFilterResultMetadata is one set of metadata for the result e.g. Total count. There can be multiple metadata items for one metadata. - */ - export interface ExtensionFilterResultMetadata { - /** - * The metadata items for the category - */ - metadataItems: MetadataItem[]; - /** - * Defines the category of metadata items - */ - metadataType: string; - } - /** - * Represents the component pieces of an extensions fully qualified name, along with the fully qualified name. - */ - export interface ExtensionIdentifier { - /** - * The ExtensionName component part of the fully qualified ExtensionIdentifier - */ - extensionName: string; - /** - * The PublisherName component part of the fully qualified ExtensionIdentifier - */ - publisherName: string; - } - /** - * Package that will be used to create or update a published extension - */ - export interface ExtensionPackage { - /** - * Base 64 encoded extension package - */ - extensionManifest: string; - } - /** - * Policy with a set of permissions on extension operations - */ - export interface ExtensionPolicy { - /** - * Permissions on 'Install' operation - */ - install: ExtensionPolicyFlags; - /** - * Permission on 'Request' operation - */ - request: ExtensionPolicyFlags; - } - export enum ExtensionPolicyFlags { - /** - * No permission - */ - None = 0, - /** - * Permission on private extensions - */ - Private = 1, - /** - * Permission on public extensions - */ - Public = 2, - /** - * Premission in extensions that are in preview - */ - Preview = 4, - /** - * Premission in relased extensions - */ - Released = 8, - /** - * Permission in 1st party extensions - */ - FirstParty = 16, - /** - * Mask that defines all permissions - */ - All = 31, - } - /** - * An ExtensionQuery is used to search the gallery for a set of extensions that match one of many filter values. - */ - export interface ExtensionQuery { - /** - * When retrieving extensions with a query; frequently the caller only needs a small subset of the assets. The caller may specify a list of asset types that should be returned if the extension contains it. All other assets will not be returned. - */ - assetTypes: string[]; - /** - * Each filter is a unique query and will have matching set of extensions returned from the request. Each result will have the same index in the resulting array that the filter had in the incoming query. - */ - filters: QueryFilter[]; - /** - * The Flags are used to deterine which set of information the caller would like returned for the matched extensions. - */ - flags: ExtensionQueryFlags; - } - export enum ExtensionQueryFilterType { - /** - * The values are used as tags. All tags are treated as "OR" conditions with each other. There may be some value put on the number of matched tags from the query. - */ - Tag = 1, - /** - * The Values are an ExtensionName or fragment that is used to match other extension names. - */ - DisplayName = 2, - /** - * The Filter is one or more tokens that define what scope to return private extensions for. - */ - Private = 3, - /** - * Retrieve a set of extensions based on their id's. The values should be the extension id's encoded as strings. - */ - Id = 4, - /** - * The catgeory is unlike other filters. It is AND'd with the other filters instead of being a seperate query. - */ - Category = 5, - /** - * Certain contribution types may be indexed to allow for query by type. User defined types can't be indexed at the moment. - */ - ContributionType = 6, - /** - * Retrieve an set extension based on the name based identifier. This differs from the internal id (which is being deprecated). - */ - Name = 7, - /** - * The InstallationTarget for an extension defines the target consumer for the extension. This may be something like VS, VSOnline, or VSCode - */ - InstallationTarget = 8, - /** - * Query for featured extensions, no value is allowed when using the query type. - */ - Featured = 9, - /** - * The SearchText provided by the user to search for extensions - */ - SearchText = 10, - } - export enum ExtensionQueryFlags { - /** - * None is used to retrieve only the basic extension details. - */ - None = 0, - /** - * IncludeVersions will return version information for extensions returned - */ - IncludeVersions = 1, - /** - * IncludeFiles will return information about which files were found within the extension that were stored independant of the manifest. When asking for files, versions will be included as well since files are returned as a property of the versions. These files can be retrieved using the path to the file without requiring the entire manifest be downloaded. - */ - IncludeFiles = 2, - /** - * Include the Categories and Tags that were added to the extension definition. - */ - IncludeCategoryAndTags = 4, - /** - * Include the details about which accounts the extension has been shared with if the extesion is a private extension. - */ - IncludeSharedAccounts = 8, - /** - * Include properties associated with versions of the extension - */ - IncludeVersionProperties = 16, - /** - * Excluding non-validated extensions will remove any extension versions that either are in the process of being validated or have failed validation. - */ - ExcludeNonValidated = 32, - /** - * Include the set of installation targets the extension has requested. - */ - IncludeInstallationTargets = 64, - /** - * Include the base uri for assets of this extension - */ - IncludeAssetUri = 128, - /** - * Include the statistics associated with this extension - */ - IncludeStatistics = 256, - /** - * When retrieving versions from a query, only include the latest version of the extensions that matched. This is useful when the caller doesn't need all the published versions. It will save a significant size in the returned payload. - */ - IncludeLatestVersionOnly = 512, - /** - * AllAttributes is designed to be a mask that defines all sub-elements of the extension should be returned. NOTE: This is not actually All flags. This is now locked to the set defined since changing this enum would be a breaking change and would change the behavior of anyone using it. Try not to use this value when making calls to the service, instead be explicit about the options required. - */ - AllAttributes = 479, - } - /** - * This is the set of extensions that matched a supplied query through the filters given. - */ - export interface ExtensionQueryResult { - /** - * For each filter supplied in the query, a filter result will be returned in the query result. - */ - results: ExtensionFilterResult[]; - } - export interface ExtensionShare { - id: string; - name: string; - type: string; - } - export interface ExtensionStatistic { - statisticName: string; - value: number; - } - export enum ExtensionStatisticOperation { - None = 0, - Set = 1, - Increment = 2, - Decrement = 3, - } - export interface ExtensionVersion { - assetUri: string; - files: ExtensionFile[]; - flags: ExtensionVersionFlags; - lastUpdated: Date; - properties: { - key: string; - value: string; - }[]; - validationResultMessage: string; - version: string; - versionDescription: string; - } - export enum ExtensionVersionFlags { - /** - * No flags exist for this version. - */ - None = 0, - /** - * The Validated flag for a version means the extension version has passed validation and can be used.. - */ - Validated = 1, - } - /** - * One condition in a QueryFilter. - */ - export interface FilterCriteria { - filterType: number; - /** - * The value used in the match based on the filter type. - */ - value: string; - } - export interface InstallationTarget { - target: string; - } - /** - * MetadataItem is one value of metadata under a given category of metadata - */ - export interface MetadataItem { - /** - * The count of the metadata item - */ - count: number; - /** - * The name of the metadata item - */ - name: string; - } - export enum PagingDirection { - /** - * Backward will return results from earlier in the resultset. - */ - Backward = 1, - /** - * Forward will return results from later in the resultset. - */ - Forward = 2, - } - export interface PublishedExtension { - categories: string[]; - displayName: string; - extensionId: string; - extensionName: string; - flags: PublishedExtensionFlags; - installationTargets: InstallationTarget[]; - lastUpdated: Date; - longDescription: string; - publisher: PublisherFacts; - sharedWith: ExtensionShare[]; - shortDescription: string; - statistics: ExtensionStatistic[]; - tags: string[]; - versions: ExtensionVersion[]; - } - export enum PublishedExtensionFlags { - /** - * No flags exist for this extension. - */ - None = 0, - /** - * The Disabled flag for an extension means the extension can't be changed and won't be used by consumers. The disabled flag is managed by the service and can't be supplied by the Extension Developers. - */ - Disabled = 1, - /** - * BuiltIn Extension are available to all Tenants. An explicit registration is not required. This attribute is reserved and can't be supplied by Extension Developers. BuiltIn extensions are by definition Public. There is no need to set the public flag for extensions marked BuiltIn. - */ - BuiltIn = 2, - /** - * This extension has been validated by the service. The extension meets the requirements specified. This attribute is reserved and can't be supplied by the Extension Developers. Validation is a process that ensures that all contributions are well formed. They meet the requirements defined by the contribution type they are extending. Note this attribute will be updated asynchronously as the extension is validated by the developer of the contribution type. There will be restricted access to the extension while this process is performed. - */ - Validated = 4, - /** - * Trusted extensions are ones that are given special capabilities. These tend to come from Microsoft and can't be published by the general public. Note: BuiltIn extensions are always trusted. - */ - Trusted = 8, - /** - * This extension registration is public, making its visibilty open to the public. This means all tenants have the ability to install this extension. Without this flag the extension will be private and will need to be shared with the tenants that can install it. - */ - Public = 256, - /** - * This extension has multiple versions active at one time and version discovery should be done usig the defined "Version Discovery" protocol to determine the version available to a specific user or tenant. @TODO: Link to Version Discovery Protocol. - */ - MultiVersion = 512, - /** - * The system flag is reserved, and cant be used by publishers. - */ - System = 1024, - /** - * The Preview flag indicates that the extension is still under preview (not yet of "release" quality). These extensions may be decorated differently in the gallery and may have different policies applied to them. - */ - Preview = 2048, - } - export interface Publisher { - displayName: string; - extensions: PublishedExtension[]; - flags: PublisherFlags; - lastUpdated: Date; - longDescription: string; - publisherId: string; - publisherName: string; - shortDescription: string; - } - /** - * High-level information about the publisher, like id's and names - */ - export interface PublisherFacts { - displayName: string; - flags: PublisherFlags; - publisherId: string; - publisherName: string; - } - /** - * The FilterResult is the set of publishers that matched a particular query filter. - */ - export interface PublisherFilterResult { - /** - * This is the set of appplications that matched the query filter supplied. - */ - publishers: Publisher[]; - } - export enum PublisherFlags { - /** - * This should never be returned, it is used to represent a publisher who's flags havent changed during update calls. - */ - UnChanged = 1073741824, - /** - * No flags exist for this publisher. - */ - None = 0, - /** - * The Disabled flag for a publisher means the publisher can't be changed and won't be used by consumers, this extends to extensions owned by the publisher as well. The disabled flag is managed by the service and can't be supplied by the Extension Developers. - */ - Disabled = 1, - /** - * A verified publisher is one that Microsoft has done some review of and ensured the publisher meets a set of requirements. The requirements to become a verified publisher are not listed here. They can be found in public documentation (TBD). - */ - Verified = 2, - /** - * This is the set of flags that can't be supplied by the developer and is managed by the service itself. - */ - ServiceFlags = 3, - } - export enum PublisherPermissions { - /** - * This gives the bearer the rights to read Publishers and Extensions. - */ - Read = 1, - /** - * This gives the bearer the rights to update, delete, and share Extensions (but not the ability to create them). - */ - UpdateExtension = 2, - /** - * This gives the bearer the rights to create new Publishers at the root of the namespace. - */ - CreatePublisher = 4, - /** - * This gives the bearer the rights to create new Extensions within a publisher. - */ - PublishExtension = 8, - /** - * Admin gives the bearer the rights to manage restricted attributes of Publishers and Extensions. - */ - Admin = 16, - /** - * TrustedPartner gives the bearer the rights to publish a extensions with restricted capabilities. - */ - TrustedPartner = 32, - /** - * PrivateRead is another form of read designed to allow higher privilege accessors the ability to read private extensions. - */ - PrivateRead = 64, - /** - * This gives the bearer the rights to delete any extension. - */ - DeleteExtension = 128, - /** - * This gives the bearer the rights edit the publisher settings. - */ - EditSettings = 256, - /** - * This gives the bearer the rights to see all permissions on the publisher. - */ - ViewPermissions = 512, - /** - * This gives the bearer the rights to assign permissions on the publisher. - */ - ManagePermissions = 1024, - /** - * This gives the bearer the rights to delete the publisher. - */ - DeletePublisher = 2048, - } - /** - * An PublisherQuery is used to search the gallery for a set of publishers that match one of many filter values. - */ - export interface PublisherQuery { - /** - * Each filter is a unique query and will have matching set of publishers returned from the request. Each result will have the same index in the resulting array that the filter had in the incoming query. - */ - filters: QueryFilter[]; - /** - * The Flags are used to deterine which set of information the caller would like returned for the matched publishers. - */ - flags: PublisherQueryFlags; - } - export enum PublisherQueryFilterType { - /** - * The values are used as tags. All tags are treated as "OR" conditions with each other. There may be some value put on the number of matched tags from the query. - */ - Tag = 1, - /** - * The Values are an PublisherName or fragment that is used to match other extension names. - */ - DisplayName = 2, - /** - * The My Query filter is used to retrieve the set of publishers that I have access to publish extesions into. All Values are ignored and the calling user is used as the filter in this case. - */ - My = 3, - } - export enum PublisherQueryFlags { - /** - * None is used to retrieve only the basic publisher details. - */ - None = 0, - /** - * Is used to include a list of basic extension details for all extensions published by the requested publisher. - */ - IncludeExtensions = 1, - } - /** - * This is the set of publishers that matched a supplied query through the filters given. - */ - export interface PublisherQueryResult { - /** - * For each filter supplied in the query, a filter result will be returned in the query result. - */ - results: PublisherFilterResult[]; - } - /** - * A filter used to define a set of extensions to return during a query. - */ - export interface QueryFilter { - /** - * The filter values define the set of values in this query. They are applied based on the QueryFilterType. - */ - criteria: FilterCriteria[]; - /** - * The PagingDirection is applied to a paging token if one exists. If not the direction is ignored, and Forward from the start of the resultset is used. Direction should be left out of the request unless a paging token is used to help prevent future issues. - */ - direction: PagingDirection; - /** - * The page number requested by the user. If not provided 1 is assumed by default. - */ - pageNumber: number; - /** - * The page size defines the number of results the caller wants for this filter. The count can't exceed the overall query size limits. - */ - pageSize: number; - /** - * The paging token is a distinct type of filter and the other filter fields are ignored. The paging token represents the continuation of a previously executed query. The information about where in the result and what fields are being filtered are embeded in the token. - */ - pagingToken: string; - /** - * Defines the type of sorting to be applied on the results. The page slice is cut of the sorted results only. - */ - sortBy: number; - /** - * Defines the order of sorting, 1 for Ascending, 2 for Descending, else default ordering based on the SortBy value - */ - sortOrder: number; - } - export interface Review { - /** - * Unique identifier of a review item - */ - id: number; - /** - * Flag for soft deletion - */ - isDeleted: boolean; - /** - * Version of the product for which review was submitted - */ - productVersion: string; - /** - * Rating procided by the user - */ - rating: number; - /** - * Text description of the review - */ - text: string; - /** - * Title of the review - */ - title: string; - /** - * Time when the review was edited/updated - */ - updatedDate: Date; - /** - * Id of the user who submitted the review - */ - userId: string; - } - export interface ReviewsResult { - /** - * Flag indicating if there are more reviews to be shown (for paging) - */ - hasMoreReviews: boolean; - /** - * List of reviews - */ - reviews: Review[]; - /** - * Count of total review items - */ - totalReviewCount: number; - } - export enum SigningKeyPermissions { - Read = 1, - Write = 2, - } - export enum SortByType { - /** - * The results will be sorted by relevance in case search query is given, if no search query resutls will be provided as is - */ - Relevance = 0, - /** - * The results will be sorted as per Last Updated date of the extensions with recently updated at the top - */ - LastUpdatedDate = 1, - /** - * Results will be sorted Alphabetically as per the title of the extension - */ - Title = 2, - /** - * Results will be sorted Alphabetically as per Publisher title - */ - Publisher = 3, - /** - * Results will be sorted by Install Count - */ - InstallCount = 4, - } - export enum SortOrderType { - /** - * Results will be sorted in the default order as per the sorting type defined. The default varies for each type, e.g. for Relevance, default is Descnding, for Title default is Ascending etc. - */ - Default = 0, - /** - * The results will be sorted in Ascending order - */ - Ascending = 1, - /** - * The results will be sorted in Descending order - */ - Descending = 2, - } - /** - * Represents the extension policy applied to a given user - */ - export interface UserExtensionPolicy { - /** - * User display name that this policy refers to - */ - displayName: string; - /** - * The extension policy applied to the user - */ - permissions: ExtensionPolicy; - /** - * User id that this policy refers to - */ - userId: string; - } - export interface UserReportedConcern { - /** - * Category of the concern - */ - category: ConcernCategory; - /** - * User comment associated with the report - */ - concernText: string; - /** - * Id of the review which was reported - */ - reviewId: number; - /** - * Date the report was submitted - */ - submittedDate: Date; - /** - * Id of the user who reported a review - */ - userId: string; - } - export var TypeInfo: { - AcquisitionAssignmentType: { - enumValues: { - "none": number; - "me": number; - "all": number; - }; - }; - AcquisitionOperation: { - fields: any; - }; - AcquisitionOperationState: { - enumValues: { - "disallow": number; - "allow": number; - "completed": number; - }; - }; - AcquisitionOperationType: { - enumValues: { - "get": number; - "install": number; - "buy": number; - "try": number; - "request": number; - "none": number; - }; - }; - AcquisitionOptions: { - fields: any; - }; - ConcernCategory: { - enumValues: { - "general": number; - "abusive": number; - "spam": number; - }; - }; - ExtensionAcquisitionRequest: { - fields: any; - }; - ExtensionFile: { - fields: any; - }; - ExtensionFilterResult: { - fields: any; - }; - ExtensionFilterResultMetadata: { - fields: any; - }; - ExtensionIdentifier: { - fields: any; - }; - ExtensionPackage: { - fields: any; - }; - ExtensionPolicy: { - fields: any; - }; - ExtensionPolicyFlags: { - enumValues: { - "none": number; - "private": number; - "public": number; - "preview": number; - "released": number; - "firstParty": number; - "all": number; - }; - }; - ExtensionQuery: { - fields: any; - }; - ExtensionQueryFilterType: { - enumValues: { - "tag": number; - "displayName": number; - "private": number; - "id": number; - "category": number; - "contributionType": number; - "name": number; - "installationTarget": number; - "featured": number; - "searchText": number; - }; - }; - ExtensionQueryFlags: { - enumValues: { - "none": number; - "includeVersions": number; - "includeFiles": number; - "includeCategoryAndTags": number; - "includeSharedAccounts": number; - "includeVersionProperties": number; - "excludeNonValidated": number; - "includeInstallationTargets": number; - "includeAssetUri": number; - "includeStatistics": number; - "includeLatestVersionOnly": number; - "allAttributes": number; - }; - }; - ExtensionQueryResult: { - fields: any; - }; - ExtensionShare: { - fields: any; - }; - ExtensionStatistic: { - fields: any; - }; - ExtensionStatisticOperation: { - enumValues: { - "none": number; - "set": number; - "increment": number; - "decrement": number; - }; - }; - ExtensionVersion: { - fields: any; - }; - ExtensionVersionFlags: { - enumValues: { - "none": number; - "validated": number; - }; - }; - FilterCriteria: { - fields: any; - }; - InstallationTarget: { - fields: any; - }; - MetadataItem: { - fields: any; - }; - PagingDirection: { - enumValues: { - "backward": number; - "forward": number; - }; - }; - PublishedExtension: { - fields: any; - }; - PublishedExtensionFlags: { - enumValues: { - "none": number; - "disabled": number; - "builtIn": number; - "validated": number; - "trusted": number; - "public": number; - "multiVersion": number; - "system": number; - "preview": number; - }; - }; - Publisher: { - fields: any; - }; - PublisherFacts: { - fields: any; - }; - PublisherFilterResult: { - fields: any; - }; - PublisherFlags: { - enumValues: { - "unChanged": number; - "none": number; - "disabled": number; - "verified": number; - "serviceFlags": number; - }; - }; - PublisherPermissions: { - enumValues: { - "read": number; - "updateExtension": number; - "createPublisher": number; - "publishExtension": number; - "admin": number; - "trustedPartner": number; - "privateRead": number; - "deleteExtension": number; - "editSettings": number; - "viewPermissions": number; - "managePermissions": number; - "deletePublisher": number; - }; - }; - PublisherQuery: { - fields: any; - }; - PublisherQueryFilterType: { - enumValues: { - "tag": number; - "displayName": number; - "my": number; - }; - }; - PublisherQueryFlags: { - enumValues: { - "none": number; - "includeExtensions": number; - }; - }; - PublisherQueryResult: { - fields: any; - }; - QueryFilter: { - fields: any; - }; - Review: { - fields: any; - }; - ReviewsResult: { - fields: any; - }; - SigningKeyPermissions: { - enumValues: { - "read": number; - "write": number; - }; - }; - SortByType: { - enumValues: { - "relevance": number; - "lastUpdatedDate": number; - "title": number; - "publisher": number; - "installCount": number; - }; - }; - SortOrderType: { - enumValues: { - "default": number; - "ascending": number; - "descending": number; - }; - }; - UserExtensionPolicy: { - fields: any; - }; - UserReportedConcern: { - fields: any; - }; - }; - -} -declare module 'vso-node-api/GalleryApi' { - - - import Q = require('q'); - import basem = require('vso-node-api/ClientApiBases'); - import VsoBaseInterfaces = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); - import GalleryInterfaces = require('vso-node-api/interfaces/GalleryInterfaces'); - export interface IGalleryApi extends basem.ClientApiBase { - shareExtensionById(extensionId: string, accountName: string, onResult: (err: any, statusCode: number) => void): void; - unshareExtensionById(extensionId: string, accountName: string, onResult: (err: any, statusCode: number) => void): void; - shareExtension(publisherName: string, extensionName: string, accountName: string, onResult: (err: any, statusCode: number) => void): void; - unshareExtension(publisherName: string, extensionName: string, accountName: string, onResult: (err: any, statusCode: number) => void): void; - getAcquisitionOptions(itemId: string, installationTarget: string, onResult: (err: any, statusCode: number, acquisitionoption: GalleryInterfaces.AcquisitionOptions) => void): void; - requestAcquisition(acquisitionRequest: GalleryInterfaces.ExtensionAcquisitionRequest, onResult: (err: any, statusCode: number, acquisitionrequest: GalleryInterfaces.ExtensionAcquisitionRequest) => void): void; - getAssetByName(publisherName: string, extensionName: string, version: string, assetType: string, accountToken: string, acceptDefault: boolean, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - getAsset(extensionId: string, version: string, assetType: string, accountToken: string, acceptDefault: boolean, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - getCategories(languages: string, onResult: (err: any, statusCode: number, categories: string[]) => void): void; - getCertificate(publisherName: string, extensionName: string, version: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - queryExtensions(extensionQuery: GalleryInterfaces.ExtensionQuery, accountToken: string, onResult: (err: any, statusCode: number, extensionquery: GalleryInterfaces.ExtensionQueryResult) => void): void; - createExtension(extensionPackage: GalleryInterfaces.ExtensionPackage, onResult: (err: any, statusCode: number, extension: GalleryInterfaces.PublishedExtension) => void): void; - deleteExtensionById(extensionId: string, version: string, onResult: (err: any, statusCode: number) => void): void; - getExtensionById(extensionId: string, version: string, flags: GalleryInterfaces.ExtensionQueryFlags, onResult: (err: any, statusCode: number, extension: GalleryInterfaces.PublishedExtension) => void): void; - updateExtensionById(extensionPackage: GalleryInterfaces.ExtensionPackage, extensionId: string, onResult: (err: any, statusCode: number, extension: GalleryInterfaces.PublishedExtension) => void): void; - createExtensionWithPublisher(extensionPackage: GalleryInterfaces.ExtensionPackage, publisherName: string, onResult: (err: any, statusCode: number, extension: GalleryInterfaces.PublishedExtension) => void): void; - deleteExtension(publisherName: string, extensionName: string, version: string, onResult: (err: any, statusCode: number) => void): void; - getExtension(publisherName: string, extensionName: string, version: string, flags: GalleryInterfaces.ExtensionQueryFlags, accountToken: string, onResult: (err: any, statusCode: number, extension: GalleryInterfaces.PublishedExtension) => void): void; - updateExtension(extensionPackage: GalleryInterfaces.ExtensionPackage, publisherName: string, extensionName: string, onResult: (err: any, statusCode: number, extension: GalleryInterfaces.PublishedExtension) => void): void; - getPackage(publisherName: string, extensionName: string, version: string, accountToken: string, acceptDefault: boolean, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - getAssetWithToken(publisherName: string, extensionName: string, version: string, assetType: string, assetToken: string, accountToken: string, acceptDefault: boolean, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - queryPublishers(publisherQuery: GalleryInterfaces.PublisherQuery, onResult: (err: any, statusCode: number, publisherquery: GalleryInterfaces.PublisherQueryResult) => void): void; - createPublisher(publisher: GalleryInterfaces.Publisher, onResult: (err: any, statusCode: number, publisher: GalleryInterfaces.Publisher) => void): void; - deletePublisher(publisherName: string, onResult: (err: any, statusCode: number) => void): void; - getPublisher(publisherName: string, flags: number, onResult: (err: any, statusCode: number, publisher: GalleryInterfaces.Publisher) => void): void; - updatePublisher(publisher: GalleryInterfaces.Publisher, publisherName: string, onResult: (err: any, statusCode: number, publisher: GalleryInterfaces.Publisher) => void): void; - createReview(review: GalleryInterfaces.Review, extensionId: string, onResult: (err: any, statusCode: number, review: GalleryInterfaces.Review) => void): void; - getReviews(extensionId: string, onResult: (err: any, statusCode: number, review: GalleryInterfaces.ReviewsResult) => void): void; - generateKey(keyType: string, expireCurrentSeconds: number, onResult: (err: any, statusCode: number) => void): void; - getSigningKey(keyType: string, onResult: (err: any, statusCode: number, signingkey: string) => void): void; - } - export interface IGalleryApi extends basem.QClientApiBase { - shareExtensionById(extensionId: string, accountName: string): Promise; - unshareExtensionById(extensionId: string, accountName: string): Promise; - shareExtension(publisherName: string, extensionName: string, accountName: string): Promise; - unshareExtension(publisherName: string, extensionName: string, accountName: string): Promise; - getAcquisitionOptions(itemId: string, installationTarget: string): Promise; - requestAcquisition(acquisitionRequest: GalleryInterfaces.ExtensionAcquisitionRequest): Promise; - getAssetByName(publisherName: string, extensionName: string, version: string, assetType: string, accountToken?: string, acceptDefault?: boolean): Promise; - getAsset(extensionId: string, version: string, assetType: string, accountToken?: string, acceptDefault?: boolean): Promise; - getCategories(languages?: string): Promise; - getCertificate(publisherName: string, extensionName: string, version?: string): Promise; - queryExtensions(extensionQuery: GalleryInterfaces.ExtensionQuery, accountToken?: string): Promise; - createExtension(extensionPackage: GalleryInterfaces.ExtensionPackage): Promise; - deleteExtensionById(extensionId: string, version?: string): Promise; - getExtensionById(extensionId: string, version?: string, flags?: GalleryInterfaces.ExtensionQueryFlags): Promise; - updateExtensionById(extensionPackage: GalleryInterfaces.ExtensionPackage, extensionId: string): Promise; - createExtensionWithPublisher(extensionPackage: GalleryInterfaces.ExtensionPackage, publisherName: string): Promise; - deleteExtension(publisherName: string, extensionName: string, version?: string): Promise; - getExtension(publisherName: string, extensionName: string, version?: string, flags?: GalleryInterfaces.ExtensionQueryFlags, accountToken?: string): Promise; - updateExtension(extensionPackage: GalleryInterfaces.ExtensionPackage, publisherName: string, extensionName: string): Promise; - getPackage(publisherName: string, extensionName: string, version: string, accountToken?: string, acceptDefault?: boolean): Promise; - getAssetWithToken(publisherName: string, extensionName: string, version: string, assetType: string, assetToken?: string, accountToken?: string, acceptDefault?: boolean): Promise; - queryPublishers(publisherQuery: GalleryInterfaces.PublisherQuery): Promise; - createPublisher(publisher: GalleryInterfaces.Publisher): Promise; - deletePublisher(publisherName: string): Promise; - getPublisher(publisherName: string, flags?: number): Promise; - updatePublisher(publisher: GalleryInterfaces.Publisher, publisherName: string): Promise; - createReview(review: GalleryInterfaces.Review, extensionId: string): Promise; - getReviews(extensionId: string): Promise; - generateKey(keyType: string, expireCurrentSeconds?: number): Promise; - getSigningKey(keyType: string): Promise; - } - export class GalleryApi extends basem.ClientApiBase implements IGalleryApi { - constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); - /** - * @param {string} extensionId - * @param {string} accountName - * @param onResult callback function - */ - shareExtensionById(extensionId: string, accountName: string, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {string} extensionId - * @param {string} accountName - * @param onResult callback function - */ - unshareExtensionById(extensionId: string, accountName: string, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {string} publisherName - * @param {string} extensionName - * @param {string} accountName - * @param onResult callback function - */ - shareExtension(publisherName: string, extensionName: string, accountName: string, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {string} publisherName - * @param {string} extensionName - * @param {string} accountName - * @param onResult callback function - */ - unshareExtension(publisherName: string, extensionName: string, accountName: string, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {string} itemId - * @param {string} installationTarget - * @param onResult callback function with the resulting GalleryInterfaces.AcquisitionOptions - */ - getAcquisitionOptions(itemId: string, installationTarget: string, onResult: (err: any, statusCode: number, acquisitionoption: GalleryInterfaces.AcquisitionOptions) => void): void; - /** - * @param {GalleryInterfaces.ExtensionAcquisitionRequest} acquisitionRequest - * @param onResult callback function with the resulting GalleryInterfaces.ExtensionAcquisitionRequest - */ - requestAcquisition(acquisitionRequest: GalleryInterfaces.ExtensionAcquisitionRequest, onResult: (err: any, statusCode: number, acquisitionrequest: GalleryInterfaces.ExtensionAcquisitionRequest) => void): void; - /** - * @param {string} publisherName - * @param {string} extensionName - * @param {string} version - * @param {string} assetType - * @param {string} accountToken - * @param {boolean} acceptDefault - * @param onResult callback function with the resulting ArrayBuffer - */ - getAssetByName(publisherName: string, extensionName: string, version: string, assetType: string, accountToken: string, acceptDefault: boolean, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * @param {string} extensionId - * @param {string} version - * @param {string} assetType - * @param {string} accountToken - * @param {boolean} acceptDefault - * @param onResult callback function with the resulting ArrayBuffer - */ - getAsset(extensionId: string, version: string, assetType: string, accountToken: string, acceptDefault: boolean, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * @param {string} languages - * @param onResult callback function with the resulting string[] - */ - getCategories(languages: string, onResult: (err: any, statusCode: number, categories: string[]) => void): void; - /** - * @param {string} publisherName - * @param {string} extensionName - * @param {string} version - * @param onResult callback function with the resulting ArrayBuffer - */ - getCertificate(publisherName: string, extensionName: string, version: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * @param {GalleryInterfaces.ExtensionQuery} extensionQuery - * @param {string} accountToken - * @param onResult callback function with the resulting GalleryInterfaces.ExtensionQueryResult - */ - queryExtensions(extensionQuery: GalleryInterfaces.ExtensionQuery, accountToken: string, onResult: (err: any, statusCode: number, extensionquery: GalleryInterfaces.ExtensionQueryResult) => void): void; - /** - * @param {GalleryInterfaces.ExtensionPackage} extensionPackage - * @param onResult callback function with the resulting GalleryInterfaces.PublishedExtension - */ - createExtension(extensionPackage: GalleryInterfaces.ExtensionPackage, onResult: (err: any, statusCode: number, extension: GalleryInterfaces.PublishedExtension) => void): void; - /** - * @param {string} extensionId - * @param {string} version - * @param onResult callback function - */ - deleteExtensionById(extensionId: string, version: string, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {string} extensionId - * @param {string} version - * @param {GalleryInterfaces.ExtensionQueryFlags} flags - * @param onResult callback function with the resulting GalleryInterfaces.PublishedExtension - */ - getExtensionById(extensionId: string, version: string, flags: GalleryInterfaces.ExtensionQueryFlags, onResult: (err: any, statusCode: number, extension: GalleryInterfaces.PublishedExtension) => void): void; - /** - * @param {GalleryInterfaces.ExtensionPackage} extensionPackage - * @param {string} extensionId - * @param onResult callback function with the resulting GalleryInterfaces.PublishedExtension - */ - updateExtensionById(extensionPackage: GalleryInterfaces.ExtensionPackage, extensionId: string, onResult: (err: any, statusCode: number, extension: GalleryInterfaces.PublishedExtension) => void): void; - /** - * @param {GalleryInterfaces.ExtensionPackage} extensionPackage - * @param {string} publisherName - * @param onResult callback function with the resulting GalleryInterfaces.PublishedExtension - */ - createExtensionWithPublisher(extensionPackage: GalleryInterfaces.ExtensionPackage, publisherName: string, onResult: (err: any, statusCode: number, extension: GalleryInterfaces.PublishedExtension) => void): void; - /** - * @param {string} publisherName - * @param {string} extensionName - * @param {string} version - * @param onResult callback function - */ - deleteExtension(publisherName: string, extensionName: string, version: string, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {string} publisherName - * @param {string} extensionName - * @param {string} version - * @param {GalleryInterfaces.ExtensionQueryFlags} flags - * @param {string} accountToken - * @param onResult callback function with the resulting GalleryInterfaces.PublishedExtension - */ - getExtension(publisherName: string, extensionName: string, version: string, flags: GalleryInterfaces.ExtensionQueryFlags, accountToken: string, onResult: (err: any, statusCode: number, extension: GalleryInterfaces.PublishedExtension) => void): void; - /** - * @param {GalleryInterfaces.ExtensionPackage} extensionPackage - * @param {string} publisherName - * @param {string} extensionName - * @param onResult callback function with the resulting GalleryInterfaces.PublishedExtension - */ - updateExtension(extensionPackage: GalleryInterfaces.ExtensionPackage, publisherName: string, extensionName: string, onResult: (err: any, statusCode: number, extension: GalleryInterfaces.PublishedExtension) => void): void; - /** - * @param {string} publisherName - * @param {string} extensionName - * @param {string} version - * @param {string} accountToken - * @param {boolean} acceptDefault - * @param onResult callback function with the resulting ArrayBuffer - */ - getPackage(publisherName: string, extensionName: string, version: string, accountToken: string, acceptDefault: boolean, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * @param {string} publisherName - * @param {string} extensionName - * @param {string} version - * @param {string} assetType - * @param {string} assetToken - * @param {string} accountToken - * @param {boolean} acceptDefault - * @param onResult callback function with the resulting ArrayBuffer - */ - getAssetWithToken(publisherName: string, extensionName: string, version: string, assetType: string, assetToken: string, accountToken: string, acceptDefault: boolean, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * @param {GalleryInterfaces.PublisherQuery} publisherQuery - * @param onResult callback function with the resulting GalleryInterfaces.PublisherQueryResult - */ - queryPublishers(publisherQuery: GalleryInterfaces.PublisherQuery, onResult: (err: any, statusCode: number, publisherquery: GalleryInterfaces.PublisherQueryResult) => void): void; - /** - * @param {GalleryInterfaces.Publisher} publisher - * @param onResult callback function with the resulting GalleryInterfaces.Publisher - */ - createPublisher(publisher: GalleryInterfaces.Publisher, onResult: (err: any, statusCode: number, publisher: GalleryInterfaces.Publisher) => void): void; - /** - * @param {string} publisherName - * @param onResult callback function - */ - deletePublisher(publisherName: string, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {string} publisherName - * @param {number} flags - * @param onResult callback function with the resulting GalleryInterfaces.Publisher - */ - getPublisher(publisherName: string, flags: number, onResult: (err: any, statusCode: number, publisher: GalleryInterfaces.Publisher) => void): void; - /** - * @param {GalleryInterfaces.Publisher} publisher - * @param {string} publisherName - * @param onResult callback function with the resulting GalleryInterfaces.Publisher - */ - updatePublisher(publisher: GalleryInterfaces.Publisher, publisherName: string, onResult: (err: any, statusCode: number, publisher: GalleryInterfaces.Publisher) => void): void; - /** - * Creates a new review item - * - * @param {GalleryInterfaces.Review} review - Contains details about the review item to be created like rating, reviewText, productId - * @param {string} extensionId - * @param onResult callback function with the resulting GalleryInterfaces.Review - */ - createReview(review: GalleryInterfaces.Review, extensionId: string, onResult: (err: any, statusCode: number, review: GalleryInterfaces.Review) => void): void; - /** - * Returns all reviews associated with a product - * - * @param {string} extensionId - Guid of the extension whose reviews need to be retrieved - * @param onResult callback function with the resulting GalleryInterfaces.ReviewsResult - */ - getReviews(extensionId: string, onResult: (err: any, statusCode: number, review: GalleryInterfaces.ReviewsResult) => void): void; - /** - * @param {string} keyType - * @param {number} expireCurrentSeconds - * @param onResult callback function - */ - generateKey(keyType: string, expireCurrentSeconds: number, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {string} keyType - * @param onResult callback function with the resulting string - */ - getSigningKey(keyType: string, onResult: (err: any, statusCode: number, signingkey: string) => void): void; - } - export class QGalleryApi extends basem.QClientApiBase implements IGalleryApi { - api: GalleryApi; - constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); - /** - * @param {string} extensionId - * @param {string} accountName - */ - shareExtensionById(extensionId: string, accountName: string): Promise; - /** - * @param {string} extensionId - * @param {string} accountName - */ - unshareExtensionById(extensionId: string, accountName: string): Promise; - /** - * @param {string} publisherName - * @param {string} extensionName - * @param {string} accountName - */ - shareExtension(publisherName: string, extensionName: string, accountName: string): Promise; - /** - * @param {string} publisherName - * @param {string} extensionName - * @param {string} accountName - */ - unshareExtension(publisherName: string, extensionName: string, accountName: string): Promise; - /** - * @param {string} itemId - * @param {string} installationTarget - */ - getAcquisitionOptions(itemId: string, installationTarget: string): Promise; - /** - * @param {GalleryInterfaces.ExtensionAcquisitionRequest} acquisitionRequest - */ - requestAcquisition(acquisitionRequest: GalleryInterfaces.ExtensionAcquisitionRequest): Promise; - /** - * @param {string} publisherName - * @param {string} extensionName - * @param {string} version - * @param {string} assetType - * @param {string} accountToken - * @param {boolean} acceptDefault - */ - getAssetByName(publisherName: string, extensionName: string, version: string, assetType: string, accountToken?: string, acceptDefault?: boolean): Promise; - /** - * @param {string} extensionId - * @param {string} version - * @param {string} assetType - * @param {string} accountToken - * @param {boolean} acceptDefault - */ - getAsset(extensionId: string, version: string, assetType: string, accountToken?: string, acceptDefault?: boolean): Promise; - /** - * @param {string} languages - */ - getCategories(languages?: string): Promise; - /** - * @param {string} publisherName - * @param {string} extensionName - * @param {string} version - */ - getCertificate(publisherName: string, extensionName: string, version?: string): Promise; - /** - * @param {GalleryInterfaces.ExtensionQuery} extensionQuery - * @param {string} accountToken - */ - queryExtensions(extensionQuery: GalleryInterfaces.ExtensionQuery, accountToken?: string): Promise; - /** - * @param {GalleryInterfaces.ExtensionPackage} extensionPackage - */ - createExtension(extensionPackage: GalleryInterfaces.ExtensionPackage): Promise; - /** - * @param {string} extensionId - * @param {string} version - */ - deleteExtensionById(extensionId: string, version?: string): Promise; - /** - * @param {string} extensionId - * @param {string} version - * @param {GalleryInterfaces.ExtensionQueryFlags} flags - */ - getExtensionById(extensionId: string, version?: string, flags?: GalleryInterfaces.ExtensionQueryFlags): Promise; - /** - * @param {GalleryInterfaces.ExtensionPackage} extensionPackage - * @param {string} extensionId - */ - updateExtensionById(extensionPackage: GalleryInterfaces.ExtensionPackage, extensionId: string): Promise; - /** - * @param {GalleryInterfaces.ExtensionPackage} extensionPackage - * @param {string} publisherName - */ - createExtensionWithPublisher(extensionPackage: GalleryInterfaces.ExtensionPackage, publisherName: string): Promise; - /** - * @param {string} publisherName - * @param {string} extensionName - * @param {string} version - */ - deleteExtension(publisherName: string, extensionName: string, version?: string): Promise; - /** - * @param {string} publisherName - * @param {string} extensionName - * @param {string} version - * @param {GalleryInterfaces.ExtensionQueryFlags} flags - * @param {string} accountToken - */ - getExtension(publisherName: string, extensionName: string, version?: string, flags?: GalleryInterfaces.ExtensionQueryFlags, accountToken?: string): Promise; - /** - * @param {GalleryInterfaces.ExtensionPackage} extensionPackage - * @param {string} publisherName - * @param {string} extensionName - */ - updateExtension(extensionPackage: GalleryInterfaces.ExtensionPackage, publisherName: string, extensionName: string): Promise; - /** - * @param {string} publisherName - * @param {string} extensionName - * @param {string} version - * @param {string} accountToken - * @param {boolean} acceptDefault - */ - getPackage(publisherName: string, extensionName: string, version: string, accountToken?: string, acceptDefault?: boolean): Promise; - /** - * @param {string} publisherName - * @param {string} extensionName - * @param {string} version - * @param {string} assetType - * @param {string} assetToken - * @param {string} accountToken - * @param {boolean} acceptDefault - */ - getAssetWithToken(publisherName: string, extensionName: string, version: string, assetType: string, assetToken?: string, accountToken?: string, acceptDefault?: boolean): Promise; - /** - * @param {GalleryInterfaces.PublisherQuery} publisherQuery - */ - queryPublishers(publisherQuery: GalleryInterfaces.PublisherQuery): Promise; - /** - * @param {GalleryInterfaces.Publisher} publisher - */ - createPublisher(publisher: GalleryInterfaces.Publisher): Promise; - /** - * @param {string} publisherName - */ - deletePublisher(publisherName: string): Promise; - /** - * @param {string} publisherName - * @param {number} flags - */ - getPublisher(publisherName: string, flags?: number): Promise; - /** - * @param {GalleryInterfaces.Publisher} publisher - * @param {string} publisherName - */ - updatePublisher(publisher: GalleryInterfaces.Publisher, publisherName: string): Promise; - /** - * Creates a new review item - * - * @param {GalleryInterfaces.Review} review - Contains details about the review item to be created like rating, reviewText, productId - * @param {string} extensionId - */ - createReview(review: GalleryInterfaces.Review, extensionId: string): Promise; - /** - * Returns all reviews associated with a product - * - * @param {string} extensionId - Guid of the extension whose reviews need to be retrieved - */ - getReviews(extensionId: string): Promise; - /** - * @param {string} keyType - * @param {number} expireCurrentSeconds - */ - generateKey(keyType: string, expireCurrentSeconds?: number): Promise; - /** - * @param {string} keyType - */ - getSigningKey(keyType: string): Promise; - } - -} -declare module 'vso-node-api/interfaces/GitInterfaces' { - import TfsCoreInterfaces = require('vso-node-api/interfaces/CoreInterfaces'); - import VSSInterfaces = require('vso-node-api/interfaces/common/VSSInterfaces'); - export interface AssociatedWorkItem { - assignedTo: string; - id: number; - state: string; - title: string; - /** - * REST url - */ - url: string; - webUrl: string; - workItemType: string; - } - export interface Change { - changeType: VersionControlChangeType; - item: T; - newContent: ItemContent; - sourceServerItem: string; - url: string; - } - export interface ChangeCountDictionary { - } - export interface ChangeList { - allChangesIncluded: boolean; - changeCounts: { - [key: number]: number; - }; - changes: Change[]; - comment: string; - commentTruncated: boolean; - creationDate: Date; - notes: CheckinNote[]; - owner: string; - ownerDisplayName: string; - ownerId: string; - sortDate: Date; - version: string; - } - /** - * Criteria used in a search for change lists - */ - export interface ChangeListSearchCriteria { - /** - * If provided, a version descriptor to compare against base - */ - compareVersion: string; - /** - * If true, don't include delete history entries - */ - excludeDeletes: boolean; - /** - * Whether or not to follow renames for the given item being queried - */ - followRenames: boolean; - /** - * If provided, only include history entries created after this date (string) - */ - fromDate: string; - /** - * If provided, a version descriptor for the earliest change list to include - */ - fromVersion: string; - /** - * Path of item to search under - */ - itemPath: string; - /** - * Version of the items to search - */ - itemVersion: string; - /** - * Number of results to skip (used when clicking more...) - */ - skip: number; - /** - * If provided, only include history entries created before this date (string) - */ - toDate: string; - /** - * If provided, the maximum number of history entries to return - */ - top: number; - /** - * If provided, a version descriptor for the latest change list to include - */ - toVersion: string; - /** - * Alias or display name of user who made the changes - */ - user: string; - } - export interface CheckinNote { - name: string; - value: string; - } - export interface FileContentMetadata { - contentType: string; - encoding: number; - extension: string; - fileName: string; - isBinary: boolean; - isImage: boolean; - vsLink: string; - } - export interface GitBaseVersionDescriptor extends GitVersionDescriptor { - /** - * Version string identifier (name of tag/branch, SHA1 of commit) - */ - baseVersion: string; - /** - * Version options - Specify additional modifiers to version (e.g Previous) - */ - baseVersionOptions: GitVersionOptions; - /** - * Version type (branch, tag, or commit). Determines how Id is interpreted - */ - baseVersionType: GitVersionType; - } - export interface GitBlobRef { - _links: any; - /** - * SHA1 hash of git object - */ - objectId: string; - /** - * Size of blob content (in bytes) - */ - size: number; - url: string; - } - export interface GitBranchStats { - aheadCount: number; - behindCount: number; - commit: GitCommitRef; - isBaseVersion: boolean; - name: string; - } - export interface GitChange extends Change { - } - export interface GitCommit extends GitCommitRef { - push: GitPushRef; - treeId: string; - } - export interface GitCommitChanges { - changeCounts: ChangeCountDictionary; - changes: GitChange[]; - } - export interface GitCommitDiffs { - aheadCount: number; - allChangesIncluded: boolean; - baseCommit: string; - behindCount: number; - changeCounts: { - [key: number]: number; - }; - changes: GitChange[]; - commonCommit: string; - targetCommit: string; - } - export interface GitCommitRef { - _links: any; - author: GitUserDate; - changeCounts: ChangeCountDictionary; - changes: GitChange[]; - comment: string; - commentTruncated: boolean; - commitId: string; - committer: GitUserDate; - parents: string[]; - remoteUrl: string; - url: string; - } - export interface GitCommitToCreate { - baseRef: GitRef; - comment: string; - pathActions: GitPathAction[]; - } - export interface GitDeletedRepository { - createdDate: Date; - deletedBy: VSSInterfaces.IdentityRef; - deletedDate: Date; - id: string; - name: string; - project: TfsCoreInterfaces.TeamProjectReference; - } - export interface GitHistoryQueryResults extends HistoryQueryResults { - /** - * Seed commit used for querying history. Used for skip feature. - */ - startingCommitId: string; - unpopulatedCount: number; - unprocessedCount: number; - } - export interface GitItem extends ItemModel { - /** - * SHA1 of commit item was fetched at - */ - commitId: string; - /** - * Type of object (Commit, Tree, Blob, Tag, ...) - */ - gitObjectType: GitObjectType; - /** - * Shallow ref to commit that last changed this item Only populated if latestProcessedChange is requested May not be accurate if latest change is not yet cached - */ - latestProcessedChange: GitCommitRef; - /** - * Git object id - */ - objectId: string; - /** - * Git object id - */ - originalObjectId: string; - } - export interface GitItemDescriptor { - /** - * Path to item - */ - path: string; - /** - * Specifies whether to include children (OneLevel), all descendants (Full), or None - */ - recursionLevel: VersionControlRecursionType; - /** - * Version string (interpretation based on VersionType defined in subclass - */ - version: string; - /** - * Version modifiers (e.g. previous) - */ - versionOptions: GitVersionOptions; - /** - * How to interpret version (branch,tag,commit) - */ - versionType: GitVersionType; - } - export interface GitItemRequestData { - /** - * Whether to include metadata for all items - */ - includeContentMetadata: boolean; - /** - * Whether to include the _links field on the shallow references - */ - includeLinks: boolean; - /** - * Collection of items to fetch, including path, version, and recursion level - */ - itemDescriptors: GitItemDescriptor[]; - /** - * Whether to include shallow ref to commit that last changed each item - */ - latestProcessedChange: boolean; - } - export enum GitObjectType { - Bad = 0, - Commit = 1, - Tree = 2, - Blob = 3, - Tag = 4, - Ext2 = 5, - OfsDelta = 6, - RefDelta = 7, - } - export interface GitPathAction { - action: GitPathActions; - base64Content: string; - path: string; - rawTextContent: string; - targetPath: string; - } - export enum GitPathActions { - None = 0, - Edit = 1, - Delete = 2, - Add = 3, - Rename = 4, - } - export enum GitPermissionScope { - Project = 0, - Repository = 1, - Branch = 2, - } - export interface GitPullRequest { - _links: any; - closedDate: Date; - codeReviewId: number; - commits: GitCommitRef[]; - completionOptions: GitPullRequestCompletionOptions; - completionQueueTime: Date; - createdBy: VSSInterfaces.IdentityRef; - creationDate: Date; - description: string; - lastMergeCommit: GitCommitRef; - lastMergeSourceCommit: GitCommitRef; - lastMergeTargetCommit: GitCommitRef; - mergeId: string; - mergeStatus: PullRequestAsyncStatus; - pullRequestId: number; - remoteUrl: string; - repository: GitRepository; - reviewers: IdentityRefWithVote[]; - sourceRefName: string; - status: PullRequestStatus; - targetRefName: string; - title: string; - upgraded: boolean; - url: string; - workItemRefs: VSSInterfaces.ResourceRef[]; - } - export interface GitPullRequestCompletionOptions { - deleteSourceBranch: boolean; - mergeCommitMessage: string; - squashMerge: boolean; - } - export interface GitPullRequestSearchCriteria { - creatorId: string; - /** - * Whether to include the _links field on the shallow references - */ - includeLinks: boolean; - repositoryId: string; - reviewerId: string; - sourceRefName: string; - status: PullRequestStatus; - targetRefName: string; - } - export interface GitPush extends GitPushRef { - commits: GitCommitRef[]; - refUpdates: GitRefUpdate[]; - repository: GitRepository; - } - export interface GitPushEventData { - afterId: string; - beforeId: string; - branch: string; - commits: GitCommit[]; - repository: GitRepository; - } - export interface GitPushRef { - _links: any; - date: Date; - pushCorrelationId: string; - pushedBy: VSSInterfaces.IdentityRef; - pushId: number; - url: string; - } - export interface GitPushSearchCriteria { - fromDate: Date; - /** - * Whether to include the _links field on the shallow references - */ - includeLinks: boolean; - includeRefUpdates: boolean; - pusherId: string; - refName: string; - toDate: Date; - } - export interface GitQueryCommitsCriteria { - /** - * Number of entries to skip - */ - $skip: number; - /** - * Maximum number of entries to retrieve - */ - $top: number; - /** - * Alias or display name of the author - */ - author: string; - /** - * If provided, the earliest commit in the graph to search - */ - compareVersion: GitVersionDescriptor; - /** - * If true, don't include delete history entries - */ - excludeDeletes: boolean; - /** - * If provided, a lower bound for filtering commits alphabetically - */ - fromCommitId: string; - /** - * If provided, only include history entries created after this date (string) - */ - fromDate: string; - /** - * If provided, specifies the exact commit ids of the commits to fetch. May not be combined with other parameters. - */ - ids: string[]; - /** - * Whether to include the _links field on the shallow references - */ - includeLinks: boolean; - /** - * Path of item to search under - */ - itemPath: string; - /** - * If provided, identifies the commit or branch to search - */ - itemVersion: GitVersionDescriptor; - /** - * If provided, an upper bound for filtering commits alphabetically - */ - toCommitId: string; - /** - * If provided, only include history entries created before this date (string) - */ - toDate: string; - /** - * Alias or display name of the committer - */ - user: string; - } - export interface GitRef { - _links: any; - isLockedBy: VSSInterfaces.IdentityRef; - name: string; - objectId: string; - statuses: GitStatus[]; - url: string; - } - export interface GitRefUpdate { - name: string; - newObjectId: string; - oldObjectId: string; - repositoryId: string; - } - export enum GitRefUpdateMode { - /** - * Indicates the Git protocol model where any refs that can be updated will be updated, but any failures will not prevent other updates from succeeding. - */ - BestEffort = 0, - /** - * Indicates that all ref updates must succeed or none will succeed. All ref updates will be atomically written. If any failure is encountered, previously successful updates will be rolled back and the entire operation will fail. - */ - AllOrNone = 1, - } - export interface GitRefUpdateResult { - /** - * Custom message for the result object For instance, Reason for failing. - */ - customMessage: string; - /** - * Ref name - */ - name: string; - /** - * New object ID - */ - newObjectId: string; - /** - * Old object ID - */ - oldObjectId: string; - /** - * Name of the plugin that rejected the updated. - */ - rejectedBy: string; - /** - * Repository ID - */ - repositoryId: string; - /** - * True if the ref update succeeded, false otherwise - */ - success: boolean; - /** - * Status of the update from the TFS server. - */ - updateStatus: GitRefUpdateStatus; - } - export interface GitRefUpdateResultSet { - countFailed: number; - countSucceeded: number; - pushCorrelationId: string; - pushIds: { - [key: string]: number; - }; - pushTime: Date; - results: GitRefUpdateResult[]; - } - export enum GitRefUpdateStatus { - /** - * Indicates that the ref update request was completed successfully. - */ - Succeeded = 0, - /** - * Indicates that the ref update request could not be completed because part of the graph would be disconnected by this change, and the caller does not have ForcePush permission on the repository. - */ - ForcePushRequired = 1, - /** - * Indicates that the ref update request could not be completed because the old object ID presented in the request was not the object ID of the ref when the database attempted the update. The most likely scenario is that the caller lost a race to update the ref. - */ - StaleOldObjectId = 2, - /** - * Indicates that the ref update request could not be completed because the ref name presented in the request was not valid. - */ - InvalidRefName = 3, - /** - * The request was not processed - */ - Unprocessed = 4, - /** - * The ref update request could not be completed because the new object ID for the ref could not be resolved to a commit object (potentially through any number of tags) - */ - UnresolvableToCommit = 5, - /** - * The ref update request could not be completed because the user lacks write permissions required to write this ref - */ - WritePermissionRequired = 6, - /** - * The ref update request could not be completed because the user lacks note creation permissions required to write this note - */ - ManageNotePermissionRequired = 7, - /** - * The ref update request could not be completed because the user lacks the permission to create a branch - */ - CreateBranchPermissionRequired = 8, - /** - * The ref update request could not be completed because the user lacks the permission to create a tag - */ - CreateTagPermissionRequired = 9, - /** - * The ref update could not be completed because it was rejected by the plugin. - */ - RejectedByPlugin = 10, - /** - * The ref update could not be completed because the ref is locked by another user. - */ - Locked = 11, - /** - * The ref update could not be completed because, in case-insensitive mode, the ref name conflicts with an existing, differently-cased ref name. - */ - RefNameConflict = 12, - /** - * The ref update could not be completed because it was rejected by policy. - */ - RejectedByPolicy = 13, - /** - * Indicates that the ref update request was completed successfully, but the ref doesn't actually exist so no changes were made. This should only happen during deletes. - */ - SucceededNonExistentRef = 14, - /** - * Indicates that the ref update request was completed successfully, but the passed-in ref was corrupt - as in, the old object ID was bad. This should only happen during deletes. - */ - SucceededCorruptRef = 15, - } - export interface GitRepository { - _links: any; - defaultBranch: string; - id: string; - name: string; - project: TfsCoreInterfaces.TeamProjectReference; - remoteUrl: string; - url: string; - } - export enum GitRepositoryPermissions { - None = 0, - Administer = 1, - GenericRead = 2, - GenericContribute = 4, - ForcePush = 8, - CreateBranch = 16, - CreateTag = 32, - ManageNote = 64, - PolicyExempt = 128, - /** - * This defines the set of bits that are valid for the git permission space. When reading or writing git permissions, these are the only bits paid attention too. - */ - All = 255, - BranchLevelPermissions = 141, - } - export interface GitStatus { - _links: any; - context: GitStatusContext; - createdBy: VSSInterfaces.IdentityRef; - creationDate: Date; - description: string; - state: GitStatusState; - targetUrl: string; - } - export interface GitStatusContext { - genre: string; - name: string; - } - export enum GitStatusState { - NotSet = 0, - Pending = 1, - Succeeded = 2, - Failed = 3, - Error = 4, - } - export interface GitSuggestion { - properties: { - [key: string]: any; - }; - type: string; - } - export interface GitTargetVersionDescriptor extends GitVersionDescriptor { - /** - * Version string identifier (name of tag/branch, SHA1 of commit) - */ - targetVersion: string; - /** - * Version options - Specify additional modifiers to version (e.g Previous) - */ - targetVersionOptions: GitVersionOptions; - /** - * Version type (branch, tag, or commit). Determines how Id is interpreted - */ - targetVersionType: GitVersionType; - } - export interface GitTreeEntryRef { - /** - * Blob or tree - */ - gitObjectType: GitObjectType; - /** - * Mode represented as octal string - */ - mode: string; - /** - * SHA1 hash of git object - */ - objectId: string; - /** - * Path relative to parent tree object - */ - relativePath: string; - /** - * Size of content - */ - size: number; - /** - * url to retrieve tree or blob - */ - url: string; - } - export interface GitTreeRef { - _links: any; - /** - * SHA1 hash of git object - */ - objectId: string; - /** - * Sum of sizes of all children - */ - size: number; - /** - * Blobs and trees under this tree - */ - treeEntries: GitTreeEntryRef[]; - /** - * Url to tree - */ - url: string; - } - export interface GitUserDate { - date: Date; - email: string; - name: string; - } - export interface GitVersionDescriptor { - /** - * Version string identifier (name of tag/branch/index, SHA1 of commit) - */ - version: string; - /** - * Version options - Specify additional modifiers to version (e.g Previous) - */ - versionOptions: GitVersionOptions; - /** - * Version type (branch, tag, commit, or index). Determines how Id is interpreted - */ - versionType: GitVersionType; - } - export enum GitVersionOptions { - /** - * Not specified - */ - None = 0, - /** - * Commit that changed item prior to the current version - */ - PreviousChange = 1, - /** - * First parent of commit (HEAD^) - */ - FirstParent = 2, - } - export enum GitVersionType { - /** - * Interpret the version as a branch name - */ - Branch = 0, - /** - * Interpret the version as a tag name - */ - Tag = 1, - /** - * Interpret the version as a commit ID (SHA1) - */ - Commit = 2, - /** - * Interpret the version as an index name - */ - Index = 3, - } - export interface HistoryEntry { - /** - * The Change list (changeset/commit/shelveset) for this point in history - */ - changeList: ChangeList; - /** - * The change made to the item from this change list (only relevant for File history, not folders) - */ - itemChangeType: VersionControlChangeType; - /** - * The path of the item at this point in history (only relevant for File history, not folders) - */ - serverItem: string; - } - export interface HistoryQueryResults { - /** - * True if there are more results available to fetch (we're returning the max # of items requested) A more RESTy solution would be to include a Link header - */ - moreResultsAvailable: boolean; - /** - * The history entries (results) from this query - */ - results: HistoryEntry[]; - } - export interface IdentityRefWithVote extends VSSInterfaces.IdentityRef { - isRequired: boolean; - reviewerUrl: string; - vote: number; - votedFor: IdentityRefWithVote[]; - } - export interface IncludedGitCommit { - commitId: string; - commitTime: Date; - parentCommitIds: string[]; - repositoryId: string; - } - export interface ItemContent { - content: string; - contentType: ItemContentType; - } - export enum ItemContentType { - RawText = 0, - Base64Encoded = 1, - } - /** - * Optional details to include when returning an item model - */ - export interface ItemDetailsOptions { - /** - * If true, include metadata about the file type - */ - includeContentMetadata: boolean; - /** - * Specifies whether to include children (OneLevel), all descendants (Full) or None for folder items - */ - recursionLevel: VersionControlRecursionType; - } - export interface ItemModel { - _links: any; - contentMetadata: FileContentMetadata; - isFolder: boolean; - isSymLink: boolean; - path: string; - url: string; - } - export enum PullRequestAsyncStatus { - NotSet = 0, - Queued = 1, - Conflicts = 2, - Succeeded = 3, - RejectedByPolicy = 4, - Failure = 5, - } - export enum PullRequestStatus { - NotSet = 0, - Active = 1, - Abandoned = 2, - Completed = 3, - All = 4, - } - export interface TfvcBranch extends TfvcBranchRef { - children: TfvcBranch[]; - mappings: TfvcBranchMapping[]; - parent: TfvcShallowBranchRef; - relatedBranches: TfvcShallowBranchRef[]; - } - export interface TfvcBranchMapping { - depth: string; - serverItem: string; - type: string; - } - export interface TfvcBranchRef extends TfvcShallowBranchRef { - _links: any; - createdDate: Date; - description: string; - isDeleted: boolean; - owner: VSSInterfaces.IdentityRef; - url: string; - } - export interface TfvcChange extends Change { - /** - * List of merge sources in case of rename or branch creation. - */ - mergeSources: TfvcMergeSource[]; - /** - * Version at which a (shelved) change was pended against - */ - pendingVersion: number; - } - export interface TfvcChangeset extends TfvcChangesetRef { - accountId: string; - changes: TfvcChange[]; - checkinNotes: CheckinNote[]; - collectionId: string; - hasMoreChanges: boolean; - policyOverride: TfvcPolicyOverrideInfo; - teamProjectIds: string[]; - workItems: AssociatedWorkItem[]; - } - export interface TfvcChangesetRef { - _links: any; - author: VSSInterfaces.IdentityRef; - changesetId: number; - checkedInBy: VSSInterfaces.IdentityRef; - comment: string; - commentTruncated: boolean; - createdDate: Date; - url: string; - } - /** - * Criteria used in a search for change lists - */ - export interface TfvcChangesetSearchCriteria { - /** - * Alias or display name of user who made the changes - */ - author: string; - /** - * Whether or not to follow renames for the given item being queried - */ - followRenames: boolean; - /** - * If provided, only include changesets created after this date (string) Think of a better name for this. - */ - fromDate: string; - /** - * If provided, only include changesets after this changesetID - */ - fromId: number; - /** - * Whether to include the _links field on the shallow references - */ - includeLinks: boolean; - /** - * Path of item to search under - */ - path: string; - /** - * If provided, only include changesets created before this date (string) Think of a better name for this. - */ - toDate: string; - /** - * If provided, a version descriptor for the latest change list to include - */ - toId: number; - } - export interface TfvcChangesetsRequestData { - changesetIds: number[]; - commentLength: number; - /** - * Whether to include the _links field on the shallow references - */ - includeLinks: boolean; - } - export interface TfvcCheckinEventData { - changeset: TfvcChangeset; - project: TfsCoreInterfaces.TeamProjectReference; - } - export interface TfvcHistoryEntry extends HistoryEntry { - /** - * The encoding of the item at this point in history (only relevant for File history, not folders) - */ - encoding: number; - /** - * The file id of the item at this point in history (only relevant for File history, not folders) - */ - fileId: number; - } - export interface TfvcItem extends ItemModel { - changeDate: Date; - deletionId: number; - /** - * MD5 hash as a base 64 string, applies to files only. - */ - hashValue: string; - isBranch: boolean; - isPendingChange: boolean; - /** - * The size of the file, if applicable. - */ - size: number; - version: number; - } - /** - * Item path and Version descriptor properties - */ - export interface TfvcItemDescriptor { - path: string; - recursionLevel: VersionControlRecursionType; - version: string; - versionOption: TfvcVersionOption; - versionType: TfvcVersionType; - } - export interface TfvcItemRequestData { - /** - * If true, include metadata about the file type - */ - includeContentMetadata: boolean; - /** - * Whether to include the _links field on the shallow references - */ - includeLinks: boolean; - itemDescriptors: TfvcItemDescriptor[]; - } - export interface TfvcLabel extends TfvcLabelRef { - items: TfvcItem[]; - } - export interface TfvcLabelRef { - _links: any; - description: string; - id: number; - labelScope: string; - modifiedDate: Date; - name: string; - owner: VSSInterfaces.IdentityRef; - url: string; - } - export interface TfvcLabelRequestData { - /** - * Whether to include the _links field on the shallow references - */ - includeLinks: boolean; - itemLabelFilter: string; - labelScope: string; - maxItemCount: number; - name: string; - owner: string; - } - export interface TfvcMergeSource { - /** - * Indicates if this a rename source. If false, it is a merge source. - */ - isRename: boolean; - /** - * The server item of the merge source - */ - serverItem: string; - /** - * Start of the version range - */ - versionFrom: number; - /** - * End of the version range - */ - versionTo: number; - } - export interface TfvcPolicyFailureInfo { - message: string; - policyName: string; - } - export interface TfvcPolicyOverrideInfo { - comment: string; - policyFailures: TfvcPolicyFailureInfo[]; - } - export interface TfvcShallowBranchRef { - path: string; - } - export interface TfvcShelveset extends TfvcShelvesetRef { - changes: TfvcChange[]; - notes: CheckinNote[]; - policyOverride: TfvcPolicyOverrideInfo; - workItems: AssociatedWorkItem[]; - } - export interface TfvcShelvesetRef { - _links: any; - comment: string; - commentTruncated: boolean; - createdDate: Date; - id: string; - name: string; - owner: VSSInterfaces.IdentityRef; - url: string; - } - export interface TfvcShelvesetRequestData { - /** - * Whether to include policyOverride and notes - */ - includeDetails: boolean; - /** - * Whether to include the _links field on the shallow references - */ - includeLinks: boolean; - /** - * Whether to include workItems - */ - includeWorkItems: boolean; - /** - * Max number of changes to include - */ - maxChangeCount: number; - /** - * Max length of comment - */ - maxCommentLength: number; - /** - * Shelveset's name - */ - name: string; - /** - * Owner's ID. Could be a name or a guid. - */ - owner: string; - } - export interface TfvcVersionDescriptor { - version: string; - versionOption: TfvcVersionOption; - versionType: TfvcVersionType; - } - export enum TfvcVersionOption { - None = 0, - Previous = 1, - UseRename = 2, - } - export enum TfvcVersionType { - None = 0, - Changeset = 1, - Shelveset = 2, - Change = 3, - Date = 4, - Latest = 5, - Tip = 6, - MergeSource = 7, - } - export interface UpdateRefsRequest { - refUpdateRequests: GitRefUpdate[]; - updateMode: GitRefUpdateMode; - } - export enum VersionControlChangeType { - None = 0, - Add = 1, - Edit = 2, - Encoding = 4, - Rename = 8, - Delete = 16, - Undelete = 32, - Branch = 64, - Merge = 128, - Lock = 256, - Rollback = 512, - SourceRename = 1024, - TargetRename = 2048, - Property = 4096, - All = 8191, - } - export interface VersionControlProjectInfo { - defaultSourceControlType: TfsCoreInterfaces.SourceControlTypes; - project: TfsCoreInterfaces.TeamProjectReference; - supportsGit: boolean; - supportsTFVC: boolean; - } - export enum VersionControlRecursionType { - /** - * Only return the specified item. - */ - None = 0, - /** - * Return the specified item and its direct children. - */ - OneLevel = 1, - /** - * Return the specified item and its direct children, as well as recursive chains of nested child folders that only contain a single folder. - */ - OneLevelPlusNestedEmptyFolders = 4, - /** - * Return specified item and all descendants - */ - Full = 120, - } - export var TypeInfo: { - AssociatedWorkItem: { - fields: any; - }; - Change: { - fields: any; - }; - ChangeCountDictionary: { - fields: any; - }; - ChangeList: { - fields: any; - }; - ChangeListSearchCriteria: { - fields: any; - }; - CheckinNote: { - fields: any; - }; - FileContentMetadata: { - fields: any; - }; - GitBaseVersionDescriptor: { - fields: any; - }; - GitBlobRef: { - fields: any; - }; - GitBranchStats: { - fields: any; - }; - GitChange: { - fields: any; - }; - GitCommit: { - fields: any; - }; - GitCommitChanges: { - fields: any; - }; - GitCommitDiffs: { - fields: any; - }; - GitCommitRef: { - fields: any; - }; - GitCommitToCreate: { - fields: any; - }; - GitDeletedRepository: { - fields: any; - }; - GitHistoryQueryResults: { - fields: any; - }; - GitItem: { - fields: any; - }; - GitItemDescriptor: { - fields: any; - }; - GitItemRequestData: { - fields: any; - }; - GitObjectType: { - enumValues: { - "bad": number; - "commit": number; - "tree": number; - "blob": number; - "tag": number; - "ext2": number; - "ofsDelta": number; - "refDelta": number; - }; - }; - GitPathAction: { - fields: any; - }; - GitPathActions: { - enumValues: { - "none": number; - "edit": number; - "delete": number; - "add": number; - "rename": number; - }; - }; - GitPermissionScope: { - enumValues: { - "project": number; - "repository": number; - "branch": number; - }; - }; - GitPullRequest: { - fields: any; - }; - GitPullRequestCompletionOptions: { - fields: any; - }; - GitPullRequestSearchCriteria: { - fields: any; - }; - GitPush: { - fields: any; - }; - GitPushEventData: { - fields: any; - }; - GitPushRef: { - fields: any; - }; - GitPushSearchCriteria: { - fields: any; - }; - GitQueryCommitsCriteria: { - fields: any; - }; - GitRef: { - fields: any; - }; - GitRefUpdate: { - fields: any; - }; - GitRefUpdateMode: { - enumValues: { - "bestEffort": number; - "allOrNone": number; - }; - }; - GitRefUpdateResult: { - fields: any; - }; - GitRefUpdateResultSet: { - fields: any; - }; - GitRefUpdateStatus: { - enumValues: { - "succeeded": number; - "forcePushRequired": number; - "staleOldObjectId": number; - "invalidRefName": number; - "unprocessed": number; - "unresolvableToCommit": number; - "writePermissionRequired": number; - "manageNotePermissionRequired": number; - "createBranchPermissionRequired": number; - "createTagPermissionRequired": number; - "rejectedByPlugin": number; - "locked": number; - "refNameConflict": number; - "rejectedByPolicy": number; - "succeededNonExistentRef": number; - "succeededCorruptRef": number; - }; - }; - GitRepository: { - fields: any; - }; - GitRepositoryPermissions: { - enumValues: { - "none": number; - "administer": number; - "genericRead": number; - "genericContribute": number; - "forcePush": number; - "createBranch": number; - "createTag": number; - "manageNote": number; - "policyExempt": number; - "all": number; - "branchLevelPermissions": number; - }; - }; - GitStatus: { - fields: any; - }; - GitStatusContext: { - fields: any; - }; - GitStatusState: { - enumValues: { - "notSet": number; - "pending": number; - "succeeded": number; - "failed": number; - "error": number; - }; - }; - GitSuggestion: { - fields: any; - }; - GitTargetVersionDescriptor: { - fields: any; - }; - GitTreeEntryRef: { - fields: any; - }; - GitTreeRef: { - fields: any; - }; - GitUserDate: { - fields: any; - }; - GitVersionDescriptor: { - fields: any; - }; - GitVersionOptions: { - enumValues: { - "none": number; - "previousChange": number; - "firstParent": number; - }; - }; - GitVersionType: { - enumValues: { - "branch": number; - "tag": number; - "commit": number; - "index": number; - }; - }; - HistoryEntry: { - fields: any; - }; - HistoryQueryResults: { - fields: any; - }; - IdentityRefWithVote: { - fields: any; - }; - IncludedGitCommit: { - fields: any; - }; - ItemContent: { - fields: any; - }; - ItemContentType: { - enumValues: { - "rawText": number; - "base64Encoded": number; - }; - }; - ItemDetailsOptions: { - fields: any; - }; - ItemModel: { - fields: any; - }; - PullRequestAsyncStatus: { - enumValues: { - "notSet": number; - "queued": number; - "conflicts": number; - "succeeded": number; - "rejectedByPolicy": number; - "failure": number; - }; - }; - PullRequestStatus: { - enumValues: { - "notSet": number; - "active": number; - "abandoned": number; - "completed": number; - "all": number; - }; - }; - TfvcBranch: { - fields: any; - }; - TfvcBranchMapping: { - fields: any; - }; - TfvcBranchRef: { - fields: any; - }; - TfvcChange: { - fields: any; - }; - TfvcChangeset: { - fields: any; - }; - TfvcChangesetRef: { - fields: any; - }; - TfvcChangesetSearchCriteria: { - fields: any; - }; - TfvcChangesetsRequestData: { - fields: any; - }; - TfvcCheckinEventData: { - fields: any; - }; - TfvcHistoryEntry: { - fields: any; - }; - TfvcItem: { - fields: any; - }; - TfvcItemDescriptor: { - fields: any; - }; - TfvcItemRequestData: { - fields: any; - }; - TfvcLabel: { - fields: any; - }; - TfvcLabelRef: { - fields: any; - }; - TfvcLabelRequestData: { - fields: any; - }; - TfvcMergeSource: { - fields: any; - }; - TfvcPolicyFailureInfo: { - fields: any; - }; - TfvcPolicyOverrideInfo: { - fields: any; - }; - TfvcShallowBranchRef: { - fields: any; - }; - TfvcShelveset: { - fields: any; - }; - TfvcShelvesetRef: { - fields: any; - }; - TfvcShelvesetRequestData: { - fields: any; - }; - TfvcVersionDescriptor: { - fields: any; - }; - TfvcVersionOption: { - enumValues: { - "none": number; - "previous": number; - "useRename": number; - }; - }; - TfvcVersionType: { - enumValues: { - "none": number; - "changeset": number; - "shelveset": number; - "change": number; - "date": number; - "latest": number; - "tip": number; - "mergeSource": number; - }; - }; - UpdateRefsRequest: { - fields: any; - }; - VersionControlChangeType: { - enumValues: { - "none": number; - "add": number; - "edit": number; - "encoding": number; - "rename": number; - "delete": number; - "undelete": number; - "branch": number; - "merge": number; - "lock": number; - "rollback": number; - "sourceRename": number; - "targetRename": number; - "property": number; - "all": number; - }; - }; - VersionControlProjectInfo: { - fields: any; - }; - VersionControlRecursionType: { - enumValues: { - "none": number; - "oneLevel": number; - "oneLevelPlusNestedEmptyFolders": number; - "full": number; - }; - }; - }; - -} -declare module 'vso-node-api/GitApi' { - - - import Q = require('q'); - import basem = require('vso-node-api/ClientApiBases'); - import VsoBaseInterfaces = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); - import GitInterfaces = require('vso-node-api/interfaces/GitInterfaces'); - import VSSInterfaces = require('vso-node-api/interfaces/common/VSSInterfaces'); - export interface IGitApi extends basem.ClientApiBase { - getBlob(repositoryId: string, sha1: string, project: string, download: boolean, fileName: string, onResult: (err: any, statusCode: number, Blob: GitInterfaces.GitBlobRef) => void): void; - getBlobContent(repositoryId: string, sha1: string, project: string, download: boolean, fileName: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - getBlobsZip(blobIds: string[], repositoryId: string, project: string, filename: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - getBlobZip(repositoryId: string, sha1: string, project: string, download: boolean, fileName: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - getBranch(repositoryId: string, name: string, project: string, baseVersionDescriptor: GitInterfaces.GitVersionDescriptor, onResult: (err: any, statusCode: number, BranchStat: GitInterfaces.GitBranchStats) => void): void; - getBranches(repositoryId: string, project: string, baseVersionDescriptor: GitInterfaces.GitVersionDescriptor, onResult: (err: any, statusCode: number, BranchStats: GitInterfaces.GitBranchStats[]) => void): void; - getChanges(commitId: string, repositoryId: string, project: string, top: number, skip: number, onResult: (err: any, statusCode: number, Change: GitInterfaces.GitCommitChanges) => void): void; - getCommit(commitId: string, repositoryId: string, project: string, changeCount: number, onResult: (err: any, statusCode: number, Commit: GitInterfaces.GitCommit) => void): void; - getCommits(repositoryId: string, searchCriteria: GitInterfaces.GitQueryCommitsCriteria, project: string, skip: number, top: number, onResult: (err: any, statusCode: number, Commits: GitInterfaces.GitCommitRef[]) => void): void; - getPushCommits(repositoryId: string, pushId: number, project: string, top: number, skip: number, includeLinks: boolean, onResult: (err: any, statusCode: number, Commits: GitInterfaces.GitCommitRef[]) => void): void; - getCommitsBatch(searchCriteria: GitInterfaces.GitQueryCommitsCriteria, repositoryId: string, project: string, skip: number, top: number, onResult: (err: any, statusCode: number, CommitsBatch: GitInterfaces.GitCommitRef[]) => void): void; - getDeletedRepositories(project: string, onResult: (err: any, statusCode: number, DeletedRepositories: GitInterfaces.GitDeletedRepository[]) => void): void; - getItem(repositoryId: string, path: string, project: string, scopePath: string, recursionLevel: GitInterfaces.VersionControlRecursionType, includeContentMetadata: boolean, latestProcessedChange: boolean, download: boolean, versionDescriptor: GitInterfaces.GitVersionDescriptor, onResult: (err: any, statusCode: number, Item: GitInterfaces.GitItem) => void): void; - getItemContent(repositoryId: string, path: string, project: string, scopePath: string, recursionLevel: GitInterfaces.VersionControlRecursionType, includeContentMetadata: boolean, latestProcessedChange: boolean, download: boolean, versionDescriptor: GitInterfaces.GitVersionDescriptor, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - getItems(repositoryId: string, project: string, scopePath: string, recursionLevel: GitInterfaces.VersionControlRecursionType, includeContentMetadata: boolean, latestProcessedChange: boolean, download: boolean, includeLinks: boolean, versionDescriptor: GitInterfaces.GitVersionDescriptor, onResult: (err: any, statusCode: number, Items: GitInterfaces.GitItem[]) => void): void; - getItemText(repositoryId: string, path: string, project: string, scopePath: string, recursionLevel: GitInterfaces.VersionControlRecursionType, includeContentMetadata: boolean, latestProcessedChange: boolean, download: boolean, versionDescriptor: GitInterfaces.GitVersionDescriptor, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - getItemZip(repositoryId: string, path: string, project: string, scopePath: string, recursionLevel: GitInterfaces.VersionControlRecursionType, includeContentMetadata: boolean, latestProcessedChange: boolean, download: boolean, versionDescriptor: GitInterfaces.GitVersionDescriptor, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - getItemsBatch(requestData: GitInterfaces.GitItemRequestData, repositoryId: string, project: string, onResult: (err: any, statusCode: number, ItemsBatch: GitInterfaces.GitItem[][]) => void): void; - getPullRequestCommits(repositoryId: string, pullRequestId: number, project: string, onResult: (err: any, statusCode: number, PullRequestCommits: GitInterfaces.GitCommitRef[]) => void): void; - createPullRequestReviewer(reviewer: GitInterfaces.IdentityRefWithVote, repositoryId: string, pullRequestId: number, reviewerId: string, project: string, onResult: (err: any, statusCode: number, PullRequestReviewer: GitInterfaces.IdentityRefWithVote) => void): void; - createPullRequestReviewers(reviewers: VSSInterfaces.IdentityRef[], repositoryId: string, pullRequestId: number, project: string, onResult: (err: any, statusCode: number, PullRequestReviewers: GitInterfaces.IdentityRefWithVote[]) => void): void; - deletePullRequestReviewer(repositoryId: string, pullRequestId: number, reviewerId: string, project: string, onResult: (err: any, statusCode: number) => void): void; - getPullRequestReviewer(repositoryId: string, pullRequestId: number, reviewerId: string, project: string, onResult: (err: any, statusCode: number, PullRequestReviewer: GitInterfaces.IdentityRefWithVote) => void): void; - getPullRequestReviewers(repositoryId: string, pullRequestId: number, project: string, onResult: (err: any, statusCode: number, PullRequestReviewers: GitInterfaces.IdentityRefWithVote[]) => void): void; - getPullRequestsByProject(project: string, searchCriteria: GitInterfaces.GitPullRequestSearchCriteria, maxCommentLength: number, skip: number, top: number, onResult: (err: any, statusCode: number, PullRequests: GitInterfaces.GitPullRequest[]) => void): void; - createPullRequest(gitPullRequestToCreate: GitInterfaces.GitPullRequest, repositoryId: string, project: string, onResult: (err: any, statusCode: number, PullRequest: GitInterfaces.GitPullRequest) => void): void; - getPullRequest(repositoryId: string, pullRequestId: number, project: string, maxCommentLength: number, skip: number, top: number, includeCommits: boolean, onResult: (err: any, statusCode: number, PullRequest: GitInterfaces.GitPullRequest) => void): void; - getPullRequests(repositoryId: string, searchCriteria: GitInterfaces.GitPullRequestSearchCriteria, project: string, maxCommentLength: number, skip: number, top: number, onResult: (err: any, statusCode: number, PullRequests: GitInterfaces.GitPullRequest[]) => void): void; - updatePullRequest(gitPullRequestToUpdate: GitInterfaces.GitPullRequest, repositoryId: string, pullRequestId: number, project: string, onResult: (err: any, statusCode: number, PullRequest: GitInterfaces.GitPullRequest) => void): void; - getPullRequestWorkItems(repositoryId: string, pullRequestId: number, project: string, commitsTop: number, commitsSkip: number, onResult: (err: any, statusCode: number, PullRequestWorkItems: GitInterfaces.AssociatedWorkItem[]) => void): void; - createPush(push: GitInterfaces.GitPush, repositoryId: string, project: string, onResult: (err: any, statusCode: number, pushe: GitInterfaces.GitPush) => void): void; - getPush(repositoryId: string, pushId: number, project: string, includeCommits: number, includeRefUpdates: boolean, onResult: (err: any, statusCode: number, pushe: GitInterfaces.GitPush) => void): void; - getPushes(repositoryId: string, project: string, skip: number, top: number, searchCriteria: GitInterfaces.GitPushSearchCriteria, onResult: (err: any, statusCode: number, pushes: GitInterfaces.GitPush[]) => void): void; - getRefs(repositoryId: string, project: string, filter: string, includeLinks: boolean, onResult: (err: any, statusCode: number, refs: GitInterfaces.GitRef[]) => void): void; - updateRefs(refUpdates: GitInterfaces.GitRefUpdate[], repositoryId: string, project: string, projectId: string, onResult: (err: any, statusCode: number, refs: GitInterfaces.GitRefUpdateResult[]) => void): void; - createRepository(gitRepositoryToCreate: GitInterfaces.GitRepository, project: string, onResult: (err: any, statusCode: number, Repositorie: GitInterfaces.GitRepository) => void): void; - deleteRepository(repositoryId: string, project: string, onResult: (err: any, statusCode: number) => void): void; - getRepositories(project: string, includeLinks: boolean, onResult: (err: any, statusCode: number, Repositories: GitInterfaces.GitRepository[]) => void): void; - getRepository(repositoryId: string, project: string, onResult: (err: any, statusCode: number, Repositorie: GitInterfaces.GitRepository) => void): void; - updateRepository(newRepositoryInfo: GitInterfaces.GitRepository, repositoryId: string, project: string, onResult: (err: any, statusCode: number, Repositorie: GitInterfaces.GitRepository) => void): void; - createCommitStatus(gitCommitStatusToCreate: GitInterfaces.GitStatus, commitId: string, repositoryId: string, project: string, onResult: (err: any, statusCode: number, Statuse: GitInterfaces.GitStatus) => void): void; - getStatuses(commitId: string, repositoryId: string, project: string, top: number, skip: number, onResult: (err: any, statusCode: number, Statuses: GitInterfaces.GitStatus[]) => void): void; - getTree(repositoryId: string, sha1: string, project: string, projectId: string, recursive: boolean, fileName: string, onResult: (err: any, statusCode: number, Tree: GitInterfaces.GitTreeRef) => void): void; - getTreeZip(repositoryId: string, sha1: string, project: string, projectId: string, recursive: boolean, fileName: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - } - export interface IQGitApi extends basem.QClientApiBase { - getBlob(repositoryId: string, sha1: string, project?: string, download?: boolean, fileName?: string): Promise; - getBlobContent(repositoryId: string, sha1: string, project?: string, download?: boolean, fileName?: string): Promise; - getBlobsZip(blobIds: string[], repositoryId: string, project?: string, filename?: string): Promise; - getBlobZip(repositoryId: string, sha1: string, project?: string, download?: boolean, fileName?: string): Promise; - getBranch(repositoryId: string, name: string, project?: string, baseVersionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise; - getBranches(repositoryId: string, project?: string, baseVersionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise; - getChanges(commitId: string, repositoryId: string, project?: string, top?: number, skip?: number): Promise; - getCommit(commitId: string, repositoryId: string, project?: string, changeCount?: number): Promise; - getCommits(repositoryId: string, searchCriteria: GitInterfaces.GitQueryCommitsCriteria, project?: string, skip?: number, top?: number): Promise; - getPushCommits(repositoryId: string, pushId: number, project?: string, top?: number, skip?: number, includeLinks?: boolean): Promise; - getCommitsBatch(searchCriteria: GitInterfaces.GitQueryCommitsCriteria, repositoryId: string, project?: string, skip?: number, top?: number): Promise; - getDeletedRepositories(project: string): Promise; - getItem(repositoryId: string, path: string, project?: string, scopePath?: string, recursionLevel?: GitInterfaces.VersionControlRecursionType, includeContentMetadata?: boolean, latestProcessedChange?: boolean, download?: boolean, versionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise; - getItemContent(repositoryId: string, path: string, project?: string, scopePath?: string, recursionLevel?: GitInterfaces.VersionControlRecursionType, includeContentMetadata?: boolean, latestProcessedChange?: boolean, download?: boolean, versionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise; - getItems(repositoryId: string, project?: string, scopePath?: string, recursionLevel?: GitInterfaces.VersionControlRecursionType, includeContentMetadata?: boolean, latestProcessedChange?: boolean, download?: boolean, includeLinks?: boolean, versionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise; - getItemText(repositoryId: string, path: string, project?: string, scopePath?: string, recursionLevel?: GitInterfaces.VersionControlRecursionType, includeContentMetadata?: boolean, latestProcessedChange?: boolean, download?: boolean, versionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise; - getItemZip(repositoryId: string, path: string, project?: string, scopePath?: string, recursionLevel?: GitInterfaces.VersionControlRecursionType, includeContentMetadata?: boolean, latestProcessedChange?: boolean, download?: boolean, versionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise; - getItemsBatch(requestData: GitInterfaces.GitItemRequestData, repositoryId: string, project?: string): Promise; - getPullRequestCommits(repositoryId: string, pullRequestId: number, project?: string): Promise; - createPullRequestReviewer(reviewer: GitInterfaces.IdentityRefWithVote, repositoryId: string, pullRequestId: number, reviewerId: string, project?: string): Promise; - createPullRequestReviewers(reviewers: VSSInterfaces.IdentityRef[], repositoryId: string, pullRequestId: number, project?: string): Promise; - deletePullRequestReviewer(repositoryId: string, pullRequestId: number, reviewerId: string, project?: string): Promise; - getPullRequestReviewer(repositoryId: string, pullRequestId: number, reviewerId: string, project?: string): Promise; - getPullRequestReviewers(repositoryId: string, pullRequestId: number, project?: string): Promise; - getPullRequestsByProject(project: string, searchCriteria: GitInterfaces.GitPullRequestSearchCriteria, maxCommentLength?: number, skip?: number, top?: number): Promise; - createPullRequest(gitPullRequestToCreate: GitInterfaces.GitPullRequest, repositoryId: string, project?: string): Promise; - getPullRequest(repositoryId: string, pullRequestId: number, project?: string, maxCommentLength?: number, skip?: number, top?: number, includeCommits?: boolean): Promise; - getPullRequests(repositoryId: string, searchCriteria: GitInterfaces.GitPullRequestSearchCriteria, project?: string, maxCommentLength?: number, skip?: number, top?: number): Promise; - updatePullRequest(gitPullRequestToUpdate: GitInterfaces.GitPullRequest, repositoryId: string, pullRequestId: number, project?: string): Promise; - getPullRequestWorkItems(repositoryId: string, pullRequestId: number, project?: string, commitsTop?: number, commitsSkip?: number): Promise; - createPush(push: GitInterfaces.GitPush, repositoryId: string, project?: string): Promise; - getPush(repositoryId: string, pushId: number, project?: string, includeCommits?: number, includeRefUpdates?: boolean): Promise; - getPushes(repositoryId: string, project?: string, skip?: number, top?: number, searchCriteria?: GitInterfaces.GitPushSearchCriteria): Promise; - getRefs(repositoryId: string, project?: string, filter?: string, includeLinks?: boolean): Promise; - updateRefs(refUpdates: GitInterfaces.GitRefUpdate[], repositoryId: string, project?: string, projectId?: string): Promise; - createRepository(gitRepositoryToCreate: GitInterfaces.GitRepository, project?: string): Promise; - deleteRepository(repositoryId: string, project?: string): Promise; - getRepositories(project?: string, includeLinks?: boolean): Promise; - getRepository(repositoryId: string, project?: string): Promise; - updateRepository(newRepositoryInfo: GitInterfaces.GitRepository, repositoryId: string, project?: string): Promise; - createCommitStatus(gitCommitStatusToCreate: GitInterfaces.GitStatus, commitId: string, repositoryId: string, project?: string): Promise; - getStatuses(commitId: string, repositoryId: string, project?: string, top?: number, skip?: number): Promise; - getTree(repositoryId: string, sha1: string, project?: string, projectId?: string, recursive?: boolean, fileName?: string): Promise; - getTreeZip(repositoryId: string, sha1: string, project?: string, projectId?: string, recursive?: boolean, fileName?: string): Promise; - } - export class GitApi extends basem.ClientApiBase implements IGitApi { - constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); - /** - * Gets a single blob. - * - * @param {string} repositoryId - * @param {string} sha1 - * @param {string} project - Project ID or project name - * @param {boolean} download - * @param {string} fileName - * @param onResult callback function with the resulting GitInterfaces.GitBlobRef - */ - getBlob(repositoryId: string, sha1: string, project: string, download: boolean, fileName: string, onResult: (err: any, statusCode: number, Blob: GitInterfaces.GitBlobRef) => void): void; - /** - * Gets a single blob. - * - * @param {string} repositoryId - * @param {string} sha1 - * @param {string} project - Project ID or project name - * @param {boolean} download - * @param {string} fileName - * @param onResult callback function with the resulting ArrayBuffer - */ - getBlobContent(repositoryId: string, sha1: string, project: string, download: boolean, fileName: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * Gets one or more blobs in a zip file download. - * - * @param {string[]} blobIds - * @param {string} repositoryId - * @param {string} project - Project ID or project name - * @param {string} filename - * @param onResult callback function with the resulting ArrayBuffer - */ - getBlobsZip(blobIds: string[], repositoryId: string, project: string, filename: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * Gets a single blob. - * - * @param {string} repositoryId - * @param {string} sha1 - * @param {string} project - Project ID or project name - * @param {boolean} download - * @param {string} fileName - * @param onResult callback function with the resulting ArrayBuffer - */ - getBlobZip(repositoryId: string, sha1: string, project: string, download: boolean, fileName: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * Retrieve statistics about a single branch. - * - * @param {string} repositoryId - Friendly name or guid of repository - * @param {string} name - Name of the branch - * @param {string} project - Project ID or project name - * @param {GitInterfaces.GitVersionDescriptor} baseVersionDescriptor - * @param onResult callback function with the resulting GitInterfaces.GitBranchStats - */ - getBranch(repositoryId: string, name: string, project: string, baseVersionDescriptor: GitInterfaces.GitVersionDescriptor, onResult: (err: any, statusCode: number, BranchStat: GitInterfaces.GitBranchStats) => void): void; - /** - * Retrieve statistics about all branches within a repository. - * - * @param {string} repositoryId - Friendly name or guid of repository - * @param {string} project - Project ID or project name - * @param {GitInterfaces.GitVersionDescriptor} baseVersionDescriptor - * @param onResult callback function with the resulting GitInterfaces.GitBranchStats[] - */ - getBranches(repositoryId: string, project: string, baseVersionDescriptor: GitInterfaces.GitVersionDescriptor, onResult: (err: any, statusCode: number, BranchStats: GitInterfaces.GitBranchStats[]) => void): void; - /** - * Retrieve changes for a particular commit. - * - * @param {string} commitId - The id of the commit. - * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. - * @param {string} project - Project ID or project name - * @param {number} top - The maximum number of changes to return. - * @param {number} skip - The number of changes to skip. - * @param onResult callback function with the resulting GitInterfaces.GitCommitChanges - */ - getChanges(commitId: string, repositoryId: string, project: string, top: number, skip: number, onResult: (err: any, statusCode: number, Change: GitInterfaces.GitCommitChanges) => void): void; - /** - * Retrieve a particular commit. - * - * @param {string} commitId - The id of the commit. - * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. - * @param {string} project - Project ID or project name - * @param {number} changeCount - The number of changes to include in the result. - * @param onResult callback function with the resulting GitInterfaces.GitCommit - */ - getCommit(commitId: string, repositoryId: string, project: string, changeCount: number, onResult: (err: any, statusCode: number, Commit: GitInterfaces.GitCommit) => void): void; - /** - * Retrieve git commits for a project - * - * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. - * @param {GitInterfaces.GitQueryCommitsCriteria} searchCriteria - * @param {string} project - Project ID or project name - * @param {number} skip - * @param {number} top - * @param onResult callback function with the resulting GitInterfaces.GitCommitRef[] - */ - getCommits(repositoryId: string, searchCriteria: GitInterfaces.GitQueryCommitsCriteria, project: string, skip: number, top: number, onResult: (err: any, statusCode: number, Commits: GitInterfaces.GitCommitRef[]) => void): void; - /** - * Retrieve a list of commits associated with a particular push. - * - * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. - * @param {number} pushId - The id of the push. - * @param {string} project - Project ID or project name - * @param {number} top - The maximum number of commits to return ("get the top x commits"). - * @param {number} skip - The number of commits to skip. - * @param {boolean} includeLinks - * @param onResult callback function with the resulting GitInterfaces.GitCommitRef[] - */ - getPushCommits(repositoryId: string, pushId: number, project: string, top: number, skip: number, includeLinks: boolean, onResult: (err: any, statusCode: number, Commits: GitInterfaces.GitCommitRef[]) => void): void; - /** - * Retrieve git commits for a project - * - * @param {GitInterfaces.GitQueryCommitsCriteria} searchCriteria - Search options - * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. - * @param {string} project - Project ID or project name - * @param {number} skip - * @param {number} top - * @param onResult callback function with the resulting GitInterfaces.GitCommitRef[] - */ - getCommitsBatch(searchCriteria: GitInterfaces.GitQueryCommitsCriteria, repositoryId: string, project: string, skip: number, top: number, onResult: (err: any, statusCode: number, CommitsBatch: GitInterfaces.GitCommitRef[]) => void): void; - /** - * Retrieve deleted git repositories. - * - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting GitInterfaces.GitDeletedRepository[] - */ - getDeletedRepositories(project: string, onResult: (err: any, statusCode: number, DeletedRepositories: GitInterfaces.GitDeletedRepository[]) => void): void; - /** - * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. - * - * @param {string} repositoryId - * @param {string} path - * @param {string} project - Project ID or project name - * @param {string} scopePath - * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - * @param {boolean} includeContentMetadata - * @param {boolean} latestProcessedChange - * @param {boolean} download - * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - * @param onResult callback function with the resulting GitInterfaces.GitItem - */ - getItem(repositoryId: string, path: string, project: string, scopePath: string, recursionLevel: GitInterfaces.VersionControlRecursionType, includeContentMetadata: boolean, latestProcessedChange: boolean, download: boolean, versionDescriptor: GitInterfaces.GitVersionDescriptor, onResult: (err: any, statusCode: number, Item: GitInterfaces.GitItem) => void): void; - /** - * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. - * - * @param {string} repositoryId - * @param {string} path - * @param {string} project - Project ID or project name - * @param {string} scopePath - * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - * @param {boolean} includeContentMetadata - * @param {boolean} latestProcessedChange - * @param {boolean} download - * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - * @param onResult callback function with the resulting ArrayBuffer - */ - getItemContent(repositoryId: string, path: string, project: string, scopePath: string, recursionLevel: GitInterfaces.VersionControlRecursionType, includeContentMetadata: boolean, latestProcessedChange: boolean, download: boolean, versionDescriptor: GitInterfaces.GitVersionDescriptor, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * Get Item Metadata and/or Content for a collection of items. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. - * - * @param {string} repositoryId - * @param {string} project - Project ID or project name - * @param {string} scopePath - * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - * @param {boolean} includeContentMetadata - * @param {boolean} latestProcessedChange - * @param {boolean} download - * @param {boolean} includeLinks - * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - * @param onResult callback function with the resulting GitInterfaces.GitItem[] - */ - getItems(repositoryId: string, project: string, scopePath: string, recursionLevel: GitInterfaces.VersionControlRecursionType, includeContentMetadata: boolean, latestProcessedChange: boolean, download: boolean, includeLinks: boolean, versionDescriptor: GitInterfaces.GitVersionDescriptor, onResult: (err: any, statusCode: number, Items: GitInterfaces.GitItem[]) => void): void; - /** - * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. - * - * @param {string} repositoryId - * @param {string} path - * @param {string} project - Project ID or project name - * @param {string} scopePath - * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - * @param {boolean} includeContentMetadata - * @param {boolean} latestProcessedChange - * @param {boolean} download - * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - * @param onResult callback function with the resulting string - */ - getItemText(repositoryId: string, path: string, project: string, scopePath: string, recursionLevel: GitInterfaces.VersionControlRecursionType, includeContentMetadata: boolean, latestProcessedChange: boolean, download: boolean, versionDescriptor: GitInterfaces.GitVersionDescriptor, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. - * - * @param {string} repositoryId - * @param {string} path - * @param {string} project - Project ID or project name - * @param {string} scopePath - * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - * @param {boolean} includeContentMetadata - * @param {boolean} latestProcessedChange - * @param {boolean} download - * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - * @param onResult callback function with the resulting ArrayBuffer - */ - getItemZip(repositoryId: string, path: string, project: string, scopePath: string, recursionLevel: GitInterfaces.VersionControlRecursionType, includeContentMetadata: boolean, latestProcessedChange: boolean, download: boolean, versionDescriptor: GitInterfaces.GitVersionDescriptor, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * Post for retrieving a creating a batch out of a set of items in a repo / project given a list of paths or a long path - * - * @param {GitInterfaces.GitItemRequestData} requestData - * @param {string} repositoryId - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting GitInterfaces.GitItem[][] - */ - getItemsBatch(requestData: GitInterfaces.GitItemRequestData, repositoryId: string, project: string, onResult: (err: any, statusCode: number, ItemsBatch: GitInterfaces.GitItem[][]) => void): void; - /** - * Retrieve pull request's commits - * - * @param {string} repositoryId - * @param {number} pullRequestId - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting GitInterfaces.GitCommitRef[] - */ - getPullRequestCommits(repositoryId: string, pullRequestId: number, project: string, onResult: (err: any, statusCode: number, PullRequestCommits: GitInterfaces.GitCommitRef[]) => void): void; - /** - * Adds a reviewer to a git pull request - * - * @param {GitInterfaces.IdentityRefWithVote} reviewer - * @param {string} repositoryId - * @param {number} pullRequestId - * @param {string} reviewerId - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting GitInterfaces.IdentityRefWithVote - */ - createPullRequestReviewer(reviewer: GitInterfaces.IdentityRefWithVote, repositoryId: string, pullRequestId: number, reviewerId: string, project: string, onResult: (err: any, statusCode: number, PullRequestReviewer: GitInterfaces.IdentityRefWithVote) => void): void; - /** - * Adds reviewers to a git pull request - * - * @param {VSSInterfaces.IdentityRef[]} reviewers - * @param {string} repositoryId - * @param {number} pullRequestId - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting GitInterfaces.IdentityRefWithVote[] - */ - createPullRequestReviewers(reviewers: VSSInterfaces.IdentityRef[], repositoryId: string, pullRequestId: number, project: string, onResult: (err: any, statusCode: number, PullRequestReviewers: GitInterfaces.IdentityRefWithVote[]) => void): void; - /** - * Adds reviewers to a git pull request - * - * @param {string} repositoryId - * @param {number} pullRequestId - * @param {string} reviewerId - * @param {string} project - Project ID or project name - * @param onResult callback function - */ - deletePullRequestReviewer(repositoryId: string, pullRequestId: number, reviewerId: string, project: string, onResult: (err: any, statusCode: number) => void): void; - /** - * Retrieve a reviewer from a pull request - * - * @param {string} repositoryId - * @param {number} pullRequestId - * @param {string} reviewerId - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting GitInterfaces.IdentityRefWithVote - */ - getPullRequestReviewer(repositoryId: string, pullRequestId: number, reviewerId: string, project: string, onResult: (err: any, statusCode: number, PullRequestReviewer: GitInterfaces.IdentityRefWithVote) => void): void; - /** - * Retrieve a pull request reviewers - * - * @param {string} repositoryId - * @param {number} pullRequestId - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting GitInterfaces.IdentityRefWithVote[] - */ - getPullRequestReviewers(repositoryId: string, pullRequestId: number, project: string, onResult: (err: any, statusCode: number, PullRequestReviewers: GitInterfaces.IdentityRefWithVote[]) => void): void; - /** - * Query pull requests by project - * - * @param {string} project - Project ID or project name - * @param {GitInterfaces.GitPullRequestSearchCriteria} searchCriteria - * @param {number} maxCommentLength - * @param {number} skip - * @param {number} top - * @param onResult callback function with the resulting GitInterfaces.GitPullRequest[] - */ - getPullRequestsByProject(project: string, searchCriteria: GitInterfaces.GitPullRequestSearchCriteria, maxCommentLength: number, skip: number, top: number, onResult: (err: any, statusCode: number, PullRequests: GitInterfaces.GitPullRequest[]) => void): void; - /** - * Create a git pull request - * - * @param {GitInterfaces.GitPullRequest} gitPullRequestToCreate - * @param {string} repositoryId - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting GitInterfaces.GitPullRequest - */ - createPullRequest(gitPullRequestToCreate: GitInterfaces.GitPullRequest, repositoryId: string, project: string, onResult: (err: any, statusCode: number, PullRequest: GitInterfaces.GitPullRequest) => void): void; - /** - * Retrieve a pull request - * - * @param {string} repositoryId - * @param {number} pullRequestId - * @param {string} project - Project ID or project name - * @param {number} maxCommentLength - * @param {number} skip - * @param {number} top - * @param {boolean} includeCommits - * @param onResult callback function with the resulting GitInterfaces.GitPullRequest - */ - getPullRequest(repositoryId: string, pullRequestId: number, project: string, maxCommentLength: number, skip: number, top: number, includeCommits: boolean, onResult: (err: any, statusCode: number, PullRequest: GitInterfaces.GitPullRequest) => void): void; - /** - * Query for pull requests - * - * @param {string} repositoryId - * @param {GitInterfaces.GitPullRequestSearchCriteria} searchCriteria - * @param {string} project - Project ID or project name - * @param {number} maxCommentLength - * @param {number} skip - * @param {number} top - * @param onResult callback function with the resulting GitInterfaces.GitPullRequest[] - */ - getPullRequests(repositoryId: string, searchCriteria: GitInterfaces.GitPullRequestSearchCriteria, project: string, maxCommentLength: number, skip: number, top: number, onResult: (err: any, statusCode: number, PullRequests: GitInterfaces.GitPullRequest[]) => void): void; - /** - * Updates a pull request - * - * @param {GitInterfaces.GitPullRequest} gitPullRequestToUpdate - * @param {string} repositoryId - * @param {number} pullRequestId - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting GitInterfaces.GitPullRequest - */ - updatePullRequest(gitPullRequestToUpdate: GitInterfaces.GitPullRequest, repositoryId: string, pullRequestId: number, project: string, onResult: (err: any, statusCode: number, PullRequest: GitInterfaces.GitPullRequest) => void): void; - /** - * Retrieve a pull request work items - * - * @param {string} repositoryId - * @param {number} pullRequestId - * @param {string} project - Project ID or project name - * @param {number} commitsTop - * @param {number} commitsSkip - * @param onResult callback function with the resulting GitInterfaces.AssociatedWorkItem[] - */ - getPullRequestWorkItems(repositoryId: string, pullRequestId: number, project: string, commitsTop: number, commitsSkip: number, onResult: (err: any, statusCode: number, PullRequestWorkItems: GitInterfaces.AssociatedWorkItem[]) => void): void; - /** - * Push changes to the repository. - * - * @param {GitInterfaces.GitPush} push - * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, a project-scoped route must be used. - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting GitInterfaces.GitPush - */ - createPush(push: GitInterfaces.GitPush, repositoryId: string, project: string, onResult: (err: any, statusCode: number, pushe: GitInterfaces.GitPush) => void): void; - /** - * Retrieve a particular push. - * - * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. - * @param {number} pushId - The id of the push. - * @param {string} project - Project ID or project name - * @param {number} includeCommits - The number of commits to include in the result. - * @param {boolean} includeRefUpdates - * @param onResult callback function with the resulting GitInterfaces.GitPush - */ - getPush(repositoryId: string, pushId: number, project: string, includeCommits: number, includeRefUpdates: boolean, onResult: (err: any, statusCode: number, pushe: GitInterfaces.GitPush) => void): void; - /** - * Retrieves pushes associated with the specified repository. - * - * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. - * @param {string} project - Project ID or project name - * @param {number} skip - * @param {number} top - * @param {GitInterfaces.GitPushSearchCriteria} searchCriteria - * @param onResult callback function with the resulting GitInterfaces.GitPush[] - */ - getPushes(repositoryId: string, project: string, skip: number, top: number, searchCriteria: GitInterfaces.GitPushSearchCriteria, onResult: (err: any, statusCode: number, pushes: GitInterfaces.GitPush[]) => void): void; - /** - * Queries the provided repository for its refs and returns them. - * - * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. - * @param {string} project - Project ID or project name - * @param {string} filter - [optional] A filter to apply to the refs. - * @param {boolean} includeLinks - [optional] Specifies if referenceLinks should be included in the result. default is false. - * @param onResult callback function with the resulting GitInterfaces.GitRef[] - */ - getRefs(repositoryId: string, project: string, filter: string, includeLinks: boolean, onResult: (err: any, statusCode: number, refs: GitInterfaces.GitRef[]) => void): void; - /** - * Creates or updates refs with the given information - * - * @param {GitInterfaces.GitRefUpdate[]} refUpdates - List of ref updates to attempt to perform - * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. - * @param {string} project - Project ID or project name - * @param {string} projectId - The id of the project. - * @param onResult callback function with the resulting GitInterfaces.GitRefUpdateResult[] - */ - updateRefs(refUpdates: GitInterfaces.GitRefUpdate[], repositoryId: string, project: string, projectId: string, onResult: (err: any, statusCode: number, refs: GitInterfaces.GitRefUpdateResult[]) => void): void; - /** - * Create a git repository - * - * @param {GitInterfaces.GitRepository} gitRepositoryToCreate - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting GitInterfaces.GitRepository - */ - createRepository(gitRepositoryToCreate: GitInterfaces.GitRepository, project: string, onResult: (err: any, statusCode: number, Repositorie: GitInterfaces.GitRepository) => void): void; - /** - * Delete a git repository - * - * @param {string} repositoryId - * @param {string} project - Project ID or project name - * @param onResult callback function - */ - deleteRepository(repositoryId: string, project: string, onResult: (err: any, statusCode: number) => void): void; - /** - * Retrieve git repositories. - * - * @param {string} project - Project ID or project name - * @param {boolean} includeLinks - * @param onResult callback function with the resulting GitInterfaces.GitRepository[] - */ - getRepositories(project: string, includeLinks: boolean, onResult: (err: any, statusCode: number, Repositories: GitInterfaces.GitRepository[]) => void): void; - /** - * @param {string} repositoryId - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting GitInterfaces.GitRepository - */ - getRepository(repositoryId: string, project: string, onResult: (err: any, statusCode: number, Repositorie: GitInterfaces.GitRepository) => void): void; - /** - * Updates the Git repository with the single populated change in the specified repository information. - * - * @param {GitInterfaces.GitRepository} newRepositoryInfo - * @param {string} repositoryId - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting GitInterfaces.GitRepository - */ - updateRepository(newRepositoryInfo: GitInterfaces.GitRepository, repositoryId: string, project: string, onResult: (err: any, statusCode: number, Repositorie: GitInterfaces.GitRepository) => void): void; - /** - * @param {GitInterfaces.GitStatus} gitCommitStatusToCreate - * @param {string} commitId - * @param {string} repositoryId - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting GitInterfaces.GitStatus - */ - createCommitStatus(gitCommitStatusToCreate: GitInterfaces.GitStatus, commitId: string, repositoryId: string, project: string, onResult: (err: any, statusCode: number, Statuse: GitInterfaces.GitStatus) => void): void; - /** - * @param {string} commitId - * @param {string} repositoryId - * @param {string} project - Project ID or project name - * @param {number} top - * @param {number} skip - * @param onResult callback function with the resulting GitInterfaces.GitStatus[] - */ - getStatuses(commitId: string, repositoryId: string, project: string, top: number, skip: number, onResult: (err: any, statusCode: number, Statuses: GitInterfaces.GitStatus[]) => void): void; - /** - * @param {string} repositoryId - * @param {string} sha1 - * @param {string} project - Project ID or project name - * @param {string} projectId - * @param {boolean} recursive - * @param {string} fileName - * @param onResult callback function with the resulting GitInterfaces.GitTreeRef - */ - getTree(repositoryId: string, sha1: string, project: string, projectId: string, recursive: boolean, fileName: string, onResult: (err: any, statusCode: number, Tree: GitInterfaces.GitTreeRef) => void): void; - /** - * @param {string} repositoryId - * @param {string} sha1 - * @param {string} project - Project ID or project name - * @param {string} projectId - * @param {boolean} recursive - * @param {string} fileName - * @param onResult callback function with the resulting ArrayBuffer - */ - getTreeZip(repositoryId: string, sha1: string, project: string, projectId: string, recursive: boolean, fileName: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - } - export class QGitApi extends basem.QClientApiBase implements IQGitApi { - api: GitApi; - constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); - /** - * Gets a single blob. - * - * @param {string} repositoryId - * @param {string} sha1 - * @param {string} project - Project ID or project name - * @param {boolean} download - * @param {string} fileName - */ - getBlob(repositoryId: string, sha1: string, project?: string, download?: boolean, fileName?: string): Promise; - /** - * Gets a single blob. - * - * @param {string} repositoryId - * @param {string} sha1 - * @param {string} project - Project ID or project name - * @param {boolean} download - * @param {string} fileName - */ - getBlobContent(repositoryId: string, sha1: string, project?: string, download?: boolean, fileName?: string): Promise; - /** - * Gets one or more blobs in a zip file download. - * - * @param {string[]} blobIds - * @param {string} repositoryId - * @param {string} project - Project ID or project name - * @param {string} filename - */ - getBlobsZip(blobIds: string[], repositoryId: string, project?: string, filename?: string): Promise; - /** - * Gets a single blob. - * - * @param {string} repositoryId - * @param {string} sha1 - * @param {string} project - Project ID or project name - * @param {boolean} download - * @param {string} fileName - */ - getBlobZip(repositoryId: string, sha1: string, project?: string, download?: boolean, fileName?: string): Promise; - /** - * Retrieve statistics about a single branch. - * - * @param {string} repositoryId - Friendly name or guid of repository - * @param {string} name - Name of the branch - * @param {string} project - Project ID or project name - * @param {GitInterfaces.GitVersionDescriptor} baseVersionDescriptor - */ - getBranch(repositoryId: string, name: string, project?: string, baseVersionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise; - /** - * Retrieve statistics about all branches within a repository. - * - * @param {string} repositoryId - Friendly name or guid of repository - * @param {string} project - Project ID or project name - * @param {GitInterfaces.GitVersionDescriptor} baseVersionDescriptor - */ - getBranches(repositoryId: string, project?: string, baseVersionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise; - /** - * Retrieve changes for a particular commit. - * - * @param {string} commitId - The id of the commit. - * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. - * @param {string} project - Project ID or project name - * @param {number} top - The maximum number of changes to return. - * @param {number} skip - The number of changes to skip. - */ - getChanges(commitId: string, repositoryId: string, project?: string, top?: number, skip?: number): Promise; - /** - * Retrieve a particular commit. - * - * @param {string} commitId - The id of the commit. - * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. - * @param {string} project - Project ID or project name - * @param {number} changeCount - The number of changes to include in the result. - */ - getCommit(commitId: string, repositoryId: string, project?: string, changeCount?: number): Promise; - /** - * Retrieve git commits for a project - * - * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. - * @param {GitInterfaces.GitQueryCommitsCriteria} searchCriteria - * @param {string} project - Project ID or project name - * @param {number} skip - * @param {number} top - */ - getCommits(repositoryId: string, searchCriteria: GitInterfaces.GitQueryCommitsCriteria, project?: string, skip?: number, top?: number): Promise; - /** - * Retrieve a list of commits associated with a particular push. - * - * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. - * @param {number} pushId - The id of the push. - * @param {string} project - Project ID or project name - * @param {number} top - The maximum number of commits to return ("get the top x commits"). - * @param {number} skip - The number of commits to skip. - * @param {boolean} includeLinks - */ - getPushCommits(repositoryId: string, pushId: number, project?: string, top?: number, skip?: number, includeLinks?: boolean): Promise; - /** - * Retrieve git commits for a project - * - * @param {GitInterfaces.GitQueryCommitsCriteria} searchCriteria - Search options - * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. - * @param {string} project - Project ID or project name - * @param {number} skip - * @param {number} top - */ - getCommitsBatch(searchCriteria: GitInterfaces.GitQueryCommitsCriteria, repositoryId: string, project?: string, skip?: number, top?: number): Promise; - /** - * Retrieve deleted git repositories. - * - * @param {string} project - Project ID or project name - */ - getDeletedRepositories(project: string): Promise; - /** - * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. - * - * @param {string} repositoryId - * @param {string} path - * @param {string} project - Project ID or project name - * @param {string} scopePath - * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - * @param {boolean} includeContentMetadata - * @param {boolean} latestProcessedChange - * @param {boolean} download - * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - */ - getItem(repositoryId: string, path: string, project?: string, scopePath?: string, recursionLevel?: GitInterfaces.VersionControlRecursionType, includeContentMetadata?: boolean, latestProcessedChange?: boolean, download?: boolean, versionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise; - /** - * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. - * - * @param {string} repositoryId - * @param {string} path - * @param {string} project - Project ID or project name - * @param {string} scopePath - * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - * @param {boolean} includeContentMetadata - * @param {boolean} latestProcessedChange - * @param {boolean} download - * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - */ - getItemContent(repositoryId: string, path: string, project?: string, scopePath?: string, recursionLevel?: GitInterfaces.VersionControlRecursionType, includeContentMetadata?: boolean, latestProcessedChange?: boolean, download?: boolean, versionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise; - /** - * Get Item Metadata and/or Content for a collection of items. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. - * - * @param {string} repositoryId - * @param {string} project - Project ID or project name - * @param {string} scopePath - * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - * @param {boolean} includeContentMetadata - * @param {boolean} latestProcessedChange - * @param {boolean} download - * @param {boolean} includeLinks - * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - */ - getItems(repositoryId: string, project?: string, scopePath?: string, recursionLevel?: GitInterfaces.VersionControlRecursionType, includeContentMetadata?: boolean, latestProcessedChange?: boolean, download?: boolean, includeLinks?: boolean, versionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise; - /** - * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. - * - * @param {string} repositoryId - * @param {string} path - * @param {string} project - Project ID or project name - * @param {string} scopePath - * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - * @param {boolean} includeContentMetadata - * @param {boolean} latestProcessedChange - * @param {boolean} download - * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - */ - getItemText(repositoryId: string, path: string, project?: string, scopePath?: string, recursionLevel?: GitInterfaces.VersionControlRecursionType, includeContentMetadata?: boolean, latestProcessedChange?: boolean, download?: boolean, versionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise; - /** - * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. - * - * @param {string} repositoryId - * @param {string} path - * @param {string} project - Project ID or project name - * @param {string} scopePath - * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - * @param {boolean} includeContentMetadata - * @param {boolean} latestProcessedChange - * @param {boolean} download - * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - */ - getItemZip(repositoryId: string, path: string, project?: string, scopePath?: string, recursionLevel?: GitInterfaces.VersionControlRecursionType, includeContentMetadata?: boolean, latestProcessedChange?: boolean, download?: boolean, versionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise; - /** - * Post for retrieving a creating a batch out of a set of items in a repo / project given a list of paths or a long path - * - * @param {GitInterfaces.GitItemRequestData} requestData - * @param {string} repositoryId - * @param {string} project - Project ID or project name - */ - getItemsBatch(requestData: GitInterfaces.GitItemRequestData, repositoryId: string, project?: string): Promise; - /** - * Retrieve pull request's commits - * - * @param {string} repositoryId - * @param {number} pullRequestId - * @param {string} project - Project ID or project name - */ - getPullRequestCommits(repositoryId: string, pullRequestId: number, project?: string): Promise; - /** - * Adds a reviewer to a git pull request - * - * @param {GitInterfaces.IdentityRefWithVote} reviewer - * @param {string} repositoryId - * @param {number} pullRequestId - * @param {string} reviewerId - * @param {string} project - Project ID or project name - */ - createPullRequestReviewer(reviewer: GitInterfaces.IdentityRefWithVote, repositoryId: string, pullRequestId: number, reviewerId: string, project?: string): Promise; - /** - * Adds reviewers to a git pull request - * - * @param {VSSInterfaces.IdentityRef[]} reviewers - * @param {string} repositoryId - * @param {number} pullRequestId - * @param {string} project - Project ID or project name - */ - createPullRequestReviewers(reviewers: VSSInterfaces.IdentityRef[], repositoryId: string, pullRequestId: number, project?: string): Promise; - /** - * Adds reviewers to a git pull request - * - * @param {string} repositoryId - * @param {number} pullRequestId - * @param {string} reviewerId - * @param {string} project - Project ID or project name - */ - deletePullRequestReviewer(repositoryId: string, pullRequestId: number, reviewerId: string, project?: string): Promise; - /** - * Retrieve a reviewer from a pull request - * - * @param {string} repositoryId - * @param {number} pullRequestId - * @param {string} reviewerId - * @param {string} project - Project ID or project name - */ - getPullRequestReviewer(repositoryId: string, pullRequestId: number, reviewerId: string, project?: string): Promise; - /** - * Retrieve a pull request reviewers - * - * @param {string} repositoryId - * @param {number} pullRequestId - * @param {string} project - Project ID or project name - */ - getPullRequestReviewers(repositoryId: string, pullRequestId: number, project?: string): Promise; - /** - * Query pull requests by project - * - * @param {string} project - Project ID or project name - * @param {GitInterfaces.GitPullRequestSearchCriteria} searchCriteria - * @param {number} maxCommentLength - * @param {number} skip - * @param {number} top - */ - getPullRequestsByProject(project: string, searchCriteria: GitInterfaces.GitPullRequestSearchCriteria, maxCommentLength?: number, skip?: number, top?: number): Promise; - /** - * Create a git pull request - * - * @param {GitInterfaces.GitPullRequest} gitPullRequestToCreate - * @param {string} repositoryId - * @param {string} project - Project ID or project name - */ - createPullRequest(gitPullRequestToCreate: GitInterfaces.GitPullRequest, repositoryId: string, project?: string): Promise; - /** - * Retrieve a pull request - * - * @param {string} repositoryId - * @param {number} pullRequestId - * @param {string} project - Project ID or project name - * @param {number} maxCommentLength - * @param {number} skip - * @param {number} top - * @param {boolean} includeCommits - */ - getPullRequest(repositoryId: string, pullRequestId: number, project?: string, maxCommentLength?: number, skip?: number, top?: number, includeCommits?: boolean): Promise; - /** - * Query for pull requests - * - * @param {string} repositoryId - * @param {GitInterfaces.GitPullRequestSearchCriteria} searchCriteria - * @param {string} project - Project ID or project name - * @param {number} maxCommentLength - * @param {number} skip - * @param {number} top - */ - getPullRequests(repositoryId: string, searchCriteria: GitInterfaces.GitPullRequestSearchCriteria, project?: string, maxCommentLength?: number, skip?: number, top?: number): Promise; - /** - * Updates a pull request - * - * @param {GitInterfaces.GitPullRequest} gitPullRequestToUpdate - * @param {string} repositoryId - * @param {number} pullRequestId - * @param {string} project - Project ID or project name - */ - updatePullRequest(gitPullRequestToUpdate: GitInterfaces.GitPullRequest, repositoryId: string, pullRequestId: number, project?: string): Promise; - /** - * Retrieve a pull request work items - * - * @param {string} repositoryId - * @param {number} pullRequestId - * @param {string} project - Project ID or project name - * @param {number} commitsTop - * @param {number} commitsSkip - */ - getPullRequestWorkItems(repositoryId: string, pullRequestId: number, project?: string, commitsTop?: number, commitsSkip?: number): Promise; - /** - * Push changes to the repository. - * - * @param {GitInterfaces.GitPush} push - * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, a project-scoped route must be used. - * @param {string} project - Project ID or project name - */ - createPush(push: GitInterfaces.GitPush, repositoryId: string, project?: string): Promise; - /** - * Retrieve a particular push. - * - * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. - * @param {number} pushId - The id of the push. - * @param {string} project - Project ID or project name - * @param {number} includeCommits - The number of commits to include in the result. - * @param {boolean} includeRefUpdates - */ - getPush(repositoryId: string, pushId: number, project?: string, includeCommits?: number, includeRefUpdates?: boolean): Promise; - /** - * Retrieves pushes associated with the specified repository. - * - * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. - * @param {string} project - Project ID or project name - * @param {number} skip - * @param {number} top - * @param {GitInterfaces.GitPushSearchCriteria} searchCriteria - */ - getPushes(repositoryId: string, project?: string, skip?: number, top?: number, searchCriteria?: GitInterfaces.GitPushSearchCriteria): Promise; - /** - * Queries the provided repository for its refs and returns them. - * - * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. - * @param {string} project - Project ID or project name - * @param {string} filter - [optional] A filter to apply to the refs. - * @param {boolean} includeLinks - [optional] Specifies if referenceLinks should be included in the result. default is false. - */ - getRefs(repositoryId: string, project?: string, filter?: string, includeLinks?: boolean): Promise; - /** - * Creates or updates refs with the given information - * - * @param {GitInterfaces.GitRefUpdate[]} refUpdates - List of ref updates to attempt to perform - * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. - * @param {string} project - Project ID or project name - * @param {string} projectId - The id of the project. - */ - updateRefs(refUpdates: GitInterfaces.GitRefUpdate[], repositoryId: string, project?: string, projectId?: string): Promise; - /** - * Create a git repository - * - * @param {GitInterfaces.GitRepository} gitRepositoryToCreate - * @param {string} project - Project ID or project name - */ - createRepository(gitRepositoryToCreate: GitInterfaces.GitRepository, project?: string): Promise; - /** - * Delete a git repository - * - * @param {string} repositoryId - * @param {string} project - Project ID or project name - */ - deleteRepository(repositoryId: string, project?: string): Promise; - /** - * Retrieve git repositories. - * - * @param {string} project - Project ID or project name - * @param {boolean} includeLinks - */ - getRepositories(project?: string, includeLinks?: boolean): Promise; - /** - * @param {string} repositoryId - * @param {string} project - Project ID or project name - */ - getRepository(repositoryId: string, project?: string): Promise; - /** - * Updates the Git repository with the single populated change in the specified repository information. - * - * @param {GitInterfaces.GitRepository} newRepositoryInfo - * @param {string} repositoryId - * @param {string} project - Project ID or project name - */ - updateRepository(newRepositoryInfo: GitInterfaces.GitRepository, repositoryId: string, project?: string): Promise; - /** - * @param {GitInterfaces.GitStatus} gitCommitStatusToCreate - * @param {string} commitId - * @param {string} repositoryId - * @param {string} project - Project ID or project name - */ - createCommitStatus(gitCommitStatusToCreate: GitInterfaces.GitStatus, commitId: string, repositoryId: string, project?: string): Promise; - /** - * @param {string} commitId - * @param {string} repositoryId - * @param {string} project - Project ID or project name - * @param {number} top - * @param {number} skip - */ - getStatuses(commitId: string, repositoryId: string, project?: string, top?: number, skip?: number): Promise; - /** - * @param {string} repositoryId - * @param {string} sha1 - * @param {string} project - Project ID or project name - * @param {string} projectId - * @param {boolean} recursive - * @param {string} fileName - */ - getTree(repositoryId: string, sha1: string, project?: string, projectId?: string, recursive?: boolean, fileName?: string): Promise; - /** - * @param {string} repositoryId - * @param {string} sha1 - * @param {string} project - Project ID or project name - * @param {string} projectId - * @param {boolean} recursive - * @param {string} fileName - */ - getTreeZip(repositoryId: string, sha1: string, project?: string, projectId?: string, recursive?: boolean, fileName?: string): Promise; - } - -} -declare module 'vso-node-api/interfaces/common/FormInputInterfaces' { - export enum InputDataType { - /** - * No data type is specified. - */ - None = 0, - /** - * Represents a textual value. - */ - String = 10, - /** - * Represents a numberic value. - */ - Number = 20, - /** - * Represents a value of true or false. - */ - Boolean = 30, - /** - * Represents a Guid. - */ - Guid = 40, - /** - * Represents a URI. - */ - Uri = 50, - } - /** - * Describes an input for subscriptions. - */ - export interface InputDescriptor { - /** - * The ids of all inputs that the value of this input is dependent on. - */ - dependencyInputIds: string[]; - /** - * Description of what this input is used for - */ - description: string; - /** - * The group localized name to which this input belongs and can be shown as a header for the container that will include all the inputs in the group. - */ - groupName: string; - /** - * If true, the value information for this input is dynamic and should be fetched when the value of dependency inputs change. - */ - hasDynamicValueInformation: boolean; - /** - * Identifier for the subscription input - */ - id: string; - /** - * Mode in which the value of this input should be entered - */ - inputMode: InputMode; - /** - * Gets whether this input is confidential, such as for a password or application key - */ - isConfidential: boolean; - /** - * Localized name which can be shown as a label for the subscription input - */ - name: string; - /** - * Gets whether this input is included in the default generated action description. - */ - useInDefaultDescription: boolean; - /** - * Information to use to validate this input's value - */ - validation: InputValidation; - /** - * A hint for input value. It can be used in the UI as the input placeholder. - */ - valueHint: string; - /** - * Information about possible values for this input - */ - values: InputValues; - } - /** - * Defines a filter for subscription inputs. The filter matches a set of inputs if any (one or more) of the groups evaluates to true. - */ - export interface InputFilter { - /** - * Groups of input filter expressions. This filter matches a set of inputs if any (one or more) of the groups evaluates to true. - */ - conditions: InputFilterCondition[]; - } - /** - * An expression which can be applied to filter a list of subscription inputs - */ - export interface InputFilterCondition { - /** - * Whether or not to do a case sensitive match - */ - caseSensitive: boolean; - /** - * The Id of the input to filter on - */ - inputId: string; - /** - * The "expected" input value to compare with the actual input value - */ - inputValue: string; - /** - * The operator applied between the expected and actual input value - */ - operator: InputFilterOperator; - } - export enum InputFilterOperator { - Equals = 0, - NotEquals = 1, - } - export enum InputMode { - /** - * This input should not be shown in the UI - */ - None = 0, - /** - * An input text box should be shown - */ - TextBox = 10, - /** - * An password input box should be shown - */ - PasswordBox = 20, - /** - * A select/combo control should be shown - */ - Combo = 30, - /** - * Radio buttons should be shown - */ - RadioButtons = 40, - /** - * Checkbox should be shown(for true/false values) - */ - CheckBox = 50, - /** - * A multi-line text area should be shown - */ - TextArea = 60, - } - /** - * Describes what values are valid for a subscription input - */ - export interface InputValidation { - dataType: InputDataType; - isRequired: boolean; - maxLength: number; - maxValue: number; - minLength: number; - minValue: number; - pattern: string; - patternMismatchErrorMessage: string; - } - /** - * Information about a single value for an input - */ - export interface InputValue { - /** - * Any other data about this input - */ - data: { - [key: string]: any; - }; - /** - * The text to show for the display of this value - */ - displayValue: string; - /** - * The value to store for this input - */ - value: string; - } - /** - * Information about the possible/allowed values for a given subscription input - */ - export interface InputValues { - /** - * The default value to use for this input - */ - defaultValue: string; - /** - * Errors encountered while computing dynamic values. - */ - error: InputValuesError; - /** - * The id of the input - */ - inputId: string; - /** - * Should this input be disabled - */ - isDisabled: boolean; - /** - * Should the value be restricted to one of the values in the PossibleValues (True) or are the values in PossibleValues just a suggestion (False) - */ - isLimitedToPossibleValues: boolean; - /** - * Should this input be made read-only - */ - isReadOnly: boolean; - /** - * Possible values that this input can take - */ - possibleValues: InputValue[]; - } - /** - * Error information related to a subscription input value. - */ - export interface InputValuesError { - /** - * The error message. - */ - message: string; - } - export interface InputValuesQuery { - currentValues: { - [key: string]: string; - }; - /** - * The input values to return on input, and the result from the consumer on output. - */ - inputValues: InputValues[]; - /** - * Subscription containing information about the publisher/consumer and the current input values - */ - resource: any; - } - export var TypeInfo: { - InputDataType: { - enumValues: { - "none": number; - "string": number; - "number": number; - "boolean": number; - "guid": number; - "uri": number; - }; - }; - InputDescriptor: { - fields: any; - }; - InputFilter: { - fields: any; - }; - InputFilterCondition: { - fields: any; - }; - InputFilterOperator: { - enumValues: { - "equals": number; - "notEquals": number; - }; - }; - InputMode: { - enumValues: { - "none": number; - "textBox": number; - "passwordBox": number; - "combo": number; - "radioButtons": number; - "checkBox": number; - "textArea": number; - }; - }; - InputValidation: { - fields: any; - }; - InputValue: { - fields: any; - }; - InputValues: { - fields: any; - }; - InputValuesError: { - fields: any; - }; - InputValuesQuery: { - fields: any; - }; - }; - -} -declare module 'vso-node-api/interfaces/TaskAgentInterfaces' { - import FormInputInterfaces = require('vso-node-api/interfaces/common/FormInputInterfaces'); - import VSSInterfaces = require('vso-node-api/interfaces/common/VSSInterfaces'); - export interface AgentPoolEvent { - eventType: string; - pool: TaskAgentPool; - } - export interface AgentQueueEvent { - eventType: string; - queue: TaskAgentQueue; - } - export interface AgentRefreshMessage { - agentId: number; - timeout: any; - } - export interface AuthorizationHeader { - name: string; - value: string; - } - export enum ConnectedServiceKind { - /** - * Custom or unknown service - */ - Custom = 0, - /** - * Azure Subscription - */ - AzureSubscription = 1, - /** - * Chef Connection - */ - Chef = 2, - /** - * Generic Connection - */ - Generic = 3, - /** - * GitHub Connection - */ - GitHub = 4, - } - export interface DataSource { - endpointUrl: string; - name: string; - resultSelector: string; - } - export interface DataSourceBinding { - dataSourceName: string; - endpointId: string; - parameters: { - [key: string]: string; - }; - resultTemplate: string; - target: string; - } - export interface EndpointAuthorization { - parameters: { - [key: string]: string; - }; - scheme: string; - } - export interface EndpointUrl { - displayName: string; - helpText: string; - value: string; - } - export interface HelpLink { - text: string; - url: string; - } - export interface Issue { - category: string; - data: { - [key: string]: string; - }; - message: string; - type: IssueType; - } - export enum IssueType { - Error = 1, - Warning = 2, - } - export interface JobAssignedEvent extends JobEvent { - request: TaskAgentJobRequest; - } - export interface JobCancelMessage { - jobId: string; - timeout: any; - } - export interface JobCompletedEvent extends JobEvent { - requestId: number; - result: TaskResult; - } - /** - * Represents the context of variables and vectors for a job request. - */ - export interface JobEnvironment { - endpoints: ServiceEndpoint[]; - mask: MaskHint[]; - options: { - [key: string]: JobOption; - }; - /** - * Gets or sets the endpoint used for communicating back to the calling service. - */ - systemConnection: ServiceEndpoint; - variables: { - [key: string]: string; - }; - } - export interface JobEvent { - jobId: string; - name: string; - } - /** - * Represents an option that may affect the way an agent runs the job. - */ - export interface JobOption { - data: { - [key: string]: string; - }; - /** - * Gets the id of the option. - */ - id: string; - } - export interface JobRequestMessage { - environment: JobEnvironment; - jobId: string; - jobName: string; - lockedUntil: Date; - lockToken: string; - plan: TaskOrchestrationPlanReference; - requestId: number; - tasks: TaskInstance[]; - timeline: TimelineReference; - } - export interface MaskHint { - type: MaskType; - value: string; - } - export enum MaskType { - Variable = 1, - Regex = 2, - } - export interface PlanEnvironment { - mask: MaskHint[]; - options: { - [key: string]: JobOption; - }; - variables: { - [key: string]: string; - }; - } - /** - * Represents an endpoint which may be used by an orchestration job. - */ - export interface ServiceEndpoint { - administratorsGroup: VSSInterfaces.IdentityRef; - /** - * Gets or sets the authorization data for talking to the endpoint. - */ - authorization: EndpointAuthorization; - /** - * The Gets or sets Identity reference for the user who created the Service endpoint - */ - createdBy: VSSInterfaces.IdentityRef; - data: { - [key: string]: string; - }; - /** - * Gets or Sets description of endpoint - */ - description: string; - groupScopeId: string; - /** - * Gets or sets the identifier of this endpoint. - */ - id: string; - /** - * Gets or sets the friendly name of the endpoint. - */ - name: string; - readersGroup: VSSInterfaces.IdentityRef; - /** - * Gets or sets the type of the endpoint. - */ - type: string; - /** - * Gets or sets the url of the endpoint. - */ - url: string; - } - export interface ServiceEndpointAuthenticationScheme { - authorizationHeaders: AuthorizationHeader[]; - displayName: string; - endpointHeaders: AuthorizationHeader[]; - inputDescriptors: FormInputInterfaces.InputDescriptor[]; - scheme: string; - } - export interface ServiceEndpointType { - authenticationSchemes: ServiceEndpointAuthenticationScheme[]; - dataSources: DataSource[]; - description: string; - displayName: string; - endpointUrl: EndpointUrl; - helpLink: HelpLink; - helpMarkDown: string; - name: string; - } - export interface TaskAgent extends TaskAgentReference { - /** - * Gets the request which is currently assigned to this agent. - */ - assignedRequest: TaskAgentJobRequest; - /** - * Gets the date on which this agent was created. - */ - createdOn: Date; - /** - * Gets or sets the maximum job parallelism allowed on this host. - */ - maxParallelism: number; - properties: any; - /** - * Gets the date on which the last connectivity status change occurred. - */ - statusChangedOn: Date; - systemCapabilities: { - [key: string]: string; - }; - userCapabilities: { - [key: string]: string; - }; - } - export interface TaskAgentJobRequest { - assignTime: Date; - definition: TaskOrchestrationOwner; - demands: any[]; - finishTime: Date; - hostId: string; - jobId: string; - lockedUntil: Date; - matchedAgents: TaskAgentReference[]; - owner: TaskOrchestrationOwner; - planId: string; - planType: string; - queueTime: Date; - receiveTime: Date; - requestId: number; - reservedAgent: TaskAgentReference; - result: TaskResult; - scopeId: string; - serviceOwner: string; - } - export interface TaskAgentMessage { - body: string; - messageId: number; - messageType: string; - } - export interface TaskAgentPool extends TaskAgentPoolReference { - /** - * Gets the administrators group for this agent pool. - */ - administratorsGroup: VSSInterfaces.IdentityRef; - /** - * Gets or sets a value indicating whether or not a queue should be automatically provisioned for each project collection or not. - */ - autoProvision: boolean; - /** - * Gets the identity who created this pool. The creator of the pool is automatically added into the administrators group for the pool on creation. - */ - createdBy: VSSInterfaces.IdentityRef; - /** - * Gets the date/time of the pool creation. - */ - createdOn: Date; - /** - * Gets the scope identifier for groups/roles which are owned by this pool. - */ - groupScopeId: string; - /** - * Gets or sets a value indicating whether or not this pool is managed by the service. - */ - isHosted: boolean; - properties: any; - /** - * Gets a value indicating whether or not roles have been provisioned for this pool. - */ - provisioned: boolean; - /** - * Gets the service accounts group for this agent pool. - */ - serviceAccountsGroup: VSSInterfaces.IdentityRef; - /** - * Gets the current size of the pool. - */ - size: number; - } - export interface TaskAgentPoolReference { - id: number; - name: string; - scope: string; - } - export interface TaskAgentQueue { - groupScopeId: string; - id: number; - name: string; - pool: TaskAgentPoolReference; - provisioned: boolean; - } - export enum TaskAgentQueueActionFilter { - None = 0, - Manage = 2, - Use = 16, - } - export interface TaskAgentReference { - _links: any; - /** - * Gets or sets a value indicating whether or not this agent should be enabled for job execution. - */ - enabled: boolean; - /** - * Gets the identifier of the agent. - */ - id: number; - /** - * Gets the name of the agent. - */ - name: string; - /** - * Gets the current connectivity status of the agent. - */ - status: TaskAgentStatus; - /** - * Gets the version of the agent. - */ - version: string; - } - export interface TaskAgentSession { - agent: TaskAgentReference; - ownerName: string; - sessionId: string; - systemCapabilities: { - [key: string]: string; - }; - } - export enum TaskAgentStatus { - Offline = 1, - Online = 2, - } - export interface TaskAttachment { - _links: any; - createdOn: Date; - lastChangedBy: string; - lastChangedOn: Date; - name: string; - recordId: string; - timelineId: string; - type: string; - } - export interface TaskChangeEvent { - } - export interface TaskDefinition { - agentExecution: TaskExecution; - author: string; - category: string; - contentsUploaded: boolean; - contributionIdentifier: string; - contributionVersion: string; - dataSourceBindings: DataSourceBinding[]; - demands: any[]; - description: string; - disabled: boolean; - friendlyName: string; - groups: TaskGroupDefinition[]; - helpMarkDown: string; - hostType: string; - iconUrl: string; - id: string; - inputs: TaskInputDefinition[]; - instanceNameFormat: string; - minimumAgentVersion: string; - name: string; - packageLocation: string; - packageType: string; - serverOwned: boolean; - sourceDefinitions: TaskSourceDefinition[]; - sourceLocation: string; - version: TaskVersion; - visibility: string[]; - } - export interface TaskDefinitionEndpoint { - /** - * An ID that identifies a service connection to be used for authenticating endpoint requests. - */ - connectionId: string; - /** - * An Json based keyselector to filter response returned by fetching the endpoint Url.A Json based keyselector must be prefixed with "jsonpath:". KeySelector can be used to specify the filter to get the keys for the values specified with Selector. The following keyselector defines an Json for extracting nodes named 'ServiceName'. endpoint.KeySelector = "jsonpath://ServiceName"; - */ - keySelector: string; - /** - * The scope as understood by Connected Services. Essentialy, a project-id for now. - */ - scope: string; - /** - * An XPath/Json based selector to filter response returned by fetching the endpoint Url. An XPath based selector must be prefixed with the string "xpath:". A Json based selector must be prefixed with "jsonpath:". The following selector defines an XPath for extracting nodes named 'ServiceName'. endpoint.Selector = "xpath://ServiceName"; - */ - selector: string; - /** - * TaskId that this endpoint belongs to. - */ - taskId: string; - /** - * URL to GET. - */ - url: string; - } - export interface TaskExecution { - /** - * The utility task to run. Specifying this means that this task definition is simply a meta task to call another task. This is useful for tasks that call utility tasks like powershell and commandline - */ - execTask: TaskReference; - /** - * If a task is going to run code, then this provides the type/script etc... information by platform. For example, it might look like. net45: { typeName: "Microsoft.TeamFoundation.Automation.Tasks.PowerShellTask", assemblyName: "Microsoft.TeamFoundation.Automation.Tasks.PowerShell.dll" } net20: { typeName: "Microsoft.TeamFoundation.Automation.Tasks.PowerShellTask", assemblyName: "Microsoft.TeamFoundation.Automation.Tasks.PowerShell.dll" } java: { jar: "powershelltask.tasks.automation.teamfoundation.microsoft.com", } node: { script: "powershellhost.js", } - */ - platformInstructions: { - [key: string]: { - [key: string]: string; - }; - }; - } - export interface TaskGroupDefinition { - displayName: string; - isExpanded: boolean; - name: string; - tags: string[]; - } - export interface TaskInputDefinition { - defaultValue: string; - groupName: string; - helpMarkDown: string; - label: string; - name: string; - options: { - [key: string]: string; - }; - properties: { - [key: string]: string; - }; - required: boolean; - type: string; - visibleRule: string; - } - export interface TaskInstance extends TaskReference { - alwaysRun: boolean; - continueOnError: boolean; - displayName: string; - enabled: boolean; - instanceId: string; - } - export interface TaskLog extends TaskLogReference { - createdOn: Date; - indexLocation: string; - lastChangedOn: Date; - lineCount: number; - path: string; - } - export interface TaskLogReference { - id: number; - location: string; - } - export interface TaskOrchestrationContainer extends TaskOrchestrationItem { - children: TaskOrchestrationItem[]; - continueOnError: boolean; - parallel: boolean; - rollback: TaskOrchestrationContainer; - } - export interface TaskOrchestrationItem { - itemType: TaskOrchestrationItemType; - } - export enum TaskOrchestrationItemType { - Container = 0, - Job = 1, - } - export interface TaskOrchestrationJob extends TaskOrchestrationItem { - demands: any[]; - executeAs: VSSInterfaces.IdentityRef; - executionTimeout: any; - instanceId: string; - name: string; - tasks: TaskInstance[]; - variables: { - [key: string]: string; - }; - } - export interface TaskOrchestrationOwner { - _links: any; - id: number; - name: string; - } - export interface TaskOrchestrationPlan extends TaskOrchestrationPlanReference { - environment: PlanEnvironment; - finishTime: Date; - implementation: TaskOrchestrationContainer; - requestedById: string; - requestedForId: string; - result: TaskResult; - resultCode: string; - startTime: Date; - state: TaskOrchestrationPlanState; - timeline: TimelineReference; - } - export interface TaskOrchestrationPlanReference { - artifactLocation: string; - artifactUri: string; - planId: string; - planType: string; - scopeIdentifier: string; - version: number; - } - export enum TaskOrchestrationPlanState { - InProgress = 1, - Queued = 2, - Completed = 4, - } - export interface TaskPackageMetadata { - /** - * Gets the name of the package. - */ - type: string; - /** - * Gets the url of the package. - */ - url: string; - /** - * Gets the version of the package. - */ - version: string; - } - export interface TaskReference { - id: string; - inputs: { - [key: string]: string; - }; - name: string; - version: string; - } - export enum TaskResult { - Succeeded = 0, - SucceededWithIssues = 1, - Failed = 2, - Canceled = 3, - Skipped = 4, - Abandoned = 5, - } - export interface TaskSourceDefinition { - authKey: string; - endpoint: string; - keySelector: string; - selector: string; - target: string; - } - export interface TaskVersion { - isTest: boolean; - major: number; - minor: number; - patch: number; - } - /** - * Represents a shallow reference to a TeamProject. - */ - export interface TeamProjectReference { - /** - * Project abbreviation. - */ - abbreviation: string; - /** - * The project's description (if any). - */ - description: string; - /** - * Project identifier. - */ - id: string; - /** - * Project name. - */ - name: string; - /** - * Project state. - */ - state: any; - /** - * Url to the full version of the object. - */ - url: string; - } - export interface Timeline extends TimelineReference { - lastChangedBy: string; - lastChangedOn: Date; - records: TimelineRecord[]; - } - export interface TimelineRecord { - changeId: number; - currentOperation: string; - details: TimelineReference; - errorCount: number; - finishTime: Date; - id: string; - issues: Issue[]; - lastModified: Date; - location: string; - log: TaskLogReference; - name: string; - order: number; - parentId: string; - percentComplete: number; - result: TaskResult; - resultCode: string; - startTime: Date; - state: TimelineRecordState; - type: string; - warningCount: number; - workerName: string; - } - export enum TimelineRecordState { - Pending = 0, - InProgress = 1, - Completed = 2, - } - export interface TimelineReference { - changeId: number; - id: string; - location: string; - } - export interface WebApiConnectedService extends WebApiConnectedServiceRef { - /** - * The user who did the OAuth authentication to created this service - */ - authenticatedBy: VSSInterfaces.IdentityRef; - /** - * Extra description on the service. - */ - description: string; - /** - * Friendly Name of service connection - */ - friendlyName: string; - /** - * Id/Name of the connection service. For Ex: Subscription Id for Azure Connection - */ - id: string; - /** - * The kind of service. - */ - kind: string; - /** - * The project associated with this service - */ - project: TeamProjectReference; - /** - * Optional uri to connect directly to the service such as https://windows.azure.com - */ - serviceUri: string; - } - export interface WebApiConnectedServiceDetails extends WebApiConnectedServiceRef { - /** - * Meta data for service connection - */ - connectedServiceMetaData: WebApiConnectedService; - /** - * Credential info - */ - credentialsXml: string; - /** - * Optional uri to connect directly to the service such as https://windows.azure.com - */ - endPoint: string; - } - export interface WebApiConnectedServiceRef { - id: string; - url: string; - } - export var TypeInfo: { - AgentPoolEvent: { - fields: any; - }; - AgentQueueEvent: { - fields: any; - }; - AgentRefreshMessage: { - fields: any; - }; - AuthorizationHeader: { - fields: any; - }; - ConnectedServiceKind: { - enumValues: { - "custom": number; - "azureSubscription": number; - "chef": number; - "generic": number; - "gitHub": number; - }; - }; - DataSource: { - fields: any; - }; - DataSourceBinding: { - fields: any; - }; - EndpointAuthorization: { - fields: any; - }; - EndpointUrl: { - fields: any; - }; - HelpLink: { - fields: any; - }; - Issue: { - fields: any; - }; - IssueType: { - enumValues: { - "error": number; - "warning": number; - }; - }; - JobAssignedEvent: { - fields: any; - }; - JobCancelMessage: { - fields: any; - }; - JobCompletedEvent: { - fields: any; - }; - JobEnvironment: { - fields: any; - }; - JobEvent: { - fields: any; - }; - JobOption: { - fields: any; - }; - JobRequestMessage: { - fields: any; - }; - MaskHint: { - fields: any; - }; - MaskType: { - enumValues: { - "variable": number; - "regex": number; - }; - }; - PlanEnvironment: { - fields: any; - }; - ServiceEndpoint: { - fields: any; - }; - ServiceEndpointAuthenticationScheme: { - fields: any; - }; - ServiceEndpointType: { - fields: any; - }; - TaskAgent: { - fields: any; - }; - TaskAgentJobRequest: { - fields: any; - }; - TaskAgentMessage: { - fields: any; - }; - TaskAgentPool: { - fields: any; - }; - TaskAgentPoolReference: { - fields: any; - }; - TaskAgentQueue: { - fields: any; - }; - TaskAgentQueueActionFilter: { - enumValues: { - "none": number; - "manage": number; - "use": number; - }; - }; - TaskAgentReference: { - fields: any; - }; - TaskAgentSession: { - fields: any; - }; - TaskAgentStatus: { - enumValues: { - "offline": number; - "online": number; - }; - }; - TaskAttachment: { - fields: any; - }; - TaskChangeEvent: { - fields: any; - }; - TaskDefinition: { - fields: any; - }; - TaskDefinitionEndpoint: { - fields: any; - }; - TaskExecution: { - fields: any; - }; - TaskGroupDefinition: { - fields: any; - }; - TaskInputDefinition: { - fields: any; - }; - TaskInstance: { - fields: any; - }; - TaskLog: { - fields: any; - }; - TaskLogReference: { - fields: any; - }; - TaskOrchestrationContainer: { - fields: any; - }; - TaskOrchestrationItem: { - fields: any; - }; - TaskOrchestrationItemType: { - enumValues: { - "container": number; - "job": number; - }; - }; - TaskOrchestrationJob: { - fields: any; - }; - TaskOrchestrationOwner: { - fields: any; - }; - TaskOrchestrationPlan: { - fields: any; - }; - TaskOrchestrationPlanReference: { - fields: any; - }; - TaskOrchestrationPlanState: { - enumValues: { - "inProgress": number; - "queued": number; - "completed": number; - }; - }; - TaskPackageMetadata: { - fields: any; - }; - TaskReference: { - fields: any; - }; - TaskResult: { - enumValues: { - "succeeded": number; - "succeededWithIssues": number; - "failed": number; - "canceled": number; - "skipped": number; - "abandoned": number; - }; - }; - TaskSourceDefinition: { - fields: any; - }; - TaskVersion: { - fields: any; - }; - TeamProjectReference: { - fields: any; - }; - Timeline: { - fields: any; - }; - TimelineRecord: { - fields: any; - }; - TimelineRecordState: { - enumValues: { - "pending": number; - "inProgress": number; - "completed": number; - }; - }; - TimelineReference: { - fields: any; - }; - WebApiConnectedService: { - fields: any; - }; - WebApiConnectedServiceDetails: { - fields: any; - }; - WebApiConnectedServiceRef: { - fields: any; - }; - }; - -} -declare module 'vso-node-api/TaskAgentApiBase' { - - - import Q = require('q'); - import basem = require('vso-node-api/ClientApiBases'); - import VsoBaseInterfaces = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); - import TaskAgentInterfaces = require('vso-node-api/interfaces/TaskAgentInterfaces'); - import VSSInterfaces = require('vso-node-api/interfaces/common/VSSInterfaces'); - export interface ITaskAgentApiBase extends basem.ClientApiBase { - addAgent(agent: TaskAgentInterfaces.TaskAgent, poolId: number, onResult: (err: any, statusCode: number, agent: TaskAgentInterfaces.TaskAgent) => void): void; - deleteAgent(poolId: number, agentId: number, onResult: (err: any, statusCode: number) => void): void; - getAgent(poolId: number, agentId: number, includeCapabilities: boolean, includeAssignedRequest: boolean, propertyFilters: string[], onResult: (err: any, statusCode: number, agent: TaskAgentInterfaces.TaskAgent) => void): void; - getAgents(poolId: number, agentName: string, includeCapabilities: boolean, includeAssignedRequest: boolean, propertyFilters: string[], demands: string[], onResult: (err: any, statusCode: number, agents: TaskAgentInterfaces.TaskAgent[]) => void): void; - replaceAgent(agent: TaskAgentInterfaces.TaskAgent, poolId: number, agentId: number, onResult: (err: any, statusCode: number, agent: TaskAgentInterfaces.TaskAgent) => void): void; - updateAgent(agent: TaskAgentInterfaces.TaskAgent, poolId: number, agentId: number, onResult: (err: any, statusCode: number, agent: TaskAgentInterfaces.TaskAgent) => void): void; - queryEndpoint(endpoint: TaskAgentInterfaces.TaskDefinitionEndpoint, onResult: (err: any, statusCode: number, endpoint: string[]) => void): void; - deleteAgentRequest(poolId: number, requestId: number, lockToken: string, onResult: (err: any, statusCode: number) => void): void; - getAgentRequest(poolId: number, requestId: number, onResult: (err: any, statusCode: number, jobrequest: TaskAgentInterfaces.TaskAgentJobRequest) => void): void; - getAgentRequestsForAgent(poolId: number, agentId: number, completedRequestCount: number, onResult: (err: any, statusCode: number, jobrequests: TaskAgentInterfaces.TaskAgentJobRequest[]) => void): void; - getAgentRequestsForAgents(poolId: number, agentIds: number[], completedRequestCount: number, onResult: (err: any, statusCode: number, jobrequests: TaskAgentInterfaces.TaskAgentJobRequest[]) => void): void; - getAgentRequestsForPlan(poolId: number, planId: string, jobId: string, onResult: (err: any, statusCode: number, jobrequests: TaskAgentInterfaces.TaskAgentJobRequest[]) => void): void; - queueAgentRequest(request: TaskAgentInterfaces.TaskAgentJobRequest, poolId: number, onResult: (err: any, statusCode: number, jobrequest: TaskAgentInterfaces.TaskAgentJobRequest) => void): void; - updateAgentRequest(request: TaskAgentInterfaces.TaskAgentJobRequest, poolId: number, requestId: number, lockToken: string, onResult: (err: any, statusCode: number, jobrequest: TaskAgentInterfaces.TaskAgentJobRequest) => void): void; - deleteMessage(poolId: number, messageId: number, sessionId: string, onResult: (err: any, statusCode: number) => void): void; - getMessage(poolId: number, sessionId: string, lastMessageId: number, onResult: (err: any, statusCode: number, message: TaskAgentInterfaces.TaskAgentMessage) => void): void; - refreshAgent(poolId: number, agentId: number, onResult: (err: any, statusCode: number) => void): void; - refreshAgents(poolId: number, onResult: (err: any, statusCode: number) => void): void; - sendMessage(message: TaskAgentInterfaces.TaskAgentMessage, poolId: number, requestId: number, onResult: (err: any, statusCode: number) => void): void; - getPackage(packageType: string, onResult: (err: any, statusCode: number, _package: TaskAgentInterfaces.TaskPackageMetadata) => void): void; - getPackages(onResult: (err: any, statusCode: number, packages: TaskAgentInterfaces.TaskPackageMetadata[]) => void): void; - getPackageZip(packageType: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - getAgentPoolRoles(poolId: number, onResult: (err: any, statusCode: number, poolroles: VSSInterfaces.IdentityRef[]) => void): void; - addAgentPool(pool: TaskAgentInterfaces.TaskAgentPool, onResult: (err: any, statusCode: number, pool: TaskAgentInterfaces.TaskAgentPool) => void): void; - deleteAgentPool(poolId: number, onResult: (err: any, statusCode: number) => void): void; - getAgentPool(poolId: number, properties: string[], onResult: (err: any, statusCode: number, pool: TaskAgentInterfaces.TaskAgentPool) => void): void; - getAgentPools(poolName: string, properties: string[], onResult: (err: any, statusCode: number, pools: TaskAgentInterfaces.TaskAgentPool[]) => void): void; - updateAgentPool(pool: TaskAgentInterfaces.TaskAgentPool, poolId: number, onResult: (err: any, statusCode: number, pool: TaskAgentInterfaces.TaskAgentPool) => void): void; - getAgentQueueRoles(queueId: number, onResult: (err: any, statusCode: number, queueroles: VSSInterfaces.IdentityRef[]) => void): void; - addAgentQueue(queue: TaskAgentInterfaces.TaskAgentQueue, onResult: (err: any, statusCode: number, queue: TaskAgentInterfaces.TaskAgentQueue) => void): void; - deleteAgentQueue(queueId: number, onResult: (err: any, statusCode: number) => void): void; - getAgentQueue(queueId: number, actionFilter: TaskAgentInterfaces.TaskAgentQueueActionFilter, onResult: (err: any, statusCode: number, queue: TaskAgentInterfaces.TaskAgentQueue) => void): void; - getAgentQueues(queueName: string, actionFilter: TaskAgentInterfaces.TaskAgentQueueActionFilter, onResult: (err: any, statusCode: number, queues: TaskAgentInterfaces.TaskAgentQueue[]) => void): void; - queryServiceEndpoint(binding: TaskAgentInterfaces.DataSourceBinding, scopeIdentifier: string, onResult: (err: any, statusCode: number, serviceendpointproxy: string[]) => void): void; - createServiceEndpoint(endpoint: TaskAgentInterfaces.ServiceEndpoint, scopeIdentifier: string, onResult: (err: any, statusCode: number, serviceendpoint: TaskAgentInterfaces.ServiceEndpoint) => void): void; - deleteServiceEndpoint(scopeIdentifier: string, endpointId: string, onResult: (err: any, statusCode: number) => void): void; - getServiceEndpointDetails(scopeIdentifier: string, endpointId: string, onResult: (err: any, statusCode: number, serviceendpoint: TaskAgentInterfaces.ServiceEndpoint) => void): void; - getServiceEndpoints(scopeIdentifier: string, type: string, authSchemes: string[], endpointIds: string[], onResult: (err: any, statusCode: number, serviceendpoints: TaskAgentInterfaces.ServiceEndpoint[]) => void): void; - updateServiceEndpoint(endpoint: TaskAgentInterfaces.ServiceEndpoint, scopeIdentifier: string, endpointId: string, onResult: (err: any, statusCode: number, serviceendpoint: TaskAgentInterfaces.ServiceEndpoint) => void): void; - getServiceEndpointTypes(scopeIdentifier: string, type: string, scheme: string, onResult: (err: any, statusCode: number, serviceendpointtypes: TaskAgentInterfaces.ServiceEndpointType[]) => void): void; - createAgentSession(session: TaskAgentInterfaces.TaskAgentSession, poolId: number, onResult: (err: any, statusCode: number, session: TaskAgentInterfaces.TaskAgentSession) => void): void; - deleteAgentSession(poolId: number, sessionId: string, onResult: (err: any, statusCode: number) => void): void; - deleteTaskDefinition(taskId: string, onResult: (err: any, statusCode: number) => void): void; - getTaskContentZip(taskId: string, versionString: string, visibility: string[], scopeLocal: boolean, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - getTaskDefinition(taskId: string, versionString: string, visibility: string[], scopeLocal: boolean, onResult: (err: any, statusCode: number, task: TaskAgentInterfaces.TaskDefinition) => void): void; - getTaskDefinitions(taskId: string, visibility: string[], scopeLocal: boolean, onResult: (err: any, statusCode: number, tasks: TaskAgentInterfaces.TaskDefinition[]) => void): void; - updateAgentUserCapabilities(userCapabilities: { - [key: string]: string; - }, poolId: number, agentId: number, onResult: (err: any, statusCode: number, usercapabilitie: TaskAgentInterfaces.TaskAgent) => void): void; - } - export interface IQTaskAgentApiBase extends basem.QClientApiBase { - addAgent(agent: TaskAgentInterfaces.TaskAgent, poolId: number): Promise; - deleteAgent(poolId: number, agentId: number): Promise; - getAgent(poolId: number, agentId: number, includeCapabilities?: boolean, includeAssignedRequest?: boolean, propertyFilters?: string[]): Promise; - getAgents(poolId: number, agentName?: string, includeCapabilities?: boolean, includeAssignedRequest?: boolean, propertyFilters?: string[], demands?: string[]): Promise; - replaceAgent(agent: TaskAgentInterfaces.TaskAgent, poolId: number, agentId: number): Promise; - updateAgent(agent: TaskAgentInterfaces.TaskAgent, poolId: number, agentId: number): Promise; - queryEndpoint(endpoint: TaskAgentInterfaces.TaskDefinitionEndpoint): Promise; - deleteAgentRequest(poolId: number, requestId: number, lockToken: string): Promise; - getAgentRequest(poolId: number, requestId: number): Promise; - getAgentRequestsForAgent(poolId: number, agentId: number, completedRequestCount?: number): Promise; - getAgentRequestsForAgents(poolId: number, agentIds: number[], completedRequestCount?: number): Promise; - getAgentRequestsForPlan(poolId: number, planId: string, jobId?: string): Promise; - queueAgentRequest(request: TaskAgentInterfaces.TaskAgentJobRequest, poolId: number): Promise; - updateAgentRequest(request: TaskAgentInterfaces.TaskAgentJobRequest, poolId: number, requestId: number, lockToken: string): Promise; - deleteMessage(poolId: number, messageId: number, sessionId: string): Promise; - getMessage(poolId: number, sessionId: string, lastMessageId?: number): Promise; - refreshAgent(poolId: number, agentId: number): Promise; - refreshAgents(poolId: number): Promise; - sendMessage(message: TaskAgentInterfaces.TaskAgentMessage, poolId: number, requestId: number): Promise; - getPackage(packageType: string): Promise; - getPackages(): Promise; - getPackageZip(packageType: string): Promise; - getAgentPoolRoles(poolId?: number): Promise; - addAgentPool(pool: TaskAgentInterfaces.TaskAgentPool): Promise; - deleteAgentPool(poolId: number): Promise; - getAgentPool(poolId: number, properties?: string[]): Promise; - getAgentPools(poolName?: string, properties?: string[]): Promise; - updateAgentPool(pool: TaskAgentInterfaces.TaskAgentPool, poolId: number): Promise; - getAgentQueueRoles(queueId?: number): Promise; - addAgentQueue(queue: TaskAgentInterfaces.TaskAgentQueue): Promise; - deleteAgentQueue(queueId: number): Promise; - getAgentQueue(queueId: number, actionFilter?: TaskAgentInterfaces.TaskAgentQueueActionFilter): Promise; - getAgentQueues(queueName?: string, actionFilter?: TaskAgentInterfaces.TaskAgentQueueActionFilter): Promise; - queryServiceEndpoint(binding: TaskAgentInterfaces.DataSourceBinding, scopeIdentifier: string): Promise; - createServiceEndpoint(endpoint: TaskAgentInterfaces.ServiceEndpoint, scopeIdentifier: string): Promise; - deleteServiceEndpoint(scopeIdentifier: string, endpointId: string): Promise; - getServiceEndpointDetails(scopeIdentifier: string, endpointId: string): Promise; - getServiceEndpoints(scopeIdentifier: string, type?: string, authSchemes?: string[], endpointIds?: string[]): Promise; - updateServiceEndpoint(endpoint: TaskAgentInterfaces.ServiceEndpoint, scopeIdentifier: string, endpointId: string): Promise; - getServiceEndpointTypes(scopeIdentifier: string, type?: string, scheme?: string): Promise; - createAgentSession(session: TaskAgentInterfaces.TaskAgentSession, poolId: number): Promise; - deleteAgentSession(poolId: number, sessionId: string): Promise; - deleteTaskDefinition(taskId: string): Promise; - getTaskContentZip(taskId: string, versionString: string, visibility?: string[], scopeLocal?: boolean): Promise; - getTaskDefinition(taskId: string, versionString: string, visibility?: string[], scopeLocal?: boolean): Promise; - getTaskDefinitions(taskId?: string, visibility?: string[], scopeLocal?: boolean): Promise; - updateAgentUserCapabilities(userCapabilities: { - [key: string]: string; - }, poolId: number, agentId: number): Promise; - } - export class TaskAgentApiBase extends basem.ClientApiBase implements ITaskAgentApiBase { - constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); - /** - * @param {TaskAgentInterfaces.TaskAgent} agent - * @param {number} poolId - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAgent - */ - addAgent(agent: TaskAgentInterfaces.TaskAgent, poolId: number, onResult: (err: any, statusCode: number, agent: TaskAgentInterfaces.TaskAgent) => void): void; - /** - * @param {number} poolId - * @param {number} agentId - * @param onResult callback function - */ - deleteAgent(poolId: number, agentId: number, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {number} poolId - * @param {number} agentId - * @param {boolean} includeCapabilities - * @param {boolean} includeAssignedRequest - * @param {string[]} propertyFilters - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAgent - */ - getAgent(poolId: number, agentId: number, includeCapabilities: boolean, includeAssignedRequest: boolean, propertyFilters: string[], onResult: (err: any, statusCode: number, agent: TaskAgentInterfaces.TaskAgent) => void): void; - /** - * @param {number} poolId - * @param {string} agentName - * @param {boolean} includeCapabilities - * @param {boolean} includeAssignedRequest - * @param {string[]} propertyFilters - * @param {string[]} demands - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAgent[] - */ - getAgents(poolId: number, agentName: string, includeCapabilities: boolean, includeAssignedRequest: boolean, propertyFilters: string[], demands: string[], onResult: (err: any, statusCode: number, agents: TaskAgentInterfaces.TaskAgent[]) => void): void; - /** - * @param {TaskAgentInterfaces.TaskAgent} agent - * @param {number} poolId - * @param {number} agentId - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAgent - */ - replaceAgent(agent: TaskAgentInterfaces.TaskAgent, poolId: number, agentId: number, onResult: (err: any, statusCode: number, agent: TaskAgentInterfaces.TaskAgent) => void): void; - /** - * @param {TaskAgentInterfaces.TaskAgent} agent - * @param {number} poolId - * @param {number} agentId - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAgent - */ - updateAgent(agent: TaskAgentInterfaces.TaskAgent, poolId: number, agentId: number, onResult: (err: any, statusCode: number, agent: TaskAgentInterfaces.TaskAgent) => void): void; - /** - * Proxy for a GET request defined by an 'endpoint'. The request is authorized using a service connection. The response is filtered using an XPath/Json based selector. - * - * @param {TaskAgentInterfaces.TaskDefinitionEndpoint} endpoint - Describes the URL to fetch. - * @param onResult callback function with the resulting string[] - */ - queryEndpoint(endpoint: TaskAgentInterfaces.TaskDefinitionEndpoint, onResult: (err: any, statusCode: number, endpoint: string[]) => void): void; - /** - * @param {number} poolId - * @param {number} requestId - * @param {string} lockToken - * @param onResult callback function - */ - deleteAgentRequest(poolId: number, requestId: number, lockToken: string, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {number} poolId - * @param {number} requestId - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAgentJobRequest - */ - getAgentRequest(poolId: number, requestId: number, onResult: (err: any, statusCode: number, jobrequest: TaskAgentInterfaces.TaskAgentJobRequest) => void): void; - /** - * @param {number} poolId - * @param {number} agentId - * @param {number} completedRequestCount - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAgentJobRequest[] - */ - getAgentRequestsForAgent(poolId: number, agentId: number, completedRequestCount: number, onResult: (err: any, statusCode: number, jobrequests: TaskAgentInterfaces.TaskAgentJobRequest[]) => void): void; - /** - * @param {number} poolId - * @param {number[]} agentIds - * @param {number} completedRequestCount - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAgentJobRequest[] - */ - getAgentRequestsForAgents(poolId: number, agentIds: number[], completedRequestCount: number, onResult: (err: any, statusCode: number, jobrequests: TaskAgentInterfaces.TaskAgentJobRequest[]) => void): void; - /** - * @param {number} poolId - * @param {string} planId - * @param {string} jobId - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAgentJobRequest[] - */ - getAgentRequestsForPlan(poolId: number, planId: string, jobId: string, onResult: (err: any, statusCode: number, jobrequests: TaskAgentInterfaces.TaskAgentJobRequest[]) => void): void; - /** - * @param {TaskAgentInterfaces.TaskAgentJobRequest} request - * @param {number} poolId - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAgentJobRequest - */ - queueAgentRequest(request: TaskAgentInterfaces.TaskAgentJobRequest, poolId: number, onResult: (err: any, statusCode: number, jobrequest: TaskAgentInterfaces.TaskAgentJobRequest) => void): void; - /** - * @param {TaskAgentInterfaces.TaskAgentJobRequest} request - * @param {number} poolId - * @param {number} requestId - * @param {string} lockToken - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAgentJobRequest - */ - updateAgentRequest(request: TaskAgentInterfaces.TaskAgentJobRequest, poolId: number, requestId: number, lockToken: string, onResult: (err: any, statusCode: number, jobrequest: TaskAgentInterfaces.TaskAgentJobRequest) => void): void; - /** - * @param {number} poolId - * @param {number} messageId - * @param {string} sessionId - * @param onResult callback function - */ - deleteMessage(poolId: number, messageId: number, sessionId: string, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {number} poolId - * @param {string} sessionId - * @param {number} lastMessageId - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAgentMessage - */ - getMessage(poolId: number, sessionId: string, lastMessageId: number, onResult: (err: any, statusCode: number, message: TaskAgentInterfaces.TaskAgentMessage) => void): void; - /** - * @param {number} poolId - * @param {number} agentId - * @param onResult callback function - */ - refreshAgent(poolId: number, agentId: number, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {number} poolId - * @param onResult callback function - */ - refreshAgents(poolId: number, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {TaskAgentInterfaces.TaskAgentMessage} message - * @param {number} poolId - * @param {number} requestId - * @param onResult callback function - */ - sendMessage(message: TaskAgentInterfaces.TaskAgentMessage, poolId: number, requestId: number, onResult: (err: any, statusCode: number) => void): void; - /** - * This method can return packages/{packageType} -- package stream OR TaskPackageMetadata if requested for json - * - * @param {string} packageType - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskPackageMetadata - */ - getPackage(packageType: string, onResult: (err: any, statusCode: number, _package: TaskAgentInterfaces.TaskPackageMetadata) => void): void; - /** - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskPackageMetadata[] - */ - getPackages(onResult: (err: any, statusCode: number, packages: TaskAgentInterfaces.TaskPackageMetadata[]) => void): void; - /** - * This method can return packages/{packageType} -- package stream OR TaskPackageMetadata if requested for json - * - * @param {string} packageType - * @param onResult callback function with the resulting ArrayBuffer - */ - getPackageZip(packageType: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * @param {number} poolId - * @param onResult callback function with the resulting VSSInterfaces.IdentityRef[] - */ - getAgentPoolRoles(poolId: number, onResult: (err: any, statusCode: number, poolroles: VSSInterfaces.IdentityRef[]) => void): void; - /** - * @param {TaskAgentInterfaces.TaskAgentPool} pool - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAgentPool - */ - addAgentPool(pool: TaskAgentInterfaces.TaskAgentPool, onResult: (err: any, statusCode: number, pool: TaskAgentInterfaces.TaskAgentPool) => void): void; - /** - * @param {number} poolId - * @param onResult callback function - */ - deleteAgentPool(poolId: number, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {number} poolId - * @param {string[]} properties - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAgentPool - */ - getAgentPool(poolId: number, properties: string[], onResult: (err: any, statusCode: number, pool: TaskAgentInterfaces.TaskAgentPool) => void): void; - /** - * @param {string} poolName - * @param {string[]} properties - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAgentPool[] - */ - getAgentPools(poolName: string, properties: string[], onResult: (err: any, statusCode: number, pools: TaskAgentInterfaces.TaskAgentPool[]) => void): void; - /** - * @param {TaskAgentInterfaces.TaskAgentPool} pool - * @param {number} poolId - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAgentPool - */ - updateAgentPool(pool: TaskAgentInterfaces.TaskAgentPool, poolId: number, onResult: (err: any, statusCode: number, pool: TaskAgentInterfaces.TaskAgentPool) => void): void; - /** - * @param {number} queueId - * @param onResult callback function with the resulting VSSInterfaces.IdentityRef[] - */ - getAgentQueueRoles(queueId: number, onResult: (err: any, statusCode: number, queueroles: VSSInterfaces.IdentityRef[]) => void): void; - /** - * @param {TaskAgentInterfaces.TaskAgentQueue} queue - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAgentQueue - */ - addAgentQueue(queue: TaskAgentInterfaces.TaskAgentQueue, onResult: (err: any, statusCode: number, queue: TaskAgentInterfaces.TaskAgentQueue) => void): void; - /** - * @param {number} queueId - * @param onResult callback function - */ - deleteAgentQueue(queueId: number, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {number} queueId - * @param {TaskAgentInterfaces.TaskAgentQueueActionFilter} actionFilter - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAgentQueue - */ - getAgentQueue(queueId: number, actionFilter: TaskAgentInterfaces.TaskAgentQueueActionFilter, onResult: (err: any, statusCode: number, queue: TaskAgentInterfaces.TaskAgentQueue) => void): void; - /** - * @param {string} queueName - * @param {TaskAgentInterfaces.TaskAgentQueueActionFilter} actionFilter - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAgentQueue[] - */ - getAgentQueues(queueName: string, actionFilter: TaskAgentInterfaces.TaskAgentQueueActionFilter, onResult: (err: any, statusCode: number, queues: TaskAgentInterfaces.TaskAgentQueue[]) => void): void; - /** - * Proxy for a GET request defined by an service endpoint. The request is authorized using a data source in service endpoint. The response is filtered using an XPath/Json based selector. - * - * @param {TaskAgentInterfaces.DataSourceBinding} binding - Describes the data source to fetch. - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param onResult callback function with the resulting string[] - */ - queryServiceEndpoint(binding: TaskAgentInterfaces.DataSourceBinding, scopeIdentifier: string, onResult: (err: any, statusCode: number, serviceendpointproxy: string[]) => void): void; - /** - * @param {TaskAgentInterfaces.ServiceEndpoint} endpoint - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param onResult callback function with the resulting TaskAgentInterfaces.ServiceEndpoint - */ - createServiceEndpoint(endpoint: TaskAgentInterfaces.ServiceEndpoint, scopeIdentifier: string, onResult: (err: any, statusCode: number, serviceendpoint: TaskAgentInterfaces.ServiceEndpoint) => void): void; - /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} endpointId - * @param onResult callback function - */ - deleteServiceEndpoint(scopeIdentifier: string, endpointId: string, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} endpointId - * @param onResult callback function with the resulting TaskAgentInterfaces.ServiceEndpoint - */ - getServiceEndpointDetails(scopeIdentifier: string, endpointId: string, onResult: (err: any, statusCode: number, serviceendpoint: TaskAgentInterfaces.ServiceEndpoint) => void): void; - /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} type - * @param {string[]} authSchemes - * @param {string[]} endpointIds - * @param onResult callback function with the resulting TaskAgentInterfaces.ServiceEndpoint[] - */ - getServiceEndpoints(scopeIdentifier: string, type: string, authSchemes: string[], endpointIds: string[], onResult: (err: any, statusCode: number, serviceendpoints: TaskAgentInterfaces.ServiceEndpoint[]) => void): void; - /** - * @param {TaskAgentInterfaces.ServiceEndpoint} endpoint - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} endpointId - * @param onResult callback function with the resulting TaskAgentInterfaces.ServiceEndpoint - */ - updateServiceEndpoint(endpoint: TaskAgentInterfaces.ServiceEndpoint, scopeIdentifier: string, endpointId: string, onResult: (err: any, statusCode: number, serviceendpoint: TaskAgentInterfaces.ServiceEndpoint) => void): void; - /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} type - * @param {string} scheme - * @param onResult callback function with the resulting TaskAgentInterfaces.ServiceEndpointType[] - */ - getServiceEndpointTypes(scopeIdentifier: string, type: string, scheme: string, onResult: (err: any, statusCode: number, serviceendpointtypes: TaskAgentInterfaces.ServiceEndpointType[]) => void): void; - /** - * @param {TaskAgentInterfaces.TaskAgentSession} session - * @param {number} poolId - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAgentSession - */ - createAgentSession(session: TaskAgentInterfaces.TaskAgentSession, poolId: number, onResult: (err: any, statusCode: number, session: TaskAgentInterfaces.TaskAgentSession) => void): void; - /** - * @param {number} poolId - * @param {string} sessionId - * @param onResult callback function - */ - deleteAgentSession(poolId: number, sessionId: string, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {string} taskId - * @param onResult callback function - */ - deleteTaskDefinition(taskId: string, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {string} taskId - * @param {string} versionString - * @param {string[]} visibility - * @param {boolean} scopeLocal - * @param onResult callback function with the resulting ArrayBuffer - */ - getTaskContentZip(taskId: string, versionString: string, visibility: string[], scopeLocal: boolean, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * @param {string} taskId - * @param {string} versionString - * @param {string[]} visibility - * @param {boolean} scopeLocal - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskDefinition - */ - getTaskDefinition(taskId: string, versionString: string, visibility: string[], scopeLocal: boolean, onResult: (err: any, statusCode: number, task: TaskAgentInterfaces.TaskDefinition) => void): void; - /** - * @param {string} taskId - * @param {string[]} visibility - * @param {boolean} scopeLocal - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskDefinition[] - */ - getTaskDefinitions(taskId: string, visibility: string[], scopeLocal: boolean, onResult: (err: any, statusCode: number, tasks: TaskAgentInterfaces.TaskDefinition[]) => void): void; - /** - * @param {{ [key: string] : string; }} userCapabilities - * @param {number} poolId - * @param {number} agentId - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAgent - */ - updateAgentUserCapabilities(userCapabilities: { - [key: string]: string; - }, poolId: number, agentId: number, onResult: (err: any, statusCode: number, usercapabilitie: TaskAgentInterfaces.TaskAgent) => void): void; - } - export class QTaskAgentApiBase extends basem.QClientApiBase implements IQTaskAgentApiBase { - api: TaskAgentApiBase; - constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], api: typeof basem.ClientApiBase); - /** - * @param {TaskAgentInterfaces.TaskAgent} agent - * @param {number} poolId - */ - addAgent(agent: TaskAgentInterfaces.TaskAgent, poolId: number): Promise; - /** - * @param {number} poolId - * @param {number} agentId - */ - deleteAgent(poolId: number, agentId: number): Promise; - /** - * @param {number} poolId - * @param {number} agentId - * @param {boolean} includeCapabilities - * @param {boolean} includeAssignedRequest - * @param {string[]} propertyFilters - */ - getAgent(poolId: number, agentId: number, includeCapabilities?: boolean, includeAssignedRequest?: boolean, propertyFilters?: string[]): Promise; - /** - * @param {number} poolId - * @param {string} agentName - * @param {boolean} includeCapabilities - * @param {boolean} includeAssignedRequest - * @param {string[]} propertyFilters - * @param {string[]} demands - */ - getAgents(poolId: number, agentName?: string, includeCapabilities?: boolean, includeAssignedRequest?: boolean, propertyFilters?: string[], demands?: string[]): Promise; - /** - * @param {TaskAgentInterfaces.TaskAgent} agent - * @param {number} poolId - * @param {number} agentId - */ - replaceAgent(agent: TaskAgentInterfaces.TaskAgent, poolId: number, agentId: number): Promise; - /** - * @param {TaskAgentInterfaces.TaskAgent} agent - * @param {number} poolId - * @param {number} agentId - */ - updateAgent(agent: TaskAgentInterfaces.TaskAgent, poolId: number, agentId: number): Promise; - /** - * Proxy for a GET request defined by an 'endpoint'. The request is authorized using a service connection. The response is filtered using an XPath/Json based selector. - * - * @param {TaskAgentInterfaces.TaskDefinitionEndpoint} endpoint - Describes the URL to fetch. - */ - queryEndpoint(endpoint: TaskAgentInterfaces.TaskDefinitionEndpoint): Promise; - /** - * @param {number} poolId - * @param {number} requestId - * @param {string} lockToken - */ - deleteAgentRequest(poolId: number, requestId: number, lockToken: string): Promise; - /** - * @param {number} poolId - * @param {number} requestId - */ - getAgentRequest(poolId: number, requestId: number): Promise; - /** - * @param {number} poolId - * @param {number} agentId - * @param {number} completedRequestCount - */ - getAgentRequestsForAgent(poolId: number, agentId: number, completedRequestCount?: number): Promise; - /** - * @param {number} poolId - * @param {number[]} agentIds - * @param {number} completedRequestCount - */ - getAgentRequestsForAgents(poolId: number, agentIds: number[], completedRequestCount?: number): Promise; - /** - * @param {number} poolId - * @param {string} planId - * @param {string} jobId - */ - getAgentRequestsForPlan(poolId: number, planId: string, jobId?: string): Promise; - /** - * @param {TaskAgentInterfaces.TaskAgentJobRequest} request - * @param {number} poolId - */ - queueAgentRequest(request: TaskAgentInterfaces.TaskAgentJobRequest, poolId: number): Promise; - /** - * @param {TaskAgentInterfaces.TaskAgentJobRequest} request - * @param {number} poolId - * @param {number} requestId - * @param {string} lockToken - */ - updateAgentRequest(request: TaskAgentInterfaces.TaskAgentJobRequest, poolId: number, requestId: number, lockToken: string): Promise; - /** - * @param {number} poolId - * @param {number} messageId - * @param {string} sessionId - */ - deleteMessage(poolId: number, messageId: number, sessionId: string): Promise; - /** - * @param {number} poolId - * @param {string} sessionId - * @param {number} lastMessageId - */ - getMessage(poolId: number, sessionId: string, lastMessageId?: number): Promise; - /** - * @param {number} poolId - * @param {number} agentId - */ - refreshAgent(poolId: number, agentId: number): Promise; - /** - * @param {number} poolId - */ - refreshAgents(poolId: number): Promise; - /** - * @param {TaskAgentInterfaces.TaskAgentMessage} message - * @param {number} poolId - * @param {number} requestId - */ - sendMessage(message: TaskAgentInterfaces.TaskAgentMessage, poolId: number, requestId: number): Promise; - /** - * This method can return packages/{packageType} -- package stream OR TaskPackageMetadata if requested for json - * - * @param {string} packageType - */ - getPackage(packageType: string): Promise; - /** - */ - getPackages(): Promise; - /** - * This method can return packages/{packageType} -- package stream OR TaskPackageMetadata if requested for json - * - * @param {string} packageType - */ - getPackageZip(packageType: string): Promise; - /** - * @param {number} poolId - */ - getAgentPoolRoles(poolId?: number): Promise; - /** - * @param {TaskAgentInterfaces.TaskAgentPool} pool - */ - addAgentPool(pool: TaskAgentInterfaces.TaskAgentPool): Promise; - /** - * @param {number} poolId - */ - deleteAgentPool(poolId: number): Promise; - /** - * @param {number} poolId - * @param {string[]} properties - */ - getAgentPool(poolId: number, properties?: string[]): Promise; - /** - * @param {string} poolName - * @param {string[]} properties - */ - getAgentPools(poolName?: string, properties?: string[]): Promise; - /** - * @param {TaskAgentInterfaces.TaskAgentPool} pool - * @param {number} poolId - */ - updateAgentPool(pool: TaskAgentInterfaces.TaskAgentPool, poolId: number): Promise; - /** - * @param {number} queueId - */ - getAgentQueueRoles(queueId?: number): Promise; - /** - * @param {TaskAgentInterfaces.TaskAgentQueue} queue - */ - addAgentQueue(queue: TaskAgentInterfaces.TaskAgentQueue): Promise; - /** - * @param {number} queueId - */ - deleteAgentQueue(queueId: number): Promise; - /** - * @param {number} queueId - * @param {TaskAgentInterfaces.TaskAgentQueueActionFilter} actionFilter - */ - getAgentQueue(queueId: number, actionFilter?: TaskAgentInterfaces.TaskAgentQueueActionFilter): Promise; - /** - * @param {string} queueName - * @param {TaskAgentInterfaces.TaskAgentQueueActionFilter} actionFilter - */ - getAgentQueues(queueName?: string, actionFilter?: TaskAgentInterfaces.TaskAgentQueueActionFilter): Promise; - /** - * Proxy for a GET request defined by an service endpoint. The request is authorized using a data source in service endpoint. The response is filtered using an XPath/Json based selector. - * - * @param {TaskAgentInterfaces.DataSourceBinding} binding - Describes the data source to fetch. - * @param {string} scopeIdentifier - The project GUID to scope the request - */ - queryServiceEndpoint(binding: TaskAgentInterfaces.DataSourceBinding, scopeIdentifier: string): Promise; - /** - * @param {TaskAgentInterfaces.ServiceEndpoint} endpoint - * @param {string} scopeIdentifier - The project GUID to scope the request - */ - createServiceEndpoint(endpoint: TaskAgentInterfaces.ServiceEndpoint, scopeIdentifier: string): Promise; - /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} endpointId - */ - deleteServiceEndpoint(scopeIdentifier: string, endpointId: string): Promise; - /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} endpointId - */ - getServiceEndpointDetails(scopeIdentifier: string, endpointId: string): Promise; - /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} type - * @param {string[]} authSchemes - * @param {string[]} endpointIds - */ - getServiceEndpoints(scopeIdentifier: string, type?: string, authSchemes?: string[], endpointIds?: string[]): Promise; - /** - * @param {TaskAgentInterfaces.ServiceEndpoint} endpoint - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} endpointId - */ - updateServiceEndpoint(endpoint: TaskAgentInterfaces.ServiceEndpoint, scopeIdentifier: string, endpointId: string): Promise; - /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} type - * @param {string} scheme - */ - getServiceEndpointTypes(scopeIdentifier: string, type?: string, scheme?: string): Promise; - /** - * @param {TaskAgentInterfaces.TaskAgentSession} session - * @param {number} poolId - */ - createAgentSession(session: TaskAgentInterfaces.TaskAgentSession, poolId: number): Promise; - /** - * @param {number} poolId - * @param {string} sessionId - */ - deleteAgentSession(poolId: number, sessionId: string): Promise; - /** - * @param {string} taskId - */ - deleteTaskDefinition(taskId: string): Promise; - /** - * @param {string} taskId - * @param {string} versionString - * @param {string[]} visibility - * @param {boolean} scopeLocal - */ - getTaskContentZip(taskId: string, versionString: string, visibility?: string[], scopeLocal?: boolean): Promise; - /** - * @param {string} taskId - * @param {string} versionString - * @param {string[]} visibility - * @param {boolean} scopeLocal - */ - getTaskDefinition(taskId: string, versionString: string, visibility?: string[], scopeLocal?: boolean): Promise; - /** - * @param {string} taskId - * @param {string[]} visibility - * @param {boolean} scopeLocal - */ - getTaskDefinitions(taskId?: string, visibility?: string[], scopeLocal?: boolean): Promise; - /** - * @param {{ [key: string] : string; }} userCapabilities - * @param {number} poolId - * @param {number} agentId - */ - updateAgentUserCapabilities(userCapabilities: { - [key: string]: string; - }, poolId: number, agentId: number): Promise; - } - -} -declare module 'vso-node-api/TaskAgentApi' { - import taskagentbasem = require('vso-node-api/TaskAgentApiBase'); - - import TaskAgentInterfaces = require('vso-node-api/interfaces/TaskAgentInterfaces'); - import VsoBaseInterfaces = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); - export interface ITaskAgentApi extends taskagentbasem.ITaskAgentApiBase { - uploadTaskDefinition(customHeaders: VsoBaseInterfaces.IHeaders, contentStream: NodeJS.ReadableStream, taskId: string, overwrite: boolean, onResult: (err: any, statusCode: number, obj: any) => void): void; - } - export interface IQTaskAgentApi extends taskagentbasem.IQTaskAgentApiBase { - uploadTaskDefinition(customHeaders: VsoBaseInterfaces.IHeaders, contentStream: NodeJS.ReadableStream, taskId: string, overwrite: boolean): Promise; - } - export class TaskAgentApi extends taskagentbasem.TaskAgentApiBase implements ITaskAgentApi { - private _handlers; - private _fallbackClient; - constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); - /** - * @param {string} taskId - * @param onResult callback function - */ - deleteTaskDefinition(taskId: string, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {string} taskId - * @param {string} versionString - * @param {string[]} visibility - * @param {boolean} scopeLocal - * @param onResult callback function with the resulting ArrayBuffer - */ - getTaskContentZip(taskId: string, versionString: string, visibility: string[], scopeLocal: boolean, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * @param {string} taskId - * @param {string} versionString - * @param {string[]} visibility - * @param {boolean} scopeLocal - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskDefinition - */ - getTaskDefinition(taskId: string, versionString: string, visibility: string[], scopeLocal: boolean, onResult: (err: any, statusCode: number, task: TaskAgentInterfaces.TaskDefinition) => void): void; - /** - * @param {string} taskId - * @param {string[]} visibility - * @param {boolean} scopeLocal - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskDefinition[] - */ - getTaskDefinitions(taskId: string, visibility: string[], scopeLocal: boolean, onResult: (err: any, statusCode: number, tasks: TaskAgentInterfaces.TaskDefinition[]) => void): void; - /** - * @param {NodeJS.ReadableStream} contentStream - * @param {string} taskId - * @param {boolean} overwrite - * @param onResult callback function - */ - uploadTaskDefinition(customHeaders: VsoBaseInterfaces.IHeaders, contentStream: NodeJS.ReadableStream, taskId: string, overwrite: boolean, onResult: (err: any, statusCode: number, obj: any) => void): void; - /** - * @param {NodeJS.ReadableStream} contentStream - * @param {string} taskId - * @param {boolean} overwrite - * @param onResult callback function - */ - private _uploadTaskDefinition(customHeaders, contentStream, taskId, overwrite, onResult); - private _getFallbackClient(baseUrl); - private _getAccountUrl(collectionUrl); - } - export class QTaskAgentApi extends taskagentbasem.QTaskAgentApiBase implements IQTaskAgentApi { - api: TaskAgentApi; - constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); - /** - * @param {NodeJS.ReadableStream} contentStream - * @param {string} taskId - * @param {boolean} overwrite - */ - uploadTaskDefinition(customHeaders: VsoBaseInterfaces.IHeaders, contentStream: NodeJS.ReadableStream, taskId: string, overwrite: boolean): Promise; - } - -} -declare module 'vso-node-api/TaskApi' { - - - import Q = require('q'); - import basem = require('vso-node-api/ClientApiBases'); - import VsoBaseInterfaces = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); - import TaskAgentInterfaces = require('vso-node-api/interfaces/TaskAgentInterfaces'); - import VSSInterfaces = require('vso-node-api/interfaces/common/VSSInterfaces'); - export interface ITaskApi extends basem.ClientApiBase { - getPlanAttachments(scopeIdentifier: string, hubName: string, planId: string, type: string, onResult: (err: any, statusCode: number, attachments: TaskAgentInterfaces.TaskAttachment[]) => void): void; - createAttachment(customHeaders: any, contentStream: NodeJS.ReadableStream, scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string, name: string, onResult: (err: any, statusCode: number, attachment: TaskAgentInterfaces.TaskAttachment) => void): void; - getAttachment(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string, name: string, onResult: (err: any, statusCode: number, attachment: TaskAgentInterfaces.TaskAttachment) => void): void; - getAttachmentContent(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string, name: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - getAttachments(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string, onResult: (err: any, statusCode: number, attachments: TaskAgentInterfaces.TaskAttachment[]) => void): void; - appendTimelineRecordFeed(lines: VSSInterfaces.VssJsonCollectionWrapperV, scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, onResult: (err: any, statusCode: number) => void): void; - appendLogContent(customHeaders: any, contentStream: NodeJS.ReadableStream, scopeIdentifier: string, hubName: string, planId: string, logId: number, onResult: (err: any, statusCode: number, log: TaskAgentInterfaces.TaskLog) => void): void; - createLog(log: TaskAgentInterfaces.TaskLog, scopeIdentifier: string, hubName: string, planId: string, onResult: (err: any, statusCode: number, log: TaskAgentInterfaces.TaskLog) => void): void; - getLog(scopeIdentifier: string, hubName: string, planId: string, logId: number, startLine: number, endLine: number, onResult: (err: any, statusCode: number, logs: string[]) => void): void; - getLogs(scopeIdentifier: string, hubName: string, planId: string, onResult: (err: any, statusCode: number, logs: TaskAgentInterfaces.TaskLog[]) => void): void; - getPlan(scopeIdentifier: string, hubName: string, planId: string, onResult: (err: any, statusCode: number, plan: TaskAgentInterfaces.TaskOrchestrationPlan) => void): void; - getRecords(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, changeId: number, onResult: (err: any, statusCode: number, records: TaskAgentInterfaces.TimelineRecord[]) => void): void; - updateRecords(records: VSSInterfaces.VssJsonCollectionWrapperV, scopeIdentifier: string, hubName: string, planId: string, timelineId: string, onResult: (err: any, statusCode: number, record: TaskAgentInterfaces.TimelineRecord[]) => void): void; - createTimeline(timeline: TaskAgentInterfaces.Timeline, scopeIdentifier: string, hubName: string, planId: string, onResult: (err: any, statusCode: number, timeline: TaskAgentInterfaces.Timeline) => void): void; - deleteTimeline(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, onResult: (err: any, statusCode: number) => void): void; - getTimeline(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, changeId: number, includeRecords: boolean, onResult: (err: any, statusCode: number, timeline: TaskAgentInterfaces.Timeline) => void): void; - getTimelines(scopeIdentifier: string, hubName: string, planId: string, onResult: (err: any, statusCode: number, timelines: TaskAgentInterfaces.Timeline[]) => void): void; - } - export interface IQTaskApi extends basem.QClientApiBase { - getPlanAttachments(scopeIdentifier: string, hubName: string, planId: string, type: string): Promise; - createAttachment(customHeaders: any, contentStream: NodeJS.ReadableStream, scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string, name: string): Promise; - getAttachment(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string, name: string): Promise; - getAttachmentContent(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string, name: string): Promise; - getAttachments(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string): Promise; - appendTimelineRecordFeed(lines: VSSInterfaces.VssJsonCollectionWrapperV, scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string): Promise; - appendLogContent(customHeaders: any, contentStream: NodeJS.ReadableStream, scopeIdentifier: string, hubName: string, planId: string, logId: number): Promise; - createLog(log: TaskAgentInterfaces.TaskLog, scopeIdentifier: string, hubName: string, planId: string): Promise; - getLog(scopeIdentifier: string, hubName: string, planId: string, logId: number, startLine?: number, endLine?: number): Promise; - getLogs(scopeIdentifier: string, hubName: string, planId: string): Promise; - getPlan(scopeIdentifier: string, hubName: string, planId: string): Promise; - getRecords(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, changeId?: number): Promise; - updateRecords(records: VSSInterfaces.VssJsonCollectionWrapperV, scopeIdentifier: string, hubName: string, planId: string, timelineId: string): Promise; - createTimeline(timeline: TaskAgentInterfaces.Timeline, scopeIdentifier: string, hubName: string, planId: string): Promise; - deleteTimeline(scopeIdentifier: string, hubName: string, planId: string, timelineId: string): Promise; - getTimeline(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, changeId?: number, includeRecords?: boolean): Promise; - getTimelines(scopeIdentifier: string, hubName: string, planId: string): Promise; - } - export class TaskApi extends basem.ClientApiBase implements ITaskApi { - constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); - /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - * @param {string} type - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAttachment[] - */ - getPlanAttachments(scopeIdentifier: string, hubName: string, planId: string, type: string, onResult: (err: any, statusCode: number, attachments: TaskAgentInterfaces.TaskAttachment[]) => void): void; - /** - * @param {NodeJS.ReadableStream} contentStream - Content to upload - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - * @param {string} timelineId - * @param {string} recordId - * @param {string} type - * @param {string} name - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAttachment - */ - createAttachment(customHeaders: VsoBaseInterfaces.IHeaders, contentStream: NodeJS.ReadableStream, scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string, name: string, onResult: (err: any, statusCode: number, attachment: TaskAgentInterfaces.TaskAttachment) => void): void; - /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - * @param {string} timelineId - * @param {string} recordId - * @param {string} type - * @param {string} name - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAttachment - */ - getAttachment(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string, name: string, onResult: (err: any, statusCode: number, attachment: TaskAgentInterfaces.TaskAttachment) => void): void; - /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - * @param {string} timelineId - * @param {string} recordId - * @param {string} type - * @param {string} name - * @param onResult callback function with the resulting ArrayBuffer - */ - getAttachmentContent(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string, name: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - * @param {string} timelineId - * @param {string} recordId - * @param {string} type - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskAttachment[] - */ - getAttachments(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string, onResult: (err: any, statusCode: number, attachments: TaskAgentInterfaces.TaskAttachment[]) => void): void; - /** - * @param {VSSInterfaces.VssJsonCollectionWrapperV} lines - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - * @param {string} timelineId - * @param {string} recordId - * @param onResult callback function - */ - appendTimelineRecordFeed(lines: VSSInterfaces.VssJsonCollectionWrapperV, scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {NodeJS.ReadableStream} contentStream - Content to upload - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - * @param {number} logId - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskLog - */ - appendLogContent(customHeaders: VsoBaseInterfaces.IHeaders, contentStream: NodeJS.ReadableStream, scopeIdentifier: string, hubName: string, planId: string, logId: number, onResult: (err: any, statusCode: number, log: TaskAgentInterfaces.TaskLog) => void): void; - /** - * @param {TaskAgentInterfaces.TaskLog} log - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskLog - */ - createLog(log: TaskAgentInterfaces.TaskLog, scopeIdentifier: string, hubName: string, planId: string, onResult: (err: any, statusCode: number, log: TaskAgentInterfaces.TaskLog) => void): void; - /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - * @param {number} logId - * @param {number} startLine - * @param {number} endLine - * @param onResult callback function with the resulting string[] - */ - getLog(scopeIdentifier: string, hubName: string, planId: string, logId: number, startLine: number, endLine: number, onResult: (err: any, statusCode: number, logs: string[]) => void): void; - /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskLog[] - */ - getLogs(scopeIdentifier: string, hubName: string, planId: string, onResult: (err: any, statusCode: number, logs: TaskAgentInterfaces.TaskLog[]) => void): void; - /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - * @param onResult callback function with the resulting TaskAgentInterfaces.TaskOrchestrationPlan - */ - getPlan(scopeIdentifier: string, hubName: string, planId: string, onResult: (err: any, statusCode: number, plan: TaskAgentInterfaces.TaskOrchestrationPlan) => void): void; - /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - * @param {string} timelineId - * @param {number} changeId - * @param onResult callback function with the resulting TaskAgentInterfaces.TimelineRecord[] - */ - getRecords(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, changeId: number, onResult: (err: any, statusCode: number, records: TaskAgentInterfaces.TimelineRecord[]) => void): void; - /** - * @param {VSSInterfaces.VssJsonCollectionWrapperV} records - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - * @param {string} timelineId - * @param onResult callback function with the resulting TaskAgentInterfaces.TimelineRecord[] - */ - updateRecords(records: VSSInterfaces.VssJsonCollectionWrapperV, scopeIdentifier: string, hubName: string, planId: string, timelineId: string, onResult: (err: any, statusCode: number, record: TaskAgentInterfaces.TimelineRecord[]) => void): void; - /** - * @param {TaskAgentInterfaces.Timeline} timeline - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - * @param onResult callback function with the resulting TaskAgentInterfaces.Timeline - */ - createTimeline(timeline: TaskAgentInterfaces.Timeline, scopeIdentifier: string, hubName: string, planId: string, onResult: (err: any, statusCode: number, timeline: TaskAgentInterfaces.Timeline) => void): void; - /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - * @param {string} timelineId - * @param onResult callback function - */ - deleteTimeline(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - * @param {string} timelineId - * @param {number} changeId - * @param {boolean} includeRecords - * @param onResult callback function with the resulting TaskAgentInterfaces.Timeline - */ - getTimeline(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, changeId: number, includeRecords: boolean, onResult: (err: any, statusCode: number, timeline: TaskAgentInterfaces.Timeline) => void): void; - /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - * @param onResult callback function with the resulting TaskAgentInterfaces.Timeline[] - */ - getTimelines(scopeIdentifier: string, hubName: string, planId: string, onResult: (err: any, statusCode: number, timelines: TaskAgentInterfaces.Timeline[]) => void): void; - } - export class QTaskApi extends basem.QClientApiBase implements IQTaskApi { - api: TaskApi; - constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); - /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - * @param {string} type - */ - getPlanAttachments(scopeIdentifier: string, hubName: string, planId: string, type: string): Promise; - /** - * @param {NodeJS.ReadableStream} contentStream - Content to upload - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - * @param {string} timelineId - * @param {string} recordId - * @param {string} type - * @param {string} name - */ - createAttachment(customHeaders: any, contentStream: NodeJS.ReadableStream, scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string, name: string): Promise; - /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - * @param {string} timelineId - * @param {string} recordId - * @param {string} type - * @param {string} name - */ - getAttachment(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string, name: string): Promise; - /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - * @param {string} timelineId - * @param {string} recordId - * @param {string} type - * @param {string} name - */ - getAttachmentContent(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string, name: string): Promise; - /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - * @param {string} timelineId - * @param {string} recordId - * @param {string} type - */ - getAttachments(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string): Promise; - /** - * @param {VSSInterfaces.VssJsonCollectionWrapperV} lines - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - * @param {string} timelineId - * @param {string} recordId - */ - appendTimelineRecordFeed(lines: VSSInterfaces.VssJsonCollectionWrapperV, scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string): Promise; - /** - * @param {NodeJS.ReadableStream} contentStream - Content to upload - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - * @param {number} logId - */ - appendLogContent(customHeaders: any, contentStream: NodeJS.ReadableStream, scopeIdentifier: string, hubName: string, planId: string, logId: number): Promise; - /** - * @param {TaskAgentInterfaces.TaskLog} log - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - */ - createLog(log: TaskAgentInterfaces.TaskLog, scopeIdentifier: string, hubName: string, planId: string): Promise; - /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - * @param {number} logId - * @param {number} startLine - * @param {number} endLine - */ - getLog(scopeIdentifier: string, hubName: string, planId: string, logId: number, startLine?: number, endLine?: number): Promise; - /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - */ - getLogs(scopeIdentifier: string, hubName: string, planId: string): Promise; - /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - */ - getPlan(scopeIdentifier: string, hubName: string, planId: string): Promise; - /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - * @param {string} timelineId - * @param {number} changeId - */ - getRecords(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, changeId?: number): Promise; - /** - * @param {VSSInterfaces.VssJsonCollectionWrapperV} records - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - * @param {string} timelineId - */ - updateRecords(records: VSSInterfaces.VssJsonCollectionWrapperV, scopeIdentifier: string, hubName: string, planId: string, timelineId: string): Promise; - /** - * @param {TaskAgentInterfaces.Timeline} timeline - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - */ - createTimeline(timeline: TaskAgentInterfaces.Timeline, scopeIdentifier: string, hubName: string, planId: string): Promise; - /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - * @param {string} timelineId - */ - deleteTimeline(scopeIdentifier: string, hubName: string, planId: string, timelineId: string): Promise; - /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - * @param {string} timelineId - * @param {number} changeId - * @param {boolean} includeRecords - */ - getTimeline(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, changeId?: number, includeRecords?: boolean): Promise; - /** - * @param {string} scopeIdentifier - The project GUID to scope the request - * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server - * @param {string} planId - */ - getTimelines(scopeIdentifier: string, hubName: string, planId: string): Promise; - } - -} -declare module 'vso-node-api/interfaces/TestInterfaces' { - import TfsCoreInterfaces = require('vso-node-api/interfaces/CoreInterfaces'); - import VSSInterfaces = require('vso-node-api/interfaces/common/VSSInterfaces'); - export interface AggregatedDataForResultTrend { - /** - * This is tests execution duration. - */ - duration: any; - resultsByOutcome: { - [key: number]: AggregatedResultsByOutcome; - }; - testResultsContext: TestResultsContext; - } - export interface AggregatedResultsAnalysis { - duration: any; - previousContext: TestResultsContext; - resultsByOutcome: { - [key: number]: AggregatedResultsByOutcome; - }; - resultsDifference: AggregatedResultsDifference; - totalTests: number; - } - export interface AggregatedResultsByOutcome { - count: number; - duration: any; - outcome: TestOutcome; - } - export interface AggregatedResultsDifference { - increaseInDuration: any; - increaseInFailures: number; - increaseInPassedTests: number; - increaseInTotalTests: number; - } - export enum AttachmentType { - GeneralAttachment = 0, - AfnStrip = 1, - BugFilingData = 2, - CodeCoverage = 3, - IntermediateCollectorData = 4, - RunConfig = 5, - TestImpactDetails = 6, - TmiTestRunDeploymentFiles = 7, - TmiTestRunReverseDeploymentFiles = 8, - TmiTestResultDetail = 9, - TmiTestRunSummary = 10, - } - export interface BatchResponse { - error: string; - responses: Response[]; - status: string; - } - export interface BuildConfiguration { - branchName: string; - buildDefinitionId: number; - flavor: string; - id: number; - number: string; - platform: string; - project: ShallowReference; - repositoryId: number; - sourceVersion: string; - uri: string; - } - export interface BuildCoverage { - codeCoverageFileUrl: string; - configuration: BuildConfiguration; - lastError: string; - modules: ModuleCoverage[]; - state: string; - } - export interface BuildReference { - branchName: string; - buildSystem: string; - definitionId: number; - id: number; - number: string; - uri: string; - } - export interface CloneOperationInformation { - cloneStatistics: CloneStatistics; - /** - * If the operation is complete, the DateTime of completion. If operation is not complete, this is DateTime.MaxValue - */ - completionDate: Date; - /** - * DateTime when the operation was started - */ - creationDate: Date; - /** - * Shallow reference of the destination - */ - destinationObject: ShallowReference; - /** - * Shallow reference of the destination - */ - destinationPlan: ShallowReference; - /** - * Shallow reference of the destination - */ - destinationProject: ShallowReference; - /** - * If the operation has Failed, Message contains the reason for failure. Null otherwise. - */ - message: string; - /** - * The ID of the operation - */ - opId: number; - /** - * The type of the object generated as a result of the Clone operation - */ - resultObjectType: ResultObjectType; - /** - * Shallow reference of the source - */ - sourceObject: ShallowReference; - /** - * Shallow reference of the source - */ - sourcePlan: ShallowReference; - /** - * Shallow reference of the source - */ - sourceProject: ShallowReference; - /** - * Current state of the operation. When State reaches Suceeded or Failed, the operation is complete - */ - state: CloneOperationState; - /** - * Url for geting the clone information - */ - url: string; - } - export enum CloneOperationState { - Failed = 2, - InProgress = 1, - Queued = 0, - Succeeded = 3, - } - export interface CloneOptions { - /** - * If set to true requirements will be cloned - */ - cloneRequirements: boolean; - /** - * copy all suites from a source plan - */ - copyAllSuites: boolean; - /** - * copy ancestor hieracrchy - */ - copyAncestorHierarchy: boolean; - /** - * Name of the workitem type of the clone - */ - destinationWorkItemType: string; - /** - * Key value pairs where the key value is overridden by the value. - */ - overrideParameters: { - [key: string]: string; - }; - /** - * Comment on the link that will link the new clone test case to the original Set null for no comment - */ - relatedLinkComment: string; - } - export interface CloneStatistics { - /** - * Number of Requirments cloned so far. - */ - clonedRequirementsCount: number; - /** - * Number of shared steps cloned so far. - */ - clonedSharedStepsCount: number; - /** - * Number of test cases cloned so far - */ - clonedTestCasesCount: number; - /** - * Total number of requirements to be cloned - */ - totalRequirementsCount: number; - /** - * Total number of test cases to be cloned - */ - totalTestCasesCount: number; - } - /** - * Represents the build configuration (platform, flavor) and coverage data for the build - */ - export interface CodeCoverageData { - /** - * Flavor of build for which data is retrieved/published - */ - buildFlavor: string; - /** - * Platform of build for which data is retrieved/published - */ - buildPlatform: string; - /** - * List of coverage data for the build - */ - coverageStats: CodeCoverageStatistics[]; - } - /** - * Represents the code coverage statistics for a particular coverage label (modules, statements, blocks, etc.) - */ - export interface CodeCoverageStatistics { - /** - * Covered units - */ - covered: number; - /** - * Delta of coverage - */ - delta: number; - /** - * Is delta valid - */ - isDeltaAvailable: boolean; - /** - * Label of coverage data ("Blocks", "Statements", "Modules", etc.) - */ - label: string; - /** - * Position of label - */ - position: number; - /** - * Total units - */ - total: number; - } - /** - * Represents the code coverage summary results Used to publish or retrieve code coverage summary against a build - */ - export interface CodeCoverageSummary { - /** - * Uri of build for which data is retrieved/published - */ - build: ShallowReference; - /** - * List of coverage data and details for the build - */ - coverageData: CodeCoverageData[]; - /** - * Uri of build against which difference in coverage is computed - */ - deltaBuild: ShallowReference; - } - export enum CoverageQueryFlags { - /** - * If set, the Coverage.Modules property will be populated. - */ - Modules = 1, - /** - * If set, the ModuleCoverage.Functions properties will be populated. - */ - Functions = 2, - /** - * If set, the ModuleCoverage.CoverageData field will be populated. - */ - BlockData = 4, - } - export interface CoverageStatistics { - blocksCovered: number; - blocksNotCovered: number; - linesCovered: number; - linesNotCovered: number; - linesPartiallyCovered: number; - } - export interface CustomTestField { - fieldName: string; - value: any; - } - export interface CustomTestFieldDefinition { - fieldId: number; - fieldName: string; - fieldType: CustomTestFieldType; - scope: CustomTestFieldScope; - } - export enum CustomTestFieldScope { - None = 0, - TestRun = 1, - TestResult = 2, - System = 4, - All = 7, - } - export enum CustomTestFieldType { - Bit = 2, - DateTime = 4, - Int = 8, - Float = 6, - String = 12, - Guid = 14, - } - /** - * This is a temporary class to provide the details for the test run environment. - */ - export interface DtlEnvironmentDetails { - csmContent: string; - csmParameters: string; - subscriptionName: string; - } - export interface FailingSince { - build: BuildReference; - date: Date; - release: ReleaseReference; - } - export interface FunctionCoverage { - class: string; - name: string; - namespace: string; - sourceFile: string; - statistics: CoverageStatistics; - } - export enum GroupTestResultsBy { - None = 0, - AutomatedTestStorage = 1, - } - export interface LastResultDetails { - dateCompleted: Date; - duration: number; - runBy: VSSInterfaces.IdentityRef; - } - export interface ModuleCoverage { - blockCount: number; - blockData: number[]; - functions: FunctionCoverage[]; - name: string; - signature: string; - signatureAge: number; - statistics: CoverageStatistics; - } - export interface NameValuePair { - name: string; - value: string; - } - export interface PlanUpdateModel { - area: ShallowReference; - automatedTestEnvironment: TestEnvironment; - automatedTestSettings: TestSettings; - build: ShallowReference; - configurationIds: number[]; - description: string; - endDate: string; - iteration: string; - manualTestEnvironment: TestEnvironment; - manualTestSettings: TestSettings; - name: string; - owner: VSSInterfaces.IdentityRef; - startDate: string; - state: string; - status: string; - } - export interface PointAssignment { - configuration: ShallowReference; - tester: VSSInterfaces.IdentityRef; - } - export interface PointUpdateModel { - } - export interface PointWorkItemProperty { - workItem: { - key: string; - value: any; - }; - } - export interface QueryModel { - query: string; - } - export interface ReleaseReference { - definitionId: number; - environmentDefinitionId: number; - environmentId: number; - id: number; - } - export interface Response { - error: string; - id: string; - status: string; - url: string; - } - export enum ResultDetails { - None = 0, - Iterations = 1, - WorkItems = 2, - } - export enum ResultObjectType { - TestSuite = 0, - TestPlan = 1, - } - export enum ResultOutcome { - Pass = 1, - Fail = 2, - Pending = 3, - } - export interface ResultRetentionSettings { - automatedResultsRetentionDuration: number; - lastUpdatedBy: VSSInterfaces.IdentityRef; - lastUpdatedDate: Date; - manualResultsRetentionDuration: number; - } - export interface ResultUpdateRequestModel { - actionResultDeletes: TestActionResultModel[]; - actionResults: TestActionResultModel[]; - parameterDeletes: TestResultParameterModel[]; - parameters: TestResultParameterModel[]; - testCaseResult: TestCaseResultUpdateModel; - } - export interface ResultUpdateResponseModel { - revision: number; - } - export interface RunCreateModel { - automated: boolean; - build: ShallowReference; - buildDropLocation: string; - buildFlavor: string; - buildPlatform: string; - comment: string; - completeDate: string; - configurationIds: number[]; - controller: string; - customTestFields: CustomTestField[]; - dtlAutEnvironment: ShallowReference; - dtlTestEnvironment: ShallowReference; - dueDate: string; - environmentDetails: DtlEnvironmentDetails; - errorMessage: string; - filter: RunFilter; - iteration: string; - name: string; - owner: VSSInterfaces.IdentityRef; - plan: ShallowReference; - pointIds: number[]; - releaseEnvironmentUri: string; - releaseUri: string; - runTimeout: any; - sourceWorkflow: string; - startDate: string; - state: string; - testConfigurationsMapping: string; - testEnvironmentId: string; - testSettings: ShallowReference; - type: string; - } - /** - * This class is used to provide the filters used for discovery - */ - export interface RunFilter { - /** - * filter for the test case sources (test containers) - */ - sourceFilter: string; - /** - * filter for the test cases - */ - testCaseFilter: string; - } - export interface RunStatistic { - count: number; - outcome: string; - resolutionState: TestResolutionState; - state: string; - } - export interface RunUpdateModel { - build: ShallowReference; - comment: string; - completedDate: string; - controller: string; - deleteInProgressResults: boolean; - dtlAutEnvironment: ShallowReference; - dtlEnvironment: ShallowReference; - dtlEnvironmentDetails: DtlEnvironmentDetails; - dueDate: string; - errorMessage: string; - iteration: string; - logEntries: TestMessageLogDetails[]; - name: string; - startedDate: string; - state: string; - substate: TestRunSubstate; - testEnvironmentId: string; - testSettings: ShallowReference; - } - /** - * An abstracted reference to some other resource. This class is used to provide the build data contracts with a uniform way to reference other resources in a way that provides easy traversal through links. - */ - export interface ShallowReference { - /** - * Id of the resource - */ - id: string; - /** - * Name of the linked resource (definition name, controller name, etc.) - */ - name: string; - /** - * Full http link to the resource - */ - url: string; - } - export interface SharedStepModel { - id: number; - revision: number; - } - export interface SuiteCreateModel { - } - export interface SuiteTestCase { - pointAssignments: PointAssignment[]; - testCase: WorkItemReference; - } - export interface SuiteUpdateModel { - } - export interface TestActionResultModel extends TestResultModelBase { - actionPath: string; - iterationId: number; - sharedStepModel: SharedStepModel; - url: string; - } - export interface TestAttachmentReference { - id: number; - url: string; - } - export interface TestAttachmentRequestModel { - attachmentType: string; - comment: string; - fileName: string; - stream: string; - } - export interface TestCaseResult { - afnStripId: number; - area: ShallowReference; - associatedBugs: ShallowReference[]; - automatedTestId: string; - automatedTestName: string; - automatedTestStorage: string; - automatedTestType: string; - automatedTestTypeId: string; - build: ShallowReference; - buildReference: BuildReference; - comment: string; - completedDate: Date; - computerName: string; - configuration: ShallowReference; - createdDate: Date; - customFields: CustomTestField[]; - durationInMs: number; - errorMessage: string; - failingSince: FailingSince; - failureType: string; - id: number; - iterationDetails: TestIterationDetailsModel[]; - lastUpdatedBy: VSSInterfaces.IdentityRef; - lastUpdatedDate: Date; - outcome: string; - owner: VSSInterfaces.IdentityRef; - priority: number; - project: ShallowReference; - releaseReference: ReleaseReference; - resetCount: number; - resolutionState: string; - resolutionStateId: number; - revision: number; - runBy: VSSInterfaces.IdentityRef; - stackTrace: string; - startedDate: Date; - state: string; - testCase: ShallowReference; - testCaseTitle: string; - testPoint: ShallowReference; - testRun: ShallowReference; - url: string; - } - export interface TestCaseResult2 { - componentId: string; - custom: any; - endTime: Date; - exceptionStack: string; - externalArtifacts: string[]; - externalRunId: string; - externalSystem: string; - externalTestId: string; - failureReasons: string[]; - failureSummary: string; - investigationNotes: string; - isSuperseded: boolean; - isValid: boolean; - outcome: ResultOutcome; - resultCustomPropertiesTypeName: string; - resultId: string; - resultName: string; - runId: string; - startTime: Date; - testId: string; - tfsSecurityKey: string; - } - export interface TestCaseResultAttachmentModel { - id: number; - iterationId: number; - name: string; - size: number; - url: string; - } - export interface TestCaseResultIdentifier { - testResultId: number; - testRunId: number; - } - export interface TestCaseResultUpdateModel { - associatedWorkItems: number[]; - automatedTestTypeId: string; - comment: string; - completedDate: string; - computerName: string; - customFields: CustomTestField[]; - durationInMs: string; - errorMessage: string; - failureType: string; - outcome: string; - owner: VSSInterfaces.IdentityRef; - resolutionState: string; - runBy: VSSInterfaces.IdentityRef; - stackTrace: string; - startedDate: string; - state: string; - testCasePriority: string; - testResult: ShallowReference; - } - export interface TestConfiguration { - /** - * Area of the configuration - */ - area: ShallowReference; - /** - * Description of the configuration - */ - description: string; - /** - * Id of the configuration - */ - id: number; - /** - * Is the configuration a default for the test plans - */ - isDefault: boolean; - /** - * Last Updated By Reference - */ - lastUpdatedBy: VSSInterfaces.IdentityRef; - /** - * Last Updated Data - */ - lastUpdatedDate: Date; - /** - * Name of the configuration - */ - name: string; - /** - * Project to which the configuration belongs - */ - project: ShallowReference; - /** - * Revision of the the configuration - */ - revision: number; - /** - * State of the configuration - */ - state: TestConfigurationState; - /** - * Url of Configuration Resource - */ - url: string; - /** - * Dictionary of Test Variable, Selected Value - */ - values: NameValuePair[]; - } - export enum TestConfigurationState { - /** - * The configuration can be used for new test runs. - */ - Active = 1, - /** - * The configuration has been retired and should not be used for new test runs. - */ - Inactive = 2, - } - export interface TestEnvironment { - environmentId: string; - environmentName: string; - } - export interface TestFailureDetails { - count: number; - testResults: ShallowReference[]; - } - export interface TestFailuresAnalysis { - existingFailures: TestFailureDetails; - fixedTests: TestFailureDetails; - newFailures: TestFailureDetails; - previousContext: TestResultsContext; - } - export interface TestIterationDetailsModel { - actionResults: TestActionResultModel[]; - attachments: TestCaseResultAttachmentModel[]; - comment: string; - completedDate: Date; - durationInMs: number; - errorMessage: string; - id: number; - outcome: string; - parameters: TestResultParameterModel[]; - startedDate: Date; - url: string; - } - /** - * An abstracted reference to some other resource. This class is used to provide the build data contracts with a uniform way to reference other resources in a way that provides easy traversal through links. - */ - export interface TestMessageLogDetails { - /** - * Date when the resource is created - */ - dateCreated: Date; - /** - * Id of the resource - */ - entryId: number; - /** - * Message of the resource - */ - message: string; - } - export enum TestOutcome { - /** - * Only used during an update to preserve the existing value. - */ - Unspecified = 0, - /** - * Test has not been completed, or the test type does not report pass/failure. - */ - None = 1, - /** - * Test was executed w/o any issues. - */ - Passed = 2, - /** - * Test was executed, but there were issues. Issues may involve exceptions or failed assertions. - */ - Failed = 3, - /** - * Test has completed, but we can't say if it passed or failed. May be used for aborted tests... - */ - Inconclusive = 4, - /** - * The test timed out - */ - Timeout = 5, - /** - * Test was aborted. This was not caused by a user gesture, but rather by a framework decision. - */ - Aborted = 6, - /** - * Test had it chance for been executed but was not, as ITestElement.IsRunnable == false. - */ - Blocked = 7, - /** - * Test was not executed. This was caused by a user gesture - e.g. user hit stop button. - */ - NotExecuted = 8, - /** - * To be used by Run level results. This is not a failure. - */ - Warning = 9, - /** - * There was a system error while we were trying to execute a test. - */ - Error = 10, - /** - * Test is Not Applicable for execution. - */ - NotApplicable = 11, - /** - * Test is paused. - */ - Paused = 12, - /** - * Test is currently executing. Added this for TCM charts - */ - InProgress = 13, - MaxValue = 13, - } - export interface TestPlan { - area: ShallowReference; - automatedTestEnvironment: TestEnvironment; - automatedTestSettings: TestSettings; - build: ShallowReference; - clientUrl: string; - description: string; - endDate: Date; - id: number; - iteration: string; - manualTestEnvironment: TestEnvironment; - manualTestSettings: TestSettings; - name: string; - owner: VSSInterfaces.IdentityRef; - previousBuild: ShallowReference; - project: ShallowReference; - revision: number; - rootSuite: ShallowReference; - startDate: Date; - state: string; - updatedBy: VSSInterfaces.IdentityRef; - updatedDate: Date; - url: string; - } - export interface TestPlanCloneRequest { - cloneOptions: CloneOptions; - destinationTestPlan: TestPlan; - suiteIds: number[]; - } - export interface TestPlansWithSelection { - lastSelectedPlan: number; - lastSelectedSuite: number; - plans: TestPlan[]; - } - export interface TestPoint { - assignedTo: VSSInterfaces.IdentityRef; - automated: boolean; - comment: string; - configuration: ShallowReference; - failureType: string; - id: number; - lastResolutionStateId: number; - lastResult: ShallowReference; - lastResultDetails: LastResultDetails; - lastRunBuildNumber: string; - lastTestRun: ShallowReference; - lastUpdatedBy: VSSInterfaces.IdentityRef; - lastUpdatedDate: Date; - outcome: string; - revision: number; - state: string; - suite: ShallowReference; - testCase: WorkItemReference; - testPlan: ShallowReference; - url: string; - workItemProperties: any[]; - } - export interface TestResolutionState { - id: number; - name: string; - project: ShallowReference; - } - export interface TestResultCreateModel { - area: ShallowReference; - associatedWorkItems: number[]; - automatedTestId: string; - automatedTestName: string; - automatedTestStorage: string; - automatedTestType: string; - automatedTestTypeId: string; - comment: string; - completedDate: string; - computerName: string; - configuration: ShallowReference; - customFields: CustomTestField[]; - durationInMs: string; - errorMessage: string; - failureType: string; - outcome: string; - owner: VSSInterfaces.IdentityRef; - resolutionState: string; - runBy: VSSInterfaces.IdentityRef; - stackTrace: string; - startedDate: string; - state: string; - testCase: ShallowReference; - testCasePriority: string; - testCaseTitle: string; - testPoint: ShallowReference; - } - export interface TestResultModelBase { - comment: string; - completedDate: Date; - durationInMs: number; - errorMessage: string; - outcome: string; - startedDate: Date; - } - export interface TestResultParameterModel { - actionPath: string; - iterationId: number; - parameterName: string; - url: string; - value: string; - } - export interface TestResultsContext { - build: BuildReference; - contextType: TestResultsContextType; - release: ReleaseReference; - } - export enum TestResultsContextType { - Build = 1, - Release = 2, - } - export interface TestResultsDetails { - groupByField: string; - resultsForGroup: TestResultsDetailsForGroup[]; - } - export interface TestResultsDetailsForGroup { - groupByValue: any; - ids: TestCaseResultIdentifier[]; - resultsCountByOutcome: { - [key: number]: AggregatedResultsByOutcome; - }; - } - export interface TestResultSummary { - aggregatedResultsAnalysis: AggregatedResultsAnalysis; - teamProject: TfsCoreInterfaces.TeamProjectReference; - testFailures: TestFailuresAnalysis; - testResultsContext: TestResultsContext; - } - export interface TestResultTrendFilter { - branchNames: string[]; - buildCount: number; - definitionIds: number[]; - publishContext: string; - testRunTitles: string[]; - } - export interface TestRun { - build: ShallowReference; - buildConfiguration: BuildConfiguration; - comment: string; - completedDate: Date; - controller: string; - createdDate: Date; - customFields: CustomTestField[]; - dropLocation: string; - dtlAutEnvironment: ShallowReference; - dtlEnvironment: ShallowReference; - dtlEnvironmentCreationDetails: DtlEnvironmentDetails; - dueDate: Date; - errorMessage: string; - filter: RunFilter; - id: number; - incompleteTests: number; - isAutomated: boolean; - iteration: string; - lastUpdatedBy: VSSInterfaces.IdentityRef; - lastUpdatedDate: Date; - name: string; - notApplicableTests: number; - owner: VSSInterfaces.IdentityRef; - passedTests: number; - phase: string; - plan: ShallowReference; - postProcessState: string; - project: ShallowReference; - releaseEnvironmentUri: string; - releaseUri: string; - revision: number; - runStatistics: RunStatistic[]; - startedDate: Date; - state: string; - substate: TestRunSubstate; - testEnvironment: TestEnvironment; - testMessageLogId: number; - testSettings: ShallowReference; - totalTests: number; - unanalyzedTests: number; - url: string; - webAccessUrl: string; - } - export interface TestRunCoverage { - lastError: string; - modules: ModuleCoverage[]; - state: string; - testRun: ShallowReference; - } - export enum TestRunState { - /** - * Only used during an update to preserve the existing value. - */ - Unspecified = 0, - /** - * The run is still being created. No tests have started yet. - */ - NotStarted = 1, - /** - * Tests are running. - */ - InProgress = 2, - /** - * All tests have completed or been skipped. - */ - Completed = 3, - /** - * Run is stopped and remaing tests have been aborted - */ - Aborted = 4, - /** - * Run is currently initializing This is a legacy state and should not be used any more - */ - Waiting = 5, - /** - * Run requires investigation because of a test point failure This is a legacy state and should not be used any more - */ - NeedsInvestigation = 6, - } - export interface TestRunStatistic { - run: ShallowReference; - runStatistics: RunStatistic[]; - } - export enum TestRunSubstate { - None = 0, - CreatingEnvironment = 1, - RunningTests = 2, - CanceledByUser = 3, - AbortedBySystem = 4, - TimedOut = 5, - PendingAnalysis = 6, - Analyzed = 7, - CancellationInProgress = 8, - } - /** - * Represents the test settings of the run. Used to create test settings and fetch test settings - */ - export interface TestSettings { - /** - * Area path required to create test settings - */ - areaPath: string; - /** - * Description of the test settings. Used in create test settings. - */ - description: string; - /** - * Indicates if the tests settings is public or private.Used in create test settings. - */ - isPublic: boolean; - /** - * Xml string of machine roles. Used in create test settings. - */ - machineRoles: string; - /** - * Test settings content. - */ - testSettingsContent: string; - /** - * Test settings id. - */ - testSettingsId: number; - /** - * Test settings name. - */ - testSettingsName: string; - } - export interface TestSuite { - areaUri: string; - children: TestSuite[]; - defaultConfigurations: ShallowReference[]; - id: number; - inheritDefaultConfigurations: boolean; - lastError: string; - lastPopulatedDate: Date; - lastUpdatedBy: VSSInterfaces.IdentityRef; - lastUpdatedDate: Date; - name: string; - parent: ShallowReference; - plan: ShallowReference; - project: ShallowReference; - queryString: string; - requirementId: number; - revision: number; - state: string; - suites: ShallowReference[]; - suiteType: string; - testCaseCount: number; - testCasesUrl: string; - text: string; - url: string; - } - export interface TestSuiteCloneRequest { - cloneOptions: CloneOptions; - destinationSuiteId: number; - destinationSuiteProjectName: string; - } - export interface TestVariable { - /** - * Description of the test variable - */ - description: string; - /** - * Id of the test variable - */ - id: number; - /** - * Name of the test variable - */ - name: string; - /** - * Project to which the test variable belongs - */ - project: ShallowReference; - /** - * Revision - */ - revision: number; - /** - * Url of the test variable - */ - url: string; - /** - * List of allowed values - */ - values: string[]; - } - export interface WorkItemReference { - id: string; - name: string; - url: string; - webUrl: string; - } - export var TypeInfo: { - AggregatedDataForResultTrend: { - fields: any; - }; - AggregatedResultsAnalysis: { - fields: any; - }; - AggregatedResultsByOutcome: { - fields: any; - }; - AggregatedResultsDifference: { - fields: any; - }; - AttachmentType: { - enumValues: { - "generalAttachment": number; - "afnStrip": number; - "bugFilingData": number; - "codeCoverage": number; - "intermediateCollectorData": number; - "runConfig": number; - "testImpactDetails": number; - "tmiTestRunDeploymentFiles": number; - "tmiTestRunReverseDeploymentFiles": number; - "tmiTestResultDetail": number; - "tmiTestRunSummary": number; - }; - }; - BatchResponse: { - fields: any; - }; - BuildConfiguration: { - fields: any; - }; - BuildCoverage: { - fields: any; - }; - BuildReference: { - fields: any; - }; - CloneOperationInformation: { - fields: any; - }; - CloneOperationState: { - enumValues: { - "failed": number; - "inProgress": number; - "queued": number; - "succeeded": number; - }; - }; - CloneOptions: { - fields: any; - }; - CloneStatistics: { - fields: any; - }; - CodeCoverageData: { - fields: any; - }; - CodeCoverageStatistics: { - fields: any; - }; - CodeCoverageSummary: { - fields: any; - }; - CoverageQueryFlags: { - enumValues: { - "modules": number; - "functions": number; - "blockData": number; - }; - }; - CoverageStatistics: { - fields: any; - }; - CustomTestField: { - fields: any; - }; - CustomTestFieldDefinition: { - fields: any; - }; - CustomTestFieldScope: { - enumValues: { - "none": number; - "testRun": number; - "testResult": number; - "system": number; - "all": number; - }; - }; - CustomTestFieldType: { - enumValues: { - "bit": number; - "dateTime": number; - "int": number; - "float": number; - "string": number; - "guid": number; - }; - }; - DtlEnvironmentDetails: { - fields: any; - }; - FailingSince: { - fields: any; - }; - FunctionCoverage: { - fields: any; - }; - GroupTestResultsBy: { - enumValues: { - "none": number; - "automatedTestStorage": number; - }; - }; - LastResultDetails: { - fields: any; - }; - ModuleCoverage: { - fields: any; - }; - NameValuePair: { - fields: any; - }; - PlanUpdateModel: { - fields: any; - }; - PointAssignment: { - fields: any; - }; - PointUpdateModel: { - fields: any; - }; - PointWorkItemProperty: { - fields: any; - }; - QueryModel: { - fields: any; - }; - ReleaseReference: { - fields: any; - }; - Response: { - fields: any; - }; - ResultDetails: { - enumValues: { - "none": number; - "iterations": number; - "workItems": number; - }; - }; - ResultObjectType: { - enumValues: { - "testSuite": number; - "testPlan": number; - }; - }; - ResultOutcome: { - enumValues: { - "pass": number; - "fail": number; - "pending": number; - }; - }; - ResultRetentionSettings: { - fields: any; - }; - ResultUpdateRequestModel: { - fields: any; - }; - ResultUpdateResponseModel: { - fields: any; - }; - RunCreateModel: { - fields: any; - }; - RunFilter: { - fields: any; - }; - RunStatistic: { - fields: any; - }; - RunUpdateModel: { - fields: any; - }; - ShallowReference: { - fields: any; - }; - SharedStepModel: { - fields: any; - }; - SuiteCreateModel: { - fields: any; - }; - SuiteTestCase: { - fields: any; - }; - SuiteUpdateModel: { - fields: any; - }; - TestActionResultModel: { - fields: any; - }; - TestAttachmentReference: { - fields: any; - }; - TestAttachmentRequestModel: { - fields: any; - }; - TestCaseResult: { - fields: any; - }; - TestCaseResult2: { - fields: any; - }; - TestCaseResultAttachmentModel: { - fields: any; - }; - TestCaseResultIdentifier: { - fields: any; - }; - TestCaseResultUpdateModel: { - fields: any; - }; - TestConfiguration: { - fields: any; - }; - TestConfigurationState: { - enumValues: { - "active": number; - "inactive": number; - }; - }; - TestEnvironment: { - fields: any; - }; - TestFailureDetails: { - fields: any; - }; - TestFailuresAnalysis: { - fields: any; - }; - TestIterationDetailsModel: { - fields: any; - }; - TestMessageLogDetails: { - fields: any; - }; - TestOutcome: { - enumValues: { - "unspecified": number; - "none": number; - "passed": number; - "failed": number; - "inconclusive": number; - "timeout": number; - "aborted": number; - "blocked": number; - "notExecuted": number; - "warning": number; - "error": number; - "notApplicable": number; - "paused": number; - "inProgress": number; - "maxValue": number; - }; - }; - TestPlan: { - fields: any; - }; - TestPlanCloneRequest: { - fields: any; - }; - TestPlansWithSelection: { - fields: any; - }; - TestPoint: { - fields: any; - }; - TestResolutionState: { - fields: any; - }; - TestResultCreateModel: { - fields: any; - }; - TestResultModelBase: { - fields: any; - }; - TestResultParameterModel: { - fields: any; - }; - TestResultsContext: { - fields: any; - }; - TestResultsContextType: { - enumValues: { - "build": number; - "release": number; - }; - }; - TestResultsDetails: { - fields: any; - }; - TestResultsDetailsForGroup: { - fields: any; - }; - TestResultSummary: { - fields: any; - }; - TestResultTrendFilter: { - fields: any; - }; - TestRun: { - fields: any; - }; - TestRunCoverage: { - fields: any; - }; - TestRunState: { - enumValues: { - "unspecified": number; - "notStarted": number; - "inProgress": number; - "completed": number; - "aborted": number; - "waiting": number; - "needsInvestigation": number; - }; - }; - TestRunStatistic: { - fields: any; - }; - TestRunSubstate: { - enumValues: { - "none": number; - "creatingEnvironment": number; - "runningTests": number; - "canceledByUser": number; - "abortedBySystem": number; - "timedOut": number; - "pendingAnalysis": number; - "analyzed": number; - "cancellationInProgress": number; - }; - }; - TestSettings: { - fields: any; - }; - TestSuite: { - fields: any; - }; - TestSuiteCloneRequest: { - fields: any; - }; - TestVariable: { - fields: any; - }; - WorkItemReference: { - fields: any; - }; - }; - -} -declare module 'vso-node-api/TestApi' { - - - import Q = require('q'); - import basem = require('vso-node-api/ClientApiBases'); - import VsoBaseInterfaces = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); - import TestInterfaces = require('vso-node-api/interfaces/TestInterfaces'); - export interface ITestApi extends basem.ClientApiBase { - createTestResultAttachment(attachmentRequestModel: TestInterfaces.TestAttachmentRequestModel, project: string, runId: number, testCaseResultId: number, onResult: (err: any, statusCode: number, Attachment: TestInterfaces.TestAttachmentReference) => void): void; - getTestResultAttachmentContent(project: string, runId: number, testCaseResultId: number, attachmentId: number, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - getTestResultAttachmentZip(project: string, runId: number, testCaseResultId: number, attachmentId: number, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - createTestRunAttachment(attachmentRequestModel: TestInterfaces.TestAttachmentRequestModel, project: string, runId: number, onResult: (err: any, statusCode: number, Attachment: TestInterfaces.TestAttachmentReference) => void): void; - getTestRunAttachmentContent(project: string, runId: number, attachmentId: number, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - getTestRunAttachmentZip(project: string, runId: number, attachmentId: number, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - getBugsLinkedToTestResult(project: string, runId: number, testCaseResultId: number, onResult: (err: any, statusCode: number, Bugs: TestInterfaces.WorkItemReference[]) => void): void; - getBuildCodeCoverage(project: string, buildId: number, flags: number, onResult: (err: any, statusCode: number, CodeCoverage: TestInterfaces.BuildCoverage[]) => void): void; - getCodeCoverageSummary(project: string, buildId: number, deltaBuildId: number, onResult: (err: any, statusCode: number, CodeCoverage: TestInterfaces.CodeCoverageSummary) => void): void; - updateCodeCoverageSummary(coverageData: TestInterfaces.CodeCoverageData, project: string, buildId: number, onResult: (err: any, statusCode: number) => void): void; - getTestRunCodeCoverage(project: string, runId: number, flags: number, onResult: (err: any, statusCode: number, CodeCoverage: TestInterfaces.TestRunCoverage[]) => void): void; - createTestConfiguration(testConfiguration: TestInterfaces.TestConfiguration, project: string, onResult: (err: any, statusCode: number, Configuration: TestInterfaces.TestConfiguration) => void): void; - deleteTestConfiguration(project: string, testConfigurationId: number, onResult: (err: any, statusCode: number) => void): void; - getTestConfigurationById(project: string, testConfigurationId: number, onResult: (err: any, statusCode: number, Configuration: TestInterfaces.TestConfiguration) => void): void; - getTestConfigurations(project: string, skip: number, top: number, includeAllProperties: boolean, onResult: (err: any, statusCode: number, Configurations: TestInterfaces.TestConfiguration[]) => void): void; - updateTestConfiguration(testConfiguration: TestInterfaces.TestConfiguration, project: string, testConfigurationId: number, onResult: (err: any, statusCode: number, Configuration: TestInterfaces.TestConfiguration) => void): void; - addCustomFields(newFields: TestInterfaces.CustomTestFieldDefinition[], project: string, onResult: (err: any, statusCode: number, ExtensionFields: TestInterfaces.CustomTestFieldDefinition[]) => void): void; - queryCustomFields(project: string, scopeFilter: TestInterfaces.CustomTestFieldScope, onResult: (err: any, statusCode: number, ExtensionFields: TestInterfaces.CustomTestFieldDefinition[]) => void): void; - getTestRunLogs(project: string, runId: number, onResult: (err: any, statusCode: number, MessageLogs: TestInterfaces.TestMessageLogDetails[]) => void): void; - getPlanCloneInformation(project: string, operationId: number, includeDetails: boolean, onResult: (err: any, statusCode: number, Plan: TestInterfaces.CloneOperationInformation) => void): void; - createTestPlan(testPlan: TestInterfaces.PlanUpdateModel, project: string, onResult: (err: any, statusCode: number, Plan: TestInterfaces.TestPlan) => void): void; - deleteTestPlan(project: string, planId: number, onResult: (err: any, statusCode: number) => void): void; - getPlanById(project: string, planId: number, onResult: (err: any, statusCode: number, Plan: TestInterfaces.TestPlan) => void): void; - getPlans(project: string, owner: string, skip: number, top: number, includePlanDetails: boolean, filterActivePlans: boolean, onResult: (err: any, statusCode: number, Plans: TestInterfaces.TestPlan[]) => void): void; - updateTestPlan(planUpdateModel: TestInterfaces.PlanUpdateModel, project: string, planId: number, onResult: (err: any, statusCode: number, Plan: TestInterfaces.TestPlan) => void): void; - cloneTestPlan(cloneRequestBody: TestInterfaces.TestPlanCloneRequest, project: string, sourcePlanId: number, onResult: (err: any, statusCode: number, Plan: TestInterfaces.CloneOperationInformation) => void): void; - getPoint(project: string, planId: number, suiteId: number, pointIds: number, witFields: string, onResult: (err: any, statusCode: number, Point: TestInterfaces.TestPoint) => void): void; - getPoints(project: string, planId: number, suiteId: number, witFields: string, configurationId: string, testCaseId: string, testPointIds: string, includePointDetails: boolean, skip: number, top: number, onResult: (err: any, statusCode: number, Points: TestInterfaces.TestPoint[]) => void): void; - updateTestPoints(pointUpdateModel: TestInterfaces.PointUpdateModel, project: string, planId: number, suiteId: number, pointIds: string, onResult: (err: any, statusCode: number, Point: TestInterfaces.TestPoint[]) => void): void; - queryTestResultRecentBugs(project: string, testRunId: number, testResultId: number, recentDays: number, onResult: (err: any, statusCode: number, RecentBugs: TestInterfaces.WorkItemReference[]) => void): void; - getTestResultDetailsForBuild(project: string, buildId: number, publishContext: string, groupBy: string, filter: string, onResult: (err: any, statusCode: number, ResultDetailsByBuild: TestInterfaces.TestResultsDetails) => void): void; - getTestResultDetailsForRelease(project: string, releaseId: number, releaseEnvId: number, publishContext: string, groupBy: string, filter: string, onResult: (err: any, statusCode: number, ResultDetailsByRelease: TestInterfaces.TestResultsDetails) => void): void; - createResultRetentionSettings(retentionSettings: TestInterfaces.ResultRetentionSettings, project: string, onResult: (err: any, statusCode: number, ResultRetentionSetting: TestInterfaces.ResultRetentionSettings) => void): void; - deleteResultRetentionSettings(project: string, onResult: (err: any, statusCode: number) => void): void; - getResultRetentionSettings(project: string, onResult: (err: any, statusCode: number, ResultRetentionSetting: TestInterfaces.ResultRetentionSettings) => void): void; - updateResultRetentionSettings(retentionSettings: TestInterfaces.ResultRetentionSettings, project: string, onResult: (err: any, statusCode: number, ResultRetentionSetting: TestInterfaces.ResultRetentionSettings) => void): void; - getTestIteration(project: string, runId: number, testCaseResultId: number, iterationId: number, includeActionResults: boolean, onResult: (err: any, statusCode: number, Result: TestInterfaces.TestIterationDetailsModel) => void): void; - getTestIterations(project: string, runId: number, testCaseResultId: number, includeActionResults: boolean, onResult: (err: any, statusCode: number, Results: TestInterfaces.TestIterationDetailsModel[]) => void): void; - addTestResultsToTestRun(resultCreateModels: TestInterfaces.TestResultCreateModel[], project: string, runId: number, onResult: (err: any, statusCode: number, Results: TestInterfaces.TestCaseResult[]) => void): void; - bulkUpdateTestResults(resultUpdateModel: TestInterfaces.TestCaseResultUpdateModel, project: string, runId: number, resultIds: number[], onResult: (err: any, statusCode: number, Result: TestInterfaces.TestCaseResult[]) => void): void; - getTestCaseResultById(project: string, runId: number, testCaseResultId: number, includeIterationDetails: boolean, includeAssociatedBugs: boolean, onResult: (err: any, statusCode: number, Result: TestInterfaces.TestCaseResult) => void): void; - getTestCaseResults(project: string, runId: number, includeIterationDetails: boolean, onResult: (err: any, statusCode: number, Results: TestInterfaces.TestCaseResult[]) => void): void; - getTestResultById(project: string, runId: number, testCaseResultId: number, detailsToInclude: TestInterfaces.ResultDetails, onResult: (err: any, statusCode: number, Results: TestInterfaces.TestCaseResult[]) => void): void; - getTestResults(project: string, runId: number, detailsToInclude: TestInterfaces.ResultDetails, skip: number, top: number, onResult: (err: any, statusCode: number, Results: TestInterfaces.TestCaseResult[]) => void): void; - updateTestResults(resultUpdateModels: TestInterfaces.TestCaseResultUpdateModel[], project: string, runId: number, onResult: (err: any, statusCode: number, Results: TestInterfaces.TestCaseResult[]) => void): void; - getTestResultsByIds(ids: TestInterfaces.TestCaseResultIdentifier[], project: string, fields: string[], onResult: (err: any, statusCode: number, Results: TestInterfaces.TestCaseResult[]) => void): void; - getActionResults(project: string, runId: number, testCaseResultId: number, iterationId: number, actionPath: string, onResult: (err: any, statusCode: number, Results: TestInterfaces.TestActionResultModel[]) => void): void; - getResultParameters(project: string, runId: number, testCaseResultId: number, iterationId: number, paramName: string, onResult: (err: any, statusCode: number, Results: TestInterfaces.TestResultParameterModel[]) => void): void; - getTestResultsByQuery(query: TestInterfaces.QueryModel, project: string, includeResultDetails: boolean, includeIterationDetails: boolean, skip: number, top: number, onResult: (err: any, statusCode: number, Result: TestInterfaces.TestCaseResult[]) => void): void; - queryTestResultsReportForBuild(project: string, buildId: number, publishContext: string, includeFailureDetails: boolean, buildToCompare: TestInterfaces.BuildReference, onResult: (err: any, statusCode: number, ResultSummaryByBuild: TestInterfaces.TestResultSummary) => void): void; - queryTestResultsReportForRelease(project: string, releaseId: number, releaseEnvId: number, publishContext: string, includeFailureDetails: boolean, releaseToCompare: TestInterfaces.ReleaseReference, onResult: (err: any, statusCode: number, ResultSummaryByRelease: TestInterfaces.TestResultSummary) => void): void; - queryTestResultTrendReport(project: string, testRunId: number, testResultId: number, historyDays: number, top: number, onResult: (err: any, statusCode: number, ResultTrend: TestInterfaces.TestCaseResult[]) => void): void; - queryResultTrendForBuild(filter: TestInterfaces.TestResultTrendFilter, project: string, onResult: (err: any, statusCode: number, ResultTrendByBuild: TestInterfaces.AggregatedDataForResultTrend[]) => void): void; - getTestRunStatistics(project: string, runId: number, onResult: (err: any, statusCode: number, Run: TestInterfaces.TestRunStatistic) => void): void; - getTestRunsByQuery(query: TestInterfaces.QueryModel, project: string, includeRunDetails: boolean, skip: number, top: number, onResult: (err: any, statusCode: number, Run: TestInterfaces.TestRun[]) => void): void; - createTestRun(testRun: TestInterfaces.RunCreateModel, project: string, onResult: (err: any, statusCode: number, Run: TestInterfaces.TestRun) => void): void; - deleteTestRun(project: string, runId: number, onResult: (err: any, statusCode: number) => void): void; - getTestRunById(project: string, runId: number, onResult: (err: any, statusCode: number, Run: TestInterfaces.TestRun) => void): void; - getTestRuns(project: string, buildUri: string, owner: string, tmiRunId: string, planId: number, includeRunDetails: boolean, automated: boolean, skip: number, top: number, onResult: (err: any, statusCode: number, Runs: TestInterfaces.TestRun[]) => void): void; - updateTestRun(runUpdateModel: TestInterfaces.RunUpdateModel, project: string, runId: number, onResult: (err: any, statusCode: number, Run: TestInterfaces.TestRun) => void): void; - getSuiteCloneInformation(project: string, operationId: number, includeDetails: boolean, onResult: (err: any, statusCode: number, Suite: TestInterfaces.CloneOperationInformation) => void): void; - addTestCasesToSuite(project: string, planId: number, suiteId: number, testCaseIds: string, onResult: (err: any, statusCode: number, Suites: TestInterfaces.SuiteTestCase[]) => void): void; - getTestCaseById(project: string, planId: number, suiteId: number, testCaseIds: number, onResult: (err: any, statusCode: number, Suite: TestInterfaces.SuiteTestCase) => void): void; - getTestCases(project: string, planId: number, suiteId: number, onResult: (err: any, statusCode: number, Suites: TestInterfaces.SuiteTestCase[]) => void): void; - removeTestCasesFromSuiteUrl(project: string, planId: number, suiteId: number, testCaseIds: string, onResult: (err: any, statusCode: number) => void): void; - createTestSuite(testSuite: TestInterfaces.SuiteCreateModel, project: string, planId: number, suiteId: number, onResult: (err: any, statusCode: number, Suite: TestInterfaces.TestSuite[]) => void): void; - deleteTestSuite(project: string, planId: number, suiteId: number, onResult: (err: any, statusCode: number) => void): void; - getTestSuiteById(project: string, planId: number, suiteId: number, includeChildSuites: boolean, onResult: (err: any, statusCode: number, Suite: TestInterfaces.TestSuite) => void): void; - getTestSuitesForPlan(project: string, planId: number, includeSuites: boolean, skip: number, top: number, asTreeView: boolean, onResult: (err: any, statusCode: number, Suites: TestInterfaces.TestSuite[]) => void): void; - updateTestSuite(suiteUpdateModel: TestInterfaces.SuiteUpdateModel, project: string, planId: number, suiteId: number, onResult: (err: any, statusCode: number, Suite: TestInterfaces.TestSuite) => void): void; - cloneTestSuite(cloneRequestBody: TestInterfaces.TestSuiteCloneRequest, project: string, sourceSuiteId: number, planId: number, onResult: (err: any, statusCode: number, Suite: TestInterfaces.CloneOperationInformation) => void): void; - getSuitesByTestCaseId(testCaseId: number, onResult: (err: any, statusCode: number, Suites: TestInterfaces.TestSuite[]) => void): void; - createTestSettings(testSettings: TestInterfaces.TestSettings, project: string, onResult: (err: any, statusCode: number, TestSetting: number) => void): void; - deleteTestSettings(project: string, testSettingsId: number, onResult: (err: any, statusCode: number) => void): void; - getTestSettingsById(project: string, testSettingsId: number, onResult: (err: any, statusCode: number, TestSetting: TestInterfaces.TestSettings) => void): void; - createTestVariable(testVariable: TestInterfaces.TestVariable, project: string, onResult: (err: any, statusCode: number, Variable: TestInterfaces.TestVariable) => void): void; - deleteTestVariable(project: string, testVariableId: number, onResult: (err: any, statusCode: number) => void): void; - getTestVariable(project: string, testVariableId: number, onResult: (err: any, statusCode: number, Variable: TestInterfaces.TestVariable) => void): void; - getTestVariables(project: string, skip: number, top: number, onResult: (err: any, statusCode: number, Variables: TestInterfaces.TestVariable[]) => void): void; - updateTestVariable(testVariable: TestInterfaces.TestVariable, project: string, testVariableId: number, onResult: (err: any, statusCode: number, Variable: TestInterfaces.TestVariable) => void): void; - } - export interface IQTestApi extends basem.QClientApiBase { - createTestResultAttachment(attachmentRequestModel: TestInterfaces.TestAttachmentRequestModel, project: string, runId: number, testCaseResultId: number): Promise; - getTestResultAttachmentContent(project: string, runId: number, testCaseResultId: number, attachmentId: number): Promise; - getTestResultAttachmentZip(project: string, runId: number, testCaseResultId: number, attachmentId: number): Promise; - createTestRunAttachment(attachmentRequestModel: TestInterfaces.TestAttachmentRequestModel, project: string, runId: number): Promise; - getTestRunAttachmentContent(project: string, runId: number, attachmentId: number): Promise; - getTestRunAttachmentZip(project: string, runId: number, attachmentId: number): Promise; - getBugsLinkedToTestResult(project: string, runId: number, testCaseResultId: number): Promise; - getBuildCodeCoverage(project: string, buildId: number, flags: number): Promise; - getCodeCoverageSummary(project: string, buildId: number, deltaBuildId?: number): Promise; - updateCodeCoverageSummary(coverageData: TestInterfaces.CodeCoverageData, project: string, buildId: number): Promise; - getTestRunCodeCoverage(project: string, runId: number, flags: number): Promise; - createTestConfiguration(testConfiguration: TestInterfaces.TestConfiguration, project: string): Promise; - deleteTestConfiguration(project: string, testConfigurationId: number): Promise; - getTestConfigurationById(project: string, testConfigurationId: number): Promise; - getTestConfigurations(project: string, skip?: number, top?: number, includeAllProperties?: boolean): Promise; - updateTestConfiguration(testConfiguration: TestInterfaces.TestConfiguration, project: string, testConfigurationId: number): Promise; - addCustomFields(newFields: TestInterfaces.CustomTestFieldDefinition[], project: string): Promise; - queryCustomFields(project: string, scopeFilter: TestInterfaces.CustomTestFieldScope): Promise; - getTestRunLogs(project: string, runId: number): Promise; - getPlanCloneInformation(project: string, operationId: number, includeDetails?: boolean): Promise; - createTestPlan(testPlan: TestInterfaces.PlanUpdateModel, project: string): Promise; - deleteTestPlan(project: string, planId: number): Promise; - getPlanById(project: string, planId: number): Promise; - getPlans(project: string, owner?: string, skip?: number, top?: number, includePlanDetails?: boolean, filterActivePlans?: boolean): Promise; - updateTestPlan(planUpdateModel: TestInterfaces.PlanUpdateModel, project: string, planId: number): Promise; - cloneTestPlan(cloneRequestBody: TestInterfaces.TestPlanCloneRequest, project: string, sourcePlanId: number): Promise; - getPoint(project: string, planId: number, suiteId: number, pointIds: number, witFields?: string): Promise; - getPoints(project: string, planId: number, suiteId: number, witFields?: string, configurationId?: string, testCaseId?: string, testPointIds?: string, includePointDetails?: boolean, skip?: number, top?: number): Promise; - updateTestPoints(pointUpdateModel: TestInterfaces.PointUpdateModel, project: string, planId: number, suiteId: number, pointIds: string): Promise; - queryTestResultRecentBugs(project: string, testRunId: number, testResultId: number, recentDays?: number): Promise; - getTestResultDetailsForBuild(project: string, buildId: number, publishContext?: string, groupBy?: string, filter?: string): Promise; - getTestResultDetailsForRelease(project: string, releaseId: number, releaseEnvId: number, publishContext?: string, groupBy?: string, filter?: string): Promise; - createResultRetentionSettings(retentionSettings: TestInterfaces.ResultRetentionSettings, project: string): Promise; - deleteResultRetentionSettings(project: string): Promise; - getResultRetentionSettings(project: string): Promise; - updateResultRetentionSettings(retentionSettings: TestInterfaces.ResultRetentionSettings, project: string): Promise; - getTestIteration(project: string, runId: number, testCaseResultId: number, iterationId: number, includeActionResults?: boolean): Promise; - getTestIterations(project: string, runId: number, testCaseResultId: number, includeActionResults?: boolean): Promise; - addTestResultsToTestRun(resultCreateModels: TestInterfaces.TestResultCreateModel[], project: string, runId: number): Promise; - bulkUpdateTestResults(resultUpdateModel: TestInterfaces.TestCaseResultUpdateModel, project: string, runId: number, resultIds: number[]): Promise; - getTestCaseResultById(project: string, runId: number, testCaseResultId: number, includeIterationDetails: boolean, includeAssociatedBugs?: boolean): Promise; - getTestCaseResults(project: string, runId: number, includeIterationDetails: boolean): Promise; - getTestResultById(project: string, runId: number, testCaseResultId: number, detailsToInclude?: TestInterfaces.ResultDetails): Promise; - getTestResults(project: string, runId: number, detailsToInclude?: TestInterfaces.ResultDetails, skip?: number, top?: number): Promise; - updateTestResults(resultUpdateModels: TestInterfaces.TestCaseResultUpdateModel[], project: string, runId: number): Promise; - getTestResultsByIds(ids: TestInterfaces.TestCaseResultIdentifier[], project: string, fields: string[]): Promise; - getActionResults(project: string, runId: number, testCaseResultId: number, iterationId: number, actionPath?: string): Promise; - getResultParameters(project: string, runId: number, testCaseResultId: number, iterationId: number, paramName?: string): Promise; - getTestResultsByQuery(query: TestInterfaces.QueryModel, project: string, includeResultDetails?: boolean, includeIterationDetails?: boolean, skip?: number, top?: number): Promise; - queryTestResultsReportForBuild(project: string, buildId: number, publishContext?: string, includeFailureDetails?: boolean, buildToCompare?: TestInterfaces.BuildReference): Promise; - queryTestResultsReportForRelease(project: string, releaseId: number, releaseEnvId: number, publishContext?: string, includeFailureDetails?: boolean, releaseToCompare?: TestInterfaces.ReleaseReference): Promise; - queryTestResultTrendReport(project: string, testRunId: number, testResultId: number, historyDays?: number, top?: number): Promise; - queryResultTrendForBuild(filter: TestInterfaces.TestResultTrendFilter, project: string): Promise; - getTestRunStatistics(project: string, runId: number): Promise; - getTestRunsByQuery(query: TestInterfaces.QueryModel, project: string, includeRunDetails?: boolean, skip?: number, top?: number): Promise; - createTestRun(testRun: TestInterfaces.RunCreateModel, project: string): Promise; - deleteTestRun(project: string, runId: number): Promise; - getTestRunById(project: string, runId: number): Promise; - getTestRuns(project: string, buildUri?: string, owner?: string, tmiRunId?: string, planId?: number, includeRunDetails?: boolean, automated?: boolean, skip?: number, top?: number): Promise; - updateTestRun(runUpdateModel: TestInterfaces.RunUpdateModel, project: string, runId: number): Promise; - getSuiteCloneInformation(project: string, operationId: number, includeDetails?: boolean): Promise; - addTestCasesToSuite(project: string, planId: number, suiteId: number, testCaseIds: string): Promise; - getTestCaseById(project: string, planId: number, suiteId: number, testCaseIds: number): Promise; - getTestCases(project: string, planId: number, suiteId: number): Promise; - removeTestCasesFromSuiteUrl(project: string, planId: number, suiteId: number, testCaseIds: string): Promise; - createTestSuite(testSuite: TestInterfaces.SuiteCreateModel, project: string, planId: number, suiteId: number): Promise; - deleteTestSuite(project: string, planId: number, suiteId: number): Promise; - getTestSuiteById(project: string, planId: number, suiteId: number, includeChildSuites?: boolean): Promise; - getTestSuitesForPlan(project: string, planId: number, includeSuites?: boolean, skip?: number, top?: number, asTreeView?: boolean): Promise; - updateTestSuite(suiteUpdateModel: TestInterfaces.SuiteUpdateModel, project: string, planId: number, suiteId: number): Promise; - cloneTestSuite(cloneRequestBody: TestInterfaces.TestSuiteCloneRequest, project: string, sourceSuiteId: number, planId: number): Promise; - getSuitesByTestCaseId(testCaseId: number): Promise; - createTestSettings(testSettings: TestInterfaces.TestSettings, project: string): Promise; - deleteTestSettings(project: string, testSettingsId: number): Promise; - getTestSettingsById(project: string, testSettingsId: number): Promise; - createTestVariable(testVariable: TestInterfaces.TestVariable, project: string): Promise; - deleteTestVariable(project: string, testVariableId: number): Promise; - getTestVariable(project: string, testVariableId: number): Promise; - getTestVariables(project: string, skip?: number, top?: number): Promise; - updateTestVariable(testVariable: TestInterfaces.TestVariable, project: string, testVariableId: number): Promise; - } - export class TestApi extends basem.ClientApiBase implements ITestApi { - constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); - /** - * @param {TestInterfaces.TestAttachmentRequestModel} attachmentRequestModel - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} testCaseResultId - * @param onResult callback function with the resulting TestInterfaces.TestAttachmentReference - */ - createTestResultAttachment(attachmentRequestModel: TestInterfaces.TestAttachmentRequestModel, project: string, runId: number, testCaseResultId: number, onResult: (err: any, statusCode: number, Attachment: TestInterfaces.TestAttachmentReference) => void): void; - /** - * Returns a test result attachment - * - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} testCaseResultId - * @param {number} attachmentId - * @param onResult callback function with the resulting ArrayBuffer - */ - getTestResultAttachmentContent(project: string, runId: number, testCaseResultId: number, attachmentId: number, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * Returns a test result attachment - * - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} testCaseResultId - * @param {number} attachmentId - * @param onResult callback function with the resulting ArrayBuffer - */ - getTestResultAttachmentZip(project: string, runId: number, testCaseResultId: number, attachmentId: number, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * @param {TestInterfaces.TestAttachmentRequestModel} attachmentRequestModel - * @param {string} project - Project ID or project name - * @param {number} runId - * @param onResult callback function with the resulting TestInterfaces.TestAttachmentReference - */ - createTestRunAttachment(attachmentRequestModel: TestInterfaces.TestAttachmentRequestModel, project: string, runId: number, onResult: (err: any, statusCode: number, Attachment: TestInterfaces.TestAttachmentReference) => void): void; - /** - * Returns a test run attachment - * - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} attachmentId - * @param onResult callback function with the resulting ArrayBuffer - */ - getTestRunAttachmentContent(project: string, runId: number, attachmentId: number, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * Returns a test run attachment - * - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} attachmentId - * @param onResult callback function with the resulting ArrayBuffer - */ - getTestRunAttachmentZip(project: string, runId: number, attachmentId: number, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} testCaseResultId - * @param onResult callback function with the resulting TestInterfaces.WorkItemReference[] - */ - getBugsLinkedToTestResult(project: string, runId: number, testCaseResultId: number, onResult: (err: any, statusCode: number, Bugs: TestInterfaces.WorkItemReference[]) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {number} flags - * @param onResult callback function with the resulting TestInterfaces.BuildCoverage[] - */ - getBuildCodeCoverage(project: string, buildId: number, flags: number, onResult: (err: any, statusCode: number, CodeCoverage: TestInterfaces.BuildCoverage[]) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {number} deltaBuildId - * @param onResult callback function with the resulting TestInterfaces.CodeCoverageSummary - */ - getCodeCoverageSummary(project: string, buildId: number, deltaBuildId: number, onResult: (err: any, statusCode: number, CodeCoverage: TestInterfaces.CodeCoverageSummary) => void): void; - /** - * http://(tfsserver):8080/tfs/DefaultCollection/_apis/test/CodeCoverage?buildId=10 Request: Json of code coverage summary - * - * @param {TestInterfaces.CodeCoverageData} coverageData - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param onResult callback function - */ - updateCodeCoverageSummary(coverageData: TestInterfaces.CodeCoverageData, project: string, buildId: number, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} flags - * @param onResult callback function with the resulting TestInterfaces.TestRunCoverage[] - */ - getTestRunCodeCoverage(project: string, runId: number, flags: number, onResult: (err: any, statusCode: number, CodeCoverage: TestInterfaces.TestRunCoverage[]) => void): void; - /** - * @param {TestInterfaces.TestConfiguration} testConfiguration - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting TestInterfaces.TestConfiguration - */ - createTestConfiguration(testConfiguration: TestInterfaces.TestConfiguration, project: string, onResult: (err: any, statusCode: number, Configuration: TestInterfaces.TestConfiguration) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} testConfigurationId - * @param onResult callback function - */ - deleteTestConfiguration(project: string, testConfigurationId: number, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} testConfigurationId - * @param onResult callback function with the resulting TestInterfaces.TestConfiguration - */ - getTestConfigurationById(project: string, testConfigurationId: number, onResult: (err: any, statusCode: number, Configuration: TestInterfaces.TestConfiguration) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} skip - * @param {number} top - * @param {boolean} includeAllProperties - * @param onResult callback function with the resulting TestInterfaces.TestConfiguration[] - */ - getTestConfigurations(project: string, skip: number, top: number, includeAllProperties: boolean, onResult: (err: any, statusCode: number, Configurations: TestInterfaces.TestConfiguration[]) => void): void; - /** - * @param {TestInterfaces.TestConfiguration} testConfiguration - * @param {string} project - Project ID or project name - * @param {number} testConfigurationId - * @param onResult callback function with the resulting TestInterfaces.TestConfiguration - */ - updateTestConfiguration(testConfiguration: TestInterfaces.TestConfiguration, project: string, testConfigurationId: number, onResult: (err: any, statusCode: number, Configuration: TestInterfaces.TestConfiguration) => void): void; - /** - * @param {TestInterfaces.CustomTestFieldDefinition[]} newFields - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting TestInterfaces.CustomTestFieldDefinition[] - */ - addCustomFields(newFields: TestInterfaces.CustomTestFieldDefinition[], project: string, onResult: (err: any, statusCode: number, ExtensionFields: TestInterfaces.CustomTestFieldDefinition[]) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {TestInterfaces.CustomTestFieldScope} scopeFilter - * @param onResult callback function with the resulting TestInterfaces.CustomTestFieldDefinition[] - */ - queryCustomFields(project: string, scopeFilter: TestInterfaces.CustomTestFieldScope, onResult: (err: any, statusCode: number, ExtensionFields: TestInterfaces.CustomTestFieldDefinition[]) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} runId - * @param onResult callback function with the resulting TestInterfaces.TestMessageLogDetails[] - */ - getTestRunLogs(project: string, runId: number, onResult: (err: any, statusCode: number, MessageLogs: TestInterfaces.TestMessageLogDetails[]) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} operationId - * @param {boolean} includeDetails - * @param onResult callback function with the resulting TestInterfaces.CloneOperationInformation - */ - getPlanCloneInformation(project: string, operationId: number, includeDetails: boolean, onResult: (err: any, statusCode: number, Plan: TestInterfaces.CloneOperationInformation) => void): void; - /** - * @param {TestInterfaces.PlanUpdateModel} testPlan - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting TestInterfaces.TestPlan - */ - createTestPlan(testPlan: TestInterfaces.PlanUpdateModel, project: string, onResult: (err: any, statusCode: number, Plan: TestInterfaces.TestPlan) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} planId - * @param onResult callback function - */ - deleteTestPlan(project: string, planId: number, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} planId - * @param onResult callback function with the resulting TestInterfaces.TestPlan - */ - getPlanById(project: string, planId: number, onResult: (err: any, statusCode: number, Plan: TestInterfaces.TestPlan) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {string} owner - * @param {number} skip - * @param {number} top - * @param {boolean} includePlanDetails - * @param {boolean} filterActivePlans - * @param onResult callback function with the resulting TestInterfaces.TestPlan[] - */ - getPlans(project: string, owner: string, skip: number, top: number, includePlanDetails: boolean, filterActivePlans: boolean, onResult: (err: any, statusCode: number, Plans: TestInterfaces.TestPlan[]) => void): void; - /** - * @param {TestInterfaces.PlanUpdateModel} planUpdateModel - * @param {string} project - Project ID or project name - * @param {number} planId - * @param onResult callback function with the resulting TestInterfaces.TestPlan - */ - updateTestPlan(planUpdateModel: TestInterfaces.PlanUpdateModel, project: string, planId: number, onResult: (err: any, statusCode: number, Plan: TestInterfaces.TestPlan) => void): void; - /** - * @param {TestInterfaces.TestPlanCloneRequest} cloneRequestBody - * @param {string} project - Project ID or project name - * @param {number} sourcePlanId - * @param onResult callback function with the resulting TestInterfaces.CloneOperationInformation - */ - cloneTestPlan(cloneRequestBody: TestInterfaces.TestPlanCloneRequest, project: string, sourcePlanId: number, onResult: (err: any, statusCode: number, Plan: TestInterfaces.CloneOperationInformation) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} planId - * @param {number} suiteId - * @param {number} pointIds - * @param {string} witFields - * @param onResult callback function with the resulting TestInterfaces.TestPoint - */ - getPoint(project: string, planId: number, suiteId: number, pointIds: number, witFields: string, onResult: (err: any, statusCode: number, Point: TestInterfaces.TestPoint) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} planId - * @param {number} suiteId - * @param {string} witFields - * @param {string} configurationId - * @param {string} testCaseId - * @param {string} testPointIds - * @param {boolean} includePointDetails - * @param {number} skip - * @param {number} top - * @param onResult callback function with the resulting TestInterfaces.TestPoint[] - */ - getPoints(project: string, planId: number, suiteId: number, witFields: string, configurationId: string, testCaseId: string, testPointIds: string, includePointDetails: boolean, skip: number, top: number, onResult: (err: any, statusCode: number, Points: TestInterfaces.TestPoint[]) => void): void; - /** - * @param {TestInterfaces.PointUpdateModel} pointUpdateModel - * @param {string} project - Project ID or project name - * @param {number} planId - * @param {number} suiteId - * @param {string} pointIds - * @param onResult callback function with the resulting TestInterfaces.TestPoint[] - */ - updateTestPoints(pointUpdateModel: TestInterfaces.PointUpdateModel, project: string, planId: number, suiteId: number, pointIds: string, onResult: (err: any, statusCode: number, Point: TestInterfaces.TestPoint[]) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} testRunId - * @param {number} testResultId - * @param {number} recentDays - * @param onResult callback function with the resulting TestInterfaces.WorkItemReference[] - */ - queryTestResultRecentBugs(project: string, testRunId: number, testResultId: number, recentDays: number, onResult: (err: any, statusCode: number, RecentBugs: TestInterfaces.WorkItemReference[]) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {string} publishContext - * @param {string} groupBy - * @param {string} filter - * @param onResult callback function with the resulting TestInterfaces.TestResultsDetails - */ - getTestResultDetailsForBuild(project: string, buildId: number, publishContext: string, groupBy: string, filter: string, onResult: (err: any, statusCode: number, ResultDetailsByBuild: TestInterfaces.TestResultsDetails) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} releaseId - * @param {number} releaseEnvId - * @param {string} publishContext - * @param {string} groupBy - * @param {string} filter - * @param onResult callback function with the resulting TestInterfaces.TestResultsDetails - */ - getTestResultDetailsForRelease(project: string, releaseId: number, releaseEnvId: number, publishContext: string, groupBy: string, filter: string, onResult: (err: any, statusCode: number, ResultDetailsByRelease: TestInterfaces.TestResultsDetails) => void): void; - /** - * @param {TestInterfaces.ResultRetentionSettings} retentionSettings - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting TestInterfaces.ResultRetentionSettings - */ - createResultRetentionSettings(retentionSettings: TestInterfaces.ResultRetentionSettings, project: string, onResult: (err: any, statusCode: number, ResultRetentionSetting: TestInterfaces.ResultRetentionSettings) => void): void; - /** - * @param {string} project - Project ID or project name - * @param onResult callback function - */ - deleteResultRetentionSettings(project: string, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting TestInterfaces.ResultRetentionSettings - */ - getResultRetentionSettings(project: string, onResult: (err: any, statusCode: number, ResultRetentionSetting: TestInterfaces.ResultRetentionSettings) => void): void; - /** - * @param {TestInterfaces.ResultRetentionSettings} retentionSettings - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting TestInterfaces.ResultRetentionSettings - */ - updateResultRetentionSettings(retentionSettings: TestInterfaces.ResultRetentionSettings, project: string, onResult: (err: any, statusCode: number, ResultRetentionSetting: TestInterfaces.ResultRetentionSettings) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} testCaseResultId - * @param {number} iterationId - * @param {boolean} includeActionResults - * @param onResult callback function with the resulting TestInterfaces.TestIterationDetailsModel - */ - getTestIteration(project: string, runId: number, testCaseResultId: number, iterationId: number, includeActionResults: boolean, onResult: (err: any, statusCode: number, Result: TestInterfaces.TestIterationDetailsModel) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} testCaseResultId - * @param {boolean} includeActionResults - * @param onResult callback function with the resulting TestInterfaces.TestIterationDetailsModel[] - */ - getTestIterations(project: string, runId: number, testCaseResultId: number, includeActionResults: boolean, onResult: (err: any, statusCode: number, Results: TestInterfaces.TestIterationDetailsModel[]) => void): void; - /** - * @param {TestInterfaces.TestResultCreateModel[]} resultCreateModels - * @param {string} project - Project ID or project name - * @param {number} runId - * @param onResult callback function with the resulting TestInterfaces.TestCaseResult[] - */ - addTestResultsToTestRun(resultCreateModels: TestInterfaces.TestResultCreateModel[], project: string, runId: number, onResult: (err: any, statusCode: number, Results: TestInterfaces.TestCaseResult[]) => void): void; - /** - * @param {TestInterfaces.TestCaseResultUpdateModel} resultUpdateModel - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number[]} resultIds - * @param onResult callback function with the resulting TestInterfaces.TestCaseResult[] - */ - bulkUpdateTestResults(resultUpdateModel: TestInterfaces.TestCaseResultUpdateModel, project: string, runId: number, resultIds: number[], onResult: (err: any, statusCode: number, Result: TestInterfaces.TestCaseResult[]) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} testCaseResultId - * @param {boolean} includeIterationDetails - * @param {boolean} includeAssociatedBugs - * @param onResult callback function with the resulting TestInterfaces.TestCaseResult - */ - getTestCaseResultById(project: string, runId: number, testCaseResultId: number, includeIterationDetails: boolean, includeAssociatedBugs: boolean, onResult: (err: any, statusCode: number, Result: TestInterfaces.TestCaseResult) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {boolean} includeIterationDetails - * @param onResult callback function with the resulting TestInterfaces.TestCaseResult[] - */ - getTestCaseResults(project: string, runId: number, includeIterationDetails: boolean, onResult: (err: any, statusCode: number, Results: TestInterfaces.TestCaseResult[]) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} testCaseResultId - * @param {TestInterfaces.ResultDetails} detailsToInclude - * @param onResult callback function with the resulting TestInterfaces.TestCaseResult[] - */ - getTestResultById(project: string, runId: number, testCaseResultId: number, detailsToInclude: TestInterfaces.ResultDetails, onResult: (err: any, statusCode: number, Results: TestInterfaces.TestCaseResult[]) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {TestInterfaces.ResultDetails} detailsToInclude - * @param {number} skip - * @param {number} top - * @param onResult callback function with the resulting TestInterfaces.TestCaseResult[] - */ - getTestResults(project: string, runId: number, detailsToInclude: TestInterfaces.ResultDetails, skip: number, top: number, onResult: (err: any, statusCode: number, Results: TestInterfaces.TestCaseResult[]) => void): void; - /** - * @param {TestInterfaces.TestCaseResultUpdateModel[]} resultUpdateModels - * @param {string} project - Project ID or project name - * @param {number} runId - * @param onResult callback function with the resulting TestInterfaces.TestCaseResult[] - */ - updateTestResults(resultUpdateModels: TestInterfaces.TestCaseResultUpdateModel[], project: string, runId: number, onResult: (err: any, statusCode: number, Results: TestInterfaces.TestCaseResult[]) => void): void; - /** - * @param {TestInterfaces.TestCaseResultIdentifier[]} ids - * @param {string} project - Project ID or project name - * @param {string[]} fields - * @param onResult callback function with the resulting TestInterfaces.TestCaseResult[] - */ - getTestResultsByIds(ids: TestInterfaces.TestCaseResultIdentifier[], project: string, fields: string[], onResult: (err: any, statusCode: number, Results: TestInterfaces.TestCaseResult[]) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} testCaseResultId - * @param {number} iterationId - * @param {string} actionPath - * @param onResult callback function with the resulting TestInterfaces.TestActionResultModel[] - */ - getActionResults(project: string, runId: number, testCaseResultId: number, iterationId: number, actionPath: string, onResult: (err: any, statusCode: number, Results: TestInterfaces.TestActionResultModel[]) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} testCaseResultId - * @param {number} iterationId - * @param {string} paramName - * @param onResult callback function with the resulting TestInterfaces.TestResultParameterModel[] - */ - getResultParameters(project: string, runId: number, testCaseResultId: number, iterationId: number, paramName: string, onResult: (err: any, statusCode: number, Results: TestInterfaces.TestResultParameterModel[]) => void): void; - /** - * @param {TestInterfaces.QueryModel} query - * @param {string} project - Project ID or project name - * @param {boolean} includeResultDetails - * @param {boolean} includeIterationDetails - * @param {number} skip - * @param {number} top - * @param onResult callback function with the resulting TestInterfaces.TestCaseResult[] - */ - getTestResultsByQuery(query: TestInterfaces.QueryModel, project: string, includeResultDetails: boolean, includeIterationDetails: boolean, skip: number, top: number, onResult: (err: any, statusCode: number, Result: TestInterfaces.TestCaseResult[]) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {string} publishContext - * @param {boolean} includeFailureDetails - * @param {TestInterfaces.BuildReference} buildToCompare - * @param onResult callback function with the resulting TestInterfaces.TestResultSummary - */ - queryTestResultsReportForBuild(project: string, buildId: number, publishContext: string, includeFailureDetails: boolean, buildToCompare: TestInterfaces.BuildReference, onResult: (err: any, statusCode: number, ResultSummaryByBuild: TestInterfaces.TestResultSummary) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} releaseId - * @param {number} releaseEnvId - * @param {string} publishContext - * @param {boolean} includeFailureDetails - * @param {TestInterfaces.ReleaseReference} releaseToCompare - * @param onResult callback function with the resulting TestInterfaces.TestResultSummary - */ - queryTestResultsReportForRelease(project: string, releaseId: number, releaseEnvId: number, publishContext: string, includeFailureDetails: boolean, releaseToCompare: TestInterfaces.ReleaseReference, onResult: (err: any, statusCode: number, ResultSummaryByRelease: TestInterfaces.TestResultSummary) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} testRunId - * @param {number} testResultId - * @param {number} historyDays - * @param {number} top - * @param onResult callback function with the resulting TestInterfaces.TestCaseResult[] - */ - queryTestResultTrendReport(project: string, testRunId: number, testResultId: number, historyDays: number, top: number, onResult: (err: any, statusCode: number, ResultTrend: TestInterfaces.TestCaseResult[]) => void): void; - /** - * @param {TestInterfaces.TestResultTrendFilter} filter - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting TestInterfaces.AggregatedDataForResultTrend[] - */ - queryResultTrendForBuild(filter: TestInterfaces.TestResultTrendFilter, project: string, onResult: (err: any, statusCode: number, ResultTrendByBuild: TestInterfaces.AggregatedDataForResultTrend[]) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} runId - * @param onResult callback function with the resulting TestInterfaces.TestRunStatistic - */ - getTestRunStatistics(project: string, runId: number, onResult: (err: any, statusCode: number, Run: TestInterfaces.TestRunStatistic) => void): void; - /** - * @param {TestInterfaces.QueryModel} query - * @param {string} project - Project ID or project name - * @param {boolean} includeRunDetails - * @param {number} skip - * @param {number} top - * @param onResult callback function with the resulting TestInterfaces.TestRun[] - */ - getTestRunsByQuery(query: TestInterfaces.QueryModel, project: string, includeRunDetails: boolean, skip: number, top: number, onResult: (err: any, statusCode: number, Run: TestInterfaces.TestRun[]) => void): void; - /** - * @param {TestInterfaces.RunCreateModel} testRun - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting TestInterfaces.TestRun - */ - createTestRun(testRun: TestInterfaces.RunCreateModel, project: string, onResult: (err: any, statusCode: number, Run: TestInterfaces.TestRun) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} runId - * @param onResult callback function - */ - deleteTestRun(project: string, runId: number, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} runId - * @param onResult callback function with the resulting TestInterfaces.TestRun - */ - getTestRunById(project: string, runId: number, onResult: (err: any, statusCode: number, Run: TestInterfaces.TestRun) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {string} buildUri - * @param {string} owner - * @param {string} tmiRunId - * @param {number} planId - * @param {boolean} includeRunDetails - * @param {boolean} automated - * @param {number} skip - * @param {number} top - * @param onResult callback function with the resulting TestInterfaces.TestRun[] - */ - getTestRuns(project: string, buildUri: string, owner: string, tmiRunId: string, planId: number, includeRunDetails: boolean, automated: boolean, skip: number, top: number, onResult: (err: any, statusCode: number, Runs: TestInterfaces.TestRun[]) => void): void; - /** - * @param {TestInterfaces.RunUpdateModel} runUpdateModel - * @param {string} project - Project ID or project name - * @param {number} runId - * @param onResult callback function with the resulting TestInterfaces.TestRun - */ - updateTestRun(runUpdateModel: TestInterfaces.RunUpdateModel, project: string, runId: number, onResult: (err: any, statusCode: number, Run: TestInterfaces.TestRun) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} operationId - * @param {boolean} includeDetails - * @param onResult callback function with the resulting TestInterfaces.CloneOperationInformation - */ - getSuiteCloneInformation(project: string, operationId: number, includeDetails: boolean, onResult: (err: any, statusCode: number, Suite: TestInterfaces.CloneOperationInformation) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} planId - * @param {number} suiteId - * @param {string} testCaseIds - * @param onResult callback function with the resulting TestInterfaces.SuiteTestCase[] - */ - addTestCasesToSuite(project: string, planId: number, suiteId: number, testCaseIds: string, onResult: (err: any, statusCode: number, Suites: TestInterfaces.SuiteTestCase[]) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} planId - * @param {number} suiteId - * @param {number} testCaseIds - * @param onResult callback function with the resulting TestInterfaces.SuiteTestCase - */ - getTestCaseById(project: string, planId: number, suiteId: number, testCaseIds: number, onResult: (err: any, statusCode: number, Suite: TestInterfaces.SuiteTestCase) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} planId - * @param {number} suiteId - * @param onResult callback function with the resulting TestInterfaces.SuiteTestCase[] - */ - getTestCases(project: string, planId: number, suiteId: number, onResult: (err: any, statusCode: number, Suites: TestInterfaces.SuiteTestCase[]) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} planId - * @param {number} suiteId - * @param {string} testCaseIds - * @param onResult callback function - */ - removeTestCasesFromSuiteUrl(project: string, planId: number, suiteId: number, testCaseIds: string, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {TestInterfaces.SuiteCreateModel} testSuite - * @param {string} project - Project ID or project name - * @param {number} planId - * @param {number} suiteId - * @param onResult callback function with the resulting TestInterfaces.TestSuite[] - */ - createTestSuite(testSuite: TestInterfaces.SuiteCreateModel, project: string, planId: number, suiteId: number, onResult: (err: any, statusCode: number, Suite: TestInterfaces.TestSuite[]) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} planId - * @param {number} suiteId - * @param onResult callback function - */ - deleteTestSuite(project: string, planId: number, suiteId: number, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} planId - * @param {number} suiteId - * @param {boolean} includeChildSuites - * @param onResult callback function with the resulting TestInterfaces.TestSuite - */ - getTestSuiteById(project: string, planId: number, suiteId: number, includeChildSuites: boolean, onResult: (err: any, statusCode: number, Suite: TestInterfaces.TestSuite) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} planId - * @param {boolean} includeSuites - * @param {number} skip - * @param {number} top - * @param {boolean} asTreeView - * @param onResult callback function with the resulting TestInterfaces.TestSuite[] - */ - getTestSuitesForPlan(project: string, planId: number, includeSuites: boolean, skip: number, top: number, asTreeView: boolean, onResult: (err: any, statusCode: number, Suites: TestInterfaces.TestSuite[]) => void): void; - /** - * @param {TestInterfaces.SuiteUpdateModel} suiteUpdateModel - * @param {string} project - Project ID or project name - * @param {number} planId - * @param {number} suiteId - * @param onResult callback function with the resulting TestInterfaces.TestSuite - */ - updateTestSuite(suiteUpdateModel: TestInterfaces.SuiteUpdateModel, project: string, planId: number, suiteId: number, onResult: (err: any, statusCode: number, Suite: TestInterfaces.TestSuite) => void): void; - /** - * @param {TestInterfaces.TestSuiteCloneRequest} cloneRequestBody - * @param {string} project - Project ID or project name - * @param {number} sourceSuiteId - * @param {number} planId - * @param onResult callback function with the resulting TestInterfaces.CloneOperationInformation - */ - cloneTestSuite(cloneRequestBody: TestInterfaces.TestSuiteCloneRequest, project: string, sourceSuiteId: number, planId: number, onResult: (err: any, statusCode: number, Suite: TestInterfaces.CloneOperationInformation) => void): void; - /** - * @param {number} testCaseId - * @param onResult callback function with the resulting TestInterfaces.TestSuite[] - */ - getSuitesByTestCaseId(testCaseId: number, onResult: (err: any, statusCode: number, Suites: TestInterfaces.TestSuite[]) => void): void; - /** - * @param {TestInterfaces.TestSettings} testSettings - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting number - */ - createTestSettings(testSettings: TestInterfaces.TestSettings, project: string, onResult: (err: any, statusCode: number, TestSetting: number) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} testSettingsId - * @param onResult callback function - */ - deleteTestSettings(project: string, testSettingsId: number, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} testSettingsId - * @param onResult callback function with the resulting TestInterfaces.TestSettings - */ - getTestSettingsById(project: string, testSettingsId: number, onResult: (err: any, statusCode: number, TestSetting: TestInterfaces.TestSettings) => void): void; - /** - * @param {TestInterfaces.TestVariable} testVariable - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting TestInterfaces.TestVariable - */ - createTestVariable(testVariable: TestInterfaces.TestVariable, project: string, onResult: (err: any, statusCode: number, Variable: TestInterfaces.TestVariable) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} testVariableId - * @param onResult callback function - */ - deleteTestVariable(project: string, testVariableId: number, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} testVariableId - * @param onResult callback function with the resulting TestInterfaces.TestVariable - */ - getTestVariable(project: string, testVariableId: number, onResult: (err: any, statusCode: number, Variable: TestInterfaces.TestVariable) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} skip - * @param {number} top - * @param onResult callback function with the resulting TestInterfaces.TestVariable[] - */ - getTestVariables(project: string, skip: number, top: number, onResult: (err: any, statusCode: number, Variables: TestInterfaces.TestVariable[]) => void): void; - /** - * @param {TestInterfaces.TestVariable} testVariable - * @param {string} project - Project ID or project name - * @param {number} testVariableId - * @param onResult callback function with the resulting TestInterfaces.TestVariable - */ - updateTestVariable(testVariable: TestInterfaces.TestVariable, project: string, testVariableId: number, onResult: (err: any, statusCode: number, Variable: TestInterfaces.TestVariable) => void): void; - } - export class QTestApi extends basem.QClientApiBase implements IQTestApi { - api: TestApi; - constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); - /** - * @param {TestInterfaces.TestAttachmentRequestModel} attachmentRequestModel - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} testCaseResultId - */ - createTestResultAttachment(attachmentRequestModel: TestInterfaces.TestAttachmentRequestModel, project: string, runId: number, testCaseResultId: number): Promise; - /** - * Returns a test result attachment - * - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} testCaseResultId - * @param {number} attachmentId - */ - getTestResultAttachmentContent(project: string, runId: number, testCaseResultId: number, attachmentId: number): Promise; - /** - * Returns a test result attachment - * - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} testCaseResultId - * @param {number} attachmentId - */ - getTestResultAttachmentZip(project: string, runId: number, testCaseResultId: number, attachmentId: number): Promise; - /** - * @param {TestInterfaces.TestAttachmentRequestModel} attachmentRequestModel - * @param {string} project - Project ID or project name - * @param {number} runId - */ - createTestRunAttachment(attachmentRequestModel: TestInterfaces.TestAttachmentRequestModel, project: string, runId: number): Promise; - /** - * Returns a test run attachment - * - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} attachmentId - */ - getTestRunAttachmentContent(project: string, runId: number, attachmentId: number): Promise; - /** - * Returns a test run attachment - * - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} attachmentId - */ - getTestRunAttachmentZip(project: string, runId: number, attachmentId: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} testCaseResultId - */ - getBugsLinkedToTestResult(project: string, runId: number, testCaseResultId: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {number} flags - */ - getBuildCodeCoverage(project: string, buildId: number, flags: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {number} deltaBuildId - */ - getCodeCoverageSummary(project: string, buildId: number, deltaBuildId?: number): Promise; - /** - * http://(tfsserver):8080/tfs/DefaultCollection/_apis/test/CodeCoverage?buildId=10 Request: Json of code coverage summary - * - * @param {TestInterfaces.CodeCoverageData} coverageData - * @param {string} project - Project ID or project name - * @param {number} buildId - */ - updateCodeCoverageSummary(coverageData: TestInterfaces.CodeCoverageData, project: string, buildId: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} flags - */ - getTestRunCodeCoverage(project: string, runId: number, flags: number): Promise; - /** - * @param {TestInterfaces.TestConfiguration} testConfiguration - * @param {string} project - Project ID or project name - */ - createTestConfiguration(testConfiguration: TestInterfaces.TestConfiguration, project: string): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} testConfigurationId - */ - deleteTestConfiguration(project: string, testConfigurationId: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} testConfigurationId - */ - getTestConfigurationById(project: string, testConfigurationId: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} skip - * @param {number} top - * @param {boolean} includeAllProperties - */ - getTestConfigurations(project: string, skip?: number, top?: number, includeAllProperties?: boolean): Promise; - /** - * @param {TestInterfaces.TestConfiguration} testConfiguration - * @param {string} project - Project ID or project name - * @param {number} testConfigurationId - */ - updateTestConfiguration(testConfiguration: TestInterfaces.TestConfiguration, project: string, testConfigurationId: number): Promise; - /** - * @param {TestInterfaces.CustomTestFieldDefinition[]} newFields - * @param {string} project - Project ID or project name - */ - addCustomFields(newFields: TestInterfaces.CustomTestFieldDefinition[], project: string): Promise; - /** - * @param {string} project - Project ID or project name - * @param {TestInterfaces.CustomTestFieldScope} scopeFilter - */ - queryCustomFields(project: string, scopeFilter: TestInterfaces.CustomTestFieldScope): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} runId - */ - getTestRunLogs(project: string, runId: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} operationId - * @param {boolean} includeDetails - */ - getPlanCloneInformation(project: string, operationId: number, includeDetails?: boolean): Promise; - /** - * @param {TestInterfaces.PlanUpdateModel} testPlan - * @param {string} project - Project ID or project name - */ - createTestPlan(testPlan: TestInterfaces.PlanUpdateModel, project: string): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} planId - */ - deleteTestPlan(project: string, planId: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} planId - */ - getPlanById(project: string, planId: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {string} owner - * @param {number} skip - * @param {number} top - * @param {boolean} includePlanDetails - * @param {boolean} filterActivePlans - */ - getPlans(project: string, owner?: string, skip?: number, top?: number, includePlanDetails?: boolean, filterActivePlans?: boolean): Promise; - /** - * @param {TestInterfaces.PlanUpdateModel} planUpdateModel - * @param {string} project - Project ID or project name - * @param {number} planId - */ - updateTestPlan(planUpdateModel: TestInterfaces.PlanUpdateModel, project: string, planId: number): Promise; - /** - * @param {TestInterfaces.TestPlanCloneRequest} cloneRequestBody - * @param {string} project - Project ID or project name - * @param {number} sourcePlanId - */ - cloneTestPlan(cloneRequestBody: TestInterfaces.TestPlanCloneRequest, project: string, sourcePlanId: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} planId - * @param {number} suiteId - * @param {number} pointIds - * @param {string} witFields - */ - getPoint(project: string, planId: number, suiteId: number, pointIds: number, witFields?: string): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} planId - * @param {number} suiteId - * @param {string} witFields - * @param {string} configurationId - * @param {string} testCaseId - * @param {string} testPointIds - * @param {boolean} includePointDetails - * @param {number} skip - * @param {number} top - */ - getPoints(project: string, planId: number, suiteId: number, witFields?: string, configurationId?: string, testCaseId?: string, testPointIds?: string, includePointDetails?: boolean, skip?: number, top?: number): Promise; - /** - * @param {TestInterfaces.PointUpdateModel} pointUpdateModel - * @param {string} project - Project ID or project name - * @param {number} planId - * @param {number} suiteId - * @param {string} pointIds - */ - updateTestPoints(pointUpdateModel: TestInterfaces.PointUpdateModel, project: string, planId: number, suiteId: number, pointIds: string): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} testRunId - * @param {number} testResultId - * @param {number} recentDays - */ - queryTestResultRecentBugs(project: string, testRunId: number, testResultId: number, recentDays?: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {string} publishContext - * @param {string} groupBy - * @param {string} filter - */ - getTestResultDetailsForBuild(project: string, buildId: number, publishContext?: string, groupBy?: string, filter?: string): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} releaseId - * @param {number} releaseEnvId - * @param {string} publishContext - * @param {string} groupBy - * @param {string} filter - */ - getTestResultDetailsForRelease(project: string, releaseId: number, releaseEnvId: number, publishContext?: string, groupBy?: string, filter?: string): Promise; - /** - * @param {TestInterfaces.ResultRetentionSettings} retentionSettings - * @param {string} project - Project ID or project name - */ - createResultRetentionSettings(retentionSettings: TestInterfaces.ResultRetentionSettings, project: string): Promise; - /** - * @param {string} project - Project ID or project name - */ - deleteResultRetentionSettings(project: string): Promise; - /** - * @param {string} project - Project ID or project name - */ - getResultRetentionSettings(project: string): Promise; - /** - * @param {TestInterfaces.ResultRetentionSettings} retentionSettings - * @param {string} project - Project ID or project name - */ - updateResultRetentionSettings(retentionSettings: TestInterfaces.ResultRetentionSettings, project: string): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} testCaseResultId - * @param {number} iterationId - * @param {boolean} includeActionResults - */ - getTestIteration(project: string, runId: number, testCaseResultId: number, iterationId: number, includeActionResults?: boolean): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} testCaseResultId - * @param {boolean} includeActionResults - */ - getTestIterations(project: string, runId: number, testCaseResultId: number, includeActionResults?: boolean): Promise; - /** - * @param {TestInterfaces.TestResultCreateModel[]} resultCreateModels - * @param {string} project - Project ID or project name - * @param {number} runId - */ - addTestResultsToTestRun(resultCreateModels: TestInterfaces.TestResultCreateModel[], project: string, runId: number): Promise; - /** - * @param {TestInterfaces.TestCaseResultUpdateModel} resultUpdateModel - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number[]} resultIds - */ - bulkUpdateTestResults(resultUpdateModel: TestInterfaces.TestCaseResultUpdateModel, project: string, runId: number, resultIds: number[]): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} testCaseResultId - * @param {boolean} includeIterationDetails - * @param {boolean} includeAssociatedBugs - */ - getTestCaseResultById(project: string, runId: number, testCaseResultId: number, includeIterationDetails: boolean, includeAssociatedBugs?: boolean): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {boolean} includeIterationDetails - */ - getTestCaseResults(project: string, runId: number, includeIterationDetails: boolean): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} testCaseResultId - * @param {TestInterfaces.ResultDetails} detailsToInclude - */ - getTestResultById(project: string, runId: number, testCaseResultId: number, detailsToInclude?: TestInterfaces.ResultDetails): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {TestInterfaces.ResultDetails} detailsToInclude - * @param {number} skip - * @param {number} top - */ - getTestResults(project: string, runId: number, detailsToInclude?: TestInterfaces.ResultDetails, skip?: number, top?: number): Promise; - /** - * @param {TestInterfaces.TestCaseResultUpdateModel[]} resultUpdateModels - * @param {string} project - Project ID or project name - * @param {number} runId - */ - updateTestResults(resultUpdateModels: TestInterfaces.TestCaseResultUpdateModel[], project: string, runId: number): Promise; - /** - * @param {TestInterfaces.TestCaseResultIdentifier[]} ids - * @param {string} project - Project ID or project name - * @param {string[]} fields - */ - getTestResultsByIds(ids: TestInterfaces.TestCaseResultIdentifier[], project: string, fields: string[]): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} testCaseResultId - * @param {number} iterationId - * @param {string} actionPath - */ - getActionResults(project: string, runId: number, testCaseResultId: number, iterationId: number, actionPath?: string): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} runId - * @param {number} testCaseResultId - * @param {number} iterationId - * @param {string} paramName - */ - getResultParameters(project: string, runId: number, testCaseResultId: number, iterationId: number, paramName?: string): Promise; - /** - * @param {TestInterfaces.QueryModel} query - * @param {string} project - Project ID or project name - * @param {boolean} includeResultDetails - * @param {boolean} includeIterationDetails - * @param {number} skip - * @param {number} top - */ - getTestResultsByQuery(query: TestInterfaces.QueryModel, project: string, includeResultDetails?: boolean, includeIterationDetails?: boolean, skip?: number, top?: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} buildId - * @param {string} publishContext - * @param {boolean} includeFailureDetails - * @param {TestInterfaces.BuildReference} buildToCompare - */ - queryTestResultsReportForBuild(project: string, buildId: number, publishContext?: string, includeFailureDetails?: boolean, buildToCompare?: TestInterfaces.BuildReference): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} releaseId - * @param {number} releaseEnvId - * @param {string} publishContext - * @param {boolean} includeFailureDetails - * @param {TestInterfaces.ReleaseReference} releaseToCompare - */ - queryTestResultsReportForRelease(project: string, releaseId: number, releaseEnvId: number, publishContext?: string, includeFailureDetails?: boolean, releaseToCompare?: TestInterfaces.ReleaseReference): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} testRunId - * @param {number} testResultId - * @param {number} historyDays - * @param {number} top - */ - queryTestResultTrendReport(project: string, testRunId: number, testResultId: number, historyDays?: number, top?: number): Promise; - /** - * @param {TestInterfaces.TestResultTrendFilter} filter - * @param {string} project - Project ID or project name - */ - queryResultTrendForBuild(filter: TestInterfaces.TestResultTrendFilter, project: string): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} runId - */ - getTestRunStatistics(project: string, runId: number): Promise; - /** - * @param {TestInterfaces.QueryModel} query - * @param {string} project - Project ID or project name - * @param {boolean} includeRunDetails - * @param {number} skip - * @param {number} top - */ - getTestRunsByQuery(query: TestInterfaces.QueryModel, project: string, includeRunDetails?: boolean, skip?: number, top?: number): Promise; - /** - * @param {TestInterfaces.RunCreateModel} testRun - * @param {string} project - Project ID or project name - */ - createTestRun(testRun: TestInterfaces.RunCreateModel, project: string): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} runId - */ - deleteTestRun(project: string, runId: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} runId - */ - getTestRunById(project: string, runId: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {string} buildUri - * @param {string} owner - * @param {string} tmiRunId - * @param {number} planId - * @param {boolean} includeRunDetails - * @param {boolean} automated - * @param {number} skip - * @param {number} top - */ - getTestRuns(project: string, buildUri?: string, owner?: string, tmiRunId?: string, planId?: number, includeRunDetails?: boolean, automated?: boolean, skip?: number, top?: number): Promise; - /** - * @param {TestInterfaces.RunUpdateModel} runUpdateModel - * @param {string} project - Project ID or project name - * @param {number} runId - */ - updateTestRun(runUpdateModel: TestInterfaces.RunUpdateModel, project: string, runId: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} operationId - * @param {boolean} includeDetails - */ - getSuiteCloneInformation(project: string, operationId: number, includeDetails?: boolean): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} planId - * @param {number} suiteId - * @param {string} testCaseIds - */ - addTestCasesToSuite(project: string, planId: number, suiteId: number, testCaseIds: string): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} planId - * @param {number} suiteId - * @param {number} testCaseIds - */ - getTestCaseById(project: string, planId: number, suiteId: number, testCaseIds: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} planId - * @param {number} suiteId - */ - getTestCases(project: string, planId: number, suiteId: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} planId - * @param {number} suiteId - * @param {string} testCaseIds - */ - removeTestCasesFromSuiteUrl(project: string, planId: number, suiteId: number, testCaseIds: string): Promise; - /** - * @param {TestInterfaces.SuiteCreateModel} testSuite - * @param {string} project - Project ID or project name - * @param {number} planId - * @param {number} suiteId - */ - createTestSuite(testSuite: TestInterfaces.SuiteCreateModel, project: string, planId: number, suiteId: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} planId - * @param {number} suiteId - */ - deleteTestSuite(project: string, planId: number, suiteId: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} planId - * @param {number} suiteId - * @param {boolean} includeChildSuites - */ - getTestSuiteById(project: string, planId: number, suiteId: number, includeChildSuites?: boolean): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} planId - * @param {boolean} includeSuites - * @param {number} skip - * @param {number} top - * @param {boolean} asTreeView - */ - getTestSuitesForPlan(project: string, planId: number, includeSuites?: boolean, skip?: number, top?: number, asTreeView?: boolean): Promise; - /** - * @param {TestInterfaces.SuiteUpdateModel} suiteUpdateModel - * @param {string} project - Project ID or project name - * @param {number} planId - * @param {number} suiteId - */ - updateTestSuite(suiteUpdateModel: TestInterfaces.SuiteUpdateModel, project: string, planId: number, suiteId: number): Promise; - /** - * @param {TestInterfaces.TestSuiteCloneRequest} cloneRequestBody - * @param {string} project - Project ID or project name - * @param {number} sourceSuiteId - * @param {number} planId - */ - cloneTestSuite(cloneRequestBody: TestInterfaces.TestSuiteCloneRequest, project: string, sourceSuiteId: number, planId: number): Promise; - /** - * @param {number} testCaseId - */ - getSuitesByTestCaseId(testCaseId: number): Promise; - /** - * @param {TestInterfaces.TestSettings} testSettings - * @param {string} project - Project ID or project name - */ - createTestSettings(testSettings: TestInterfaces.TestSettings, project: string): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} testSettingsId - */ - deleteTestSettings(project: string, testSettingsId: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} testSettingsId - */ - getTestSettingsById(project: string, testSettingsId: number): Promise; - /** - * @param {TestInterfaces.TestVariable} testVariable - * @param {string} project - Project ID or project name - */ - createTestVariable(testVariable: TestInterfaces.TestVariable, project: string): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} testVariableId - */ - deleteTestVariable(project: string, testVariableId: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} testVariableId - */ - getTestVariable(project: string, testVariableId: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} skip - * @param {number} top - */ - getTestVariables(project: string, skip?: number, top?: number): Promise; - /** - * @param {TestInterfaces.TestVariable} testVariable - * @param {string} project - Project ID or project name - * @param {number} testVariableId - */ - updateTestVariable(testVariable: TestInterfaces.TestVariable, project: string, testVariableId: number): Promise; - } - -} -declare module 'vso-node-api/interfaces/TfvcInterfaces' { - import TfsCoreInterfaces = require('vso-node-api/interfaces/CoreInterfaces'); - import VSSInterfaces = require('vso-node-api/interfaces/common/VSSInterfaces'); - export interface AssociatedWorkItem { - assignedTo: string; - id: number; - state: string; - title: string; - /** - * REST url - */ - url: string; - webUrl: string; - workItemType: string; - } - export interface Change { - changeType: VersionControlChangeType; - item: T; - newContent: ItemContent; - sourceServerItem: string; - url: string; - } - export interface ChangeCountDictionary { - } - export interface ChangeList { - allChangesIncluded: boolean; - changeCounts: { - [key: number]: number; - }; - changes: Change[]; - comment: string; - commentTruncated: boolean; - creationDate: Date; - notes: CheckinNote[]; - owner: string; - ownerDisplayName: string; - ownerId: string; - sortDate: Date; - version: string; - } - /** - * Criteria used in a search for change lists - */ - export interface ChangeListSearchCriteria { - /** - * If provided, a version descriptor to compare against base - */ - compareVersion: string; - /** - * If true, don't include delete history entries - */ - excludeDeletes: boolean; - /** - * Whether or not to follow renames for the given item being queried - */ - followRenames: boolean; - /** - * If provided, only include history entries created after this date (string) - */ - fromDate: string; - /** - * If provided, a version descriptor for the earliest change list to include - */ - fromVersion: string; - /** - * Path of item to search under - */ - itemPath: string; - /** - * Version of the items to search - */ - itemVersion: string; - /** - * Number of results to skip (used when clicking more...) - */ - skip: number; - /** - * If provided, only include history entries created before this date (string) - */ - toDate: string; - /** - * If provided, the maximum number of history entries to return - */ - top: number; - /** - * If provided, a version descriptor for the latest change list to include - */ - toVersion: string; - /** - * Alias or display name of user who made the changes - */ - user: string; - } - export interface CheckinNote { - name: string; - value: string; - } - export interface FileContentMetadata { - contentType: string; - encoding: number; - extension: string; - fileName: string; - isBinary: boolean; - isImage: boolean; - vsLink: string; - } - export interface GitBaseVersionDescriptor extends GitVersionDescriptor { - /** - * Version string identifier (name of tag/branch, SHA1 of commit) - */ - baseVersion: string; - /** - * Version options - Specify additional modifiers to version (e.g Previous) - */ - baseVersionOptions: GitVersionOptions; - /** - * Version type (branch, tag, or commit). Determines how Id is interpreted - */ - baseVersionType: GitVersionType; - } - export interface GitBlobRef { - _links: any; - /** - * SHA1 hash of git object - */ - objectId: string; - /** - * Size of blob content (in bytes) - */ - size: number; - url: string; - } - export interface GitBranchStats { - aheadCount: number; - behindCount: number; - commit: GitCommitRef; - isBaseVersion: boolean; - name: string; - } - export interface GitChange extends Change { - } - export interface GitCommit extends GitCommitRef { - push: GitPushRef; - treeId: string; - } - export interface GitCommitChanges { - changeCounts: ChangeCountDictionary; - changes: GitChange[]; - } - export interface GitCommitDiffs { - aheadCount: number; - allChangesIncluded: boolean; - baseCommit: string; - behindCount: number; - changeCounts: { - [key: number]: number; - }; - changes: GitChange[]; - commonCommit: string; - targetCommit: string; - } - export interface GitCommitRef { - _links: any; - author: GitUserDate; - changeCounts: ChangeCountDictionary; - changes: GitChange[]; - comment: string; - commentTruncated: boolean; - commitId: string; - committer: GitUserDate; - parents: string[]; - remoteUrl: string; - url: string; - } - export interface GitCommitToCreate { - baseRef: GitRef; - comment: string; - pathActions: GitPathAction[]; - } - export interface GitDeletedRepository { - createdDate: Date; - deletedBy: VSSInterfaces.IdentityRef; - deletedDate: Date; - id: string; - name: string; - project: TfsCoreInterfaces.TeamProjectReference; - } - export interface GitHistoryQueryResults extends HistoryQueryResults { - /** - * Seed commit used for querying history. Used for skip feature. - */ - startingCommitId: string; - unpopulatedCount: number; - unprocessedCount: number; - } - export interface GitItem extends ItemModel { - /** - * SHA1 of commit item was fetched at - */ - commitId: string; - /** - * Type of object (Commit, Tree, Blob, Tag, ...) - */ - gitObjectType: GitObjectType; - /** - * Shallow ref to commit that last changed this item Only populated if latestProcessedChange is requested May not be accurate if latest change is not yet cached - */ - latestProcessedChange: GitCommitRef; - /** - * Git object id - */ - objectId: string; - /** - * Git object id - */ - originalObjectId: string; - } - export interface GitItemDescriptor { - /** - * Path to item - */ - path: string; - /** - * Specifies whether to include children (OneLevel), all descendants (Full), or None - */ - recursionLevel: VersionControlRecursionType; - /** - * Version string (interpretation based on VersionType defined in subclass - */ - version: string; - /** - * Version modifiers (e.g. previous) - */ - versionOptions: GitVersionOptions; - /** - * How to interpret version (branch,tag,commit) - */ - versionType: GitVersionType; - } - export interface GitItemRequestData { - /** - * Whether to include metadata for all items - */ - includeContentMetadata: boolean; - /** - * Whether to include the _links field on the shallow references - */ - includeLinks: boolean; - /** - * Collection of items to fetch, including path, version, and recursion level - */ - itemDescriptors: GitItemDescriptor[]; - /** - * Whether to include shallow ref to commit that last changed each item - */ - latestProcessedChange: boolean; - } - export interface GitLimitedRefCriteria { - _links: any; - refExactMatches: string[]; - refNamespaces: string[]; - url: string; - } - export enum GitObjectType { - Bad = 0, - Commit = 1, - Tree = 2, - Blob = 3, - Tag = 4, - Ext2 = 5, - OfsDelta = 6, - RefDelta = 7, - } - export interface GitPathAction { - action: GitPathActions; - base64Content: string; - path: string; - rawTextContent: string; - targetPath: string; - } - export enum GitPathActions { - None = 0, - Edit = 1, - Delete = 2, - Add = 3, - Rename = 4, - } - export enum GitPermissionScope { - Project = 0, - Repository = 1, - Branch = 2, - } - export interface GitPullRequest { - _links: any; - closedDate: Date; - codeReviewId: number; - commits: GitCommitRef[]; - completionOptions: GitPullRequestCompletionOptions; - completionQueueTime: Date; - createdBy: VSSInterfaces.IdentityRef; - creationDate: Date; - description: string; - lastMergeCommit: GitCommitRef; - lastMergeSourceCommit: GitCommitRef; - lastMergeTargetCommit: GitCommitRef; - mergeId: string; - mergeStatus: PullRequestAsyncStatus; - pullRequestId: number; - remoteUrl: string; - repository: GitRepository; - reviewers: IdentityRefWithVote[]; - sourceRefName: string; - status: PullRequestStatus; - targetRefName: string; - title: string; - upgraded: boolean; - url: string; - workItemRefs: VSSInterfaces.ResourceRef[]; - } - export interface GitPullRequestCompletionOptions { - deleteSourceBranch: boolean; - mergeCommitMessage: string; - squashMerge: boolean; - } - export interface GitPullRequestSearchCriteria { - creatorId: string; - /** - * Whether to include the _links field on the shallow references - */ - includeLinks: boolean; - repositoryId: string; - reviewerId: string; - sourceRefName: string; - status: PullRequestStatus; - targetRefName: string; - } - export interface GitPush extends GitPushRef { - commits: GitCommitRef[]; - refUpdates: GitRefUpdate[]; - repository: GitRepository; - } - export interface GitPushEventData { - afterId: string; - beforeId: string; - branch: string; - commits: GitCommit[]; - repository: GitRepository; - } - export interface GitPushRef { - _links: any; - date: Date; - pushCorrelationId: string; - pushedBy: VSSInterfaces.IdentityRef; - pushId: number; - url: string; - } - export interface GitPushSearchCriteria { - fromDate: Date; - /** - * Whether to include the _links field on the shallow references - */ - includeLinks: boolean; - includeRefUpdates: boolean; - pusherId: string; - refName: string; - toDate: Date; - } - export interface GitQueryCommitsCriteria { - /** - * Number of entries to skip - */ - $skip: number; - /** - * Maximum number of entries to retrieve - */ - $top: number; - /** - * Alias or display name of the author - */ - author: string; - /** - * If provided, the earliest commit in the graph to search - */ - compareVersion: GitVersionDescriptor; - /** - * If true, don't include delete history entries - */ - excludeDeletes: boolean; - /** - * If provided, a lower bound for filtering commits alphabetically - */ - fromCommitId: string; - /** - * If provided, only include history entries created after this date (string) - */ - fromDate: string; - /** - * If provided, specifies the exact commit ids of the commits to fetch. May not be combined with other parameters. - */ - ids: string[]; - /** - * Whether to include the _links field on the shallow references - */ - includeLinks: boolean; - /** - * Path of item to search under - */ - itemPath: string; - /** - * If provided, identifies the commit or branch to search - */ - itemVersion: GitVersionDescriptor; - /** - * If provided, an upper bound for filtering commits alphabetically - */ - toCommitId: string; - /** - * If provided, only include history entries created before this date (string) - */ - toDate: string; - /** - * Alias or display name of the committer - */ - user: string; - } - export interface GitRef { - _links: any; - isLockedBy: VSSInterfaces.IdentityRef; - name: string; - objectId: string; - statuses: GitStatus[]; - url: string; - } - export interface GitRefUpdate { - name: string; - newObjectId: string; - oldObjectId: string; - repositoryId: string; - } - export enum GitRefUpdateMode { - /** - * Indicates the Git protocol model where any refs that can be updated will be updated, but any failures will not prevent other updates from succeeding. - */ - BestEffort = 0, - /** - * Indicates that all ref updates must succeed or none will succeed. All ref updates will be atomically written. If any failure is encountered, previously successful updates will be rolled back and the entire operation will fail. - */ - AllOrNone = 1, - } - export interface GitRefUpdateResult { - /** - * Custom message for the result object For instance, Reason for failing. - */ - customMessage: string; - /** - * Ref name - */ - name: string; - /** - * New object ID - */ - newObjectId: string; - /** - * Old object ID - */ - oldObjectId: string; - /** - * Name of the plugin that rejected the updated. - */ - rejectedBy: string; - /** - * Repository ID - */ - repositoryId: string; - /** - * True if the ref update succeeded, false otherwise - */ - success: boolean; - /** - * Status of the update from the TFS server. - */ - updateStatus: GitRefUpdateStatus; - } - export interface GitRefUpdateResultSet { - countFailed: number; - countSucceeded: number; - pushCorrelationId: string; - pushIds: { - [key: string]: number; - }; - pushTime: Date; - results: GitRefUpdateResult[]; - } - export enum GitRefUpdateStatus { - /** - * Indicates that the ref update request was completed successfully. - */ - Succeeded = 0, - /** - * Indicates that the ref update request could not be completed because part of the graph would be disconnected by this change, and the caller does not have ForcePush permission on the repository. - */ - ForcePushRequired = 1, - /** - * Indicates that the ref update request could not be completed because the old object ID presented in the request was not the object ID of the ref when the database attempted the update. The most likely scenario is that the caller lost a race to update the ref. - */ - StaleOldObjectId = 2, - /** - * Indicates that the ref update request could not be completed because the ref name presented in the request was not valid. - */ - InvalidRefName = 3, - /** - * The request was not processed - */ - Unprocessed = 4, - /** - * The ref update request could not be completed because the new object ID for the ref could not be resolved to a commit object (potentially through any number of tags) - */ - UnresolvableToCommit = 5, - /** - * The ref update request could not be completed because the user lacks write permissions required to write this ref - */ - WritePermissionRequired = 6, - /** - * The ref update request could not be completed because the user lacks note creation permissions required to write this note - */ - ManageNotePermissionRequired = 7, - /** - * The ref update request could not be completed because the user lacks the permission to create a branch - */ - CreateBranchPermissionRequired = 8, - /** - * The ref update request could not be completed because the user lacks the permission to create a tag - */ - CreateTagPermissionRequired = 9, - /** - * The ref update could not be completed because it was rejected by the plugin. - */ - RejectedByPlugin = 10, - /** - * The ref update could not be completed because the ref is locked by another user. - */ - Locked = 11, - /** - * The ref update could not be completed because, in case-insensitive mode, the ref name conflicts with an existing, differently-cased ref name. - */ - RefNameConflict = 12, - /** - * The ref update could not be completed because it was rejected by policy. - */ - RejectedByPolicy = 13, - /** - * Indicates that the ref update request was completed successfully, but the ref doesn't actually exist so no changes were made. This should only happen during deletes. - */ - SucceededNonExistentRef = 14, - /** - * Indicates that the ref update request was completed successfully, but the passed-in ref was corrupt - as in, the old object ID was bad. This should only happen during deletes. - */ - SucceededCorruptRef = 15, - } - export interface GitRepository { - _links: any; - defaultBranch: string; - id: string; - name: string; - project: TfsCoreInterfaces.TeamProjectReference; - remoteUrl: string; - url: string; - } - export enum GitRepositoryPermissions { - None = 0, - Administer = 1, - GenericRead = 2, - GenericContribute = 4, - ForcePush = 8, - CreateBranch = 16, - CreateTag = 32, - ManageNote = 64, - PolicyExempt = 128, - /** - * This defines the set of bits that are valid for the git permission space. When reading or writing git permissions, these are the only bits paid attention too. - */ - All = 255, - BranchLevelPermissions = 141, - } - export interface GitStatus { - _links: any; - context: GitStatusContext; - createdBy: VSSInterfaces.IdentityRef; - creationDate: Date; - description: string; - state: GitStatusState; - targetUrl: string; - } - export interface GitStatusContext { - genre: string; - name: string; - } - export enum GitStatusState { - NotSet = 0, - Pending = 1, - Succeeded = 2, - Failed = 3, - Error = 4, - } - export interface GitSuggestion { - properties: { - [key: string]: any; - }; - type: string; - } - export interface GitTargetVersionDescriptor extends GitVersionDescriptor { - /** - * Version string identifier (name of tag/branch, SHA1 of commit) - */ - targetVersion: string; - /** - * Version options - Specify additional modifiers to version (e.g Previous) - */ - targetVersionOptions: GitVersionOptions; - /** - * Version type (branch, tag, or commit). Determines how Id is interpreted - */ - targetVersionType: GitVersionType; - } - export interface GitTreeEntryRef { - /** - * Blob or tree - */ - gitObjectType: GitObjectType; - /** - * Mode represented as octal string - */ - mode: string; - /** - * SHA1 hash of git object - */ - objectId: string; - /** - * Path relative to parent tree object - */ - relativePath: string; - /** - * Size of content - */ - size: number; - /** - * url to retrieve tree or blob - */ - url: string; - } - export interface GitTreeRef { - _links: any; - /** - * SHA1 hash of git object - */ - objectId: string; - /** - * Sum of sizes of all children - */ - size: number; - /** - * Blobs and trees under this tree - */ - treeEntries: GitTreeEntryRef[]; - /** - * Url to tree - */ - url: string; - } - export interface GitUserDate { - date: Date; - email: string; - name: string; - } - export interface GitVersionDescriptor { - /** - * Version string identifier (name of tag/branch/index, SHA1 of commit) - */ - version: string; - /** - * Version options - Specify additional modifiers to version (e.g Previous) - */ - versionOptions: GitVersionOptions; - /** - * Version type (branch, tag, commit, or index). Determines how Id is interpreted - */ - versionType: GitVersionType; - } - export enum GitVersionOptions { - /** - * Not specified - */ - None = 0, - /** - * Commit that changed item prior to the current version - */ - PreviousChange = 1, - /** - * First parent of commit (HEAD^) - */ - FirstParent = 2, - } - export enum GitVersionType { - /** - * Interpret the version as a branch name - */ - Branch = 0, - /** - * Interpret the version as a tag name - */ - Tag = 1, - /** - * Interpret the version as a commit ID (SHA1) - */ - Commit = 2, - /** - * Interpret the version as an index name - */ - Index = 3, - } - export interface HistoryEntry { - /** - * The Change list (changeset/commit/shelveset) for this point in history - */ - changeList: ChangeList; - /** - * The change made to the item from this change list (only relevant for File history, not folders) - */ - itemChangeType: VersionControlChangeType; - /** - * The path of the item at this point in history (only relevant for File history, not folders) - */ - serverItem: string; - } - export interface HistoryQueryResults { - /** - * True if there are more results available to fetch (we're returning the max # of items requested) A more RESTy solution would be to include a Link header - */ - moreResultsAvailable: boolean; - /** - * The history entries (results) from this query - */ - results: HistoryEntry[]; - } - export interface IdentityRefWithVote extends VSSInterfaces.IdentityRef { - isRequired: boolean; - reviewerUrl: string; - vote: number; - votedFor: IdentityRefWithVote[]; - } - export interface IncludedGitCommit { - commitId: string; - commitTime: Date; - parentCommitIds: string[]; - repositoryId: string; - } - export interface ItemContent { - content: string; - contentType: ItemContentType; - } - export enum ItemContentType { - RawText = 0, - Base64Encoded = 1, - } - /** - * Optional details to include when returning an item model - */ - export interface ItemDetailsOptions { - /** - * If true, include metadata about the file type - */ - includeContentMetadata: boolean; - /** - * Specifies whether to include children (OneLevel), all descendants (Full) or None for folder items - */ - recursionLevel: VersionControlRecursionType; - } - export interface ItemModel { - _links: any; - contentMetadata: FileContentMetadata; - isFolder: boolean; - isSymLink: boolean; - path: string; - url: string; - } - export enum PullRequestAsyncStatus { - NotSet = 0, - Queued = 1, - Conflicts = 2, - Succeeded = 3, - RejectedByPolicy = 4, - Failure = 5, - } - export enum PullRequestStatus { - NotSet = 0, - Active = 1, - Abandoned = 2, - Completed = 3, - All = 4, - } - export interface TfvcBranch extends TfvcBranchRef { - children: TfvcBranch[]; - mappings: TfvcBranchMapping[]; - parent: TfvcShallowBranchRef; - relatedBranches: TfvcShallowBranchRef[]; - } - export interface TfvcBranchMapping { - depth: string; - serverItem: string; - type: string; - } - export interface TfvcBranchRef extends TfvcShallowBranchRef { - _links: any; - createdDate: Date; - description: string; - isDeleted: boolean; - owner: VSSInterfaces.IdentityRef; - url: string; - } - export interface TfvcChange extends Change { - /** - * List of merge sources in case of rename or branch creation. - */ - mergeSources: TfvcMergeSource[]; - /** - * Version at which a (shelved) change was pended against - */ - pendingVersion: number; - } - export interface TfvcChangeset extends TfvcChangesetRef { - accountId: string; - changes: TfvcChange[]; - checkinNotes: CheckinNote[]; - collectionId: string; - hasMoreChanges: boolean; - policyOverride: TfvcPolicyOverrideInfo; - teamProjectIds: string[]; - workItems: AssociatedWorkItem[]; - } - export interface TfvcChangesetRef { - _links: any; - author: VSSInterfaces.IdentityRef; - changesetId: number; - checkedInBy: VSSInterfaces.IdentityRef; - comment: string; - commentTruncated: boolean; - createdDate: Date; - url: string; - } - /** - * Criteria used in a search for change lists - */ - export interface TfvcChangesetSearchCriteria { - /** - * Alias or display name of user who made the changes - */ - author: string; - /** - * Whether or not to follow renames for the given item being queried - */ - followRenames: boolean; - /** - * If provided, only include changesets created after this date (string) Think of a better name for this. - */ - fromDate: string; - /** - * If provided, only include changesets after this changesetID - */ - fromId: number; - /** - * Whether to include the _links field on the shallow references - */ - includeLinks: boolean; - /** - * Path of item to search under - */ - path: string; - /** - * If provided, only include changesets created before this date (string) Think of a better name for this. - */ - toDate: string; - /** - * If provided, a version descriptor for the latest change list to include - */ - toId: number; - } - export interface TfvcChangesetsRequestData { - changesetIds: number[]; - commentLength: number; - /** - * Whether to include the _links field on the shallow references - */ - includeLinks: boolean; - } - export interface TfvcCheckinEventData { - changeset: TfvcChangeset; - project: TfsCoreInterfaces.TeamProjectReference; - } - export interface TfvcHistoryEntry extends HistoryEntry { - /** - * The encoding of the item at this point in history (only relevant for File history, not folders) - */ - encoding: number; - /** - * The file id of the item at this point in history (only relevant for File history, not folders) - */ - fileId: number; - } - export interface TfvcItem extends ItemModel { - changeDate: Date; - deletionId: number; - /** - * MD5 hash as a base 64 string, applies to files only. - */ - hashValue: string; - isBranch: boolean; - isPendingChange: boolean; - /** - * The size of the file, if applicable. - */ - size: number; - version: number; - } - /** - * Item path and Version descriptor properties - */ - export interface TfvcItemDescriptor { - path: string; - recursionLevel: VersionControlRecursionType; - version: string; - versionOption: TfvcVersionOption; - versionType: TfvcVersionType; - } - export interface TfvcItemRequestData { - /** - * If true, include metadata about the file type - */ - includeContentMetadata: boolean; - /** - * Whether to include the _links field on the shallow references - */ - includeLinks: boolean; - itemDescriptors: TfvcItemDescriptor[]; - } - export interface TfvcLabel extends TfvcLabelRef { - items: TfvcItem[]; - } - export interface TfvcLabelRef { - _links: any; - description: string; - id: number; - labelScope: string; - modifiedDate: Date; - name: string; - owner: VSSInterfaces.IdentityRef; - url: string; - } - export interface TfvcLabelRequestData { - /** - * Whether to include the _links field on the shallow references - */ - includeLinks: boolean; - itemLabelFilter: string; - labelScope: string; - maxItemCount: number; - name: string; - owner: string; - } - export interface TfvcMergeSource { - /** - * Indicates if this a rename source. If false, it is a merge source. - */ - isRename: boolean; - /** - * The server item of the merge source - */ - serverItem: string; - /** - * Start of the version range - */ - versionFrom: number; - /** - * End of the version range - */ - versionTo: number; - } - export interface TfvcPolicyFailureInfo { - message: string; - policyName: string; - } - export interface TfvcPolicyOverrideInfo { - comment: string; - policyFailures: TfvcPolicyFailureInfo[]; - } - export interface TfvcShallowBranchRef { - path: string; - } - export interface TfvcShelveset extends TfvcShelvesetRef { - changes: TfvcChange[]; - notes: CheckinNote[]; - policyOverride: TfvcPolicyOverrideInfo; - workItems: AssociatedWorkItem[]; - } - export interface TfvcShelvesetRef { - _links: any; - comment: string; - commentTruncated: boolean; - createdDate: Date; - id: string; - name: string; - owner: VSSInterfaces.IdentityRef; - url: string; - } - export interface TfvcShelvesetRequestData { - /** - * Whether to include policyOverride and notes - */ - includeDetails: boolean; - /** - * Whether to include the _links field on the shallow references - */ - includeLinks: boolean; - /** - * Whether to include workItems - */ - includeWorkItems: boolean; - /** - * Max number of changes to include - */ - maxChangeCount: number; - /** - * Max length of comment - */ - maxCommentLength: number; - /** - * Shelveset's name - */ - name: string; - /** - * Owner's ID. Could be a name or a guid. - */ - owner: string; - } - export interface TfvcVersionDescriptor { - version: string; - versionOption: TfvcVersionOption; - versionType: TfvcVersionType; - } - export enum TfvcVersionOption { - None = 0, - Previous = 1, - UseRename = 2, - } - export enum TfvcVersionType { - None = 0, - Changeset = 1, - Shelveset = 2, - Change = 3, - Date = 4, - Latest = 5, - Tip = 6, - MergeSource = 7, - } - export interface UpdateRefsRequest { - refUpdateRequests: GitRefUpdate[]; - updateMode: GitRefUpdateMode; - } - export enum VersionControlChangeType { - None = 0, - Add = 1, - Edit = 2, - Encoding = 4, - Rename = 8, - Delete = 16, - Undelete = 32, - Branch = 64, - Merge = 128, - Lock = 256, - Rollback = 512, - SourceRename = 1024, - TargetRename = 2048, - Property = 4096, - All = 8191, - } - export interface VersionControlProjectInfo { - defaultSourceControlType: TfsCoreInterfaces.SourceControlTypes; - project: TfsCoreInterfaces.TeamProjectReference; - supportsGit: boolean; - supportsTFVC: boolean; - } - export enum VersionControlRecursionType { - /** - * Only return the specified item. - */ - None = 0, - /** - * Return the specified item and its direct children. - */ - OneLevel = 1, - /** - * Return the specified item and its direct children, as well as recursive chains of nested child folders that only contain a single folder. - */ - OneLevelPlusNestedEmptyFolders = 4, - /** - * Return specified item and all descendants - */ - Full = 120, - } - export var TypeInfo: { - AssociatedWorkItem: { - fields: any; - }; - Change: { - fields: any; - }; - ChangeCountDictionary: { - fields: any; - }; - ChangeList: { - fields: any; - }; - ChangeListSearchCriteria: { - fields: any; - }; - CheckinNote: { - fields: any; - }; - FileContentMetadata: { - fields: any; - }; - GitBaseVersionDescriptor: { - fields: any; - }; - GitBlobRef: { - fields: any; - }; - GitBranchStats: { - fields: any; - }; - GitChange: { - fields: any; - }; - GitCommit: { - fields: any; - }; - GitCommitChanges: { - fields: any; - }; - GitCommitDiffs: { - fields: any; - }; - GitCommitRef: { - fields: any; - }; - GitCommitToCreate: { - fields: any; - }; - GitDeletedRepository: { - fields: any; - }; - GitHistoryQueryResults: { - fields: any; - }; - GitItem: { - fields: any; - }; - GitItemDescriptor: { - fields: any; - }; - GitItemRequestData: { - fields: any; - }; - GitLimitedRefCriteria: { - fields: any; - }; - GitObjectType: { - enumValues: { - "bad": number; - "commit": number; - "tree": number; - "blob": number; - "tag": number; - "ext2": number; - "ofsDelta": number; - "refDelta": number; - }; - }; - GitPathAction: { - fields: any; - }; - GitPathActions: { - enumValues: { - "none": number; - "edit": number; - "delete": number; - "add": number; - "rename": number; - }; - }; - GitPermissionScope: { - enumValues: { - "project": number; - "repository": number; - "branch": number; - }; - }; - GitPullRequest: { - fields: any; - }; - GitPullRequestCompletionOptions: { - fields: any; - }; - GitPullRequestSearchCriteria: { - fields: any; - }; - GitPush: { - fields: any; - }; - GitPushEventData: { - fields: any; - }; - GitPushRef: { - fields: any; - }; - GitPushSearchCriteria: { - fields: any; - }; - GitQueryCommitsCriteria: { - fields: any; - }; - GitRef: { - fields: any; - }; - GitRefUpdate: { - fields: any; - }; - GitRefUpdateMode: { - enumValues: { - "bestEffort": number; - "allOrNone": number; - }; - }; - GitRefUpdateResult: { - fields: any; - }; - GitRefUpdateResultSet: { - fields: any; - }; - GitRefUpdateStatus: { - enumValues: { - "succeeded": number; - "forcePushRequired": number; - "staleOldObjectId": number; - "invalidRefName": number; - "unprocessed": number; - "unresolvableToCommit": number; - "writePermissionRequired": number; - "manageNotePermissionRequired": number; - "createBranchPermissionRequired": number; - "createTagPermissionRequired": number; - "rejectedByPlugin": number; - "locked": number; - "refNameConflict": number; - "rejectedByPolicy": number; - "succeededNonExistentRef": number; - "succeededCorruptRef": number; - }; - }; - GitRepository: { - fields: any; - }; - GitRepositoryPermissions: { - enumValues: { - "none": number; - "administer": number; - "genericRead": number; - "genericContribute": number; - "forcePush": number; - "createBranch": number; - "createTag": number; - "manageNote": number; - "policyExempt": number; - "all": number; - "branchLevelPermissions": number; - }; - }; - GitStatus: { - fields: any; - }; - GitStatusContext: { - fields: any; - }; - GitStatusState: { - enumValues: { - "notSet": number; - "pending": number; - "succeeded": number; - "failed": number; - "error": number; - }; - }; - GitSuggestion: { - fields: any; - }; - GitTargetVersionDescriptor: { - fields: any; - }; - GitTreeEntryRef: { - fields: any; - }; - GitTreeRef: { - fields: any; - }; - GitUserDate: { - fields: any; - }; - GitVersionDescriptor: { - fields: any; - }; - GitVersionOptions: { - enumValues: { - "none": number; - "previousChange": number; - "firstParent": number; - }; - }; - GitVersionType: { - enumValues: { - "branch": number; - "tag": number; - "commit": number; - "index": number; - }; - }; - HistoryEntry: { - fields: any; - }; - HistoryQueryResults: { - fields: any; - }; - IdentityRefWithVote: { - fields: any; - }; - IncludedGitCommit: { - fields: any; - }; - ItemContent: { - fields: any; - }; - ItemContentType: { - enumValues: { - "rawText": number; - "base64Encoded": number; - }; - }; - ItemDetailsOptions: { - fields: any; - }; - ItemModel: { - fields: any; - }; - PullRequestAsyncStatus: { - enumValues: { - "notSet": number; - "queued": number; - "conflicts": number; - "succeeded": number; - "rejectedByPolicy": number; - "failure": number; - }; - }; - PullRequestStatus: { - enumValues: { - "notSet": number; - "active": number; - "abandoned": number; - "completed": number; - "all": number; - }; - }; - TfvcBranch: { - fields: any; - }; - TfvcBranchMapping: { - fields: any; - }; - TfvcBranchRef: { - fields: any; - }; - TfvcChange: { - fields: any; - }; - TfvcChangeset: { - fields: any; - }; - TfvcChangesetRef: { - fields: any; - }; - TfvcChangesetSearchCriteria: { - fields: any; - }; - TfvcChangesetsRequestData: { - fields: any; - }; - TfvcCheckinEventData: { - fields: any; - }; - TfvcHistoryEntry: { - fields: any; - }; - TfvcItem: { - fields: any; - }; - TfvcItemDescriptor: { - fields: any; - }; - TfvcItemRequestData: { - fields: any; - }; - TfvcLabel: { - fields: any; - }; - TfvcLabelRef: { - fields: any; - }; - TfvcLabelRequestData: { - fields: any; - }; - TfvcMergeSource: { - fields: any; - }; - TfvcPolicyFailureInfo: { - fields: any; - }; - TfvcPolicyOverrideInfo: { - fields: any; - }; - TfvcShallowBranchRef: { - fields: any; - }; - TfvcShelveset: { - fields: any; - }; - TfvcShelvesetRef: { - fields: any; - }; - TfvcShelvesetRequestData: { - fields: any; - }; - TfvcVersionDescriptor: { - fields: any; - }; - TfvcVersionOption: { - enumValues: { - "none": number; - "previous": number; - "useRename": number; - }; - }; - TfvcVersionType: { - enumValues: { - "none": number; - "changeset": number; - "shelveset": number; - "change": number; - "date": number; - "latest": number; - "tip": number; - "mergeSource": number; - }; - }; - UpdateRefsRequest: { - fields: any; - }; - VersionControlChangeType: { - enumValues: { - "none": number; - "add": number; - "edit": number; - "encoding": number; - "rename": number; - "delete": number; - "undelete": number; - "branch": number; - "merge": number; - "lock": number; - "rollback": number; - "sourceRename": number; - "targetRename": number; - "property": number; - "all": number; - }; - }; - VersionControlProjectInfo: { - fields: any; - }; - VersionControlRecursionType: { - enumValues: { - "none": number; - "oneLevel": number; - "oneLevelPlusNestedEmptyFolders": number; - "full": number; - }; - }; - }; - -} -declare module 'vso-node-api/TfvcApi' { - - - import Q = require('q'); - import basem = require('vso-node-api/ClientApiBases'); - import VsoBaseInterfaces = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); - import TfvcInterfaces = require('vso-node-api/interfaces/TfvcInterfaces'); - export interface ITfvcApi extends basem.ClientApiBase { - getBranch(path: string, project: string, includeParent: boolean, includeChildren: boolean, onResult: (err: any, statusCode: number, Branche: TfvcInterfaces.TfvcBranch) => void): void; - getBranches(project: string, includeParent: boolean, includeChildren: boolean, includeDeleted: boolean, includeLinks: boolean, onResult: (err: any, statusCode: number, Branches: TfvcInterfaces.TfvcBranch[]) => void): void; - getBranchRefs(scopePath: string, project: string, includeDeleted: boolean, includeLinks: boolean, onResult: (err: any, statusCode: number, Branches: TfvcInterfaces.TfvcBranchRef[]) => void): void; - getChangesetChanges(id: number, skip: number, top: number, onResult: (err: any, statusCode: number, ChangesetChanges: TfvcInterfaces.TfvcChange[]) => void): void; - createChangeset(changeset: TfvcInterfaces.TfvcChangeset, project: string, onResult: (err: any, statusCode: number, Changeset: TfvcInterfaces.TfvcChangesetRef) => void): void; - getChangeset(id: number, project: string, maxChangeCount: number, includeDetails: boolean, includeWorkItems: boolean, maxCommentLength: number, includeSourceRename: boolean, skip: number, top: number, orderby: string, searchCriteria: TfvcInterfaces.TfvcChangesetSearchCriteria, onResult: (err: any, statusCode: number, Changeset: TfvcInterfaces.TfvcChangeset) => void): void; - getChangesets(project: string, maxChangeCount: number, includeDetails: boolean, includeWorkItems: boolean, maxCommentLength: number, includeSourceRename: boolean, skip: number, top: number, orderby: string, searchCriteria: TfvcInterfaces.TfvcChangesetSearchCriteria, onResult: (err: any, statusCode: number, Changesets: TfvcInterfaces.TfvcChangesetRef[]) => void): void; - getBatchedChangesets(changesetsRequestData: TfvcInterfaces.TfvcChangesetsRequestData, onResult: (err: any, statusCode: number, ChangesetsBatch: TfvcInterfaces.TfvcChangesetRef[]) => void): void; - getChangesetWorkItems(id: number, onResult: (err: any, statusCode: number, ChangesetWorkItems: TfvcInterfaces.AssociatedWorkItem[]) => void): void; - getItemsBatch(itemRequestData: TfvcInterfaces.TfvcItemRequestData, project: string, onResult: (err: any, statusCode: number, ItemBatch: TfvcInterfaces.TfvcItem[][]) => void): void; - getItemsBatchZip(itemRequestData: TfvcInterfaces.TfvcItemRequestData, project: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - getItem(path: string, project: string, fileName: string, download: boolean, scopePath: string, recursionLevel: TfvcInterfaces.VersionControlRecursionType, versionDescriptor: TfvcInterfaces.TfvcVersionDescriptor, onResult: (err: any, statusCode: number, Item: TfvcInterfaces.TfvcItem) => void): void; - getItemContent(path: string, project: string, fileName: string, download: boolean, scopePath: string, recursionLevel: TfvcInterfaces.VersionControlRecursionType, versionDescriptor: TfvcInterfaces.TfvcVersionDescriptor, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - getItems(project: string, scopePath: string, recursionLevel: TfvcInterfaces.VersionControlRecursionType, includeLinks: boolean, versionDescriptor: TfvcInterfaces.TfvcVersionDescriptor, onResult: (err: any, statusCode: number, Items: TfvcInterfaces.TfvcItem[]) => void): void; - getItemText(path: string, project: string, fileName: string, download: boolean, scopePath: string, recursionLevel: TfvcInterfaces.VersionControlRecursionType, versionDescriptor: TfvcInterfaces.TfvcVersionDescriptor, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - getItemZip(path: string, project: string, fileName: string, download: boolean, scopePath: string, recursionLevel: TfvcInterfaces.VersionControlRecursionType, versionDescriptor: TfvcInterfaces.TfvcVersionDescriptor, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - getLabelItems(labelId: string, top: number, skip: number, onResult: (err: any, statusCode: number, LabelItems: TfvcInterfaces.TfvcItem[]) => void): void; - getLabel(labelId: string, requestData: TfvcInterfaces.TfvcLabelRequestData, project: string, onResult: (err: any, statusCode: number, Label: TfvcInterfaces.TfvcLabel) => void): void; - getLabels(requestData: TfvcInterfaces.TfvcLabelRequestData, project: string, top: number, skip: number, onResult: (err: any, statusCode: number, Labels: TfvcInterfaces.TfvcLabelRef[]) => void): void; - getShelvesetChanges(shelvesetId: string, top: number, skip: number, onResult: (err: any, statusCode: number, ShelvesetChanges: TfvcInterfaces.TfvcChange[]) => void): void; - getShelveset(shelvesetId: string, requestData: TfvcInterfaces.TfvcShelvesetRequestData, onResult: (err: any, statusCode: number, Shelveset: TfvcInterfaces.TfvcShelveset) => void): void; - getShelvesets(requestData: TfvcInterfaces.TfvcShelvesetRequestData, top: number, skip: number, onResult: (err: any, statusCode: number, Shelvesets: TfvcInterfaces.TfvcShelvesetRef[]) => void): void; - getShelvesetWorkItems(shelvesetId: string, onResult: (err: any, statusCode: number, ShelvesetWorkItems: TfvcInterfaces.AssociatedWorkItem[]) => void): void; - } - export interface IQTfvcApi extends basem.QClientApiBase { - getBranch(path: string, project?: string, includeParent?: boolean, includeChildren?: boolean): Promise; - getBranches(project?: string, includeParent?: boolean, includeChildren?: boolean, includeDeleted?: boolean, includeLinks?: boolean): Promise; - getBranchRefs(scopePath: string, project?: string, includeDeleted?: boolean, includeLinks?: boolean): Promise; - getChangesetChanges(id?: number, skip?: number, top?: number): Promise; - createChangeset(changeset: TfvcInterfaces.TfvcChangeset, project?: string): Promise; - getChangeset(id: number, project?: string, maxChangeCount?: number, includeDetails?: boolean, includeWorkItems?: boolean, maxCommentLength?: number, includeSourceRename?: boolean, skip?: number, top?: number, orderby?: string, searchCriteria?: TfvcInterfaces.TfvcChangesetSearchCriteria): Promise; - getChangesets(project?: string, maxChangeCount?: number, includeDetails?: boolean, includeWorkItems?: boolean, maxCommentLength?: number, includeSourceRename?: boolean, skip?: number, top?: number, orderby?: string, searchCriteria?: TfvcInterfaces.TfvcChangesetSearchCriteria): Promise; - getBatchedChangesets(changesetsRequestData: TfvcInterfaces.TfvcChangesetsRequestData): Promise; - getChangesetWorkItems(id?: number): Promise; - getItemsBatch(itemRequestData: TfvcInterfaces.TfvcItemRequestData, project?: string): Promise; - getItemsBatchZip(itemRequestData: TfvcInterfaces.TfvcItemRequestData, project?: string): Promise; - getItem(path: string, project?: string, fileName?: string, download?: boolean, scopePath?: string, recursionLevel?: TfvcInterfaces.VersionControlRecursionType, versionDescriptor?: TfvcInterfaces.TfvcVersionDescriptor): Promise; - getItemContent(path: string, project?: string, fileName?: string, download?: boolean, scopePath?: string, recursionLevel?: TfvcInterfaces.VersionControlRecursionType, versionDescriptor?: TfvcInterfaces.TfvcVersionDescriptor): Promise; - getItems(project?: string, scopePath?: string, recursionLevel?: TfvcInterfaces.VersionControlRecursionType, includeLinks?: boolean, versionDescriptor?: TfvcInterfaces.TfvcVersionDescriptor): Promise; - getItemText(path: string, project?: string, fileName?: string, download?: boolean, scopePath?: string, recursionLevel?: TfvcInterfaces.VersionControlRecursionType, versionDescriptor?: TfvcInterfaces.TfvcVersionDescriptor): Promise; - getItemZip(path: string, project?: string, fileName?: string, download?: boolean, scopePath?: string, recursionLevel?: TfvcInterfaces.VersionControlRecursionType, versionDescriptor?: TfvcInterfaces.TfvcVersionDescriptor): Promise; - getLabelItems(labelId: string, top?: number, skip?: number): Promise; - getLabel(labelId: string, requestData: TfvcInterfaces.TfvcLabelRequestData, project?: string): Promise; - getLabels(requestData: TfvcInterfaces.TfvcLabelRequestData, project?: string, top?: number, skip?: number): Promise; - getShelvesetChanges(shelvesetId: string, top?: number, skip?: number): Promise; - getShelveset(shelvesetId: string, requestData: TfvcInterfaces.TfvcShelvesetRequestData): Promise; - getShelvesets(requestData: TfvcInterfaces.TfvcShelvesetRequestData, top?: number, skip?: number): Promise; - getShelvesetWorkItems(shelvesetId: string): Promise; - } - export class TfvcApi extends basem.ClientApiBase implements ITfvcApi { - constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); - /** - * Get a single branch hierarchy at the given path with parents or children (if specified) - * - * @param {string} path - * @param {string} project - Project ID or project name - * @param {boolean} includeParent - * @param {boolean} includeChildren - * @param onResult callback function with the resulting TfvcInterfaces.TfvcBranch - */ - getBranch(path: string, project: string, includeParent: boolean, includeChildren: boolean, onResult: (err: any, statusCode: number, Branche: TfvcInterfaces.TfvcBranch) => void): void; - /** - * Get a collection of branch roots -- first-level children, branches with no parents - * - * @param {string} project - Project ID or project name - * @param {boolean} includeParent - * @param {boolean} includeChildren - * @param {boolean} includeDeleted - * @param {boolean} includeLinks - * @param onResult callback function with the resulting TfvcInterfaces.TfvcBranch[] - */ - getBranches(project: string, includeParent: boolean, includeChildren: boolean, includeDeleted: boolean, includeLinks: boolean, onResult: (err: any, statusCode: number, Branches: TfvcInterfaces.TfvcBranch[]) => void): void; - /** - * Get branch hierarchies below the specified scopePath - * - * @param {string} scopePath - * @param {string} project - Project ID or project name - * @param {boolean} includeDeleted - * @param {boolean} includeLinks - * @param onResult callback function with the resulting TfvcInterfaces.TfvcBranchRef[] - */ - getBranchRefs(scopePath: string, project: string, includeDeleted: boolean, includeLinks: boolean, onResult: (err: any, statusCode: number, Branches: TfvcInterfaces.TfvcBranchRef[]) => void): void; - /** - * Retrieve Tfvc changes for a given changeset - * - * @param {number} id - * @param {number} skip - * @param {number} top - * @param onResult callback function with the resulting TfvcInterfaces.TfvcChange[] - */ - getChangesetChanges(id: number, skip: number, top: number, onResult: (err: any, statusCode: number, ChangesetChanges: TfvcInterfaces.TfvcChange[]) => void): void; - /** - * @param {TfvcInterfaces.TfvcChangeset} changeset - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting TfvcInterfaces.TfvcChangesetRef - */ - createChangeset(changeset: TfvcInterfaces.TfvcChangeset, project: string, onResult: (err: any, statusCode: number, Changeset: TfvcInterfaces.TfvcChangesetRef) => void): void; - /** - * Retrieve a Tfvc Changeset - * - * @param {number} id - * @param {string} project - Project ID or project name - * @param {number} maxChangeCount - * @param {boolean} includeDetails - * @param {boolean} includeWorkItems - * @param {number} maxCommentLength - * @param {boolean} includeSourceRename - * @param {number} skip - * @param {number} top - * @param {string} orderby - * @param {TfvcInterfaces.TfvcChangesetSearchCriteria} searchCriteria - * @param onResult callback function with the resulting TfvcInterfaces.TfvcChangeset - */ - getChangeset(id: number, project: string, maxChangeCount: number, includeDetails: boolean, includeWorkItems: boolean, maxCommentLength: number, includeSourceRename: boolean, skip: number, top: number, orderby: string, searchCriteria: TfvcInterfaces.TfvcChangesetSearchCriteria, onResult: (err: any, statusCode: number, Changeset: TfvcInterfaces.TfvcChangeset) => void): void; - /** - * Retrieve Tfvc changesets - * - * @param {string} project - Project ID or project name - * @param {number} maxChangeCount - * @param {boolean} includeDetails - * @param {boolean} includeWorkItems - * @param {number} maxCommentLength - * @param {boolean} includeSourceRename - * @param {number} skip - * @param {number} top - * @param {string} orderby - * @param {TfvcInterfaces.TfvcChangesetSearchCriteria} searchCriteria - * @param onResult callback function with the resulting TfvcInterfaces.TfvcChangesetRef[] - */ - getChangesets(project: string, maxChangeCount: number, includeDetails: boolean, includeWorkItems: boolean, maxCommentLength: number, includeSourceRename: boolean, skip: number, top: number, orderby: string, searchCriteria: TfvcInterfaces.TfvcChangesetSearchCriteria, onResult: (err: any, statusCode: number, Changesets: TfvcInterfaces.TfvcChangesetRef[]) => void): void; - /** - * @param {TfvcInterfaces.TfvcChangesetsRequestData} changesetsRequestData - * @param onResult callback function with the resulting TfvcInterfaces.TfvcChangesetRef[] - */ - getBatchedChangesets(changesetsRequestData: TfvcInterfaces.TfvcChangesetsRequestData, onResult: (err: any, statusCode: number, ChangesetsBatch: TfvcInterfaces.TfvcChangesetRef[]) => void): void; - /** - * @param {number} id - * @param onResult callback function with the resulting TfvcInterfaces.AssociatedWorkItem[] - */ - getChangesetWorkItems(id: number, onResult: (err: any, statusCode: number, ChangesetWorkItems: TfvcInterfaces.AssociatedWorkItem[]) => void): void; - /** - * Post for retrieving a set of items given a list of paths or a long path. Allows for specifying the recursionLevel and version descriptors for each path. - * - * @param {TfvcInterfaces.TfvcItemRequestData} itemRequestData - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting TfvcInterfaces.TfvcItem[][] - */ - getItemsBatch(itemRequestData: TfvcInterfaces.TfvcItemRequestData, project: string, onResult: (err: any, statusCode: number, ItemBatch: TfvcInterfaces.TfvcItem[][]) => void): void; - /** - * Post for retrieving a set of items given a list of paths or a long path. Allows for specifying the recursionLevel and version descriptors for each path. - * - * @param {TfvcInterfaces.TfvcItemRequestData} itemRequestData - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting ArrayBuffer - */ - getItemsBatchZip(itemRequestData: TfvcInterfaces.TfvcItemRequestData, project: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * Get Item Metadata and/or Content. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. - * - * @param {string} path - * @param {string} project - Project ID or project name - * @param {string} fileName - * @param {boolean} download - * @param {string} scopePath - * @param {TfvcInterfaces.VersionControlRecursionType} recursionLevel - * @param {TfvcInterfaces.TfvcVersionDescriptor} versionDescriptor - * @param onResult callback function with the resulting TfvcInterfaces.TfvcItem - */ - getItem(path: string, project: string, fileName: string, download: boolean, scopePath: string, recursionLevel: TfvcInterfaces.VersionControlRecursionType, versionDescriptor: TfvcInterfaces.TfvcVersionDescriptor, onResult: (err: any, statusCode: number, Item: TfvcInterfaces.TfvcItem) => void): void; - /** - * Get Item Metadata and/or Content. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. - * - * @param {string} path - * @param {string} project - Project ID or project name - * @param {string} fileName - * @param {boolean} download - * @param {string} scopePath - * @param {TfvcInterfaces.VersionControlRecursionType} recursionLevel - * @param {TfvcInterfaces.TfvcVersionDescriptor} versionDescriptor - * @param onResult callback function with the resulting ArrayBuffer - */ - getItemContent(path: string, project: string, fileName: string, download: boolean, scopePath: string, recursionLevel: TfvcInterfaces.VersionControlRecursionType, versionDescriptor: TfvcInterfaces.TfvcVersionDescriptor, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * Get a list of Tfvc items - * - * @param {string} project - Project ID or project name - * @param {string} scopePath - * @param {TfvcInterfaces.VersionControlRecursionType} recursionLevel - * @param {boolean} includeLinks - * @param {TfvcInterfaces.TfvcVersionDescriptor} versionDescriptor - * @param onResult callback function with the resulting TfvcInterfaces.TfvcItem[] - */ - getItems(project: string, scopePath: string, recursionLevel: TfvcInterfaces.VersionControlRecursionType, includeLinks: boolean, versionDescriptor: TfvcInterfaces.TfvcVersionDescriptor, onResult: (err: any, statusCode: number, Items: TfvcInterfaces.TfvcItem[]) => void): void; - /** - * Get Item Metadata and/or Content. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. - * - * @param {string} path - * @param {string} project - Project ID or project name - * @param {string} fileName - * @param {boolean} download - * @param {string} scopePath - * @param {TfvcInterfaces.VersionControlRecursionType} recursionLevel - * @param {TfvcInterfaces.TfvcVersionDescriptor} versionDescriptor - * @param onResult callback function with the resulting string - */ - getItemText(path: string, project: string, fileName: string, download: boolean, scopePath: string, recursionLevel: TfvcInterfaces.VersionControlRecursionType, versionDescriptor: TfvcInterfaces.TfvcVersionDescriptor, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * Get Item Metadata and/or Content. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. - * - * @param {string} path - * @param {string} project - Project ID or project name - * @param {string} fileName - * @param {boolean} download - * @param {string} scopePath - * @param {TfvcInterfaces.VersionControlRecursionType} recursionLevel - * @param {TfvcInterfaces.TfvcVersionDescriptor} versionDescriptor - * @param onResult callback function with the resulting ArrayBuffer - */ - getItemZip(path: string, project: string, fileName: string, download: boolean, scopePath: string, recursionLevel: TfvcInterfaces.VersionControlRecursionType, versionDescriptor: TfvcInterfaces.TfvcVersionDescriptor, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * Get items under a label. - * - * @param {string} labelId - Unique identifier of label - * @param {number} top - Max number of items to return - * @param {number} skip - Number of items to skip - * @param onResult callback function with the resulting TfvcInterfaces.TfvcItem[] - */ - getLabelItems(labelId: string, top: number, skip: number, onResult: (err: any, statusCode: number, LabelItems: TfvcInterfaces.TfvcItem[]) => void): void; - /** - * Get a single deep label. - * - * @param {string} labelId - Unique identifier of label - * @param {TfvcInterfaces.TfvcLabelRequestData} requestData - maxItemCount - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting TfvcInterfaces.TfvcLabel - */ - getLabel(labelId: string, requestData: TfvcInterfaces.TfvcLabelRequestData, project: string, onResult: (err: any, statusCode: number, Label: TfvcInterfaces.TfvcLabel) => void): void; - /** - * Get a collection of shallow label references. - * - * @param {TfvcInterfaces.TfvcLabelRequestData} requestData - labelScope, name, owner, and itemLabelFilter - * @param {string} project - Project ID or project name - * @param {number} top - Max number of labels to return - * @param {number} skip - Number of labels to skip - * @param onResult callback function with the resulting TfvcInterfaces.TfvcLabelRef[] - */ - getLabels(requestData: TfvcInterfaces.TfvcLabelRequestData, project: string, top: number, skip: number, onResult: (err: any, statusCode: number, Labels: TfvcInterfaces.TfvcLabelRef[]) => void): void; - /** - * Get changes included in a shelveset. - * - * @param {string} shelvesetId - Shelveset's unique ID - * @param {number} top - Max number of changes to return - * @param {number} skip - Number of changes to skip - * @param onResult callback function with the resulting TfvcInterfaces.TfvcChange[] - */ - getShelvesetChanges(shelvesetId: string, top: number, skip: number, onResult: (err: any, statusCode: number, ShelvesetChanges: TfvcInterfaces.TfvcChange[]) => void): void; - /** - * Get a single deep shelveset. - * - * @param {string} shelvesetId - Shelveset's unique ID - * @param {TfvcInterfaces.TfvcShelvesetRequestData} requestData - includeDetails, includeWorkItems, maxChangeCount, and maxCommentLength - * @param onResult callback function with the resulting TfvcInterfaces.TfvcShelveset - */ - getShelveset(shelvesetId: string, requestData: TfvcInterfaces.TfvcShelvesetRequestData, onResult: (err: any, statusCode: number, Shelveset: TfvcInterfaces.TfvcShelveset) => void): void; - /** - * Return a collection of shallow shelveset references. - * - * @param {TfvcInterfaces.TfvcShelvesetRequestData} requestData - name, owner, and maxCommentLength - * @param {number} top - Max number of shelvesets to return - * @param {number} skip - Number of shelvesets to skip - * @param onResult callback function with the resulting TfvcInterfaces.TfvcShelvesetRef[] - */ - getShelvesets(requestData: TfvcInterfaces.TfvcShelvesetRequestData, top: number, skip: number, onResult: (err: any, statusCode: number, Shelvesets: TfvcInterfaces.TfvcShelvesetRef[]) => void): void; - /** - * Get work items associated with a shelveset. - * - * @param {string} shelvesetId - Shelveset's unique ID - * @param onResult callback function with the resulting TfvcInterfaces.AssociatedWorkItem[] - */ - getShelvesetWorkItems(shelvesetId: string, onResult: (err: any, statusCode: number, ShelvesetWorkItems: TfvcInterfaces.AssociatedWorkItem[]) => void): void; - } - export class QTfvcApi extends basem.QClientApiBase implements IQTfvcApi { - api: TfvcApi; - constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); - /** - * Get a single branch hierarchy at the given path with parents or children (if specified) - * - * @param {string} path - * @param {string} project - Project ID or project name - * @param {boolean} includeParent - * @param {boolean} includeChildren - */ - getBranch(path: string, project?: string, includeParent?: boolean, includeChildren?: boolean): Promise; - /** - * Get a collection of branch roots -- first-level children, branches with no parents - * - * @param {string} project - Project ID or project name - * @param {boolean} includeParent - * @param {boolean} includeChildren - * @param {boolean} includeDeleted - * @param {boolean} includeLinks - */ - getBranches(project?: string, includeParent?: boolean, includeChildren?: boolean, includeDeleted?: boolean, includeLinks?: boolean): Promise; - /** - * Get branch hierarchies below the specified scopePath - * - * @param {string} scopePath - * @param {string} project - Project ID or project name - * @param {boolean} includeDeleted - * @param {boolean} includeLinks - */ - getBranchRefs(scopePath: string, project?: string, includeDeleted?: boolean, includeLinks?: boolean): Promise; - /** - * Retrieve Tfvc changes for a given changeset - * - * @param {number} id - * @param {number} skip - * @param {number} top - */ - getChangesetChanges(id?: number, skip?: number, top?: number): Promise; - /** - * @param {TfvcInterfaces.TfvcChangeset} changeset - * @param {string} project - Project ID or project name - */ - createChangeset(changeset: TfvcInterfaces.TfvcChangeset, project?: string): Promise; - /** - * Retrieve a Tfvc Changeset - * - * @param {number} id - * @param {string} project - Project ID or project name - * @param {number} maxChangeCount - * @param {boolean} includeDetails - * @param {boolean} includeWorkItems - * @param {number} maxCommentLength - * @param {boolean} includeSourceRename - * @param {number} skip - * @param {number} top - * @param {string} orderby - * @param {TfvcInterfaces.TfvcChangesetSearchCriteria} searchCriteria - */ - getChangeset(id: number, project?: string, maxChangeCount?: number, includeDetails?: boolean, includeWorkItems?: boolean, maxCommentLength?: number, includeSourceRename?: boolean, skip?: number, top?: number, orderby?: string, searchCriteria?: TfvcInterfaces.TfvcChangesetSearchCriteria): Promise; - /** - * Retrieve Tfvc changesets - * - * @param {string} project - Project ID or project name - * @param {number} maxChangeCount - * @param {boolean} includeDetails - * @param {boolean} includeWorkItems - * @param {number} maxCommentLength - * @param {boolean} includeSourceRename - * @param {number} skip - * @param {number} top - * @param {string} orderby - * @param {TfvcInterfaces.TfvcChangesetSearchCriteria} searchCriteria - */ - getChangesets(project?: string, maxChangeCount?: number, includeDetails?: boolean, includeWorkItems?: boolean, maxCommentLength?: number, includeSourceRename?: boolean, skip?: number, top?: number, orderby?: string, searchCriteria?: TfvcInterfaces.TfvcChangesetSearchCriteria): Promise; - /** - * @param {TfvcInterfaces.TfvcChangesetsRequestData} changesetsRequestData - */ - getBatchedChangesets(changesetsRequestData: TfvcInterfaces.TfvcChangesetsRequestData): Promise; - /** - * @param {number} id - */ - getChangesetWorkItems(id?: number): Promise; - /** - * Post for retrieving a set of items given a list of paths or a long path. Allows for specifying the recursionLevel and version descriptors for each path. - * - * @param {TfvcInterfaces.TfvcItemRequestData} itemRequestData - * @param {string} project - Project ID or project name - */ - getItemsBatch(itemRequestData: TfvcInterfaces.TfvcItemRequestData, project?: string): Promise; - /** - * Post for retrieving a set of items given a list of paths or a long path. Allows for specifying the recursionLevel and version descriptors for each path. - * - * @param {TfvcInterfaces.TfvcItemRequestData} itemRequestData - * @param {string} project - Project ID or project name - */ - getItemsBatchZip(itemRequestData: TfvcInterfaces.TfvcItemRequestData, project?: string): Promise; - /** - * Get Item Metadata and/or Content. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. - * - * @param {string} path - * @param {string} project - Project ID or project name - * @param {string} fileName - * @param {boolean} download - * @param {string} scopePath - * @param {TfvcInterfaces.VersionControlRecursionType} recursionLevel - * @param {TfvcInterfaces.TfvcVersionDescriptor} versionDescriptor - */ - getItem(path: string, project?: string, fileName?: string, download?: boolean, scopePath?: string, recursionLevel?: TfvcInterfaces.VersionControlRecursionType, versionDescriptor?: TfvcInterfaces.TfvcVersionDescriptor): Promise; - /** - * Get Item Metadata and/or Content. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. - * - * @param {string} path - * @param {string} project - Project ID or project name - * @param {string} fileName - * @param {boolean} download - * @param {string} scopePath - * @param {TfvcInterfaces.VersionControlRecursionType} recursionLevel - * @param {TfvcInterfaces.TfvcVersionDescriptor} versionDescriptor - */ - getItemContent(path: string, project?: string, fileName?: string, download?: boolean, scopePath?: string, recursionLevel?: TfvcInterfaces.VersionControlRecursionType, versionDescriptor?: TfvcInterfaces.TfvcVersionDescriptor): Promise; - /** - * Get a list of Tfvc items - * - * @param {string} project - Project ID or project name - * @param {string} scopePath - * @param {TfvcInterfaces.VersionControlRecursionType} recursionLevel - * @param {boolean} includeLinks - * @param {TfvcInterfaces.TfvcVersionDescriptor} versionDescriptor - */ - getItems(project?: string, scopePath?: string, recursionLevel?: TfvcInterfaces.VersionControlRecursionType, includeLinks?: boolean, versionDescriptor?: TfvcInterfaces.TfvcVersionDescriptor): Promise; - /** - * Get Item Metadata and/or Content. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. - * - * @param {string} path - * @param {string} project - Project ID or project name - * @param {string} fileName - * @param {boolean} download - * @param {string} scopePath - * @param {TfvcInterfaces.VersionControlRecursionType} recursionLevel - * @param {TfvcInterfaces.TfvcVersionDescriptor} versionDescriptor - */ - getItemText(path: string, project?: string, fileName?: string, download?: boolean, scopePath?: string, recursionLevel?: TfvcInterfaces.VersionControlRecursionType, versionDescriptor?: TfvcInterfaces.TfvcVersionDescriptor): Promise; - /** - * Get Item Metadata and/or Content. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. - * - * @param {string} path - * @param {string} project - Project ID or project name - * @param {string} fileName - * @param {boolean} download - * @param {string} scopePath - * @param {TfvcInterfaces.VersionControlRecursionType} recursionLevel - * @param {TfvcInterfaces.TfvcVersionDescriptor} versionDescriptor - */ - getItemZip(path: string, project?: string, fileName?: string, download?: boolean, scopePath?: string, recursionLevel?: TfvcInterfaces.VersionControlRecursionType, versionDescriptor?: TfvcInterfaces.TfvcVersionDescriptor): Promise; - /** - * Get items under a label. - * - * @param {string} labelId - Unique identifier of label - * @param {number} top - Max number of items to return - * @param {number} skip - Number of items to skip - */ - getLabelItems(labelId: string, top?: number, skip?: number): Promise; - /** - * Get a single deep label. - * - * @param {string} labelId - Unique identifier of label - * @param {TfvcInterfaces.TfvcLabelRequestData} requestData - maxItemCount - * @param {string} project - Project ID or project name - */ - getLabel(labelId: string, requestData: TfvcInterfaces.TfvcLabelRequestData, project?: string): Promise; - /** - * Get a collection of shallow label references. - * - * @param {TfvcInterfaces.TfvcLabelRequestData} requestData - labelScope, name, owner, and itemLabelFilter - * @param {string} project - Project ID or project name - * @param {number} top - Max number of labels to return - * @param {number} skip - Number of labels to skip - */ - getLabels(requestData: TfvcInterfaces.TfvcLabelRequestData, project?: string, top?: number, skip?: number): Promise; - /** - * Get changes included in a shelveset. - * - * @param {string} shelvesetId - Shelveset's unique ID - * @param {number} top - Max number of changes to return - * @param {number} skip - Number of changes to skip - */ - getShelvesetChanges(shelvesetId: string, top?: number, skip?: number): Promise; - /** - * Get a single deep shelveset. - * - * @param {string} shelvesetId - Shelveset's unique ID - * @param {TfvcInterfaces.TfvcShelvesetRequestData} requestData - includeDetails, includeWorkItems, maxChangeCount, and maxCommentLength - */ - getShelveset(shelvesetId: string, requestData: TfvcInterfaces.TfvcShelvesetRequestData): Promise; - /** - * Return a collection of shallow shelveset references. - * - * @param {TfvcInterfaces.TfvcShelvesetRequestData} requestData - name, owner, and maxCommentLength - * @param {number} top - Max number of shelvesets to return - * @param {number} skip - Number of shelvesets to skip - */ - getShelvesets(requestData: TfvcInterfaces.TfvcShelvesetRequestData, top?: number, skip?: number): Promise; - /** - * Get work items associated with a shelveset. - * - * @param {string} shelvesetId - Shelveset's unique ID - */ - getShelvesetWorkItems(shelvesetId: string): Promise; - } - -} -declare module 'vso-node-api/interfaces/WorkItemTrackingInterfaces' { - export interface AttachmentReference { - id: string; - url: string; - } - export interface FieldDependentRule extends WorkItemTrackingResource { - dependentFields: WorkItemFieldReference[]; - } - export interface FieldsToEvaluate { - fields: string[]; - fieldUpdates: { - [key: string]: any; - }; - fieldValues: { - [key: string]: any; - }; - rulesFrom: string[]; - } - export enum FieldType { - String = 0, - Integer = 1, - DateTime = 2, - PlainText = 3, - Html = 4, - TreePath = 5, - History = 6, - Double = 7, - Guid = 8, - Boolean = 9, - } - export enum FieldUsage { - None = 0, - WorkItem = 1, - WorkItemLink = 2, - Tree = 3, - WorkItemTypeExtension = 4, - } - export interface IdentityReference { - id: string; - name: string; - url: string; - } - export interface Link { - attributes: { - [key: string]: any; - }; - rel: string; - title: string; - url: string; - } - export enum LinkQueryMode { - WorkItems = 0, - LinksOneHopMustContain = 1, - LinksOneHopMayContain = 2, - LinksOneHopDoesNotContain = 3, - LinksRecursiveMustContain = 4, - LinksRecursiveMayContain = 5, - LinksRecursiveDoesNotContain = 6, - } - export enum LogicalOperation { - NONE = 0, - AND = 1, - OR = 2, - } - export interface ProjectReference { - id: string; - name: string; - url: string; - } - export enum ProvisioningActionType { - Import = 0, - Validate = 1, - } - export interface ProvisioningResult { - provisioningImportEvents: string[]; - } - export enum QueryExpand { - None = 0, - Wiql = 1, - Clauses = 2, - All = 3, - } - export interface QueryHierarchyItem extends WorkItemTrackingResource { - children: QueryHierarchyItem[]; - clauses: WorkItemQueryClause; - columns: WorkItemFieldReference[]; - filterOptions: LinkQueryMode; - hasChildren: boolean; - id: string; - isDeleted: boolean; - isFolder: boolean; - isInvalidSyntax: boolean; - isPublic: boolean; - linkClauses: WorkItemQueryClause; - name: string; - path: string; - queryType: QueryType; - sortColumns: WorkItemQuerySortColumn[]; - sourceClauses: WorkItemQueryClause; - targetClauses: WorkItemQueryClause; - wiql: string; - } - export enum QueryResultType { - WorkItem = 1, - WorkItemLink = 2, - } - export enum QueryType { - Flat = 1, - Tree = 2, - OneHop = 3, - } - export interface ReportingWorkItemLink { - changedDate: Date; - isActive: boolean; - rel: string; - sourceId: number; - targetId: number; - } - export interface ReportingWorkItemLinksBatch extends StreamedBatch { - } - export interface ReportingWorkItemRevisionsBatch extends StreamedBatch { - } - export interface ReportingWorkItemRevisionsFilter { - /** - * A list of fields to return in work item revisions. Omit this parameter to get all reportable fields. - */ - fields: string[]; - /** - * Return an identity reference instead of a string value for identity fields. - */ - includeIdentityRef: boolean; - /** - * A list of types to filter the results to specific work item types. Omit this parameter to get work item revisions of all work item types. - */ - types: string[]; - } - export interface StreamedBatch { - continuationToken: string; - isLastBatch: boolean; - nextLink: string; - values: T[]; - } - export enum TemplateType { - WorkItemType = 0, - GlobalWorkflow = 1, - } - export enum TreeNodeStructureType { - Area = 0, - Iteration = 1, - } - export enum TreeStructureGroup { - Areas = 0, - Iterations = 1, - } - export interface Wiql { - query: string; - } - export interface WitBatchRequest { - body: string; - headers: { - [key: string]: string; - }; - method: string; - uri: string; - } - export interface WitBatchResponse { - body: string; - code: number; - headers: { - [key: string]: string; - }; - } - export interface WorkItem extends WorkItemTrackingResource { - fields: { - [key: string]: any; - }; - id: number; - relations: WorkItemRelation[]; - rev: number; - } - export interface WorkItemClassificationNode extends WorkItemTrackingResource { - attributes: { - [key: string]: any; - }; - children: WorkItemClassificationNode[]; - id: number; - identifier: string; - name: string; - structureType: TreeNodeStructureType; - } - export interface WorkItemDelete extends WorkItemDeleteReference { - resource: WorkItem; - } - export interface WorkItemDeleteReference { - code: number; - deletedBy: string; - deletedDate: string; - id: number; - message: string; - name: string; - project: string; - type: string; - url: string; - } - export interface WorkItemDeleteUpdate { - isDeleted: boolean; - } - export enum WorkItemExpand { - None = 0, - Relations = 1, - Fields = 2, - All = 3, - } - export interface WorkItemField extends WorkItemTrackingResource { - name: string; - readOnly: boolean; - referenceName: string; - supportedOperations: WorkItemFieldOperation[]; - type: FieldType; - } - export interface WorkItemFieldOperation { - name: string; - referenceName: string; - } - export interface WorkItemFieldReference { - name: string; - referenceName: string; - url: string; - } - export interface WorkItemFieldUpdate { - newValue: any; - oldValue: any; - } - export interface WorkItemHistory extends WorkItemTrackingResource { - rev: number; - revisedBy: IdentityReference; - revisedDate: Date; - value: string; - } - export interface WorkItemLink { - rel: string; - source: WorkItemReference; - target: WorkItemReference; - } - export interface WorkItemQueryClause { - clauses: WorkItemQueryClause[]; - field: WorkItemFieldReference; - fieldValue: WorkItemFieldReference; - isFieldValue: boolean; - logicalOperator: LogicalOperation; - operator: WorkItemFieldOperation; - value: string; - } - export interface WorkItemQueryResult { - asOf: Date; - columns: WorkItemFieldReference[]; - queryResultType: QueryResultType; - queryType: QueryType; - sortColumns: WorkItemQuerySortColumn[]; - workItemRelations: WorkItemLink[]; - workItems: WorkItemReference[]; - } - export interface WorkItemQuerySortColumn { - descending: boolean; - field: WorkItemFieldReference; - } - export interface WorkItemReference { - id: number; - url: string; - } - export interface WorkItemRelation extends Link { - } - export interface WorkItemRelationType extends WorkItemTrackingReference { - attributes: { - [key: string]: any; - }; - } - export interface WorkItemRelationUpdates { - added: WorkItemRelation[]; - removed: WorkItemRelation[]; - updated: WorkItemRelation[]; - } - export interface WorkItemRevisionReference extends WorkItemReference { - rev: number; - } - export interface WorkItemTrackingReference extends WorkItemTrackingResource { - name: string; - referenceName: string; - } - export interface WorkItemTrackingResource extends WorkItemTrackingResourceReference { - _links: any; - } - export interface WorkItemTrackingResourceReference { - url: string; - } - export interface WorkItemType extends WorkItemTrackingResource { - description: string; - fields: WorkItemTypeFieldInstance[]; - name: string; - xmlForm: string; - } - export interface WorkItemTypeCategory extends WorkItemTrackingResource { - defaultWorkItemType: WorkItemTypeReference; - name: string; - referenceName: string; - workItemTypes: WorkItemTypeReference[]; - } - export interface WorkItemTypeFieldInstance { - field: WorkItemFieldReference; - helpText: string; - } - export interface WorkItemTypeReference extends WorkItemTrackingResourceReference { - name: string; - } - export interface WorkItemTypeTemplate { - template: string; - } - export interface WorkItemTypeTemplateUpdateModel { - actionType: ProvisioningActionType; - methodology: string; - template: string; - templateType: TemplateType; - } - export interface WorkItemUpdate extends WorkItemTrackingResourceReference { - fields: { - [key: string]: WorkItemFieldUpdate; - }; - id: number; - relations: WorkItemRelationUpdates; - rev: number; - revisedBy: IdentityReference; - revisedDate: Date; - workItemId: number; - } - export var TypeInfo: { - AttachmentReference: { - fields: any; - }; - FieldDependentRule: { - fields: any; - }; - FieldsToEvaluate: { - fields: any; - }; - FieldType: { - enumValues: { - "string": number; - "integer": number; - "dateTime": number; - "plainText": number; - "html": number; - "treePath": number; - "history": number; - "double": number; - "guid": number; - "boolean": number; - }; - }; - FieldUsage: { - enumValues: { - "none": number; - "workItem": number; - "workItemLink": number; - "tree": number; - "workItemTypeExtension": number; - }; - }; - IdentityReference: { - fields: any; - }; - Link: { - fields: any; - }; - LinkQueryMode: { - enumValues: { - "workItems": number; - "linksOneHopMustContain": number; - "linksOneHopMayContain": number; - "linksOneHopDoesNotContain": number; - "linksRecursiveMustContain": number; - "linksRecursiveMayContain": number; - "linksRecursiveDoesNotContain": number; - }; - }; - LogicalOperation: { - enumValues: { - "nONE": number; - "aND": number; - "oR": number; - }; - }; - ProjectReference: { - fields: any; - }; - ProvisioningActionType: { - enumValues: { - "import": number; - "validate": number; - }; - }; - ProvisioningResult: { - fields: any; - }; - QueryExpand: { - enumValues: { - "none": number; - "wiql": number; - "clauses": number; - "all": number; - }; - }; - QueryHierarchyItem: { - fields: any; - }; - QueryResultType: { - enumValues: { - "workItem": number; - "workItemLink": number; - }; - }; - QueryType: { - enumValues: { - "flat": number; - "tree": number; - "oneHop": number; - }; - }; - ReportingWorkItemLink: { - fields: any; - }; - ReportingWorkItemLinksBatch: { - fields: any; - }; - ReportingWorkItemRevisionsBatch: { - fields: any; - }; - ReportingWorkItemRevisionsFilter: { - fields: any; - }; - StreamedBatch: { - fields: any; - }; - TemplateType: { - enumValues: { - "workItemType": number; - "globalWorkflow": number; - }; - }; - TreeNodeStructureType: { - enumValues: { - "area": number; - "iteration": number; - }; - }; - TreeStructureGroup: { - enumValues: { - "areas": number; - "iterations": number; - }; - }; - Wiql: { - fields: any; - }; - WitBatchRequest: { - fields: any; - }; - WitBatchResponse: { - fields: any; - }; - WorkItem: { - fields: any; - }; - WorkItemClassificationNode: { - fields: any; - }; - WorkItemDelete: { - fields: any; - }; - WorkItemDeleteReference: { - fields: any; - }; - WorkItemDeleteUpdate: { - fields: any; - }; - WorkItemExpand: { - enumValues: { - "none": number; - "relations": number; - "fields": number; - "all": number; - }; - }; - WorkItemField: { - fields: any; - }; - WorkItemFieldOperation: { - fields: any; - }; - WorkItemFieldReference: { - fields: any; - }; - WorkItemFieldUpdate: { - fields: any; - }; - WorkItemHistory: { - fields: any; - }; - WorkItemLink: { - fields: any; - }; - WorkItemQueryClause: { - fields: any; - }; - WorkItemQueryResult: { - fields: any; - }; - WorkItemQuerySortColumn: { - fields: any; - }; - WorkItemReference: { - fields: any; - }; - WorkItemRelation: { - fields: any; - }; - WorkItemRelationType: { - fields: any; - }; - WorkItemRelationUpdates: { - fields: any; - }; - WorkItemRevisionReference: { - fields: any; - }; - WorkItemTrackingReference: { - fields: any; - }; - WorkItemTrackingResource: { - fields: any; - }; - WorkItemTrackingResourceReference: { - fields: any; - }; - WorkItemType: { - fields: any; - }; - WorkItemTypeCategory: { - fields: any; - }; - WorkItemTypeFieldInstance: { - fields: any; - }; - WorkItemTypeReference: { - fields: any; - }; - WorkItemTypeTemplate: { - fields: any; - }; - WorkItemTypeTemplateUpdateModel: { - fields: any; - }; - WorkItemUpdate: { - fields: any; - }; - }; - -} -declare module 'vso-node-api/WorkItemTrackingApi' { - - - import Q = require('q'); - import basem = require('vso-node-api/ClientApiBases'); - import VsoBaseInterfaces = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); - import TfsCoreInterfaces = require('vso-node-api/interfaces/CoreInterfaces'); - import VSSInterfaces = require('vso-node-api/interfaces/common/VSSInterfaces'); - import WorkItemTrackingInterfaces = require('vso-node-api/interfaces/WorkItemTrackingInterfaces'); - export interface IWorkItemTrackingApi extends basem.ClientApiBase { - createAttachment(customHeaders: any, contentStream: NodeJS.ReadableStream, fileName: string, uploadType: string, onResult: (err: any, statusCode: number, attachment: WorkItemTrackingInterfaces.AttachmentReference) => void): void; - getAttachmentContent(id: string, fileName: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - getAttachmentZip(id: string, fileName: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - getRootNodes(project: string, depth: number, onResult: (err: any, statusCode: number, classificationNodes: WorkItemTrackingInterfaces.WorkItemClassificationNode[]) => void): void; - createOrUpdateClassificationNode(postedNode: WorkItemTrackingInterfaces.WorkItemClassificationNode, project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path: string, onResult: (err: any, statusCode: number, classificationNode: WorkItemTrackingInterfaces.WorkItemClassificationNode) => void): void; - deleteClassificationNode(project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path: string, reclassifyId: number, onResult: (err: any, statusCode: number) => void): void; - getClassificationNode(project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path: string, depth: number, onResult: (err: any, statusCode: number, classificationNode: WorkItemTrackingInterfaces.WorkItemClassificationNode) => void): void; - updateClassificationNode(postedNode: WorkItemTrackingInterfaces.WorkItemClassificationNode, project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path: string, onResult: (err: any, statusCode: number, classificationNode: WorkItemTrackingInterfaces.WorkItemClassificationNode) => void): void; - getField(field: string, onResult: (err: any, statusCode: number, field: WorkItemTrackingInterfaces.WorkItemField) => void): void; - getFields(onResult: (err: any, statusCode: number, fields: WorkItemTrackingInterfaces.WorkItemField[]) => void): void; - getHistory(id: number, top: number, skip: number, onResult: (err: any, statusCode: number, history: WorkItemTrackingInterfaces.WorkItemHistory[]) => void): void; - getHistoryById(id: number, revisionNumber: number, onResult: (err: any, statusCode: number, history: WorkItemTrackingInterfaces.WorkItemHistory) => void): void; - createQuery(postedQuery: WorkItemTrackingInterfaces.QueryHierarchyItem, project: string, query: string, onResult: (err: any, statusCode: number, querie: WorkItemTrackingInterfaces.QueryHierarchyItem) => void): void; - deleteQuery(project: string, query: string, onResult: (err: any, statusCode: number) => void): void; - getQueries(project: string, expand: WorkItemTrackingInterfaces.QueryExpand, depth: number, includeDeleted: boolean, onResult: (err: any, statusCode: number, queries: WorkItemTrackingInterfaces.QueryHierarchyItem[]) => void): void; - getQuery(project: string, query: string, expand: WorkItemTrackingInterfaces.QueryExpand, depth: number, includeDeleted: boolean, onResult: (err: any, statusCode: number, querie: WorkItemTrackingInterfaces.QueryHierarchyItem) => void): void; - updateQuery(queryUpdate: WorkItemTrackingInterfaces.QueryHierarchyItem, project: string, query: string, undeleteDescendants: boolean, onResult: (err: any, statusCode: number, querie: WorkItemTrackingInterfaces.QueryHierarchyItem) => void): void; - destroyWorkItem(id: number, project: string, onResult: (err: any, statusCode: number) => void): void; - getDeletedWorkItem(id: number, project: string, onResult: (err: any, statusCode: number, recyclebin: WorkItemTrackingInterfaces.WorkItemDelete) => void): void; - getDeletedWorkItems(project: string, ids: number[], onResult: (err: any, statusCode: number, recyclebin: WorkItemTrackingInterfaces.WorkItemDeleteReference[]) => void): void; - restoreWorkItem(payload: WorkItemTrackingInterfaces.WorkItemDeleteUpdate, id: number, project: string, onResult: (err: any, statusCode: number, recyclebin: WorkItemTrackingInterfaces.WorkItemDelete) => void): void; - getRevision(id: number, revisionNumber: number, expand: WorkItemTrackingInterfaces.WorkItemExpand, onResult: (err: any, statusCode: number, revision: WorkItemTrackingInterfaces.WorkItem) => void): void; - getRevisions(id: number, top: number, skip: number, expand: WorkItemTrackingInterfaces.WorkItemExpand, onResult: (err: any, statusCode: number, revisions: WorkItemTrackingInterfaces.WorkItem[]) => void): void; - evaluateRulesOnField(ruleEngineInput: WorkItemTrackingInterfaces.FieldsToEvaluate, onResult: (err: any, statusCode: number) => void): void; - getUpdate(id: number, updateNumber: number, onResult: (err: any, statusCode: number, update: WorkItemTrackingInterfaces.WorkItemUpdate) => void): void; - getUpdates(id: number, top: number, skip: number, onResult: (err: any, statusCode: number, updates: WorkItemTrackingInterfaces.WorkItemUpdate[]) => void): void; - queryByWiql(wiql: WorkItemTrackingInterfaces.Wiql, teamContext: TfsCoreInterfaces.TeamContext, timePrecision: boolean, onResult: (err: any, statusCode: number, wiql: WorkItemTrackingInterfaces.WorkItemQueryResult) => void): void; - queryById(id: string, teamContext: TfsCoreInterfaces.TeamContext, timePrecision: boolean, onResult: (err: any, statusCode: number, wiql: WorkItemTrackingInterfaces.WorkItemQueryResult) => void): void; - getReportingLinks(project: string, types: string[], continuationToken: string, startDateTime: Date, onResult: (err: any, statusCode: number, workItemLink: WorkItemTrackingInterfaces.ReportingWorkItemLinksBatch) => void): void; - getRelationType(relation: string, onResult: (err: any, statusCode: number, workItemRelationType: WorkItemTrackingInterfaces.WorkItemRelationType) => void): void; - getRelationTypes(onResult: (err: any, statusCode: number, workItemRelationTypes: WorkItemTrackingInterfaces.WorkItemRelationType[]) => void): void; - readReportingRevisionsGet(project: string, fields: string[], types: string[], continuationToken: string, startDateTime: Date, includeIdentityRef: boolean, includeDeleted: boolean, includeTagRef: boolean, onResult: (err: any, statusCode: number, workItemRevision: WorkItemTrackingInterfaces.ReportingWorkItemRevisionsBatch) => void): void; - readReportingRevisionsPost(filter: WorkItemTrackingInterfaces.ReportingWorkItemRevisionsFilter, project: string, continuationToken: string, startDateTime: Date, onResult: (err: any, statusCode: number, workItemRevision: WorkItemTrackingInterfaces.ReportingWorkItemRevisionsBatch) => void): void; - deleteWorkItem(id: number, destroy: boolean, onResult: (err: any, statusCode: number, workItem: WorkItemTrackingInterfaces.WorkItemDelete) => void): void; - getWorkItem(id: number, fields: string[], asOf: Date, expand: WorkItemTrackingInterfaces.WorkItemExpand, onResult: (err: any, statusCode: number, workItem: WorkItemTrackingInterfaces.WorkItem) => void): void; - getWorkItems(ids: number[], fields: string[], asOf: Date, expand: WorkItemTrackingInterfaces.WorkItemExpand, onResult: (err: any, statusCode: number, workItems: WorkItemTrackingInterfaces.WorkItem[]) => void): void; - updateWorkItem(customHeaders: any, document: VSSInterfaces.JsonPatchDocument, id: number, validateOnly: boolean, bypassRules: boolean, onResult: (err: any, statusCode: number, workItem: WorkItemTrackingInterfaces.WorkItem) => void): void; - createWorkItem(customHeaders: any, document: VSSInterfaces.JsonPatchDocument, project: string, type: string, validateOnly: boolean, bypassRules: boolean, onResult: (err: any, statusCode: number, workItem: WorkItemTrackingInterfaces.WorkItem) => void): void; - getWorkItemTemplate(project: string, type: string, fields: string, asOf: Date, expand: WorkItemTrackingInterfaces.WorkItemExpand, onResult: (err: any, statusCode: number, workItem: WorkItemTrackingInterfaces.WorkItem) => void): void; - getWorkItemTypeCategories(project: string, onResult: (err: any, statusCode: number, workItemTypeCategories: WorkItemTrackingInterfaces.WorkItemTypeCategory[]) => void): void; - getWorkItemTypeCategory(project: string, category: string, onResult: (err: any, statusCode: number, workItemTypeCategorie: WorkItemTrackingInterfaces.WorkItemTypeCategory) => void): void; - getWorkItemType(project: string, type: string, onResult: (err: any, statusCode: number, workItemType: WorkItemTrackingInterfaces.WorkItemType) => void): void; - getWorkItemTypes(project: string, onResult: (err: any, statusCode: number, workItemTypes: WorkItemTrackingInterfaces.WorkItemType[]) => void): void; - getDependentFields(project: string, type: string, field: string, onResult: (err: any, statusCode: number, workItemTypesField: WorkItemTrackingInterfaces.FieldDependentRule) => void): void; - exportWorkItemTypeDefinition(project: string, type: string, exportGlobalLists: boolean, onResult: (err: any, statusCode: number, workItemTypeTemplate: WorkItemTrackingInterfaces.WorkItemTypeTemplate) => void): void; - updateWorkItemTypeDefinition(updateModel: WorkItemTrackingInterfaces.WorkItemTypeTemplateUpdateModel, project: string, onResult: (err: any, statusCode: number, workItemTypeTemplate: WorkItemTrackingInterfaces.ProvisioningResult) => void): void; - } - export interface IQWorkItemTrackingApi extends basem.QClientApiBase { - createAttachment(customHeaders: any, contentStream: NodeJS.ReadableStream, fileName?: string, uploadType?: string): Promise; - getAttachmentContent(id: string, fileName?: string): Promise; - getAttachmentZip(id: string, fileName?: string): Promise; - getRootNodes(project: string, depth?: number): Promise; - createOrUpdateClassificationNode(postedNode: WorkItemTrackingInterfaces.WorkItemClassificationNode, project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path?: string): Promise; - deleteClassificationNode(project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path?: string, reclassifyId?: number): Promise; - getClassificationNode(project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path?: string, depth?: number): Promise; - updateClassificationNode(postedNode: WorkItemTrackingInterfaces.WorkItemClassificationNode, project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path?: string): Promise; - getField(field: string): Promise; - getFields(): Promise; - getHistory(id: number, top?: number, skip?: number): Promise; - getHistoryById(id: number, revisionNumber: number): Promise; - createQuery(postedQuery: WorkItemTrackingInterfaces.QueryHierarchyItem, project: string, query: string): Promise; - deleteQuery(project: string, query: string): Promise; - getQueries(project: string, expand?: WorkItemTrackingInterfaces.QueryExpand, depth?: number, includeDeleted?: boolean): Promise; - getQuery(project: string, query: string, expand?: WorkItemTrackingInterfaces.QueryExpand, depth?: number, includeDeleted?: boolean): Promise; - updateQuery(queryUpdate: WorkItemTrackingInterfaces.QueryHierarchyItem, project: string, query: string, undeleteDescendants?: boolean): Promise; - destroyWorkItem(id: number, project?: string): Promise; - getDeletedWorkItem(id: number, project?: string): Promise; - getDeletedWorkItems(project?: string, ids?: number[]): Promise; - restoreWorkItem(payload: WorkItemTrackingInterfaces.WorkItemDeleteUpdate, id: number, project?: string): Promise; - getRevision(id: number, revisionNumber: number, expand?: WorkItemTrackingInterfaces.WorkItemExpand): Promise; - getRevisions(id: number, top?: number, skip?: number, expand?: WorkItemTrackingInterfaces.WorkItemExpand): Promise; - evaluateRulesOnField(ruleEngineInput: WorkItemTrackingInterfaces.FieldsToEvaluate): Promise; - getUpdate(id: number, updateNumber: number): Promise; - getUpdates(id: number, top?: number, skip?: number): Promise; - queryByWiql(wiql: WorkItemTrackingInterfaces.Wiql, teamContext?: TfsCoreInterfaces.TeamContext, timePrecision?: boolean): Promise; - queryById(id: string, teamContext?: TfsCoreInterfaces.TeamContext, timePrecision?: boolean): Promise; - getReportingLinks(project?: string, types?: string[], continuationToken?: string, startDateTime?: Date): Promise; - getRelationType(relation: string): Promise; - getRelationTypes(): Promise; - readReportingRevisionsGet(project?: string, fields?: string[], types?: string[], continuationToken?: string, startDateTime?: Date, includeIdentityRef?: boolean, includeDeleted?: boolean, includeTagRef?: boolean): Promise; - readReportingRevisionsPost(filter: WorkItemTrackingInterfaces.ReportingWorkItemRevisionsFilter, project?: string, continuationToken?: string, startDateTime?: Date): Promise; - deleteWorkItem(id: number, destroy?: boolean): Promise; - getWorkItem(id: number, fields?: string[], asOf?: Date, expand?: WorkItemTrackingInterfaces.WorkItemExpand): Promise; - getWorkItems(ids: number[], fields?: string[], asOf?: Date, expand?: WorkItemTrackingInterfaces.WorkItemExpand): Promise; - updateWorkItem(customHeaders: any, document: VSSInterfaces.JsonPatchDocument, id: number, validateOnly?: boolean, bypassRules?: boolean): Promise; - createWorkItem(customHeaders: any, document: VSSInterfaces.JsonPatchDocument, project: string, type: string, validateOnly?: boolean, bypassRules?: boolean): Promise; - getWorkItemTemplate(project: string, type: string, fields?: string, asOf?: Date, expand?: WorkItemTrackingInterfaces.WorkItemExpand): Promise; - getWorkItemTypeCategories(project: string): Promise; - getWorkItemTypeCategory(project: string, category: string): Promise; - getWorkItemType(project: string, type: string): Promise; - getWorkItemTypes(project: string): Promise; - getDependentFields(project: string, type: string, field: string): Promise; - exportWorkItemTypeDefinition(project?: string, type?: string, exportGlobalLists?: boolean): Promise; - updateWorkItemTypeDefinition(updateModel: WorkItemTrackingInterfaces.WorkItemTypeTemplateUpdateModel, project?: string): Promise; - } - export class WorkItemTrackingApi extends basem.ClientApiBase implements IWorkItemTrackingApi { - constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); - /** - * Creates an attachment. - * - * @param {NodeJS.ReadableStream} contentStream - Content to upload - * @param {string} fileName - * @param {string} uploadType - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.AttachmentReference - */ - createAttachment(customHeaders: VsoBaseInterfaces.IHeaders, contentStream: NodeJS.ReadableStream, fileName: string, uploadType: string, onResult: (err: any, statusCode: number, attachment: WorkItemTrackingInterfaces.AttachmentReference) => void): void; - /** - * Returns an attachment - * - * @param {string} id - * @param {string} fileName - * @param onResult callback function with the resulting ArrayBuffer - */ - getAttachmentContent(id: string, fileName: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * Returns an attachment - * - * @param {string} id - * @param {string} fileName - * @param onResult callback function with the resulting ArrayBuffer - */ - getAttachmentZip(id: string, fileName: string, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} depth - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemClassificationNode[] - */ - getRootNodes(project: string, depth: number, onResult: (err: any, statusCode: number, classificationNodes: WorkItemTrackingInterfaces.WorkItemClassificationNode[]) => void): void; - /** - * @param {WorkItemTrackingInterfaces.WorkItemClassificationNode} postedNode - * @param {string} project - Project ID or project name - * @param {WorkItemTrackingInterfaces.TreeStructureGroup} structureGroup - * @param {string} path - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemClassificationNode - */ - createOrUpdateClassificationNode(postedNode: WorkItemTrackingInterfaces.WorkItemClassificationNode, project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path: string, onResult: (err: any, statusCode: number, classificationNode: WorkItemTrackingInterfaces.WorkItemClassificationNode) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {WorkItemTrackingInterfaces.TreeStructureGroup} structureGroup - * @param {string} path - * @param {number} reclassifyId - * @param onResult callback function - */ - deleteClassificationNode(project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path: string, reclassifyId: number, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {WorkItemTrackingInterfaces.TreeStructureGroup} structureGroup - * @param {string} path - * @param {number} depth - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemClassificationNode - */ - getClassificationNode(project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path: string, depth: number, onResult: (err: any, statusCode: number, classificationNode: WorkItemTrackingInterfaces.WorkItemClassificationNode) => void): void; - /** - * @param {WorkItemTrackingInterfaces.WorkItemClassificationNode} postedNode - * @param {string} project - Project ID or project name - * @param {WorkItemTrackingInterfaces.TreeStructureGroup} structureGroup - * @param {string} path - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemClassificationNode - */ - updateClassificationNode(postedNode: WorkItemTrackingInterfaces.WorkItemClassificationNode, project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path: string, onResult: (err: any, statusCode: number, classificationNode: WorkItemTrackingInterfaces.WorkItemClassificationNode) => void): void; - /** - * @param {string} field - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemField - */ - getField(field: string, onResult: (err: any, statusCode: number, field: WorkItemTrackingInterfaces.WorkItemField) => void): void; - /** - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemField[] - */ - getFields(onResult: (err: any, statusCode: number, fields: WorkItemTrackingInterfaces.WorkItemField[]) => void): void; - /** - * Returns history of all revision for a given work item ID - * - * @param {number} id - * @param {number} top - * @param {number} skip - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemHistory[] - */ - getHistory(id: number, top: number, skip: number, onResult: (err: any, statusCode: number, history: WorkItemTrackingInterfaces.WorkItemHistory[]) => void): void; - /** - * Returns the history value of particular revision - * - * @param {number} id - * @param {number} revisionNumber - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemHistory - */ - getHistoryById(id: number, revisionNumber: number, onResult: (err: any, statusCode: number, history: WorkItemTrackingInterfaces.WorkItemHistory) => void): void; - /** - * Creates a query, or moves a query. - * - * @param {WorkItemTrackingInterfaces.QueryHierarchyItem} postedQuery - The query to create. - * @param {string} project - Project ID or project name - * @param {string} query - The parent path for the query to create. - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.QueryHierarchyItem - */ - createQuery(postedQuery: WorkItemTrackingInterfaces.QueryHierarchyItem, project: string, query: string, onResult: (err: any, statusCode: number, querie: WorkItemTrackingInterfaces.QueryHierarchyItem) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {string} query - * @param onResult callback function - */ - deleteQuery(project: string, query: string, onResult: (err: any, statusCode: number) => void): void; - /** - * Retrieves all queries the user has access to in the current project - * - * @param {string} project - Project ID or project name - * @param {WorkItemTrackingInterfaces.QueryExpand} expand - * @param {number} depth - * @param {boolean} includeDeleted - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.QueryHierarchyItem[] - */ - getQueries(project: string, expand: WorkItemTrackingInterfaces.QueryExpand, depth: number, includeDeleted: boolean, onResult: (err: any, statusCode: number, queries: WorkItemTrackingInterfaces.QueryHierarchyItem[]) => void): void; - /** - * Retrieves a single query by project and either id or path - * - * @param {string} project - Project ID or project name - * @param {string} query - * @param {WorkItemTrackingInterfaces.QueryExpand} expand - * @param {number} depth - * @param {boolean} includeDeleted - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.QueryHierarchyItem - */ - getQuery(project: string, query: string, expand: WorkItemTrackingInterfaces.QueryExpand, depth: number, includeDeleted: boolean, onResult: (err: any, statusCode: number, querie: WorkItemTrackingInterfaces.QueryHierarchyItem) => void): void; - /** - * @param {WorkItemTrackingInterfaces.QueryHierarchyItem} queryUpdate - * @param {string} project - Project ID or project name - * @param {string} query - * @param {boolean} undeleteDescendants - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.QueryHierarchyItem - */ - updateQuery(queryUpdate: WorkItemTrackingInterfaces.QueryHierarchyItem, project: string, query: string, undeleteDescendants: boolean, onResult: (err: any, statusCode: number, querie: WorkItemTrackingInterfaces.QueryHierarchyItem) => void): void; - /** - * @param {number} id - * @param {string} project - Project ID or project name - * @param onResult callback function - */ - destroyWorkItem(id: number, project: string, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {number} id - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemDelete - */ - getDeletedWorkItem(id: number, project: string, onResult: (err: any, statusCode: number, recyclebin: WorkItemTrackingInterfaces.WorkItemDelete) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number[]} ids - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemDeleteReference[] - */ - getDeletedWorkItems(project: string, ids: number[], onResult: (err: any, statusCode: number, recyclebin: WorkItemTrackingInterfaces.WorkItemDeleteReference[]) => void): void; - /** - * @param {WorkItemTrackingInterfaces.WorkItemDeleteUpdate} payload - * @param {number} id - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemDelete - */ - restoreWorkItem(payload: WorkItemTrackingInterfaces.WorkItemDeleteUpdate, id: number, project: string, onResult: (err: any, statusCode: number, recyclebin: WorkItemTrackingInterfaces.WorkItemDelete) => void): void; - /** - * Returns a fully hydrated work item for the requested revision - * - * @param {number} id - * @param {number} revisionNumber - * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItem - */ - getRevision(id: number, revisionNumber: number, expand: WorkItemTrackingInterfaces.WorkItemExpand, onResult: (err: any, statusCode: number, revision: WorkItemTrackingInterfaces.WorkItem) => void): void; - /** - * Returns the list of fully hydrated work item revisions, paged. - * - * @param {number} id - * @param {number} top - * @param {number} skip - * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItem[] - */ - getRevisions(id: number, top: number, skip: number, expand: WorkItemTrackingInterfaces.WorkItemExpand, onResult: (err: any, statusCode: number, revisions: WorkItemTrackingInterfaces.WorkItem[]) => void): void; - /** - * Validates the fields values. - * - * @param {WorkItemTrackingInterfaces.FieldsToEvaluate} ruleEngineInput - * @param onResult callback function - */ - evaluateRulesOnField(ruleEngineInput: WorkItemTrackingInterfaces.FieldsToEvaluate, onResult: (err: any, statusCode: number) => void): void; - /** - * Returns a single update for a work item - * - * @param {number} id - * @param {number} updateNumber - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemUpdate - */ - getUpdate(id: number, updateNumber: number, onResult: (err: any, statusCode: number, update: WorkItemTrackingInterfaces.WorkItemUpdate) => void): void; - /** - * Returns a the deltas between work item revisions - * - * @param {number} id - * @param {number} top - * @param {number} skip - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemUpdate[] - */ - getUpdates(id: number, top: number, skip: number, onResult: (err: any, statusCode: number, updates: WorkItemTrackingInterfaces.WorkItemUpdate[]) => void): void; - /** - * Gets the results of the query. - * - * @param {WorkItemTrackingInterfaces.Wiql} wiql - The query containing the wiql. - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - * @param {boolean} timePrecision - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemQueryResult - */ - queryByWiql(wiql: WorkItemTrackingInterfaces.Wiql, teamContext: TfsCoreInterfaces.TeamContext, timePrecision: boolean, onResult: (err: any, statusCode: number, wiql: WorkItemTrackingInterfaces.WorkItemQueryResult) => void): void; - /** - * Gets the results of the query by id. - * - * @param {string} id - The query id. - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - * @param {boolean} timePrecision - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemQueryResult - */ - queryById(id: string, teamContext: TfsCoreInterfaces.TeamContext, timePrecision: boolean, onResult: (err: any, statusCode: number, wiql: WorkItemTrackingInterfaces.WorkItemQueryResult) => void): void; - /** - * Get a batch of work item links - * - * @param {string} project - Project ID or project name - * @param {string[]} types - A list of types to filter the results to specific work item types. Omit this parameter to get work item links of all work item types. - * @param {string} continuationToken - Specifies the continuationToken to start the batch from. Omit this parameter to get the first batch of links. - * @param {Date} startDateTime - Date/time to use as a starting point for link changes. Only link changes that occurred after that date/time will be returned. Cannot be used in conjunction with 'watermark' parameter. - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.ReportingWorkItemLinksBatch - */ - getReportingLinks(project: string, types: string[], continuationToken: string, startDateTime: Date, onResult: (err: any, statusCode: number, workItemLink: WorkItemTrackingInterfaces.ReportingWorkItemLinksBatch) => void): void; - /** - * Gets the work item relation types. - * - * @param {string} relation - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemRelationType - */ - getRelationType(relation: string, onResult: (err: any, statusCode: number, workItemRelationType: WorkItemTrackingInterfaces.WorkItemRelationType) => void): void; - /** - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemRelationType[] - */ - getRelationTypes(onResult: (err: any, statusCode: number, workItemRelationTypes: WorkItemTrackingInterfaces.WorkItemRelationType[]) => void): void; - /** - * Get a batch of work item revisions with the option of including deleted items - * - * @param {string} project - Project ID or project name - * @param {string[]} fields - A list of fields to return in work item revisions. Omit this parameter to get all reportable fields. - * @param {string[]} types - A list of types to filter the results to specific work item types. Omit this parameter to get work item revisions of all work item types. - * @param {string} continuationToken - Specifies the watermark to start the batch from. Omit this parameter to get the first batch of revisions. - * @param {Date} startDateTime - Date/time to use as a starting point for revisions, all revisions will occur after this date/time. Cannot be used in conjunction with 'watermark' parameter. - * @param {boolean} includeIdentityRef - Return an identity reference instead of a string value for identity fields. - * @param {boolean} includeDeleted - Specify if the deleted item should be returned. - * @param {boolean} includeTagRef - Specify if the tag objects should be returned for System.Tags field. - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.ReportingWorkItemRevisionsBatch - */ - readReportingRevisionsGet(project: string, fields: string[], types: string[], continuationToken: string, startDateTime: Date, includeIdentityRef: boolean, includeDeleted: boolean, includeTagRef: boolean, onResult: (err: any, statusCode: number, workItemRevision: WorkItemTrackingInterfaces.ReportingWorkItemRevisionsBatch) => void): void; - /** - * Get a batch of work item revisions - * - * @param {WorkItemTrackingInterfaces.ReportingWorkItemRevisionsFilter} filter - An object that contains request settings: field filter, type filter, identity format - * @param {string} project - Project ID or project name - * @param {string} continuationToken - Specifies the watermark to start the batch from. Omit this parameter to get the first batch of revisions. - * @param {Date} startDateTime - Date/time to use as a starting point for revisions, all revisions will occur after this date/time. Cannot be used in conjunction with 'watermark' parameter. - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.ReportingWorkItemRevisionsBatch - */ - readReportingRevisionsPost(filter: WorkItemTrackingInterfaces.ReportingWorkItemRevisionsFilter, project: string, continuationToken: string, startDateTime: Date, onResult: (err: any, statusCode: number, workItemRevision: WorkItemTrackingInterfaces.ReportingWorkItemRevisionsBatch) => void): void; - /** - * @param {number} id - * @param {boolean} destroy - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemDelete - */ - deleteWorkItem(id: number, destroy: boolean, onResult: (err: any, statusCode: number, workItem: WorkItemTrackingInterfaces.WorkItemDelete) => void): void; - /** - * Returns a single work item - * - * @param {number} id - * @param {string[]} fields - * @param {Date} asOf - * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItem - */ - getWorkItem(id: number, fields: string[], asOf: Date, expand: WorkItemTrackingInterfaces.WorkItemExpand, onResult: (err: any, statusCode: number, workItem: WorkItemTrackingInterfaces.WorkItem) => void): void; - /** - * Returns a list of work items - * - * @param {number[]} ids - * @param {string[]} fields - * @param {Date} asOf - * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItem[] - */ - getWorkItems(ids: number[], fields: string[], asOf: Date, expand: WorkItemTrackingInterfaces.WorkItemExpand, onResult: (err: any, statusCode: number, workItems: WorkItemTrackingInterfaces.WorkItem[]) => void): void; - /** - * @param {VSSInterfaces.JsonPatchDocument} document - * @param {number} id - * @param {boolean} validateOnly - * @param {boolean} bypassRules - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItem - */ - updateWorkItem(customHeaders: VsoBaseInterfaces.IHeaders, document: VSSInterfaces.JsonPatchDocument, id: number, validateOnly: boolean, bypassRules: boolean, onResult: (err: any, statusCode: number, workItem: WorkItemTrackingInterfaces.WorkItem) => void): void; - /** - * @param {VSSInterfaces.JsonPatchDocument} document - * @param {string} project - Project ID or project name - * @param {string} type - * @param {boolean} validateOnly - * @param {boolean} bypassRules - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItem - */ - createWorkItem(customHeaders: VsoBaseInterfaces.IHeaders, document: VSSInterfaces.JsonPatchDocument, project: string, type: string, validateOnly: boolean, bypassRules: boolean, onResult: (err: any, statusCode: number, workItem: WorkItemTrackingInterfaces.WorkItem) => void): void; - /** - * Returns a single work item from a template - * - * @param {string} project - Project ID or project name - * @param {string} type - * @param {string} fields - * @param {Date} asOf - * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItem - */ - getWorkItemTemplate(project: string, type: string, fields: string, asOf: Date, expand: WorkItemTrackingInterfaces.WorkItemExpand, onResult: (err: any, statusCode: number, workItem: WorkItemTrackingInterfaces.WorkItem) => void): void; - /** - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemTypeCategory[] - */ - getWorkItemTypeCategories(project: string, onResult: (err: any, statusCode: number, workItemTypeCategories: WorkItemTrackingInterfaces.WorkItemTypeCategory[]) => void): void; - /** - * Returns a the deltas between work item revisions - * - * @param {string} project - Project ID or project name - * @param {string} category - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemTypeCategory - */ - getWorkItemTypeCategory(project: string, category: string, onResult: (err: any, statusCode: number, workItemTypeCategorie: WorkItemTrackingInterfaces.WorkItemTypeCategory) => void): void; - /** - * Returns a the deltas between work item revisions - * - * @param {string} project - Project ID or project name - * @param {string} type - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemType - */ - getWorkItemType(project: string, type: string, onResult: (err: any, statusCode: number, workItemType: WorkItemTrackingInterfaces.WorkItemType) => void): void; - /** - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemType[] - */ - getWorkItemTypes(project: string, onResult: (err: any, statusCode: number, workItemTypes: WorkItemTrackingInterfaces.WorkItemType[]) => void): void; - /** - * Returns the dependent fields for the corresponding workitem type and fieldname - * - * @param {string} project - Project ID or project name - * @param {string} type - * @param {string} field - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.FieldDependentRule - */ - getDependentFields(project: string, type: string, field: string, onResult: (err: any, statusCode: number, workItemTypesField: WorkItemTrackingInterfaces.FieldDependentRule) => void): void; - /** - * Export work item type - * - * @param {string} project - Project ID or project name - * @param {string} type - * @param {boolean} exportGlobalLists - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.WorkItemTypeTemplate - */ - exportWorkItemTypeDefinition(project: string, type: string, exportGlobalLists: boolean, onResult: (err: any, statusCode: number, workItemTypeTemplate: WorkItemTrackingInterfaces.WorkItemTypeTemplate) => void): void; - /** - * Add/updates a work item type - * - * @param {WorkItemTrackingInterfaces.WorkItemTypeTemplateUpdateModel} updateModel - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting WorkItemTrackingInterfaces.ProvisioningResult - */ - updateWorkItemTypeDefinition(updateModel: WorkItemTrackingInterfaces.WorkItemTypeTemplateUpdateModel, project: string, onResult: (err: any, statusCode: number, workItemTypeTemplate: WorkItemTrackingInterfaces.ProvisioningResult) => void): void; - } - export class QWorkItemTrackingApi extends basem.QClientApiBase implements IQWorkItemTrackingApi { - api: WorkItemTrackingApi; - constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); - /** - * Creates an attachment. - * - * @param {NodeJS.ReadableStream} contentStream - Content to upload - * @param {string} fileName - * @param {string} uploadType - */ - createAttachment(customHeaders: any, contentStream: NodeJS.ReadableStream, fileName?: string, uploadType?: string): Promise; - /** - * Returns an attachment - * - * @param {string} id - * @param {string} fileName - */ - getAttachmentContent(id: string, fileName?: string): Promise; - /** - * Returns an attachment - * - * @param {string} id - * @param {string} fileName - */ - getAttachmentZip(id: string, fileName?: string): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} depth - */ - getRootNodes(project: string, depth?: number): Promise; - /** - * @param {WorkItemTrackingInterfaces.WorkItemClassificationNode} postedNode - * @param {string} project - Project ID or project name - * @param {WorkItemTrackingInterfaces.TreeStructureGroup} structureGroup - * @param {string} path - */ - createOrUpdateClassificationNode(postedNode: WorkItemTrackingInterfaces.WorkItemClassificationNode, project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path?: string): Promise; - /** - * @param {string} project - Project ID or project name - * @param {WorkItemTrackingInterfaces.TreeStructureGroup} structureGroup - * @param {string} path - * @param {number} reclassifyId - */ - deleteClassificationNode(project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path?: string, reclassifyId?: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {WorkItemTrackingInterfaces.TreeStructureGroup} structureGroup - * @param {string} path - * @param {number} depth - */ - getClassificationNode(project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path?: string, depth?: number): Promise; - /** - * @param {WorkItemTrackingInterfaces.WorkItemClassificationNode} postedNode - * @param {string} project - Project ID or project name - * @param {WorkItemTrackingInterfaces.TreeStructureGroup} structureGroup - * @param {string} path - */ - updateClassificationNode(postedNode: WorkItemTrackingInterfaces.WorkItemClassificationNode, project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path?: string): Promise; - /** - * @param {string} field - */ - getField(field: string): Promise; - /** - */ - getFields(): Promise; - /** - * Returns history of all revision for a given work item ID - * - * @param {number} id - * @param {number} top - * @param {number} skip - */ - getHistory(id: number, top?: number, skip?: number): Promise; - /** - * Returns the history value of particular revision - * - * @param {number} id - * @param {number} revisionNumber - */ - getHistoryById(id: number, revisionNumber: number): Promise; - /** - * Creates a query, or moves a query. - * - * @param {WorkItemTrackingInterfaces.QueryHierarchyItem} postedQuery - The query to create. - * @param {string} project - Project ID or project name - * @param {string} query - The parent path for the query to create. - */ - createQuery(postedQuery: WorkItemTrackingInterfaces.QueryHierarchyItem, project: string, query: string): Promise; - /** - * @param {string} project - Project ID or project name - * @param {string} query - */ - deleteQuery(project: string, query: string): Promise; - /** - * Retrieves all queries the user has access to in the current project - * - * @param {string} project - Project ID or project name - * @param {WorkItemTrackingInterfaces.QueryExpand} expand - * @param {number} depth - * @param {boolean} includeDeleted - */ - getQueries(project: string, expand?: WorkItemTrackingInterfaces.QueryExpand, depth?: number, includeDeleted?: boolean): Promise; - /** - * Retrieves a single query by project and either id or path - * - * @param {string} project - Project ID or project name - * @param {string} query - * @param {WorkItemTrackingInterfaces.QueryExpand} expand - * @param {number} depth - * @param {boolean} includeDeleted - */ - getQuery(project: string, query: string, expand?: WorkItemTrackingInterfaces.QueryExpand, depth?: number, includeDeleted?: boolean): Promise; - /** - * @param {WorkItemTrackingInterfaces.QueryHierarchyItem} queryUpdate - * @param {string} project - Project ID or project name - * @param {string} query - * @param {boolean} undeleteDescendants - */ - updateQuery(queryUpdate: WorkItemTrackingInterfaces.QueryHierarchyItem, project: string, query: string, undeleteDescendants?: boolean): Promise; - /** - * @param {number} id - * @param {string} project - Project ID or project name - */ - destroyWorkItem(id: number, project?: string): Promise; - /** - * @param {number} id - * @param {string} project - Project ID or project name - */ - getDeletedWorkItem(id: number, project?: string): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number[]} ids - */ - getDeletedWorkItems(project?: string, ids?: number[]): Promise; - /** - * @param {WorkItemTrackingInterfaces.WorkItemDeleteUpdate} payload - * @param {number} id - * @param {string} project - Project ID or project name - */ - restoreWorkItem(payload: WorkItemTrackingInterfaces.WorkItemDeleteUpdate, id: number, project?: string): Promise; - /** - * Returns a fully hydrated work item for the requested revision - * - * @param {number} id - * @param {number} revisionNumber - * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand - */ - getRevision(id: number, revisionNumber: number, expand?: WorkItemTrackingInterfaces.WorkItemExpand): Promise; - /** - * Returns the list of fully hydrated work item revisions, paged. - * - * @param {number} id - * @param {number} top - * @param {number} skip - * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand - */ - getRevisions(id: number, top?: number, skip?: number, expand?: WorkItemTrackingInterfaces.WorkItemExpand): Promise; - /** - * Validates the fields values. - * - * @param {WorkItemTrackingInterfaces.FieldsToEvaluate} ruleEngineInput - */ - evaluateRulesOnField(ruleEngineInput: WorkItemTrackingInterfaces.FieldsToEvaluate): Promise; - /** - * Returns a single update for a work item - * - * @param {number} id - * @param {number} updateNumber - */ - getUpdate(id: number, updateNumber: number): Promise; - /** - * Returns a the deltas between work item revisions - * - * @param {number} id - * @param {number} top - * @param {number} skip - */ - getUpdates(id: number, top?: number, skip?: number): Promise; - /** - * Gets the results of the query. - * - * @param {WorkItemTrackingInterfaces.Wiql} wiql - The query containing the wiql. - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - * @param {boolean} timePrecision - */ - queryByWiql(wiql: WorkItemTrackingInterfaces.Wiql, teamContext?: TfsCoreInterfaces.TeamContext, timePrecision?: boolean): Promise; - /** - * Gets the results of the query by id. - * - * @param {string} id - The query id. - * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation - * @param {boolean} timePrecision - */ - queryById(id: string, teamContext?: TfsCoreInterfaces.TeamContext, timePrecision?: boolean): Promise; - /** - * Get a batch of work item links - * - * @param {string} project - Project ID or project name - * @param {string[]} types - A list of types to filter the results to specific work item types. Omit this parameter to get work item links of all work item types. - * @param {string} continuationToken - Specifies the continuationToken to start the batch from. Omit this parameter to get the first batch of links. - * @param {Date} startDateTime - Date/time to use as a starting point for link changes. Only link changes that occurred after that date/time will be returned. Cannot be used in conjunction with 'watermark' parameter. - */ - getReportingLinks(project?: string, types?: string[], continuationToken?: string, startDateTime?: Date): Promise; - /** - * Gets the work item relation types. - * - * @param {string} relation - */ - getRelationType(relation: string): Promise; - /** - */ - getRelationTypes(): Promise; - /** - * Get a batch of work item revisions with the option of including deleted items - * - * @param {string} project - Project ID or project name - * @param {string[]} fields - A list of fields to return in work item revisions. Omit this parameter to get all reportable fields. - * @param {string[]} types - A list of types to filter the results to specific work item types. Omit this parameter to get work item revisions of all work item types. - * @param {string} continuationToken - Specifies the watermark to start the batch from. Omit this parameter to get the first batch of revisions. - * @param {Date} startDateTime - Date/time to use as a starting point for revisions, all revisions will occur after this date/time. Cannot be used in conjunction with 'watermark' parameter. - * @param {boolean} includeIdentityRef - Return an identity reference instead of a string value for identity fields. - * @param {boolean} includeDeleted - Specify if the deleted item should be returned. - * @param {boolean} includeTagRef - Specify if the tag objects should be returned for System.Tags field. - */ - readReportingRevisionsGet(project?: string, fields?: string[], types?: string[], continuationToken?: string, startDateTime?: Date, includeIdentityRef?: boolean, includeDeleted?: boolean, includeTagRef?: boolean): Promise; - /** - * Get a batch of work item revisions - * - * @param {WorkItemTrackingInterfaces.ReportingWorkItemRevisionsFilter} filter - An object that contains request settings: field filter, type filter, identity format - * @param {string} project - Project ID or project name - * @param {string} continuationToken - Specifies the watermark to start the batch from. Omit this parameter to get the first batch of revisions. - * @param {Date} startDateTime - Date/time to use as a starting point for revisions, all revisions will occur after this date/time. Cannot be used in conjunction with 'watermark' parameter. - */ - readReportingRevisionsPost(filter: WorkItemTrackingInterfaces.ReportingWorkItemRevisionsFilter, project?: string, continuationToken?: string, startDateTime?: Date): Promise; - /** - * @param {number} id - * @param {boolean} destroy - */ - deleteWorkItem(id: number, destroy?: boolean): Promise; - /** - * Returns a single work item - * - * @param {number} id - * @param {string[]} fields - * @param {Date} asOf - * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand - */ - getWorkItem(id: number, fields?: string[], asOf?: Date, expand?: WorkItemTrackingInterfaces.WorkItemExpand): Promise; - /** - * Returns a list of work items - * - * @param {number[]} ids - * @param {string[]} fields - * @param {Date} asOf - * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand - */ - getWorkItems(ids: number[], fields?: string[], asOf?: Date, expand?: WorkItemTrackingInterfaces.WorkItemExpand): Promise; - /** - * @param {VSSInterfaces.JsonPatchDocument} document - * @param {number} id - * @param {boolean} validateOnly - * @param {boolean} bypassRules - */ - updateWorkItem(customHeaders: any, document: VSSInterfaces.JsonPatchDocument, id: number, validateOnly?: boolean, bypassRules?: boolean): Promise; - /** - * @param {VSSInterfaces.JsonPatchDocument} document - * @param {string} project - Project ID or project name - * @param {string} type - * @param {boolean} validateOnly - * @param {boolean} bypassRules - */ - createWorkItem(customHeaders: any, document: VSSInterfaces.JsonPatchDocument, project: string, type: string, validateOnly?: boolean, bypassRules?: boolean): Promise; - /** - * Returns a single work item from a template - * - * @param {string} project - Project ID or project name - * @param {string} type - * @param {string} fields - * @param {Date} asOf - * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand - */ - getWorkItemTemplate(project: string, type: string, fields?: string, asOf?: Date, expand?: WorkItemTrackingInterfaces.WorkItemExpand): Promise; - /** - * @param {string} project - Project ID or project name - */ - getWorkItemTypeCategories(project: string): Promise; - /** - * Returns a the deltas between work item revisions - * - * @param {string} project - Project ID or project name - * @param {string} category - */ - getWorkItemTypeCategory(project: string, category: string): Promise; - /** - * Returns a the deltas between work item revisions - * - * @param {string} project - Project ID or project name - * @param {string} type - */ - getWorkItemType(project: string, type: string): Promise; - /** - * @param {string} project - Project ID or project name - */ - getWorkItemTypes(project: string): Promise; - /** - * Returns the dependent fields for the corresponding workitem type and fieldname - * - * @param {string} project - Project ID or project name - * @param {string} type - * @param {string} field - */ - getDependentFields(project: string, type: string, field: string): Promise; - /** - * Export work item type - * - * @param {string} project - Project ID or project name - * @param {string} type - * @param {boolean} exportGlobalLists - */ - exportWorkItemTypeDefinition(project?: string, type?: string, exportGlobalLists?: boolean): Promise; - /** - * Add/updates a work item type - * - * @param {WorkItemTrackingInterfaces.WorkItemTypeTemplateUpdateModel} updateModel - * @param {string} project - Project ID or project name - */ - updateWorkItemTypeDefinition(updateModel: WorkItemTrackingInterfaces.WorkItemTypeTemplateUpdateModel, project?: string): Promise; - } - -} -declare module 'vso-node-api/interfaces/ReleaseInterfaces' { - import FormInputInterfaces = require('vso-node-api/interfaces/common/FormInputInterfaces'); - import VSSInterfaces = require('vso-node-api/interfaces/common/VSSInterfaces'); - export interface AgentArtifactDefinition { - alias: string; - artifactType: AgentArtifactType; - details: string; - name: string; - version: string; - } - export enum AgentArtifactType { - XamlBuild = 0, - Build = 1, - Jenkins = 2, - FileShare = 3, - Nuget = 4, - TfsOnPrem = 5, - GitHub = 6, - TFGit = 7, - ExternalTfsBuild = 8, - } - export interface ApprovalOptions { - releaseCreatorCanBeApprover: boolean; - requiredApproverCount: number; - } - export interface ApprovalPendingEvent { - } - export enum ApprovalStatus { - Undefined = 0, - Pending = 1, - Approved = 2, - Rejected = 4, - Reassigned = 6, - Canceled = 7, - Skipped = 8, - } - export enum ApprovalType { - Undefined = 0, - PreDeploy = 1, - PostDeploy = 2, - } - export interface Artifact { - alias: string; - definitionReference: { - [key: string]: ArtifactSourceReference; - }; - id: number; - isPrimary: boolean; - type: string; - } - export interface ArtifactInstanceData { - accountName: string; - authenticationToken: string; - tfsUrl: string; - version: string; - } - export interface ArtifactMetadata { - alias: string; - instanceReference: BuildVersion; - } - export interface ArtifactProvider { - id: number; - name: string; - sourceUri: string; - version: string; - } - export interface ArtifactSourceId { - artifactTypeId: string; - sourceIdInputs: SourceIdInput[]; - } - export interface ArtifactSourceIdsQueryResult { - artifactSourceIds: ArtifactSourceId[]; - } - export interface ArtifactSourceReference { - id: string; - name: string; - } - export interface ArtifactTypeDefinition { - inputDescriptors: FormInputInterfaces.InputDescriptor[]; - name: string; - } - export interface ArtifactVersion { - artifactSourceId: number; - errorMessage: string; - versions: BuildVersion[]; - } - export interface ArtifactVersionQueryResult { - artifactVersions: ArtifactVersion[]; - } - export enum AuditAction { - Add = 1, - Update = 2, - Delete = 3, - } - export interface BuildVersion { - id: string; - name: string; - sourceBranch: string; - } - /** - * Represents a change associated with a build. - */ - export interface Change { - /** - * The author of the change. - */ - author: VSSInterfaces.IdentityRef; - /** - * The type of change. "commit", "changeset", etc. - */ - changeType: string; - /** - * The location of a user-friendly representation of the resource. - */ - displayUri: string; - /** - * Something that identifies the change. For a commit, this would be the SHA1. For a TFVC changeset, this would be the changeset id. - */ - id: string; - /** - * The location of the full representation of the resource. - */ - location: string; - /** - * A description of the change. This might be a commit message or changeset description. - */ - message: string; - /** - * A timestamp for the change. - */ - timestamp: Date; - } - export interface Condition { - conditionType: ConditionType; - name: string; - value: string; - } - export enum ConditionType { - Undefined = 0, - Event = 1, - EnvironmentState = 2, - } - export interface ConfigurationVariableValue { - isSecret: boolean; - value: string; - } - export interface Consumer { - consumerId: number; - consumerName: string; - } - export interface DeploymentAttempt { - attempt: number; - /** - * Error log to show any unexpected error that occurred during executing deploy step - */ - errorLog: string; - id: number; - job: ReleaseTask; - runPlanId: string; - tasks: ReleaseTask[]; - } - /** - * Defines policy on environment queuing at Release Management side queue. We will send to Environment Runner [creating pre-deploy and other steps] only when the policies mentioned are satisfied. - */ - export interface EnvironmentExecutionPolicy { - /** - * This policy decides, how many environments would be with Environment Runner. - */ - concurrencyCount: number; - /** - * Queue depth in the EnvironmentQueue table, this table keeps the environment entries till Environment Runner is free [as per it's policy] to take another environment for running. - */ - queueDepthCount: number; - } - export enum EnvironmentStatus { - Undefined = 0, - NotStarted = 1, - Pending = 2, - Succeeded = 3, - Rejected = 4, - InProgress = 5, - Canceled = 6, - Queued = 7, - } - export interface Issue { - issueType: string; - message: string; - } - export interface RealtimeReleaseEvent { - projectId: string; - releaseId: number; - } - export interface Release { - artifacts: Artifact[]; - createdBy: VSSInterfaces.IdentityRef; - createdOn: Date; - description: string; - environments: ReleaseEnvironment[]; - id: number; - keepForever: boolean; - modifiedBy: VSSInterfaces.IdentityRef; - modifiedOn: Date; - name: string; - poolName: string; - reason: ReleaseReason; - releaseDefinition: ShallowReference; - releaseNameFormat: string; - status: ReleaseStatus; - variables: { - [key: string]: ConfigurationVariableValue; - }; - } - export interface ReleaseApproval { - approvalType: ApprovalType; - approvedBy: VSSInterfaces.IdentityRef; - approver: VSSInterfaces.IdentityRef; - attempt: number; - comments: string; - createdOn: Date; - history: ReleaseApprovalHistory[]; - id: number; - isAutomated: boolean; - isNotificationOn: boolean; - modifiedOn: Date; - rank: number; - release: ShallowReference; - releaseDefinition: ShallowReference; - releaseEnvironment: ShallowReference; - revision: number; - status: ApprovalStatus; - trialNumber: number; - } - export interface ReleaseApprovalHistory { - approver: VSSInterfaces.IdentityRef; - changedBy: VSSInterfaces.IdentityRef; - comments: string; - createdOn: Date; - modifiedOn: Date; - revision: number; - } - export interface ReleaseArtifact { - artifactProvider: ArtifactProvider; - artifactType: string; - definitionData: string; - definitionId: number; - description: string; - id: number; - name: string; - releaseId: number; - } - export interface ReleaseDefinition { - artifacts: Artifact[]; - createdBy: VSSInterfaces.IdentityRef; - createdOn: Date; - environments: ReleaseDefinitionEnvironment[]; - id: number; - modifiedBy: VSSInterfaces.IdentityRef; - modifiedOn: Date; - name: string; - releaseNameFormat: string; - retentionPolicy: RetentionPolicy; - revision: number; - triggers: ReleaseTrigger[]; - variables: { - [key: string]: ConfigurationVariableValue; - }; - } - export interface ReleaseDefinitionApprovals { - approvalOptions: ApprovalOptions; - approvals: ReleaseDefinitionApprovalStep[]; - } - export interface ReleaseDefinitionApprovalStep extends ReleaseDefinitionEnvironmentStep { - approver: VSSInterfaces.IdentityRef; - isAutomated: boolean; - isNotificationOn: boolean; - rank: number; - } - export interface ReleaseDefinitionDeployStep extends ReleaseDefinitionEnvironmentStep { - /** - * The list of steps for this definition. - */ - tasks: WorkflowTask[]; - } - export interface ReleaseDefinitionEnvironment { - conditions: Condition[]; - demands: any[]; - deployStep: ReleaseDefinitionDeployStep; - executionPolicy: EnvironmentExecutionPolicy; - id: number; - name: string; - owner: VSSInterfaces.IdentityRef; - postDeployApprovals: ReleaseDefinitionApprovals; - preDeployApprovals: ReleaseDefinitionApprovals; - queueId: number; - rank: number; - runOptions: { - [key: string]: string; - }; - variables: { - [key: string]: ConfigurationVariableValue; - }; - } - export interface ReleaseDefinitionEnvironmentStep { - id: number; - } - export interface ReleaseDefinitionEnvironmentSummary { - id: number; - lastReleases: ShallowReference[]; - name: string; - } - export interface ReleaseDefinitionEnvironmentTemplate { - canDelete: boolean; - category: string; - description: string; - environment: ReleaseDefinitionEnvironment; - iconTaskId: string; - id: string; - name: string; - } - export enum ReleaseDefinitionExpands { - None = 0, - Environments = 2, - Artifacts = 4, - } - export interface ReleaseDefinitionRevision { - changedBy: VSSInterfaces.IdentityRef; - changedDate: Date; - changeType: AuditAction; - definitionId: number; - definitionUrl: string; - revision: number; - } - export interface ReleaseDefinitionSummary { - environments: ReleaseDefinitionEnvironmentSummary[]; - releaseDefinition: ShallowReference; - releases: Release[]; - } - export interface ReleaseEnvironment { - conditions: Condition[]; - createdOn: Date; - definitionEnvironmentId: number; - demands: any[]; - deploySteps: DeploymentAttempt[]; - id: number; - modifiedOn: Date; - name: string; - owner: VSSInterfaces.IdentityRef; - postApprovalsSnapshot: ReleaseDefinitionApprovals; - postDeployApprovals: ReleaseApproval[]; - preApprovalsSnapshot: ReleaseDefinitionApprovals; - preDeployApprovals: ReleaseApproval[]; - queueId: number; - rank: number; - releaseId: number; - runOptions: { - [key: string]: string; - }; - scheduledDeploymentTime: Date; - status: EnvironmentStatus; - variables: { - [key: string]: ConfigurationVariableValue; - }; - workflowTasks: WorkflowTask[]; - } - export interface ReleaseEnvironmentCompletedEvent { - createdByName: string; - definitionName: string; - environment: ReleaseEnvironment; - projectName: string; - releaseCreatedBy: VSSInterfaces.IdentityRef; - releaseLogsUri: string; - releaseName: string; - status: string; - title: string; - webAccessUri: string; - } - export enum ReleaseExpands { - None = 0, - Environments = 2, - Artifacts = 4, - Approvals = 8, - } - export enum ReleaseQueryOrder { - Descending = 0, - Ascending = 1, - } - export enum ReleaseReason { - None = 0, - Manual = 1, - ContinuousIntegration = 2, - Schedule = 3, - } - export interface ReleaseSchedule { - /** - * Days of the week to release - */ - daysToRelease: ScheduleDays; - /** - * Team Foundation Job Definition Job Id - */ - jobId: string; - /** - * Local time zone hour to start - */ - startHours: number; - /** - * Local time zone minute to start - */ - startMinutes: number; - /** - * Time zone Id of release schedule, such as 'UTC' - */ - timeZoneId: string; - } - export interface ReleaseStartMetadata { - artifacts: ArtifactMetadata[]; - definitionId: number; - description: string; - isDraft: boolean; - reason: ReleaseReason; - } - export enum ReleaseStatus { - Undefined = 0, - Draft = 1, - Abandoned = 2, - Active = 3, - } - export interface ReleaseTask { - agentName: string; - dateEnded: Date; - dateStarted: Date; - id: number; - issues: Issue[]; - lineCount: number; - name: string; - rank: number; - status: TaskStatus; - timelineRecordId: string; - } - export interface ReleaseTaskLogUpdatedEvent extends RealtimeReleaseEvent { - environmentId: number; - lines: string[]; - timelineRecordId: string; - } - export interface ReleaseTasksUpdatedEvent extends RealtimeReleaseEvent { - environmentId: number; - job: ReleaseTask; - releaseStepId: number; - tasks: ReleaseTask[]; - } - export interface ReleaseTrigger { - /** - * Artifact source alias for ArtifactSource trigger type - value is null for all other trigger types - */ - artifactAlias: string; - /** - * Release schedule for Schedule trigger type - value is null for all other trigger types - */ - schedule: ReleaseSchedule; - triggerType: ReleaseTriggerType; - } - export enum ReleaseTriggerType { - Undefined = 0, - ArtifactSource = 1, - Schedule = 2, - } - export interface ReleaseUpdatedEvent extends RealtimeReleaseEvent { - release: Release; - } - export interface ReleaseUpdateMetadata { - keepForever: boolean; - status: ReleaseStatus; - } - export interface ReleaseWorkItemRef { - id: string; - url: string; - } - export interface RetentionPolicy { - daysToKeep: number; - } - export enum ScheduleDays { - None = 0, - Monday = 1, - Tuesday = 2, - Wednesday = 4, - Thursday = 8, - Friday = 16, - Saturday = 32, - Sunday = 64, - All = 127, - } - export interface ShallowReference { - id: number; - name: string; - url: string; - } - export interface SourceIdInput { - id: string; - name: string; - } - export enum TaskStatus { - Unknown = 0, - Pending = 1, - InProgress = 2, - Success = 3, - Failure = 4, - Canceled = 5, - Skipped = 6, - } - export interface TimeZone { - displayName: string; - id: string; - } - export interface TimeZoneList { - utcTimeZone: TimeZone; - validTimeZones: TimeZone[]; - } - export interface WorkflowTask { - alwaysRun: boolean; - continueOnError: boolean; - enabled: boolean; - inputs: { - [key: string]: string; - }; - name: string; - taskId: string; - version: string; - } - export var TypeInfo: { - AgentArtifactDefinition: { - fields: any; - }; - AgentArtifactType: { - enumValues: { - "xamlBuild": number; - "build": number; - "jenkins": number; - "fileShare": number; - "nuget": number; - "tfsOnPrem": number; - "gitHub": number; - "tFGit": number; - "externalTfsBuild": number; - }; - }; - ApprovalOptions: { - fields: any; - }; - ApprovalPendingEvent: { - fields: any; - }; - ApprovalStatus: { - enumValues: { - "undefined": number; - "pending": number; - "approved": number; - "rejected": number; - "reassigned": number; - "canceled": number; - "skipped": number; - }; - }; - ApprovalType: { - enumValues: { - "undefined": number; - "preDeploy": number; - "postDeploy": number; - }; - }; - Artifact: { - fields: any; - }; - ArtifactInstanceData: { - fields: any; - }; - ArtifactMetadata: { - fields: any; - }; - ArtifactProvider: { - fields: any; - }; - ArtifactSourceId: { - fields: any; - }; - ArtifactSourceIdsQueryResult: { - fields: any; - }; - ArtifactSourceReference: { - fields: any; - }; - ArtifactTypeDefinition: { - fields: any; - }; - ArtifactVersion: { - fields: any; - }; - ArtifactVersionQueryResult: { - fields: any; - }; - AuditAction: { - enumValues: { - "add": number; - "update": number; - "delete": number; - }; - }; - BuildVersion: { - fields: any; - }; - Change: { - fields: any; - }; - Condition: { - fields: any; - }; - ConditionType: { - enumValues: { - "undefined": number; - "event": number; - "environmentState": number; - }; - }; - ConfigurationVariableValue: { - fields: any; - }; - Consumer: { - fields: any; - }; - DeploymentAttempt: { - fields: any; - }; - EnvironmentExecutionPolicy: { - fields: any; - }; - EnvironmentStatus: { - enumValues: { - "undefined": number; - "notStarted": number; - "pending": number; - "succeeded": number; - "rejected": number; - "inProgress": number; - "canceled": number; - "queued": number; - }; - }; - Issue: { - fields: any; - }; - RealtimeReleaseEvent: { - fields: any; - }; - Release: { - fields: any; - }; - ReleaseApproval: { - fields: any; - }; - ReleaseApprovalHistory: { - fields: any; - }; - ReleaseArtifact: { - fields: any; - }; - ReleaseDefinition: { - fields: any; - }; - ReleaseDefinitionApprovals: { - fields: any; - }; - ReleaseDefinitionApprovalStep: { - fields: any; - }; - ReleaseDefinitionDeployStep: { - fields: any; - }; - ReleaseDefinitionEnvironment: { - fields: any; - }; - ReleaseDefinitionEnvironmentStep: { - fields: any; - }; - ReleaseDefinitionEnvironmentSummary: { - fields: any; - }; - ReleaseDefinitionEnvironmentTemplate: { - fields: any; - }; - ReleaseDefinitionExpands: { - enumValues: { - "none": number; - "environments": number; - "artifacts": number; - }; - }; - ReleaseDefinitionRevision: { - fields: any; - }; - ReleaseDefinitionSummary: { - fields: any; - }; - ReleaseEnvironment: { - fields: any; - }; - ReleaseEnvironmentCompletedEvent: { - fields: any; - }; - ReleaseExpands: { - enumValues: { - "none": number; - "environments": number; - "artifacts": number; - "approvals": number; - }; - }; - ReleaseQueryOrder: { - enumValues: { - "descending": number; - "ascending": number; - }; - }; - ReleaseReason: { - enumValues: { - "none": number; - "manual": number; - "continuousIntegration": number; - "schedule": number; - }; - }; - ReleaseSchedule: { - fields: any; - }; - ReleaseStartMetadata: { - fields: any; - }; - ReleaseStatus: { - enumValues: { - "undefined": number; - "draft": number; - "abandoned": number; - "active": number; - }; - }; - ReleaseTask: { - fields: any; - }; - ReleaseTaskLogUpdatedEvent: { - fields: any; - }; - ReleaseTasksUpdatedEvent: { - fields: any; - }; - ReleaseTrigger: { - fields: any; - }; - ReleaseTriggerType: { - enumValues: { - "undefined": number; - "artifactSource": number; - "schedule": number; - }; - }; - ReleaseUpdatedEvent: { - fields: any; - }; - ReleaseUpdateMetadata: { - fields: any; - }; - ReleaseWorkItemRef: { - fields: any; - }; - RetentionPolicy: { - fields: any; - }; - ScheduleDays: { - enumValues: { - "none": number; - "monday": number; - "tuesday": number; - "wednesday": number; - "thursday": number; - "friday": number; - "saturday": number; - "sunday": number; - "all": number; - }; - }; - ShallowReference: { - fields: any; - }; - SourceIdInput: { - fields: any; - }; - TaskStatus: { - enumValues: { - "unknown": number; - "pending": number; - "inProgress": number; - "success": number; - "failure": number; - "canceled": number; - "skipped": number; - }; - }; - TimeZone: { - fields: any; - }; - TimeZoneList: { - fields: any; - }; - WorkflowTask: { - fields: any; - }; - }; - -} -declare module 'vso-node-api/ReleaseApi' { - - - import Q = require('q'); - import basem = require('vso-node-api/ClientApiBases'); - import VsoBaseInterfaces = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); - import FormInputInterfaces = require('vso-node-api/interfaces/common/FormInputInterfaces'); - import ReleaseInterfaces = require('vso-node-api/interfaces/ReleaseInterfaces'); - export interface IReleaseApi extends basem.ClientApiBase { - getAgentArtifactDefinitions(project: string, releaseId: number, onResult: (err: any, statusCode: number, agentartifacts: ReleaseInterfaces.AgentArtifactDefinition[]) => void): void; - getApprovals(project: string, assignedToFilter: string, statusFilter: ReleaseInterfaces.ApprovalStatus, releaseIdsFilter: number[], onResult: (err: any, statusCode: number, approvals: ReleaseInterfaces.ReleaseApproval[]) => void): void; - getApprovalHistory(project: string, approvalStepId: number, onResult: (err: any, statusCode: number, approval: ReleaseInterfaces.ReleaseApproval) => void): void; - updateReleaseApproval(approval: ReleaseInterfaces.ReleaseApproval, project: string, approvalId: number, onResult: (err: any, statusCode: number, approval: ReleaseInterfaces.ReleaseApproval) => void): void; - getReleaseChanges(project: string, releaseId: number, baseReleaseId: number, top: number, onResult: (err: any, statusCode: number, changes: ReleaseInterfaces.Change[]) => void): void; - createReleaseDefinition(releaseDefinition: ReleaseInterfaces.ReleaseDefinition, project: string, onResult: (err: any, statusCode: number, definition: ReleaseInterfaces.ReleaseDefinition) => void): void; - deleteReleaseDefinition(project: string, definitionId: number, onResult: (err: any, statusCode: number) => void): void; - getReleaseDefinition(project: string, definitionId: number, onResult: (err: any, statusCode: number, definition: ReleaseInterfaces.ReleaseDefinition) => void): void; - getReleaseDefinitions(project: string, searchText: string, artifactIdFilter: number, expand: ReleaseInterfaces.ReleaseDefinitionExpands, onResult: (err: any, statusCode: number, definitions: ReleaseInterfaces.ReleaseDefinition[]) => void): void; - getReleaseDefinitionsForArtifactSource(project: string, artifactType: string, artifactSourceId: string, expand: ReleaseInterfaces.ReleaseDefinitionExpands, onResult: (err: any, statusCode: number, definitions: ReleaseInterfaces.ReleaseDefinition[]) => void): void; - updateReleaseDefinition(releaseDefinition: ReleaseInterfaces.ReleaseDefinition, project: string, onResult: (err: any, statusCode: number, definition: ReleaseInterfaces.ReleaseDefinition) => void): void; - getReleaseEnvironment(project: string, releaseId: number, environmentId: number, onResult: (err: any, statusCode: number, environment: ReleaseInterfaces.ReleaseEnvironment) => void): void; - updateReleaseEnvironment(environmentUpdateData: any, project: string, releaseId: number, environmentId: number, onResult: (err: any, statusCode: number, environment: ReleaseInterfaces.ReleaseEnvironment) => void): void; - createDefinitionEnvironmentTemplate(template: ReleaseInterfaces.ReleaseDefinitionEnvironmentTemplate, project: string, onResult: (err: any, statusCode: number, environmenttemplate: ReleaseInterfaces.ReleaseDefinitionEnvironmentTemplate) => void): void; - deleteDefinitionEnvironmentTemplate(project: string, templateId: string, onResult: (err: any, statusCode: number) => void): void; - getDefinitionEnvironmentTemplate(project: string, templateId: string, onResult: (err: any, statusCode: number, environmenttemplate: ReleaseInterfaces.ReleaseDefinitionEnvironmentTemplate) => void): void; - listDefinitionEnvironmentTemplates(project: string, onResult: (err: any, statusCode: number, environmenttemplates: ReleaseInterfaces.ReleaseDefinitionEnvironmentTemplate[]) => void): void; - getInputValues(query: FormInputInterfaces.InputValuesQuery, project: string, onResult: (err: any, statusCode: number, inputvaluesquery: FormInputInterfaces.InputValuesQuery) => void): void; - getLogs(project: string, releaseId: number, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - getLog(project: string, releaseId: number, environmentId: number, taskId: number, attemptId: number, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - createRelease(releaseStartMetadata: ReleaseInterfaces.ReleaseStartMetadata, project: string, onResult: (err: any, statusCode: number, release: ReleaseInterfaces.Release) => void): void; - deleteRelease(project: string, releaseId: number, onResult: (err: any, statusCode: number) => void): void; - getRelease(project: string, releaseId: number, includeAllApprovals: boolean, onResult: (err: any, statusCode: number, release: ReleaseInterfaces.Release) => void): void; - getReleaseDefinitionSummary(project: string, definitionId: number, releaseCount: number, includeArtifact: boolean, onResult: (err: any, statusCode: number, release: ReleaseInterfaces.ReleaseDefinitionSummary) => void): void; - getReleases(project: string, definitionId: number, definitionEnvironmentId: number, searchText: string, createdBy: string, statusFilter: ReleaseInterfaces.ReleaseStatus, minCreatedTime: Date, maxCreatedTime: Date, queryOrder: ReleaseInterfaces.ReleaseQueryOrder, top: number, continuationToken: number, expand: ReleaseInterfaces.ReleaseExpands, artifactTypeId: string, artifactSourceId: number, artifactVersionId: string, onResult: (err: any, statusCode: number, releases: ReleaseInterfaces.Release[]) => void): void; - updateRelease(release: ReleaseInterfaces.Release, project: string, releaseId: number, onResult: (err: any, statusCode: number, release: ReleaseInterfaces.Release) => void): void; - updateReleaseResource(releaseUpdateMetadata: ReleaseInterfaces.ReleaseUpdateMetadata, project: string, releaseId: number, onResult: (err: any, statusCode: number, release: ReleaseInterfaces.Release) => void): void; - getReleaseDefinitionHistory(project: string, definitionId: number, onResult: (err: any, statusCode: number, revisions: ReleaseInterfaces.ReleaseDefinitionRevision[]) => void): void; - getReleaseDefinitionRevision(project: string, definitionId: number, revision: number, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - getArtifactsSources(project: string, typeId: string, onResult: (err: any, statusCode: number, source: ReleaseInterfaces.ArtifactSourceIdsQueryResult) => void): void; - getTasks(project: string, releaseId: number, environmentId: number, attemptId: number, onResult: (err: any, statusCode: number, tasks: ReleaseInterfaces.ReleaseTask[]) => void): void; - getArtifactTypeDefinitions(project: string, onResult: (err: any, statusCode: number, types: ReleaseInterfaces.ArtifactTypeDefinition[]) => void): void; - getArtifactVersions(project: string, releaseDefinitionId: number, onResult: (err: any, statusCode: number, version: ReleaseInterfaces.ArtifactVersionQueryResult) => void): void; - getArtifactVersionsForSources(artifacts: ReleaseInterfaces.Artifact[], project: string, onResult: (err: any, statusCode: number, version: ReleaseInterfaces.ArtifactVersionQueryResult) => void): void; - getReleaseWorkItemsRefs(project: string, releaseId: number, baseReleaseId: number, top: number, onResult: (err: any, statusCode: number, workitems: ReleaseInterfaces.ReleaseWorkItemRef[]) => void): void; - } - export interface IQReleaseApi extends basem.QClientApiBase { - getAgentArtifactDefinitions(project: string, releaseId: number): Promise; - getApprovals(project: string, assignedToFilter?: string, statusFilter?: ReleaseInterfaces.ApprovalStatus, releaseIdsFilter?: number[]): Promise; - getApprovalHistory(project: string, approvalStepId: number): Promise; - updateReleaseApproval(approval: ReleaseInterfaces.ReleaseApproval, project: string, approvalId: number): Promise; - getReleaseChanges(project: string, releaseId: number, baseReleaseId?: number, top?: number): Promise; - createReleaseDefinition(releaseDefinition: ReleaseInterfaces.ReleaseDefinition, project: string): Promise; - deleteReleaseDefinition(project: string, definitionId: number): Promise; - getReleaseDefinition(project: string, definitionId: number): Promise; - getReleaseDefinitions(project: string, searchText?: string, artifactIdFilter?: number, expand?: ReleaseInterfaces.ReleaseDefinitionExpands): Promise; - getReleaseDefinitionsForArtifactSource(project: string, artifactType: string, artifactSourceId: string, expand?: ReleaseInterfaces.ReleaseDefinitionExpands): Promise; - updateReleaseDefinition(releaseDefinition: ReleaseInterfaces.ReleaseDefinition, project: string): Promise; - getReleaseEnvironment(project: string, releaseId: number, environmentId: number): Promise; - updateReleaseEnvironment(environmentUpdateData: any, project: string, releaseId: number, environmentId: number): Promise; - createDefinitionEnvironmentTemplate(template: ReleaseInterfaces.ReleaseDefinitionEnvironmentTemplate, project: string): Promise; - deleteDefinitionEnvironmentTemplate(project: string, templateId: string): Promise; - getDefinitionEnvironmentTemplate(project: string, templateId: string): Promise; - listDefinitionEnvironmentTemplates(project: string): Promise; - getInputValues(query: FormInputInterfaces.InputValuesQuery, project: string): Promise; - getLogs(project: string, releaseId: number): Promise; - getLog(project: string, releaseId: number, environmentId: number, taskId: number, attemptId?: number): Promise; - createRelease(releaseStartMetadata: ReleaseInterfaces.ReleaseStartMetadata, project: string): Promise; - deleteRelease(project: string, releaseId: number): Promise; - getRelease(project: string, releaseId: number, includeAllApprovals?: boolean): Promise; - getReleaseDefinitionSummary(project: string, definitionId: number, releaseCount: number, includeArtifact?: boolean): Promise; - getReleases(project: string, definitionId?: number, definitionEnvironmentId?: number, searchText?: string, createdBy?: string, statusFilter?: ReleaseInterfaces.ReleaseStatus, minCreatedTime?: Date, maxCreatedTime?: Date, queryOrder?: ReleaseInterfaces.ReleaseQueryOrder, top?: number, continuationToken?: number, expand?: ReleaseInterfaces.ReleaseExpands, artifactTypeId?: string, artifactSourceId?: number, artifactVersionId?: string): Promise; - updateRelease(release: ReleaseInterfaces.Release, project: string, releaseId: number): Promise; - updateReleaseResource(releaseUpdateMetadata: ReleaseInterfaces.ReleaseUpdateMetadata, project: string, releaseId: number): Promise; - getReleaseDefinitionHistory(project: string, definitionId: number): Promise; - getReleaseDefinitionRevision(project: string, definitionId: number, revision: number): Promise; - getArtifactsSources(project: string, typeId?: string): Promise; - getTasks(project: string, releaseId: number, environmentId: number, attemptId?: number): Promise; - getArtifactTypeDefinitions(project: string): Promise; - getArtifactVersions(project: string, releaseDefinitionId: number): Promise; - getArtifactVersionsForSources(artifacts: ReleaseInterfaces.Artifact[], project: string): Promise; - getReleaseWorkItemsRefs(project: string, releaseId: number, baseReleaseId?: number, top?: number): Promise; - } - export class ReleaseApi extends basem.ClientApiBase implements IReleaseApi { - constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); - /** - * Returns the artifact details that automation agent requires - * - * @param {string} project - Project ID or project name - * @param {number} releaseId - * @param onResult callback function with the resulting ReleaseInterfaces.AgentArtifactDefinition[] - */ - getAgentArtifactDefinitions(project: string, releaseId: number, onResult: (err: any, statusCode: number, agentartifacts: ReleaseInterfaces.AgentArtifactDefinition[]) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {string} assignedToFilter - * @param {ReleaseInterfaces.ApprovalStatus} statusFilter - * @param {number[]} releaseIdsFilter - * @param onResult callback function with the resulting ReleaseInterfaces.ReleaseApproval[] - */ - getApprovals(project: string, assignedToFilter: string, statusFilter: ReleaseInterfaces.ApprovalStatus, releaseIdsFilter: number[], onResult: (err: any, statusCode: number, approvals: ReleaseInterfaces.ReleaseApproval[]) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} approvalStepId - * @param onResult callback function with the resulting ReleaseInterfaces.ReleaseApproval - */ - getApprovalHistory(project: string, approvalStepId: number, onResult: (err: any, statusCode: number, approval: ReleaseInterfaces.ReleaseApproval) => void): void; - /** - * @param {ReleaseInterfaces.ReleaseApproval} approval - * @param {string} project - Project ID or project name - * @param {number} approvalId - * @param onResult callback function with the resulting ReleaseInterfaces.ReleaseApproval - */ - updateReleaseApproval(approval: ReleaseInterfaces.ReleaseApproval, project: string, approvalId: number, onResult: (err: any, statusCode: number, approval: ReleaseInterfaces.ReleaseApproval) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} releaseId - * @param {number} baseReleaseId - * @param {number} top - * @param onResult callback function with the resulting ReleaseInterfaces.Change[] - */ - getReleaseChanges(project: string, releaseId: number, baseReleaseId: number, top: number, onResult: (err: any, statusCode: number, changes: ReleaseInterfaces.Change[]) => void): void; - /** - * @param {ReleaseInterfaces.ReleaseDefinition} releaseDefinition - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting ReleaseInterfaces.ReleaseDefinition - */ - createReleaseDefinition(releaseDefinition: ReleaseInterfaces.ReleaseDefinition, project: string, onResult: (err: any, statusCode: number, definition: ReleaseInterfaces.ReleaseDefinition) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} definitionId - * @param onResult callback function - */ - deleteReleaseDefinition(project: string, definitionId: number, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} definitionId - * @param onResult callback function with the resulting ReleaseInterfaces.ReleaseDefinition - */ - getReleaseDefinition(project: string, definitionId: number, onResult: (err: any, statusCode: number, definition: ReleaseInterfaces.ReleaseDefinition) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {string} searchText - * @param {number} artifactIdFilter - * @param {ReleaseInterfaces.ReleaseDefinitionExpands} expand - * @param onResult callback function with the resulting ReleaseInterfaces.ReleaseDefinition[] - */ - getReleaseDefinitions(project: string, searchText: string, artifactIdFilter: number, expand: ReleaseInterfaces.ReleaseDefinitionExpands, onResult: (err: any, statusCode: number, definitions: ReleaseInterfaces.ReleaseDefinition[]) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {string} artifactType - * @param {string} artifactSourceId - * @param {ReleaseInterfaces.ReleaseDefinitionExpands} expand - * @param onResult callback function with the resulting ReleaseInterfaces.ReleaseDefinition[] - */ - getReleaseDefinitionsForArtifactSource(project: string, artifactType: string, artifactSourceId: string, expand: ReleaseInterfaces.ReleaseDefinitionExpands, onResult: (err: any, statusCode: number, definitions: ReleaseInterfaces.ReleaseDefinition[]) => void): void; - /** - * @param {ReleaseInterfaces.ReleaseDefinition} releaseDefinition - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting ReleaseInterfaces.ReleaseDefinition - */ - updateReleaseDefinition(releaseDefinition: ReleaseInterfaces.ReleaseDefinition, project: string, onResult: (err: any, statusCode: number, definition: ReleaseInterfaces.ReleaseDefinition) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} releaseId - * @param {number} environmentId - * @param onResult callback function with the resulting ReleaseInterfaces.ReleaseEnvironment - */ - getReleaseEnvironment(project: string, releaseId: number, environmentId: number, onResult: (err: any, statusCode: number, environment: ReleaseInterfaces.ReleaseEnvironment) => void): void; - /** - * @param {any} environmentUpdateData - * @param {string} project - Project ID or project name - * @param {number} releaseId - * @param {number} environmentId - * @param onResult callback function with the resulting ReleaseInterfaces.ReleaseEnvironment - */ - updateReleaseEnvironment(environmentUpdateData: any, project: string, releaseId: number, environmentId: number, onResult: (err: any, statusCode: number, environment: ReleaseInterfaces.ReleaseEnvironment) => void): void; - /** - * @param {ReleaseInterfaces.ReleaseDefinitionEnvironmentTemplate} template - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting ReleaseInterfaces.ReleaseDefinitionEnvironmentTemplate - */ - createDefinitionEnvironmentTemplate(template: ReleaseInterfaces.ReleaseDefinitionEnvironmentTemplate, project: string, onResult: (err: any, statusCode: number, environmenttemplate: ReleaseInterfaces.ReleaseDefinitionEnvironmentTemplate) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {string} templateId - * @param onResult callback function - */ - deleteDefinitionEnvironmentTemplate(project: string, templateId: string, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {string} templateId - * @param onResult callback function with the resulting ReleaseInterfaces.ReleaseDefinitionEnvironmentTemplate - */ - getDefinitionEnvironmentTemplate(project: string, templateId: string, onResult: (err: any, statusCode: number, environmenttemplate: ReleaseInterfaces.ReleaseDefinitionEnvironmentTemplate) => void): void; - /** - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting ReleaseInterfaces.ReleaseDefinitionEnvironmentTemplate[] - */ - listDefinitionEnvironmentTemplates(project: string, onResult: (err: any, statusCode: number, environmenttemplates: ReleaseInterfaces.ReleaseDefinitionEnvironmentTemplate[]) => void): void; - /** - * @param {FormInputInterfaces.InputValuesQuery} query - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting FormInputInterfaces.InputValuesQuery - */ - getInputValues(query: FormInputInterfaces.InputValuesQuery, project: string, onResult: (err: any, statusCode: number, inputvaluesquery: FormInputInterfaces.InputValuesQuery) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} releaseId - * @param onResult callback function with the resulting ArrayBuffer - */ - getLogs(project: string, releaseId: number, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} releaseId - * @param {number} environmentId - * @param {number} taskId - * @param {number} attemptId - * @param onResult callback function with the resulting string - */ - getLog(project: string, releaseId: number, environmentId: number, taskId: number, attemptId: number, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * @param {ReleaseInterfaces.ReleaseStartMetadata} releaseStartMetadata - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting ReleaseInterfaces.Release - */ - createRelease(releaseStartMetadata: ReleaseInterfaces.ReleaseStartMetadata, project: string, onResult: (err: any, statusCode: number, release: ReleaseInterfaces.Release) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} releaseId - * @param onResult callback function - */ - deleteRelease(project: string, releaseId: number, onResult: (err: any, statusCode: number) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} releaseId - * @param {boolean} includeAllApprovals - * @param onResult callback function with the resulting ReleaseInterfaces.Release - */ - getRelease(project: string, releaseId: number, includeAllApprovals: boolean, onResult: (err: any, statusCode: number, release: ReleaseInterfaces.Release) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} definitionId - * @param {number} releaseCount - * @param {boolean} includeArtifact - * @param onResult callback function with the resulting ReleaseInterfaces.ReleaseDefinitionSummary - */ - getReleaseDefinitionSummary(project: string, definitionId: number, releaseCount: number, includeArtifact: boolean, onResult: (err: any, statusCode: number, release: ReleaseInterfaces.ReleaseDefinitionSummary) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} definitionId - * @param {number} definitionEnvironmentId - * @param {string} searchText - * @param {string} createdBy - * @param {ReleaseInterfaces.ReleaseStatus} statusFilter - * @param {Date} minCreatedTime - * @param {Date} maxCreatedTime - * @param {ReleaseInterfaces.ReleaseQueryOrder} queryOrder - * @param {number} top - * @param {number} continuationToken - * @param {ReleaseInterfaces.ReleaseExpands} expand - * @param {string} artifactTypeId - * @param {number} artifactSourceId - * @param {string} artifactVersionId - * @param onResult callback function with the resulting ReleaseInterfaces.Release[] - */ - getReleases(project: string, definitionId: number, definitionEnvironmentId: number, searchText: string, createdBy: string, statusFilter: ReleaseInterfaces.ReleaseStatus, minCreatedTime: Date, maxCreatedTime: Date, queryOrder: ReleaseInterfaces.ReleaseQueryOrder, top: number, continuationToken: number, expand: ReleaseInterfaces.ReleaseExpands, artifactTypeId: string, artifactSourceId: number, artifactVersionId: string, onResult: (err: any, statusCode: number, releases: ReleaseInterfaces.Release[]) => void): void; - /** - * @param {ReleaseInterfaces.Release} release - * @param {string} project - Project ID or project name - * @param {number} releaseId - * @param onResult callback function with the resulting ReleaseInterfaces.Release - */ - updateRelease(release: ReleaseInterfaces.Release, project: string, releaseId: number, onResult: (err: any, statusCode: number, release: ReleaseInterfaces.Release) => void): void; - /** - * @param {ReleaseInterfaces.ReleaseUpdateMetadata} releaseUpdateMetadata - * @param {string} project - Project ID or project name - * @param {number} releaseId - * @param onResult callback function with the resulting ReleaseInterfaces.Release - */ - updateReleaseResource(releaseUpdateMetadata: ReleaseInterfaces.ReleaseUpdateMetadata, project: string, releaseId: number, onResult: (err: any, statusCode: number, release: ReleaseInterfaces.Release) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} definitionId - * @param onResult callback function with the resulting ReleaseInterfaces.ReleaseDefinitionRevision[] - */ - getReleaseDefinitionHistory(project: string, definitionId: number, onResult: (err: any, statusCode: number, revisions: ReleaseInterfaces.ReleaseDefinitionRevision[]) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} definitionId - * @param {number} revision - * @param onResult callback function with the resulting string - */ - getReleaseDefinitionRevision(project: string, definitionId: number, revision: number, onResult: (err: any, statusCode: number, res: NodeJS.ReadableStream) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {string} typeId - * @param onResult callback function with the resulting ReleaseInterfaces.ArtifactSourceIdsQueryResult - */ - getArtifactsSources(project: string, typeId: string, onResult: (err: any, statusCode: number, source: ReleaseInterfaces.ArtifactSourceIdsQueryResult) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} releaseId - * @param {number} environmentId - * @param {number} attemptId - * @param onResult callback function with the resulting ReleaseInterfaces.ReleaseTask[] - */ - getTasks(project: string, releaseId: number, environmentId: number, attemptId: number, onResult: (err: any, statusCode: number, tasks: ReleaseInterfaces.ReleaseTask[]) => void): void; - /** - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting ReleaseInterfaces.ArtifactTypeDefinition[] - */ - getArtifactTypeDefinitions(project: string, onResult: (err: any, statusCode: number, types: ReleaseInterfaces.ArtifactTypeDefinition[]) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} releaseDefinitionId - * @param onResult callback function with the resulting ReleaseInterfaces.ArtifactVersionQueryResult - */ - getArtifactVersions(project: string, releaseDefinitionId: number, onResult: (err: any, statusCode: number, version: ReleaseInterfaces.ArtifactVersionQueryResult) => void): void; - /** - * @param {ReleaseInterfaces.Artifact[]} artifacts - * @param {string} project - Project ID or project name - * @param onResult callback function with the resulting ReleaseInterfaces.ArtifactVersionQueryResult - */ - getArtifactVersionsForSources(artifacts: ReleaseInterfaces.Artifact[], project: string, onResult: (err: any, statusCode: number, version: ReleaseInterfaces.ArtifactVersionQueryResult) => void): void; - /** - * @param {string} project - Project ID or project name - * @param {number} releaseId - * @param {number} baseReleaseId - * @param {number} top - * @param onResult callback function with the resulting ReleaseInterfaces.ReleaseWorkItemRef[] - */ - getReleaseWorkItemsRefs(project: string, releaseId: number, baseReleaseId: number, top: number, onResult: (err: any, statusCode: number, workitems: ReleaseInterfaces.ReleaseWorkItemRef[]) => void): void; - } - export class QReleaseApi extends basem.QClientApiBase implements IQReleaseApi { - api: ReleaseApi; - constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[]); - /** - * Returns the artifact details that automation agent requires - * - * @param {string} project - Project ID or project name - * @param {number} releaseId - */ - getAgentArtifactDefinitions(project: string, releaseId: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {string} assignedToFilter - * @param {ReleaseInterfaces.ApprovalStatus} statusFilter - * @param {number[]} releaseIdsFilter - */ - getApprovals(project: string, assignedToFilter?: string, statusFilter?: ReleaseInterfaces.ApprovalStatus, releaseIdsFilter?: number[]): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} approvalStepId - */ - getApprovalHistory(project: string, approvalStepId: number): Promise; - /** - * @param {ReleaseInterfaces.ReleaseApproval} approval - * @param {string} project - Project ID or project name - * @param {number} approvalId - */ - updateReleaseApproval(approval: ReleaseInterfaces.ReleaseApproval, project: string, approvalId: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} releaseId - * @param {number} baseReleaseId - * @param {number} top - */ - getReleaseChanges(project: string, releaseId: number, baseReleaseId?: number, top?: number): Promise; - /** - * @param {ReleaseInterfaces.ReleaseDefinition} releaseDefinition - * @param {string} project - Project ID or project name - */ - createReleaseDefinition(releaseDefinition: ReleaseInterfaces.ReleaseDefinition, project: string): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} definitionId - */ - deleteReleaseDefinition(project: string, definitionId: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} definitionId - */ - getReleaseDefinition(project: string, definitionId: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {string} searchText - * @param {number} artifactIdFilter - * @param {ReleaseInterfaces.ReleaseDefinitionExpands} expand - */ - getReleaseDefinitions(project: string, searchText?: string, artifactIdFilter?: number, expand?: ReleaseInterfaces.ReleaseDefinitionExpands): Promise; - /** - * @param {string} project - Project ID or project name - * @param {string} artifactType - * @param {string} artifactSourceId - * @param {ReleaseInterfaces.ReleaseDefinitionExpands} expand - */ - getReleaseDefinitionsForArtifactSource(project: string, artifactType: string, artifactSourceId: string, expand?: ReleaseInterfaces.ReleaseDefinitionExpands): Promise; - /** - * @param {ReleaseInterfaces.ReleaseDefinition} releaseDefinition - * @param {string} project - Project ID or project name - */ - updateReleaseDefinition(releaseDefinition: ReleaseInterfaces.ReleaseDefinition, project: string): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} releaseId - * @param {number} environmentId - */ - getReleaseEnvironment(project: string, releaseId: number, environmentId: number): Promise; - /** - * @param {any} environmentUpdateData - * @param {string} project - Project ID or project name - * @param {number} releaseId - * @param {number} environmentId - */ - updateReleaseEnvironment(environmentUpdateData: any, project: string, releaseId: number, environmentId: number): Promise; - /** - * @param {ReleaseInterfaces.ReleaseDefinitionEnvironmentTemplate} template - * @param {string} project - Project ID or project name - */ - createDefinitionEnvironmentTemplate(template: ReleaseInterfaces.ReleaseDefinitionEnvironmentTemplate, project: string): Promise; - /** - * @param {string} project - Project ID or project name - * @param {string} templateId - */ - deleteDefinitionEnvironmentTemplate(project: string, templateId: string): Promise; - /** - * @param {string} project - Project ID or project name - * @param {string} templateId - */ - getDefinitionEnvironmentTemplate(project: string, templateId: string): Promise; - /** - * @param {string} project - Project ID or project name - */ - listDefinitionEnvironmentTemplates(project: string): Promise; - /** - * @param {FormInputInterfaces.InputValuesQuery} query - * @param {string} project - Project ID or project name - */ - getInputValues(query: FormInputInterfaces.InputValuesQuery, project: string): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} releaseId - */ - getLogs(project: string, releaseId: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} releaseId - * @param {number} environmentId - * @param {number} taskId - * @param {number} attemptId - */ - getLog(project: string, releaseId: number, environmentId: number, taskId: number, attemptId?: number): Promise; - /** - * @param {ReleaseInterfaces.ReleaseStartMetadata} releaseStartMetadata - * @param {string} project - Project ID or project name - */ - createRelease(releaseStartMetadata: ReleaseInterfaces.ReleaseStartMetadata, project: string): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} releaseId - */ - deleteRelease(project: string, releaseId: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} releaseId - * @param {boolean} includeAllApprovals - */ - getRelease(project: string, releaseId: number, includeAllApprovals?: boolean): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} definitionId - * @param {number} releaseCount - * @param {boolean} includeArtifact - */ - getReleaseDefinitionSummary(project: string, definitionId: number, releaseCount: number, includeArtifact?: boolean): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} definitionId - * @param {number} definitionEnvironmentId - * @param {string} searchText - * @param {string} createdBy - * @param {ReleaseInterfaces.ReleaseStatus} statusFilter - * @param {Date} minCreatedTime - * @param {Date} maxCreatedTime - * @param {ReleaseInterfaces.ReleaseQueryOrder} queryOrder - * @param {number} top - * @param {number} continuationToken - * @param {ReleaseInterfaces.ReleaseExpands} expand - * @param {string} artifactTypeId - * @param {number} artifactSourceId - * @param {string} artifactVersionId - */ - getReleases(project: string, definitionId?: number, definitionEnvironmentId?: number, searchText?: string, createdBy?: string, statusFilter?: ReleaseInterfaces.ReleaseStatus, minCreatedTime?: Date, maxCreatedTime?: Date, queryOrder?: ReleaseInterfaces.ReleaseQueryOrder, top?: number, continuationToken?: number, expand?: ReleaseInterfaces.ReleaseExpands, artifactTypeId?: string, artifactSourceId?: number, artifactVersionId?: string): Promise; - /** - * @param {ReleaseInterfaces.Release} release - * @param {string} project - Project ID or project name - * @param {number} releaseId - */ - updateRelease(release: ReleaseInterfaces.Release, project: string, releaseId: number): Promise; - /** - * @param {ReleaseInterfaces.ReleaseUpdateMetadata} releaseUpdateMetadata - * @param {string} project - Project ID or project name - * @param {number} releaseId - */ - updateReleaseResource(releaseUpdateMetadata: ReleaseInterfaces.ReleaseUpdateMetadata, project: string, releaseId: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} definitionId - */ - getReleaseDefinitionHistory(project: string, definitionId: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} definitionId - * @param {number} revision - */ - getReleaseDefinitionRevision(project: string, definitionId: number, revision: number): Promise; - /** - * @param {string} project - Project ID or project name - * @param {string} typeId - */ - getArtifactsSources(project: string, typeId?: string): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} releaseId - * @param {number} environmentId - * @param {number} attemptId - */ - getTasks(project: string, releaseId: number, environmentId: number, attemptId?: number): Promise; - /** - * @param {string} project - Project ID or project name - */ - getArtifactTypeDefinitions(project: string): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} releaseDefinitionId - */ - getArtifactVersions(project: string, releaseDefinitionId: number): Promise; - /** - * @param {ReleaseInterfaces.Artifact[]} artifacts - * @param {string} project - Project ID or project name - */ - getArtifactVersionsForSources(artifacts: ReleaseInterfaces.Artifact[], project: string): Promise; - /** - * @param {string} project - Project ID or project name - * @param {number} releaseId - * @param {number} baseReleaseId - * @param {number} top - */ - getReleaseWorkItemsRefs(project: string, releaseId: number, baseReleaseId?: number, top?: number): Promise; - } - -} -declare module 'vso-node-api/handlers/apiversion' { - - import VsoBaseInterfaces = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); - export class ApiVersionHandler implements VsoBaseInterfaces.IRequestHandler { - apiVersion: string; - constructor(apiVersion: string); - prepareRequest(options: any): void; - canHandleAuthentication(res: VsoBaseInterfaces.IHttpResponse): boolean; - handleAuthentication(httpClient: any, protocol: any, options: any, objs: any, finalCallback: any): void; - } - -} -declare module 'vso-node-api/handlers/basiccreds' { - - import VsoBaseInterfaces = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); - export class BasicCredentialHandler implements VsoBaseInterfaces.IRequestHandler { - username: string; - password: string; - constructor(username: string, password: string); - prepareRequest(options: any): void; - canHandleAuthentication(res: VsoBaseInterfaces.IHttpResponse): boolean; - handleAuthentication(httpClient: any, protocol: any, options: any, objs: any, finalCallback: any): void; - } - -} -declare module 'vso-node-api/handlers/bearertoken' { - - import VsoBaseInterfaces = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); - export class BearerCredentialHandler implements VsoBaseInterfaces.IRequestHandler { - token: string; - constructor(token: string); - prepareRequest(options: any): void; - canHandleAuthentication(res: VsoBaseInterfaces.IHttpResponse): boolean; - handleAuthentication(httpClient: any, protocol: any, options: any, objs: any, finalCallback: any): void; - } - -} -declare module 'vso-node-api/handlers/ntlm' { - - import VsoBaseInterfaces = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); - export class NtlmCredentialHandler implements VsoBaseInterfaces.IRequestHandler { - username: string; - password: string; - workstation: string; - domain: string; - constructor(username: string, password: string, domain?: string, workstation?: string); - prepareRequest(options: any): void; - canHandleAuthentication(res: VsoBaseInterfaces.IHttpResponse): boolean; - handleAuthentication(httpClient: any, protocol: any, options: any, objs: any, finalCallback: any): void; - private sendType1Message(httpClient, protocol, options, objs, keepaliveAgent, callback); - private sendType3Message(httpClient, protocol, options, objs, keepaliveAgent, res, callback); - } - -} -declare module 'vso-node-api/WebApi' { - import VsoBaseInterfaces = require('vso-node-api/interfaces/common/VsoBaseInterfaces'); - import buildm = require('vso-node-api/BuildApi'); - import corem = require('vso-node-api/CoreApi'); - import filecontainerm = require('vso-node-api/FileContainerApi'); - import gallerym = require('vso-node-api/GalleryApi'); - import gitm = require('vso-node-api/GitApi'); - import taskagentm = require('vso-node-api/TaskAgentApi'); - import taskm = require('vso-node-api/TaskApi'); - import testm = require('vso-node-api/TestApi'); - import tfvcm = require('vso-node-api/TfvcApi'); - import workitemtrackingm = require('vso-node-api/WorkItemTrackingApi'); - import releasem = require('vso-node-api/ReleaseApi'); - import apivm = require('vso-node-api/handlers/apiversion'); - import basicm = require('vso-node-api/handlers/basiccreds'); - import bearm = require('vso-node-api/handlers/bearertoken'); - import ntlmm = require('vso-node-api/handlers/ntlm'); - /** - * Methods to return handler objects (see handlers folder) - */ - export function getVersionHandler(apiVersion: string): apivm.ApiVersionHandler; - export function getBasicHandler(username: string, password: string): basicm.BasicCredentialHandler; - export function getNtlmHandler(username: string, password: string, workstation?: string, domain?: string): ntlmm.NtlmCredentialHandler; - export function getBearerHandler(token: any): bearm.BearerCredentialHandler; - export class WebApi { - serverUrl: string; - authHandler: VsoBaseInterfaces.IRequestHandler; - constructor(serverUrl: string, authHandler: VsoBaseInterfaces.IRequestHandler); - /** - * Each factory method can take a serverUrl and a list of handlers - * if these aren't provided, the default url and auth handler given to the constructor for this class will be used - */ - getBuildApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): buildm.IBuildApi; - /** - * Each API has a method here to create the "vanilla" API as well as one with a Q Promise wrapper. - */ - getBuildApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): buildm.IBuildApi; - getCoreApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): corem.ICoreApi; - getQCoreApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): corem.IQCoreApi; - getFileContainerApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): filecontainerm.IFileContainerApi; - getQFileContainerApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): filecontainerm.IQFileContainerApi; - getGalleryApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): gallerym.IGalleryApi; - getGalleryApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): gallerym.IGalleryApi; - getGitApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): gitm.IGitApi; - getQGitApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): gitm.IQGitApi; - getTaskApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): taskm.ITaskApi; - getQTaskApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): taskm.IQTaskApi; - getTaskAgentApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): taskagentm.ITaskAgentApi; - getTaskAgentApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): taskagentm.IQTaskAgentApi; - getTestApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): testm.ITestApi; - getQTestApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): testm.IQTestApi; - getTfvcApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): tfvcm.ITfvcApi; - getQTfvcApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): tfvcm.IQTfvcApi; - getWorkItemTrackingApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): workitemtrackingm.IWorkItemTrackingApi; - getQWorkItemTrackingApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): workitemtrackingm.IQWorkItemTrackingApi; - getReleaseApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): releasem.IReleaseApi; - getQReleaseApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): releasem.IQReleaseApi; - } - -} From 4b02ea8921e1aa393e178cbee4045e766950ce2a Mon Sep 17 00:00:00 2001 From: grawcho Date: Thu, 22 Dec 2016 16:39:25 +0200 Subject: [PATCH 107/235] added display draft of build definition --- app/exec/build/definitions/list.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/exec/build/definitions/list.ts b/app/exec/build/definitions/list.ts index 7b599485..6395a4e0 100644 --- a/app/exec/build/definitions/list.ts +++ b/app/exec/build/definitions/list.ts @@ -38,10 +38,7 @@ export class ListDefinitions extends TfCommand { - trace.println(); - trace.info('id : %s', definition.id); - trace.info('name : %s', definition.name); - trace.info('type : %s', definition.type == buildContracts.DefinitionType.Xaml ? "Xaml" : "Build"); + trace.info('%s: %s: %s%s',definition.type == buildContracts.DefinitionType.Xaml ? "Xaml" : "Build", definition.id,definition.name,definition.draftOf ? " - (Draft of: " + definition.draftOf.id +")":""); }); } } From 244a533aac3f091b1e4a23e16044d37082da0aec Mon Sep 17 00:00:00 2001 From: sfeldman Date: Wed, 1 Feb 2017 11:52:13 +0200 Subject: [PATCH 108/235] add task show function --- .vscode/settings.json | 3 +- app/exec/build/tasks/show.ts | 140 +++++++++++++++++++++++++++++++++++ 2 files changed, 142 insertions(+), 1 deletion(-) create mode 100644 app/exec/build/tasks/show.ts diff --git a/.vscode/settings.json b/.vscode/settings.json index fe9def74..faf9f482 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -7,5 +7,6 @@ "tmp/": true }, "editor.insertSpaces": false, - "typescript.tsdk": "./node_modules/typescript/lib" + "typescript.tsdk": "./node_modules/typescript/lib", + "vsicons.presets.angular": false } diff --git a/app/exec/build/tasks/show.ts b/app/exec/build/tasks/show.ts new file mode 100644 index 00000000..fb2b7816 --- /dev/null +++ b/app/exec/build/tasks/show.ts @@ -0,0 +1,140 @@ +import { TfCommand } from "../../../lib/tfcommand"; +import agentContracts = require('vso-node-api/interfaces/TaskAgentInterfaces'); +import args = require("../../../lib/arguments"); +import fs = require('fs'); +import path = require('path'); +import tasksBase = require("./default"); +import trace = require('../../../lib/trace'); +import vm = require('../../../lib/jsonvalidate') + +export function getCommand(args: string[]): BuildTaskDownload { + return new BuildTaskDownload(args); +} + +var c_taskJsonFile: string = 'task.json'; + +export class BuildTaskDownload extends tasksBase.BuildTaskBase { + protected serverCommand = true; + protected description = "Download a Build Task."; + + protected getHelpArgs(): string[] { + return ["id","taskVersion","name"]; + } + + public exec(): Promise { + return this.commandArgs.id.val().then((Id) => { + if (!Id) { + Id = ""; + } + return this.commandArgs.taskVersion.val().then((Version) =>{ + let agentApi = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl()); + trace.debug("retriving tasks from the server ...") + return agentApi.getTaskDefinitions(null, ['build'], null).then((tasks) => { + var taskDictionary = this._getNewestTasks(tasks); + return this.commandArgs.name.val().then((Name) => { + if (!Id) { + taskDictionary.forEach(element => { + if (element.name == Name) { + Id = element.id; + if (!Version) { + Version = element.version.major + "." + element.version.minor + "." + element.version.patch;; + } + } + }); + trace.info("found %s with version %s ...",Name,Version); + } + else + { + taskDictionary.forEach(element => { + if (element.id == Id) { + Name = element.name; + if (!Version) { + Version = element.version.major + "." + element.version.minor + "." + element.version.patch;; + } + } + }); + trace.info("found %s with version %s ...",Name,Version); + } + if (!Id && !Version) { + var error = ("error: No Tasks found with this name ["+Name+"]"); + throw(error); + } + return agentApi.getTaskDefinition(Id,Version).then((task) => { + return task; + }); + }); + }); + }); + }); + } + + public friendlyOutput(task: agentContracts.TaskDefinition): void { + if (!task) { + throw new Error('no tasks supplied'); + } + trace.println(); + trace.info('id : %s', task.id); + trace.info('name : %s', task.name); + trace.info('friendly name : %s', task.friendlyName); + trace.info('description : %s', task.description); + trace.info('visibility : %s', task.visibility ? task.visibility.join(",") : ""); + trace.info('category : %s', task.category); + trace.info('demands : %s', JSON.stringify(task.demands)); + trace.info('version : %s', new TaskVersion(task.version).toString()); + }; + + + private _getNewestTasks(allTasks: agentContracts.TaskDefinition[]): agentContracts.TaskDefinition[] { + var taskDictionary: { [id: string]: agentContracts.TaskDefinition; } = {}; + for (var i = 0; i < allTasks.length; i++) { + var currTask: agentContracts.TaskDefinition = allTasks[i]; + if(taskDictionary[currTask.id]) + { + var newVersion: TaskVersion = new TaskVersion(currTask.version); + var knownVersion: TaskVersion = new TaskVersion(taskDictionary[currTask.id].version); + trace.debug("Found additional version of " + currTask.name + " and comparing to the previously encountered version."); + if (this._compareTaskVersion(newVersion, knownVersion) > 0) { + trace.debug("Found newer version of " + currTask.name + ". Previous: " + knownVersion.toString() + "; New: " + newVersion.toString()); + taskDictionary[currTask.id] = currTask; + } + } + else { + trace.debug("Found task " + currTask.name); + taskDictionary[currTask.id] = currTask; + } + } + var newestTasks: agentContracts.TaskDefinition[] = []; + for(var id in taskDictionary) { + newestTasks.push(taskDictionary[id]); + } + return newestTasks; + } + + private _compareTaskVersion(version1: TaskVersion, version2: TaskVersion): number { + if(version1.major != version2.major) { + return version1.major - version2.major; + } + if(version1.minor != version2.minor) { + return version1.minor - version2.minor; + } + if(version1.patch != version2.patch) { + return version1.patch - version2.patch; + } + return 0; + } +} +class TaskVersion { + major: number; + minor: number; + patch: number; + + constructor(versionData: any) { + this.major = versionData.major || 0; + this.minor = versionData.minor || 0; + this.patch = versionData.patch || 0; + } + + public toString(): string { + return this.major + "." + this.minor + "." + this.patch; + } +} From 81db6393ce0de1a89b5ff08a91206c2e6441ea5a Mon Sep 17 00:00:00 2001 From: grawcho Date: Thu, 16 Feb 2017 11:59:12 +0200 Subject: [PATCH 109/235] add wait and timeout functionallity to build queue --- app/exec/build/default.ts | 4 +++ app/exec/build/queue.ts | 51 ++++++++++++++++++++++++++++++++++----- 2 files changed, 49 insertions(+), 6 deletions(-) diff --git a/app/exec/build/default.ts b/app/exec/build/default.ts index 548902db..61d4133f 100644 --- a/app/exec/build/default.ts +++ b/app/exec/build/default.ts @@ -18,6 +18,8 @@ export interface BuildArguments extends CoreArguments { userCapabilityValue: args.StringArgument; demands: args.StringArgument; disable: args.StringArgument; + wait: args.BooleanArgument; + timeout: args.IntArgument; } export function getCommand(args: string[]): BuildBase { @@ -47,6 +49,8 @@ export class BuildBase extends TfCom this.registerCommandArgument("userCapabilityValue", "Value to add / edit", "Value to add / edit to the Agent User Capabilities.", args.StringArgument,null); this.registerCommandArgument("demands","Build demand key","Demands string [semi-colon separator] for Queued Build [key / key -equals value].",args.StringArgument,null); this.registerCommandArgument("disable","disable / enable agent","Update the agent status.",args.StringArgument,null); + this.registerCommandArgument("wait","wait for the build","wait for the triggered build",args.BooleanArgument,"false"); + this.registerCommandArgument("timeout","max time to wait","Maximum time to wait for the build to complete (in seconds).",args.IntArgument,"0"); } public exec(cmd?: any): Promise { diff --git a/app/exec/build/queue.ts b/app/exec/build/queue.ts index bd5de6d9..1e7e1d94 100644 --- a/app/exec/build/queue.ts +++ b/app/exec/build/queue.ts @@ -18,9 +18,8 @@ export class BuildQueue extends buildBase.BuildBase { @@ -56,8 +55,13 @@ export class BuildQueue extends buildBase.BuildBase { trace.debug("build demands : %s", demands ? demands: "none") - return this._queueBuild(buildapi, definition, project, parameters, priority, version, shelveset,demands ? demands:""); - }); + return this.commandArgs.wait.val().then((wait) => { + return this.commandArgs.timeout.val().then((timeout) => { + return this._queueBuild(buildapi, definition, project, parameters, priority, version, shelveset,demands ? demands:"",wait,timeout as number); + }); + + }); + }); }); }); }); @@ -88,7 +92,9 @@ export class BuildQueue extends buildBase.BuildBase { + trace.info("waiting for build %s to complete",queuedBuild.buildNumber); + var counter: number = 0; + var time = setInterval(function(){ + counter++; + return buildapi.updateBuild(queuedBuild,queuedBuild.id).then((updatedQueuedBuild) =>{ + if (updatedQueuedBuild.status == buildContracts.BuildStatus.Completed || (timeout != 0 && counter >= timeout)) { + if (updatedQueuedBuild.status != buildContracts.BuildStatus.Completed){ + trace.println(); + trace.warn("stopped waiting for build to complete, due to timeout expiration (%s Seconds)",timeout) + process.exitCode = 5; + } else { + trace.println(); + + if (updatedQueuedBuild.result == buildContracts.BuildResult.Succeeded){ + trace.info("build %s Completed Successfully in %s Seconds",updatedQueuedBuild.buildNumber,counter); + } else { + trace.warn("build %s Completed in %s Seconds with result %s",updatedQueuedBuild.buildNumber,counter,buildContracts.BuildResult[updatedQueuedBuild.result]); + process.exitCode = 1; + } + } + clearInterval(time); + } else { + process.stdout.write("."); + } + }); + },1000); + return queuedBuild; + }); + } } } \ No newline at end of file From 205b1cc769f128fac5bd13e7ae988034108582dc Mon Sep 17 00:00:00 2001 From: grawcho Date: Thu, 16 Feb 2017 12:08:12 +0200 Subject: [PATCH 110/235] push version number to 0.3.46 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fa991f7e..35398ab1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tfx-cli", - "version": "0.3.45", + "version": "0.3.46", "description": "CLI for Visual Studio Team Services and Team Foundation Server", "repository": { "type": "git", From e1b89d93ee43be70c0e770691ff5ef9d37de341e Mon Sep 17 00:00:00 2001 From: grawcho Date: Thu, 16 Feb 2017 12:27:19 +0200 Subject: [PATCH 111/235] add timeout param to help context --- app/exec/build/queue.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/exec/build/queue.ts b/app/exec/build/queue.ts index 1e7e1d94..90bd4a95 100644 --- a/app/exec/build/queue.ts +++ b/app/exec/build/queue.ts @@ -19,7 +19,7 @@ export class BuildQueue extends buildBase.BuildBase { From 4e0302cb08ea35c25d61c8748de0f25c8cb8aaa9 Mon Sep 17 00:00:00 2001 From: sfeldman Date: Sun, 26 Feb 2017 15:58:00 +0200 Subject: [PATCH 112/235] print build steps in queue build with wait --- app/exec/build/queue.ts | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/app/exec/build/queue.ts b/app/exec/build/queue.ts index 90bd4a95..55724d93 100644 --- a/app/exec/build/queue.ts +++ b/app/exec/build/queue.ts @@ -84,6 +84,7 @@ export class BuildQueue extends buildBase.BuildBase { trace.info("waiting for build %s to complete",queuedBuild.buildNumber); var counter: number = 0; + var currentOperation:string ; var time = setInterval(function(){ counter++; return buildapi.updateBuild(queuedBuild,queuedBuild.id).then((updatedQueuedBuild) =>{ @@ -134,18 +136,30 @@ export class BuildQueue extends buildBase.BuildBase { + timeline.records.forEach(Record => { + if (Record.currentOperation && Record.currentOperation != "Initializing"){ + if(Record.currentOperation != currentOperation){ + process.stdout.write('\n'); + process.stdout.write(Record.currentOperation.replace("Starting ","")); + currentOperation = Record.currentOperation; + } + } else { + process.stdout.write('.'); + } + }); + }); } }); },1000); From 769759c25b977237014adfab8c0001c51c63f865 Mon Sep 17 00:00:00 2001 From: sfeldman Date: Tue, 28 Feb 2017 11:52:51 +0200 Subject: [PATCH 113/235] add uuid typing --- typings/tsd.d.ts | 1 + typings/uuid/uuid.d.ts | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 typings/uuid/uuid.d.ts diff --git a/typings/tsd.d.ts b/typings/tsd.d.ts index 5e1b4d3d..d2841e38 100644 --- a/typings/tsd.d.ts +++ b/typings/tsd.d.ts @@ -15,3 +15,4 @@ /// /// /// +/// diff --git a/typings/uuid/uuid.d.ts b/typings/uuid/uuid.d.ts new file mode 100644 index 00000000..b178919f --- /dev/null +++ b/typings/uuid/uuid.d.ts @@ -0,0 +1,15 @@ +declare module 'uuid' { + function current(options?: any, buf?: Buffer, offset?: number): string; + + module current { + export function v1(options?: any): string; + export function v1(options: any, buf: Buffer, offset?: number): Buffer; + + export function v4(options?: any): string; + export function v4(options: any, buf: Buffer, offset?: number): Buffer; + + export function parse(str: string, buf?: Buffer, offset?: number): Buffer; + export function unparse(buf: Buffer, offset?: number): string; + } + export = current; +} From ee43779222a8d255a0fe8a0e33c84916ee3564f3 Mon Sep 17 00:00:00 2001 From: sfeldman Date: Tue, 28 Feb 2017 17:09:51 +0200 Subject: [PATCH 114/235] add build log print feature --- app/exec/build/logs.ts | 57 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 app/exec/build/logs.ts diff --git a/app/exec/build/logs.ts b/app/exec/build/logs.ts new file mode 100644 index 00000000..8e98c462 --- /dev/null +++ b/app/exec/build/logs.ts @@ -0,0 +1,57 @@ +import { TfCommand } from "../../lib/tfcommand"; +import args = require("../../lib/arguments"); +import buildBase = require("./default"); +import buildClient = require("vso-node-api/BuildApi"); +import buildContracts = require("vso-node-api/interfaces/BuildInterfaces"); +import trace = require("../../lib/trace"); + +export function getCommand(args: string[]): BuildLogs { + return new BuildLogs(args); +} + +export class BuildLogs extends buildBase.BuildBase { + protected description = "Show build details."; + protected serverCommand = true; + + protected getHelpArgs(): string[] { + return ["project", "buildId"]; + } + + public exec(): Promise { + trace.debug("build-show.exec"); + var buildapi: buildClient.IBuildApi = this.webApi.getBuildApi(); + return this.commandArgs.project.val().then((project) => { + return this.commandArgs.buildId.val().then((buildId) => { + return buildapi.getBuild(buildId, project).then((build) => { + return buildapi.getBuildTimeline(project, buildId).then((timeline) => { + for (var i = 1, len = timeline.records.length; i < len; i++) { + this._printLines(timeline, buildapi, project, buildId, i); + } + return build; + }); + }); + }); + }); + } + public friendlyOutput(build: buildContracts.Build): void { + if (!build) { + throw new Error("no build supplied"); + } + trace.println(); + trace.info("id : %s", build.id); + trace.info("definition name : %s", build.definition ? build.definition.name : "unknown"); + trace.info("requested by : %s", build.requestedBy ? build.requestedBy.displayName : "unknown"); + trace.info("status : %s", buildContracts.BuildStatus[build.status]); + trace.info("queue time : %s", build.queueTime ? build.queueTime.toJSON() : "unknown"); + } + + private _printLines(timeline: buildContracts.Timeline, buildApi: buildClient.IBuildApi, project: string, buildId: number, recordId: number) { + if (timeline.records[recordId].type == "Task") { + return buildApi.getBuildLogLines(project, buildId, recordId).then((lines) => { + for (var j = 0, len = lines.length; j < len; j++) { + trace.info(lines[j]); + } + }); + } + } +} \ No newline at end of file From 5097ced876643d7b6339b9590bfdc31a32009602 Mon Sep 17 00:00:00 2001 From: sfeldman Date: Mon, 6 Mar 2017 12:41:13 +0200 Subject: [PATCH 115/235] download build logs as zip --- .vscode/settings.json | 5 ++++- app/exec/build/logs.ts | 23 +++++++---------------- 2 files changed, 11 insertions(+), 17 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index faf9f482..32a68e9f 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -8,5 +8,8 @@ }, "editor.insertSpaces": false, "typescript.tsdk": "./node_modules/typescript/lib", - "vsicons.presets.angular": false + "vsicons.presets.angular": false, + "editor.formatOnPaste": true, + "editor.minimap.enabled": true, + "editor.snippetSuggestions": "top" } diff --git a/app/exec/build/logs.ts b/app/exec/build/logs.ts index 8e98c462..205a5cba 100644 --- a/app/exec/build/logs.ts +++ b/app/exec/build/logs.ts @@ -4,13 +4,14 @@ import buildBase = require("./default"); import buildClient = require("vso-node-api/BuildApi"); import buildContracts = require("vso-node-api/interfaces/BuildInterfaces"); import trace = require("../../lib/trace"); +import fs = require("fs"); export function getCommand(args: string[]): BuildLogs { return new BuildLogs(args); } export class BuildLogs extends buildBase.BuildBase { - protected description = "Show build details."; + protected description = "Print build logs."; protected serverCommand = true; protected getHelpArgs(): string[] { @@ -18,15 +19,15 @@ export class BuildLogs extends buildBase.BuildBase { - trace.debug("build-show.exec"); + trace.debug("build-logs.exec"); var buildapi: buildClient.IBuildApi = this.webApi.getBuildApi(); return this.commandArgs.project.val().then((project) => { return this.commandArgs.buildId.val().then((buildId) => { return buildapi.getBuild(buildId, project).then((build) => { - return buildapi.getBuildTimeline(project, buildId).then((timeline) => { - for (var i = 1, len = timeline.records.length; i < len; i++) { - this._printLines(timeline, buildapi, project, buildId, i); - } + return buildapi.getBuildLogsZip(build.project.name, build.id).then((stream) => { + var archiveName = build.definition.name + "-" + build.buildNumber + "_" + build.id + ".zip"; + trace.info('Downloading ... '); + stream.pipe(fs.createWriteStream(archiveName)); return build; }); }); @@ -44,14 +45,4 @@ export class BuildLogs extends buildBase.BuildBase { - for (var j = 0, len = lines.length; j < len; j++) { - trace.info(lines[j]); - } - }); - } - } } \ No newline at end of file From 713aeee9f5d883a1c31399dd4eb3580290253738 Mon Sep 17 00:00:00 2001 From: sfeldman Date: Mon, 6 Mar 2017 14:54:30 +0200 Subject: [PATCH 116/235] fix download logs --- app/exec/build/logs.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/exec/build/logs.ts b/app/exec/build/logs.ts index 205a5cba..46af2792 100644 --- a/app/exec/build/logs.ts +++ b/app/exec/build/logs.ts @@ -27,6 +27,7 @@ export class BuildLogs extends buildBase.BuildBase { var archiveName = build.definition.name + "-" + build.buildNumber + "_" + build.id + ".zip"; trace.info('Downloading ... '); + trace.info('File: %s Created', archiveName); stream.pipe(fs.createWriteStream(archiveName)); return build; }); @@ -39,10 +40,7 @@ export class BuildLogs extends buildBase.BuildBase Date: Mon, 6 Mar 2017 14:59:01 +0200 Subject: [PATCH 117/235] change logs description --- app/exec/build/logs.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/exec/build/logs.ts b/app/exec/build/logs.ts index 46af2792..0be76190 100644 --- a/app/exec/build/logs.ts +++ b/app/exec/build/logs.ts @@ -11,7 +11,7 @@ export function getCommand(args: string[]): BuildLogs { } export class BuildLogs extends buildBase.BuildBase { - protected description = "Print build logs."; + protected description = "Download build logs to zip archive."; protected serverCommand = true; protected getHelpArgs(): string[] { From 46e4f71b2eed85d3ff8aec856d82dab6d3dc42af Mon Sep 17 00:00:00 2001 From: grawcho Date: Mon, 6 Mar 2017 19:10:11 +0200 Subject: [PATCH 118/235] support native linux http_proxy by default --- app/lib/tfcommand.ts | 7 ++++++- package.json | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/lib/tfcommand.ts b/app/lib/tfcommand.ts index 58ebc7c1..04317886 100644 --- a/app/lib/tfcommand.ts +++ b/app/lib/tfcommand.ts @@ -18,6 +18,7 @@ import qfs = require("./qfs"); import trace = require("./trace"); import version = require("./version"); import console = require('console'); +import os = require('os'); export interface CoreArguments { project: args.StringArgument; @@ -76,7 +77,11 @@ export abstract class TfCommand { process.env.HTTP_PROXY = "http://127.0.0.1:8888"; } }).then(() => { - // Set custom proxy + // Set custom proxy + if (os.platform() == 'linux' && process.env.http_proxy && !process.env.HTTP_PROXY) { + process.env.HTTP_PROXY = process.env.http_proxy; + trace.debug("using system http_proxy") + } return this.commandArgs.proxy.val(true).then((proxy) => { if (proxy) { process.env.HTTP_PROXY = proxy; diff --git a/package.json b/package.json index dfcf0183..4f8e0472 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tfx-cli", - "version": "0.3.49", + "version": "0.3.50", "description": "CLI for Visual Studio Team Services and Team Foundation Server", "repository": { "type": "git", From 63b2f630fdff38edac7913e5a8de6e8afbae39ae Mon Sep 17 00:00:00 2001 From: grawcho Date: Mon, 6 Mar 2017 19:54:23 +0200 Subject: [PATCH 119/235] support nativ no_proxy on linux boxes --- app/lib/tfcommand.ts | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/app/lib/tfcommand.ts b/app/lib/tfcommand.ts index 04317886..55d72af4 100644 --- a/app/lib/tfcommand.ts +++ b/app/lib/tfcommand.ts @@ -78,10 +78,6 @@ export abstract class TfCommand { } }).then(() => { // Set custom proxy - if (os.platform() == 'linux' && process.env.http_proxy && !process.env.HTTP_PROXY) { - process.env.HTTP_PROXY = process.env.http_proxy; - trace.debug("using system http_proxy") - } return this.commandArgs.proxy.val(true).then((proxy) => { if (proxy) { process.env.HTTP_PROXY = proxy; @@ -95,6 +91,21 @@ export abstract class TfCommand { }).then(() => { // Set the cached service url return this.commandArgs.serviceUrl.val(true).then((serviceUrl) => { + // handle native http_proxy/ no_proxy settings on linux boxes + var bypass_proxy = false; + var no_proxy: string[] = process.env.no_proxy.split(','); + no_proxy.forEach(function (entry) { + if (serviceUrl && serviceUrl.indexOf(entry.replace('*', '')) >= 0) { + bypass_proxy = true; + } + }) + if (os.platform() == 'linux' && + process.env.http_proxy && + !process.env.HTTP_PROXY && + !bypass_proxy) { + process.env.HTTP_PROXY = process.env.http_proxy; + trace.debug("using system http_proxy") + } if (!serviceUrl && !process.env["TFX_BYPASS_CACHE"] && common.EXEC_PATH.join("") !== "login") { let diskCache = new DiskCache("tfx"); return diskCache.itemExists("cache", "connection").then((isConnection) => { @@ -106,6 +117,22 @@ export abstract class TfCommand { } return connectionUrlPromise.then((url) => { if (url) { + // handle native http_proxy/ no_proxy settings on linux boxes + var bypass_proxy = false; + var no_proxy: string[] = process.env.no_proxy.split(','); + no_proxy.forEach(function (entry) { + if (url.indexOf(entry.replace('*', '')) >= 0) { + bypass_proxy = true; + process.env.HTTP_PROXY = ''; + } + }) + if (os.platform() == 'linux' && + process.env.http_proxy && + !process.env.HTTP_PROXY && + !bypass_proxy) { + process.env.HTTP_PROXY = process.env.http_proxy; + trace.debug("using system http_proxy") + } this.commandArgs.serviceUrl.setValue(url); } }); From 032801923f28b0a2eca3c57e861902fee066d660 Mon Sep 17 00:00:00 2001 From: sfeldman Date: Tue, 7 Mar 2017 09:28:34 +0200 Subject: [PATCH 120/235] fix empty no_proxy variable on windows --- app/lib/tfcommand.ts | 70 ++++++++++++++++++++++---------------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/app/lib/tfcommand.ts b/app/lib/tfcommand.ts index 55d72af4..f57f15fa 100644 --- a/app/lib/tfcommand.ts +++ b/app/lib/tfcommand.ts @@ -7,7 +7,7 @@ import { WebApi, getBasicHandler } from "vso-node-api/WebApi"; import { EOL as eol } from "os"; import _ = require("lodash"); import args = require("./arguments"); -import {cyan, gray, green, yellow, magenta, reset as resetColors} from "colors"; +import { cyan, gray, green, yellow, magenta, reset as resetColors } from "colors"; import command = require("../lib/command"); import common = require("./common"); import copypaste = require("copy-paste"); @@ -93,7 +93,7 @@ export abstract class TfCommand { return this.commandArgs.serviceUrl.val(true).then((serviceUrl) => { // handle native http_proxy/ no_proxy settings on linux boxes var bypass_proxy = false; - var no_proxy: string[] = process.env.no_proxy.split(','); + var no_proxy: string[] = process.env.no_proxy ? process.env.no_proxy.split(',') : []; no_proxy.forEach(function (entry) { if (serviceUrl && serviceUrl.indexOf(entry.replace('*', '')) >= 0) { bypass_proxy = true; @@ -101,11 +101,11 @@ export abstract class TfCommand { }) if (os.platform() == 'linux' && process.env.http_proxy && - !process.env.HTTP_PROXY && + !process.env.HTTP_PROXY && !bypass_proxy) { - process.env.HTTP_PROXY = process.env.http_proxy; - trace.debug("using system http_proxy") - } + process.env.HTTP_PROXY = process.env.http_proxy; + trace.debug("using system http_proxy") + } if (!serviceUrl && !process.env["TFX_BYPASS_CACHE"] && common.EXEC_PATH.join("") !== "login") { let diskCache = new DiskCache("tfx"); return diskCache.itemExists("cache", "connection").then((isConnection) => { @@ -119,20 +119,20 @@ export abstract class TfCommand { if (url) { // handle native http_proxy/ no_proxy settings on linux boxes var bypass_proxy = false; - var no_proxy: string[] = process.env.no_proxy.split(','); + var no_proxy: string[] = process.env.no_proxy ? process.env.no_proxy.split(',') : []; no_proxy.forEach(function (entry) { if (url.indexOf(entry.replace('*', '')) >= 0) { bypass_proxy = true; - process.env.HTTP_PROXY = ''; + process.env.HTTP_PROXY = ''; } }) if (os.platform() == 'linux' && process.env.http_proxy && !process.env.HTTP_PROXY && !bypass_proxy) { - process.env.HTTP_PROXY = process.env.http_proxy; - trace.debug("using system http_proxy") - } + process.env.HTTP_PROXY = process.env.http_proxy; + trace.debug("using system http_proxy") + } this.commandArgs.serviceUrl.setValue(url); } }); @@ -144,7 +144,7 @@ export abstract class TfCommand { }).then(() => { let apiPromise = Promise.resolve(null); if (this.serverCommand) { - apiPromise = this.getWebApi().then(_ => {}); + apiPromise = this.getWebApi().then(_ => { }); } return apiPromise.then(() => { return this.run.bind(this, this.exec.bind(this)); @@ -206,7 +206,7 @@ export abstract class TfCommand { this.registerCommandArgument("output", "Output destination", "Method to use for output. Options: friendly, json, clipboard.", args.StringArgument, "friendly"); this.registerCommandArgument("json", "Output as JSON", "Alias for --output json.", args.BooleanArgument, "false"); this.registerCommandArgument("fiddler", "Use Fiddler proxy", "Set up the fiddler proxy for HTTP requests (for debugging purposes).", args.BooleanArgument, "false"); - this.registerCommandArgument("proxy","Proxy server", "Use the specified proxy server for HTTP traffic.", args.StringArgument, null); + this.registerCommandArgument("proxy", "Proxy server", "Use the specified proxy server for HTTP traffic.", args.StringArgument, null); this.registerCommandArgument("help", "Help", "Get help for any command.", args.BooleanArgument, "false"); this.registerCommandArgument("noPrompt", "No Prompt", "Do not prompt the user for input (instead, raise an error).", args.BooleanArgument, "false"); } @@ -313,7 +313,7 @@ export abstract class TfCommand { let newToCache = {}; return this.commandArgs.save.val().then((shouldSave) => { if (shouldSave) { - let cacheKey = path.resolve().replace("/\.\[\]/g", "-") + "." + + let cacheKey = path.resolve().replace("/\.\[\]/g", "-") + "." + common.EXEC_PATH.slice(0, common.EXEC_PATH.length - 1).join("/"); let getValuePromises: Promise[] = []; Object.keys(this.commandArgs).forEach((arg) => { @@ -352,24 +352,24 @@ export abstract class TfCommand { /** * Gets help (as a string) for the given command */ - public getHelp(cmd: command.TFXCommand): Promise { + public getHelp(cmd: command.TFXCommand): Promise { this.commandArgs.output.setValue("help"); let result = eol; result += [" fTfs ", - " fSSSSSSSs ", - " fSSSSSSSSSS ", - " TSSf fSSSSSSSSSSSS ", - " SSSSSF fSSSSSSST SSSSS ", - " SSfSSSSSsfSSSSSSSt SSSSS ", - " SS tSSSSSSSSSs SSSSS ", - " SS fSSSSSSST SSSSS ", - " SS fSSSSSFSSSSSSf SSSSS ", - " SSSSSST FSSSSSSFt SSSSS ", - " SSSSt FSSSSSSSSSSSS ", - " FSSSSSSSSSS ", - " FSSSSSSs ", - " FSFs (TM) "]. - map(l => magenta(l)).join(eol) + eol + eol; + " fSSSSSSSs ", + " fSSSSSSSSSS ", + " TSSf fSSSSSSSSSSSS ", + " SSSSSF fSSSSSSST SSSSS ", + " SSfSSSSSsfSSSSSSSt SSSSS ", + " SS tSSSSSSSSSs SSSSS ", + " SS fSSSSSSST SSSSS ", + " SS fSSSSSFSSSSSSf SSSSS ", + " SSSSSST FSSSSSSFt SSSSS ", + " SSSSt FSSSSSSSSSSSS ", + " FSSSSSSSSSS ", + " FSSSSSSs ", + " FSFs (TM) "]. + map(l => magenta(l)).join(eol) + eol + eol; let continuedHierarchy: command.CommandHierarchy = cmd.commandHierarchy; cmd.execPath.forEach((segment) => { @@ -391,12 +391,12 @@ export abstract class TfCommand { cyan("tfx ") + yellow(cmd.execPath.join(" ")) + green(" --arg1 arg1val1 arg1val2[...]") + gray(" --arg2 arg2val1 arg2val2[...]") + eol + eol; - + return loader.load(cmd.execPath, []).then((tfCommand) => { result += cyan("Command: ") + commandName + eol; result += tfCommand.description + eol + eol result += cyan("Arguments: ") + eol; - + let uniqueArgs = this.getHelpArgs(); uniqueArgs = _.uniq(uniqueArgs); let maxArgLen = uniqueArgs.map(a => _.kebabCase(a)).reduce((a, b) => Math.max(a, b.length), 0); @@ -406,19 +406,19 @@ export abstract class TfCommand { uniqueArgs.forEach((arg) => { result += singleArgData(arg, maxArgLen); }); - + if (this.serverCommand) { result += eol + cyan("Global server command arguments:") + eol; ["authType", "username", "password", "token", "serviceUrl", "fiddler", "proxy"].forEach((arg) => { result += singleArgData(arg, 11); }); } - + result += eol + cyan("Global arguments:") + eol; ["help", "save", "noPrompt", "output", "json"].forEach((arg) => { result += singleArgData(arg, 9); }); - + result += eol + gray("To see more commands, type " + resetColors("tfx " + cmd.execPath.slice(0, cmd.execPath.length - 1).join(" ") + " --help")); }).then(() => { return result; @@ -480,7 +480,7 @@ export abstract class TfCommand { */ public output(data: any): Promise { return this.commandArgs.output.val().then((outputDestination) => { - switch(outputDestination.toLowerCase()) { + switch (outputDestination.toLowerCase()) { case "friendly": this.friendlyOutput(data); break; From 2f1f3c65afc4cb6a7965d6d870a99271c7cc5f7a Mon Sep 17 00:00:00 2001 From: grawcho Date: Wed, 8 Mar 2017 21:26:23 +0200 Subject: [PATCH 121/235] manipulate maxxParallelism from agent cli --- app/exec/build/agent.ts | 18 ++++++++++++------ app/exec/build/default.ts | 2 ++ package.json | 2 +- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/app/exec/build/agent.ts b/app/exec/build/agent.ts index af556ba1..3b017bc1 100644 --- a/app/exec/build/agent.ts +++ b/app/exec/build/agent.ts @@ -15,7 +15,7 @@ export class Agent extends agentBase.BuildBase { @@ -27,9 +27,10 @@ export class Agent extends agentBase.BuildBase { - const [agentid, agentname, pool, newkey, value, disable] = values; + const [agentid, agentname, pool, newkey, value, disable, maxParallel] = values; var agents: number[] = null; trace.debug("getting pool : %s",pool); trace.debug("getting agent (id) : %s", agentid); @@ -45,7 +46,7 @@ export class Agent extends agentBase.BuildBase { trace.debug("disable request: %s",disable); + if (Parallel) { + agent.maxParallelism = Parallel; + agentapi.updateAgent(agent, pool, agentid); + } if (disable) { if (disable == "true") { include = false; diff --git a/app/exec/build/default.ts b/app/exec/build/default.ts index 61d4133f..c689d8ca 100644 --- a/app/exec/build/default.ts +++ b/app/exec/build/default.ts @@ -20,6 +20,7 @@ export interface BuildArguments extends CoreArguments { disable: args.StringArgument; wait: args.BooleanArgument; timeout: args.IntArgument; + parallel: args.IntArgument; } export function getCommand(args: string[]): BuildBase { @@ -51,6 +52,7 @@ export class BuildBase extends TfCom this.registerCommandArgument("disable","disable / enable agent","Update the agent status.",args.StringArgument,null); this.registerCommandArgument("wait","wait for the build","wait for the triggered build",args.BooleanArgument,"false"); this.registerCommandArgument("timeout","max time to wait","Maximum time to wait for the build to complete (in seconds).",args.IntArgument,"0"); + this.registerCommandArgument("parallel", "max agent parallelism", "Maximum parallel agent runs.", args.IntArgument, null); } public exec(cmd?: any): Promise { diff --git a/package.json b/package.json index 4f8e0472..5d30ecaf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tfx-cli", - "version": "0.3.50", + "version": "0.3.51", "description": "CLI for Visual Studio Team Services and Team Foundation Server", "repository": { "type": "git", From f77a27992efb83e34cb66cba9d1cbd5a28717817 Mon Sep 17 00:00:00 2001 From: grawcho Date: Wed, 8 Mar 2017 21:29:25 +0200 Subject: [PATCH 122/235] fix passing 1 parallelism by default logic --- app/exec/build/agent.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/exec/build/agent.ts b/app/exec/build/agent.ts index 3b017bc1..1531dd74 100644 --- a/app/exec/build/agent.ts +++ b/app/exec/build/agent.ts @@ -46,7 +46,7 @@ export class Agent extends agentBase.BuildBase Date: Tue, 14 Mar 2017 11:30:45 +0200 Subject: [PATCH 123/235] initial handlig (list, show) for service Endpoints --- app/exec/endpoints/default.ts | 19 ++++++++++++ app/exec/endpoints/list.ts | 51 +++++++++++++++++++++++++++++++ app/exec/endpoints/show.ts | 57 +++++++++++++++++++++++++++++++++++ 3 files changed, 127 insertions(+) create mode 100644 app/exec/endpoints/default.ts create mode 100644 app/exec/endpoints/list.ts create mode 100644 app/exec/endpoints/show.ts diff --git a/app/exec/endpoints/default.ts b/app/exec/endpoints/default.ts new file mode 100644 index 00000000..e5419702 --- /dev/null +++ b/app/exec/endpoints/default.ts @@ -0,0 +1,19 @@ +import { TfCommand, CoreArguments } from "../../lib/tfcommand"; +import args = require("../../lib/arguments"); + +export function getCommand(args: string[]): HelpCommand { + return new HelpCommand(args); +} + +export class HelpCommand extends TfCommand { + protected serverCommand = false; + protected description = "Commands for managing Build Definitions."; + + protected setCommandArgs(): void { + super.setCommandArgs(); + } + + public exec(cmd?: any): Promise { + return this.getHelp(cmd); + } +} diff --git a/app/exec/endpoints/list.ts b/app/exec/endpoints/list.ts new file mode 100644 index 00000000..93331b41 --- /dev/null +++ b/app/exec/endpoints/list.ts @@ -0,0 +1,51 @@ +import { TfCommand, CoreArguments } from "../../lib/tfcommand"; +import buildContracts = require('vso-node-api/interfaces/BuildInterfaces'); +import args = require("../../lib/arguments"); +import trace = require('../../lib/trace'); +import taskAgentContracts = require("vso-node-api/interfaces/TaskAgentInterfaces"); +import agentClient = require("vso-node-api/TaskAgentApiBase"); +import corem = require('vso-node-api/CoreApi'); + +export function getCommand(args: string[]): ListEndpoints { + return new ListEndpoints(args); +} + +export class ListEndpoints extends TfCommand { + protected serverCommand = true; + protected description = "Get a list of build definitions"; + + protected getHelpArgs(): string[] { + return ["project"]; + } + + public exec(): Promise { + var agentapi: agentClient.ITaskAgentApiBase = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl()); + var coreapi:corem.ICoreApi = this.webApi.getCoreApi(this.connection.getCollectionUrl()) + trace.debug("Searching for Service Endpoints ..."); + return this.commandArgs.project.val().then((project) => { + return coreapi.getProject(project).then((projectObj) =>{ + return agentapi.getServiceEndpoints(projectObj.id).then((endpoints) => { + trace.debug("Retrieved " + endpoints.length + " build endpoints from server."); + return endpoints; + }); + }); + }); + } + + public friendlyOutput(data: taskAgentContracts.ServiceEndpoint[]): void { + if (!data) { + throw new Error('no definitions supplied'); + } + + if (!(data instanceof Array)) { + throw new Error('expected an array of definitions'); + } + + data.forEach((endpoint) => { + trace.println(); + trace.info('name : %s',endpoint.name); + trace.info('id : %s',endpoint.id); + trace.info('type : %s',endpoint.type); + }); + } +} diff --git a/app/exec/endpoints/show.ts b/app/exec/endpoints/show.ts new file mode 100644 index 00000000..afedda19 --- /dev/null +++ b/app/exec/endpoints/show.ts @@ -0,0 +1,57 @@ +import { TfCommand, CoreArguments } from "../../lib/tfcommand"; +import buildContracts = require('vso-node-api/interfaces/BuildInterfaces'); +import args = require("../../lib/arguments"); +import trace = require('../../lib/trace'); +import taskAgentContracts = require("vso-node-api/interfaces/TaskAgentInterfaces"); +import agentClient = require("vso-node-api/TaskAgentApiBase"); +import corem = require('vso-node-api/CoreApi'); + +export function getCommand(args: string[]): ShowEndpoint { + return new ShowEndpoint(args); +} +export interface EndpointArguments extends CoreArguments { + id: args.StringArgument, +} +export class ShowEndpoint extends TfCommand { + protected serverCommand = true; + protected description = "Get a list of build definitions"; + protected setCommandArgs(): void { + super.setCommandArgs(); + this.registerCommandArgument("id", "Endpoint ID", "Endpoint Guid Identifier.", args.StringArgument, null); + } + + protected getHelpArgs(): string[] { + return ["project","id"]; + } + + public exec(): Promise { + var agentapi: agentClient.ITaskAgentApiBase = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl()); + var coreapi:corem.ICoreApi = this.webApi.getCoreApi(this.connection.getCollectionUrl()) + trace.debug("Searching for Service Endpoints ..."); + return this.commandArgs.project.val().then((project) => { + return this.commandArgs.id.val().then((id) =>{ + return coreapi.getProject(project).then((projectObj) =>{ + return agentapi.getServiceEndpointDetails(projectObj.id,id).then((endpoint) => { + return endpoint; + }); + }); + }); + }); + } + + public friendlyOutput(data: taskAgentContracts.ServiceEndpoint): void { + if (!data) { + throw new Error('no definitions supplied'); + } + + trace.println(); + trace.info('id : %s', data.id); + trace.info('name : %s', data.name); + trace.info('type : %s', data.type); + trace.info('description : %s', data.description); + trace.info('visibility : %s', JSON.stringify(data.data)); + trace.info('auth scheme : %s', JSON.stringify(data.authorization.scheme)); + trace.info('auth parameters : %s', JSON.stringify(data.authorization.parameters)); + trace.info('created By : %s', data.createdBy.displayName); + } +} From 111b99fa0ef8db7ae6803dc7b46d8c648ba2b527 Mon Sep 17 00:00:00 2001 From: sfeldman Date: Tue, 28 Mar 2017 15:11:07 +0300 Subject: [PATCH 124/235] typo in endpoint show --- app/exec/endpoints/show.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/exec/endpoints/show.ts b/app/exec/endpoints/show.ts index afedda19..4ea974b5 100644 --- a/app/exec/endpoints/show.ts +++ b/app/exec/endpoints/show.ts @@ -41,7 +41,7 @@ export class ShowEndpoint extends TfCommand Date: Tue, 28 Mar 2017 15:15:27 +0300 Subject: [PATCH 125/235] another typo in endpoint list --- app/exec/endpoints/list.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/exec/endpoints/list.ts b/app/exec/endpoints/list.ts index 93331b41..676a8fa9 100644 --- a/app/exec/endpoints/list.ts +++ b/app/exec/endpoints/list.ts @@ -34,11 +34,11 @@ export class ListEndpoints extends TfCommand { From 1a0e81ffedfbb4305b1d8f1cd4441526fbfd52ff Mon Sep 17 00:00:00 2001 From: grawcho Date: Sun, 2 Apr 2017 10:29:33 +0300 Subject: [PATCH 126/235] fixes after upstream sync --- app/exec/extension/publish.ts | 2 +- app/lib/tfcommand.ts | 58 ++--------------------------------- tsconfig.json | 2 +- 3 files changed, 5 insertions(+), 57 deletions(-) diff --git a/app/exec/extension/publish.ts b/app/exec/extension/publish.ts index f08741f6..5d24c109 100644 --- a/app/exec/extension/publish.ts +++ b/app/exec/extension/publish.ts @@ -56,7 +56,7 @@ export class ExtensionPublish extends extBase.ExtensionBase; + let extensionCreatePromise: Promise; let createdExtensionVsixPath: string; if (publishSettings.vsixPath) { result.packaged = null; diff --git a/app/lib/tfcommand.ts b/app/lib/tfcommand.ts index 3349af06..65410d99 100644 --- a/app/lib/tfcommand.ts +++ b/app/lib/tfcommand.ts @@ -7,7 +7,7 @@ import { WebApi, getBasicHandler } from "vso-node-api/WebApi"; import { EOL as eol } from "os"; import _ = require("lodash"); import args = require("./arguments"); -import {blue, cyan, gray, green, yellow, magenta, reset as resetColors} from "colors"; +import { blue, cyan, gray, green, yellow, magenta, reset as resetColors } from "colors"; import command = require("../lib/command"); import common = require("./common"); import copypaste = require("copy-paste"); @@ -17,8 +17,6 @@ import Q = require("q"); import qfs = require("./qfs"); import trace = require("./trace"); import version = require("./version"); -import console = require('console'); -import os = require('os'); export interface CoreArguments { [key: string]: args.Argument; @@ -78,7 +76,7 @@ export abstract class TfCommand { process.env.HTTP_PROXY = "http://127.0.0.1:8888"; } }).then(() => { - // Set custom proxy + // Set custom proxy return this.commandArgs.proxy.val(true).then((proxy) => { if (proxy) { process.env.HTTP_PROXY = proxy; @@ -92,21 +90,6 @@ export abstract class TfCommand { }).then(() => { // Set the cached service url return this.commandArgs.serviceUrl.val(true).then((serviceUrl) => { - // handle native http_proxy/ no_proxy settings on linux boxes - var bypass_proxy = false; - var no_proxy: string[] = process.env.no_proxy ? process.env.no_proxy.split(',') : []; - no_proxy.forEach(function (entry) { - if (serviceUrl && serviceUrl.indexOf(entry.replace('*', '')) >= 0) { - bypass_proxy = true; - } - }) - if (os.platform() == 'linux' && - process.env.http_proxy && - !process.env.HTTP_PROXY && - !bypass_proxy) { - process.env.HTTP_PROXY = process.env.http_proxy; - trace.debug("using system http_proxy") - } if (!serviceUrl && !process.env["TFX_BYPASS_CACHE"] && common.EXEC_PATH.join("") !== "login") { let diskCache = new DiskCache("tfx"); return diskCache.itemExists("cache", "connection").then((isConnection) => { @@ -118,22 +101,6 @@ export abstract class TfCommand { } return connectionUrlPromise.then((url) => { if (url) { - // handle native http_proxy/ no_proxy settings on linux boxes - var bypass_proxy = false; - var no_proxy: string[] = process.env.no_proxy ? process.env.no_proxy.split(',') : []; - no_proxy.forEach(function (entry) { - if (url.indexOf(entry.replace('*', '')) >= 0) { - bypass_proxy = true; - process.env.HTTP_PROXY = ''; - } - }) - if (os.platform() == 'linux' && - process.env.http_proxy && - !process.env.HTTP_PROXY && - !bypass_proxy) { - process.env.HTTP_PROXY = process.env.http_proxy; - trace.debug("using system http_proxy") - } this.commandArgs.serviceUrl.setValue(url); } }); @@ -247,7 +214,7 @@ export abstract class TfCommand { this.registerCommandArgument(["output"], "Output destination", "Method to use for output. Options: friendly, json, clipboard.", args.StringArgument, "friendly"); this.registerCommandArgument(["json"], "Output as JSON", "Alias for --output json.", args.BooleanArgument, "false"); this.registerCommandArgument(["fiddler"], "Use Fiddler proxy", "Set up the fiddler proxy for HTTP requests (for debugging purposes).", args.BooleanArgument, "false"); - this.registerCommandArgument(["proxy"],"Proxy server", "Use the specified proxy server for HTTP traffic.", args.StringArgument, null); + this.registerCommandArgument(["proxy"], "Proxy server", "Use the specified proxy server for HTTP traffic.", args.StringArgument, null); this.registerCommandArgument(["help", "-h"], "Help", "Get help for any command.", args.BooleanArgument, "false"); this.registerCommandArgument(["noPrompt"], "No Prompt", "Do not prompt the user for input (instead, raise an error).", args.BooleanArgument, "false"); } @@ -396,25 +363,6 @@ export abstract class TfCommand { public getHelp(cmd: command.TFXCommand): Promise { this.commandArgs.output.setValue("help"); let result = eol; -<<<<<<< HEAD - result += [" fTfs ", - " fSSSSSSSs ", - " fSSSSSSSSSS ", - " TSSf fSSSSSSSSSSSS ", - " SSSSSF fSSSSSSST SSSSS ", - " SSfSSSSSsfSSSSSSSt SSSSS ", - " SS tSSSSSSSSSs SSSSS ", - " SS fSSSSSSST SSSSS ", - " SS fSSSSSFSSSSSSf SSSSS ", - " SSSSSST FSSSSSSFt SSSSS ", - " SSSSt FSSSSSSSSSSSS ", - " FSSSSSSSSSS ", - " FSSSSSSs ", - " FSFs (TM) "]. - map(l => magenta(l)).join(eol) + eol + eol; - -======= ->>>>>>> upstream/master let continuedHierarchy: command.CommandHierarchy = cmd.commandHierarchy; cmd.execPath.forEach((segment) => { continuedHierarchy = continuedHierarchy[segment]; diff --git a/tsconfig.json b/tsconfig.json index d153d7c0..1cf16b53 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,7 +1,7 @@ { "compilerOptions": { "module": "commonjs", - "target": "es5", + "target": "es6", "moduleResolution": "node", "declaration": false, "sourceMap": true, From 1d29ef35eec88c62d32f102e8549967746ac00bb Mon Sep 17 00:00:00 2001 From: grawcho Date: Sun, 2 Apr 2017 10:31:36 +0300 Subject: [PATCH 127/235] add outputPath prop to merge setting --- app/exec/extension/_lib/interfaces.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/exec/extension/_lib/interfaces.ts b/app/exec/extension/_lib/interfaces.ts index 8357c450..ca0fc934 100644 --- a/app/exec/extension/_lib/interfaces.ts +++ b/app/exec/extension/_lib/interfaces.ts @@ -153,7 +153,12 @@ export interface MergeSettings { * True to rev the version of the extension before packaging. */ revVersion: boolean; - + + /** + * Path to the generated vsix + */ + outputPath: string; + /** * Path to the root of localized resource files */ From 18957ff97af0c56c32fcf1434d3c4481b3056d5b Mon Sep 17 00:00:00 2001 From: grawcho Date: Mon, 3 Apr 2017 14:37:43 +0300 Subject: [PATCH 128/235] remove invalid typings --- typings/colors/colors.d.ts | 137 - typings/glob/glob.d.ts | 112 - typings/jszip/jszip.d.ts | 222 - typings/lodash/lodash.d.ts | 21038 ------------------------ typings/node-uuid/node-uuid-base.d.ts | 46 - typings/node-uuid/node-uuid-cjs.d.ts | 15 - typings/node-uuid/node-uuid.d.ts | 36 - typings/node/node.d.ts | 3735 ----- typings/shelljs/shelljs.d.ts | 557 - typings/tsd.d.ts | 18 - typings/validator/validator.d.ts | 315 - typings/winreg/winreg.d.ts | 338 - 12 files changed, 26569 deletions(-) delete mode 100644 typings/colors/colors.d.ts delete mode 100644 typings/glob/glob.d.ts delete mode 100644 typings/jszip/jszip.d.ts delete mode 100644 typings/lodash/lodash.d.ts delete mode 100644 typings/node-uuid/node-uuid-base.d.ts delete mode 100644 typings/node-uuid/node-uuid-cjs.d.ts delete mode 100644 typings/node-uuid/node-uuid.d.ts delete mode 100644 typings/node/node.d.ts delete mode 100644 typings/shelljs/shelljs.d.ts delete mode 100644 typings/tsd.d.ts delete mode 100644 typings/validator/validator.d.ts delete mode 100644 typings/winreg/winreg.d.ts diff --git a/typings/colors/colors.d.ts b/typings/colors/colors.d.ts deleted file mode 100644 index 50e960c4..00000000 --- a/typings/colors/colors.d.ts +++ /dev/null @@ -1,137 +0,0 @@ -// Type definitions for Colors.js 0.6.0-1 -// Project: https://github.com/Marak/colors.js -// Definitions by: Bart van der Schoor -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -declare module "colors" { - interface Color { - (text: string): string; - - strip: Color; - stripColors: Color; - - black: Color; - red: Color; - green: Color; - yellow: Color; - blue: Color; - magenta: Color; - cyan: Color; - white: Color; - gray: Color; - grey: Color; - - bgBlack: Color; - bgRed: Color; - bgGreen: Color; - bgYellow: Color; - bgBlue: Color; - bgMagenta: Color; - bgCyan: Color; - bgWhite: Color; - - reset: Color; - bold: Color; - dim: Color; - italic: Color; - underline: Color; - inverse: Color; - hidden: Color; - strikethrough: Color; - - rainbow: Color; - zebra: Color; - america: Color; - trap: Color; - random: Color; - zalgo: Color; - } - - namespace e { - export function setTheme(theme:any): void; - - export var enabled: boolean; - - export var strip: Color; - export var stripColors: Color; - - export var black: Color; - export var red: Color; - export var green: Color; - export var yellow: Color; - export var blue: Color; - export var magenta: Color; - export var cyan: Color; - export var white: Color; - export var gray: Color; - export var grey: Color; - - export var bgBlack: Color; - export var bgRed: Color; - export var bgGreen: Color; - export var bgYellow: Color; - export var bgBlue: Color; - export var bgMagenta: Color; - export var bgCyan: Color; - export var bgWhite: Color; - - export var reset: Color; - export var bold: Color; - export var dim: Color; - export var italic: Color; - export var underline: Color; - export var inverse: Color; - export var hidden: Color; - export var strikethrough: Color; - - export var rainbow: Color; - export var zebra: Color; - export var america: Color; - export var trap: Color; - export var random: Color; - export var zalgo: Color; - } - - export = e; -} - -interface String { - strip: string; - stripColors: string; - - black: string; - red: string; - green: string; - yellow: string; - blue: string; - magenta: string; - cyan: string; - white: string; - gray: string; - grey: string; - - bgBlack: string; - bgRed: string; - bgGreen: string; - bgYellow: string; - bgBlue: string; - bgMagenta: string; - bgCyan: string; - bgWhite: string; - - reset: string; - bold: string; - dim: string; - italic: string; - underline: string; - inverse: string; - hidden: string; - strikethrough: string; - - rainbow: string; - zebra: string; - america: string; - trap: string; - random: string; - zalgo: string; -} diff --git a/typings/glob/glob.d.ts b/typings/glob/glob.d.ts deleted file mode 100644 index 2957204f..00000000 --- a/typings/glob/glob.d.ts +++ /dev/null @@ -1,112 +0,0 @@ -// Type definitions for Glob 5.0.10 -// Project: https://github.com/isaacs/node-glob -// Definitions by: vvakame -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -/// -/// - -declare module "glob" { - - import events = require("events"); - import fs = require('fs'); - import minimatch = require("minimatch"); - - function G(pattern: string, cb: (err: Error, matches: string[]) => void): void; - function G(pattern: string, options: G.IOptions, cb: (err: Error, matches: string[]) => void): void; - - namespace G { - function sync(pattern: string, options?: IOptions): string[]; - - function hasMagic(pattern: string, options?: IOptions): boolean; - - var Glob: IGlobStatic; - var GlobSync: IGlobSyncStatic; - - interface IOptions extends minimatch.IOptions { - cwd?: string; - root?: string; - dot?: boolean; - nomount?: boolean; - mark?: boolean; - nosort?: boolean; - stat?: boolean; - silent?: boolean; - strict?: boolean; - cache?: { [path: string]: any /* boolean | string | string[] */ }; - statCache?: { [path: string]: fs.Stats }; - symlinks?: any; - sync?: boolean; - nounique?: boolean; - nonull?: boolean; - debug?: boolean; - nobrace?: boolean; - noglobstar?: boolean; - noext?: boolean; - nocase?: boolean; - matchBase?: any; - nodir?: boolean; - ignore?: any; /* string | string[] */ - follow?: boolean; - realpath?: boolean; - nonegate?: boolean; - nocomment?: boolean; - - /** Deprecated. */ - globDebug?: boolean; - } - - interface IGlobStatic extends events.EventEmitter { - new (pattern: string, cb?: (err: Error, matches: string[]) => void): IGlob; - new (pattern: string, options: IOptions, cb?: (err: Error, matches: string[]) => void): IGlob; - prototype: IGlob; - } - - interface IGlobSyncStatic { - new (pattern: string, options?: IOptions): IGlobBase - prototype: IGlobBase; - } - - interface IGlobBase { - minimatch: minimatch.IMinimatch; - options: IOptions; - aborted: boolean; - cache: { [path: string]: any /* boolean | string | string[] */ }; - statCache: { [path: string]: fs.Stats }; - symlinks: { [path: string]: boolean }; - realpathCache: { [path: string]: string }; - found: string[]; - } - - interface IGlob extends IGlobBase, events.EventEmitter { - pause(): void; - resume(): void; - abort(): void; - - /** Deprecated. */ - EOF: any; - /** Deprecated. */ - paused: boolean; - /** Deprecated. */ - maxDepth: number; - /** Deprecated. */ - maxLength: number; - /** Deprecated. */ - changedCwd: boolean; - /** Deprecated. */ - cwd: string; - /** Deprecated. */ - root: string; - /** Deprecated. */ - error: any; - /** Deprecated. */ - matches: string[]; - /** Deprecated. */ - log(...args: any[]): void; - /** Deprecated. */ - emitMatch(m: any): void; - } - } - - export = G; -} diff --git a/typings/jszip/jszip.d.ts b/typings/jszip/jszip.d.ts deleted file mode 100644 index 46fe0f87..00000000 --- a/typings/jszip/jszip.d.ts +++ /dev/null @@ -1,222 +0,0 @@ -// Type definitions for JSZip -// Project: http://stuk.github.com/jszip/ -// Definitions by: mzeiher -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -interface JSZip { - files: {[key: string]: JSZipObject}; - - /** - * Get a file from the archive - * - * @param Path relative path to file - * @return File matching path, null if no file found - */ - file(path: string): JSZipObject; - - /** - * Get files matching a RegExp from archive - * - * @param path RegExp to match - * @return Return all matching files or an empty array - */ - file(path: RegExp): JSZipObject[]; - - /** - * Add a file to the archive - * - * @param path Relative path to file - * @param content Content of the file - * @param options Optional information about the file - * @return JSZip object - */ - file(path: string, data: any, options?: JSZipFileOptions): JSZip; - - /** - * Return an new JSZip instance with the given folder as root - * - * @param name Name of the folder - * @return New JSZip object with the given folder as root or null - */ - folder(name: string): JSZip; - - /** - * Returns new JSZip instances with the matching folders as root - * - * @param name RegExp to match - * @return New array of JSZipFile objects which match the RegExp - */ - folder(name: RegExp): JSZipObject[]; - - /** - * Call a callback function for each entry at this folder level. - * - * @param callback function - */ - forEach(callback: (relativePath: string, file: JSZipObject) => void): void; - - /** - * Get all files wchich match the given filter function - * - * @param predicate Filter function - * @return Array of matched elements - */ - filter(predicate: (relativePath: string, file: JSZipObject) => boolean): JSZipObject[]; - - /** - * Removes the file or folder from the archive - * - * @param path Relative path of file or folder - * @return Returns the JSZip instance - */ - remove(path: string): JSZip; - - /** - * @deprecated since version 3.0 - * @see {@link generateAsync} - * http://stuk.github.io/jszip/documentation/upgrade_guide.html - */ - generate(options?: JSZipGeneratorOptions): any; - - /** - * Generates a new archive asynchronously - * - * @param options Optional options for the generator - * @return The serialized archive - */ - generateAsync(options?: JSZipGeneratorOptions, onUpdate?: Function): Promise; - - /** - * @deprecated since version 3.0 - * @see {@link loadAsync} - * http://stuk.github.io/jszip/documentation/upgrade_guide.html - */ - load(): void; - - /** - * Deserialize zip file asynchronously - * - * @param data Serialized zip file - * @param options Options for deserializing - * @return Returns promise - */ - loadAsync(data: any, options?: JSZipLoadOptions): Promise; -} - -type Serialization = ("string" | "text" | "base64" | "binarystring" | "uint8array" | - "arraybuffer" | "blob" | "nodebuffer"); - -interface JSZipObject { - name: string; - dir: boolean; - date: Date; - comment: string; - options: JSZipObjectOptions; - - /** - * Prepare the content in the asked type. - * @param {String} type the type of the result. - * @param {Function} onUpdate a function to call on each internal update. - * @return Promise the promise of the result. - */ - async(type: Serialization, onUpdate?: Function): Promise; - - /** - * @deprecated since version 3.0 - */ - asText(): void; - /** - * @deprecated since version 3.0 - */ - asBinary(): void; - /** - * @deprecated since version 3.0 - */ - asArrayBuffer(): void; - /** - * @deprecated since version 3.0 - */ - asUint8Array(): void; - //asNodeBuffer(): void; -} - -interface JSZipFileOptions { - base64?: boolean; - binary?: boolean; - date?: Date; - compression?: string; - comment?: string; - optimizedBinaryString?: boolean; - createFolders?: boolean; -} - -interface JSZipObjectOptions { - /** deprecated */ - base64: boolean; - /** deprecated */ - binary: boolean; - /** deprecated */ - dir: boolean; - /** deprecated */ - date: Date; - compression: string; -} - -interface JSZipGeneratorOptions { - /** deprecated */ - base64?: boolean; - /** DEFLATE or STORE */ - compression?: string; - /** base64 (default), string, uint8array, blob */ - type?: string; - comment?: string; -} - -interface JSZipLoadOptions { - base64?: boolean; - checkCRC32?: boolean; - optimizedBinaryString?: boolean; - createFolders?: boolean; -} - -interface JSZipSupport { - arraybuffer: boolean; - uint8array: boolean; - blob: boolean; - nodebuffer: boolean; -} - -declare var JSZip: { - /** - * Create JSZip instance - */ - (): JSZip; - /** - * Create JSZip instance - * If no parameters given an empty zip archive will be created - * - * @param data Serialized zip archive - * @param options Description of the serialized zip archive - */ - (data: any, options?: JSZipLoadOptions): JSZip; - - /** - * Create JSZip instance - */ - new (): JSZip; - /** - * Create JSZip instance - * If no parameters given an empty zip archive will be created - * - * @param data Serialized zip archive - * @param options Description of the serialized zip archive - */ - new (data: any, options?: JSZipLoadOptions): JSZip; - - prototype: JSZip; - support: JSZipSupport; -} - -declare module "jszip" { - export = JSZip; -} diff --git a/typings/lodash/lodash.d.ts b/typings/lodash/lodash.d.ts deleted file mode 100644 index 3305528a..00000000 --- a/typings/lodash/lodash.d.ts +++ /dev/null @@ -1,21038 +0,0 @@ -// Type definitions for Lo-Dash 4.14 -// Project: http://lodash.com/ -// Definitions by: Brian Zengel , Ilya Mochalov , Stepan Mikhaylyuk -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - - -/** -### 4.0.0 Changelog (https://github.com/lodash/lodash/wiki/Changelog) - -#### TODO: -removed: -- [x] Removed _.support -- [x] Removed _.findWhere in favor of _.find with iteratee shorthand -- [x] Removed _.where in favor of _.filter with iteratee shorthand -- [x] Removed _.pluck in favor of _.map with iteratee shorthand - -renamed: -- [x] Renamed _.first to _.head -- [x] Renamed _.indexBy to _.keyBy -- [x] Renamed _.invoke to _.invokeMap -- [x] Renamed _.overArgs to _.overArgs -- [x] Renamed _.padLeft & _.padRight to _.padStart & _.padEnd -- [x] Renamed _.pairs to _.toPairs -- [x] Renamed _.rest to _.tail -- [x] Renamed _.restParam to _.rest -- [x] Renamed _.sortByOrder to _.orderBy -- [x] Renamed _.trimLeft & _.trimRight to _.trimStart & _.trimEnd -- [x] Renamed _.trunc to _.truncate - -split: -- [x] Split _.indexOf & _.lastIndexOf into _.sortedIndexOf & _.sortedLastIndexOf -- [x] Split _.max & _.min into _.maxBy & _.minBy -- [x] Split _.omit & _.pick into _.omitBy & _.pickBy -- [x] Split _.sample into _.sampleSize -- [x] Split _.sortedIndex into _.sortedIndexBy -- [x] Split _.sortedLastIndex into _.sortedLastIndexBy -- [x] Split _.uniq into _.sortedUniq, _.sortedUniqBy, & _.uniqBy - -changes: -- [x] Absorbed _.sortByAll into _.sortBy -- [x] Changed the category of _.at to “Object” -- [x] Changed the category of _.bindAll to “Utility” -- [x] Made _.capitalize uppercase the first character & lowercase the rest -- [x] Made _.functions return only own method names - - -added 23 array methods: -- [x] _.concat -- [x] _.differenceBy -- [x] _.differenceWith -- [x] _.flatMap -- [x] _.fromPairs -- [x] _.intersectionBy -- [x] _.intersectionWith -- [x] _.join -- [x] _.pullAll -- [x] _.pullAllBy -- [x] _.reverse -- [x] _.sortedIndexBy -- [x] _.sortedIndexOf -- [x] _.sortedLastIndexBy -- [x] _.sortedLastIndexOf -- [x] _.sortedUniq -- [x] _.sortedUniqBy -- [x] _.unionBy -- [x] _.unionWith -- [x] _.uniqBy -- [x] _.uniqWith -- [x] _.xorBy -- [x] _.xorWith - -added 18 lang methods: -- [x] _.cloneDeepWith -- [x] _.cloneWith -- [x] _.eq -- [x] _.isArrayLike -- [x] _.isArrayLikeObject -- [x] _.isEqualWith -- [x] _.isInteger -- [x] _.isLength -- [x] _.isMatchWith -- [x] _.isNil -- [x] _.isObjectLike -- [x] _.isSafeInteger -- [x] _.isSymbol -- [x] _.toInteger -- [x] _.toLength -- [x] _.toNumber -- [x] _.toSafeInteger -- [x] _.toString - -added 13 object methods: -- [x] _.assignIn -- [x] _.assignInWith -- [x] _.assignWith -- [x] _.functionsIn -- [x] _.hasIn -- [x] _.mergeWith -- [x] _.omitBy -- [x] _.pickBy - - -added 8 string methods: -- [x] _.lowerCase -- [x] _.lowerFirst -- [x] _.upperCase -- [x] _.upperFirst -- [x] _.toLower -- [x] _.toUpper - -added 8 utility methods: -- [x] _.toPath - -added 4 math methods: -- [x] _.maxBy -- [x] _.mean -- [x] _.minBy -- [x] _.sumBy - -added 2 function methods: -- [x] _.flip -- [x] _.unary - -added 2 number methods: -- [x] _.clamp -- [x] _.subtract - -added collection method: -- [x] _.sampleSize - -Added 3 aliases - -- [x] _.first as an alias of _.head - -Removed 17 aliases -- [x] Removed aliase _.all -- [x] Removed aliase _.any -- [x] Removed aliase _.backflow -- [x] Removed aliase _.callback -- [x] Removed aliase _.collect -- [x] Removed aliase _.compose -- [x] Removed aliase _.contains -- [x] Removed aliase _.detect -- [x] Removed aliase _.foldl -- [x] Removed aliase _.foldr -- [x] Removed aliase _.include -- [x] Removed aliase _.inject -- [x] Removed aliase _.methods -- [x] Removed aliase _.object -- [x] Removed aliase _.run -- [x] Removed aliase _.select -- [x] Removed aliase _.unique - -Other changes -- [x] Added support for array buffers to _.isEqual -- [x] Added support for converting iterators to _.toArray -- [x] Added support for deep paths to _.zipObject -- [x] Changed UMD to export to window or self when available regardless of other exports -- [x] Ensured debounce cancel clears args & thisArg references -- [x] Ensured _.add, _.subtract, & _.sum don’t skip NaN values -- [x] Ensured _.clone treats generators like functions -- [x] Ensured _.clone produces clones with the source’s [[Prototype]] -- [x] Ensured _.defaults assigns properties that shadow Object.prototype -- [x] Ensured _.defaultsDeep doesn’t merge a string into an array -- [x] Ensured _.defaultsDeep & _.merge don’t modify sources -- [x] Ensured _.defaultsDeep works with circular references -- [x] Ensured _.keys skips “length” on strict mode arguments objects in Safari 9 -- [x] Ensured _.merge doesn’t convert strings to arrays -- [x] Ensured _.merge merges plain-objects onto non plain-objects -- [x] Ensured _#plant resets iterator data of cloned sequences -- [x] Ensured _.random swaps min & max if min is greater than max -- [x] Ensured _.range preserves the sign of start of -0 -- [x] Ensured _.reduce & _.reduceRight use getIteratee in their array branch -- [x] Fixed rounding issue with the precision param of _.floor -- [x] Added flush method to debounced & throttled functions - -** LATER ** -Misc: -- [ ] Made _.forEach, _.forIn, _.forOwn, & _.times implicitly end a chain sequence -- [ ] Removed thisArg params from most methods -- [ ] Made “By” methods provide a single param to iteratees -- [ ] Made _.words chainable by default -- [ ] Removed isDeep params from _.clone & _.flatten -- [ ] Removed _.bindAll support for binding all methods when no names are provided -- [ ] Removed func-first param signature from _.before & _.after -- [ ] _.extend as an alias of _.assignIn -- [ ] _.extendWith as an alias of _.assignInWith -- [ ] Added clear method to _.memoize.Cache -- [ ] Added support for ES6 maps, sets, & symbols to _.clone, _.isEqual, & _.toArray -- [ ] Enabled _.flow & _.flowRight to accept an array of functions -- [ ] Ensured “Collection” methods treat functions as objects -- [ ] Ensured _.assign, _.defaults, & _.merge coerce object values to objects -- [ ] Ensured _.bindKey bound functions call object[key] when called with the new operator -- [ ] Ensured _.isFunction returns true for generator functions -- [ ] Ensured _.merge assigns typed arrays directly -- [ ] Made _(...) an iterator & iterable -- [ ] Made _.drop, _.take, & right forms coerce n of undefined to 0 - -Methods: -- [ ] _.concat -- [ ] _.differenceBy -- [ ] _.differenceWith -- [ ] _.flatMap -- [ ] _.fromPairs -- [ ] _.intersectionBy -- [ ] _.intersectionWith -- [ ] _.join -- [ ] _.pullAll -- [ ] _.pullAllBy -- [ ] _.reverse -- [ ] _.sortedLastIndexOf -- [ ] _.unionBy -- [ ] _.unionWith -- [ ] _.uniqWith -- [ ] _.xorBy -- [ ] _.xorWith -- [ ] _.toString - -- [ ] _.invoke -- [ ] _.setWith -- [ ] _.toPairs -- [ ] _.toPairsIn -- [ ] _.unset - -- [ ] _.replace -- [ ] _.split - -- [ ] _.cond -- [ ] _.conforms -- [ ] _.nthArg -- [ ] _.over -- [ ] _.overEvery -- [ ] _.overSome -- [ ] _.rangeRight - -- [ ] _.next -*/ - -declare var _: _.LoDashStatic; - -declare module _ { - interface LoDashStatic { - /** - * Creates a lodash object which wraps the given value to enable intuitive method chaining. - * - * In addition to Lo-Dash methods, wrappers also have the following Array methods: - * concat, join, pop, push, reverse, shift, slice, sort, splice, and unshift - * - * Chaining is supported in custom builds as long as the value method is implicitly or - * explicitly included in the build. - * - * The chainable wrapper functions are: - * after, assign, bind, bindAll, bindKey, chain, chunk, compact, compose, concat, countBy, - * createCallback, curry, debounce, defaults, defer, delay, difference, filter, flatten, - * forEach, forEachRight, forIn, forInRight, forOwn, forOwnRight, functions, groupBy, - * keyBy, initial, intersection, invert, invoke, keys, map, max, memoize, merge, min, - * object, omit, once, pairs, partial, partialRight, pick, pluck, pull, push, range, reject, - * remove, rest, reverse, sample, shuffle, slice, sort, sortBy, splice, tap, throttle, times, - * toArray, transform, union, uniq, unset, unshift, unzip, values, where, without, wrap, and zip - * - * The non-chainable wrapper functions are: - * clone, cloneDeep, contains, escape, every, find, findIndex, findKey, findLast, - * findLastIndex, findLastKey, has, identity, indexOf, isArguments, isArray, isBoolean, - * isDate, isElement, isEmpty, isEqual, isFinite, isFunction, isNaN, isNull, isNumber, - * isObject, isPlainObject, isRegExp, isString, isUndefined, join, lastIndexOf, mixin, - * noConflict, parseInt, pop, random, reduce, reduceRight, result, shift, size, some, - * sortedIndex, runInContext, template, unescape, uniqueId, and value - * - * The wrapper functions first and last return wrapped values when n is provided, otherwise - * they return unwrapped values. - * - * Explicit chaining can be enabled by using the _.chain method. - **/ - (value: number): LoDashImplicitWrapper; - (value: string): LoDashImplicitStringWrapper; - (value: boolean): LoDashImplicitWrapper; - (value: Array): LoDashImplicitNumberArrayWrapper; - (value: Array): LoDashImplicitArrayWrapper; - (value: T): LoDashImplicitObjectWrapper; - (value: any): LoDashImplicitWrapper; - - /** - * The semantic version number. - **/ - VERSION: string; - - /** - * By default, the template delimiters used by Lo-Dash are similar to those in embedded Ruby - * (ERB). Change the following template settings to use alternative delimiters. - **/ - templateSettings: TemplateSettings; - } - - /** - * By default, the template delimiters used by Lo-Dash are similar to those in embedded Ruby - * (ERB). Change the following template settings to use alternative delimiters. - **/ - interface TemplateSettings { - /** - * The "escape" delimiter. - **/ - escape?: RegExp; - - /** - * The "evaluate" delimiter. - **/ - evaluate?: RegExp; - - /** - * An object to import into the template as local variables. - **/ - imports?: Dictionary; - - /** - * The "interpolate" delimiter. - **/ - interpolate?: RegExp; - - /** - * Used to reference the data object in the template text. - **/ - variable?: string; - } - - /** - * Creates a cache object to store key/value pairs. - */ - interface MapCache { - /** - * Removes `key` and its value from the cache. - * @param key The key of the value to remove. - * @return Returns `true` if the entry was removed successfully, else `false`. - */ - delete(key: string): boolean; - - /** - * Gets the cached value for `key`. - * @param key The key of the value to get. - * @return Returns the cached value. - */ - get(key: string): any; - - /** - * Checks if a cached value for `key` exists. - * @param key The key of the entry to check. - * @return Returns `true` if an entry for `key` exists, else `false`. - */ - has(key: string): boolean; - - /** - * Sets `value` to `key` of the cache. - * @param key The key of the value to cache. - * @param value The value to cache. - * @return Returns the cache object. - */ - set(key: string, value: any): _.Dictionary; - } - interface MapCacheConstructor { - new (): MapCache; - } - - interface LoDashWrapperBase { } - - interface LoDashImplicitWrapperBase extends LoDashWrapperBase { } - - interface LoDashExplicitWrapperBase extends LoDashWrapperBase { } - - interface LoDashImplicitWrapper extends LoDashImplicitWrapperBase> { } - - interface LoDashExplicitWrapper extends LoDashExplicitWrapperBase> { } - - interface LoDashImplicitStringWrapper extends LoDashImplicitWrapper { } - - interface LoDashExplicitStringWrapper extends LoDashExplicitWrapper { } - - interface LoDashImplicitObjectWrapper extends LoDashImplicitWrapperBase> { } - - interface LoDashExplicitObjectWrapper extends LoDashExplicitWrapperBase> { } - - interface LoDashImplicitArrayWrapper extends LoDashImplicitWrapperBase> { - pop(): T; - push(...items: T[]): LoDashImplicitArrayWrapper; - shift(): T; - sort(compareFn?: (a: T, b: T) => number): LoDashImplicitArrayWrapper; - splice(start: number): LoDashImplicitArrayWrapper; - splice(start: number, deleteCount: number, ...items: any[]): LoDashImplicitArrayWrapper; - unshift(...items: T[]): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapper extends LoDashExplicitWrapperBase> { - pop(): LoDashExplicitObjectWrapper; - push(...items: T[]): LoDashExplicitArrayWrapper; - shift(): LoDashExplicitObjectWrapper; - sort(compareFn?: (a: T, b: T) => number): LoDashExplicitArrayWrapper; - splice(start: number): LoDashExplicitArrayWrapper; - splice(start: number, deleteCount: number, ...items: any[]): LoDashExplicitArrayWrapper; - unshift(...items: T[]): LoDashExplicitArrayWrapper; - } - - interface LoDashImplicitNumberArrayWrapper extends LoDashImplicitArrayWrapper { } - - interface LoDashExplicitNumberArrayWrapper extends LoDashExplicitArrayWrapper { } - - /********* - * Array * - *********/ - - //_.chunk - interface LoDashStatic { - /** - * Creates an array of elements split into groups the length of size. If collection can’t be split evenly, the - * final chunk will be the remaining elements. - * - * @param array The array to process. - * @param size The length of each chunk. - * @return Returns the new array containing chunks. - */ - chunk( - array: List, - size?: number - ): T[][]; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.chunk - */ - chunk(size?: number): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.chunk - */ - chunk(size?: number): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.chunk - */ - chunk(size?: number): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.chunk - */ - chunk(size?: number): LoDashExplicitArrayWrapper; - } - - //_.compact - interface LoDashStatic { - /** - * Creates an array with all falsey values removed. The values false, null, 0, "", undefined, and NaN are - * falsey. - * - * @param array The array to compact. - * @return (Array) Returns the new array of filtered values. - */ - compact(array?: List): T[]; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.compact - */ - compact(): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.compact - */ - compact(): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.compact - */ - compact(): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.compact - */ - compact(): LoDashExplicitArrayWrapper; - } - - //_.concat DUMMY - interface LoDashStatic { - /** - * Creates a new array concatenating `array` with any additional arrays - * and/or values. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to concatenate. - * @param {...*} [values] The values to concatenate. - * @returns {Array} Returns the new concatenated array. - * @example - * - * var array = [1]; - * var other = _.concat(array, 2, [3], [[4]]); - * - * console.log(other); - * // => [1, 2, 3, [4]] - * - * console.log(array); - * // => [1] - */ - concat(array: T[]|List, ...values: (T|T[]|List)[]) : T[]; - } - - //_.difference - interface LoDashStatic { - /** - * Creates an array of unique array values not included in the other provided arrays using SameValueZero for - * equality comparisons. - * - * @param array The array to inspect. - * @param values The arrays of values to exclude. - * @return Returns the new array of filtered values. - */ - difference( - array: T[]|List, - ...values: Array> - ): T[]; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.difference - */ - difference(...values: (T[]|List)[]): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.difference - */ - difference(...values: (TValue[]|List)[]): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.difference - */ - difference(...values: (T[]|List)[]): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.difference - */ - difference(...values: (TValue[]|List)[]): LoDashExplicitArrayWrapper; - } - - //_.differenceBy - interface LoDashStatic { - /** - * This method is like _.difference except that it accepts iteratee which is invoked for each element of array - * and values to generate the criterion by which uniqueness is computed. The iteratee is invoked with one - * argument: (value). - * - * @param array The array to inspect. - * @param values The values to exclude. - * @param iteratee The iteratee invoked per element. - * @returns Returns the new array of filtered values. - */ - differenceBy( - array: T[]|List, - values?: T[]|List, - iteratee?: ((value: T) => any)|string - ): T[]; - - /** - * @see _.differenceBy - */ - differenceBy( - array: T[]|List, - values?: T[]|List, - iteratee?: W - ): T[]; - - /** - * @see _.differenceBy - */ - differenceBy( - array: T[]|List, - values1?: T[]|List, - values2?: T[]|List, - iteratee?: ((value: T) => any)|string - ): T[]; - - /** - * @see _.differenceBy - */ - differenceBy( - array: T[]|List, - values1?: T[]|List, - values2?: T[]|List, - iteratee?: W - ): T[]; - - /** - * @see _.differenceBy - */ - differenceBy( - array: T[]|List, - values1?: T[]|List, - values2?: T[]|List, - values3?: T[]|List, - iteratee?: ((value: T) => any)|string - ): T[]; - - /** - * @see _.differenceBy - */ - differenceBy( - array: T[]|List, - values1?: T[]|List, - values2?: T[]|List, - values3?: T[]|List, - iteratee?: W - ): T[]; - - /** - * @see _.differenceBy - */ - differenceBy( - array: T[]|List, - values1?: T[]|List, - values2?: T[]|List, - values3?: T[]|List, - values4?: T[]|List, - iteratee?: W - ): T[]; - - /** - * @see _.differenceBy - */ - differenceBy( - array: T[]|List, - values1?: T[]|List, - values2?: T[]|List, - values3?: T[]|List, - values4?: T[]|List, - iteratee?: ((value: T) => any)|string - ): T[]; - - /** - * @see _.differenceBy - */ - differenceBy( - array: T[]|List, - values1?: T[]|List, - values2?: T[]|List, - values3?: T[]|List, - values4?: T[]|List, - values5?: T[]|List, - iteratee?: ((value: T) => any)|string - ): T[]; - - /** - * @see _.differenceBy - */ - differenceBy( - array: T[]|List, - values1?: T[]|List, - values2?: T[]|List, - values3?: T[]|List, - values4?: T[]|List, - values5?: T[]|List, - iteratee?: W - ): T[]; - - /** - * @see _.differenceBy - */ - differenceBy( - array: T[]|List, - ...values: any[] - ): T[]; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.differenceBy - */ - differenceBy( - values?: T[]|List, - iteratee?: ((value: T) => any)|string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values?: T[]|List, - iteratee?: W - ): LoDashImplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - iteratee?: ((value: T) => any)|string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - iteratee?: W - ): LoDashImplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - values3?: T[]|List, - iteratee?: ((value: T) => any)|string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - values3?: T[]|List, - iteratee?: W - ): LoDashImplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - values3?: T[]|List, - values4?: T[]|List, - iteratee?: ((value: T) => any)|string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - values3?: T[]|List, - values4?: T[]|List, - iteratee?: W - ): LoDashImplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - values3?: T[]|List, - values4?: T[]|List, - values5?: T[]|List, - iteratee?: ((value: T) => any)|string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - values3?: T[]|List, - values4?: T[]|List, - values5?: T[]|List, - iteratee?: W - ): LoDashImplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - ...values: any[] - ): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.differenceBy - */ - differenceBy( - values?: T[]|List, - iteratee?: ((value: T) => any)|string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values?: T[]|List, - iteratee?: W - ): LoDashImplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - iteratee?: ((value: T) => any)|string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - iteratee?: W - ): LoDashImplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - values3?: T[]|List, - iteratee?: ((value: T) => any)|string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - values3?: T[]|List, - iteratee?: W - ): LoDashImplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - values3?: T[]|List, - values4?: T[]|List, - iteratee?: ((value: T) => any)|string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - values3?: T[]|List, - values4?: T[]|List, - iteratee?: W - ): LoDashImplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - values3?: T[]|List, - values4?: T[]|List, - values5?: T[]|List, - iteratee?: ((value: T) => any)|string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - values3?: T[]|List, - values4?: T[]|List, - values5?: T[]|List, - iteratee?: W - ): LoDashImplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - ...values: any[] - ): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.differenceBy - */ - differenceBy( - values?: T[]|List, - iteratee?: ((value: T) => any)|string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values?: T[]|List, - iteratee?: W - ): LoDashExplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - iteratee?: ((value: T) => any)|string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - iteratee?: W - ): LoDashExplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - values3?: T[]|List, - iteratee?: ((value: T) => any)|string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - values3?: T[]|List, - iteratee?: W - ): LoDashExplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - values3?: T[]|List, - values4?: T[]|List, - iteratee?: ((value: T) => any)|string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - values3?: T[]|List, - values4?: T[]|List, - iteratee?: W - ): LoDashExplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - values3?: T[]|List, - values4?: T[]|List, - values5?: T[]|List, - iteratee?: ((value: T) => any)|string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - values3?: T[]|List, - values4?: T[]|List, - values5?: T[]|List, - iteratee?: W - ): LoDashExplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - ...values: any[] - ): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.differenceBy - */ - differenceBy( - values?: T[]|List, - iteratee?: ((value: T) => any)|string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values?: T[]|List, - iteratee?: W - ): LoDashExplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - iteratee?: ((value: T) => any)|string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - iteratee?: W - ): LoDashExplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - values3?: T[]|List, - iteratee?: ((value: T) => any)|string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - values3?: T[]|List, - iteratee?: W - ): LoDashExplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - values3?: T[]|List, - values4?: T[]|List, - iteratee?: ((value: T) => any)|string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - values3?: T[]|List, - values4?: T[]|List, - iteratee?: W - ): LoDashExplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - values3?: T[]|List, - values4?: T[]|List, - values5?: T[]|List, - iteratee?: ((value: T) => any)|string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - values1?: T[]|List, - values2?: T[]|List, - values3?: T[]|List, - values4?: T[]|List, - values5?: T[]|List, - iteratee?: W - ): LoDashExplicitArrayWrapper; - - /** - * @see _.differenceBy - */ - differenceBy( - ...values: any[] - ): LoDashExplicitArrayWrapper; - } - - //_.differenceWith DUMMY - interface LoDashStatic { - /** - * Creates an array of unique `array` values not included in the other - * provided arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) - * for equality comparisons. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to inspect. - * @param {...Array} [values] The values to exclude. - * @returns {Array} Returns the new array of filtered values. - * @example - * - * _.difference([3, 2, 1], [4, 2]); - * // => [3, 1] - */ - differenceWith( - array: any[]|List, - ...values: any[] - ): any[]; - } - - //_.drop - interface LoDashStatic { - /** - * Creates a slice of array with n elements dropped from the beginning. - * - * @param array The array to query. - * @param n The number of elements to drop. - * @return Returns the slice of array. - */ - drop(array: T[]|List, n?: number): T[]; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.drop - */ - drop(n?: number): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.drop - */ - drop(n?: number): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.drop - */ - drop(n?: number): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.drop - */ - drop(n?: number): LoDashExplicitArrayWrapper; - } - - //_.dropRight - interface LoDashStatic { - /** - * Creates a slice of array with n elements dropped from the end. - * - * @param array The array to query. - * @param n The number of elements to drop. - * @return Returns the slice of array. - */ - dropRight( - array: List, - n?: number - ): T[]; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.dropRight - */ - dropRight(n?: number): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.dropRight - */ - dropRight(n?: number): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.dropRight - */ - dropRight(n?: number): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.dropRight - */ - dropRight(n?: number): LoDashExplicitArrayWrapper; - } - - //_.dropRightWhile - interface LoDashStatic { - /** - * Creates a slice of array excluding elements dropped from the end. Elements are dropped until predicate - * returns falsey. The predicate is bound to thisArg and invoked with three arguments: (value, index, array). - * - * If a property name is provided for predicate the created _.property style callback returns the property - * value of the given element. - * - * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for - * elements that have a matching property value, else false. - * - * If an object is provided for predicate the created _.matches style callback returns true for elements that - * match the properties of the given object, else false. - * - * @param array The array to query. - * @param predicate The function invoked per iteration. - * @param thisArg The this binding of predicate. - * @return Returns the slice of array. - */ - dropRightWhile( - array: List, - predicate?: ListIterator - ): TValue[]; - - /** - * @see _.dropRightWhile - */ - dropRightWhile( - array: List, - predicate?: string - ): TValue[]; - - /** - * @see _.dropRightWhile - */ - dropRightWhile( - array: List, - predicate?: TWhere - ): TValue[]; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.dropRightWhile - */ - dropRightWhile( - predicate?: ListIterator - ): LoDashImplicitArrayWrapper; - - /** - * @see _.dropRightWhile - */ - dropRightWhile( - predicate?: string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.dropRightWhile - */ - dropRightWhile( - predicate?: TWhere - ): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.dropRightWhile - */ - dropRightWhile( - predicate?: ListIterator - ): LoDashImplicitArrayWrapper; - - /** - * @see _.dropRightWhile - */ - dropRightWhile( - predicate?: string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.dropRightWhile - */ - dropRightWhile( - predicate?: TWhere - ): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.dropRightWhile - */ - dropRightWhile( - predicate?: ListIterator - ): LoDashExplicitArrayWrapper; - - /** - * @see _.dropRightWhile - */ - dropRightWhile( - predicate?: string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.dropRightWhile - */ - dropRightWhile( - predicate?: TWhere - ): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.dropRightWhile - */ - dropRightWhile( - predicate?: ListIterator - ): LoDashExplicitArrayWrapper; - - /** - * @see _.dropRightWhile - */ - dropRightWhile( - predicate?: string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.dropRightWhile - */ - dropRightWhile( - predicate?: TWhere - ): LoDashExplicitArrayWrapper; - } - - //_.dropWhile - interface LoDashStatic { - /** - * Creates a slice of array excluding elements dropped from the beginning. Elements are dropped until predicate - * returns falsey. The predicate is bound to thisArg and invoked with three arguments: (value, index, array). - * - * If a property name is provided for predicate the created _.property style callback returns the property - * value of the given element. - * - * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for - * elements that have a matching property value, else false. - * - * If an object is provided for predicate the created _.matches style callback returns true for elements that - * have the properties of the given object, else false. - * - * @param array The array to query. - * @param predicate The function invoked per iteration. - * @param thisArg The this binding of predicate. - * @return Returns the slice of array. - */ - dropWhile( - array: List, - predicate?: ListIterator - ): TValue[]; - - /** - * @see _.dropWhile - */ - dropWhile( - array: List, - predicate?: string - ): TValue[]; - - /** - * @see _.dropWhile - */ - dropWhile( - array: List, - predicate?: TWhere - ): TValue[]; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.dropWhile - */ - dropWhile( - predicate?: ListIterator - ): LoDashImplicitArrayWrapper; - - /** - * @see _.dropWhile - */ - dropWhile( - predicate?: string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.dropWhile - */ - dropWhile( - predicate?: TWhere - ): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.dropWhile - */ - dropWhile( - predicate?: ListIterator - ): LoDashImplicitArrayWrapper; - - /** - * @see _.dropWhile - */ - dropWhile( - predicate?: string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.dropWhile - */ - dropWhile( - predicate?: TWhere - ): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.dropWhile - */ - dropWhile( - predicate?: ListIterator - ): LoDashExplicitArrayWrapper; - - /** - * @see _.dropWhile - */ - dropWhile( - predicate?: string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.dropWhile - */ - dropWhile( - predicate?: TWhere - ): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.dropWhile - */ - dropWhile( - predicate?: ListIterator - ): LoDashExplicitArrayWrapper; - - /** - * @see _.dropWhile - */ - dropWhile( - predicate?: string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.dropWhile - */ - dropWhile( - predicate?: TWhere - ): LoDashExplicitArrayWrapper; - } - - //_.fill - interface LoDashStatic { - /** - * Fills elements of array with value from start up to, but not including, end. - * - * Note: This method mutates array. - * - * @param array The array to fill. - * @param value The value to fill array with. - * @param start The start position. - * @param end The end position. - * @return Returns array. - */ - fill( - array: any[], - value: T, - start?: number, - end?: number - ): T[]; - - /** - * @see _.fill - */ - fill( - array: List, - value: T, - start?: number, - end?: number - ): List; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.fill - */ - fill( - value: T, - start?: number, - end?: number - ): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.fill - */ - fill( - value: T, - start?: number, - end?: number - ): LoDashImplicitObjectWrapper>; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.fill - */ - fill( - value: T, - start?: number, - end?: number - ): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.fill - */ - fill( - value: T, - start?: number, - end?: number - ): LoDashExplicitObjectWrapper>; - } - - //_.findIndex - interface LoDashStatic { - /** - * This method is like _.find except that it returns the index of the first element predicate returns truthy - * for instead of the element itself. - * - * If a property name is provided for predicate the created _.property style callback returns the property - * value of the given element. - * - * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for - * elements that have a matching property value, else false. - * - * If an object is provided for predicate the created _.matches style callback returns true for elements that - * have the properties of the given object, else false. - * - * @param array The array to search. - * @param predicate The function invoked per iteration. - * @param thisArg The this binding of predicate. - * @return Returns the index of the found element, else -1. - */ - findIndex( - array: List, - predicate?: ListIterator - ): number; - - /** - * @see _.findIndex - */ - findIndex( - array: List, - predicate?: string - ): number; - - /** - * @see _.findIndex - */ - findIndex( - array: List, - predicate?: W - ): number; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.findIndex - */ - findIndex( - predicate?: ListIterator - ): number; - - /** - * @see _.findIndex - */ - findIndex( - predicate?: string - ): number; - - /** - * @see _.findIndex - */ - findIndex( - predicate?: W - ): number; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.findIndex - */ - findIndex( - predicate?: ListIterator - ): number; - - /** - * @see _.findIndex - */ - findIndex( - predicate?: string - ): number; - - /** - * @see _.findIndex - */ - findIndex( - predicate?: W - ): number; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.findIndex - */ - findIndex( - predicate?: ListIterator - ): LoDashExplicitWrapper; - - /** - * @see _.findIndex - */ - findIndex( - predicate?: string - ): LoDashExplicitWrapper; - - /** - * @see _.findIndex - */ - findIndex( - predicate?: W - ): LoDashExplicitWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.findIndex - */ - findIndex( - predicate?: ListIterator - ): LoDashExplicitWrapper; - - /** - * @see _.findIndex - */ - findIndex( - predicate?: string - ): LoDashExplicitWrapper; - - /** - * @see _.findIndex - */ - findIndex( - predicate?: W - ): LoDashExplicitWrapper; - } - - //_.findLastIndex - interface LoDashStatic { - /** - * This method is like _.findIndex except that it iterates over elements of collection from right to left. - * - * If a property name is provided for predicate the created _.property style callback returns the property - * value of the given element. - * - * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for - * elements that have a matching property value, else false. - * - * If an object is provided for predicate the created _.matches style callback returns true for elements that - * have the properties of the given object, else false. - * - * @param array The array to search. - * @param predicate The function invoked per iteration. - * @param thisArg The function invoked per iteration. - * @return Returns the index of the found element, else -1. - */ - findLastIndex( - array: List, - predicate?: ListIterator - ): number; - - /** - * @see _.findLastIndex - */ - findLastIndex( - array: List, - predicate?: string - ): number; - - /** - * @see _.findLastIndex - */ - findLastIndex( - array: List, - predicate?: W - ): number; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.findLastIndex - */ - findLastIndex( - predicate?: ListIterator - ): number; - - /** - * @see _.findLastIndex - */ - findLastIndex( - predicate?: string - ): number; - - /** - * @see _.findLastIndex - */ - findLastIndex( - predicate?: W - ): number; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.findLastIndex - */ - findLastIndex( - predicate?: ListIterator - ): number; - - /** - * @see _.findLastIndex - */ - findLastIndex( - predicate?: string - ): number; - - /** - * @see _.findLastIndex - */ - findLastIndex( - predicate?: W - ): number; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.findLastIndex - */ - findLastIndex( - predicate?: ListIterator - ): LoDashExplicitWrapper; - - /** - * @see _.findLastIndex - */ - findLastIndex( - predicate?: string - ): LoDashExplicitWrapper; - - /** - * @see _.findLastIndex - */ - findLastIndex( - predicate?: W - ): LoDashExplicitWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.findLastIndex - */ - findLastIndex( - predicate?: ListIterator - ): LoDashExplicitWrapper; - - /** - * @see _.findLastIndex - */ - findLastIndex( - predicate?: string - ): LoDashExplicitWrapper; - - /** - * @see _.findLastIndex - */ - findLastIndex( - predicate?: W - ): LoDashExplicitWrapper; - } - - //_.first - interface LoDashStatic { - /** - * @see _.head - */ - first(array: List): T; - } - - interface LoDashImplicitWrapper { - /** - * @see _.head - */ - first(): string; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.head - */ - first(): T; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.head - */ - first(): T; - } - - interface LoDashExplicitWrapper { - /** - * @see _.head - */ - first(): LoDashExplicitWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.head - */ - first(): T; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.head - */ - first(): T; - } - - interface RecursiveArray extends Array> {} - interface ListOfRecursiveArraysOrValues extends List> {} - - //_.flatten - interface LoDashStatic { - /** - * Flattens a nested array. If isDeep is true the array is recursively flattened, otherwise it’s only - * flattened a single level. - * - * @param array The array to flatten. - * @param isDeep Specify a deep flatten. - * @return Returns the new flattened array. - */ - flatten(array: ListOfRecursiveArraysOrValues, isDeep: boolean): T[]; - - /** - * @see _.flatten - */ - flatten(array: List): T[]; - - /** - * @see _.flatten - */ - flatten(array: ListOfRecursiveArraysOrValues): RecursiveArray; - } - - interface LoDashImplicitWrapper { - /** - * @see _.flatten - */ - flatten(): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.flatten - */ - flatten(isDeep?: boolean): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.flatten - */ - flatten(isDeep?: boolean): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitWrapper { - /** - * @see _.flatten - */ - flatten(): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.flatten - */ - flatten(isDeep?: boolean): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.flatten - */ - flatten(isDeep?: boolean): LoDashExplicitArrayWrapper; - } - - //_.flattenDeep - interface LoDashStatic { - /** - * Recursively flattens a nested array. - * - * @param array The array to recursively flatten. - * @return Returns the new flattened array. - */ - flattenDeep(array: ListOfRecursiveArraysOrValues): T[]; - } - - interface LoDashImplicitWrapper { - /** - * @see _.flattenDeep - */ - flattenDeep(): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.flattenDeep - */ - flattenDeep(): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.flattenDeep - */ - flattenDeep(): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitWrapper { - /** - * @see _.flattenDeep - */ - flattenDeep(): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.flattenDeep - */ - flattenDeep(): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.flattenDeep - */ - flattenDeep(): LoDashExplicitArrayWrapper; - } - - // _.flattenDepth - interface LoDashStatic { - /** - * Recursively flatten array up to depth times. - * - * @param array The array to recursively flatten. - * @param number The maximum recursion depth. - * @return Returns the new flattened array. - */ - flattenDepth(array: ListOfRecursiveArraysOrValues, depth?: number): T[]; - } - - //_.fromPairs - interface LoDashStatic { - /** - * The inverse of `_.toPairs`; this method returns an object composed - * from key-value `pairs`. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} pairs The key-value pairs. - * @returns {Object} Returns the new object. - * @example - * - * _.fromPairs([['fred', 30], ['barney', 40]]); - * // => { 'fred': 30, 'barney': 40 } - */ - fromPairs( - array: List<[_.StringRepresentable, T]> - ): Dictionary; - - /** - @see _.fromPairs - */ - fromPairs( - array: List - ): Dictionary; - } - - //_.fromPairs DUMMY - interface LoDashImplicitArrayWrapper { - /** - * @see _.fromPairs - */ - fromPairs(): LoDashImplicitObjectWrapper; - } - - //_.fromPairs DUMMY - interface LoDashExplicitArrayWrapper { - /** - * @see _.fromPairs - */ - fromPairs(): LoDashExplicitObjectWrapper; - } - - //_.head - interface LoDashStatic { - /** - * Gets the first element of array. - * - * @alias _.first - * - * @param array The array to query. - * @return Returns the first element of array. - */ - head(array: List): T; - } - - interface LoDashImplicitWrapper { - /** - * @see _.head - */ - head(): string; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.head - */ - head(): T; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.head - */ - head(): T; - } - - interface LoDashExplicitWrapper { - /** - * @see _.head - */ - head(): LoDashExplicitWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.head - */ - head(): T; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.head - */ - head(): T; - } - - //_.indexOf - interface LoDashStatic { - /** - * Gets the index at which the first occurrence of `value` is found in `array` - * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) - * for equality comparisons. If `fromIndex` is negative, it's used as the offset - * from the end of `array`. If `array` is sorted providing `true` for `fromIndex` - * performs a faster binary search. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to search. - * @param {*} value The value to search for. - * @param {number} [fromIndex=0] The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - * @example - * - * _.indexOf([1, 2, 1, 2], 2); - * // => 1 - * - * // using `fromIndex` - * _.indexOf([1, 2, 1, 2], 2, 2); - * // => 3 - */ - indexOf( - array: List, - value: T, - fromIndex?: boolean|number - ): number; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.indexOf - */ - indexOf( - value: T, - fromIndex?: boolean|number - ): number; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.indexOf - */ - indexOf( - value: TValue, - fromIndex?: boolean|number - ): number; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.indexOf - */ - indexOf( - value: T, - fromIndex?: boolean|number - ): LoDashExplicitWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.indexOf - */ - indexOf( - value: TValue, - fromIndex?: boolean|number - ): LoDashExplicitWrapper; - } - - //_.intersectionBy DUMMY - interface LoDashStatic { - /** - * This method is like `_.intersection` except that it accepts `iteratee` - * which is invoked for each element of each `arrays` to generate the criterion - * by which uniqueness is computed. The iteratee is invoked with one argument: (value). - * - * @static - * @memberOf _ - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element. - * @returns {Array} Returns the new array of shared values. - * @example - * - * _.intersectionBy([2.1, 1.2], [4.3, 2.4], Math.floor); - * // => [2.1] - * - * // using the `_.property` iteratee shorthand - * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); - * // => [{ 'x': 1 }] - */ - intersectionBy( - array: any[]|List, - ...values: any[] - ): any[]; - } - - //_.intersectionWith DUMMY - interface LoDashStatic { - /** - * This method is like `_.intersection` except that it accepts `comparator` - * which is invoked to compare elements of `arrays`. The comparator is invoked - * with two arguments: (arrVal, othVal). - * - * @static - * @memberOf _ - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new array of shared values. - * @example - * - * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; - * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; - * - * _.intersectionWith(objects, others, _.isEqual); - * // => [{ 'x': 1, 'y': 2 }] - */ - intersectionWith( - array: any[]|List, - ...values: any[] - ): any[]; - } - - //_.join - interface LoDashStatic { - /** - * Converts all elements in `array` into a string separated by `separator`. - * - * @param array The array to convert. - * @param separator The element separator. - * @returns Returns the joined string. - */ - join( - array: List, - separator?: string - ): string; - } - - interface LoDashImplicitWrapper { - /** - * @see _.join - */ - join(separator?: string): string; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.join - */ - join(separator?: string): string; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.join - */ - join(separator?: string): string; - } - - interface LoDashExplicitWrapper { - /** - * @see _.join - */ - join(separator?: string): LoDashExplicitWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.join - */ - join(separator?: string): LoDashExplicitWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.join - */ - join(separator?: string): LoDashExplicitWrapper; - } - - //_.pullAll DUMMY - interface LoDashStatic { - /** - * This method is like `_.pull` except that it accepts an array of values to remove. - * - * **Note:** Unlike `_.difference`, this method mutates `array`. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to modify. - * @param {Array} values The values to remove. - * @returns {Array} Returns `array`. - * @example - * - * var array = [1, 2, 3, 1, 2, 3]; - * - * _.pull(array, [2, 3]); - * console.log(array); - * // => [1, 1] - */ - pullAll( - array: any[]|List, - ...values: any[] - ): any[]; - } - - //_.pullAllBy DUMMY - interface LoDashStatic { - /** - * This method is like `_.pullAll` except that it accepts `iteratee` which is - * invoked for each element of `array` and `values` to to generate the criterion - * by which uniqueness is computed. The iteratee is invoked with one argument: (value). - * - * **Note:** Unlike `_.differenceBy`, this method mutates `array`. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to modify. - * @param {Array} values The values to remove. - * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element. - * @returns {Array} Returns `array`. - * @example - * - * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }]; - * - * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x'); - * console.log(array); - * // => [{ 'x': 2 }] - */ - pullAllBy( - array: any[]|List, - ...values: any[] - ): any[]; - } - - //_.reverse DUMMY - interface LoDashStatic { - /** - * Reverses `array` so that the first element becomes the last, the second - * element becomes the second to last, and so on. - * - * **Note:** This method mutates `array` and is based on - * [`Array#reverse`](https://mdn.io/Array/reverse). - * - * @memberOf _ - * @category Array - * @returns {Array} Returns `array`. - * @example - * - * var array = [1, 2, 3]; - * - * _.reverse(array); - * // => [3, 2, 1] - * - * console.log(array); - * // => [3, 2, 1] - */ - reverse( - array: any[]|List, - ...values: any[] - ): any[]; - } - - //_.sortedIndexOf - interface LoDashStatic { - /** - * This method is like `_.indexOf` except that it performs a binary - * search on a sorted `array`. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to search. - * @param {*} value The value to search for. - * @returns {number} Returns the index of the matched value, else `-1`. - * @example - * - * _.sortedIndexOf([1, 1, 2, 2], 2); - * // => 2 - */ - sortedIndexOf( - array: List, - value: T - ): number; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.sortedIndexOf - */ - sortedIndexOf( - value: T - ): number; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.sortedIndexOf - */ - sortedIndexOf( - value: TValue - ): number; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.sortedIndexOf - */ - sortedIndexOf( - value: T - ): LoDashExplicitWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.sortedIndexOf - */ - sortedIndexOf( - value: TValue - ): LoDashExplicitWrapper; - } - - //_.initial - interface LoDashStatic { - /** - * Gets all but the last element of array. - * - * @param array The array to query. - * @return Returns the slice of array. - */ - initial(array: List): T[]; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.initial - */ - initial(): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.initial - */ - initial(): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.initial - */ - initial(): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.initial - */ - initial(): LoDashExplicitArrayWrapper; - } - - //_.intersection - interface LoDashStatic { - /** - * Creates an array of unique values that are included in all of the provided arrays using SameValueZero for - * equality comparisons. - * - * @param arrays The arrays to inspect. - * @return Returns the new array of shared values. - */ - intersection(...arrays: (T[]|List)[]): T[]; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.intersection - */ - intersection(...arrays: (TResult[]|List)[]): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.intersection - */ - intersection(...arrays: (TResult[]|List)[]): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.intersection - */ - intersection(...arrays: (TResult[]|List)[]): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.intersection - */ - intersection(...arrays: (TResult[]|List)[]): LoDashExplicitArrayWrapper; - } - - //_.last - interface LoDashStatic { - /** - * Gets the last element of array. - * - * @param array The array to query. - * @return Returns the last element of array. - */ - last(array: List): T; - } - - interface LoDashImplicitWrapper { - /** - * @see _.last - */ - last(): string; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.last - */ - last(): T; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.last - */ - last(): T; - } - - interface LoDashExplicitWrapper { - /** - * @see _.last - */ - last(): LoDashExplicitWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.last - */ - last(): T; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.last - */ - last(): T; - } - - //_.lastIndexOf - interface LoDashStatic { - /** - * This method is like _.indexOf except that it iterates over elements of array from right to left. - * - * @param array The array to search. - * @param value The value to search for. - * @param fromIndex The index to search from or true to perform a binary search on a sorted array. - * @return Returns the index of the matched value, else -1. - */ - lastIndexOf( - array: List, - value: T, - fromIndex?: boolean|number - ): number; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.lastIndexOf - */ - lastIndexOf( - value: T, - fromIndex?: boolean|number - ): number; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.lastIndexOf - */ - lastIndexOf( - value: TResult, - fromIndex?: boolean|number - ): number; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.lastIndexOf - */ - lastIndexOf( - value: T, - fromIndex?: boolean|number - ): LoDashExplicitWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.lastIndexOf - */ - lastIndexOf( - value: TResult, - fromIndex?: boolean|number - ): LoDashExplicitWrapper; - } - - //_.pull - interface LoDashStatic { - /** - * Removes all provided values from array using SameValueZero for equality comparisons. - * - * Note: Unlike _.without, this method mutates array. - * - * @param array The array to modify. - * @param values The values to remove. - * @return Returns array. - */ - pull( - array: T[], - ...values: T[] - ): T[]; - - /** - * @see _.pull - */ - pull( - array: List, - ...values: T[] - ): List; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.pull - */ - pull(...values: T[]): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.pull - */ - pull(...values: TValue[]): LoDashImplicitObjectWrapper>; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.pull - */ - pull(...values: T[]): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.pull - */ - pull(...values: TValue[]): LoDashExplicitObjectWrapper>; - } - - //_.pullAt - interface LoDashStatic { - /** - * Removes elements from array corresponding to the given indexes and returns an array of the removed elements. - * Indexes may be specified as an array of indexes or as individual arguments. - * - * Note: Unlike _.at, this method mutates array. - * - * @param array The array to modify. - * @param indexes The indexes of elements to remove, specified as individual indexes or arrays of indexes. - * @return Returns the new array of removed elements. - */ - pullAt( - array: List, - ...indexes: (number|number[])[] - ): T[]; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.pullAt - */ - pullAt(...indexes: (number|number[])[]): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.pullAt - */ - pullAt(...indexes: (number|number[])[]): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.pullAt - */ - pullAt(...indexes: (number|number[])[]): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.pullAt - */ - pullAt(...indexes: (number|number[])[]): LoDashExplicitArrayWrapper; - } - - //_.remove - interface LoDashStatic { - /** - * Removes all elements from array that predicate returns truthy for and returns an array of the removed - * elements. The predicate is bound to thisArg and invoked with three arguments: (value, index, array). - * - * If a property name is provided for predicate the created _.property style callback returns the property - * value of the given element. - * - * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for - * elements that have a matching property value, else false. - * - * If an object is provided for predicate the created _.matches style callback returns true for elements that - * have the properties of the given object, else false. - * - * Note: Unlike _.filter, this method mutates array. - * - * @param array The array to modify. - * @param predicate The function invoked per iteration. - * @param thisArg The this binding of predicate. - * @return Returns the new array of removed elements. - */ - remove( - array: List, - predicate?: ListIterator - ): T[]; - - /** - * @see _.remove - */ - remove( - array: List, - predicate?: string - ): T[]; - - /** - * @see _.remove - */ - remove( - array: List, - predicate?: W - ): T[]; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.remove - */ - remove( - predicate?: ListIterator - ): LoDashImplicitArrayWrapper; - - /** - * @see _.remove - */ - remove( - predicate?: string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.remove - */ - remove( - predicate?: W - ): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.remove - */ - remove( - predicate?: ListIterator - ): LoDashImplicitArrayWrapper; - - /** - * @see _.remove - */ - remove( - predicate?: string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.remove - */ - remove( - predicate?: W - ): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.remove - */ - remove( - predicate?: ListIterator - ): LoDashExplicitArrayWrapper; - - /** - * @see _.remove - */ - remove( - predicate?: string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.remove - */ - remove( - predicate?: W - ): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.remove - */ - remove( - predicate?: ListIterator - ): LoDashExplicitArrayWrapper; - - /** - * @see _.remove - */ - remove( - predicate?: string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.remove - */ - remove( - predicate?: W - ): LoDashExplicitArrayWrapper; - } - - //_.tail - interface LoDashStatic { - /** - * Gets all but the first element of array. - * - * @alias _.tail - * - * @param array The array to query. - * @return Returns the slice of array. - */ - tail(array: List): T[]; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.tail - */ - tail(): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.tail - */ - tail(): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.tail - */ - tail(): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.tail - */ - tail(): LoDashExplicitArrayWrapper; - } - - //_.slice - interface LoDashStatic { - /** - * Creates a slice of array from start up to, but not including, end. - * - * @param array The array to slice. - * @param start The start position. - * @param end The end position. - * @return Returns the slice of array. - */ - slice( - array: T[], - start?: number, - end?: number - ): T[]; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.slice - */ - slice( - start?: number, - end?: number - ): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.slice - */ - slice( - start?: number, - end?: number - ): LoDashExplicitArrayWrapper; - } - - //_.sortedIndex - interface LoDashStatic { - /** - * Uses a binary search to determine the lowest index at which `value` should - * be inserted into `array` in order to maintain its sort order. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The sorted array to inspect. - * @param {*} value The value to evaluate. - * @returns {number} Returns the index at which `value` should be inserted into `array`. - * @example - * - * _.sortedIndex([30, 50], 40); - * // => 1 - * - * _.sortedIndex([4, 5], 4); - * // => 0 - */ - sortedIndex( - array: List, - value: T - ): number; - - /** - * @see _.sortedIndex - */ - sortedIndex( - array: List, - value: T - ): number; - - /** - * @see _.sortedIndex - */ - sortedIndex( - array: List, - value: T - ): number; - - /** - * @see _.sortedIndex - */ - sortedIndex( - array: List, - value: T - ): number; - - /** - * @see _.sortedIndex - */ - sortedIndex( - array: List, - value: T - ): number; - } - - interface LoDashImplicitWrapper { - /** - * @see _.sortedIndex - */ - sortedIndex( - value: string - ): number; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.sortedIndex - */ - sortedIndex( - value: T - ): number; - - /** - * @see _.sortedIndex - */ - sortedIndex( - value: T - ): number; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.sortedIndex - */ - sortedIndex( - value: T - ): number; - - /** - * @see _.sortedIndex - */ - sortedIndex( - value: T - ): number; - - /** - * @see _.sortedIndex - */ - sortedIndex( - value: T - ): number; - } - - interface LoDashExplicitWrapper { - /** - * @see _.sortedIndex - */ - sortedIndex( - value: string - ): LoDashExplicitWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.sortedIndex - */ - sortedIndex( - value: T - ): LoDashExplicitWrapper; - - /** - * @see _.sortedIndex - */ - sortedIndex( - value: T - ): LoDashExplicitWrapper; - - /** - * @see _.sortedIndex - */ - sortedIndex( - value: T - ): LoDashExplicitWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.sortedIndex - */ - sortedIndex( - value: T - ): LoDashExplicitWrapper; - - /** - * @see _.sortedIndex - */ - sortedIndex( - value: T - ): LoDashExplicitWrapper; - - /** - * @see _.sortedIndex - */ - sortedIndex( - value: T - ): LoDashExplicitWrapper; - - - } - - //_.sortedIndexBy - interface LoDashStatic { - /** - * This method is like `_.sortedIndex` except that it accepts `iteratee` - * which is invoked for `value` and each element of `array` to compute their - * sort ranking. The iteratee is invoked with one argument: (value). - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The sorted array to inspect. - * @param {*} value The value to evaluate. - * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element. - * @returns {number} Returns the index at which `value` should be inserted into `array`. - * @example - * - * var dict = { 'thirty': 30, 'forty': 40, 'fifty': 50 }; - * - * _.sortedIndexBy(['thirty', 'fifty'], 'forty', _.propertyOf(dict)); - * // => 1 - * - * // using the `_.property` iteratee shorthand - * _.sortedIndexBy([{ 'x': 4 }, { 'x': 5 }], { 'x': 4 }, 'x'); - * // => 0 - */ - sortedIndexBy( - array: List, - value: T, - iteratee: (x: T) => TSort - ): number; - - /** - * @see _.sortedIndexBy - */ - sortedIndexBy( - array: List, - value: T, - iteratee: (x: T) => any - ): number; - - /** - * @see _.sortedIndexBy - */ - sortedIndexBy( - array: List, - value: T, - iteratee: string - ): number; - - /** - * @see _.sortedIndexBy - */ - sortedIndexBy( - array: List, - value: T, - iteratee: W - ): number; - - /** - * @see _.sortedIndexBy - */ - sortedIndexBy( - array: List, - value: T, - iteratee: Object - ): number; - } - - interface LoDashImplicitWrapper { - /** - * @see _.sortedIndexBy - */ - sortedIndexBy( - value: string, - iteratee: (x: string) => TSort - ): number; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.sortedIndexBy - */ - sortedIndexBy( - value: T, - iteratee: (x: T) => TSort - ): number; - - /** - * @see _.sortedIndexBy - */ - sortedIndexBy( - value: T, - iteratee: string - ): number; - - /** - * @see _.sortedIndexBy - */ - sortedIndexBy( - value: T, - iteratee: W - ): number; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.sortedIndexBy - */ - sortedIndexBy( - value: T, - iteratee: (x: T) => TSort - ): number; - - /** - * @see _.sortedIndexBy - */ - sortedIndexBy( - value: T, - iteratee: (x: T) => any - ): number; - - /** - * @see _.sortedIndexBy - */ - sortedIndexBy( - value: T, - iteratee: string - ): number; - - /** - * @see _.sortedIndexBy - */ - sortedIndexBy( - value: T, - iteratee: W - ): number; - - /** - * @see _.sortedIndexBy - */ - sortedIndexBy( - value: T, - iteratee: Object - ): number; - } - - interface LoDashExplicitWrapper { - /** - * @see _.sortedIndexBy - */ - sortedIndexBy( - value: string, - iteratee: (x: string) => TSort - ): LoDashExplicitWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.sortedIndexBy - */ - sortedIndexBy( - value: T, - iteratee: (x: T) => TSort - ): LoDashExplicitWrapper; - - /** - * @see _.sortedIndexBy - */ - sortedIndexBy( - value: T, - iteratee: string - ): LoDashExplicitWrapper; - - /** - * @see _.sortedIndexBy - */ - sortedIndexBy( - value: T, - iteratee: W - ): LoDashExplicitWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.sortedIndexBy - */ - sortedIndexBy( - value: T, - iteratee: (x: T) => TSort - ): LoDashExplicitWrapper; - - /** - * @see _.sortedIndexBy - */ - sortedIndexBy( - value: T, - iteratee: (x: T) => any - ): LoDashExplicitWrapper; - - /** - * @see _.sortedIndexBy - */ - sortedIndexBy( - value: T, - iteratee: string - ): LoDashExplicitWrapper; - - /** - * @see _.sortedIndexBy - */ - sortedIndexBy( - value: T, - iteratee: W - ): LoDashExplicitWrapper; - - /** - * @see _.sortedIndexBy - */ - sortedIndexBy( - value: T, - iteratee: Object - ): LoDashExplicitWrapper; - } - - //_.sortedLastIndex - interface LoDashStatic { - /** - * This method is like `_.sortedIndex` except that it returns the highest - * index at which `value` should be inserted into `array` in order to - * maintain its sort order. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The sorted array to inspect. - * @param {*} value The value to evaluate. - * @returns {number} Returns the index at which `value` should be inserted into `array`. - * @example - * - * _.sortedLastIndex([4, 5], 4); - * // => 1 - */ - sortedLastIndex( - array: List, - value: T - ): number; - - /** - * @see _.sortedLastIndex - */ - sortedLastIndex( - array: List, - value: T - ): number; - - /** - * @see _.sortedLastIndex - */ - sortedLastIndex( - array: List, - value: T - ): number; - - /** - * @see _.sortedLastIndex - */ - sortedLastIndex( - array: List, - value: T - ): number; - - /** - * @see _.sortedLastIndex - */ - sortedLastIndex( - array: List, - value: T - ): number; - } - - interface LoDashImplicitWrapper { - /** - * @see _.sortedLastIndex - */ - sortedLastIndex( - value: string - ): number; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.sortedLastIndex - */ - sortedLastIndex( - value: T - ): number; - - /** - * @see _.sortedLastIndex - */ - sortedLastIndex( - value: T - ): number; - - /** - * @see _.sortedLastIndex - */ - sortedLastIndex( - value: T - ): number; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.sortedLastIndex - */ - sortedLastIndex( - value: T - ): number; - - /** - * @see _.sortedLastIndex - */ - sortedLastIndex( - value: T - ): number; - - /** - * @see _.sortedLastIndex - */ - sortedLastIndex( - value: T - ): number; - } - - interface LoDashExplicitWrapper { - /** - * @see _.sortedLastIndex - */ - sortedLastIndex( - value: string - ): LoDashExplicitWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.sortedLastIndex - */ - sortedLastIndex( - value: T - ): LoDashExplicitWrapper; - - /** - * @see _.sortedLastIndex - */ - sortedLastIndex( - value: T - ): LoDashExplicitWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.sortedLastIndex - */ - sortedLastIndex( - value: T - ): LoDashExplicitWrapper; - - /** - * @see _.sortedLastIndex - */ - sortedLastIndex( - value: T - ): LoDashExplicitWrapper; - - /** - * @see _.sortedLastIndex - */ - sortedLastIndex( - value: T - ): LoDashExplicitWrapper; - } - - //_.sortedLastIndexBy - interface LoDashStatic { - /** - * This method is like `_.sortedLastIndex` except that it accepts `iteratee` - * which is invoked for `value` and each element of `array` to compute their - * sort ranking. The iteratee is invoked with one argument: (value). - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The sorted array to inspect. - * @param {*} value The value to evaluate. - * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element. - * @returns {number} Returns the index at which `value` should be inserted into `array`. - * @example - * - * // using the `_.property` iteratee shorthand - * _.sortedLastIndexBy([{ 'x': 4 }, { 'x': 5 }], { 'x': 4 }, 'x'); - * // => 1 - */ - sortedLastIndexBy( - array: List, - value: T, - iteratee: (x: T) => TSort - ): number; - - /** - * @see _.sortedLastIndexBy - */ - sortedLastIndexBy( - array: List, - value: T, - iteratee: (x: T) => any - ): number; - - /** - * @see _.sortedLastIndexBy - */ - sortedLastIndexBy( - array: List, - value: T, - iteratee: string - ): number; - - /** - * @see _.sortedLastIndexBy - */ - sortedLastIndexBy( - array: List, - value: T, - iteratee: W - ): number; - - /** - * @see _.sortedLastIndexBy - */ - sortedLastIndexBy( - array: List, - value: T, - iteratee: Object - ): number; - } - - interface LoDashImplicitWrapper { - /** - * @see _.sortedLastIndexBy - */ - sortedLastIndexBy( - value: string, - iteratee: (x: string) => TSort - ): number; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.sortedLastIndexBy - */ - sortedLastIndexBy( - value: T, - iteratee: (x: T) => TSort - ): number; - - /** - * @see _.sortedLastIndexBy - */ - sortedLastIndexBy( - value: T, - iteratee: string - ): number; - - /** - * @see _.sortedLastIndexBy - */ - sortedLastIndexBy( - value: T, - iteratee: W - ): number; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.sortedLastIndexBy - */ - sortedLastIndexBy( - value: T, - iteratee: (x: T) => TSort - ): number; - - /** - * @see _.sortedLastIndexBy - */ - sortedLastIndexBy( - value: T, - iteratee: (x: T) => any - ): number; - - /** - * @see _.sortedLastIndexBy - */ - sortedLastIndexBy( - value: T, - iteratee: string - ): number; - - /** - * @see _.sortedLastIndexBy - */ - sortedLastIndexBy( - value: T, - iteratee: W - ): number; - - /** - * @see _.sortedLastIndexBy - */ - sortedLastIndexBy( - value: T, - iteratee: Object - ): number; - } - - interface LoDashExplicitWrapper { - /** - * @see _.sortedLastIndexBy - */ - sortedLastIndexBy( - value: string, - iteratee: (x: string) => TSort - ): LoDashExplicitWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.sortedLastIndexBy - */ - sortedLastIndexBy( - value: T, - iteratee: (x: T) => TSort - ): LoDashExplicitWrapper; - - /** - * @see _.sortedLastIndexBy - */ - sortedLastIndexBy( - value: T, - iteratee: string - ): LoDashExplicitWrapper; - - /** - * @see _.sortedLastIndexBy - */ - sortedLastIndexBy( - value: T, - iteratee: W - ): LoDashExplicitWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.sortedLastIndexBy - */ - sortedLastIndexBy( - value: T, - iteratee: (x: T) => TSort - ): LoDashExplicitWrapper; - - /** - * @see _.sortedLastIndexBy - */ - sortedLastIndexBy( - value: T, - iteratee: (x: T) => any - ): LoDashExplicitWrapper; - - /** - * @see _.sortedLastIndexBy - */ - sortedLastIndexBy( - value: T, - iteratee: string - ): LoDashExplicitWrapper; - - /** - * @see _.sortedLastIndexBy - */ - sortedLastIndexBy( - value: T, - iteratee: W - ): LoDashExplicitWrapper; - - /** - * @see _.sortedLastIndexBy - */ - sortedLastIndexBy( - value: T, - iteratee: Object - ): LoDashExplicitWrapper; - } - - //_.sortedLastIndexOf DUMMY - interface LoDashStatic { - /** - * This method is like `_.lastIndexOf` except that it performs a binary - * search on a sorted `array`. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to search. - * @param {*} value The value to search for. - * @returns {number} Returns the index of the matched value, else `-1`. - * @example - * - * _.sortedLastIndexOf([1, 1, 2, 2], 2); - * // => 3 - */ - sortedLastIndexOf( - array: any[]|List, - ...values: any[] - ): any[]; - } - - //_.tail - interface LoDashStatic { - /** - * @see _.rest - */ - tail(array: List): T[]; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.rest - */ - tail(): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.rest - */ - tail(): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.rest - */ - tail(): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.rest - */ - tail(): LoDashExplicitArrayWrapper; - } - - //_.take - interface LoDashStatic { - /** - * Creates a slice of array with n elements taken from the beginning. - * - * @param array The array to query. - * @param n The number of elements to take. - * @return Returns the slice of array. - */ - take( - array: List, - n?: number - ): T[]; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.take - */ - take(n?: number): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.take - */ - take(n?: number): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.take - */ - take(n?: number): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.take - */ - take(n?: number): LoDashExplicitArrayWrapper; - } - - //_.takeRight - interface LoDashStatic { - /** - * Creates a slice of array with n elements taken from the end. - * - * @param array The array to query. - * @param n The number of elements to take. - * @return Returns the slice of array. - */ - takeRight( - array: List, - n?: number - ): T[]; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.takeRight - */ - takeRight(n?: number): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.takeRight - */ - takeRight(n?: number): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.takeRight - */ - takeRight(n?: number): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.takeRight - */ - takeRight(n?: number): LoDashExplicitArrayWrapper; - } - - //_.takeRightWhile - interface LoDashStatic { - /** - * Creates a slice of array with elements taken from the end. Elements are taken until predicate returns - * falsey. The predicate is bound to thisArg and invoked with three arguments: (value, index, array). - * - * If a property name is provided for predicate the created _.property style callback returns the property - * value of the given element. - * - * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for - * elements that have a matching property value, else false. - * - * If an object is provided for predicate the created _.matches style callback returns true for elements that - * have the properties of the given object, else false. - * - * @param array The array to query. - * @param predicate The function invoked per iteration. - * @param thisArg The this binding of predicate. - * @return Returns the slice of array. - */ - takeRightWhile( - array: List, - predicate?: ListIterator - ): TValue[]; - - /** - * @see _.takeRightWhile - */ - takeRightWhile( - array: List, - predicate?: string - ): TValue[]; - - /** - * @see _.takeRightWhile - */ - takeRightWhile( - array: List, - predicate?: TWhere - ): TValue[]; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.takeRightWhile - */ - takeRightWhile( - predicate?: ListIterator - ): LoDashImplicitArrayWrapper; - - /** - * @see _.takeRightWhile - */ - takeRightWhile( - predicate?: string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.takeRightWhile - */ - takeRightWhile( - predicate?: TWhere - ): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.takeRightWhile - */ - takeRightWhile( - predicate?: ListIterator - ): LoDashImplicitArrayWrapper; - - /** - * @see _.takeRightWhile - */ - takeRightWhile( - predicate?: string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.takeRightWhile - */ - takeRightWhile( - predicate?: TWhere - ): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.takeRightWhile - */ - takeRightWhile( - predicate?: ListIterator - ): LoDashExplicitArrayWrapper; - - /** - * @see _.takeRightWhile - */ - takeRightWhile( - predicate?: string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.takeRightWhile - */ - takeRightWhile( - predicate?: TWhere - ): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.takeRightWhile - */ - takeRightWhile( - predicate?: ListIterator - ): LoDashExplicitArrayWrapper; - - /** - * @see _.takeRightWhile - */ - takeRightWhile( - predicate?: string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.takeRightWhile - */ - takeRightWhile( - predicate?: TWhere - ): LoDashExplicitArrayWrapper; - } - - //_.takeWhile - interface LoDashStatic { - /** - * Creates a slice of array with elements taken from the beginning. Elements are taken until predicate returns - * falsey. The predicate is bound to thisArg and invoked with three arguments: (value, index, array). - * - * If a property name is provided for predicate the created _.property style callback returns the property - * value of the given element. - * - * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for - * elements that have a matching property value, else false. - * - * If an object is provided for predicate the created _.matches style callback returns true for elements that - * have the properties of the given object, else false. - * - * @param array The array to query. - * @param predicate The function invoked per iteration. - * @param thisArg The this binding of predicate. - * @return Returns the slice of array. - */ - takeWhile( - array: List, - predicate?: ListIterator - ): TValue[]; - - /** - * @see _.takeWhile - */ - takeWhile( - array: List, - predicate?: string - ): TValue[]; - - /** - * @see _.takeWhile - */ - takeWhile( - array: List, - predicate?: TWhere - ): TValue[]; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.takeWhile - */ - takeWhile( - predicate?: ListIterator - ): LoDashImplicitArrayWrapper; - - /** - * @see _.takeWhile - */ - takeWhile( - predicate?: string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.takeWhile - */ - takeWhile( - predicate?: TWhere - ): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.takeWhile - */ - takeWhile( - predicate?: ListIterator - ): LoDashImplicitArrayWrapper; - - /** - * @see _.takeWhile - */ - takeWhile( - predicate?: string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.takeWhile - */ - takeWhile( - predicate?: TWhere - ): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.takeWhile - */ - takeWhile( - predicate?: ListIterator - ): LoDashExplicitArrayWrapper; - - /** - * @see _.takeWhile - */ - takeWhile( - predicate?: string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.takeWhile - */ - takeWhile( - predicate?: TWhere - ): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.takeWhile - */ - takeWhile( - predicate?: ListIterator - ): LoDashExplicitArrayWrapper; - - /** - * @see _.takeWhile - */ - takeWhile( - predicate?: string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.takeWhile - */ - takeWhile( - predicate?: TWhere - ): LoDashExplicitArrayWrapper; - } - - //_.union - interface LoDashStatic { - /** - * Creates an array of unique values, in order, from all of the provided arrays using SameValueZero for - * equality comparisons. - * - * @param arrays The arrays to inspect. - * @return Returns the new array of combined values. - */ - union(...arrays: List[]): T[]; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.union - */ - union(...arrays: List[]): LoDashImplicitArrayWrapper; - - /** - * @see _.union - */ - union(...arrays: List[]): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.union - */ - union(...arrays: List[]): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.union - */ - union(...arrays: List[]): LoDashExplicitArrayWrapper; - - /** - * @see _.union - */ - union(...arrays: List[]): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.union - */ - union(...arrays: List[]): LoDashExplicitArrayWrapper; - } - - //_.unionBy - interface LoDashStatic { - /** - * This method is like `_.union` except that it accepts `iteratee` which is - * invoked for each element of each `arrays` to generate the criterion by which - * uniqueness is computed. The iteratee is invoked with one argument: (value). - * - * @param arrays The arrays to inspect. - * @param iteratee The iteratee invoked per element. - * @return Returns the new array of combined values. - */ - unionBy( - arrays: T[]|List, - iteratee?: (value: T) => any - ): T[]; - - /** - * @see _.unionBy - */ - unionBy( - arrays: T[]|List, - iteratee?: W - ): T[]; - - /** - * @see _.unionBy - */ - unionBy( - arrays1: T[]|List, - arrays2: T[]|List, - iteratee?: (value: T) => any - ): T[]; - - /** - * @see _.unionBy - */ - unionBy( - arrays1: T[]|List, - arrays2: T[]|List, - iteratee?: W - ): T[]; - - /** - * @see _.unionBy - */ - unionBy( - arrays1: T[]|List, - arrays2: T[]|List, - arrays3: T[]|List, - iteratee?: (value: T) => any - ): T[]; - - /** - * @see _.unionBy - */ - unionBy( - arrays1: T[]|List, - arrays2: T[]|List, - arrays3: T[]|List, - iteratee?: W - ): T[]; - - /** - * @see _.unionBy - */ - unionBy( - arrays1: T[]|List, - arrays2: T[]|List, - arrays3: T[]|List, - arrays4: T[]|List, - iteratee?: (value: T) => any - ): T[]; - - /** - * @see _.unionBy - */ - unionBy( - arrays1: T[]|List, - arrays2: T[]|List, - arrays3: T[]|List, - arrays4: T[]|List, - iteratee?: W - ): T[]; - - /** - * @see _.unionBy - */ - unionBy( - arrays1: T[]|List, - arrays2: T[]|List, - arrays3: T[]|List, - arrays4: T[]|List, - arrays5: T[]|List, - iteratee?: (value: T) => any - ): T[]; - - /** - * @see _.unionBy - */ - unionBy( - arrays1: T[]|List, - arrays2: T[]|List, - arrays3: T[]|List, - arrays4: T[]|List, - arrays5: T[]|List, - iteratee?: W - ): T[]; - - /** - * @see _.unionBy - */ - unionBy( - arrays: T[]|List, - ...iteratee: any[] - ): T[]; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.unionBy - */ - unionBy( - iteratee?: (value: T) => any - ): LoDashImplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - iteratee?: W - ): LoDashImplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - iteratee?: (value: T) => any - ): LoDashImplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - iteratee?: W - ): LoDashImplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - arrays3: T[]|List, - iteratee?: (value: T) => any - ): LoDashImplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - arrays3: T[]|List, - iteratee?: W - ): LoDashImplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - arrays3: T[]|List, - arrays4: T[]|List, - iteratee?: (value: T) => any - ): LoDashImplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - arrays3: T[]|List, - arrays4: T[]|List, - iteratee?: W - ): LoDashImplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - arrays3: T[]|List, - arrays4: T[]|List, - arrays5: T[]|List, - iteratee?: (value: T) => any - ): LoDashImplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - arrays3: T[]|List, - arrays4: T[]|List, - arrays5: T[]|List, - iteratee?: W - ): LoDashImplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - ...iteratee: any[] - ): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.unionBy - */ - unionBy( - iteratee?: (value: T) => any - ): LoDashImplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - iteratee?: W - ): LoDashImplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - iteratee?: (value: T) => any - ): LoDashImplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - iteratee?: W - ): LoDashImplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - arrays3: T[]|List, - iteratee?: (value: T) => any - ): LoDashImplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - arrays3: T[]|List, - iteratee?: W - ): LoDashImplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - arrays3: T[]|List, - arrays4: T[]|List, - iteratee?: (value: T) => any - ): LoDashImplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - arrays3: T[]|List, - arrays4: T[]|List, - iteratee?: W - ): LoDashImplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - arrays3: T[]|List, - arrays4: T[]|List, - arrays5: T[]|List, - iteratee?: (value: T) => any - ): LoDashImplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - arrays3: T[]|List, - arrays4: T[]|List, - arrays5: T[]|List, - iteratee?: W - ): LoDashImplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - ...iteratee: any[] - ): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.unionBy - */ - unionBy( - iteratee?: (value: T) => any - ): LoDashExplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - iteratee?: W - ): LoDashExplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - iteratee?: (value: T) => any - ): LoDashExplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - iteratee?: W - ): LoDashExplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - arrays3: T[]|List, - iteratee?: (value: T) => any - ): LoDashExplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - arrays3: T[]|List, - iteratee?: W - ): LoDashExplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - arrays3: T[]|List, - arrays4: T[]|List, - iteratee?: (value: T) => any - ): LoDashExplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - arrays3: T[]|List, - arrays4: T[]|List, - iteratee?: W - ): LoDashExplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - arrays3: T[]|List, - arrays4: T[]|List, - arrays5: T[]|List, - iteratee?: (value: T) => any - ): LoDashExplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - arrays3: T[]|List, - arrays4: T[]|List, - arrays5: T[]|List, - iteratee?: W - ): LoDashExplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - ...iteratee: any[] - ): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.unionBy - */ - unionBy( - iteratee?: (value: T) => any - ): LoDashExplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - iteratee?: W - ): LoDashExplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - iteratee?: (value: T) => any - ): LoDashExplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - iteratee?: W - ): LoDashExplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - arrays3: T[]|List, - iteratee?: (value: T) => any - ): LoDashExplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - arrays3: T[]|List, - iteratee?: W - ): LoDashExplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - arrays3: T[]|List, - arrays4: T[]|List, - iteratee?: (value: T) => any - ): LoDashExplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - arrays3: T[]|List, - arrays4: T[]|List, - iteratee?: W - ): LoDashExplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - arrays3: T[]|List, - arrays4: T[]|List, - arrays5: T[]|List, - iteratee?: (value: T) => any - ): LoDashExplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - arrays2: T[]|List, - arrays3: T[]|List, - arrays4: T[]|List, - arrays5: T[]|List, - iteratee?: W - ): LoDashExplicitArrayWrapper; - - /** - * @see _.unionBy - */ - unionBy( - ...iteratee: any[] - ): LoDashExplicitArrayWrapper; - } - - //_.uniq - interface LoDashStatic { - /** - * Creates a duplicate-free version of an array, using - * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) - * for equality comparisons, in which only the first occurrence of each element - * is kept. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to inspect. - * @returns {Array} Returns the new duplicate free array. - * @example - * - * _.uniq([2, 1, 2]); - * // => [2, 1] - */ - uniq( - array: List - ): T[]; - - /** - * @see _.uniq - */ - uniq( - array: List - ): T[]; - } - - interface LoDashImplicitWrapper { - /** - * @see _.uniq - */ - uniq(): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.uniq - */ - uniq(): LoDashImplicitArrayWrapper; - - /** - * @see _.uniq - */ - uniq(): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - uniq(): LoDashImplicitArrayWrapper; - - /** - * @see _.uniq - */ - uniq(): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitWrapper { - /** - * @see _.uniq - */ - uniq(): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.uniq - */ - uniq(): LoDashExplicitArrayWrapper; - - /** - * @see _.uniq - */ - uniq(): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.uniq - */ - uniq(): LoDashExplicitArrayWrapper; - - /** - * @see _.uniq - */ - uniq(): LoDashExplicitArrayWrapper; - } - - //_.uniqBy - interface LoDashStatic { - /** - * This method is like `_.uniq` except that it accepts `iteratee` which is - * invoked for each element in `array` to generate the criterion by which - * uniqueness is computed. The iteratee is invoked with one argument: (value). - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to inspect. - * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element. - * @returns {Array} Returns the new duplicate free array. - * @example - * - * _.uniqBy([2.1, 1.2, 2.3], Math.floor); - * // => [2.1, 1.2] - * - * // using the `_.property` iteratee shorthand - * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); - * // => [{ 'x': 1 }, { 'x': 2 }] - */ - uniqBy( - array: List, - iteratee: ListIterator - ): T[]; - - /** - * @see _.uniqBy - */ - uniqBy( - array: List, - iteratee: ListIterator - ): T[]; - - /** - * @see _.uniqBy - */ - uniqBy( - array: List, - iteratee: string - ): T[]; - - /** - * @see _.uniqBy - */ - uniqBy( - array: List, - iteratee: Object - ): T[]; - - /** - * @see _.uniqBy - */ - uniqBy( - array: List, - iteratee: TWhere - ): T[]; - } - - interface LoDashImplicitWrapper { - /** - * @see _.uniqBy - */ - uniqBy( - iteratee: ListIterator - ): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.uniqBy - */ - uniqBy( - iteratee: ListIterator - ): LoDashImplicitArrayWrapper; - - /** - * @see _.uniqBy - */ - uniqBy( - iteratee: string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.uniqBy - */ - uniqBy( - iteratee: TWhere - ): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.uniqBy - */ - uniqBy( - iteratee: ListIterator - ): LoDashImplicitArrayWrapper; - - /** - * @see _.uniqBy - */ - uniqBy( - iteratee: ListIterator - ): LoDashImplicitArrayWrapper; - - /** - * @see _.uniqBy - */ - uniqBy( - iteratee: string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.uniqBy - */ - uniqBy( - iteratee: Object - ): LoDashImplicitArrayWrapper; - - /** - * @see _.uniqBy - */ - uniqBy( - iteratee: TWhere - ): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitWrapper { - /** - * @see _.uniqBy - */ - uniqBy( - iteratee: ListIterator - ): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.uniqBy - */ - uniqBy( - iteratee: ListIterator - ): LoDashExplicitArrayWrapper; - - /** - * @see _.uniqBy - */ - uniqBy( - iteratee: string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.uniqBy - */ - uniqBy( - iteratee: TWhere - ): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.uniqBy - */ - uniqBy( - iteratee: ListIterator - ): LoDashExplicitArrayWrapper; - - /** - * @see _.uniqBy - */ - uniqBy( - iteratee: ListIterator - ): LoDashExplicitArrayWrapper; - - /** - * @see _.uniqBy - */ - uniqBy( - iteratee: string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.uniqBy - */ - uniqBy( - iteratee: Object - ): LoDashExplicitArrayWrapper; - - /** - * @see _.uniqBy - */ - uniqBy( - iteratee: TWhere - ): LoDashExplicitArrayWrapper; - } - - //_.sortedUniq - interface LoDashStatic { - /** - * This method is like `_.uniq` except that it's designed and optimized - * for sorted arrays. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to inspect. - * @returns {Array} Returns the new duplicate free array. - * @example - * - * _.sortedUniq([1, 1, 2]); - * // => [1, 2] - */ - sortedUniq( - array: List - ): T[]; - - /** - * @see _.sortedUniq - */ - sortedUniq( - array: List - ): T[]; - } - - interface LoDashImplicitWrapper { - /** - * @see _.sortedUniq - */ - sortedUniq(): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.sortedUniq - */ - sortedUniq(): LoDashImplicitArrayWrapper; - - /** - * @see _.sortedUniq - */ - sortedUniq(): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - sortedUniq(): LoDashImplicitArrayWrapper; - - /** - * @see _.sortedUniq - */ - sortedUniq(): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitWrapper { - /** - * @see _.sortedUniq - */ - sortedUniq(): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.sortedUniq - */ - sortedUniq(): LoDashExplicitArrayWrapper; - - /** - * @see _.sortedUniq - */ - sortedUniq(): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.sortedUniq - */ - sortedUniq(): LoDashExplicitArrayWrapper; - - /** - * @see _.sortedUniq - */ - sortedUniq(): LoDashExplicitArrayWrapper; - } - - //_.sortedUniqBy - interface LoDashStatic { - /** - * This method is like `_.uniqBy` except that it's designed and optimized - * for sorted arrays. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to inspect. - * @param {Function} [iteratee] The iteratee invoked per element. - * @returns {Array} Returns the new duplicate free array. - * @example - * - * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor); - * // => [1.1, 2.2] - */ - sortedUniqBy( - array: List, - iteratee: ListIterator - ): T[]; - - /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - array: List, - iteratee: ListIterator - ): T[]; - - /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - array: List, - iteratee: string - ): T[]; - - /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - array: List, - iteratee: Object - ): T[]; - - /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - array: List, - iteratee: TWhere - ): T[]; - } - - interface LoDashImplicitWrapper { - /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - iteratee: ListIterator - ): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - iteratee: ListIterator - ): LoDashImplicitArrayWrapper; - - /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - iteratee: string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - iteratee: TWhere - ): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - iteratee: ListIterator - ): LoDashImplicitArrayWrapper; - - /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - iteratee: ListIterator - ): LoDashImplicitArrayWrapper; - - /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - iteratee: string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - iteratee: Object - ): LoDashImplicitArrayWrapper; - - /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - iteratee: TWhere - ): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitWrapper { - /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - iteratee: ListIterator - ): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - iteratee: ListIterator - ): LoDashExplicitArrayWrapper; - - /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - iteratee: string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - iteratee: TWhere - ): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - iteratee: ListIterator - ): LoDashExplicitArrayWrapper; - - /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - iteratee: ListIterator - ): LoDashExplicitArrayWrapper; - - /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - iteratee: string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - iteratee: Object - ): LoDashExplicitArrayWrapper; - - /** - * @see _.sortedUniqBy - */ - sortedUniqBy( - iteratee: TWhere - ): LoDashExplicitArrayWrapper; - } - - //_.unionWith DUMMY - interface LoDashStatic { - /** - * This method is like `_.union` except that it accepts `comparator` which - * is invoked to compare elements of `arrays`. The comparator is invoked - * with two arguments: (arrVal, othVal). - * - * @static - * @memberOf _ - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new array of combined values. - * @example - * - * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; - * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; - * - * _.unionWith(objects, others, _.isEqual); - * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] - */ - unionWith( - array: any[]|List, - ...values: any[] - ): any[]; - } - - //_.uniqWith DUMMY - interface LoDashStatic { - /** - * This method is like `_.uniq` except that it accepts `comparator` which - * is invoked to compare elements of `array`. The comparator is invoked with - * two arguments: (arrVal, othVal). - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to inspect. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new duplicate free array. - * @example - * - * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }]; - * - * _.uniqWith(objects, _.isEqual); - * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }] - */ - uniqWith( - array: any[]|List, - ...values: any[] - ): any[]; - } - - //_.unzip - interface LoDashStatic { - /** - * This method is like _.zip except that it accepts an array of grouped elements and creates an array - * regrouping the elements to their pre-zip configuration. - * - * @param array The array of grouped elements to process. - * @return Returns the new array of regrouped elements. - */ - unzip(array: List>): T[][]; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.unzip - */ - unzip(): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.unzip - */ - unzip(): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.unzip - */ - unzip(): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.unzip - */ - unzip(): LoDashExplicitArrayWrapper; - } - - //_.unzipWith - interface LoDashStatic { - /** - * This method is like _.unzip except that it accepts an iteratee to specify how regrouped values should be - * combined. The iteratee is bound to thisArg and invoked with four arguments: (accumulator, value, index, - * group). - * - * @param array The array of grouped elements to process. - * @param iteratee The function to combine regrouped values. - * @param thisArg The this binding of iteratee. - * @return Returns the new array of regrouped elements. - */ - unzipWith( - array: List>, - iteratee?: MemoIterator - ): TResult[]; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.unzipWith - */ - unzipWith( - iteratee?: MemoIterator - ): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.unzipWith - */ - unzipWith( - iteratee?: MemoIterator - ): LoDashImplicitArrayWrapper; - } - - //_.without - interface LoDashStatic { - /** - * Creates an array excluding all provided values using SameValueZero for equality comparisons. - * - * @param array The array to filter. - * @param values The values to exclude. - * @return Returns the new array of filtered values. - */ - without( - array: List, - ...values: T[] - ): T[]; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.without - */ - without(...values: T[]): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.without - */ - without(...values: T[]): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.without - */ - without(...values: T[]): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.without - */ - without(...values: T[]): LoDashExplicitArrayWrapper; - } - - //_.xor - interface LoDashStatic { - /** - * Creates an array of unique values that is the symmetric difference of the provided arrays. - * - * @param arrays The arrays to inspect. - * @return Returns the new array of values. - */ - xor(...arrays: List[]): T[]; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.xor - */ - xor(...arrays: List[]): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.xor - */ - xor(...arrays: List[]): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.xor - */ - xor(...arrays: List[]): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.xor - */ - xor(...arrays: List[]): LoDashExplicitArrayWrapper; - } - - //_.xorBy DUMMY - interface LoDashStatic { - /** - * This method is like `_.xor` except that it accepts `iteratee` which is - * invoked for each element of each `arrays` to generate the criterion by which - * uniqueness is computed. The iteratee is invoked with one argument: (value). - * - * @static - * @memberOf _ - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element. - * @returns {Array} Returns the new array of values. - * @example - * - * _.xorBy([2.1, 1.2], [4.3, 2.4], Math.floor); - * // => [1.2, 4.3] - * - * // using the `_.property` iteratee shorthand - * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); - * // => [{ 'x': 2 }] - */ - xorBy( - array: any[]|List, - ...values: any[] - ): any[]; - } - - //_.xorWith DUMMY - interface LoDashStatic { - /** - * This method is like `_.xor` except that it accepts `comparator` which is - * invoked to compare elements of `arrays`. The comparator is invoked with - * two arguments: (arrVal, othVal). - * - * @static - * @memberOf _ - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new array of values. - * @example - * - * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; - * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; - * - * _.xorWith(objects, others, _.isEqual); - * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] - */ - xorWith( - array: any[]|List, - ...values: any[] - ): any[]; - } - - //_.zip - interface LoDashStatic { - /** - * Creates an array of grouped elements, the first of which contains the first elements of the given arrays, - * the second of which contains the second elements of the given arrays, and so on. - * - * @param arrays The arrays to process. - * @return Returns the new array of grouped elements. - */ - zip(...arrays: List[]): T[][]; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.zip - */ - zip(...arrays: List[]): _.LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.zip - */ - zip(...arrays: List[]): _.LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.zip - */ - zip(...arrays: List[]): _.LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.zip - */ - zip(...arrays: List[]): _.LoDashExplicitArrayWrapper; - } - - //_.zipObject - interface LoDashStatic { - /** - * The inverse of _.pairs; this method returns an object composed from arrays of property names and values. - * Provide either a single two dimensional array, e.g. [[key1, value1], [key2, value2]] or two arrays, one of - * property names and one of corresponding values. - * - * @param props The property names. - * @param values The property values. - * @return Returns the new object. - */ - zipObject( - props: List|List>, - values?: List - ): TResult; - - /** - * @see _.zipObject - */ - zipObject( - props: List|List>, - values?: List - ): TResult; - - /** - * @see _.zipObject - */ - zipObject( - props: List|List>, - values?: List - ): _.Dictionary; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.zipObject - */ - zipObject( - values?: List - ): _.LoDashImplicitObjectWrapper; - - /** - * @see _.zipObject - */ - zipObject( - values?: List - ): _.LoDashImplicitObjectWrapper; - - /** - * @see _.zipObject - */ - zipObject( - values?: List - ): _.LoDashImplicitObjectWrapper<_.Dictionary>; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.zipObject - */ - zipObject( - values?: List - ): _.LoDashImplicitObjectWrapper; - - /** - * @see _.zipObject - */ - zipObject( - values?: List - ): _.LoDashImplicitObjectWrapper; - - /** - * @see _.zipObject - */ - zipObject( - values?: List - ): _.LoDashImplicitObjectWrapper<_.Dictionary>; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.zipObject - */ - zipObject( - values?: List - ): _.LoDashExplicitObjectWrapper; - - /** - * @see _.zipObject - */ - zipObject( - values?: List - ): _.LoDashExplicitObjectWrapper; - - /** - * @see _.zipObject - */ - zipObject( - values?: List - ): _.LoDashExplicitObjectWrapper<_.Dictionary>; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.zipObject - */ - zipObject( - values?: List - ): _.LoDashExplicitObjectWrapper; - - /** - * @see _.zipObject - */ - zipObject( - values?: List - ): _.LoDashExplicitObjectWrapper; - - /** - * @see _.zipObject - */ - zipObject( - values?: List - ): _.LoDashExplicitObjectWrapper<_.Dictionary>; - } - - //_.zipWith - interface LoDashStatic { - /** - * This method is like _.zip except that it accepts an iteratee to specify how grouped values should be - * combined. The iteratee is bound to thisArg and invoked with four arguments: (accumulator, value, index, - * group). - * @param {...Array} [arrays] The arrays to process. - * @param {Function} [iteratee] The function to combine grouped values. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @return Returns the new array of grouped elements. - */ - zipWith(...args: any[]): TResult[]; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.zipWith - */ - zipWith(...args: any[]): LoDashImplicitArrayWrapper; - } - - /********* - * Chain * - *********/ - - //_.chain - interface LoDashStatic { - /** - * Creates a lodash object that wraps value with explicit method chaining enabled. - * - * @param value The value to wrap. - * @return Returns the new lodash wrapper instance. - */ - chain(value: number): LoDashExplicitWrapper; - chain(value: string): LoDashExplicitWrapper; - chain(value: boolean): LoDashExplicitWrapper; - chain(value: T[]): LoDashExplicitArrayWrapper; - chain(value: T): LoDashExplicitObjectWrapper; - chain(value: any): LoDashExplicitWrapper; - } - - interface LoDashImplicitWrapper { - /** - * @see _.chain - */ - chain(): LoDashExplicitWrapper; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.chain - */ - chain(): LoDashExplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.chain - */ - chain(): LoDashExplicitObjectWrapper; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.chain - */ - chain(): TWrapper; - } - - //_.tap - interface LoDashStatic { - /** - * This method invokes interceptor and returns value. The interceptor is bound to thisArg and invoked with one - * argument; (value). The purpose of this method is to "tap into" a method chain in order to perform operations - * on intermediate results within the chain. - * - * @param value The value to provide to interceptor. - * @param interceptor The function to invoke. - * @parem thisArg The this binding of interceptor. - * @return Returns value. - **/ - tap( - value: T, - interceptor: (value: T) => void - ): T; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.tap - */ - tap( - interceptor: (value: T) => void - ): TWrapper; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.tap - */ - tap( - interceptor: (value: T) => void - ): TWrapper; - } - - //_.thru - interface LoDashStatic { - /** - * This method is like _.tap except that it returns the result of interceptor. - * - * @param value The value to provide to interceptor. - * @param interceptor The function to invoke. - * @param thisArg The this binding of interceptor. - * @return Returns the result of interceptor. - */ - thru( - value: T, - interceptor: (value: T) => TResult - ): TResult; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.thru - */ - thru( - interceptor: (value: T) => TResult): LoDashImplicitWrapper; - - /** - * @see _.thru - */ - thru( - interceptor: (value: T) => TResult): LoDashImplicitWrapper; - - /** - * @see _.thru - */ - thru( - interceptor: (value: T) => TResult): LoDashImplicitWrapper; - - /** - * @see _.thru - */ - thru( - interceptor: (value: T) => TResult): LoDashImplicitObjectWrapper; - - /** - * @see _.thru - */ - thru( - interceptor: (value: T) => TResult[]): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.thru - */ - thru( - interceptor: (value: T) => TResult - ): LoDashExplicitWrapper; - - /** - * @see _.thru - */ - thru( - interceptor: (value: T) => TResult - ): LoDashExplicitWrapper; - - /** - * @see _.thru - */ - thru( - interceptor: (value: T) => TResult - ): LoDashExplicitWrapper; - - /** - * @see _.thru - */ - thru( - interceptor: (value: T) => TResult - ): LoDashExplicitObjectWrapper; - - /** - * @see _.thru - */ - thru( - interceptor: (value: T) => TResult[] - ): LoDashExplicitArrayWrapper; - } - - //_.prototype.commit - interface LoDashImplicitWrapperBase { - /** - * Executes the chained sequence and returns the wrapped result. - * - * @return Returns the new lodash wrapper instance. - */ - commit(): TWrapper; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.commit - */ - commit(): TWrapper; - } - - //_.prototype.concat - interface LoDashImplicitWrapperBase { - /** - * Creates a new array joining a wrapped array with any additional arrays and/or values. - * - * @param items - * @return Returns the new concatenated array. - */ - concat(...items: Array>): LoDashImplicitArrayWrapper; - - /** - * @see _.concat - */ - concat(...items: Array>): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.concat - */ - concat(...items: Array>): LoDashExplicitArrayWrapper; - - /** - * @see _.concat - */ - concat(...items: Array>): LoDashExplicitArrayWrapper; - } - - //_.prototype.plant - interface LoDashImplicitWrapperBase { - /** - * Creates a clone of the chained sequence planting value as the wrapped value. - * @param value The value to plant as the wrapped value. - * @return Returns the new lodash wrapper instance. - */ - plant(value: number): LoDashImplicitWrapper; - - /** - * @see _.plant - */ - plant(value: string): LoDashImplicitStringWrapper; - - /** - * @see _.plant - */ - plant(value: boolean): LoDashImplicitWrapper; - - /** - * @see _.plant - */ - plant(value: number[]): LoDashImplicitNumberArrayWrapper; - - /** - * @see _.plant - */ - plant(value: T[]): LoDashImplicitArrayWrapper; - - /** - * @see _.plant - */ - plant(value: T): LoDashImplicitObjectWrapper; - - /** - * @see _.plant - */ - plant(value: any): LoDashImplicitWrapper; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.plant - */ - plant(value: number): LoDashExplicitWrapper; - - /** - * @see _.plant - */ - plant(value: string): LoDashExplicitStringWrapper; - - /** - * @see _.plant - */ - plant(value: boolean): LoDashExplicitWrapper; - - /** - * @see _.plant - */ - plant(value: number[]): LoDashExplicitNumberArrayWrapper; - - /** - * @see _.plant - */ - plant(value: T[]): LoDashExplicitArrayWrapper; - - /** - * @see _.plant - */ - plant(value: T): LoDashExplicitObjectWrapper; - - /** - * @see _.plant - */ - plant(value: any): LoDashExplicitWrapper; - } - - //_.prototype.reverse - interface LoDashImplicitArrayWrapper { - /** - * Reverses the wrapped array so the first element becomes the last, the second element becomes the second to - * last, and so on. - * - * Note: This method mutates the wrapped array. - * - * @return Returns the new reversed lodash wrapper instance. - */ - reverse(): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.reverse - */ - reverse(): LoDashExplicitArrayWrapper; - } - - //_.prototype.toJSON - interface LoDashWrapperBase { - /** - * @see _.value - */ - toJSON(): T; - } - - //_.prototype.toString - interface LoDashWrapperBase { - /** - * Produces the result of coercing the unwrapped value to a string. - * - * @return Returns the coerced string value. - */ - toString(): string; - } - - //_.prototype.value - interface LoDashWrapperBase { - /** - * Executes the chained sequence to extract the unwrapped value. - * - * @alias _.toJSON, _.valueOf - * - * @return Returns the resolved unwrapped value. - */ - value(): T; - } - - //_.valueOf - interface LoDashWrapperBase { - /** - * @see _.value - */ - valueOf(): T; - } - - /************** - * Collection * - **************/ - - //_.at - interface LoDashStatic { - /** - * Creates an array of elements corresponding to the given keys, or indexes, of collection. Keys may be - * specified as individual arguments or as arrays of keys. - * - * @param collection The collection to iterate over. - * @param props The property names or indexes of elements to pick, specified individually or in arrays. - * @return Returns the new array of picked elements. - */ - at( - collection: List|Dictionary, - ...props: (number|string|(number|string)[])[] - ): T[]; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.at - */ - at(...props: (number|string|(number|string)[])[]): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.at - */ - at(...props: (number|string|(number|string)[])[]): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.at - */ - at(...props: (number|string|(number|string)[])[]): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.at - */ - at(...props: (number|string|(number|string)[])[]): LoDashExplicitArrayWrapper; - } - - //_.countBy - interface LoDashStatic { - /** - * Creates an object composed of keys generated from the results of running each element of collection through - * iteratee. The corresponding value of each key is the number of times the key was returned by iteratee. The - * iteratee is bound to thisArg and invoked with three arguments: - * (value, index|key, collection). - * - * If a property name is provided for iteratee the created _.property style callback returns the property - * value of the given element. - * - * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for - * elements that have a matching property value, else false. - * - * If an object is provided for iteratee the created _.matches style callback returns true for elements that - * have the properties of the given object, else false. - * - * @param collection The collection to iterate over. - * @param iteratee The function invoked per iteration. - * @param thisArg The this binding of iteratee. - * @return Returns the composed aggregate object. - */ - countBy( - collection: List, - iteratee?: ListIterator - ): Dictionary; - - /** - * @see _.countBy - */ - countBy( - collection: Dictionary, - iteratee?: DictionaryIterator - ): Dictionary; - - /** - * @see _.countBy - */ - countBy( - collection: NumericDictionary, - iteratee?: NumericDictionaryIterator - ): Dictionary; - - /** - * @see _.countBy - */ - countBy( - collection: List|Dictionary|NumericDictionary, - iteratee?: string - ): Dictionary; - - /** - * @see _.countBy - */ - countBy( - collection: List|Dictionary|NumericDictionary, - iteratee?: W - ): Dictionary; - - /** - * @see _.countBy - */ - countBy( - collection: List|Dictionary|NumericDictionary, - iteratee?: Object - ): Dictionary; - } - - interface LoDashImplicitWrapper { - /** - * @see _.countBy - */ - countBy( - iteratee?: ListIterator - ): LoDashImplicitObjectWrapper>; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.countBy - */ - countBy( - iteratee?: ListIterator - ): LoDashImplicitObjectWrapper>; - - /** - * @see _.countBy - */ - countBy( - iteratee?: string - ): LoDashImplicitObjectWrapper>; - - /** - * @see _.countBy - */ - countBy( - iteratee?: W - ): LoDashImplicitObjectWrapper>; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.countBy - */ - countBy( - iteratee?: ListIterator|DictionaryIterator|NumericDictionaryIterator - ): LoDashImplicitObjectWrapper>; - - /** - * @see _.countBy - */ - countBy( - iteratee?: string - ): LoDashImplicitObjectWrapper>; - - /** - * @see _.countBy - */ - countBy( - iteratee?: W - ): LoDashImplicitObjectWrapper>; - } - - interface LoDashExplicitWrapper { - /** - * @see _.countBy - */ - countBy( - iteratee?: ListIterator - ): LoDashExplicitObjectWrapper>; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.countBy - */ - countBy( - iteratee?: ListIterator - ): LoDashExplicitObjectWrapper>; - - /** - * @see _.countBy - */ - countBy( - iteratee?: string - ): LoDashExplicitObjectWrapper>; - - /** - * @see _.countBy - */ - countBy( - iteratee?: W - ): LoDashExplicitObjectWrapper>; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.countBy - */ - countBy( - iteratee?: ListIterator|DictionaryIterator|NumericDictionaryIterator - ): LoDashExplicitObjectWrapper>; - - /** - * @see _.countBy - */ - countBy( - iteratee?: string - ): LoDashExplicitObjectWrapper>; - - /** - * @see _.countBy - */ - countBy( - iteratee?: W - ): LoDashExplicitObjectWrapper>; - } - - //_.each - interface LoDashStatic { - /** - * @see _.forEach - */ - each( - collection: T[], - iteratee?: ListIterator - ): T[]; - - /** - * @see _.forEach - */ - each( - collection: List, - iteratee?: ListIterator - ): List; - - /** - * @see _.forEach - */ - each( - collection: Dictionary, - iteratee?: DictionaryIterator - ): Dictionary; - - /** - * @see _.forEach - */ - each( - collection: T, - iteratee?: ObjectIterator - ): T; - - /** - * @see _.forEach - */ - each( - collection: T, - iteratee?: ObjectIterator - ): T; - } - - interface LoDashImplicitWrapper { - /** - * @see _.forEach - */ - each( - iteratee: ListIterator - ): LoDashImplicitWrapper; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.forEach - */ - each( - iteratee: ListIterator - ): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.forEach - */ - each( - iteratee?: ListIterator|DictionaryIterator - ): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitWrapper { - /** - * @see _.forEach - */ - each( - iteratee: ListIterator - ): LoDashExplicitWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.forEach - */ - each( - iteratee: ListIterator - ): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.forEach - */ - each( - iteratee?: ListIterator|DictionaryIterator - ): LoDashExplicitObjectWrapper; - } - - //_.eachRight - interface LoDashStatic { - /** - * @see _.forEachRight - */ - eachRight( - collection: T[], - iteratee?: ListIterator - ): T[]; - - /** - * @see _.forEachRight - */ - eachRight( - collection: List, - iteratee?: ListIterator - ): List; - - /** - * @see _.forEachRight - */ - eachRight( - collection: Dictionary, - iteratee?: DictionaryIterator - ): Dictionary; - - /** - * @see _.forEachRight - */ - eachRight( - collection: T, - iteratee?: ObjectIterator - ): T; - - /** - * @see _.forEachRight - */ - eachRight( - collection: T, - iteratee?: ObjectIterator - ): T; - } - - interface LoDashImplicitWrapper { - /** - * @see _.forEachRight - */ - eachRight( - iteratee: ListIterator - ): LoDashImplicitWrapper; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.forEachRight - */ - eachRight( - iteratee: ListIterator - ): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.forEachRight - */ - eachRight( - iteratee?: ListIterator|DictionaryIterator - ): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitWrapper { - /** - * @see _.forEachRight - */ - eachRight( - iteratee: ListIterator - ): LoDashExplicitWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.forEachRight - */ - eachRight( - iteratee: ListIterator - ): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.forEachRight - */ - eachRight( - iteratee?: ListIterator|DictionaryIterator - ): LoDashExplicitObjectWrapper; - } - - //_.every - interface LoDashStatic { - /** - * Checks if predicate returns truthy for all elements of collection. Iteration is stopped once predicate - * returns falsey. The predicate is invoked with three arguments: (value, index|key, collection). - * - * @param collection The collection to iterate over. - * @param predicate The function invoked per iteration. - * @return Returns true if all elements pass the predicate check, else false. - */ - every( - collection: List, - predicate?: ListIterator - ): boolean; - - /** - * @see _.every - */ - every( - collection: Dictionary, - predicate?: DictionaryIterator - ): boolean; - - /** - * @see _.every - */ - every( - collection: NumericDictionary, - predicate?: NumericDictionaryIterator - ): boolean; - - /** - * @see _.every - */ - every( - collection: List|Dictionary|NumericDictionary, - predicate?: string|any[] - ): boolean; - - /** - * @see _.every - */ - every( - collection: List|Dictionary|NumericDictionary, - predicate?: TObject - ): boolean; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.every - */ - every( - predicate?: ListIterator|NumericDictionaryIterator - ): boolean; - - /** - * @see _.every - */ - every( - predicate?: string|any[] - ): boolean; - - /** - * @see _.every - */ - every( - predicate?: TObject - ): boolean; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.every - */ - every( - predicate?: ListIterator|DictionaryIterator|NumericDictionaryIterator - ): boolean; - - /** - * @see _.every - */ - every( - predicate?: string|any[] - ): boolean; - - /** - * @see _.every - */ - every( - predicate?: TObject - ): boolean; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.every - */ - every( - predicate?: ListIterator|NumericDictionaryIterator - ): LoDashExplicitWrapper; - - /** - * @see _.every - */ - every( - predicate?: string|any[] - ): LoDashExplicitWrapper; - - /** - * @see _.every - */ - every( - predicate?: TObject - ): LoDashExplicitWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.every - */ - every( - predicate?: ListIterator|DictionaryIterator|NumericDictionaryIterator - ): LoDashExplicitWrapper; - - /** - * @see _.every - */ - every( - predicate?: string|any[] - ): LoDashExplicitWrapper; - - /** - * @see _.every - */ - every( - predicate?: TObject - ): LoDashExplicitWrapper; - } - - //_.filter - interface LoDashStatic { - /** - * Iterates over elements of collection, returning an array of all elements predicate returns truthy for. The - * predicate is bound to thisArg and invoked with three arguments: (value, index|key, collection). - * - * If a property name is provided for predicate the created _.property style callback returns the property - * value of the given element. - * - * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for - * elements that have a matching property value, else false. - * - * If an object is provided for predicate the created _.matches style callback returns true for elements that - * have the properties of the given object, else false. - * - * @param collection The collection to iterate over. - * @param predicate The function invoked per iteration. - * @param thisArg The this binding of predicate. - * @return Returns the new filtered array. - */ - filter( - collection: List, - predicate?: ListIterator - ): T[]; - - /** - * @see _.filter - */ - filter( - collection: Dictionary, - predicate?: DictionaryIterator - ): T[]; - - /** - * @see _.filter - */ - filter( - collection: string, - predicate?: StringIterator - ): string[]; - - /** - * @see _.filter - */ - filter( - collection: List|Dictionary, - predicate: string - ): T[]; - - /** - * @see _.filter - */ - filter( - collection: List|Dictionary, - predicate: W - ): T[]; - } - - interface LoDashImplicitWrapper { - /** - * @see _.filter - */ - filter( - predicate?: StringIterator - ): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.filter - */ - filter( - predicate: ListIterator - ): LoDashImplicitArrayWrapper; - - /** - * @see _.filter - */ - filter( - predicate: string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.filter - */ - filter(predicate: W): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.filter - */ - filter( - predicate: ListIterator|DictionaryIterator - ): LoDashImplicitArrayWrapper; - - /** - * @see _.filter - */ - filter( - predicate: string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.filter - */ - filter(predicate: W): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitWrapper { - /** - * @see _.filter - */ - filter( - predicate?: StringIterator - ): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.filter - */ - filter( - predicate: ListIterator - ): LoDashExplicitArrayWrapper; - - /** - * @see _.filter - */ - filter( - predicate: string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.filter - */ - filter(predicate: W): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.filter - */ - filter( - predicate: ListIterator|DictionaryIterator - ): LoDashExplicitArrayWrapper; - - /** - * @see _.filter - */ - filter( - predicate: string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.filter - */ - filter(predicate: W): LoDashExplicitArrayWrapper; - } - - //_.find - interface LoDashStatic { - /** - * Iterates over elements of collection, returning the first element predicate returns truthy for. - * The predicate is bound to thisArg and invoked with three arguments: (value, index|key, collection). - * - * If a property name is provided for predicate the created _.property style callback returns the property - * value of the given element. - * - * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for - * elements that have a matching property value, else false. - * - * If an object is provided for predicate the created _.matches style callback returns true for elements that - * have the properties of the given object, else false. - * - * @param collection The collection to search. - * @param predicate The function invoked per iteration. - * @param fromIndex The index to search from. - * @return Returns the matched element, else undefined. - */ - find( - collection: List, - predicate?: ListIterator, - fromIndex?: number - ): T; - - /** - * @see _.find - */ - find( - collection: Dictionary, - predicate?: DictionaryIterator, - fromIndex?: number - ): T; - - /** - * @see _.find - */ - find( - collection: List|Dictionary, - predicate?: string, - fromIndex?: number - ): T; - - /** - * @see _.find - */ - find( - collection: List|Dictionary, - predicate?: TObject, - fromIndex?: number - ): T; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.find - */ - find( - predicate?: ListIterator, - fromIndex?: number - ): T; - - /** - * @see _.find - */ - find( - predicate?: string, - fromIndex?: number - ): T; - - /** - * @see _.find - */ - find( - predicate?: TObject, - fromIndex?: number - ): T; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.find - */ - find( - predicate?: ListIterator|DictionaryIterator, - fromIndex?: number - ): TResult; - - /** - * @see _.find - */ - find( - predicate?: string, - fromIndex?: number - ): TResult; - - /** - * @see _.find - */ - find( - predicate?: TObject, - fromIndex?: number - ): TResult; - } - - //_.findLast - interface LoDashStatic { - /** - * This method is like _.find except that it iterates over elements of a collection from - * right to left. - * @param collection Searches for a value in this list. - * @param callback The function called per iteration. - * @param thisArg The this binding of callback. - * @return The found element, else undefined. - **/ - findLast( - collection: Array, - callback: ListIterator): T; - - /** - * @see _.find - **/ - findLast( - collection: List, - callback: ListIterator): T; - - /** - * @see _.find - **/ - findLast( - collection: Dictionary, - callback: DictionaryIterator): T; - - /** - * @see _.find - * @param _.pluck style callback - **/ - findLast( - collection: Array, - whereValue: W): T; - - /** - * @see _.find - * @param _.pluck style callback - **/ - findLast( - collection: List, - whereValue: W): T; - - /** - * @see _.find - * @param _.pluck style callback - **/ - findLast( - collection: Dictionary, - whereValue: W): T; - - /** - * @see _.find - * @param _.where style callback - **/ - findLast( - collection: Array, - pluckValue: string): T; - - /** - * @see _.find - * @param _.where style callback - **/ - findLast( - collection: List, - pluckValue: string): T; - - /** - * @see _.find - * @param _.where style callback - **/ - findLast( - collection: Dictionary, - pluckValue: string): T; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.findLast - */ - findLast( - callback: ListIterator): T; - /** - * @see _.findLast - * @param _.where style callback - */ - findLast( - whereValue: W): T; - - /** - * @see _.findLast - * @param _.where style callback - */ - findLast( - pluckValue: string): T; - } - - //_.flatMap - interface LoDashStatic { - /** - * Creates an array of flattened values by running each element in collection through iteratee - * and concating its result to the other mapped values. The iteratee is invoked with three arguments: - * (value, index|key, collection). - * - * @param collection The collection to iterate over. - * @param iteratee The function invoked per iteration. - * @return Returns the new flattened array. - */ - flatMap( - collection: List, - iteratee?: ListIterator - ): TResult[]; - - /** - * @see _.flatMap - */ - flatMap( - collection: List, - iteratee?: ListIterator - ): TResult[]; - - /** - * @see _.flatMap - */ - flatMap( - collection: Dictionary, - iteratee?: DictionaryIterator - ): TResult[]; - - /** - * @see _.flatMap - */ - flatMap( - collection: Dictionary, - iteratee?: DictionaryIterator - ): TResult[]; - - /** - * @see _.flatMap - */ - flatMap( - collection: NumericDictionary, - iteratee?: NumericDictionaryIterator - ): TResult[]; - - /** - * @see _.flatMap - */ - flatMap( - collection: NumericDictionary, - iteratee?: NumericDictionaryIterator - ): TResult[]; - - /** - * @see _.flatMap - */ - flatMap( - collection: TObject, - iteratee?: ObjectIterator - ): TResult[]; - - /** - * @see _.flatMap - */ - flatMap( - collection: Object, - iteratee?: ObjectIterator - ): TResult[]; - - /** - * @see _.flatMap - */ - flatMap( - collection: TObject, - iteratee: TWhere - ): boolean[]; - - /** - * @see _.flatMap - */ - flatMap( - collection: TObject, - iteratee: Object|string - ): TResult[]; - - /** - * @see _.flatMap - */ - flatMap( - collection: TObject, - iteratee: [string, any] - ): boolean[]; - - /** - * @see _.flatMap - */ - flatMap( - collection: string - ): string[]; - - /** - * @see _.flatMap - */ - flatMap( - collection: Object, - iteratee?: Object|string - ): TResult[]; - } - - interface LoDashImplicitWrapper { - /** - * @see _.flatMap - */ - flatMap( - iteratee: ListIterator - ): LoDashImplicitArrayWrapper; - - /** - * @see _.flatMap - */ - flatMap(): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.flatMap - */ - flatMap( - iteratee: ListIterator|string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.flatMap - */ - flatMap( - iteratee: TWhere - ): LoDashImplicitArrayWrapper; - - /** - * @see _.flatMap - */ - flatMap( - iteratee: [string, any] - ): LoDashImplicitArrayWrapper; - - /** - * @see _.flatMap - */ - flatMap(): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.flatMap - */ - flatMap( - iteratee: ListIterator|DictionaryIterator|NumericDictionaryIterator - ): LoDashImplicitArrayWrapper; - - /** - * @see _.flatMap - */ - flatMap( - iteratee: ObjectIterator|string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.flatMap - */ - flatMap( - iteratee: TWhere - ): LoDashImplicitArrayWrapper; - - /** - * @see _.flatMap - */ - flatMap( - iteratee: [string, any] - ): LoDashImplicitArrayWrapper; - - /** - * @see _.flatMap - */ - flatMap(): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitWrapper { - /** - * @see _.flatMap - */ - flatMap( - iteratee: ListIterator - ): LoDashExplicitArrayWrapper; - - /** - * @see _.flatMap - */ - flatMap(): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.flatMap - */ - flatMap( - iteratee: ListIterator|string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.flatMap - */ - flatMap( - iteratee: TWhere - ): LoDashExplicitArrayWrapper; - - /** - * @see _.flatMap - */ - flatMap( - iteratee: [string, any] - ): LoDashExplicitArrayWrapper; - - /** - * @see _.flatMap - */ - flatMap(): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.flatMap - */ - flatMap( - iteratee: ListIterator|DictionaryIterator|NumericDictionaryIterator - ): LoDashExplicitArrayWrapper; - - /** - * @see _.flatMap - */ - flatMap( - iteratee: ObjectIterator|string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.flatMap - */ - flatMap( - iteratee: TWhere - ): LoDashExplicitArrayWrapper; - - /** - * @see _.flatMap - */ - flatMap( - iteratee: [string, any] - ): LoDashExplicitArrayWrapper; - - /** - * @see _.flatMap - */ - flatMap(): LoDashExplicitArrayWrapper; - } - - //_.forEach - interface LoDashStatic { - /** - * Iterates over elements of collection invoking iteratee for each element. The iteratee is bound to thisArg - * and invoked with three arguments: - * (value, index|key, collection). Iteratee functions may exit iteration early by explicitly returning false. - * - * Note: As with other "Collections" methods, objects with a "length" property are iterated like arrays. To - * avoid this behavior _.forIn or _.forOwn may be used for object iteration. - * - * @alias _.each - * - * @param collection The collection to iterate over. - * @param iteratee The function invoked per iteration. - * @param thisArg The this binding of iteratee. - */ - forEach( - collection: T[], - iteratee?: ListIterator - ): T[]; - - /** - * @see _.forEach - */ - forEach( - collection: List, - iteratee?: ListIterator - ): List; - - /** - * @see _.forEach - */ - forEach( - collection: Dictionary, - iteratee?: DictionaryIterator - ): Dictionary; - - /** - * @see _.forEach - */ - forEach( - collection: T, - iteratee?: ObjectIterator - ): T; - - /** - * @see _.forEach - */ - forEach( - collection: T, - iteratee?: ObjectIterator - ): T; - } - - interface LoDashImplicitWrapper { - /** - * @see _.forEach - */ - forEach( - iteratee: ListIterator - ): LoDashImplicitWrapper; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.forEach - */ - forEach( - iteratee: ListIterator - ): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.forEach - */ - forEach( - iteratee?: ListIterator|DictionaryIterator - ): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitWrapper { - /** - * @see _.forEach - */ - forEach( - iteratee: ListIterator - ): LoDashExplicitWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.forEach - */ - forEach( - iteratee: ListIterator - ): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.forEach - */ - forEach( - iteratee?: ListIterator|DictionaryIterator - ): LoDashExplicitObjectWrapper; - } - - //_.forEachRight - interface LoDashStatic { - /** - * This method is like _.forEach except that it iterates over elements of collection from right to left. - * - * @alias _.eachRight - * - * @param collection The collection to iterate over. - * @param iteratee The function called per iteration. - * @param thisArg The this binding of callback. - */ - forEachRight( - collection: T[], - iteratee?: ListIterator - ): T[]; - - /** - * @see _.forEachRight - */ - forEachRight( - collection: List, - iteratee?: ListIterator - ): List; - - /** - * @see _.forEachRight - */ - forEachRight( - collection: Dictionary, - iteratee?: DictionaryIterator - ): Dictionary; - - /** - * @see _.forEachRight - */ - forEachRight( - collection: T, - iteratee?: ObjectIterator - ): T; - - /** - * @see _.forEachRight - */ - forEachRight( - collection: T, - iteratee?: ObjectIterator - ): T; - } - - interface LoDashImplicitWrapper { - /** - * @see _.forEachRight - */ - forEachRight( - iteratee: ListIterator - ): LoDashImplicitWrapper; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.forEachRight - */ - forEachRight( - iteratee: ListIterator - ): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.forEachRight - */ - forEachRight( - iteratee?: ListIterator|DictionaryIterator - ): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitWrapper { - /** - * @see _.forEachRight - */ - forEachRight( - iteratee: ListIterator - ): LoDashExplicitWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.forEachRight - */ - forEachRight( - iteratee: ListIterator - ): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.forEachRight - */ - forEachRight( - iteratee?: ListIterator|DictionaryIterator - ): LoDashExplicitObjectWrapper; - } - - //_.groupBy - interface LoDashStatic { - /** - * Creates an object composed of keys generated from the results of running each element of collection through - * iteratee. The corresponding value of each key is an array of the elements responsible for generating the - * key. The iteratee is bound to thisArg and invoked with three arguments: - * (value, index|key, collection). - * - * If a property name is provided for iteratee the created _.property style callback returns the property - * value of the given element. - * - * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for - * elements that have a matching property value, else false. - * - * If an object is provided for iteratee the created _.matches style callback returns true for elements that - * have the properties of the given object, else false. - * - * @param collection The collection to iterate over. - * @param iteratee The function invoked per iteration. - * @param thisArg The this binding of iteratee. - * @return Returns the composed aggregate object. - */ - groupBy( - collection: List, - iteratee?: ListIterator - ): Dictionary; - - /** - * @see _.groupBy - */ - groupBy( - collection: List, - iteratee?: ListIterator - ): Dictionary; - - /** - * @see _.groupBy - */ - groupBy( - collection: Dictionary, - iteratee?: DictionaryIterator - ): Dictionary; - - /** - * @see _.groupBy - */ - groupBy( - collection: Dictionary, - iteratee?: DictionaryIterator - ): Dictionary; - - /** - * @see _.groupBy - */ - groupBy( - collection: List|Dictionary, - iteratee?: string - ): Dictionary; - - /** - * @see _.groupBy - */ - groupBy( - collection: List|Dictionary, - iteratee?: string - ): Dictionary; - - /** - * @see _.groupBy - */ - groupBy( - collection: List|Dictionary, - iteratee?: TWhere - ): Dictionary; - - /** - * @see _.groupBy - */ - groupBy( - collection: List|Dictionary, - iteratee?: Object - ): Dictionary; - } - - interface LoDashImplicitWrapper { - /** - * @see _.groupBy - */ - groupBy( - iteratee?: ListIterator - ): LoDashImplicitObjectWrapper>; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.groupBy - */ - groupBy( - iteratee?: ListIterator - ): LoDashImplicitObjectWrapper>; - - /** - * @see _.groupBy - */ - groupBy( - iteratee?: string - ): LoDashImplicitObjectWrapper>; - - /** - * @see _.groupBy - */ - groupBy( - iteratee?: TWhere - ): LoDashImplicitObjectWrapper>; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.groupBy - */ - groupBy( - iteratee?: ListIterator|DictionaryIterator - ): LoDashImplicitObjectWrapper>; - - /** - * @see _.groupBy - */ - groupBy( - iteratee?: ListIterator|DictionaryIterator - ): LoDashImplicitObjectWrapper>; - - /** - * @see _.groupBy - */ - groupBy( - iteratee?: string - ): LoDashImplicitObjectWrapper>; - - /** - * @see _.groupBy - */ - groupBy( - iteratee?: string - ): LoDashImplicitObjectWrapper>; - - /** - * @see _.groupBy - */ - groupBy( - iteratee?: TWhere - ): LoDashImplicitObjectWrapper>; - - /** - * @see _.groupBy - */ - groupBy( - iteratee?: Object - ): LoDashImplicitObjectWrapper>; - } - - interface LoDashExplicitWrapper { - /** - * @see _.groupBy - */ - groupBy( - iteratee?: ListIterator - ): LoDashExplicitObjectWrapper>; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.groupBy - */ - groupBy( - iteratee?: ListIterator - ): LoDashExplicitObjectWrapper>; - - /** - * @see _.groupBy - */ - groupBy( - iteratee?: string - ): LoDashExplicitObjectWrapper>; - - /** - * @see _.groupBy - */ - groupBy( - iteratee?: TWhere - ): LoDashExplicitObjectWrapper>; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.groupBy - */ - groupBy( - iteratee?: ListIterator|DictionaryIterator - ): LoDashExplicitObjectWrapper>; - - /** - * @see _.groupBy - */ - groupBy( - iteratee?: ListIterator|DictionaryIterator - ): LoDashExplicitObjectWrapper>; - - /** - * @see _.groupBy - */ - groupBy( - iteratee?: string - ): LoDashExplicitObjectWrapper>; - - /** - * @see _.groupBy - */ - groupBy( - iteratee?: string - ): LoDashExplicitObjectWrapper>; - - /** - * @see _.groupBy - */ - groupBy( - iteratee?: TWhere - ): LoDashExplicitObjectWrapper>; - - /** - * @see _.groupBy - */ - groupBy( - iteratee?: Object - ): LoDashExplicitObjectWrapper>; - } - - //_.includes - interface LoDashStatic { - /** - * Checks if target is in collection using SameValueZero for equality comparisons. If fromIndex is negative, - * it’s used as the offset from the end of collection. - * - * @param collection The collection to search. - * @param target The value to search for. - * @param fromIndex The index to search from. - * @return True if the target element is found, else false. - */ - includes( - collection: List|Dictionary, - target: T, - fromIndex?: number - ): boolean; - - /** - * @see _.includes - */ - includes( - collection: string, - target: string, - fromIndex?: number - ): boolean; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.includes - */ - includes( - target: T, - fromIndex?: number - ): boolean; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.includes - */ - includes( - target: TValue, - fromIndex?: number - ): boolean; - } - - interface LoDashImplicitWrapper { - /** - * @see _.includes - */ - includes( - target: string, - fromIndex?: number - ): boolean; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.includes - */ - includes( - target: T, - fromIndex?: number - ): LoDashExplicitWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.includes - */ - includes( - target: TValue, - fromIndex?: number - ): LoDashExplicitWrapper; - } - - interface LoDashExplicitWrapper { - /** - * @see _.includes - */ - includes( - target: string, - fromIndex?: number - ): LoDashExplicitWrapper; - } - - //_.keyBy - interface LoDashStatic { - /** - * Creates an object composed of keys generated from the results of running each element of collection through - * iteratee. The corresponding value of each key is the last element responsible for generating the key. The - * iteratee function is bound to thisArg and invoked with three arguments: - * (value, index|key, collection). - * - * If a property name is provided for iteratee the created _.property style callback returns the property - * value of the given element. - * - * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for - * elements that have a matching property value, else false. - * - * If an object is provided for iteratee the created _.matches style callback returns true for elements that - * have the properties of the given object, else false. - * - * @param collection The collection to iterate over. - * @param iteratee The function invoked per iteration. - * @param thisArg The this binding of iteratee. - * @return Returns the composed aggregate object. - */ - keyBy( - collection: List, - iteratee?: ListIterator - ): Dictionary; - - /** - * @see _.keyBy - */ - keyBy( - collection: NumericDictionary, - iteratee?: NumericDictionaryIterator - ): Dictionary; - - /** - * @see _.keyBy - */ - keyBy( - collection: Dictionary, - iteratee?: DictionaryIterator - ): Dictionary; - - /** - * @see _.keyBy - */ - keyBy( - collection: List|NumericDictionary|Dictionary, - iteratee?: string - ): Dictionary; - - /** - * @see _.keyBy - */ - keyBy( - collection: List|NumericDictionary|Dictionary, - iteratee?: W - ): Dictionary; - - /** - * @see _.keyBy - */ - keyBy( - collection: List|NumericDictionary|Dictionary, - iteratee?: Object - ): Dictionary; - } - - interface LoDashImplicitWrapper { - /** - * @see _.keyBy - */ - keyBy( - iteratee?: ListIterator - ): LoDashImplicitObjectWrapper>; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.keyBy - */ - keyBy( - iteratee?: ListIterator - ): LoDashImplicitObjectWrapper>; - - /** - * @see _.keyBy - */ - keyBy( - iteratee?: string - ): LoDashImplicitObjectWrapper>; - - /** - * @see _.keyBy - */ - keyBy( - iteratee?: W - ): LoDashImplicitObjectWrapper>; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.keyBy - */ - keyBy( - iteratee?: ListIterator|NumericDictionaryIterator|DictionaryIterator - ): LoDashImplicitObjectWrapper>; - - /** - * @see _.keyBy - */ - keyBy( - iteratee?: string - ): LoDashImplicitObjectWrapper>; - - /** - * @see _.keyBy - */ - keyBy( - iteratee?: W - ): LoDashImplicitObjectWrapper>; - - /** - * @see _.keyBy - */ - keyBy( - iteratee?: Object - ): LoDashImplicitObjectWrapper>; - } - - interface LoDashExplicitWrapper { - /** - * @see _.keyBy - */ - keyBy( - iteratee?: ListIterator - ): LoDashExplicitObjectWrapper>; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.keyBy - */ - keyBy( - iteratee?: ListIterator - ): LoDashExplicitObjectWrapper>; - - /** - * @see _.keyBy - */ - keyBy( - iteratee?: string - ): LoDashExplicitObjectWrapper>; - - /** - * @see _.keyBy - */ - keyBy( - iteratee?: W - ): LoDashExplicitObjectWrapper>; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.keyBy - */ - keyBy( - iteratee?: ListIterator|NumericDictionaryIterator|DictionaryIterator - ): LoDashExplicitObjectWrapper>; - - /** - * @see _.keyBy - */ - keyBy( - iteratee?: string - ): LoDashExplicitObjectWrapper>; - - /** - * @see _.keyBy - */ - keyBy( - iteratee?: W - ): LoDashExplicitObjectWrapper>; - - /** - * @see _.keyBy - */ - keyBy( - iteratee?: Object - ): LoDashExplicitObjectWrapper>; - } - - //_.invoke - interface LoDashStatic { - /** - * Invokes the method at path of object. - * @param object The object to query. - * @param path The path of the method to invoke. - * @param args The arguments to invoke the method with. - **/ - invoke( - object: TObject, - path: StringRepresentable|StringRepresentable[], - ...args: any[]): TResult; - - /** - * @see _.invoke - **/ - invoke( - object: Dictionary|TValue[], - path: StringRepresentable|StringRepresentable[], - ...args: any[]): TResult; - - /** - * @see _.invoke - **/ - invoke( - object: any, - path: StringRepresentable|StringRepresentable[], - ...args: any[]): TResult; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.invoke - **/ - invoke( - path: StringRepresentable|StringRepresentable[], - ...args: any[]): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.invoke - **/ - invoke( - path: StringRepresentable|StringRepresentable[], - ...args: any[]): TResult; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.invoke - **/ - invoke( - path: StringRepresentable|StringRepresentable[], - ...args: any[]): TResult; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.invoke - **/ - invoke( - path: StringRepresentable|StringRepresentable[], - ...args: any[]): TResult; - } - - //_.invokeMap - interface LoDashStatic { - /** - * Invokes the method named by methodName on each element in the collection returning - * an array of the results of each invoked method. Additional arguments will be provided - * to each invoked method. If methodName is a function it will be invoked for, and this - * bound to, each element in the collection. - * @param collection The collection to iterate over. - * @param methodName The name of the method to invoke. - * @param args Arguments to invoke the method with. - **/ - invokeMap( - collection: TValue[], - methodName: string, - ...args: any[]): TResult[]; - - /** - * @see _.invokeMap - **/ - invokeMap( - collection: Dictionary, - methodName: string, - ...args: any[]): TResult[]; - - /** - * @see _.invokeMap - **/ - invokeMap( - collection: {}[], - methodName: string, - ...args: any[]): TResult[]; - - /** - * @see _.invokeMap - **/ - invokeMap( - collection: Dictionary<{}>, - methodName: string, - ...args: any[]): TResult[]; - - /** - * @see _.invokeMap - **/ - invokeMap( - collection: TValue[], - method: (...args: any[]) => TResult, - ...args: any[]): TResult[]; - - /** - * @see _.invokeMap - **/ - invokeMap( - collection: Dictionary, - method: (...args: any[]) => TResult, - ...args: any[]): TResult[]; - - /** - * @see _.invokeMap - **/ - invokeMap( - collection: {}[], - method: (...args: any[]) => TResult, - ...args: any[]): TResult[]; - - /** - * @see _.invokeMap - **/ - invokeMap( - collection: Dictionary<{}>, - method: (...args: any[]) => TResult, - ...args: any[]): TResult[]; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.invokeMap - **/ - invokeMap( - methodName: string, - ...args: any[]): LoDashImplicitArrayWrapper; - - /** - * @see _.invokeMap - **/ - invokeMap( - method: (...args: any[]) => TResult, - ...args: any[]): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.invokeMap - **/ - invokeMap( - methodName: string, - ...args: any[]): LoDashImplicitArrayWrapper; - - /** - * @see _.invokeMap - **/ - invokeMap( - method: (...args: any[]) => TResult, - ...args: any[]): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.invokeMap - **/ - invokeMap( - methodName: string, - ...args: any[]): LoDashExplicitArrayWrapper; - - /** - * @see _.invokeMap - **/ - invokeMap( - method: (...args: any[]) => TResult, - ...args: any[]): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.invokeMap - **/ - invokeMap( - methodName: string, - ...args: any[]): LoDashExplicitArrayWrapper; - - /** - * @see _.invokeMap - **/ - invokeMap( - method: (...args: any[]) => TResult, - ...args: any[]): LoDashExplicitArrayWrapper; - } - - //_.map - interface LoDashStatic { - /** - * Creates an array of values by running each element in collection through iteratee. The iteratee is bound to - * thisArg and invoked with three arguments: (value, index|key, collection). - * - * If a property name is provided for iteratee the created _.property style callback returns the property value - * of the given element. - * - * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for - * elements that have a matching property value, else false. - * - * If an object is provided for iteratee the created _.matches style callback returns true for elements that - * have the properties of the given object, else false. - * - * Many lodash methods are guarded to work as iteratees for methods like _.every, _.filter, _.map, _.mapValues, - * _.reject, and _.some. - * - * The guarded methods are: - * ary, callback, chunk, clone, create, curry, curryRight, drop, dropRight, every, fill, flatten, invert, max, - * min, parseInt, slice, sortBy, take, takeRight, template, trim, trimLeft, trimRight, trunc, random, range, - * sample, some, sum, uniq, and words - * - * @param collection The collection to iterate over. - * @param iteratee The function invoked per iteration. - * @param thisArg The this binding of iteratee. - * @return Returns the new mapped array. - */ - map( - collection: List, - iteratee?: ListIterator - ): TResult[]; - - /** - * @see _.map - */ - map( - collection: Dictionary, - iteratee?: DictionaryIterator - ): TResult[]; - - map( - collection: NumericDictionary, - iteratee?: NumericDictionaryIterator - ): TResult[]; - - /** - * @see _.map - */ - map( - collection: List|Dictionary|NumericDictionary, - iteratee?: string - ): TResult[]; - - /** - * @see _.map - */ - map( - collection: List|Dictionary|NumericDictionary, - iteratee?: TObject - ): boolean[]; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.map - */ - map( - iteratee?: ListIterator - ): LoDashImplicitArrayWrapper; - - /** - * @see _.map - */ - map( - iteratee?: string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.map - */ - map( - iteratee?: TObject - ): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.map - */ - map( - iteratee?: ListIterator|DictionaryIterator - ): LoDashImplicitArrayWrapper; - - /** - * @see _.map - */ - map( - iteratee?: string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.map - */ - map( - iteratee?: TObject - ): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.map - */ - map( - iteratee?: ListIterator - ): LoDashExplicitArrayWrapper; - - /** - * @see _.map - */ - map( - iteratee?: string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.map - */ - map( - iteratee?: TObject - ): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.map - */ - map( - iteratee?: ListIterator|DictionaryIterator - ): LoDashExplicitArrayWrapper; - - /** - * @see _.map - */ - map( - iteratee?: string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.map - */ - map( - iteratee?: TObject - ): LoDashExplicitArrayWrapper; - } - - //_.partition - interface LoDashStatic { - /** - * Creates an array of elements split into two groups, the first of which contains elements predicate returns truthy for, - * while the second of which contains elements predicate returns falsey for. - * The predicate is bound to thisArg and invoked with three arguments: (value, index|key, collection). - * - * If a property name is provided for predicate the created _.property style callback - * returns the property value of the given element. - * - * If a value is also provided for thisArg the created _.matchesProperty style callback - * returns true for elements that have a matching property value, else false. - * - * If an object is provided for predicate the created _.matches style callback returns - * true for elements that have the properties of the given object, else false. - * - * @param collection The collection to iterate over. - * @param callback The function called per iteration. - * @param thisArg The this binding of predicate. - * @return Returns the array of grouped elements. - **/ - partition( - collection: List, - callback: ListIterator): T[][]; - - /** - * @see _.partition - **/ - partition( - collection: Dictionary, - callback: DictionaryIterator): T[][]; - - /** - * @see _.partition - **/ - partition( - collection: List, - whereValue: W): T[][]; - - /** - * @see _.partition - **/ - partition( - collection: Dictionary, - whereValue: W): T[][]; - - /** - * @see _.partition - **/ - partition( - collection: List, - path: string, - srcValue: any): T[][]; - - /** - * @see _.partition - **/ - partition( - collection: Dictionary, - path: string, - srcValue: any): T[][]; - - /** - * @see _.partition - **/ - partition( - collection: List, - pluckValue: string): T[][]; - - /** - * @see _.partition - **/ - partition( - collection: Dictionary, - pluckValue: string): T[][]; - } - - interface LoDashImplicitStringWrapper { - /** - * @see _.partition - */ - partition( - callback: ListIterator): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.partition - */ - partition( - callback: ListIterator): LoDashImplicitArrayWrapper; - /** - * @see _.partition - */ - partition( - whereValue: W): LoDashImplicitArrayWrapper; - /** - * @see _.partition - */ - partition( - path: string, - srcValue: any): LoDashImplicitArrayWrapper; - /** - * @see _.partition - */ - partition( - pluckValue: string): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.partition - */ - partition( - callback: ListIterator): LoDashImplicitArrayWrapper; - - /** - * @see _.partition - */ - partition( - callback: DictionaryIterator): LoDashImplicitArrayWrapper; - - /** - * @see _.partition - */ - partition( - whereValue: W): LoDashImplicitArrayWrapper; - - /** - * @see _.partition - */ - partition( - path: string, - srcValue: any): LoDashImplicitArrayWrapper; - - /** - * @see _.partition - */ - partition( - pluckValue: string): LoDashImplicitArrayWrapper; - } - - //_.reduce - interface LoDashStatic { - /** - * Reduces a collection to a value which is the accumulated result of running each - * element in the collection through the callback, where each successive callback execution - * consumes the return value of the previous execution. If accumulator is not provided the - * first element of the collection will be used as the initial accumulator value. The callback - * is bound to thisArg and invoked with four arguments; (accumulator, value, index|key, collection). - * @param collection The collection to iterate over. - * @param callback The function called per iteration. - * @param accumulator Initial value of the accumulator. - * @param thisArg The this binding of callback. - * @return Returns the accumulated value. - **/ - reduce( - collection: Array, - callback: MemoIterator, - accumulator: TResult): TResult; - - /** - * @see _.reduce - **/ - reduce( - collection: List, - callback: MemoIterator, - accumulator: TResult): TResult; - - /** - * @see _.reduce - **/ - reduce( - collection: Dictionary, - callback: MemoIterator, - accumulator: TResult): TResult; - - /** - * @see _.reduce - **/ - reduce( - collection: NumericDictionary, - callback: MemoIterator, - accumulator: TResult): TResult; - - /** - * @see _.reduce - **/ - reduce( - collection: Array, - callback: MemoIterator): TResult; - - /** - * @see _.reduce - **/ - reduce( - collection: List, - callback: MemoIterator): TResult; - - /** - * @see _.reduce - **/ - reduce( - collection: Dictionary, - callback: MemoIterator): TResult; - - /** - * @see _.reduce - **/ - reduce( - collection: NumericDictionary, - callback: MemoIterator): TResult; - - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.reduce - **/ - reduce( - callback: MemoIterator, - accumulator: TResult): TResult; - - /** - * @see _.reduce - **/ - reduce( - callback: MemoIterator): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.reduce - **/ - reduce( - callback: MemoIterator, - accumulator: TResult): TResult; - - /** - * @see _.reduce - **/ - reduce( - callback: MemoIterator): TResult; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.reduce - **/ - reduce( - callback: MemoIterator, - accumulator: TResult): LoDashExplicitObjectWrapper; - - /** - * @see _.reduce - **/ - reduce( - callback: MemoIterator): LoDashExplicitObjectWrapper; - } - - interface LoDashExplicitArrayWrapper { - /**LoDashExplicitWrapper - * @see _.reduce - */ - reduce( - callback: MemoIterator, - accumulator: TResult): LoDashExplicitWrapper; - - /** - * @see _.reduce - */ - reduce( - callback: MemoIterator): LoDashExplicitWrapper; - } - - //_.reduceRight - interface LoDashStatic { - /** - * This method is like _.reduce except that it iterates over elements of a collection from - * right to left. - * @param collection The collection to iterate over. - * @param callback The function called per iteration. - * @param accumulator Initial value of the accumulator. - * @param thisArg The this binding of callback. - * @return The accumulated value. - **/ - reduceRight( - collection: Array, - callback: MemoIterator, - accumulator: TResult): TResult; - - /** - * @see _.reduceRight - **/ - reduceRight( - collection: List, - callback: MemoIterator, - accumulator: TResult): TResult; - - /** - * @see _.reduceRight - **/ - reduceRight( - collection: Dictionary, - callback: MemoIterator, - accumulator: TResult): TResult; - - /** - * @see _.reduceRight - **/ - reduceRight( - collection: Array, - callback: MemoIterator): TResult; - - /** - * @see _.reduceRight - **/ - reduceRight( - collection: List, - callback: MemoIterator): TResult; - - /** - * @see _.reduceRight - **/ - reduceRight( - collection: Dictionary, - callback: MemoIterator): TResult; - } - - //_.reject - interface LoDashStatic { - /** - * The opposite of _.filter; this method returns the elements of collection that predicate does not return - * truthy for. - * - * @param collection The collection to iterate over. - * @param predicate The function invoked per iteration. - * @param thisArg The this binding of predicate. - * @return Returns the new filtered array. - */ - reject( - collection: List, - predicate?: ListIterator - ): T[]; - - /** - * @see _.reject - */ - reject( - collection: Dictionary, - predicate?: DictionaryIterator - ): T[]; - - /** - * @see _.reject - */ - reject( - collection: string, - predicate?: StringIterator - ): string[]; - - /** - * @see _.reject - */ - reject( - collection: List|Dictionary, - predicate: string - ): T[]; - - /** - * @see _.reject - */ - reject( - collection: List|Dictionary, - predicate: W - ): T[]; - } - - interface LoDashImplicitWrapper { - /** - * @see _.reject - */ - reject( - predicate?: StringIterator - ): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.reject - */ - reject( - predicate: ListIterator - ): LoDashImplicitArrayWrapper; - - /** - * @see _.reject - */ - reject( - predicate: string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.reject - */ - reject(predicate: W): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.reject - */ - reject( - predicate: ListIterator|DictionaryIterator - ): LoDashImplicitArrayWrapper; - - /** - * @see _.reject - */ - reject( - predicate: string - ): LoDashImplicitArrayWrapper; - - /** - * @see _.reject - */ - reject(predicate: W): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitWrapper { - /** - * @see _.reject - */ - reject( - predicate?: StringIterator - ): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.reject - */ - reject( - predicate: ListIterator - ): LoDashExplicitArrayWrapper; - - /** - * @see _.reject - */ - reject( - predicate: string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.reject - */ - reject(predicate: W): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.reject - */ - reject( - predicate: ListIterator|DictionaryIterator - ): LoDashExplicitArrayWrapper; - - /** - * @see _.reject - */ - reject( - predicate: string - ): LoDashExplicitArrayWrapper; - - /** - * @see _.reject - */ - reject(predicate: W): LoDashExplicitArrayWrapper; - } - - //_.sample - interface LoDashStatic { - /** - * Gets a random element from collection. - * - * @param collection The collection to sample. - * @return Returns the random element. - */ - sample( - collection: List|Dictionary|NumericDictionary - ): T; - - /** - * @see _.sample - */ - sample( - collection: O - ): T; - - /** - * @see _.sample - */ - sample( - collection: Object - ): T; - } - - interface LoDashImplicitWrapper { - /** - * @see _.sample - */ - sample(): string; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.sample - */ - sample(): T; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.sample - */ - sample(): T; - } - - interface LoDashExplicitWrapper { - /** - * @see _.sample - */ - sample(): LoDashExplicitWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.sample - */ - sample(): TWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.sample - */ - sample(): TWrapper; - } - - //_.sampleSize - interface LoDashStatic { - /** - * Gets n random elements at unique keys from collection up to the size of collection. - * - * @param collection The collection to sample. - * @param n The number of elements to sample. - * @return Returns the random elements. - */ - sampleSize( - collection: List|Dictionary|NumericDictionary, - n?: number - ): T[]; - - /** - * @see _.sampleSize - */ - sampleSize( - collection: O, - n?: number - ): T[]; - - /** - * @see _.sampleSize - */ - sampleSize( - collection: Object, - n?: number - ): T[]; - } - - interface LoDashImplicitWrapper { - /** - * @see _.sampleSize - */ - sampleSize( - n?: number - ): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.sampleSize - */ - sampleSize( - n?: number - ): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.sampleSize - */ - sampleSize( - n?: number - ): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitWrapper { - /** - * @see _.sampleSize - */ - sampleSize( - n?: number - ): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.sampleSize - */ - sampleSize( - n?: number - ): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.sampleSize - */ - sampleSize( - n?: number - ): LoDashExplicitArrayWrapper; - } - - //_.shuffle - interface LoDashStatic { - /** - * Creates an array of shuffled values, using a version of the Fisher-Yates shuffle. - * - * @param collection The collection to shuffle. - * @return Returns the new shuffled array. - */ - shuffle(collection: List|Dictionary): T[]; - - /** - * @see _.shuffle - */ - shuffle(collection: string): string[]; - } - - interface LoDashImplicitWrapper { - /** - * @see _.shuffle - */ - shuffle(): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.shuffle - */ - shuffle(): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.shuffle - */ - shuffle(): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitWrapper { - /** - * @see _.shuffle - */ - shuffle(): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.shuffle - */ - shuffle(): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.shuffle - */ - shuffle(): LoDashExplicitArrayWrapper; - } - - //_.size - interface LoDashStatic { - /** - * Gets the size of collection by returning its length for array-like values or the number of own enumerable - * properties for objects. - * - * @param collection The collection to inspect. - * @return Returns the size of collection. - */ - size(collection: List|Dictionary): number; - - /** - * @see _.size - */ - size(collection: string): number; - } - - interface LoDashImplicitWrapper { - /** - * @see _.size - */ - size(): number; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.size - */ - size(): number; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.size - */ - size(): number; - } - - interface LoDashExplicitWrapper { - /** - * @see _.size - */ - size(): LoDashExplicitWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.size - */ - size(): LoDashExplicitWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.size - */ - size(): LoDashExplicitWrapper; - } - - //_.some - interface LoDashStatic { - /** - * Checks if predicate returns truthy for any element of collection. Iteration is stopped once predicate - * returns truthy. The predicate is invoked with three arguments: (value, index|key, collection). - * - * @param collection The collection to iterate over. - * @param predicate The function invoked per iteration. - * @return Returns true if any element passes the predicate check, else false. - */ - some( - collection: List, - predicate?: ListIterator - ): boolean; - - /** - * @see _.some - */ - some( - collection: Dictionary, - predicate?: DictionaryIterator - ): boolean; - - /** - * @see _.some - */ - some( - collection: NumericDictionary, - predicate?: NumericDictionaryIterator - ): boolean; - - /** - * @see _.some - */ - some( - collection: Object, - predicate?: ObjectIterator - ): boolean; - - /** - * @see _.some - */ - some( - collection: List|Dictionary|NumericDictionary, - predicate?: string|[string, any] - ): boolean; - - - /** - * @see _.some - */ - some( - collection: Object, - predicate?: string|[string, any] - ): boolean; - - /** - * @see _.some - */ - some( - collection: List|Dictionary|NumericDictionary, - predicate?: TObject - ): boolean; - - /** - * @see _.some - */ - some( - collection: List|Dictionary|NumericDictionary, - predicate?: Object - ): boolean; - - /** - * @see _.some - */ - some( - collection: Object, - predicate?: TObject - ): boolean; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.some - */ - some( - predicate?: ListIterator|NumericDictionaryIterator - ): boolean; - - /** - * @see _.some - */ - some( - predicate?: string|[string, any] - ): boolean; - - /** - * @see _.some - */ - some( - predicate?: TObject - ): boolean; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.some - */ - some( - predicate?: ListIterator|DictionaryIterator|NumericDictionaryIterator|ObjectIterator - ): boolean; - - /** - * @see _.some - */ - some( - predicate?: string|[string, any] - ): boolean; - - /** - * @see _.some - */ - some( - predicate?: TObject - ): boolean; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.some - */ - some( - predicate?: ListIterator|NumericDictionaryIterator - ): LoDashExplicitWrapper; - - /** - * @see _.some - */ - some( - predicate?: string|[string, any] - ): LoDashExplicitWrapper; - - /** - * @see _.some - */ - some( - predicate?: TObject - ): LoDashExplicitWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.some - */ - some( - predicate?: ListIterator|DictionaryIterator|NumericDictionaryIterator|ObjectIterator - ): LoDashExplicitWrapper; - - /** - * @see _.some - */ - some( - predicate?: string|[string, any] - ): LoDashExplicitWrapper; - - /** - * @see _.some - */ - some( - predicate?: TObject - ): LoDashExplicitWrapper; - } - - //_.sortBy - interface LoDashStatic { - /** - * Creates an array of elements, sorted in ascending order by the results of - * running each element in a collection through each iteratee. This method - * performs a stable sort, that is, it preserves the original sort order of - * equal elements. The iteratees are invoked with one argument: (value). - * - * @static - * @memberOf _ - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {...(Function|Function[]|Object|Object[]|string|string[])} [iteratees=[_.identity]] - * The iteratees to sort by, specified individually or in arrays. - * @returns {Array} Returns the new sorted array. - * @example - * - * var users = [ - * { 'user': 'fred', 'age': 48 }, - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 42 }, - * { 'user': 'barney', 'age': 34 } - * ]; - * - * _.sortBy(users, function(o) { return o.user; }); - * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]] - * - * _.sortBy(users, ['user', 'age']); - * // => objects for [['barney', 34], ['barney', 36], ['fred', 42], ['fred', 48]] - * - * _.sortBy(users, 'user', function(o) { - * return Math.floor(o.age / 10); - * }); - * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]] - */ - sortBy( - collection: List, - iteratee?: ListIterator - ): T[]; - - /** - * @see _.sortBy - */ - sortBy( - collection: Dictionary, - iteratee?: DictionaryIterator - ): T[]; - - /** - * @see _.sortBy - */ - sortBy( - collection: List|Dictionary, - iteratee: string - ): T[]; - - /** - * @see _.sortBy - */ - sortBy( - collection: List|Dictionary, - whereValue: W - ): T[]; - - /** - * @see _.sortBy - */ - sortBy( - collection: List|Dictionary - ): T[]; - - /** - * @see _.sortBy - */ - sortBy( - collection: (Array|List), - iteratees: (ListIterator|string|Object)[]): T[]; - - /** - * @see _.sortBy - */ - sortBy( - collection: (Array|List), - ...iteratees: (ListIterator|Object|string)[]): T[]; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.sortBy - */ - sortBy( - iteratee?: ListIterator - ): LoDashImplicitArrayWrapper; - - /** - * @see _.sortBy - */ - sortBy(iteratee: string): LoDashImplicitArrayWrapper; - - /** - * @see _.sortBy - */ - sortBy(whereValue: W): LoDashImplicitArrayWrapper; - - /** - * @see _.sortBy - */ - sortBy(): LoDashImplicitArrayWrapper; - - /** - * @see _.sortBy - */ - sortBy(...iteratees: (ListIterator|Object|string)[]): LoDashImplicitArrayWrapper; - - /** - * @see _.sortBy - **/ - sortBy(iteratees: (ListIterator|string|Object)[]): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.sortBy - */ - sortBy( - iteratee?: ListIterator|DictionaryIterator - ): LoDashImplicitArrayWrapper; - - /** - * @see _.sortBy - */ - sortBy(iteratee: string): LoDashImplicitArrayWrapper; - - /** - * @see _.sortBy - */ - sortBy(whereValue: W): LoDashImplicitArrayWrapper; - - /** - * @see _.sortBy - */ - sortBy(): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.sortBy - */ - sortBy( - iteratee?: ListIterator - ): LoDashExplicitArrayWrapper; - - /** - * @see _.sortBy - */ - sortBy(iteratee: string): LoDashExplicitArrayWrapper; - - /** - * @see _.sortBy - */ - sortBy(whereValue: W): LoDashExplicitArrayWrapper; - - /** - * @see _.sortBy - */ - sortBy(): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.sortBy - */ - sortBy( - iteratee?: ListIterator|DictionaryIterator - ): LoDashExplicitArrayWrapper; - - /** - * @see _.sortBy - */ - sortBy(iteratee: string): LoDashExplicitArrayWrapper; - - /** - * @see _.sortBy - */ - sortBy(whereValue: W): LoDashExplicitArrayWrapper; - - /** - * @see _.sortBy - */ - sortBy(): LoDashExplicitArrayWrapper; - } - - //_.orderBy - interface LoDashStatic { - /** - * This method is like `_.sortBy` except that it allows specifying the sort - * orders of the iteratees to sort by. If `orders` is unspecified, all values - * are sorted in ascending order. Otherwise, specify an order of "desc" for - * descending or "asc" for ascending sort order of corresponding values. - * - * @static - * @memberOf _ - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function[]|Object[]|string[]} [iteratees=[_.identity]] The iteratees to sort by. - * @param {string[]} [orders] The sort orders of `iteratees`. - * @param- {Object} [guard] Enables use as an iteratee for functions like `_.reduce`. - * @returns {Array} Returns the new sorted array. - * @example - * - * var users = [ - * { 'user': 'fred', 'age': 48 }, - * { 'user': 'barney', 'age': 34 }, - * { 'user': 'fred', 'age': 42 }, - * { 'user': 'barney', 'age': 36 } - * ]; - * - * // sort by `user` in ascending order and by `age` in descending order - * _.orderBy(users, ['user', 'age'], ['asc', 'desc']); - * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]] - */ - orderBy( - collection: List, - iteratees: ListIterator|string|W|(ListIterator|string|W)[], - orders?: boolean|string|(boolean|string)[] - ): T[]; - - /** - * @see _.orderBy - */ - orderBy( - collection: List, - iteratees: ListIterator|string|Object|(ListIterator|string|Object)[], - orders?: boolean|string|(boolean|string)[] - ): T[]; - - /** - * @see _.orderBy - */ - orderBy( - collection: NumericDictionary, - iteratees: NumericDictionaryIterator|string|W|(NumericDictionaryIterator|string|W)[], - orders?: boolean|string|(boolean|string)[] - ): T[]; - - /** - * @see _.orderBy - */ - orderBy( - collection: NumericDictionary, - iteratees: NumericDictionaryIterator|string|Object|(NumericDictionaryIterator|string|Object)[], - orders?: boolean|string|(boolean|string)[] - ): T[]; - - /** - * @see _.orderBy - */ - orderBy( - collection: Dictionary, - iteratees: DictionaryIterator|string|W|(DictionaryIterator|string|W)[], - orders?: boolean|string|(boolean|string)[] - ): T[]; - - /** - * @see _.orderBy - */ - orderBy( - collection: Dictionary, - iteratees: DictionaryIterator|string|Object|(DictionaryIterator|string|Object)[], - orders?: boolean|string|(boolean|string)[] - ): T[]; - } - - interface LoDashImplicitWrapper { - /** - * @see _.orderBy - */ - orderBy( - iteratees: ListIterator|string|(ListIterator|string)[], - orders?: boolean|string|(boolean|string)[] - ): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.orderBy - */ - orderBy( - iteratees: ListIterator|string|W|(ListIterator|string|W)[], - orders?: boolean|string|(boolean|string)[] - ): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.orderBy - */ - orderBy( - iteratees: ListIterator|string|W|(ListIterator|string|W)[], - orders?: boolean|string|(boolean|string)[] - ): LoDashImplicitArrayWrapper; - - /** - * @see _.orderBy - */ - orderBy( - iteratees: ListIterator|string|Object|(ListIterator|string|Object)[], - orders?: boolean|string|(boolean|string)[] - ): LoDashImplicitArrayWrapper; - - /** - * @see _.orderBy - */ - orderBy( - iteratees: NumericDictionaryIterator|string|W|(NumericDictionaryIterator|string|W)[], - orders?: boolean|string|(boolean|string)[] - ): LoDashImplicitArrayWrapper; - - /** - * @see _.orderBy - */ - orderBy( - iteratees: NumericDictionaryIterator|string|Object|(NumericDictionaryIterator|string|Object)[], - orders?: boolean|string|(boolean|string)[] - ): LoDashImplicitArrayWrapper; - - /** - * @see _.orderBy - */ - orderBy( - iteratees: DictionaryIterator|string|W|(DictionaryIterator|string|W)[], - orders?: boolean|string|(boolean|string)[] - ): LoDashImplicitArrayWrapper; - - /** - * @see _.orderBy - */ - orderBy( - iteratees: DictionaryIterator|string|Object|(DictionaryIterator|string|Object)[], - orders?: boolean|string|(boolean|string)[] - ): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitWrapper { - /** - * @see _.orderBy - */ - orderBy( - iteratees: ListIterator|string|(ListIterator|string)[], - orders?: boolean|string|(boolean|string)[] - ): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.orderBy - */ - orderBy( - iteratees: ListIterator|string|W|(ListIterator|string|W)[], - orders?: boolean|string|(boolean|string)[] - ): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.orderBy - */ - orderBy( - iteratees: ListIterator|string|W|(ListIterator|string|W)[], - orders?: boolean|string|(boolean|string)[] - ): LoDashExplicitArrayWrapper; - - /** - * @see _.orderBy - */ - orderBy( - iteratees: ListIterator|string|Object|(ListIterator|string|Object)[], - orders?: boolean|string|(boolean|string)[] - ): LoDashExplicitArrayWrapper; - - /** - * @see _.orderBy - */ - orderBy( - iteratees: NumericDictionaryIterator|string|W|(NumericDictionaryIterator|string|W)[], - orders?: boolean|string|(boolean|string)[] - ): LoDashExplicitArrayWrapper; - - /** - * @see _.orderBy - */ - orderBy( - iteratees: NumericDictionaryIterator|string|Object|(NumericDictionaryIterator|string|Object)[], - orders?: boolean|string|(boolean|string)[] - ): LoDashExplicitArrayWrapper; - - /** - * @see _.orderBy - */ - orderBy( - iteratees: DictionaryIterator|string|W|(DictionaryIterator|string|W)[], - orders?: boolean|string|(boolean|string)[] - ): LoDashExplicitArrayWrapper; - - /** - * @see _.orderBy - */ - orderBy( - iteratees: DictionaryIterator|string|Object|(DictionaryIterator|string|Object)[], - orders?: boolean|string|(boolean|string)[] - ): LoDashExplicitArrayWrapper; - } - - /******** - * Date * - ********/ - - //_.now - interface LoDashStatic { - /** - * Gets the number of milliseconds that have elapsed since the Unix epoch (1 January 1970 00:00:00 UTC). - * - * @return The number of milliseconds. - */ - now(): number; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.now - */ - now(): number; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.now - */ - now(): LoDashExplicitWrapper; - } - - /************* - * Functions * - *************/ - - //_.after - interface LoDashStatic { - /** - * The opposite of _.before; this method creates a function that invokes func once it’s called n or more times. - * - * @param n The number of calls before func is invoked. - * @param func The function to restrict. - * @return Returns the new restricted function. - */ - after( - n: number, - func: TFunc - ): TFunc; - } - - interface LoDashImplicitWrapper { - /** - * @see _.after - **/ - after(func: TFunc): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitWrapper { - /** - * @see _.after - **/ - after(func: TFunc): LoDashExplicitObjectWrapper; - } - - //_.ary - interface LoDashStatic { - /** - * Creates a function that accepts up to n arguments ignoring any additional arguments. - * - * @param func The function to cap arguments for. - * @param n The arity cap. - * @returns Returns the new function. - */ - ary( - func: Function, - n?: number - ): TResult; - - ary( - func: T, - n?: number - ): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.ary - */ - ary(n?: number): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.ary - */ - ary(n?: number): LoDashExplicitObjectWrapper; - } - - //_.before - interface LoDashStatic { - /** - * Creates a function that invokes func, with the this binding and arguments of the created function, while - * it’s called less than n times. Subsequent calls to the created function return the result of the last func - * invocation. - * - * @param n The number of calls at which func is no longer invoked. - * @param func The function to restrict. - * @return Returns the new restricted function. - */ - before( - n: number, - func: TFunc - ): TFunc; - } - - interface LoDashImplicitWrapper { - /** - * @see _.before - **/ - before(func: TFunc): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitWrapper { - /** - * @see _.before - **/ - before(func: TFunc): LoDashExplicitObjectWrapper; - } - - //_.bind - interface FunctionBind { - placeholder: any; - - ( - func: T, - thisArg: any, - ...partials: any[] - ): TResult; - - ( - func: Function, - thisArg: any, - ...partials: any[] - ): TResult; - } - - interface LoDashStatic { - /** - * Creates a function that invokes func with the this binding of thisArg and prepends any additional _.bind - * arguments to those provided to the bound function. - * - * The _.bind.placeholder value, which defaults to _ in monolithic builds, may be used as a placeholder for - * partially applied arguments. - * - * Note: Unlike native Function#bind this method does not set the "length" property of bound functions. - * - * @param func The function to bind. - * @param thisArg The this binding of func. - * @param partials The arguments to be partially applied. - * @return Returns the new bound function. - */ - bind: FunctionBind; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.bind - */ - bind( - thisArg: any, - ...partials: any[] - ): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.bind - */ - bind( - thisArg: any, - ...partials: any[] - ): LoDashExplicitObjectWrapper; - } - - //_.bindAll - interface LoDashStatic { - /** - * Binds methods of an object to the object itself, overwriting the existing method. Method names may be - * specified as individual arguments or as arrays of method names. If no method names are provided all - * enumerable function properties, own and inherited, of object are bound. - * - * Note: This method does not set the "length" property of bound functions. - * - * @param object The object to bind and assign the bound methods to. - * @param methodNames The object method names to bind, specified as individual method names or arrays of - * method names. - * @return Returns object. - */ - bindAll( - object: T, - ...methodNames: (string|string[])[] - ): T; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.bindAll - */ - bindAll(...methodNames: (string|string[])[]): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.bindAll - */ - bindAll(...methodNames: (string|string[])[]): LoDashExplicitObjectWrapper; - } - - //_.bindKey - interface FunctionBindKey { - placeholder: any; - - ( - object: T, - key: any, - ...partials: any[] - ): TResult; - - ( - object: Object, - key: any, - ...partials: any[] - ): TResult; - } - - interface LoDashStatic { - /** - * Creates a function that invokes the method at object[key] and prepends any additional _.bindKey arguments - * to those provided to the bound function. - * - * This method differs from _.bind by allowing bound functions to reference methods that may be redefined - * or don’t yet exist. See Peter Michaux’s article for more details. - * - * The _.bindKey.placeholder value, which defaults to _ in monolithic builds, may be used as a placeholder - * for partially applied arguments. - * - * @param object The object the method belongs to. - * @param key The key of the method. - * @param partials The arguments to be partially applied. - * @return Returns the new bound function. - */ - bindKey: FunctionBindKey; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.bindKey - */ - bindKey( - key: any, - ...partials: any[] - ): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.bindKey - */ - bindKey( - key: any, - ...partials: any[] - ): LoDashExplicitObjectWrapper; - } - - //_.createCallback - interface LoDashStatic { - /** - * Produces a callback bound to an optional thisArg. If func is a property name the created - * callback will return the property value for a given element. If func is an object the created - * callback will return true for elements that contain the equivalent object properties, - * otherwise it will return false. - * @param func The value to convert to a callback. - * @param thisArg The this binding of the created callback. - * @param argCount The number of arguments the callback accepts. - * @return A callback function. - **/ - createCallback( - func: string, - argCount?: number): () => any; - - /** - * @see _.createCallback - **/ - createCallback( - func: Dictionary, - argCount?: number): () => boolean; - } - - interface LoDashImplicitWrapper { - /** - * @see _.createCallback - **/ - createCallback( - argCount?: number): LoDashImplicitObjectWrapper<() => any>; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.createCallback - **/ - createCallback( - argCount?: number): LoDashImplicitObjectWrapper<() => any>; - } - - //_.curry - interface LoDashStatic { - /** - * Creates a function that accepts one or more arguments of func that when called either invokes func returning - * its result, if all func arguments have been provided, or returns a function that accepts one or more of the - * remaining func arguments, and so on. The arity of func may be specified if func.length is not sufficient. - * @param func The function to curry. - * @return Returns the new curried function. - */ - curry(func: (t1: T1) => R): - CurriedFunction1; - /** - * Creates a function that accepts one or more arguments of func that when called either invokes func returning - * its result, if all func arguments have been provided, or returns a function that accepts one or more of the - * remaining func arguments, and so on. The arity of func may be specified if func.length is not sufficient. - * @param func The function to curry. - * @return Returns the new curried function. - */ - curry(func: (t1: T1, t2: T2) => R): - CurriedFunction2; - /** - * Creates a function that accepts one or more arguments of func that when called either invokes func returning - * its result, if all func arguments have been provided, or returns a function that accepts one or more of the - * remaining func arguments, and so on. The arity of func may be specified if func.length is not sufficient. - * @param func The function to curry. - * @return Returns the new curried function. - */ - curry(func: (t1: T1, t2: T2, t3: T3) => R): - CurriedFunction3; - /** - * Creates a function that accepts one or more arguments of func that when called either invokes func returning - * its result, if all func arguments have been provided, or returns a function that accepts one or more of the - * remaining func arguments, and so on. The arity of func may be specified if func.length is not sufficient. - * @param func The function to curry. - * @return Returns the new curried function. - */ - curry(func: (t1: T1, t2: T2, t3: T3, t4: T4) => R): - CurriedFunction4; - /** - * Creates a function that accepts one or more arguments of func that when called either invokes func returning - * its result, if all func arguments have been provided, or returns a function that accepts one or more of the - * remaining func arguments, and so on. The arity of func may be specified if func.length is not sufficient. - * @param func The function to curry. - * @return Returns the new curried function. - */ - curry(func: (t1: T1, t2: T2, t3: T3, t4: T4, t5: T5) => R): - CurriedFunction5; - /** - * Creates a function that accepts one or more arguments of func that when called either invokes func returning - * its result, if all func arguments have been provided, or returns a function that accepts one or more of the - * remaining func arguments, and so on. The arity of func may be specified if func.length is not sufficient. - * @param func The function to curry. - * @param arity The arity of func. - * @return Returns the new curried function. - */ - curry( - func: Function, - arity?: number): TResult; - } - - interface CurriedFunction1 { - (): CurriedFunction1; - (t1: T1): R; - } - - interface CurriedFunction2 { - (): CurriedFunction2; - (t1: T1): CurriedFunction1; - (t1: T1, t2: T2): R; - } - - interface CurriedFunction3 { - (): CurriedFunction3; - (t1: T1): CurriedFunction2; - (t1: T1, t2: T2): CurriedFunction1; - (t1: T1, t2: T2, t3: T3): R; - } - - interface CurriedFunction4 { - (): CurriedFunction4; - (t1: T1): CurriedFunction3; - (t1: T1, t2: T2): CurriedFunction2; - (t1: T1, t2: T2, t3: T3): CurriedFunction1; - (t1: T1, t2: T2, t3: T3, t4: T4): R; - } - - interface CurriedFunction5 { - (): CurriedFunction5; - (t1: T1): CurriedFunction4; - (t1: T1, t2: T2): CurriedFunction3; - (t1: T1, t2: T2, t3: T3): CurriedFunction2; - (t1: T1, t2: T2, t3: T3, t4: T4): CurriedFunction1; - (t1: T1, t2: T2, t3: T3, t4: T4, t5: T5): R; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.curry - **/ - curry(arity?: number): LoDashImplicitObjectWrapper; - } - - //_.curryRight - interface LoDashStatic { - /** - * This method is like _.curry except that arguments are applied to func in the manner of _.partialRight - * instead of _.partial. - * @param func The function to curry. - * @return Returns the new curried function. - */ - curryRight(func: (t1: T1) => R): - CurriedFunction1; - /** - * This method is like _.curry except that arguments are applied to func in the manner of _.partialRight - * instead of _.partial. - * @param func The function to curry. - * @return Returns the new curried function. - */ - curryRight(func: (t1: T1, t2: T2) => R): - CurriedFunction2; - /** - * This method is like _.curry except that arguments are applied to func in the manner of _.partialRight - * instead of _.partial. - * @param func The function to curry. - * @return Returns the new curried function. - */ - curryRight(func: (t1: T1, t2: T2, t3: T3) => R): - CurriedFunction3; - /** - * This method is like _.curry except that arguments are applied to func in the manner of _.partialRight - * instead of _.partial. - * @param func The function to curry. - * @return Returns the new curried function. - */ - curryRight(func: (t1: T1, t2: T2, t3: T3, t4: T4) => R): - CurriedFunction4; - /** - * This method is like _.curry except that arguments are applied to func in the manner of _.partialRight - * instead of _.partial. - * @param func The function to curry. - * @return Returns the new curried function. - */ - curryRight(func: (t1: T1, t2: T2, t3: T3, t4: T4, t5: T5) => R): - CurriedFunction5; - /** - * This method is like _.curry except that arguments are applied to func in the manner of _.partialRight - * instead of _.partial. - * @param func The function to curry. - * @param arity The arity of func. - * @return Returns the new curried function. - */ - curryRight( - func: Function, - arity?: number): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.curryRight - **/ - curryRight(arity?: number): LoDashImplicitObjectWrapper; - } - - //_.debounce - interface DebounceSettings { - /** - * Specify invoking on the leading edge of the timeout. - */ - leading?: boolean; - - /** - * The maximum time func is allowed to be delayed before it’s invoked. - */ - maxWait?: number; - - /** - * Specify invoking on the trailing edge of the timeout. - */ - trailing?: boolean; - } - - interface LoDashStatic { - /** - * Creates a debounced function that delays invoking func until after wait milliseconds have elapsed since - * the last time the debounced function was invoked. The debounced function comes with a cancel method to - * cancel delayed invocations and a flush method to immediately invoke them. Provide an options object to - * indicate that func should be invoked on the leading and/or trailing edge of the wait timeout. Subsequent - * calls to the debounced function return the result of the last func invocation. - * - * Note: If leading and trailing options are true, func is invoked on the trailing edge of the timeout only - * if the the debounced function is invoked more than once during the wait timeout. - * - * See David Corbacho’s article for details over the differences between _.debounce and _.throttle. - * - * @param func The function to debounce. - * @param wait The number of milliseconds to delay. - * @param options The options object. - * @param options.leading Specify invoking on the leading edge of the timeout. - * @param options.maxWait The maximum time func is allowed to be delayed before it’s invoked. - * @param options.trailing Specify invoking on the trailing edge of the timeout. - * @return Returns the new debounced function. - */ - debounce( - func: T, - wait?: number, - options?: DebounceSettings - ): T & Cancelable; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.debounce - */ - debounce( - wait?: number, - options?: DebounceSettings - ): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.debounce - */ - debounce( - wait?: number, - options?: DebounceSettings - ): LoDashExplicitObjectWrapper; - } - - //_.defer - interface LoDashStatic { - /** - * Defers invoking the func until the current call stack has cleared. Any additional arguments are provided to - * func when it’s invoked. - * - * @param func The function to defer. - * @param args The arguments to invoke the function with. - * @return Returns the timer id. - */ - defer( - func: T, - ...args: any[] - ): number; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.defer - */ - defer(...args: any[]): LoDashImplicitWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.defer - */ - defer(...args: any[]): LoDashExplicitWrapper; - } - - //_.delay - interface LoDashStatic { - /** - * Invokes func after wait milliseconds. Any additional arguments are provided to func when it’s invoked. - * - * @param func The function to delay. - * @param wait The number of milliseconds to delay invocation. - * @param args The arguments to invoke the function with. - * @return Returns the timer id. - */ - delay( - func: T, - wait: number, - ...args: any[] - ): number; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.delay - */ - delay( - wait: number, - ...args: any[] - ): LoDashImplicitWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.delay - */ - delay( - wait: number, - ...args: any[] - ): LoDashExplicitWrapper; - } - - interface LoDashStatic { - /** - * Creates a function that invokes `func` with arguments reversed. - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to flip arguments for. - * @returns {Function} Returns the new function. - * @example - * - * var flipped = _.flip(function() { - * return _.toArray(arguments); - * }); - * - * flipped('a', 'b', 'c', 'd'); - * // => ['d', 'c', 'b', 'a'] - */ - flip(func: T): T; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.flip - */ - flip(): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.flip - */ - flip(): LoDashExplicitObjectWrapper; - } - - //_.flow - interface LoDashStatic { - /** - * Creates a function that returns the result of invoking the provided functions with the this binding of the - * created function, where each successive invocation is supplied the return value of the previous. - * - * @param funcs Functions to invoke. - * @return Returns the new function. - */ - // 1-argument first function - flow(f1: (a1: A1) => R1, f2: (a: R1) => R2): (a1: A1) => R2; - flow(f1: (a1: A1) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3): (a1: A1) => R3; - flow(f1: (a1: A1) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4): (a1: A1) => R4; - flow(f1: (a1: A1) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5): (a1: A1) => R5; - flow(f1: (a1: A1) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6): (a1: A1) => R6; - flow(f1: (a1: A1) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6, f7: (a: R6) => R7): (a1: A1) => R7; - // 2-argument first function - flow(f1: (a1: A1, a2: A2) => R1, f2: (a: R1) => R2): (a1: A1, a2: A2) => R2; - flow(f1: (a1: A1, a2: A2) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3): (a1: A1, a2: A2) => R3; - flow(f1: (a1: A1, a2: A2) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4): (a1: A1, a2: A2) => R4; - flow(f1: (a1: A1, a2: A2) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5): (a1: A1, a2: A2) => R5; - flow(f1: (a1: A1, a2: A2) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6): (a1: A1, a2: A2) => R6; - flow(f1: (a1: A1, a2: A2) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6, f7: (a: R6) => R7): (a1: A1, a2: A2) => R7; - // 3-argument first function - flow(f1: (a1: A1, a2: A2, a3: A3) => R1, f2: (a: R1) => R2): (a1: A1, a2: A2, a3: A3) => R2; - flow(f1: (a1: A1, a2: A2, a3: A3) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3): (a1: A1, a2: A2, a3: A3) => R3; - flow(f1: (a1: A1, a2: A2, a3: A3) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4): (a1: A1, a2: A2, a3: A3) => R4; - flow(f1: (a1: A1, a2: A2, a3: A3) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5): (a1: A1, a2: A2, a3: A3) => R5; - flow(f1: (a1: A1, a2: A2, a3: A3) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6): (a1: A1, a2: A2, a3: A3) => R6; - flow(f1: (a1: A1, a2: A2, a3: A3) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6, f7: (a: R6) => R7): (a1: A1, a2: A2, a3: A3) => R7; - // 4-argument first function - flow(f1: (a1: A1, a2: A2, a3: A3, a4: A4) => R1, f2: (a: R1) => R2): (a1: A1, a2: A2, a3: A3, a4: A4) => R2; - flow(f1: (a1: A1, a2: A2, a3: A3, a4: A4) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3): (a1: A1, a2: A2, a3: A3, a4: A4) => R3; - flow(f1: (a1: A1, a2: A2, a3: A3, a4: A4) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4): (a1: A1, a2: A2, a3: A3, a4: A4) => R4; - flow(f1: (a1: A1, a2: A2, a3: A3, a4: A4) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5): (a1: A1, a2: A2, a3: A3, a4: A4) => R5; - flow(f1: (a1: A1, a2: A2, a3: A3, a4: A4) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6): (a1: A1, a2: A2, a3: A3, a4: A4) => R6; - flow(f1: (a1: A1, a2: A2, a3: A3, a4: A4) => R1, f2: (a: R1) => R2, f3: (a: R2) => R3, f4: (a: R3) => R4, f5: (a: R4) => R5, f6: (a: R5) => R6, f7: (a: R6) => R7): (a1: A1, a2: A2, a3: A3, a4: A4) => R7; - // generic function - flow(...funcs: Function[]): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.flow - */ - flow(...funcs: Function[]): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.flow - */ - flow(...funcs: Function[]): LoDashExplicitObjectWrapper; - } - - //_.flowRight - interface LoDashStatic { - /** - * This method is like _.flow except that it creates a function that invokes the provided functions from right - * to left. - * - * @param funcs Functions to invoke. - * @return Returns the new function. - */ - flowRight(...funcs: Function[]): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.flowRight - */ - flowRight(...funcs: Function[]): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.flowRight - */ - flowRight(...funcs: Function[]): LoDashExplicitObjectWrapper; - } - - - //_.memoize - interface MemoizedFunction extends Function { - cache: MapCache; - } - - interface LoDashStatic { - /** - * Creates a function that memoizes the result of func. If resolver is provided it determines the cache key for - * storing the result based on the arguments provided to the memoized function. By default, the first argument - * provided to the memoized function is coerced to a string and used as the cache key. The func is invoked with - * the this binding of the memoized function. - * - * @param func The function to have its output memoized. - * @param resolver The function to resolve the cache key. - * @return Returns the new memoizing function. - */ - memoize: { - (func: T, resolver?: Function): T & MemoizedFunction; - Cache: MapCacheConstructor; - } - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.memoize - */ - memoize(resolver?: Function): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.memoize - */ - memoize(resolver?: Function): LoDashExplicitObjectWrapper; - } - - //_.overArgs (was _.modArgs) - interface LoDashStatic { - /** - * Creates a function that runs each argument through a corresponding transform function. - * - * @param func The function to wrap. - * @param transforms The functions to transform arguments, specified as individual functions or arrays - * of functions. - * @return Returns the new function. - */ - overArgs( - func: T, - ...transforms: Function[] - ): TResult; - - /** - * @see _.overArgs - */ - overArgs( - func: T, - transforms: Function[] - ): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.overArgs - */ - overArgs(...transforms: Function[]): LoDashImplicitObjectWrapper; - - /** - * @see _.overArgs - */ - overArgs(transforms: Function[]): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.overArgs - */ - overArgs(...transforms: Function[]): LoDashExplicitObjectWrapper; - - /** - * @see _.overArgs - */ - overArgs(transforms: Function[]): LoDashExplicitObjectWrapper; - } - - //_.negate - interface LoDashStatic { - /** - * Creates a function that negates the result of the predicate func. The func predicate is invoked with - * the this binding and arguments of the created function. - * - * @param predicate The predicate to negate. - * @return Returns the new function. - */ - negate(predicate: T): (...args: any[]) => boolean; - - /** - * @see _.negate - */ - negate(predicate: T): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.negate - */ - negate(): LoDashImplicitObjectWrapper<(...args: any[]) => boolean>; - - /** - * @see _.negate - */ - negate(): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.negate - */ - negate(): LoDashExplicitObjectWrapper<(...args: any[]) => boolean>; - - /** - * @see _.negate - */ - negate(): LoDashExplicitObjectWrapper; - } - - //_.once - interface LoDashStatic { - /** - * Creates a function that is restricted to invoking func once. Repeat calls to the function return the value - * of the first call. The func is invoked with the this binding and arguments of the created function. - * - * @param func The function to restrict. - * @return Returns the new restricted function. - */ - once(func: T): T; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.once - */ - once(): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.once - */ - once(): LoDashExplicitObjectWrapper; - } - - //_.partial - interface LoDashStatic { - /** - * Creates a function that, when called, invokes func with any additional partial arguments - * prepended to those provided to the new function. This method is similar to _.bind except - * it does not alter the this binding. - * @param func The function to partially apply arguments to. - * @param args Arguments to be partially applied. - * @return The new partially applied function. - **/ - partial: Partial; - } - - type PH = LoDashStatic; - - interface Function0 { - (): R; - } - interface Function1 { - (t1: T1): R; - } - interface Function2 { - (t1: T1, t2: T2): R; - } - interface Function3 { - (t1: T1, t2: T2, t3: T3): R; - } - interface Function4 { - (t1: T1, t2: T2, t3: T3, t4: T4): R; - } - - interface Partial { - // arity 0 - (func: Function0): Function0; - // arity 1 - (func: Function1): Function1; - (func: Function1, arg1: T1): Function0; - // arity 2 - (func: Function2): Function2; - (func: Function2, arg1: T1): Function1< T2, R>; - (func: Function2, plc1: PH, arg2: T2): Function1; - (func: Function2, arg1: T1, arg2: T2): Function0< R>; - // arity 3 - (func: Function3): Function3; - (func: Function3, arg1: T1): Function2< T2, T3, R>; - (func: Function3, plc1: PH, arg2: T2): Function2; - (func: Function3, arg1: T1, arg2: T2): Function1< T3, R>; - (func: Function3, plc1: PH, plc2: PH, arg3: T3): Function2; - (func: Function3, arg1: T1, plc2: PH, arg3: T3): Function1< T2, R>; - (func: Function3, plc1: PH, arg2: T2, arg3: T3): Function1; - (func: Function3, arg1: T1, arg2: T2, arg3: T3): Function0< R>; - // arity 4 - (func: Function4): Function4; - (func: Function4, arg1: T1): Function3< T2, T3, T4, R>; - (func: Function4, plc1: PH, arg2: T2): Function3; - (func: Function4, arg1: T1, arg2: T2): Function2< T3, T4, R>; - (func: Function4, plc1: PH, plc2: PH, arg3: T3): Function3; - (func: Function4, arg1: T1, plc2: PH, arg3: T3): Function2< T2, T4, R>; - (func: Function4, plc1: PH, arg2: T2, arg3: T3): Function2; - (func: Function4, arg1: T1, arg2: T2, arg3: T3): Function1< T4, R>; - (func: Function4, plc1: PH, plc2: PH, plc3: PH, arg4: T4): Function3; - (func: Function4, arg1: T1, plc2: PH, plc3: PH, arg4: T4): Function2< T2, T3, R>; - (func: Function4, plc1: PH, arg2: T2, plc3: PH, arg4: T4): Function2; - (func: Function4, arg1: T1, arg2: T2, plc3: PH, arg4: T4): Function1< T3, R>; - (func: Function4, plc1: PH, plc2: PH, arg3: T3, arg4: T4): Function2; - (func: Function4, arg1: T1, plc2: PH, arg3: T3, arg4: T4): Function1< T2, R>; - (func: Function4, plc1: PH, arg2: T2, arg3: T3, arg4: T4): Function1; - (func: Function4, arg1: T1, arg2: T2, arg3: T3, arg4: T4): Function0< R>; - // catch-all - (func: Function, ...args: any[]): Function; - } - - //_.partialRight - interface LoDashStatic { - /** - * This method is like _.partial except that partial arguments are appended to those provided - * to the new function. - * @param func The function to partially apply arguments to. - * @param args Arguments to be partially applied. - * @return The new partially applied function. - **/ - partialRight: PartialRight - } - - interface PartialRight { - // arity 0 - (func: Function0): Function0; - // arity 1 - (func: Function1): Function1; - (func: Function1, arg1: T1): Function0; - // arity 2 - (func: Function2): Function2; - (func: Function2, arg1: T1, plc2: PH): Function1< T2, R>; - (func: Function2, arg2: T2): Function1; - (func: Function2, arg1: T1, arg2: T2): Function0< R>; - // arity 3 - (func: Function3): Function3; - (func: Function3, arg1: T1, plc2: PH, plc3: PH): Function2< T2, T3, R>; - (func: Function3, arg2: T2, plc3: PH): Function2; - (func: Function3, arg1: T1, arg2: T2, plc3: PH): Function1< T3, R>; - (func: Function3, arg3: T3): Function2; - (func: Function3, arg1: T1, plc2: PH, arg3: T3): Function1< T2, R>; - (func: Function3, arg2: T2, arg3: T3): Function1; - (func: Function3, arg1: T1, arg2: T2, arg3: T3): Function0< R>; - // arity 4 - (func: Function4): Function4; - (func: Function4, arg1: T1, plc2: PH, plc3: PH, plc4: PH): Function3< T2, T3, T4, R>; - (func: Function4, arg2: T2, plc3: PH, plc4: PH): Function3; - (func: Function4, arg1: T1, arg2: T2, plc3: PH, plc4: PH): Function2< T3, T4, R>; - (func: Function4, arg3: T3, plc4: PH): Function3; - (func: Function4, arg1: T1, plc2: PH, arg3: T3, plc4: PH): Function2< T2, T4, R>; - (func: Function4, arg2: T2, arg3: T3, plc4: PH): Function2; - (func: Function4, arg1: T1, arg2: T2, arg3: T3, plc4: PH): Function1< T4, R>; - (func: Function4, arg4: T4): Function3; - (func: Function4, arg1: T1, plc2: PH, plc3: PH, arg4: T4): Function2< T2, T3, R>; - (func: Function4, arg2: T2, plc3: PH, arg4: T4): Function2; - (func: Function4, arg1: T1, arg2: T2, plc3: PH, arg4: T4): Function1< T3, R>; - (func: Function4, arg3: T3, arg4: T4): Function2; - (func: Function4, arg1: T1, plc2: PH, arg3: T3, arg4: T4): Function1< T2, R>; - (func: Function4, arg2: T2, arg3: T3, arg4: T4): Function1; - (func: Function4, arg1: T1, arg2: T2, arg3: T3, arg4: T4): Function0< R>; - // catch-all - (func: Function, ...args: any[]): Function; - } - - //_.rearg - interface LoDashStatic { - /** - * Creates a function that invokes func with arguments arranged according to the specified indexes where the - * argument value at the first index is provided as the first argument, the argument value at the second index - * is provided as the second argument, and so on. - * @param func The function to rearrange arguments for. - * @param indexes The arranged argument indexes, specified as individual indexes or arrays of indexes. - * @return Returns the new function. - */ - rearg(func: Function, indexes: number[]): TResult; - - /** - * @see _.rearg - */ - rearg(func: Function, ...indexes: number[]): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.rearg - */ - rearg(indexes: number[]): LoDashImplicitObjectWrapper; - - /** - * @see _.rearg - */ - rearg(...indexes: number[]): LoDashImplicitObjectWrapper; - } - - //_.rest - interface LoDashStatic { - /** - * Creates a function that invokes func with the this binding of the created function and arguments from start - * and beyond provided as an array. - * - * Note: This method is based on the rest parameter. - * - * @param func The function to apply a rest parameter to. - * @param start The start position of the rest parameter. - * @return Returns the new function. - */ - rest( - func: Function, - start?: number - ): TResult; - - /** - * @see _.rest - */ - rest( - func: TFunc, - start?: number - ): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.rest - */ - rest(start?: number): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.rest - */ - rest(start?: number): LoDashExplicitObjectWrapper; - } - - //_.spread - interface LoDashStatic { - /** - * Creates a function that invokes func with the this binding of the created function and an array of arguments - * much like Function#apply. - * - * Note: This method is based on the spread operator. - * - * @param func The function to spread arguments over. - * @return Returns the new function. - */ - spread(func: F): T; - - /** - * @see _.spread - */ - spread(func: Function): T; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.spread - */ - spread(): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.spread - */ - spread(): LoDashExplicitObjectWrapper; - } - - //_.throttle - interface ThrottleSettings { - /** - * If you'd like to disable the leading-edge call, pass this as false. - */ - leading?: boolean; - - /** - * If you'd like to disable the execution on the trailing-edge, pass false. - */ - trailing?: boolean; - } - - interface LoDashStatic { - /** - * Creates a throttled function that only invokes func at most once per every wait milliseconds. The throttled - * function comes with a cancel method to cancel delayed invocations and a flush method to immediately invoke - * them. Provide an options object to indicate that func should be invoked on the leading and/or trailing edge - * of the wait timeout. Subsequent calls to the throttled function return the result of the last func call. - * - * Note: If leading and trailing options are true, func is invoked on the trailing edge of the timeout only if - * the the throttled function is invoked more than once during the wait timeout. - * - * @param func The function to throttle. - * @param wait The number of milliseconds to throttle invocations to. - * @param options The options object. - * @param options.leading Specify invoking on the leading edge of the timeout. - * @param options.trailing Specify invoking on the trailing edge of the timeout. - * @return Returns the new throttled function. - */ - throttle( - func: T, - wait?: number, - options?: ThrottleSettings - ): T & Cancelable; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.throttle - */ - throttle( - wait?: number, - options?: ThrottleSettings - ): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.throttle - */ - throttle( - wait?: number, - options?: ThrottleSettings - ): LoDashExplicitObjectWrapper; - } - - //_.unary - interface LoDashStatic { - /** - * Creates a function that accepts up to one argument, ignoring any - * additional arguments. - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to cap arguments for. - * @returns {Function} Returns the new function. - * @example - * - * _.map(['6', '8', '10'], _.unary(parseInt)); - * // => [6, 8, 10] - */ - unary(func: T): T; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.unary - */ - unary(): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.unary - */ - unary(): LoDashExplicitObjectWrapper; - } - - //_.wrap - interface LoDashStatic { - /** - * Creates a function that provides value to the wrapper function as its first argument. Any additional - * arguments provided to the function are appended to those provided to the wrapper function. The wrapper is - * invoked with the this binding of the created function. - * - * @param value The value to wrap. - * @param wrapper The wrapper function. - * @return Returns the new function. - */ - wrap( - value: V, - wrapper: W - ): R; - - /** - * @see _.wrap - */ - wrap( - value: V, - wrapper: Function - ): R; - - /** - * @see _.wrap - */ - wrap( - value: any, - wrapper: Function - ): R; - } - - interface LoDashImplicitWrapper { - /** - * @see _.wrap - */ - wrap(wrapper: W): LoDashImplicitObjectWrapper; - - /** - * @see _.wrap - */ - wrap(wrapper: Function): LoDashImplicitObjectWrapper; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.wrap - */ - wrap(wrapper: W): LoDashImplicitObjectWrapper; - - /** - * @see _.wrap - */ - wrap(wrapper: Function): LoDashImplicitObjectWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.wrap - */ - wrap(wrapper: W): LoDashImplicitObjectWrapper; - - /** - * @see _.wrap - */ - wrap(wrapper: Function): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitWrapper { - /** - * @see _.wrap - */ - wrap(wrapper: W): LoDashExplicitObjectWrapper; - - /** - * @see _.wrap - */ - wrap(wrapper: Function): LoDashExplicitObjectWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.wrap - */ - wrap(wrapper: W): LoDashExplicitObjectWrapper; - - /** - * @see _.wrap - */ - wrap(wrapper: Function): LoDashExplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.wrap - */ - wrap(wrapper: W): LoDashExplicitObjectWrapper; - - /** - * @see _.wrap - */ - wrap(wrapper: Function): LoDashExplicitObjectWrapper; - } - - /******** - * Lang * - ********/ - - //_.castArray - interface LoDashStatic { - /** - * Casts value as an array if it’s not one. - * - * @param value The value to inspect. - * @return Returns the cast array. - */ - castArray(value: T): T[]; - } - - interface LoDashImplicitWrapper { - /** - * @see _.castArray - */ - castArray(): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.castArray - */ - castArray(): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.castArray - */ - castArray(): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitWrapper { - /** - * @see _.castArray - */ - castArray(): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.castArray - */ - castArray(): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.castArray - */ - castArray(): LoDashExplicitArrayWrapper; - } - - //_.clone - interface LoDashStatic { - /** - * Creates a shallow clone of value. - * - * Note: This method is loosely based on the structured clone algorithm and supports cloning arrays, - * array buffers, booleans, date objects, maps, numbers, Object objects, regexes, sets, strings, symbols, - * and typed arrays. The own enumerable properties of arguments objects are cloned as plain objects. An empty - * object is returned for uncloneable values such as error objects, functions, DOM nodes, and WeakMaps. - * - * @param value The value to clone. - * @return Returns the cloned value. - */ - clone(value: T): T; - } - - interface LoDashImplicitWrapper { - /** - * @see _.clone - */ - clone(): T; - } - - interface LoDashImplicitArrayWrapper { - - /** - * @see _.clone - */ - clone(): T[]; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.clone - */ - clone(): T; - } - - interface LoDashExplicitWrapper { - /** - * @see _.clone - */ - clone(): LoDashExplicitWrapper; - } - - interface LoDashExplicitArrayWrapper { - - /** - * @see _.clone - */ - clone(): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.clone - */ - clone(): LoDashExplicitObjectWrapper; - } - - //_.cloneDeep - interface LoDashStatic { - /** - * This method is like _.clone except that it recursively clones value. - * - * @param value The value to recursively clone. - * @return Returns the deep cloned value. - */ - cloneDeep(value: T): T; - } - - interface LoDashImplicitWrapper { - /** - * @see _.cloneDeep - */ - cloneDeep(): T; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.cloneDeep - */ - cloneDeep(): T[]; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.cloneDeep - */ - cloneDeep(): T; - } - - interface LoDashExplicitWrapper { - /** - * @see _.cloneDeep - */ - cloneDeep(): LoDashExplicitWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.cloneDeep - */ - cloneDeep(): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.cloneDeep - */ - cloneDeep(): LoDashExplicitObjectWrapper; - } - - //_.cloneDeepWith - interface CloneDeepWithCustomizer { - (value: TValue): TResult; - } - - interface LoDashStatic { - /** - * This method is like _.cloneWith except that it recursively clones value. - * - * @param value The value to recursively clone. - * @param customizer The function to customize cloning. - * @return Returns the deep cloned value. - */ - cloneDeepWith( - value: any, - customizer?: CloneDeepWithCustomizer - ): TResult; - - /** - * @see _.clonDeepeWith - */ - cloneDeepWith( - value: T, - customizer?: CloneDeepWithCustomizer - ): TResult; - } - - interface LoDashImplicitWrapper { - /** - * @see _.cloneDeepWith - */ - cloneDeepWith( - customizer?: CloneDeepWithCustomizer - ): TResult; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.cloneDeepWith - */ - cloneDeepWith( - customizer?: CloneDeepWithCustomizer - ): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.cloneDeepWith - */ - cloneDeepWith( - customizer?: CloneDeepWithCustomizer - ): TResult; - } - - interface LoDashExplicitWrapper { - /** - * @see _.cloneDeepWith - */ - cloneDeepWith( - customizer?: CloneDeepWithCustomizer - ): LoDashExplicitWrapper; - - /** - * @see _.cloneDeepWith - */ - cloneDeepWith( - customizer?: CloneDeepWithCustomizer - ): LoDashExplicitArrayWrapper; - - /** - * @see _.cloneDeepWith - */ - cloneDeepWith( - customizer?: CloneDeepWithCustomizer - ): LoDashExplicitObjectWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.cloneDeepWith - */ - cloneDeepWith( - customizer?: CloneDeepWithCustomizer - ): LoDashExplicitWrapper; - - /** - * @see _.cloneDeepWith - */ - cloneDeepWith( - customizer?: CloneDeepWithCustomizer - ): LoDashExplicitArrayWrapper; - - /** - * @see _.cloneDeepWith - */ - cloneDeepWith( - customizer?: CloneDeepWithCustomizer - ): LoDashExplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.cloneDeepWith - */ - cloneDeepWith( - customizer?: CloneDeepWithCustomizer - ): LoDashExplicitWrapper; - - /** - * @see _.cloneDeepWith - */ - cloneDeepWith( - customizer?: CloneDeepWithCustomizer - ): LoDashExplicitArrayWrapper; - - /** - * @see _.cloneDeepWith - */ - cloneDeepWith( - customizer?: CloneDeepWithCustomizer - ): LoDashExplicitObjectWrapper; - } - - //_.cloneWith - interface CloneWithCustomizer { - (value: TValue): TResult; - } - - interface LoDashStatic { - /** - * This method is like _.clone except that it accepts customizer which is invoked to produce the cloned value. - * If customizer returns undefined cloning is handled by the method instead. - * - * @param value The value to clone. - * @param customizer The function to customize cloning. - * @return Returns the cloned value. - */ - cloneWith( - value: any, - customizer?: CloneWithCustomizer - ): TResult; - - /** - * @see _.cloneWith - */ - cloneWith( - value: T, - customizer?: CloneWithCustomizer - ): TResult; - } - - interface LoDashImplicitWrapper { - /** - * @see _.cloneWith - */ - cloneWith( - customizer?: CloneWithCustomizer - ): TResult; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.cloneWith - */ - cloneWith( - customizer?: CloneWithCustomizer - ): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.cloneWith - */ - cloneWith( - customizer?: CloneWithCustomizer - ): TResult; - } - - interface LoDashExplicitWrapper { - /** - * @see _.cloneWith - */ - cloneWith( - customizer?: CloneWithCustomizer - ): LoDashExplicitWrapper; - - /** - * @see _.cloneWith - */ - cloneWith( - customizer?: CloneWithCustomizer - ): LoDashExplicitArrayWrapper; - - /** - * @see _.cloneWith - */ - cloneWith( - customizer?: CloneWithCustomizer - ): LoDashExplicitObjectWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.cloneWith - */ - cloneWith( - customizer?: CloneWithCustomizer - ): LoDashExplicitWrapper; - - /** - * @see _.cloneWith - */ - cloneWith( - customizer?: CloneWithCustomizer - ): LoDashExplicitArrayWrapper; - - /** - * @see _.cloneWith - */ - cloneWith( - customizer?: CloneWithCustomizer - ): LoDashExplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.cloneWith - */ - cloneWith( - customizer?: CloneWithCustomizer - ): LoDashExplicitWrapper; - - /** - * @see _.cloneWith - */ - cloneWith( - customizer?: CloneWithCustomizer - ): LoDashExplicitArrayWrapper; - - /** - * @see _.cloneWith - */ - cloneWith( - customizer?: CloneWithCustomizer - ): LoDashExplicitObjectWrapper; - } - - //_.eq - interface LoDashStatic { - /** - * Performs a [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) - * comparison between two values to determine if they are equivalent. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - * @example - * - * var object = { 'user': 'fred' }; - * var other = { 'user': 'fred' }; - * - * _.eq(object, object); - * // => true - * - * _.eq(object, other); - * // => false - * - * _.eq('a', 'a'); - * // => true - * - * _.eq('a', Object('a')); - * // => false - * - * _.eq(NaN, NaN); - * // => true - */ - eq( - value: any, - other: any - ): boolean; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.isEqual - */ - eq( - other: any - ): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.isEqual - */ - eq( - other: any - ): LoDashExplicitWrapper; - } - - //_.gt - interface LoDashStatic { - /** - * Checks if value is greater than other. - * - * @param value The value to compare. - * @param other The other value to compare. - * @return Returns true if value is greater than other, else false. - */ - gt( - value: any, - other: any - ): boolean; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.gt - */ - gt(other: any): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.gt - */ - gt(other: any): LoDashExplicitWrapper; - } - - //_.gte - interface LoDashStatic { - /** - * Checks if value is greater than or equal to other. - * - * @param value The value to compare. - * @param other The other value to compare. - * @return Returns true if value is greater than or equal to other, else false. - */ - gte( - value: any, - other: any - ): boolean; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.gte - */ - gte(other: any): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.gte - */ - gte(other: any): LoDashExplicitWrapper; - } - - //_.isArguments - interface LoDashStatic { - /** - * Checks if value is classified as an arguments object. - * - * @param value The value to check. - * @return Returns true if value is correctly classified, else false. - */ - isArguments(value?: any): value is IArguments; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.isArguments - */ - isArguments(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.isArguments - */ - isArguments(): LoDashExplicitWrapper; - } - - //_.isArray - interface LoDashStatic { - /** - * Checks if value is classified as an Array object. - * @param value The value to check. - * - * @return Returns true if value is correctly classified, else false. - */ - isArray(value?: any): value is T[]; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.isArray - */ - isArray(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.isArray - */ - isArray(): LoDashExplicitWrapper; - } - - //_.isArrayBuffer - interface LoDashStatic { - /** - * Checks if value is classified as an ArrayBuffer object. - * - * @param value The value to check. - * @return Returns true if value is correctly classified, else false. - */ - isArrayBuffer(value?: any): value is ArrayBuffer; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.isArrayBuffer - */ - isArrayBuffer(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.isArrayBuffer - */ - isArrayBuffer(): LoDashExplicitWrapper; - } - - //_.isArrayLike - interface LoDashStatic { - /** - * Checks if `value` is array-like. A value is considered array-like if it's - * not a function and has a `value.length` that's an integer greater than or - * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. - * - * @static - * @memberOf _ - * @type Function - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is array-like, else `false`. - * @example - * - * _.isArrayLike([1, 2, 3]); - * // => true - * - * _.isArrayLike(document.body.children); - * // => true - * - * _.isArrayLike('abc'); - * // => true - * - * _.isArrayLike(_.noop); - * // => false - */ - isArrayLike(value?: any): value is T[]; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.isArrayLike - */ - isArrayLike(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.isArrayLike - */ - isArrayLike(): LoDashExplicitWrapper; - } - - //_.isArrayLikeObject - interface LoDashStatic { - /** - * This method is like `_.isArrayLike` except that it also checks if `value` - * is an object. - * - * @static - * @memberOf _ - * @type Function - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array-like object, else `false`. - * @example - * - * _.isArrayLikeObject([1, 2, 3]); - * // => true - * - * _.isArrayLikeObject(document.body.children); - * // => true - * - * _.isArrayLikeObject('abc'); - * // => false - * - * _.isArrayLikeObject(_.noop); - * // => false - */ - isArrayLikeObject(value?: any): value is T[]; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.isArrayLikeObject - */ - isArrayLikeObject(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.isArrayLikeObject - */ - isArrayLikeObject(): LoDashExplicitWrapper; - } - - //_.isBoolean - interface LoDashStatic { - /** - * Checks if value is classified as a boolean primitive or object. - * - * @param value The value to check. - * @return Returns true if value is correctly classified, else false. - */ - isBoolean(value?: any): value is boolean; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.isBoolean - */ - isBoolean(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.isBoolean - */ - isBoolean(): LoDashExplicitWrapper; - } - - //_.isBuffer - interface LoDashStatic { - /** - * Checks if value is a buffer. - * - * @param value The value to check. - * @return Returns true if value is a buffer, else false. - */ - isBuffer(value?: any): boolean; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.isBuffer - */ - isBuffer(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.isBuffer - */ - isBuffer(): LoDashExplicitWrapper; - } - - //_.isDate - interface LoDashStatic { - /** - * Checks if value is classified as a Date object. - * @param value The value to check. - * - * @return Returns true if value is correctly classified, else false. - */ - isDate(value?: any): value is Date; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.isDate - */ - isDate(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.isDate - */ - isDate(): LoDashExplicitWrapper; - } - - //_.isElement - interface LoDashStatic { - /** - * Checks if value is a DOM element. - * - * @param value The value to check. - * @return Returns true if value is a DOM element, else false. - */ - isElement(value?: any): boolean; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.isElement - */ - isElement(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.isElement - */ - isElement(): LoDashExplicitWrapper; - } - - //_.isEmpty - interface LoDashStatic { - /** - * Checks if value is empty. A value is considered empty unless it’s an arguments object, array, string, or - * jQuery-like collection with a length greater than 0 or an object with own enumerable properties. - * - * @param value The value to inspect. - * @return Returns true if value is empty, else false. - */ - isEmpty(value?: any): boolean; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.isEmpty - */ - isEmpty(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.isEmpty - */ - isEmpty(): LoDashExplicitWrapper; - } - - //_.isEqual - interface LoDashStatic { - /** - * Performs a deep comparison between two values to determine if they are - * equivalent. - * - * **Note:** This method supports comparing arrays, array buffers, booleans, - * date objects, error objects, maps, numbers, `Object` objects, regexes, - * sets, strings, symbols, and typed arrays. `Object` objects are compared - * by their own, not inherited, enumerable properties. Functions and DOM - * nodes are **not** supported. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - * @example - * - * var object = { 'user': 'fred' }; - * var other = { 'user': 'fred' }; - * - * _.isEqual(object, other); - * // => true - * - * object === other; - * // => false - */ - isEqual( - value: any, - other: any - ): boolean; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.isEqual - */ - isEqual( - other: any - ): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.isEqual - */ - isEqual( - other: any - ): LoDashExplicitWrapper; - } - - // _.isEqualWith - interface IsEqualCustomizer { - (value: any, other: any, indexOrKey?: number|string): boolean; - } - - interface LoDashStatic { - /** - * This method is like `_.isEqual` except that it accepts `customizer` which is - * invoked to compare values. If `customizer` returns `undefined` comparisons are - * handled by the method instead. The `customizer` is invoked with up to seven arguments: - * (objValue, othValue [, index|key, object, other, stack]). - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @param {Function} [customizer] The function to customize comparisons. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - * @example - * - * function isGreeting(value) { - * return /^h(?:i|ello)$/.test(value); - * } - * - * function customizer(objValue, othValue) { - * if (isGreeting(objValue) && isGreeting(othValue)) { - * return true; - * } - * } - * - * var array = ['hello', 'goodbye']; - * var other = ['hi', 'goodbye']; - * - * _.isEqualWith(array, other, customizer); - * // => true - */ - isEqualWith( - value: any, - other: any, - customizer: IsEqualCustomizer - ): boolean; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.isEqualWith - */ - isEqualWith( - other: any, - customizer: IsEqualCustomizer - ): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.isEqualWith - */ - isEqualWith( - other: any, - customizer: IsEqualCustomizer - ): LoDashExplicitWrapper; - } - - //_.isError - interface LoDashStatic { - /** - * Checks if value is an Error, EvalError, RangeError, ReferenceError, SyntaxError, TypeError, or URIError - * object. - * - * @param value The value to check. - * @return Returns true if value is an error object, else false. - */ - isError(value: any): value is Error; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.isError - */ - isError(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.isError - */ - isError(): LoDashExplicitWrapper; - } - - //_.isFinite - interface LoDashStatic { - /** - * Checks if value is a finite primitive number. - * - * Note: This method is based on Number.isFinite. - * - * @param value The value to check. - * @return Returns true if value is a finite number, else false. - */ - isFinite(value?: any): boolean; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.isFinite - */ - isFinite(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.isFinite - */ - isFinite(): LoDashExplicitWrapper; - } - - //_.isFunction - interface LoDashStatic { - /** - * Checks if value is classified as a Function object. - * - * @param value The value to check. - * @return Returns true if value is correctly classified, else false. - */ - isFunction(value?: any): value is Function; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.isFunction - */ - isFunction(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.isFunction - */ - isFunction(): LoDashExplicitWrapper; - } - - //_.isInteger - interface LoDashStatic { - /** - * Checks if `value` is an integer. - * - * **Note:** This method is based on [`Number.isInteger`](https://mdn.io/Number/isInteger). - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an integer, else `false`. - * @example - * - * _.isInteger(3); - * // => true - * - * _.isInteger(Number.MIN_VALUE); - * // => false - * - * _.isInteger(Infinity); - * // => false - * - * _.isInteger('3'); - * // => false - */ - isInteger(value?: any): boolean; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.isInteger - */ - isInteger(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.isInteger - */ - isInteger(): LoDashExplicitWrapper; - } - - //_.isLength - interface LoDashStatic { - /** - * Checks if `value` is a valid array-like length. - * - * **Note:** This function is loosely based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. - * @example - * - * _.isLength(3); - * // => true - * - * _.isLength(Number.MIN_VALUE); - * // => false - * - * _.isLength(Infinity); - * // => false - * - * _.isLength('3'); - * // => false - */ - isLength(value?: any): boolean; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.isLength - */ - isLength(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.isLength - */ - isLength(): LoDashExplicitWrapper; - } - - //_.isMap - interface LoDashStatic { - /** - * Checks if value is classified as a Map object. - * - * @param value The value to check. - * @returns Returns true if value is correctly classified, else false. - */ - isMap(value?: any): value is Map; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.isMap - */ - isMap(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.isMap - */ - isMap(): LoDashExplicitWrapper; - } - - //_.isMatch - interface isMatchCustomizer { - (value: any, other: any, indexOrKey?: number|string): boolean; - } - - interface LoDashStatic { - /** - * Performs a deep comparison between `object` and `source` to determine if - * `object` contains equivalent property values. - * - * **Note:** This method supports comparing the same values as `_.isEqual`. - * - * @static - * @memberOf _ - * @category Lang - * @param {Object} object The object to inspect. - * @param {Object} source The object of property values to match. - * @returns {boolean} Returns `true` if `object` is a match, else `false`. - * @example - * - * var object = { 'user': 'fred', 'age': 40 }; - * - * _.isMatch(object, { 'age': 40 }); - * // => true - * - * _.isMatch(object, { 'age': 36 }); - * // => false - */ - isMatch(object: Object, source: Object): boolean; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.isMatch - */ - isMatch(source: Object): boolean; - } - - //_.isMatchWith - interface isMatchWithCustomizer { - (value: any, other: any, indexOrKey?: number|string): boolean; - } - - interface LoDashStatic { - /** - * This method is like `_.isMatch` except that it accepts `customizer` which - * is invoked to compare values. If `customizer` returns `undefined` comparisons - * are handled by the method instead. The `customizer` is invoked with three - * arguments: (objValue, srcValue, index|key, object, source). - * - * @static - * @memberOf _ - * @category Lang - * @param {Object} object The object to inspect. - * @param {Object} source The object of property values to match. - * @param {Function} [customizer] The function to customize comparisons. - * @returns {boolean} Returns `true` if `object` is a match, else `false`. - * @example - * - * function isGreeting(value) { - * return /^h(?:i|ello)$/.test(value); - * } - * - * function customizer(objValue, srcValue) { - * if (isGreeting(objValue) && isGreeting(srcValue)) { - * return true; - * } - * } - * - * var object = { 'greeting': 'hello' }; - * var source = { 'greeting': 'hi' }; - * - * _.isMatchWith(object, source, customizer); - * // => true - */ - isMatchWith(object: Object, source: Object, customizer: isMatchWithCustomizer): boolean; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.isMatchWith - */ - isMatchWith(source: Object, customizer: isMatchWithCustomizer): boolean; - } - - //_.isNaN - interface LoDashStatic { - /** - * Checks if value is NaN. - * - * Note: This method is not the same as isNaN which returns true for undefined and other non-numeric values. - * - * @param value The value to check. - * @return Returns true if value is NaN, else false. - */ - isNaN(value?: any): boolean; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.isNaN - */ - isNaN(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.isNaN - */ - isNaN(): LoDashExplicitWrapper; - } - - //_.isNative - interface LoDashStatic { - /** - * Checks if value is a native function. - * @param value The value to check. - * - * @retrun Returns true if value is a native function, else false. - */ - isNative(value: any): value is Function; - } - - interface LoDashImplicitWrapperBase { - /** - * see _.isNative - */ - isNative(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * see _.isNative - */ - isNative(): LoDashExplicitWrapper; - } - - //_.isNil - interface LoDashStatic { - /** - * Checks if `value` is `null` or `undefined`. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is nullish, else `false`. - * @example - * - * _.isNil(null); - * // => true - * - * _.isNil(void 0); - * // => true - * - * _.isNil(NaN); - * // => false - */ - isNil(value?: any): boolean; - } - - interface LoDashImplicitWrapperBase { - /** - * see _.isNil - */ - isNil(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * see _.isNil - */ - isNil(): LoDashExplicitWrapper; - } - - //_.isNull - interface LoDashStatic { - /** - * Checks if value is null. - * - * @param value The value to check. - * @return Returns true if value is null, else false. - */ - isNull(value?: any): boolean; - } - - interface LoDashImplicitWrapperBase { - /** - * see _.isNull - */ - isNull(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * see _.isNull - */ - isNull(): LoDashExplicitWrapper; - } - - //_.isNumber - interface LoDashStatic { - /** - * Checks if value is classified as a Number primitive or object. - * - * Note: To exclude Infinity, -Infinity, and NaN, which are classified as numbers, use the _.isFinite method. - * - * @param value The value to check. - * @return Returns true if value is correctly classified, else false. - */ - isNumber(value?: any): value is number; - } - - interface LoDashImplicitWrapperBase { - /** - * see _.isNumber - */ - isNumber(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * see _.isNumber - */ - isNumber(): LoDashExplicitWrapper; - } - - //_.isObject - interface LoDashStatic { - /** - * Checks if value is the language type of Object. (e.g. arrays, functions, objects, regexes, new Number(0), - * and new String('')) - * - * @param value The value to check. - * @return Returns true if value is an object, else false. - */ - isObject(value?: any): boolean; - } - - interface LoDashImplicitWrapperBase { - /** - * see _.isObject - */ - isObject(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * see _.isObject - */ - isObject(): LoDashExplicitWrapper; - } - - //_.isObjectLike - interface LoDashStatic { - /** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ - isObjectLike(value?: any): boolean; - } - - interface LoDashImplicitWrapperBase { - /** - * see _.isObjectLike - */ - isObjectLike(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * see _.isObjectLike - */ - isObjectLike(): LoDashExplicitWrapper; - } - - //_.isPlainObject - interface LoDashStatic { - /** - * Checks if value is a plain object, that is, an object created by the Object constructor or one with a - * [[Prototype]] of null. - * - * Note: This method assumes objects created by the Object constructor have no inherited enumerable properties. - * - * @param value The value to check. - * @return Returns true if value is a plain object, else false. - */ - isPlainObject(value?: any): boolean; - } - - interface LoDashImplicitWrapperBase { - /** - * see _.isPlainObject - */ - isPlainObject(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * see _.isPlainObject - */ - isPlainObject(): LoDashExplicitWrapper; - } - - //_.isRegExp - interface LoDashStatic { - /** - * Checks if value is classified as a RegExp object. - * @param value The value to check. - * - * @return Returns true if value is correctly classified, else false. - */ - isRegExp(value?: any): value is RegExp; - } - - interface LoDashImplicitWrapperBase { - /** - * see _.isRegExp - */ - isRegExp(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * see _.isRegExp - */ - isRegExp(): LoDashExplicitWrapper; - } - - //_.isSafeInteger - interface LoDashStatic { - /** - * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754 - * double precision number which isn't the result of a rounded unsafe integer. - * - * **Note:** This method is based on [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger). - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`. - * @example - * - * _.isSafeInteger(3); - * // => true - * - * _.isSafeInteger(Number.MIN_VALUE); - * // => false - * - * _.isSafeInteger(Infinity); - * // => false - * - * _.isSafeInteger('3'); - * // => false - */ - isSafeInteger(value: any): boolean; - } - - interface LoDashImplicitWrapperBase { - /** - * see _.isSafeInteger - */ - isSafeInteger(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * see _.isSafeInteger - */ - isSafeInteger(): LoDashExplicitWrapper; - } - - //_.isSet - interface LoDashStatic { - /** - * Checks if value is classified as a Set object. - * - * @param value The value to check. - * @returns Returns true if value is correctly classified, else false. - */ - isSet(value?: any): value is Set; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.isSet - */ - isSet(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.isSet - */ - isSet(): LoDashExplicitWrapper; - } - - //_.isString - interface LoDashStatic { - /** - * Checks if value is classified as a String primitive or object. - * - * @param value The value to check. - * @return Returns true if value is correctly classified, else false. - */ - isString(value?: any): value is string; - } - - interface LoDashImplicitWrapperBase { - /** - * see _.isString - */ - isString(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * see _.isString - */ - isString(): LoDashExplicitWrapper; - } - - //_.isSymbol - interface LoDashStatic { - /** - * Checks if `value` is classified as a `Symbol` primitive or object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isSymbol(Symbol.iterator); - * // => true - * - * _.isSymbol('abc'); - * // => false - */ - isSymbol(value: any): boolean; - } - - interface LoDashImplicitWrapperBase { - /** - * see _.isSymbol - */ - isSymbol(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * see _.isSymbol - */ - isSymbol(): LoDashExplicitWrapper; - } - - //_.isTypedArray - interface LoDashStatic { - /** - * Checks if value is classified as a typed array. - * - * @param value The value to check. - * @return Returns true if value is correctly classified, else false. - */ - isTypedArray(value: any): boolean; - } - - interface LoDashImplicitWrapperBase { - /** - * see _.isTypedArray - */ - isTypedArray(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * see _.isTypedArray - */ - isTypedArray(): LoDashExplicitWrapper; - } - - //_.isUndefined - interface LoDashStatic { - /** - * Checks if value is undefined. - * - * @param value The value to check. - * @return Returns true if value is undefined, else false. - */ - isUndefined(value: any): boolean; - } - - interface LoDashImplicitWrapperBase { - /** - * see _.isUndefined - */ - isUndefined(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * see _.isUndefined - */ - isUndefined(): LoDashExplicitWrapper; - } - - //_.isWeakMap - interface LoDashStatic { - /** - * Checks if value is classified as a WeakMap object. - * - * @param value The value to check. - * @returns Returns true if value is correctly classified, else false. - */ - isWeakMap(value?: any): value is WeakMap; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.isSet - */ - isWeakMap(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.isSet - */ - isWeakMap(): LoDashExplicitWrapper; - } - - //_.isWeakSet - interface LoDashStatic { - /** - * Checks if value is classified as a WeakSet object. - * - * @param value The value to check. - * @returns Returns true if value is correctly classified, else false. - */ - isWeakSet(value?: any): value is WeakSet; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.isWeakSet - */ - isWeakSet(): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.isWeakSet - */ - isWeakSet(): LoDashExplicitWrapper; - } - - //_.lt - interface LoDashStatic { - /** - * Checks if value is less than other. - * - * @param value The value to compare. - * @param other The other value to compare. - * @return Returns true if value is less than other, else false. - */ - lt( - value: any, - other: any - ): boolean; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.lt - */ - lt(other: any): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.lt - */ - lt(other: any): LoDashExplicitWrapper; - } - - //_.lte - interface LoDashStatic { - /** - * Checks if value is less than or equal to other. - * - * @param value The value to compare. - * @param other The other value to compare. - * @return Returns true if value is less than or equal to other, else false. - */ - lte( - value: any, - other: any - ): boolean; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.lte - */ - lte(other: any): boolean; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.lte - */ - lte(other: any): LoDashExplicitWrapper; - } - - //_.toArray - interface LoDashStatic { - /** - * Converts value to an array. - * - * @param value The value to convert. - * @return Returns the converted array. - */ - toArray(value: List|Dictionary|NumericDictionary): T[]; - - /** - * @see _.toArray - */ - toArray(value: TValue): TResult[]; - - /** - * @see _.toArray - */ - toArray(value?: any): TResult[]; - } - - interface LoDashImplicitWrapper { - /** - * @see _.toArray - */ - toArray(): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.toArray - */ - toArray(): LoDashImplicitArrayWrapper; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.toArray - */ - toArray(): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitWrapper { - /** - * @see _.toArray - */ - toArray(): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.toArray - */ - toArray(): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.toArray - */ - toArray(): LoDashExplicitArrayWrapper; - } - - //_.toPlainObject - interface LoDashStatic { - /** - * Converts value to a plain object flattening inherited enumerable properties of value to own properties - * of the plain object. - * - * @param value The value to convert. - * @return Returns the converted plain object. - */ - toPlainObject(value?: any): TResult; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.toPlainObject - */ - toPlainObject(): LoDashImplicitObjectWrapper; - } - - //_.toInteger - interface LoDashStatic { - /** - * Converts `value` to an integer. - * - * **Note:** This function is loosely based on [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger). - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted integer. - * @example - * - * _.toInteger(3); - * // => 3 - * - * _.toInteger(Number.MIN_VALUE); - * // => 0 - * - * _.toInteger(Infinity); - * // => 1.7976931348623157e+308 - * - * _.toInteger('3'); - * // => 3 - */ - toInteger(value: any): number; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.toInteger - */ - toInteger(): LoDashImplicitWrapper; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.toInteger - */ - toInteger(): LoDashExplicitWrapper; - } - - //_.toLength - interface LoDashStatic { - /** - * Converts `value` to an integer suitable for use as the length of an - * array-like object. - * - * **Note:** This method is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to convert. - * @return {number} Returns the converted integer. - * @example - * - * _.toLength(3); - * // => 3 - * - * _.toLength(Number.MIN_VALUE); - * // => 0 - * - * _.toLength(Infinity); - * // => 4294967295 - * - * _.toLength('3'); - * // => 3 - */ - toLength(value: any): number; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.toLength - */ - toLength(): LoDashImplicitWrapper; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.toLength - */ - toLength(): LoDashExplicitWrapper; - } - - //_.toNumber - interface LoDashStatic { - /** - * Converts `value` to a number. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to process. - * @returns {number} Returns the number. - * @example - * - * _.toNumber(3); - * // => 3 - * - * _.toNumber(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toNumber(Infinity); - * // => Infinity - * - * _.toNumber('3'); - * // => 3 - */ - toNumber(value: any): number; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.toNumber - */ - toNumber(): LoDashImplicitWrapper; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.toNumber - */ - toNumber(): LoDashExplicitWrapper; - } - - //_.toSafeInteger - interface LoDashStatic { - /** - * Converts `value` to a safe integer. A safe integer can be compared and - * represented correctly. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted integer. - * @example - * - * _.toSafeInteger(3); - * // => 3 - * - * _.toSafeInteger(Number.MIN_VALUE); - * // => 0 - * - * _.toSafeInteger(Infinity); - * // => 9007199254740991 - * - * _.toSafeInteger('3'); - * // => 3 - */ - toSafeInteger(value: any): number; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.toSafeInteger - */ - toSafeInteger(): LoDashImplicitWrapper; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.toSafeInteger - */ - toSafeInteger(): LoDashExplicitWrapper; - } - - //_.toString DUMMY - interface LoDashStatic { - /** - * Converts `value` to a string if it's not one. An empty string is returned - * for `null` and `undefined` values. The sign of `-0` is preserved. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to process. - * @returns {string} Returns the string. - * @example - * - * _.toString(null); - * // => '' - * - * _.toString(-0); - * // => '-0' - * - * _.toString([1, 2, 3]); - * // => '1,2,3' - */ - toString(value: any): string; - } - - /******** - * Math * - ********/ - - //_.add - interface LoDashStatic { - /** - * Adds two numbers. - * - * @param augend The first number to add. - * @param addend The second number to add. - * @return Returns the sum. - */ - add( - augend: number, - addend: number - ): number; - } - - interface LoDashImplicitWrapper { - /** - * @see _.add - */ - add(addend: number): number; - } - - interface LoDashExplicitWrapper { - /** - * @see _.add - */ - add(addend: number): LoDashExplicitWrapper; - } - - //_.ceil - interface LoDashStatic { - /** - * Calculates n rounded up to precision. - * - * @param n The number to round up. - * @param precision The precision to round up to. - * @return Returns the rounded up number. - */ - ceil( - n: number, - precision?: number - ): number; - } - - interface LoDashImplicitWrapper { - /** - * @see _.ceil - */ - ceil(precision?: number): number; - } - - interface LoDashExplicitWrapper { - /** - * @see _.ceil - */ - ceil(precision?: number): LoDashExplicitWrapper; - } - - //_.floor - interface LoDashStatic { - /** - * Calculates n rounded down to precision. - * - * @param n The number to round down. - * @param precision The precision to round down to. - * @return Returns the rounded down number. - */ - floor( - n: number, - precision?: number - ): number; - } - - interface LoDashImplicitWrapper { - /** - * @see _.floor - */ - floor(precision?: number): number; - } - - interface LoDashExplicitWrapper { - /** - * @see _.floor - */ - floor(precision?: number): LoDashExplicitWrapper; - } - - //_.max - interface LoDashStatic { - /** - * Computes the maximum value of `array`. If `array` is empty or falsey - * `undefined` is returned. - * - * @static - * @memberOf _ - * @category Math - * @param {Array} array The array to iterate over. - * @returns {*} Returns the maximum value. - */ - max( - collection: List - ): T; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.max - */ - max(): T; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.max - */ - max(): T; - } - - //_.maxBy - interface LoDashStatic { - /** - * This method is like `_.max` except that it accepts `iteratee` which is - * invoked for each element in `array` to generate the criterion by which - * the value is ranked. The iteratee is invoked with one argument: (value). - * - * @static - * @memberOf _ - * @category Math - * @param {Array} array The array to iterate over. - * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element. - * @returns {*} Returns the maximum value. - * @example - * - * var objects = [{ 'n': 1 }, { 'n': 2 }]; - * - * _.maxBy(objects, function(o) { return o.a; }); - * // => { 'n': 2 } - * - * // using the `_.property` iteratee shorthand - * _.maxBy(objects, 'n'); - * // => { 'n': 2 } - */ - maxBy( - collection: List, - iteratee?: ListIterator - ): T; - - /** - * @see _.maxBy - */ - maxBy( - collection: Dictionary, - iteratee?: DictionaryIterator - ): T; - - /** - * @see _.maxBy - */ - maxBy( - collection: List|Dictionary, - iteratee?: string - ): T; - - /** - * @see _.maxBy - */ - maxBy( - collection: List|Dictionary, - whereValue?: TObject - ): T; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.maxBy - */ - maxBy( - iteratee?: ListIterator - ): T; - - /** - * @see _.maxBy - */ - maxBy( - iteratee?: string - ): T; - - /** - * @see _.maxBy - */ - maxBy( - whereValue?: TObject - ): T; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.maxBy - */ - maxBy( - iteratee?: ListIterator|DictionaryIterator - ): T; - - /** - * @see _.maxBy - */ - maxBy( - iteratee?: string - ): T; - - /** - * @see _.maxBy - */ - maxBy( - whereValue?: TObject - ): T; - } - - //_.mean - interface LoDashStatic { - /** - * Computes the mean of the values in `array`. - * - * @static - * @memberOf _ - * @category Math - * @param {Array} array The array to iterate over. - * @returns {number} Returns the mean. - * @example - * - * _.mean([4, 2, 8, 6]); - * // => 5 - */ - mean( - collection: List - ): number; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.mean - */ - mean(): number; - - /** - * @see _.mean - */ - mean(): number; - } - - //_.min - interface LoDashStatic { - /** - * Computes the minimum value of `array`. If `array` is empty or falsey - * `undefined` is returned. - * - * @static - * @memberOf _ - * @category Math - * @param {Array} array The array to iterate over. - * @returns {*} Returns the minimum value. - */ - min( - collection: List - ): T; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.min - */ - min(): T; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.min - */ - min(): T; - } - - //_.minBy - interface LoDashStatic { - /** - * This method is like `_.min` except that it accepts `iteratee` which is - * invoked for each element in `array` to generate the criterion by which - * the value is ranked. The iteratee is invoked with one argument: (value). - * - * @static - * @memberOf _ - * @category Math - * @param {Array} array The array to iterate over. - * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element. - * @returns {*} Returns the minimum value. - * @example - * - * var objects = [{ 'n': 1 }, { 'n': 2 }]; - * - * _.minBy(objects, function(o) { return o.a; }); - * // => { 'n': 1 } - * - * // using the `_.property` iteratee shorthand - * _.minBy(objects, 'n'); - * // => { 'n': 1 } - */ - minBy( - collection: List, - iteratee?: ListIterator - ): T; - - /** - * @see _.minBy - */ - minBy( - collection: Dictionary, - iteratee?: DictionaryIterator - ): T; - - /** - * @see _.minBy - */ - minBy( - collection: List|Dictionary, - iteratee?: string - ): T; - - /** - * @see _.minBy - */ - minBy( - collection: List|Dictionary, - whereValue?: TObject - ): T; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.minBy - */ - minBy( - iteratee?: ListIterator - ): T; - - /** - * @see _.minBy - */ - minBy( - iteratee?: string - ): T; - - /** - * @see _.minBy - */ - minBy( - whereValue?: TObject - ): T; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.minBy - */ - minBy( - iteratee?: ListIterator|DictionaryIterator - ): T; - - /** - * @see _.minBy - */ - minBy( - iteratee?: string - ): T; - - /** - * @see _.minBy - */ - minBy( - whereValue?: TObject - ): T; - } - - //_.round - interface LoDashStatic { - /** - * Calculates n rounded to precision. - * - * @param n The number to round. - * @param precision The precision to round to. - * @return Returns the rounded number. - */ - round( - n: number, - precision?: number - ): number; - } - - interface LoDashImplicitWrapper { - /** - * @see _.round - */ - round(precision?: number): number; - } - - interface LoDashExplicitWrapper { - /** - * @see _.round - */ - round(precision?: number): LoDashExplicitWrapper; - } - - //_.sum - interface LoDashStatic { - /** - * Computes the sum of the values in `array`. - * - * @static - * @memberOf _ - * @category Math - * @param {Array} array The array to iterate over. - * @returns {number} Returns the sum. - * @example - * - * _.sum([4, 2, 8, 6]); - * // => 20 - */ - sum(collection: List): number; - - /** - * @see _.sum - */ - sum(collection: List|Dictionary): number; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.sum - */ - sum(): number; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.sum - **/ - sum(): number; - - /** - * @see _.sum - */ - sum(): number; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.sum - */ - sum(): LoDashExplicitWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.sum - */ - sum(): LoDashExplicitWrapper; - - /** - * @see _.sum - */ - sum(): LoDashExplicitWrapper; - } - - //_.sumBy - interface LoDashStatic { - /** - * This method is like `_.sum` except that it accepts `iteratee` which is - * invoked for each element in `array` to generate the value to be summed. - * The iteratee is invoked with one argument: (value). - * - * @static - * @memberOf _ - * @category Math - * @param {Array} array The array to iterate over. - * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element. - * @returns {number} Returns the sum. - * @example - * - * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }]; - * - * _.sumBy(objects, function(o) { return o.n; }); - * // => 20 - * - * // using the `_.property` iteratee shorthand - * _.sumBy(objects, 'n'); - * // => 20 - */ - sumBy( - collection: List, - iteratee: ListIterator - ): number; - - /** - * @see _.sumBy - */ - sumBy( - collection: List<{}>, - iteratee: string - ): number; - - /** - * @see _.sumBy - */ - sumBy( - collection: List - ): number; - - /** - * @see _.sumBy - */ - sumBy( - collection: List<{}>, - iteratee: Dictionary<{}> - ): number; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.sumBy - */ - sumBy( - iteratee: ListIterator - ): number; - - /** - * @see _.sumBy - */ - sumBy(iteratee: string): number; - - /** - * @see _.sumBy - */ - sumBy(iteratee: Dictionary<{}>): number; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.sumBy - */ - sumBy( - iteratee: ListIterator<{}, number> - ): number; - - /** - * @see _.sumBy - */ - sumBy(iteratee: string): number; - - /** - * @see _.sumBy - */ - sumBy(iteratee: Dictionary<{}>): number; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.sumBy - */ - sumBy( - iteratee: ListIterator - ): LoDashExplicitWrapper; - - /** - * @see _.sumBy - */ - sumBy(iteratee: string): LoDashExplicitWrapper; - - /** - * @see _.sumBy - */ - sumBy(): LoDashExplicitWrapper; - - /** - * @see _.sumBy - */ - sumBy(iteratee: Dictionary<{}>): LoDashExplicitWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.sumBy - */ - sumBy( - iteratee: ListIterator<{}, number> - ): LoDashExplicitWrapper; - - /** - * @see _.sumBy - */ - sumBy(iteratee: string): LoDashExplicitWrapper; - - /** - * @see _.sumBy - */ - sumBy(iteratee: Dictionary<{}>): LoDashExplicitWrapper; - } - - /********** - * Number * - **********/ - - //_.subtract - interface LoDashStatic { - /** - * Subtract two numbers. - * - * @static - * @memberOf _ - * @category Math - * @param {number} minuend The first number in a subtraction. - * @param {number} subtrahend The second number in a subtraction. - * @returns {number} Returns the difference. - * @example - * - * _.subtract(6, 4); - * // => 2 - */ - subtract( - minuend: number, - subtrahend: number - ): number; - } - - interface LoDashImplicitWrapper { - /** - * @see _.subtract - */ - subtract( - subtrahend: number - ): number; - } - - interface LoDashExplicitWrapper { - /** - * @see _.subtract - */ - subtract( - subtrahend: number - ): LoDashExplicitWrapper; - } - - //_.clamp - interface LoDashStatic { - /** - * Clamps `number` within the inclusive `lower` and `upper` bounds. - * - * @static - * @memberOf _ - * @category Number - * @param {number} number The number to clamp. - * @param {number} [lower] The lower bound. - * @param {number} upper The upper bound. - * @returns {number} Returns the clamped number. - * @example - * - * _.clamp(-10, -5, 5); - * // => -5 - * - * _.clamp(10, -5, 5); - * // => 5 - */ - clamp( - number: number, - lower: number, - upper: number - ): number; - } - - interface LoDashImplicitWrapper { - /** - * @see _.clamp - */ - clamp( - lower: number, - upper: number - ): number; - } - - interface LoDashExplicitWrapper { - /** - * @see _.clamp - */ - clamp( - lower: number, - upper: number - ): LoDashExplicitWrapper; - } - - //_.inRange - interface LoDashStatic { - /** - * Checks if n is between start and up to but not including, end. If end is not specified it’s set to start - * with start then set to 0. - * - * @param n The number to check. - * @param start The start of the range. - * @param end The end of the range. - * @return Returns true if n is in the range, else false. - */ - inRange( - n: number, - start: number, - end: number - ): boolean; - - - /** - * @see _.inRange - */ - inRange( - n: number, - end: number - ): boolean; - } - - interface LoDashImplicitWrapper { - /** - * @see _.inRange - */ - inRange( - start: number, - end: number - ): boolean; - - /** - * @see _.inRange - */ - inRange(end: number): boolean; - } - - interface LoDashExplicitWrapper { - /** - * @see _.inRange - */ - inRange( - start: number, - end: number - ): LoDashExplicitWrapper; - - /** - * @see _.inRange - */ - inRange(end: number): LoDashExplicitWrapper; - } - - //_.random - interface LoDashStatic { - /** - * Produces a random number between min and max (inclusive). If only one argument is provided a number between - * 0 and the given number is returned. If floating is true, or either min or max are floats, a floating-point - * number is returned instead of an integer. - * - * @param min The minimum possible value. - * @param max The maximum possible value. - * @param floating Specify returning a floating-point number. - * @return Returns the random number. - */ - random( - min?: number, - max?: number, - floating?: boolean - ): number; - - /** - * @see _.random - */ - random( - min?: number, - floating?: boolean - ): number; - - /** - * @see _.random - */ - random(floating?: boolean): number; - } - - interface LoDashImplicitWrapper { - /** - * @see _.random - */ - random( - max?: number, - floating?: boolean - ): number; - - /** - * @see _.random - */ - random(floating?: boolean): number; - } - - interface LoDashExplicitWrapper { - /** - * @see _.random - */ - random( - max?: number, - floating?: boolean - ): LoDashExplicitWrapper; - - /** - * @see _.random - */ - random(floating?: boolean): LoDashExplicitWrapper; - } - - /********** - * Object * - **********/ - - //_.assign - interface LoDashStatic { - /** - * Assigns own enumerable properties of source objects to the destination - * object. Source objects are applied from left to right. Subsequent sources - * overwrite property assignments of previous sources. - * - * **Note:** This method mutates `object` and is loosely based on - * [`Object.assign`](https://mdn.io/Object/assign). - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @example - * - * function Foo() { - * this.c = 3; - * } - * - * function Bar() { - * this.e = 5; - * } - * - * Foo.prototype.d = 4; - * Bar.prototype.f = 6; - * - * _.assign({ 'a': 1 }, new Foo, new Bar); - * // => { 'a': 1, 'c': 3, 'e': 5 } - */ - assign( - object: TObject, - source: TSource - ): TObject & TSource; - - /** - * @see assign - */ - assign( - object: TObject, - source1: TSource1, - source2: TSource2 - ): TObject & TSource1 & TSource2; - - /** - * @see assign - */ - assign( - object: TObject, - source1: TSource1, - source2: TSource2, - source3: TSource3 - ): TObject & TSource1 & TSource2 & TSource3; - - /** - * @see assign - */ - assign( - object: TObject, - source1: TSource1, - source2: TSource2, - source3: TSource3, - source4: TSource4 - ): TObject & TSource1 & TSource2 & TSource3 & TSource4; - - /** - * @see _.assign - */ - assign(object: TObject): TObject; - - /** - * @see _.assign - */ - assign( - object: any, - ...otherArgs: any[] - ): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.assign - */ - assign( - source: TSource - ): LoDashImplicitObjectWrapper; - - /** - * @see assign - */ - assign( - source1: TSource1, - source2: TSource2 - ): LoDashImplicitObjectWrapper; - - /** - * @see assign - */ - assign( - source1: TSource1, - source2: TSource2, - source3: TSource3 - ): LoDashImplicitObjectWrapper; - - /** - * @see assign - */ - assign( - source1: TSource1, - source2: TSource2, - source3: TSource3, - source4: TSource4 - ): LoDashImplicitObjectWrapper; - - /** - * @see _.assign - */ - assign(): LoDashImplicitObjectWrapper; - - /** - * @see _.assign - */ - assign(...otherArgs: any[]): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.assign - */ - assign( - source: TSource - ): LoDashExplicitObjectWrapper; - - /** - * @see assign - */ - assign( - source1: TSource1, - source2: TSource2 - ): LoDashExplicitObjectWrapper; - - /** - * @see assign - */ - assign( - source1: TSource1, - source2: TSource2, - source3: TSource3 - ): LoDashExplicitObjectWrapper; - - /** - * @see assign - */ - assign( - source1: TSource1, - source2: TSource2, - source3: TSource3, - source4: TSource4 - ): LoDashExplicitObjectWrapper; - - /** - * @see _.assign - */ - assign(): LoDashExplicitObjectWrapper; - - /** - * @see _.assign - */ - assign(...otherArgs: any[]): LoDashExplicitObjectWrapper; - } - - //_.assignWith - interface AssignCustomizer { - (objectValue: any, sourceValue: any, key?: string, object?: {}, source?: {}): any; - } - - interface LoDashStatic { - /** - * This method is like `_.assign` except that it accepts `customizer` which - * is invoked to produce the assigned values. If `customizer` returns `undefined` - * assignment is handled by the method instead. The `customizer` is invoked - * with five arguments: (objValue, srcValue, key, object, source). - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The destination object. - * @param {...Object} sources The source objects. - * @param {Function} [customizer] The function to customize assigned values. - * @returns {Object} Returns `object`. - * @example - * - * function customizer(objValue, srcValue) { - * return _.isUndefined(objValue) ? srcValue : objValue; - * } - * - * var defaults = _.partialRight(_.assignWith, customizer); - * - * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); - * // => { 'a': 1, 'b': 2 } - */ - assignWith( - object: TObject, - source: TSource, - customizer: AssignCustomizer - ): TObject & TSource; - - /** - * @see assignWith - */ - assignWith( - object: TObject, - source1: TSource1, - source2: TSource2, - customizer: AssignCustomizer - ): TObject & TSource1 & TSource2; - - /** - * @see assignWith - */ - assignWith( - object: TObject, - source1: TSource1, - source2: TSource2, - source3: TSource3, - customizer: AssignCustomizer - ): TObject & TSource1 & TSource2 & TSource3; - - /** - * @see assignWith - */ - assignWith( - object: TObject, - source1: TSource1, - source2: TSource2, - source3: TSource3, - source4: TSource4, - customizer: AssignCustomizer - ): TObject & TSource1 & TSource2 & TSource3 & TSource4; - - /** - * @see _.assignWith - */ - assignWith(object: TObject): TObject; - - /** - * @see _.assignWith - */ - assignWith( - object: any, - ...otherArgs: any[] - ): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.assignWith - */ - assignWith( - source: TSource, - customizer: AssignCustomizer - ): LoDashImplicitObjectWrapper; - - /** - * @see assignWith - */ - assignWith( - source1: TSource1, - source2: TSource2, - customizer: AssignCustomizer - ): LoDashImplicitObjectWrapper; - - /** - * @see assignWith - */ - assignWith( - source1: TSource1, - source2: TSource2, - source3: TSource3, - customizer: AssignCustomizer - ): LoDashImplicitObjectWrapper; - - /** - * @see assignWith - */ - assignWith( - source1: TSource1, - source2: TSource2, - source3: TSource3, - source4: TSource4, - customizer: AssignCustomizer - ): LoDashImplicitObjectWrapper; - - /** - * @see _.assignWith - */ - assignWith(): LoDashImplicitObjectWrapper; - - /** - * @see _.assignWith - */ - assignWith(...otherArgs: any[]): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.assignWith - */ - assignWith( - source: TSource, - customizer: AssignCustomizer - ): LoDashExplicitObjectWrapper; - - /** - * @see assignWith - */ - assignWith( - source1: TSource1, - source2: TSource2, - customizer: AssignCustomizer - ): LoDashExplicitObjectWrapper; - - /** - * @see assignWith - */ - assignWith( - source1: TSource1, - source2: TSource2, - source3: TSource3, - customizer: AssignCustomizer - ): LoDashExplicitObjectWrapper; - - /** - * @see assignWith - */ - assignWith( - source1: TSource1, - source2: TSource2, - source3: TSource3, - source4: TSource4, - customizer: AssignCustomizer - ): LoDashExplicitObjectWrapper; - - /** - * @see _.assignWith - */ - assignWith(): LoDashExplicitObjectWrapper; - - /** - * @see _.assignWith - */ - assignWith(...otherArgs: any[]): LoDashExplicitObjectWrapper; - } - - //_.assignIn - interface LoDashStatic { - /** - * This method is like `_.assign` except that it iterates over own and - * inherited source properties. - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @alias extend - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @example - * - * function Foo() { - * this.b = 2; - * } - * - * function Bar() { - * this.d = 4; - * } - * - * Foo.prototype.c = 3; - * Bar.prototype.e = 5; - * - * _.assignIn({ 'a': 1 }, new Foo, new Bar); - * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5 } - */ - assignIn( - object: TObject, - source: TSource - ): TObject & TSource; - - /** - * @see assignIn - */ - assignIn( - object: TObject, - source1: TSource1, - source2: TSource2 - ): TObject & TSource1 & TSource2; - - /** - * @see assignIn - */ - assignIn( - object: TObject, - source1: TSource1, - source2: TSource2, - source3: TSource3 - ): TObject & TSource1 & TSource2 & TSource3; - - /** - * @see assignIn - */ - assignIn( - object: TObject, - source1: TSource1, - source2: TSource2, - source3: TSource3, - source4: TSource4 - ): TObject & TSource1 & TSource2 & TSource3 & TSource4; - - /** - * @see _.assignIn - */ - assignIn(object: TObject): TObject; - - /** - * @see _.assignIn - */ - assignIn( - object: any, - ...otherArgs: any[] - ): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.assignIn - */ - assignIn( - source: TSource - ): LoDashImplicitObjectWrapper; - - /** - * @see assignIn - */ - assignIn( - source1: TSource1, - source2: TSource2 - ): LoDashImplicitObjectWrapper; - - /** - * @see assignIn - */ - assignIn( - source1: TSource1, - source2: TSource2, - source3: TSource3 - ): LoDashImplicitObjectWrapper; - - /** - * @see assignIn - */ - assignIn( - source1: TSource1, - source2: TSource2, - source3: TSource3, - source4: TSource4 - ): LoDashImplicitObjectWrapper; - - /** - * @see _.assignIn - */ - assignIn(): LoDashImplicitObjectWrapper; - - /** - * @see _.assignIn - */ - assignIn(...otherArgs: any[]): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.assignIn - */ - assignIn( - source: TSource - ): LoDashExplicitObjectWrapper; - - /** - * @see assignIn - */ - assignIn( - source1: TSource1, - source2: TSource2 - ): LoDashExplicitObjectWrapper; - - /** - * @see assignIn - */ - assignIn( - source1: TSource1, - source2: TSource2, - source3: TSource3 - ): LoDashExplicitObjectWrapper; - - /** - * @see assignIn - */ - assignIn( - source1: TSource1, - source2: TSource2, - source3: TSource3, - source4: TSource4 - ): LoDashExplicitObjectWrapper; - - /** - * @see _.assignIn - */ - assignIn(): LoDashExplicitObjectWrapper; - - /** - * @see _.assignIn - */ - assignIn(...otherArgs: any[]): LoDashExplicitObjectWrapper; - } - - //_.assignInWith - interface AssignCustomizer { - (objectValue: any, sourceValue: any, key?: string, object?: {}, source?: {}): any; - } - - interface LoDashStatic { - /** - * This method is like `_.assignIn` except that it accepts `customizer` which - * is invoked to produce the assigned values. If `customizer` returns `undefined` - * assignment is handled by the method instead. The `customizer` is invoked - * with five arguments: (objValue, srcValue, key, object, source). - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @alias extendWith - * @category Object - * @param {Object} object The destination object. - * @param {...Object} sources The source objects. - * @param {Function} [customizer] The function to customize assigned values. - * @returns {Object} Returns `object`. - * @example - * - * function customizer(objValue, srcValue) { - * return _.isUndefined(objValue) ? srcValue : objValue; - * } - * - * var defaults = _.partialRight(_.assignInWith, customizer); - * - * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); - * // => { 'a': 1, 'b': 2 } - */ - assignInWith( - object: TObject, - source: TSource, - customizer: AssignCustomizer - ): TObject & TSource; - - /** - * @see assignInWith - */ - assignInWith( - object: TObject, - source1: TSource1, - source2: TSource2, - customizer: AssignCustomizer - ): TObject & TSource1 & TSource2; - - /** - * @see assignInWith - */ - assignInWith( - object: TObject, - source1: TSource1, - source2: TSource2, - source3: TSource3, - customizer: AssignCustomizer - ): TObject & TSource1 & TSource2 & TSource3; - - /** - * @see assignInWith - */ - assignInWith( - object: TObject, - source1: TSource1, - source2: TSource2, - source3: TSource3, - source4: TSource4, - customizer: AssignCustomizer - ): TObject & TSource1 & TSource2 & TSource3 & TSource4; - - /** - * @see _.assignInWith - */ - assignInWith(object: TObject): TObject; - - /** - * @see _.assignInWith - */ - assignInWith( - object: any, - ...otherArgs: any[] - ): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.assignInWith - */ - assignInWith( - source: TSource, - customizer: AssignCustomizer - ): LoDashImplicitObjectWrapper; - - /** - * @see assignInWith - */ - assignInWith( - source1: TSource1, - source2: TSource2, - customizer: AssignCustomizer - ): LoDashImplicitObjectWrapper; - - /** - * @see assignInWith - */ - assignInWith( - source1: TSource1, - source2: TSource2, - source3: TSource3, - customizer: AssignCustomizer - ): LoDashImplicitObjectWrapper; - - /** - * @see assignInWith - */ - assignInWith( - source1: TSource1, - source2: TSource2, - source3: TSource3, - source4: TSource4, - customizer: AssignCustomizer - ): LoDashImplicitObjectWrapper; - - /** - * @see _.assignInWith - */ - assignInWith(): LoDashImplicitObjectWrapper; - - /** - * @see _.assignInWith - */ - assignInWith(...otherArgs: any[]): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.assignInWith - */ - assignInWith( - source: TSource, - customizer: AssignCustomizer - ): LoDashExplicitObjectWrapper; - - /** - * @see assignInWith - */ - assignInWith( - source1: TSource1, - source2: TSource2, - customizer: AssignCustomizer - ): LoDashExplicitObjectWrapper; - - /** - * @see assignInWith - */ - assignInWith( - source1: TSource1, - source2: TSource2, - source3: TSource3, - customizer: AssignCustomizer - ): LoDashExplicitObjectWrapper; - - /** - * @see assignInWith - */ - assignInWith( - source1: TSource1, - source2: TSource2, - source3: TSource3, - source4: TSource4, - customizer: AssignCustomizer - ): LoDashExplicitObjectWrapper; - - /** - * @see _.assignInWith - */ - assignInWith(): LoDashExplicitObjectWrapper; - - /** - * @see _.assignInWith - */ - assignInWith(...otherArgs: any[]): LoDashExplicitObjectWrapper; - } - - //_.create - interface LoDashStatic { - /** - * Creates an object that inherits from the given prototype object. If a properties object is provided its own - * enumerable properties are assigned to the created object. - * - * @param prototype The object to inherit from. - * @param properties The properties to assign to the object. - * @return Returns the new object. - */ - create( - prototype: T, - properties?: U - ): T & U; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.create - */ - create(properties?: U): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.create - */ - create(properties?: U): LoDashExplicitObjectWrapper; - } - - - //_.defaults - interface LoDashStatic { - /** - * Assigns own enumerable properties of source object(s) to the destination object for all destination - * properties that resolve to undefined. Once a property is set, additional values of the same property are - * ignored. - * - * Note: This method mutates object. - * - * @param object The destination object. - * @param sources The source objects. - * @return The destination object. - */ - defaults( - object: TObject, - source: TSource - ): TSource & TObject; - - /** - * @see _.defaults - */ - defaults( - object: TObject, - source1: TSource1, - source2: TSource2 - ): TSource2 & TSource1 & TObject; - - /** - * @see _.defaults - */ - defaults( - object: TObject, - source1: TSource1, - source2: TSource2, - source3: TSource3 - ): TSource3 & TSource2 & TSource1 & TObject; - - /** - * @see _.defaults - */ - defaults( - object: TObject, - source1: TSource1, - source2: TSource2, - source3: TSource3, - source4: TSource4 - ): TSource4 & TSource3 & TSource2 & TSource1 & TObject; - - /** - * @see _.defaults - */ - defaults(object: TObject): TObject; - - /** - * @see _.defaults - */ - defaults( - object: any, - ...sources: any[] - ): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.defaults - */ - defaults( - source: TSource - ): LoDashImplicitObjectWrapper; - - /** - * @see _.defaults - */ - defaults( - source1: TSource1, - source2: TSource2 - ): LoDashImplicitObjectWrapper; - - /** - * @see _.defaults - */ - defaults( - source1: TSource1, - source2: TSource2, - source3: TSource3 - ): LoDashImplicitObjectWrapper; - - /** - * @see _.defaults - */ - defaults( - source1: TSource1, - source2: TSource2, - source3: TSource3, - source4: TSource4 - ): LoDashImplicitObjectWrapper; - - /** - * @see _.defaults - */ - defaults(): LoDashImplicitObjectWrapper; - - /** - * @see _.defaults - */ - defaults(...sources: any[]): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.defaults - */ - defaults( - source: TSource - ): LoDashExplicitObjectWrapper; - - /** - * @see _.defaults - */ - defaults( - source1: TSource1, - source2: TSource2 - ): LoDashExplicitObjectWrapper; - - /** - * @see _.defaults - */ - defaults( - source1: TSource1, - source2: TSource2, - source3: TSource3 - ): LoDashExplicitObjectWrapper; - - /** - * @see _.defaults - */ - defaults( - source1: TSource1, - source2: TSource2, - source3: TSource3, - source4: TSource4 - ): LoDashExplicitObjectWrapper; - - /** - * @see _.defaults - */ - defaults(): LoDashExplicitObjectWrapper; - - /** - * @see _.defaults - */ - defaults(...sources: any[]): LoDashExplicitObjectWrapper; - } - - //_.defaultsDeep - interface LoDashStatic { - /** - * This method is like _.defaults except that it recursively assigns default properties. - * @param object The destination object. - * @param sources The source objects. - * @return Returns object. - **/ - defaultsDeep( - object: T, - ...sources: any[]): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.defaultsDeep - **/ - defaultsDeep(...sources: any[]): LoDashImplicitObjectWrapper - } - - // _.extend - interface LoDashStatic { - /** - * @see _.assignIn - */ - extend( - object: TObject, - source: TSource - ): TObject & TSource; - - /** - * @see _.assignIn - */ - extend( - object: TObject, - source1: TSource1, - source2: TSource2 - ): TObject & TSource1 & TSource2; - - /** - * @see _.assignIn - */ - extend( - object: TObject, - source1: TSource1, - source2: TSource2, - source3: TSource3 - ): TObject & TSource1 & TSource2 & TSource3; - - /** - * @see _.assignIn - */ - extend( - object: TObject, - source1: TSource1, - source2: TSource2, - source3: TSource3, - source4: TSource4 - ): TObject & TSource1 & TSource2 & TSource3 & TSource4; - - /** - * @see _.assignIn - */ - extend(object: TObject): TObject; - - /** - * @see _.assignIn - */ - extend( - object: any, - ...otherArgs: any[] - ): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.assignIn - */ - extend( - source: TSource - ): LoDashImplicitObjectWrapper; - - /** - * @see _.assignIn - */ - extend( - source1: TSource1, - source2: TSource2 - ): LoDashImplicitObjectWrapper; - - /** - * @see _.assignIn - */ - extend( - source1: TSource1, - source2: TSource2, - source3: TSource3 - ): LoDashImplicitObjectWrapper; - - /** - * @see _.assignIn - */ - extend( - source1: TSource1, - source2: TSource2, - source3: TSource3, - source4: TSource4 - ): LoDashImplicitObjectWrapper; - - /** - * @see _.assignIn - */ - extend(): LoDashImplicitObjectWrapper; - - /** - * @see _.assignIn - */ - extend(...otherArgs: any[]): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.assignIn - */ - extend( - source: TSource - ): LoDashExplicitObjectWrapper; - - /** - * @see _.assignIn - */ - extend( - source1: TSource1, - source2: TSource2 - ): LoDashExplicitObjectWrapper; - - /** - * @see _.assignIn - */ - extend( - source1: TSource1, - source2: TSource2, - source3: TSource3 - ): LoDashExplicitObjectWrapper; - - /** - * @see _.assignIn - */ - extend( - source1: TSource1, - source2: TSource2, - source3: TSource3, - source4: TSource4 - ): LoDashExplicitObjectWrapper; - - /** - * @see _.assignIn - */ - extend(): LoDashExplicitObjectWrapper; - - /** - * @see _.assignIn - */ - extend(...otherArgs: any[]): LoDashExplicitObjectWrapper; - } - - interface LoDashStatic { - /** - * @see _.assignInWith - */ - extendWith( - object: TObject, - source: TSource, - customizer: AssignCustomizer - ): TObject & TSource; - - /** - * @see _.assignInWith - */ - extendWith( - object: TObject, - source1: TSource1, - source2: TSource2, - customizer: AssignCustomizer - ): TObject & TSource1 & TSource2; - - /** - * @see _.assignInWith - */ - extendWith( - object: TObject, - source1: TSource1, - source2: TSource2, - source3: TSource3, - customizer: AssignCustomizer - ): TObject & TSource1 & TSource2 & TSource3; - - /** - * @see _.assignInWith - */ - extendWith( - object: TObject, - source1: TSource1, - source2: TSource2, - source3: TSource3, - source4: TSource4, - customizer: AssignCustomizer - ): TObject & TSource1 & TSource2 & TSource3 & TSource4; - - /** - * @see _.assignInWith - */ - extendWith(object: TObject): TObject; - - /** - * @see _.assignInWith - */ - extendWith( - object: any, - ...otherArgs: any[] - ): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.assignInWith - */ - extendWith( - source: TSource, - customizer: AssignCustomizer - ): LoDashImplicitObjectWrapper; - - /** - * @see _.assignInWith - */ - extendWith( - source1: TSource1, - source2: TSource2, - customizer: AssignCustomizer - ): LoDashImplicitObjectWrapper; - - /** - * @see _.assignInWith - */ - extendWith( - source1: TSource1, - source2: TSource2, - source3: TSource3, - customizer: AssignCustomizer - ): LoDashImplicitObjectWrapper; - - /** - * @see _.assignInWith - */ - extendWith( - source1: TSource1, - source2: TSource2, - source3: TSource3, - source4: TSource4, - customizer: AssignCustomizer - ): LoDashImplicitObjectWrapper; - - /** - * @see _.assignInWith - */ - extendWith(): LoDashImplicitObjectWrapper; - - /** - * @see _.assignInWith - */ - extendWith(...otherArgs: any[]): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.assignInWith - */ - extendWith( - source: TSource, - customizer: AssignCustomizer - ): LoDashExplicitObjectWrapper; - - /** - * @see _.assignInWith - */ - extendWith( - source1: TSource1, - source2: TSource2, - customizer: AssignCustomizer - ): LoDashExplicitObjectWrapper; - - /** - * @see _.assignInWith - */ - extendWith( - source1: TSource1, - source2: TSource2, - source3: TSource3, - customizer: AssignCustomizer - ): LoDashExplicitObjectWrapper; - - /** - * @see _.assignInWith - */ - extendWith( - source1: TSource1, - source2: TSource2, - source3: TSource3, - source4: TSource4, - customizer: AssignCustomizer - ): LoDashExplicitObjectWrapper; - - /** - * @see _.assignInWith - */ - extendWith(): LoDashExplicitObjectWrapper; - - /** - * @see _.assignInWith - */ - extendWith(...otherArgs: any[]): LoDashExplicitObjectWrapper; - } - - //_.findKey - interface LoDashStatic { - /** - * This method is like _.find except that it returns the key of the first element predicate returns truthy for - * instead of the element itself. - * - * If a property name is provided for predicate the created _.property style callback returns the property - * value of the given element. - * - * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for - * elements that have a matching property value, else false. - * - * If an object is provided for predicate the created _.matches style callback returns true for elements that - * have the properties of the given object, else false. - * - * @param object The object to search. - * @param predicate The function invoked per iteration. - * @param thisArg The this binding of predicate. - * @return Returns the key of the matched element, else undefined. - */ - findKey( - object: TObject, - predicate?: DictionaryIterator - ): string; - - /** - * @see _.findKey - */ - findKey( - object: TObject, - predicate?: ObjectIterator - ): string; - - /** - * @see _.findKey - */ - findKey( - object: TObject, - predicate?: string - ): string; - - /** - * @see _.findKey - */ - findKey, TObject>( - object: TObject, - predicate?: TWhere - ): string; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.findKey - */ - findKey( - predicate?: DictionaryIterator - ): string; - - /** - * @see _.findKey - */ - findKey( - predicate?: ObjectIterator - ): string; - - /** - * @see _.findKey - */ - findKey( - predicate?: string - ): string; - - /** - * @see _.findKey - */ - findKey>( - predicate?: TWhere - ): string; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.findKey - */ - findKey( - predicate?: DictionaryIterator - ): LoDashExplicitWrapper; - - /** - * @see _.findKey - */ - findKey( - predicate?: ObjectIterator - ): LoDashExplicitWrapper; - - /** - * @see _.findKey - */ - findKey( - predicate?: string - ): LoDashExplicitWrapper; - - /** - * @see _.findKey - */ - findKey>( - predicate?: TWhere - ): LoDashExplicitWrapper; - } - - //_.findLastKey - interface LoDashStatic { - /** - * This method is like _.findKey except that it iterates over elements of a collection in the opposite order. - * - * If a property name is provided for predicate the created _.property style callback returns the property - * value of the given element. - * - * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for - * elements that have a matching property value, else false. - * - * If an object is provided for predicate the created _.matches style callback returns true for elements that - * have the properties of the given object, else false. - * - * @param object The object to search. - * @param predicate The function invoked per iteration. - * @param thisArg The this binding of predicate. - * @return Returns the key of the matched element, else undefined. - */ - findLastKey( - object: TObject, - predicate?: DictionaryIterator - ): string; - - /** - * @see _.findLastKey - */ - findLastKey( - object: TObject, - predicate?: ObjectIterator - ): string; - - /** - * @see _.findLastKey - */ - findLastKey( - object: TObject, - predicate?: string - ): string; - - /** - * @see _.findLastKey - */ - findLastKey, TObject>( - object: TObject, - predicate?: TWhere - ): string; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.findLastKey - */ - findLastKey( - predicate?: DictionaryIterator - ): string; - - /** - * @see _.findLastKey - */ - findLastKey( - predicate?: ObjectIterator - ): string; - - /** - * @see _.findLastKey - */ - findLastKey( - predicate?: string - ): string; - - /** - * @see _.findLastKey - */ - findLastKey>( - predicate?: TWhere - ): string; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.findLastKey - */ - findLastKey( - predicate?: DictionaryIterator - ): LoDashExplicitWrapper; - - /** - * @see _.findLastKey - */ - findLastKey( - predicate?: ObjectIterator - ): LoDashExplicitWrapper; - - /** - * @see _.findLastKey - */ - findLastKey( - predicate?: string - ): LoDashExplicitWrapper; - - /** - * @see _.findLastKey - */ - findLastKey>( - predicate?: TWhere - ): LoDashExplicitWrapper; - } - - //_.forIn - interface LoDashStatic { - /** - * Iterates over own and inherited enumerable properties of an object invoking iteratee for each property. The - * iteratee is bound to thisArg and invoked with three arguments: (value, key, object). Iteratee functions may - * exit iteration early by explicitly returning false. - * - * @param object The object to iterate over. - * @param iteratee The function invoked per iteration. - * @param thisArg The this binding of iteratee. - * @return Returns object. - */ - forIn( - object: Dictionary, - iteratee?: DictionaryIterator - ): Dictionary; - - /** - * @see _.forIn - */ - forIn( - object: T, - iteratee?: ObjectIterator - ): T; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.forIn - */ - forIn( - iteratee?: DictionaryIterator - ): _.LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.forIn - */ - forIn( - iteratee?: DictionaryIterator - ): _.LoDashExplicitObjectWrapper; - } - - //_.forInRight - interface LoDashStatic { - /** - * This method is like _.forIn except that it iterates over properties of object in the opposite order. - * - * @param object The object to iterate over. - * @param iteratee The function invoked per iteration. - * @param thisArg The this binding of iteratee. - * @return Returns object. - */ - forInRight( - object: Dictionary, - iteratee?: DictionaryIterator - ): Dictionary; - - /** - * @see _.forInRight - */ - forInRight( - object: T, - iteratee?: ObjectIterator - ): T; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.forInRight - */ - forInRight( - iteratee?: DictionaryIterator - ): _.LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.forInRight - */ - forInRight( - iteratee?: DictionaryIterator - ): _.LoDashExplicitObjectWrapper; - } - - //_.forOwn - interface LoDashStatic { - /** - * Iterates over own enumerable properties of an object invoking iteratee for each property. The iteratee is - * bound to thisArg and invoked with three arguments: (value, key, object). Iteratee functions may exit - * iteration early by explicitly returning false. - * - * @param object The object to iterate over. - * @param iteratee The function invoked per iteration. - * @param thisArg The this binding of iteratee. - * @return Returns object. - */ - forOwn( - object: Dictionary, - iteratee?: DictionaryIterator - ): Dictionary; - - /** - * @see _.forOwn - */ - forOwn( - object: T, - iteratee?: ObjectIterator - ): T; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.forOwn - */ - forOwn( - iteratee?: DictionaryIterator - ): _.LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.forOwn - */ - forOwn( - iteratee?: DictionaryIterator - ): _.LoDashExplicitObjectWrapper; - } - - //_.forOwnRight - interface LoDashStatic { - /** - * This method is like _.forOwn except that it iterates over properties of object in the opposite order. - * - * @param object The object to iterate over. - * @param iteratee The function invoked per iteration. - * @param thisArg The this binding of iteratee. - * @return Returns object. - */ - forOwnRight( - object: Dictionary, - iteratee?: DictionaryIterator - ): Dictionary; - - /** - * @see _.forOwnRight - */ - forOwnRight( - object: T, - iteratee?: ObjectIterator - ): T; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.forOwnRight - */ - forOwnRight( - iteratee?: DictionaryIterator - ): _.LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.forOwnRight - */ - forOwnRight( - iteratee?: DictionaryIterator - ): _.LoDashExplicitObjectWrapper; - } - - //_.functions - interface LoDashStatic { - /** - * Creates an array of function property names from own enumerable properties - * of `object`. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to inspect. - * @returns {Array} Returns the new array of property names. - * @example - * - * function Foo() { - * this.a = _.constant('a'); - * this.b = _.constant('b'); - * } - * - * Foo.prototype.c = _.constant('c'); - * - * _.functions(new Foo); - * // => ['a', 'b'] - */ - functions(object: any): string[]; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.functions - */ - functions(): _.LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.functions - */ - functions(): _.LoDashExplicitArrayWrapper; - } - - //_.functionsIn - interface LoDashStatic { - /** - * Creates an array of function property names from own and inherited - * enumerable properties of `object`. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to inspect. - * @returns {Array} Returns the new array of property names. - * @example - * - * function Foo() { - * this.a = _.constant('a'); - * this.b = _.constant('b'); - * } - * - * Foo.prototype.c = _.constant('c'); - * - * _.functionsIn(new Foo); - * // => ['a', 'b', 'c'] - */ - functionsIn(object: any): string[]; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.functionsIn - */ - functionsIn(): _.LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.functionsIn - */ - functionsIn(): _.LoDashExplicitArrayWrapper; - } - - //_.get - interface LoDashStatic { - /** - * Gets the property value at path of object. If the resolved value is undefined the defaultValue is used - * in its place. - * - * @param object The object to query. - * @param path The path of the property to get. - * @param defaultValue The value returned if the resolved value is undefined. - * @return Returns the resolved value. - */ - get( - object: TObject, - path: StringRepresentable|StringRepresentable[], - defaultValue?: TResult - ): TResult; - - /** - * @see _.get - */ - get( - object: any, - path: StringRepresentable|StringRepresentable[], - defaultValue?: TResult - ): TResult; - } - - interface LoDashImplicitWrapper { - /** - * @see _.get - */ - get( - path: StringRepresentable|StringRepresentable[], - defaultValue?: TResult - ): TResult; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.get - */ - get( - path: StringRepresentable|StringRepresentable[], - defaultValue?: TResult - ): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.get - */ - get( - path: StringRepresentable|StringRepresentable[], - defaultValue?: TResult - ): TResult; - } - - interface LoDashExplicitWrapper { - /** - * @see _.get - */ - get( - path: StringRepresentable|StringRepresentable[], - defaultValue?: any - ): TResultWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.get - */ - get( - path: StringRepresentable|StringRepresentable[], - defaultValue?: any - ): TResultWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.get - */ - get( - path: StringRepresentable|StringRepresentable[], - defaultValue?: any - ): TResultWrapper; - } - - //_.has - interface LoDashStatic { - /** - * Checks if `path` is a direct property of `object`. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @returns {boolean} Returns `true` if `path` exists, else `false`. - * @example - * - * var object = { 'a': { 'b': { 'c': 3 } } }; - * var other = _.create({ 'a': _.create({ 'b': _.create({ 'c': 3 }) }) }); - * - * _.has(object, 'a'); - * // => true - * - * _.has(object, 'a.b.c'); - * // => true - * - * _.has(object, ['a', 'b', 'c']); - * // => true - * - * _.has(other, 'a'); - * // => false - */ - has( - object: T, - path: StringRepresentable|StringRepresentable[] - ): boolean; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.has - */ - has(path: StringRepresentable|StringRepresentable[]): boolean; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.has - */ - has(path: StringRepresentable|StringRepresentable[]): LoDashExplicitWrapper; - } - - //_.hasIn - interface LoDashStatic { - /** - * Checks if `path` is a direct or inherited property of `object`. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @returns {boolean} Returns `true` if `path` exists, else `false`. - * @example - * - * var object = _.create({ 'a': _.create({ 'b': _.create({ 'c': 3 }) }) }); - * - * _.hasIn(object, 'a'); - * // => true - * - * _.hasIn(object, 'a.b.c'); - * // => true - * - * _.hasIn(object, ['a', 'b', 'c']); - * // => true - * - * _.hasIn(object, 'b'); - * // => false - */ - hasIn( - object: T, - path: StringRepresentable|StringRepresentable[] - ): boolean; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.hasIn - */ - hasIn(path: StringRepresentable|StringRepresentable[]): boolean; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.hasIn - */ - hasIn(path: StringRepresentable|StringRepresentable[]): LoDashExplicitWrapper; - } - - //_.invert - interface LoDashStatic { - /** - * Creates an object composed of the inverted keys and values of object. If object contains duplicate values, - * subsequent values overwrite property assignments of previous values unless multiValue is true. - * - * @param object The object to invert. - * @param multiValue Allow multiple values per key. - * @return Returns the new inverted object. - */ - invert( - object: T, - multiValue?: boolean - ): TResult; - - /** - * @see _.invert - */ - invert( - object: Object, - multiValue?: boolean - ): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.invert - */ - invert(multiValue?: boolean): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.invert - */ - invert(multiValue?: boolean): LoDashExplicitObjectWrapper; - } - - //_.inverBy - interface InvertByIterator { - (value: T): any; - } - - interface LoDashStatic { - /** - * This method is like _.invert except that the inverted object is generated from the results of running each - * element of object through iteratee. The corresponding inverted value of each inverted key is an array of - * keys responsible for generating the inverted value. The iteratee is invoked with one argument: (value). - * - * @param object The object to invert. - * @param interatee The iteratee invoked per element. - * @return Returns the new inverted object. - */ - invertBy( - object: Object, - interatee?: InvertByIterator|string - ): Dictionary; - - /** - * @see _.invertBy - */ - invertBy( - object: _.Dictionary|_.NumericDictionary, - interatee?: InvertByIterator|string - ): Dictionary; - - /** - * @see _.invertBy - */ - invertBy( - object: Object, - interatee?: W - ): Dictionary; - - /** - * @see _.invertBy - */ - invertBy( - object: _.Dictionary, - interatee?: W - ): Dictionary; - } - - interface LoDashImplicitWrapper { - /** - * @see _.invertBy - */ - invertBy( - interatee?: InvertByIterator - ): LoDashImplicitObjectWrapper>; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.invertBy - */ - invertBy( - interatee?: InvertByIterator|string - ): LoDashImplicitObjectWrapper>; - - /** - * @see _.invertBy - */ - invertBy( - interatee?: W - ): LoDashImplicitObjectWrapper>; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.invertBy - */ - invertBy( - interatee?: InvertByIterator|string - ): LoDashImplicitObjectWrapper>; - - /** - * @see _.invertBy - */ - invertBy( - interatee?: W - ): LoDashImplicitObjectWrapper>; - } - - interface LoDashExplicitWrapper { - /** - * @see _.invertBy - */ - invertBy( - interatee?: InvertByIterator - ): LoDashExplicitObjectWrapper>; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.invertBy - */ - invertBy( - interatee?: InvertByIterator|string - ): LoDashExplicitObjectWrapper>; - - /** - * @see _.invertBy - */ - invertBy( - interatee?: W - ): LoDashExplicitObjectWrapper>; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.invertBy - */ - invertBy( - interatee?: InvertByIterator|string - ): LoDashExplicitObjectWrapper>; - - /** - * @see _.invertBy - */ - invertBy( - interatee?: W - ): LoDashExplicitObjectWrapper>; - } - - //_.keys - interface LoDashStatic { - /** - * Creates an array of the own enumerable property names of object. - * - * Note: Non-object values are coerced to objects. See the ES spec for more details. - * - * @param object The object to query. - * @return Returns the array of property names. - */ - keys(object?: any): string[]; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.keys - */ - keys(): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.keys - */ - keys(): LoDashExplicitArrayWrapper; - } - - //_.keysIn - interface LoDashStatic { - /** - * Creates an array of the own and inherited enumerable property names of object. - * - * Note: Non-object values are coerced to objects. - * - * @param object The object to query. - * @return An array of property names. - */ - keysIn(object?: any): string[]; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.keysIn - */ - keysIn(): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.keysIn - */ - keysIn(): LoDashExplicitArrayWrapper; - } - - //_.mapKeys - interface LoDashStatic { - /** - * The opposite of _.mapValues; this method creates an object with the same values as object and keys generated - * by running each own enumerable property of object through iteratee. - * - * @param object The object to iterate over. - * @param iteratee The function invoked per iteration. - * @param thisArg The this binding of iteratee. - * @return Returns the new mapped object. - */ - mapKeys( - object: List, - iteratee?: ListIterator - ): Dictionary; - - /** - * @see _.mapKeys - */ - mapKeys( - object: Dictionary, - iteratee?: DictionaryIterator - ): Dictionary; - - /** - * @see _.mapKeys - */ - mapKeys( - object: List|Dictionary, - iteratee?: TObject - ): Dictionary; - - /** - * @see _.mapKeys - */ - mapKeys( - object: List|Dictionary, - iteratee?: string - ): Dictionary; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.mapKeys - */ - mapKeys( - iteratee?: ListIterator - ): LoDashImplicitObjectWrapper>; - - /** - * @see _.mapKeys - */ - mapKeys( - iteratee?: TObject - ): LoDashImplicitObjectWrapper>; - - /** - * @see _.mapKeys - */ - mapKeys( - iteratee?: string - ): LoDashImplicitObjectWrapper>; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.mapKeys - */ - mapKeys( - iteratee?: ListIterator|DictionaryIterator - ): LoDashImplicitObjectWrapper>; - - /** - * @see _.mapKeys - */ - mapKeys( - iteratee?: TObject - ): LoDashImplicitObjectWrapper>; - - /** - * @see _.mapKeys - */ - mapKeys( - iteratee?: string - ): LoDashImplicitObjectWrapper>; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.mapKeys - */ - mapKeys( - iteratee?: ListIterator - ): LoDashExplicitObjectWrapper>; - - /** - * @see _.mapKeys - */ - mapKeys( - iteratee?: TObject - ): LoDashExplicitObjectWrapper>; - - /** - * @see _.mapKeys - */ - mapKeys( - iteratee?: string - ): LoDashExplicitObjectWrapper>; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.mapKeys - */ - mapKeys( - iteratee?: ListIterator|DictionaryIterator - ): LoDashExplicitObjectWrapper>; - - /** - * @see _.mapKeys - */ - mapKeys( - iteratee?: TObject - ): LoDashExplicitObjectWrapper>; - - /** - * @see _.mapKeys - */ - mapKeys( - iteratee?: string - ): LoDashExplicitObjectWrapper>; - } - - //_.mapValues - interface LoDashStatic { - /** - * Creates an object with the same keys as object and values generated by running each own - * enumerable property of object through iteratee. The iteratee function is bound to thisArg - * and invoked with three arguments: (value, key, object). - * - * If a property name is provided iteratee the created "_.property" style callback returns - * the property value of the given element. - * - * If a value is also provided for thisArg the creted "_.matchesProperty" style callback returns - * true for elements that have a matching property value, else false;. - * - * If an object is provided for iteratee the created "_.matches" style callback returns true - * for elements that have the properties of the given object, else false. - * - * @param {Object} object The object to iterate over. - * @param {Function|Object|string} [iteratee=_.identity] The function invoked per iteration. - * @param {Object} [thisArg] The `this` binding of `iteratee`. - * @return {Object} Returns the new mapped object. - */ - mapValues(obj: Dictionary, callback: ObjectIterator): Dictionary; - mapValues(obj: Dictionary, where: Dictionary): Dictionary; - mapValues(obj: T, pluck: string): TMapped; - mapValues(obj: T, callback: ObjectIterator): T; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.mapValues - * TValue is the type of the property values of T. - * TResult is the type output by the ObjectIterator function - */ - mapValues(callback: ObjectIterator): LoDashImplicitObjectWrapper>; - - /** - * @see _.mapValues - * TResult is the type of the property specified by pluck. - * T should be a Dictionary> - */ - mapValues(pluck: string): LoDashImplicitObjectWrapper>; - - /** - * @see _.mapValues - * TResult is the type of the properties of each object in the values of T - * T should be a Dictionary> - */ - mapValues(where: Dictionary): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.mapValues - * TValue is the type of the property values of T. - * TResult is the type output by the ObjectIterator function - */ - mapValues(callback: ObjectIterator): LoDashExplicitObjectWrapper>; - - /** - * @see _.mapValues - * TResult is the type of the property specified by pluck. - * T should be a Dictionary> - */ - mapValues(pluck: string): LoDashExplicitObjectWrapper>; - - /** - * @see _.mapValues - * TResult is the type of the properties of each object in the values of T - * T should be a Dictionary> - */ - mapValues(where: Dictionary): LoDashExplicitObjectWrapper; - } - - //_.merge - interface LoDashStatic { - /** - * Recursively merges own and inherited enumerable properties of source - * objects into the destination object, skipping source properties that resolve - * to `undefined`. Array and plain object properties are merged recursively. - * Other objects and value types are overridden by assignment. Source objects - * are applied from left to right. Subsequent sources overwrite property - * assignments of previous sources. - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @example - * - * var users = { - * 'data': [{ 'user': 'barney' }, { 'user': 'fred' }] - * }; - * - * var ages = { - * 'data': [{ 'age': 36 }, { 'age': 40 }] - * }; - * - * _.merge(users, ages); - * // => { 'data': [{ 'user': 'barney', 'age': 36 }, { 'user': 'fred', 'age': 40 }] } - */ - merge( - object: TObject, - source: TSource - ): TObject & TSource; - - /** - * @see _.merge - */ - merge( - object: TObject, - source1: TSource1, - source2: TSource2 - ): TObject & TSource1 & TSource2; - - /** - * @see _.merge - */ - merge( - object: TObject, - source1: TSource1, - source2: TSource2, - source3: TSource3 - ): TObject & TSource1 & TSource2 & TSource3; - - /** - * @see _.merge - */ - merge( - object: TObject, - source1: TSource1, - source2: TSource2, - source3: TSource3, - source4: TSource4 - ): TObject & TSource1 & TSource2 & TSource3 & TSource4; - - /** - * @see _.merge - */ - merge( - object: any, - ...otherArgs: any[] - ): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.merge - */ - merge( - source: TSource - ): LoDashImplicitObjectWrapper; - - /** - * @see _.merge - */ - merge( - source1: TSource1, - source2: TSource2 - ): LoDashImplicitObjectWrapper; - - /** - * @see _.merge - */ - merge( - source1: TSource1, - source2: TSource2, - source3: TSource3 - ): LoDashImplicitObjectWrapper; - - /** - * @see _.merge - */ - merge( - source1: TSource1, - source2: TSource2, - source3: TSource3, - source4: TSource4 - ): LoDashImplicitObjectWrapper; - - /** - * @see _.merge - */ - merge( - ...otherArgs: any[] - ): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.merge - */ - merge( - source: TSource - ): LoDashExplicitObjectWrapper; - - /** - * @see _.merge - */ - merge( - source1: TSource1, - source2: TSource2 - ): LoDashExplicitObjectWrapper; - - /** - * @see _.merge - */ - merge( - source1: TSource1, - source2: TSource2, - source3: TSource3 - ): LoDashExplicitObjectWrapper; - - /** - * @see _.merge - */ - merge( - ): LoDashExplicitObjectWrapper; - - /** - * @see _.merge - */ - merge( - ...otherArgs: any[] - ): LoDashExplicitObjectWrapper; - } - - //_.mergeWith - interface MergeWithCustomizer { - (value: any, srcValue: any, key?: string, object?: Object, source?: Object): any; - } - - interface LoDashStatic { - /** - * This method is like `_.merge` except that it accepts `customizer` which - * is invoked to produce the merged values of the destination and source - * properties. If `customizer` returns `undefined` merging is handled by the - * method instead. The `customizer` is invoked with seven arguments: - * (objValue, srcValue, key, object, source, stack). - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The destination object. - * @param {...Object} sources The source objects. - * @param {Function} customizer The function to customize assigned values. - * @returns {Object} Returns `object`. - * @example - * - * function customizer(objValue, srcValue) { - * if (_.isArray(objValue)) { - * return objValue.concat(srcValue); - * } - * } - * - * var object = { - * 'fruits': ['apple'], - * 'vegetables': ['beet'] - * }; - * - * var other = { - * 'fruits': ['banana'], - * 'vegetables': ['carrot'] - * }; - * - * _.merge(object, other, customizer); - * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot'] } - */ - mergeWith( - object: TObject, - source: TSource, - customizer: MergeWithCustomizer - ): TObject & TSource; - - /** - * @see _.mergeWith - */ - mergeWith( - object: TObject, - source1: TSource1, - source2: TSource2, - customizer: MergeWithCustomizer - ): TObject & TSource1 & TSource2; - - /** - * @see _.mergeWith - */ - mergeWith( - object: TObject, - source1: TSource1, - source2: TSource2, - source3: TSource3, - customizer: MergeWithCustomizer - ): TObject & TSource1 & TSource2 & TSource3; - - /** - * @see _.mergeWith - */ - mergeWith( - object: TObject, - source1: TSource1, - source2: TSource2, - source3: TSource3, - source4: TSource4, - customizer: MergeWithCustomizer - ): TObject & TSource1 & TSource2 & TSource3 & TSource4; - - /** - * @see _.mergeWith - */ - mergeWith( - object: any, - ...otherArgs: any[] - ): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.mergeWith - */ - mergeWith( - source: TSource, - customizer: MergeWithCustomizer - ): LoDashImplicitObjectWrapper; - - /** - * @see _.mergeWith - */ - mergeWith( - source1: TSource1, - source2: TSource2, - customizer: MergeWithCustomizer - ): LoDashImplicitObjectWrapper; - - /** - * @see _.mergeWith - */ - mergeWith( - source1: TSource1, - source2: TSource2, - source3: TSource3, - customizer: MergeWithCustomizer - ): LoDashImplicitObjectWrapper; - - /** - * @see _.mergeWith - */ - mergeWith( - source1: TSource1, - source2: TSource2, - source3: TSource3, - source4: TSource4, - customizer: MergeWithCustomizer - ): LoDashImplicitObjectWrapper; - - /** - * @see _.mergeWith - */ - mergeWith( - ...otherArgs: any[] - ): LoDashImplicitObjectWrapper; - } - - //_.omit - interface LoDashStatic { - /** - * The opposite of `_.pick`; this method creates an object composed of the - * own and inherited enumerable properties of `object` that are not omitted. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The source object. - * @param {...(string|string[])} [props] The property names to omit, specified - * individually or in arrays.. - * @returns {Object} Returns the new object. - * @example - * - * var object = { 'a': 1, 'b': '2', 'c': 3 }; - * - * _.omit(object, ['a', 'c']); - * // => { 'b': '2' } - */ - - omit( - object: T, - ...predicate: (StringRepresentable|StringRepresentable[])[] - ): TResult; - } - - interface LoDashImplicitObjectWrapper { - - /** - * @see _.omit - */ - omit( - ...predicate: (StringRepresentable|StringRepresentable[])[] - ): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - - /** - * @see _.omit - */ - omit( - ...predicate: (StringRepresentable|StringRepresentable[])[] - ): LoDashExplicitObjectWrapper; - } - - //_.omitBy - interface LoDashStatic { - /** - * The opposite of `_.pickBy`; this method creates an object composed of the - * own and inherited enumerable properties of `object` that `predicate` - * doesn't return truthy for. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The source object. - * @param {Function|Object|string} [predicate=_.identity] The function invoked per property. - * @returns {Object} Returns the new object. - * @example - * - * var object = { 'a': 1, 'b': '2', 'c': 3 }; - * - * _.omitBy(object, _.isNumber); - * // => { 'b': '2' } - */ - omitBy( - object: T, - predicate: ObjectIterator - ): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.omitBy - */ - omitBy( - predicate: ObjectIterator - ): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.omitBy - */ - omitBy( - predicate: ObjectIterator - ): LoDashExplicitObjectWrapper; - } - - //_.pick - interface LoDashStatic { - /** - * Creates an object composed of the picked `object` properties. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The source object. - * @param {...(string|string[])} [props] The property names to pick, specified - * individually or in arrays. - * @returns {Object} Returns the new object. - * @example - * - * var object = { 'a': 1, 'b': '2', 'c': 3 }; - * - * _.pick(object, ['a', 'c']); - * // => { 'a': 1, 'c': 3 } - */ - pick( - object: T, - ...predicate: (StringRepresentable|StringRepresentable[])[] - ): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.pick - */ - pick( - ...predicate: (StringRepresentable|StringRepresentable[])[] - ): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.pick - */ - pick( - ...predicate: (StringRepresentable|StringRepresentable[])[] - ): LoDashExplicitObjectWrapper; - } - - //_.pickBy - interface LoDashStatic { - /** - * Creates an object composed of the `object` properties `predicate` returns - * truthy for. The predicate is invoked with one argument: (value). - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The source object. - * @param {Function|Object|string} [predicate=_.identity] The function invoked per property. - * @returns {Object} Returns the new object. - * @example - * - * var object = { 'a': 1, 'b': '2', 'c': 3 }; - * - * _.pickBy(object, _.isNumber); - * // => { 'a': 1, 'c': 3 } - */ - pickBy( - object: T, - predicate?: ObjectIterator - ): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.pickBy - */ - pickBy( - predicate?: ObjectIterator - ): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.pickBy - */ - pickBy( - predicate?: ObjectIterator - ): LoDashExplicitObjectWrapper; - } - - //_.result - interface LoDashStatic { - /** - * This method is like _.get except that if the resolved value is a function it’s invoked with the this binding - * of its parent object and its result is returned. - * - * @param object The object to query. - * @param path The path of the property to resolve. - * @param defaultValue The value returned if the resolved value is undefined. - * @return Returns the resolved value. - */ - result( - object: TObject, - path: StringRepresentable|StringRepresentable[], - defaultValue?: TResult|((...args: any[]) => TResult) - ): TResult; - - /** - * @see _.result - */ - result( - object: any, - path: StringRepresentable|StringRepresentable[], - defaultValue?: TResult|((...args: any[]) => TResult) - ): TResult; - } - - interface LoDashImplicitWrapper { - /** - * @see _.result - */ - result( - path: StringRepresentable|StringRepresentable[], - defaultValue?: TResult|((...args: any[]) => TResult) - ): TResult; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.result - */ - result( - path: StringRepresentable|StringRepresentable[], - defaultValue?: TResult|((...args: any[]) => TResult) - ): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.result - */ - result( - path: StringRepresentable|StringRepresentable[], - defaultValue?: TResult|((...args: any[]) => TResult) - ): TResult; - } - - interface LoDashExplicitWrapper { - /** - * @see _.result - */ - result( - path: StringRepresentable|StringRepresentable[], - defaultValue?: any - ): TResultWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.result - */ - result( - path: StringRepresentable|StringRepresentable[], - defaultValue?: any - ): TResultWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.result - */ - result( - path: StringRepresentable|StringRepresentable[], - defaultValue?: any - ): TResultWrapper; - } - - //_.set - interface LoDashStatic { - /** - * Sets the value at path of object. If a portion of path doesn’t exist it’s created. Arrays are created for - * missing index properties while objects are created for all other missing properties. Use _.setWith to - * customize path creation. - * - * @param object The object to modify. - * @param path The path of the property to set. - * @param value The value to set. - * @return Returns object. - */ - set( - object: Object, - path: StringRepresentable|StringRepresentable[], - value: any - ): TResult; - - /** - * @see _.set - */ - set( - object: Object, - path: StringRepresentable|StringRepresentable[], - value: V - ): TResult; - - /** - * @see _.set - */ - set( - object: O, - path: StringRepresentable|StringRepresentable[], - value: V - ): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.set - */ - set( - path: StringRepresentable|StringRepresentable[], - value: any - ): LoDashImplicitObjectWrapper; - - /** - * @see _.set - */ - set( - path: StringRepresentable|StringRepresentable[], - value: V - ): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.set - */ - set( - path: StringRepresentable|StringRepresentable[], - value: any - ): LoDashExplicitObjectWrapper; - - /** - * @see _.set - */ - set( - path: StringRepresentable|StringRepresentable[], - value: V - ): LoDashExplicitObjectWrapper; - } - - //_.setWith - interface SetWithCustomizer { - (nsValue: any, key: string, nsObject: T): any; - } - - interface LoDashStatic { - /** - * This method is like _.set except that it accepts customizer which is invoked to produce the objects of - * path. If customizer returns undefined path creation is handled by the method instead. The customizer is - * invoked with three arguments: (nsValue, key, nsObject). - * - * @param object The object to modify. - * @param path The path of the property to set. - * @param value The value to set. - * @parem customizer The function to customize assigned values. - * @return Returns object. - */ - setWith( - object: Object, - path: StringRepresentable|StringRepresentable[], - value: any, - customizer?: SetWithCustomizer - ): TResult; - - /** - * @see _.setWith - */ - setWith( - object: Object, - path: StringRepresentable|StringRepresentable[], - value: V, - customizer?: SetWithCustomizer - ): TResult; - - /** - * @see _.setWith - */ - setWith( - object: O, - path: StringRepresentable|StringRepresentable[], - value: V, - customizer?: SetWithCustomizer - ): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.setWith - */ - setWith( - path: StringRepresentable|StringRepresentable[], - value: any, - customizer?: SetWithCustomizer - ): LoDashImplicitObjectWrapper; - - /** - * @see _.setWith - */ - setWith( - path: StringRepresentable|StringRepresentable[], - value: V, - customizer?: SetWithCustomizer - ): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.setWith - */ - setWith( - path: StringRepresentable|StringRepresentable[], - value: any, - customizer?: SetWithCustomizer - ): LoDashExplicitObjectWrapper; - - /** - * @see _.setWith - */ - setWith( - path: StringRepresentable|StringRepresentable[], - value: V, - customizer?: SetWithCustomizer - ): LoDashExplicitObjectWrapper; - } - - //_.toPairs - interface LoDashStatic { - /** - * Creates an array of own enumerable key-value pairs for object. - * - * @param object The object to query. - * @return Returns the new array of key-value pairs. - */ - toPairs(object?: T): any[][]; - - toPairs(object?: T): TResult[][]; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.toPairs - */ - toPairs(): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.toPairs - */ - toPairs(): LoDashExplicitArrayWrapper; - } - - //_.toPairsIn - interface LoDashStatic { - /** - * Creates an array of own and inherited enumerable key-value pairs for object. - * - * @param object The object to query. - * @return Returns the new array of key-value pairs. - */ - toPairsIn(object?: T): any[][]; - - toPairsIn(object?: T): TResult[][]; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.toPairsIn - */ - toPairsIn(): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.toPairsIn - */ - toPairsIn(): LoDashExplicitArrayWrapper; - } - - //_.transform - interface LoDashStatic { - /** - * An alternative to _.reduce; this method transforms object to a new accumulator object which is the result of - * running each of its own enumerable properties through iteratee, with each invocation potentially mutating - * the accumulator object. The iteratee is bound to thisArg and invoked with four arguments: (accumulator, - * value, key, object). Iteratee functions may exit iteration early by explicitly returning false. - * - * @param object The object to iterate over. - * @param iteratee The function invoked per iteration. - * @param accumulator The custom accumulator value. - * @param thisArg The this binding of iteratee. - * @return Returns the accumulated value. - */ - transform( - object: T[], - iteratee?: MemoVoidArrayIterator, - accumulator?: TResult[] - ): TResult[]; - - /** - * @see _.transform - */ - transform( - object: T[], - iteratee?: MemoVoidArrayIterator>, - accumulator?: Dictionary - ): Dictionary; - - /** - * @see _.transform - */ - transform( - object: Dictionary, - iteratee?: MemoVoidDictionaryIterator>, - accumulator?: Dictionary - ): Dictionary; - - /** - * @see _.transform - */ - transform( - object: Dictionary, - iteratee?: MemoVoidDictionaryIterator, - accumulator?: TResult[] - ): TResult[]; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.transform - */ - transform( - iteratee?: MemoVoidArrayIterator, - accumulator?: TResult[] - ): LoDashImplicitArrayWrapper; - - /** - * @see _.transform - */ - transform( - iteratee?: MemoVoidArrayIterator>, - accumulator?: Dictionary - ): LoDashImplicitObjectWrapper>; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.transform - */ - transform( - iteratee?: MemoVoidDictionaryIterator>, - accumulator?: Dictionary - ): LoDashImplicitObjectWrapper>; - - /** - * @see _.transform - */ - transform( - iteratee?: MemoVoidDictionaryIterator, - accumulator?: TResult[] - ): LoDashImplicitArrayWrapper; - } - - //_.unset - interface LoDashStatic { - /** - * Removes the property at path of object. - * - * Note: This method mutates object. - * - * @param object The object to modify. - * @param path The path of the property to unset. - * @return Returns true if the property is deleted, else false. - */ - unset( - object: T, - path: StringRepresentable|StringRepresentable[] - ): boolean; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.unset - */ - unset(path: StringRepresentable|StringRepresentable[]): LoDashImplicitWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.unset - */ - unset(path: StringRepresentable|StringRepresentable[]): LoDashExplicitWrapper; - } - - //_.update - interface LoDashStatic { - /** - * This method is like _.set except that accepts updater to produce the value to set. Use _.updateWith to - * customize path creation. The updater is invoked with one argument: (value). - * - * @param object The object to modify. - * @param path The path of the property to set. - * @param updater The function to produce the updated value. - * @return Returns object. - */ - update( - object: Object, - path: StringRepresentable|StringRepresentable[], - updater: Function - ): TResult; - - /** - * @see _.update - */ - update( - object: Object, - path: StringRepresentable|StringRepresentable[], - updater: U - ): TResult; - - /** - * @see _.update - */ - update( - object: O, - path: StringRepresentable|StringRepresentable[], - updater: Function - ): TResult; - - /** - * @see _.update - */ - update( - object: O, - path: StringRepresentable|StringRepresentable[], - updater: U - ): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.update - */ - update( - path: StringRepresentable|StringRepresentable[], - updater: any - ): LoDashImplicitObjectWrapper; - - /** - * @see _.update - */ - update( - path: StringRepresentable|StringRepresentable[], - updater: U - ): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.update - */ - update( - path: StringRepresentable|StringRepresentable[], - updater: any - ): LoDashExplicitObjectWrapper; - - /** - * @see _.update - */ - update( - path: StringRepresentable|StringRepresentable[], - updater: U - ): LoDashExplicitObjectWrapper; - } - - //_.values - interface LoDashStatic { - /** - * Creates an array of the own enumerable property values of object. - * - * @param object The object to query. - * @return Returns an array of property values. - */ - values(object?: Dictionary): T[]; - - /** - * @see _.values - */ - values(object?: any): T[]; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.values - */ - values(): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.values - */ - values(): LoDashExplicitArrayWrapper; - } - - //_.valuesIn - interface LoDashStatic { - /** - * Creates an array of the own and inherited enumerable property values of object. - * - * @param object The object to query. - * @return Returns the array of property values. - */ - valuesIn(object?: Dictionary): T[]; - - /** - * @see _.valuesIn - */ - valuesIn(object?: any): T[]; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.valuesIn - */ - valuesIn(): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.valuesIn - */ - valuesIn(): LoDashExplicitArrayWrapper; - } - - /********** - * String * - **********/ - - //_.camelCase - interface LoDashStatic { - /** - * Converts string to camel case. - * - * @param string The string to convert. - * @return Returns the camel cased string. - */ - camelCase(string?: string): string; - } - - interface LoDashImplicitWrapper { - /** - * @see _.camelCase - */ - camelCase(): string; - } - - interface LoDashExplicitWrapper { - /** - * @see _.camelCase - */ - camelCase(): LoDashExplicitWrapper; - } - - //_.capitalize - interface LoDashStatic { - /** - * Converts the first character of string to upper case and the remaining to lower case. - * - * @param string The string to capitalize. - * @return Returns the capitalized string. - */ - capitalize(string?: string): string; - } - - interface LoDashImplicitWrapper { - /** - * @see _.capitalize - */ - capitalize(): string; - } - - interface LoDashExplicitWrapper { - /** - * @see _.capitalize - */ - capitalize(): LoDashExplicitWrapper; - } - - //_.deburr - interface LoDashStatic { - /** - * Deburrs string by converting latin-1 supplementary letters to basic latin letters and removing combining - * diacritical marks. - * - * @param string The string to deburr. - * @return Returns the deburred string. - */ - deburr(string?: string): string; - } - - interface LoDashImplicitWrapper { - /** - * @see _.deburr - */ - deburr(): string; - } - - interface LoDashExplicitWrapper { - /** - * @see _.deburr - */ - deburr(): LoDashExplicitWrapper; - } - - //_.endsWith - interface LoDashStatic { - /** - * Checks if string ends with the given target string. - * - * @param string The string to search. - * @param target The string to search for. - * @param position The position to search from. - * @return Returns true if string ends with target, else false. - */ - endsWith( - string?: string, - target?: string, - position?: number - ): boolean; - } - - interface LoDashImplicitWrapper { - /** - * @see _.endsWith - */ - endsWith( - target?: string, - position?: number - ): boolean; - } - - interface LoDashExplicitWrapper { - /** - * @see _.endsWith - */ - endsWith( - target?: string, - position?: number - ): LoDashExplicitWrapper; - } - - // _.escape - interface LoDashStatic { - /** - * Converts the characters "&", "<", ">", '"', "'", and "`" in string to their corresponding HTML entities. - * - * Note: No other characters are escaped. To escape additional characters use a third-party library like he. - * - * hough the ">" character is escaped for symmetry, characters like ">" and "/" don’t need escaping in HTML - * and have no special meaning unless they're part of a tag or unquoted attribute value. See Mathias Bynens’s - * article (under "semi-related fun fact") for more details. - * - * Backticks are escaped because in IE < 9, they can break out of attribute values or HTML comments. See #59, - * #102, #108, and #133 of the HTML5 Security Cheatsheet for more details. - * - * When working with HTML you should always quote attribute values to reduce XSS vectors. - * - * @param string The string to escape. - * @return Returns the escaped string. - */ - escape(string?: string): string; - } - - interface LoDashImplicitWrapper { - /** - * @see _.escape - */ - escape(): string; - } - - interface LoDashExplicitWrapper { - /** - * @see _.escape - */ - escape(): LoDashExplicitWrapper; - } - - // _.escapeRegExp - interface LoDashStatic { - /** - * Escapes the RegExp special characters "^", "$", "\", ".", "*", "+", "?", "(", ")", "[", "]", - * "{", "}", and "|" in string. - * - * @param string The string to escape. - * @return Returns the escaped string. - */ - escapeRegExp(string?: string): string; - } - - interface LoDashImplicitWrapper { - /** - * @see _.escapeRegExp - */ - escapeRegExp(): string; - } - - interface LoDashExplicitWrapper { - /** - * @see _.escapeRegExp - */ - escapeRegExp(): LoDashExplicitWrapper; - } - - //_.kebabCase - interface LoDashStatic { - /** - * Converts string to kebab case. - * - * @param string The string to convert. - * @return Returns the kebab cased string. - */ - kebabCase(string?: string): string; - } - - interface LoDashImplicitWrapper { - /** - * @see _.kebabCase - */ - kebabCase(): string; - } - - interface LoDashExplicitWrapper { - /** - * @see _.kebabCase - */ - kebabCase(): LoDashExplicitWrapper; - } - - //_.lowerCase - interface LoDashStatic { - /** - * Converts `string`, as space separated words, to lower case. - * - * @param string The string to convert. - * @return Returns the lower cased string. - */ - lowerCase(string?: string): string; - } - - interface LoDashImplicitWrapper { - /** - * @see _.lowerCase - */ - lowerCase(): string; - } - - interface LoDashExplicitWrapper { - /** - * @see _.lowerCase - */ - lowerCase(): LoDashExplicitWrapper; - } - - //_.lowerFirst - interface LoDashStatic { - /** - * Converts the first character of `string` to lower case. - * - * @param string The string to convert. - * @return Returns the converted string. - */ - lowerFirst(string?: string): string; - } - - interface LoDashImplicitWrapper { - /** - * @see _.lowerFirst - */ - lowerFirst(): string; - } - - interface LoDashExplicitWrapper { - /** - * @see _.lowerFirst - */ - lowerFirst(): LoDashExplicitWrapper; - } - - //_.pad - interface LoDashStatic { - /** - * Pads string on the left and right sides if it’s shorter than length. Padding characters are truncated if - * they can’t be evenly divided by length. - * - * @param string The string to pad. - * @param length The padding length. - * @param chars The string used as padding. - * @return Returns the padded string. - */ - pad( - string?: string, - length?: number, - chars?: string - ): string; - } - - interface LoDashImplicitWrapper { - /** - * @see _.pad - */ - pad( - length?: number, - chars?: string - ): string; - } - - interface LoDashExplicitWrapper { - /** - * @see _.pad - */ - pad( - length?: number, - chars?: string - ): LoDashExplicitWrapper; - } - - //_.padEnd - interface LoDashStatic { - /** - * Pads string on the right side if it’s shorter than length. Padding characters are truncated if they exceed - * length. - * - * @param string The string to pad. - * @param length The padding length. - * @param chars The string used as padding. - * @return Returns the padded string. - */ - padEnd( - string?: string, - length?: number, - chars?: string - ): string; - } - - interface LoDashImplicitWrapper { - /** - * @see _.padEnd - */ - padEnd( - length?: number, - chars?: string - ): string; - } - - interface LoDashExplicitWrapper { - /** - * @see _.padEnd - */ - padEnd( - length?: number, - chars?: string - ): LoDashExplicitWrapper; - } - - //_.padStart - interface LoDashStatic { - /** - * Pads string on the left side if it’s shorter than length. Padding characters are truncated if they exceed - * length. - * - * @param string The string to pad. - * @param length The padding length. - * @param chars The string used as padding. - * @return Returns the padded string. - */ - padStart( - string?: string, - length?: number, - chars?: string - ): string; - } - - interface LoDashImplicitWrapper { - /** - * @see _.padStart - */ - padStart( - length?: number, - chars?: string - ): string; - } - - interface LoDashExplicitWrapper { - /** - * @see _.padStart - */ - padStart( - length?: number, - chars?: string - ): LoDashExplicitWrapper; - } - - //_.parseInt - interface LoDashStatic { - /** - * Converts string to an integer of the specified radix. If radix is undefined or 0, a radix of 10 is used - * unless value is a hexadecimal, in which case a radix of 16 is used. - * - * Note: This method aligns with the ES5 implementation of parseInt. - * - * @param string The string to convert. - * @param radix The radix to interpret value by. - * @return Returns the converted integer. - */ - parseInt( - string: string, - radix?: number - ): number; - } - - interface LoDashImplicitWrapper { - /** - * @see _.parseInt - */ - parseInt(radix?: number): number; - } - - interface LoDashExplicitWrapper { - /** - * @see _.parseInt - */ - parseInt(radix?: number): LoDashExplicitWrapper; - } - - //_.repeat - interface LoDashStatic { - /** - * Repeats the given string n times. - * - * @param string The string to repeat. - * @param n The number of times to repeat the string. - * @return Returns the repeated string. - */ - repeat( - string?: string, - n?: number - ): string; - } - - interface LoDashImplicitWrapper { - /** - * @see _.repeat - */ - repeat(n?: number): string; - } - - interface LoDashExplicitWrapper { - /** - * @see _.repeat - */ - repeat(n?: number): LoDashExplicitWrapper; - } - - //_.replace - interface LoDashStatic { - /** - * Replaces matches for pattern in string with replacement. - * - * Note: This method is based on String#replace. - * - * @param string - * @param pattern - * @param replacement - * @return Returns the modified string. - */ - replace( - string: string, - pattern: RegExp|string, - replacement: Function|string - ): string; - - /** - * @see _.replace - */ - replace( - pattern?: RegExp|string, - replacement?: Function|string - ): string; - } - - interface LoDashImplicitWrapper { - /** - * @see _.replace - */ - replace( - pattern?: RegExp|string, - replacement?: Function|string - ): string; - - /** - * @see _.replace - */ - replace( - replacement?: Function|string - ): string; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.replace - */ - replace( - pattern?: RegExp|string, - replacement?: Function|string - ): string; - - /** - * @see _.replace - */ - replace( - replacement?: Function|string - ): string; - } - - interface LoDashExplicitWrapper { - /** - * @see _.replace - */ - replace( - pattern?: RegExp|string, - replacement?: Function|string - ): LoDashExplicitWrapper; - - /** - * @see _.replace - */ - replace( - replacement?: Function|string - ): LoDashExplicitWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.replace - */ - replace( - pattern?: RegExp|string, - replacement?: Function|string - ): LoDashExplicitWrapper; - - /** - * @see _.replace - */ - replace( - replacement?: Function|string - ): LoDashExplicitWrapper; - } - - //_.snakeCase - interface LoDashStatic { - /** - * Converts string to snake case. - * - * @param string The string to convert. - * @return Returns the snake cased string. - */ - snakeCase(string?: string): string; - } - - interface LoDashImplicitWrapper { - /** - * @see _.snakeCase - */ - snakeCase(): string; - } - - interface LoDashExplicitWrapper { - /** - * @see _.snakeCase - */ - snakeCase(): LoDashExplicitWrapper; - } - - //_.split - interface LoDashStatic { - /** - * Splits string by separator. - * - * Note: This method is based on String#split. - * - * @param string - * @param separator - * @param limit - * @return Returns the new array of string segments. - */ - split( - string: string, - separator?: RegExp|string, - limit?: number - ): string[]; - } - - interface LoDashImplicitWrapper { - /** - * @see _.split - */ - split( - separator?: RegExp|string, - limit?: number - ): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitWrapper { - /** - * @see _.split - */ - split( - separator?: RegExp|string, - limit?: number - ): LoDashExplicitArrayWrapper; - } - - //_.startCase - interface LoDashStatic { - /** - * Converts string to start case. - * - * @param string The string to convert. - * @return Returns the start cased string. - */ - startCase(string?: string): string; - } - - interface LoDashImplicitWrapper { - /** - * @see _.startCase - */ - startCase(): string; - } - - interface LoDashExplicitWrapper { - /** - * @see _.startCase - */ - startCase(): LoDashExplicitWrapper; - } - - //_.startsWith - interface LoDashStatic { - /** - * Checks if string starts with the given target string. - * - * @param string The string to search. - * @param target The string to search for. - * @param position The position to search from. - * @return Returns true if string starts with target, else false. - */ - startsWith( - string?: string, - target?: string, - position?: number - ): boolean; - } - - interface LoDashImplicitWrapper { - /** - * @see _.startsWith - */ - startsWith( - target?: string, - position?: number - ): boolean; - } - - interface LoDashExplicitWrapper { - /** - * @see _.startsWith - */ - startsWith( - target?: string, - position?: number - ): LoDashExplicitWrapper; - } - - //_.template - interface TemplateOptions extends TemplateSettings { - /** - * The sourceURL of the template's compiled source. - */ - sourceURL?: string; - } - - interface TemplateExecutor { - (data?: Object): string; - source: string; - } - - interface LoDashStatic { - /** - * Creates a compiled template function that can interpolate data properties in "interpolate" delimiters, - * HTML-escape interpolated data properties in "escape" delimiters, and execute JavaScript in "evaluate" - * delimiters. Data properties may be accessed as free variables in the template. If a setting object is - * provided it takes precedence over _.templateSettings values. - * - * Note: In the development build _.template utilizes - * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl) for easier - * debugging. - * - * For more information on precompiling templates see - * [lodash's custom builds documentation](https://lodash.com/custom-builds). - * - * For more information on Chrome extension sandboxes see - * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval). - * - * @param string The template string. - * @param options The options object. - * @param options.escape The HTML "escape" delimiter. - * @param options.evaluate The "evaluate" delimiter. - * @param options.imports An object to import into the template as free variables. - * @param options.interpolate The "interpolate" delimiter. - * @param options.sourceURL The sourceURL of the template's compiled source. - * @param options.variable The data object variable name. - * @return Returns the compiled template function. - */ - template( - string: string, - options?: TemplateOptions - ): TemplateExecutor; - } - - interface LoDashImplicitWrapper { - /** - * @see _.template - */ - template(options?: TemplateOptions): TemplateExecutor; - } - - interface LoDashExplicitWrapper { - /** - * @see _.template - */ - template(options?: TemplateOptions): LoDashExplicitObjectWrapper; - } - - //_.toLower - interface LoDashStatic { - /** - * Converts `string`, as a whole, to lower case. - * - * @param string The string to convert. - * @return Returns the lower cased string. - */ - toLower(string?: string): string; - } - - interface LoDashImplicitWrapper { - /** - * @see _.toLower - */ - toLower(): string; - } - - interface LoDashExplicitWrapper { - /** - * @see _.toLower - */ - toLower(): LoDashExplicitWrapper; - } - - //_.toUpper - interface LoDashStatic { - /** - * Converts `string`, as a whole, to upper case. - * - * @param string The string to convert. - * @return Returns the upper cased string. - */ - toUpper(string?: string): string; - } - - interface LoDashImplicitWrapper { - /** - * @see _.toUpper - */ - toUpper(): string; - } - - interface LoDashExplicitWrapper { - /** - * @see _.toUpper - */ - toUpper(): LoDashExplicitWrapper; - } - - //_.trim - interface LoDashStatic { - /** - * Removes leading and trailing whitespace or specified characters from string. - * - * @param string The string to trim. - * @param chars The characters to trim. - * @return Returns the trimmed string. - */ - trim( - string?: string, - chars?: string - ): string; - } - - interface LoDashImplicitWrapper { - /** - * @see _.trim - */ - trim(chars?: string): string; - } - - interface LoDashExplicitWrapper { - /** - * @see _.trim - */ - trim(chars?: string): LoDashExplicitWrapper; - } - - //_.trimEnd - interface LoDashStatic { - /** - * Removes trailing whitespace or specified characters from string. - * - * @param string The string to trim. - * @param chars The characters to trim. - * @return Returns the trimmed string. - */ - trimEnd( - string?: string, - chars?: string - ): string; - } - - interface LoDashImplicitWrapper { - /** - * @see _.trimEnd - */ - trimEnd(chars?: string): string; - } - - interface LoDashExplicitWrapper { - /** - * @see _.trimEnd - */ - trimEnd(chars?: string): LoDashExplicitWrapper; - } - - //_.trimStart - interface LoDashStatic { - /** - * Removes leading whitespace or specified characters from string. - * - * @param string The string to trim. - * @param chars The characters to trim. - * @return Returns the trimmed string. - */ - trimStart( - string?: string, - chars?: string - ): string; - } - - interface LoDashImplicitWrapper { - /** - * @see _.trimStart - */ - trimStart(chars?: string): string; - } - - interface LoDashExplicitWrapper { - /** - * @see _.trimStart - */ - trimStart(chars?: string): LoDashExplicitWrapper; - } - - //_.truncate - interface TruncateOptions { - /** The maximum string length. */ - length?: number; - /** The string to indicate text is omitted. */ - omission?: string; - /** The separator pattern to truncate to. */ - separator?: string|RegExp; - } - - interface LoDashStatic { - /** - * Truncates string if it’s longer than the given maximum string length. The last characters of the truncated - * string are replaced with the omission string which defaults to "…". - * - * @param string The string to truncate. - * @param options The options object or maximum string length. - * @return Returns the truncated string. - */ - truncate( - string?: string, - options?: TruncateOptions - ): string; - } - - interface LoDashImplicitWrapper { - /** - * @see _.truncate - */ - truncate(options?: TruncateOptions): string; - } - - interface LoDashExplicitWrapper { - /** - * @see _.truncate - */ - truncate(options?: TruncateOptions): LoDashExplicitWrapper; - } - - //_.unescape - interface LoDashStatic { - /** - * The inverse of _.escape; this method converts the HTML entities &, <, >, ", ', and ` - * in string to their corresponding characters. - * - * Note: No other HTML entities are unescaped. To unescape additional HTML entities use a third-party library - * like he. - * - * @param string The string to unescape. - * @return Returns the unescaped string. - */ - unescape(string?: string): string; - } - - interface LoDashImplicitWrapper { - /** - * @see _.unescape - */ - unescape(): string; - } - - interface LoDashExplicitWrapper { - /** - * @see _.unescape - */ - unescape(): LoDashExplicitWrapper; - } - - //_.upperCase - interface LoDashStatic { - /** - * Converts `string`, as space separated words, to upper case. - * - * @param string The string to convert. - * @return Returns the upper cased string. - */ - upperCase(string?: string): string; - } - - interface LoDashImplicitWrapper { - /** - * @see _.upperCase - */ - upperCase(): string; - } - - interface LoDashExplicitWrapper { - /** - * @see _.upperCase - */ - upperCase(): LoDashExplicitWrapper; - } - - //_.upperFirst - interface LoDashStatic { - /** - * Converts the first character of `string` to upper case. - * - * @param string The string to convert. - * @return Returns the converted string. - */ - upperFirst(string?: string): string; - } - - interface LoDashImplicitWrapper { - /** - * @see _.upperFirst - */ - upperFirst(): string; - } - - interface LoDashExplicitWrapper { - /** - * @see _.upperFirst - */ - upperFirst(): LoDashExplicitWrapper; - } - - //_.words - interface LoDashStatic { - /** - * Splits `string` into an array of its words. - * - * @param string The string to inspect. - * @param pattern The pattern to match words. - * @return Returns the words of `string`. - */ - words( - string?: string, - pattern?: string|RegExp - ): string[]; - } - - interface LoDashImplicitWrapper { - /** - * @see _.words - */ - words(pattern?: string|RegExp): string[]; - } - - interface LoDashExplicitWrapper { - /** - * @see _.words - */ - words(pattern?: string|RegExp): LoDashExplicitArrayWrapper; - } - - /*********** - * Utility * - ***********/ - - //_.attempt - interface LoDashStatic { - /** - * Attempts to invoke func, returning either the result or the caught error object. Any additional arguments - * are provided to func when it’s invoked. - * - * @param func The function to attempt. - * @return Returns the func result or error object. - */ - attempt(func: (...args: any[]) => TResult, ...args: any[]): TResult|Error; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.attempt - */ - attempt(...args: any[]): TResult|Error; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.attempt - */ - attempt(...args: any[]): LoDashExplicitObjectWrapper; - } - - //_.constant - interface LoDashStatic { - /** - * Creates a function that returns value. - * - * @param value The value to return from the new function. - * @return Returns the new function. - */ - constant(value: T): () => T; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.constant - */ - constant(): LoDashImplicitObjectWrapper<() => TResult>; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.constant - */ - constant(): LoDashExplicitObjectWrapper<() => TResult>; - } - - //_.identity - interface LoDashStatic { - /** - * This method returns the first argument provided to it. - * - * @param value Any value. - * @return Returns value. - */ - identity(value?: T): T; - } - - interface LoDashImplicitWrapper { - /** - * @see _.identity - */ - identity(): T; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.identity - */ - identity(): T[]; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.identity - */ - identity(): T; - } - - interface LoDashExplicitWrapper { - /** - * @see _.identity - */ - identity(): LoDashExplicitWrapper; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.identity - */ - identity(): LoDashExplicitArrayWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.identity - */ - identity(): LoDashExplicitObjectWrapper; - } - - //_.iteratee - interface LoDashStatic { - /** - * Creates a function that invokes `func` with the arguments of the created - * function. If `func` is a property name the created callback returns the - * property value for a given element. If `func` is an object the created - * callback returns `true` for elements that contain the equivalent object properties, otherwise it returns `false`. - * - * @static - * @memberOf _ - * @category Util - * @param {*} [func=_.identity] The value to convert to a callback. - * @returns {Function} Returns the callback. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 40 } - * ]; - * - * // create custom iteratee shorthands - * _.iteratee = _.wrap(_.iteratee, function(callback, func) { - * var p = /^(\S+)\s*([<>])\s*(\S+)$/.exec(func); - * return !p ? callback(func) : function(object) { - * return (p[2] == '>' ? object[p[1]] > p[3] : object[p[1]] < p[3]); - * }; - * }); - * - * _.filter(users, 'age > 36'); - * // => [{ 'user': 'fred', 'age': 40 }] - */ - iteratee( - func: Function - ): (...args: any[]) => TResult; - - /** - * @see _.iteratee - */ - iteratee( - func: string - ): (object: any) => TResult; - - /** - * @see _.iteratee - */ - iteratee( - func: Object - ): (object: any) => boolean; - - /** - * @see _.iteratee - */ - iteratee(): (value: TResult) => TResult; - } - - interface LoDashImplicitWrapper { - /** - * @see _.iteratee - */ - iteratee(): LoDashImplicitObjectWrapper<(object: any) => TResult>; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.iteratee - */ - iteratee(): LoDashImplicitObjectWrapper<(object: any) => boolean>; - - /** - * @see _.iteratee - */ - iteratee(): LoDashImplicitObjectWrapper<(...args: any[]) => TResult>; - } - - interface LoDashExplicitWrapper { - /** - * @see _.iteratee - */ - iteratee(): LoDashExplicitObjectWrapper<(object: any) => TResult>; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.iteratee - */ - iteratee(): LoDashExplicitObjectWrapper<(object: any) => boolean>; - - /** - * @see _.iteratee - */ - iteratee(): LoDashExplicitObjectWrapper<(...args: any[]) => TResult>; - } - - //_.matches - interface LoDashStatic { - /** - * Creates a function that performs a deep comparison between a given object and source, returning true if the - * given object has equivalent property values, else false. - * - * Note: This method supports comparing arrays, booleans, Date objects, numbers, Object objects, regexes, and - * strings. Objects are compared by their own, not inherited, enumerable properties. For comparing a single own - * or inherited property value see _.matchesProperty. - * - * @param source The object of property values to match. - * @return Returns the new function. - */ - matches(source: T): (value: any) => boolean; - - /** - * @see _.matches - */ - matches(source: T): (value: V) => boolean; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.matches - */ - matches(): LoDashImplicitObjectWrapper<(value: V) => boolean>; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.matches - */ - matches(): LoDashExplicitObjectWrapper<(value: V) => boolean>; - } - - //_.matchesProperty - interface LoDashStatic { - /** - * Creates a function that compares the property value of path on a given object to value. - * - * Note: This method supports comparing arrays, booleans, Date objects, numbers, Object objects, regexes, and - * strings. Objects are compared by their own, not inherited, enumerable properties. - * - * @param path The path of the property to get. - * @param srcValue The value to match. - * @return Returns the new function. - */ - matchesProperty( - path: StringRepresentable|StringRepresentable[], - srcValue: T - ): (value: any) => boolean; - - /** - * @see _.matchesProperty - */ - matchesProperty( - path: StringRepresentable|StringRepresentable[], - srcValue: T - ): (value: V) => boolean; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.matchesProperty - */ - matchesProperty( - srcValue: SrcValue - ): LoDashImplicitObjectWrapper<(value: any) => boolean>; - - /** - * @see _.matchesProperty - */ - matchesProperty( - srcValue: SrcValue - ): LoDashImplicitObjectWrapper<(value: Value) => boolean>; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.matchesProperty - */ - matchesProperty( - srcValue: SrcValue - ): LoDashExplicitObjectWrapper<(value: any) => boolean>; - - /** - * @see _.matchesProperty - */ - matchesProperty( - srcValue: SrcValue - ): LoDashExplicitObjectWrapper<(value: Value) => boolean>; - } - - //_.method - interface LoDashStatic { - /** - * Creates a function that invokes the method at path on a given object. Any additional arguments are provided - * to the invoked method. - * - * @param path The path of the method to invoke. - * @param args The arguments to invoke the method with. - * @return Returns the new function. - */ - method( - path: string|StringRepresentable[], - ...args: any[] - ): (object: TObject) => TResult; - - /** - * @see _.method - */ - method( - path: string|StringRepresentable[], - ...args: any[] - ): (object: any) => TResult; - } - - interface LoDashImplicitWrapper { - /** - * @see _.method - */ - method(...args: any[]): LoDashImplicitObjectWrapper<(object: TObject) => TResult>; - - /** - * @see _.method - */ - method(...args: any[]): LoDashImplicitObjectWrapper<(object: any) => TResult>; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.method - */ - method(...args: any[]): LoDashImplicitObjectWrapper<(object: TObject) => TResult>; - - /** - * @see _.method - */ - method(...args: any[]): LoDashImplicitObjectWrapper<(object: any) => TResult>; - } - - interface LoDashExplicitWrapper { - /** - * @see _.method - */ - method(...args: any[]): LoDashExplicitObjectWrapper<(object: TObject) => TResult>; - - /** - * @see _.method - */ - method(...args: any[]): LoDashExplicitObjectWrapper<(object: any) => TResult>; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.method - */ - method(...args: any[]): LoDashExplicitObjectWrapper<(object: TObject) => TResult>; - - /** - * @see _.method - */ - method(...args: any[]): LoDashExplicitObjectWrapper<(object: any) => TResult>; - } - - //_.methodOf - interface LoDashStatic { - /** - * The opposite of _.method; this method creates a function that invokes the method at a given path on object. - * Any additional arguments are provided to the invoked method. - * - * @param object The object to query. - * @param args The arguments to invoke the method with. - * @return Returns the new function. - */ - methodOf( - object: TObject, - ...args: any[] - ): (path: StringRepresentable|StringRepresentable[]) => TResult; - - /** - * @see _.methodOf - */ - methodOf( - object: {}, - ...args: any[] - ): (path: StringRepresentable|StringRepresentable[]) => TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.methodOf - */ - methodOf( - ...args: any[] - ): LoDashImplicitObjectWrapper<(path: StringRepresentable|StringRepresentable[]) => TResult>; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.methodOf - */ - methodOf( - ...args: any[] - ): LoDashExplicitObjectWrapper<(path: StringRepresentable|StringRepresentable[]) => TResult>; - } - - //_.mixin - interface MixinOptions { - chain?: boolean; - } - - interface LoDashStatic { - /** - * Adds all own enumerable function properties of a source object to the destination object. If object is a - * function then methods are added to its prototype as well. - * - * Note: Use _.runInContext to create a pristine lodash function to avoid conflicts caused by modifying - * the original. - * - * @param object The destination object. - * @param source The object of functions to add. - * @param options The options object. - * @param options.chain Specify whether the functions added are chainable. - * @return Returns object. - */ - mixin( - object: TObject, - source: Dictionary, - options?: MixinOptions - ): TResult; - - /** - * @see _.mixin - */ - mixin( - source: Dictionary, - options?: MixinOptions - ): TResult; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.mixin - */ - mixin( - source: Dictionary, - options?: MixinOptions - ): LoDashImplicitObjectWrapper; - - /** - * @see _.mixin - */ - mixin( - options?: MixinOptions - ): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.mixin - */ - mixin( - source: Dictionary, - options?: MixinOptions - ): LoDashExplicitObjectWrapper; - - /** - * @see _.mixin - */ - mixin( - options?: MixinOptions - ): LoDashExplicitObjectWrapper; - } - - //_.noConflict - interface LoDashStatic { - /** - * Reverts the _ variable to its previous value and returns a reference to the lodash function. - * - * @return Returns the lodash function. - */ - noConflict(): typeof _; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.noConflict - */ - noConflict(): typeof _; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.noConflict - */ - noConflict(): LoDashExplicitObjectWrapper; - } - - //_.noop - interface LoDashStatic { - /** - * A no-operation function that returns undefined regardless of the arguments it receives. - * - * @return undefined - */ - noop(...args: any[]): void; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.noop - */ - noop(...args: any[]): void; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.noop - */ - noop(...args: any[]): _.LoDashExplicitWrapper; - } - - //_.nthArg - interface LoDashStatic { - /** - * Creates a function that returns its nth argument. - * - * @param n The index of the argument to return. - * @return Returns the new function. - */ - nthArg(n?: number): TResult; - } - - interface LoDashImplicitWrapper { - /** - * @see _.nthArg - */ - nthArg(): LoDashImplicitObjectWrapper; - } - - interface LoDashExplicitWrapper { - /** - * @see _.nthArg - */ - nthArg(): LoDashExplicitObjectWrapper; - } - - //_.over - interface LoDashStatic { - /** - * Creates a function that invokes iteratees with the arguments provided to the created function and returns - * their results. - * - * @param iteratees The iteratees to invoke. - * @return Returns the new function. - */ - over(...iteratees: (Function|Function[])[]): (...args: any[]) => TResult[]; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.over - */ - over(...iteratees: (Function|Function[])[]): LoDashImplicitObjectWrapper<(...args: any[]) => TResult[]>; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.over - */ - over(...iteratees: (Function|Function[])[]): LoDashImplicitObjectWrapper<(...args: any[]) => TResult[]>; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.over - */ - over(...iteratees: (Function|Function[])[]): LoDashExplicitObjectWrapper<(...args: any[]) => TResult[]>; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.over - */ - over(...iteratees: (Function|Function[])[]): LoDashExplicitObjectWrapper<(...args: any[]) => TResult[]>; - } - - //_.overEvery - interface LoDashStatic { - /** - * Creates a function that checks if all of the predicates return truthy when invoked with the arguments - * provided to the created function. - * - * @param predicates The predicates to check. - * @return Returns the new function. - */ - overEvery(...predicates: (Function|Function[])[]): (...args: any[]) => boolean; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.overEvery - */ - overEvery(...predicates: (Function|Function[])[]): LoDashImplicitObjectWrapper<(...args: any[]) => boolean>; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.overEvery - */ - overEvery(...predicates: (Function|Function[])[]): LoDashImplicitObjectWrapper<(...args: any[]) => boolean>; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.overEvery - */ - overEvery(...predicates: (Function|Function[])[]): LoDashExplicitObjectWrapper<(...args: any[]) => boolean>; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.overEvery - */ - overEvery(...predicates: (Function|Function[])[]): LoDashExplicitObjectWrapper<(...args: any[]) => boolean>; - } - - //_.overSome - interface LoDashStatic { - /** - * Creates a function that checks if any of the predicates return truthy when invoked with the arguments - * provided to the created function. - * - * @param predicates The predicates to check. - * @return Returns the new function. - */ - overSome(...predicates: (Function|Function[])[]): (...args: any[]) => boolean; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.overSome - */ - overSome(...predicates: (Function|Function[])[]): LoDashImplicitObjectWrapper<(...args: any[]) => boolean>; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.overSome - */ - overSome(...predicates: (Function|Function[])[]): LoDashImplicitObjectWrapper<(...args: any[]) => boolean>; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.overSome - */ - overSome(...predicates: (Function|Function[])[]): LoDashExplicitObjectWrapper<(...args: any[]) => boolean>; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.overSome - */ - overSome(...predicates: (Function|Function[])[]): LoDashExplicitObjectWrapper<(...args: any[]) => boolean>; - } - - //_.property - interface LoDashStatic { - /** - * Creates a function that returns the property value at path on a given object. - * - * @param path The path of the property to get. - * @return Returns the new function. - */ - property(path: StringRepresentable|StringRepresentable[]): (obj: TObj) => TResult; - } - - interface LoDashImplicitWrapper { - /** - * @see _.property - */ - property(): LoDashImplicitObjectWrapper<(obj: TObj) => TResult>; - } - - interface LoDashImplicitArrayWrapper { - /** - * @see _.property - */ - property(): LoDashImplicitObjectWrapper<(obj: TObj) => TResult>; - } - - interface LoDashExplicitWrapper { - /** - * @see _.property - */ - property(): LoDashExplicitObjectWrapper<(obj: TObj) => TResult>; - } - - interface LoDashExplicitArrayWrapper { - /** - * @see _.property - */ - property(): LoDashExplicitObjectWrapper<(obj: TObj) => TResult>; - } - - //_.propertyOf - interface LoDashStatic { - /** - * The opposite of _.property; this method creates a function that returns the property value at a given path - * on object. - * - * @param object The object to query. - * @return Returns the new function. - */ - propertyOf(object: T): (path: string|string[]) => any; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.propertyOf - */ - propertyOf(): LoDashImplicitObjectWrapper<(path: string|string[]) => any>; - } - - interface LoDashExplicitObjectWrapper { - /** - * @see _.propertyOf - */ - propertyOf(): LoDashExplicitObjectWrapper<(path: string|string[]) => any>; - } - - //_.range - interface LoDashStatic { - /** - * Creates an array of numbers (positive and/or negative) progressing from start up to, but not including, end. - * If end is not specified it’s set to start with start then set to 0. If end is less than start a zero-length - * range is created unless a negative step is specified. - * - * @param start The start of the range. - * @param end The end of the range. - * @param step The value to increment or decrement by. - * @return Returns a new range array. - */ - range( - start: number, - end: number, - step?: number - ): number[]; - - /** - * @see _.range - */ - range( - end: number, - step?: number - ): number[]; - } - - interface LoDashImplicitWrapper { - /** - * @see _.range - */ - range( - end?: number, - step?: number - ): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitWrapper { - /** - * @see _.range - */ - range( - end?: number, - step?: number - ): LoDashExplicitArrayWrapper; - } - - //_.rangeRight - interface LoDashStatic { - /** - * This method is like `_.range` except that it populates values in - * descending order. - * - * @static - * @memberOf _ - * @category Util - * @param {number} [start=0] The start of the range. - * @param {number} end The end of the range. - * @param {number} [step=1] The value to increment or decrement by. - * @returns {Array} Returns the new array of numbers. - * @example - * - * _.rangeRight(4); - * // => [3, 2, 1, 0] - * - * _.rangeRight(-4); - * // => [-3, -2, -1, 0] - * - * _.rangeRight(1, 5); - * // => [4, 3, 2, 1] - * - * _.rangeRight(0, 20, 5); - * // => [15, 10, 5, 0] - * - * _.rangeRight(0, -4, -1); - * // => [-3, -2, -1, 0] - * - * _.rangeRight(1, 4, 0); - * // => [1, 1, 1] - * - * _.rangeRight(0); - * // => [] - */ - rangeRight( - start: number, - end: number, - step?: number - ): number[]; - - /** - * @see _.rangeRight - */ - rangeRight( - end: number, - step?: number - ): number[]; - } - - interface LoDashImplicitWrapper { - /** - * @see _.rangeRight - */ - rangeRight( - end?: number, - step?: number - ): LoDashImplicitArrayWrapper; - } - - interface LoDashExplicitWrapper { - /** - * @see _.rangeRight - */ - rangeRight( - end?: number, - step?: number - ): LoDashExplicitArrayWrapper; - } - - //_.runInContext - interface LoDashStatic { - /** - * Create a new pristine lodash function using the given context object. - * - * @param context The context object. - * @return Returns a new lodash function. - */ - runInContext(context?: Object): typeof _; - } - - interface LoDashImplicitObjectWrapper { - /** - * @see _.runInContext - */ - runInContext(): typeof _; - } - - //_.times - interface LoDashStatic { - /** - * Invokes the iteratee function n times, returning an array of the results of each invocation. The iteratee - * is invoked with one argument; (index). - * - * @param n The number of times to invoke iteratee. - * @param iteratee The function invoked per iteration. - * @return Returns the array of results. - */ - times( - n: number, - iteratee: (num: number) => TResult - ): TResult[]; - - /** - * @see _.times - */ - times(n: number): number[]; - } - - interface LoDashImplicitWrapper { - /** - * @see _.times - */ - times( - iteratee: (num: number) => TResult - ): TResult[]; - - /** - * @see _.times - */ - times(): number[]; - } - - interface LoDashExplicitWrapper { - /** - * @see _.times - */ - times( - iteratee: (num: number) => TResult - ): LoDashExplicitArrayWrapper; - - /** - * @see _.times - */ - times(): LoDashExplicitArrayWrapper; - } - - //_.toPath - interface LoDashStatic { - /** - * Converts `value` to a property path array. - * - * @static - * @memberOf _ - * @category Util - * @param {*} value The value to convert. - * @returns {Array} Returns the new property path array. - * @example - * - * _.toPath('a.b.c'); - * // => ['a', 'b', 'c'] - * - * _.toPath('a[0].b.c'); - * // => ['a', '0', 'b', 'c'] - * - * var path = ['a', 'b', 'c'], - * newPath = _.toPath(path); - * - * console.log(newPath); - * // => ['a', 'b', 'c'] - * - * console.log(path === newPath); - * // => false - */ - toPath(value: any): string[]; - } - - interface LoDashImplicitWrapperBase { - /** - * @see _.toPath - */ - toPath(): LoDashImplicitWrapper; - } - - interface LoDashExplicitWrapperBase { - /** - * @see _.toPath - */ - toPath(): LoDashExplicitWrapper; - } - - //_.uniqueId - interface LoDashStatic { - /** - * Generates a unique ID. If prefix is provided the ID is appended to it. - * - * @param prefix The value to prefix the ID with. - * @return Returns the unique ID. - */ - uniqueId(prefix?: string): string; - } - - interface LoDashImplicitWrapper { - /** - * @see _.uniqueId - */ - uniqueId(): string; - } - - interface LoDashExplicitWrapper { - /** - * @see _.uniqueId - */ - uniqueId(): LoDashExplicitWrapper; - } - - interface ListIterator { - (value: T, index: number, collection: List): TResult; - } - - interface DictionaryIterator { - (value: T, key?: string, collection?: Dictionary): TResult; - } - - interface NumericDictionaryIterator { - (value: T, key?: number, collection?: Dictionary): TResult; - } - - interface ObjectIterator { - (element: T, key?: string, collection?: any): TResult; - } - - interface StringIterator { - (char: string, index?: number, string?: string): TResult; - } - - interface MemoVoidIterator { - (prev: TResult, curr: T, indexOrKey?: any, list?: T[]): void; - } - interface MemoIterator { - (prev: TResult, curr: T, indexOrKey?: any, list?: T[]): TResult; - } - - interface MemoVoidArrayIterator { - (acc: TResult, curr: T, index?: number, arr?: T[]): void; - } - interface MemoVoidDictionaryIterator { - (acc: TResult, curr: T, key?: string, dict?: Dictionary): void; - } - - //interface Collection {} - - // Common interface between Arrays and jQuery objects - interface List { - [index: number]: T; - length: number; - } - - interface Dictionary { - [index: string]: T; - } - - interface NumericDictionary { - [index: number]: T; - } - - interface StringRepresentable { - toString(): string; - } - - interface Cancelable { - cancel(): void; - flush(): void; - } -} - -// Named exports - -declare module "lodash/after" { - const after: typeof _.after; - export = after; -} - - -declare module "lodash/ary" { - const ary: typeof _.ary; - export = ary; -} - - -declare module "lodash/assign" { - const assign: typeof _.assign; - export = assign; -} - - -declare module "lodash/assignIn" { - const assignIn: typeof _.assignIn; - export = assignIn; -} - - -declare module "lodash/assignInWith" { - const assignInWith: typeof _.assignInWith; - export = assignInWith; -} - - -declare module "lodash/assignWith" { - const assignWith: typeof _.assignWith; - export = assignWith; -} - - -declare module "lodash/at" { - const at: typeof _.at; - export = at; -} - - -declare module "lodash/before" { - const before: typeof _.before; - export = before; -} - - -declare module "lodash/bind" { - const bind: typeof _.bind; - export = bind; -} - - -declare module "lodash/bindAll" { - const bindAll: typeof _.bindAll; - export = bindAll; -} - - -declare module "lodash/bindKey" { - const bindKey: typeof _.bindKey; - export = bindKey; -} - - -declare module "lodash/castArray" { - const castArray: typeof _.castArray; - export = castArray; -} - - -declare module "lodash/chain" { - const chain: typeof _.chain; - export = chain; -} - - -declare module "lodash/chunk" { - const chunk: typeof _.chunk; - export = chunk; -} - - -declare module "lodash/compact" { - const compact: typeof _.compact; - export = compact; -} - - -declare module "lodash/concat" { - const concat: typeof _.concat; - export = concat; -} - -/** -* uncoment it if definition exists -*/ -/* -declare module "lodash/cond" { - const cond: typeof _.cond; - export = cond; -} -*/ - -/** -* uncoment it if definition exists -*/ -/* -declare module "lodash/conforms" { - const conforms: typeof _.conforms; - export = conforms; -} -*/ - -declare module "lodash/constant" { - const constant: typeof _.constant; - export = constant; -} - - -declare module "lodash/countBy" { - const countBy: typeof _.countBy; - export = countBy; -} - - -declare module "lodash/create" { - const create: typeof _.create; - export = create; -} - - -declare module "lodash/curry" { - const curry: typeof _.curry; - export = curry; -} - - -declare module "lodash/curryRight" { - const curryRight: typeof _.curryRight; - export = curryRight; -} - - -declare module "lodash/debounce" { - const debounce: typeof _.debounce; - export = debounce; -} - - -declare module "lodash/defaults" { - const defaults: typeof _.defaults; - export = defaults; -} - - -declare module "lodash/defaultsDeep" { - const defaultsDeep: typeof _.defaultsDeep; - export = defaultsDeep; -} - - -declare module "lodash/defer" { - const defer: typeof _.defer; - export = defer; -} - - -declare module "lodash/delay" { - const delay: typeof _.delay; - export = delay; -} - - -declare module "lodash/difference" { - const difference: typeof _.difference; - export = difference; -} - - -declare module "lodash/differenceBy" { - const differenceBy: typeof _.differenceBy; - export = differenceBy; -} - - -declare module "lodash/differenceWith" { - const differenceWith: typeof _.differenceWith; - export = differenceWith; -} - - -declare module "lodash/drop" { - const drop: typeof _.drop; - export = drop; -} - - -declare module "lodash/dropRight" { - const dropRight: typeof _.dropRight; - export = dropRight; -} - - -declare module "lodash/dropRightWhile" { - const dropRightWhile: typeof _.dropRightWhile; - export = dropRightWhile; -} - - -declare module "lodash/dropWhile" { - const dropWhile: typeof _.dropWhile; - export = dropWhile; -} - - -declare module "lodash/fill" { - const fill: typeof _.fill; - export = fill; -} - - -declare module "lodash/filter" { - const filter: typeof _.filter; - export = filter; -} - - -declare module "lodash/flatMap" { - const flatMap: typeof _.flatMap; - export = flatMap; -} - -/** -* uncoment it if definition exists -*/ -/* -declare module "lodash/flatMapDeep" { - const flatMapDeep: typeof _.flatMapDeep; - export = flatMapDeep; -} -*/ -/** -* uncoment it if definition exists -*/ -/* -declare module "lodash/flatMapDepth" { - const flatMapDepth: typeof _.flatMapDepth; - export = flatMapDepth; -} -*/ - -declare module "lodash/flatten" { - const flatten: typeof _.flatten; - export = flatten; -} - - -declare module "lodash/flattenDeep" { - const flattenDeep: typeof _.flattenDeep; - export = flattenDeep; -} - -declare module "lodash/flattenDepth" { - const flattenDepth: typeof _.flattenDepth; - export = flattenDepth; -} - -declare module "lodash/flip" { - const flip: typeof _.flip; - export = flip; -} - - -declare module "lodash/flow" { - const flow: typeof _.flow; - export = flow; -} - - -declare module "lodash/flowRight" { - const flowRight: typeof _.flowRight; - export = flowRight; -} - - -declare module "lodash/fromPairs" { - const fromPairs: typeof _.fromPairs; - export = fromPairs; -} - - -declare module "lodash/functions" { - const functions: typeof _.functions; - export = functions; -} - - -declare module "lodash/functionsIn" { - const functionsIn: typeof _.functionsIn; - export = functionsIn; -} - - -declare module "lodash/groupBy" { - const groupBy: typeof _.groupBy; - export = groupBy; -} - - -declare module "lodash/initial" { - const initial: typeof _.initial; - export = initial; -} - - -declare module "lodash/intersection" { - const intersection: typeof _.intersection; - export = intersection; -} - - -declare module "lodash/intersectionBy" { - const intersectionBy: typeof _.intersectionBy; - export = intersectionBy; -} - - -declare module "lodash/intersectionWith" { - const intersectionWith: typeof _.intersectionWith; - export = intersectionWith; -} - - -declare module "lodash/invert" { - const invert: typeof _.invert; - export = invert; -} - - -declare module "lodash/invertBy" { - const invertBy: typeof _.invertBy; - export = invertBy; -} - - -declare module "lodash/invokeMap" { - const invokeMap: typeof _.invokeMap; - export = invokeMap; -} - - -declare module "lodash/iteratee" { - const iteratee: typeof _.iteratee; - export = iteratee; -} - - -declare module "lodash/keyBy" { - const keyBy: typeof _.keyBy; - export = keyBy; -} - - -declare module "lodash/keys" { - const keys: typeof _.keys; - export = keys; -} - - -declare module "lodash/keysIn" { - const keysIn: typeof _.keysIn; - export = keysIn; -} - - -declare module "lodash/map" { - const map: typeof _.map; - export = map; -} - - -declare module "lodash/mapKeys" { - const mapKeys: typeof _.mapKeys; - export = mapKeys; -} - - -declare module "lodash/mapValues" { - const mapValues: typeof _.mapValues; - export = mapValues; -} - - -declare module "lodash/matches" { - const matches: typeof _.matches; - export = matches; -} - - -declare module "lodash/matchesProperty" { - const matchesProperty: typeof _.matchesProperty; - export = matchesProperty; -} - - -declare module "lodash/memoize" { - const memoize: typeof _.memoize; - export = memoize; -} - - -declare module "lodash/merge" { - const merge: typeof _.merge; - export = merge; -} - - -declare module "lodash/mergeWith" { - const mergeWith: typeof _.mergeWith; - export = mergeWith; -} - - -declare module "lodash/method" { - const method: typeof _.method; - export = method; -} - - -declare module "lodash/methodOf" { - const methodOf: typeof _.methodOf; - export = methodOf; -} - - -declare module "lodash/mixin" { - const mixin: typeof _.mixin; - export = mixin; -} - - -declare module "lodash/negate" { - const negate: typeof _.negate; - export = negate; -} - - -declare module "lodash/nthArg" { - const nthArg: typeof _.nthArg; - export = nthArg; -} - - -declare module "lodash/omit" { - const omit: typeof _.omit; - export = omit; -} - - -declare module "lodash/omitBy" { - const omitBy: typeof _.omitBy; - export = omitBy; -} - - -declare module "lodash/once" { - const once: typeof _.once; - export = once; -} - - -declare module "lodash/orderBy" { - const orderBy: typeof _.orderBy; - export = orderBy; -} - - -declare module "lodash/over" { - const over: typeof _.over; - export = over; -} - - -declare module "lodash/overArgs" { - const overArgs: typeof _.overArgs; - export = overArgs; -} - - -declare module "lodash/overEvery" { - const overEvery: typeof _.overEvery; - export = overEvery; -} - - -declare module "lodash/overSome" { - const overSome: typeof _.overSome; - export = overSome; -} - - -declare module "lodash/partial" { - const partial: typeof _.partial; - export = partial; -} - - -declare module "lodash/partialRight" { - const partialRight: typeof _.partialRight; - export = partialRight; -} - - -declare module "lodash/partition" { - const partition: typeof _.partition; - export = partition; -} - - -declare module "lodash/pick" { - const pick: typeof _.pick; - export = pick; -} - - -declare module "lodash/pickBy" { - const pickBy: typeof _.pickBy; - export = pickBy; -} - - -declare module "lodash/property" { - const property: typeof _.property; - export = property; -} - - -declare module "lodash/propertyOf" { - const propertyOf: typeof _.propertyOf; - export = propertyOf; -} - - -declare module "lodash/pull" { - const pull: typeof _.pull; - export = pull; -} - - -declare module "lodash/pullAll" { - const pullAll: typeof _.pullAll; - export = pullAll; -} - - -declare module "lodash/pullAllBy" { - const pullAllBy: typeof _.pullAllBy; - export = pullAllBy; -} - -/** -* uncoment it if definition exists -*/ -/* -declare module "lodash/pullAllWith" { - const pullAllWith: typeof _.pullAllWith; - export = pullAllWith; -} -*/ - -declare module "lodash/pullAt" { - const pullAt: typeof _.pullAt; - export = pullAt; -} - - -declare module "lodash/range" { - const range: typeof _.range; - export = range; -} - - -declare module "lodash/rangeRight" { - const rangeRight: typeof _.rangeRight; - export = rangeRight; -} - - -declare module "lodash/rearg" { - const rearg: typeof _.rearg; - export = rearg; -} - - -declare module "lodash/reject" { - const reject: typeof _.reject; - export = reject; -} - - -declare module "lodash/remove" { - const remove: typeof _.remove; - export = remove; -} - - -declare module "lodash/rest" { - const rest: typeof _.rest; - export = rest; -} - - -declare module "lodash/reverse" { - const reverse: typeof _.reverse; - export = reverse; -} - - -declare module "lodash/sampleSize" { - const sampleSize: typeof _.sampleSize; - export = sampleSize; -} - - -declare module "lodash/set" { - const set: typeof _.set; - export = set; -} - - -declare module "lodash/setWith" { - const setWith: typeof _.setWith; - export = setWith; -} - - -declare module "lodash/shuffle" { - const shuffle: typeof _.shuffle; - export = shuffle; -} - - -declare module "lodash/slice" { - const slice: typeof _.slice; - export = slice; -} - - -declare module "lodash/sortBy" { - const sortBy: typeof _.sortBy; - export = sortBy; -} - - -declare module "lodash/sortedUniq" { - const sortedUniq: typeof _.sortedUniq; - export = sortedUniq; -} - - -declare module "lodash/sortedUniqBy" { - const sortedUniqBy: typeof _.sortedUniqBy; - export = sortedUniqBy; -} - - -declare module "lodash/split" { - const split: typeof _.split; - export = split; -} - - -declare module "lodash/spread" { - const spread: typeof _.spread; - export = spread; -} - - -declare module "lodash/tail" { - const tail: typeof _.tail; - export = tail; -} - - -declare module "lodash/take" { - const take: typeof _.take; - export = take; -} - - -declare module "lodash/takeRight" { - const takeRight: typeof _.takeRight; - export = takeRight; -} - - -declare module "lodash/takeRightWhile" { - const takeRightWhile: typeof _.takeRightWhile; - export = takeRightWhile; -} - - -declare module "lodash/takeWhile" { - const takeWhile: typeof _.takeWhile; - export = takeWhile; -} - - -declare module "lodash/tap" { - const tap: typeof _.tap; - export = tap; -} - - -declare module "lodash/throttle" { - const throttle: typeof _.throttle; - export = throttle; -} - - -declare module "lodash/thru" { - const thru: typeof _.thru; - export = thru; -} - - -declare module "lodash/toArray" { - const toArray: typeof _.toArray; - export = toArray; -} - - -declare module "lodash/toPairs" { - const toPairs: typeof _.toPairs; - export = toPairs; -} - - -declare module "lodash/toPairsIn" { - const toPairsIn: typeof _.toPairsIn; - export = toPairsIn; -} - - -declare module "lodash/toPath" { - const toPath: typeof _.toPath; - export = toPath; -} - - -declare module "lodash/toPlainObject" { - const toPlainObject: typeof _.toPlainObject; - export = toPlainObject; -} - - -declare module "lodash/transform" { - const transform: typeof _.transform; - export = transform; -} - - -declare module "lodash/unary" { - const unary: typeof _.unary; - export = unary; -} - - -declare module "lodash/union" { - const union: typeof _.union; - export = union; -} - - -declare module "lodash/unionBy" { - const unionBy: typeof _.unionBy; - export = unionBy; -} - - -declare module "lodash/unionWith" { - const unionWith: typeof _.unionWith; - export = unionWith; -} - - -declare module "lodash/uniq" { - const uniq: typeof _.uniq; - export = uniq; -} - - -declare module "lodash/uniqBy" { - const uniqBy: typeof _.uniqBy; - export = uniqBy; -} - - -declare module "lodash/uniqWith" { - const uniqWith: typeof _.uniqWith; - export = uniqWith; -} - - -declare module "lodash/unset" { - const unset: typeof _.unset; - export = unset; -} - - -declare module "lodash/unzip" { - const unzip: typeof _.unzip; - export = unzip; -} - - -declare module "lodash/unzipWith" { - const unzipWith: typeof _.unzipWith; - export = unzipWith; -} - - -declare module "lodash/update" { - const update: typeof _.update; - export = update; -} - -/** -* uncoment it if definition exists -*/ -/* -declare module "lodash/updateWith" { - const updateWith: typeof _.updateWith; - export = updateWith; -} -*/ - -declare module "lodash/values" { - const values: typeof _.values; - export = values; -} - - -declare module "lodash/valuesIn" { - const valuesIn: typeof _.valuesIn; - export = valuesIn; -} - - -declare module "lodash/without" { - const without: typeof _.without; - export = without; -} - - -declare module "lodash/words" { - const words: typeof _.words; - export = words; -} - - -declare module "lodash/wrap" { - const wrap: typeof _.wrap; - export = wrap; -} - - -declare module "lodash/xor" { - const xor: typeof _.xor; - export = xor; -} - - -declare module "lodash/xorBy" { - const xorBy: typeof _.xorBy; - export = xorBy; -} - - -declare module "lodash/xorWith" { - const xorWith: typeof _.xorWith; - export = xorWith; -} - - -declare module "lodash/zip" { - const zip: typeof _.zip; - export = zip; -} - - -declare module "lodash/zipObject" { - const zipObject: typeof _.zipObject; - export = zipObject; -} - -/** -* uncoment it if definition exists -*/ -/* -declare module "lodash/zipObjectDeep" { - const zipObjectDeep: typeof _.zipObjectDeep; - export = zipObjectDeep; -} -*/ - - -declare module "lodash/zipWith" { - const zipWith: typeof _.zipWith; - export = zipWith; -} - -/** -* uncoment it if definition exists -*/ -/* -declare module "lodash/entries" { - const entries: typeof _.entries; - export = entries; -} -*/ -/** -* uncoment it if definition exists -*/ -/* -declare module "lodash/entriesIn" { - const entriesIn: typeof _.entriesIn; - export = entriesIn; -} -*/ - - -declare module "lodash/extend" { - const extend: typeof _.extend; - export = extend; -} - - -declare module "lodash/extendWith" { - const extendWith: typeof _.extendWith; - export = extendWith; -} - - -declare module "lodash/add" { - const add: typeof _.add; - export = add; -} - - -declare module "lodash/attempt" { - const attempt: typeof _.attempt; - export = attempt; -} - - -declare module "lodash/camelCase" { - const camelCase: typeof _.camelCase; - export = camelCase; -} - - -declare module "lodash/capitalize" { - const capitalize: typeof _.capitalize; - export = capitalize; -} - - -declare module "lodash/ceil" { - const ceil: typeof _.ceil; - export = ceil; -} - - -declare module "lodash/clamp" { - const clamp: typeof _.clamp; - export = clamp; -} - - -declare module "lodash/clone" { - const clone: typeof _.clone; - export = clone; -} - - -declare module "lodash/cloneDeep" { - const cloneDeep: typeof _.cloneDeep; - export = cloneDeep; -} - - -declare module "lodash/cloneDeepWith" { - const cloneDeepWith: typeof _.cloneDeepWith; - export = cloneDeepWith; -} - - -declare module "lodash/cloneWith" { - const cloneWith: typeof _.cloneWith; - export = cloneWith; -} - - -declare module "lodash/deburr" { - const deburr: typeof _.deburr; - export = deburr; -} - -/** -* uncoment it if definition exists -*/ -/* -declare module "lodash/divide" { - const divide: typeof _.divide; - export = divide; -} -*/ - -declare module "lodash/endsWith" { - const endsWith: typeof _.endsWith; - export = endsWith; -} - - -declare module "lodash/eq" { - const eq: typeof _.eq; - export = eq; -} - - -declare module "lodash/escape" { - const escape: typeof _.escape; - export = escape; -} - - -declare module "lodash/escapeRegExp" { - const escapeRegExp: typeof _.escapeRegExp; - export = escapeRegExp; -} - - -declare module "lodash/every" { - const every: typeof _.every; - export = every; -} - - -declare module "lodash/find" { - const find: typeof _.find; - export = find; -} - - -declare module "lodash/findIndex" { - const findIndex: typeof _.findIndex; - export = findIndex; -} - - -declare module "lodash/findKey" { - const findKey: typeof _.findKey; - export = findKey; -} - - -declare module "lodash/findLast" { - const findLast: typeof _.findLast; - export = findLast; -} - - -declare module "lodash/findLastIndex" { - const findLastIndex: typeof _.findLastIndex; - export = findLastIndex; -} - - -declare module "lodash/findLastKey" { - const findLastKey: typeof _.findLastKey; - export = findLastKey; -} - - -declare module "lodash/floor" { - const floor: typeof _.floor; - export = floor; -} - - -declare module "lodash/forEach" { - const forEach: typeof _.forEach; - export = forEach; -} - - -declare module "lodash/forEachRight" { - const forEachRight: typeof _.forEachRight; - export = forEachRight; -} - - -declare module "lodash/forIn" { - const forIn: typeof _.forIn; - export = forIn; -} - - -declare module "lodash/forInRight" { - const forInRight: typeof _.forInRight; - export = forInRight; -} - - -declare module "lodash/forOwn" { - const forOwn: typeof _.forOwn; - export = forOwn; -} - - -declare module "lodash/forOwnRight" { - const forOwnRight: typeof _.forOwnRight; - export = forOwnRight; -} - - -declare module "lodash/get" { - const get: typeof _.get; - export = get; -} - - -declare module "lodash/gt" { - const gt: typeof _.gt; - export = gt; -} - - -declare module "lodash/gte" { - const gte: typeof _.gte; - export = gte; -} - - -declare module "lodash/has" { - const has: typeof _.has; - export = has; -} - - -declare module "lodash/hasIn" { - const hasIn: typeof _.hasIn; - export = hasIn; -} - - -declare module "lodash/head" { - const head: typeof _.head; - export = head; -} - - -declare module "lodash/identity" { - const identity: typeof _.identity; - export = identity; -} - - -declare module "lodash/includes" { - const includes: typeof _.includes; - export = includes; -} - - -declare module "lodash/indexOf" { - const indexOf: typeof _.indexOf; - export = indexOf; -} - - -declare module "lodash/inRange" { - const inRange: typeof _.inRange; - export = inRange; -} - - -declare module "lodash/invoke" { - const invoke: typeof _.invoke; - export = invoke; -} - - -declare module "lodash/isArguments" { - const isArguments: typeof _.isArguments; - export = isArguments; -} - - -declare module "lodash/isArray" { - const isArray: typeof _.isArray; - export = isArray; -} - - -declare module "lodash/isArrayBuffer" { - const isArrayBuffer: typeof _.isArrayBuffer; - export = isArrayBuffer; -} - - -declare module "lodash/isArrayLike" { - const isArrayLike: typeof _.isArrayLike; - export = isArrayLike; -} - - -declare module "lodash/isArrayLikeObject" { - const isArrayLikeObject: typeof _.isArrayLikeObject; - export = isArrayLikeObject; -} - - -declare module "lodash/isBoolean" { - const isBoolean: typeof _.isBoolean; - export = isBoolean; -} - - -declare module "lodash/isBuffer" { - const isBuffer: typeof _.isBuffer; - export = isBuffer; -} - - -declare module "lodash/isDate" { - const isDate: typeof _.isDate; - export = isDate; -} - - -declare module "lodash/isElement" { - const isElement: typeof _.isElement; - export = isElement; -} - - -declare module "lodash/isEmpty" { - const isEmpty: typeof _.isEmpty; - export = isEmpty; -} - - -declare module "lodash/isEqual" { - const isEqual: typeof _.isEqual; - export = isEqual; -} - - -declare module "lodash/isEqualWith" { - const isEqualWith: typeof _.isEqualWith; - export = isEqualWith; -} - - -declare module "lodash/isError" { - const isError: typeof _.isError; - export = isError; -} - - -declare module "lodash/isFinite" { - const isFinite: typeof _.isFinite; - export = isFinite; -} - - -declare module "lodash/isFunction" { - const isFunction: typeof _.isFunction; - export = isFunction; -} - - -declare module "lodash/isInteger" { - const isInteger: typeof _.isInteger; - export = isInteger; -} - - -declare module "lodash/isLength" { - const isLength: typeof _.isLength; - export = isLength; -} - - -declare module "lodash/isMap" { - const isMap: typeof _.isMap; - export = isMap; -} - - -declare module "lodash/isMatch" { - const isMatch: typeof _.isMatch; - export = isMatch; -} - - -declare module "lodash/isMatchWith" { - const isMatchWith: typeof _.isMatchWith; - export = isMatchWith; -} - - -declare module "lodash/isNaN" { - const isNaN: typeof _.isNaN; - export = isNaN; -} - - -declare module "lodash/isNative" { - const isNative: typeof _.isNative; - export = isNative; -} - - -declare module "lodash/isNil" { - const isNil: typeof _.isNil; - export = isNil; -} - - -declare module "lodash/isNull" { - const isNull: typeof _.isNull; - export = isNull; -} - - -declare module "lodash/isNumber" { - const isNumber: typeof _.isNumber; - export = isNumber; -} - - -declare module "lodash/isObject" { - const isObject: typeof _.isObject; - export = isObject; -} - - -declare module "lodash/isObjectLike" { - const isObjectLike: typeof _.isObjectLike; - export = isObjectLike; -} - - -declare module "lodash/isPlainObject" { - const isPlainObject: typeof _.isPlainObject; - export = isPlainObject; -} - - -declare module "lodash/isRegExp" { - const isRegExp: typeof _.isRegExp; - export = isRegExp; -} - - -declare module "lodash/isSafeInteger" { - const isSafeInteger: typeof _.isSafeInteger; - export = isSafeInteger; -} - - -declare module "lodash/isSet" { - const isSet: typeof _.isSet; - export = isSet; -} - - -declare module "lodash/isString" { - const isString: typeof _.isString; - export = isString; -} - - -declare module "lodash/isSymbol" { - const isSymbol: typeof _.isSymbol; - export = isSymbol; -} - - -declare module "lodash/isTypedArray" { - const isTypedArray: typeof _.isTypedArray; - export = isTypedArray; -} - - -declare module "lodash/isUndefined" { - const isUndefined: typeof _.isUndefined; - export = isUndefined; -} - - -declare module "lodash/isWeakMap" { - const isWeakMap: typeof _.isWeakMap; - export = isWeakMap; -} - - -declare module "lodash/isWeakSet" { - const isWeakSet: typeof _.isWeakSet; - export = isWeakSet; -} - - -declare module "lodash/join" { - const join: typeof _.join; - export = join; -} - - -declare module "lodash/kebabCase" { - const kebabCase: typeof _.kebabCase; - export = kebabCase; -} - - -declare module "lodash/last" { - const last: typeof _.last; - export = last; -} - - -declare module "lodash/lastIndexOf" { - const lastIndexOf: typeof _.lastIndexOf; - export = lastIndexOf; -} - - -declare module "lodash/lowerCase" { - const lowerCase: typeof _.lowerCase; - export = lowerCase; -} - - -declare module "lodash/lowerFirst" { - const lowerFirst: typeof _.lowerFirst; - export = lowerFirst; -} - - -declare module "lodash/lt" { - const lt: typeof _.lt; - export = lt; -} - - -declare module "lodash/lte" { - const lte: typeof _.lte; - export = lte; -} - - -declare module "lodash/max" { - const max: typeof _.max; - export = max; -} - - -declare module "lodash/maxBy" { - const maxBy: typeof _.maxBy; - export = maxBy; -} - - -declare module "lodash/mean" { - const mean: typeof _.mean; - export = mean; -} - -/** -* uncoment it if definition exists -*/ -/* -declare module "lodash/meanBy" { - const meanBy: typeof _.meanBy; - export = meanBy; -} -*/ - -declare module "lodash/min" { - const min: typeof _.min; - export = min; -} - - -declare module "lodash/minBy" { - const minBy: typeof _.minBy; - export = minBy; -} - -/** -* uncoment it if definition exists -*/ -/* -declare module "lodash/multiply" { - const multiply: typeof _.multiply; - export = multiply; -} -*/ - -/** -* uncoment it if definition exists -*/ -/* -declare module "lodash/nth" { - const nth: typeof _.nth; - export = nth; -} -*/ - -declare module "lodash/noConflict" { - const noConflict: typeof _.noConflict; - export = noConflict; -} - - -declare module "lodash/noop" { - const noop: typeof _.noop; - export = noop; -} - - -declare module "lodash/now" { - const now: typeof _.now; - export = now; -} - - -declare module "lodash/pad" { - const pad: typeof _.pad; - export = pad; -} - - -declare module "lodash/padEnd" { - const padEnd: typeof _.padEnd; - export = padEnd; -} - - -declare module "lodash/padStart" { - const padStart: typeof _.padStart; - export = padStart; -} - - -declare module "lodash/parseInt" { - const parseInt: typeof _.parseInt; - export = parseInt; -} - - -declare module "lodash/random" { - const random: typeof _.random; - export = random; -} - - -declare module "lodash/reduce" { - const reduce: typeof _.reduce; - export = reduce; -} - - -declare module "lodash/reduceRight" { - const reduceRight: typeof _.reduceRight; - export = reduceRight; -} - - -declare module "lodash/repeat" { - const repeat: typeof _.repeat; - export = repeat; -} - - -declare module "lodash/replace" { - const replace: typeof _.replace; - export = replace; -} - - -declare module "lodash/result" { - const result: typeof _.result; - export = result; -} - - -declare module "lodash/round" { - const round: typeof _.round; - export = round; -} - - -declare module "lodash/runInContext" { - const runInContext: typeof _.runInContext; - export = runInContext; -} - - -declare module "lodash/sample" { - const sample: typeof _.sample; - export = sample; -} - - -declare module "lodash/size" { - const size: typeof _.size; - export = size; -} - - -declare module "lodash/snakeCase" { - const snakeCase: typeof _.snakeCase; - export = snakeCase; -} - - -declare module "lodash/some" { - const some: typeof _.some; - export = some; -} - - -declare module "lodash/sortedIndex" { - const sortedIndex: typeof _.sortedIndex; - export = sortedIndex; -} - - -declare module "lodash/sortedIndexBy" { - const sortedIndexBy: typeof _.sortedIndexBy; - export = sortedIndexBy; -} - - -declare module "lodash/sortedIndexOf" { - const sortedIndexOf: typeof _.sortedIndexOf; - export = sortedIndexOf; -} - - -declare module "lodash/sortedLastIndex" { - const sortedLastIndex: typeof _.sortedLastIndex; - export = sortedLastIndex; -} - - -declare module "lodash/sortedLastIndexBy" { - const sortedLastIndexBy: typeof _.sortedLastIndexBy; - export = sortedLastIndexBy; -} - - -declare module "lodash/sortedLastIndexOf" { - const sortedLastIndexOf: typeof _.sortedLastIndexOf; - export = sortedLastIndexOf; -} - - -declare module "lodash/startCase" { - const startCase: typeof _.startCase; - export = startCase; -} - - -declare module "lodash/startsWith" { - const startsWith: typeof _.startsWith; - export = startsWith; -} - - -declare module "lodash/subtract" { - const subtract: typeof _.subtract; - export = subtract; -} - - -declare module "lodash/sum" { - const sum: typeof _.sum; - export = sum; -} - - -declare module "lodash/sumBy" { - const sumBy: typeof _.sumBy; - export = sumBy; -} - - -declare module "lodash/template" { - const template: typeof _.template; - export = template; -} - - -declare module "lodash/times" { - const times: typeof _.times; - export = times; -} - - -declare module "lodash/toInteger" { - const toInteger: typeof _.toInteger; - export = toInteger; -} - - -declare module "lodash/toLength" { - const toLength: typeof _.toLength; - export = toLength; -} - - -declare module "lodash/toLower" { - const toLower: typeof _.toLower; - export = toLower; -} - - -declare module "lodash/toNumber" { - const toNumber: typeof _.toNumber; - export = toNumber; -} - - -declare module "lodash/toSafeInteger" { - const toSafeInteger: typeof _.toSafeInteger; - export = toSafeInteger; -} - - -declare module "lodash/toString" { - const toString: typeof _.toString; - export = toString; -} - - -declare module "lodash/toUpper" { - const toUpper: typeof _.toUpper; - export = toUpper; -} - - -declare module "lodash/trim" { - const trim: typeof _.trim; - export = trim; -} - - -declare module "lodash/trimEnd" { - const trimEnd: typeof _.trimEnd; - export = trimEnd; -} - - -declare module "lodash/trimStart" { - const trimStart: typeof _.trimStart; - export = trimStart; -} - - -declare module "lodash/truncate" { - const truncate: typeof _.truncate; - export = truncate; -} - - -declare module "lodash/unescape" { - const unescape: typeof _.unescape; - export = unescape; -} - - -declare module "lodash/uniqueId" { - const uniqueId: typeof _.uniqueId; - export = uniqueId; -} - - -declare module "lodash/upperCase" { - const upperCase: typeof _.upperCase; - export = upperCase; -} - - -declare module "lodash/upperFirst" { - const upperFirst: typeof _.upperFirst; - export = upperFirst; -} - - -declare module "lodash/each" { - const each: typeof _.each; - export = each; -} - - -declare module "lodash/eachRight" { - const eachRight: typeof _.eachRight; - export = eachRight; -} - - -declare module "lodash/first" { - const first: typeof _.first; - export = first; -} - -declare module "lodash/fp" { - export = _; -} - -declare module "lodash" { - export = _; -} - -// Backward compatibility with --target es5 -interface Set {} -interface Map {} -interface WeakSet {} -interface WeakMap {} diff --git a/typings/node-uuid/node-uuid-base.d.ts b/typings/node-uuid/node-uuid-base.d.ts deleted file mode 100644 index fc59e9c7..00000000 --- a/typings/node-uuid/node-uuid-base.d.ts +++ /dev/null @@ -1,46 +0,0 @@ -// Type definitions for node-uuid.js -// Project: https://github.com/broofa/node-uuid -// Definitions by: Jeff May -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -/** Common definitions for all environments */ -declare namespace __NodeUUID { - interface UUIDOptions { - - /** - * Node id as Array of 6 bytes (per 4.1.6). - * Default: Randomly generated ID. See note 1. - */ - node?: any[]; - - /** - * (Number between 0 - 0x3fff) RFC clock sequence. - * Default: An internally maintained clockseq is used. - */ - clockseq?: number; - - /** - * (Number | Date) Time in milliseconds since unix Epoch. - * Default: The current time is used. - */ - msecs?: number|Date; - - /** - * (Number between 0-9999) additional time, in 100-nanosecond units. Ignored if msecs is unspecified. - * Default: internal uuid counter is used, as per 4.2.1.2. - */ - nsecs?: number; - } - - interface UUID { - v1(options?: UUIDOptions): string; - v1(options?: UUIDOptions, buffer?: number[], offset?: number): number[]; - - v4(options?: UUIDOptions): string; - v4(options?: UUIDOptions, buffer?: number[], offset?: number): number[]; - - parse(id: string, buffer?: number[], offset?: number): number[]; - - unparse(buffer: number[], offset?: number): string; - } -} diff --git a/typings/node-uuid/node-uuid-cjs.d.ts b/typings/node-uuid/node-uuid-cjs.d.ts deleted file mode 100644 index 78f75354..00000000 --- a/typings/node-uuid/node-uuid-cjs.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -// Type definitions for node-uuid.js -// Project: https://github.com/broofa/node-uuid -// Definitions by: Jeff May -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -/// - -/** - * Expose as CommonJS module - * For use in node environment or browser environment (using webpack or other module loaders) - */ -declare module "node-uuid" { - var uuid: __NodeUUID.UUID; - export = uuid; -} \ No newline at end of file diff --git a/typings/node-uuid/node-uuid.d.ts b/typings/node-uuid/node-uuid.d.ts deleted file mode 100644 index a6737053..00000000 --- a/typings/node-uuid/node-uuid.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Type definitions for node-uuid.js -// Project: https://github.com/broofa/node-uuid -// Definitions by: Jeff May -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -/// -/// -/// - -/** - * Definitions for use in node environment - * - * !! For browser enviroments, use node-uuid-global or node-uuid-cjs - */ -declare module __NodeUUID { - /** - * Overloads for node environment - * We need to duplicate some declarations because - * interface merging doesn't work with overloads - */ - interface UUID { - v1(options?: UUIDOptions): string; - v1(options?: UUIDOptions, buffer?: number[], offset?: number): number[]; - v1(options?: UUIDOptions, buffer?: Buffer, offset?: number): Buffer; - - v4(options?: UUIDOptions): string; - v4(options?: UUIDOptions, buffer?: number[], offset?: number): number[]; - v4(options?: UUIDOptions, buffer?: Buffer, offset?: number): Buffer; - - parse(id: string, buffer?: number[], offset?: number): number[]; - parse(id: string, buffer?: Buffer, offset?: number): Buffer; - - unparse(buffer: number[], offset?: number): string; - unparse(buffer: Buffer, offset?: number): string; - } -} diff --git a/typings/node/node.d.ts b/typings/node/node.d.ts deleted file mode 100644 index c3d9d2e1..00000000 --- a/typings/node/node.d.ts +++ /dev/null @@ -1,3735 +0,0 @@ -// Type definitions for Node.js v6.x -// Project: http://nodejs.org/ -// Definitions by: Microsoft TypeScript , DefinitelyTyped -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -/************************************************ -* * -* Node.js v6.x API * -* * -************************************************/ - -interface Error { - stack?: string; -} - -interface ErrorConstructor { - captureStackTrace(targetObject: Object, constructorOpt?: Function): void; - stackTraceLimit: number; -} - -// compat for TypeScript 1.8 -// if you use with --target es3 or --target es5 and use below definitions, -// use the lib.es6.d.ts that is bundled with TypeScript 1.8. -interface MapConstructor { } -interface WeakMapConstructor { } -interface SetConstructor { } -interface WeakSetConstructor { } - -/************************************************ -* * -* GLOBAL * -* * -************************************************/ -declare var process: NodeJS.Process; -declare var global: NodeJS.Global; - -declare var __filename: string; -declare var __dirname: string; -declare var console: any; - -declare function setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timer; -declare function clearTimeout(timeoutId: NodeJS.Timer): void; -declare function setInterval(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timer; -declare function clearInterval(intervalId: NodeJS.Timer): void; -declare function setImmediate(callback: (...args: any[]) => void, ...args: any[]): any; -declare function clearImmediate(immediateId: any): void; - -interface NodeRequireFunction { - (id: string): any; -} - -interface NodeRequire extends NodeRequireFunction { - resolve(id: string): string; - cache: any; - extensions: any; - main: any; -} - -declare var require: NodeRequire; - -interface NodeModule { - exports: any; - require: NodeRequireFunction; - id: string; - filename: string; - loaded: boolean; - parent: any; - children: any[]; -} - -declare var module: NodeModule; - -// Same as module.exports -declare var exports: any; -declare var SlowBuffer: { - new (str: string, encoding?: string): Buffer; - new (size: number): Buffer; - new (size: Uint8Array): Buffer; - new (array: any[]): Buffer; - prototype: Buffer; - isBuffer(obj: any): boolean; - byteLength(string: string, encoding?: string): number; - concat(list: Buffer[], totalLength?: number): Buffer; -}; - - -// Buffer class -type BufferEncoding = "ascii" | "utf8" | "utf16le" | "ucs2" | "binary" | "hex"; -interface Buffer extends NodeBuffer { } - -/** - * Raw data is stored in instances of the Buffer class. - * A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized. - * Valid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex' - */ -declare var Buffer: { - /** - * Allocates a new buffer containing the given {str}. - * - * @param str String to store in buffer. - * @param encoding encoding to use, optional. Default is 'utf8' - */ - new (str: string, encoding?: string): Buffer; - /** - * Allocates a new buffer of {size} octets. - * - * @param size count of octets to allocate. - */ - new (size: number): Buffer; - /** - * Allocates a new buffer containing the given {array} of octets. - * - * @param array The octets to store. - */ - new (array: Uint8Array): Buffer; - /** - * Produces a Buffer backed by the same allocated memory as - * the given {ArrayBuffer}. - * - * - * @param arrayBuffer The ArrayBuffer with which to share memory. - */ - new (arrayBuffer: ArrayBuffer): Buffer; - /** - * Allocates a new buffer containing the given {array} of octets. - * - * @param array The octets to store. - */ - new (array: any[]): Buffer; - /** - * Copies the passed {buffer} data onto a new {Buffer} instance. - * - * @param buffer The buffer to copy. - */ - new (buffer: Buffer): Buffer; - prototype: Buffer; - /** - * Allocates a new Buffer using an {array} of octets. - * - * @param array - */ - from(array: any[]): Buffer; - /** - * When passed a reference to the .buffer property of a TypedArray instance, - * the newly created Buffer will share the same allocated memory as the TypedArray. - * The optional {byteOffset} and {length} arguments specify a memory range - * within the {arrayBuffer} that will be shared by the Buffer. - * - * @param arrayBuffer The .buffer property of a TypedArray or a new ArrayBuffer() - * @param byteOffset - * @param length - */ - from(arrayBuffer: ArrayBuffer, byteOffset?: number, length?: number): Buffer; - /** - * Copies the passed {buffer} data onto a new Buffer instance. - * - * @param buffer - */ - from(buffer: Buffer): Buffer; - /** - * Creates a new Buffer containing the given JavaScript string {str}. - * If provided, the {encoding} parameter identifies the character encoding. - * If not provided, {encoding} defaults to 'utf8'. - * - * @param str - */ - from(str: string, encoding?: string): Buffer; - /** - * Returns true if {obj} is a Buffer - * - * @param obj object to test. - */ - isBuffer(obj: any): obj is Buffer; - /** - * Returns true if {encoding} is a valid encoding argument. - * Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex' - * - * @param encoding string to test. - */ - isEncoding(encoding: string): boolean; - /** - * Gives the actual byte length of a string. encoding defaults to 'utf8'. - * This is not the same as String.prototype.length since that returns the number of characters in a string. - * - * @param string string to test. - * @param encoding encoding used to evaluate (defaults to 'utf8') - */ - byteLength(string: string, encoding?: string): number; - /** - * Returns a buffer which is the result of concatenating all the buffers in the list together. - * - * If the list has no items, or if the totalLength is 0, then it returns a zero-length buffer. - * If the list has exactly one item, then the first item of the list is returned. - * If the list has more than one item, then a new Buffer is created. - * - * @param list An array of Buffer objects to concatenate - * @param totalLength Total length of the buffers when concatenated. - * If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly. - */ - concat(list: Buffer[], totalLength?: number): Buffer; - /** - * The same as buf1.compare(buf2). - */ - compare(buf1: Buffer, buf2: Buffer): number; - /** - * Allocates a new buffer of {size} octets. - * - * @param size count of octets to allocate. - * @param fill if specified, buffer will be initialized by calling buf.fill(fill). - * If parameter is omitted, buffer will be filled with zeros. - * @param encoding encoding used for call to buf.fill while initalizing - */ - alloc(size: number, fill?: string | Buffer | number, encoding?: string): Buffer; - /** - * Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents - * of the newly created Buffer are unknown and may contain sensitive data. - * - * @param size count of octets to allocate - */ - allocUnsafe(size: number): Buffer; - /** - * Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents - * of the newly created Buffer are unknown and may contain sensitive data. - * - * @param size count of octets to allocate - */ - allocUnsafeSlow(size: number): Buffer; -}; - -/************************************************ -* * -* GLOBAL INTERFACES * -* * -************************************************/ -declare namespace NodeJS { - export interface ErrnoException extends Error { - errno?: string; - code?: string; - path?: string; - syscall?: string; - stack?: string; - } - - export class EventEmitter { - addListener(event: string | symbol, listener: Function): this; - on(event: string | symbol, listener: Function): this; - once(event: string | symbol, listener: Function): this; - removeListener(event: string | symbol, listener: Function): this; - removeAllListeners(event?: string | symbol): this; - setMaxListeners(n: number): this; - getMaxListeners(): number; - listeners(event: string | symbol): Function[]; - emit(event: string | symbol, ...args: any[]): boolean; - listenerCount(type: string | symbol): number; - // Added in Node 6... - prependListener(event: string | symbol, listener: Function): this; - prependOnceListener(event: string | symbol, listener: Function): this; - eventNames(): (string | symbol)[]; - } - - export interface ReadableStream extends EventEmitter { - readable: boolean; - read(size?: number): string | Buffer; - setEncoding(encoding: string): void; - pause(): ReadableStream; - resume(): ReadableStream; - pipe(destination: T, options?: { end?: boolean; }): T; - unpipe(destination?: T): void; - unshift(chunk: string): void; - unshift(chunk: Buffer): void; - wrap(oldStream: ReadableStream): ReadableStream; - } - - export interface WritableStream extends EventEmitter { - writable: boolean; - write(buffer: Buffer | string, cb?: Function): boolean; - write(str: string, encoding?: string, cb?: Function): boolean; - end(): void; - end(buffer: Buffer, cb?: Function): void; - end(str: string, cb?: Function): void; - end(str: string, encoding?: string, cb?: Function): void; - } - - export interface ReadWriteStream extends ReadableStream, WritableStream { - pause(): ReadWriteStream; - resume(): ReadWriteStream; - } - - export interface Events extends EventEmitter { } - - export interface Domain extends Events { - run(fn: Function): void; - add(emitter: Events): void; - remove(emitter: Events): void; - bind(cb: (err: Error, data: any) => any): any; - intercept(cb: (data: any) => any): any; - dispose(): void; - - addListener(event: string, listener: Function): this; - on(event: string, listener: Function): this; - once(event: string, listener: Function): this; - removeListener(event: string, listener: Function): this; - removeAllListeners(event?: string): this; - } - - export interface MemoryUsage { - rss: number; - heapTotal: number; - heapUsed: number; - } - - export interface ProcessVersions { - http_parser: string; - node: string; - v8: string; - ares: string; - uv: string; - zlib: string; - modules: string; - openssl: string; - } - - export interface Process extends EventEmitter { - stdout: WritableStream; - stderr: WritableStream; - stdin: ReadableStream; - argv: string[]; - execArgv: string[]; - execPath: string; - abort(): void; - chdir(directory: string): void; - cwd(): string; - env: any; - exit(code?: number): void; - exitCode: number; - getgid(): number; - setgid(id: number): void; - setgid(id: string): void; - getuid(): number; - setuid(id: number): void; - setuid(id: string): void; - version: string; - versions: ProcessVersions; - config: { - target_defaults: { - cflags: any[]; - default_configuration: string; - defines: string[]; - include_dirs: string[]; - libraries: string[]; - }; - variables: { - clang: number; - host_arch: string; - node_install_npm: boolean; - node_install_waf: boolean; - node_prefix: string; - node_shared_openssl: boolean; - node_shared_v8: boolean; - node_shared_zlib: boolean; - node_use_dtrace: boolean; - node_use_etw: boolean; - node_use_openssl: boolean; - target_arch: string; - v8_no_strict_aliasing: number; - v8_use_snapshot: boolean; - visibility: string; - }; - }; - kill(pid: number, signal?: string | number): void; - pid: number; - title: string; - arch: string; - platform: string; - memoryUsage(): MemoryUsage; - nextTick(callback: Function, ...args: any[]): void; - umask(mask?: number): number; - uptime(): number; - hrtime(time?: number[]): number[]; - domain: Domain; - - // Worker - send?(message: any, sendHandle?: any): void; - disconnect(): void; - connected: boolean; - } - - export interface Global { - Array: typeof Array; - ArrayBuffer: typeof ArrayBuffer; - Boolean: typeof Boolean; - Buffer: typeof Buffer; - DataView: typeof DataView; - Date: typeof Date; - Error: typeof Error; - EvalError: typeof EvalError; - Float32Array: typeof Float32Array; - Float64Array: typeof Float64Array; - Function: typeof Function; - GLOBAL: Global; - Infinity: typeof Infinity; - Int16Array: typeof Int16Array; - Int32Array: typeof Int32Array; - Int8Array: typeof Int8Array; - Intl: typeof Intl; - JSON: typeof JSON; - Map: MapConstructor; - Math: typeof Math; - NaN: typeof NaN; - Number: typeof Number; - Object: typeof Object; - Promise: Function; - RangeError: typeof RangeError; - ReferenceError: typeof ReferenceError; - RegExp: typeof RegExp; - Set: SetConstructor; - String: typeof String; - Symbol: Function; - SyntaxError: typeof SyntaxError; - TypeError: typeof TypeError; - URIError: typeof URIError; - Uint16Array: typeof Uint16Array; - Uint32Array: typeof Uint32Array; - Uint8Array: typeof Uint8Array; - Uint8ClampedArray: Function; - WeakMap: WeakMapConstructor; - WeakSet: WeakSetConstructor; - clearImmediate: (immediateId: any) => void; - clearInterval: (intervalId: NodeJS.Timer) => void; - clearTimeout: (timeoutId: NodeJS.Timer) => void; - console: typeof console; - decodeURI: typeof decodeURI; - decodeURIComponent: typeof decodeURIComponent; - encodeURI: typeof encodeURI; - encodeURIComponent: typeof encodeURIComponent; - escape: (str: string) => string; - eval: typeof eval; - global: Global; - isFinite: typeof isFinite; - isNaN: typeof isNaN; - parseFloat: typeof parseFloat; - parseInt: typeof parseInt; - process: Process; - root: Global; - setImmediate: (callback: (...args: any[]) => void, ...args: any[]) => any; - setInterval: (callback: (...args: any[]) => void, ms: number, ...args: any[]) => NodeJS.Timer; - setTimeout: (callback: (...args: any[]) => void, ms: number, ...args: any[]) => NodeJS.Timer; - undefined: typeof undefined; - unescape: (str: string) => string; - gc: () => void; - v8debug?: any; - } - - export interface Timer { - ref(): void; - unref(): void; - } -} - -interface IterableIterator { } - -/** - * @deprecated - */ -interface NodeBuffer extends Uint8Array { - write(string: string, offset?: number, length?: number, encoding?: string): number; - toString(encoding?: string, start?: number, end?: number): string; - toJSON(): { type: 'Buffer', data: any[] }; - equals(otherBuffer: Buffer): boolean; - compare(otherBuffer: Buffer, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number; - copy(targetBuffer: Buffer, targetStart?: number, sourceStart?: number, sourceEnd?: number): number; - slice(start?: number, end?: number): Buffer; - writeUIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeUIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - readUIntLE(offset: number, byteLength: number, noAssert?: boolean): number; - readUIntBE(offset: number, byteLength: number, noAssert?: boolean): number; - readIntLE(offset: number, byteLength: number, noAssert?: boolean): number; - readIntBE(offset: number, byteLength: number, noAssert?: boolean): number; - readUInt8(offset: number, noAssert?: boolean): number; - readUInt16LE(offset: number, noAssert?: boolean): number; - readUInt16BE(offset: number, noAssert?: boolean): number; - readUInt32LE(offset: number, noAssert?: boolean): number; - readUInt32BE(offset: number, noAssert?: boolean): number; - readInt8(offset: number, noAssert?: boolean): number; - readInt16LE(offset: number, noAssert?: boolean): number; - readInt16BE(offset: number, noAssert?: boolean): number; - readInt32LE(offset: number, noAssert?: boolean): number; - readInt32BE(offset: number, noAssert?: boolean): number; - readFloatLE(offset: number, noAssert?: boolean): number; - readFloatBE(offset: number, noAssert?: boolean): number; - readDoubleLE(offset: number, noAssert?: boolean): number; - readDoubleBE(offset: number, noAssert?: boolean): number; - swap16(): Buffer; - swap32(): Buffer; - swap64(): Buffer; - writeUInt8(value: number, offset: number, noAssert?: boolean): number; - writeUInt16LE(value: number, offset: number, noAssert?: boolean): number; - writeUInt16BE(value: number, offset: number, noAssert?: boolean): number; - writeUInt32LE(value: number, offset: number, noAssert?: boolean): number; - writeUInt32BE(value: number, offset: number, noAssert?: boolean): number; - writeInt8(value: number, offset: number, noAssert?: boolean): number; - writeInt16LE(value: number, offset: number, noAssert?: boolean): number; - writeInt16BE(value: number, offset: number, noAssert?: boolean): number; - writeInt32LE(value: number, offset: number, noAssert?: boolean): number; - writeInt32BE(value: number, offset: number, noAssert?: boolean): number; - writeFloatLE(value: number, offset: number, noAssert?: boolean): number; - writeFloatBE(value: number, offset: number, noAssert?: boolean): number; - writeDoubleLE(value: number, offset: number, noAssert?: boolean): number; - writeDoubleBE(value: number, offset: number, noAssert?: boolean): number; - fill(value: any, offset?: number, end?: number): this; - indexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; - lastIndexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; - entries(): IterableIterator<[number, number]>; - includes(value: string | number | Buffer, byteOffset?: number, encoding?: string): boolean; - keys(): IterableIterator; - values(): IterableIterator; -} - -/************************************************ -* * -* MODULES * -* * -************************************************/ -declare module "buffer" { - export var INSPECT_MAX_BYTES: number; - var BuffType: typeof Buffer; - var SlowBuffType: typeof SlowBuffer; - export { BuffType as Buffer, SlowBuffType as SlowBuffer }; -} - -declare module "querystring" { - export interface StringifyOptions { - encodeURIComponent?: Function; - } - - export interface ParseOptions { - maxKeys?: number; - decodeURIComponent?: Function; - } - - export function stringify(obj: T, sep?: string, eq?: string, options?: StringifyOptions): string; - export function parse(str: string, sep?: string, eq?: string, options?: ParseOptions): any; - export function parse(str: string, sep?: string, eq?: string, options?: ParseOptions): T; - export function escape(str: string): string; - export function unescape(str: string): string; -} - -declare module "events" { - export class EventEmitter extends NodeJS.EventEmitter { - static EventEmitter: EventEmitter; - static listenerCount(emitter: EventEmitter, event: string | symbol): number; // deprecated - static defaultMaxListeners: number; - - addListener(event: string | symbol, listener: Function): this; - on(event: string | symbol, listener: Function): this; - once(event: string | symbol, listener: Function): this; - prependListener(event: string | symbol, listener: Function): this; - prependOnceListener(event: string | symbol, listener: Function): this; - removeListener(event: string | symbol, listener: Function): this; - removeAllListeners(event?: string | symbol): this; - setMaxListeners(n: number): this; - getMaxListeners(): number; - listeners(event: string | symbol): Function[]; - emit(event: string | symbol, ...args: any[]): boolean; - eventNames(): (string | symbol)[]; - listenerCount(type: string | symbol): number; - } -} - -declare module "http" { - import * as events from "events"; - import * as net from "net"; - import * as stream from "stream"; - - export interface RequestOptions { - protocol?: string; - host?: string; - hostname?: string; - family?: number; - port?: number; - localAddress?: string; - socketPath?: string; - method?: string; - path?: string; - headers?: { [key: string]: any }; - auth?: string; - agent?: Agent | boolean; - } - - export interface Server extends net.Server { - setTimeout(msecs: number, callback: Function): void; - maxHeadersCount: number; - timeout: number; - listening: boolean; - } - /** - * @deprecated Use IncomingMessage - */ - export interface ServerRequest extends IncomingMessage { - connection: net.Socket; - } - export interface ServerResponse extends stream.Writable { - // Extended base methods - write(buffer: Buffer): boolean; - write(buffer: Buffer, cb?: Function): boolean; - write(str: string, cb?: Function): boolean; - write(str: string, encoding?: string, cb?: Function): boolean; - write(str: string, encoding?: string, fd?: string): boolean; - - writeContinue(): void; - writeHead(statusCode: number, reasonPhrase?: string, headers?: any): void; - writeHead(statusCode: number, headers?: any): void; - statusCode: number; - statusMessage: string; - headersSent: boolean; - setHeader(name: string, value: string | string[]): void; - setTimeout(msecs: number, callback: Function): ServerResponse; - sendDate: boolean; - getHeader(name: string): string; - removeHeader(name: string): void; - write(chunk: any, encoding?: string): any; - addTrailers(headers: any): void; - finished: boolean; - - // Extended base methods - end(): void; - end(buffer: Buffer, cb?: Function): void; - end(str: string, cb?: Function): void; - end(str: string, encoding?: string, cb?: Function): void; - end(data?: any, encoding?: string): void; - } - export interface ClientRequest extends stream.Writable { - // Extended base methods - write(buffer: Buffer): boolean; - write(buffer: Buffer, cb?: Function): boolean; - write(str: string, cb?: Function): boolean; - write(str: string, encoding?: string, cb?: Function): boolean; - write(str: string, encoding?: string, fd?: string): boolean; - - write(chunk: any, encoding?: string): void; - abort(): void; - setTimeout(timeout: number, callback?: Function): void; - setNoDelay(noDelay?: boolean): void; - setSocketKeepAlive(enable?: boolean, initialDelay?: number): void; - - setHeader(name: string, value: string | string[]): void; - getHeader(name: string): string; - removeHeader(name: string): void; - addTrailers(headers: any): void; - - // Extended base methods - end(): void; - end(buffer: Buffer, cb?: Function): void; - end(str: string, cb?: Function): void; - end(str: string, encoding?: string, cb?: Function): void; - end(data?: any, encoding?: string): void; - } - export interface IncomingMessage extends stream.Readable { - httpVersion: string; - httpVersionMajor: number; - httpVersionMinor: number; - connection: net.Socket; - headers: any; - rawHeaders: string[]; - trailers: any; - rawTrailers: any; - setTimeout(msecs: number, callback: Function): NodeJS.Timer; - /** - * Only valid for request obtained from http.Server. - */ - method?: string; - /** - * Only valid for request obtained from http.Server. - */ - url?: string; - /** - * Only valid for response obtained from http.ClientRequest. - */ - statusCode?: number; - /** - * Only valid for response obtained from http.ClientRequest. - */ - statusMessage?: string; - socket: net.Socket; - destroy(error?: Error): void; - } - /** - * @deprecated Use IncomingMessage - */ - export interface ClientResponse extends IncomingMessage { } - - export interface AgentOptions { - /** - * Keep sockets around in a pool to be used by other requests in the future. Default = false - */ - keepAlive?: boolean; - /** - * When using HTTP KeepAlive, how often to send TCP KeepAlive packets over sockets being kept alive. Default = 1000. - * Only relevant if keepAlive is set to true. - */ - keepAliveMsecs?: number; - /** - * Maximum number of sockets to allow per host. Default for Node 0.10 is 5, default for Node 0.12 is Infinity - */ - maxSockets?: number; - /** - * Maximum number of sockets to leave open in a free state. Only relevant if keepAlive is set to true. Default = 256. - */ - maxFreeSockets?: number; - } - - export class Agent { - maxSockets: number; - sockets: any; - requests: any; - - constructor(opts?: AgentOptions); - - /** - * Destroy any sockets that are currently in use by the agent. - * It is usually not necessary to do this. However, if you are using an agent with KeepAlive enabled, - * then it is best to explicitly shut down the agent when you know that it will no longer be used. Otherwise, - * sockets may hang open for quite a long time before the server terminates them. - */ - destroy(): void; - } - - export var METHODS: string[]; - - export var STATUS_CODES: { - [errorCode: number]: string; - [errorCode: string]: string; - }; - export function createServer(requestListener?: (request: IncomingMessage, response: ServerResponse) => void): Server; - export function createClient(port?: number, host?: string): any; - export function request(options: RequestOptions, callback?: (res: IncomingMessage) => void): ClientRequest; - export function get(options: any, callback?: (res: IncomingMessage) => void): ClientRequest; - export var globalAgent: Agent; -} - -declare module "cluster" { - import * as child from "child_process"; - import * as events from "events"; - import * as net from "net"; - - // interfaces - export interface ClusterSettings { - execArgv?: string[]; // default: process.execArgv - exec?: string; - args?: string[]; - silent?: boolean; - stdio?: any[]; - uid?: number; - gid?: number; - } - - export interface ClusterSetupMasterSettings { - exec?: string; // default: process.argv[1] - args?: string[]; // default: process.argv.slice(2) - silent?: boolean; // default: false - stdio?: any[]; - } - - export interface Address { - address: string; - port: number; - addressType: number | "udp4" | "udp6"; // 4, 6, -1, "udp4", "udp6" - } - - export class Worker extends events.EventEmitter { - id: string; - process: child.ChildProcess; - suicide: boolean; - send(message: any, sendHandle?: any): boolean; - kill(signal?: string): void; - destroy(signal?: string): void; - disconnect(): void; - isConnected(): boolean; - isDead(): boolean; - exitedAfterDisconnect: boolean; - - /** - * events.EventEmitter - * 1. disconnect - * 2. error - * 3. exit - * 4. listening - * 5. message - * 6. online - */ - addListener(event: string, listener: Function): this; - addListener(event: "disconnect", listener: () => void): this; - addListener(event: "error", listener: (code: number, signal: string) => void): this; - addListener(event: "exit", listener: (code: number, signal: string) => void): this; - addListener(event: "listening", listener: (address: Address) => void): this; - addListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. - addListener(event: "online", listener: () => void): this; - - emit(event: string, listener: Function): boolean - emit(event: "disconnect", listener: () => void): boolean - emit(event: "error", listener: (code: number, signal: string) => void): boolean - emit(event: "exit", listener: (code: number, signal: string) => void): boolean - emit(event: "listening", listener: (address: Address) => void): boolean - emit(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): boolean - emit(event: "online", listener: () => void): boolean - - on(event: string, listener: Function): this; - on(event: "disconnect", listener: () => void): this; - on(event: "error", listener: (code: number, signal: string) => void): this; - on(event: "exit", listener: (code: number, signal: string) => void): this; - on(event: "listening", listener: (address: Address) => void): this; - on(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. - on(event: "online", listener: () => void): this; - - once(event: string, listener: Function): this; - once(event: "disconnect", listener: () => void): this; - once(event: "error", listener: (code: number, signal: string) => void): this; - once(event: "exit", listener: (code: number, signal: string) => void): this; - once(event: "listening", listener: (address: Address) => void): this; - once(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. - once(event: "online", listener: () => void): this; - - prependListener(event: string, listener: Function): this; - prependListener(event: "disconnect", listener: () => void): this; - prependListener(event: "error", listener: (code: number, signal: string) => void): this; - prependListener(event: "exit", listener: (code: number, signal: string) => void): this; - prependListener(event: "listening", listener: (address: Address) => void): this; - prependListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. - prependListener(event: "online", listener: () => void): this; - - prependOnceListener(event: string, listener: Function): this; - prependOnceListener(event: "disconnect", listener: () => void): this; - prependOnceListener(event: "error", listener: (code: number, signal: string) => void): this; - prependOnceListener(event: "exit", listener: (code: number, signal: string) => void): this; - prependOnceListener(event: "listening", listener: (address: Address) => void): this; - prependOnceListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. - prependOnceListener(event: "online", listener: () => void): this; - } - - export interface Cluster extends events.EventEmitter { - Worker: Worker; - disconnect(callback?: Function): void; - fork(env?: any): Worker; - isMaster: boolean; - isWorker: boolean; - // TODO: cluster.schedulingPolicy - settings: ClusterSettings; - setupMaster(settings?: ClusterSetupMasterSettings): void; - worker: Worker; - workers: { - [index: string]: Worker - }; - - /** - * events.EventEmitter - * 1. disconnect - * 2. exit - * 3. fork - * 4. listening - * 5. message - * 6. online - * 7. setup - */ - addListener(event: string, listener: Function): this; - addListener(event: "disconnect", listener: (worker: Worker) => void): this; - addListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; - addListener(event: "fork", listener: (worker: Worker) => void): this; - addListener(event: "listening", listener: (worker: Worker, address: Address) => void): this; - addListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. - addListener(event: "online", listener: (worker: Worker) => void): this; - addListener(event: "setup", listener: (settings: any) => void): this; - - emit(event: string, listener: Function): boolean; - emit(event: "disconnect", listener: (worker: Worker) => void): boolean; - emit(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): boolean; - emit(event: "fork", listener: (worker: Worker) => void): boolean; - emit(event: "listening", listener: (worker: Worker, address: Address) => void): boolean; - emit(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): boolean; - emit(event: "online", listener: (worker: Worker) => void): boolean; - emit(event: "setup", listener: (settings: any) => void): boolean; - - on(event: string, listener: Function): this; - on(event: "disconnect", listener: (worker: Worker) => void): this; - on(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; - on(event: "fork", listener: (worker: Worker) => void): this; - on(event: "listening", listener: (worker: Worker, address: Address) => void): this; - on(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. - on(event: "online", listener: (worker: Worker) => void): this; - on(event: "setup", listener: (settings: any) => void): this; - - once(event: string, listener: Function): this; - once(event: "disconnect", listener: (worker: Worker) => void): this; - once(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; - once(event: "fork", listener: (worker: Worker) => void): this; - once(event: "listening", listener: (worker: Worker, address: Address) => void): this; - once(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. - once(event: "online", listener: (worker: Worker) => void): this; - once(event: "setup", listener: (settings: any) => void): this; - - prependListener(event: string, listener: Function): this; - prependListener(event: "disconnect", listener: (worker: Worker) => void): this; - prependListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; - prependListener(event: "fork", listener: (worker: Worker) => void): this; - prependListener(event: "listening", listener: (worker: Worker, address: Address) => void): this; - prependListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. - prependListener(event: "online", listener: (worker: Worker) => void): this; - prependListener(event: "setup", listener: (settings: any) => void): this; - - prependOnceListener(event: string, listener: Function): this; - prependOnceListener(event: "disconnect", listener: (worker: Worker) => void): this; - prependOnceListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; - prependOnceListener(event: "fork", listener: (worker: Worker) => void): this; - prependOnceListener(event: "listening", listener: (worker: Worker, address: Address) => void): this; - prependOnceListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. - prependOnceListener(event: "online", listener: (worker: Worker) => void): this; - prependOnceListener(event: "setup", listener: (settings: any) => void): this; - - } - - export function disconnect(callback?: Function): void; - export function fork(env?: any): Worker; - export var isMaster: boolean; - export var isWorker: boolean; - // TODO: cluster.schedulingPolicy - export var settings: ClusterSettings; - export function setupMaster(settings?: ClusterSetupMasterSettings): void; - export var worker: Worker; - export var workers: { - [index: string]: Worker - }; - - /** - * events.EventEmitter - * 1. disconnect - * 2. exit - * 3. fork - * 4. listening - * 5. message - * 6. online - * 7. setup - */ - export function addListener(event: string, listener: Function): Cluster; - export function addListener(event: "disconnect", listener: (worker: Worker) => void): Cluster; - export function addListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster; - export function addListener(event: "fork", listener: (worker: Worker) => void): Cluster; - export function addListener(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster; - export function addListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; // the handle is a net.Socket or net.Server object, or undefined. - export function addListener(event: "online", listener: (worker: Worker) => void): Cluster; - export function addListener(event: "setup", listener: (settings: any) => void): Cluster; - - export function emit(event: string, listener: Function): boolean; - export function emit(event: "disconnect", listener: (worker: Worker) => void): boolean; - export function emit(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): boolean; - export function emit(event: "fork", listener: (worker: Worker) => void): boolean; - export function emit(event: "listening", listener: (worker: Worker, address: Address) => void): boolean; - export function emit(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): boolean; - export function emit(event: "online", listener: (worker: Worker) => void): boolean; - export function emit(event: "setup", listener: (settings: any) => void): boolean; - - export function on(event: string, listener: Function): Cluster; - export function on(event: "disconnect", listener: (worker: Worker) => void): Cluster; - export function on(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster; - export function on(event: "fork", listener: (worker: Worker) => void): Cluster; - export function on(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster; - export function on(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; // the handle is a net.Socket or net.Server object, or undefined. - export function on(event: "online", listener: (worker: Worker) => void): Cluster; - export function on(event: "setup", listener: (settings: any) => void): Cluster; - - export function once(event: string, listener: Function): Cluster; - export function once(event: "disconnect", listener: (worker: Worker) => void): Cluster; - export function once(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster; - export function once(event: "fork", listener: (worker: Worker) => void): Cluster; - export function once(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster; - export function once(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; // the handle is a net.Socket or net.Server object, or undefined. - export function once(event: "online", listener: (worker: Worker) => void): Cluster; - export function once(event: "setup", listener: (settings: any) => void): Cluster; - - export function removeListener(event: string, listener: Function): Cluster; - export function removeAllListeners(event?: string): Cluster; - export function setMaxListeners(n: number): Cluster; - export function getMaxListeners(): number; - export function listeners(event: string): Function[]; - export function listenerCount(type: string): number; - - export function prependListener(event: string, listener: Function): Cluster; - export function prependListener(event: "disconnect", listener: (worker: Worker) => void): Cluster; - export function prependListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster; - export function prependListener(event: "fork", listener: (worker: Worker) => void): Cluster; - export function prependListener(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster; - export function prependListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; // the handle is a net.Socket or net.Server object, or undefined. - export function prependListener(event: "online", listener: (worker: Worker) => void): Cluster; - export function prependListener(event: "setup", listener: (settings: any) => void): Cluster; - - export function prependOnceListener(event: string, listener: Function): Cluster; - export function prependOnceListener(event: "disconnect", listener: (worker: Worker) => void): Cluster; - export function prependOnceListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster; - export function prependOnceListener(event: "fork", listener: (worker: Worker) => void): Cluster; - export function prependOnceListener(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster; - export function prependOnceListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; // the handle is a net.Socket or net.Server object, or undefined. - export function prependOnceListener(event: "online", listener: (worker: Worker) => void): Cluster; - export function prependOnceListener(event: "setup", listener: (settings: any) => void): Cluster; - - export function eventNames(): string[]; -} - -declare module "zlib" { - import * as stream from "stream"; - export interface ZlibOptions { chunkSize?: number; windowBits?: number; level?: number; memLevel?: number; strategy?: number; dictionary?: any; } - - export interface Gzip extends stream.Transform { } - export interface Gunzip extends stream.Transform { } - export interface Deflate extends stream.Transform { } - export interface Inflate extends stream.Transform { } - export interface DeflateRaw extends stream.Transform { } - export interface InflateRaw extends stream.Transform { } - export interface Unzip extends stream.Transform { } - - export function createGzip(options?: ZlibOptions): Gzip; - export function createGunzip(options?: ZlibOptions): Gunzip; - export function createDeflate(options?: ZlibOptions): Deflate; - export function createInflate(options?: ZlibOptions): Inflate; - export function createDeflateRaw(options?: ZlibOptions): DeflateRaw; - export function createInflateRaw(options?: ZlibOptions): InflateRaw; - export function createUnzip(options?: ZlibOptions): Unzip; - - export function deflate(buf: Buffer, callback: (error: Error, result: any) => void): void; - export function deflateSync(buf: Buffer, options?: ZlibOptions): any; - export function deflateRaw(buf: Buffer, callback: (error: Error, result: any) => void): void; - export function deflateRawSync(buf: Buffer, options?: ZlibOptions): any; - export function gzip(buf: Buffer, callback: (error: Error, result: any) => void): void; - export function gzipSync(buf: Buffer, options?: ZlibOptions): any; - export function gunzip(buf: Buffer, callback: (error: Error, result: any) => void): void; - export function gunzipSync(buf: Buffer, options?: ZlibOptions): any; - export function inflate(buf: Buffer, callback: (error: Error, result: any) => void): void; - export function inflateSync(buf: Buffer, options?: ZlibOptions): any; - export function inflateRaw(buf: Buffer, callback: (error: Error, result: any) => void): void; - export function inflateRawSync(buf: Buffer, options?: ZlibOptions): any; - export function unzip(buf: Buffer, callback: (error: Error, result: any) => void): void; - export function unzipSync(buf: Buffer, options?: ZlibOptions): any; - - // Constants - export var Z_NO_FLUSH: number; - export var Z_PARTIAL_FLUSH: number; - export var Z_SYNC_FLUSH: number; - export var Z_FULL_FLUSH: number; - export var Z_FINISH: number; - export var Z_BLOCK: number; - export var Z_TREES: number; - export var Z_OK: number; - export var Z_STREAM_END: number; - export var Z_NEED_DICT: number; - export var Z_ERRNO: number; - export var Z_STREAM_ERROR: number; - export var Z_DATA_ERROR: number; - export var Z_MEM_ERROR: number; - export var Z_BUF_ERROR: number; - export var Z_VERSION_ERROR: number; - export var Z_NO_COMPRESSION: number; - export var Z_BEST_SPEED: number; - export var Z_BEST_COMPRESSION: number; - export var Z_DEFAULT_COMPRESSION: number; - export var Z_FILTERED: number; - export var Z_HUFFMAN_ONLY: number; - export var Z_RLE: number; - export var Z_FIXED: number; - export var Z_DEFAULT_STRATEGY: number; - export var Z_BINARY: number; - export var Z_TEXT: number; - export var Z_ASCII: number; - export var Z_UNKNOWN: number; - export var Z_DEFLATED: number; - export var Z_NULL: number; -} - -declare module "os" { - export interface CpuInfo { - model: string; - speed: number; - times: { - user: number; - nice: number; - sys: number; - idle: number; - irq: number; - }; - } - - export interface NetworkInterfaceInfo { - address: string; - netmask: string; - family: string; - mac: string; - internal: boolean; - } - - export function hostname(): string; - export function loadavg(): number[]; - export function uptime(): number; - export function freemem(): number; - export function totalmem(): number; - export function cpus(): CpuInfo[]; - export function type(): string; - export function release(): string; - export function networkInterfaces(): { [index: string]: NetworkInterfaceInfo[] }; - export function homedir(): string; - export function userInfo(options?: { encoding: string }): { username: string, uid: number, gid: number, shell: any, homedir: string } - export var constants: { - UV_UDP_REUSEADDR: number, - errno: { - SIGHUP: number; - SIGINT: number; - SIGQUIT: number; - SIGILL: number; - SIGTRAP: number; - SIGABRT: number; - SIGIOT: number; - SIGBUS: number; - SIGFPE: number; - SIGKILL: number; - SIGUSR1: number; - SIGSEGV: number; - SIGUSR2: number; - SIGPIPE: number; - SIGALRM: number; - SIGTERM: number; - SIGCHLD: number; - SIGSTKFLT: number; - SIGCONT: number; - SIGSTOP: number; - SIGTSTP: number; - SIGTTIN: number; - SIGTTOU: number; - SIGURG: number; - SIGXCPU: number; - SIGXFSZ: number; - SIGVTALRM: number; - SIGPROF: number; - SIGWINCH: number; - SIGIO: number; - SIGPOLL: number; - SIGPWR: number; - SIGSYS: number; - SIGUNUSED: number; - }, - signals: { - E2BIG: number; - EACCES: number; - EADDRINUSE: number; - EADDRNOTAVAIL: number; - EAFNOSUPPORT: number; - EAGAIN: number; - EALREADY: number; - EBADF: number; - EBADMSG: number; - EBUSY: number; - ECANCELED: number; - ECHILD: number; - ECONNABORTED: number; - ECONNREFUSED: number; - ECONNRESET: number; - EDEADLK: number; - EDESTADDRREQ: number; - EDOM: number; - EDQUOT: number; - EEXIST: number; - EFAULT: number; - EFBIG: number; - EHOSTUNREACH: number; - EIDRM: number; - EILSEQ: number; - EINPROGRESS: number; - EINTR: number; - EINVAL: number; - EIO: number; - EISCONN: number; - EISDIR: number; - ELOOP: number; - EMFILE: number; - EMLINK: number; - EMSGSIZE: number; - EMULTIHOP: number; - ENAMETOOLONG: number; - ENETDOWN: number; - ENETRESET: number; - ENETUNREACH: number; - ENFILE: number; - ENOBUFS: number; - ENODATA: number; - ENODEV: number; - ENOENT: number; - ENOEXEC: number; - ENOLCK: number; - ENOLINK: number; - ENOMEM: number; - ENOMSG: number; - ENOPROTOOPT: number; - ENOSPC: number; - ENOSR: number; - ENOSTR: number; - ENOSYS: number; - ENOTCONN: number; - ENOTDIR: number; - ENOTEMPTY: number; - ENOTSOCK: number; - ENOTSUP: number; - ENOTTY: number; - ENXIO: number; - EOPNOTSUPP: number; - EOVERFLOW: number; - EPERM: number; - EPIPE: number; - EPROTO: number; - EPROTONOSUPPORT: number; - EPROTOTYPE: number; - ERANGE: number; - EROFS: number; - ESPIPE: number; - ESRCH: number; - ESTALE: number; - ETIME: number; - ETIMEDOUT: number; - ETXTBSY: number; - EWOULDBLOCK: number; - EXDEV: number; - }, - }; - export function arch(): string; - export function platform(): string; - export function tmpdir(): string; - export var EOL: string; - export function endianness(): "BE" | "LE"; -} - -declare module "https" { - import * as tls from "tls"; - import * as events from "events"; - import * as http from "http"; - - export interface ServerOptions { - pfx?: any; - key?: any; - passphrase?: string; - cert?: any; - ca?: any; - crl?: any; - ciphers?: string; - honorCipherOrder?: boolean; - requestCert?: boolean; - rejectUnauthorized?: boolean; - NPNProtocols?: any; - SNICallback?: (servername: string, cb: (err: Error, ctx: tls.SecureContext) => any) => any; - } - - export interface RequestOptions extends http.RequestOptions { - pfx?: any; - key?: any; - passphrase?: string; - cert?: any; - ca?: any; - ciphers?: string; - rejectUnauthorized?: boolean; - secureProtocol?: string; - } - - export interface Agent extends http.Agent { } - - export interface AgentOptions extends http.AgentOptions { - pfx?: any; - key?: any; - passphrase?: string; - cert?: any; - ca?: any; - ciphers?: string; - rejectUnauthorized?: boolean; - secureProtocol?: string; - maxCachedSessions?: number; - } - - export var Agent: { - new (options?: AgentOptions): Agent; - }; - export interface Server extends tls.Server { } - export function createServer(options: ServerOptions, requestListener?: Function): Server; - export function request(options: RequestOptions, callback?: (res: http.IncomingMessage) => void): http.ClientRequest; - export function get(options: RequestOptions, callback?: (res: http.IncomingMessage) => void): http.ClientRequest; - export var globalAgent: Agent; -} - -declare module "punycode" { - export function decode(string: string): string; - export function encode(string: string): string; - export function toUnicode(domain: string): string; - export function toASCII(domain: string): string; - export var ucs2: ucs2; - interface ucs2 { - decode(string: string): number[]; - encode(codePoints: number[]): string; - } - export var version: any; -} - -declare module "repl" { - import * as stream from "stream"; - import * as readline from "readline"; - - export interface ReplOptions { - prompt?: string; - input?: NodeJS.ReadableStream; - output?: NodeJS.WritableStream; - terminal?: boolean; - eval?: Function; - useColors?: boolean; - useGlobal?: boolean; - ignoreUndefined?: boolean; - writer?: Function; - completer?: Function; - replMode?: any; - breakEvalOnSigint?: any; - } - - export interface REPLServer extends readline.ReadLine { - defineCommand(keyword: string, cmd: Function | { help: string, action: Function }): void; - displayPrompt(preserveCursor?: boolean): void - } - - export function start(options: ReplOptions): REPLServer; -} - -declare module "readline" { - import * as events from "events"; - import * as stream from "stream"; - - export interface Key { - sequence?: string; - name?: string; - ctrl?: boolean; - meta?: boolean; - shift?: boolean; - } - - export interface ReadLine extends events.EventEmitter { - setPrompt(prompt: string): void; - prompt(preserveCursor?: boolean): void; - question(query: string, callback: (answer: string) => void): void; - pause(): ReadLine; - resume(): ReadLine; - close(): void; - write(data: string | Buffer, key?: Key): void; - } - - export interface Completer { - (line: string): CompleterResult; - (line: string, callback: (err: any, result: CompleterResult) => void): any; - } - - export interface CompleterResult { - completions: string[]; - line: string; - } - - export interface ReadLineOptions { - input: NodeJS.ReadableStream; - output?: NodeJS.WritableStream; - completer?: Completer; - terminal?: boolean; - historySize?: number; - } - - export function createInterface(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer, terminal?: boolean): ReadLine; - export function createInterface(options: ReadLineOptions): ReadLine; - - export function cursorTo(stream: NodeJS.WritableStream, x: number, y: number): void; - export function moveCursor(stream: NodeJS.WritableStream, dx: number | string, dy: number | string): void; - export function clearLine(stream: NodeJS.WritableStream, dir: number): void; - export function clearScreenDown(stream: NodeJS.WritableStream): void; -} - -declare module "vm" { - export interface Context { } - export interface ScriptOptions { - filename?: string; - lineOffset?: number; - columnOffset?: number; - displayErrors?: boolean; - timeout?: number; - cachedData?: Buffer; - produceCachedData?: boolean; - } - export interface RunningScriptOptions { - filename?: string; - lineOffset?: number; - columnOffset?: number; - displayErrors?: boolean; - timeout?: number; - } - export class Script { - constructor(code: string, options?: ScriptOptions); - runInContext(contextifiedSandbox: Context, options?: RunningScriptOptions): any; - runInNewContext(sandbox?: Context, options?: RunningScriptOptions): any; - runInThisContext(options?: RunningScriptOptions): any; - } - export function createContext(sandbox?: Context): Context; - export function isContext(sandbox: Context): boolean; - export function runInContext(code: string, contextifiedSandbox: Context, options?: RunningScriptOptions): any; - export function runInDebugContext(code: string): any; - export function runInNewContext(code: string, sandbox?: Context, options?: RunningScriptOptions): any; - export function runInThisContext(code: string, options?: RunningScriptOptions): any; -} - -declare module "child_process" { - import * as events from "events"; - import * as stream from "stream"; - - export interface ChildProcess extends events.EventEmitter { - stdin: stream.Writable; - stdout: stream.Readable; - stderr: stream.Readable; - stdio: [stream.Writable, stream.Readable, stream.Readable]; - pid: number; - kill(signal?: string): void; - send(message: any, sendHandle?: any): boolean; - connected: boolean; - disconnect(): void; - unref(): void; - ref(): void; - } - - export interface SpawnOptions { - cwd?: string; - env?: any; - stdio?: any; - detached?: boolean; - uid?: number; - gid?: number; - shell?: boolean | string; - } - export function spawn(command: string, args?: string[], options?: SpawnOptions): ChildProcess; - - export interface ExecOptions { - cwd?: string; - env?: any; - shell?: string; - timeout?: number; - maxBuffer?: number; - killSignal?: string; - uid?: number; - gid?: number; - } - export interface ExecOptionsWithStringEncoding extends ExecOptions { - encoding: BufferEncoding; - } - export interface ExecOptionsWithBufferEncoding extends ExecOptions { - encoding: string; // specify `null`. - } - export function exec(command: string, callback?: (error: Error, stdout: string, stderr: string) => void): ChildProcess; - export function exec(command: string, options: ExecOptionsWithStringEncoding, callback?: (error: Error, stdout: string, stderr: string) => void): ChildProcess; - // usage. child_process.exec("tsc", {encoding: null as string}, (err, stdout, stderr) => {}); - export function exec(command: string, options: ExecOptionsWithBufferEncoding, callback?: (error: Error, stdout: Buffer, stderr: Buffer) => void): ChildProcess; - export function exec(command: string, options: ExecOptions, callback?: (error: Error, stdout: string, stderr: string) => void): ChildProcess; - - export interface ExecFileOptions { - cwd?: string; - env?: any; - timeout?: number; - maxBuffer?: number; - killSignal?: string; - uid?: number; - gid?: number; - } - export interface ExecFileOptionsWithStringEncoding extends ExecFileOptions { - encoding: BufferEncoding; - } - export interface ExecFileOptionsWithBufferEncoding extends ExecFileOptions { - encoding: string; // specify `null`. - } - export function execFile(file: string, callback?: (error: Error, stdout: string, stderr: string) => void): ChildProcess; - export function execFile(file: string, options?: ExecFileOptionsWithStringEncoding, callback?: (error: Error, stdout: string, stderr: string) => void): ChildProcess; - // usage. child_process.execFile("file.sh", {encoding: null as string}, (err, stdout, stderr) => {}); - export function execFile(file: string, options?: ExecFileOptionsWithBufferEncoding, callback?: (error: Error, stdout: Buffer, stderr: Buffer) => void): ChildProcess; - export function execFile(file: string, options?: ExecFileOptions, callback?: (error: Error, stdout: string, stderr: string) => void): ChildProcess; - export function execFile(file: string, args?: string[], callback?: (error: Error, stdout: string, stderr: string) => void): ChildProcess; - export function execFile(file: string, args?: string[], options?: ExecFileOptionsWithStringEncoding, callback?: (error: Error, stdout: string, stderr: string) => void): ChildProcess; - // usage. child_process.execFile("file.sh", ["foo"], {encoding: null as string}, (err, stdout, stderr) => {}); - export function execFile(file: string, args?: string[], options?: ExecFileOptionsWithBufferEncoding, callback?: (error: Error, stdout: Buffer, stderr: Buffer) => void): ChildProcess; - export function execFile(file: string, args?: string[], options?: ExecFileOptions, callback?: (error: Error, stdout: string, stderr: string) => void): ChildProcess; - - export interface ForkOptions { - cwd?: string; - env?: any; - execPath?: string; - execArgv?: string[]; - silent?: boolean; - uid?: number; - gid?: number; - } - export function fork(modulePath: string, args?: string[], options?: ForkOptions): ChildProcess; - - export interface SpawnSyncOptions { - cwd?: string; - input?: string | Buffer; - stdio?: any; - env?: any; - uid?: number; - gid?: number; - timeout?: number; - killSignal?: string; - maxBuffer?: number; - encoding?: string; - shell?: boolean | string; - } - export interface SpawnSyncOptionsWithStringEncoding extends SpawnSyncOptions { - encoding: BufferEncoding; - } - export interface SpawnSyncOptionsWithBufferEncoding extends SpawnSyncOptions { - encoding: string; // specify `null`. - } - export interface SpawnSyncReturns { - pid: number; - output: string[]; - stdout: T; - stderr: T; - status: number; - signal: string; - error: Error; - } - export function spawnSync(command: string): SpawnSyncReturns; - export function spawnSync(command: string, options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns; - export function spawnSync(command: string, options?: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns; - export function spawnSync(command: string, options?: SpawnSyncOptions): SpawnSyncReturns; - export function spawnSync(command: string, args?: string[], options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns; - export function spawnSync(command: string, args?: string[], options?: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns; - export function spawnSync(command: string, args?: string[], options?: SpawnSyncOptions): SpawnSyncReturns; - - export interface ExecSyncOptions { - cwd?: string; - input?: string | Buffer; - stdio?: any; - env?: any; - shell?: string; - uid?: number; - gid?: number; - timeout?: number; - killSignal?: string; - maxBuffer?: number; - encoding?: string; - } - export interface ExecSyncOptionsWithStringEncoding extends ExecSyncOptions { - encoding: BufferEncoding; - } - export interface ExecSyncOptionsWithBufferEncoding extends ExecSyncOptions { - encoding: string; // specify `null`. - } - export function execSync(command: string): Buffer; - export function execSync(command: string, options?: ExecSyncOptionsWithStringEncoding): string; - export function execSync(command: string, options?: ExecSyncOptionsWithBufferEncoding): Buffer; - export function execSync(command: string, options?: ExecSyncOptions): Buffer; - - export interface ExecFileSyncOptions { - cwd?: string; - input?: string | Buffer; - stdio?: any; - env?: any; - uid?: number; - gid?: number; - timeout?: number; - killSignal?: string; - maxBuffer?: number; - encoding?: string; - } - export interface ExecFileSyncOptionsWithStringEncoding extends ExecFileSyncOptions { - encoding: BufferEncoding; - } - export interface ExecFileSyncOptionsWithBufferEncoding extends ExecFileSyncOptions { - encoding: string; // specify `null`. - } - export function execFileSync(command: string): Buffer; - export function execFileSync(command: string, options?: ExecFileSyncOptionsWithStringEncoding): string; - export function execFileSync(command: string, options?: ExecFileSyncOptionsWithBufferEncoding): Buffer; - export function execFileSync(command: string, options?: ExecFileSyncOptions): Buffer; - export function execFileSync(command: string, args?: string[], options?: ExecFileSyncOptionsWithStringEncoding): string; - export function execFileSync(command: string, args?: string[], options?: ExecFileSyncOptionsWithBufferEncoding): Buffer; - export function execFileSync(command: string, args?: string[], options?: ExecFileSyncOptions): Buffer; -} - -declare module "url" { - export interface Url { - href?: string; - protocol?: string; - auth?: string; - hostname?: string; - port?: string; - host?: string; - pathname?: string; - search?: string; - query?: string | any; - slashes?: boolean; - hash?: string; - path?: string; - } - - export function parse(urlStr: string, parseQueryString?: boolean, slashesDenoteHost?: boolean): Url; - export function format(url: Url): string; - export function resolve(from: string, to: string): string; -} - -declare module "dns" { - export interface MxRecord { - exchange: string, - priority: number - } - - export function lookup(domain: string, family: number, callback: (err: Error, address: string, family: number) => void): string; - export function lookup(domain: string, callback: (err: Error, address: string, family: number) => void): string; - export function resolve(domain: string, rrtype: string, callback: (err: Error, addresses: string[]) => void): string[]; - export function resolve(domain: string, callback: (err: Error, addresses: string[]) => void): string[]; - export function resolve4(domain: string, callback: (err: Error, addresses: string[]) => void): string[]; - export function resolve6(domain: string, callback: (err: Error, addresses: string[]) => void): string[]; - export function resolveMx(domain: string, callback: (err: Error, addresses: MxRecord[]) => void): string[]; - export function resolveTxt(domain: string, callback: (err: Error, addresses: string[]) => void): string[]; - export function resolveSrv(domain: string, callback: (err: Error, addresses: string[]) => void): string[]; - export function resolveNs(domain: string, callback: (err: Error, addresses: string[]) => void): string[]; - export function resolveCname(domain: string, callback: (err: Error, addresses: string[]) => void): string[]; - export function reverse(ip: string, callback: (err: Error, domains: string[]) => void): string[]; - export function setServers(servers: string[]): void; - - //Error codes - export var NODATA: string; - export var FORMERR: string; - export var SERVFAIL: string; - export var NOTFOUND: string; - export var NOTIMP: string; - export var REFUSED: string; - export var BADQUERY: string; - export var BADNAME: string; - export var BADFAMILY: string; - export var BADRESP: string; - export var CONNREFUSED: string; - export var TIMEOUT: string; - export var EOF: string; - export var FILE: string; - export var NOMEM: string; - export var DESTRUCTION: string; - export var BADSTR: string; - export var BADFLAGS: string; - export var NONAME: string; - export var BADHINTS: string; - export var NOTINITIALIZED: string; - export var LOADIPHLPAPI: string; - export var ADDRGETNETWORKPARAMS: string; - export var CANCELLED: string; -} - -declare module "net" { - import * as stream from "stream"; - - export interface Socket extends stream.Duplex { - // Extended base methods - write(buffer: Buffer): boolean; - write(buffer: Buffer, cb?: Function): boolean; - write(str: string, cb?: Function): boolean; - write(str: string, encoding?: string, cb?: Function): boolean; - write(str: string, encoding?: string, fd?: string): boolean; - - connect(port: number, host?: string, connectionListener?: Function): void; - connect(path: string, connectionListener?: Function): void; - bufferSize: number; - setEncoding(encoding?: string): void; - write(data: any, encoding?: string, callback?: Function): void; - destroy(): void; - pause(): Socket; - resume(): Socket; - setTimeout(timeout: number, callback?: Function): void; - setNoDelay(noDelay?: boolean): void; - setKeepAlive(enable?: boolean, initialDelay?: number): void; - address(): { port: number; family: string; address: string; }; - unref(): void; - ref(): void; - - remoteAddress: string; - remoteFamily: string; - remotePort: number; - localAddress: string; - localPort: number; - bytesRead: number; - bytesWritten: number; - - // Extended base methods - end(): void; - end(buffer: Buffer, cb?: Function): void; - end(str: string, cb?: Function): void; - end(str: string, encoding?: string, cb?: Function): void; - end(data?: any, encoding?: string): void; - - /** - * events.EventEmitter - * 1. close - * 2. connect - * 3. data - * 4. drain - * 5. end - * 6. error - * 7. lookup - * 8. timeout - */ - addListener(event: string, listener: Function): this; - addListener(event: "close", listener: (had_error: boolean) => void): this; - addListener(event: "connect", listener: () => void): this; - addListener(event: "data", listener: (data: Buffer) => void): this; - addListener(event: "drain", listener: () => void): this; - addListener(event: "end", listener: () => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - addListener(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this; - addListener(event: "timeout", listener: () => void): this; - - emit(event: string, ...args: any[]): boolean; - emit(event: "close", had_error: boolean): boolean; - emit(event: "connect"): boolean; - emit(event: "data", data: Buffer): boolean; - emit(event: "drain"): boolean; - emit(event: "end"): boolean; - emit(event: "error", err: Error): boolean; - emit(event: "lookup", err: Error, address: string, family: string | number, host: string): boolean; - emit(event: "timeout"): boolean; - - on(event: string, listener: Function): this; - on(event: "close", listener: (had_error: boolean) => void): this; - on(event: "connect", listener: () => void): this; - on(event: "data", listener: (data: Buffer) => void): this; - on(event: "drain", listener: () => void): this; - on(event: "end", listener: () => void): this; - on(event: "error", listener: (err: Error) => void): this; - on(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this; - on(event: "timeout", listener: () => void): this; - - once(event: string, listener: Function): this; - once(event: "close", listener: (had_error: boolean) => void): this; - once(event: "connect", listener: () => void): this; - once(event: "data", listener: (data: Buffer) => void): this; - once(event: "drain", listener: () => void): this; - once(event: "end", listener: () => void): this; - once(event: "error", listener: (err: Error) => void): this; - once(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this; - once(event: "timeout", listener: () => void): this; - - prependListener(event: string, listener: Function): this; - prependListener(event: "close", listener: (had_error: boolean) => void): this; - prependListener(event: "connect", listener: () => void): this; - prependListener(event: "data", listener: (data: Buffer) => void): this; - prependListener(event: "drain", listener: () => void): this; - prependListener(event: "end", listener: () => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; - prependListener(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this; - prependListener(event: "timeout", listener: () => void): this; - - prependOnceListener(event: string, listener: Function): this; - prependOnceListener(event: "close", listener: (had_error: boolean) => void): this; - prependOnceListener(event: "connect", listener: () => void): this; - prependOnceListener(event: "data", listener: (data: Buffer) => void): this; - prependOnceListener(event: "drain", listener: () => void): this; - prependOnceListener(event: "end", listener: () => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; - prependOnceListener(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this; - prependOnceListener(event: "timeout", listener: () => void): this; - } - - export var Socket: { - new (options?: { fd?: string; type?: string; allowHalfOpen?: boolean; }): Socket; - }; - - export interface ListenOptions { - port?: number; - host?: string; - backlog?: number; - path?: string; - exclusive?: boolean; - } - - export interface Server extends Socket { - listen(port: number, hostname?: string, backlog?: number, listeningListener?: Function): Server; - listen(port: number, hostname?: string, listeningListener?: Function): Server; - listen(port: number, backlog?: number, listeningListener?: Function): Server; - listen(port: number, listeningListener?: Function): Server; - listen(path: string, backlog?: number, listeningListener?: Function): Server; - listen(path: string, listeningListener?: Function): Server; - listen(handle: any, backlog?: number, listeningListener?: Function): Server; - listen(handle: any, listeningListener?: Function): Server; - listen(options: ListenOptions, listeningListener?: Function): Server; - close(callback?: Function): Server; - address(): { port: number; family: string; address: string; }; - getConnections(cb: (error: Error, count: number) => void): void; - ref(): Server; - unref(): Server; - maxConnections: number; - connections: number; - - /** - * events.EventEmitter - * 1. close - * 2. connection - * 3. error - * 4. listening - */ - addListener(event: string, listener: Function): this; - addListener(event: "close", listener: () => void): this; - addListener(event: "connection", listener: (socket: Socket) => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - addListener(event: "listening", listener: () => void): this; - - emit(event: string, ...args: any[]): boolean; - emit(event: "close"): boolean; - emit(event: "connection", socket: Socket): boolean; - emit(event: "error", err: Error): boolean; - emit(event: "listening"): boolean; - - on(event: string, listener: Function): this; - on(event: "close", listener: () => void): this; - on(event: "connection", listener: (socket: Socket) => void): this; - on(event: "error", listener: (err: Error) => void): this; - on(event: "listening", listener: () => void): this; - - once(event: string, listener: Function): this; - once(event: "close", listener: () => void): this; - once(event: "connection", listener: (socket: Socket) => void): this; - once(event: "error", listener: (err: Error) => void): this; - once(event: "listening", listener: () => void): this; - - prependListener(event: string, listener: Function): this; - prependListener(event: "close", listener: () => void): this; - prependListener(event: "connection", listener: (socket: Socket) => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; - prependListener(event: "listening", listener: () => void): this; - - prependOnceListener(event: string, listener: Function): this; - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "connection", listener: (socket: Socket) => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; - prependOnceListener(event: "listening", listener: () => void): this; - } - export function createServer(connectionListener?: (socket: Socket) => void): Server; - export function createServer(options?: { allowHalfOpen?: boolean; }, connectionListener?: (socket: Socket) => void): Server; - export function connect(options: { port: number, host?: string, localAddress?: string, localPort?: string, family?: number, allowHalfOpen?: boolean; }, connectionListener?: Function): Socket; - export function connect(port: number, host?: string, connectionListener?: Function): Socket; - export function connect(path: string, connectionListener?: Function): Socket; - export function createConnection(options: { port: number, host?: string, localAddress?: string, localPort?: string, family?: number, allowHalfOpen?: boolean; }, connectionListener?: Function): Socket; - export function createConnection(port: number, host?: string, connectionListener?: Function): Socket; - export function createConnection(path: string, connectionListener?: Function): Socket; - export function isIP(input: string): number; - export function isIPv4(input: string): boolean; - export function isIPv6(input: string): boolean; -} - -declare module "dgram" { - import * as events from "events"; - - interface RemoteInfo { - address: string; - family: string; - port: number; - } - - interface AddressInfo { - address: string; - family: string; - port: number; - } - - interface BindOptions { - port: number; - address?: string; - exclusive?: boolean; - } - - interface SocketOptions { - type: "udp4" | "udp6"; - reuseAddr?: boolean; - } - - export function createSocket(type: string, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket; - export function createSocket(options: SocketOptions, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket; - - export interface Socket extends events.EventEmitter { - send(msg: Buffer | String | any[], port: number, address: string, callback?: (error: Error, bytes: number) => void): void; - send(msg: Buffer | String | any[], offset: number, length: number, port: number, address: string, callback?: (error: Error, bytes: number) => void): void; - bind(port?: number, address?: string, callback?: () => void): void; - bind(options: BindOptions, callback?: Function): void; - close(callback?: any): void; - address(): AddressInfo; - setBroadcast(flag: boolean): void; - setTTL(ttl: number): void; - setMulticastTTL(ttl: number): void; - setMulticastLoopback(flag: boolean): void; - addMembership(multicastAddress: string, multicastInterface?: string): void; - dropMembership(multicastAddress: string, multicastInterface?: string): void; - ref(): void; - unref(): void; - - /** - * events.EventEmitter - * 1. close - * 2. error - * 3. listening - * 4. message - **/ - addListener(event: string, listener: Function): this; - addListener(event: "close", listener: () => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - addListener(event: "listening", listener: () => void): this; - addListener(event: "message", listener: (msg: string, rinfo: AddressInfo) => void): this; - - emit(event: string, ...args: any[]): boolean; - emit(event: "close"): boolean; - emit(event: "error", err: Error): boolean; - emit(event: "listening"): boolean; - emit(event: "message", msg: string, rinfo: AddressInfo): boolean; - - on(event: string, listener: Function): this; - on(event: "close", listener: () => void): this; - on(event: "error", listener: (err: Error) => void): this; - on(event: "listening", listener: () => void): this; - on(event: "message", listener: (msg: string, rinfo: AddressInfo) => void): this; - - once(event: string, listener: Function): this; - once(event: "close", listener: () => void): this; - once(event: "error", listener: (err: Error) => void): this; - once(event: "listening", listener: () => void): this; - once(event: "message", listener: (msg: string, rinfo: AddressInfo) => void): this; - - prependListener(event: string, listener: Function): this; - prependListener(event: "close", listener: () => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; - prependListener(event: "listening", listener: () => void): this; - prependListener(event: "message", listener: (msg: string, rinfo: AddressInfo) => void): this; - - prependOnceListener(event: string, listener: Function): this; - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; - prependOnceListener(event: "listening", listener: () => void): this; - prependOnceListener(event: "message", listener: (msg: string, rinfo: AddressInfo) => void): this; - } -} - -declare module "fs" { - import * as stream from "stream"; - import * as events from "events"; - - interface Stats { - isFile(): boolean; - isDirectory(): boolean; - isBlockDevice(): boolean; - isCharacterDevice(): boolean; - isSymbolicLink(): boolean; - isFIFO(): boolean; - isSocket(): boolean; - dev: number; - ino: number; - mode: number; - nlink: number; - uid: number; - gid: number; - rdev: number; - size: number; - blksize: number; - blocks: number; - atime: Date; - mtime: Date; - ctime: Date; - birthtime: Date; - } - - interface FSWatcher extends events.EventEmitter { - close(): void; - - /** - * events.EventEmitter - * 1. change - * 2. error - */ - addListener(event: string, listener: Function): this; - addListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; - addListener(event: "error", listener: (code: number, signal: string) => void): this; - - on(event: string, listener: Function): this; - on(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; - on(event: "error", listener: (code: number, signal: string) => void): this; - - once(event: string, listener: Function): this; - once(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; - once(event: "error", listener: (code: number, signal: string) => void): this; - - prependListener(event: string, listener: Function): this; - prependListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; - prependListener(event: "error", listener: (code: number, signal: string) => void): this; - - prependOnceListener(event: string, listener: Function): this; - prependOnceListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; - prependOnceListener(event: "error", listener: (code: number, signal: string) => void): this; - } - - export interface ReadStream extends stream.Readable { - close(): void; - destroy(): void; - - /** - * events.EventEmitter - * 1. open - * 2. close - */ - addListener(event: string, listener: Function): this; - addListener(event: "open", listener: (fd: number) => void): this; - addListener(event: "close", listener: () => void): this; - - on(event: string, listener: Function): this; - on(event: "open", listener: (fd: number) => void): this; - on(event: "close", listener: () => void): this; - - once(event: string, listener: Function): this; - once(event: "open", listener: (fd: number) => void): this; - once(event: "close", listener: () => void): this; - - prependListener(event: string, listener: Function): this; - prependListener(event: "open", listener: (fd: number) => void): this; - prependListener(event: "close", listener: () => void): this; - - prependOnceListener(event: string, listener: Function): this; - prependOnceListener(event: "open", listener: (fd: number) => void): this; - prependOnceListener(event: "close", listener: () => void): this; - } - - export interface WriteStream extends stream.Writable { - close(): void; - bytesWritten: number; - path: string | Buffer; - - /** - * events.EventEmitter - * 1. open - * 2. close - */ - addListener(event: string, listener: Function): this; - addListener(event: "open", listener: (fd: number) => void): this; - addListener(event: "close", listener: () => void): this; - - on(event: string, listener: Function): this; - on(event: "open", listener: (fd: number) => void): this; - on(event: "close", listener: () => void): this; - - once(event: string, listener: Function): this; - once(event: "open", listener: (fd: number) => void): this; - once(event: "close", listener: () => void): this; - - prependListener(event: string, listener: Function): this; - prependListener(event: "open", listener: (fd: number) => void): this; - prependListener(event: "close", listener: () => void): this; - - prependOnceListener(event: string, listener: Function): this; - prependOnceListener(event: "open", listener: (fd: number) => void): this; - prependOnceListener(event: "close", listener: () => void): this; - } - - /** - * Asynchronous rename. - * @param oldPath - * @param newPath - * @param callback No arguments other than a possible exception are given to the completion callback. - */ - export function rename(oldPath: string, newPath: string, callback?: (err?: NodeJS.ErrnoException) => void): void; - /** - * Synchronous rename - * @param oldPath - * @param newPath - */ - export function renameSync(oldPath: string, newPath: string): void; - export function truncate(path: string | Buffer, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function truncate(path: string | Buffer, len: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function truncateSync(path: string | Buffer, len?: number): void; - export function ftruncate(fd: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function ftruncate(fd: number, len: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function ftruncateSync(fd: number, len?: number): void; - export function chown(path: string | Buffer, uid: number, gid: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function chownSync(path: string | Buffer, uid: number, gid: number): void; - export function fchown(fd: number, uid: number, gid: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function fchownSync(fd: number, uid: number, gid: number): void; - export function lchown(path: string | Buffer, uid: number, gid: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function lchownSync(path: string | Buffer, uid: number, gid: number): void; - export function chmod(path: string | Buffer, mode: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function chmod(path: string | Buffer, mode: string, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function chmodSync(path: string | Buffer, mode: number): void; - export function chmodSync(path: string | Buffer, mode: string): void; - export function fchmod(fd: number, mode: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function fchmod(fd: number, mode: string, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function fchmodSync(fd: number, mode: number): void; - export function fchmodSync(fd: number, mode: string): void; - export function lchmod(path: string | Buffer, mode: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function lchmod(path: string | Buffer, mode: string, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function lchmodSync(path: string | Buffer, mode: number): void; - export function lchmodSync(path: string | Buffer, mode: string): void; - export function stat(path: string | Buffer, callback?: (err: NodeJS.ErrnoException, stats: Stats) => any): void; - export function lstat(path: string | Buffer, callback?: (err: NodeJS.ErrnoException, stats: Stats) => any): void; - export function fstat(fd: number, callback?: (err: NodeJS.ErrnoException, stats: Stats) => any): void; - export function statSync(path: string | Buffer): Stats; - export function lstatSync(path: string | Buffer): Stats; - export function fstatSync(fd: number): Stats; - export function link(srcpath: string | Buffer, dstpath: string | Buffer, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function linkSync(srcpath: string | Buffer, dstpath: string | Buffer): void; - export function symlink(srcpath: string | Buffer, dstpath: string | Buffer, type?: string, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function symlinkSync(srcpath: string | Buffer, dstpath: string | Buffer, type?: string): void; - export function readlink(path: string | Buffer, callback?: (err: NodeJS.ErrnoException, linkString: string) => any): void; - export function readlinkSync(path: string | Buffer): string; - export function realpath(path: string | Buffer, callback?: (err: NodeJS.ErrnoException, resolvedPath: string) => any): void; - export function realpath(path: string | Buffer, cache: { [path: string]: string }, callback: (err: NodeJS.ErrnoException, resolvedPath: string) => any): void; - export function realpathSync(path: string | Buffer, cache?: { [path: string]: string }): string; - /* - * Asynchronous unlink - deletes the file specified in {path} - * - * @param path - * @param callback No arguments other than a possible exception are given to the completion callback. - */ - export function unlink(path: string | Buffer, callback?: (err?: NodeJS.ErrnoException) => void): void; - /* - * Synchronous unlink - deletes the file specified in {path} - * - * @param path - */ - export function unlinkSync(path: string | Buffer): void; - /* - * Asynchronous rmdir - removes the directory specified in {path} - * - * @param path - * @param callback No arguments other than a possible exception are given to the completion callback. - */ - export function rmdir(path: string | Buffer, callback?: (err?: NodeJS.ErrnoException) => void): void; - /* - * Synchronous rmdir - removes the directory specified in {path} - * - * @param path - */ - export function rmdirSync(path: string | Buffer): void; - /* - * Asynchronous mkdir - creates the directory specified in {path}. Parameter {mode} defaults to 0777. - * - * @param path - * @param callback No arguments other than a possible exception are given to the completion callback. - */ - export function mkdir(path: string | Buffer, callback?: (err?: NodeJS.ErrnoException) => void): void; - /* - * Asynchronous mkdir - creates the directory specified in {path}. Parameter {mode} defaults to 0777. - * - * @param path - * @param mode - * @param callback No arguments other than a possible exception are given to the completion callback. - */ - export function mkdir(path: string | Buffer, mode: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - /* - * Asynchronous mkdir - creates the directory specified in {path}. Parameter {mode} defaults to 0777. - * - * @param path - * @param mode - * @param callback No arguments other than a possible exception are given to the completion callback. - */ - export function mkdir(path: string | Buffer, mode: string, callback?: (err?: NodeJS.ErrnoException) => void): void; - /* - * Synchronous mkdir - creates the directory specified in {path}. Parameter {mode} defaults to 0777. - * - * @param path - * @param mode - * @param callback No arguments other than a possible exception are given to the completion callback. - */ - export function mkdirSync(path: string | Buffer, mode?: number): void; - /* - * Synchronous mkdir - creates the directory specified in {path}. Parameter {mode} defaults to 0777. - * - * @param path - * @param mode - * @param callback No arguments other than a possible exception are given to the completion callback. - */ - export function mkdirSync(path: string | Buffer, mode?: string): void; - /* - * Asynchronous mkdtemp - Creates a unique temporary directory. Generates six random characters to be appended behind a required prefix to create a unique temporary directory. - * - * @param prefix - * @param callback The created folder path is passed as a string to the callback's second parameter. - */ - export function mkdtemp(prefix: string, callback?: (err: NodeJS.ErrnoException, folder: string) => void): void; - /* - * Synchronous mkdtemp - Creates a unique temporary directory. Generates six random characters to be appended behind a required prefix to create a unique temporary directory. - * - * @param prefix - * @returns Returns the created folder path. - */ - export function mkdtempSync(prefix: string): string; - export function readdir(path: string | Buffer, callback?: (err: NodeJS.ErrnoException, files: string[]) => void): void; - export function readdirSync(path: string | Buffer): string[]; - export function close(fd: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function closeSync(fd: number): void; - export function open(path: string | Buffer, flags: string | number, callback: (err: NodeJS.ErrnoException, fd: number) => void): void; - export function open(path: string | Buffer, flags: string | number, mode: number, callback: (err: NodeJS.ErrnoException, fd: number) => void): void; - export function openSync(path: string | Buffer, flags: string | number, mode?: number): number; - export function utimes(path: string | Buffer, atime: number, mtime: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function utimes(path: string | Buffer, atime: Date, mtime: Date, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function utimesSync(path: string | Buffer, atime: number, mtime: number): void; - export function utimesSync(path: string | Buffer, atime: Date, mtime: Date): void; - export function futimes(fd: number, atime: number, mtime: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function futimes(fd: number, atime: Date, mtime: Date, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function futimesSync(fd: number, atime: number, mtime: number): void; - export function futimesSync(fd: number, atime: Date, mtime: Date): void; - export function fsync(fd: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function fsyncSync(fd: number): void; - export function write(fd: number, buffer: Buffer, offset: number, length: number, position: number, callback?: (err: NodeJS.ErrnoException, written: number, buffer: Buffer) => void): void; - export function write(fd: number, buffer: Buffer, offset: number, length: number, callback?: (err: NodeJS.ErrnoException, written: number, buffer: Buffer) => void): void; - export function write(fd: number, data: any, callback?: (err: NodeJS.ErrnoException, written: number, str: string) => void): void; - export function write(fd: number, data: any, offset: number, callback?: (err: NodeJS.ErrnoException, written: number, str: string) => void): void; - export function write(fd: number, data: any, offset: number, encoding: string, callback?: (err: NodeJS.ErrnoException, written: number, str: string) => void): void; - export function writeSync(fd: number, buffer: Buffer, offset: number, length: number, position?: number): number; - export function writeSync(fd: number, data: any, position?: number, enconding?: string): number; - export function read(fd: number, buffer: Buffer, offset: number, length: number, position: number, callback?: (err: NodeJS.ErrnoException, bytesRead: number, buffer: Buffer) => void): void; - export function readSync(fd: number, buffer: Buffer, offset: number, length: number, position: number): number; - /* - * Asynchronous readFile - Asynchronously reads the entire contents of a file. - * - * @param fileName - * @param encoding - * @param callback - The callback is passed two arguments (err, data), where data is the contents of the file. - */ - export function readFile(filename: string, encoding: string, callback: (err: NodeJS.ErrnoException, data: string) => void): void; - /* - * Asynchronous readFile - Asynchronously reads the entire contents of a file. - * - * @param fileName - * @param options An object with optional {encoding} and {flag} properties. If {encoding} is specified, readFile returns a string; otherwise it returns a Buffer. - * @param callback - The callback is passed two arguments (err, data), where data is the contents of the file. - */ - export function readFile(filename: string, options: { encoding: string; flag?: string; }, callback: (err: NodeJS.ErrnoException, data: string) => void): void; - /* - * Asynchronous readFile - Asynchronously reads the entire contents of a file. - * - * @param fileName - * @param options An object with optional {encoding} and {flag} properties. If {encoding} is specified, readFile returns a string; otherwise it returns a Buffer. - * @param callback - The callback is passed two arguments (err, data), where data is the contents of the file. - */ - export function readFile(filename: string, options: { flag?: string; }, callback: (err: NodeJS.ErrnoException, data: Buffer) => void): void; - /* - * Asynchronous readFile - Asynchronously reads the entire contents of a file. - * - * @param fileName - * @param callback - The callback is passed two arguments (err, data), where data is the contents of the file. - */ - export function readFile(filename: string, callback: (err: NodeJS.ErrnoException, data: Buffer) => void): void; - /* - * Synchronous readFile - Synchronously reads the entire contents of a file. - * - * @param fileName - * @param encoding - */ - export function readFileSync(filename: string, encoding: string): string; - /* - * Synchronous readFile - Synchronously reads the entire contents of a file. - * - * @param fileName - * @param options An object with optional {encoding} and {flag} properties. If {encoding} is specified, readFileSync returns a string; otherwise it returns a Buffer. - */ - export function readFileSync(filename: string, options: { encoding: string; flag?: string; }): string; - /* - * Synchronous readFile - Synchronously reads the entire contents of a file. - * - * @param fileName - * @param options An object with optional {encoding} and {flag} properties. If {encoding} is specified, readFileSync returns a string; otherwise it returns a Buffer. - */ - export function readFileSync(filename: string, options?: { flag?: string; }): Buffer; - export function writeFile(filename: string, data: any, callback?: (err: NodeJS.ErrnoException) => void): void; - export function writeFile(filename: string, data: any, options: { encoding?: string; mode?: number; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void): void; - export function writeFile(filename: string, data: any, options: { encoding?: string; mode?: string; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void): void; - export function writeFileSync(filename: string, data: any, options?: { encoding?: string; mode?: number; flag?: string; }): void; - export function writeFileSync(filename: string, data: any, options?: { encoding?: string; mode?: string; flag?: string; }): void; - export function appendFile(filename: string, data: any, options: { encoding?: string; mode?: number; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void): void; - export function appendFile(filename: string, data: any, options: { encoding?: string; mode?: string; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void): void; - export function appendFile(filename: string, data: any, callback?: (err: NodeJS.ErrnoException) => void): void; - export function appendFileSync(filename: string, data: any, options?: { encoding?: string; mode?: number; flag?: string; }): void; - export function appendFileSync(filename: string, data: any, options?: { encoding?: string; mode?: string; flag?: string; }): void; - export function watchFile(filename: string, listener: (curr: Stats, prev: Stats) => void): void; - export function watchFile(filename: string, options: { persistent?: boolean; interval?: number; }, listener: (curr: Stats, prev: Stats) => void): void; - export function unwatchFile(filename: string, listener?: (curr: Stats, prev: Stats) => void): void; - export function watch(filename: string, listener?: (event: string, filename: string) => any): FSWatcher; - export function watch(filename: string, encoding: string, listener?: (event: string, filename: string | Buffer) => any): FSWatcher; - export function watch(filename: string, options: { persistent?: boolean; recursive?: boolean; encoding?: string }, listener?: (event: string, filename: string | Buffer) => any): FSWatcher; - export function exists(path: string | Buffer, callback?: (exists: boolean) => void): void; - export function existsSync(path: string | Buffer): boolean; - - export namespace constants { - // File Access Constants - - /** Constant for fs.access(). File is visible to the calling process. */ - export const F_OK: number; - - /** Constant for fs.access(). File can be read by the calling process. */ - export const R_OK: number; - - /** Constant for fs.access(). File can be written by the calling process. */ - export const W_OK: number; - - /** Constant for fs.access(). File can be executed by the calling process. */ - export const X_OK: number; - - // File Open Constants - - /** Constant for fs.open(). Flag indicating to open a file for read-only access. */ - export const O_RDONLY: number; - - /** Constant for fs.open(). Flag indicating to open a file for write-only access. */ - export const O_WRONLY: number; - - /** Constant for fs.open(). Flag indicating to open a file for read-write access. */ - export const O_RDWR: number; - - /** Constant for fs.open(). Flag indicating to create the file if it does not already exist. */ - export const O_CREAT: number; - - /** Constant for fs.open(). Flag indicating that opening a file should fail if the O_CREAT flag is set and the file already exists. */ - export const O_EXCL: number; - - /** Constant for fs.open(). Flag indicating that if path identifies a terminal device, opening the path shall not cause that terminal to become the controlling terminal for the process (if the process does not already have one). */ - export const O_NOCTTY: number; - - /** Constant for fs.open(). Flag indicating that if the file exists and is a regular file, and the file is opened successfully for write access, its length shall be truncated to zero. */ - export const O_TRUNC: number; - - /** Constant for fs.open(). Flag indicating that data will be appended to the end of the file. */ - export const O_APPEND: number; - - /** Constant for fs.open(). Flag indicating that the open should fail if the path is not a directory. */ - export const O_DIRECTORY: number; - - /** Constant for fs.open(). Flag indicating reading accesses to the file system will no longer result in an update to the atime information associated with the file. This flag is available on Linux operating systems only. */ - export const O_NOATIME: number; - - /** Constant for fs.open(). Flag indicating that the open should fail if the path is a symbolic link. */ - export const O_NOFOLLOW: number; - - /** Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O. */ - export const O_SYNC: number; - - /** Constant for fs.open(). Flag indicating to open the symbolic link itself rather than the resource it is pointing to. */ - export const O_SYMLINK: number; - - /** Constant for fs.open(). When set, an attempt will be made to minimize caching effects of file I/O. */ - export const O_DIRECT: number; - - /** Constant for fs.open(). Flag indicating to open the file in nonblocking mode when possible. */ - export const O_NONBLOCK: number; - - // File Type Constants - - /** Constant for fs.Stats mode property for determining a file's type. Bit mask used to extract the file type code. */ - export const S_IFMT: number; - - /** Constant for fs.Stats mode property for determining a file's type. File type constant for a regular file. */ - export const S_IFREG: number; - - /** Constant for fs.Stats mode property for determining a file's type. File type constant for a directory. */ - export const S_IFDIR: number; - - /** Constant for fs.Stats mode property for determining a file's type. File type constant for a character-oriented device file. */ - export const S_IFCHR: number; - - /** Constant for fs.Stats mode property for determining a file's type. File type constant for a block-oriented device file. */ - export const S_IFBLK: number; - - /** Constant for fs.Stats mode property for determining a file's type. File type constant for a FIFO/pipe. */ - export const S_IFIFO: number; - - /** Constant for fs.Stats mode property for determining a file's type. File type constant for a symbolic link. */ - export const S_IFLNK: number; - - /** Constant for fs.Stats mode property for determining a file's type. File type constant for a socket. */ - export const S_IFSOCK: number; - - // File Mode Constants - - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by owner. */ - export const S_IRWXU: number; - - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by owner. */ - export const S_IRUSR: number; - - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by owner. */ - export const S_IWUSR: number; - - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by owner. */ - export const S_IXUSR: number; - - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by group. */ - export const S_IRWXG: number; - - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by group. */ - export const S_IRGRP: number; - - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by group. */ - export const S_IWGRP: number; - - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by group. */ - export const S_IXGRP: number; - - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by others. */ - export const S_IRWXO: number; - - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by others. */ - export const S_IROTH: number; - - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by others. */ - export const S_IWOTH: number; - - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by others. */ - export const S_IXOTH: number; - } - - /** Tests a user's permissions for the file specified by path. */ - export function access(path: string | Buffer, callback: (err: NodeJS.ErrnoException) => void): void; - export function access(path: string | Buffer, mode: number, callback: (err: NodeJS.ErrnoException) => void): void; - /** Synchronous version of fs.access. This throws if any accessibility checks fail, and does nothing otherwise. */ - export function accessSync(path: string | Buffer, mode?: number): void; - export function createReadStream(path: string | Buffer, options?: { - flags?: string; - encoding?: string; - fd?: number; - mode?: number; - autoClose?: boolean; - start?: number; - end?: number; - }): ReadStream; - export function createWriteStream(path: string | Buffer, options?: { - flags?: string; - encoding?: string; - fd?: number; - mode?: number; - autoClose?: boolean; - start?: number; - }): WriteStream; - export function fdatasync(fd: number, callback: Function): void; - export function fdatasyncSync(fd: number): void; -} - -declare module "path" { - - /** - * A parsed path object generated by path.parse() or consumed by path.format(). - */ - export interface ParsedPath { - /** - * The root of the path such as '/' or 'c:\' - */ - root: string; - /** - * The full directory path such as '/home/user/dir' or 'c:\path\dir' - */ - dir: string; - /** - * The file name including extension (if any) such as 'index.html' - */ - base: string; - /** - * The file extension (if any) such as '.html' - */ - ext: string; - /** - * The file name without extension (if any) such as 'index' - */ - name: string; - } - - /** - * Normalize a string path, reducing '..' and '.' parts. - * When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used. - * - * @param p string path to normalize. - */ - export function normalize(p: string): string; - /** - * Join all arguments together and normalize the resulting path. - * Arguments must be strings. In v0.8, non-string arguments were silently ignored. In v0.10 and up, an exception is thrown. - * - * @param paths string paths to join. - */ - export function join(...paths: any[]): string; - /** - * Join all arguments together and normalize the resulting path. - * Arguments must be strings. In v0.8, non-string arguments were silently ignored. In v0.10 and up, an exception is thrown. - * - * @param paths string paths to join. - */ - export function join(...paths: string[]): string; - /** - * The right-most parameter is considered {to}. Other parameters are considered an array of {from}. - * - * Starting from leftmost {from} paramter, resolves {to} to an absolute path. - * - * If {to} isn't already absolute, {from} arguments are prepended in right to left order, until an absolute path is found. If after using all {from} paths still no absolute path is found, the current working directory is used as well. The resulting path is normalized, and trailing slashes are removed unless the path gets resolved to the root directory. - * - * @param pathSegments string paths to join. Non-string arguments are ignored. - */ - export function resolve(...pathSegments: any[]): string; - /** - * Determines whether {path} is an absolute path. An absolute path will always resolve to the same location, regardless of the working directory. - * - * @param path path to test. - */ - export function isAbsolute(path: string): boolean; - /** - * Solve the relative path from {from} to {to}. - * At times we have two absolute paths, and we need to derive the relative path from one to the other. This is actually the reverse transform of path.resolve. - * - * @param from - * @param to - */ - export function relative(from: string, to: string): string; - /** - * Return the directory name of a path. Similar to the Unix dirname command. - * - * @param p the path to evaluate. - */ - export function dirname(p: string): string; - /** - * Return the last portion of a path. Similar to the Unix basename command. - * Often used to extract the file name from a fully qualified path. - * - * @param p the path to evaluate. - * @param ext optionally, an extension to remove from the result. - */ - export function basename(p: string, ext?: string): string; - /** - * Return the extension of the path, from the last '.' to end of string in the last portion of the path. - * If there is no '.' in the last portion of the path or the first character of it is '.', then it returns an empty string - * - * @param p the path to evaluate. - */ - export function extname(p: string): string; - /** - * The platform-specific file separator. '\\' or '/'. - */ - export var sep: string; - /** - * The platform-specific file delimiter. ';' or ':'. - */ - export var delimiter: string; - /** - * Returns an object from a path string - the opposite of format(). - * - * @param pathString path to evaluate. - */ - export function parse(pathString: string): ParsedPath; - /** - * Returns a path string from an object - the opposite of parse(). - * - * @param pathString path to evaluate. - */ - export function format(pathObject: ParsedPath): string; - - export module posix { - export function normalize(p: string): string; - export function join(...paths: any[]): string; - export function resolve(...pathSegments: any[]): string; - export function isAbsolute(p: string): boolean; - export function relative(from: string, to: string): string; - export function dirname(p: string): string; - export function basename(p: string, ext?: string): string; - export function extname(p: string): string; - export var sep: string; - export var delimiter: string; - export function parse(p: string): ParsedPath; - export function format(pP: ParsedPath): string; - } - - export module win32 { - export function normalize(p: string): string; - export function join(...paths: any[]): string; - export function resolve(...pathSegments: any[]): string; - export function isAbsolute(p: string): boolean; - export function relative(from: string, to: string): string; - export function dirname(p: string): string; - export function basename(p: string, ext?: string): string; - export function extname(p: string): string; - export var sep: string; - export var delimiter: string; - export function parse(p: string): ParsedPath; - export function format(pP: ParsedPath): string; - } -} - -declare module "string_decoder" { - export interface NodeStringDecoder { - write(buffer: Buffer): string; - end(buffer?: Buffer): string; - } - export var StringDecoder: { - new (encoding?: string): NodeStringDecoder; - }; -} - -declare module "tls" { - import * as crypto from "crypto"; - import * as net from "net"; - import * as stream from "stream"; - - var CLIENT_RENEG_LIMIT: number; - var CLIENT_RENEG_WINDOW: number; - - export interface Certificate { - /** - * Country code. - */ - C: string; - /** - * Street. - */ - ST: string; - /** - * Locality. - */ - L: string; - /** - * Organization. - */ - O: string; - /** - * Organizational unit. - */ - OU: string; - /** - * Common name. - */ - CN: string; - } - - export interface CipherNameAndProtocol { - /** - * The cipher name. - */ - name: string; - /** - * SSL/TLS protocol version. - */ - version: string; - } - - export class TLSSocket extends stream.Duplex { - /** - * Returns the bound address, the address family name and port of the underlying socket as reported by - * the operating system. - * @returns {any} - An object with three properties, e.g. { port: 12346, family: 'IPv4', address: '127.0.0.1' }. - */ - address(): { port: number; family: string; address: string }; - /** - * A boolean that is true if the peer certificate was signed by one of the specified CAs, otherwise false. - */ - authorized: boolean; - /** - * The reason why the peer's certificate has not been verified. - * This property becomes available only when tlsSocket.authorized === false. - */ - authorizationError: Error; - /** - * Static boolean value, always true. - * May be used to distinguish TLS sockets from regular ones. - */ - encrypted: boolean; - /** - * Returns an object representing the cipher name and the SSL/TLS protocol version of the current connection. - * @returns {CipherNameAndProtocol} - Returns an object representing the cipher name - * and the SSL/TLS protocol version of the current connection. - */ - getCipher(): CipherNameAndProtocol; - /** - * Returns an object representing the peer's certificate. - * The returned object has some properties corresponding to the field of the certificate. - * If detailed argument is true the full chain with issuer property will be returned, - * if false only the top certificate without issuer property. - * If the peer does not provide a certificate, it returns null or an empty object. - * @param {boolean} detailed - If true; the full chain with issuer property will be returned. - * @returns {any} - An object representing the peer's certificate. - */ - getPeerCertificate(detailed?: boolean): { - subject: Certificate; - issuerInfo: Certificate; - issuer: Certificate; - raw: any; - valid_from: string; - valid_to: string; - fingerprint: string; - serialNumber: string; - }; - /** - * Could be used to speed up handshake establishment when reconnecting to the server. - * @returns {any} - ASN.1 encoded TLS session or undefined if none was negotiated. - */ - getSession(): any; - /** - * NOTE: Works only with client TLS sockets. - * Useful only for debugging, for session reuse provide session option to tls.connect(). - * @returns {any} - TLS session ticket or undefined if none was negotiated. - */ - getTLSTicket(): any; - /** - * The string representation of the local IP address. - */ - localAddress: string; - /** - * The numeric representation of the local port. - */ - localPort: string; - /** - * The string representation of the remote IP address. - * For example, '74.125.127.100' or '2001:4860:a005::68'. - */ - remoteAddress: string; - /** - * The string representation of the remote IP family. 'IPv4' or 'IPv6'. - */ - remoteFamily: string; - /** - * The numeric representation of the remote port. For example, 443. - */ - remotePort: number; - /** - * Initiate TLS renegotiation process. - * - * NOTE: Can be used to request peer's certificate after the secure connection has been established. - * ANOTHER NOTE: When running as the server, socket will be destroyed with an error after handshakeTimeout timeout. - * @param {TlsOptions} options - The options may contain the following fields: rejectUnauthorized, - * requestCert (See tls.createServer() for details). - * @param {Function} callback - callback(err) will be executed with null as err, once the renegotiation - * is successfully completed. - */ - renegotiate(options: TlsOptions, callback: (err: Error) => any): any; - /** - * Set maximum TLS fragment size (default and maximum value is: 16384, minimum is: 512). - * Smaller fragment size decreases buffering latency on the client: large fragments are buffered by - * the TLS layer until the entire fragment is received and its integrity is verified; - * large fragments can span multiple roundtrips, and their processing can be delayed due to packet - * loss or reordering. However, smaller fragments add extra TLS framing bytes and CPU overhead, - * which may decrease overall server throughput. - * @param {number} size - TLS fragment size (default and maximum value is: 16384, minimum is: 512). - * @returns {boolean} - Returns true on success, false otherwise. - */ - setMaxSendFragment(size: number): boolean; - - /** - * events.EventEmitter - * 1. OCSPResponse - * 2. secureConnect - **/ - addListener(event: string, listener: Function): this; - addListener(event: "OCSPResponse", listener: (response: Buffer) => void): this; - addListener(event: "secureConnect", listener: () => void): this; - - emit(event: string, ...args: any[]): boolean; - emit(event: "OCSPResponse", response: Buffer): boolean; - emit(event: "secureConnect"): boolean; - - on(event: string, listener: Function): this; - on(event: "OCSPResponse", listener: (response: Buffer) => void): this; - on(event: "secureConnect", listener: () => void): this; - - once(event: string, listener: Function): this; - once(event: "OCSPResponse", listener: (response: Buffer) => void): this; - once(event: "secureConnect", listener: () => void): this; - - prependListener(event: string, listener: Function): this; - prependListener(event: "OCSPResponse", listener: (response: Buffer) => void): this; - prependListener(event: "secureConnect", listener: () => void): this; - - prependOnceListener(event: string, listener: Function): this; - prependOnceListener(event: "OCSPResponse", listener: (response: Buffer) => void): this; - prependOnceListener(event: "secureConnect", listener: () => void): this; - } - - export interface TlsOptions { - host?: string; - port?: number; - pfx?: string | Buffer[]; - key?: string | string[] | Buffer | any[]; - passphrase?: string; - cert?: string | string[] | Buffer | Buffer[]; - ca?: string | string[] | Buffer | Buffer[]; - crl?: string | string[]; - ciphers?: string; - honorCipherOrder?: boolean; - requestCert?: boolean; - rejectUnauthorized?: boolean; - NPNProtocols?: string[] | Buffer; - SNICallback?: (servername: string, cb: (err: Error, ctx: SecureContext) => any) => any; - ecdhCurve?: string; - dhparam?: string | Buffer; - handshakeTimeout?: number; - ALPNProtocols?: string[] | Buffer; - sessionTimeout?: number; - ticketKeys?: any; - sessionIdContext?: string; - secureProtocol?: string; - } - - export interface ConnectionOptions { - host?: string; - port?: number; - socket?: net.Socket; - pfx?: string | Buffer - key?: string | string[] | Buffer | Buffer[]; - passphrase?: string; - cert?: string | string[] | Buffer | Buffer[]; - ca?: string | Buffer | (string | Buffer)[]; - rejectUnauthorized?: boolean; - NPNProtocols?: (string | Buffer)[]; - servername?: string; - path?: string; - ALPNProtocols?: (string | Buffer)[]; - checkServerIdentity?: (servername: string, cert: string | Buffer | (string | Buffer)[]) => any; - secureProtocol?: string; - secureContext?: Object; - session?: Buffer; - minDHSize?: number; - } - - export interface Server extends net.Server { - close(): Server; - address(): { port: number; family: string; address: string; }; - addContext(hostName: string, credentials: { - key: string; - cert: string; - ca: string; - }): void; - maxConnections: number; - connections: number; - - /** - * events.EventEmitter - * 1. tlsClientError - * 2. newSession - * 3. OCSPRequest - * 4. resumeSession - * 5. secureConnection - **/ - addListener(event: string, listener: Function): this; - addListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; - addListener(event: "newSession", listener: (sessionId: any, sessionData: any, callback: (err: Error, resp: Buffer) => void) => void): this; - addListener(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: Function) => void): this; - addListener(event: "resumeSession", listener: (sessionId: any, callback: (err: Error, sessionData: any) => void) => void): this; - addListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; - - emit(event: string, ...args: any[]): boolean; - emit(event: "tlsClientError", err: Error, tlsSocket: TLSSocket): boolean; - emit(event: "newSession", sessionId: any, sessionData: any, callback: (err: Error, resp: Buffer) => void): boolean; - emit(event: "OCSPRequest", certificate: Buffer, issuer: Buffer, callback: Function): boolean; - emit(event: "resumeSession", sessionId: any, callback: (err: Error, sessionData: any) => void): boolean; - emit(event: "secureConnection", tlsSocket: TLSSocket): boolean; - - on(event: string, listener: Function): this; - on(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; - on(event: "newSession", listener: (sessionId: any, sessionData: any, callback: (err: Error, resp: Buffer) => void) => void): this; - on(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: Function) => void): this; - on(event: "resumeSession", listener: (sessionId: any, callback: (err: Error, sessionData: any) => void) => void): this; - on(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; - - once(event: string, listener: Function): this; - once(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; - once(event: "newSession", listener: (sessionId: any, sessionData: any, callback: (err: Error, resp: Buffer) => void) => void): this; - once(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: Function) => void): this; - once(event: "resumeSession", listener: (sessionId: any, callback: (err: Error, sessionData: any) => void) => void): this; - once(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; - - prependListener(event: string, listener: Function): this; - prependListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; - prependListener(event: "newSession", listener: (sessionId: any, sessionData: any, callback: (err: Error, resp: Buffer) => void) => void): this; - prependListener(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: Function) => void): this; - prependListener(event: "resumeSession", listener: (sessionId: any, callback: (err: Error, sessionData: any) => void) => void): this; - prependListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; - - prependOnceListener(event: string, listener: Function): this; - prependOnceListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; - prependOnceListener(event: "newSession", listener: (sessionId: any, sessionData: any, callback: (err: Error, resp: Buffer) => void) => void): this; - prependOnceListener(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: Function) => void): this; - prependOnceListener(event: "resumeSession", listener: (sessionId: any, callback: (err: Error, sessionData: any) => void) => void): this; - prependOnceListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; - } - - export interface ClearTextStream extends stream.Duplex { - authorized: boolean; - authorizationError: Error; - getPeerCertificate(): any; - getCipher: { - name: string; - version: string; - }; - address: { - port: number; - family: string; - address: string; - }; - remoteAddress: string; - remotePort: number; - } - - export interface SecurePair { - encrypted: any; - cleartext: any; - } - - export interface SecureContextOptions { - pfx?: string | Buffer; - key?: string | Buffer; - passphrase?: string; - cert?: string | Buffer; - ca?: string | Buffer; - crl?: string | string[] - ciphers?: string; - honorCipherOrder?: boolean; - } - - export interface SecureContext { - context: any; - } - - export function createServer(options: TlsOptions, secureConnectionListener?: (cleartextStream: ClearTextStream) => void): Server; - export function connect(options: ConnectionOptions, secureConnectionListener?: () => void): ClearTextStream; - export function connect(port: number, host?: string, options?: ConnectionOptions, secureConnectListener?: () => void): ClearTextStream; - export function connect(port: number, options?: ConnectionOptions, secureConnectListener?: () => void): ClearTextStream; - export function createSecurePair(credentials?: crypto.Credentials, isServer?: boolean, requestCert?: boolean, rejectUnauthorized?: boolean): SecurePair; - export function createSecureContext(details: SecureContextOptions): SecureContext; -} - -declare module "crypto" { - export interface Certificate { - exportChallenge(spkac: string | Buffer): Buffer; - exportPublicKey(spkac: string | Buffer): Buffer; - verifySpkac(spkac: Buffer): boolean; - } - export var Certificate: { - new (): Certificate; - (): Certificate; - } - - export var fips: boolean; - - export interface CredentialDetails { - pfx: string; - key: string; - passphrase: string; - cert: string; - ca: string | string[]; - crl: string | string[]; - ciphers: string; - } - export interface Credentials { context?: any; } - export function createCredentials(details: CredentialDetails): Credentials; - export function createHash(algorithm: string): Hash; - export function createHmac(algorithm: string, key: string | Buffer): Hmac; - - type Utf8AsciiLatin1Encoding = "utf8" | "ascii" | "latin1"; - type HexBase64Latin1Encoding = "latin1" | "hex" | "base64"; - type Utf8AsciiBinaryEncoding = "utf8" | "ascii" | "binary"; - type HexBase64BinaryEncoding = "binary" | "base64" | "hex"; - type ECDHKeyFormat = "compressed" | "uncompressed" | "hybrid"; - - export interface Hash extends NodeJS.ReadWriteStream { - update(data: string | Buffer): Hash; - update(data: string | Buffer, input_encoding: Utf8AsciiLatin1Encoding): Hash; - digest(): Buffer; - digest(encoding: HexBase64Latin1Encoding): string; - } - export interface Hmac extends NodeJS.ReadWriteStream { - update(data: string | Buffer): Hmac; - update(data: string | Buffer, input_encoding: Utf8AsciiLatin1Encoding): Hmac; - digest(): Buffer; - digest(encoding: HexBase64Latin1Encoding): string; - } - export function createCipher(algorithm: string, password: any): Cipher; - export function createCipheriv(algorithm: string, key: any, iv: any): Cipher; - export interface Cipher extends NodeJS.ReadWriteStream { - update(data: Buffer): Buffer; - update(data: string, input_encoding: Utf8AsciiBinaryEncoding): Buffer; - update(data: Buffer, input_encoding: any, output_encoding: HexBase64BinaryEncoding): string; - update(data: string, input_encoding: Utf8AsciiBinaryEncoding, output_encoding: HexBase64BinaryEncoding): string; - final(): Buffer; - final(output_encoding: string): string; - setAutoPadding(auto_padding?: boolean): void; - getAuthTag(): Buffer; - setAAD(buffer: Buffer): void; - } - export function createDecipher(algorithm: string, password: any): Decipher; - export function createDecipheriv(algorithm: string, key: any, iv: any): Decipher; - export interface Decipher extends NodeJS.ReadWriteStream { - update(data: Buffer): Buffer; - update(data: string, input_encoding: HexBase64BinaryEncoding): Buffer; - update(data: Buffer, input_encoding: any, output_encoding: Utf8AsciiBinaryEncoding): string; - update(data: string, input_encoding: HexBase64BinaryEncoding, output_encoding: Utf8AsciiBinaryEncoding): string; - final(): Buffer; - final(output_encoding: string): string; - setAutoPadding(auto_padding?: boolean): void; - setAuthTag(tag: Buffer): void; - setAAD(buffer: Buffer): void; - } - export function createSign(algorithm: string): Signer; - export interface Signer extends NodeJS.WritableStream { - update(data: string | Buffer): Signer; - update(data: string | Buffer, input_encoding: Utf8AsciiLatin1Encoding): Signer; - sign(private_key: string | { key: string; passphrase: string }): Buffer; - sign(private_key: string | { key: string; passphrase: string }, output_format: HexBase64Latin1Encoding): string; - } - export function createVerify(algorith: string): Verify; - export interface Verify extends NodeJS.WritableStream { - update(data: string | Buffer): Verify; - update(data: string | Buffer, input_encoding: Utf8AsciiLatin1Encoding): Verify; - verify(object: string, signature: Buffer): boolean; - verify(object: string, signature: string, signature_format: HexBase64Latin1Encoding): boolean; - } - export function createDiffieHellman(prime_length: number, generator?: number): DiffieHellman; - export function createDiffieHellman(prime: Buffer): DiffieHellman; - export function createDiffieHellman(prime: string, prime_encoding: HexBase64Latin1Encoding): DiffieHellman; - export function createDiffieHellman(prime: string, prime_encoding: HexBase64Latin1Encoding, generator: number | Buffer): DiffieHellman; - export function createDiffieHellman(prime: string, prime_encoding: HexBase64Latin1Encoding, generator: string, generator_encoding: HexBase64Latin1Encoding): DiffieHellman; - export interface DiffieHellman { - generateKeys(): Buffer; - generateKeys(encoding: HexBase64Latin1Encoding): string; - computeSecret(other_public_key: Buffer): Buffer; - computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding): Buffer; - computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding, output_encoding: HexBase64Latin1Encoding): string; - getPrime(): Buffer; - getPrime(encoding: HexBase64Latin1Encoding): string; - getGenerator(): Buffer; - getGenerator(encoding: HexBase64Latin1Encoding): string; - getPublicKey(): Buffer; - getPublicKey(encoding: HexBase64Latin1Encoding): string; - getPrivateKey(): Buffer; - getPrivateKey(encoding: HexBase64Latin1Encoding): string; - setPublicKey(public_key: Buffer): void; - setPublicKey(public_key: string, encoding: string): void; - setPrivateKey(private_key: Buffer): void; - setPrivateKey(private_key: string, encoding: string): void; - verifyError: number; - } - export function getDiffieHellman(group_name: string): DiffieHellman; - export function pbkdf2(password: string | Buffer, salt: string | Buffer, iterations: number, keylen: number, digest: string, callback: (err: Error, derivedKey: Buffer) => any): void; - export function pbkdf2Sync(password: string | Buffer, salt: string | Buffer, iterations: number, keylen: number, digest: string): Buffer; - export function randomBytes(size: number): Buffer; - export function randomBytes(size: number, callback: (err: Error, buf: Buffer) => void): void; - export function pseudoRandomBytes(size: number): Buffer; - export function pseudoRandomBytes(size: number, callback: (err: Error, buf: Buffer) => void): void; - export interface RsaPublicKey { - key: string; - padding?: number; - } - export interface RsaPrivateKey { - key: string; - passphrase?: string, - padding?: number; - } - export function publicEncrypt(public_key: string | RsaPublicKey, buffer: Buffer): Buffer - export function privateDecrypt(private_key: string | RsaPrivateKey, buffer: Buffer): Buffer - export function privateEncrypt(private_key: string | RsaPrivateKey, buffer: Buffer): Buffer - export function publicDecrypt(public_key: string | RsaPublicKey, buffer: Buffer): Buffer - export function getCiphers(): string[]; - export function getCurves(): string[]; - export function getHashes(): string[]; - export interface ECDH { - generateKeys(): Buffer; - generateKeys(encoding: HexBase64Latin1Encoding): string; - generateKeys(encoding: HexBase64Latin1Encoding, format: ECDHKeyFormat): string; - computeSecret(other_public_key: Buffer): Buffer; - computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding): Buffer; - computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding, output_encoding: HexBase64Latin1Encoding): string; - getPrivateKey(): Buffer; - getPrivateKey(encoding: HexBase64Latin1Encoding): string; - getPublicKey(): Buffer; - getPublicKey(encoding: HexBase64Latin1Encoding): string; - getPublicKey(encoding: HexBase64Latin1Encoding, format: ECDHKeyFormat): string; - setPrivateKey(private_key: Buffer): void; - setPrivateKey(private_key: string, encoding: HexBase64Latin1Encoding): void; - } - export function createECDH(curve_name: string): ECDH; - export function timingSafeEqual(a: Buffer, b: Buffer): boolean; - export var DEFAULT_ENCODING: string; -} - -declare module "stream" { - import * as events from "events"; - - class internal extends events.EventEmitter { - pipe(destination: T, options?: { end?: boolean; }): T; - } - namespace internal { - - export class Stream extends internal { } - - export interface ReadableOptions { - highWaterMark?: number; - encoding?: string; - objectMode?: boolean; - read?: (size?: number) => any; - } - - export class Readable extends events.EventEmitter implements NodeJS.ReadableStream { - readable: boolean; - constructor(opts?: ReadableOptions); - protected _read(size: number): void; - read(size?: number): any; - setEncoding(encoding: string): void; - pause(): Readable; - resume(): Readable; - pipe(destination: T, options?: { end?: boolean; }): T; - unpipe(destination?: T): void; - unshift(chunk: any): void; - wrap(oldStream: NodeJS.ReadableStream): NodeJS.ReadableStream; - push(chunk: any, encoding?: string): boolean; - - /** - * Event emitter - * The defined events on documents including: - * 1. close - * 2. data - * 3. end - * 4. readable - * 5. error - **/ - addListener(event: string, listener: Function): this; - addListener(event: string, listener: Function): this; - addListener(event: "close", listener: () => void): this; - addListener(event: "data", listener: (chunk: Buffer | string) => void): this; - addListener(event: "end", listener: () => void): this; - addListener(event: "readable", listener: () => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - - emit(event: string, ...args: any[]): boolean; - emit(event: "close"): boolean; - emit(event: "data", chunk: Buffer | string): boolean; - emit(event: "end"): boolean; - emit(event: "readable"): boolean; - emit(event: "error", err: Error): boolean; - - on(event: string, listener: Function): this; - on(event: "close", listener: () => void): this; - on(event: "data", listener: (chunk: Buffer | string) => void): this; - on(event: "end", listener: () => void): this; - on(event: "readable", listener: () => void): this; - on(event: "error", listener: (err: Error) => void): this; - - once(event: string, listener: Function): this; - once(event: "close", listener: () => void): this; - once(event: "data", listener: (chunk: Buffer | string) => void): this; - once(event: "end", listener: () => void): this; - once(event: "readable", listener: () => void): this; - once(event: "error", listener: (err: Error) => void): this; - - prependListener(event: string, listener: Function): this; - prependListener(event: "close", listener: () => void): this; - prependListener(event: "data", listener: (chunk: Buffer | string) => void): this; - prependListener(event: "end", listener: () => void): this; - prependListener(event: "readable", listener: () => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; - - prependOnceListener(event: string, listener: Function): this; - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "data", listener: (chunk: Buffer | string) => void): this; - prependOnceListener(event: "end", listener: () => void): this; - prependOnceListener(event: "readable", listener: () => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; - - removeListener(event: string, listener: Function): this; - removeListener(event: "close", listener: () => void): this; - removeListener(event: "data", listener: (chunk: Buffer | string) => void): this; - removeListener(event: "end", listener: () => void): this; - removeListener(event: "readable", listener: () => void): this; - removeListener(event: "error", listener: (err: Error) => void): this; - } - - export interface WritableOptions { - highWaterMark?: number; - decodeStrings?: boolean; - objectMode?: boolean; - write?: (chunk: string | Buffer, encoding: string, callback: Function) => any; - writev?: (chunks: { chunk: string | Buffer, encoding: string }[], callback: Function) => any; - } - - export class Writable extends events.EventEmitter implements NodeJS.WritableStream { - writable: boolean; - constructor(opts?: WritableOptions); - protected _write(chunk: any, encoding: string, callback: Function): void; - write(chunk: any, cb?: Function): boolean; - write(chunk: any, encoding?: string, cb?: Function): boolean; - end(): void; - end(chunk: any, cb?: Function): void; - end(chunk: any, encoding?: string, cb?: Function): void; - - /** - * Event emitter - * The defined events on documents including: - * 1. close - * 2. drain - * 3. error - * 4. finish - * 5. pipe - * 6. unpipe - **/ - addListener(event: string, listener: Function): this; - addListener(event: "close", listener: () => void): this; - addListener(event: "drain", listener: () => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - addListener(event: "finish", listener: () => void): this; - addListener(event: "pipe", listener: (src: Readable) => void): this; - addListener(event: "unpipe", listener: (src: Readable) => void): this; - - emit(event: string, ...args: any[]): boolean; - emit(event: "close"): boolean; - emit(event: "drain", chunk: Buffer | string): boolean; - emit(event: "error", err: Error): boolean; - emit(event: "finish"): boolean; - emit(event: "pipe", src: Readable): boolean; - emit(event: "unpipe", src: Readable): boolean; - - on(event: string, listener: Function): this; - on(event: "close", listener: () => void): this; - on(event: "drain", listener: () => void): this; - on(event: "error", listener: (err: Error) => void): this; - on(event: "finish", listener: () => void): this; - on(event: "pipe", listener: (src: Readable) => void): this; - on(event: "unpipe", listener: (src: Readable) => void): this; - - once(event: string, listener: Function): this; - once(event: "close", listener: () => void): this; - once(event: "drain", listener: () => void): this; - once(event: "error", listener: (err: Error) => void): this; - once(event: "finish", listener: () => void): this; - once(event: "pipe", listener: (src: Readable) => void): this; - once(event: "unpipe", listener: (src: Readable) => void): this; - - prependListener(event: string, listener: Function): this; - prependListener(event: "close", listener: () => void): this; - prependListener(event: "drain", listener: () => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; - prependListener(event: "finish", listener: () => void): this; - prependListener(event: "pipe", listener: (src: Readable) => void): this; - prependListener(event: "unpipe", listener: (src: Readable) => void): this; - - prependOnceListener(event: string, listener: Function): this; - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "drain", listener: () => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; - prependOnceListener(event: "finish", listener: () => void): this; - prependOnceListener(event: "pipe", listener: (src: Readable) => void): this; - prependOnceListener(event: "unpipe", listener: (src: Readable) => void): this; - - removeListener(event: string, listener: Function): this; - removeListener(event: "close", listener: () => void): this; - removeListener(event: "drain", listener: () => void): this; - removeListener(event: "error", listener: (err: Error) => void): this; - removeListener(event: "finish", listener: () => void): this; - removeListener(event: "pipe", listener: (src: Readable) => void): this; - removeListener(event: "unpipe", listener: (src: Readable) => void): this; - } - - export interface DuplexOptions extends ReadableOptions, WritableOptions { - allowHalfOpen?: boolean; - readableObjectMode?: boolean; - writableObjectMode?: boolean; - } - - // Note: Duplex extends both Readable and Writable. - export class Duplex extends Readable implements NodeJS.ReadWriteStream { - // Readable - pause(): Duplex; - resume(): Duplex; - // Writeable - writable: boolean; - constructor(opts?: DuplexOptions); - protected _write(chunk: any, encoding: string, callback: Function): void; - write(chunk: any, cb?: Function): boolean; - write(chunk: any, encoding?: string, cb?: Function): boolean; - end(): void; - end(chunk: any, cb?: Function): void; - end(chunk: any, encoding?: string, cb?: Function): void; - } - - export interface TransformOptions extends DuplexOptions { - transform?: (chunk: string | Buffer, encoding: string, callback: Function) => any; - flush?: (callback: Function) => any; - } - - // Note: Transform lacks the _read and _write methods of Readable/Writable. - export class Transform extends events.EventEmitter implements NodeJS.ReadWriteStream { - readable: boolean; - writable: boolean; - constructor(opts?: TransformOptions); - protected _transform(chunk: any, encoding: string, callback: Function): void; - protected _flush(callback: Function): void; - read(size?: number): any; - setEncoding(encoding: string): void; - pause(): Transform; - resume(): Transform; - pipe(destination: T, options?: { end?: boolean; }): T; - unpipe(destination?: T): void; - unshift(chunk: any): void; - wrap(oldStream: NodeJS.ReadableStream): NodeJS.ReadableStream; - push(chunk: any, encoding?: string): boolean; - write(chunk: any, cb?: Function): boolean; - write(chunk: any, encoding?: string, cb?: Function): boolean; - end(): void; - end(chunk: any, cb?: Function): void; - end(chunk: any, encoding?: string, cb?: Function): void; - } - - export class PassThrough extends Transform { } - } - - export = internal; -} - -declare module "util" { - export interface InspectOptions { - showHidden?: boolean; - depth?: number; - colors?: boolean; - customInspect?: boolean; - } - - export function format(format: any, ...param: any[]): string; - export function debug(string: string): void; - export function error(...param: any[]): void; - export function puts(...param: any[]): void; - export function print(...param: any[]): void; - export function log(string: string): void; - export function inspect(object: any, showHidden?: boolean, depth?: number, color?: boolean): string; - export function inspect(object: any, options: InspectOptions): string; - export function isArray(object: any): boolean; - export function isRegExp(object: any): boolean; - export function isDate(object: any): boolean; - export function isError(object: any): boolean; - export function inherits(constructor: any, superConstructor: any): void; - export function debuglog(key: string): (msg: string, ...param: any[]) => void; - export function isBoolean(object: any): boolean; - export function isBuffer(object: any): boolean; - export function isFunction(object: any): boolean; - export function isNull(object: any): boolean; - export function isNullOrUndefined(object: any): boolean; - export function isNumber(object: any): boolean; - export function isObject(object: any): boolean; - export function isPrimitive(object: any): boolean; - export function isString(object: any): boolean; - export function isSymbol(object: any): boolean; - export function isUndefined(object: any): boolean; - export function deprecate(fn: Function, message: string): Function; -} - -declare module "assert" { - function internal(value: any, message?: string): void; - namespace internal { - export class AssertionError implements Error { - name: string; - message: string; - actual: any; - expected: any; - operator: string; - generatedMessage: boolean; - - constructor(options?: { - message?: string; actual?: any; expected?: any; - operator?: string; stackStartFunction?: Function - }); - } - - export function fail(actual: any, expected: any, message: string, operator: string): void; - export function ok(value: any, message?: string): void; - export function equal(actual: any, expected: any, message?: string): void; - export function notEqual(actual: any, expected: any, message?: string): void; - export function deepEqual(actual: any, expected: any, message?: string): void; - export function notDeepEqual(acutal: any, expected: any, message?: string): void; - export function strictEqual(actual: any, expected: any, message?: string): void; - export function notStrictEqual(actual: any, expected: any, message?: string): void; - export function deepStrictEqual(actual: any, expected: any, message?: string): void; - export function notDeepStrictEqual(actual: any, expected: any, message?: string): void; - export var throws: { - (block: Function, message?: string): void; - (block: Function, error: Function, message?: string): void; - (block: Function, error: RegExp, message?: string): void; - (block: Function, error: (err: any) => boolean, message?: string): void; - }; - - export var doesNotThrow: { - (block: Function, message?: string): void; - (block: Function, error: Function, message?: string): void; - (block: Function, error: RegExp, message?: string): void; - (block: Function, error: (err: any) => boolean, message?: string): void; - }; - - export function ifError(value: any): void; - } - - export = internal; -} - -declare module "tty" { - import * as net from "net"; - - export function isatty(fd: number): boolean; - export interface ReadStream extends net.Socket { - isRaw: boolean; - setRawMode(mode: boolean): void; - isTTY: boolean; - } - export interface WriteStream extends net.Socket { - columns: number; - rows: number; - isTTY: boolean; - } -} - -declare module "domain" { - import * as events from "events"; - - export class Domain extends events.EventEmitter implements NodeJS.Domain { - run(fn: Function): void; - add(emitter: events.EventEmitter): void; - remove(emitter: events.EventEmitter): void; - bind(cb: (err: Error, data: any) => any): any; - intercept(cb: (data: any) => any): any; - dispose(): void; - members: any[]; - enter(): void; - exit(): void; - } - - export function create(): Domain; -} - -declare module "constants" { - export var E2BIG: number; - export var EACCES: number; - export var EADDRINUSE: number; - export var EADDRNOTAVAIL: number; - export var EAFNOSUPPORT: number; - export var EAGAIN: number; - export var EALREADY: number; - export var EBADF: number; - export var EBADMSG: number; - export var EBUSY: number; - export var ECANCELED: number; - export var ECHILD: number; - export var ECONNABORTED: number; - export var ECONNREFUSED: number; - export var ECONNRESET: number; - export var EDEADLK: number; - export var EDESTADDRREQ: number; - export var EDOM: number; - export var EEXIST: number; - export var EFAULT: number; - export var EFBIG: number; - export var EHOSTUNREACH: number; - export var EIDRM: number; - export var EILSEQ: number; - export var EINPROGRESS: number; - export var EINTR: number; - export var EINVAL: number; - export var EIO: number; - export var EISCONN: number; - export var EISDIR: number; - export var ELOOP: number; - export var EMFILE: number; - export var EMLINK: number; - export var EMSGSIZE: number; - export var ENAMETOOLONG: number; - export var ENETDOWN: number; - export var ENETRESET: number; - export var ENETUNREACH: number; - export var ENFILE: number; - export var ENOBUFS: number; - export var ENODATA: number; - export var ENODEV: number; - export var ENOENT: number; - export var ENOEXEC: number; - export var ENOLCK: number; - export var ENOLINK: number; - export var ENOMEM: number; - export var ENOMSG: number; - export var ENOPROTOOPT: number; - export var ENOSPC: number; - export var ENOSR: number; - export var ENOSTR: number; - export var ENOSYS: number; - export var ENOTCONN: number; - export var ENOTDIR: number; - export var ENOTEMPTY: number; - export var ENOTSOCK: number; - export var ENOTSUP: number; - export var ENOTTY: number; - export var ENXIO: number; - export var EOPNOTSUPP: number; - export var EOVERFLOW: number; - export var EPERM: number; - export var EPIPE: number; - export var EPROTO: number; - export var EPROTONOSUPPORT: number; - export var EPROTOTYPE: number; - export var ERANGE: number; - export var EROFS: number; - export var ESPIPE: number; - export var ESRCH: number; - export var ETIME: number; - export var ETIMEDOUT: number; - export var ETXTBSY: number; - export var EWOULDBLOCK: number; - export var EXDEV: number; - export var WSAEINTR: number; - export var WSAEBADF: number; - export var WSAEACCES: number; - export var WSAEFAULT: number; - export var WSAEINVAL: number; - export var WSAEMFILE: number; - export var WSAEWOULDBLOCK: number; - export var WSAEINPROGRESS: number; - export var WSAEALREADY: number; - export var WSAENOTSOCK: number; - export var WSAEDESTADDRREQ: number; - export var WSAEMSGSIZE: number; - export var WSAEPROTOTYPE: number; - export var WSAENOPROTOOPT: number; - export var WSAEPROTONOSUPPORT: number; - export var WSAESOCKTNOSUPPORT: number; - export var WSAEOPNOTSUPP: number; - export var WSAEPFNOSUPPORT: number; - export var WSAEAFNOSUPPORT: number; - export var WSAEADDRINUSE: number; - export var WSAEADDRNOTAVAIL: number; - export var WSAENETDOWN: number; - export var WSAENETUNREACH: number; - export var WSAENETRESET: number; - export var WSAECONNABORTED: number; - export var WSAECONNRESET: number; - export var WSAENOBUFS: number; - export var WSAEISCONN: number; - export var WSAENOTCONN: number; - export var WSAESHUTDOWN: number; - export var WSAETOOMANYREFS: number; - export var WSAETIMEDOUT: number; - export var WSAECONNREFUSED: number; - export var WSAELOOP: number; - export var WSAENAMETOOLONG: number; - export var WSAEHOSTDOWN: number; - export var WSAEHOSTUNREACH: number; - export var WSAENOTEMPTY: number; - export var WSAEPROCLIM: number; - export var WSAEUSERS: number; - export var WSAEDQUOT: number; - export var WSAESTALE: number; - export var WSAEREMOTE: number; - export var WSASYSNOTREADY: number; - export var WSAVERNOTSUPPORTED: number; - export var WSANOTINITIALISED: number; - export var WSAEDISCON: number; - export var WSAENOMORE: number; - export var WSAECANCELLED: number; - export var WSAEINVALIDPROCTABLE: number; - export var WSAEINVALIDPROVIDER: number; - export var WSAEPROVIDERFAILEDINIT: number; - export var WSASYSCALLFAILURE: number; - export var WSASERVICE_NOT_FOUND: number; - export var WSATYPE_NOT_FOUND: number; - export var WSA_E_NO_MORE: number; - export var WSA_E_CANCELLED: number; - export var WSAEREFUSED: number; - export var SIGHUP: number; - export var SIGINT: number; - export var SIGILL: number; - export var SIGABRT: number; - export var SIGFPE: number; - export var SIGKILL: number; - export var SIGSEGV: number; - export var SIGTERM: number; - export var SIGBREAK: number; - export var SIGWINCH: number; - export var SSL_OP_ALL: number; - export var SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: number; - export var SSL_OP_CIPHER_SERVER_PREFERENCE: number; - export var SSL_OP_CISCO_ANYCONNECT: number; - export var SSL_OP_COOKIE_EXCHANGE: number; - export var SSL_OP_CRYPTOPRO_TLSEXT_BUG: number; - export var SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS: number; - export var SSL_OP_EPHEMERAL_RSA: number; - export var SSL_OP_LEGACY_SERVER_CONNECT: number; - export var SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER: number; - export var SSL_OP_MICROSOFT_SESS_ID_BUG: number; - export var SSL_OP_MSIE_SSLV2_RSA_PADDING: number; - export var SSL_OP_NETSCAPE_CA_DN_BUG: number; - export var SSL_OP_NETSCAPE_CHALLENGE_BUG: number; - export var SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG: number; - export var SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG: number; - export var SSL_OP_NO_COMPRESSION: number; - export var SSL_OP_NO_QUERY_MTU: number; - export var SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION: number; - export var SSL_OP_NO_SSLv2: number; - export var SSL_OP_NO_SSLv3: number; - export var SSL_OP_NO_TICKET: number; - export var SSL_OP_NO_TLSv1: number; - export var SSL_OP_NO_TLSv1_1: number; - export var SSL_OP_NO_TLSv1_2: number; - export var SSL_OP_PKCS1_CHECK_1: number; - export var SSL_OP_PKCS1_CHECK_2: number; - export var SSL_OP_SINGLE_DH_USE: number; - export var SSL_OP_SINGLE_ECDH_USE: number; - export var SSL_OP_SSLEAY_080_CLIENT_DH_BUG: number; - export var SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG: number; - export var SSL_OP_TLS_BLOCK_PADDING_BUG: number; - export var SSL_OP_TLS_D5_BUG: number; - export var SSL_OP_TLS_ROLLBACK_BUG: number; - export var ENGINE_METHOD_DSA: number; - export var ENGINE_METHOD_DH: number; - export var ENGINE_METHOD_RAND: number; - export var ENGINE_METHOD_ECDH: number; - export var ENGINE_METHOD_ECDSA: number; - export var ENGINE_METHOD_CIPHERS: number; - export var ENGINE_METHOD_DIGESTS: number; - export var ENGINE_METHOD_STORE: number; - export var ENGINE_METHOD_PKEY_METHS: number; - export var ENGINE_METHOD_PKEY_ASN1_METHS: number; - export var ENGINE_METHOD_ALL: number; - export var ENGINE_METHOD_NONE: number; - export var DH_CHECK_P_NOT_SAFE_PRIME: number; - export var DH_CHECK_P_NOT_PRIME: number; - export var DH_UNABLE_TO_CHECK_GENERATOR: number; - export var DH_NOT_SUITABLE_GENERATOR: number; - export var NPN_ENABLED: number; - export var RSA_PKCS1_PADDING: number; - export var RSA_SSLV23_PADDING: number; - export var RSA_NO_PADDING: number; - export var RSA_PKCS1_OAEP_PADDING: number; - export var RSA_X931_PADDING: number; - export var RSA_PKCS1_PSS_PADDING: number; - export var POINT_CONVERSION_COMPRESSED: number; - export var POINT_CONVERSION_UNCOMPRESSED: number; - export var POINT_CONVERSION_HYBRID: number; - export var O_RDONLY: number; - export var O_WRONLY: number; - export var O_RDWR: number; - export var S_IFMT: number; - export var S_IFREG: number; - export var S_IFDIR: number; - export var S_IFCHR: number; - export var S_IFBLK: number; - export var S_IFIFO: number; - export var S_IFSOCK: number; - export var S_IRWXU: number; - export var S_IRUSR: number; - export var S_IWUSR: number; - export var S_IXUSR: number; - export var S_IRWXG: number; - export var S_IRGRP: number; - export var S_IWGRP: number; - export var S_IXGRP: number; - export var S_IRWXO: number; - export var S_IROTH: number; - export var S_IWOTH: number; - export var S_IXOTH: number; - export var S_IFLNK: number; - export var O_CREAT: number; - export var O_EXCL: number; - export var O_NOCTTY: number; - export var O_DIRECTORY: number; - export var O_NOATIME: number; - export var O_NOFOLLOW: number; - export var O_SYNC: number; - export var O_SYMLINK: number; - export var O_DIRECT: number; - export var O_NONBLOCK: number; - export var O_TRUNC: number; - export var O_APPEND: number; - export var F_OK: number; - export var R_OK: number; - export var W_OK: number; - export var X_OK: number; - export var UV_UDP_REUSEADDR: number; - export var SIGQUIT: number; - export var SIGTRAP: number; - export var SIGIOT: number; - export var SIGBUS: number; - export var SIGUSR1: number; - export var SIGUSR2: number; - export var SIGPIPE: number; - export var SIGALRM: number; - export var SIGCHLD: number; - export var SIGSTKFLT: number; - export var SIGCONT: number; - export var SIGSTOP: number; - export var SIGTSTP: number; - export var SIGTTIN: number; - export var SIGTTOU: number; - export var SIGURG: number; - export var SIGXCPU: number; - export var SIGXFSZ: number; - export var SIGVTALRM: number; - export var SIGPROF: number; - export var SIGIO: number; - export var SIGPOLL: number; - export var SIGPWR: number; - export var SIGSYS: number; - export var SIGUNUSED: number; - export var defaultCoreCipherList: string; - export var defaultCipherList: string; - export var ENGINE_METHOD_RSA: number; - export var ALPN_ENABLED: number; -} - -declare module "process" { - export = process; -} - -declare module "v8" { - interface HeapSpaceInfo { - space_name: string; - space_size: number; - space_used_size: number; - space_available_size: number; - physical_space_size: number; - } - export function getHeapStatistics(): { total_heap_size: number, total_heap_size_executable: number, total_physical_size: number, total_avaialble_size: number, used_heap_size: number, heap_size_limit: number }; - export function getHeapSpaceStatistics(): HeapSpaceInfo[]; - export function setFlagsFromString(flags: string): void; -} - -declare module "timers" { - export function setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timer; - export function clearTimeout(timeoutId: NodeJS.Timer): void; - export function setInterval(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timer; - export function clearInterval(intervalId: NodeJS.Timer): void; - export function setImmediate(callback: (...args: any[]) => void, ...args: any[]): any; - export function clearImmediate(immediateId: any): void; -} - -declare module "console" { - export = console; -} diff --git a/typings/shelljs/shelljs.d.ts b/typings/shelljs/shelljs.d.ts deleted file mode 100644 index 5d33833e..00000000 --- a/typings/shelljs/shelljs.d.ts +++ /dev/null @@ -1,557 +0,0 @@ -// Type definitions for ShellJS v0.3.0 -// Project: http://shelljs.org -// Definitions by: Niklas Mollenhauer -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - - -/// - -declare module "shelljs" -{ - import child = require("child_process"); - - /** - * Changes to directory dir for the duration of the script - * @param {string} dir Directory to change in. - */ - export function cd(dir: string): void; - - /** - * Returns the current directory. - * @return {string} The current directory. - */ - export function pwd(): string; - - /** - * Returns array of files in the given path, or in current directory if no path provided. - * @param {string[]} ...paths Paths to search. - * @return {string[]} An array of files in the given path(s). - */ - export function ls(...paths: string[]): string[]; - - /** - * Returns array of files in the given path, or in current directory if no path provided. - * @param {string} options Available options: -R (recursive), -A (all files, include files beginning with ., except for . and ..) - * @param {string[]} ...paths Paths to search. - * @return {string[]} An array of files in the given path(s). - */ - export function ls(options: string, ...paths: string[]): string[]; - - /** - * Returns array of files in the given path, or in current directory if no path provided. - * @param {string[]} paths Paths to search. - * @return {string[]} An array of files in the given path(s). - */ - export function ls(paths: string[]): string[]; - - /** - * Returns array of files in the given path, or in current directory if no path provided. - * @param {string} options Available options: -R (recursive), -A (all files, include files beginning with ., except for . and ..) - * @param {string[]} paths Paths to search. - * @return {string[]} An array of files in the given path(s). - */ - export function ls(options: string, paths: string[]): string[]; - - /** - * Returns array of all files (however deep) in the given paths. - * @param {string[]} ...path The path(s) to search. - * @return {string[]} An array of all files (however deep) in the given path(s). - */ - export function find(...path: string[]): string[]; - - /** - * Returns array of all files (however deep) in the given paths. - * @param {string[]} path The path(s) to search. - * @return {string[]} An array of all files (however deep) in the given path(s). - */ - export function find(path: string[]): string[]; - - /** - * Copies files. The wildcard * is accepted. - * @param {string} source The source. - * @param {string} dest The destination. - */ - export function cp(source: string, dest: string): void; - - /** - * Copies files. The wildcard * is accepted. - * @param {string[]} source The source. - * @param {string} dest The destination. - */ - export function cp(source: string[], dest: string): void; - - /** - * Copies files. The wildcard * is accepted. - * @param {string} options Available options: -f (force), -r, -R (recursive) - * @param {strin]} source The source. - * @param {string} dest The destination. - */ - export function cp(options: string, source: string, dest: string): void; - - /** - * Copies files. The wildcard * is accepted. - * @param {string} options Available options: -f (force), -r, -R (recursive) - * @param {string[]} source The source. - * @param {string} dest The destination. - */ - export function cp(options: string, source: string[], dest: string): void; - - /** - * Removes files. The wildcard * is accepted. - * @param {string[]} ...files Files to remove. - */ - export function rm(...files: string[]): void; - - /** - * Removes files. The wildcard * is accepted. - * @param {string[]} files Files to remove. - */ - export function rm(files: string[]): void; - - /** - * Removes files. The wildcard * is accepted. - * @param {string} options Available options: -f (force), -r, -R (recursive) - * @param {string[]} ...files Files to remove. - */ - export function rm(options: string, ...files: string[]): void; - - /** - * Removes files. The wildcard * is accepted. - * @param {string} options Available options: -f (force), -r, -R (recursive) - * @param {string[]} ...files Files to remove. - */ - export function rm(options: string, files: string[]): void; - - /** - * Moves files. The wildcard * is accepted. - * @param {string} source The source. - * @param {string} dest The destination. - */ - export function mv(source: string, dest: string): void; - - /** - * Moves files. The wildcard * is accepted. - * @param {string[]} source The source. - * @param {string} dest The destination. - */ - export function mv(source: string[], dest: string): void; - - /** - * Creates directories. - * @param {string[]} ...dir Directories to create. - */ - export function mkdir(...dir: string[]): void; - - /** - * Creates directories. - * @param {string[]} dir Directories to create. - */ - export function mkdir(dir: string[]): void; - - /** - * Creates directories. - * @param {string} options Available options: p (full paths, will create intermediate dirs if necessary) - * @param {string[]} ...dir The directories to create. - */ - export function mkdir(options: string, ...dir: string[]): void; - - /** - * Creates directories. - * @param {string} options Available options: p (full paths, will create intermediate dirs if necessary) - * @param {string[]} dir The directories to create. - */ - export function mkdir(options: string, dir: string[]): void; - - /** - * Evaluates expression using the available primaries and returns corresponding value. - * @param {string} option '-b': true if path is a block device; '-c': true if path is a character device; '-d': true if path is a directory; '-e': true if path exists; '-f': true if path is a regular file; '-L': true if path is a symboilc link; '-p': true if path is a pipe (FIFO); '-S': true if path is a socket - * @param {string} path The path. - * @return {boolean} See option parameter. - */ - export function test(option: string, path: string): boolean; - - /** - * Returns a string containing the given file, or a concatenated string containing the files if more than one file is given (a new line character is introduced between each file). Wildcard * accepted. - * @param {string[]} ...files Files to use. - * @return {string} A string containing the given file, or a concatenated string containing the files if more than one file is given (a new line character is introduced between each file). - */ - export function cat(...files: string[]): string; - - /** - * Returns a string containing the given file, or a concatenated string containing the files if more than one file is given (a new line character is introduced between each file). Wildcard * accepted. - * @param {string[]} files Files to use. - * @return {string} A string containing the given file, or a concatenated string containing the files if more than one file is given (a new line character is introduced between each file). - */ - export function cat(files: string[]): string; - - - // Does not work yet. - export interface String - { - /** - * Analogous to the redirection operator > in Unix, but works with JavaScript strings (such as those returned by cat, grep, etc). Like Unix redirections, to() will overwrite any existing file! - * @param {string} file The file to use. - */ - to(file: string): void; - - /** - * Analogous to the redirect-and-append operator >> in Unix, but works with JavaScript strings (such as those returned by cat, grep, etc). - * @param {string} file The file to append to. - */ - toEnd(file: string): void; - } - - /** - * Reads an input string from file and performs a JavaScript replace() on the input using the given search regex and replacement string or function. Returns the new string after replacement. - * @param {RegExp} searchRegex The regular expression to use for search. - * @param {string} replacement The replacement. - * @param {string} file The file to process. - * @return {string} The new string after replacement. - */ - export function sed(searchRegex: RegExp, replacement: string, file: string): string; - - /** - * Reads an input string from file and performs a JavaScript replace() on the input using the given search regex and replacement string or function. Returns the new string after replacement. - * @param {string} searchRegex The regular expression to use for search. - * @param {string} replacement The replacement. - * @param {string} file The file to process. - * @return {string} The new string after replacement. - */ - export function sed(searchRegex: string, replacement: string, file: string): string; - - /** - * Reads an input string from file and performs a JavaScript replace() on the input using the given search regex and replacement string or function. Returns the new string after replacement. - * @param {string} options Available options: -i (Replace contents of 'file' in-place. Note that no backups will be created!) - * @param {RegExp} searchRegex The regular expression to use for search. - * @param {string} replacement The replacement. - * @param {string} file The file to process. - * @return {string} The new string after replacement. - */ - export function sed(options: string, searchRegex: RegExp, replacement: string, file: string): string; - - /** - * Reads an input string from file and performs a JavaScript replace() on the input using the given search regex and replacement string or function. Returns the new string after replacement. - * @param {string} options Available options: -i (Replace contents of 'file' in-place. Note that no backups will be created!) - * @param {string} searchRegex The regular expression to use for search. - * @param {string} replacement The replacement. - * @param {string} file The file to process. - * @return {string} The new string after replacement. - */ - export function sed(options: string, searchRegex: string, replacement: string, file: string): string; - - /** - * Reads input string from given files and returns a string containing all lines of the file that match the given regex_filter. Wildcard * accepted. - * @param {RegExp} regex_filter The regular expression to use. - * @param {string[]} ...files The files to process. - * @return {string} Returns a string containing all lines of the file that match the given regex_filter. - */ - export function grep(regex_filter: RegExp, ...files: string[]): string; - - /** - * Reads input string from given files and returns a string containing all lines of the file that match the given regex_filter. Wildcard * accepted. - * @param {RegExp} regex_filter The regular expression to use. - * @param {string[]} ...files The files to process. - * @return {string} Returns a string containing all lines of the file that match the given regex_filter. - */ - export function grep(regex_filter: RegExp, files: string[]): string; - - /** - * Reads input string from given files and returns a string containing all lines of the file that match the given regex_filter. Wildcard * accepted. - * @param {string} options Available options: -v (Inverse the sense of the regex and print the lines not matching the criteria.) - * @param {string} regex_filter The regular expression to use. - * @param {string[]} ...files The files to process. - * @return {string} Returns a string containing all lines of the file that match the given regex_filter. - */ - export function grep(options: string, regex_filter: string, ...files: string[]): string; - - /** - * Reads input string from given files and returns a string containing all lines of the file that match the given regex_filter. Wildcard * accepted. - * @param {string} options Available options: -v (Inverse the sense of the regex and print the lines not matching the criteria.) - * @param {string} regex_filter The regular expression to use. - * @param {string[]} files The files to process. - * @return {string} Returns a string containing all lines of the file that match the given regex_filter. - */ - export function grep(options: string, regex_filter: string, files: string[]): string; - - /** - * Searches for command in the system's PATH. On Windows looks for .exe, .cmd, and .bat extensions. - * @param {string} command The command to search for. - * @return {string} Returns string containing the absolute path to the command. - */ - export function which(command: string): string; - - /** - * Prints string to stdout, and returns string with additional utility methods like .to(). - * @param {string[]} ...text The text to print. - * @return {string} Returns the string that was passed as argument. - */ - export function echo(...text: string[]): string; - - /** - * Save the current directory on the top of the directory stack and then cd to dir. With no arguments, pushd exchanges the top two directories. Returns an array of paths in the stack. - * @param {"+N"} dir Brings the Nth directory (counting from the left of the list printed by dirs, starting with zero) to the top of the list by rotating the stack. - * @return {string[]} Returns an array of paths in the stack. - */ - export function pushd(dir: "+N"): string[]; - - /** - * Save the current directory on the top of the directory stack and then cd to dir. With no arguments, pushd exchanges the top two directories. Returns an array of paths in the stack. - * @param {"-N"} dir Brings the Nth directory (counting from the right of the list printed by dirs, starting with zero) to the top of the list by rotating the stack. - * @return {string[]} Returns an array of paths in the stack. - */ - export function pushd(dir: "-N"): string[]; - - /** - * Save the current directory on the top of the directory stack and then cd to dir. With no arguments, pushd exchanges the top two directories. Returns an array of paths in the stack. - * @param {string} dir Makes the current working directory be the top of the stack, and then executes the equivalent of cd dir. - * @return {string[]} Returns an array of paths in the stack. - */ - export function pushd(dir: string): string[]; - - /** - * Save the current directory on the top of the directory stack and then cd to dir. With no arguments, pushd exchanges the top two directories. Returns an array of paths in the stack. - * @param {string} options Available options: -n (Suppresses the normal change of directory when adding directories to the stack, so that only the stack is manipulated) - * @param {"+N"} dir Brings the Nth directory (counting from the left of the list printed by dirs, starting with zero) to the top of the list by rotating the stack. - * @return {string[]} Returns an array of paths in the stack. - */ - export function pushd(options: string, dir: "+N"): string[]; - - /** - * Save the current directory on the top of the directory stack and then cd to dir. With no arguments, pushd exchanges the top two directories. Returns an array of paths in the stack. - * @param {string} options Available options: -n (Suppresses the normal change of directory when adding directories to the stack, so that only the stack is manipulated) - * @param {"-N"} dir Brings the Nth directory (counting from the right of the list printed by dirs, starting with zero) to the top of the list by rotating the stack. - * @return {string[]} Returns an array of paths in the stack. - */ - export function pushd(options: string, dir: "-N"): string[]; - - /** - * Save the current directory on the top of the directory stack and then cd to dir. With no arguments, pushd exchanges the top two directories. Returns an array of paths in the stack. - * @param {string} options Available options: -n (Suppresses the normal change of directory when adding directories to the stack, so that only the stack is manipulated) - * @param {string} dir Makes the current working directory be the top of the stack, and then executes the equivalent of cd dir. - * @return {string[]} Returns an array of paths in the stack. - */ - export function pushd(options: string, dir: string): string[]; - - /** - * When no arguments are given, popd removes the top directory from the stack and performs a cd to the new top directory. The elements are numbered from 0 starting at the first directory listed with dirs; i.e., popd is equivalent to popd +0. Returns an array of paths in the stack. - * @param {"+N"} dir Removes the Nth directory (counting from the left of the list printed by dirs), starting with zero. - * @return {string[]} Returns an array of paths in the stack. - */ - export function popd(dir: "+N"): string[]; - - /** - * When no arguments are given, popd removes the top directory from the stack and performs a cd to the new top directory. The elements are numbered from 0 starting at the first directory listed with dirs; i.e., popd is equivalent to popd +0. Returns an array of paths in the stack. - * @return {string[]} Returns an array of paths in the stack. - */ - export function popd(): string[]; - - /** - * When no arguments are given, popd removes the top directory from the stack and performs a cd to the new top directory. The elements are numbered from 0 starting at the first directory listed with dirs; i.e., popd is equivalent to popd +0. Returns an array of paths in the stack. - * @param {"-N"} dir Removes the Nth directory (counting from the right of the list printed by dirs), starting with zero. - * @return {string[]} Returns an array of paths in the stack. - */ - export function popd(dir: "-N"): string[]; - - /** - * When no arguments are given, popd removes the top directory from the stack and performs a cd to the new top directory. The elements are numbered from 0 starting at the first directory listed with dirs; i.e., popd is equivalent to popd +0. Returns an array of paths in the stack. - * @param {string} dir You can only use -N and +N. - * @return {string[]} Returns an array of paths in the stack. - */ - export function popd(dir: string): string[]; - - /** - * When no arguments are given, popd removes the top directory from the stack and performs a cd to the new top directory. The elements are numbered from 0 starting at the first directory listed with dirs; i.e., popd is equivalent to popd +0. Returns an array of paths in the stack. - * @param {string} options Available options: -n (Suppresses the normal change of directory when removing directories from the stack, so that only the stack is manipulated) - * @param {"+N"} dir Removes the Nth directory (counting from the left of the list printed by dirs), starting with zero. - * @return {string[]} Returns an array of paths in the stack. - */ - export function popd(options: string, dir: "+N"): string[]; - - /** - * When no arguments are given, popd removes the top directory from the stack and performs a cd to the new top directory. The elements are numbered from 0 starting at the first directory listed with dirs; i.e., popd is equivalent to popd +0. Returns an array of paths in the stack. - * @param {string} options Available options: -n (Suppresses the normal change of directory when removing directories from the stack, so that only the stack is manipulated) - * @param {"-N"} dir Removes the Nth directory (counting from the right of the list printed by dirs), starting with zero. - * @return {string[]} Returns an array of paths in the stack. - */ - export function popd(options: string, dir: "-N"): string[]; - - /** - * When no arguments are given, popd removes the top directory from the stack and performs a cd to the new top directory. The elements are numbered from 0 starting at the first directory listed with dirs; i.e., popd is equivalent to popd +0. Returns an array of paths in the stack. - * @param {string} options Available options: -n (Suppresses the normal change of directory when removing directories from the stack, so that only the stack is manipulated) - * @param {string} dir You can only use -N and +N. - * @return {string[]} Returns an array of paths in the stack. - */ - export function popd(options: string, dir: string): string[]; - - /** - * Clears the directory stack by deleting all of the elements. - * @param {"-c"} options Clears the directory stack by deleting all of the elements. - * @return {string[]} Returns an array of paths in the stack, or a single path if +N or -N was specified. - */ - export function dirs(options: "-c"): string[]; - - /** - * Display the list of currently remembered directories. Returns an array of paths in the stack, or a single path if +N or -N was specified. - * @param {"+N"} options Displays the Nth directory (counting from the left of the list printed by dirs when invoked without options), starting with zero. - * @return {string[]} Returns an array of paths in the stack, or a single path if +N or -N was specified. - */ - export function dirs(options: "+N"): string; - - /** - * Display the list of currently remembered directories. Returns an array of paths in the stack, or a single path if +N or -N was specified. - * @param {"-N"} options Displays the Nth directory (counting from the right of the list printed by dirs when invoked without options), starting with zero. - * @return {string[]} Returns an array of paths in the stack, or a single path if +N or -N was specified. - */ - export function dirs(options: "-N"): string; - - /** - * Display the list of currently remembered directories. Returns an array of paths in the stack, or a single path if +N or -N was specified. - * @param {string} options Available options: -c, -N, +N. You can only use those. - * @return {any} Returns an array of paths in the stack, or a single path if +N or -N was specified. - */ - export function dirs(options: string): any; - - /** - * Links source to dest. Use -f to force the link, should dest already exist. - * @param {string} source The source. - * @param {string} dest The destination. - */ - export function ln(source: string, dest: string): void; - - /** - * Links source to dest. Use -f to force the link, should dest already exist. - * @param {string} options Available options: s (symlink), f (force) - * @param {string} source The source. - * @param {string} dest The destination. - */ - export function ln(options: string, source: string, dest: string): void; - - /** - * Exits the current process with the given exit code. - * @param {number} code The exit code. - */ - export function exit(code: number): void; - - /** - * Object containing environment variables (both getter and setter). Shortcut to process.env. - */ - export var env: { [key: string]: string }; - - /** - * Executes the given command synchronously. - * @param {string} command The command to execute. - * @return {ExecOutputReturnValue} Returns an object containing the return code and output as string. - */ - export function exec(command: string): ExecOutputReturnValue; - /** - * Executes the given command synchronously. - * @param {string} command The command to execute. - * @param {ExecOptions} options Silence and synchronous options. - * @return {ExecOutputReturnValue | child.ChildProcess} Returns an object containing the return code and output as string, or if {async:true} was passed, a ChildProcess. - */ - export function exec(command: string, options: ExecOptions): ExecOutputReturnValue | child.ChildProcess; - /** - * Executes the given command synchronously. - * @param {string} command The command to execute. - * @param {ExecOptions} options Silence and synchronous options. - * @param {ExecCallback} callback Receives code and output asynchronously. - */ - export function exec(command: string, options: ExecOptions, callback: ExecCallback): child.ChildProcess; - /** - * Executes the given command synchronously. - * @param {string} command The command to execute. - * @param {ExecCallback} callback Receives code and output asynchronously. - */ - export function exec(command: string, callback: ExecCallback): child.ChildProcess; - - export interface ExecCallback { - (code: number, output: string, error?: string): any; - } - - export interface ExecOptions { - silent?: boolean; - async?: boolean; - } - - export interface ExecOutputReturnValue - { - code: number; - output: string; - } - - /** - * Alters the permissions of a file or directory by either specifying the absolute permissions in octal form or expressing the changes in symbols. This command tries to mimic the POSIX behavior as much as possible. Notable exceptions: - * - In symbolic modes, 'a-r' and '-r' are identical. No consideration is given to the umask. - * - There is no "quiet" option since default behavior is to run silent. - * @param {number} octalMode The access mode. Octal. - * @param {string} file The file to use. - */ - export function chmod(octalMode: number, file: string): void; - - /** - * Alters the permissions of a file or directory by either specifying the absolute permissions in octal form or expressing the changes in symbols. This command tries to mimic the POSIX behavior as much as possible. Notable exceptions: - * - In symbolic modes, 'a-r' and '-r' are identical. No consideration is given to the umask. - * - There is no "quiet" option since default behavior is to run silent. - * @param {string} mode The access mode. Can be an octal string or a symbolic mode string. - * @param {string} file The file to use. - */ - export function chmod(mode: string, file: string): void; - - // Non-Unix commands - - /** - * Searches and returns string containing a writeable, platform-dependent temporary directory. Follows Python's tempfile algorithm. - * @return {string} The temp file path. - */ - export function tempdir(): string; - - /** - * Tests if error occurred in the last command. - * @return {string} Returns null if no error occurred, otherwise returns string explaining the error - */ - export function error(): string; - - - - export function touch(...files: string[]): void; - export function touch(files: string[]): void; - - type TouchOptionsLiteral = "-a" | "-c" | "-m" | "-d" | "-r"; - - export function touch(options: TouchOptionsLiteral, ...files: string[]): void; - export function touch(options: TouchOptionsLiteral, files: string[]): void; - - /** - * Update the access and modification times of each FILE to the current time. A FILE argument that does not exist is created empty, unless -c is supplied - */ - type touchOptionsArray = { - '-d'?: string; - '-r'?: string; - }; - - export function touch(options: touchOptionsArray, ...files: string[]): void; - export function touch(options: touchOptionsArray, files: string[]): void; - - // Configuration - - interface ShellConfig - { - /** - * Suppresses all command output if true, except for echo() calls. Default is false. - * @type {boolean} - */ - silent: boolean; - - /** - * If true the script will die on errors. Default is false. - * @type {boolean} - */ - fatal: boolean; - } - - /** - * The shelljs configuration. - * @type {ShellConfig} - */ - export var config: ShellConfig; -} diff --git a/typings/tsd.d.ts b/typings/tsd.d.ts deleted file mode 100644 index d2841e38..00000000 --- a/typings/tsd.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// diff --git a/typings/validator/validator.d.ts b/typings/validator/validator.d.ts deleted file mode 100644 index 02e8eba7..00000000 --- a/typings/validator/validator.d.ts +++ /dev/null @@ -1,315 +0,0 @@ -// Type definitions for validator.js v5.7.0 -// Project: https://github.com/chriso/validator.js -// Definitions by: tgfjt , Ilya Mochalov , Ayman Nedjmeddine , Louy Alakkad -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -declare namespace ValidatorJS { - type AlphaLocale = "ar" | "ar-AE" | "ar-BH" | "ar-DZ" | "ar-EG" | "ar-IQ" | "ar-JO" | "ar-KW" | "ar-LB" | "ar-LY" | "ar-MA" | "ar-QA" | "ar-QM" | "ar-SA" | "ar-SD" | "ar-SY" | "ar-TN" | "ar-YE" | "cs-CZ" | "de-DE" | "en-AU" | "en-GB" | "en-HK" | "en-IN" | "en-NZ" | "en-US" | "en-ZA" | "en-ZM" | "es-ES" | "fr-FR" | "hu-HU" | "nl-NL" | "pl-PL" | "pt-BR" | "pt-PT" | "ru-RU" | "sr-RS" | "sr-RS@latin" | "tr-TR"; - type AlphanumericLocale = "ar" | "ar-AE" | "ar-BH" | "ar-DZ" | "ar-EG" | "ar-IQ" | "ar-JO" | "ar-KW" | "ar-LB" | "ar-LY" | "ar-MA" | "ar-QA" | "ar-QM" | "ar-SA" | "ar-SD" | "ar-SY" | "ar-TN" | "ar-YE" | "cs-CZ" | "de-DE" | "en-AU" | "en-GB" | "en-HK" | "en-IN" | "en-NZ" | "en-US" | "en-ZA" | "en-ZM" | "es-ES" | "fr-FR" | "fr-BE" | "hu-HU" | "nl-BE" | "nl-NL" | "pl-PL" | "pt-BR" | "pt-PT" | "ru-RU" | "sr-RS" | "sr-RS@latin" | "tr-TR"; - type MobilePhoneLocale = "ar-DZ" | "ar-SA" | "ar-SY" | "cs-CZ" | "de-DE" | "da-DK" | "el-GR" | "en-AU" | "en-GB" | "en-HK" | "en-IN" | "en-NZ" | "en-US" | "en-CA" | "en-ZA" | "en-ZM" | "es-ES" | "fi-FI" | "fr-FR" | "hu-HU" | "it-IT" | "ja-JP" | "ms-MY" | "nb-NO" | "nn-NO" | "pl-PL" | "pt-PT" | "ru-RU" | "sr-RS" | "tr-TR" | "vi-VN" | "zh-CN" | "zh-TW" - - interface ValidatorStatic { - - // ************** - // * Validators * - // ************** - - // check if the string contains the seed. - contains(str: string, elem: any): boolean; - - // check if the string matches the comparison. - equals(str: string, comparison: string): boolean; - - // check if the string is a date that's after the specified date (defaults to now). - isAfter(str: string, date?: string): boolean; - - // check if the string contains only letters (a-zA-Z). Locale is one of ['ar', 'ar-AE', 'ar-BH', 'ar-DZ', 'ar-EG', - // 'ar-IQ', 'ar-JO', 'ar-KW', 'ar-LB', 'ar-LY', 'ar-MA', 'ar-QA', 'ar-QM', 'ar-SA', 'ar-SD', 'ar-SY', 'ar-TN', 'ar-YE', - // 'cs-CZ', 'de-DE', 'en-AU', 'en-GB', 'en-HK', 'en-IN', 'en-NZ', 'en-US', 'en-ZA', 'en-ZM', 'es-ES', 'fr-FR', 'hu-HU', - // 'nl-NL', 'pl-PL', 'pt-BR', 'pt-PT', 'ru-RU', 'sr-RS', 'sr-RS@latin', 'tr-TR']) and defaults to en-US - isAlpha(str: string, locale?: AlphaLocale): boolean; - - // check if the string contains only letters and numbers. Locale is one of ['ar', 'ar-AE', 'ar-BH', 'ar-DZ', 'ar-EG', - // 'ar-IQ', 'ar-JO', 'ar-KW', 'ar-LB', 'ar-LY', 'ar-MA', 'ar-QA', 'ar-QM', 'ar-SA', 'ar-SD', 'ar-SY', 'ar-TN', 'ar-YE', - // 'cs-CZ', 'de-DE', 'en-AU', 'en-GB', 'en-HK', 'en-IN', 'en-NZ', 'en-US', 'en-ZA', 'en-ZM', 'es-ES', 'fr-FR', 'hu-HU', - // 'nl-NL', 'pl-PL', 'pt-BR', 'pt-PT', 'ru-RU', 'sr-RS', 'sr-RS@latin', 'tr-TR']) and defaults to en-US - isAlphanumeric(str: string, locale?: AlphanumericLocale): boolean; - - // check if the string contains ASCII chars only. - isAscii(str: string): boolean; - - // check if a string is base64 encoded. - isBase64(str: string): boolean; - - // check if the string is a date that's before the specified date. - isBefore(str: string, date?: string): boolean; - - // check if a string is a boolean. - isBoolean(str: string): boolean; - - // check if the string's length (in bytes) falls in a range. - isByteLength(str: string, options: IsByteLengthOptions): boolean; - isByteLength(str: string, min: number, max?: number): boolean; - - // check if the string is a credit card. - isCreditCard(str: string): boolean; - - // check if the string is a valid currency amount. - isCurrency(str: string, options?: IsCurrencyOptions): boolean; - - // check if the string is a data uri format (https://developer.mozilla.org/en-US/docs/Web/HTTP/data_URIs) - isDataURI(str: string): boolean; - - // check if the string is a date. - isDate(str: string): boolean; - - // check if the string represents a decimal number, such as 0.1, .3, 1.1, 1.00003, 4.0, etc. - isDecimal(str: string): boolean; - - // check if the string is a number that's divisible by another. - isDivisibleBy(str: string, number: number): boolean; - - // check if the string is an email. - isEmail(str: string, options?: IsEmailOptions): boolean; - - // check if the string is a fully qualified domain name (e.g. domain.com). - isFQDN(str: string, options?: IsFQDNOptions): boolean; - - // check if the string is a float. - isFloat(str: string, options?: IsFloatOptions): boolean; - - // check if the string contains any full-width chars. - isFullWidth(str: string): boolean; - - // check if the string contains any half-width chars. - isHalfWidth(str: string): boolean; - - // check if the string is a hexadecimal color. - isHexColor(str: string): boolean; - - // check if the string is a hexadecimal number. - isHexadecimal(str: string): boolean; - - // check if the string is an IP (version 4 or 6). - isIP(str: string, version?: number): boolean; - - // check if the string is an ISBN (version 10 or 13). - isISBN(str: string, version?: number): boolean; - - // check if the string is an ISIN (https://en.wikipedia.org/wiki/International_Securities_Identification_Number) - // (stock/security identifier). - isISIN(str: string): boolean; - - // check if the string is a valid ISO 8601 (https://en.wikipedia.org/wiki/ISO_8601) date. - isISO8601(str: string): boolean; - - // check if the string is in a array of allowed values. - isIn(str: string, values: any[]): boolean; - - // check if the string is an integer. - isInt(str: string, options?: IsIntOptions): boolean; - - // check if the string is valid JSON (note: uses JSON.parse). - isJSON(str: string): boolean; - - // check if the string's length falls in a range. - // Note: this function takes into account surrogate pairs. - isLength(str: string, options: IsLengthOptions): boolean; - isLength(str: string, min: number, max?: number): boolean; - - // check if the string is lowercase. - isLowercase(str: string): boolean; - - // check if the string is a MAC address. - isMACAddress(str: string): boolean; - - // check if the string is a MD5 hash. - isMD5(str: string): boolean; - - // check if the string is a mobile phone number, (locale is one of - // ['ar-DZ', 'ar-SA', 'ar-SY', 'cs-CZ', 'de-DE', 'da-DK', 'el-GR', 'en-AU', 'en-GB', 'en-HK', - // 'en-IN', 'en-NZ', 'en-US', 'en-CA', 'en-ZA', 'en-ZM', 'es-ES', 'fi-FI', 'fr-FR', 'hu-HU', - // 'it-IT', 'ja-JP', 'ms-MY', 'nb-NO', 'nn-NO', 'pl-PL', 'pt-PT', 'ru-RU', 'sr-RS', 'tr-TR', - // 'vi-VN', 'zh-CN', 'zh-TW']). - isMobilePhone(str: string, locale: MobilePhoneLocale): boolean; - - // check if the string is a valid hex-encoded representation of a MongoDB ObjectId - // (http://docs.mongodb.org/manual/reference/object-id/). - isMongoId(str: string): boolean; - - // check if the string contains one or more multibyte chars. - isMultibyte(str: string): boolean; - - // check if the string is null. - isNull(str: string): boolean; - - // check if the string contains only numbers. - isNumeric(str: string): boolean; - - // check if the string contains any surrogate pairs chars. - isSurrogatePair(str: string): boolean; - - // check if the string is an URL. - isURL(str: string, options?: IsURLOptions): boolean; - - // check if the string is a UUID. Must be one of ['3', '4', '5', 'all'], default is all. - isUUID(str: string, version?: string | number): boolean; - - // check if the string is uppercase. - isUppercase(str: string): boolean; - - // check if the string contains a mixture of full and half-width chars. - isVariableWidth(str: string): boolean; - - // checks characters if they appear in the whitelist. - isWhitelisted(str: string, chars: string | string[]): boolean; - - // check if string matches the pattern. - matches(str: string, pattern: RegExp | string, modifiers?: string): boolean; - - // ************** - // * Sanitizers * - // ************** - - // remove characters that appear in the blacklist. The characters are used in a RegExp and so you will need - // to escape some chars, e.g. blacklist(input, '\\[\\]'). - blacklist(input: string, chars: string): string; - - // replace <, >, &, ', " and / with HTML entities. - escape(input: string): string; - - // replaces HTML encoded entities with <, >, &, ', " and /. - unescape(input: string): string; - - // trim characters from the left-side of the input. - ltrim(input: string, chars?: string): string; - - // canonicalize an email address. - normalizeEmail(email: string, options?: NormalizeEmailOptions): string; - - // trim characters from the right-side of the input. - rtrim(input: string, chars?: string): string; - - // remove characters with a numerical value < 32 and 127, mostly control characters. If keep_new_lines is true, - // newline characters are preserved (\n and \r, hex 0xA and 0xD). Unicode-safe in JavaScript. - stripLow(input: string, keep_new_lines?: boolean): string; - - // convert the input to a boolean. Everything except for '0', 'false' and '' returns true. In strict mode only '1' - // and 'true' return true. - toBoolean(input: string, strict?: boolean): boolean; - - // convert the input to a date, or null if the input is not a date. - toDate(input: string): Date; // Date or null - - // convert the input to a float, or NaN if the input is not a float. - toFloat(input: string): number; // number or NaN - - // convert the input to an integer, or NaN if the input is not an integer. - toInt(input: string, radix?: number): number; // number or NaN - - // trim characters (whitespace by default) from both sides of the input. - trim(input: string, chars?: string): string; - - // remove characters that do not appear in the whitelist. The characters are used in a RegExp and so you will - // need to escape some chars, e.g. whitelist(input, '\\[\\]'). - whitelist(input: string, chars: string): string; - - toString(input: any | any[]): string; - - version: string; - - // ************** - // * Extensions * - // ************** - - // add your own validators. - // Note: that the first argument will be automatically coerced to a string. - extend(name: string, fn: T): void; - } - - // options for IsByteLength - interface IsByteLengthOptions { - min?: number; - max?: number; - } - - // options for IsCurrency - interface IsCurrencyOptions { - symbol?: string; - require_symbol?: boolean; - allow_space_after_symbol?: boolean; - symbol_after_digits?: boolean; - allow_negatives?: boolean; - parens_for_negatives?: boolean; - negative_sign_before_digits?: boolean; - negative_sign_after_digits?: boolean; - allow_negative_sign_placeholder?: boolean; - thousands_separator?: string; - decimal_separator?: string; - allow_space_after_digits?: boolean; - } - - // options for isEmail - interface IsEmailOptions { - allow_display_name?: boolean; - allow_utf8_local_part?: boolean; - require_tld?: boolean; - } - - // options for isFQDN - interface IsFQDNOptions { - require_tld?: boolean; - allow_underscores?: boolean; - allow_trailing_dot?: boolean; - } - - // options for IsFloat - interface IsFloatOptions { - min?: number; - max?: number; - } - - // options for IsInt - interface IsIntOptions { - min?: number; - max?: number; - } - - // options for IsLength - interface IsLengthOptions { - min?: number; - max?: number; - } - - // options for isURL - interface IsURLOptions { - protocols?: string[]; - require_tld?: boolean; - require_protocol?: boolean; - require_host: boolean; - require_valid_protocol?: boolean; - allow_underscores?: boolean; - host_whitelist?: (string | RegExp)[]; - host_blacklist?: (string | RegExp)[]; - allow_trailing_dot?: boolean; - allow_protocol_relative_urls?: boolean; - } - - // options for normalizeEmail - interface NormalizeEmailOptions { - lowercase?: boolean; - remove_dots?: boolean; - remove_extension?: boolean; - } -} - -declare module "validator" { - const validator: ValidatorJS.ValidatorStatic; - export = validator; -} - -// deprecated interfaces for backward compatibility, please use ValidatorJS.* instead the ones -interface IValidatorStatic extends ValidatorJS.ValidatorStatic { } -interface IURLoptions extends ValidatorJS.IsURLOptions { } -interface IFQDNoptions extends ValidatorJS.IsFQDNOptions { } -interface IEmailoptions extends ValidatorJS.NormalizeEmailOptions { } diff --git a/typings/winreg/winreg.d.ts b/typings/winreg/winreg.d.ts deleted file mode 100644 index 3860bc23..00000000 --- a/typings/winreg/winreg.d.ts +++ /dev/null @@ -1,338 +0,0 @@ -// Type definitions for Winreg v1.2.0 -// Project: http://fresc81.github.io/node-winreg/ -// Definitions by: RX14 , BobBuehler -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -declare var Winreg: WinregStatic; - -interface WinregStatic { - /** - * Creates a registry object, which provides access to a single registry key. - * Note: This class is returned by a call to ```require('winreg')```. - * - * @public - * @class - * - * @param {@link Options} options - the options - * - * @example - * var Registry = require('winreg') - * , autoStartCurrentUser = new Registry({ - * hive: Registry.HKCU, - * key: '\\Software\\Microsoft\\Windows\\CurrentVersion\\Run' - * }); - */ - new (options: Winreg.Options): Winreg.Registry; - - /** - * Registry hive key HKEY_LOCAL_MACHINE. - * Note: For writing to this hive your program has to run with admin privileges. - */ - HKLM: string; - - /** - * Registry hive key HKEY_CURRENT_USER. - */ - HKCU: string; - - /** - * Registry hive key HKEY_CLASSES_ROOT. - * Note: For writing to this hive your program has to run with admin privileges. - */ - HKCR: string; - - /** - * Registry hive key HKEY_USERS. - * Note: For writing to this hive your program has to run with admin privileges. - */ - HKU: string; - - /** - * Registry hive key HKEY_CURRENT_CONFIG. - * Note: For writing to this hive your program has to run with admin privileges. - */ - HKCC: string; - - /** - * Collection of available registry hive keys. - */ - HIVES: Array; - - /** - * Registry value type STRING. - * - * Values of this type contain a string. - */ - REG_SZ: string; - - /** - * Registry value type MULTILINE_STRING. - * - * Values of this type contain a multiline string. - */ - REG_MULTI_SZ: string; - - /** - * Registry value type EXPANDABLE_STRING. - * - * Values of this type contain an expandable string. - */ - REG_EXPAND_SZ: string; - - /** - * Registry value type DOUBLE_WORD. - * - * Values of this type contain a double word (32 bit integer). - */ - REG_DWORD: string; - - /** - * Registry value type QUAD_WORD. - * - * Values of this type contain a quad word (64 bit integer). - */ - REG_QWORD: string; - - /** - * Registry value type BINARY. - * - * Values of this type contain a binary value. - */ - REG_BINARY: string; - - /** - * Registry value type UNKNOWN. - * - * Values of this type contain a value of an unknown type. - */ - REG_NONE: string; - - /** - * Collection of available registry value types. - */ - REG_TYPES: Array; - - /** - * The name of the default value. May be used instead of the empty string literal for better readability. - */ - DEFAULT_VALUE: string; -} - -declare namespace Winreg { - export interface Options { - /** - * Optional hostname, must start with '\\' sequence. - */ - host?: string; - - /** - * Optional hive ID, default is HKLM. - */ - hive?: string; - - /** - * Optional key, default is the root key. - */ - key?: string; - - /** - * Optional registry hive architecture ('x86' or 'x64'; only valid on Windows 64 Bit Operating Systems). - */ - arch?: string; - } - - /** - * A registry object, which provides access to a single registry key. - */ - export interface Registry { - /** - * The hostname. - * @readonly - */ - host: string; - - /** - * The hive id. - * @readonly - */ - hive: string; - - /** - * The registry key name. - * @readonly - */ - key: string; - - /** - * The full path to the registry key. - * @readonly - */ - path: string; - - /** - * The registry hive architecture ('x86' or 'x64'). - * @readonly - */ - arch: string; - - /** - * Creates a new {@link Registry} instance that points to the parent registry key. - * @readonly - */ - parent: Registry; - - /** - * Retrieve all values from this registry key. - * @param {valuesCallback} cb - callback function - * @param {error=} cb.err - error object or null if successful - * @param {array=} cb.items - an array of {@link RegistryItem} objects - * @returns {Registry} this registry key object - */ - values(cb: (err: Error, result: Array) => void): Registry; - - /** - * Retrieve all subkeys from this registry key. - * @param {function (err, items)} cb - callback function - * @param {error=} cb.err - error object or null if successful - * @param {array=} cb.items - an array of {@link Registry} objects - * @returns {Registry} this registry key object - */ - keys(cb: (err: Error, result: Array) => void): Registry; - - /** - * Gets a named value from this registry key. - * @param {string} name - the value name, use {@link Registry.DEFAULT_VALUE} or an empty string for the default value - * @param {function (err, item)} cb - callback function - * @param {error=} cb.err - error object or null if successful - * @param {RegistryItem=} cb.item - the retrieved registry item - * @returns {Registry} this registry key object - */ - get(name: string, cb: (err: Error, result: Winreg.RegistryItem) => void): Registry; - - /** - * Sets a named value in this registry key, overwriting an already existing value. - * @param {string} name - the value name, use {@link Registry.DEFAULT_VALUE} or an empty string for the default value - * @param {string} type - the value type - * @param {string} value - the value - * @param {function (err)} cb - callback function - * @param {error=} cb.err - error object or null if successful - * @returns {Registry} this registry key object - */ - set(name: string, type: string, value: string, cb: (err: Error) => void): Registry; - - /** - * Remove a named value from this registry key. If name is empty, sets the default value of this key. - * Note: This key must be already existing. - * @param {string} name - the value name, use {@link Registry.DEFAULT_VALUE} or an empty string for the default value - * @param {function (err)} cb - callback function - * @param {error=} cb.err - error object or null if successful - * @returns {Registry} this registry key object - */ - remove(name: string, cb: (err: Error) => void): Registry; - - /** - * Remove all subkeys and values (including the default value) from this registry key. - * @param {function (err)} cb - callback function - * @param {error=} cb.err - error object or null if successful - * @returns {Registry} this registry key object - */ - clear(cb: (err: Error) => void): Registry; - - /** - * Alias for the clear method to keep it backward compatible. - * @method - * @deprecated Use {@link Registry#clear} or {@link Registry#destroy} in favour of this method. - * @param {function (err)} cb - callback function - * @param {error=} cb.err - error object or null if successful - * @returns {Registry} this registry key object - */ - erase(cb: (err: Error) => void): Registry; - - /** - * Delete this key and all subkeys from the registry. - * @param {function (err)} cb - callback function - * @param {error=} cb.err - error object or null if successful - * @returns {Registry} this registry key object - */ - destroy(cb: (err: Error) => void): Registry; - - /** - * Create this registry key. Note that this is a no-op if the key already exists. - * @param {function (err)} cb - callback function - * @param {error=} cb.err - error object or null if successful - * @returns {Registry} this registry key object - */ - create(cb: (err: Error) => void): Registry; - - /** - * Checks if this key already exists. - * @param {function (err, exists)} cb - callback function - * @param {error=} cb.err - error object or null if successful - * @param {boolean=} cb.exists - true if a registry key with this name already exists - * @returns {Registry} this registry key object - */ - keyExists(cb: (err: Error, exists: boolean) => void): Registry; - - /** - * Checks if a value with the given name already exists within this key. - * @param {string} name - the value name, use {@link Registry.DEFAULT_VALUE} or an empty string for the default value - * @param {function (err, exists)} cb - callback function - * @param {error=} cb.err - error object or null if successful - * @param {boolean=} cb.exists - true if a value with the given name was found in this key - * @returns {Registry} this registry key object - */ - valueExists(name: string, cb: (err: Error, exists: boolean) => void): Registry; - } - - /** - * A single registry value record. - * Objects of this type are created internally and returned by methods of {@link Registry} objects. - */ - export interface RegistryItem { - /** - * The hostname. - * @readonly - */ - host: string; - - /** - * The hive id. - * @readonly - */ - hive: string; - - /** - * The registry key. - * @readonly - */ - key: string; - - /** - * The value name. - * @readonly - */ - name: string; - - /** - * The value type. - * @readonly - */ - type: string; - - /** - * The value. - * @readonly - */ - value: string; - - /** - * The hive architecture. - * @readonly - */ - arch: string; - } -} - -declare module "winreg" { - export = Winreg; -} From 528c5666efed8c376c87f30720cfa123a7b83350 Mon Sep 17 00:00:00 2001 From: grawcho Date: Mon, 3 Apr 2017 14:39:13 +0300 Subject: [PATCH 129/235] fix archiver typing --- typings/archiver/archiver.d.ts | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/typings/archiver/archiver.d.ts b/typings/archiver/archiver.d.ts index 33b26062..6748c257 100644 --- a/typings/archiver/archiver.d.ts +++ b/typings/archiver/archiver.d.ts @@ -1,7 +1,7 @@ // Type definitions for archiver v0.15.0 // Project: https://github.com/archiverjs/node-archiver // Definitions by: Esri -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// Definitions: https://github.com/borisyankov/DefinitelyTyped /* =================== USAGE =================== @@ -13,31 +13,31 @@ =============================================== */ -/// + declare module "archiver" { import * as FS from 'fs'; - import * as STREAM from 'stream'; - + import * as Stream from "stream"; + interface nameInterface { name?: string; } - - interface Archiver extends STREAM.Transform { + + interface Archiver extends Stream.Transform { pipe(writeStream: FS.WriteStream): void; - append(source: FS.ReadStream | Buffer | string, name: nameInterface): void; + append(readStream: FS.ReadStream, name: nameInterface): void; finalize(): void; directory(dirpath: string, destpath?: string | boolean, data?: any) } - + interface Options { - + } - + function archiver(format: string, options?: Options): Archiver; - + namespace archiver { function create(format: string, options?: Options): Archiver; } - + export = archiver; -} +} \ No newline at end of file From 50866fedc33ccf5b375de911b5809320aea18bc9 Mon Sep 17 00:00:00 2001 From: grawcho Date: Mon, 3 Apr 2017 14:44:22 +0300 Subject: [PATCH 130/235] fix compilation errors --- app/exec/build/definitions/export.ts | 2 +- app/exec/build/queue.ts | 2 +- app/exec/build/templates/export.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/exec/build/definitions/export.ts b/app/exec/build/definitions/export.ts index 066a2dc0..4e3f9a15 100644 --- a/app/exec/build/definitions/export.ts +++ b/app/exec/build/definitions/export.ts @@ -52,7 +52,7 @@ export class ExportDefinition extends TfCommandPromise.reject(new Error("Build definition file already exists")); + return null//Promise.reject(new Error("Build definition file already exists")); } fs.writeFileSync(defpath, JSON.stringify(definition, null, ' ')); return definition; diff --git a/app/exec/build/queue.ts b/app/exec/build/queue.ts index 55724d93..327a2d79 100644 --- a/app/exec/build/queue.ts +++ b/app/exec/build/queue.ts @@ -116,7 +116,7 @@ export class BuildQueue extends buildBase.BuildBasePromise.reject(new Error("Build template file already exists")); + return null//Promise.reject(new Error("Build template file already exists")); } fs.writeFileSync(tempPath.toString(), JSON.stringify(template, null, ' ')); return template; From 89b3f158b87b21c3dd075ecc28410644dce797dd Mon Sep 17 00:00:00 2001 From: sfeldman Date: Mon, 3 Apr 2017 15:06:23 +0300 Subject: [PATCH 131/235] remove uuid typing --- typings/uuid/uuid.d.ts | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 typings/uuid/uuid.d.ts diff --git a/typings/uuid/uuid.d.ts b/typings/uuid/uuid.d.ts deleted file mode 100644 index b178919f..00000000 --- a/typings/uuid/uuid.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -declare module 'uuid' { - function current(options?: any, buf?: Buffer, offset?: number): string; - - module current { - export function v1(options?: any): string; - export function v1(options: any, buf: Buffer, offset?: number): Buffer; - - export function v4(options?: any): string; - export function v4(options: any, buf: Buffer, offset?: number): Buffer; - - export function parse(str: string, buf?: Buffer, offset?: number): Buffer; - export function unparse(buf: Buffer, offset?: number): string; - } - export = current; -} From acbd7c2d1d69edbfc74075bc5dd9ed798d30cc60 Mon Sep 17 00:00:00 2001 From: sfeldman Date: Tue, 4 Apr 2017 09:19:09 +0300 Subject: [PATCH 132/235] revert latest VSTS API 0.4.2 - upstream sync --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c5ea2ecf..fbdeb332 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "tracer": "0.7.4", "uuid": "^3.0.1", "validator": "^3.43.0", - "vso-node-api": "^5.0.0", + "vso-node-api": "^5.1.2", "winreg": "0.0.12", "xml2js": "^0.4.16" }, From cba67b7bc00574f329ab333729ad86a112a51317 Mon Sep 17 00:00:00 2001 From: grawcho Date: Tue, 4 Apr 2017 09:21:51 +0300 Subject: [PATCH 133/235] manually merge upstream changes to extention lib publish --- app/exec/extension/_lib/publish.ts | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/app/exec/extension/_lib/publish.ts b/app/exec/extension/_lib/publish.ts index 5b396591..fae28692 100644 --- a/app/exec/extension/_lib/publish.ts +++ b/app/exec/extension/_lib/publish.ts @@ -43,18 +43,19 @@ export class GalleryBase { this.vsixInfoPromise = GalleryBase.getExtInfo({ extensionId: this.settings.extensionId, publisher: this.settings.publisher, - vsixPath: this.settings.vsixPath}); + vsixPath: this.settings.vsixPath + }); } return this.vsixInfoPromise; } - public static getExtInfo(info: {extensionId?: string, publisher?: string, vsixPath?: string}): Promise { + public static getExtInfo(info: { extensionId?: string, publisher?: string, vsixPath?: string }): Promise { let promise: Promise; if (info.extensionId && info.publisher) { - promise = Q.resolve({id: info.extensionId, publisher: info.publisher, version: null}); + promise = Q.resolve({ id: info.extensionId, publisher: info.publisher, version: null }); } else { promise = Q.Promise((resolve, reject, notify) => { - fs.readFile(info.vsixPath, function(err, data) { + fs.readFile(info.vsixPath, function (err, data) { if (err) reject(err); trace.debug("Read vsix as zip... Size (bytes): %s", data.length.toString()); try { @@ -76,7 +77,7 @@ export class GalleryBase { let extensionPublisher: string = info.publisher || _.get(vsixManifestAsJson, "PackageManifest.Metadata[0].Identity[0].$.Publisher"); let extensionVersion: string = _.get(vsixManifestAsJson, "PackageManifest.Metadata[0].Identity[0].$.Version"); if (extensionId && extensionPublisher) { - return {id: extensionId, publisher: extensionPublisher, version: extensionVersion}; + return { id: extensionId, publisher: extensionPublisher, version: extensionVersion }; } else { throw "Could not locate both the extension id and publisher in vsix manfiest! Ensure your manifest includes both a namespace and a publisher property, or specify the necessary --publisher and/or --extension options."; } @@ -166,12 +167,12 @@ export class SharingManager extends GalleryBase { extInfo.id, null, GalleryInterfaces.ExtensionQueryFlags.IncludeVersions | - GalleryInterfaces.ExtensionQueryFlags.IncludeFiles | - GalleryInterfaces.ExtensionQueryFlags.IncludeCategoryAndTags | - GalleryInterfaces.ExtensionQueryFlags.IncludeSharedAccounts).then((extension) => { + GalleryInterfaces.ExtensionQueryFlags.IncludeFiles | + GalleryInterfaces.ExtensionQueryFlags.IncludeCategoryAndTags | + GalleryInterfaces.ExtensionQueryFlags.IncludeSharedAccounts).then((extension) => { return extension; - }).catch(errHandler.httpErr); + }).catch(errHandler.httpErr); }); } } @@ -191,7 +192,7 @@ export class PackagePublisher extends GalleryBase { return extInfo; } return extInfo; - }).catch<{id: string, publisher: string, version: string}>(() => extInfo); + }).catch<{ id: string, publisher: string, version: string }>(() => extInfo); }); } From 260884f81794040e776321c9fa7df84609b1351e Mon Sep 17 00:00:00 2001 From: sfeldman Date: Tue, 4 Apr 2017 12:14:23 +0300 Subject: [PATCH 134/235] add additional options to build doc --- docs/builds.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/builds.md b/docs/builds.md index 6d99c8be..95eec949 100644 --- a/docs/builds.md +++ b/docs/builds.md @@ -15,6 +15,17 @@ OR --definition-name - The name of the build definition to build against. ``` +```txt +Additional optional Parameters + --parameters - Build process Parameters JSON file / string. + --priority - Queue a build with priority 1 [High] - 5 [Low] default = 3 [Normal]). + --version - the source version for the queued build. + --shelveset - the shelveset to queue in the build. + --demands - Demands string [semi-colon separator] for Queued Build [key / key -equals value]. + --wait - wait for the triggered build + --timeout - Maximum time to wait for the build to complete (in seconds). +``` + ####Example ```bash ~$ tfx build queue --project MyProject --definition-name TestDefinition From 34048b5dcf41437fd9e8086756d8a3011c06db5e Mon Sep 17 00:00:00 2001 From: grawcho Date: Tue, 4 Apr 2017 13:29:14 +0300 Subject: [PATCH 135/235] fix line streightning in builds.md --- docs/builds.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/builds.md b/docs/builds.md index 95eec949..4c14dad3 100644 --- a/docs/builds.md +++ b/docs/builds.md @@ -17,13 +17,13 @@ OR ```txt Additional optional Parameters - --parameters - Build process Parameters JSON file / string. - --priority - Queue a build with priority 1 [High] - 5 [Low] default = 3 [Normal]). - --version - the source version for the queued build. - --shelveset - the shelveset to queue in the build. - --demands - Demands string [semi-colon separator] for Queued Build [key / key -equals value]. - --wait - wait for the triggered build - --timeout - Maximum time to wait for the build to complete (in seconds). + --parameters - Build process Parameters JSON file / string. + --priority - Queue a build with priority 1 [High] - 5 [Low] default = 3 [Normal]). + --version - the source version for the queued build. + --shelveset - the shelveset to queue in the build. + --demands - Demands string [semi-colon separator] for Queued Build [key / key -equals value]. + --wait - wait for the triggered build + --timeout - Maximum time to wait for the build to complete (in seconds). ``` ####Example From efb84964efaa6750e94ba11a7e87c03e663fbe59 Mon Sep 17 00:00:00 2001 From: sfeldman Date: Tue, 4 Apr 2017 13:41:17 +0300 Subject: [PATCH 136/235] add details to builds.md and sudo -E to README.md --- README.md | 2 +- docs/builds.md | 40 +++++++++++++++++++++++++++++++++++----- 2 files changed, 36 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 0a41055c..35ec52da 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ First, download and install [Node.js](http://nodejs.org) 4.0.x or later and NPM ### Linux/OSX ```bash -sudo npm install -g tfx-cli +sudo -E npm install -g tfx-cli ``` ### Windows diff --git a/docs/builds.md b/docs/builds.md index 4c14dad3..3101fdc9 100644 --- a/docs/builds.md +++ b/docs/builds.md @@ -17,13 +17,13 @@ OR ```txt Additional optional Parameters - --parameters - Build process Parameters JSON file / string. + --parameters - Build process Parameters JSON file / string. --priority - Queue a build with priority 1 [High] - 5 [Low] default = 3 [Normal]). - --version - the source version for the queued build. + --version - the source version for the queued build. --shelveset - the shelveset to queue in the build. - --demands - Demands string [semi-colon separator] for Queued Build [key / key -equals value]. - --wait - wait for the triggered build - --timeout - Maximum time to wait for the build to complete (in seconds). + --demands - Demands string [semi-colon separator] for Queued Build [key / key -equals value]. + --wait - wait for the triggered build + --timeout - Maximum time to wait for the build to complete (in seconds). ``` ####Example @@ -62,6 +62,36 @@ status : NotStarted queue time : Fri Aug 21 2015 15:07:49 GMT-0400 (Eastern Daylight Time) ``` +## Details + +####Options +```txt + --project, -p Project name. + --build-id Identifies a particular Build. +``` + +####Example +```bash +$tfx build details --project MyProject --build-id MyBuildID + +Copyright Microsoft Corporation + +id : MyBuildID +number (name) : MyBuildNumber +definition name : MyDefinition +definition id : MyDefinitionID +requested by : Owner +status : InProgress +result : unknown +queue time : 2017-04-04T10:09:20.367Z +start time : 2017-04-04T10:09:27.084Z +finish time : in progress +quality : +reason : Manual +version : Changeset / Commit ID +API URL : https://MyServerURL/tfs/MyProject/BuildAPI_Guid/_apis/build/Builds/BuildID +``` + ## List Queries for a list of builds. From 4647361d5cf9675ab3cc604e8fc55606a3d96038 Mon Sep 17 00:00:00 2001 From: sfeldman Date: Tue, 4 Apr 2017 13:44:31 +0300 Subject: [PATCH 137/235] add chmod to README.md on build from sources option --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 35ec52da..15680895 100644 --- a/README.md +++ b/README.md @@ -133,11 +133,11 @@ This project has adopted the [Microsoft Open Source Code of Conduct](https://ope ```bash npm run build `(from the repository root)` ``` -`link the executable` - +`link the executable (and make executable)` ### Linux (bash) ```bash sudo ln -s \app.js /usr/bin/tfx +sudo chmod 755 /usr/bin/tfx ``` ### windows replace the content of `%appdata%\npm\tfx.cmd` with the following: From a7fad3571c977e0f7a7cf585f71b6a6615956c38 Mon Sep 17 00:00:00 2001 From: sfeldman Date: Tue, 4 Apr 2017 13:45:53 +0300 Subject: [PATCH 138/235] add npm update to README.md on build from sources option --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 15680895..601162ed 100644 --- a/README.md +++ b/README.md @@ -151,7 +151,7 @@ replace the content of `%appdata%\npm\tfx.cmd` with the following: ) ``` ### additional node modules -`install the following modules (this may need to happen befor compilation)` +`run "npm update" or install the following modules (this may need to happen befor compilation)` ```bash npm install archiver colors graceful-fs gulp-filter gulp-mocha gulp-tsb gulp-util is-utf8 pug jszip node-uuid prompt q readable-stream ts-promise typescript unique-stream user-home validator vso-node-api xml2js del os-homedir copy-paste shelljs lodash minimatch@3.0.2 pretty-hrtime liftoff tildify interpret v8flags minimist onecolor winreg glob json-in-place mkdirp ``` From 08875c7fb48aba0742106230103dcc3f96f6bd04 Mon Sep 17 00:00:00 2001 From: sfeldman Date: Tue, 4 Apr 2017 13:49:28 +0300 Subject: [PATCH 139/235] add npm update to README.md on build from sources option --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 601162ed..01460316 100644 --- a/README.md +++ b/README.md @@ -129,8 +129,9 @@ This project has adopted the [Microsoft Open Source Code of Conduct](https://ope ## Manual installation (from sources) * refer to installation for your OS (and follow the installation steps). * clone the repository. -* to compile the sources run: +* to compile the sources run (see additional node modules): ```bash +npm update npm run build `(from the repository root)` ``` `link the executable (and make executable)` @@ -151,7 +152,7 @@ replace the content of `%appdata%\npm\tfx.cmd` with the following: ) ``` ### additional node modules -`run "npm update" or install the following modules (this may need to happen befor compilation)` +`run "npm outdated / update" to resolve modules dependecy or install the following modules (this may need to happen befor compilation)` ```bash npm install archiver colors graceful-fs gulp-filter gulp-mocha gulp-tsb gulp-util is-utf8 pug jszip node-uuid prompt q readable-stream ts-promise typescript unique-stream user-home validator vso-node-api xml2js del os-homedir copy-paste shelljs lodash minimatch@3.0.2 pretty-hrtime liftoff tildify interpret v8flags minimist onecolor winreg glob json-in-place mkdirp ``` From 8a9f9eaf8df2104c91f4dde5e369e9b41a9983e7 Mon Sep 17 00:00:00 2001 From: grawcho Date: Tue, 4 Apr 2017 14:10:21 +0300 Subject: [PATCH 140/235] fix build keep --- app/exec/build/keep.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/exec/build/keep.ts b/app/exec/build/keep.ts index 8dda2a5b..9d3d1ad1 100644 --- a/app/exec/build/keep.ts +++ b/app/exec/build/keep.ts @@ -21,7 +21,7 @@ export class BuildKeep extends buildBase.BuildBase { + public exec(): Promise { trace.debug("keep-build.exec"); var buildapi: buildClient.IBuildApi = this.webApi.getBuildApi(); return this.commandArgs.project.val().then((project) => { @@ -46,6 +46,7 @@ export class BuildKeep extends buildBase.BuildBase Date: Tue, 4 Apr 2017 14:17:44 +0300 Subject: [PATCH 141/235] fix build delete to disallow deletion of retained builds --- app/exec/build/delete.ts | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/app/exec/build/delete.ts b/app/exec/build/delete.ts index bfc22f2e..690e1d20 100644 --- a/app/exec/build/delete.ts +++ b/app/exec/build/delete.ts @@ -40,12 +40,17 @@ export class BuildDelete extends buildBase.BuildBase { - build.deleted = true; - if (build.deleted) { - trace.info("build deleted") - } else { - trace.error("failed to delete") - } + if (!build.keepForever) { + build.deleted = true; + if (build.deleted) { + trace.info("build deleted") + } else { + trace.error("failed to delete") + } + } else { + trace.warn("build is marked for retention"); + } + }); } } \ No newline at end of file From 4603e6e45145822f220f6862467e9b0664c52d4c Mon Sep 17 00:00:00 2001 From: grawcho Date: Tue, 4 Apr 2017 14:33:19 +0300 Subject: [PATCH 142/235] fix build delete --- app/exec/build/delete.ts | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/app/exec/build/delete.ts b/app/exec/build/delete.ts index 690e1d20..4897d97c 100644 --- a/app/exec/build/delete.ts +++ b/app/exec/build/delete.ts @@ -40,17 +40,16 @@ export class BuildDelete extends buildBase.BuildBase { - if (!build.keepForever) { - build.deleted = true; - if (build.deleted) { - trace.info("build deleted") + if (!build.keepForever) { + build.deleted = true; + if (build.deleted) { + trace.info("build deleted") + } else { + trace.error("failed to delete") + } } else { - trace.error("failed to delete") + trace.warn("build is marked for retention"); } - } else { - trace.warn("build is marked for retention"); - } - - }); + }); } } \ No newline at end of file From 7de0870c062e2ebb61e8354d085f5f4e19397e96 Mon Sep 17 00:00:00 2001 From: "Shpigelman, StasX" Date: Sun, 30 Apr 2017 13:57:59 +0300 Subject: [PATCH 143/235] Add git controls --- app/exec/build/tasks/_resources/icon.png | Bin 2581 -> 2580 bytes app/exec/code/default.ts | 30 +++++ app/exec/code/git/default.ts | 19 +++ app/exec/code/git/pullrequest.ts | 142 +++++++++++++++++++++++ docs/basicAuthEnabled.png | Bin 70329 -> 70327 bytes docs/configureBasicAuthFeature.png | Bin 66532 -> 66531 bytes docs/help-screen.png | Bin 15528 -> 15527 bytes docs/tfsAuth.png | Bin 115775 -> 115774 bytes 8 files changed, 191 insertions(+) create mode 100644 app/exec/code/default.ts create mode 100644 app/exec/code/git/default.ts create mode 100644 app/exec/code/git/pullrequest.ts diff --git a/app/exec/build/tasks/_resources/icon.png b/app/exec/build/tasks/_resources/icon.png index 2a4c1dde941b25f71be7d14f060b26dbaa185ba6..45fbc0d51ad92e6bc15561c91a128224b93fa839 100644 GIT binary patch delta 13 UcmbO#GDU=?Gr-S%BdY)x033n?lmGw# delta 14 VcmbOtGF61NGr-TCcO#1c7XTlO1EBx_ diff --git a/app/exec/code/default.ts b/app/exec/code/default.ts new file mode 100644 index 00000000..8795d455 --- /dev/null +++ b/app/exec/code/default.ts @@ -0,0 +1,30 @@ +import { TfCommand, CoreArguments } from "../../lib/tfcommand"; +import args = require("../../lib/arguments"); + +export function getCommand(args: string[]): CodeBase { + return new CodeBase(args); +} + +export interface CodeArguments extends CoreArguments { + source: args.StringArgument; + target: args.StringArgument; + title: args.StringArgument; + repositoryName: args.StringArgument; +} + +export class CodeBase extends TfCommand { + protected serverCommand = false; + protected description = "Commands for managing source control."; + + protected setCommandArgs(): void { + super.setCommandArgs(); + + this.registerCommandArgument(["repositoryName", "-rn"], "Repository name", null, args.StringArgument); + this.registerCommandArgument(["source", "-so"], "Repository source branch name", null, args.StringArgument); + this.registerCommandArgument(["target", "-ta"], "Repository target branch name", null, args.StringArgument, null); + this.registerCommandArgument(["title", "-ti"], "Title", null, args.StringArgument, null); + } + public exec(cmd?: any): Promise { + return this.getHelp(cmd); + } +} diff --git a/app/exec/code/git/default.ts b/app/exec/code/git/default.ts new file mode 100644 index 00000000..26afbdf1 --- /dev/null +++ b/app/exec/code/git/default.ts @@ -0,0 +1,19 @@ +import { TfCommand, CoreArguments } from "../../../lib/tfcommand"; +import args = require("../../../lib/arguments"); + +export function getCommand(args: string[]): HelpCommand { + return new HelpCommand(args); +} + +export class HelpCommand extends TfCommand { + protected serverCommand = false; + protected description = "Git commands."; + + protected setCommandArgs(): void { + super.setCommandArgs(); + } + + public exec(cmd?: any): Promise { + return this.getHelp(cmd); + } +} \ No newline at end of file diff --git a/app/exec/code/git/pullrequest.ts b/app/exec/code/git/pullrequest.ts new file mode 100644 index 00000000..e1c55b7d --- /dev/null +++ b/app/exec/code/git/pullrequest.ts @@ -0,0 +1,142 @@ +import { warn } from '../../../lib/trace'; +import os = require('os'); +import { errLog } from '../../../lib/errorhandler'; +import { isNull } from 'util'; +import { GitPushSearchCriteria } from 'vso-node-api/interfaces/TfvcInterfaces'; +import { TfCommand, CoreArguments } from "../../../lib/tfcommand"; +import { getCredentialStore } from "../../../lib/credstore"; +//import buildContracts = require('vso-node-api/interfaces/BuildInterfaces'); +import args = require("../../../lib/arguments"); +import trace = require('../../../lib/trace'); +import taskAgentContracts = require("vso-node-api/interfaces/TaskAgentInterfaces"); +import agentClient = require("vso-node-api/TaskAgentApiBase"); +import corem = require('vso-node-api/CoreApi'); +import gi = require('vso-node-api/interfaces/GitInterfaces'); +import vm = require('vso-node-api'); +import git_Api = require('vso-node-api/GitApi') +import VSSInterfaces = require("vso-node-api/interfaces/common/VSSInterfaces"); +import codedBase = require("../default"); +export function getCommand(args: string[]): PullRequest { + return new PullRequest(args); +} + +class GR implements gi.GitPullRequest { + _links: any; + artifactId: string; + autoCompleteSetBy: VSSInterfaces.IdentityRef; + closedBy: VSSInterfaces.IdentityRef; + closedDate: Date; + codeReviewId: number; + commits: gi.GitCommitRef[]; + completionOptions: gi.GitPullRequestCompletionOptions; + completionQueueTime: Date; + createdBy: VSSInterfaces.IdentityRef; + creationDate: Date; + description: string; + lastMergeCommit: gi.GitCommitRef; + lastMergeSourceCommit: gi.GitCommitRef; + lastMergeTargetCommit: gi.GitCommitRef; + mergeId: string; + mergeStatus: gi.PullRequestAsyncStatus; + pullRequestId: number; + remoteUrl: string; + repository: gi.GitRepository; + reviewers: gi.IdentityRefWithVote[]; + sourceRefName: string; + status: gi.PullRequestStatus; + supportsIterations: boolean; + targetRefName: string; + title: string; + url: string; + workItemRefs: VSSInterfaces.ResourceRef[]; +} + +export class PullRequest extends codedBase.CodeBase { + protected serverCommand = true; + protected description = "Pull request"; + + protected getHelpArgs(): string[] { + return ["project", "repositoryName", 'source', 'target', 'title']; + } + + public async exec(): Promise { + console.log(this.connection.getAccountUrl()); + var gitApi: git_Api.IGitApi = this.webApi.getGitApi(); + var project = await this.commandArgs.project.val(); + var repositoryName = await this.commandArgs.repositoryName.val(); + var source = await this.commandArgs.source.val(); + var target = await this.commandArgs.target.val(); + var title = await this.commandArgs.title.val(); + + var gitRepositories = await gitApi.getRepositories(project); + var gitRepositorie; + gitRepositories.forEach(repo => { + if (repo.name.toLowerCase() == repositoryName.toLowerCase()) { + gitRepositorie = repo; + return; + }; + }); + if (!gitRepositorie) { + errLog('No repository found'); + process.exit(1); + } + var gitRepositorieId = gitRepositorie.id + var pullRequests = await gitApi.getPullRequests(gitRepositorieId, null) + var myBranch; + var newPullrequest: GR = new GR; + newPullrequest.sourceRefName = 'refs/heads/' + source; + //Getting source branch name + if (target && target.length > 0) + newPullrequest.targetRefName = 'refs/heads/' + target; + + else { + warn('No target branch specified, using master.') + var masterPath = await gitApi.getSuggestions(gitRepositorieId, project) + target = gitRepositorie.defaultBranch.split('/')[gitRepositorie.defaultBranch.split('/').length - 1]; + newPullrequest.targetRefName = gitRepositorie.defaultBranch; + } + //Getting title. + if (title && title.length > 0) + newPullrequest.title = title; + else { + warn('No title specified, using last comment of source branch.') + var branches = await gitApi.getBranches(gitRepositorieId, project); + branches.forEach(branch => { + if (branch.name == source) { + console.log(branch) + myBranch = branch + } + }); + } + if (!myBranch) { + errLog('Source Branch ' + source + ' not found (brach name is key sensitive)'); + process.exit(1); + } + newPullrequest.title = myBranch.commit.comment + ' from ' + source + ' to ' + target;; + console.log(newPullrequest); + await gitApi.createPullRequest(newPullrequest, gitRepositorieId, project).then(() => { + console.log('Pull Request created') + }).catch((err) => { + errLog(err.message); + }); + + return new Promise(() => console.log()) + } + + // public friendlyOutput(data: taskAgentContracts.ServiceEndpoint[]): void { + // if (!data) { + // throw new Error('no endpoints supplied'); + // } + + // if (!(data instanceof Array)) { + // throw new Error('expected an array of endpoints'); + // } + + // data.forEach((endpoint) => { + // trace.println(); + // trace.info('name : %s', endpoint.name); + // trace.info('id : %s', endpoint.id); + // trace.info('type : %s', endpoint.type); + // }); + // } +} diff --git a/docs/basicAuthEnabled.png b/docs/basicAuthEnabled.png index 62f9041c712dc8c412f97d97d4093ffe6cbdf4d7..f80db9c6122d5acb3c09f82585715565bb98f76f 100644 GIT binary patch delta 20 ccmdnFlx6!;7M9KcKlhES&$Tzd)jsnK09v&PdH?_b delta 23 fcmdnKlx62q7S_%HKX=}ZEYGzWc{jh-KJyF!Yt9Li diff --git a/docs/configureBasicAuthFeature.png b/docs/configureBasicAuthFeature.png index 65c12a7dd9a7f082b5e76b03b377473ff3ca7365..d26fb8c8505027b692edee005451810298992468 100644 GIT binary patch delta 18 ZcmaFT&hogOg{3pV&%Kd#D=XuDW&lNF26F%a delta 19 acmaFd&hn(4g|#!l&z-lCWh)EgeP#ek8wP&> diff --git a/docs/help-screen.png b/docs/help-screen.png index 6a78fae3ac59d7fe250a27bede8c9594c4559fed..ce01afd188d1649dd4a1194cd22fbf24a3169ab7 100644 GIT binary patch delta 13 UcmZ2cxxA94Gr-S%BkN)t04PueNdN!< delta 14 VcmZ2pxuTM_Gr-TCcO%PU8vray1y%q6 diff --git a/docs/tfsAuth.png b/docs/tfsAuth.png index 5e19137656813723d632444337c5ce941267e65b..75f898eb99f50b1cd9ff850db9338a2cfda02710 100644 GIT binary patch delta 18 Zcmdnr!M?A9ouxCt&%Kd#D=VYb5dc7o22B6} delta 19 acmdnj!M?wPowYN-&z-lCWh)D#)e!(i0R~wB From 0c28c73ed1925f44a3b23b1737fe060a35261888 Mon Sep 17 00:00:00 2001 From: "Shpigelman, StasX" Date: Sun, 30 Apr 2017 13:58:50 +0300 Subject: [PATCH 144/235] update --- app/exec/code/git/pullrequest.ts | 37 ++++++++++++++++---------------- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/app/exec/code/git/pullrequest.ts b/app/exec/code/git/pullrequest.ts index e1c55b7d..2fb60612 100644 --- a/app/exec/code/git/pullrequest.ts +++ b/app/exec/code/git/pullrequest.ts @@ -1,4 +1,4 @@ -import { warn } from '../../../lib/trace'; +import { success, warn } from '../../../lib/trace'; import os = require('os'); import { errLog } from '../../../lib/errorhandler'; import { isNull } from 'util'; @@ -60,7 +60,6 @@ export class PullRequest extends codedBase.CodeBase { - console.log(this.connection.getAccountUrl()); var gitApi: git_Api.IGitApi = this.webApi.getGitApi(); var project = await this.commandArgs.project.val(); var repositoryName = await this.commandArgs.repositoryName.val(); @@ -82,13 +81,12 @@ export class PullRequest extends codedBase.CodeBase 0) newPullrequest.targetRefName = 'refs/heads/' + target; - else { warn('No target branch specified, using master.') var masterPath = await gitApi.getSuggestions(gitRepositorieId, project) @@ -97,30 +95,33 @@ export class PullRequest extends codedBase.CodeBase 0) - newPullrequest.title = title; + myBranchComment = title; else { + var myBranch; warn('No title specified, using last comment of source branch.') var branches = await gitApi.getBranches(gitRepositorieId, project); branches.forEach(branch => { if (branch.name == source) { - console.log(branch) - myBranch = branch + myBranch = branch; } }); + if (!myBranch) { + errLog('Source Branch ' + source + ' not found (brach name is key sensitive)'); + process.exit(1); + } + myBranchComment += myBranch.commit.comment + ' from ' + source + ' to ' + target; + } - if (!myBranch) { - errLog('Source Branch ' + source + ' not found (brach name is key sensitive)'); - process.exit(1); - } - newPullrequest.title = myBranch.commit.comment + ' from ' + source + ' to ' + target;; - console.log(newPullrequest); - await gitApi.createPullRequest(newPullrequest, gitRepositorieId, project).then(() => { - console.log('Pull Request created') - }).catch((err) => { + newPullrequest.title = myBranchComment; + var pullRequest = await gitApi.createPullRequest(newPullrequest, gitRepositorieId, project).catch((err) => { errLog(err.message); }); - - return new Promise(() => console.log()) + var pullRequestType: any = pullRequest + return new Promise(() => { + success('New pull request created'); + trace.info('Title : %s', pullRequestType.title); + trace.info('id : %s', pullRequestType.pullRequestId); + }) } // public friendlyOutput(data: taskAgentContracts.ServiceEndpoint[]): void { From 9c9d1c6ef30e4a5562ba8169664835a82aa0aeb0 Mon Sep 17 00:00:00 2001 From: "Shpigelman, StasX" Date: Sun, 30 Apr 2017 14:01:49 +0300 Subject: [PATCH 145/235] another update --- app/exec/code/git/pullrequest.ts | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/app/exec/code/git/pullrequest.ts b/app/exec/code/git/pullrequest.ts index 2fb60612..55290ebd 100644 --- a/app/exec/code/git/pullrequest.ts +++ b/app/exec/code/git/pullrequest.ts @@ -1,21 +1,12 @@ import { success, warn } from '../../../lib/trace'; -import os = require('os'); import { errLog } from '../../../lib/errorhandler'; -import { isNull } from 'util'; -import { GitPushSearchCriteria } from 'vso-node-api/interfaces/TfvcInterfaces'; -import { TfCommand, CoreArguments } from "../../../lib/tfcommand"; -import { getCredentialStore } from "../../../lib/credstore"; -//import buildContracts = require('vso-node-api/interfaces/BuildInterfaces'); import args = require("../../../lib/arguments"); import trace = require('../../../lib/trace'); -import taskAgentContracts = require("vso-node-api/interfaces/TaskAgentInterfaces"); -import agentClient = require("vso-node-api/TaskAgentApiBase"); -import corem = require('vso-node-api/CoreApi'); import gi = require('vso-node-api/interfaces/GitInterfaces'); -import vm = require('vso-node-api'); import git_Api = require('vso-node-api/GitApi') import VSSInterfaces = require("vso-node-api/interfaces/common/VSSInterfaces"); import codedBase = require("../default"); + export function getCommand(args: string[]): PullRequest { return new PullRequest(args); } From 264dbf7ada70909431d687ad9146f291e7254b03 Mon Sep 17 00:00:00 2001 From: "Shpigelman, StasX" Date: Sun, 30 Apr 2017 16:15:45 +0300 Subject: [PATCH 146/235] Add classes and request list logic --- app/exec/code/default.ts | 4 +-- app/exec/code/git/abandon.ts | 0 app/exec/code/git/complete.ts | 0 app/exec/code/git/details.ts | 0 app/exec/code/git/pullrequest.ts | 27 ++++----------- app/exec/code/git/requestlist.ts | 59 ++++++++++++++++++++++++++++++++ 6 files changed, 67 insertions(+), 23 deletions(-) create mode 100644 app/exec/code/git/abandon.ts create mode 100644 app/exec/code/git/complete.ts create mode 100644 app/exec/code/git/details.ts create mode 100644 app/exec/code/git/requestlist.ts diff --git a/app/exec/code/default.ts b/app/exec/code/default.ts index 8795d455..9b6c7a55 100644 --- a/app/exec/code/default.ts +++ b/app/exec/code/default.ts @@ -9,7 +9,7 @@ export interface CodeArguments extends CoreArguments { source: args.StringArgument; target: args.StringArgument; title: args.StringArgument; - repositoryName: args.StringArgument; + repositoryname: args.StringArgument; } export class CodeBase extends TfCommand { @@ -19,7 +19,7 @@ export class CodeBase extends TfComma protected setCommandArgs(): void { super.setCommandArgs(); - this.registerCommandArgument(["repositoryName", "-rn"], "Repository name", null, args.StringArgument); + this.registerCommandArgument(["repositoryname", "-rn"], "Repository name", null, args.StringArgument); this.registerCommandArgument(["source", "-so"], "Repository source branch name", null, args.StringArgument); this.registerCommandArgument(["target", "-ta"], "Repository target branch name", null, args.StringArgument, null); this.registerCommandArgument(["title", "-ti"], "Title", null, args.StringArgument, null); diff --git a/app/exec/code/git/abandon.ts b/app/exec/code/git/abandon.ts new file mode 100644 index 00000000..e69de29b diff --git a/app/exec/code/git/complete.ts b/app/exec/code/git/complete.ts new file mode 100644 index 00000000..e69de29b diff --git a/app/exec/code/git/details.ts b/app/exec/code/git/details.ts new file mode 100644 index 00000000..e69de29b diff --git a/app/exec/code/git/pullrequest.ts b/app/exec/code/git/pullrequest.ts index 55290ebd..f7bccc77 100644 --- a/app/exec/code/git/pullrequest.ts +++ b/app/exec/code/git/pullrequest.ts @@ -51,9 +51,10 @@ export class PullRequest extends codedBase.CodeBase { + //getting variables. var gitApi: git_Api.IGitApi = this.webApi.getGitApi(); var project = await this.commandArgs.project.val(); - var repositoryName = await this.commandArgs.repositoryName.val(); + var repositoryName = await this.commandArgs.repositoryname.val(); var source = await this.commandArgs.source.val(); var target = await this.commandArgs.target.val(); var title = await this.commandArgs.title.val(); @@ -104,31 +105,15 @@ export class PullRequest extends codedBase.CodeBase { errLog(err.message); }); - var pullRequestType: any = pullRequest + var pullRequestType: any = pullRequest; return new Promise(() => { success('New pull request created'); trace.info('Title : %s', pullRequestType.title); trace.info('id : %s', pullRequestType.pullRequestId); }) - } - - // public friendlyOutput(data: taskAgentContracts.ServiceEndpoint[]): void { - // if (!data) { - // throw new Error('no endpoints supplied'); - // } - - // if (!(data instanceof Array)) { - // throw new Error('expected an array of endpoints'); - // } - - // data.forEach((endpoint) => { - // trace.println(); - // trace.info('name : %s', endpoint.name); - // trace.info('id : %s', endpoint.id); - // trace.info('type : %s', endpoint.type); - // }); - // } -} + }; +}; diff --git a/app/exec/code/git/requestlist.ts b/app/exec/code/git/requestlist.ts new file mode 100644 index 00000000..39e5705a --- /dev/null +++ b/app/exec/code/git/requestlist.ts @@ -0,0 +1,59 @@ +import { PullRequestAsyncStatus } from 'vso-node-api/interfaces/GitInterfaces'; +import { success, warn } from '../../../lib/trace'; +import { errLog } from '../../../lib/errorhandler'; +import args = require('../../../lib/arguments'); +import trace = require('../../../lib/trace'); +import gi = require('vso-node-api/interfaces/GitInterfaces'); +import git_Api = require('vso-node-api/GitApi'); +import VSSInterfaces = require('vso-node-api/interfaces/common/VSSInterfaces'); +import codedBase = require('../default'); + +export function getCommand(args: string[]): RequestList { + return new RequestList(args); +} + +export class RequestList extends codedBase.CodeBase { + protected serverCommand = true; + protected description = "Get a list of pull requests"; + + protected getHelpArgs(): string[] { + return ["project", "repositoryName"]; + } + + public async exec(): Promise { + //getting variables. + var gitApi: git_Api.IGitApi = this.webApi.getGitApi(); + var project = await this.commandArgs.project.val(); + var repositoryName = await this.commandArgs.repositoryname.val(); + var gitRepositories = await gitApi.getRepositories(project); + var gitRepositorie; + gitRepositories.forEach(repo => { + if (repo.name.toLowerCase() == repositoryName.toLowerCase()) { + gitRepositorie = repo; + return; + }; + }); + var pullRequestes = await gitApi.getPullRequests(gitRepositorie.id, null); + console.log(' '); + success('Pull Requestes for '+repositoryName+':') + //console.log(pullRequestes) + pullRequestes.forEach(req => { + var reviewerList = ''; + if (req.reviewers) { + req.reviewers.forEach(reviewers => { + reviewerList += reviewers.displayName + '; ' + }); + }; + trace.info('Title : %s', req.title); + trace.info('id : %s', req.pullRequestId); + trace.info('Created by : %s', req.createdBy.displayName); + trace.info('Created Date : %s', req.creationDate.toString()); + trace.info('Merge Status : %s', PullRequestAsyncStatus[req.mergeStatus]); + trace.info('Reviewers : %s', reviewerList); + console.log(' '); + }); + return new Promise(() => { + return pullRequestes; + }) + }; +}; From 36c50f6efbf26c99ac0d47fd0ea64b68172784ed Mon Sep 17 00:00:00 2001 From: Stas Date: Wed, 3 May 2017 14:06:35 +0300 Subject: [PATCH 147/235] implemented complete pullrequest --- app/exec/code/default.ts | 5 ++ app/exec/code/git/complete.ts | 128 ++++++++++++++++++++++++++++++++++ app/exec/code/git/default.ts | 1 - 3 files changed, 133 insertions(+), 1 deletion(-) diff --git a/app/exec/code/default.ts b/app/exec/code/default.ts index 9b6c7a55..d69fc2e6 100644 --- a/app/exec/code/default.ts +++ b/app/exec/code/default.ts @@ -1,3 +1,4 @@ +import { PullRequest } from './git/pullrequest'; import { TfCommand, CoreArguments } from "../../lib/tfcommand"; import args = require("../../lib/arguments"); @@ -10,6 +11,8 @@ export interface CodeArguments extends CoreArguments { target: args.StringArgument; title: args.StringArgument; repositoryname: args.StringArgument; + pullrequestid: args.StringArgument; + pullrequestname: args.StringArgument; } export class CodeBase extends TfCommand { @@ -23,6 +26,8 @@ export class CodeBase extends TfComma this.registerCommandArgument(["source", "-so"], "Repository source branch name", null, args.StringArgument); this.registerCommandArgument(["target", "-ta"], "Repository target branch name", null, args.StringArgument, null); this.registerCommandArgument(["title", "-ti"], "Title", null, args.StringArgument, null); + this.registerCommandArgument(["pullrequestname", "-prn"], "Pull request name", null, args.StringArgument, null); + this.registerCommandArgument(["pullrequestid", "-pri"], "Pull request id", null, args.StringArgument); } public exec(cmd?: any): Promise { return this.getHelp(cmd); diff --git a/app/exec/code/git/complete.ts b/app/exec/code/git/complete.ts index e69de29b..87bcec70 100644 --- a/app/exec/code/git/complete.ts +++ b/app/exec/code/git/complete.ts @@ -0,0 +1,128 @@ +import { PullRequest } from './pullrequest'; +import { PullRequestAsyncStatus } from 'vso-node-api/interfaces/GitInterfaces'; +import { success, warn } from '../../../lib/trace'; +import { errLog } from '../../../lib/errorhandler'; +import args = require('../../../lib/arguments'); +import trace = require('../../../lib/trace'); +import gi = require('vso-node-api/interfaces/GitInterfaces'); +import git_Api = require('vso-node-api/GitApi'); +import VSSInterfaces = require('vso-node-api/interfaces/common/VSSInterfaces'); +import codedBase = require('../default'); + +export function getCommand(args: string[]): Complete { + return new Complete(args); +} + +export class Complete extends codedBase.CodeBase { + protected serverCommand = true; + protected description = "Get a list of pull requests"; + protected getHelpArgs(): string[] { + return ["project", "repositoryName"]; + } + + public async exec(): Promise { + var gitApi: git_Api.IGitApi = this.webApi.getGitApi(); + var project = await this.commandArgs.project.val(); + var repositoryName = await this.commandArgs.repositoryname.val(); + var pullRequestName = await this.commandArgs.pullrequestname.val(); + var pullRequestId; + if (!pullRequestName) { + pullRequestId = await this.commandArgs.pullrequestid.val(); + } + var gitRepositories = await gitApi.getRepositories(project); + var gitRepositorie; + if (!pullRequestId) { + gitRepositories.forEach(repo => { + if (repo.name.toLowerCase() == repositoryName.toLowerCase()) { + gitRepositorie = repo; + return; + }; + }); + var pullRequestes = await gitApi.getPullRequests(gitRepositorie.id, null); + var myPullRequestId + var count = 0; + pullRequestes.forEach(request => { + if (request.title == pullRequestName) { + myPullRequestId = request.pullRequestId; + count++; + } + }) + if (!myPullRequestId) { + errLog('No pull requests found') + process.exit(1); + } + else if (count > 1) { + errLog('More then one pullrequest was found, please use Pull Request Id') + process.exit(1); + } + pullRequestId = myPullRequestId; + } + console.log('here') + var myPullRequest = await gitApi.getPullRequestById(+pullRequestId) + var updatedPullRequest: GR = new GR; + var completeOptions:CO = new CO; + updatedPullRequest.completionOptions.deleteSourceBranch = false; + updatedPullRequest.completionOptions.mergeCommitMessage = 'Auto complittind PullRequest'; + updatedPullRequest.completionOptions.squashMerge = false; + updatedPullRequest.autoCompleteSetBy.id = myPullRequest.createdBy.id; + //updatedPullRequest = myPullRequest; + //updatedPullRequest.autoCompleteSetBy.id = + //updatedPullRequest.autoCompleteSetBy.id = '21dfff08-525a-6ade-ae74-0312944f4448'; + updatedPullRequest = await gitApi.updatePullRequest(updatedPullRequest, gitRepositorie.id, pullRequestId, project) + + + return new Promise(() => { + success('Pull request completed'); + trace.info('Title : %s', updatedPullRequest.title); + trace.info('id : %s', updatedPullRequest.pullRequestId); + }) + }; +}; + +class GR implements gi.GitPullRequest { + _links: any; + artifactId: string; + autoCompleteSetBy: IdentityRef = new IdentityRef; + closedBy: VSSInterfaces.IdentityRef; + closedDate: Date; + codeReviewId: number; + commits: gi.GitCommitRef[]; + completionOptions: CO = new CO; + completionQueueTime: Date; + createdBy: VSSInterfaces.IdentityRef; + creationDate: Date; + description: string; + lastMergeCommit: gi.GitCommitRef; + lastMergeSourceCommit: gi.GitCommitRef; + lastMergeTargetCommit: gi.GitCommitRef; + mergeId: string; + mergeStatus: gi.PullRequestAsyncStatus; + pullRequestId: number; + remoteUrl: string; + repository: gi.GitRepository; + reviewers: gi.IdentityRefWithVote[]; + sourceRefName: string; + status: gi.PullRequestStatus; + supportsIterations: boolean; + targetRefName: string; + title: string; + url: string; + workItemRefs: VSSInterfaces.ResourceRef[]; +} + +class CO implements gi.GitPullRequestCompletionOptions{ + deleteSourceBranch: boolean; + mergeCommitMessage: string; + squashMerge: boolean; +} + +class IdentityRef implements VSSInterfaces.IdentityRef{ + displayName: string; + id: string = ''; + imageUrl: string; + isAadIdentity: boolean; + isContainer: boolean; + profileUrl: string; + uniqueName: string; + url: string; +} \ No newline at end of file diff --git a/app/exec/code/git/default.ts b/app/exec/code/git/default.ts index 26afbdf1..ab87d084 100644 --- a/app/exec/code/git/default.ts +++ b/app/exec/code/git/default.ts @@ -1,5 +1,4 @@ import { TfCommand, CoreArguments } from "../../../lib/tfcommand"; -import args = require("../../../lib/arguments"); export function getCommand(args: string[]): HelpCommand { return new HelpCommand(args); From 9e6f01df5616c537728dd2bdcd7f8936500495df Mon Sep 17 00:00:00 2001 From: "Shpigelman, StasX" Date: Thu, 4 May 2017 17:08:46 +0300 Subject: [PATCH 148/235] default.ts changes , complete and abandon implemantation --- app/exec/code/default.ts | 29 ++------ app/exec/code/git/abandon.ts | 119 +++++++++++++++++++++++++++++++ app/exec/code/git/complete.ts | 91 ++++++++++------------- app/exec/code/git/default.ts | 27 +++++-- app/exec/code/git/details.ts | 0 app/exec/code/git/pullrequest.ts | 2 +- app/exec/code/git/requestlist.ts | 47 +++++++++--- 7 files changed, 224 insertions(+), 91 deletions(-) delete mode 100644 app/exec/code/git/details.ts diff --git a/app/exec/code/default.ts b/app/exec/code/default.ts index d69fc2e6..78df06a1 100644 --- a/app/exec/code/default.ts +++ b/app/exec/code/default.ts @@ -1,35 +1,18 @@ -import { PullRequest } from './git/pullrequest'; import { TfCommand, CoreArguments } from "../../lib/tfcommand"; -import args = require("../../lib/arguments"); -export function getCommand(args: string[]): CodeBase { - return new CodeBase(args); +export function getCommand(args: string[]): HelpCommand { + return new HelpCommand(args); } -export interface CodeArguments extends CoreArguments { - source: args.StringArgument; - target: args.StringArgument; - title: args.StringArgument; - repositoryname: args.StringArgument; - pullrequestid: args.StringArgument; - pullrequestname: args.StringArgument; -} - -export class CodeBase extends TfCommand { +export class HelpCommand extends TfCommand { protected serverCommand = false; - protected description = "Commands for managing source control."; + protected description = "Git commands."; protected setCommandArgs(): void { super.setCommandArgs(); - - this.registerCommandArgument(["repositoryname", "-rn"], "Repository name", null, args.StringArgument); - this.registerCommandArgument(["source", "-so"], "Repository source branch name", null, args.StringArgument); - this.registerCommandArgument(["target", "-ta"], "Repository target branch name", null, args.StringArgument, null); - this.registerCommandArgument(["title", "-ti"], "Title", null, args.StringArgument, null); - this.registerCommandArgument(["pullrequestname", "-prn"], "Pull request name", null, args.StringArgument, null); - this.registerCommandArgument(["pullrequestid", "-pri"], "Pull request id", null, args.StringArgument); } + public exec(cmd?: any): Promise { return this.getHelp(cmd); } -} +} \ No newline at end of file diff --git a/app/exec/code/git/abandon.ts b/app/exec/code/git/abandon.ts index e69de29b..9b1e7a5e 100644 --- a/app/exec/code/git/abandon.ts +++ b/app/exec/code/git/abandon.ts @@ -0,0 +1,119 @@ +import { PullRequest } from './pullrequest'; +import { PullRequestAsyncStatus } from 'vso-node-api/interfaces/GitInterfaces'; +import { success, warn } from '../../../lib/trace'; +import { errLog } from '../../../lib/errorhandler'; +import args = require('../../../lib/arguments'); +import trace = require('../../../lib/trace'); +import gi = require('vso-node-api/interfaces/GitInterfaces'); +import git_Api = require('vso-node-api/GitApi'); +import VSSInterfaces = require('vso-node-api/interfaces/common/VSSInterfaces'); +import codedBase = require('./default'); + +export function getCommand(args: string[]): Abandon { + return new Abandon(args); +} + +export class Abandon extends codedBase.CodeBase { + protected serverCommand = true; + protected description = "Get a list of pull requests"; + protected getHelpArgs(): string[] { + return ["project", "repositoryName", "pullrequestname", "pullrequestid"]; + } + public async exec(): Promise { + var gitApi: git_Api.IGitApi = this.webApi.getGitApi(); + var project = await this.commandArgs.project.val(); + var repositoryName = await this.commandArgs.repositoryname.val(); + var pullRequestName = await this.commandArgs.pullrequestname.val(); + var pullRequestId; + if (!pullRequestName) { + pullRequestId = await this.commandArgs.pullrequestid.val(); + } + var gitRepositories = await gitApi.getRepositories(project); + var gitRepositorie; + var myPullRequest + + gitRepositories.forEach(repo => { + if (repo.name.toLowerCase() == repositoryName.toLowerCase()) { + gitRepositorie = repo; + return; + }; + }); + var pullRequestes = await gitApi.getPullRequests(gitRepositorie.id, null); + var myPullRequestId + var count = 0; + pullRequestes.forEach(request => { + if (!pullRequestId) { + if (request.title == pullRequestName) { + myPullRequestId = request.pullRequestId; + myPullRequest = request; + count++; + } + } + if (!pullRequestName) { + if (request.pullRequestId == pullRequestId) { + myPullRequestId = request.pullRequestId; + myPullRequest = request; + count++; + } + } + }) + if (!myPullRequest) { + errLog('No pull requests found') + process.exit(1); + } + else if (count > 1) { + errLog('More then one pullrequest was found, please use Pull Request Id') + process.exit(1); + } + pullRequestId = myPullRequestId; + + var updatedPullRequest: GR = new GR; + updatedPullRequest.status = 2 //abandoned; + + updatedPullRequest = await gitApi.updatePullRequest(updatedPullRequest, gitRepositorie.id, pullRequestId, project) + + return new Promise(() => { + success('Pull request abandoned'); + console.log(''); + trace.info('Title : %s', updatedPullRequest.title); + trace.info('id : %s', updatedPullRequest.pullRequestId); + }) + }; +}; + +class GR implements gi.GitPullRequest { + _links: any; + artifactId: string; + autoCompleteSetBy: VSSInterfaces.IdentityRef; + closedBy: VSSInterfaces.IdentityRef; + closedDate: Date; + codeReviewId: number; + commits: gi.GitCommitRef[]; + completionOptions: CO = new CO; + completionQueueTime: Date; + createdBy: VSSInterfaces.IdentityRef; + creationDate: Date; + description: string; + lastMergeCommit: gi.GitCommitRef; + lastMergeSourceCommit: gi.GitCommitRef; + lastMergeTargetCommit: gi.GitCommitRef; + mergeId: string; + mergeStatus: gi.PullRequestAsyncStatus; + pullRequestId: number; + remoteUrl: string; + repository: gi.GitRepository; + reviewers: gi.IdentityRefWithVote[]; + sourceRefName: string; + status: gi.PullRequestStatus; + supportsIterations: boolean; + targetRefName: string; + title: string; + url: string; + workItemRefs: VSSInterfaces.ResourceRef[]; +} + +class CO implements gi.GitPullRequestCompletionOptions { + deleteSourceBranch: boolean; + mergeCommitMessage: string; + squashMerge: boolean; +} \ No newline at end of file diff --git a/app/exec/code/git/complete.ts b/app/exec/code/git/complete.ts index 87bcec70..8894ee28 100644 --- a/app/exec/code/git/complete.ts +++ b/app/exec/code/git/complete.ts @@ -7,7 +7,7 @@ import trace = require('../../../lib/trace'); import gi = require('vso-node-api/interfaces/GitInterfaces'); import git_Api = require('vso-node-api/GitApi'); import VSSInterfaces = require('vso-node-api/interfaces/common/VSSInterfaces'); -import codedBase = require('../default'); +import codedBase = require('./default'); export function getCommand(args: string[]): Complete { return new Complete(args); @@ -17,9 +17,8 @@ export class Complete extends codedBase.CodeBase protected serverCommand = true; protected description = "Get a list of pull requests"; protected getHelpArgs(): string[] { - return ["project", "repositoryName"]; + return ["project", "repositoryName", "pullrequestname", "pullrequestid"]; } - public async exec(): Promise { var gitApi: git_Api.IGitApi = this.webApi.getGitApi(); var project = await this.commandArgs.project.val(); @@ -31,48 +30,53 @@ export class Complete extends codedBase.CodeBase } var gitRepositories = await gitApi.getRepositories(project); var gitRepositorie; - if (!pullRequestId) { - gitRepositories.forEach(repo => { - if (repo.name.toLowerCase() == repositoryName.toLowerCase()) { - gitRepositorie = repo; - return; - }; - }); - var pullRequestes = await gitApi.getPullRequests(gitRepositorie.id, null); - var myPullRequestId - var count = 0; - pullRequestes.forEach(request => { + var myPullRequest + + gitRepositories.forEach(repo => { + if (repo.name.toLowerCase() == repositoryName.toLowerCase()) { + gitRepositorie = repo; + return; + }; + }); + var pullRequestes = await gitApi.getPullRequests(gitRepositorie.id, null); + var myPullRequestId + var count = 0; + pullRequestes.forEach(request => { + if (!pullRequestId) { if (request.title == pullRequestName) { myPullRequestId = request.pullRequestId; + myPullRequest = request; count++; } - }) - if (!myPullRequestId) { - errLog('No pull requests found') - process.exit(1); } - else if (count > 1) { - errLog('More then one pullrequest was found, please use Pull Request Id') - process.exit(1); + if (!pullRequestName) { + if (request.pullRequestId == pullRequestId) { + myPullRequestId = request.pullRequestId; + myPullRequest = request; + count++; + } } - pullRequestId = myPullRequestId; + }) + if (!myPullRequest) { + errLog('No pull requests found') + process.exit(1); } - console.log('here') - var myPullRequest = await gitApi.getPullRequestById(+pullRequestId) + else if (count > 1) { + errLog('More then one pullrequest was found, please use Pull Request Id') + process.exit(1); + } + //console.log(myPullRequest); + pullRequestId = myPullRequestId; + var updatedPullRequest: GR = new GR; - var completeOptions:CO = new CO; - updatedPullRequest.completionOptions.deleteSourceBranch = false; - updatedPullRequest.completionOptions.mergeCommitMessage = 'Auto complittind PullRequest'; - updatedPullRequest.completionOptions.squashMerge = false; - updatedPullRequest.autoCompleteSetBy.id = myPullRequest.createdBy.id; - //updatedPullRequest = myPullRequest; - //updatedPullRequest.autoCompleteSetBy.id = - //updatedPullRequest.autoCompleteSetBy.id = '21dfff08-525a-6ade-ae74-0312944f4448'; - updatedPullRequest = await gitApi.updatePullRequest(updatedPullRequest, gitRepositorie.id, pullRequestId, project) + updatedPullRequest.lastMergeSourceCommit = myPullRequest.lastMergeSourceCommit; + updatedPullRequest.status = 3 //completed; + updatedPullRequest = await gitApi.updatePullRequest(updatedPullRequest, gitRepositorie.id, pullRequestId, project) return new Promise(() => { success('Pull request completed'); + console.log(''); trace.info('Title : %s', updatedPullRequest.title); trace.info('id : %s', updatedPullRequest.pullRequestId); }) @@ -82,12 +86,12 @@ export class Complete extends codedBase.CodeBase class GR implements gi.GitPullRequest { _links: any; artifactId: string; - autoCompleteSetBy: IdentityRef = new IdentityRef; + autoCompleteSetBy: VSSInterfaces.IdentityRef; closedBy: VSSInterfaces.IdentityRef; closedDate: Date; codeReviewId: number; commits: gi.GitCommitRef[]; - completionOptions: CO = new CO; + completionOptions: gi.GitPullRequestCompletionOptions; completionQueueTime: Date; createdBy: VSSInterfaces.IdentityRef; creationDate: Date; @@ -108,21 +112,4 @@ class GR implements gi.GitPullRequest { title: string; url: string; workItemRefs: VSSInterfaces.ResourceRef[]; -} - -class CO implements gi.GitPullRequestCompletionOptions{ - deleteSourceBranch: boolean; - mergeCommitMessage: string; - squashMerge: boolean; -} - -class IdentityRef implements VSSInterfaces.IdentityRef{ - displayName: string; - id: string = ''; - imageUrl: string; - isAadIdentity: boolean; - isContainer: boolean; - profileUrl: string; - uniqueName: string; - url: string; } \ No newline at end of file diff --git a/app/exec/code/git/default.ts b/app/exec/code/git/default.ts index ab87d084..e065d226 100644 --- a/app/exec/code/git/default.ts +++ b/app/exec/code/git/default.ts @@ -1,17 +1,34 @@ +import { PullRequest } from '../git/pullrequest'; import { TfCommand, CoreArguments } from "../../../lib/tfcommand"; +import args = require("../../../lib/arguments"); -export function getCommand(args: string[]): HelpCommand { - return new HelpCommand(args); +export function getCommand(args: string[]): CodeBase { + return new CodeBase(args); } -export class HelpCommand extends TfCommand { +export interface CodeArguments extends CoreArguments { + source: args.StringArgument; + target: args.StringArgument; + title: args.StringArgument; + repositoryname: args.StringArgument; + pullrequestid: args.StringArgument; + pullrequestname: args.StringArgument; +} + +export class CodeBase extends TfCommand { protected serverCommand = false; - protected description = "Git commands."; + protected description = "Commands for managing source control."; protected setCommandArgs(): void { super.setCommandArgs(); - } + this.registerCommandArgument(["repositoryname", "-rn"], "Repository name", null, args.StringArgument); + this.registerCommandArgument(["source", "-so"], "Repository source branch name", null, args.StringArgument); + this.registerCommandArgument(["target", "-ta"], "Repository target branch name", null, args.StringArgument, null); + this.registerCommandArgument(["title", "-ti"], "Title", null, args.StringArgument, null); + this.registerCommandArgument(["pullrequestname", "-prn"], "Pull request name", null, args.StringArgument, null); + this.registerCommandArgument(["pullrequestid", "-pri"], "Pull request id", null, args.StringArgument); + } public exec(cmd?: any): Promise { return this.getHelp(cmd); } diff --git a/app/exec/code/git/details.ts b/app/exec/code/git/details.ts deleted file mode 100644 index e69de29b..00000000 diff --git a/app/exec/code/git/pullrequest.ts b/app/exec/code/git/pullrequest.ts index f7bccc77..ccb86ee0 100644 --- a/app/exec/code/git/pullrequest.ts +++ b/app/exec/code/git/pullrequest.ts @@ -5,7 +5,7 @@ import trace = require('../../../lib/trace'); import gi = require('vso-node-api/interfaces/GitInterfaces'); import git_Api = require('vso-node-api/GitApi') import VSSInterfaces = require("vso-node-api/interfaces/common/VSSInterfaces"); -import codedBase = require("../default"); +import codedBase = require("./default"); export function getCommand(args: string[]): PullRequest { return new PullRequest(args); diff --git a/app/exec/code/git/requestlist.ts b/app/exec/code/git/requestlist.ts index 39e5705a..f6efdfe2 100644 --- a/app/exec/code/git/requestlist.ts +++ b/app/exec/code/git/requestlist.ts @@ -6,7 +6,8 @@ import trace = require('../../../lib/trace'); import gi = require('vso-node-api/interfaces/GitInterfaces'); import git_Api = require('vso-node-api/GitApi'); import VSSInterfaces = require('vso-node-api/interfaces/common/VSSInterfaces'); -import codedBase = require('../default'); +import codedBase = require('./default'); +var repositoryName; export function getCommand(args: string[]): RequestList { return new RequestList(args); @@ -24,7 +25,7 @@ export class RequestList extends codedBase.CodeBase { @@ -33,11 +34,39 @@ export class RequestList extends codedBase.CodeBase { + // var reviewerList = ''; + // if (req.reviewers) { + // req.reviewers.forEach(reviewers => { + // reviewerList += reviewers.displayName + '; ' + // }); + // }; + // trace.info('Title : %s', req.title); + // trace.info('id : %s', req.pullRequestId); + // trace.info('Created by : %s', req.createdBy.displayName); + // trace.info('Created Date : %s', req.creationDate.toString()); + // trace.info('Merge Status : %s', PullRequestAsyncStatus[req.mergeStatus]); + // trace.info('Reviewers : %s', reviewerList); + // console.log(' '); + // }); + return await gitApi.getPullRequests(gitRepositorie.id, null); + }; + + public friendlyOutput(data: gi.GitPullRequest[]): void { + if (!data) { + throw new Error("no pull requests supplied"); + } + + if (!(data instanceof Array)) { + throw new Error("expected an array of pull requests"); + } console.log(' '); - success('Pull Requestes for '+repositoryName+':') - //console.log(pullRequestes) - pullRequestes.forEach(req => { + success('Pull Requestes for ' + repositoryName + ':') + data.forEach(req => { var reviewerList = ''; if (req.reviewers) { req.reviewers.forEach(reviewers => { @@ -52,8 +81,6 @@ export class RequestList extends codedBase.CodeBase(() => { - return pullRequestes; - }) - }; + } }; + From f627297849089d0f93a230eaaec6d6028a9b88eb Mon Sep 17 00:00:00 2001 From: "Shpigelman, StasX" Date: Thu, 4 May 2017 17:13:41 +0300 Subject: [PATCH 149/235] description update --- app/exec/code/git/abandon.ts | 2 +- app/exec/code/git/complete.ts | 2 +- app/exec/code/git/pullrequest.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/exec/code/git/abandon.ts b/app/exec/code/git/abandon.ts index 9b1e7a5e..311783d5 100644 --- a/app/exec/code/git/abandon.ts +++ b/app/exec/code/git/abandon.ts @@ -15,7 +15,7 @@ export function getCommand(args: string[]): Abandon { export class Abandon extends codedBase.CodeBase { protected serverCommand = true; - protected description = "Get a list of pull requests"; + protected description = "Abandon a pull request"; protected getHelpArgs(): string[] { return ["project", "repositoryName", "pullrequestname", "pullrequestid"]; } diff --git a/app/exec/code/git/complete.ts b/app/exec/code/git/complete.ts index 8894ee28..98a26f06 100644 --- a/app/exec/code/git/complete.ts +++ b/app/exec/code/git/complete.ts @@ -15,7 +15,7 @@ export function getCommand(args: string[]): Complete { export class Complete extends codedBase.CodeBase { protected serverCommand = true; - protected description = "Get a list of pull requests"; + protected description = "Complete a pull request"; protected getHelpArgs(): string[] { return ["project", "repositoryName", "pullrequestname", "pullrequestid"]; } diff --git a/app/exec/code/git/pullrequest.ts b/app/exec/code/git/pullrequest.ts index ccb86ee0..65b358a5 100644 --- a/app/exec/code/git/pullrequest.ts +++ b/app/exec/code/git/pullrequest.ts @@ -44,7 +44,7 @@ class GR implements gi.GitPullRequest { export class PullRequest extends codedBase.CodeBase { protected serverCommand = true; - protected description = "Pull request"; + protected description = "Create a pull request"; protected getHelpArgs(): string[] { return ["project", "repositoryName", 'source', 'target', 'title']; From 7fa250dc390833b8e9c7c6ed45aa10231a9227f9 Mon Sep 17 00:00:00 2001 From: "Shpigelman, StasX" Date: Sun, 7 May 2017 10:32:57 +0300 Subject: [PATCH 150/235] final fixes --- app/exec/code/git/abandon.ts | 25 +++++++++++++++---------- app/exec/code/git/complete.ts | 27 ++++++++++++++++++--------- app/exec/code/git/default.ts | 12 ++++++------ app/exec/code/git/pullrequest.ts | 25 +++++++++++++++---------- app/exec/code/git/requestlist.ts | 22 ++-------------------- 5 files changed, 56 insertions(+), 55 deletions(-) diff --git a/app/exec/code/git/abandon.ts b/app/exec/code/git/abandon.ts index 311783d5..79a46ec7 100644 --- a/app/exec/code/git/abandon.ts +++ b/app/exec/code/git/abandon.ts @@ -17,7 +17,7 @@ export class Abandon extends codedBase.CodeBase { protected serverCommand = true; protected description = "Abandon a pull request"; protected getHelpArgs(): string[] { - return ["project", "repositoryName", "pullrequestname", "pullrequestid"]; + return ["project", "repositoryname", "pullrequestname", "pullrequestid"]; } public async exec(): Promise { var gitApi: git_Api.IGitApi = this.webApi.getGitApi(); @@ -66,19 +66,24 @@ export class Abandon extends codedBase.CodeBase { process.exit(1); } pullRequestId = myPullRequestId; - var updatedPullRequest: GR = new GR; updatedPullRequest.status = 2 //abandoned; - updatedPullRequest = await gitApi.updatePullRequest(updatedPullRequest, gitRepositorie.id, pullRequestId, project) - - return new Promise(() => { - success('Pull request abandoned'); - console.log(''); - trace.info('Title : %s', updatedPullRequest.title); - trace.info('id : %s', updatedPullRequest.pullRequestId); - }) + return await gitApi.updatePullRequest(updatedPullRequest, gitRepositorie.id, pullRequestId, project) }; + + public friendlyOutput(data: gi.GitPullRequest): void { + if (!data) { + throw new Error("no pull requests supplied"); + } + + console.log(' '); + success('Pull request abandoned'); + console.log(''); + trace.info('Title : %s', data.title); + trace.info('id : %s', data.pullRequestId); + + } }; class GR implements gi.GitPullRequest { diff --git a/app/exec/code/git/complete.ts b/app/exec/code/git/complete.ts index 98a26f06..851b7201 100644 --- a/app/exec/code/git/complete.ts +++ b/app/exec/code/git/complete.ts @@ -17,7 +17,7 @@ export class Complete extends codedBase.CodeBase protected serverCommand = true; protected description = "Complete a pull request"; protected getHelpArgs(): string[] { - return ["project", "repositoryName", "pullrequestname", "pullrequestid"]; + return ["project", "repositoryname", "pullrequestname", "pullrequestid"]; } public async exec(): Promise { var gitApi: git_Api.IGitApi = this.webApi.getGitApi(); @@ -70,19 +70,28 @@ export class Complete extends codedBase.CodeBase var updatedPullRequest: GR = new GR; updatedPullRequest.lastMergeSourceCommit = myPullRequest.lastMergeSourceCommit; - updatedPullRequest.status = 3 //completed; + updatedPullRequest.status = 3; //completed; - updatedPullRequest = await gitApi.updatePullRequest(updatedPullRequest, gitRepositorie.id, pullRequestId, project) + return await gitApi.updatePullRequest(updatedPullRequest, gitRepositorie.id, pullRequestId, project); - return new Promise(() => { - success('Pull request completed'); - console.log(''); - trace.info('Title : %s', updatedPullRequest.title); - trace.info('id : %s', updatedPullRequest.pullRequestId); - }) }; + + + public friendlyOutput(data: gi.GitPullRequest): void { + if (!data) { + throw new Error("no pull requests supplied"); + } + + console.log(' '); + success('Pull request completed'); + console.log(''); + trace.info('Title : %s', data.title); + trace.info('id : %s', data.pullRequestId); + + } }; + class GR implements gi.GitPullRequest { _links: any; artifactId: string; diff --git a/app/exec/code/git/default.ts b/app/exec/code/git/default.ts index e065d226..4eea6c45 100644 --- a/app/exec/code/git/default.ts +++ b/app/exec/code/git/default.ts @@ -22,12 +22,12 @@ export class CodeBase extends TfComma protected setCommandArgs(): void { super.setCommandArgs(); - this.registerCommandArgument(["repositoryname", "-rn"], "Repository name", null, args.StringArgument); - this.registerCommandArgument(["source", "-so"], "Repository source branch name", null, args.StringArgument); - this.registerCommandArgument(["target", "-ta"], "Repository target branch name", null, args.StringArgument, null); - this.registerCommandArgument(["title", "-ti"], "Title", null, args.StringArgument, null); - this.registerCommandArgument(["pullrequestname", "-prn"], "Pull request name", null, args.StringArgument, null); - this.registerCommandArgument(["pullrequestid", "-pri"], "Pull request id", null, args.StringArgument); + this.registerCommandArgument(["repositoryname"], "Repository name", null, args.StringArgument); + this.registerCommandArgument(["source"], "Repository source branch name", null, args.StringArgument); + this.registerCommandArgument(["target"], "Repository target branch name", null, args.StringArgument, null); + this.registerCommandArgument(["title"], "Title", null, args.StringArgument, null); + this.registerCommandArgument(["pullrequestname"], "Pull request name", null, args.StringArgument, null); + this.registerCommandArgument(["pullrequestid"], "Pull request id", null, args.StringArgument); } public exec(cmd?: any): Promise { return this.getHelp(cmd); diff --git a/app/exec/code/git/pullrequest.ts b/app/exec/code/git/pullrequest.ts index 65b358a5..0fc4ab8c 100644 --- a/app/exec/code/git/pullrequest.ts +++ b/app/exec/code/git/pullrequest.ts @@ -47,7 +47,7 @@ export class PullRequest extends codedBase.CodeBase { @@ -105,15 +105,20 @@ export class PullRequest extends codedBase.CodeBase { - errLog(err.message); - }); - var pullRequestType: any = pullRequest; - return new Promise(() => { - success('New pull request created'); - trace.info('Title : %s', pullRequestType.title); - trace.info('id : %s', pullRequestType.pullRequestId); - }) + return await gitApi.createPullRequest(newPullrequest, gitRepositorieId, project) }; + + public friendlyOutput(data: gi.GitPullRequest): void { + if (!data) { + throw new Error("no pull requests supplied"); + } + console.log(' '); + success('New pull request created'); + trace.info('Title : %s', data.title); + trace.info('id : %s', data.pullRequestId); + + } + }; diff --git a/app/exec/code/git/requestlist.ts b/app/exec/code/git/requestlist.ts index f6efdfe2..332487c1 100644 --- a/app/exec/code/git/requestlist.ts +++ b/app/exec/code/git/requestlist.ts @@ -18,7 +18,7 @@ export class RequestList extends codedBase.CodeBase { @@ -34,25 +34,7 @@ export class RequestList extends codedBase.CodeBase { - // var reviewerList = ''; - // if (req.reviewers) { - // req.reviewers.forEach(reviewers => { - // reviewerList += reviewers.displayName + '; ' - // }); - // }; - // trace.info('Title : %s', req.title); - // trace.info('id : %s', req.pullRequestId); - // trace.info('Created by : %s', req.createdBy.displayName); - // trace.info('Created Date : %s', req.creationDate.toString()); - // trace.info('Merge Status : %s', PullRequestAsyncStatus[req.mergeStatus]); - // trace.info('Reviewers : %s', reviewerList); - // console.log(' '); - // }); + return await gitApi.getPullRequests(gitRepositorie.id, null); }; From 04e181ad8d5ff6322a49d22139cd41451c1a4e92 Mon Sep 17 00:00:00 2001 From: grawcho Date: Sun, 7 May 2017 10:48:01 +0300 Subject: [PATCH 151/235] add build report and jump version to separate git code PR features --- app/exec/build/report.ts | 42 ++++++++++++++++++++++++++++++++++++++++ package.json | 2 +- 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 app/exec/build/report.ts diff --git a/app/exec/build/report.ts b/app/exec/build/report.ts new file mode 100644 index 00000000..f34238f3 --- /dev/null +++ b/app/exec/build/report.ts @@ -0,0 +1,42 @@ +import { TfCommand } from "../../lib/tfcommand"; +import args = require("../../lib/arguments"); +import buildBase = require("./default"); +import buildClient = require("vso-node-api/BuildApi"); +import buildContracts = require("vso-node-api/interfaces/BuildInterfaces"); +import trace = require("../../lib/trace"); +import fs = require("fs"); + +export function getCommand(args: string[]): BuildReport { + return new BuildReport(args); +} + +export class BuildReport extends buildBase.BuildBase { + protected description = "Download build logs to zip archive."; + protected serverCommand = true; + + protected getHelpArgs(): string[] { + return ["project", "buildId"]; + } + + public exec(): Promise { + trace.debug("build-logs.exec"); + var buildapi: buildClient.IBuildApi = this.webApi.getBuildApi(); + return this.commandArgs.project.val().then((project) => { + return this.commandArgs.buildId.val().then((buildId) => { + return buildapi.getBuild(buildId, project).then((build) => { + return buildapi.getBuildReport(build.project.name, build.id).then((report) => { + return report + }); + }); + }); + }); + } + public friendlyOutput(report: buildContracts.BuildReportMetadata): void { + if (!report) { + throw new Error("no build supplied"); + } + trace.println(); + trace.info("build id : %s", report.buildId); + trace.info("%s", report.content); + } +} \ No newline at end of file diff --git a/package.json b/package.json index 9146b9ef..5ea97945 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tfx-cli", - "version": "0.4.5", + "version": "0.4.6", "description": "CLI for Visual Studio Team Services and Team Foundation Server", "repository": { "type": "git", From d34d519830272d4bade3cc4a50ac52bfb5614aff Mon Sep 17 00:00:00 2001 From: grawcho Date: Tue, 9 May 2017 12:14:35 +0300 Subject: [PATCH 152/235] add PR details and add data to PR list --- app/exec/code/git/details.ts | 58 ++++++++++++++++++++++++++++++++ app/exec/code/git/requestlist.ts | 1 + 2 files changed, 59 insertions(+) create mode 100644 app/exec/code/git/details.ts diff --git a/app/exec/code/git/details.ts b/app/exec/code/git/details.ts new file mode 100644 index 00000000..a7adf8db --- /dev/null +++ b/app/exec/code/git/details.ts @@ -0,0 +1,58 @@ +import { PullRequestAsyncStatus } from 'vso-node-api/interfaces/GitInterfaces'; +import { success, warn } from '../../../lib/trace'; +import { errLog } from '../../../lib/errorhandler'; +import args = require('../../../lib/arguments'); +import trace = require('../../../lib/trace'); +import gi = require('vso-node-api/interfaces/GitInterfaces'); +import git_Api = require('vso-node-api/GitApi'); +import VSSInterfaces = require('vso-node-api/interfaces/common/VSSInterfaces'); +import codedBase = require('./default'); +var repositoryName; + +export function getCommand(args: string[]): RequestList { + return new RequestList(args); +} + +export class RequestList extends codedBase.CodeBase { + protected serverCommand = true; + protected description = "Get a list of pull requests"; + + protected getHelpArgs(): string[] { + return ["project", "repositoryname","pullrequestid"]; + } + + public async exec(): Promise { + //getting variables. + var gitApi: git_Api.IGitApi = this.webApi.getGitApi(); + var project = await this.commandArgs.project.val(); + repositoryName = await this.commandArgs.repositoryname.val(); + var gitRepositories = await gitApi.getRepositories(project); + var requestId = await this.commandArgs.pullrequestid.val(); + var gitRepositorie; + gitRepositories.forEach(repo => { + if (repo.name.toLowerCase() == repositoryName.toLowerCase()) { + gitRepositorie = repo; + return; + }; + }); + + return await gitApi.getPullRequest(gitRepositorie.id, parseInt(requestId)); + }; + + public friendlyOutput(req: gi.GitPullRequest): void { + if (!req) { + throw new Error("no pull requests supplied"); + } + trace.info('Title : %s', req.title); + trace.info('Description : %s', req.description); + trace.info('id : %s', req.pullRequestId); + trace.info('Created by : %s', req.createdBy.displayName); + trace.info('Status : %s',gi.PullRequestStatus[req.status]); + trace.info('Created Date : %s', req.creationDate.toString()); + trace.info('Merge Status : %s', PullRequestAsyncStatus[req.mergeStatus]); + trace.info('Last commit : %s', req.lastMergeCommit.commitId); + trace.info('Url : %s', req.url); + trace.println(); + } +}; + diff --git a/app/exec/code/git/requestlist.ts b/app/exec/code/git/requestlist.ts index 332487c1..49209622 100644 --- a/app/exec/code/git/requestlist.ts +++ b/app/exec/code/git/requestlist.ts @@ -60,6 +60,7 @@ export class RequestList extends codedBase.CodeBase Date: Tue, 9 May 2017 13:46:38 +0300 Subject: [PATCH 153/235] add ability to delete source branch after complete PR --- app/exec/code/git/complete.ts | 17 ++++++++++++++--- app/exec/code/git/default.ts | 2 ++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/app/exec/code/git/complete.ts b/app/exec/code/git/complete.ts index 851b7201..709c0fec 100644 --- a/app/exec/code/git/complete.ts +++ b/app/exec/code/git/complete.ts @@ -17,11 +17,12 @@ export class Complete extends codedBase.CodeBase protected serverCommand = true; protected description = "Complete a pull request"; protected getHelpArgs(): string[] { - return ["project", "repositoryname", "pullrequestname", "pullrequestid"]; + return ["project", "repositoryname", "pullrequestname", "pullrequestid","deletesourcebranch"]; } public async exec(): Promise { var gitApi: git_Api.IGitApi = this.webApi.getGitApi(); var project = await this.commandArgs.project.val(); + var delSources = await this.commandArgs.deletesourcebranch.val(); var repositoryName = await this.commandArgs.repositoryname.val(); var pullRequestName = await this.commandArgs.pullrequestname.val(); var pullRequestId; @@ -71,7 +72,12 @@ export class Complete extends codedBase.CodeBase var updatedPullRequest: GR = new GR; updatedPullRequest.lastMergeSourceCommit = myPullRequest.lastMergeSourceCommit; updatedPullRequest.status = 3; //completed; - + var completionOptions:CO = new CO; + if (delSources){ + trace.debug('delete source branch option selected') + completionOptions.deleteSourceBranch = delSources + updatedPullRequest.completionOptions = completionOptions; + } return await gitApi.updatePullRequest(updatedPullRequest, gitRepositorie.id, pullRequestId, project); }; @@ -121,4 +127,9 @@ class GR implements gi.GitPullRequest { title: string; url: string; workItemRefs: VSSInterfaces.ResourceRef[]; -} \ No newline at end of file +} + class CO implements gi.GitPullRequestCompletionOptions { + deleteSourceBranch: boolean; + mergeCommitMessage: string; + squashMerge: boolean; + } \ No newline at end of file diff --git a/app/exec/code/git/default.ts b/app/exec/code/git/default.ts index 4eea6c45..c2411cb7 100644 --- a/app/exec/code/git/default.ts +++ b/app/exec/code/git/default.ts @@ -13,6 +13,7 @@ export interface CodeArguments extends CoreArguments { repositoryname: args.StringArgument; pullrequestid: args.StringArgument; pullrequestname: args.StringArgument; + deletesourcebranch: args.BooleanArgument; } export class CodeBase extends TfCommand { @@ -28,6 +29,7 @@ export class CodeBase extends TfComma this.registerCommandArgument(["title"], "Title", null, args.StringArgument, null); this.registerCommandArgument(["pullrequestname"], "Pull request name", null, args.StringArgument, null); this.registerCommandArgument(["pullrequestid"], "Pull request id", null, args.StringArgument); + this.registerCommandArgument(["deletesourcebranch"], "delete source branch", "delete source branch on successfull merge",args.BooleanArgument,null); } public exec(cmd?: any): Promise { return this.getHelp(cmd); From 9eb73153d7af9e2cc882ea23c0237a3e7e26e51d Mon Sep 17 00:00:00 2001 From: grawcho Date: Tue, 9 May 2017 13:54:01 +0300 Subject: [PATCH 154/235] replace parseInt() with + --- app/exec/code/git/details.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/exec/code/git/details.ts b/app/exec/code/git/details.ts index a7adf8db..4a8550b5 100644 --- a/app/exec/code/git/details.ts +++ b/app/exec/code/git/details.ts @@ -36,7 +36,7 @@ export class RequestList extends codedBase.CodeBase Date: Tue, 9 May 2017 14:25:38 +0300 Subject: [PATCH 155/235] Added filtering to request list --- app/exec/code/git/default.ts | 4 +++ app/exec/code/git/requestlist.ts | 45 +++++++++++++++++++++++--------- 2 files changed, 37 insertions(+), 12 deletions(-) diff --git a/app/exec/code/git/default.ts b/app/exec/code/git/default.ts index 4eea6c45..98db33ff 100644 --- a/app/exec/code/git/default.ts +++ b/app/exec/code/git/default.ts @@ -13,6 +13,8 @@ export interface CodeArguments extends CoreArguments { repositoryname: args.StringArgument; pullrequestid: args.StringArgument; pullrequestname: args.StringArgument; + requeststatus: args.StringArgument; + top: args.IntArgument; } export class CodeBase extends TfCommand { @@ -28,6 +30,8 @@ export class CodeBase extends TfComma this.registerCommandArgument(["title"], "Title", null, args.StringArgument, null); this.registerCommandArgument(["pullrequestname"], "Pull request name", null, args.StringArgument, null); this.registerCommandArgument(["pullrequestid"], "Pull request id", null, args.StringArgument); + this.registerCommandArgument(["top"], "Number of results to get", null, args.IntArgument, null); + this.registerCommandArgument(["requeststatus"], "filter by status (Active, Abandoned, Completed, All)", null, args.StringArgument, null); } public exec(cmd?: any): Promise { return this.getHelp(cmd); diff --git a/app/exec/code/git/requestlist.ts b/app/exec/code/git/requestlist.ts index 49209622..d5511ceb 100644 --- a/app/exec/code/git/requestlist.ts +++ b/app/exec/code/git/requestlist.ts @@ -1,4 +1,4 @@ -import { PullRequestAsyncStatus } from 'vso-node-api/interfaces/GitInterfaces'; +import { ChangeListSearchCriteria } from 'vso-node-api/interfaces/TfvcInterfaces'; import { success, warn } from '../../../lib/trace'; import { errLog } from '../../../lib/errorhandler'; import args = require('../../../lib/arguments'); @@ -18,7 +18,7 @@ export class RequestList extends codedBase.CodeBase { @@ -26,6 +26,8 @@ export class RequestList extends codedBase.CodeBase { @@ -34,10 +36,16 @@ export class RequestList extends codedBase.CodeBase Date: Mon, 15 May 2017 21:16:37 +0300 Subject: [PATCH 156/235] added option to create and delete build agent pools programatically --- app/exec/build/pool/create.ts | 73 +++++++++++++++++++++++++++++++++ app/exec/build/pool/default.ts | 18 ++++++++ app/exec/build/pool/delete.ts | 75 ++++++++++++++++++++++++++++++++++ package.json | 2 +- 4 files changed, 167 insertions(+), 1 deletion(-) create mode 100644 app/exec/build/pool/create.ts create mode 100644 app/exec/build/pool/default.ts create mode 100644 app/exec/build/pool/delete.ts diff --git a/app/exec/build/pool/create.ts b/app/exec/build/pool/create.ts new file mode 100644 index 00000000..8b5a69ee --- /dev/null +++ b/app/exec/build/pool/create.ts @@ -0,0 +1,73 @@ +import { TfCommand, CoreArguments } from "../../../lib/tfcommand"; +import buildContracts = require('vso-node-api/interfaces/BuildInterfaces'); +import args = require("../../../lib/arguments"); +import trace = require('../../../lib/trace'); +import fs = require('fs'); +import taskAgentContracts = require("vso-node-api/interfaces/TaskAgentInterfaces"); +import agentClient = require("vso-node-api/TaskAgentApiBase"); +import VSSInterfaces = require('vso-node-api/interfaces/common/VSSInterfaces'); + +export function getCommand(args: string[]): CreatePool { + return new CreatePool(args); +} + +export interface CreatePoolArguments extends CoreArguments { + name: args.StringArgument +} + +export class CreatePool extends TfCommand { + protected serverCommand = true; + protected description = "Create a build agent pool"; + + protected getHelpArgs(): string[] { + return ["name"]; + } + + protected setCommandArgs(): void { + super.setCommandArgs(); + + this.registerCommandArgument("name", "Name of the Build Agent Pool", "", args.StringArgument); + } + + public exec(): Promise { + var api = this.webApi.getBuildApi(); + + return Promise.all([ + this.commandArgs.name.val(), + ]).then((values) => { + const [name] = values; + var Name = name as string; + + trace.debug("Creating build agent pool %s...", name); + var agentapi: agentClient.ITaskAgentApiBase = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl().substring(0, this.connection.getCollectionUrl().lastIndexOf("/"))); + var NewPool:AP = new AP; + NewPool.name = Name; + return agentapi.addAgentPool(NewPool).then((pool) => { + return pool; + }); + }); + } + + public friendlyOutput(pool: taskAgentContracts.TaskAgentPool): void { + trace.println(); + trace.info('id : %s', pool.id); + trace.info('name : %s', pool.name); + } + +} + +class AP implements taskAgentContracts.TaskAgentPool { + id: number; + name: string; + scope: string; + administratorsGroup: VSSInterfaces.IdentityRef; + autoProvision: boolean; + createdBy: VSSInterfaces.IdentityRef; + createdOn: Date; + groupScopeId: string; + isHosted: boolean; + properties: any; + provisioned: boolean; + serviceAccountsGroup: VSSInterfaces.IdentityRef; + size: number; +} diff --git a/app/exec/build/pool/default.ts b/app/exec/build/pool/default.ts new file mode 100644 index 00000000..bae87b5c --- /dev/null +++ b/app/exec/build/pool/default.ts @@ -0,0 +1,18 @@ +import { TfCommand, CoreArguments } from "../../../lib/tfcommand"; + +export function getCommand(args: string[]): HelpCommand { + return new HelpCommand(args); +} + +export class HelpCommand extends TfCommand { + protected serverCommand = false; + protected description = "Commands for managing Build Agent Pools."; + + protected setCommandArgs(): void { + super.setCommandArgs(); + } + + public exec(cmd?: any): Promise { + return this.getHelp(cmd); + } +} diff --git a/app/exec/build/pool/delete.ts b/app/exec/build/pool/delete.ts new file mode 100644 index 00000000..8e6cd278 --- /dev/null +++ b/app/exec/build/pool/delete.ts @@ -0,0 +1,75 @@ +import { TfCommand, CoreArguments } from "../../../lib/tfcommand"; +import buildContracts = require('vso-node-api/interfaces/BuildInterfaces'); +import args = require("../../../lib/arguments"); +import trace = require('../../../lib/trace'); +import fs = require('fs'); +import taskAgentContracts = require("vso-node-api/interfaces/TaskAgentInterfaces"); +import agentClient = require("vso-node-api/TaskAgentApiBase"); +import VSSInterfaces = require('vso-node-api/interfaces/common/VSSInterfaces'); + +export function getCommand(args: string[]): CreatePool { + return new CreatePool(args); +} + +export interface DeletePoolArguments extends CoreArguments { + name: args.StringArgument +} + +export class CreatePool extends TfCommand { + protected serverCommand = true; + protected description = "Delete a build agent pool"; + + protected getHelpArgs(): string[] { + return ["id"]; + } + + protected setCommandArgs(): void { + super.setCommandArgs(); + + this.registerCommandArgument("id", "id of the Build Agent Pool", "", args.StringArgument); + } + + public exec(): Promise { + var api = this.webApi.getBuildApi(); + + return Promise.all([ + this.commandArgs.id.val(), + ]).then((values) => { + const [id] = values; + var Id = id as number; + + + var agentapi: agentClient.ITaskAgentApiBase = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl().substring(0, this.connection.getCollectionUrl().lastIndexOf("/"))); + return agentapi.getAgentPool(Id).then((pool) => { + trace.debug("found build agent pool %s...", pool.name); + return agentapi.deleteAgentPool(pool.id).then((deletedpool) => { + return pool; + }); + }); + + }); + } + + public friendlyOutput(pool: taskAgentContracts.TaskAgentPool): void { + trace.println(); + trace.info('id : %s', pool.id); + trace.info('name : %s', pool.name); + } + +} + +class AP implements taskAgentContracts.TaskAgentPool { + id: number; + name: string; + scope: string; + administratorsGroup: VSSInterfaces.IdentityRef; + autoProvision: boolean; + createdBy: VSSInterfaces.IdentityRef; + createdOn: Date; + groupScopeId: string; + isHosted: boolean; + properties: any; + provisioned: boolean; + serviceAccountsGroup: VSSInterfaces.IdentityRef; + size: number; +} diff --git a/package.json b/package.json index 5ea97945..509d0630 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tfx-cli", - "version": "0.4.6", + "version": "0.4.7", "description": "CLI for Visual Studio Team Services and Team Foundation Server", "repository": { "type": "git", From 679b9d756a233ca1e9f2f888dd30acb5b776a0be Mon Sep 17 00:00:00 2001 From: grawcho Date: Mon, 15 May 2017 21:27:19 +0300 Subject: [PATCH 157/235] add auto provision queues = true --- app/exec/build/pool/create.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/app/exec/build/pool/create.ts b/app/exec/build/pool/create.ts index 8b5a69ee..119a1aad 100644 --- a/app/exec/build/pool/create.ts +++ b/app/exec/build/pool/create.ts @@ -42,6 +42,7 @@ export class CreatePool extends TfCommand { return pool; }); From a329d8cabf6aecf6d7481806c5b4a0acd84f82b7 Mon Sep 17 00:00:00 2001 From: grawcho Date: Tue, 16 May 2017 10:33:05 +0300 Subject: [PATCH 158/235] handle the pool already exist error --- app/exec/build/pool/create.ts | 47 +++++++++++++++++++++++++++-------- 1 file changed, 36 insertions(+), 11 deletions(-) diff --git a/app/exec/build/pool/create.ts b/app/exec/build/pool/create.ts index 119a1aad..d550cfca 100644 --- a/app/exec/build/pool/create.ts +++ b/app/exec/build/pool/create.ts @@ -36,23 +36,48 @@ export class CreatePool extends TfCommand { const [name] = values; - var Name = name as string; - trace.debug("Creating build agent pool %s...", name); + trace.debug("Trying to Create build agent pool %s...", name); var agentapi: agentClient.ITaskAgentApiBase = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl().substring(0, this.connection.getCollectionUrl().lastIndexOf("/"))); - var NewPool:AP = new AP; - NewPool.name = Name; - NewPool.autoProvision = true; - return agentapi.addAgentPool(NewPool).then((pool) => { - return pool; - }); + return agentapi.getAgentPools(name).then((pools) => { + if (pools.length <= 0){ + trace.debug("build agent pool %s does not exist", name); + var NewPool: AP = new AP; + NewPool.name = name; + NewPool.autoProvision = true; + return agentapi.addAgentPool(NewPool).then((pool) => { + return pool; + }); + } else { + var exists = false; + pools.forEach((pool) => { + if (pool.name == name){ + trace.warn("Agent pool %s already exsits (id: %s)", pool.name, pool.id) + exists = true; + return pool; + } + }); + if (!exists){ + trace.debug("build agent pool %s", name); + var NewPool: AP = new AP; + NewPool.name = name; + NewPool.autoProvision = true; + return agentapi.addAgentPool(NewPool).then((pool) => { + return pool; + }); + } + + } + }) }); } public friendlyOutput(pool: taskAgentContracts.TaskAgentPool): void { - trace.println(); - trace.info('id : %s', pool.id); - trace.info('name : %s', pool.name); + if (pool) { + trace.println(); + trace.info('id : %s', pool.id); + trace.info('name : %s', pool.name); + } } } From 00a71e2fcbefba009787342f538097d94fbd1217 Mon Sep 17 00:00:00 2001 From: grawcho Date: Tue, 16 May 2017 13:20:26 +0300 Subject: [PATCH 159/235] move pools to pool\list and add pool details --- app/exec/build/pool/create.ts | 1 - app/exec/build/pool/default.ts | 1 + app/exec/build/pool/delete.ts | 1 - app/exec/build/pool/details.ts | 57 +++++++++++++++++++++++ app/exec/build/{pools.ts => pool/list.ts} | 17 ++++--- 5 files changed, 68 insertions(+), 9 deletions(-) create mode 100644 app/exec/build/pool/details.ts rename app/exec/build/{pools.ts => pool/list.ts} (69%) diff --git a/app/exec/build/pool/create.ts b/app/exec/build/pool/create.ts index d550cfca..6d73047d 100644 --- a/app/exec/build/pool/create.ts +++ b/app/exec/build/pool/create.ts @@ -1,5 +1,4 @@ import { TfCommand, CoreArguments } from "../../../lib/tfcommand"; -import buildContracts = require('vso-node-api/interfaces/BuildInterfaces'); import args = require("../../../lib/arguments"); import trace = require('../../../lib/trace'); import fs = require('fs'); diff --git a/app/exec/build/pool/default.ts b/app/exec/build/pool/default.ts index bae87b5c..86b931f8 100644 --- a/app/exec/build/pool/default.ts +++ b/app/exec/build/pool/default.ts @@ -1,4 +1,5 @@ import { TfCommand, CoreArguments } from "../../../lib/tfcommand"; +import args = require("../../../lib/arguments"); export function getCommand(args: string[]): HelpCommand { return new HelpCommand(args); diff --git a/app/exec/build/pool/delete.ts b/app/exec/build/pool/delete.ts index 8e6cd278..65bbca1a 100644 --- a/app/exec/build/pool/delete.ts +++ b/app/exec/build/pool/delete.ts @@ -1,5 +1,4 @@ import { TfCommand, CoreArguments } from "../../../lib/tfcommand"; -import buildContracts = require('vso-node-api/interfaces/BuildInterfaces'); import args = require("../../../lib/arguments"); import trace = require('../../../lib/trace'); import fs = require('fs'); diff --git a/app/exec/build/pool/details.ts b/app/exec/build/pool/details.ts new file mode 100644 index 00000000..a49cf5d3 --- /dev/null +++ b/app/exec/build/pool/details.ts @@ -0,0 +1,57 @@ +import { TfCommand, CoreArguments } from "../../../lib/tfcommand"; +import args = require("../../../lib/arguments"); +import trace = require('../../../lib/trace'); +import fs = require('fs'); +import taskAgentContracts = require("vso-node-api/interfaces/TaskAgentInterfaces"); +import agentClient = require("vso-node-api/TaskAgentApiBase"); +import VSSInterfaces = require('vso-node-api/interfaces/common/VSSInterfaces'); + +export function getCommand(args: string[]): PoolDetails { + return new PoolDetails(args); +} + +export interface PoolDetailsArguments extends CoreArguments { + id: args.IntArgument; +} + +export class PoolDetails extends TfCommand { + protected serverCommand = true; + protected description = "Create a build agent pool"; + + protected getHelpArgs(): string[] { + return ["id"]; + } + + protected setCommandArgs(): void { + super.setCommandArgs(); + + this.registerCommandArgument("id", "Id of the Build Agent Pool", "", args.IntArgument); + } + + public exec(): Promise { + var api = this.webApi.getBuildApi(); + + return Promise.all([ + this.commandArgs.id.val(), + ]).then((values) => { + const [id] = values; + var agentapi: agentClient.ITaskAgentApiBase = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl().substring(0, this.connection.getCollectionUrl().lastIndexOf("/"))); + return agentapi.getAgentPool(id).then((pool) => { + trace.debug("found build agent pool %s", pool.id); + return pool; + }); + }); + } + + public friendlyOutput(pool: taskAgentContracts.TaskAgentPool): void { + if (pool) { + trace.println(); + trace.info('id : %s', pool.id); + trace.info('name : %s', pool.name); + trace.info('auto provision: %s', pool.autoProvision); + trace.info('created by : %s', pool.createdBy.displayName); + trace.info('scope : %s', pool.scope); + trace.info('size : %s', pool.size); + } + } +} \ No newline at end of file diff --git a/app/exec/build/pools.ts b/app/exec/build/pool/list.ts similarity index 69% rename from app/exec/build/pools.ts rename to app/exec/build/pool/list.ts index fb027c1b..07f92aba 100644 --- a/app/exec/build/pools.ts +++ b/app/exec/build/pool/list.ts @@ -1,16 +1,19 @@ -import { TfCommand } from "../../lib/tfcommand"; -import args = require("../../lib/arguments"); +import { TfCommand, CoreArguments } from "../../../lib/tfcommand"; +import args = require("../../../lib/arguments"); import agentBase = require("./default"); import agentClient = require("vso-node-api/TaskAgentApiBase"); import taskAgentContracts = require("vso-node-api/interfaces/TaskAgentInterfaces"); -import trace = require("../../lib/trace"); +import trace = require("../../../lib/trace"); import taskAgentApi = require("vso-node-api/TaskAgentApi"); -export function getCommand(args: string[]): Pools { - return new Pools(args); +export function getCommand(args: string[]): List { + return new List(args); } -export class Pools extends agentBase.BuildBase { +export interface ListPoolArguments extends CoreArguments { +} + +export class List extends TfCommand { protected serverCommand = true; protected description = "Show agent pool list."; protected getHelpArgs(): string[] { @@ -18,7 +21,7 @@ export class Pools extends agentBase.BuildBase { - trace.debug("pool.exec"); + trace.debug("pools.exec"); var agentapi: agentClient.ITaskAgentApiBase = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl().substring(0,this.connection.getCollectionUrl().lastIndexOf("/"))); return agentapi.getAgentPools(); } From af42d62832bc891da05b66bce181867bcca48a30 Mon Sep 17 00:00:00 2001 From: grawcho Date: Thu, 18 May 2017 11:47:03 +0300 Subject: [PATCH 160/235] change pre-req of node 4.0.x to 7.0.x due to async await usage --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 01460316..93c85f37 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Command utility for interacting with Microsoft Team Foundation Server and Visual ## Setup -First, download and install [Node.js](http://nodejs.org) 4.0.x or later and NPM (included with the installer) +First, download and install [Node.js](http://nodejs.org) 7.0.x or later and NPM (included with the installer or from sources) ### Linux/OSX ```bash From e04fde215420ce2df3cc5c53d21824128f683118 Mon Sep 17 00:00:00 2001 From: grawcho Date: Sun, 21 May 2017 23:48:16 +0300 Subject: [PATCH 161/235] adding git repository create delete and list options, move details to pullrequest details --- app/exec/code/git/createrepo.ts | 54 +++++++++++++++++++ app/exec/code/git/default.ts | 2 + app/exec/code/git/deleterepo.ts | 41 ++++++++++++++ .../git/{details.ts => pullrequestdetails.ts} | 6 +-- app/exec/code/git/repolist.ts | 42 +++++++++++++++ package.json | 2 +- 6 files changed, 143 insertions(+), 4 deletions(-) create mode 100644 app/exec/code/git/createrepo.ts create mode 100644 app/exec/code/git/deleterepo.ts rename app/exec/code/git/{details.ts => pullrequestdetails.ts} (91%) create mode 100644 app/exec/code/git/repolist.ts diff --git a/app/exec/code/git/createrepo.ts b/app/exec/code/git/createrepo.ts new file mode 100644 index 00000000..06c8d721 --- /dev/null +++ b/app/exec/code/git/createrepo.ts @@ -0,0 +1,54 @@ +import { success, warn } from '../../../lib/trace'; +import { errLog } from '../../../lib/errorhandler'; +import args = require("../../../lib/arguments"); +import trace = require('../../../lib/trace'); +import gi = require('vso-node-api/interfaces/GitInterfaces'); +import git_Api = require('vso-node-api/GitApi') +import VSSInterfaces = require("vso-node-api/interfaces/common/VSSInterfaces"); +import codedBase = require("./default"); +import TfsCoreInterfaces = require("vso-node-api/interfaces/CoreInterfaces"); + +export function getCommand(args: string[]): CreateRepository { + return new CreateRepository(args); +} +class GR implements gi.GitRepository{ + _links: any; + defaultBranch: string; + id: string; + name: string; + project: TfsCoreInterfaces.TeamProjectReference; + remoteUrl: string; + url: string; + validRemoteUrls: string[]; +} + +export class CreateRepository extends codedBase.CodeBase { + protected serverCommand = true; + protected description = "Create a git repository"; + + protected getHelpArgs(): string[] { + return ["project", "repositoryname"]; + } + + public async exec(): Promise { + //getting variables. + var gitApi: git_Api.IGitApi = this.webApi.getGitApi(); + var project = await this.commandArgs.project.val(); + var repositoryName = await this.commandArgs.repositoryname.val(); + var NewRepo:GR = new GR; + NewRepo.name = repositoryName; + return await gitApi.createRepository(NewRepo,project); + }; + + public friendlyOutput(data: gi.GitRepository): void { + if (!data) { + throw new Error("no pull requests supplied"); + } + console.log(' '); + success('New repository created'); + trace.info('name : %s', data.name); + trace.info('id : %s', data.id); + + } + +}; diff --git a/app/exec/code/git/default.ts b/app/exec/code/git/default.ts index cd611df0..ae440db9 100644 --- a/app/exec/code/git/default.ts +++ b/app/exec/code/git/default.ts @@ -16,6 +16,7 @@ export interface CodeArguments extends CoreArguments { requeststatus: args.StringArgument; top: args.IntArgument; deletesourcebranch: args.BooleanArgument; + repositoryid: args.StringArgument; } export class CodeBase extends TfCommand { @@ -26,6 +27,7 @@ export class CodeBase extends TfComma super.setCommandArgs(); this.registerCommandArgument(["repositoryname"], "Repository name", null, args.StringArgument); + this.registerCommandArgument(["repositoryid"], "Repository id", null, args.StringArgument); this.registerCommandArgument(["source"], "Repository source branch name", null, args.StringArgument); this.registerCommandArgument(["target"], "Repository target branch name", null, args.StringArgument, null); this.registerCommandArgument(["title"], "Title", null, args.StringArgument, null); diff --git a/app/exec/code/git/deleterepo.ts b/app/exec/code/git/deleterepo.ts new file mode 100644 index 00000000..00593c31 --- /dev/null +++ b/app/exec/code/git/deleterepo.ts @@ -0,0 +1,41 @@ +import { success, warn } from '../../../lib/trace'; +import { errLog } from '../../../lib/errorhandler'; +import args = require("../../../lib/arguments"); +import trace = require('../../../lib/trace'); +import gi = require('vso-node-api/interfaces/GitInterfaces'); +import git_Api = require('vso-node-api/GitApi') +import VSSInterfaces = require("vso-node-api/interfaces/common/VSSInterfaces"); +import codedBase = require("./default"); +import TfsCoreInterfaces = require("vso-node-api/interfaces/CoreInterfaces"); + +export function getCommand(args: string[]): DeleteRepository { + return new DeleteRepository(args); +} + +export class DeleteRepository extends codedBase.CodeBase { + protected serverCommand = true; + protected description = "Create a git repository"; + + protected getHelpArgs(): string[] { + return ["project", "repositoryid"]; + } + + public async exec(): Promise { + //getting variables. + var gitApi: git_Api.IGitApi = this.webApi.getGitApi(); + var project = await this.commandArgs.project.val(); + var repositoryid = await this.commandArgs.repositoryid.val(); + return await gitApi.deleteRepository(repositoryid,project); + }; + + public friendlyOutput(data: gi.GitRepository): void { + if (!data) { + trace.warn("repository deleted"); + } else { + console.log(' '); + trace.error('unable to delte repository'); + trace.info('name : %s', data.name); + trace.info('id : %s', data.id); + } + } +}; diff --git a/app/exec/code/git/details.ts b/app/exec/code/git/pullrequestdetails.ts similarity index 91% rename from app/exec/code/git/details.ts rename to app/exec/code/git/pullrequestdetails.ts index 4a8550b5..709ea734 100644 --- a/app/exec/code/git/details.ts +++ b/app/exec/code/git/pullrequestdetails.ts @@ -9,11 +9,11 @@ import VSSInterfaces = require('vso-node-api/interfaces/common/VSSInterfaces'); import codedBase = require('./default'); var repositoryName; -export function getCommand(args: string[]): RequestList { - return new RequestList(args); +export function getCommand(args: string[]): RequestDetails { + return new RequestDetails(args); } -export class RequestList extends codedBase.CodeBase { +export class RequestDetails extends codedBase.CodeBase { protected serverCommand = true; protected description = "Get a list of pull requests"; diff --git a/app/exec/code/git/repolist.ts b/app/exec/code/git/repolist.ts new file mode 100644 index 00000000..b2e5c081 --- /dev/null +++ b/app/exec/code/git/repolist.ts @@ -0,0 +1,42 @@ +import { success, warn } from '../../../lib/trace'; +import { errLog } from '../../../lib/errorhandler'; +import args = require("../../../lib/arguments"); +import trace = require('../../../lib/trace'); +import gi = require('vso-node-api/interfaces/GitInterfaces'); +import git_Api = require('vso-node-api/GitApi') +import VSSInterfaces = require("vso-node-api/interfaces/common/VSSInterfaces"); +import codedBase = require("./default"); +import TfsCoreInterfaces = require("vso-node-api/interfaces/CoreInterfaces"); + +export function getCommand(args: string[]): ListRepositories { + return new ListRepositories(args); +} + +export class ListRepositories extends codedBase.CodeBase { + protected serverCommand = true; + protected description = "Create a git repository"; + + protected getHelpArgs(): string[] { + return ["project"]; + } + + public async exec(): Promise { + //getting variables. + var gitApi: git_Api.IGitApi = this.webApi.getGitApi(); + var project = await this.commandArgs.project.val(); + return await gitApi.getRepositories(project); + }; + + public friendlyOutput(data: gi.GitRepository[]): void { + if (!data) { + throw new Error("no repository supplied"); + } + console.log(' '); + data.forEach((repo) =>{ + trace.println(); + trace.info('name : %s', repo.name); + trace.info('id : %s', repo.id); + }); + } + +}; diff --git a/package.json b/package.json index 509d0630..51fee55d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tfx-cli", - "version": "0.4.7", + "version": "0.4.8", "description": "CLI for Visual Studio Team Services and Team Foundation Server", "repository": { "type": "git", From f9acd0d50458489d623656f446088a1c34a339d2 Mon Sep 17 00:00:00 2001 From: grawcho Date: Sun, 21 May 2017 23:52:32 +0300 Subject: [PATCH 162/235] change details to requestdetails --- app/exec/code/git/{pullrequestdetails.ts => requestdetails.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename app/exec/code/git/{pullrequestdetails.ts => requestdetails.ts} (100%) diff --git a/app/exec/code/git/pullrequestdetails.ts b/app/exec/code/git/requestdetails.ts similarity index 100% rename from app/exec/code/git/pullrequestdetails.ts rename to app/exec/code/git/requestdetails.ts From bd7bde467c3056063b6b5e73a4939c73218d2f2c Mon Sep 17 00:00:00 2001 From: "Shpigelman, StasX" Date: Mon, 22 May 2017 17:31:22 +0300 Subject: [PATCH 163/235] Delete agent from pool --- app/exec/build/agent.ts | 122 ++++++++++++++++++++++---------------- app/exec/build/default.ts | 2 + 2 files changed, 72 insertions(+), 52 deletions(-) diff --git a/app/exec/build/agent.ts b/app/exec/build/agent.ts index 1531dd74..13d5cc01 100644 --- a/app/exec/build/agent.ts +++ b/app/exec/build/agent.ts @@ -11,16 +11,16 @@ export function getCommand(args: string[]): Agent { } export class Agent extends agentBase.BuildBase { - protected serverCommand = true; + protected serverCommand = true; protected description = "Show / Update task agent details."; protected getHelpArgs(): string[] { - return ["poolId","agentId", "agentName","userCapabilityKey","userCapabilityValue","disable","parallel"]; + return ["poolId", "agentId", "agentName", "userCapabilityKey", "userCapabilityValue", "disable", "delete", "parallel"]; } public exec(): Promise { trace.debug("agent.exec"); - var agentapi: agentClient.ITaskAgentApiBase = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl().substring(0,this.connection.getCollectionUrl().lastIndexOf("/"))); + var agentapi: agentClient.ITaskAgentApiBase = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl().substring(0, this.connection.getCollectionUrl().lastIndexOf("/"))); return Promise.all([ this.commandArgs.agentId.val(), this.commandArgs.agentName.val(), @@ -28,25 +28,26 @@ export class Agent extends agentBase.BuildBase { - const [agentid, agentname, pool, newkey, value, disable, maxParallel] = values; + const [agentid, agentname, pool, newkey, value, disable, deleteAgent, maxParallel] = values; var agents: number[] = null; - trace.debug("getting pool : %s",pool); + trace.debug("getting pool : %s", pool); trace.debug("getting agent (id) : %s", agentid); trace.debug("getting agent (name) : %s", agentname); var include: boolean = true; if (agentid) { agents = [agentid as number]; } - else if(agentname) { + else if (agentname) { trace.debug("No agent Id provided, checking for agent with name " + agentname); return agentapi.getAgents(pool as number, agentname as string).then((ao: taskAgentContracts.TaskAgent[]) => { - if(ao.length > 0) { + if (ao.length > 0) { var aid = ao[0].id; var an = ao[0].name; - trace.debug("found, agent id %s for agent name %s",aid, an); - return this._getOrUpdateAgent(agentapi, pool as number,aid,newkey as string,value as string,include,disable as string, maxParallel as number ); + trace.debug("found, agent id %s for agent name %s", aid, an); + return this._getOrUpdateAgent(agentapi, pool as number, aid, newkey as string, value as string, include, disable as string, deleteAgent as string, maxParallel as number); } else { trace.debug("No agents found with name " + agentname); @@ -54,68 +55,85 @@ export class Agent extends agentBase.BuildBase { - trace.debug("disable request: %s",disable); + private _getOrUpdateAgent(agentapi: agentClient.ITaskAgentApiBase, pool: number, agentid: number, newkey: string, value: string, include: boolean, disable: string, deleteAgent: string, Parallel: number) { + return agentapi.getAgent(pool, agentid, true, true, null).then((agent) => { + trace.debug("disable request: %s", disable); if (Parallel) { agent.maxParallelism = Parallel; agentapi.updateAgent(agent, pool, agentid); } + if (deleteAgent) { + if (deleteAgent == "true") { + return agentapi.deleteAgent(pool, agentid).then(() => { + trace.debug("agent set for deletion : %s"); + agent.id = null; + return agent; + }) + } + if (deleteAgent != "true") { + trace.error("allowed value is [true] only!") + } + } if (disable) { if (disable == "true") { - include = false; - trace.debug("agent status (enabled): %s",agent.enabled); - agent.enabled = false; - agentapi.updateAgent(agent,pool,agentid); - trace.debug("agent status (enabled): %s",agent.enabled); - } + include = false; + trace.debug("agent status (enabled): %s", agent.enabled); + agent.enabled = false; + agentapi.updateAgent(agent, pool, agentid); + trace.debug("agent status (enabled): %s", agent.enabled); + } if (disable == "false") { - include = false; - trace.debug("agent status (enabled): %s",agent.enabled); - agent.enabled = true; - agentapi.updateAgent(agent,pool,agentid); - trace.debug("agent status (enabled): %s",agent.enabled); - } + include = false; + trace.debug("agent status (enabled): %s", agent.enabled); + agent.enabled = true; + agentapi.updateAgent(agent, pool, agentid); + trace.debug("agent status (enabled): %s", agent.enabled); + } if (disable != "true" && disable != "false") { - trace.error("allowed values are [true] or [false]!") + trace.error("allowed values are [true] or [false]!") } } if (newkey) { include = false; - var capabilities: { [key: string] : string; } = agent.userCapabilities; - capabilities[newkey] = value; - agentapi.updateAgentUserCapabilities(capabilities,pool,agentid); - }; - return agentapi.getAgent(pool,agentid,include,include,null); - }); + var capabilities: { [key: string]: string; } = agent.userCapabilities; + capabilities[newkey] = value; + agentapi.updateAgentUserCapabilities(capabilities, pool, agentid); + }; + return agentapi.getAgent(pool, agentid, include, include, null) + }); } } \ No newline at end of file diff --git a/app/exec/build/default.ts b/app/exec/build/default.ts index c689d8ca..57365b1f 100644 --- a/app/exec/build/default.ts +++ b/app/exec/build/default.ts @@ -18,6 +18,7 @@ export interface BuildArguments extends CoreArguments { userCapabilityValue: args.StringArgument; demands: args.StringArgument; disable: args.StringArgument; + deleteAgent: args.StringArgument; wait: args.BooleanArgument; timeout: args.IntArgument; parallel: args.IntArgument; @@ -50,6 +51,7 @@ export class BuildBase extends TfCom this.registerCommandArgument("userCapabilityValue", "Value to add / edit", "Value to add / edit to the Agent User Capabilities.", args.StringArgument,null); this.registerCommandArgument("demands","Build demand key","Demands string [semi-colon separator] for Queued Build [key / key -equals value].",args.StringArgument,null); this.registerCommandArgument("disable","disable / enable agent","Update the agent status.",args.StringArgument,null); + this.registerCommandArgument("deleteAgent", "deleteagent", "Delete an agent.", args.StringArgument, null); this.registerCommandArgument("wait","wait for the build","wait for the triggered build",args.BooleanArgument,"false"); this.registerCommandArgument("timeout","max time to wait","Maximum time to wait for the build to complete (in seconds).",args.IntArgument,"0"); this.registerCommandArgument("parallel", "max agent parallelism", "Maximum parallel agent runs.", args.IntArgument, null); From 4e1fef832d82b2785636aea2db7b367be8a3b1f2 Mon Sep 17 00:00:00 2001 From: grawcho Date: Mon, 22 May 2017 19:59:18 +0300 Subject: [PATCH 164/235] fix help for delete-agent --- app/exec/build/agent.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/exec/build/agent.ts b/app/exec/build/agent.ts index 13d5cc01..2b60c62c 100644 --- a/app/exec/build/agent.ts +++ b/app/exec/build/agent.ts @@ -15,7 +15,7 @@ export class Agent extends agentBase.BuildBase { From 999f8c46b1f640d34a92fb8f32068471a2e7d62e Mon Sep 17 00:00:00 2001 From: "Shpigelman, StasX" Date: Tue, 23 May 2017 16:14:16 +0300 Subject: [PATCH 165/235] auto complete for new request + option to delete source --- app/exec/code/git/complete.ts | 16 +++++++-------- app/exec/code/git/default.ts | 2 ++ app/exec/code/git/pullrequest.ts | 34 +++++++++++++++++++++++++------- 3 files changed, 37 insertions(+), 15 deletions(-) diff --git a/app/exec/code/git/complete.ts b/app/exec/code/git/complete.ts index 709c0fec..b472b27c 100644 --- a/app/exec/code/git/complete.ts +++ b/app/exec/code/git/complete.ts @@ -17,7 +17,7 @@ export class Complete extends codedBase.CodeBase protected serverCommand = true; protected description = "Complete a pull request"; protected getHelpArgs(): string[] { - return ["project", "repositoryname", "pullrequestname", "pullrequestid","deletesourcebranch"]; + return ["project", "repositoryname", "pullrequestname", "pullrequestid", "deletesourcebranch"]; } public async exec(): Promise { var gitApi: git_Api.IGitApi = this.webApi.getGitApi(); @@ -72,8 +72,8 @@ export class Complete extends codedBase.CodeBase var updatedPullRequest: GR = new GR; updatedPullRequest.lastMergeSourceCommit = myPullRequest.lastMergeSourceCommit; updatedPullRequest.status = 3; //completed; - var completionOptions:CO = new CO; - if (delSources){ + var completionOptions: CO = new CO; + if (delSources) { trace.debug('delete source branch option selected') completionOptions.deleteSourceBranch = delSources updatedPullRequest.completionOptions = completionOptions; @@ -128,8 +128,8 @@ class GR implements gi.GitPullRequest { url: string; workItemRefs: VSSInterfaces.ResourceRef[]; } - class CO implements gi.GitPullRequestCompletionOptions { - deleteSourceBranch: boolean; - mergeCommitMessage: string; - squashMerge: boolean; - } \ No newline at end of file +class CO implements gi.GitPullRequestCompletionOptions { + deleteSourceBranch: boolean; + mergeCommitMessage: string; + squashMerge: boolean; +} \ No newline at end of file diff --git a/app/exec/code/git/default.ts b/app/exec/code/git/default.ts index ae440db9..c23e073d 100644 --- a/app/exec/code/git/default.ts +++ b/app/exec/code/git/default.ts @@ -17,6 +17,7 @@ export interface CodeArguments extends CoreArguments { top: args.IntArgument; deletesourcebranch: args.BooleanArgument; repositoryid: args.StringArgument; + autocomplete: args.BooleanArgument; } export class CodeBase extends TfCommand { @@ -36,6 +37,7 @@ export class CodeBase extends TfComma this.registerCommandArgument(["top"], "Number of results to get", null, args.IntArgument, null); this.registerCommandArgument(["requeststatus"], "filter by status (Active, Abandoned, Completed, All)", null, args.StringArgument, null); this.registerCommandArgument(["deletesourcebranch"], "delete source branch", "delete source branch on successfull merge",args.BooleanArgument,null); + this.registerCommandArgument(["autocomplete"], "Auto Complete", "Set auto completion for a new pull request.", args.BooleanArgument, null); } public exec(cmd?: any): Promise { return this.getHelp(cmd); diff --git a/app/exec/code/git/pullrequest.ts b/app/exec/code/git/pullrequest.ts index 0fc4ab8c..9eac90f1 100644 --- a/app/exec/code/git/pullrequest.ts +++ b/app/exec/code/git/pullrequest.ts @@ -19,7 +19,7 @@ class GR implements gi.GitPullRequest { closedDate: Date; codeReviewId: number; commits: gi.GitCommitRef[]; - completionOptions: gi.GitPullRequestCompletionOptions; + completionOptions: completionOptions = new completionOptions; completionQueueTime: Date; createdBy: VSSInterfaces.IdentityRef; creationDate: Date; @@ -42,12 +42,18 @@ class GR implements gi.GitPullRequest { workItemRefs: VSSInterfaces.ResourceRef[]; } +class completionOptions implements gi.GitPullRequestCompletionOptions { + deleteSourceBranch: boolean; + mergeCommitMessage: string; + squashMerge: boolean;; +} + export class PullRequest extends codedBase.CodeBase { protected serverCommand = true; protected description = "Create a pull request"; protected getHelpArgs(): string[] { - return ["project", "repositoryname", 'source', 'target', 'title']; + return ["project", "repositoryname", 'source', 'target', 'title', 'autocomplete', 'deletesourcebranch']; } public async exec(): Promise { @@ -58,6 +64,8 @@ export class PullRequest extends codedBase.CodeBase Date: Sun, 28 May 2017 14:44:12 +0300 Subject: [PATCH 166/235] test CI in VSTS --- artifactory-deploy.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/artifactory-deploy.sh b/artifactory-deploy.sh index d6dc7e69..fb9d8078 100755 --- a/artifactory-deploy.sh +++ b/artifactory-deploy.sh @@ -98,3 +98,4 @@ STATUSCODE=$(curl --progress-bar -i -X PUT -u $ARTIFACTORY_USER:$ARTIFACTORY_PAS fail_if '[[ "$STATUSCODE" -ne "201" ]]' "Upload failed: http status $STATUSCODE" echo "Upload successfull!" +# generic comment to check CI \ No newline at end of file From 799a257462b58e178594d417028c5219c53e32fa Mon Sep 17 00:00:00 2001 From: grawcho Date: Thu, 1 Jun 2017 18:09:46 +0300 Subject: [PATCH 167/235] add vsts build badge to README --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 93c85f37..d82994ec 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ # Cross-platform CLI for Team Foundation Server and Visual Studio Team Services + [![NPM version](https://badge.fury.io/js/tfx-cli.svg)](http://badge.fury.io/js/tfx-cli) +[![build passing](https://intel-realsense.visualstudio.com/_apis/public/build/definitions/bb6e275d-d07a-4daa-a38c-d7e1470a9df3/2164/badge)](https://intel-realsense.visualstudio.com/_apis/public/build/definitions/bb6e275d-d07a-4daa-a38c-d7e1470a9df3/2164/badge) Command utility for interacting with Microsoft Team Foundation Server and Visual Studio Team Services. It is cross platform and supported on Windows, OS X, and Linux. From 7140b21a0f57a228650e5c6be0830b537a303735 Mon Sep 17 00:00:00 2001 From: grawcho Date: Thu, 1 Jun 2017 18:16:15 +0300 Subject: [PATCH 168/235] add some relevant additonal badges --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d82994ec..10db6677 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,10 @@ [![NPM version](https://badge.fury.io/js/tfx-cli.svg)](http://badge.fury.io/js/tfx-cli) -[![build passing](https://intel-realsense.visualstudio.com/_apis/public/build/definitions/bb6e275d-d07a-4daa-a38c-d7e1470a9df3/2164/badge)](https://intel-realsense.visualstudio.com/_apis/public/build/definitions/bb6e275d-d07a-4daa-a38c-d7e1470a9df3/2164/badge) +### Pull Request validation +[![PR Validation passing](https://intel-realsense.visualstudio.com/_apis/public/build/definitions/bb6e275d-d07a-4daa-a38c-d7e1470a9df3/2164/badge)](https://intel-realsense.visualstudio.com/_apis/public/build/definitions/bb6e275d-d07a-4daa-a38c-d7e1470a9df3/2164/badge) +### Internal Deploy +[![build passing](https://intel-realsense.visualstudio.com/_apis/public/build/definitions/bb6e275d-d07a-4daa-a38c-d7e1470a9df3/1612/badge)](https://intel-realsense.visualstudio.com/_apis/public/build/definitions/bb6e275d-d07a-4daa-a38c-d7e1470a9df3/1612/badge) Command utility for interacting with Microsoft Team Foundation Server and Visual Studio Team Services. It is cross platform and supported on Windows, OS X, and Linux. From b7361ef5f1ccd53aebb1c9031210567b947a05d5 Mon Sep 17 00:00:00 2001 From: grawcho Date: Thu, 1 Jun 2017 18:17:13 +0300 Subject: [PATCH 169/235] add some relevant additonal badges change caps --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 10db6677..17562e16 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@ [![NPM version](https://badge.fury.io/js/tfx-cli.svg)](http://badge.fury.io/js/tfx-cli) -### Pull Request validation +#### Pull Request validation [![PR Validation passing](https://intel-realsense.visualstudio.com/_apis/public/build/definitions/bb6e275d-d07a-4daa-a38c-d7e1470a9df3/2164/badge)](https://intel-realsense.visualstudio.com/_apis/public/build/definitions/bb6e275d-d07a-4daa-a38c-d7e1470a9df3/2164/badge) -### Internal Deploy +#### Internal Deploy [![build passing](https://intel-realsense.visualstudio.com/_apis/public/build/definitions/bb6e275d-d07a-4daa-a38c-d7e1470a9df3/1612/badge)](https://intel-realsense.visualstudio.com/_apis/public/build/definitions/bb6e275d-d07a-4daa-a38c-d7e1470a9df3/1612/badge) Command utility for interacting with Microsoft Team Foundation Server and Visual Studio Team Services. It is cross platform and supported on Windows, OS X, and Linux. From c9706d5bb4608667122e9853e39b518e325db359 Mon Sep 17 00:00:00 2001 From: grawcho Date: Thu, 1 Jun 2017 18:35:24 +0300 Subject: [PATCH 170/235] upstream sync --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 17562e16..da3e0734 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,5 @@ # Cross-platform CLI for Team Foundation Server and Visual Studio Team Services - [![NPM version](https://badge.fury.io/js/tfx-cli.svg)](http://badge.fury.io/js/tfx-cli) #### Pull Request validation [![PR Validation passing](https://intel-realsense.visualstudio.com/_apis/public/build/definitions/bb6e275d-d07a-4daa-a38c-d7e1470a9df3/2164/badge)](https://intel-realsense.visualstudio.com/_apis/public/build/definitions/bb6e275d-d07a-4daa-a38c-d7e1470a9df3/2164/badge) From 4b7d07764ca4f0a17c519680e7a5f3c1feff94b4 Mon Sep 17 00:00:00 2001 From: Stas Date: Thu, 1 Jun 2017 18:46:21 +0300 Subject: [PATCH 171/235] Dummy Commit --- app/exec/code/git/abandon.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/exec/code/git/abandon.ts b/app/exec/code/git/abandon.ts index 79a46ec7..223b50d4 100644 --- a/app/exec/code/git/abandon.ts +++ b/app/exec/code/git/abandon.ts @@ -85,7 +85,7 @@ export class Abandon extends codedBase.CodeBase { } }; - +//Classes class GR implements gi.GitPullRequest { _links: any; artifactId: string; From 70f6bf516e3542902c2db8fe501e91bb9db62791 Mon Sep 17 00:00:00 2001 From: grawcho Date: Wed, 21 Jun 2017 23:23:31 +0300 Subject: [PATCH 172/235] fix typings and add resource create from upstream --- app/exec/extension/resources/create.ts | 48 +++++++++++++ typings/console/console.d.ts | 31 -------- typings/copy-paste/copy-paste.d.ts | 46 ------------ typings/minimatch/minimatch.d.ts | 64 ----------------- typings/mkdirp/mkdirp.d.ts | 15 ---- typings/xml2js/xml2js.d.ts | 99 -------------------------- 6 files changed, 48 insertions(+), 255 deletions(-) create mode 100644 app/exec/extension/resources/create.ts delete mode 100644 typings/console/console.d.ts delete mode 100644 typings/copy-paste/copy-paste.d.ts delete mode 100644 typings/minimatch/minimatch.d.ts delete mode 100644 typings/mkdirp/mkdirp.d.ts delete mode 100644 typings/xml2js/xml2js.d.ts diff --git a/app/exec/extension/resources/create.ts b/app/exec/extension/resources/create.ts new file mode 100644 index 00000000..6ffa5c28 --- /dev/null +++ b/app/exec/extension/resources/create.ts @@ -0,0 +1,48 @@ +import { Merger } from "../_lib/merger"; +import { TfCommand } from "../../../lib/tfcommand"; +import { VsixWriter } from "../_lib/vsix-writer"; +import * as Loc from "../_lib/loc"; +import colors = require("colors"); +import extBase = require("../default"); +import trace = require('../../../lib/trace'); + +export function getCommand(args: string[]): TfCommand { + return new GenerateExtensionResources(args); +} + +export interface GenResourcesResult { + resjsonPath: string; +} + +export class GenerateExtensionResources extends extBase.ExtensionBase { + protected description = "Create a vsix package for an extension."; + protected serverCommand = false; + + constructor(passedArgs: string[]) { + super(passedArgs); + } + + protected getHelpArgs(): string[] { + return ["root", "manifests", "manifestGlobs", "override", "overridesFile", "revVersion", "bypassValidation", "publisher", "extensionId", "outputPath", "locRoot"]; + } + + public exec(): Promise { + return this.getMergeSettings().then(mergeSettings => { + return this.getPackageSettings().then(packageSettings => { + return new Merger(mergeSettings).merge().then(components => { + const writer = new VsixWriter(packageSettings, components); + const resjsonPath = writer.getOutputPath(packageSettings.outputPath, "resjson"); + Loc.LocPrep.writeResourceFile(resjsonPath, components.resources.combined); + return { + resjsonPath: writer.getOutputPath(packageSettings.outputPath, "resjson") + }; + }); + }); + }); + } + + protected friendlyOutput(data: GenResourcesResult): void { + trace.info(colors.green("\n=== Completed operation: generate extension resources ===")); + trace.info(" - .resjson: %s", data.resjsonPath); + } +} \ No newline at end of file diff --git a/typings/console/console.d.ts b/typings/console/console.d.ts deleted file mode 100644 index b7a07ff7..00000000 --- a/typings/console/console.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -// see vertx-js/util/console.js - -/** - * A simple console object that can be used to print log messages - * errors, and warnings. - * @example - * - * console.log('Hello standard out'); - * console.warn('Warning standard error'); - * console.error('Alert! Alert!'); - * - */ -interface Console { - /** - * Log the msg to STDOUT. - * @param msg The message to log to standard out. - */ - log(msg: any); - - /** - * Log the msg to STDERR - * @param msg The message to log with a warning to standard error. - */ - warn(msg: any); - - /** - * Log the msg to STDERR - * @param msg The message to log with a warning alert to standard error. - */ - error(msg: any); -} \ No newline at end of file diff --git a/typings/copy-paste/copy-paste.d.ts b/typings/copy-paste/copy-paste.d.ts deleted file mode 100644 index a8a844b5..00000000 --- a/typings/copy-paste/copy-paste.d.ts +++ /dev/null @@ -1,46 +0,0 @@ -// Type definitions for copy-paste v1.1.3 -// Project: https://github.com/xavi-/node-copy-paste -// Definitions by: Tobias Kahlert -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -declare module 'copy-paste' { - - export type CopyCallback = (err: Error) => void; - export type PasteCallback = (err: Error, content: string) => void; - - /** - * Asynchronously replaces the current contents of the clip board with text. - * - * @param {T} content Takes either a string, array, object, or readable stream. - * @return {T} Returns the same value passed in. - */ - export function copy(content: T): T; - - /** - * Asynchronously replaces the current contents of the clip board with text. - * - * @param {T} content Takes either a string, array, object, or readable stream. - * @param {CopyCallback} callback will fire when the copy operation is complete. - * @return {T} Returns the same value passed in. - */ - export function copy(content: T, callback: CopyCallback): T; - - - /** - * Synchronously returns the current contents of the system clip board. - * - * Note: The synchronous version of paste is not always availabled. - * An error message is shown if the synchronous version of paste is used on an unsupported platform. - * The asynchronous version of paste is always available. - * - * @return {string} Returns the current contents of the system clip board. - */ - export function paste(): string; - - /** - * Asynchronously returns the current contents of the system clip board. - * - * @param {PasteCallback} callback The contents of the system clip board are passed to the callback as the second parameter. - */ - export function paste(callback: PasteCallback): void; -} \ No newline at end of file diff --git a/typings/minimatch/minimatch.d.ts b/typings/minimatch/minimatch.d.ts deleted file mode 100644 index 5a6c7215..00000000 --- a/typings/minimatch/minimatch.d.ts +++ /dev/null @@ -1,64 +0,0 @@ -// Type definitions for Minimatch 2.0.8 -// Project: https://github.com/isaacs/minimatch -// Definitions by: vvakame -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -declare module "minimatch" { - - function M(target: string, pattern: string, options?: M.IOptions): boolean; - - namespace M { - function match(list: string[], pattern: string, options?: IOptions): string[]; - function filter(pattern: string, options?: IOptions): (element: string, indexed: number, array: string[]) => boolean; - function makeRe(pattern: string, options?: IOptions): RegExp; - - var Minimatch: IMinimatchStatic; - - interface IOptions { - debug?: boolean; - nobrace?: boolean; - noglobstar?: boolean; - dot?: boolean; - noext?: boolean; - nocase?: boolean; - nonull?: boolean; - matchBase?: boolean; - nocomment?: boolean; - nonegate?: boolean; - flipNegate?: boolean; - } - - interface IMinimatchStatic { - new (pattern: string, options?: IOptions): IMinimatch; - prototype: IMinimatch; - } - - interface IMinimatch { - pattern: string; - options: IOptions; - /** 2-dimensional array of regexp or string expressions. */ - set: any[][]; // (RegExp | string)[][] - regexp: RegExp; - negate: boolean; - comment: boolean; - empty: boolean; - - makeRe(): RegExp; // regexp or boolean - match(fname: string): boolean; - matchOne(files: string[], pattern: string[], partial: boolean): boolean; - - /** Deprecated. For internal use. */ - debug(): void; - /** Deprecated. For internal use. */ - make(): void; - /** Deprecated. For internal use. */ - parseNegate(): void; - /** Deprecated. For internal use. */ - braceExpand(pattern: string, options: IOptions): void; - /** Deprecated. For internal use. */ - parse(pattern: string, isSub?: boolean): void; - } - } - - export = M; -} diff --git a/typings/mkdirp/mkdirp.d.ts b/typings/mkdirp/mkdirp.d.ts deleted file mode 100644 index cd635ab4..00000000 --- a/typings/mkdirp/mkdirp.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -// Type definitions for mkdirp 0.3.0 -// Project: http://github.com/substack/node-mkdirp -// Definitions by: Bart van der Schoor -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -declare module 'mkdirp' { - - function mkdirp(dir: string, cb: (err: any, made: string) => void): void; - function mkdirp(dir: string, flags: any, cb: (err: any, made: string) => void): void; - - namespace mkdirp { - function sync(dir: string, flags?: any): string; - } - export = mkdirp; -} diff --git a/typings/xml2js/xml2js.d.ts b/typings/xml2js/xml2js.d.ts deleted file mode 100644 index 5fb4542d..00000000 --- a/typings/xml2js/xml2js.d.ts +++ /dev/null @@ -1,99 +0,0 @@ -// Type definitions for node-xml2js -// Project: https://github.com/Leonidas-from-XIV/node-xml2js -// Definitions by: Michel Salib , Jason McNeil , Christopher Currens -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -declare module 'xml2js' { - - export = xml2js; - - namespace xml2js { - function parseString(xml: string, callback: (err: any, result: any) => void): void; - function parseString(xml: string, options: Options, callback: (err: any, result: any) => void): void; - - var defaults: { - '0.1': Options; - '0.2': OptionsV2; - } - - class Builder { - constructor(options?: BuilderOptions); - buildObject(rootObj: any): string; - } - - class Parser { - constructor(options?: Options); - processAsync(): any; - assignOrPush(obj: any, key: string, newValue: any): any; - reset(): any; - parseString(str: string , cb?: Function): void; - } - - interface RenderOptions { - indent?: string; - newline?: string; - pretty?: boolean; - } - - interface XMLDeclarationOptions { - encoding?: string; - standalone?: boolean; - version?: string; - } - - interface BuilderOptions { - doctype?: any; - headless?: boolean; - indent?: string; - newline?: string; - pretty?: boolean; - renderOpts?: RenderOptions; - rootName?: string; - xmldec?: XMLDeclarationOptions; - } - - interface Options { - async?: boolean; - attrkey?: string; - attrNameProcessors?: [(name: string) => string]; - attrValueProcessors?: [(name: string) => string]; - charkey?: string; - charsAsChildren?: boolean; - childkey?: string; - emptyTag?: any; - explicitArray?: boolean; - explicitCharkey?: boolean; - explicitChildren?: boolean; - explicitRoot?: boolean; - ignoreAttrs?: boolean; - mergeAttrs?: boolean; - normalize?: boolean; - normalizeTags?: boolean; - strict?: boolean; - tagNameProcessors?: [(name: string) => string]; - trim?: boolean; - validator?: Function; - valueProcessors?: [(name: string) => string]; - xmlns?: boolean; - } - - interface OptionsV2 extends Options { - preserveChildrenOrder?: boolean; - rootName?: string; - xmldec?: { - version: string; - encoding?: string; - standalone?: boolean; - }; - doctype?: any; - renderOpts?: { - pretty?: boolean; - indent?: string; - newline?: string; - }; - headless?: boolean; - chunkSize?: number; - cdata?: boolean; - } - } -} From 58b6cd62cd5da18c0297acb144c262bf4e81913e Mon Sep 17 00:00:00 2001 From: Feldman Date: Thu, 22 Jun 2017 12:41:45 +0300 Subject: [PATCH 173/235] lock typescript version to 2.2.2 due to compilation errors with 2.4.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f0d67506..1bde0c2d 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,7 @@ "@types/xml2js": "0.0.27", "ncp": "^2.0.0", "rimraf": "^2.6.1", - "typescript": "^2.2.1", + "typescript": "2.2.2", "webpack": "^1.13.2" }, "author": "", From 7aa2e798e32903528dc17652efd85af53b6fee2f Mon Sep 17 00:00:00 2001 From: grawcho Date: Thu, 22 Jun 2017 15:37:16 +0300 Subject: [PATCH 174/235] add package-lock.json to git ignore to ignore npm i generated config --- .gitignore | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.gitignore b/.gitignore index 1b7b0db0..587fb5ce 100644 --- a/.gitignore +++ b/.gitignore @@ -36,3 +36,8 @@ node_modules # Generated by nexe tmp/ + +# ignore npm i generated package-lock.json +package-lock.json + + From ae41c4240ecd81e9c52c0d69a988488c67c66d0f Mon Sep 17 00:00:00 2001 From: Mois Date: Thu, 6 Jul 2017 11:12:54 +0300 Subject: [PATCH 175/235] fix new capability when key does not exist --- app/exec/build/agent.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/exec/build/agent.ts b/app/exec/build/agent.ts index 2b60c62c..dee2ef58 100644 --- a/app/exec/build/agent.ts +++ b/app/exec/build/agent.ts @@ -130,8 +130,12 @@ export class Agent extends agentBase.BuildBase Date: Mon, 10 Jul 2017 14:49:12 +0300 Subject: [PATCH 176/235] waiting for requests --- app/exec/build/agent.ts | 42 +++++++++++++++++++++++++++++---------- app/exec/build/default.ts | 4 +++- 2 files changed, 35 insertions(+), 11 deletions(-) diff --git a/app/exec/build/agent.ts b/app/exec/build/agent.ts index dee2ef58..06d5851d 100644 --- a/app/exec/build/agent.ts +++ b/app/exec/build/agent.ts @@ -10,18 +10,19 @@ export function getCommand(args: string[]): Agent { return new Agent(args); } + export class Agent extends agentBase.BuildBase { protected serverCommand = true; protected description = "Show / Update task agent details."; protected getHelpArgs(): string[] { - return ["poolId", "agentId", "agentName", "userCapabilityKey", "userCapabilityValue", "disable", "deleteAgent", "parallel"]; + return ["poolId", "agentId", "agentName", "userCapabilityKey", "userCapabilityValue", "disable", "deleteAgent", "parallel", "waitForActiveRequests"]; } public exec(): Promise { trace.debug("agent.exec"); var agentapi: agentClient.ITaskAgentApiBase = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl().substring(0, this.connection.getCollectionUrl().lastIndexOf("/"))); - return Promise.all([ + return Promise.all([ this.commandArgs.agentId.val(), this.commandArgs.agentName.val(), this.commandArgs.poolId.val(), @@ -29,9 +30,10 @@ export class Agent extends agentBase.BuildBase { - const [agentid, agentname, pool, newkey, value, disable, deleteAgent, maxParallel] = values; + const [agentid, agentname, pool, newkey, value, disable, deleteAgent, maxParallel, waitForActiveRequests] = values; var agents: number[] = null; trace.debug("getting pool : %s", pool); trace.debug("getting agent (id) : %s", agentid); @@ -47,16 +49,18 @@ export class Agent extends agentBase.BuildBase { trace.debug("disable request: %s", disable); if (Parallel) { @@ -132,11 +136,29 @@ export class Agent extends agentBase.BuildBase { @@ -55,7 +56,8 @@ export class BuildBase extends TfCom this.registerCommandArgument("wait","wait for the build","wait for the triggered build",args.BooleanArgument,"false"); this.registerCommandArgument("timeout","max time to wait","Maximum time to wait for the build to complete (in seconds).",args.IntArgument,"0"); this.registerCommandArgument("parallel", "max agent parallelism", "Maximum parallel agent runs.", args.IntArgument, null); - } + this.registerCommandArgument("waitForActiveRequests", "Wait For Active Requests", "Waiting for active Agent jobs / requests", args.BooleanArgument, "true"); +} public exec(cmd?: any): Promise { return this.getHelp(cmd); From 516d039adc7808af256ffc448776f222419536f7 Mon Sep 17 00:00:00 2001 From: Mois Date: Tue, 11 Jul 2017 09:20:31 +0300 Subject: [PATCH 177/235] .. --- app/exec/build/default.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/exec/build/default.ts b/app/exec/build/default.ts index fd6813d0..b67e1e53 100644 --- a/app/exec/build/default.ts +++ b/app/exec/build/default.ts @@ -56,7 +56,7 @@ export class BuildBase extends TfCom this.registerCommandArgument("wait","wait for the build","wait for the triggered build",args.BooleanArgument,"false"); this.registerCommandArgument("timeout","max time to wait","Maximum time to wait for the build to complete (in seconds).",args.IntArgument,"0"); this.registerCommandArgument("parallel", "max agent parallelism", "Maximum parallel agent runs.", args.IntArgument, null); - this.registerCommandArgument("waitForActiveRequests", "Wait For Active Requests", "Waiting for active Agent jobs / requests", args.BooleanArgument, "true"); + this.registerCommandArgument("waitForActiveRequests", "Wait For Active Requests", "Waiting for active Agent jobs / requests", args.BooleanArgument, "false"); } public exec(cmd?: any): Promise { From c048afc1243d8092aeb48a4e536788998a2f53cb Mon Sep 17 00:00:00 2001 From: David g Date: Tue, 11 Jul 2017 12:24:12 +0300 Subject: [PATCH 178/235] MS upstream changes --- app/exec/build/tasks/_resources/icon.png | Bin 2581 -> 2580 bytes docs/basicAuthEnabled.png | Bin 70329 -> 70327 bytes docs/configureBasicAuthFeature.png | Bin 66532 -> 66531 bytes docs/help-screen.png | Bin 15528 -> 15527 bytes docs/tfsAuth.png | Bin 115775 -> 115774 bytes 5 files changed, 0 insertions(+), 0 deletions(-) diff --git a/app/exec/build/tasks/_resources/icon.png b/app/exec/build/tasks/_resources/icon.png index 2a4c1dde941b25f71be7d14f060b26dbaa185ba6..45fbc0d51ad92e6bc15561c91a128224b93fa839 100644 GIT binary patch delta 13 UcmbO#GDU=?Gr-S%BdY)x033n?lmGw# delta 14 VcmbOtGF61NGr-TCcO#1c7XTlO1EBx_ diff --git a/docs/basicAuthEnabled.png b/docs/basicAuthEnabled.png index 62f9041c712dc8c412f97d97d4093ffe6cbdf4d7..f80db9c6122d5acb3c09f82585715565bb98f76f 100644 GIT binary patch delta 20 ccmdnFlx6!;7M9KcKlhES&$Tzd)jsnK09v&PdH?_b delta 23 fcmdnKlx62q7S_%HKX=}ZEYGzWc{jh-KJyF!Yt9Li diff --git a/docs/configureBasicAuthFeature.png b/docs/configureBasicAuthFeature.png index 65c12a7dd9a7f082b5e76b03b377473ff3ca7365..d26fb8c8505027b692edee005451810298992468 100644 GIT binary patch delta 18 ZcmaFT&hogOg{3pV&%Kd#D=XuDW&lNF26F%a delta 19 acmaFd&hn(4g|#!l&z-lCWh)EgeP#ek8wP&> diff --git a/docs/help-screen.png b/docs/help-screen.png index 6a78fae3ac59d7fe250a27bede8c9594c4559fed..ce01afd188d1649dd4a1194cd22fbf24a3169ab7 100644 GIT binary patch delta 13 UcmZ2cxxA94Gr-S%BkN)t04PueNdN!< delta 14 VcmZ2pxuTM_Gr-TCcO%PU8vray1y%q6 diff --git a/docs/tfsAuth.png b/docs/tfsAuth.png index 5e19137656813723d632444337c5ce941267e65b..75f898eb99f50b1cd9ff850db9338a2cfda02710 100644 GIT binary patch delta 18 Zcmdnr!M?A9ouxCt&%Kd#D=VYb5dc7o22B6} delta 19 acmdnj!M?wPowYN-&z-lCWh)D#)e!(i0R~wB From cd95986c0efcaca9b650afdc1710ed380d43848a Mon Sep 17 00:00:00 2001 From: David g Date: Tue, 11 Jul 2017 12:45:16 +0300 Subject: [PATCH 179/235] add test file --- test.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 test.txt diff --git a/test.txt b/test.txt new file mode 100644 index 00000000..e69de29b From cc4ba44c6a40049a1c3dacc7c16ab16f2e53f037 Mon Sep 17 00:00:00 2001 From: David g Date: Tue, 11 Jul 2017 21:09:57 +0300 Subject: [PATCH 180/235] add empty validate model --- app/exec/build/tasks/validate.ts | 33 ++++++++++++++++++++++++++++++++ package.json | 4 ++-- test.txt | 0 3 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 app/exec/build/tasks/validate.ts delete mode 100644 test.txt diff --git a/app/exec/build/tasks/validate.ts b/app/exec/build/tasks/validate.ts new file mode 100644 index 00000000..362c6ef1 --- /dev/null +++ b/app/exec/build/tasks/validate.ts @@ -0,0 +1,33 @@ +import { TfCommand } from "../../../lib/tfcommand"; +import agentContracts = require('vso-node-api/interfaces/TaskAgentInterfaces'); +import archiver = require('archiver'); +import args = require("../../../lib/arguments"); +import fs = require('fs'); +import path = require('path'); +import tasksBase = require("./default"); +import trace = require('../../../lib/trace'); +import vm = require('../../../lib/jsonvalidate') + +export function getCommand(args: string[]): BuildTaskValidate { + return new BuildTaskValidate(args); +} + +var c_taskJsonFile: string = 'task.json'; + +export class BuildTaskValidate extends tasksBase.BuildTaskBase { + protected description = "Upload a Build Task."; + protected serverCommand = true; + + protected getHelpArgs(): string[] { + return ["taskPath", "overwrite"]; + } + + public exec(): any { + console.log('validate success'); + } + + public friendlyOutput(data: agentContracts.TaskDefinition): void { + trace.println(); + trace.success('Validate successfully!', data.sourceLocation); + } +} \ No newline at end of file diff --git a/package.json b/package.json index 1bde0c2d..25443ab9 100644 --- a/package.json +++ b/package.json @@ -36,10 +36,10 @@ "q": "^1.4.1", "read": "^1.0.6", "request": "2.58.0", - "shelljs": "^0.5.1", + "shelljs": "^0.5.3", "tmp": "0.0.26", "tracer": "0.7.4", - "uuid": "^3.0.1", + "uuid": "^3.1.0", "validator": "^3.43.0", "vso-node-api": "^5.1.2", "winreg": "0.0.12", diff --git a/test.txt b/test.txt deleted file mode 100644 index e69de29b..00000000 From f9a7a8bd6a245e347177728d2e687444fa479fa3 Mon Sep 17 00:00:00 2001 From: Mois Date: Wed, 12 Jul 2017 13:50:03 +0300 Subject: [PATCH 181/235] .. --- app/exec/build/agent.ts | 20 ++++++++++---------- app/exec/build/default.ts | 4 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/app/exec/build/agent.ts b/app/exec/build/agent.ts index 06d5851d..e589e337 100644 --- a/app/exec/build/agent.ts +++ b/app/exec/build/agent.ts @@ -16,7 +16,7 @@ export class Agent extends agentBase.BuildBase { @@ -31,9 +31,9 @@ export class Agent extends agentBase.BuildBase { - const [agentid, agentname, pool, newkey, value, disable, deleteAgent, maxParallel, waitForActiveRequests] = values; + const [agentid, agentname, pool, newkey, value, disable, deleteAgent, maxParallel, waitForInProgressRequests] = values; var agents: number[] = null; trace.debug("getting pool : %s", pool); trace.debug("getting agent (id) : %s", agentid); @@ -49,7 +49,7 @@ export class Agent extends agentBase.BuildBase { trace.debug("disable request: %s", disable); if (Parallel) { @@ -142,23 +142,23 @@ export class Agent extends agentBase.BuildBase { @@ -56,7 +56,7 @@ export class BuildBase extends TfCom this.registerCommandArgument("wait","wait for the build","wait for the triggered build",args.BooleanArgument,"false"); this.registerCommandArgument("timeout","max time to wait","Maximum time to wait for the build to complete (in seconds).",args.IntArgument,"0"); this.registerCommandArgument("parallel", "max agent parallelism", "Maximum parallel agent runs.", args.IntArgument, null); - this.registerCommandArgument("waitForActiveRequests", "Wait For Active Requests", "Waiting for active Agent jobs / requests", args.BooleanArgument, "false"); + this.registerCommandArgument("waitForInProgressRequests", "Wait For Active Requests", "Waiting for active Agent jobs / requests", args.BooleanArgument, "false"); } public exec(cmd?: any): Promise { From a58f0b4ed19b8b39571707be3aeec0ceaa5d0a93 Mon Sep 17 00:00:00 2001 From: Mois Date: Wed, 12 Jul 2017 15:53:19 +0300 Subject: [PATCH 182/235] .. --- app/exec/build/agent.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/exec/build/agent.ts b/app/exec/build/agent.ts index e589e337..83edab30 100644 --- a/app/exec/build/agent.ts +++ b/app/exec/build/agent.ts @@ -148,8 +148,8 @@ export class Agent extends agentBase.BuildBase Date: Sun, 16 Jul 2017 12:28:25 +0300 Subject: [PATCH 183/235] Fix validation task module --- app/exec/build/tasks/validate.ts | 69 +++++++++++++++++++++++++++++--- 1 file changed, 63 insertions(+), 6 deletions(-) diff --git a/app/exec/build/tasks/validate.ts b/app/exec/build/tasks/validate.ts index 362c6ef1..bf8e3ca7 100644 --- a/app/exec/build/tasks/validate.ts +++ b/app/exec/build/tasks/validate.ts @@ -8,6 +8,8 @@ import tasksBase = require("./default"); import trace = require('../../../lib/trace'); import vm = require('../../../lib/jsonvalidate') + + export function getCommand(args: string[]): BuildTaskValidate { return new BuildTaskValidate(args); } @@ -15,19 +17,74 @@ export function getCommand(args: string[]): BuildTaskValidate { var c_taskJsonFile: string = 'task.json'; export class BuildTaskValidate extends tasksBase.BuildTaskBase { - protected description = "Upload a Build Task."; + protected description = "Validate a Build Task."; protected serverCommand = true; protected getHelpArgs(): string[] { - return ["taskPath", "overwrite"]; + return ["taskPath"]; + } + + public exec(): Promise { + return this.commandArgs.taskPath.val().then((taskPaths) => { + let taskPath = taskPaths[0]; + let tp = path.join(taskPath, c_taskJsonFile); + this.validate(tp); + return { + sourceLocation: taskPath + }; + }); + } + + + + public validate(jsonFilePath) { + var taskJson; + try { + taskJson = require(jsonFilePath); + } + catch (jsonError) { + console.log('jsonError = ' + jsonError) + trace.debug('Invalid task json: %s', jsonError); + throw new Error("Invalid task json: " + jsonError); + } + + this.validateTask(jsonFilePath, taskJson); } - public exec(): any { - console.log('validate success'); + + /* + * Validates a parsed json file describing a build task + * @param taskPath the path to the original json file + * @param taskData the parsed json file + * @return list of issues with the json file + */ + public validateTask(taskPath: string, taskData: any): string[] { + var vn = (taskData.name || taskPath); + var issues: string[] = []; + + if (!taskData.id || !check.isUUID(taskData.id)) { + issues.push(vn + ': id is a required guid'); + } + + if (!taskData.name || !check.isAlphanumeric(taskData.name)) { + issues.push(vn + ': name is a required alphanumeric string'); + } + + if (!taskData.friendlyName || !check.isLength(taskData.friendlyName, 1, 40)) { + issues.push(vn + ': friendlyName is a required string <= 40 chars'); + } + + if (!taskData.instanceNameFormat) { + issues.push(vn + ': instanceNameFormat is required'); + } + return issues; } public friendlyOutput(data: agentContracts.TaskDefinition): void { trace.println(); - trace.success('Validate successfully!', data.sourceLocation); + trace.success('Task at %s Validate successfully!', data.sourceLocation); } -} \ No newline at end of file +} + + + From ee8db5f93126dcf67ceacf2f4dffdb782b9b41f5 Mon Sep 17 00:00:00 2001 From: David g Date: Sun, 16 Jul 2017 12:31:32 +0300 Subject: [PATCH 184/235] fix valid task module --- app/exec/build/tasks/validate.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/exec/build/tasks/validate.ts b/app/exec/build/tasks/validate.ts index bf8e3ca7..e1050b97 100644 --- a/app/exec/build/tasks/validate.ts +++ b/app/exec/build/tasks/validate.ts @@ -7,7 +7,7 @@ import path = require('path'); import tasksBase = require("./default"); import trace = require('../../../lib/trace'); import vm = require('../../../lib/jsonvalidate') - +var check = require('validator'); export function getCommand(args: string[]): BuildTaskValidate { From 17b8c31b798512acd6025a647fc94bcce07fc354 Mon Sep 17 00:00:00 2001 From: David g Date: Sun, 16 Jul 2017 13:01:55 +0300 Subject: [PATCH 185/235] final fixing --- app/exec/build/tasks/validate.ts | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/app/exec/build/tasks/validate.ts b/app/exec/build/tasks/validate.ts index e1050b97..15cd9db1 100644 --- a/app/exec/build/tasks/validate.ts +++ b/app/exec/build/tasks/validate.ts @@ -24,14 +24,26 @@ export class BuildTaskValidate extends tasksBase.BuildTaskBase { + public exec(): Promise { return this.commandArgs.taskPath.val().then((taskPaths) => { let taskPath = taskPaths[0]; - let tp = path.join(taskPath, c_taskJsonFile); - this.validate(tp); - return { - sourceLocation: taskPath - }; + return this.commandArgs.overwrite.val().then((overwrite) => { + vm.exists(taskPath, 'specified directory ' + taskPath + ' does not exist.'); + //directory is good, check json + + let tp = path.join(taskPath, c_taskJsonFile); + return vm.validate(tp, 'no ' + c_taskJsonFile + ' in specified directory').then((taskJson) => { + let archive = archiver('zip'); + archive.on('error', function (error) { + trace.debug('Archiving error: ' + error.message); + error.message = 'Archiving error: ' + error.message; + throw error; + }); + return { + sourceLocation: taskPath + }; + }); + }); }); } From 09731a5c0f787a776820933da076fbdfe6bcbfec Mon Sep 17 00:00:00 2001 From: grawcho Date: Sun, 16 Jul 2017 13:34:06 +0300 Subject: [PATCH 186/235] fix typo in validate (validated successfully) --- app/exec/build/tasks/validate.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/exec/build/tasks/validate.ts b/app/exec/build/tasks/validate.ts index 15cd9db1..ccb5f63c 100644 --- a/app/exec/build/tasks/validate.ts +++ b/app/exec/build/tasks/validate.ts @@ -94,7 +94,7 @@ export class BuildTaskValidate extends tasksBase.BuildTaskBase Date: Mon, 17 Jul 2017 13:13:47 +0300 Subject: [PATCH 187/235] .. --- app/exec/build/agent.ts | 21 ++++++++++++--------- app/exec/build/default.ts | 4 ++-- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/app/exec/build/agent.ts b/app/exec/build/agent.ts index 83edab30..7e721ebe 100644 --- a/app/exec/build/agent.ts +++ b/app/exec/build/agent.ts @@ -49,18 +49,18 @@ export class Agent extends agentBase.BuildBase { trace.debug("disable request: %s", disable); if (Parallel) { @@ -142,21 +142,24 @@ export class Agent extends agentBase.BuildBase { @@ -56,7 +56,7 @@ export class BuildBase extends TfCom this.registerCommandArgument("wait","wait for the build","wait for the triggered build",args.BooleanArgument,"false"); this.registerCommandArgument("timeout","max time to wait","Maximum time to wait for the build to complete (in seconds).",args.IntArgument,"0"); this.registerCommandArgument("parallel", "max agent parallelism", "Maximum parallel agent runs.", args.IntArgument, null); - this.registerCommandArgument("waitForInProgressRequests", "Wait For Active Requests", "Waiting for active Agent jobs / requests", args.BooleanArgument, "false"); + this.registerCommandArgument("waitForInProgressRequests", "Wait For Active Requests", "Waiting for active Agent jobs / requests", args.StringArgument,null); } public exec(cmd?: any): Promise { From 0e19e8429702a0c6ebb1418aec640c3ee5bb80ef Mon Sep 17 00:00:00 2001 From: David g Date: Tue, 18 Jul 2017 11:53:22 +0300 Subject: [PATCH 188/235] fix the duplicate validate implemntion --- app/exec/build/tasks/validate.ts | 45 -------------------------------- 1 file changed, 45 deletions(-) diff --git a/app/exec/build/tasks/validate.ts b/app/exec/build/tasks/validate.ts index 15cd9db1..25f34290 100644 --- a/app/exec/build/tasks/validate.ts +++ b/app/exec/build/tasks/validate.ts @@ -47,51 +47,6 @@ export class BuildTaskValidate extends tasksBase.BuildTaskBase Date: Wed, 2 Aug 2017 10:01:27 +0300 Subject: [PATCH 189/235] .. --- app/exec/build/agents/default.ts | 39 +++++++++ app/exec/build/agents/delete.ts | 62 +++++++++++++++ app/exec/build/agents/disable.ts | 131 +++++++++++++++++++++++++++++++ app/exec/build/agents/list.ts | 39 +++++++++ app/exec/build/agents/update.ts | 64 +++++++++++++++ app/exec/build/default.ts | 10 +-- package.json | 2 +- 7 files changed, 337 insertions(+), 10 deletions(-) create mode 100644 app/exec/build/agents/default.ts create mode 100644 app/exec/build/agents/delete.ts create mode 100644 app/exec/build/agents/disable.ts create mode 100644 app/exec/build/agents/list.ts create mode 100644 app/exec/build/agents/update.ts diff --git a/app/exec/build/agents/default.ts b/app/exec/build/agents/default.ts new file mode 100644 index 00000000..967cdb53 --- /dev/null +++ b/app/exec/build/agents/default.ts @@ -0,0 +1,39 @@ +import { TfCommand, CoreArguments } from "../../../lib/tfcommand"; +import args = require("../../../lib/arguments"); +import buildBase = require("../default"); + +export interface AgentArguments extends buildBase.BuildArguments { + agentId: args.IntArgument; + agentName: args.StringArgument; + poolId: args.IntArgument; + userCapabilityKey: args.StringArgument; + userCapabilityValue: args.StringArgument; + disable: args.StringArgument; + deleteAgent: args.StringArgument; + parallel: args.IntArgument; + waitForInProgressRequests: args.StringArgument; +} + +export function getCommand(args: string[]): AgentBase { + return new AgentBase(args); +} + +export class AgentBase extends buildBase.BuildBase { + protected description = "Commands for managing Agents."; + protected serverCommand = false; + protected setCommandArgs(): void { + super.setCommandArgs(); + this.registerCommandArgument("agentId", "Agent ID", "Identifies a particular Agent.", args.IntArgument); + this.registerCommandArgument("agentName", "Agent Name", "Required Agent Name.", args.StringArgument, null); + this.registerCommandArgument("poolId", "Agent Pool Id", "Required Agent pool ID For Edit.", args.IntArgument, null); + this.registerCommandArgument("userCapabilityKey", "Capability to add / edit", "Capability to add / edit to the Agent.", args.StringArgument, null); + this.registerCommandArgument("userCapabilityValue", "Value to add / edit", "Value to add / edit to the Agent User Capabilities.", args.StringArgument, null); + this.registerCommandArgument("disable", "disable / enable agent", "Update the agent status.", args.StringArgument, null); + this.registerCommandArgument("deleteAgent", "deleteagent", "Delete an agent.", args.StringArgument, null); + this.registerCommandArgument("parallel", "max agent parallelism", "Maximum parallel agent runs.", args.IntArgument, null); + this.registerCommandArgument("waitForInProgressRequests", "Wait For Active Requests", "Waiting for active Agent jobs / requests", args.StringArgument, null); + } + public exec(cmd?: any): Promise { + return this.getHelp(cmd); + } +} diff --git a/app/exec/build/agents/delete.ts b/app/exec/build/agents/delete.ts new file mode 100644 index 00000000..4a95211f --- /dev/null +++ b/app/exec/build/agents/delete.ts @@ -0,0 +1,62 @@ +import { TfCommand } from "../../../lib/tfcommand"; +import args = require("../../../lib/arguments"); +import agentBase = require("./default"); +import agentClient = require("vso-node-api/TaskAgentApiBase"); +import agentContracts = require("vso-node-api/interfaces/AgentInterfaces"); +import taskAgentContracts = require("vso-node-api/interfaces/TaskAgentInterfaces"); +import trace = require("../../../lib/trace"); +import taskAgentApi = require("vso-node-api/TaskAgentApi"); + +export function describe(): string { + return "Delete a Agent"; +} + +export function getCommand(args: string[]): AgentDelete { + return new AgentDelete(args); +} + +export class AgentDelete extends agentBase.AgentBase { + protected serverCommand = true; + protected description = "Delete a Agent."; + protected getHelpArgs(): string[] { + return ["poolId", "agentId", "agentName"]; + } + + public exec(): Promise { + trace.debug("delete-Agent.exec"); + var agentapi: agentClient.ITaskAgentApiBase = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl().substring(0, this.connection.getCollectionUrl().lastIndexOf("/"))); + return Promise.all([ + this.commandArgs.poolId.val(), + this.commandArgs.agentId.val(), + this.commandArgs.agentName.val() + ]).then((values) => { + const [poolId, agentid, agentname] = values; + var agents: number[] = null; + trace.debug("getting pool (id) : %s", poolId); + trace.debug("getting agent (id) : %s", agentid); + trace.debug("getting agent (name) : %s", agentname); + return this.commandArgs.AgentId.val().then((AgentId) => { + return this._deleteAgent(agentapi, poolId as number, agentid as number); + }); + }); + } + + public friendlyOutput(Agent: agentContracts.Agent): void { + trace.println(); + } + + private _deleteAgent(agentapi: agentClient.ITaskAgentApiBase, pool: number, agentid: number) { + trace.info("Deleting Agent..."); + return agentapi.getAgent(pool, agentid, true, true, null).then((agent) => { + return agentapi.deleteAgent(pool, agentid).then(() => { + trace.debug("agent set for deletion : %s", agent.name); + agent.id = null; + trace.info("Agent deleted"); + return agent; + }); + }).catch((err) => { + trace.error("Failed to delete the agent"); + trace.error(err); + }); + } +} diff --git a/app/exec/build/agents/disable.ts b/app/exec/build/agents/disable.ts new file mode 100644 index 00000000..61ea9f39 --- /dev/null +++ b/app/exec/build/agents/disable.ts @@ -0,0 +1,131 @@ +import { TfCommand } from "../../../lib/tfcommand"; +import args = require("../../../lib/arguments"); +import agentBase = require("./default"); +import agentClient = require("vso-node-api/TaskAgentApiBase"); +import agentContracts = require("vso-node-api/interfaces/AgentInterfaces"); +import taskAgentContracts = require("vso-node-api/interfaces/TaskAgentInterfaces"); +import trace = require("../../../lib/trace"); +import taskAgentApi = require("vso-node-api/TaskAgentApi"); + +export function describe(): string { + return "Disable Agent"; +} + +export function getCommand(args: string[]): AgentDisable { + return new AgentDisable(args); +} + +export class AgentDisable extends agentBase.AgentBase { + protected serverCommand = true; + protected description = "Disable Agent."; + protected getHelpArgs(): string[] { + return ["poolId", "agentId", "agentName", "userCapabilityKey", "userCapabilityValue", "disable", "deleteAgent", "parallel", "waitForInProgressRequests"]; + } + + public exec(): Promise { + trace.debug("agent.exec"); + var agentapi: agentClient.ITaskAgentApiBase = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl().substring(0, this.connection.getCollectionUrl().lastIndexOf("/"))); + return Promise.all([ + this.commandArgs.agentId.val(), + this.commandArgs.agentName.val(), + this.commandArgs.poolId.val(), + this.commandArgs.userCapabilityKey.val(), + this.commandArgs.userCapabilityValue.val(), + this.commandArgs.disable.val(), + this.commandArgs.deleteAgent.val(), + this.commandArgs.parallel.val(), + this.commandArgs.waitForInProgressRequests.val(), + ]).then((values) => { + const [agentid, agentname, pool, newkey, value, disable, deleteAgent, maxParallel, waitForInProgressRequests] = values; + var agents: number[] = null; + trace.debug("getting pool : %s", pool); + trace.debug("getting agent (id) : %s", agentid); + trace.debug("getting agent (name) : %s", agentname); + var include: boolean = true; + if (agentid) { + agents = [agentid as number]; + } + else if (agentname) { + trace.debug("No agent Id provided, checking for agent with name " + agentname); + return agentapi.getAgents(pool as number, agentname as string).then((ao: taskAgentContracts.TaskAgent[]) => { + if (ao.length > 0) { + var aid = ao[0].id; + var an = ao[0].name; + trace.debug("found, agent id %s for agent name %s", aid, an); + return this._getOrUpdateAgent(agentapi, pool as number, aid, newkey as string, value as string, include, disable as string, deleteAgent as string, maxParallel as number, waitForInProgressRequests as string); + } + else { + trace.debug("No agents found with name " + agentname); + throw new Error("No agents found with name " + agentname); + + } + }); + } + + trace.debug("disable request: %s", disable); + return this._getOrUpdateAgent(agentapi, pool as number, agentid as number, newkey as string, value as string, include, disable as string, deleteAgent as string, maxParallel as number, waitForInProgressRequests as string); + }); + }; + private _getOrUpdateAgent(agentapi: agentClient.ITaskAgentApiBase, pool: number, agentid: number, newkey: string, value: string, include: boolean, disable: string, deleteAgent: string, Parallel: number, waitForInProgressRequests: string) { + return agentapi.getAgent(pool, agentid, true, true, null).then((agent) => { + trace.debug("disable request: %s", disable); + if (Parallel) { + agent.maxParallelism = Parallel; + agentapi.updateAgent(agent, pool, agentid); + } + if (deleteAgent) { + if (deleteAgent == "true") { + return agentapi.deleteAgent(pool, agentid).then(() => { + trace.debug("agent set for deletion : %s"); + agent.id = null; + return agent; + }) + } + if (deleteAgent != "true") { + trace.error("allowed value is [true] only!") + } + } + if (disable) { + if (disable == "true") { + include = false; + trace.debug("agent status (enabled): %s", agent.enabled); + agent.enabled = false; + agentapi.updateAgent(agent, pool, agentid); + trace.debug("agent status (enabled): %s", agent.enabled); + } + if (disable == "false") { + include = false; + trace.debug("agent status (enabled): %s", agent.enabled); + agent.enabled = true; + agentapi.updateAgent(agent, pool, agentid); + trace.debug("agent status (enabled): %s", agent.enabled); + } + if (disable != "true" && disable != "false") { + trace.error("allowed values are [true] or [false]!") + } + } + + if (waitForInProgressRequests == "true") { + var timer = setInterval(function () { + return agentapi.getAgentRequestsForAgent(pool, agent.id, 0).then(function (requests) { + if (requests.length <= 0) { + clearInterval(timer); + timer = null; + trace.info("-------------- There are no requests which are 'in progress' state "); + } + else { + trace.info("-------------- The agent [ %s ] is currently running the job [ %s ] ", agent.name, requests[0].definition.name); + } + }).catch(function (e) { + trace.info("==== ERROR Occurred ===== "); + trace.error(e.stack); + trace.error(e.message); + clearInterval(timer); + timer = null; + }); + }, 60000); + } + return agentapi.getAgent(pool, agentid, include, include, null) + }); + } +} \ No newline at end of file diff --git a/app/exec/build/agents/list.ts b/app/exec/build/agents/list.ts new file mode 100644 index 00000000..10333ae3 --- /dev/null +++ b/app/exec/build/agents/list.ts @@ -0,0 +1,39 @@ +import { TfCommand } from "../../../lib/tfcommand"; +import args = require("../../../lib/arguments"); +import agentBase = require("./default"); +import agentClient = require("vso-node-api/TaskAgentApiBase"); +import agentContracts = require("vso-node-api/interfaces/AgentInterfaces"); +import trace = require("../../../lib/trace"); +import taskAgentContracts = require("vso-node-api/interfaces/TaskAgentInterfaces"); + +export function getCommand(args: string[]): AgentDetails { + return new AgentDetails(args); +} + +export class AgentDetails extends agentBase.AgentBase { + protected serverCommand = true; + protected description = "Display extended Agent details."; + protected getHelpArgs(): string[] { + return ["project", "AgentId"]; + } + + public exec(): Promise { + trace.debug("Agent-details.exec"); + var agentapi: agentClient.ITaskAgentApiBase = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl().substring(0, this.connection.getCollectionUrl().lastIndexOf("/"))); + return this.commandArgs.poolId.val().then((pool) => { + trace.debug("getting pool : %s", pool); + return agentapi.getAgents(pool); + }); + } + + public friendlyOutput(agents: taskAgentContracts.TaskAgent[]): void { + if (!agents) { + throw new Error("pool not supplied or not found"); + } + trace.info("Agents in pool:") + trace.println(); + agents.forEach((agent) => { + trace.info(" %s (%s) : %s ", agent.id, agent.version, agent.name); + }); + } +} diff --git a/app/exec/build/agents/update.ts b/app/exec/build/agents/update.ts new file mode 100644 index 00000000..efdae792 --- /dev/null +++ b/app/exec/build/agents/update.ts @@ -0,0 +1,64 @@ +import { TfCommand } from "../../../lib/tfcommand"; +import args = require("../../../lib/arguments"); +import agentBase = require("./default"); +import agentClient = require("vso-node-api/TaskAgentApiBase"); +import taskAgentContracts = require("vso-node-api/interfaces/TaskAgentInterfaces"); +import trace = require("../../../lib/trace"); +import taskAgentApi = require("vso-node-api/TaskAgentApi"); + + +export function getCommand(args: string[]): Agent { + return new Agent(args); +} + +export class Agent extends agentBase.AgentBase { + protected serverCommand = true; + protected description = "Show / Update task agent details."; + protected getHelpArgs(): string[] { + return ["poolId", "agentId", "agentName", "userCapabilityKey", "userCapabilityValue", "disable", "deleteAgent", "parallel", "waitForInProgressRequests"]; + } + + + private _getOrUpdateAgent(agentapi: agentClient.ITaskAgentApiBase, pool: number, agentid: number, newkey: string, value: string, include: boolean, disable: string, deleteAgent: string, Parallel: number, waitForInProgressRequests: string) { + return agentapi.getAgent(pool, agentid, true, true, null).then((agent) => { + trace.debug("disable request: %s", disable); + if (Parallel) { + agent.maxParallelism = Parallel; + agentapi.updateAgent(agent, pool, agentid); + } + + if (newkey) { + include = false; + var capabilities: { [key: string]: string; } = agent.userCapabilities; + //capabilities[newkey] = value; + let userCapabilitiesObj = {}; + for (var attrname in capabilities) { userCapabilitiesObj[attrname] = capabilities[attrname] } + userCapabilitiesObj[newkey] = value; + + agentapi.updateAgentUserCapabilities(userCapabilitiesObj, pool, agentid); + }; + + if (waitForInProgressRequests == "true") { + var timer = setInterval(function () { + return agentapi.getAgentRequestsForAgent(pool, agent.id, 0).then(function (requests) { + if (requests.length <= 0) { + clearInterval(timer); + timer = null; + trace.info("-------------- There are no requests which are 'in progress' state "); + } + else { + trace.info("-------------- The agent [ %s ] is currently running the job [ %s ] ", agent.name, requests[0].definition.name); + } + }).catch(function (e) { + trace.info("==== ERROR Occurred ===== "); + trace.error(e.stack); + trace.error(e.message); + clearInterval(timer); + timer = null; + }); + }, 60000); + } + return agentapi.getAgent(pool, agentid, include, include, null) + }); + }} + diff --git a/app/exec/build/default.ts b/app/exec/build/default.ts index 7ff6e834..870c5ab5 100644 --- a/app/exec/build/default.ts +++ b/app/exec/build/default.ts @@ -11,18 +11,10 @@ export interface BuildArguments extends CoreArguments { priority: args.IntArgument; version: args.StringArgument; shelveset: args.StringArgument; - poolId: args.IntArgument; - agentId: args.IntArgument; - agentName: args.StringArgument; - userCapabilityKey: args.StringArgument; - userCapabilityValue: args.StringArgument; demands: args.StringArgument; - disable: args.StringArgument; - deleteAgent: args.StringArgument; wait: args.BooleanArgument; timeout: args.IntArgument; - parallel: args.IntArgument; - waitForInProgressRequests: args.StringArgument; + } export function getCommand(args: string[]): BuildBase { diff --git a/package.json b/package.json index 1bde0c2d..118e76b3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tfx-cli", - "version": "0.4.9", + "version": "0.5.0", "description": "CLI for Visual Studio Team Services and Team Foundation Server", "repository": { "type": "git", From 7a60d3ecf998ff5d1854a1ae3ba90942b29fd6e4 Mon Sep 17 00:00:00 2001 From: Mois Date: Mon, 7 Aug 2017 09:05:18 +0300 Subject: [PATCH 190/235] .. --- app/exec/build/agents/default.ts | 2 +- app/exec/build/agents/delete.ts | 74 +++++++++++++++------- app/exec/build/agents/list.ts | 3 +- app/exec/build/agents/update.ts | 103 ++++++++++++++++++++++++++++--- tfx-cli.cmd | 6 ++ 5 files changed, 154 insertions(+), 34 deletions(-) create mode 100644 tfx-cli.cmd diff --git a/app/exec/build/agents/default.ts b/app/exec/build/agents/default.ts index 967cdb53..53100ec4 100644 --- a/app/exec/build/agents/default.ts +++ b/app/exec/build/agents/default.ts @@ -23,7 +23,7 @@ export class AgentBase extends buildBase.BuildBase { protected serverCommand = false; protected setCommandArgs(): void { super.setCommandArgs(); - this.registerCommandArgument("agentId", "Agent ID", "Identifies a particular Agent.", args.IntArgument); + this.registerCommandArgument("agentId", "Agent ID", "Identifies a particular Agent.", args.IntArgument,null); this.registerCommandArgument("agentName", "Agent Name", "Required Agent Name.", args.StringArgument, null); this.registerCommandArgument("poolId", "Agent Pool Id", "Required Agent pool ID For Edit.", args.IntArgument, null); this.registerCommandArgument("userCapabilityKey", "Capability to add / edit", "Capability to add / edit to the Agent.", args.StringArgument, null); diff --git a/app/exec/build/agents/delete.ts b/app/exec/build/agents/delete.ts index 4a95211f..5885a803 100644 --- a/app/exec/build/agents/delete.ts +++ b/app/exec/build/agents/delete.ts @@ -2,13 +2,11 @@ import { TfCommand } from "../../../lib/tfcommand"; import args = require("../../../lib/arguments"); import agentBase = require("./default"); import agentClient = require("vso-node-api/TaskAgentApiBase"); -import agentContracts = require("vso-node-api/interfaces/AgentInterfaces"); -import taskAgentContracts = require("vso-node-api/interfaces/TaskAgentInterfaces"); import trace = require("../../../lib/trace"); -import taskAgentApi = require("vso-node-api/TaskAgentApi"); +import taskAgentContracts = require("vso-node-api/interfaces/TaskAgentInterfaces"); export function describe(): string { - return "Delete a Agent"; + return "Delete an Agent"; } export function getCommand(args: string[]): AgentDelete { @@ -19,44 +17,72 @@ export class AgentDelete extends agentBase.AgentBase { - trace.debug("delete-Agent.exec"); + + public exec(): Promise { + trace.debug("delete-agents.exec"); var agentapi: agentClient.ITaskAgentApiBase = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl().substring(0, this.connection.getCollectionUrl().lastIndexOf("/"))); + return Promise.all([ this.commandArgs.poolId.val(), this.commandArgs.agentId.val(), - this.commandArgs.agentName.val() + this.commandArgs.agentName.val(), + this.commandArgs.deleteAgent.val() ]).then((values) => { - const [poolId, agentid, agentname] = values; + const [poolId, agentid, agentname, deleteAgent] = values; var agents: number[] = null; trace.debug("getting pool (id) : %s", poolId); trace.debug("getting agent (id) : %s", agentid); trace.debug("getting agent (name) : %s", agentname); - return this.commandArgs.AgentId.val().then((AgentId) => { - return this._deleteAgent(agentapi, poolId as number, agentid as number); - }); + trace.info("Deleting Agent..."); + if (agentid) { + agents = [agentid as number]; + } + else if (agentname) { + trace.debug("No agent Id provided, checking for agent with name " + agentname); + return agentapi.getAgents(poolId as number, agentname as string).then((ao: taskAgentContracts.TaskAgent[]) => { + if (ao.length > 0) { + var aid = ao[0].id; + var an = ao[0].name; + trace.debug("found, agent id %s for agent name %s", aid, an); + return this._deleteAgent(agentapi, poolId as number, agentid as number, deleteAgent as string); + } + else { + trace.debug("No agents found with name " + agentname); + throw new Error("No agents found with name " + agentname); + + } + }); + } + + trace.debug("deleting agent: %s", agentname); + return this._deleteAgent(agentapi, poolId as number, agentid as number, deleteAgent as string); }); } - public friendlyOutput(Agent: agentContracts.Agent): void { + public friendlyOutput(agent: taskAgentContracts.TaskAgent): void { trace.println(); + trace.success('Agent %s deleted successfully!', agent.name); } - private _deleteAgent(agentapi: agentClient.ITaskAgentApiBase, pool: number, agentid: number) { - trace.info("Deleting Agent..."); + private _deleteAgent(agentapi: agentClient.ITaskAgentApiBase, pool: number, agentid: number, deleteAgent: string) { return agentapi.getAgent(pool, agentid, true, true, null).then((agent) => { - return agentapi.deleteAgent(pool, agentid).then(() => { - trace.debug("agent set for deletion : %s", agent.name); - agent.id = null; - trace.info("Agent deleted"); - return agent; - }); - }).catch((err) => { - trace.error("Failed to delete the agent"); - trace.error(err); + trace.debug("deleting Agent: %s", deleteAgent); + + if (deleteAgent) { + if (deleteAgent == "true") { + return agentapi.deleteAgent(pool, agentid).then(() => { + trace.debug("agent set for deletion : %s"); + agent.id = null; + return agent; + }) + } + if (deleteAgent != "true") { + trace.error("allowed value is [true] only!") + } + } }); } } diff --git a/app/exec/build/agents/list.ts b/app/exec/build/agents/list.ts index 10333ae3..f0eed417 100644 --- a/app/exec/build/agents/list.ts +++ b/app/exec/build/agents/list.ts @@ -2,7 +2,6 @@ import { TfCommand } from "../../../lib/tfcommand"; import args = require("../../../lib/arguments"); import agentBase = require("./default"); import agentClient = require("vso-node-api/TaskAgentApiBase"); -import agentContracts = require("vso-node-api/interfaces/AgentInterfaces"); import trace = require("../../../lib/trace"); import taskAgentContracts = require("vso-node-api/interfaces/TaskAgentInterfaces"); @@ -18,7 +17,7 @@ export class AgentDetails extends agentBase.AgentBase { - trace.debug("Agent-details.exec"); + trace.debug("list-agents.exec"); var agentapi: agentClient.ITaskAgentApiBase = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl().substring(0, this.connection.getCollectionUrl().lastIndexOf("/"))); return this.commandArgs.poolId.val().then((pool) => { trace.debug("getting pool : %s", pool); diff --git a/app/exec/build/agents/update.ts b/app/exec/build/agents/update.ts index efdae792..fb8f18f2 100644 --- a/app/exec/build/agents/update.ts +++ b/app/exec/build/agents/update.ts @@ -7,26 +7,114 @@ import trace = require("../../../lib/trace"); import taskAgentApi = require("vso-node-api/TaskAgentApi"); -export function getCommand(args: string[]): Agent { - return new Agent(args); +export function getCommand(args: string[]): AgentUpdate { + return new AgentUpdate(args); } -export class Agent extends agentBase.AgentBase { +export class AgentUpdate extends agentBase.AgentBase { protected serverCommand = true; protected description = "Show / Update task agent details."; protected getHelpArgs(): string[] { - return ["poolId", "agentId", "agentName", "userCapabilityKey", "userCapabilityValue", "disable", "deleteAgent", "parallel", "waitForInProgressRequests"]; + return ["poolId", "agentId", "agentName", "userCapabilityKey", "userCapabilityValue", "disable", "parallel", "waitForInProgressRequests"]; } + public exec(): Promise { + trace.debug("update-agents.exec"); + var agentapi: agentClient.ITaskAgentApiBase = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl().substring(0, this.connection.getCollectionUrl().lastIndexOf("/"))); + return Promise.all([ + this.commandArgs.agentId.val(), + this.commandArgs.agentName.val(), + this.commandArgs.poolId.val(), + this.commandArgs.userCapabilityKey.val(), + this.commandArgs.userCapabilityValue.val(), + this.commandArgs.disable.val(), + this.commandArgs.parallel.val(), + this.commandArgs.waitForInProgressRequests.val(), + ]).then((values) => { + const [agentid, agentname, pool, newkey, value, disable, maxParallel, waitForInProgressRequests] = values; + var agents: number[] = null; + trace.debug("getting pool : %s", pool); + trace.debug("getting agent (id) : %s", agentid); + trace.debug("getting agent (name) : %s", agentname); + var include: boolean = true; + if (agentid) { + agents = [agentid as number]; + } + else if (agentname) { + trace.debug("No agent Id provided, checking for agent with name " + agentname); + return agentapi.getAgents(pool as number, agentname as string).then((ao: taskAgentContracts.TaskAgent[]) => { + if (ao.length > 0) { + var aid = ao[0].id; + var an = ao[0].name; + trace.debug("found, agent id %s for agent name %s", aid, an); + return this._getOrUpdateAgent(agentapi, pool as number, aid, newkey as string, value as string, include, disable as string, maxParallel as number, waitForInProgressRequests as string); + } + else { + trace.debug("No agents found with name " + agentname); + throw new Error("No agents found with name " + agentname); + + } + }); + } + + trace.debug("disable request: %s", disable); + return this._getOrUpdateAgent(agentapi, pool as number, agentid as number, newkey as string, value as string, include, disable as string, maxParallel as number, waitForInProgressRequests as string); + }); + }; - private _getOrUpdateAgent(agentapi: agentClient.ITaskAgentApiBase, pool: number, agentid: number, newkey: string, value: string, include: boolean, disable: string, deleteAgent: string, Parallel: number, waitForInProgressRequests: string) { + public friendlyOutput(agent: taskAgentContracts.TaskAgent): void { + if (!agent) { + throw new Error("agent / pool not supplied or not found"); + } + else { + trace.println(); + trace.info("Agent id : %s", agent.id ? agent.id : "unknown"); + trace.info("Agent name : %s", agent.name ? agent.name : "unknown"); + trace.info("Version : %s", agent.version ? agent.version : "unknown"); + trace.info("status : %s", agent.status ? taskAgentContracts.TaskAgentStatus[agent.status] : "unknown"); + trace.info("enabled : %s", agent.enabled ? agent.enabled : "unknown"); + trace.info("maxParallelism : %s", agent.maxParallelism); + if (agent.systemCapabilities) { + trace.info("System capabilities : "); + } + for (var key in agent.systemCapabilities) { + trace.info(" %s : %s", key, agent.systemCapabilities[key]); + } + if (agent.userCapabilities) { + trace.info("User capabilities : "); + } + for (var key in agent.userCapabilities) { + trace.info(" %s : %s", key, agent.userCapabilities[key]); + } + } + } + + private _getOrUpdateAgent(agentapi: agentClient.ITaskAgentApiBase, pool: number, agentid: number, newkey: string, value: string, include: boolean, disable: string, Parallel: number, waitForInProgressRequests: string) { return agentapi.getAgent(pool, agentid, true, true, null).then((agent) => { trace.debug("disable request: %s", disable); if (Parallel) { agent.maxParallelism = Parallel; agentapi.updateAgent(agent, pool, agentid); } - + if (disable) { + if (disable == "true") { + include = false; + trace.debug("agent status (enabled): %s", agent.enabled); + agent.enabled = false; + agentapi.updateAgent(agent, pool, agentid); + trace.debug("agent status (enabled): %s", agent.enabled); + } + if (disable == "false") { + include = false; + trace.debug("agent status (enabled): %s", agent.enabled); + agent.enabled = true; + agentapi.updateAgent(agent, pool, agentid); + trace.debug("agent status (enabled): %s", agent.enabled); + } + if (disable != "true" && disable != "false") { + trace.error("allowed values are [true] or [false]!") + } + } if (newkey) { include = false; var capabilities: { [key: string]: string; } = agent.userCapabilities; @@ -60,5 +148,6 @@ export class Agent extends agentBase.AgentBase { } return agentapi.getAgent(pool, agentid, include, include, null) }); - }} + } +} diff --git a/tfx-cli.cmd b/tfx-cli.cmd new file mode 100644 index 00000000..de33a722 --- /dev/null +++ b/tfx-cli.cmd @@ -0,0 +1,6 @@ +@SETLOCAL + +@SET PATHEXT=%PATHEXT:;.JS;=;% + + +"C:\Program Files\nodejs\node.exe" "_build\tfx-cli.js" %* \ No newline at end of file From 0f0114c3d183fc45ff992695b7fbb422fa0c2968 Mon Sep 17 00:00:00 2001 From: Shani Feldman Date: Mon, 7 Aug 2017 12:46:36 +0300 Subject: [PATCH 191/235] remove redundent reference --- app/exec/build/agents/disable.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/exec/build/agents/disable.ts b/app/exec/build/agents/disable.ts index 61ea9f39..ea81cde9 100644 --- a/app/exec/build/agents/disable.ts +++ b/app/exec/build/agents/disable.ts @@ -2,7 +2,6 @@ import { TfCommand } from "../../../lib/tfcommand"; import args = require("../../../lib/arguments"); import agentBase = require("./default"); import agentClient = require("vso-node-api/TaskAgentApiBase"); -import agentContracts = require("vso-node-api/interfaces/AgentInterfaces"); import taskAgentContracts = require("vso-node-api/interfaces/TaskAgentInterfaces"); import trace = require("../../../lib/trace"); import taskAgentApi = require("vso-node-api/TaskAgentApi"); @@ -128,4 +127,4 @@ export class AgentDisable extends agentBase.AgentBase Date: Mon, 7 Aug 2017 14:07:26 +0300 Subject: [PATCH 192/235] deleting disable.ts --- app/exec/build/agent.ts | 168 ------------------------------- app/exec/build/agents.ts | 39 ------- app/exec/build/agents/disable.ts | 130 ------------------------ app/exec/build/tasks/validate.ts | 57 ----------- package.json | 4 +- 5 files changed, 2 insertions(+), 396 deletions(-) delete mode 100644 app/exec/build/agent.ts delete mode 100644 app/exec/build/agents.ts delete mode 100644 app/exec/build/agents/disable.ts delete mode 100644 app/exec/build/tasks/validate.ts diff --git a/app/exec/build/agent.ts b/app/exec/build/agent.ts deleted file mode 100644 index 7e721ebe..00000000 --- a/app/exec/build/agent.ts +++ /dev/null @@ -1,168 +0,0 @@ -import { TfCommand } from "../../lib/tfcommand"; -import args = require("../../lib/arguments"); -import agentBase = require("./default"); -import agentClient = require("vso-node-api/TaskAgentApiBase"); -import taskAgentContracts = require("vso-node-api/interfaces/TaskAgentInterfaces"); -import trace = require("../../lib/trace"); -import taskAgentApi = require("vso-node-api/TaskAgentApi"); - -export function getCommand(args: string[]): Agent { - return new Agent(args); -} - - -export class Agent extends agentBase.BuildBase { - protected serverCommand = true; - protected description = "Show / Update task agent details."; - - protected getHelpArgs(): string[] { - return ["poolId", "agentId", "agentName", "userCapabilityKey", "userCapabilityValue", "disable", "deleteAgent", "parallel", "waitForInProgressRequests"]; - } - - public exec(): Promise { - trace.debug("agent.exec"); - var agentapi: agentClient.ITaskAgentApiBase = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl().substring(0, this.connection.getCollectionUrl().lastIndexOf("/"))); - return Promise.all([ - this.commandArgs.agentId.val(), - this.commandArgs.agentName.val(), - this.commandArgs.poolId.val(), - this.commandArgs.userCapabilityKey.val(), - this.commandArgs.userCapabilityValue.val(), - this.commandArgs.disable.val(), - this.commandArgs.deleteAgent.val(), - this.commandArgs.parallel.val(), - this.commandArgs.waitForInProgressRequests.val(), - ]).then((values) => { - const [agentid, agentname, pool, newkey, value, disable, deleteAgent, maxParallel, waitForInProgressRequests] = values; - var agents: number[] = null; - trace.debug("getting pool : %s", pool); - trace.debug("getting agent (id) : %s", agentid); - trace.debug("getting agent (name) : %s", agentname); - var include: boolean = true; - if (agentid) { - agents = [agentid as number]; - } - else if (agentname) { - trace.debug("No agent Id provided, checking for agent with name " + agentname); - return agentapi.getAgents(pool as number, agentname as string).then((ao: taskAgentContracts.TaskAgent[]) => { - if (ao.length > 0) { - var aid = ao[0].id; - var an = ao[0].name; - trace.debug("found, agent id %s for agent name %s", aid, an); - return this._getOrUpdateAgent(agentapi, pool as number, aid, newkey as string, value as string, include, disable as string, deleteAgent as string, maxParallel as number, waitForInProgressRequests as string); - } - else { - trace.debug("No agents found with name " + agentname); - throw new Error("No agents found with name " + agentname); - - } - }); - } - - trace.debug("disable request: %s", disable); - return this._getOrUpdateAgent(agentapi, pool as number, agentid as number, newkey as string, value as string, include, disable as string, deleteAgent as string, maxParallel as number, waitForInProgressRequests as string); - }); - }; - - public friendlyOutput(agent: taskAgentContracts.TaskAgent): void { - if (!agent) { - throw new Error("agent / pool not supplied or not found"); - } - else if (!agent.id) { - trace.success("Agent name : %s", agent.name + " was deleted"); - } - else { - trace.println(); - trace.info("Agent id : %s", agent.id ? agent.id : "unknown"); - trace.info("Agent name : %s", agent.name ? agent.name : "unknown"); - trace.info("Version : %s", agent.version ? agent.version : "unknown"); - trace.info("status : %s", agent.status ? taskAgentContracts.TaskAgentStatus[agent.status] : "unknown"); - trace.info("enabled : %s", agent.enabled ? agent.enabled : "unknown"); - trace.info("maxParallelism : %s", agent.maxParallelism); - if (agent.systemCapabilities) { - trace.info("System capabilities : "); - } - for (var key in agent.systemCapabilities) { - trace.info(" %s : %s", key, agent.systemCapabilities[key]); - } - if (agent.userCapabilities) { - trace.info("User capabilities : "); - } - for (var key in agent.userCapabilities) { - trace.info(" %s : %s", key, agent.userCapabilities[key]); - } - } - } - private _getOrUpdateAgent(agentapi: agentClient.ITaskAgentApiBase, pool: number, agentid: number, newkey: string, value: string, include: boolean, disable: string, deleteAgent: string, Parallel: number, waitForInProgressRequests: string) { - return agentapi.getAgent(pool, agentid, true, true, null).then((agent) => { - trace.debug("disable request: %s", disable); - if (Parallel) { - agent.maxParallelism = Parallel; - agentapi.updateAgent(agent, pool, agentid); - } - if (deleteAgent) { - if (deleteAgent == "true") { - return agentapi.deleteAgent(pool, agentid).then(() => { - trace.debug("agent set for deletion : %s"); - agent.id = null; - return agent; - }) - } - if (deleteAgent != "true") { - trace.error("allowed value is [true] only!") - } - } - if (disable) { - if (disable == "true") { - include = false; - trace.debug("agent status (enabled): %s", agent.enabled); - agent.enabled = false; - agentapi.updateAgent(agent, pool, agentid); - trace.debug("agent status (enabled): %s", agent.enabled); - } - if (disable == "false") { - include = false; - trace.debug("agent status (enabled): %s", agent.enabled); - agent.enabled = true; - agentapi.updateAgent(agent, pool, agentid); - trace.debug("agent status (enabled): %s", agent.enabled); - } - if (disable != "true" && disable != "false") { - trace.error("allowed values are [true] or [false]!") - } - } - if (newkey) { - include = false; - var capabilities: { [key: string]: string; } = agent.userCapabilities; - //capabilities[newkey] = value; - let userCapabilitiesObj = {}; - for (var attrname in capabilities) { userCapabilitiesObj[attrname] = capabilities[attrname] } - userCapabilitiesObj[newkey] = value; - - agentapi.updateAgentUserCapabilities(userCapabilitiesObj, pool, agentid); - }; - - if (waitForInProgressRequests == "true") { - var timer = setInterval(function () { - return agentapi.getAgentRequestsForAgent(pool, agent.id, 0).then(function (requests) { - if (requests.length <= 0) { - clearInterval(timer); - timer = null; - trace.info("-------------- There are no requests which are 'in progress' state "); - } - else { - trace.info("-------------- The agent [ %s ] is currently running the job [ %s ] ", agent.name, requests[0].definition.name); - } - }).catch(function (e) { - trace.info("==== ERROR Occurred ===== "); - trace.error(e.stack); - trace.error(e.message); - clearInterval(timer); - timer = null; - }); - }, 60000); - } - return agentapi.getAgent(pool, agentid, include, include, null) - }); - } -} \ No newline at end of file diff --git a/app/exec/build/agents.ts b/app/exec/build/agents.ts deleted file mode 100644 index 69a68f47..00000000 --- a/app/exec/build/agents.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { TfCommand } from "../../lib/tfcommand"; -import args = require("../../lib/arguments"); -import agentBase = require("./default"); -import agentClient = require("vso-node-api/TaskAgentApiBase"); -import taskAgentContracts = require("vso-node-api/interfaces/TaskAgentInterfaces"); -import trace = require("../../lib/trace"); -import taskAgentApi = require("vso-node-api/TaskAgentApi"); - -export function getCommand(args: string[]): Agents { - return new Agents(args); -} - -export class Agents extends agentBase.BuildBase { - protected serverCommand = true; - protected description = "Show task agent list in a pool."; - protected getHelpArgs(): string[] { - return ["poolId"]; - } - - public exec(): Promise { - trace.debug("agents.exec"); - var agentapi: agentClient.ITaskAgentApiBase = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl().substring(0,this.connection.getCollectionUrl().lastIndexOf("/"))); - return this.commandArgs.poolId.val().then((pool) => { - trace.debug("getting pool : %s",pool); - return agentapi.getAgents(pool); - }); - } - - public friendlyOutput(agents: taskAgentContracts.TaskAgent[]): void { - if (!agents) { - throw new Error("pool not supplied or not found"); - } - trace.info("Agents in pool:") - trace.println(); - agents.forEach((agent) => { - trace.info(" %s (%s) : %s ", agent.id,agent.version, agent.name); - }); - } -} diff --git a/app/exec/build/agents/disable.ts b/app/exec/build/agents/disable.ts deleted file mode 100644 index ea81cde9..00000000 --- a/app/exec/build/agents/disable.ts +++ /dev/null @@ -1,130 +0,0 @@ -import { TfCommand } from "../../../lib/tfcommand"; -import args = require("../../../lib/arguments"); -import agentBase = require("./default"); -import agentClient = require("vso-node-api/TaskAgentApiBase"); -import taskAgentContracts = require("vso-node-api/interfaces/TaskAgentInterfaces"); -import trace = require("../../../lib/trace"); -import taskAgentApi = require("vso-node-api/TaskAgentApi"); - -export function describe(): string { - return "Disable Agent"; -} - -export function getCommand(args: string[]): AgentDisable { - return new AgentDisable(args); -} - -export class AgentDisable extends agentBase.AgentBase { - protected serverCommand = true; - protected description = "Disable Agent."; - protected getHelpArgs(): string[] { - return ["poolId", "agentId", "agentName", "userCapabilityKey", "userCapabilityValue", "disable", "deleteAgent", "parallel", "waitForInProgressRequests"]; - } - - public exec(): Promise { - trace.debug("agent.exec"); - var agentapi: agentClient.ITaskAgentApiBase = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl().substring(0, this.connection.getCollectionUrl().lastIndexOf("/"))); - return Promise.all([ - this.commandArgs.agentId.val(), - this.commandArgs.agentName.val(), - this.commandArgs.poolId.val(), - this.commandArgs.userCapabilityKey.val(), - this.commandArgs.userCapabilityValue.val(), - this.commandArgs.disable.val(), - this.commandArgs.deleteAgent.val(), - this.commandArgs.parallel.val(), - this.commandArgs.waitForInProgressRequests.val(), - ]).then((values) => { - const [agentid, agentname, pool, newkey, value, disable, deleteAgent, maxParallel, waitForInProgressRequests] = values; - var agents: number[] = null; - trace.debug("getting pool : %s", pool); - trace.debug("getting agent (id) : %s", agentid); - trace.debug("getting agent (name) : %s", agentname); - var include: boolean = true; - if (agentid) { - agents = [agentid as number]; - } - else if (agentname) { - trace.debug("No agent Id provided, checking for agent with name " + agentname); - return agentapi.getAgents(pool as number, agentname as string).then((ao: taskAgentContracts.TaskAgent[]) => { - if (ao.length > 0) { - var aid = ao[0].id; - var an = ao[0].name; - trace.debug("found, agent id %s for agent name %s", aid, an); - return this._getOrUpdateAgent(agentapi, pool as number, aid, newkey as string, value as string, include, disable as string, deleteAgent as string, maxParallel as number, waitForInProgressRequests as string); - } - else { - trace.debug("No agents found with name " + agentname); - throw new Error("No agents found with name " + agentname); - - } - }); - } - - trace.debug("disable request: %s", disable); - return this._getOrUpdateAgent(agentapi, pool as number, agentid as number, newkey as string, value as string, include, disable as string, deleteAgent as string, maxParallel as number, waitForInProgressRequests as string); - }); - }; - private _getOrUpdateAgent(agentapi: agentClient.ITaskAgentApiBase, pool: number, agentid: number, newkey: string, value: string, include: boolean, disable: string, deleteAgent: string, Parallel: number, waitForInProgressRequests: string) { - return agentapi.getAgent(pool, agentid, true, true, null).then((agent) => { - trace.debug("disable request: %s", disable); - if (Parallel) { - agent.maxParallelism = Parallel; - agentapi.updateAgent(agent, pool, agentid); - } - if (deleteAgent) { - if (deleteAgent == "true") { - return agentapi.deleteAgent(pool, agentid).then(() => { - trace.debug("agent set for deletion : %s"); - agent.id = null; - return agent; - }) - } - if (deleteAgent != "true") { - trace.error("allowed value is [true] only!") - } - } - if (disable) { - if (disable == "true") { - include = false; - trace.debug("agent status (enabled): %s", agent.enabled); - agent.enabled = false; - agentapi.updateAgent(agent, pool, agentid); - trace.debug("agent status (enabled): %s", agent.enabled); - } - if (disable == "false") { - include = false; - trace.debug("agent status (enabled): %s", agent.enabled); - agent.enabled = true; - agentapi.updateAgent(agent, pool, agentid); - trace.debug("agent status (enabled): %s", agent.enabled); - } - if (disable != "true" && disable != "false") { - trace.error("allowed values are [true] or [false]!") - } - } - - if (waitForInProgressRequests == "true") { - var timer = setInterval(function () { - return agentapi.getAgentRequestsForAgent(pool, agent.id, 0).then(function (requests) { - if (requests.length <= 0) { - clearInterval(timer); - timer = null; - trace.info("-------------- There are no requests which are 'in progress' state "); - } - else { - trace.info("-------------- The agent [ %s ] is currently running the job [ %s ] ", agent.name, requests[0].definition.name); - } - }).catch(function (e) { - trace.info("==== ERROR Occurred ===== "); - trace.error(e.stack); - trace.error(e.message); - clearInterval(timer); - timer = null; - }); - }, 60000); - } - return agentapi.getAgent(pool, agentid, include, include, null) - }); - } -} diff --git a/app/exec/build/tasks/validate.ts b/app/exec/build/tasks/validate.ts deleted file mode 100644 index e826291c..00000000 --- a/app/exec/build/tasks/validate.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { TfCommand } from "../../../lib/tfcommand"; -import agentContracts = require('vso-node-api/interfaces/TaskAgentInterfaces'); -import archiver = require('archiver'); -import args = require("../../../lib/arguments"); -import fs = require('fs'); -import path = require('path'); -import tasksBase = require("./default"); -import trace = require('../../../lib/trace'); -import vm = require('../../../lib/jsonvalidate') -var check = require('validator'); - - -export function getCommand(args: string[]): BuildTaskValidate { - return new BuildTaskValidate(args); -} - -var c_taskJsonFile: string = 'task.json'; - -export class BuildTaskValidate extends tasksBase.BuildTaskBase { - protected description = "Validate a Build Task."; - protected serverCommand = true; - - protected getHelpArgs(): string[] { - return ["taskPath"]; - } - - public exec(): Promise { - return this.commandArgs.taskPath.val().then((taskPaths) => { - let taskPath = taskPaths[0]; - return this.commandArgs.overwrite.val().then((overwrite) => { - vm.exists(taskPath, 'specified directory ' + taskPath + ' does not exist.'); - //directory is good, check json - - let tp = path.join(taskPath, c_taskJsonFile); - return vm.validate(tp, 'no ' + c_taskJsonFile + ' in specified directory').then((taskJson) => { - let archive = archiver('zip'); - archive.on('error', function (error) { - trace.debug('Archiving error: ' + error.message); - error.message = 'Archiving error: ' + error.message; - throw error; - }); - return { - sourceLocation: taskPath - }; - }); - }); - }); - } - - public friendlyOutput(data: agentContracts.TaskDefinition): void { - trace.println(); - trace.success('Task at %s Validated successfully!', data.sourceLocation); - } -} - - - diff --git a/package.json b/package.json index c13b8875..118e76b3 100644 --- a/package.json +++ b/package.json @@ -36,10 +36,10 @@ "q": "^1.4.1", "read": "^1.0.6", "request": "2.58.0", - "shelljs": "^0.5.3", + "shelljs": "^0.5.1", "tmp": "0.0.26", "tracer": "0.7.4", - "uuid": "^3.1.0", + "uuid": "^3.0.1", "validator": "^3.43.0", "vso-node-api": "^5.1.2", "winreg": "0.0.12", From 58447de49758d1e42f4dd5b7b3434358f53f317c Mon Sep 17 00:00:00 2001 From: Mois Date: Mon, 7 Aug 2017 14:50:45 +0300 Subject: [PATCH 193/235] adding validate.ts --- app/exec/build/tasks/validate.ts | 53 ++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 app/exec/build/tasks/validate.ts diff --git a/app/exec/build/tasks/validate.ts b/app/exec/build/tasks/validate.ts new file mode 100644 index 00000000..6ba319ab --- /dev/null +++ b/app/exec/build/tasks/validate.ts @@ -0,0 +1,53 @@ +import { TfCommand } from "../../../lib/tfcommand"; +import agentContracts = require('vso-node-api/interfaces/TaskAgentInterfaces'); +import archiver = require('archiver'); +import args = require("../../../lib/arguments"); +import fs = require('fs'); +import path = require('path'); +import tasksBase = require("./default"); +import trace = require('../../../lib/trace'); +import vm = require('../../../lib/jsonvalidate') +var check = require('validator'); + +export function getCommand(args: string[]): BuildTaskValidate { + return new BuildTaskValidate(args); +} + +var c_taskJsonFile: string = 'task.json'; + +export class BuildTaskValidate extends tasksBase.BuildTaskBase { + protected description = "Validate a Build Task."; + protected serverCommand = true; + + protected getHelpArgs(): string[] { + return ["taskPath"]; + } + + public exec(): Promise { + return this.commandArgs.taskPath.val().then((taskPaths) => { + let taskPath = taskPaths[0]; + return this.commandArgs.overwrite.val().then((overwrite) => { + vm.exists(taskPath, 'specified directory ' + taskPath + ' does not exist.'); + //directory is good, check json + + let tp = path.join(taskPath, c_taskJsonFile); + return vm.validate(tp, 'no ' + c_taskJsonFile + ' in specified directory').then((taskJson) => { + let archive = archiver('zip'); + archive.on('error', function (error) { + trace.debug('Archiving error: ' + error.message); + error.message = 'Archiving error: ' + error.message; + throw error; + }); + return { + sourceLocation: taskPath + }; + }); + }); + }); + } + + public friendlyOutput(data: agentContracts.TaskDefinition): void { + trace.println(); + trace.success('Task at %s Validated successfully!', data.sourceLocation); + } +} From c9227f05049230105a88a58b2f2b77ab0e274002 Mon Sep 17 00:00:00 2001 From: Shani Feldman Date: Mon, 21 Aug 2017 14:25:14 +0300 Subject: [PATCH 194/235] fix build agnets list arguments (poolId not agentId) --- app/exec/build/agents/list.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/exec/build/agents/list.ts b/app/exec/build/agents/list.ts index f0eed417..4adb9eec 100644 --- a/app/exec/build/agents/list.ts +++ b/app/exec/build/agents/list.ts @@ -13,7 +13,7 @@ export class AgentDetails extends agentBase.AgentBase { From 62748b00e1dfcb3fd102a76c9c3593e8c46d4a09 Mon Sep 17 00:00:00 2001 From: "Shpigelman, StasX" Date: Wed, 27 Sep 2017 12:29:05 +0300 Subject: [PATCH 195/235] Fix create new task variables bug --- app/exec/build/tasks/create.ts | 12 ++++++------ app/exec/build/tasks/default.ts | 20 ++++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/app/exec/build/tasks/create.ts b/app/exec/build/tasks/create.ts index 552762f0..1693ad2c 100644 --- a/app/exec/build/tasks/create.ts +++ b/app/exec/build/tasks/create.ts @@ -45,18 +45,18 @@ export class TaskCreate extends tasksBase.BuildTaskBase { return ["taskName", "friendlyName", "description", "author"]; } - public exec(): Promise { + public async exec(): Promise { trace.debug("build-create.exec"); return Promise.all([ - this.commandArgs.taskName.val(), - this.commandArgs.friendlyName.val(), - this.commandArgs.description.val(), - this.commandArgs.author.val(), + await this.commandArgs.taskName.val(), + await this.commandArgs.friendlyName.val(), + await this.commandArgs.description.val(), + await this.commandArgs.author.val(), ]).then((values) => { const [taskName, friendlyName, description, author] = values; if (!taskName || !check.isAlphanumeric(taskName)) { - throw new Error("name is a required alphanumeric string with no spaces"); + throw new Error("taskName is a required alphanumeric string with no spaces"); } if (!friendlyName || !check.isLength(friendlyName, 1, 40)) { diff --git a/app/exec/build/tasks/default.ts b/app/exec/build/tasks/default.ts index bff27010..14360a6c 100644 --- a/app/exec/build/tasks/default.ts +++ b/app/exec/build/tasks/default.ts @@ -12,9 +12,9 @@ export interface TaskArguments extends buildBase.BuildArguments { friendlyName: args.StringArgument; description: args.StringArgument; author: args.StringArgument; - taskVersion :args.StringArgument; - filter :args.StringArgument; - name : args.StringArgument; + taskVersion: args.StringArgument; + filter: args.StringArgument; + name: args.StringArgument; id: args.StringArgument; } @@ -34,13 +34,13 @@ export class BuildTaskBase extends buildBase.BuildBase { this.registerCommandArgument("taskPath", "Task path", "Local path to a Build Task.", args.ExistingDirectoriesArgument); this.registerCommandArgument("overwrite", "Overwrite?", "Overwrite existing Build Task.", args.BooleanArgument, "false"); this.registerCommandArgument("taskName", "Task Name", "Name of the Build Task.", args.StringArgument); - this.registerCommandArgument("friendlyName", "Friendly Task Name.", null, args.StringArgument); - this.registerCommandArgument("description", "Task Description.", null, args.StringArgument); - this.registerCommandArgument("author", "Task Author.", null, args.StringArgument); - this.registerCommandArgument("taskVersion", "Task Version", "Build Task version.", args.StringArgument,null); - this.registerCommandArgument("filter", "name filter", "Filter list by name match case.", args.StringArgument,null); - this.registerCommandArgument("name", "Task Name", "Name of the Build Task to download.", args.StringArgument,null); - this.registerCommandArgument("id", "Task ID", "Identifies a particular Build Task.", args.StringArgument,null); + this.registerCommandArgument("friendlyName", "Friendly Task Name", null, args.StringArgument); + this.registerCommandArgument("description", "Task Description", null, args.StringArgument); + this.registerCommandArgument("author", "Task Author", null, args.StringArgument); + this.registerCommandArgument("taskVersion", "Task Version", "Build Task version.", args.StringArgument, null); + this.registerCommandArgument("filter", "name filter", "Filter list by name match case.", args.StringArgument, null); + this.registerCommandArgument("name", "Task Name", "Name of the Build Task to download.", args.StringArgument, null); + this.registerCommandArgument("id", "Task ID", "Identifies a particular Build Task.", args.StringArgument, null); } public exec(cmd?: any): Promise { From a9e37c7b2523dd7c84a7653e3901e61ce11b853a Mon Sep 17 00:00:00 2001 From: Shani Feldman Date: Wed, 18 Oct 2017 14:11:52 +0300 Subject: [PATCH 196/235] roll ahead typescript version 2.2.2 --- package.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/package.json b/package.json index 416725ea..b5171534 100644 --- a/package.json +++ b/package.json @@ -59,11 +59,7 @@ "@types/xml2js": "0.0.27", "ncp": "^2.0.0", "rimraf": "^2.6.1", -<<<<<<< HEAD "typescript": "2.2.2", -======= - "typescript": "~2.2.1", ->>>>>>> upstream/master "webpack": "^1.13.2" }, "author": "", From 23dcaf3f28cee3eb0f83ac2496976fe2143842ef Mon Sep 17 00:00:00 2001 From: Date: Wed, 25 Oct 2017 20:19:16 +0300 Subject: [PATCH 197/235] upstream changes Oct 25th --- app/exec/extension/_lib/extensioninfo.ts | 6 +++--- app/exec/extension/_lib/publish.ts | 6 +++--- app/exec/extension/_lib/vsix-manifest-builder.ts | 10 +++++----- app/lib/arguments.ts | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/app/exec/extension/_lib/extensioninfo.ts b/app/exec/extension/_lib/extensioninfo.ts index 70d750ff..a4167b6d 100644 --- a/app/exec/extension/_lib/extensioninfo.ts +++ b/app/exec/extension/_lib/extensioninfo.ts @@ -44,9 +44,9 @@ export function getExtInfo(vsixPath: string, extensionId: string, publisherName: throw new Error("Could not locate vsix manifest!"); } }).then((vsixManifestAsJson) => { - let foundExtId: string = extensionId || _.get(vsixManifestAsJson, "PackageManifest.Metadata[0].Identity[0].$.Id"); - let foundPublisher: string = publisherName || _.get(vsixManifestAsJson, "PackageManifest.Metadata[0].Identity[0].$.Publisher"); - let extensionVersion: string = _.get(vsixManifestAsJson, "PackageManifest.Metadata[0].Identity[0].$.Version"); + let foundExtId: string = extensionId || _.get(vsixManifestAsJson, "PackageManifest.Metadata[0].Identity[0].$.Id"); + let foundPublisher: string = publisherName || _.get(vsixManifestAsJson, "PackageManifest.Metadata[0].Identity[0].$.Publisher"); + let extensionVersion: string = _.get(vsixManifestAsJson, "PackageManifest.Metadata[0].Identity[0].$.Version"); if (foundExtId && foundPublisher) { return {id: foundExtId, publisher: foundPublisher, version: extensionVersion}; } else { diff --git a/app/exec/extension/_lib/publish.ts b/app/exec/extension/_lib/publish.ts index 4baff433..7e5e232f 100644 --- a/app/exec/extension/_lib/publish.ts +++ b/app/exec/extension/_lib/publish.ts @@ -73,9 +73,9 @@ export class GalleryBase { throw "Could not locate vsix manifest!"; } }).then((vsixManifestAsJson) => { - let extensionId: string = info.extensionId || _.get(vsixManifestAsJson, "PackageManifest.Metadata[0].Identity[0].$.Id"); - let extensionPublisher: string = info.publisher || _.get(vsixManifestAsJson, "PackageManifest.Metadata[0].Identity[0].$.Publisher"); - let extensionVersion: string = _.get(vsixManifestAsJson, "PackageManifest.Metadata[0].Identity[0].$.Version"); + let extensionId: string = info.extensionId || _.get(vsixManifestAsJson, "PackageManifest.Metadata[0].Identity[0].$.Id"); + let extensionPublisher: string = info.publisher || _.get(vsixManifestAsJson, "PackageManifest.Metadata[0].Identity[0].$.Publisher"); + let extensionVersion: string = _.get(vsixManifestAsJson, "PackageManifest.Metadata[0].Identity[0].$.Version"); if (extensionId && extensionPublisher) { return { id: extensionId, publisher: extensionPublisher, version: extensionVersion }; } else { diff --git a/app/exec/extension/_lib/vsix-manifest-builder.ts b/app/exec/extension/_lib/vsix-manifest-builder.ts index 145aae58..b18b3d30 100644 --- a/app/exec/extension/_lib/vsix-manifest-builder.ts +++ b/app/exec/extension/_lib/vsix-manifest-builder.ts @@ -271,7 +271,7 @@ export class VsixManifestBuilder extends ManifestBuilder { case "links": if (_.isObject(value)) { Object.keys(value).forEach((linkType) => { - let url = _.get(value, linkType + ".uri") || _.get(value, linkType + ".url"); + let url = _.get(value, linkType + ".uri") || _.get(value, linkType + ".url"); if (url) { let linkTypeCased = _.capitalize(_.camelCase(linkType)); this.addProperty("Microsoft.VisualStudio.Services.Links." + linkTypeCased, url); @@ -433,7 +433,7 @@ export class VsixManifestBuilder extends ManifestBuilder { * Get the id of the extension this vsixmanifest goes to */ public getExtensionId() { - return _.get(this.data, "PackageManifest.Metadata[0].Identity[0].$.Id"); + return _.get(this.data, "PackageManifest.Metadata[0].Identity[0].$.Id"); } /** @@ -455,14 +455,14 @@ export class VsixManifestBuilder extends ManifestBuilder { * Get the publisher this vsixmanifest goes to */ public getExtensionPublisher() { - return _.get(this.data, "PackageManifest.Metadata[0].Identity[0].$.Publisher"); + return _.get(this.data, "PackageManifest.Metadata[0].Identity[0].$.Publisher"); } /** * Get the version of the extension this vsixmanifest goes to */ public getExtensionVersion() { - return _.get(this.data, "PackageManifest.Metadata[0].Identity[0].$.Version"); + return _.get(this.data, "PackageManifest.Metadata[0].Identity[0].$.Version"); } /** @@ -472,7 +472,7 @@ export class VsixManifestBuilder extends ManifestBuilder { public finalize(files: PackageFiles, resourceData: LocalizedResources, builders: ManifestBuilder[]): Promise { return super.finalize(files, resourceData, builders).then(() => { // Default installation target to VSS if not provided (and log warning) - let installationTarget = _.get(this.data, "PackageManifest.Installation[0].InstallationTarget"); + let installationTarget = _.get(this.data, "PackageManifest.Installation[0].InstallationTarget"); if (resourceData) { Object.keys(resourceData).forEach(languageTag => { diff --git a/app/lib/arguments.ts b/app/lib/arguments.ts index 663f9279..eae81e72 100644 --- a/app/lib/arguments.ts +++ b/app/lib/arguments.ts @@ -55,7 +55,7 @@ export abstract class Argument { initPromise = getOptionsCache().then((cache) => { let cacheKey = path.resolve().replace("/\.\[\]/g", "-") + "." + common.EXEC_PATH.slice(0, common.EXEC_PATH.length - 1).join("/"); - let cachedValue = _.get(cache, cacheKey + "." + this.name); + let cachedValue = _.get(cache, cacheKey + "." + this.name); let cachedValueStringArray: string[]; if (typeof cachedValue === "string") { cachedValueStringArray = [cachedValue]; From f4ed3250e6a85a5e8621746df15de7ed08c14cec Mon Sep 17 00:00:00 2001 From: Date: Mon, 6 Nov 2017 11:21:32 +0200 Subject: [PATCH 198/235] add repodetails support for vsts (TODO: add support for on prem) --- app/exec/code/git/repodetails.ts | 43 ++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 app/exec/code/git/repodetails.ts diff --git a/app/exec/code/git/repodetails.ts b/app/exec/code/git/repodetails.ts new file mode 100644 index 00000000..c04901e9 --- /dev/null +++ b/app/exec/code/git/repodetails.ts @@ -0,0 +1,43 @@ +import { success, warn } from '../../../lib/trace'; +import { errLog } from '../../../lib/errorhandler'; +import args = require("../../../lib/arguments"); +import trace = require('../../../lib/trace'); +import gi = require('vso-node-api/interfaces/GitInterfaces'); +import git_Api = require('vso-node-api/GitApi') +import VSSInterfaces = require("vso-node-api/interfaces/common/VSSInterfaces"); +import codedBase = require("./default"); +import TfsCoreInterfaces = require("vso-node-api/interfaces/CoreInterfaces"); + +export function getCommand(args: string[]): GetRepositoryDetails { + return new GetRepositoryDetails(args); +} + +export class GetRepositoryDetails extends codedBase.CodeBase { + protected serverCommand = true; + protected description = "Get a git repository details"; + + protected getHelpArgs(): string[] { + return ["repositoryid"]; + } + + public async exec(): Promise { + //getting variables. + var gitApi: git_Api.IGitApi = this.webApi.getGitApi(); + var id = await this.commandArgs.repositoryid.val(); + return await gitApi.getRepository(id); + }; + + public friendlyOutput(data: gi.GitRepository): void { + if (!data) { + throw new Error("no repository supplied"); + } + console.log(' '); + trace.println(); + trace.info('name : %s', data.name); + trace.info('id : %s', data.id); + trace.info('clone (https) : %s', data.remoteUrl); + trace.info('clone (ssh) : %s', data.remoteUrl.replace("https", "ssh").replace(".visualstudio.com","@vs-ssh.visualstudio.com:22").replace("_git","_ssh")); + trace.info('API URL : %s', data.url); + } + +}; From 4cff492058c87ea60e623fb8ef0a0cd9a7a6c42d Mon Sep 17 00:00:00 2001 From: Amir Halatzi Date: Tue, 14 Nov 2017 10:05:01 +0200 Subject: [PATCH 199/235] Lodash's omit is deprecated. Replaced with pickBy --- app/exec/extension/_lib/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/exec/extension/_lib/utils.ts b/app/exec/extension/_lib/utils.ts index d0221855..a8a2559c 100644 --- a/app/exec/extension/_lib/utils.ts +++ b/app/exec/extension/_lib/utils.ts @@ -4,7 +4,7 @@ import path = require("path"); import xml = require("xml2js"); export function removeMetaKeys(obj: any): any { - return _.omit(obj, (v, k) => _.startsWith(k, "__meta_")); + return _.pickBy(obj,(v,k)=> !_.startsWith(k,"__meta_")); } export function cleanAssetPath(assetPath: string, root: string = ".") { From 1556a7066089c2ba3b9c3c0d50776281693d5053 Mon Sep 17 00:00:00 2001 From: Shani Feldman Date: Tue, 28 Nov 2017 21:44:05 +0200 Subject: [PATCH 200/235] modify build badge to shfeldma.visualstudio.com --- README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a67aa624..7b12bb8a 100644 --- a/README.md +++ b/README.md @@ -3,10 +3,8 @@ > NOTE: If you are looking for the new VSTS CLI, see [vsts-cli](https://github.com/microsoft/vsts-cli) [![NPM version](https://badge.fury.io/js/tfx-cli.svg)](http://badge.fury.io/js/tfx-cli) -#### Pull Request validation -[![PR Validation passing](https://intel-realsense.visualstudio.com/_apis/public/build/definitions/bb6e275d-d07a-4daa-a38c-d7e1470a9df3/2164/badge)](https://intel-realsense.visualstudio.com/_apis/public/build/definitions/bb6e275d-d07a-4daa-a38c-d7e1470a9df3/2164/badge) -#### Internal Deploy -[![build passing](https://intel-realsense.visualstudio.com/_apis/public/build/definitions/bb6e275d-d07a-4daa-a38c-d7e1470a9df3/1612/badge)](https://intel-realsense.visualstudio.com/_apis/public/build/definitions/bb6e275d-d07a-4daa-a38c-d7e1470a9df3/1612/badge) +#### Internal Deploy / Pull Request validation +[![build passing](https://shfeldma.visualstudio.com/_apis/public/build/definitions/0362c756-148c-4a35-9c69-19fef97b8761/1/badge)](https://shfeldma.visualstudio.com/_apis/public/build/definitions/0362c756-148c-4a35-9c69-19fef97b8761/1/badge) Command utility for interacting with Microsoft Team Foundation Server and Visual Studio Team Services. It is cross platform and supported on Windows, OS X, and Linux. From 151db338768b2743c165e656bedf7d44ebbee265 Mon Sep 17 00:00:00 2001 From: Stas Shpigelman Date: Thu, 30 Nov 2017 19:53:55 +0200 Subject: [PATCH 201/235] fixed a bug that required 'defaultcollection' to be added ty the login url if using VSTS --- app/exec/login.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/exec/login.ts b/app/exec/login.ts index 0440ebdf..2834b7cb 100644 --- a/app/exec/login.ts +++ b/app/exec/login.ts @@ -21,7 +21,7 @@ export interface LoginResult { export class Login extends TfCommand { protected description = "Login and cache credentials using a PAT or basic auth."; protected serverCommand = true; - + public exec(): Promise { trace.debug('Login.exec'); let authHandler; @@ -32,7 +32,11 @@ export class Login extends TfCommand { }).then((webApi) => { let agentApi = webApi.getTaskAgentApi(); return Q.Promise((resolve, reject) => { - + if (collectionUrl.includes('visualstudio.com')) { + if (collectionUrl[collectionUrl.length - 1] == '/') + collectionUrl = collectionUrl.substring(0, collectionUrl.length - 1); + collectionUrl = collectionUrl + '/DefaultCollection' + } return agentApi.connect().then((obj) => { let tfxCredStore = getCredentialStore("tfx"); let tfxCache = new DiskCache("tfx"); From c347c79dd803f712b1b4280b9420671e9af1b493 Mon Sep 17 00:00:00 2001 From: Stas Shpigelman Date: Thu, 30 Nov 2017 20:00:17 +0200 Subject: [PATCH 202/235] You can still connect with 'defaultcollection' in the url field while logging in --- app/exec/login.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/exec/login.ts b/app/exec/login.ts index 2834b7cb..b7d8032c 100644 --- a/app/exec/login.ts +++ b/app/exec/login.ts @@ -32,7 +32,7 @@ export class Login extends TfCommand { }).then((webApi) => { let agentApi = webApi.getTaskAgentApi(); return Q.Promise((resolve, reject) => { - if (collectionUrl.includes('visualstudio.com')) { + if (collectionUrl.includes('visualstudio.com') && !collectionUrl.toLocaleLowerCase().includes('defaultcollection')) { if (collectionUrl[collectionUrl.length - 1] == '/') collectionUrl = collectionUrl.substring(0, collectionUrl.length - 1); collectionUrl = collectionUrl + '/DefaultCollection' From 8491d09cdb06d07b09745fafe0b042020fbde91d Mon Sep 17 00:00:00 2001 From: Shani Feldman Date: Sun, 17 Dec 2017 21:21:00 +0200 Subject: [PATCH 203/235] ad lodash ^4.15.0 to @types - fix compilation issues --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b5171534..9c34e1bf 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "@types/copy-paste": "^1.1.29", "@types/glob": "^5.0.29", "@types/jszip": "0.0.30", - "@types/lodash": "^4.14.53", + "@types/lodash": "^4.15.0", "@types/mkdirp": "^0.3.28", "@types/node": "^6.0.38", "@types/shelljs": "^0.3.30", From 6131dbd78baf4a0d363dcc8d94d1198fb0eb2ad6 Mon Sep 17 00:00:00 2001 From: Shani Feldman Date: Sun, 17 Dec 2017 21:28:15 +0200 Subject: [PATCH 204/235] roll back lodash in @types --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9c34e1bf..b5171534 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "@types/copy-paste": "^1.1.29", "@types/glob": "^5.0.29", "@types/jszip": "0.0.30", - "@types/lodash": "^4.15.0", + "@types/lodash": "^4.14.53", "@types/mkdirp": "^0.3.28", "@types/node": "^6.0.38", "@types/shelljs": "^0.3.30", From 1322d36ce9ced253ff3c925d189485eef49bfa97 Mon Sep 17 00:00:00 2001 From: Shani Feldman Date: Sun, 17 Dec 2017 21:56:18 +0200 Subject: [PATCH 205/235] replace badge to new TP --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7b12bb8a..b1119523 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![NPM version](https://badge.fury.io/js/tfx-cli.svg)](http://badge.fury.io/js/tfx-cli) #### Internal Deploy / Pull Request validation -[![build passing](https://shfeldma.visualstudio.com/_apis/public/build/definitions/0362c756-148c-4a35-9c69-19fef97b8761/1/badge)](https://shfeldma.visualstudio.com/_apis/public/build/definitions/0362c756-148c-4a35-9c69-19fef97b8761/1/badge) +[![build passing](https://shfeldma.visualstudio.com/_apis/public/build/definitions/f4b6db46-e446-49f0-a424-0bfb52c0925d/2/badge)](https://shfeldma.visualstudio.com/_apis/public/build/definitions/f4b6db46-e446-49f0-a424-0bfb52c0925d/2/badge) Command utility for interacting with Microsoft Team Foundation Server and Visual Studio Team Services. It is cross platform and supported on Windows, OS X, and Linux. From c82ccbb42eb89756283390a0231585c9c9fad914 Mon Sep 17 00:00:00 2001 From: Shani Feldman Date: Mon, 18 Dec 2017 00:21:41 +0200 Subject: [PATCH 206/235] lock @types/lodash 4.14.69 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b5171534..a7d6ff2d 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "@types/copy-paste": "^1.1.29", "@types/glob": "^5.0.29", "@types/jszip": "0.0.30", - "@types/lodash": "^4.14.53", + "@types/lodash": "4.14.69", "@types/mkdirp": "^0.3.28", "@types/node": "^6.0.38", "@types/shelljs": "^0.3.30", From e6fbc369fed793d16b806fc5d5a95bbf63d49785 Mon Sep 17 00:00:00 2001 From: Shani Feldman Date: Thu, 21 Dec 2017 19:45:52 +0200 Subject: [PATCH 207/235] bump version to 0.5.2 in pre build --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index bec9ae37..513634e3 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ "author": "", "license": "MIT", "name": "tfx-cli", - "version": "0.5.0", + "version": "0.5.2", "description": "CLI for Visual Studio Team Services and Team Foundation Server", "repository": { "type": "git", @@ -137,4 +137,4 @@ } ], "license": "MIT" -} +} \ No newline at end of file From ad765df9e0e417916065e33162a8d470f14efd84 Mon Sep 17 00:00:00 2001 From: Shani Feldman Date: Thu, 21 Dec 2017 22:42:34 +0200 Subject: [PATCH 208/235] add my details as authoring contributor --- package.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/package.json b/package.json index 513634e3..dd6ea45b 100644 --- a/package.json +++ b/package.json @@ -134,6 +134,10 @@ { "email": "trgau@microsoft.com", "name": "Trevor Gau" + }, + { + "email": "shfeldma@microsoft.com", + "name": "Shani Feldman" } ], "license": "MIT" From d3c86611442c002f9be066c060bca380eb780b28 Mon Sep 17 00:00:00 2001 From: Shani Feldman Date: Sat, 23 Dec 2017 10:17:40 +0200 Subject: [PATCH 209/235] changes in package.json --- package.json | 76 +++++----------------------------------------------- 1 file changed, 6 insertions(+), 70 deletions(-) diff --git a/package.json b/package.json index dd6ea45b..2d5a3583 100644 --- a/package.json +++ b/package.json @@ -1,69 +1,4 @@ { - "name": "tfx-cli", - "version": "0.5.2", - "description": "CLI for Visual Studio Team Services and Team Foundation Server", - "repository": { - "type": "git", - "url": "https://github.com/Microsoft/tfs-cli" - }, - "main": "./_build/tfx-cli.js", - "preferGlobal": true, - "bin": { - "tfx": "./_build/tfx-cli.js" - }, - "scripts": { - "clean": "rimraf _build", - "build": "tsc -p .", - "postbuild": "ncp app/tfx-cli.js _build/tfx-cli.js && ncp package.json _build/package.json && ncp app/exec/build/tasks/_resources _build/exec/build/tasks/_resources", - "prepublish": "npm run build" - }, - "dependencies": { - "app-root-path": "1.0.0", - "archiver": "2.0.3", - "async": "^1.4.0", - "colors": "^1.1.2", - "copy-paste": "^1.3.0", - "glob": "7.1.2", - "inquirer": "0.8.5", - "json-in-place": "^1.0.1", - "jszip": "2.5.0", - "lodash": "^4.15.0", - "minimist": "^1.1.2", - "mkdirp": "^0.5.1", - "onecolor": "^2.5.0", - "os-homedir": "^1.0.1", - "prompt": "^0.2.14", - "q": "^1.4.1", - "read": "^1.0.6", - "shelljs": "^0.5.1", - "tmp": "0.0.26", - "tracer": "0.7.4", - "uuid": "^3.0.1", - "validator": "^3.43.0", - "vso-node-api": "^5.1.2", - "winreg": "0.0.12", - "xml2js": "^0.4.16" - }, - "devDependencies": { - "@types/colors": "^0.6.31", - "@types/copy-paste": "^1.1.29", - "@types/glob": "^5.0.29", - "@types/jszip": "0.0.30", - "@types/lodash": "^4.14.69", - "@types/mkdirp": "^0.3.28", - "@types/node": "^6.0.38", - "@types/shelljs": "^0.3.30", - "@types/uuid": "^2.0.29", - "@types/validator": "^4.5.27", - "@types/winreg": "^1.2.29", - "@types/xml2js": "0.0.27", - "ncp": "^2.0.0", - "rimraf": "^2.6.1", - "typescript": "2.2.2", - "webpack": "^1.13.2" - }, - "author": "", - "license": "MIT", "name": "tfx-cli", "version": "0.5.2", "description": "CLI for Visual Studio Team Services and Team Foundation Server", @@ -91,7 +26,7 @@ "glob": "7.1.2", "inquirer": "0.8.5", "json-in-place": "^1.0.1", - "jszip": "~3.1.5", + "jszip": "^3.1.5", "lodash": "^4.15.0", "minimist": "^1.1.2", "mkdirp": "^0.5.1", @@ -100,6 +35,7 @@ "prompt": "^0.2.14", "read": "^1.0.6", "shelljs": "^0.5.1", + "tabtab": "^2.2.2", "tmp": "0.0.26", "tracer": "0.7.4", "uuid": "^3.0.1", @@ -126,10 +62,11 @@ "typescript": "~2.6.2", "webpack": "^1.13.2" }, + "author": "Microsoft Corporation", + "license": "MIT", "engines": { "npm": ">=8.0.0" }, - "author": "Microsoft Corporation", "contributors": [ { "email": "trgau@microsoft.com", @@ -139,6 +76,5 @@ "email": "shfeldma@microsoft.com", "name": "Shani Feldman" } - ], - "license": "MIT" -} \ No newline at end of file + ] +} From 5fbf0d2f14a1e12d6b7db6ad95bd7249cc28d64f Mon Sep 17 00:00:00 2001 From: Shani Feldman Date: Sat, 23 Dec 2017 10:39:10 +0200 Subject: [PATCH 210/235] remove require('q') from residual files in private fork --- app/exec/build/templates/list.ts | 1 - app/exec/default.ts | 1 - app/exec/logout.ts | 1 - package-lock.json | 643 +++++++++++++++++++++++++++---- 4 files changed, 563 insertions(+), 83 deletions(-) diff --git a/app/exec/build/templates/list.ts b/app/exec/build/templates/list.ts index 654cec21..2420bca0 100644 --- a/app/exec/build/templates/list.ts +++ b/app/exec/build/templates/list.ts @@ -2,7 +2,6 @@ import { TfCommand, CoreArguments } from "../../../lib/tfcommand"; import buildContracts = require('vso-node-api/interfaces/BuildInterfaces'); import args = require("../../../lib/arguments"); import trace = require('../../../lib/trace'); -import Q = require("q"); export function getCommand(args: string[]): ListTemplates { return new ListTemplates(args); diff --git a/app/exec/default.ts b/app/exec/default.ts index f494bc58..2d30425e 100644 --- a/app/exec/default.ts +++ b/app/exec/default.ts @@ -1,6 +1,5 @@ import { TfCommand } from "../lib/tfcommand"; import args = require("../lib/arguments"); -import Q = require('q'); export function getCommand(args: string[]): TfCommand { return new DefaultCommand(args); diff --git a/app/exec/logout.ts b/app/exec/logout.ts index 029b6f3f..7124ced0 100644 --- a/app/exec/logout.ts +++ b/app/exec/logout.ts @@ -5,7 +5,6 @@ import args = require("../lib/arguments"); import common = require("../lib/common"); import credStore = require("../lib/credstore"); import path = require("path"); -import Q = require('q'); import trace = require("../lib/trace"); diff --git a/package-lock.json b/package-lock.json index 74c7ce8a..cb06b3b9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,20 +5,28 @@ "requires": true, "dependencies": { "@types/colors": { - "version": "file:mycachedir\\@types\\colors\\0.6.33\\package.tgz", + "version": "file:https:/registry.npmjs.org/@types/colors/-/colors-0.6.33.tgz", "integrity": "sha1-F9raWXHDlSWUkNbIPXwYLPbpzlU=", "dev": true }, "@types/copy-paste": { - "version": "file:mycachedir\\@types\\copy-paste\\1.1.30\\package.tgz", + "version": "file:https:/registry.npmjs.org/@types/copy-paste/-/copy-paste-1.1.30.tgz", "integrity": "sha1-p9RUyeHkVCMo9/Huz1Mzvoz7UO0=", "dev": true }, + "@types/events": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@types/events/-/events-1.1.0.tgz", + "integrity": "sha512-y3bR98mzYOo0pAZuiLari+cQyiKk3UXRuT45h1RjhfeCzqkjaVsfZJNaxdgtk7/3tzOm1ozLTqEqMP3VbI48jw==", + "dev": true + }, "@types/glob": { - "version": "https://registry.npmjs.org/@types/glob/-/glob-5.0.32.tgz", - "integrity": "sha1-rsXP6YfHLwmf2xGERSmGqlBtXo8=", + "version": "5.0.34", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-5.0.34.tgz", + "integrity": "sha512-sUvpieq+HsWTLdkeOI8Mi8u22Ag3AoGuM3sv+XMP1bKtbaIAHpEA2f52K2mz6vK5PVhTa3bFyRZLZMqTxOo2Cw==", "dev": true, "requires": { + "@types/events": "1.1.0", "@types/minimatch": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.1.tgz", "@types/node": "8.5.1" } @@ -33,8 +41,9 @@ } }, "@types/lodash": { - "version": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.76.tgz", - "integrity": "sha1-h4dPdmd01U6JWJaXNAvpSW+4v3A=", + "version": "4.14.69", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.69.tgz", + "integrity": "sha512-eWxq5qGxNSklW7FYt3EFGkayngxHAa5nPzC2cQdamt68BCvlZWPT6WAPFzQ8tKr4EPajJxmSRq0HvyxdspJvDg==", "dev": true }, "@types/minimatch": { @@ -54,7 +63,7 @@ "dev": true }, "@types/shelljs": { - "version": "file:mycachedir\\@types\\shelljs\\0.3.33\\package.tgz", + "version": "file:https:/registry.npmjs.org/@types/shelljs/-/shelljs-0.3.33.tgz", "integrity": "sha1-32E73biCJe0JzlyDX2INyq8VXms=", "dev": true, "requires": { @@ -63,24 +72,24 @@ }, "@types/uuid": { "version": "https://registry.npmjs.org/@types/uuid/-/uuid-2.0.30.tgz", - "integrity": "sha1-TcoS2kOuUw+J9G1tIDk10hmWUtU=", + "integrity": "sha512-nmSJ0AL2mZAi68dYb7nKSIJ9YiM68eToP3Ugz66Ou7qkSatIptDM6CvOUmj4epMKWvO9gr9fFBxEEJkromp1Qg==", "dev": true, "requires": { "@types/node": "8.5.1" } }, "@types/validator": { - "version": "file:mycachedir\\@types\\validator\\4.5.29\\package.tgz", + "version": "file:https:/registry.npmjs.org/@types/validator/-/validator-4.5.29.tgz", "integrity": "sha1-R3/qhLcwCcHxPOYq7AU1leIiW+k=", "dev": true }, "@types/winreg": { - "version": "file:mycachedir\\@types\\winreg\\1.2.30\\package.tgz", + "version": "file:https:/registry.npmjs.org/@types/winreg/-/winreg-1.2.30.tgz", "integrity": "sha1-kdZxDlNtNFucmwF8V0z2qNpkxRg=", "dev": true }, "@types/xml2js": { - "version": "file:mycachedir\\@types\\xml2js\\0.0.27\\package.tgz", + "version": "file:https:/registry.npmjs.org/@types/xml2js/-/xml2js-0.0.27.tgz", "integrity": "sha1-5a01i5UNhH2wPl6jihr4c2vR78c=", "dev": true }, @@ -104,8 +113,18 @@ "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", "dev": true }, + "ansi": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/ansi/-/ansi-0.3.1.tgz", + "integrity": "sha1-DELU+xcWDVqa8eSEus4cZpIsGyE=" + }, + "ansi-escapes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz", + "integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4=" + }, "ansi-regex": { - "version": "file:mycachedir\\ansi-regex\\1.1.1\\package.tgz", + "version": "file:mycachedir/ansi-regex/1.1.1/package.tgz", "integrity": "sha1-QchHGUZGN15qGl0Qw8oFTvn8mA0=" }, "ansi-styles": { @@ -122,7 +141,7 @@ } }, "app-root-path": { - "version": "file:mycachedir\\app-root-path\\1.0.0\\package.tgz", + "version": "file:https:/registry.npmjs.org/app-root-path/-/app-root-path-1.0.0.tgz", "integrity": "sha1-LHKZF0vGHLhv46SnmOAeSTt9U30=" }, "archiver": { @@ -131,7 +150,7 @@ "requires": { "archiver-utils": "https://registry.npmjs.org/archiver-utils/-/archiver-utils-1.3.0.tgz", "async": "https://registry.npmjs.org/async/-/async-2.5.0.tgz", - "buffer-crc32": "file:mycachedir\\buffer-crc32\\0.2.13\\package.tgz", + "buffer-crc32": "file:mycachedir/buffer-crc32/0.2.13/package.tgz", "glob": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", "lodash": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", "readable-stream": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", @@ -161,6 +180,69 @@ "readable-stream": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz" } }, + "are-we-there-yet": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz", + "integrity": "sha1-u13KOCu5TwXhUZQ3PRb9O6HKEQ0=", + "requires": { + "delegates": "1.0.0", + "readable-stream": "2.3.3" + }, + "dependencies": { + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "process-nextick-args": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" + }, + "readable-stream": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "safe-buffer": "5.1.1", + "string_decoder": "1.0.3", + "util-deprecate": "1.0.2" + } + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" + }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "requires": { + "safe-buffer": "5.1.1" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + } + } + }, "arr-diff": { "version": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", @@ -245,7 +327,7 @@ } }, "browserify-aes": { - "version": "file:mycachedir\\browserify-aes\\0.4.0\\package.tgz", + "version": "file:mycachedir/browserify-aes/0.4.0/package.tgz", "integrity": "sha1-BnFJtmjfMcS1hTPgLQHoBthgjiw=", "dev": true, "requires": { @@ -271,7 +353,7 @@ } }, "buffer-crc32": { - "version": "file:mycachedir\\buffer-crc32\\0.2.13\\package.tgz", + "version": "file:mycachedir/buffer-crc32/0.2.13/package.tgz", "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=" }, "builtin-modules": { @@ -330,6 +412,14 @@ "readdirp": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz" } }, + "cli-cursor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz", + "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", + "requires": { + "restore-cursor": "1.0.1" + } + }, "cli-width": { "version": "https://registry.npmjs.org/cli-width/-/cli-width-1.1.1.tgz", "integrity": "sha1-pNKT72frt7iNSk1CwMzwDE0eNm0=" @@ -356,6 +446,11 @@ "integrity": "sha1-Jgt6meux7f4kdTgXX3gyQ8sZ0Uk=", "dev": true }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" + }, "colors": { "version": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", "integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=" @@ -364,7 +459,7 @@ "version": "https://registry.npmjs.org/compress-commons/-/compress-commons-1.2.0.tgz", "integrity": "sha1-WFhwku8g03y1i68AARLJJ4/3O58=", "requires": { - "buffer-crc32": "file:mycachedir\\buffer-crc32\\0.2.13\\package.tgz", + "buffer-crc32": "file:mycachedir/buffer-crc32/0.2.13/package.tgz", "crc32-stream": "https://registry.npmjs.org/crc32-stream/-/crc32-stream-2.0.0.tgz", "normalize-path": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", "readable-stream": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz" @@ -374,6 +469,70 @@ "version": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, + "concat-stream": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.0.tgz", + "integrity": "sha1-CqxmL9Ur54lk1VMvaUeE5wEQrPc=", + "requires": { + "inherits": "2.0.3", + "readable-stream": "2.3.3", + "typedarray": "0.0.6" + }, + "dependencies": { + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "process-nextick-args": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" + }, + "readable-stream": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "safe-buffer": "5.1.1", + "string_decoder": "1.0.3", + "util-deprecate": "1.0.2" + } + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" + }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "requires": { + "safe-buffer": "5.1.1" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + } + } + }, "console-browserify": { "version": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", @@ -388,11 +547,11 @@ "dev": true }, "copy-paste": { - "version": "file:mycachedir\\copy-paste\\1.3.0\\package.tgz", + "version": "file:https:/registry.npmjs.org/copy-paste/-/copy-paste-1.3.0.tgz", "integrity": "sha1-p+bEocKP3t8rCB5yuX3y75X0ce0=", "requires": { "iconv-lite": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", - "sync-exec": "file:mycachedir\\sync-exec\\0.6.2\\package.tgz" + "sync-exec": "file:mycachedir/sync-exec/0.6.2/package.tgz" } }, "core-js": { @@ -417,11 +576,11 @@ } }, "crypto-browserify": { - "version": "file:mycachedir\\crypto-browserify\\3.3.0\\package.tgz", + "version": "file:mycachedir/crypto-browserify/3.3.0/package.tgz", "integrity": "sha1-ufx1u0oO1h3PHNXa6W6zDJw+UGw=", "dev": true, "requires": { - "browserify-aes": "file:mycachedir\\browserify-aes\\0.4.0\\package.tgz", + "browserify-aes": "file:mycachedir/browserify-aes/0.4.0/package.tgz", "pbkdf2-compat": "https://registry.npmjs.org/pbkdf2-compat/-/pbkdf2-compat-2.0.1.tgz", "ripemd160": "https://registry.npmjs.org/ripemd160/-/ripemd160-0.2.0.tgz", "sha.js": "https://registry.npmjs.org/sha.js/-/sha.js-2.2.6.tgz" @@ -435,7 +594,7 @@ } }, "cycle": { - "version": "file:mycachedir\\cycle\\1.0.3\\package.tgz", + "version": "file:mycachedir/cycle/1.0.3/package.tgz", "integrity": "sha1-IegLK+hYD5i0aPN5QwZisEbDStI=" }, "date-now": { @@ -444,13 +603,21 @@ "dev": true }, "dateformat": { - "version": "file:mycachedir\\dateformat\\1.0.11\\package.tgz", + "version": "file:mycachedir/dateformat/1.0.11/package.tgz", "integrity": "sha1-8ny+56ASu/uC6gUVYtOXf2CT27E=", "requires": { - "get-stdin": "file:mycachedir\\get-stdin\\5.0.1\\package.tgz", + "get-stdin": "file:mycachedir/get-stdin/5.0.1/package.tgz", "meow": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz" } }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, "decamelize": { "version": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" @@ -468,6 +635,11 @@ "object-keys": "1.0.11" } }, + "delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" + }, "domain-browser": { "version": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.1.7.tgz", "integrity": "sha1-hnqksJP6oF8d4IwG9NeyH9+GmLw=", @@ -479,7 +651,7 @@ "dev": true }, "end-of-stream": { - "version": "file:mycachedir\\end-of-stream\\1.4.0\\package.tgz", + "version": "file:mycachedir/end-of-stream/1.4.0/package.tgz", "integrity": "sha1-epDYM+/abPpurA9JSduw+tOmMgY=", "requires": { "once": "https://registry.npmjs.org/once/-/once-1.4.0.tgz" @@ -553,6 +725,11 @@ "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=", "dev": true }, + "exit-hook": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-1.1.1.tgz", + "integrity": "sha1-8FyiM7SMBdVP/wd2XfhQfpXAL/g=" + }, "expand-brackets": { "version": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", @@ -569,6 +746,36 @@ "fill-range": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz" } }, + "extend": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", + "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" + }, + "external-editor": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-1.1.1.tgz", + "integrity": "sha1-Etew24UPf/fnCBuvQAVwAGDEYAs=", + "requires": { + "extend": "3.0.1", + "spawn-sync": "1.0.15", + "tmp": "0.0.29" + }, + "dependencies": { + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" + }, + "tmp": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.29.tgz", + "integrity": "sha1-8lEl/w3Z2jzLDC3Tce4SiLuRKMA=", + "requires": { + "os-tmpdir": "1.0.2" + } + } + } + }, "extglob": { "version": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", @@ -578,7 +785,7 @@ } }, "eyes": { - "version": "file:mycachedir\\eyes\\0.1.8\\package.tgz", + "version": "file:mycachedir/eyes/0.1.8/package.tgz", "integrity": "sha1-Ys8SAjTGg3hdkCNIqADvPgzCC8A=" }, "figures": { @@ -641,13 +848,25 @@ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" }, + "gauge": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-1.2.7.tgz", + "integrity": "sha1-6c7FSD09TuDvRLYKfZnkk14TbZM=", + "requires": { + "ansi": "0.3.1", + "has-unicode": "2.0.1", + "lodash.pad": "4.5.1", + "lodash.padend": "4.6.1", + "lodash.padstart": "4.6.1" + } + }, "get-stdin": { "version": "file:mycachedir\\get-stdin\\5.0.1\\package.tgz", "integrity": "sha1-Ei4WFZHiH/TFJTAwVpPyDmOTo5g=" }, "glob": { "version": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha1-wZyd+aAocC1nhhI4SmVSQExjbRU=", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", "requires": { "fs.realpath": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "inflight": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -704,6 +923,11 @@ "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", "dev": true }, + "has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=" + }, "hosted-git-info": { "version": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz", "integrity": "sha1-bWDjSzq7yDEwYsO3mO+NkBoHrzw=" @@ -714,7 +938,7 @@ "dev": true }, "i": { - "version": "file:mycachedir\\i\\0.3.5\\package.tgz", + "version": "file:mycachedir/i/0.3.5/package.tgz", "integrity": "sha1-HSuFQVjsgWkRPGy39raAHpniEdU=" }, "iconv-lite": { @@ -756,16 +980,16 @@ "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, "inquirer": { - "version": "file:mycachedir\\inquirer\\0.8.5\\package.tgz", + "version": "file:https:/registry.npmjs.org/inquirer/-/inquirer-0.8.5.tgz", "integrity": "sha1-29dAz2yjtzEpamPOb22WGFHzNt8=", "requires": { - "ansi-regex": "file:mycachedir\\ansi-regex\\1.1.1\\package.tgz", + "ansi-regex": "file:mycachedir/ansi-regex/1.1.1/package.tgz", "chalk": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "cli-width": "https://registry.npmjs.org/cli-width/-/cli-width-1.1.1.tgz", "figures": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", "lodash": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz", - "readline2": "file:mycachedir\\readline2\\0.1.1\\package.tgz", - "rx": "file:mycachedir\\rx\\2.5.3\\package.tgz", + "readline2": "file:mycachedir/readline2/0.1.1/package.tgz", + "rx": "file:mycachedir/rx/2.5.3/package.tgz", "through": "https://registry.npmjs.org/through/-/through-2.3.8.tgz" }, "dependencies": { @@ -844,6 +1068,21 @@ "number-is-nan": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz" } }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "requires": { + "number-is-nan": "1.0.1" + }, + "dependencies": { + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" + } + } + }, "is-glob": { "version": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", @@ -870,6 +1109,11 @@ "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", "dev": true }, + "is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=" + }, "is-regex": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", @@ -904,14 +1148,14 @@ "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" }, "json-in-place": { - "version": "file:mycachedir\\json-in-place\\1.0.1\\package.tgz", + "version": "file:https:/registry.npmjs.org/json-in-place/-/json-in-place-1.0.1.tgz", "integrity": "sha1-ih7NJaac4ZAFUs1xUr2TdU3k4fA=", "requires": { - "json-lexer": "file:mycachedir\\json-lexer\\1.1.1\\package.tgz" + "json-lexer": "file:mycachedir/json-lexer/1.1.1/package.tgz" } }, "json-lexer": { - "version": "file:mycachedir\\json-lexer\\1.1.1\\package.tgz", + "version": "file:mycachedir/json-lexer/1.1.1/package.tgz", "integrity": "sha1-vT7V1+Vgudma0iNPKMpwb7N3t9Q=" }, "json5": { @@ -1010,6 +1254,31 @@ "version": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=" }, + "lodash.difference": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.difference/-/lodash.difference-4.5.0.tgz", + "integrity": "sha1-nMtOUF1Ia5FlE0V3KIWi3yf9AXw=" + }, + "lodash.pad": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/lodash.pad/-/lodash.pad-4.5.1.tgz", + "integrity": "sha1-QzCUmoM6fI2iLMIPaibE1Z3runA=" + }, + "lodash.padend": { + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/lodash.padend/-/lodash.padend-4.6.1.tgz", + "integrity": "sha1-U8y6BH0G4VjTEfRdpiX05J5vFm4=" + }, + "lodash.padstart": { + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/lodash.padstart/-/lodash.padstart-4.6.1.tgz", + "integrity": "sha1-0uPuv/DZ05rVD1y9G1KnvOa7YRs=" + }, + "lodash.uniq": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", + "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=" + }, "longest": { "version": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", @@ -1096,17 +1365,22 @@ } } }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, "mute-stream": { - "version": "file:mycachedir\\mute-stream\\0.0.4\\package.tgz", + "version": "file:mycachedir/mute-stream/0.0.4/package.tgz", "integrity": "sha1-qSGZYKbV1dBGWXruUSUsZlX3F34=" }, "ncp": { - "version": "file:mycachedir\\ncp\\2.0.0\\package.tgz", + "version": "file:https:/registry.npmjs.org/ncp/-/ncp-2.0.0.tgz", "integrity": "sha1-GVoh1sRuNh0vsSgbo4uR6d9727M=", "dev": true }, "node-libs-browser": { - "version": "file:mycachedir\\node-libs-browser\\0.7.0\\package.tgz", + "version": "file:mycachedir/node-libs-browser/0.7.0/package.tgz", "integrity": "sha1-PicsCBnjCJNeJmdECNevDhSRuDs=", "dev": true, "requires": { @@ -1115,7 +1389,7 @@ "buffer": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", "console-browserify": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", "constants-browserify": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", - "crypto-browserify": "file:mycachedir\\crypto-browserify\\3.3.0\\package.tgz", + "crypto-browserify": "file:mycachedir/crypto-browserify/3.3.0/package.tgz", "domain-browser": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.1.7.tgz", "events": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", "https-browserify": "https://registry.npmjs.org/https-browserify/-/https-browserify-0.0.1.tgz", @@ -1159,6 +1433,16 @@ "remove-trailing-separator": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz" } }, + "npmlog": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-2.0.4.tgz", + "integrity": "sha1-mLUlMPJRTKkNCexbIsiEZyI3VpI=", + "requires": { + "ansi": "0.3.1", + "are-we-there-yet": "1.1.4", + "gauge": "1.2.7" + } + }, "number-is-nan": { "version": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" @@ -1201,6 +1485,11 @@ "version": "https://registry.npmjs.org/onecolor/-/onecolor-2.5.0.tgz", "integrity": "sha1-Ila2UdyAfBAfAK7b1JklxXpEMcE=" }, + "onetime": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", + "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=" + }, "optimist": { "version": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", @@ -1226,6 +1515,11 @@ "version": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" }, + "os-shim": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/os-shim/-/os-shim-0.1.3.tgz", + "integrity": "sha1-a2LDeRz3kJ6jXtRuF2WLtBfLORc=" + }, "os-tmpdir": { "version": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" @@ -1317,14 +1611,14 @@ "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" }, "prompt": { - "version": "file:mycachedir\\prompt\\0.2.14\\package.tgz", + "version": "file:https:/registry.npmjs.org/prompt/-/prompt-0.2.14.tgz", "integrity": "sha1-V3VPZPVD/XsIRXB8gY7OYY8F/9w=", "requires": { "pkginfo": "https://registry.npmjs.org/pkginfo/-/pkginfo-0.4.1.tgz", "read": "https://registry.npmjs.org/read/-/read-1.0.7.tgz", - "revalidator": "file:mycachedir\\revalidator\\0.1.8\\package.tgz", - "utile": "file:mycachedir\\utile\\0.2.1\\package.tgz", - "winston": "file:mycachedir\\winston\\0.8.3\\package.tgz" + "revalidator": "file:mycachedir/revalidator/0.1.8/package.tgz", + "utile": "file:mycachedir/utile/0.2.1/package.tgz", + "winston": "file:mycachedir/winston/0.8.3/package.tgz" } }, "prr": { @@ -1392,7 +1686,7 @@ "version": "https://registry.npmjs.org/read/-/read-1.0.7.tgz", "integrity": "sha1-s9oZvQUkMal2cdRKQmNK33ELQMQ=", "requires": { - "mute-stream": "file:mycachedir\\mute-stream\\0.0.4\\package.tgz" + "mute-stream": "file:mycachedir/mute-stream/0.0.4/package.tgz" } }, "read-pkg": { @@ -1437,18 +1731,18 @@ } }, "readline2": { - "version": "file:mycachedir\\readline2\\0.1.1\\package.tgz", + "version": "file:mycachedir/readline2/0.1.1/package.tgz", "integrity": "sha1-mUQ7pug7gw7zBRv9fcJBqCco1Wg=", "requires": { - "mute-stream": "file:mycachedir\\mute-stream\\0.0.4\\package.tgz", - "strip-ansi": "file:mycachedir\\strip-ansi\\2.0.1\\package.tgz" + "mute-stream": "file:mycachedir/mute-stream/0.0.4/package.tgz", + "strip-ansi": "file:mycachedir/strip-ansi/2.0.1/package.tgz" }, "dependencies": { "strip-ansi": { - "version": "file:mycachedir\\strip-ansi\\2.0.1\\package.tgz", + "version": "file:mycachedir/strip-ansi/2.0.1/package.tgz", "integrity": "sha1-32LBqpTtLxFOHQ8h/R1QSCt5pg4=", "requires": { - "ansi-regex": "file:mycachedir\\ansi-regex\\1.1.1\\package.tgz" + "ansi-regex": "file:mycachedir/ansi-regex/1.1.1/package.tgz" } } } @@ -1490,8 +1784,17 @@ "is-finite": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz" } }, + "restore-cursor": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz", + "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", + "requires": { + "exit-hook": "1.1.1", + "onetime": "1.1.0" + } + }, "revalidator": { - "version": "file:mycachedir\\revalidator\\0.1.8\\package.tgz", + "version": "file:mycachedir/revalidator/0.1.8/package.tgz", "integrity": "sha1-/s5hv6DBtSoga9axgZgYS91SOjs=" }, "right-align": { @@ -1504,7 +1807,7 @@ }, "rimraf": { "version": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha1-LtgVDSShbqhlHm1u8PR8QVjOejY=", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", "requires": { "glob": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz" } @@ -1514,8 +1817,16 @@ "integrity": "sha1-K/GYveFnys+lHAqSjoS2i74XH84=", "dev": true }, + "run-async": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", + "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", + "requires": { + "is-promise": "2.1.0" + } + }, "rx": { - "version": "file:mycachedir\\rx\\2.5.3\\package.tgz", + "version": "file:mycachedir/rx/2.5.3/package.tgz", "integrity": "sha1-Ia3H2A8CACr1Da6X/Z2/JIdV9WY=" }, "safe-buffer": { @@ -1546,7 +1857,7 @@ "dev": true }, "shelljs": { - "version": "file:mycachedir\\shelljs\\0.5.3\\package.tgz", + "version": "file:https:/registry.npmjs.org/shelljs/-/shelljs-0.5.3.tgz", "integrity": "sha1-xUmCuZbHbvDB5rWfvcWCX1txMRM=" }, "signal-exit": { @@ -1563,6 +1874,15 @@ "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", "dev": true }, + "spawn-sync": { + "version": "1.0.15", + "resolved": "https://registry.npmjs.org/spawn-sync/-/spawn-sync-1.0.15.tgz", + "integrity": "sha1-sAeZVX63+wyDdsKdROih6mfldHY=", + "requires": { + "concat-stream": "1.6.0", + "os-shim": "0.1.3" + } + }, "spdx-correct": { "version": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz", "integrity": "sha1-SzBz2TP/UfORLwOsVRlJikFQ20A=", @@ -1603,6 +1923,31 @@ "xtend": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz" } }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "requires": { + "ansi-regex": "2.1.1" + } + } + } + }, "string_decoder": { "version": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", "integrity": "sha1-D8Z9fBQYJd6UKC3VNr7GubzoYKs=", @@ -1648,10 +1993,143 @@ "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" }, "sync-exec": { - "version": "file:mycachedir\\sync-exec\\0.6.2\\package.tgz", + "version": "file:mycachedir/sync-exec/0.6.2/package.tgz", "integrity": "sha1-cX0izFPwzh3vVZQ2LzqJouu5EQU=", "optional": true }, + "tabtab": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/tabtab/-/tabtab-2.2.2.tgz", + "integrity": "sha1-egR/FDsBC0y9MfhX6ClhUSy/ThQ=", + "requires": { + "debug": "2.6.9", + "inquirer": "1.2.3", + "lodash.difference": "4.5.0", + "lodash.uniq": "4.5.0", + "minimist": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "mkdirp": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "npmlog": "2.0.4", + "object-assign": "4.1.1" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + } + }, + "cli-width": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", + "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=" + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + }, + "figures": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", + "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", + "requires": { + "escape-string-regexp": "1.0.5", + "object-assign": "4.1.1" + } + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "requires": { + "ansi-regex": "2.1.1" + } + }, + "inquirer": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-1.2.3.tgz", + "integrity": "sha1-TexvMvN+97sLLtPx0aXD9UUHSRg=", + "requires": { + "ansi-escapes": "1.4.0", + "chalk": "1.1.3", + "cli-cursor": "1.0.2", + "cli-width": "2.2.0", + "external-editor": "1.1.1", + "figures": "1.7.0", + "lodash": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", + "mute-stream": "0.0.6", + "pinkie-promise": "2.0.1", + "run-async": "2.3.0", + "rx": "4.1.0", + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "through": "2.3.8" + } + }, + "mute-stream": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.6.tgz", + "integrity": "sha1-SJYrGeFp/R38JAs/HnMXYnu8R9s=" + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=" + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "requires": { + "pinkie": "2.0.4" + } + }, + "rx": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/rx/-/rx-4.1.0.tgz", + "integrity": "sha1-pfE/957zt0D+MKqAP7CfmIBdR4I=" + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "requires": { + "ansi-regex": "2.1.1" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" + } + } + }, "tapable": { "version": "https://registry.npmjs.org/tapable/-/tapable-0.1.10.tgz", "integrity": "sha1-KcNXB8K3DlDQdIK10gLo7URtr9Q=", @@ -1662,7 +2140,7 @@ "integrity": "sha1-NlSc8E7RrumyowwBQyUiONr5QBY=", "requires": { "bl": "https://registry.npmjs.org/bl/-/bl-1.2.1.tgz", - "end-of-stream": "file:mycachedir\\end-of-stream\\1.4.0\\package.tgz", + "end-of-stream": "file:mycachedir/end-of-stream/1.4.0/package.tgz", "readable-stream": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", "xtend": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz" } @@ -1680,11 +2158,11 @@ } }, "tinytim": { - "version": "file:mycachedir\\tinytim\\0.1.1\\package.tgz", + "version": "file:mycachedir/tinytim/0.1.1/package.tgz", "integrity": "sha1-yWih5VWa2VUyJO92J7qzTjyu+Kg=" }, "tmp": { - "version": "file:mycachedir\\tmp\\0.0.26\\package.tgz", + "version": "file:https:/registry.npmjs.org/tmp/-/tmp-0.0.26.tgz", "integrity": "sha1-nvqCDOKhD4H4l5VVus4/FVJs4fI=", "requires": { "os-tmpdir": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz" @@ -1696,12 +2174,12 @@ "dev": true }, "tracer": { - "version": "file:mycachedir\\tracer\\0.7.4\\package.tgz", + "version": "file:https:/registry.npmjs.org/tracer/-/tracer-0.7.4.tgz", "integrity": "sha1-d/oEN8+Ct2vNvNRLhHRHcuWeUlk=", "requires": { "colors": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", - "dateformat": "file:mycachedir\\dateformat\\1.0.11\\package.tgz", - "tinytim": "file:mycachedir\\tinytim\\0.1.1\\package.tgz" + "dateformat": "file:mycachedir/dateformat/1.0.11/package.tgz", + "tinytim": "file:mycachedir/tinytim/0.1.1/package.tgz" }, "dependencies": { "colors": { @@ -1720,9 +2198,14 @@ "dev": true }, "tunnel": { - "version": "file:mycachedir\\tunnel\\0.0.4\\package.tgz", + "version": "file:mycachedir/tunnel/0.0.4/package.tgz", "integrity": "sha1-LTeFoVjBdMmhbcLARuxfxfF0IhM=" }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" + }, "typescript": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.6.2.tgz", @@ -1753,7 +2236,7 @@ "dev": true }, "underscore": { - "version": "file:mycachedir\\underscore\\1.8.3\\package.tgz", + "version": "file:mycachedir/underscore/1.8.3/package.tgz", "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" }, "url": { @@ -1801,12 +2284,12 @@ } }, "utile": { - "version": "file:mycachedir\\utile\\0.2.1\\package.tgz", + "version": "file:mycachedir/utile/0.2.1/package.tgz", "integrity": "sha1-kwyI6ZCY1iIINMNWy9mncFItkNc=", "requires": { "async": "https://registry.npmjs.org/async/-/async-0.2.10.tgz", - "deep-equal": "file:mycachedir\\deep-equal\\1.0.1\\package.tgz", - "i": "file:mycachedir\\i\\0.3.5\\package.tgz", + "deep-equal": "file:mycachedir/deep-equal/1.0.1/package.tgz", + "i": "file:mycachedir/i/0.3.5/package.tgz", "mkdirp": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "ncp": "0.4.2", "rimraf": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz" @@ -1825,7 +2308,7 @@ }, "uuid": { "version": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz", - "integrity": "sha1-PdPT55Crwk17DToDT/q6vijrvAQ=" + "integrity": "sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g==" }, "validate-npm-package-license": { "version": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz", @@ -1836,7 +2319,7 @@ } }, "validator": { - "version": "file:mycachedir\\validator\\3.43.0\\package.tgz", + "version": "file:https:/registry.npmjs.org/validator/-/validator-3.43.0.tgz", "integrity": "sha1-lkZLmS1BloM9l6GUv0Cxn/VLrgU=" }, "vm-browserify": { @@ -1848,12 +2331,12 @@ } }, "vso-node-api": { - "version": "file:mycachedir\\vso-node-api\\5.1.2\\package.tgz", + "version": "file:https:/registry.npmjs.org/vso-node-api/-/vso-node-api-5.1.2.tgz", "integrity": "sha1-gXtm/+1uEcvXH5O5FvSxicljQls=", "requires": { "q": "https://registry.npmjs.org/q/-/q-1.5.0.tgz", - "tunnel": "file:mycachedir\\tunnel\\0.0.4\\package.tgz", - "underscore": "file:mycachedir\\underscore\\1.8.3\\package.tgz" + "tunnel": "file:mycachedir/tunnel/0.0.4/package.tgz", + "underscore": "file:mycachedir/underscore/1.8.3/package.tgz" } }, "walkdir": { @@ -1890,7 +2373,7 @@ "loader-utils": "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.17.tgz", "memory-fs": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.3.0.tgz", "mkdirp": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "node-libs-browser": "file:mycachedir\\node-libs-browser\\0.7.0\\package.tgz", + "node-libs-browser": "file:mycachedir/node-libs-browser/0.7.0/package.tgz", "optimist": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", "supports-color": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", "tapable": "https://registry.npmjs.org/tapable/-/tapable-0.1.10.tgz", @@ -1934,19 +2417,19 @@ "dev": true }, "winreg": { - "version": "file:mycachedir\\winreg\\0.0.12\\package.tgz", + "version": "file:https:/registry.npmjs.org/winreg/-/winreg-0.0.12.tgz", "integrity": "sha1-BxBVVLoanQiXklHRKUdb/64wBrc=" }, "winston": { - "version": "file:mycachedir\\winston\\0.8.3\\package.tgz", + "version": "file:mycachedir/winston/0.8.3/package.tgz", "integrity": "sha1-ZLar9M0Brcrv1QCTk7HY6L7BnbA=", "requires": { "async": "https://registry.npmjs.org/async/-/async-0.2.10.tgz", - "colors": "file:mycachedir\\colors\\0.6.2\\package.tgz", - "cycle": "file:mycachedir\\cycle\\1.0.3\\package.tgz", - "eyes": "file:mycachedir\\eyes\\0.1.8\\package.tgz", + "colors": "file:mycachedir/colors/0.6.2/package.tgz", + "cycle": "file:mycachedir/cycle/1.0.3/package.tgz", + "eyes": "file:mycachedir/eyes/0.1.8/package.tgz", "isstream": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "pkginfo": "file:mycachedir\\pkginfo\\0.3.1\\package.tgz", + "pkginfo": "file:mycachedir/pkginfo/0.3.1/package.tgz", "stack-trace": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz" }, "dependencies": { @@ -1955,11 +2438,11 @@ "integrity": "sha1-trvgsGdLnXGXCMo43owjfLUmw9E=" }, "colors": { - "version": "file:mycachedir\\colors\\0.6.2\\package.tgz", + "version": "file:mycachedir/colors/0.6.2/package.tgz", "integrity": "sha1-JCP+ZnisDF2uiFLl0OW+CMmXq8w=" }, "pkginfo": { - "version": "file:mycachedir\\pkginfo\\0.3.1\\package.tgz", + "version": "file:mycachedir/pkginfo/0.3.1/package.tgz", "integrity": "sha1-Wyn2qB9wcXFC4J52W76rl7T4HiE=" } } @@ -1975,7 +2458,7 @@ }, "xml2js": { "version": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz", - "integrity": "sha1-aGwg8hMgnpSr8NG88e+qKRx4J6c=", + "integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==", "requires": { "sax": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", "xmlbuilder": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.4.tgz" From 103955a9f6fd58b7be4a6b5b431502b50e9a066d Mon Sep 17 00:00:00 2001 From: Shani Feldman Date: Sat, 23 Dec 2017 11:45:25 +0200 Subject: [PATCH 211/235] remove package-lock.json from sources --- package-lock.json | 2504 --------------------------------------------- 1 file changed, 2504 deletions(-) delete mode 100644 package-lock.json diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index cb06b3b9..00000000 --- a/package-lock.json +++ /dev/null @@ -1,2504 +0,0 @@ -{ - "name": "tfx-cli", - "version": "0.5.2", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "@types/colors": { - "version": "file:https:/registry.npmjs.org/@types/colors/-/colors-0.6.33.tgz", - "integrity": "sha1-F9raWXHDlSWUkNbIPXwYLPbpzlU=", - "dev": true - }, - "@types/copy-paste": { - "version": "file:https:/registry.npmjs.org/@types/copy-paste/-/copy-paste-1.1.30.tgz", - "integrity": "sha1-p9RUyeHkVCMo9/Huz1Mzvoz7UO0=", - "dev": true - }, - "@types/events": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@types/events/-/events-1.1.0.tgz", - "integrity": "sha512-y3bR98mzYOo0pAZuiLari+cQyiKk3UXRuT45h1RjhfeCzqkjaVsfZJNaxdgtk7/3tzOm1ozLTqEqMP3VbI48jw==", - "dev": true - }, - "@types/glob": { - "version": "5.0.34", - "resolved": "https://registry.npmjs.org/@types/glob/-/glob-5.0.34.tgz", - "integrity": "sha512-sUvpieq+HsWTLdkeOI8Mi8u22Ag3AoGuM3sv+XMP1bKtbaIAHpEA2f52K2mz6vK5PVhTa3bFyRZLZMqTxOo2Cw==", - "dev": true, - "requires": { - "@types/events": "1.1.0", - "@types/minimatch": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.1.tgz", - "@types/node": "8.5.1" - } - }, - "@types/jszip": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@types/jszip/-/jszip-3.1.2.tgz", - "integrity": "sha512-yUey+YHTkBFEYLrnSo469SCzJxDKgSH7RMFHpnjeBwZXsAvR6w39hJzDSJrwbEkirm/sNp86qZwET0bG3uWRmw==", - "dev": true, - "requires": { - "@types/node": "8.5.1" - } - }, - "@types/lodash": { - "version": "4.14.69", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.69.tgz", - "integrity": "sha512-eWxq5qGxNSklW7FYt3EFGkayngxHAa5nPzC2cQdamt68BCvlZWPT6WAPFzQ8tKr4EPajJxmSRq0HvyxdspJvDg==", - "dev": true - }, - "@types/minimatch": { - "version": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.1.tgz", - "integrity": "sha1-toPrYL41gwTvFG9XddtMDjaWpVA=", - "dev": true - }, - "@types/mkdirp": { - "version": "https://registry.npmjs.org/@types/mkdirp/-/mkdirp-0.3.29.tgz", - "integrity": "sha1-fyrX7FX5FEgvybHsS7GuYCjUYGY=", - "dev": true - }, - "@types/node": { - "version": "8.5.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-8.5.1.tgz", - "integrity": "sha512-SrmAO+NhnsuG/6TychSl2VdxBZiw/d6V+8j+DFo8O3PwFi+QeYXWHhAw+b170aSc6zYab6/PjEWRZHIDN9mNUw==", - "dev": true - }, - "@types/shelljs": { - "version": "file:https:/registry.npmjs.org/@types/shelljs/-/shelljs-0.3.33.tgz", - "integrity": "sha1-32E73biCJe0JzlyDX2INyq8VXms=", - "dev": true, - "requires": { - "@types/node": "8.5.1" - } - }, - "@types/uuid": { - "version": "https://registry.npmjs.org/@types/uuid/-/uuid-2.0.30.tgz", - "integrity": "sha512-nmSJ0AL2mZAi68dYb7nKSIJ9YiM68eToP3Ugz66Ou7qkSatIptDM6CvOUmj4epMKWvO9gr9fFBxEEJkromp1Qg==", - "dev": true, - "requires": { - "@types/node": "8.5.1" - } - }, - "@types/validator": { - "version": "file:https:/registry.npmjs.org/@types/validator/-/validator-4.5.29.tgz", - "integrity": "sha1-R3/qhLcwCcHxPOYq7AU1leIiW+k=", - "dev": true - }, - "@types/winreg": { - "version": "file:https:/registry.npmjs.org/@types/winreg/-/winreg-1.2.30.tgz", - "integrity": "sha1-kdZxDlNtNFucmwF8V0z2qNpkxRg=", - "dev": true - }, - "@types/xml2js": { - "version": "file:https:/registry.npmjs.org/@types/xml2js/-/xml2js-0.0.27.tgz", - "integrity": "sha1-5a01i5UNhH2wPl6jihr4c2vR78c=", - "dev": true - }, - "acorn": { - "version": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz", - "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=", - "dev": true - }, - "align-text": { - "version": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", - "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", - "dev": true, - "requires": { - "kind-of": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "longest": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", - "repeat-string": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz" - } - }, - "amdefine": { - "version": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", - "dev": true - }, - "ansi": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/ansi/-/ansi-0.3.1.tgz", - "integrity": "sha1-DELU+xcWDVqa8eSEus4cZpIsGyE=" - }, - "ansi-escapes": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz", - "integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4=" - }, - "ansi-regex": { - "version": "file:mycachedir/ansi-regex/1.1.1/package.tgz", - "integrity": "sha1-QchHGUZGN15qGl0Qw8oFTvn8mA0=" - }, - "ansi-styles": { - "version": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" - }, - "anymatch": { - "version": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz", - "integrity": "sha1-VT3Lj5HjyImEXf26NMd3IbkLnXo=", - "dev": true, - "requires": { - "micromatch": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", - "normalize-path": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz" - } - }, - "app-root-path": { - "version": "file:https:/registry.npmjs.org/app-root-path/-/app-root-path-1.0.0.tgz", - "integrity": "sha1-LHKZF0vGHLhv46SnmOAeSTt9U30=" - }, - "archiver": { - "version": "https://registry.npmjs.org/archiver/-/archiver-2.0.3.tgz", - "integrity": "sha1-tDYLtYSvFDeZGUJxbyHXxSPR270=", - "requires": { - "archiver-utils": "https://registry.npmjs.org/archiver-utils/-/archiver-utils-1.3.0.tgz", - "async": "https://registry.npmjs.org/async/-/async-2.5.0.tgz", - "buffer-crc32": "file:mycachedir/buffer-crc32/0.2.13/package.tgz", - "glob": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "lodash": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", - "readable-stream": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", - "tar-stream": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.5.4.tgz", - "walkdir": "https://registry.npmjs.org/walkdir/-/walkdir-0.0.11.tgz", - "zip-stream": "https://registry.npmjs.org/zip-stream/-/zip-stream-1.2.0.tgz" - }, - "dependencies": { - "async": { - "version": "https://registry.npmjs.org/async/-/async-2.5.0.tgz", - "integrity": "sha1-hDGQ/WtzV6C54clW7d3V7IRitU0=", - "requires": { - "lodash": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz" - } - } - } - }, - "archiver-utils": { - "version": "https://registry.npmjs.org/archiver-utils/-/archiver-utils-1.3.0.tgz", - "integrity": "sha1-5QtMCccL89aA4y/xt5lOn52JUXQ=", - "requires": { - "glob": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "graceful-fs": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "lazystream": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz", - "lodash": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", - "normalize-path": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "readable-stream": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz" - } - }, - "are-we-there-yet": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz", - "integrity": "sha1-u13KOCu5TwXhUZQ3PRb9O6HKEQ0=", - "requires": { - "delegates": "1.0.0", - "readable-stream": "2.3.3" - }, - "dependencies": { - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - }, - "process-nextick-args": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" - }, - "readable-stream": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", - "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", - "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "1.0.7", - "safe-buffer": "5.1.1", - "string_decoder": "1.0.3", - "util-deprecate": "1.0.2" - } - }, - "safe-buffer": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" - }, - "string_decoder": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", - "requires": { - "safe-buffer": "5.1.1" - } - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" - } - } - }, - "arr-diff": { - "version": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", - "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", - "dev": true, - "requires": { - "arr-flatten": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz" - } - }, - "arr-flatten": { - "version": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha1-NgSLv/TntH4TZkQxbJlmnqWukfE=", - "dev": true - }, - "array-find-index": { - "version": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", - "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=" - }, - "array-unique": { - "version": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", - "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", - "dev": true - }, - "assert": { - "version": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz", - "integrity": "sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=", - "dev": true, - "requires": { - "util": "https://registry.npmjs.org/util/-/util-0.10.3.tgz" - } - }, - "async": { - "version": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" - }, - "async-each": { - "version": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", - "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=", - "dev": true - }, - "balanced-match": { - "version": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" - }, - "base64-js": { - "version": "https://registry.npmjs.org/base64-js/-/base64-js-1.2.1.tgz", - "integrity": "sha1-qRlH2h9KUW6jjltOwOw3c2deCIY=", - "dev": true - }, - "big.js": { - "version": "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz", - "integrity": "sha1-pfwpi4G54Nyi5FiCR4S2XFK6WI4=", - "dev": true - }, - "binary-extensions": { - "version": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.10.0.tgz", - "integrity": "sha1-muuabF6IY4qtFx4Wf1kAq+JINdA=", - "dev": true - }, - "bl": { - "version": "https://registry.npmjs.org/bl/-/bl-1.2.1.tgz", - "integrity": "sha1-ysMo977kVzDUBLaSID/LWQ4XLV4=", - "requires": { - "readable-stream": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz" - } - }, - "brace-expansion": { - "version": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", - "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", - "requires": { - "balanced-match": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "concat-map": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" - } - }, - "braces": { - "version": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", - "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", - "dev": true, - "requires": { - "expand-range": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", - "preserve": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", - "repeat-element": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz" - } - }, - "browserify-aes": { - "version": "file:mycachedir/browserify-aes/0.4.0/package.tgz", - "integrity": "sha1-BnFJtmjfMcS1hTPgLQHoBthgjiw=", - "dev": true, - "requires": { - "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" - } - }, - "browserify-zlib": { - "version": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.1.4.tgz", - "integrity": "sha1-uzX4pRn2AOD6a4SFJByXnQFB+y0=", - "dev": true, - "requires": { - "pako": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz" - } - }, - "buffer": { - "version": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", - "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", - "dev": true, - "requires": { - "base64-js": "https://registry.npmjs.org/base64-js/-/base64-js-1.2.1.tgz", - "ieee754": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.8.tgz", - "isarray": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" - } - }, - "buffer-crc32": { - "version": "file:mycachedir/buffer-crc32/0.2.13/package.tgz", - "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=" - }, - "builtin-modules": { - "version": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=" - }, - "builtin-status-codes": { - "version": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", - "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", - "dev": true - }, - "camelcase": { - "version": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", - "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=" - }, - "camelcase-keys": { - "version": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", - "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", - "requires": { - "camelcase": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", - "map-obj": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz" - } - }, - "center-align": { - "version": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", - "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", - "dev": true, - "requires": { - "align-text": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", - "lazy-cache": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz" - } - }, - "chalk": { - "version": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "requires": { - "ansi-styles": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "escape-string-regexp": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "has-ansi": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "strip-ansi": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "supports-color": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz" - } - }, - "chokidar": { - "version": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", - "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", - "dev": true, - "requires": { - "anymatch": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz", - "async-each": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", - "glob-parent": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", - "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "is-binary-path": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", - "is-glob": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "path-is-absolute": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "readdirp": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz" - } - }, - "cli-cursor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz", - "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", - "requires": { - "restore-cursor": "1.0.1" - } - }, - "cli-width": { - "version": "https://registry.npmjs.org/cli-width/-/cli-width-1.1.1.tgz", - "integrity": "sha1-pNKT72frt7iNSk1CwMzwDE0eNm0=" - }, - "cliui": { - "version": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", - "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", - "dev": true, - "requires": { - "center-align": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", - "right-align": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", - "wordwrap": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz" - }, - "dependencies": { - "wordwrap": { - "version": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", - "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", - "dev": true - } - } - }, - "clone": { - "version": "https://registry.npmjs.org/clone/-/clone-1.0.2.tgz", - "integrity": "sha1-Jgt6meux7f4kdTgXX3gyQ8sZ0Uk=", - "dev": true - }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" - }, - "colors": { - "version": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", - "integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=" - }, - "compress-commons": { - "version": "https://registry.npmjs.org/compress-commons/-/compress-commons-1.2.0.tgz", - "integrity": "sha1-WFhwku8g03y1i68AARLJJ4/3O58=", - "requires": { - "buffer-crc32": "file:mycachedir/buffer-crc32/0.2.13/package.tgz", - "crc32-stream": "https://registry.npmjs.org/crc32-stream/-/crc32-stream-2.0.0.tgz", - "normalize-path": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "readable-stream": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz" - } - }, - "concat-map": { - "version": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "concat-stream": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.0.tgz", - "integrity": "sha1-CqxmL9Ur54lk1VMvaUeE5wEQrPc=", - "requires": { - "inherits": "2.0.3", - "readable-stream": "2.3.3", - "typedarray": "0.0.6" - }, - "dependencies": { - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - }, - "process-nextick-args": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" - }, - "readable-stream": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", - "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", - "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "1.0.7", - "safe-buffer": "5.1.1", - "string_decoder": "1.0.3", - "util-deprecate": "1.0.2" - } - }, - "safe-buffer": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" - }, - "string_decoder": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", - "requires": { - "safe-buffer": "5.1.1" - } - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" - } - } - }, - "console-browserify": { - "version": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", - "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", - "dev": true, - "requires": { - "date-now": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz" - } - }, - "constants-browserify": { - "version": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", - "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", - "dev": true - }, - "copy-paste": { - "version": "file:https:/registry.npmjs.org/copy-paste/-/copy-paste-1.3.0.tgz", - "integrity": "sha1-p+bEocKP3t8rCB5yuX3y75X0ce0=", - "requires": { - "iconv-lite": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", - "sync-exec": "file:mycachedir/sync-exec/0.6.2/package.tgz" - } - }, - "core-js": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.3.0.tgz", - "integrity": "sha1-+rg/uwstjchfpjbEudNMdUIMbWU=" - }, - "core-util-is": { - "version": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" - }, - "crc": { - "version": "https://registry.npmjs.org/crc/-/crc-3.5.0.tgz", - "integrity": "sha1-mLi6fUiWZbo5efWbITgTdBAaGWQ=" - }, - "crc32-stream": { - "version": "https://registry.npmjs.org/crc32-stream/-/crc32-stream-2.0.0.tgz", - "integrity": "sha1-483TtN8xaN10494/u8t7KX/pCPQ=", - "requires": { - "crc": "https://registry.npmjs.org/crc/-/crc-3.5.0.tgz", - "readable-stream": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz" - } - }, - "crypto-browserify": { - "version": "file:mycachedir/crypto-browserify/3.3.0/package.tgz", - "integrity": "sha1-ufx1u0oO1h3PHNXa6W6zDJw+UGw=", - "dev": true, - "requires": { - "browserify-aes": "file:mycachedir/browserify-aes/0.4.0/package.tgz", - "pbkdf2-compat": "https://registry.npmjs.org/pbkdf2-compat/-/pbkdf2-compat-2.0.1.tgz", - "ripemd160": "https://registry.npmjs.org/ripemd160/-/ripemd160-0.2.0.tgz", - "sha.js": "https://registry.npmjs.org/sha.js/-/sha.js-2.2.6.tgz" - } - }, - "currently-unhandled": { - "version": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", - "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", - "requires": { - "array-find-index": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz" - } - }, - "cycle": { - "version": "file:mycachedir/cycle/1.0.3/package.tgz", - "integrity": "sha1-IegLK+hYD5i0aPN5QwZisEbDStI=" - }, - "date-now": { - "version": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", - "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", - "dev": true - }, - "dateformat": { - "version": "file:mycachedir/dateformat/1.0.11/package.tgz", - "integrity": "sha1-8ny+56ASu/uC6gUVYtOXf2CT27E=", - "requires": { - "get-stdin": "file:mycachedir/get-stdin/5.0.1/package.tgz", - "meow": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz" - } - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "decamelize": { - "version": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" - }, - "deep-equal": { - "version": "file:mycachedir\\deep-equal\\1.0.1\\package.tgz", - "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=" - }, - "define-properties": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz", - "integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=", - "requires": { - "foreach": "2.0.5", - "object-keys": "1.0.11" - } - }, - "delegates": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" - }, - "domain-browser": { - "version": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.1.7.tgz", - "integrity": "sha1-hnqksJP6oF8d4IwG9NeyH9+GmLw=", - "dev": true - }, - "emojis-list": { - "version": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", - "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=", - "dev": true - }, - "end-of-stream": { - "version": "file:mycachedir/end-of-stream/1.4.0/package.tgz", - "integrity": "sha1-epDYM+/abPpurA9JSduw+tOmMgY=", - "requires": { - "once": "https://registry.npmjs.org/once/-/once-1.4.0.tgz" - } - }, - "enhanced-resolve": { - "version": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-0.9.1.tgz", - "integrity": "sha1-TW5omzcl+GCQknzMhs2fFjW4ni4=", - "dev": true, - "requires": { - "graceful-fs": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "memory-fs": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.2.0.tgz", - "tapable": "https://registry.npmjs.org/tapable/-/tapable-0.1.10.tgz" - }, - "dependencies": { - "memory-fs": { - "version": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.2.0.tgz", - "integrity": "sha1-8rslNovBIeORwlIN6Slpyu4KApA=", - "dev": true - } - } - }, - "errno": { - "version": "https://registry.npmjs.org/errno/-/errno-0.1.4.tgz", - "integrity": "sha1-uJbiOp5ei6M4cfyZar02NfyaHH0=", - "dev": true, - "requires": { - "prr": "https://registry.npmjs.org/prr/-/prr-0.0.0.tgz" - } - }, - "error-ex": { - "version": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz", - "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", - "requires": { - "is-arrayish": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz" - } - }, - "es-abstract": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.10.0.tgz", - "integrity": "sha512-/uh/DhdqIOSkAWifU+8nG78vlQxdLckUdI/sPgy0VhuXi2qJ7T8czBmqIYtLQVpCIFYafChnsRsB5pyb1JdmCQ==", - "requires": { - "es-to-primitive": "1.1.1", - "function-bind": "1.1.1", - "has": "1.0.1", - "is-callable": "1.1.3", - "is-regex": "1.0.4" - } - }, - "es-to-primitive": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.1.1.tgz", - "integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=", - "requires": { - "is-callable": "1.1.3", - "is-date-object": "1.0.1", - "is-symbol": "1.0.1" - } - }, - "es6-promise": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.0.2.tgz", - "integrity": "sha1-AQ1YWEI6XxGJeWZfRkhqlcbuK7Y=" - }, - "escape-string-regexp": { - "version": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" - }, - "events": { - "version": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", - "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=", - "dev": true - }, - "exit-hook": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-1.1.1.tgz", - "integrity": "sha1-8FyiM7SMBdVP/wd2XfhQfpXAL/g=" - }, - "expand-brackets": { - "version": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", - "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", - "dev": true, - "requires": { - "is-posix-bracket": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz" - } - }, - "expand-range": { - "version": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", - "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", - "dev": true, - "requires": { - "fill-range": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz" - } - }, - "extend": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", - "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" - }, - "external-editor": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-1.1.1.tgz", - "integrity": "sha1-Etew24UPf/fnCBuvQAVwAGDEYAs=", - "requires": { - "extend": "3.0.1", - "spawn-sync": "1.0.15", - "tmp": "0.0.29" - }, - "dependencies": { - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" - }, - "tmp": { - "version": "0.0.29", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.29.tgz", - "integrity": "sha1-8lEl/w3Z2jzLDC3Tce4SiLuRKMA=", - "requires": { - "os-tmpdir": "1.0.2" - } - } - } - }, - "extglob": { - "version": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", - "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", - "dev": true, - "requires": { - "is-extglob": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz" - } - }, - "eyes": { - "version": "file:mycachedir/eyes/0.1.8/package.tgz", - "integrity": "sha1-Ys8SAjTGg3hdkCNIqADvPgzCC8A=" - }, - "figures": { - "version": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", - "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", - "requires": { - "escape-string-regexp": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "object-assign": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz" - } - }, - "filename-regex": { - "version": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", - "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=", - "dev": true - }, - "fill-range": { - "version": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz", - "integrity": "sha1-ULd9/X5Gm8dJJHCWNpn+eoSFpyM=", - "dev": true, - "requires": { - "is-number": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", - "isobject": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "randomatic": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz", - "repeat-element": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", - "repeat-string": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz" - } - }, - "find-up": { - "version": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", - "requires": { - "path-exists": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "pinkie-promise": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz" - } - }, - "for-in": { - "version": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", - "dev": true - }, - "for-own": { - "version": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", - "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", - "dev": true, - "requires": { - "for-in": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz" - } - }, - "foreach": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", - "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=" - }, - "fs.realpath": { - "version": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" - }, - "gauge": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-1.2.7.tgz", - "integrity": "sha1-6c7FSD09TuDvRLYKfZnkk14TbZM=", - "requires": { - "ansi": "0.3.1", - "has-unicode": "2.0.1", - "lodash.pad": "4.5.1", - "lodash.padend": "4.6.1", - "lodash.padstart": "4.6.1" - } - }, - "get-stdin": { - "version": "file:mycachedir\\get-stdin\\5.0.1\\package.tgz", - "integrity": "sha1-Ei4WFZHiH/TFJTAwVpPyDmOTo5g=" - }, - "glob": { - "version": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", - "requires": { - "fs.realpath": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "inflight": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "minimatch": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "once": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "path-is-absolute": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" - } - }, - "glob-base": { - "version": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", - "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", - "dev": true, - "requires": { - "glob-parent": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", - "is-glob": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz" - } - }, - "glob-parent": { - "version": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", - "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", - "dev": true, - "requires": { - "is-glob": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz" - } - }, - "graceful-fs": { - "version": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" - }, - "has": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.1.tgz", - "integrity": "sha1-hGFzP1OLCDfJNh45qauelwTcLyg=", - "requires": { - "function-bind": "1.1.1" - } - }, - "has-ansi": { - "version": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "requires": { - "ansi-regex": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz" - }, - "dependencies": { - "ansi-regex": { - "version": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" - } - } - }, - "has-flag": { - "version": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", - "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", - "dev": true - }, - "has-unicode": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=" - }, - "hosted-git-info": { - "version": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz", - "integrity": "sha1-bWDjSzq7yDEwYsO3mO+NkBoHrzw=" - }, - "https-browserify": { - "version": "https://registry.npmjs.org/https-browserify/-/https-browserify-0.0.1.tgz", - "integrity": "sha1-P5E2XKvmC3ftDruiS0VOPgnZWoI=", - "dev": true - }, - "i": { - "version": "file:mycachedir/i/0.3.5/package.tgz", - "integrity": "sha1-HSuFQVjsgWkRPGy39raAHpniEdU=" - }, - "iconv-lite": { - "version": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", - "integrity": "sha1-90aPYBNfXl2tM5nAqBvpoWA6CCs=" - }, - "ieee754": { - "version": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.8.tgz", - "integrity": "sha1-vjPUCsEO8ZJnAfbwii2G+/0a0+Q=", - "dev": true - }, - "immediate": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", - "integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=" - }, - "indent-string": { - "version": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", - "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", - "requires": { - "repeating": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz" - } - }, - "indexof": { - "version": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", - "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=", - "dev": true - }, - "inflight": { - "version": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "requires": { - "once": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "wrappy": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" - } - }, - "inherits": { - "version": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - }, - "inquirer": { - "version": "file:https:/registry.npmjs.org/inquirer/-/inquirer-0.8.5.tgz", - "integrity": "sha1-29dAz2yjtzEpamPOb22WGFHzNt8=", - "requires": { - "ansi-regex": "file:mycachedir/ansi-regex/1.1.1/package.tgz", - "chalk": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "cli-width": "https://registry.npmjs.org/cli-width/-/cli-width-1.1.1.tgz", - "figures": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", - "lodash": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz", - "readline2": "file:mycachedir/readline2/0.1.1/package.tgz", - "rx": "file:mycachedir/rx/2.5.3/package.tgz", - "through": "https://registry.npmjs.org/through/-/through-2.3.8.tgz" - }, - "dependencies": { - "lodash": { - "version": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz", - "integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y=" - } - } - }, - "interpret": { - "version": "https://registry.npmjs.org/interpret/-/interpret-0.6.6.tgz", - "integrity": "sha1-/s16GOfOXKar+5U+H4YhOknxYls=", - "dev": true - }, - "is-arrayish": { - "version": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" - }, - "is-binary-path": { - "version": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", - "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", - "dev": true, - "requires": { - "binary-extensions": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.10.0.tgz" - } - }, - "is-buffer": { - "version": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.5.tgz", - "integrity": "sha1-Hzsm72E7IUuIy8ojzGwB2Hlh7sw=", - "dev": true - }, - "is-builtin-module": { - "version": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", - "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", - "requires": { - "builtin-modules": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz" - } - }, - "is-callable": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.3.tgz", - "integrity": "sha1-hut1OSgF3cM69xySoO7fdO52BLI=" - }, - "is-date-object": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", - "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=" - }, - "is-dotfile": { - "version": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", - "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=", - "dev": true - }, - "is-equal-shallow": { - "version": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", - "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", - "dev": true, - "requires": { - "is-primitive": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz" - } - }, - "is-extendable": { - "version": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true - }, - "is-extglob": { - "version": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "dev": true - }, - "is-finite": { - "version": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", - "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", - "requires": { - "number-is-nan": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz" - } - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "requires": { - "number-is-nan": "1.0.1" - }, - "dependencies": { - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" - } - } - }, - "is-glob": { - "version": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "dev": true, - "requires": { - "is-extglob": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz" - } - }, - "is-number": { - "version": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", - "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", - "dev": true, - "requires": { - "kind-of": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz" - } - }, - "is-posix-bracket": { - "version": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", - "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=", - "dev": true - }, - "is-primitive": { - "version": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", - "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", - "dev": true - }, - "is-promise": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", - "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=" - }, - "is-regex": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", - "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", - "requires": { - "has": "1.0.1" - } - }, - "is-symbol": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.1.tgz", - "integrity": "sha1-PMWfAAJRlLarLjjbrmaJJWtmBXI=" - }, - "is-utf8": { - "version": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=" - }, - "isarray": { - "version": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - }, - "isobject": { - "version": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dev": true, - "requires": { - "isarray": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" - } - }, - "isstream": { - "version": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" - }, - "json-in-place": { - "version": "file:https:/registry.npmjs.org/json-in-place/-/json-in-place-1.0.1.tgz", - "integrity": "sha1-ih7NJaac4ZAFUs1xUr2TdU3k4fA=", - "requires": { - "json-lexer": "file:mycachedir/json-lexer/1.1.1/package.tgz" - } - }, - "json-lexer": { - "version": "file:mycachedir/json-lexer/1.1.1/package.tgz", - "integrity": "sha1-vT7V1+Vgudma0iNPKMpwb7N3t9Q=" - }, - "json5": { - "version": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", - "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", - "dev": true - }, - "jszip": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.1.5.tgz", - "integrity": "sha512-5W8NUaFRFRqTOL7ZDDrx5qWHJyBXy6velVudIzQUSoqAAYqzSh2Z7/m0Rf1QbmQJccegD0r+YZxBjzqoBiEeJQ==", - "requires": { - "core-js": "2.3.0", - "es6-promise": "3.0.2", - "lie": "3.1.1", - "pako": "1.0.6", - "readable-stream": "2.0.6" - }, - "dependencies": { - "pako": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.6.tgz", - "integrity": "sha512-lQe48YPsMJAig+yngZ87Lus+NF+3mtu7DVOBu6b/gHO1YpKwIj5AWjZ/TOS7i46HD/UixzWb1zeWDZfGZ3iYcg==" - }, - "readable-stream": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", - "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", - "requires": { - "core-util-is": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "isarray": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "process-nextick-args": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "string_decoder": "0.10.31", - "util-deprecate": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" - } - } - }, - "kind-of": { - "version": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.5.tgz" - } - }, - "lazy-cache": { - "version": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", - "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", - "dev": true - }, - "lazystream": { - "version": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz", - "integrity": "sha1-9plf4PggOS9hOWvolGJAe7dxaOQ=", - "requires": { - "readable-stream": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz" - } - }, - "lie": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/lie/-/lie-3.1.1.tgz", - "integrity": "sha1-mkNrLMd0bKWd56QfpGmz77dr2H4=", - "requires": { - "immediate": "3.0.6" - } - }, - "load-json-file": { - "version": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", - "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", - "requires": { - "graceful-fs": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "parse-json": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "pify": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "pinkie-promise": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "strip-bom": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz" - } - }, - "loader-utils": { - "version": "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.17.tgz", - "integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=", - "dev": true, - "requires": { - "big.js": "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz", - "emojis-list": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", - "json5": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", - "object-assign": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz" - } - }, - "lodash": { - "version": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", - "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=" - }, - "lodash.difference": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.difference/-/lodash.difference-4.5.0.tgz", - "integrity": "sha1-nMtOUF1Ia5FlE0V3KIWi3yf9AXw=" - }, - "lodash.pad": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/lodash.pad/-/lodash.pad-4.5.1.tgz", - "integrity": "sha1-QzCUmoM6fI2iLMIPaibE1Z3runA=" - }, - "lodash.padend": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/lodash.padend/-/lodash.padend-4.6.1.tgz", - "integrity": "sha1-U8y6BH0G4VjTEfRdpiX05J5vFm4=" - }, - "lodash.padstart": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/lodash.padstart/-/lodash.padstart-4.6.1.tgz", - "integrity": "sha1-0uPuv/DZ05rVD1y9G1KnvOa7YRs=" - }, - "lodash.uniq": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", - "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=" - }, - "longest": { - "version": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", - "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", - "dev": true - }, - "loud-rejection": { - "version": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", - "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", - "requires": { - "currently-unhandled": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", - "signal-exit": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz" - } - }, - "map-obj": { - "version": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=" - }, - "memory-fs": { - "version": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.3.0.tgz", - "integrity": "sha1-e8xrYp46Q+hx1+Kaymrop/FcuyA=", - "dev": true, - "requires": { - "errno": "https://registry.npmjs.org/errno/-/errno-0.1.4.tgz", - "readable-stream": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz" - } - }, - "meow": { - "version": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", - "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", - "requires": { - "camelcase-keys": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", - "decamelize": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "loud-rejection": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", - "map-obj": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "minimist": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "normalize-package-data": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", - "object-assign": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "read-pkg-up": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", - "redent": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", - "trim-newlines": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz" - } - }, - "micromatch": { - "version": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", - "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", - "dev": true, - "requires": { - "arr-diff": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", - "array-unique": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", - "braces": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", - "expand-brackets": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", - "extglob": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", - "filename-regex": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", - "is-extglob": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "is-glob": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "kind-of": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "normalize-path": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "object.omit": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", - "parse-glob": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", - "regex-cache": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz" - } - }, - "minimatch": { - "version": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=", - "requires": { - "brace-expansion": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz" - } - }, - "minimist": { - "version": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" - }, - "mkdirp": { - "version": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "requires": { - "minimist": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz" - }, - "dependencies": { - "minimist": { - "version": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" - } - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, - "mute-stream": { - "version": "file:mycachedir/mute-stream/0.0.4/package.tgz", - "integrity": "sha1-qSGZYKbV1dBGWXruUSUsZlX3F34=" - }, - "ncp": { - "version": "file:https:/registry.npmjs.org/ncp/-/ncp-2.0.0.tgz", - "integrity": "sha1-GVoh1sRuNh0vsSgbo4uR6d9727M=", - "dev": true - }, - "node-libs-browser": { - "version": "file:mycachedir/node-libs-browser/0.7.0/package.tgz", - "integrity": "sha1-PicsCBnjCJNeJmdECNevDhSRuDs=", - "dev": true, - "requires": { - "assert": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz", - "browserify-zlib": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.1.4.tgz", - "buffer": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", - "console-browserify": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", - "constants-browserify": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", - "crypto-browserify": "file:mycachedir/crypto-browserify/3.3.0/package.tgz", - "domain-browser": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.1.7.tgz", - "events": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", - "https-browserify": "https://registry.npmjs.org/https-browserify/-/https-browserify-0.0.1.tgz", - "os-browserify": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.2.1.tgz", - "path-browserify": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz", - "process": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "punycode": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "querystring-es3": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", - "readable-stream": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", - "stream-browserify": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz", - "stream-http": "https://registry.npmjs.org/stream-http/-/stream-http-2.7.2.tgz", - "string_decoder": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "timers-browserify": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.4.tgz", - "tty-browserify": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", - "url": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", - "util": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", - "vm-browserify": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz" - }, - "dependencies": { - "string_decoder": { - "version": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - } - } - }, - "normalize-package-data": { - "version": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", - "integrity": "sha1-EvlaMH1YNSB1oEkHuErIvpisAS8=", - "requires": { - "hosted-git-info": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz", - "is-builtin-module": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", - "semver": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", - "validate-npm-package-license": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz" - } - }, - "normalize-path": { - "version": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "requires": { - "remove-trailing-separator": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz" - } - }, - "npmlog": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-2.0.4.tgz", - "integrity": "sha1-mLUlMPJRTKkNCexbIsiEZyI3VpI=", - "requires": { - "ansi": "0.3.1", - "are-we-there-yet": "1.1.4", - "gauge": "1.2.7" - } - }, - "number-is-nan": { - "version": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" - }, - "object-assign": { - "version": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" - }, - "object-keys": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.11.tgz", - "integrity": "sha1-xUYBd4rVYPEULODgG8yotW0TQm0=" - }, - "object.getownpropertydescriptors": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz", - "integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=", - "requires": { - "define-properties": "1.1.2", - "es-abstract": "1.10.0" - } - }, - "object.omit": { - "version": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", - "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", - "dev": true, - "requires": { - "for-own": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", - "is-extendable": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz" - } - }, - "once": { - "version": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "requires": { - "wrappy": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" - } - }, - "onecolor": { - "version": "https://registry.npmjs.org/onecolor/-/onecolor-2.5.0.tgz", - "integrity": "sha1-Ila2UdyAfBAfAK7b1JklxXpEMcE=" - }, - "onetime": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", - "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=" - }, - "optimist": { - "version": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", - "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", - "dev": true, - "requires": { - "minimist": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", - "wordwrap": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz" - }, - "dependencies": { - "minimist": { - "version": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", - "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=", - "dev": true - } - } - }, - "os-browserify": { - "version": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.2.1.tgz", - "integrity": "sha1-Y/xMzuXS13Y9Jrv4YBB45sLgBE8=", - "dev": true - }, - "os-homedir": { - "version": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" - }, - "os-shim": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/os-shim/-/os-shim-0.1.3.tgz", - "integrity": "sha1-a2LDeRz3kJ6jXtRuF2WLtBfLORc=" - }, - "os-tmpdir": { - "version": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" - }, - "pako": { - "version": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz", - "integrity": "sha1-8/dSL073gjSNqBYbrZ7P1Rv4OnU=", - "dev": true - }, - "parse-glob": { - "version": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", - "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", - "dev": true, - "requires": { - "glob-base": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", - "is-dotfile": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", - "is-extglob": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "is-glob": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz" - } - }, - "parse-json": { - "version": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", - "requires": { - "error-ex": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz" - } - }, - "path-browserify": { - "version": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz", - "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=", - "dev": true - }, - "path-exists": { - "version": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", - "requires": { - "pinkie-promise": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz" - } - }, - "path-is-absolute": { - "version": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" - }, - "path-type": { - "version": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", - "requires": { - "graceful-fs": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "pify": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "pinkie-promise": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz" - } - }, - "pbkdf2-compat": { - "version": "https://registry.npmjs.org/pbkdf2-compat/-/pbkdf2-compat-2.0.1.tgz", - "integrity": "sha1-tuDI+plJTZTgURV1gCpZpcFC8og=", - "dev": true - }, - "pify": { - "version": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" - }, - "pinkie": { - "version": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=" - }, - "pinkie-promise": { - "version": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "requires": { - "pinkie": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz" - } - }, - "pkginfo": { - "version": "https://registry.npmjs.org/pkginfo/-/pkginfo-0.4.1.tgz", - "integrity": "sha1-tUGO8EOd5UJfxJlQQtztFPsqhP8=" - }, - "preserve": { - "version": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", - "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=", - "dev": true - }, - "process": { - "version": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", - "dev": true - }, - "process-nextick-args": { - "version": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" - }, - "prompt": { - "version": "file:https:/registry.npmjs.org/prompt/-/prompt-0.2.14.tgz", - "integrity": "sha1-V3VPZPVD/XsIRXB8gY7OYY8F/9w=", - "requires": { - "pkginfo": "https://registry.npmjs.org/pkginfo/-/pkginfo-0.4.1.tgz", - "read": "https://registry.npmjs.org/read/-/read-1.0.7.tgz", - "revalidator": "file:mycachedir/revalidator/0.1.8/package.tgz", - "utile": "file:mycachedir/utile/0.2.1/package.tgz", - "winston": "file:mycachedir/winston/0.8.3/package.tgz" - } - }, - "prr": { - "version": "https://registry.npmjs.org/prr/-/prr-0.0.0.tgz", - "integrity": "sha1-GoS4WQgyVQFBGFPQCB7j+obikmo=", - "dev": true - }, - "punycode": { - "version": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true - }, - "q": { - "version": "https://registry.npmjs.org/q/-/q-1.5.0.tgz", - "integrity": "sha1-3QG6ydBtMObyGa7LglPunr3DCPE=" - }, - "querystring": { - "version": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", - "dev": true - }, - "querystring-es3": { - "version": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", - "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", - "dev": true - }, - "randomatic": { - "version": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz", - "integrity": "sha1-x6vpzIuHwLqodrGf3oP9RkeX44w=", - "dev": true, - "requires": { - "is-number": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "kind-of": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz" - }, - "dependencies": { - "is-number": { - "version": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "requires": { - "kind-of": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz" - }, - "dependencies": { - "kind-of": { - "version": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.5.tgz" - } - } - } - }, - "kind-of": { - "version": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", - "dev": true, - "requires": { - "is-buffer": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.5.tgz" - } - } - } - }, - "read": { - "version": "https://registry.npmjs.org/read/-/read-1.0.7.tgz", - "integrity": "sha1-s9oZvQUkMal2cdRKQmNK33ELQMQ=", - "requires": { - "mute-stream": "file:mycachedir/mute-stream/0.0.4/package.tgz" - } - }, - "read-pkg": { - "version": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", - "requires": { - "load-json-file": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", - "normalize-package-data": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", - "path-type": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz" - } - }, - "read-pkg-up": { - "version": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", - "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", - "requires": { - "find-up": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "read-pkg": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz" - } - }, - "readable-stream": { - "version": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", - "integrity": "sha1-No8lEtefnUb9/HE0mueHi7weuVw=", - "requires": { - "core-util-is": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "isarray": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "process-nextick-args": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "safe-buffer": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "string_decoder": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "util-deprecate": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" - } - }, - "readdirp": { - "version": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz", - "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", - "dev": true, - "requires": { - "graceful-fs": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "minimatch": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "readable-stream": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", - "set-immediate-shim": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz" - } - }, - "readline2": { - "version": "file:mycachedir/readline2/0.1.1/package.tgz", - "integrity": "sha1-mUQ7pug7gw7zBRv9fcJBqCco1Wg=", - "requires": { - "mute-stream": "file:mycachedir/mute-stream/0.0.4/package.tgz", - "strip-ansi": "file:mycachedir/strip-ansi/2.0.1/package.tgz" - }, - "dependencies": { - "strip-ansi": { - "version": "file:mycachedir/strip-ansi/2.0.1/package.tgz", - "integrity": "sha1-32LBqpTtLxFOHQ8h/R1QSCt5pg4=", - "requires": { - "ansi-regex": "file:mycachedir/ansi-regex/1.1.1/package.tgz" - } - } - } - }, - "redent": { - "version": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", - "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", - "requires": { - "indent-string": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", - "strip-indent": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz" - } - }, - "regex-cache": { - "version": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", - "integrity": "sha1-db3FiioUls7EihKDW8VMjVYjNt0=", - "dev": true, - "requires": { - "is-equal-shallow": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz" - } - }, - "remove-trailing-separator": { - "version": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=" - }, - "repeat-element": { - "version": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", - "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=", - "dev": true - }, - "repeat-string": { - "version": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", - "dev": true - }, - "repeating": { - "version": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", - "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", - "requires": { - "is-finite": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz" - } - }, - "restore-cursor": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz", - "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", - "requires": { - "exit-hook": "1.1.1", - "onetime": "1.1.0" - } - }, - "revalidator": { - "version": "file:mycachedir/revalidator/0.1.8/package.tgz", - "integrity": "sha1-/s5hv6DBtSoga9axgZgYS91SOjs=" - }, - "right-align": { - "version": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", - "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", - "dev": true, - "requires": { - "align-text": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz" - } - }, - "rimraf": { - "version": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", - "requires": { - "glob": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz" - } - }, - "ripemd160": { - "version": "https://registry.npmjs.org/ripemd160/-/ripemd160-0.2.0.tgz", - "integrity": "sha1-K/GYveFnys+lHAqSjoS2i74XH84=", - "dev": true - }, - "run-async": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", - "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", - "requires": { - "is-promise": "2.1.0" - } - }, - "rx": { - "version": "file:mycachedir/rx/2.5.3/package.tgz", - "integrity": "sha1-Ia3H2A8CACr1Da6X/Z2/JIdV9WY=" - }, - "safe-buffer": { - "version": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha1-iTMSr2myEj3vcfV4iQAWce6yyFM=" - }, - "sax": { - "version": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha1-KBYjTiN4vdxOU1T6tcqold9xANk=" - }, - "semver": { - "version": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", - "integrity": "sha1-4FnAnYVx8FQII3M0M1BdOi8AsY4=" - }, - "set-immediate-shim": { - "version": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", - "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=", - "dev": true - }, - "setimmediate": { - "version": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", - "dev": true - }, - "sha.js": { - "version": "https://registry.npmjs.org/sha.js/-/sha.js-2.2.6.tgz", - "integrity": "sha1-F93t3F9yL7ZlAWWIlUYZd4ZzFbo=", - "dev": true - }, - "shelljs": { - "version": "file:https:/registry.npmjs.org/shelljs/-/shelljs-0.5.3.tgz", - "integrity": "sha1-xUmCuZbHbvDB5rWfvcWCX1txMRM=" - }, - "signal-exit": { - "version": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" - }, - "source-list-map": { - "version": "https://registry.npmjs.org/source-list-map/-/source-list-map-0.1.8.tgz", - "integrity": "sha1-xVCyq1Qn9rPyH1r+rYjE9Vh7IQY=", - "dev": true - }, - "source-map": { - "version": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - }, - "spawn-sync": { - "version": "1.0.15", - "resolved": "https://registry.npmjs.org/spawn-sync/-/spawn-sync-1.0.15.tgz", - "integrity": "sha1-sAeZVX63+wyDdsKdROih6mfldHY=", - "requires": { - "concat-stream": "1.6.0", - "os-shim": "0.1.3" - } - }, - "spdx-correct": { - "version": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz", - "integrity": "sha1-SzBz2TP/UfORLwOsVRlJikFQ20A=", - "requires": { - "spdx-license-ids": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz" - } - }, - "spdx-expression-parse": { - "version": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz", - "integrity": "sha1-m98vIOH0DtRH++JzJmGR/O1RYmw=" - }, - "spdx-license-ids": { - "version": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz", - "integrity": "sha1-yd96NCRZSt5r0RkA1ZZpbcBrrFc=" - }, - "stack-trace": { - "version": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", - "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=" - }, - "stream-browserify": { - "version": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz", - "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=", - "dev": true, - "requires": { - "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "readable-stream": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz" - } - }, - "stream-http": { - "version": "https://registry.npmjs.org/stream-http/-/stream-http-2.7.2.tgz", - "integrity": "sha1-QKBQ7I3DtTsz2ZCUFcAsC/Gr+60=", - "dev": true, - "requires": { - "builtin-status-codes": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", - "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "readable-stream": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", - "to-arraybuffer": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", - "xtend": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz" - } - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "requires": { - "ansi-regex": "2.1.1" - } - } - } - }, - "string_decoder": { - "version": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha1-D8Z9fBQYJd6UKC3VNr7GubzoYKs=", - "requires": { - "safe-buffer": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz" - } - }, - "strip-ansi": { - "version": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "requires": { - "ansi-regex": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz" - }, - "dependencies": { - "ansi-regex": { - "version": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" - } - } - }, - "strip-bom": { - "version": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", - "requires": { - "is-utf8": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz" - } - }, - "strip-indent": { - "version": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", - "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", - "requires": { - "get-stdin": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz" - }, - "dependencies": { - "get-stdin": { - "version": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", - "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=" - } - } - }, - "supports-color": { - "version": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" - }, - "sync-exec": { - "version": "file:mycachedir/sync-exec/0.6.2/package.tgz", - "integrity": "sha1-cX0izFPwzh3vVZQ2LzqJouu5EQU=", - "optional": true - }, - "tabtab": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/tabtab/-/tabtab-2.2.2.tgz", - "integrity": "sha1-egR/FDsBC0y9MfhX6ClhUSy/ThQ=", - "requires": { - "debug": "2.6.9", - "inquirer": "1.2.3", - "lodash.difference": "4.5.0", - "lodash.uniq": "4.5.0", - "minimist": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "mkdirp": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "npmlog": "2.0.4", - "object-assign": "4.1.1" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" - } - }, - "cli-width": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", - "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=" - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" - }, - "figures": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", - "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", - "requires": { - "escape-string-regexp": "1.0.5", - "object-assign": "4.1.1" - } - }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "requires": { - "ansi-regex": "2.1.1" - } - }, - "inquirer": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-1.2.3.tgz", - "integrity": "sha1-TexvMvN+97sLLtPx0aXD9UUHSRg=", - "requires": { - "ansi-escapes": "1.4.0", - "chalk": "1.1.3", - "cli-cursor": "1.0.2", - "cli-width": "2.2.0", - "external-editor": "1.1.1", - "figures": "1.7.0", - "lodash": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", - "mute-stream": "0.0.6", - "pinkie-promise": "2.0.1", - "run-async": "2.3.0", - "rx": "4.1.0", - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "through": "2.3.8" - } - }, - "mute-stream": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.6.tgz", - "integrity": "sha1-SJYrGeFp/R38JAs/HnMXYnu8R9s=" - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" - }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=" - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "requires": { - "pinkie": "2.0.4" - } - }, - "rx": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/rx/-/rx-4.1.0.tgz", - "integrity": "sha1-pfE/957zt0D+MKqAP7CfmIBdR4I=" - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "requires": { - "ansi-regex": "2.1.1" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" - }, - "through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" - } - } - }, - "tapable": { - "version": "https://registry.npmjs.org/tapable/-/tapable-0.1.10.tgz", - "integrity": "sha1-KcNXB8K3DlDQdIK10gLo7URtr9Q=", - "dev": true - }, - "tar-stream": { - "version": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.5.4.tgz", - "integrity": "sha1-NlSc8E7RrumyowwBQyUiONr5QBY=", - "requires": { - "bl": "https://registry.npmjs.org/bl/-/bl-1.2.1.tgz", - "end-of-stream": "file:mycachedir/end-of-stream/1.4.0/package.tgz", - "readable-stream": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", - "xtend": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz" - } - }, - "through": { - "version": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" - }, - "timers-browserify": { - "version": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.4.tgz", - "integrity": "sha1-lspT9LeUpefA4b18yIo3Ipj6AeY=", - "dev": true, - "requires": { - "setimmediate": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz" - } - }, - "tinytim": { - "version": "file:mycachedir/tinytim/0.1.1/package.tgz", - "integrity": "sha1-yWih5VWa2VUyJO92J7qzTjyu+Kg=" - }, - "tmp": { - "version": "file:https:/registry.npmjs.org/tmp/-/tmp-0.0.26.tgz", - "integrity": "sha1-nvqCDOKhD4H4l5VVus4/FVJs4fI=", - "requires": { - "os-tmpdir": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz" - } - }, - "to-arraybuffer": { - "version": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", - "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=", - "dev": true - }, - "tracer": { - "version": "file:https:/registry.npmjs.org/tracer/-/tracer-0.7.4.tgz", - "integrity": "sha1-d/oEN8+Ct2vNvNRLhHRHcuWeUlk=", - "requires": { - "colors": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", - "dateformat": "file:mycachedir/dateformat/1.0.11/package.tgz", - "tinytim": "file:mycachedir/tinytim/0.1.1/package.tgz" - }, - "dependencies": { - "colors": { - "version": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", - "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=" - } - } - }, - "trim-newlines": { - "version": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", - "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=" - }, - "tty-browserify": { - "version": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", - "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=", - "dev": true - }, - "tunnel": { - "version": "file:mycachedir/tunnel/0.0.4/package.tgz", - "integrity": "sha1-LTeFoVjBdMmhbcLARuxfxfF0IhM=" - }, - "typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" - }, - "typescript": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.6.2.tgz", - "integrity": "sha1-PFtv1/beCRQmkCfwPAlGdY92c6Q=", - "dev": true - }, - "uglify-js": { - "version": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.7.5.tgz", - "integrity": "sha1-RhLAx7qu4rp8SH3kkErhIgefLKg=", - "dev": true, - "requires": { - "async": "https://registry.npmjs.org/async/-/async-0.2.10.tgz", - "source-map": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "uglify-to-browserify": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", - "yargs": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz" - }, - "dependencies": { - "async": { - "version": "https://registry.npmjs.org/async/-/async-0.2.10.tgz", - "integrity": "sha1-trvgsGdLnXGXCMo43owjfLUmw9E=", - "dev": true - } - } - }, - "uglify-to-browserify": { - "version": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", - "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", - "dev": true - }, - "underscore": { - "version": "file:mycachedir/underscore/1.8.3/package.tgz", - "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" - }, - "url": { - "version": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", - "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", - "dev": true, - "requires": { - "punycode": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "querystring": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz" - }, - "dependencies": { - "punycode": { - "version": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", - "dev": true - } - } - }, - "util": { - "version": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", - "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", - "dev": true, - "requires": { - "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" - }, - "dependencies": { - "inherits": { - "version": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", - "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", - "dev": true - } - } - }, - "util-deprecate": { - "version": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" - }, - "util.promisify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.0.tgz", - "integrity": "sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA==", - "requires": { - "define-properties": "1.1.2", - "object.getownpropertydescriptors": "2.0.3" - } - }, - "utile": { - "version": "file:mycachedir/utile/0.2.1/package.tgz", - "integrity": "sha1-kwyI6ZCY1iIINMNWy9mncFItkNc=", - "requires": { - "async": "https://registry.npmjs.org/async/-/async-0.2.10.tgz", - "deep-equal": "file:mycachedir/deep-equal/1.0.1/package.tgz", - "i": "file:mycachedir/i/0.3.5/package.tgz", - "mkdirp": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "ncp": "0.4.2", - "rimraf": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz" - }, - "dependencies": { - "async": { - "version": "https://registry.npmjs.org/async/-/async-0.2.10.tgz", - "integrity": "sha1-trvgsGdLnXGXCMo43owjfLUmw9E=" - }, - "ncp": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/ncp/-/ncp-0.4.2.tgz", - "integrity": "sha1-q8xsvT7C7Spyn/bnwfqPAXhKhXQ=" - } - } - }, - "uuid": { - "version": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz", - "integrity": "sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g==" - }, - "validate-npm-package-license": { - "version": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz", - "integrity": "sha1-KAS6vnEq0zeUWaz74kdGqywwP7w=", - "requires": { - "spdx-correct": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz", - "spdx-expression-parse": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz" - } - }, - "validator": { - "version": "file:https:/registry.npmjs.org/validator/-/validator-3.43.0.tgz", - "integrity": "sha1-lkZLmS1BloM9l6GUv0Cxn/VLrgU=" - }, - "vm-browserify": { - "version": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", - "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=", - "dev": true, - "requires": { - "indexof": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz" - } - }, - "vso-node-api": { - "version": "file:https:/registry.npmjs.org/vso-node-api/-/vso-node-api-5.1.2.tgz", - "integrity": "sha1-gXtm/+1uEcvXH5O5FvSxicljQls=", - "requires": { - "q": "https://registry.npmjs.org/q/-/q-1.5.0.tgz", - "tunnel": "file:mycachedir/tunnel/0.0.4/package.tgz", - "underscore": "file:mycachedir/underscore/1.8.3/package.tgz" - } - }, - "walkdir": { - "version": "https://registry.npmjs.org/walkdir/-/walkdir-0.0.11.tgz", - "integrity": "sha1-oW0CXrkxvQO1LzCMrtD0D86+lTI=" - }, - "watchpack": { - "version": "https://registry.npmjs.org/watchpack/-/watchpack-0.2.9.tgz", - "integrity": "sha1-Yuqkq15bo1/fwBgnVibjwPXj+ws=", - "dev": true, - "requires": { - "async": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", - "chokidar": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", - "graceful-fs": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz" - }, - "dependencies": { - "async": { - "version": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", - "integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0=", - "dev": true - } - } - }, - "webpack": { - "version": "https://registry.npmjs.org/webpack/-/webpack-1.15.0.tgz", - "integrity": "sha1-T/MfU9sDM55VFkqdRo7gMklo/pg=", - "dev": true, - "requires": { - "acorn": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz", - "async": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "clone": "https://registry.npmjs.org/clone/-/clone-1.0.2.tgz", - "enhanced-resolve": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-0.9.1.tgz", - "interpret": "https://registry.npmjs.org/interpret/-/interpret-0.6.6.tgz", - "loader-utils": "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.17.tgz", - "memory-fs": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.3.0.tgz", - "mkdirp": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "node-libs-browser": "file:mycachedir/node-libs-browser/0.7.0/package.tgz", - "optimist": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", - "supports-color": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", - "tapable": "https://registry.npmjs.org/tapable/-/tapable-0.1.10.tgz", - "uglify-js": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.7.5.tgz", - "watchpack": "https://registry.npmjs.org/watchpack/-/watchpack-0.2.9.tgz", - "webpack-core": "https://registry.npmjs.org/webpack-core/-/webpack-core-0.6.9.tgz" - }, - "dependencies": { - "supports-color": { - "version": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", - "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", - "dev": true, - "requires": { - "has-flag": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz" - } - } - } - }, - "webpack-core": { - "version": "https://registry.npmjs.org/webpack-core/-/webpack-core-0.6.9.tgz", - "integrity": "sha1-/FcViMhVjad76e+23r3Fo7FyvcI=", - "dev": true, - "requires": { - "source-list-map": "https://registry.npmjs.org/source-list-map/-/source-list-map-0.1.8.tgz", - "source-map": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz" - }, - "dependencies": { - "source-map": { - "version": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", - "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", - "dev": true, - "requires": { - "amdefine": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz" - } - } - } - }, - "window-size": { - "version": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", - "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", - "dev": true - }, - "winreg": { - "version": "file:https:/registry.npmjs.org/winreg/-/winreg-0.0.12.tgz", - "integrity": "sha1-BxBVVLoanQiXklHRKUdb/64wBrc=" - }, - "winston": { - "version": "file:mycachedir/winston/0.8.3/package.tgz", - "integrity": "sha1-ZLar9M0Brcrv1QCTk7HY6L7BnbA=", - "requires": { - "async": "https://registry.npmjs.org/async/-/async-0.2.10.tgz", - "colors": "file:mycachedir/colors/0.6.2/package.tgz", - "cycle": "file:mycachedir/cycle/1.0.3/package.tgz", - "eyes": "file:mycachedir/eyes/0.1.8/package.tgz", - "isstream": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "pkginfo": "file:mycachedir/pkginfo/0.3.1/package.tgz", - "stack-trace": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz" - }, - "dependencies": { - "async": { - "version": "https://registry.npmjs.org/async/-/async-0.2.10.tgz", - "integrity": "sha1-trvgsGdLnXGXCMo43owjfLUmw9E=" - }, - "colors": { - "version": "file:mycachedir/colors/0.6.2/package.tgz", - "integrity": "sha1-JCP+ZnisDF2uiFLl0OW+CMmXq8w=" - }, - "pkginfo": { - "version": "file:mycachedir/pkginfo/0.3.1/package.tgz", - "integrity": "sha1-Wyn2qB9wcXFC4J52W76rl7T4HiE=" - } - } - }, - "wordwrap": { - "version": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", - "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", - "dev": true - }, - "wrappy": { - "version": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - }, - "xml2js": { - "version": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz", - "integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==", - "requires": { - "sax": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "xmlbuilder": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.4.tgz" - } - }, - "xmlbuilder": { - "version": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.4.tgz", - "integrity": "sha1-UZy0ymhtAFqEINNJbz8MruzKWA8=" - }, - "xtend": { - "version": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", - "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" - }, - "yargs": { - "version": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", - "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", - "dev": true, - "requires": { - "camelcase": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", - "cliui": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", - "decamelize": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "window-size": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz" - }, - "dependencies": { - "camelcase": { - "version": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", - "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", - "dev": true - } - } - }, - "zip-stream": { - "version": "https://registry.npmjs.org/zip-stream/-/zip-stream-1.2.0.tgz", - "integrity": "sha1-qLxF9MG0lpnGuQGYuqyqzbzUugQ=", - "requires": { - "archiver-utils": "https://registry.npmjs.org/archiver-utils/-/archiver-utils-1.3.0.tgz", - "compress-commons": "https://registry.npmjs.org/compress-commons/-/compress-commons-1.2.0.tgz", - "lodash": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", - "readable-stream": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz" - } - } - } -} From a3b7e0c9362a5b283b890f6b42190d7dd37b213f Mon Sep 17 00:00:00 2001 From: Shani Feldman Date: Wed, 10 Jan 2018 13:06:29 +0200 Subject: [PATCH 212/235] add workitem links --- app/exec/workitem/links.ts | 41 ++++++++++++++++++++++++++++++++++++++ package.json | 2 +- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 app/exec/workitem/links.ts diff --git a/app/exec/workitem/links.ts b/app/exec/workitem/links.ts new file mode 100644 index 00000000..8929d8f4 --- /dev/null +++ b/app/exec/workitem/links.ts @@ -0,0 +1,41 @@ +import { EOL as eol } from "os"; +import { TfCommand } from "../../lib/tfcommand"; +import args = require("../../lib/arguments"); +import trace = require("../../lib/trace"); +import witBase = require("./default"); +import witClient = require("vso-node-api/WorkItemTrackingApi"); +import witContracts = require("vso-node-api/interfaces/WorkItemTrackingInterfaces"); +import { WorkItemExpand } from "vso-node-api/interfaces/WorkItemTrackingInterfaces"; + +export function getCommand(args: string[]): WorkItemLinks { + return new WorkItemLinks(args); +} + +export class WorkItemLinks extends witBase.WorkItemBase { + protected description = "Show Work Item links."; + protected serverCommand = true; + + protected getHelpArgs(): string[] { + return ["workItemId"]; + } + + public exec(): Promise { + var ids = []; + var witapi: witClient.IWorkItemTrackingApi = this.webApi.getWorkItemTrackingApi(); + return this.commandArgs.workItemId.val().then((workItemId) => { + ids[0] = workItemId; + return witapi.getWorkItems(ids,null,null,WorkItemExpand.All) + }); + } + + public friendlyOutput(workItems: witContracts.WorkItem[]): void { + workItems.forEach((wi) => { + wi.relations.forEach((link) =>{ + trace.println(); + trace.info("%s: [%s] %s", link.rel, link.url, link.attributes["name"] ? "- " + link.attributes["name"] : "") + }) + trace.println(); + }) + return //witBase.friendlyOutput(workItems); + } +} \ No newline at end of file diff --git a/package.json b/package.json index a9188727..92ec64e3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tfx-cli", - "version": "0.5.3", + "version": "0.5.4", "description": "CLI for Visual Studio Team Services and Team Foundation Server", "repository": { "type": "git", From 416b52583a8fd19f4cba15a9cf4afa009c213776 Mon Sep 17 00:00:00 2001 From: Shani Feldman Date: Wed, 16 May 2018 14:53:43 +0300 Subject: [PATCH 213/235] add request options --- app/exec/code/git/requestoptions.ts | 52 +++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 app/exec/code/git/requestoptions.ts diff --git a/app/exec/code/git/requestoptions.ts b/app/exec/code/git/requestoptions.ts new file mode 100644 index 00000000..2181e848 --- /dev/null +++ b/app/exec/code/git/requestoptions.ts @@ -0,0 +1,52 @@ +import { PullRequestAsyncStatus } from 'vso-node-api/interfaces/GitInterfaces'; +import { success, warn } from '../../../lib/trace'; +import { errLog } from '../../../lib/errorhandler'; +import args = require('../../../lib/arguments'); +import trace = require('../../../lib/trace'); +import gi = require('vso-node-api/interfaces/GitInterfaces'); +import git_Api = require('vso-node-api/GitApi'); +import VSSInterfaces = require('vso-node-api/interfaces/common/VSSInterfaces'); +import codedBase = require('./default'); +var repositoryName; + +export function getCommand(args: string[]): RequestDetails { + return new RequestDetails(args); +} + +export class RequestDetails extends codedBase.CodeBase { + protected serverCommand = true; + protected description = "Get a list of pull requests"; + + protected getHelpArgs(): string[] { + return ["project", "repositoryname","pullrequestid"]; + } + + public async exec(): Promise { + //getting variables. + var gitApi: git_Api.IGitApi = this.webApi.getGitApi(); + var project = await this.commandArgs.project.val(); + repositoryName = await this.commandArgs.repositoryname.val(); + var gitRepositories = await gitApi.getRepositories(project); + var requestId = await this.commandArgs.pullrequestid.val(); + var gitRepositorie; + gitRepositories.forEach(repo => { + if (repo.name.toLowerCase() == repositoryName.toLowerCase()) { + gitRepositorie = repo; + return; + }; + }); + var request = await gitApi.getPullRequest(gitRepositorie.id, +requestId); + return request.completionOptions; + }; + + public friendlyOutput(opt: gi.GitPullRequestCompletionOptions): void { + if (!opt) { + throw new Error("no pull requests supplied"); + } + trace.info('Source Branch : %s', opt.deleteSourceBranch); + trace.info('Commit Message : %s', opt.mergeCommitMessage); + trace.info('Squash Merge : %s', opt.squashMerge); + trace.println(); + } +}; + From dbb6a3cab1f2591b70593045d063340ce63a31ea Mon Sep 17 00:00:00 2001 From: Shani Feldman Date: Wed, 16 May 2018 20:58:08 +0300 Subject: [PATCH 214/235] add some stuff to PR show options - PR ID squash, autocomplete, etc. --- app/exec/code/git/requestoptions.ts | 34 +++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/app/exec/code/git/requestoptions.ts b/app/exec/code/git/requestoptions.ts index 2181e848..535eedf1 100644 --- a/app/exec/code/git/requestoptions.ts +++ b/app/exec/code/git/requestoptions.ts @@ -9,11 +9,11 @@ import VSSInterfaces = require('vso-node-api/interfaces/common/VSSInterfaces'); import codedBase = require('./default'); var repositoryName; -export function getCommand(args: string[]): RequestDetails { - return new RequestDetails(args); +export function getCommand(args: string[]): RequestOptions { + return new RequestOptions(args); } -export class RequestDetails extends codedBase.CodeBase { +export class RequestOptions extends codedBase.CodeBase { protected serverCommand = true; protected description = "Get a list of pull requests"; @@ -36,17 +36,33 @@ export class RequestDetails extends codedBase.CodeBase Date: Sat, 7 Jul 2018 12:17:51 +0300 Subject: [PATCH 215/235] upstream sync 0.5.14 --- app/exec/extension/_lib/utils.ts | 4 -- package.json | 78 +------------------------------- 2 files changed, 1 insertion(+), 81 deletions(-) diff --git a/app/exec/extension/_lib/utils.ts b/app/exec/extension/_lib/utils.ts index eaf66737..a8a2559c 100644 --- a/app/exec/extension/_lib/utils.ts +++ b/app/exec/extension/_lib/utils.ts @@ -4,11 +4,7 @@ import path = require("path"); import xml = require("xml2js"); export function removeMetaKeys(obj: any): any { -<<<<<<< HEAD return _.pickBy(obj,(v,k)=> !_.startsWith(k,"__meta_")); -======= - return _.omitBy(obj, (v, k) => _.startsWith(k, "__meta_")); ->>>>>>> upstream/master } export function cleanAssetPath(assetPath: string, root: string = ".") { diff --git a/package.json b/package.json index ab8522a0..0ff1c4de 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,6 @@ { -<<<<<<< HEAD "name": "tfx-cli", - "version": "0.5.10", + "version": "0.5.14", "description": "CLI for Visual Studio Team Services and Team Foundation Server", "repository": { "type": "git", @@ -79,79 +78,4 @@ "name": "Shani Feldman" } ] -======= - "name": "tfx-cli", - "version": "0.5.14", - "description": "CLI for Visual Studio Team Services and Team Foundation Server", - "repository": { - "type": "git", - "url": "https://github.com/Microsoft/tfs-cli" - }, - "main": "./_build/tfx-cli.js", - "preferGlobal": true, - "bin": { - "tfx": "./_build/tfx-cli.js" - }, - "scripts": { - "clean": "rimraf _build", - "build": "tsc -p .", - "postbuild": "ncp app/tfx-cli.js _build/tfx-cli.js && ncp package.json _build/package.json && ncp app/exec/build/tasks/_resources _build/exec/build/tasks/_resources", - "prepublish": "npm run build" - }, - "dependencies": { - "app-root-path": "1.0.0", - "archiver": "2.0.3", - "async": "^1.4.0", - "colors": "~1.3.0", - "copy-paste": "^1.3.0", - "glob": "7.1.2", - "inquirer": "0.8.5", - "json-in-place": "^1.0.1", - "jszip": "~3.1.5", - "lodash": "~4.17.0", - "minimist": "^1.1.2", - "mkdirp": "^0.5.1", - "onecolor": "^2.5.0", - "os-homedir": "^1.0.1", - "prompt": "^0.2.14", - "read": "^1.0.6", - "shelljs": "^0.5.1", - "tmp": "0.0.26", - "tracer": "0.7.4", - "util.promisify": "^1.0.0", - "uuid": "^3.0.1", - "validator": "^3.43.0", - "vso-node-api": "^5.0.0", - "winreg": "0.0.12", - "xml2js": "^0.4.16" - }, - "devDependencies": { - "@types/copy-paste": "^1.1.29", - "@types/glob": "^5.0.29", - "@types/jszip": "~3.1.2", - "@types/lodash": "~4.14.110", - "@types/mkdirp": "^0.3.28", - "@types/node": "~8.5.1", - "@types/shelljs": "^0.3.30", - "@types/uuid": "^2.0.29", - "@types/validator": "^4.5.27", - "@types/winreg": "^1.2.29", - "@types/xml2js": "0.0.27", - "ncp": "^2.0.0", - "rimraf": "^2.6.1", - "typescript": "~2.6.2", - "webpack": "^1.13.2" - }, - "engines": { - "npm": ">=8.0.0" - }, - "author": "Microsoft Corporation", - "contributors": [ - { - "email": "trgau@microsoft.com", - "name": "Trevor Gau" - } - ], - "license": "MIT" ->>>>>>> upstream/master } From 8c75857b015fd9a3a5d252a4217a0a8c08594f46 Mon Sep 17 00:00:00 2001 From: Shani Feldman Date: Thu, 4 Oct 2018 15:02:55 +0300 Subject: [PATCH 216/235] add update some build details before deleting --- app/exec/build/delete.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/exec/build/delete.ts b/app/exec/build/delete.ts index 4897d97c..bcd03223 100644 --- a/app/exec/build/delete.ts +++ b/app/exec/build/delete.ts @@ -38,11 +38,14 @@ export class BuildDelete extends buildBase.BuildBase { if (!build.keepForever) { build.deleted = true; - if (build.deleted) { + build.status = buildContracts.BuildStatus.Completed + build.result = buildContracts.BuildResult.Failed + if (build.deleted && build.status == buildContracts.BuildStatus.Completed) { + buildapi.updateBuild(build,build.id) + buildapi.deleteBuild(build.id,build.project.name) trace.info("build deleted") } else { trace.error("failed to delete") From cd62a31d61e0907e690a0a1915f38be2bce60483 Mon Sep 17 00:00:00 2001 From: Shani Feldman Date: Sun, 7 Apr 2019 14:41:26 +0300 Subject: [PATCH 217/235] add update endpoint info --- app/exec/endpoints/default.ts | 9 +++-- app/exec/endpoints/set.ts | 63 +++++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+), 3 deletions(-) create mode 100644 app/exec/endpoints/set.ts diff --git a/app/exec/endpoints/default.ts b/app/exec/endpoints/default.ts index e5419702..9ed85b86 100644 --- a/app/exec/endpoints/default.ts +++ b/app/exec/endpoints/default.ts @@ -1,6 +1,10 @@ import { TfCommand, CoreArguments } from "../../lib/tfcommand"; import args = require("../../lib/arguments"); +export interface BuildArguments extends CoreArguments { + parameters: args.StringArgument; +} + export function getCommand(args: string[]): HelpCommand { return new HelpCommand(args); } @@ -11,9 +15,8 @@ export class HelpCommand extends TfCommand { protected setCommandArgs(): void { super.setCommandArgs(); - } - + } public exec(cmd?: any): Promise { return this.getHelp(cmd); } -} +} \ No newline at end of file diff --git a/app/exec/endpoints/set.ts b/app/exec/endpoints/set.ts new file mode 100644 index 00000000..e2ae4768 --- /dev/null +++ b/app/exec/endpoints/set.ts @@ -0,0 +1,63 @@ +import { TfCommand, CoreArguments } from "../../lib/tfcommand"; +import args = require("../../lib/arguments"); +import trace = require('../../lib/trace'); +import taskAgentContracts = require("vso-node-api/interfaces/TaskAgentInterfaces"); +import agentClient = require("vso-node-api/TaskAgentApiBase"); +import corem = require('vso-node-api/CoreApi'); + +export function getCommand(args: string[]): ShowEndpoint { + return new ShowEndpoint(args); +} +export interface EndpointArguments extends CoreArguments { + id: args.StringArgument, +} +export class ShowEndpoint extends TfCommand { + protected serverCommand = true; + protected description = "Get a list of build definitions"; + protected setCommandArgs(): void { + super.setCommandArgs(); + this.registerCommandArgument("id", "Endpoint ID", "Endpoint Guid Identifier.", args.StringArgument, null); + this.registerCommandArgument("parameters", "parameter file path or JSON string", "Endpoint authorization parameters JSON file / string.", args.StringArgument, null); + } + + protected getHelpArgs(): string[] { + return ["project", "id", "parameters"]; + } + + public exec(): Promise { + var agentapi: agentClient.ITaskAgentApiBase = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl()); + var coreapi:corem.ICoreApi = this.webApi.getCoreApi(this.connection.getCollectionUrl()) + trace.debug("Searching for Service Endpoints ..."); + return this.commandArgs.project.val().then((project) => { + return this.commandArgs.id.val().then((id) =>{ + return this.commandArgs.parameters.val().then((params) => { + return coreapi.getProject(project).then((projectObj) =>{ + return agentapi.getServiceEndpointDetails(projectObj.id,id).then((endpoint) => { + trace.info(JSON.stringify(JSON.parse(params))); + endpoint.authorization.parameters = JSON.parse(params); + return agentapi.updateServiceEndpoint(endpoint,projectObj.name,endpoint.id).then(() => { + return endpoint; + }); + }); + }); + }); + }); + }); + } + + public friendlyOutput(data: taskAgentContracts.ServiceEndpoint): void { + if (!data) { + throw new Error('no endpoints supplied'); + } + + trace.println(); + trace.info('id : %s', data.id); + trace.info('name : %s', data.name); + trace.info('type : %s', data.type); + trace.info('description : %s', data.description); + trace.info('visibility : %s', JSON.stringify(data.data)); + trace.info('auth scheme : %s', JSON.stringify(data.authorization.scheme)); + trace.info('auth parameters : %s', JSON.stringify(data.authorization.parameters)); + trace.info('created By : %s', data.createdBy.displayName); + } +} From 97af7b11c08c0a980455d596da60f12ceb6c6baa Mon Sep 17 00:00:00 2001 From: Shani Feldman Date: Sun, 7 Apr 2019 14:43:26 +0300 Subject: [PATCH 218/235] add update endpoint info w/o print --- app/exec/endpoints/set.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/exec/endpoints/set.ts b/app/exec/endpoints/set.ts index e2ae4768..1594ad71 100644 --- a/app/exec/endpoints/set.ts +++ b/app/exec/endpoints/set.ts @@ -33,7 +33,7 @@ export class ShowEndpoint extends TfCommand { return coreapi.getProject(project).then((projectObj) =>{ return agentapi.getServiceEndpointDetails(projectObj.id,id).then((endpoint) => { - trace.info(JSON.stringify(JSON.parse(params))); + //trace.info(JSON.stringify(JSON.parse(params))); endpoint.authorization.parameters = JSON.parse(params); return agentapi.updateServiceEndpoint(endpoint,projectObj.name,endpoint.id).then(() => { return endpoint; From cb25aa174502f43f4b68d124b8c4cf4f252c01f0 Mon Sep 17 00:00:00 2001 From: Shani Feldman Date: Sun, 7 Apr 2019 15:41:26 +0300 Subject: [PATCH 219/235] remove secret printing --- app/exec/endpoints/set.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/exec/endpoints/set.ts b/app/exec/endpoints/set.ts index 1594ad71..d834807b 100644 --- a/app/exec/endpoints/set.ts +++ b/app/exec/endpoints/set.ts @@ -57,7 +57,7 @@ export class ShowEndpoint extends TfCommand Date: Tue, 30 Apr 2019 23:39:44 +0300 Subject: [PATCH 220/235] starting to refactor to azure-devops-node-api (build is still boken) --- README.md | 2 +- app/exec/build/agents/delete.ts | 33 +- app/exec/build/agents/list.ts | 13 +- app/exec/build/agents/update.ts | 38 +- app/exec/build/definition.ts | 41 +- app/exec/build/definitions/create.ts | 7 +- app/exec/build/definitions/delete.ts | 7 +- app/exec/build/definitions/export.ts | 5 +- app/exec/build/definitions/list.ts | 13 +- app/exec/build/definitions/queuestatus.ts | 5 +- app/exec/build/definitions/update.ts | 26 +- app/exec/build/delete.ts | 8 +- app/exec/build/details.ts | 4 +- app/exec/build/keep.ts | 4 +- app/exec/build/logs.ts | 4 +- app/exec/build/pool/create.ts | 18 +- app/exec/build/pool/delete.ts | 20 +- app/exec/build/pool/details.ts | 17 +- app/exec/build/pool/list.ts | 12 +- app/exec/build/report.ts | 4 +- app/exec/build/tasks/download.ts | 74 +- app/exec/build/tasks/show.ts | 62 +- app/exec/build/tasks/validate.ts | 2 +- app/exec/build/templates/export.ts | 27 +- app/exec/build/templates/list.ts | 9 +- app/exec/code/git/abandon.ts | 10 +- app/exec/code/git/complete.ts | 10 +- app/exec/code/git/createrepo.ts | 10 +- app/exec/code/git/deleterepo.ts | 10 +- app/exec/code/git/pullrequest.ts | 8 +- app/exec/code/git/repodetails.ts | 10 +- app/exec/code/git/repolist.ts | 10 +- app/exec/code/git/requestdetails.ts | 10 +- app/exec/code/git/requestlist.ts | 10 +- app/exec/code/git/requestoptions.ts | 10 +- app/exec/endpoints/list.ts | 12 +- app/exec/endpoints/set.ts | 10 +- app/exec/endpoints/show.ts | 12 +- app/exec/workitem/links.ts | 8 +- docs/contributions.md | 2 +- package-lock.json | 2933 --------------------- package.json | 2 +- tsd.json | 2 +- 43 files changed, 315 insertions(+), 3219 deletions(-) delete mode 100644 package-lock.json diff --git a/README.md b/README.md index 2c6667b2..0bd5155f 100644 --- a/README.md +++ b/README.md @@ -158,5 +158,5 @@ replace the content of `%appdata%\npm\tfx.cmd` with the following: ### additional node modules `run "npm outdated / update" to resolve modules dependecy or install the following modules (this may need to happen befor compilation)` ```bash -npm install archiver colors graceful-fs gulp-filter gulp-mocha gulp-tsb gulp-util is-utf8 pug jszip node-uuid prompt q readable-stream ts-promise typescript unique-stream user-home validator vso-node-api xml2js del os-homedir copy-paste shelljs lodash minimatch@3.0.2 pretty-hrtime liftoff tildify interpret v8flags minimist onecolor winreg glob json-in-place mkdirp +npm install archiver colors graceful-fs gulp-filter gulp-mocha gulp-tsb gulp-util is-utf8 pug jszip node-uuid prompt q readable-stream ts-promise typescript unique-stream user-home validator azure-devops-node-api xml2js del os-homedir copy-paste shelljs lodash minimatch@3.0.2 pretty-hrtime liftoff tildify interpret v8flags minimist onecolor winreg glob json-in-place mkdirp ``` diff --git a/app/exec/build/agents/delete.ts b/app/exec/build/agents/delete.ts index 336fa202..c7249f55 100644 --- a/app/exec/build/agents/delete.ts +++ b/app/exec/build/agents/delete.ts @@ -1,9 +1,9 @@ import { TfCommand } from "../../../lib/tfcommand"; import args = require("../../../lib/arguments"); import agentBase = require("./default"); -import agentClient = require("vso-node-api/TaskAgentApiBase"); +import agentClient = require("azure-devops-node-api/TaskAgentApiBase"); import trace = require("../../../lib/trace"); -import taskAgentContracts = require("vso-node-api/interfaces/TaskAgentInterfaces"); +import taskAgentContracts = require("azure-devops-node-api/interfaces/TaskAgentInterfaces"); export function describe(): string { return "Delete an Agent"; @@ -24,9 +24,9 @@ export class AgentDelete extends agentBase.AgentBase { trace.debug("delete-agents.exec"); if (this.connection.getCollectionUrl().includes("DefaultCollection")) { - var agentapi: agentClient.ITaskAgentApiBase = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl().substring(0, this.connection.getCollectionUrl().lastIndexOf("/"))); + var agentapi = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl().substring(0, this.connection.getCollectionUrl().lastIndexOf("/"))); } else { - var agentapi: agentClient.ITaskAgentApiBase = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl()); + var agentapi = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl()); } return Promise.all([ @@ -46,18 +46,19 @@ export class AgentDelete extends agentBase.AgentBase { - if (ao.length > 0) { - var aid = ao[0].id; - var an = ao[0].name; - trace.debug("found, agent id %s for agent name %s", aid, an); - return this._deleteAgent(agentapi, poolId as number, agentid as number, deleteAgent as string); - } - else { - trace.debug("No agents found with name " + agentname); - throw new Error("No agents found with name " + agentname); + return agentapi.then((api) => { api.getAgents(poolId as number, agentname as string).then((ao: taskAgentContracts.TaskAgent[]) => { + if (ao.length > 0) { + var aid = ao[0].id; + var an = ao[0].name; + trace.debug("found, agent id %s for agent name %s", aid, an); + return this._deleteAgent(agentapi, poolId as number, agentid as number, deleteAgent as string); + } + else { + trace.debug("No agents found with name " + agentname); + throw new Error("No agents found with name " + agentname); - } + } + }); }); } @@ -71,7 +72,7 @@ export class AgentDelete extends agentBase.AgentBase { trace.debug("deleting Agent: %s", deleteAgent); diff --git a/app/exec/build/agents/list.ts b/app/exec/build/agents/list.ts index 52221d7f..14b5e71a 100644 --- a/app/exec/build/agents/list.ts +++ b/app/exec/build/agents/list.ts @@ -1,9 +1,9 @@ import { TfCommand } from "../../../lib/tfcommand"; import args = require("../../../lib/arguments"); import agentBase = require("./default"); -import agentClient = require("vso-node-api/TaskAgentApiBase"); +import agentClient = require("azure-devops-node-api/TaskAgentApiBase"); import trace = require("../../../lib/trace"); -import taskAgentContracts = require("vso-node-api/interfaces/TaskAgentInterfaces"); +import taskAgentContracts = require("azure-devops-node-api/interfaces/TaskAgentInterfaces"); export function getCommand(args: string[]): AgentDetails { return new AgentDetails(args); @@ -16,16 +16,17 @@ export class AgentDetails extends agentBase.AgentBase { + public exec(): Promise { trace.debug("list-agents.exec"); if (this.connection.getCollectionUrl().includes("DefaultCollection")) { - var agentapi: agentClient.ITaskAgentApiBase = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl().substring(0, this.connection.getCollectionUrl().lastIndexOf("/"))); + var agentapi = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl().substring(0, this.connection.getCollectionUrl().lastIndexOf("/"))); } else { - var agentapi: agentClient.ITaskAgentApiBase = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl()); + var agentapi = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl()); } return this.commandArgs.poolId.val().then((pool) => { trace.debug("getting pool : %s", pool); - return agentapi.getAgents(pool); + return agentapi.then((api) => { return api.getAgents(pool); + }); }); } diff --git a/app/exec/build/agents/update.ts b/app/exec/build/agents/update.ts index 9cdec10d..0ce766f4 100644 --- a/app/exec/build/agents/update.ts +++ b/app/exec/build/agents/update.ts @@ -1,10 +1,10 @@ import { TfCommand } from "../../../lib/tfcommand"; import args = require("../../../lib/arguments"); import agentBase = require("./default"); -import agentClient = require("vso-node-api/TaskAgentApiBase"); -import taskAgentContracts = require("vso-node-api/interfaces/TaskAgentInterfaces"); +import agentClient = require("azure-devops-node-api/TaskAgentApiBase"); +import taskAgentContracts = require("azure-devops-node-api/interfaces/TaskAgentInterfaces"); import trace = require("../../../lib/trace"); -import taskAgentApi = require("vso-node-api/TaskAgentApi"); +import taskAgentApi = require("azure-devops-node-api/TaskAgentApi"); export function getCommand(args: string[]): AgentUpdate { @@ -21,9 +21,9 @@ export class AgentUpdate extends agentBase.AgentBase { trace.debug("update-agents.exec"); if (this.connection.getCollectionUrl().includes("DefaultCollection")) { - var agentapi: agentClient.ITaskAgentApiBase = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl().substring(0, this.connection.getCollectionUrl().lastIndexOf("/"))); + var agentapi = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl().substring(0, this.connection.getCollectionUrl().lastIndexOf("/"))); } else { - var agentapi: agentClient.ITaskAgentApiBase = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl()); + var agentapi = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl()); } return Promise.all([ this.commandArgs.agentId.val(), @@ -46,23 +46,23 @@ export class AgentUpdate extends agentBase.AgentBase { - if (ao.length > 0) { - var aid = ao[0].id; - var an = ao[0].name; - trace.debug("found, agent id %s for agent name %s", aid, an); - return this._getOrUpdateAgent(agentapi, pool as number, aid, newkey as string, value as string, include, disable as string, maxParallel as number, waitForInProgressRequests as string); - } - else { - trace.debug("No agents found with name " + agentname); - throw new Error("No agents found with name " + agentname); + return agentapi.then((api) => {api.getAgents(pool as number, agentname as string).then((ao: taskAgentContracts.TaskAgent[]) => { + if (ao.length > 0) { + var aid = ao[0].id; + var an = ao[0].name; + trace.debug("found, agent id %s for agent name %s", aid, an); + return this._getOrUpdateAgent(api, pool as number, aid, newkey as string, value as string, include, disable as string, maxParallel as number, waitForInProgressRequests as string); + } + else { + trace.debug("No agents found with name " + agentname); + throw new Error("No agents found with name " + agentname); - } + } + }); + trace.debug("disable request: %s", disable); + return this._getOrUpdateAgent(api, pool as number, agentid as number, newkey as string, value as string, include, disable as string, maxParallel as number, waitForInProgressRequests as string); }); } - - trace.debug("disable request: %s", disable); - return this._getOrUpdateAgent(agentapi, pool as number, agentid as number, newkey as string, value as string, include, disable as string, maxParallel as number, waitForInProgressRequests as string); }); }; diff --git a/app/exec/build/definition.ts b/app/exec/build/definition.ts index 8652996a..28f830cc 100644 --- a/app/exec/build/definition.ts +++ b/app/exec/build/definition.ts @@ -1,8 +1,6 @@ -import { TfCommand } from "../../lib/tfcommand"; -import args = require("../../lib/arguments"); import buildBase = require("./default"); -import buildClient = require("vso-node-api/BuildApi"); -import buildContracts = require("vso-node-api/interfaces/BuildInterfaces"); +import buildClient = require("azure-devops-node-api/BuildApi"); +import buildContracts = require("azure-devops-node-api/interfaces/BuildInterfaces"); import trace = require("../../lib/trace"); export function getCommand(args: string[]): BuildDefinition { @@ -19,22 +17,16 @@ export class BuildDefinition extends buildBase.BuildBase { trace.debug("build-definition.exec"); - var buildapi: buildClient.IBuildApi = this.webApi.getBuildApi(); + var buildapi = this.webApi.getBuildApi(); return this.commandArgs.project.val().then((project) => { return this.commandArgs.definitionId.val().then((definitionId) => { return this.commandArgs.definitionName.val().then((definitionName) => { if (definitionId){ - return buildapi.getDefinition(definitionId,project,null,null); + return buildapi.then((api) => {return api.getDefinition(definitionId,project,null,null) }); } else { - return buildapi.getDefinitions(project, definitionName).then((definitions: buildContracts.DefinitionReference[]) => { - if(definitionName && definitions.length > 0) { - var definition = definitions[0]; - return definition; - } else { - trace.debug("No definition found with name " + definitionName); - throw new Error("No definition found with name " + definitionName); - } - }); + if (definitionName) { + return this._getDefinitionByName(definitionName, project, buildapi); + } } }); }); @@ -54,5 +46,22 @@ export class BuildDefinition extends buildBase.BuildBase) :Promise { + return buildapi.then((bapi) => { + var definitionsPromise = bapi.getDefinitions(project, definitionName) + return definitionsPromise.then((definitions) => { + if (definitions.length > 0) { + return definitions[0]; + } else { + trace.debug("No definition found with name " + definitionName); + throw new Error("No definition found with name " + definitionName); + } + }); + }); + } } \ No newline at end of file diff --git a/app/exec/build/definitions/create.ts b/app/exec/build/definitions/create.ts index 62d42b34..b6f91271 100644 --- a/app/exec/build/definitions/create.ts +++ b/app/exec/build/definitions/create.ts @@ -1,5 +1,5 @@ import { TfCommand, CoreArguments } from "../../../lib/tfcommand"; -import buildContracts = require('vso-node-api/interfaces/BuildInterfaces'); +import buildContracts = require('azure-devops-node-api/interfaces/BuildInterfaces'); import args = require("../../../lib/arguments"); import trace = require('../../../lib/trace'); import fs = require('fs'); @@ -41,8 +41,9 @@ export class CreateDefinition extends TfCommand { - return definition; + return api.then((defapi) => { return defapi.createDefinition(definition, project as string).then((definition) => { + return definition; + }); }); }); } diff --git a/app/exec/build/definitions/delete.ts b/app/exec/build/definitions/delete.ts index f4072486..bb2e4df4 100644 --- a/app/exec/build/definitions/delete.ts +++ b/app/exec/build/definitions/delete.ts @@ -1,5 +1,5 @@ import { TfCommand, CoreArguments } from "../../../lib/tfcommand"; -import buildContracts = require('vso-node-api/interfaces/BuildInterfaces'); +import buildContracts = require('azure-devops-node-api/interfaces/BuildInterfaces'); import args = require("../../../lib/arguments"); import trace = require('../../../lib/trace'); import fs = require("fs"); @@ -35,8 +35,9 @@ export class DeleteDefinition extends TfCommand { const [project, definitionId] = values; trace.debug("Deleting build definition %s...", definitionId); - return api.deleteDefinition(definitionId as number, project as string).then((definition) => { - return { id: definitionId } + return api.then((defapi) => {return defapi.deleteDefinition(definitionId as number, project as string).then((definition) => { + return { id: definitionId } + }); }); }); } diff --git a/app/exec/build/definitions/export.ts b/app/exec/build/definitions/export.ts index 4e3f9a15..f76070e3 100644 --- a/app/exec/build/definitions/export.ts +++ b/app/exec/build/definitions/export.ts @@ -1,5 +1,5 @@ import { TfCommand, CoreArguments } from "../../../lib/tfcommand"; -import buildContracts = require('vso-node-api/interfaces/BuildInterfaces'); +import buildContracts = require('azure-devops-node-api/interfaces/BuildInterfaces'); import args = require("../../../lib/arguments"); import trace = require('../../../lib/trace'); import fs = require("fs"); @@ -44,7 +44,7 @@ export class ExportDefinition extends TfCommand { const [project, definitionId, definitionPath, overwrite, revision] = values; trace.debug("Retrieving build definition %s...", definitionId); - return api.getDefinition(definitionId as number, project as string, revision as number).then((definition) => { + return api.then((defapi) => {return defapi.getDefinition(definitionId as number, project as string, revision as number).then((definition) => { var defpath = ""; if (!definitionPath) { defpath = definition.name + '-' + definition.id + '-' + definition.revision + '.json'; @@ -58,6 +58,7 @@ export class ExportDefinition extends TfCommand { - var api: buildClient.IBuildApi = this.webApi.getBuildApi(this.connection.getCollectionUrl()); + var api = this.webApi.getBuildApi(this.connection.getCollectionUrl()); trace.debug("Searching for build definitions..."); return this.commandArgs.project.val().then((project) => { - return api.getDefinitions(project as string).then((definitions) => { - trace.debug("Retrieved " + definitions.length + " build definitions from server."); - return definitions; + return api.then((defapi) => {return defapi.getDefinitions(project as string).then((definitions) => { + trace.debug("Retrieved " + definitions.length + " build definitions from server."); + return definitions; + }); }); }); } diff --git a/app/exec/build/definitions/queuestatus.ts b/app/exec/build/definitions/queuestatus.ts index d668ef66..3d38ec87 100644 --- a/app/exec/build/definitions/queuestatus.ts +++ b/app/exec/build/definitions/queuestatus.ts @@ -1,5 +1,5 @@ import { TfCommand, CoreArguments } from "../../../lib/tfcommand"; -import buildContracts = require('vso-node-api/interfaces/BuildInterfaces'); +import buildContracts = require('azure-devops-node-api/interfaces/BuildInterfaces'); import args = require("../../../lib/arguments"); import trace = require('../../../lib/trace'); import fs = require("fs"); @@ -36,7 +36,7 @@ export class DefinitionQueueStatus extends TfCommand { const [project, definitionId, status] = values; - return api.getDefinition(definitionId as number, project as string).then((definition) => { + return api.then((defapi) => {return defapi.getDefinition(definitionId as number, project as string).then((definition) => { var currentStatus = buildContracts.DefinitionQueueStatus[definition.queueStatus]; if (!currentStatus){ currentStatus = buildContracts.DefinitionQueueStatus[0] @@ -60,6 +60,7 @@ export class DefinitionQueueStatus extends TfCommand { - trace.debug("Reading build definition from %s...", definitionPath.toString()); - let definition: buildContracts.BuildDefinition = JSON.parse(fs.readFileSync(definitionPath.toString(), 'utf-8')); - definition.id = currentDefinition.id; - definition.revision = currentDefinition.revision; - - trace.debug("Updating build definition %s...", definitionId); - return api.updateDefinition(definition, definitionId as number, project as string).then((definition) => { - return definition; - }); - }) + return api.then((defapi) => {return defapi.getDefinition(definitionId as number, project as string).then(currentDefinition => { + trace.debug("Reading build definition from %s...", definitionPath.toString()); + let definition: buildContracts.BuildDefinition = JSON.parse(fs.readFileSync(definitionPath.toString(), 'utf-8')); + definition.id = currentDefinition.id; + definition.revision = currentDefinition.revision; + + trace.debug("Updating build definition %s...", definitionId); + return api.then((defapi) => {return defapi.updateDefinition(definition, definitionId as number, project as string).then((definition) => { + return definition; + }); + }); + }) + }); }); } diff --git a/app/exec/build/delete.ts b/app/exec/build/delete.ts index bcd03223..32f96d34 100644 --- a/app/exec/build/delete.ts +++ b/app/exec/build/delete.ts @@ -1,8 +1,8 @@ import { TfCommand } from "../../lib/tfcommand"; import args = require("../../lib/arguments"); import buildBase = require("./default"); -import buildClient = require("vso-node-api/BuildApi"); -import buildContracts = require("vso-node-api/interfaces/BuildInterfaces"); +import buildClient = require("azure-devops-node-api/BuildApi"); +import buildContracts = require("azure-devops-node-api/interfaces/BuildInterfaces"); import trace = require("../../lib/trace"); export function describe(): string { @@ -23,7 +23,7 @@ export class BuildDelete extends buildBase.BuildBase { trace.debug("delete-build.exec"); - var buildapi: buildClient.IBuildApi = this.webApi.getBuildApi(); + var buildapi = this.webApi.getBuildApi(); return this.commandArgs.project.val().then((project) => { return this.commandArgs.buildId.val().then((buildId) => { return this._deleteBuild(buildapi, buildId, project); @@ -36,7 +36,7 @@ export class BuildDelete extends buildBase.BuildBase, buildId: number, project: string) { trace.info("Deleting build...") return buildapi.getBuild(buildId,project).then((build: buildContracts.Build) => { if (!build.keepForever) { diff --git a/app/exec/build/details.ts b/app/exec/build/details.ts index 986ea52a..45105659 100644 --- a/app/exec/build/details.ts +++ b/app/exec/build/details.ts @@ -1,8 +1,8 @@ import { TfCommand } from "../../lib/tfcommand"; import args = require("../../lib/arguments"); import buildBase = require("./default"); -import buildClient = require("vso-node-api/BuildApi"); -import buildContracts = require("vso-node-api/interfaces/BuildInterfaces"); +import buildClient = require("azure-devops-node-api/BuildApi"); +import buildContracts = require("azure-devops-node-api/interfaces/BuildInterfaces"); import trace = require("../../lib/trace"); export function getCommand(args: string[]): BuildDetails { diff --git a/app/exec/build/keep.ts b/app/exec/build/keep.ts index 9d3d1ad1..534ea27c 100644 --- a/app/exec/build/keep.ts +++ b/app/exec/build/keep.ts @@ -1,8 +1,8 @@ import { TfCommand } from "../../lib/tfcommand"; import args = require("../../lib/arguments"); import buildBase = require("./default"); -import buildClient = require("vso-node-api/BuildApi"); -import buildContracts = require("vso-node-api/interfaces/BuildInterfaces"); +import buildClient = require("azure-devops-node-api/BuildApi"); +import buildContracts = require("azure-devops-node-api/interfaces/BuildInterfaces"); import trace = require("../../lib/trace"); export function describe(): string { diff --git a/app/exec/build/logs.ts b/app/exec/build/logs.ts index 0be76190..54051f8b 100644 --- a/app/exec/build/logs.ts +++ b/app/exec/build/logs.ts @@ -1,8 +1,8 @@ import { TfCommand } from "../../lib/tfcommand"; import args = require("../../lib/arguments"); import buildBase = require("./default"); -import buildClient = require("vso-node-api/BuildApi"); -import buildContracts = require("vso-node-api/interfaces/BuildInterfaces"); +import buildClient = require("azure-devops-node-api/BuildApi"); +import buildContracts = require("azure-devops-node-api/interfaces/BuildInterfaces"); import trace = require("../../lib/trace"); import fs = require("fs"); diff --git a/app/exec/build/pool/create.ts b/app/exec/build/pool/create.ts index a8a32082..f87cca36 100644 --- a/app/exec/build/pool/create.ts +++ b/app/exec/build/pool/create.ts @@ -2,9 +2,9 @@ import { TfCommand, CoreArguments } from "../../../lib/tfcommand"; import args = require("../../../lib/arguments"); import trace = require('../../../lib/trace'); import fs = require('fs'); -import taskAgentContracts = require("vso-node-api/interfaces/TaskAgentInterfaces"); -import agentClient = require("vso-node-api/TaskAgentApiBase"); -import VSSInterfaces = require('vso-node-api/interfaces/common/VSSInterfaces'); +import taskAgentContracts = require("azure-devops-node-api/interfaces/TaskAgentInterfaces"); +import agentClient = require("azure-devops-node-api/TaskAgentApiBase"); +import VSSInterfaces = require('azure-devops-node-api/interfaces/common/VSSInterfaces'); export function getCommand(args: string[]): CreatePool { return new CreatePool(args); @@ -38,18 +38,19 @@ export class CreatePool extends TfCommand { + return agentapi.then((api) =>{return api.getAgentPools(name).then((pools) => { if (pools.length <= 0){ trace.debug("build agent pool %s does not exist", name); var NewPool: AP = new AP; NewPool.name = name; NewPool.autoProvision = true; - return agentapi.addAgentPool(NewPool).then((pool) => { - return pool; + return agentapi.then((api) => { api.addAgentPool(NewPool).then((pool) => { + return pool; + }); }); } else { var exists = false; @@ -72,6 +73,7 @@ export class CreatePool extends TfCommand { - trace.debug("found build agent pool %s...", pool.name); - return agentapi.deleteAgentPool(pool.id).then((deletedpool) => { - return pool; + return agentapi.then((api)=>{return api.getAgentPool(Id).then((pool) => { + trace.debug("found build agent pool %s...", pool.name); + return agentapi.then((api) => {return api.deleteAgentPool(pool.id).then((deletedpool) => { + return pool; + }); + }); }); }); diff --git a/app/exec/build/pool/details.ts b/app/exec/build/pool/details.ts index 9493f796..8b936472 100644 --- a/app/exec/build/pool/details.ts +++ b/app/exec/build/pool/details.ts @@ -2,9 +2,9 @@ import { TfCommand, CoreArguments } from "../../../lib/tfcommand"; import args = require("../../../lib/arguments"); import trace = require('../../../lib/trace'); import fs = require('fs'); -import taskAgentContracts = require("vso-node-api/interfaces/TaskAgentInterfaces"); -import agentClient = require("vso-node-api/TaskAgentApiBase"); -import VSSInterfaces = require('vso-node-api/interfaces/common/VSSInterfaces'); +import taskAgentContracts = require("azure-devops-node-api/interfaces/TaskAgentInterfaces"); +import agentClient = require("azure-devops-node-api/TaskAgentApiBase"); +import VSSInterfaces = require('azure-devops-node-api/interfaces/common/VSSInterfaces'); export function getCommand(args: string[]): PoolDetails { return new PoolDetails(args); @@ -36,13 +36,14 @@ export class PoolDetails extends TfCommand { const [id] = values; if (this.connection.getCollectionUrl().includes("DefaultCollection")) { - var agentapi: agentClient.ITaskAgentApiBase = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl().substring(0, this.connection.getCollectionUrl().lastIndexOf("/"))); + var agentapi = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl().substring(0, this.connection.getCollectionUrl().lastIndexOf("/"))); } else { - var agentapi: agentClient.ITaskAgentApiBase = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl()); + var agentapi = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl()); } - return agentapi.getAgentPool(id).then((pool) => { - trace.debug("found build agent pool %s", pool.id); - return pool; + return agentapi.then((api) => {return api.getAgentPool(id).then((pool) => { + trace.debug("found build agent pool %s", pool.id); + return pool; + }); }); }); } diff --git a/app/exec/build/pool/list.ts b/app/exec/build/pool/list.ts index 31256a75..11c5bc79 100644 --- a/app/exec/build/pool/list.ts +++ b/app/exec/build/pool/list.ts @@ -1,10 +1,10 @@ import { TfCommand, CoreArguments } from "../../../lib/tfcommand"; import args = require("../../../lib/arguments"); import agentBase = require("./default"); -import agentClient = require("vso-node-api/TaskAgentApiBase"); -import taskAgentContracts = require("vso-node-api/interfaces/TaskAgentInterfaces"); +import agentClient = require("azure-devops-node-api/TaskAgentApiBase"); +import taskAgentContracts = require("azure-devops-node-api/interfaces/TaskAgentInterfaces"); import trace = require("../../../lib/trace"); -import taskAgentApi = require("vso-node-api/TaskAgentApi"); +import taskAgentApi = require("azure-devops-node-api/TaskAgentApi"); export function getCommand(args: string[]): List { return new List(args); @@ -23,11 +23,11 @@ export class List extends TfCommand { trace.debug("pools.exec"); if (this.connection.getCollectionUrl().includes("DefaultCollection")) { - var agentapi: agentClient.ITaskAgentApiBase = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl().substring(0, this.connection.getCollectionUrl().lastIndexOf("/"))); + var agentapi = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl().substring(0, this.connection.getCollectionUrl().lastIndexOf("/"))); } else { - var agentapi: agentClient.ITaskAgentApiBase = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl()); + var agentapi = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl()); } - return agentapi.getAgentPools(); + return agentapi.then((api) => { return api.getAgentPools() }); } public friendlyOutput(pools: taskAgentContracts.TaskAgentPool[]): void { diff --git a/app/exec/build/report.ts b/app/exec/build/report.ts index f34238f3..919bf16c 100644 --- a/app/exec/build/report.ts +++ b/app/exec/build/report.ts @@ -1,8 +1,8 @@ import { TfCommand } from "../../lib/tfcommand"; import args = require("../../lib/arguments"); import buildBase = require("./default"); -import buildClient = require("vso-node-api/BuildApi"); -import buildContracts = require("vso-node-api/interfaces/BuildInterfaces"); +import buildClient = require("azure-devops-node-api/BuildApi"); +import buildContracts = require("azure-devops-node-api/interfaces/BuildInterfaces"); import trace = require("../../lib/trace"); import fs = require("fs"); diff --git a/app/exec/build/tasks/download.ts b/app/exec/build/tasks/download.ts index d6586c47..b13da221 100644 --- a/app/exec/build/tasks/download.ts +++ b/app/exec/build/tasks/download.ts @@ -1,5 +1,5 @@ import { TfCommand } from "../../../lib/tfcommand"; -import agentContracts = require('vso-node-api/interfaces/TaskAgentInterfaces'); +import agentContracts = require('azure-devops-node-api/interfaces/TaskAgentInterfaces'); import args = require("../../../lib/arguments"); import fs = require('fs'); import path = require('path'); @@ -29,44 +29,46 @@ export class BuildTaskDownload extends tasksBase.BuildTaskBase{ let agentApi = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl()); trace.info("retriving tasks from the server ...") - return agentApi.getTaskDefinitions(null, ['build'], null).then((tasks) => { - var taskDictionary = this._getNewestTasks(tasks); - return this.commandArgs.name.val().then((Name) => { - if (!Id) { - taskDictionary.forEach(element => { - if (element.name == Name) { - Id = element.id; - if (!Version) { - Version = element.version.major + "." + element.version.minor + "." + element.version.patch;; + return agentApi.then((api) => {return api.getTaskDefinitions(null, ['build'], null).then((tasks) => { + var taskDictionary = this._getNewestTasks(tasks); + return this.commandArgs.name.val().then((Name) => { + if (!Id) { + taskDictionary.forEach(element => { + if (element.name == Name) { + Id = element.id; + if (!Version) { + Version = element.version.major + "." + element.version.minor + "." + element.version.patch;; + } } - } - }); - trace.info("found %s with version %s ...",Name,Version); - } - else - { - taskDictionary.forEach(element => { - if (element.id == Id) { - Name = element.name; - if (!Version) { - Version = element.version.major + "." + element.version.minor + "." + element.version.patch;; + }); + trace.info("found %s with version %s ...",Name,Version); + } + else + { + taskDictionary.forEach(element => { + if (element.id == Id) { + Name = element.name; + if (!Version) { + Version = element.version.major + "." + element.version.minor + "." + element.version.patch;; + } } - } + }); + trace.info("found %s with version %s ...",Name,Version); + } + if (!Id && !Version) { + var error = ("error: No Tasks found with this name ["+Name+"]"); + throw(error); + } + return agentApi.then((api) => {return api.getTaskContentZip(Id,Version).then((task) => { + var archiveName = Name+"-"+Version+".zip"; + trace.info('Downloading ... '); + task.pipe(fs.createWriteStream(archiveName)); + return { + id: Id, + name: Name, + }; + }); }); - trace.info("found %s with version %s ...",Name,Version); - } - if (!Id && !Version) { - var error = ("error: No Tasks found with this name ["+Name+"]"); - throw(error); - } - return agentApi.getTaskContentZip(Id,Version).then((task) => { - var archiveName = Name+"-"+Version+".zip"; - trace.info('Downloading ... '); - task.pipe(fs.createWriteStream(archiveName)); - return { - id: Id, - name: Name, - }; }); }); }); diff --git a/app/exec/build/tasks/show.ts b/app/exec/build/tasks/show.ts index fb2b7816..910c0e03 100644 --- a/app/exec/build/tasks/show.ts +++ b/app/exec/build/tasks/show.ts @@ -1,5 +1,5 @@ import { TfCommand } from "../../../lib/tfcommand"; -import agentContracts = require('vso-node-api/interfaces/TaskAgentInterfaces'); +import agentContracts = require('azure-devops-node-api/interfaces/TaskAgentInterfaces'); import args = require("../../../lib/arguments"); import fs = require('fs'); import path = require('path'); @@ -29,38 +29,40 @@ export class BuildTaskDownload extends tasksBase.BuildTaskBase{ let agentApi = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl()); trace.debug("retriving tasks from the server ...") - return agentApi.getTaskDefinitions(null, ['build'], null).then((tasks) => { - var taskDictionary = this._getNewestTasks(tasks); - return this.commandArgs.name.val().then((Name) => { - if (!Id) { - taskDictionary.forEach(element => { - if (element.name == Name) { - Id = element.id; - if (!Version) { - Version = element.version.major + "." + element.version.minor + "." + element.version.patch;; + return agentApi.then((api) => {return api.getTaskDefinitions(null, ['build'], null).then((tasks) => { + var taskDictionary = this._getNewestTasks(tasks); + return this.commandArgs.name.val().then((Name) => { + if (!Id) { + taskDictionary.forEach(element => { + if (element.name == Name) { + Id = element.id; + if (!Version) { + Version = element.version.major + "." + element.version.minor + "." + element.version.patch;; + } } - } - }); - trace.info("found %s with version %s ...",Name,Version); - } - else - { - taskDictionary.forEach(element => { - if (element.id == Id) { - Name = element.name; - if (!Version) { - Version = element.version.major + "." + element.version.minor + "." + element.version.patch;; + }); + trace.info("found %s with version %s ...",Name,Version); + } + else + { + taskDictionary.forEach(element => { + if (element.id == Id) { + Name = element.name; + if (!Version) { + Version = element.version.major + "." + element.version.minor + "." + element.version.patch;; + } } - } + }); + trace.info("found %s with version %s ...",Name,Version); + } + if (!Id && !Version) { + var error = ("error: No Tasks found with this name ["+Name+"]"); + throw(error); + } + return agentApi.then((api) => { return api.getTaskDefinition(Id,Version).then((task) => { + return task; + }); }); - trace.info("found %s with version %s ...",Name,Version); - } - if (!Id && !Version) { - var error = ("error: No Tasks found with this name ["+Name+"]"); - throw(error); - } - return agentApi.getTaskDefinition(Id,Version).then((task) => { - return task; }); }); }); diff --git a/app/exec/build/tasks/validate.ts b/app/exec/build/tasks/validate.ts index 6ba319ab..20314fd0 100644 --- a/app/exec/build/tasks/validate.ts +++ b/app/exec/build/tasks/validate.ts @@ -1,5 +1,5 @@ import { TfCommand } from "../../../lib/tfcommand"; -import agentContracts = require('vso-node-api/interfaces/TaskAgentInterfaces'); +import agentContracts = require('azure-devops-node-api/interfaces/TaskAgentInterfaces'); import archiver = require('archiver'); import args = require("../../../lib/arguments"); import fs = require('fs'); diff --git a/app/exec/build/templates/export.ts b/app/exec/build/templates/export.ts index 4429c608..8e67d9d6 100644 --- a/app/exec/build/templates/export.ts +++ b/app/exec/build/templates/export.ts @@ -1,5 +1,5 @@ import { TfCommand, CoreArguments } from "../../../lib/tfcommand"; -import buildContracts = require('vso-node-api/interfaces/BuildInterfaces'); +import buildContracts = require('azure-devops-node-api/interfaces/BuildInterfaces'); import args = require("../../../lib/arguments"); import trace = require('../../../lib/trace'); import fs = require("fs"); @@ -41,18 +41,19 @@ export class ExportTemplate extends TfCommand { const [project, templateId, templatePath, overwrite, revision] = values; trace.debug("Retrieving build template %s...", templateId); - return api.getTemplate(project as string, templateId as string).then((template) => { - var tempPath = ""; - if (!templatePath) { - tempPath = template.name + '-' + template.id + '.json'; - } else { - tempPath = templatePath as string; - } - if (fs.existsSync(tempPath.toString()) && !overwrite) { - return null//Promise.reject(new Error("Build template file already exists")); - } - fs.writeFileSync(tempPath.toString(), JSON.stringify(template, null, ' ')); - return template; + return api.then((tempapi) => {return tempapi.getTemplate(project as string, templateId as string).then((template) => { + var tempPath = ""; + if (!templatePath) { + tempPath = template.name + '-' + template.id + '.json'; + } else { + tempPath = templatePath as string; + } + if (fs.existsSync(tempPath.toString()) && !overwrite) { + return null//Promise.reject(new Error("Build template file already exists")); + } + fs.writeFileSync(tempPath.toString(), JSON.stringify(template, null, ' ')); + return template; + }); }); }); } diff --git a/app/exec/build/templates/list.ts b/app/exec/build/templates/list.ts index 2420bca0..e1d48da1 100644 --- a/app/exec/build/templates/list.ts +++ b/app/exec/build/templates/list.ts @@ -1,5 +1,5 @@ import { TfCommand, CoreArguments } from "../../../lib/tfcommand"; -import buildContracts = require('vso-node-api/interfaces/BuildInterfaces'); +import buildContracts = require('azure-devops-node-api/interfaces/BuildInterfaces'); import args = require("../../../lib/arguments"); import trace = require('../../../lib/trace'); @@ -20,9 +20,10 @@ export class ListTemplates extends TfCommand { - return api.getTemplates(project).then((templates) => { - trace.debug("Retrieved " + templates.length + " build templates from server."); - return templates; + return api.then((tempapi) => {return tempapi.getTemplates(project).then((templates) => { + trace.debug("Retrieved " + templates.length + " build templates from server."); + return templates; + }); }); }); } diff --git a/app/exec/code/git/abandon.ts b/app/exec/code/git/abandon.ts index 223b50d4..e8d694e4 100644 --- a/app/exec/code/git/abandon.ts +++ b/app/exec/code/git/abandon.ts @@ -1,12 +1,12 @@ import { PullRequest } from './pullrequest'; -import { PullRequestAsyncStatus } from 'vso-node-api/interfaces/GitInterfaces'; +import { PullRequestAsyncStatus } from 'azure-devops-node-api/interfaces/GitInterfaces'; import { success, warn } from '../../../lib/trace'; import { errLog } from '../../../lib/errorhandler'; import args = require('../../../lib/arguments'); import trace = require('../../../lib/trace'); -import gi = require('vso-node-api/interfaces/GitInterfaces'); -import git_Api = require('vso-node-api/GitApi'); -import VSSInterfaces = require('vso-node-api/interfaces/common/VSSInterfaces'); +import gi = require('azure-devops-node-api/interfaces/GitInterfaces'); +import git_Api = require('azure-devops-node-api/GitApi'); +import VSSInterfaces = require('azure-devops-node-api/interfaces/common/VSSInterfaces'); import codedBase = require('./default'); export function getCommand(args: string[]): Abandon { @@ -20,7 +20,7 @@ export class Abandon extends codedBase.CodeBase { return ["project", "repositoryname", "pullrequestname", "pullrequestid"]; } public async exec(): Promise { - var gitApi: git_Api.IGitApi = this.webApi.getGitApi(); + var gitApi = this.webApi.getGitApi(); var project = await this.commandArgs.project.val(); var repositoryName = await this.commandArgs.repositoryname.val(); var pullRequestName = await this.commandArgs.pullrequestname.val(); diff --git a/app/exec/code/git/complete.ts b/app/exec/code/git/complete.ts index b472b27c..1708d88b 100644 --- a/app/exec/code/git/complete.ts +++ b/app/exec/code/git/complete.ts @@ -1,12 +1,12 @@ import { PullRequest } from './pullrequest'; -import { PullRequestAsyncStatus } from 'vso-node-api/interfaces/GitInterfaces'; +import { PullRequestAsyncStatus } from 'azure-devops-node-api/interfaces/GitInterfaces'; import { success, warn } from '../../../lib/trace'; import { errLog } from '../../../lib/errorhandler'; import args = require('../../../lib/arguments'); import trace = require('../../../lib/trace'); -import gi = require('vso-node-api/interfaces/GitInterfaces'); -import git_Api = require('vso-node-api/GitApi'); -import VSSInterfaces = require('vso-node-api/interfaces/common/VSSInterfaces'); +import gi = require('azure-devops-node-api/interfaces/GitInterfaces'); +import git_Api = require('azure-devops-node-api/GitApi'); +import VSSInterfaces = require('azure-devops-node-api/interfaces/common/VSSInterfaces'); import codedBase = require('./default'); export function getCommand(args: string[]): Complete { @@ -20,7 +20,7 @@ export class Complete extends codedBase.CodeBase return ["project", "repositoryname", "pullrequestname", "pullrequestid", "deletesourcebranch"]; } public async exec(): Promise { - var gitApi: git_Api.IGitApi = this.webApi.getGitApi(); + var gitApi = this.webApi.getGitApi(); var project = await this.commandArgs.project.val(); var delSources = await this.commandArgs.deletesourcebranch.val(); var repositoryName = await this.commandArgs.repositoryname.val(); diff --git a/app/exec/code/git/createrepo.ts b/app/exec/code/git/createrepo.ts index 06c8d721..5ff24e55 100644 --- a/app/exec/code/git/createrepo.ts +++ b/app/exec/code/git/createrepo.ts @@ -2,11 +2,11 @@ import { success, warn } from '../../../lib/trace'; import { errLog } from '../../../lib/errorhandler'; import args = require("../../../lib/arguments"); import trace = require('../../../lib/trace'); -import gi = require('vso-node-api/interfaces/GitInterfaces'); -import git_Api = require('vso-node-api/GitApi') -import VSSInterfaces = require("vso-node-api/interfaces/common/VSSInterfaces"); +import gi = require('azure-devops-node-api/interfaces/GitInterfaces'); +import git_Api = require('azure-devops-node-api/GitApi') +import VSSInterfaces = require("azure-devops-node-api/interfaces/common/VSSInterfaces"); import codedBase = require("./default"); -import TfsCoreInterfaces = require("vso-node-api/interfaces/CoreInterfaces"); +import TfsCoreInterfaces = require("azure-devops-node-api/interfaces/CoreInterfaces"); export function getCommand(args: string[]): CreateRepository { return new CreateRepository(args); @@ -32,7 +32,7 @@ export class CreateRepository extends codedBase.CodeBase { //getting variables. - var gitApi: git_Api.IGitApi = this.webApi.getGitApi(); + var gitApi = this.webApi.getGitApi(); var project = await this.commandArgs.project.val(); var repositoryName = await this.commandArgs.repositoryname.val(); var NewRepo:GR = new GR; diff --git a/app/exec/code/git/deleterepo.ts b/app/exec/code/git/deleterepo.ts index 00593c31..e6b1dbf5 100644 --- a/app/exec/code/git/deleterepo.ts +++ b/app/exec/code/git/deleterepo.ts @@ -2,11 +2,11 @@ import { success, warn } from '../../../lib/trace'; import { errLog } from '../../../lib/errorhandler'; import args = require("../../../lib/arguments"); import trace = require('../../../lib/trace'); -import gi = require('vso-node-api/interfaces/GitInterfaces'); -import git_Api = require('vso-node-api/GitApi') -import VSSInterfaces = require("vso-node-api/interfaces/common/VSSInterfaces"); +import gi = require('azure-devops-node-api/interfaces/GitInterfaces'); +import git_Api = require('azure-devops-node-api/GitApi') +import VSSInterfaces = require("azure-devops-node-api/interfaces/common/VSSInterfaces"); import codedBase = require("./default"); -import TfsCoreInterfaces = require("vso-node-api/interfaces/CoreInterfaces"); +import TfsCoreInterfaces = require("azure-devops-node-api/interfaces/CoreInterfaces"); export function getCommand(args: string[]): DeleteRepository { return new DeleteRepository(args); @@ -22,7 +22,7 @@ export class DeleteRepository extends codedBase.CodeBase { //getting variables. - var gitApi: git_Api.IGitApi = this.webApi.getGitApi(); + var gitApi = this.webApi.getGitApi(); var project = await this.commandArgs.project.val(); var repositoryid = await this.commandArgs.repositoryid.val(); return await gitApi.deleteRepository(repositoryid,project); diff --git a/app/exec/code/git/pullrequest.ts b/app/exec/code/git/pullrequest.ts index 9eac90f1..928b921c 100644 --- a/app/exec/code/git/pullrequest.ts +++ b/app/exec/code/git/pullrequest.ts @@ -2,9 +2,9 @@ import { success, warn } from '../../../lib/trace'; import { errLog } from '../../../lib/errorhandler'; import args = require("../../../lib/arguments"); import trace = require('../../../lib/trace'); -import gi = require('vso-node-api/interfaces/GitInterfaces'); -import git_Api = require('vso-node-api/GitApi') -import VSSInterfaces = require("vso-node-api/interfaces/common/VSSInterfaces"); +import gi = require('azure-devops-node-api/interfaces/GitInterfaces'); +import git_Api = require('azure-devops-node-api/GitApi') +import VSSInterfaces = require("azure-devops-node-api/interfaces/common/VSSInterfaces"); import codedBase = require("./default"); export function getCommand(args: string[]): PullRequest { @@ -58,7 +58,7 @@ export class PullRequest extends codedBase.CodeBase { //getting variables. - var gitApi: git_Api.IGitApi = this.webApi.getGitApi(); + var gitApi = this.webApi.getGitApi(); var project = await this.commandArgs.project.val(); var repositoryName = await this.commandArgs.repositoryname.val(); var source = await this.commandArgs.source.val(); diff --git a/app/exec/code/git/repodetails.ts b/app/exec/code/git/repodetails.ts index c04901e9..e7c358fc 100644 --- a/app/exec/code/git/repodetails.ts +++ b/app/exec/code/git/repodetails.ts @@ -2,11 +2,11 @@ import { success, warn } from '../../../lib/trace'; import { errLog } from '../../../lib/errorhandler'; import args = require("../../../lib/arguments"); import trace = require('../../../lib/trace'); -import gi = require('vso-node-api/interfaces/GitInterfaces'); -import git_Api = require('vso-node-api/GitApi') -import VSSInterfaces = require("vso-node-api/interfaces/common/VSSInterfaces"); +import gi = require('azure-devops-node-api/interfaces/GitInterfaces'); +import git_Api = require('azure-devops-node-api/GitApi') +import VSSInterfaces = require("azure-devops-node-api/interfaces/common/VSSInterfaces"); import codedBase = require("./default"); -import TfsCoreInterfaces = require("vso-node-api/interfaces/CoreInterfaces"); +import TfsCoreInterfaces = require("azure-devops-node-api/interfaces/CoreInterfaces"); export function getCommand(args: string[]): GetRepositoryDetails { return new GetRepositoryDetails(args); @@ -22,7 +22,7 @@ export class GetRepositoryDetails extends codedBase.CodeBase { //getting variables. - var gitApi: git_Api.IGitApi = this.webApi.getGitApi(); + var gitApi = this.webApi.getGitApi(); var id = await this.commandArgs.repositoryid.val(); return await gitApi.getRepository(id); }; diff --git a/app/exec/code/git/repolist.ts b/app/exec/code/git/repolist.ts index b2e5c081..67e1f7ca 100644 --- a/app/exec/code/git/repolist.ts +++ b/app/exec/code/git/repolist.ts @@ -2,11 +2,11 @@ import { success, warn } from '../../../lib/trace'; import { errLog } from '../../../lib/errorhandler'; import args = require("../../../lib/arguments"); import trace = require('../../../lib/trace'); -import gi = require('vso-node-api/interfaces/GitInterfaces'); -import git_Api = require('vso-node-api/GitApi') -import VSSInterfaces = require("vso-node-api/interfaces/common/VSSInterfaces"); +import gi = require('azure-devops-node-api/interfaces/GitInterfaces'); +import git_Api = require('azure-devops-node-api/GitApi') +import VSSInterfaces = require("azure-devops-node-api/interfaces/common/VSSInterfaces"); import codedBase = require("./default"); -import TfsCoreInterfaces = require("vso-node-api/interfaces/CoreInterfaces"); +import TfsCoreInterfaces = require("azure-devops-node-api/interfaces/CoreInterfaces"); export function getCommand(args: string[]): ListRepositories { return new ListRepositories(args); @@ -22,7 +22,7 @@ export class ListRepositories extends codedBase.CodeBase { //getting variables. - var gitApi: git_Api.IGitApi = this.webApi.getGitApi(); + var gitApi = this.webApi.getGitApi(); var project = await this.commandArgs.project.val(); return await gitApi.getRepositories(project); }; diff --git a/app/exec/code/git/requestdetails.ts b/app/exec/code/git/requestdetails.ts index 709ea734..a80508a1 100644 --- a/app/exec/code/git/requestdetails.ts +++ b/app/exec/code/git/requestdetails.ts @@ -1,11 +1,11 @@ -import { PullRequestAsyncStatus } from 'vso-node-api/interfaces/GitInterfaces'; +import { PullRequestAsyncStatus } from 'azure-devops-node-api/interfaces/GitInterfaces'; import { success, warn } from '../../../lib/trace'; import { errLog } from '../../../lib/errorhandler'; import args = require('../../../lib/arguments'); import trace = require('../../../lib/trace'); -import gi = require('vso-node-api/interfaces/GitInterfaces'); -import git_Api = require('vso-node-api/GitApi'); -import VSSInterfaces = require('vso-node-api/interfaces/common/VSSInterfaces'); +import gi = require('azure-devops-node-api/interfaces/GitInterfaces'); +import git_Api = require('azure-devops-node-api/GitApi'); +import VSSInterfaces = require('azure-devops-node-api/interfaces/common/VSSInterfaces'); import codedBase = require('./default'); var repositoryName; @@ -23,7 +23,7 @@ export class RequestDetails extends codedBase.CodeBase { //getting variables. - var gitApi: git_Api.IGitApi = this.webApi.getGitApi(); + var gitApi = this.webApi.getGitApi(); var project = await this.commandArgs.project.val(); repositoryName = await this.commandArgs.repositoryname.val(); var gitRepositories = await gitApi.getRepositories(project); diff --git a/app/exec/code/git/requestlist.ts b/app/exec/code/git/requestlist.ts index d5511ceb..a5ecd00b 100644 --- a/app/exec/code/git/requestlist.ts +++ b/app/exec/code/git/requestlist.ts @@ -1,11 +1,11 @@ -import { ChangeListSearchCriteria } from 'vso-node-api/interfaces/TfvcInterfaces'; +import { ChangeListSearchCriteria } from 'azure-devops-node-api/interfaces/TfvcInterfaces'; import { success, warn } from '../../../lib/trace'; import { errLog } from '../../../lib/errorhandler'; import args = require('../../../lib/arguments'); import trace = require('../../../lib/trace'); -import gi = require('vso-node-api/interfaces/GitInterfaces'); -import git_Api = require('vso-node-api/GitApi'); -import VSSInterfaces = require('vso-node-api/interfaces/common/VSSInterfaces'); +import gi = require('azure-devops-node-api/interfaces/GitInterfaces'); +import git_Api = require('azure-devops-node-api/GitApi'); +import VSSInterfaces = require('azure-devops-node-api/interfaces/common/VSSInterfaces'); import codedBase = require('./default'); var repositoryName; @@ -23,7 +23,7 @@ export class RequestList extends codedBase.CodeBase { //getting variables. - var gitApi: git_Api.IGitApi = this.webApi.getGitApi(); + var gitApi = this.webApi.getGitApi(); var project = await this.commandArgs.project.val(); repositoryName = await this.commandArgs.repositoryname.val(); var requestStatus = await this.commandArgs.requeststatus.val(); diff --git a/app/exec/code/git/requestoptions.ts b/app/exec/code/git/requestoptions.ts index 535eedf1..694a3401 100644 --- a/app/exec/code/git/requestoptions.ts +++ b/app/exec/code/git/requestoptions.ts @@ -1,11 +1,11 @@ -import { PullRequestAsyncStatus } from 'vso-node-api/interfaces/GitInterfaces'; +import { PullRequestAsyncStatus } from 'azure-devops-node-api/interfaces/GitInterfaces'; import { success, warn } from '../../../lib/trace'; import { errLog } from '../../../lib/errorhandler'; import args = require('../../../lib/arguments'); import trace = require('../../../lib/trace'); -import gi = require('vso-node-api/interfaces/GitInterfaces'); -import git_Api = require('vso-node-api/GitApi'); -import VSSInterfaces = require('vso-node-api/interfaces/common/VSSInterfaces'); +import gi = require('azure-devops-node-api/interfaces/GitInterfaces'); +import git_Api = require('azure-devops-node-api/GitApi'); +import VSSInterfaces = require('azure-devops-node-api/interfaces/common/VSSInterfaces'); import codedBase = require('./default'); var repositoryName; @@ -23,7 +23,7 @@ export class RequestOptions extends codedBase.CodeBase { //getting variables. - var gitApi: git_Api.IGitApi = this.webApi.getGitApi(); + var gitApi = this.webApi.getGitApi(); var project = await this.commandArgs.project.val(); repositoryName = await this.commandArgs.repositoryname.val(); var gitRepositories = await gitApi.getRepositories(project); diff --git a/app/exec/endpoints/list.ts b/app/exec/endpoints/list.ts index 676a8fa9..29c77c13 100644 --- a/app/exec/endpoints/list.ts +++ b/app/exec/endpoints/list.ts @@ -1,10 +1,10 @@ import { TfCommand, CoreArguments } from "../../lib/tfcommand"; -import buildContracts = require('vso-node-api/interfaces/BuildInterfaces'); +import buildContracts = require('azure-devops-node-api/interfaces/BuildInterfaces'); import args = require("../../lib/arguments"); import trace = require('../../lib/trace'); -import taskAgentContracts = require("vso-node-api/interfaces/TaskAgentInterfaces"); -import agentClient = require("vso-node-api/TaskAgentApiBase"); -import corem = require('vso-node-api/CoreApi'); +import taskAgentContracts = require("azure-devops-node-api/interfaces/TaskAgentInterfaces"); +import agentClient = require("azure-devops-node-api/TaskAgentApiBase"); +import corem = require('azure-devops-node-api/CoreApi'); export function getCommand(args: string[]): ListEndpoints { return new ListEndpoints(args); @@ -19,8 +19,8 @@ export class ListEndpoints extends TfCommand { - var agentapi: agentClient.ITaskAgentApiBase = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl()); - var coreapi:corem.ICoreApi = this.webApi.getCoreApi(this.connection.getCollectionUrl()) + var agentapi = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl()); + var coreapi = this.webApi.getCoreApi(this.connection.getCollectionUrl()) trace.debug("Searching for Service Endpoints ..."); return this.commandArgs.project.val().then((project) => { return coreapi.getProject(project).then((projectObj) =>{ diff --git a/app/exec/endpoints/set.ts b/app/exec/endpoints/set.ts index d834807b..f5974201 100644 --- a/app/exec/endpoints/set.ts +++ b/app/exec/endpoints/set.ts @@ -1,9 +1,9 @@ import { TfCommand, CoreArguments } from "../../lib/tfcommand"; import args = require("../../lib/arguments"); import trace = require('../../lib/trace'); -import taskAgentContracts = require("vso-node-api/interfaces/TaskAgentInterfaces"); -import agentClient = require("vso-node-api/TaskAgentApiBase"); -import corem = require('vso-node-api/CoreApi'); +import taskAgentContracts = require("azure-devops-node-api/interfaces/TaskAgentInterfaces"); +import agentClient = require("azure-devops-node-api/TaskAgentApiBase"); +import corem = require('azure-devops-node-api/CoreApi'); export function getCommand(args: string[]): ShowEndpoint { return new ShowEndpoint(args); @@ -25,8 +25,8 @@ export class ShowEndpoint extends TfCommand { - var agentapi: agentClient.ITaskAgentApiBase = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl()); - var coreapi:corem.ICoreApi = this.webApi.getCoreApi(this.connection.getCollectionUrl()) + var agentapi = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl()); + var coreapi = this.webApi.getCoreApi(this.connection.getCollectionUrl()) trace.debug("Searching for Service Endpoints ..."); return this.commandArgs.project.val().then((project) => { return this.commandArgs.id.val().then((id) =>{ diff --git a/app/exec/endpoints/show.ts b/app/exec/endpoints/show.ts index 4ea974b5..4f8b1477 100644 --- a/app/exec/endpoints/show.ts +++ b/app/exec/endpoints/show.ts @@ -1,10 +1,10 @@ import { TfCommand, CoreArguments } from "../../lib/tfcommand"; -import buildContracts = require('vso-node-api/interfaces/BuildInterfaces'); +import buildContracts = require('azure-devops-node-api/interfaces/BuildInterfaces'); import args = require("../../lib/arguments"); import trace = require('../../lib/trace'); -import taskAgentContracts = require("vso-node-api/interfaces/TaskAgentInterfaces"); -import agentClient = require("vso-node-api/TaskAgentApiBase"); -import corem = require('vso-node-api/CoreApi'); +import taskAgentContracts = require("azure-devops-node-api/interfaces/TaskAgentInterfaces"); +import agentClient = require("azure-devops-node-api/TaskAgentApiBase"); +import corem = require('azure-devops-node-api/CoreApi'); export function getCommand(args: string[]): ShowEndpoint { return new ShowEndpoint(args); @@ -25,8 +25,8 @@ export class ShowEndpoint extends TfCommand { - var agentapi: agentClient.ITaskAgentApiBase = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl()); - var coreapi:corem.ICoreApi = this.webApi.getCoreApi(this.connection.getCollectionUrl()) + var agentapi = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl()); + var coreapi = this.webApi.getCoreApi(this.connection.getCollectionUrl()) trace.debug("Searching for Service Endpoints ..."); return this.commandArgs.project.val().then((project) => { return this.commandArgs.id.val().then((id) =>{ diff --git a/app/exec/workitem/links.ts b/app/exec/workitem/links.ts index 8929d8f4..42203664 100644 --- a/app/exec/workitem/links.ts +++ b/app/exec/workitem/links.ts @@ -3,9 +3,9 @@ import { TfCommand } from "../../lib/tfcommand"; import args = require("../../lib/arguments"); import trace = require("../../lib/trace"); import witBase = require("./default"); -import witClient = require("vso-node-api/WorkItemTrackingApi"); -import witContracts = require("vso-node-api/interfaces/WorkItemTrackingInterfaces"); -import { WorkItemExpand } from "vso-node-api/interfaces/WorkItemTrackingInterfaces"; +import witClient = require("azure-devops-node-api/WorkItemTrackingApi"); +import witContracts = require("azure-devops-node-api/interfaces/WorkItemTrackingInterfaces"); +import { WorkItemExpand } from "azure-devops-node-api/interfaces/WorkItemTrackingInterfaces"; export function getCommand(args: string[]): WorkItemLinks { return new WorkItemLinks(args); @@ -21,7 +21,7 @@ export class WorkItemLinks extends witBase.WorkItemBase public exec(): Promise { var ids = []; - var witapi: witClient.IWorkItemTrackingApi = this.webApi.getWorkItemTrackingApi(); + var witapi = this.webApi.getWorkItemTrackingApi(); return this.commandArgs.workItemId.val().then((workItemId) => { ids[0] = workItemId; return witapi.getWorkItems(ids,null,null,WorkItemExpand.All) diff --git a/docs/contributions.md b/docs/contributions.md index 65a59ef5..c673543d 100644 --- a/docs/contributions.md +++ b/docs/contributions.md @@ -39,7 +39,7 @@ tfx-cli@0.1.8 /usr/local/lib/node_modules/tfx-cli ├── q@1.4.1 ├── validator@3.43.0 ├── shelljs@0.5.1 -├── vso-node-api@0.3.0 +├── azure-devops-node-api@0.3.0 ├── read@1.0.6 (mute-stream@0.0.5) └── archiver@0.14.4 (buffer-crc32@0.2.5, lazystream@0.1.0, async@0.9.2, readable-stream@1.0.33, tar-stream@1.1.5, lodash@3.2.0, zip-stream@0.5.2, glob@4.3.5) ``` diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index d45c78ba..00000000 --- a/package-lock.json +++ /dev/null @@ -1,2933 +0,0 @@ -{ - "name": "tfx-cli", - "version": "0.7.3", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "@types/clipboardy": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@types/clipboardy/-/clipboardy-1.1.0.tgz", - "integrity": "sha512-KOxf4ah9diZWmREM5jCupx2+pZaBPwKk5d5jeNK2+TY6IgEO35uhG55NnDT4cdXeRX8irDSHQPtdRrr0JOTQIw==", - "dev": true - }, - "@types/events": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@types/events/-/events-1.2.0.tgz", - "integrity": "sha512-KEIlhXnIutzKwRbQkGWb/I4HFqBuUykAdHgDED6xqwXJfONCjF5VoE0cXEiurh3XauygxzeDzgtXUqvLkxFzzA==", - "dev": true - }, - "@types/glob": { - "version": "5.0.35", - "resolved": "https://registry.npmjs.org/@types/glob/-/glob-5.0.35.tgz", - "integrity": "sha512-wc+VveszMLyMWFvXLkloixT4n0harUIVZjnpzztaZ0nKLuul7Z32iMt2fUFGAaZ4y1XWjFRMtCI5ewvyh4aIeg==", - "dev": true, - "requires": { - "@types/events": "*", - "@types/minimatch": "*", - "@types/node": "*" - } - }, - "@types/jszip": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@types/jszip/-/jszip-3.1.4.tgz", - "integrity": "sha512-UaVbz4buRlBEolZYrxqkrGDOypugYlbqGNrUFB4qBaexrLypTH0jyvaF5jolNy5D+5C4kKV1WJ3Yx9cn/JH8oA==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/lodash": { - "version": "4.14.116", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.116.tgz", - "integrity": "sha512-lRnAtKnxMXcYYXqOiotTmJd74uawNWuPnsnPrrO7HiFuE3npE2iQhfABatbYDyxTNqZNuXzcKGhw37R7RjBFLg==", - "dev": true - }, - "@types/minimatch": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", - "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==", - "dev": true - }, - "@types/mkdirp": { - "version": "0.3.29", - "resolved": "https://registry.npmjs.org/@types/mkdirp/-/mkdirp-0.3.29.tgz", - "integrity": "sha1-fyrX7FX5FEgvybHsS7GuYCjUYGY=", - "dev": true - }, - "@types/node": { - "version": "8.5.10", - "resolved": "https://registry.npmjs.org/@types/node/-/node-8.5.10.tgz", - "integrity": "sha512-Duk5LjhRghZEzSYnjpJDxuWSUrswq1TeJGxqU/vbWx9v7PiwdwgxYBMGtkAx/E2pnWrDgrxOVdbr948VnKuIuQ==", - "dev": true - }, - "@types/shelljs": { - "version": "0.3.33", - "resolved": "https://registry.npmjs.org/@types/shelljs/-/shelljs-0.3.33.tgz", - "integrity": "sha1-32E73biCJe0JzlyDX2INyq8VXms=", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/uuid": { - "version": "2.0.30", - "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-2.0.30.tgz", - "integrity": "sha512-nmSJ0AL2mZAi68dYb7nKSIJ9YiM68eToP3Ugz66Ou7qkSatIptDM6CvOUmj4epMKWvO9gr9fFBxEEJkromp1Qg==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/validator": { - "version": "4.5.29", - "resolved": "https://registry.npmjs.org/@types/validator/-/validator-4.5.29.tgz", - "integrity": "sha1-R3/qhLcwCcHxPOYq7AU1leIiW+k=", - "dev": true - }, - "@types/winreg": { - "version": "1.2.30", - "resolved": "https://registry.npmjs.org/@types/winreg/-/winreg-1.2.30.tgz", - "integrity": "sha1-kdZxDlNtNFucmwF8V0z2qNpkxRg=", - "dev": true - }, - "@types/xml2js": { - "version": "0.0.27", - "resolved": "https://registry.npmjs.org/@types/xml2js/-/xml2js-0.0.27.tgz", - "integrity": "sha1-5a01i5UNhH2wPl6jihr4c2vR78c=", - "dev": true - }, - "acorn": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz", - "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=", - "dev": true - }, - "align-text": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", - "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", - "dev": true, - "requires": { - "kind-of": "^3.0.2", - "longest": "^1.0.1", - "repeat-string": "^1.5.2" - } - }, - "amdefine": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", - "dev": true - }, - "anymatch": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz", - "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", - "dev": true, - "requires": { - "micromatch": "^2.1.5", - "normalize-path": "^2.0.0" - } - }, - "app-root-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/app-root-path/-/app-root-path-1.0.0.tgz", - "integrity": "sha1-LHKZF0vGHLhv46SnmOAeSTt9U30=" - }, - "arch": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/arch/-/arch-2.1.1.tgz", - "integrity": "sha512-BLM56aPo9vLLFVa8+/+pJLnrZ7QGGTVHWsCwieAWT9o9K8UeGaQbzZbGoabWLOo2ksBCztoXdqBZBplqLDDCSg==" - }, - "archiver": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/archiver/-/archiver-2.0.3.tgz", - "integrity": "sha1-tDYLtYSvFDeZGUJxbyHXxSPR270=", - "requires": { - "archiver-utils": "^1.3.0", - "async": "^2.0.0", - "buffer-crc32": "^0.2.1", - "glob": "^7.0.0", - "lodash": "^4.8.0", - "readable-stream": "^2.0.0", - "tar-stream": "^1.5.0", - "walkdir": "^0.0.11", - "zip-stream": "^1.2.0" - }, - "dependencies": { - "async": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", - "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", - "requires": { - "lodash": "^4.17.10" - } - } - } - }, - "archiver-utils": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/archiver-utils/-/archiver-utils-1.3.0.tgz", - "integrity": "sha1-5QtMCccL89aA4y/xt5lOn52JUXQ=", - "requires": { - "glob": "^7.0.0", - "graceful-fs": "^4.1.0", - "lazystream": "^1.0.0", - "lodash": "^4.8.0", - "normalize-path": "^2.0.0", - "readable-stream": "^2.0.0" - } - }, - "arr-diff": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", - "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", - "dev": true, - "requires": { - "arr-flatten": "^1.0.1" - } - }, - "arr-flatten": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", - "dev": true - }, - "array-find-index": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", - "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=" - }, - "array-unique": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", - "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", - "dev": true - }, - "arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=" - }, - "assert": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz", - "integrity": "sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=", - "dev": true, - "requires": { - "util": "0.10.3" - }, - "dependencies": { - "inherits": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", - "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", - "dev": true - }, - "util": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", - "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", - "dev": true, - "requires": { - "inherits": "2.0.1" - } - } - } - }, - "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" - }, - "async-each": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", - "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=", - "dev": true - }, - "azure-devops-node-api": { -<<<<<<< HEAD - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/azure-devops-node-api/-/azure-devops-node-api-7.0.0.tgz", - "integrity": "sha512-WXTqFDE2QhfKli1EkcaMbGYuDpOVcNoccnQBF/bZCkPZsogLJOnsZHO/BJnd2VrT+eSJtPoVcHWjKfE/Zcihew==", - "requires": { - "os": "0.1.1", - "tunnel": "0.0.4", - "typed-rest-client": "1.0.9", - "underscore": "1.8.3" - }, - "dependencies": { - "underscore": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", - "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" - } -======= - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/azure-devops-node-api/-/azure-devops-node-api-7.2.0.tgz", - "integrity": "sha512-pMfGJ6gAQ7LRKTHgiRF+8iaUUeGAI0c8puLaqHLc7B8AR7W6GJLozK9RFeUHFjEGybC9/EB3r67WPd7e46zQ8w==", - "requires": { - "os": "0.1.1", - "tunnel": "0.0.4", - "typed-rest-client": "1.2.0", - "underscore": "1.8.3" ->>>>>>> 94a89d1425d14d461f263b5f18329ba64a1e8e70 - } - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" - }, - "base64-js": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", - "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==" - }, - "big.js": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz", - "integrity": "sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==", - "dev": true - }, - "binary-extensions": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.11.0.tgz", - "integrity": "sha1-RqoXUftqL5PuXmibsQh9SxTGwgU=", - "dev": true - }, - "bl": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.2.tgz", - "integrity": "sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==", - "requires": { - "readable-stream": "^2.3.5", - "safe-buffer": "^5.1.1" - } - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", - "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", - "dev": true, - "requires": { - "expand-range": "^1.8.1", - "preserve": "^0.2.0", - "repeat-element": "^1.1.2" - } - }, - "browserify-aes": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-0.4.0.tgz", - "integrity": "sha1-BnFJtmjfMcS1hTPgLQHoBthgjiw=", - "dev": true, - "requires": { - "inherits": "^2.0.1" - } - }, - "browserify-zlib": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.1.4.tgz", - "integrity": "sha1-uzX4pRn2AOD6a4SFJByXnQFB+y0=", - "dev": true, - "requires": { - "pako": "~0.2.0" - }, - "dependencies": { - "pako": { - "version": "0.2.9", - "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz", - "integrity": "sha1-8/dSL073gjSNqBYbrZ7P1Rv4OnU=", - "dev": true - } - } - }, - "buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.2.1.tgz", - "integrity": "sha512-c+Ko0loDaFfuPWiL02ls9Xd3GO3cPVmUobQ6t3rXNUk304u6hGq+8N/kFi+QEIKhzK3uwolVhLzszmfLmMLnqg==", - "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4" - } - }, - "buffer-alloc": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", - "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", - "requires": { - "buffer-alloc-unsafe": "^1.1.0", - "buffer-fill": "^1.0.0" - } - }, - "buffer-alloc-unsafe": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", - "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==" - }, - "buffer-crc32": { - "version": "0.2.13", - "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", - "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=" - }, - "buffer-fill": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", - "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=" - }, - "builtin-modules": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=" - }, - "builtin-status-codes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", - "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", - "dev": true - }, - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=" - }, - "camelcase-keys": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-4.2.0.tgz", - "integrity": "sha1-oqpfsa9oh1glnDLBQUJteJI7m3c=", - "requires": { - "camelcase": "^4.1.0", - "map-obj": "^2.0.0", - "quick-lru": "^1.0.0" - } - }, - "center-align": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", - "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", - "dev": true, - "requires": { - "align-text": "^0.1.3", - "lazy-cache": "^1.0.3" - } - }, - "chokidar": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", - "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", - "dev": true, - "requires": { - "anymatch": "^1.3.0", - "async-each": "^1.0.0", - "fsevents": "^1.0.0", - "glob-parent": "^2.0.0", - "inherits": "^2.0.1", - "is-binary-path": "^1.0.0", - "is-glob": "^2.0.0", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.0.0" - } - }, - "clipboardy": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/clipboardy/-/clipboardy-1.2.3.tgz", - "integrity": "sha512-2WNImOvCRe6r63Gk9pShfkwXsVtKCroMAevIbiae021mS850UkWPbevxsBz3tnvjZIEGvlwaqCPsw+4ulzNgJA==", - "requires": { - "arch": "^2.1.0", - "execa": "^0.8.0" - } - }, - "cliui": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", - "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", - "dev": true, - "requires": { - "center-align": "^0.1.1", - "right-align": "^0.1.1", - "wordwrap": "0.0.2" - }, - "dependencies": { - "wordwrap": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", - "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", - "dev": true - } - } - }, - "clone": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", - "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", - "dev": true - }, - "colors": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.3.2.tgz", - "integrity": "sha512-rhP0JSBGYvpcNQj4s5AdShMeE5ahMop96cTeDl/v9qQQm2fYClE2QXZRi8wLzc+GmXSxdIqqbOIAhyObEXDbfQ==" - }, - "compress-commons": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/compress-commons/-/compress-commons-1.2.2.tgz", - "integrity": "sha1-UkqfEJA/OoEzibAiXSfEi7dRiQ8=", - "requires": { - "buffer-crc32": "^0.2.1", - "crc32-stream": "^2.0.0", - "normalize-path": "^2.0.0", - "readable-stream": "^2.0.0" - } - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "console-browserify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", - "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", - "dev": true, - "requires": { - "date-now": "^0.1.4" - } - }, - "constants-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", - "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", - "dev": true - }, - "core-js": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.3.0.tgz", - "integrity": "sha1-+rg/uwstjchfpjbEudNMdUIMbWU=" - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" - }, - "crc": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/crc/-/crc-3.8.0.tgz", - "integrity": "sha512-iX3mfgcTMIq3ZKLIsVFAbv7+Mc10kxabAGQb8HvjA1o3T1PIYprbakQ65d3I+2HGHt6nSKkM9PYjgoJO2KcFBQ==", - "requires": { - "buffer": "^5.1.0" - } - }, - "crc32-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/crc32-stream/-/crc32-stream-2.0.0.tgz", - "integrity": "sha1-483TtN8xaN10494/u8t7KX/pCPQ=", - "requires": { - "crc": "^3.4.4", - "readable-stream": "^2.0.0" - } - }, - "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", - "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "crypto-browserify": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.3.0.tgz", - "integrity": "sha1-ufx1u0oO1h3PHNXa6W6zDJw+UGw=", - "dev": true, - "requires": { - "browserify-aes": "0.4.0", - "pbkdf2-compat": "2.0.1", - "ripemd160": "0.2.0", - "sha.js": "2.2.6" - } - }, - "currently-unhandled": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", - "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", - "requires": { - "array-find-index": "^1.0.1" - } - }, - "cycle": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/cycle/-/cycle-1.0.3.tgz", - "integrity": "sha1-IegLK+hYD5i0aPN5QwZisEbDStI=" - }, - "date-now": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", - "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", - "dev": true - }, - "dateformat": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.11.tgz", - "integrity": "sha1-8ny+56ASu/uC6gUVYtOXf2CT27E=", - "requires": { - "get-stdin": "*", - "meow": "*" - } - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" - }, - "decamelize-keys": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.0.tgz", - "integrity": "sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk=", - "requires": { - "decamelize": "^1.1.0", - "map-obj": "^1.0.0" - }, - "dependencies": { - "map-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=" - } - } - }, - "deep-equal": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", - "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=" - }, - "define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "requires": { - "object-keys": "^1.0.12" - } - }, - "domain-browser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", - "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", - "dev": true - }, - "emojis-list": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", - "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=", - "dev": true - }, - "end-of-stream": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", - "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", - "requires": { - "once": "^1.4.0" - } - }, - "enhanced-resolve": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-0.9.1.tgz", - "integrity": "sha1-TW5omzcl+GCQknzMhs2fFjW4ni4=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "memory-fs": "^0.2.0", - "tapable": "^0.1.8" - }, - "dependencies": { - "memory-fs": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.2.0.tgz", - "integrity": "sha1-8rslNovBIeORwlIN6Slpyu4KApA=", - "dev": true - } - } - }, - "errno": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", - "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", - "dev": true, - "requires": { - "prr": "~1.0.1" - } - }, - "error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "requires": { - "is-arrayish": "^0.2.1" - } - }, - "es-abstract": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.12.0.tgz", - "integrity": "sha512-C8Fx/0jFmV5IPoMOFPA9P9G5NtqW+4cOPit3MIuvR2t7Ag2K15EJTpxnHAYTzL+aYQJIESYeXZmDBfOBE1HcpA==", - "requires": { - "es-to-primitive": "^1.1.1", - "function-bind": "^1.1.1", - "has": "^1.0.1", - "is-callable": "^1.1.3", - "is-regex": "^1.0.4" - } - }, - "es-to-primitive": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.1.1.tgz", - "integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=", - "requires": { - "is-callable": "^1.1.1", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.1" - } - }, - "es6-promise": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.0.2.tgz", - "integrity": "sha1-AQ1YWEI6XxGJeWZfRkhqlcbuK7Y=" - }, - "events": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", - "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=", - "dev": true - }, - "execa": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.8.0.tgz", - "integrity": "sha1-2NdrvBtVIX7RkP1t1J08d07PyNo=", - "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, - "expand-brackets": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", - "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", - "dev": true, - "requires": { - "is-posix-bracket": "^0.1.0" - } - }, - "expand-range": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", - "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", - "dev": true, - "requires": { - "fill-range": "^2.1.0" - } - }, - "extglob": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", - "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", - "dev": true, - "requires": { - "is-extglob": "^1.0.0" - } - }, - "eyes": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz", - "integrity": "sha1-Ys8SAjTGg3hdkCNIqADvPgzCC8A=" - }, - "filename-regex": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", - "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=", - "dev": true - }, - "fill-range": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz", - "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==", - "dev": true, - "requires": { - "is-number": "^2.1.0", - "isobject": "^2.0.0", - "randomatic": "^3.0.0", - "repeat-element": "^1.1.2", - "repeat-string": "^1.5.2" - } - }, - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "requires": { - "locate-path": "^2.0.0" - } - }, - "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", - "dev": true - }, - "for-own": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", - "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", - "dev": true, - "requires": { - "for-in": "^1.0.1" - } - }, - "fs-constants": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", - "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, - "fsevents": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.4.tgz", - "integrity": "sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg==", - "dev": true, - "optional": true, - "requires": { - "nan": "^2.9.2", - "node-pre-gyp": "^0.10.0" - }, - "dependencies": { - "abbrev": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true, - "dev": true - }, - "aproba": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - }, - "are-we-there-yet": { - "version": "1.1.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, - "balanced-match": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "brace-expansion": { - "version": "1.1.11", - "bundled": true, - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "chownr": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true, - "dev": true - }, - "console-control-strings": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "core-util-is": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "debug": { - "version": "2.6.9", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ms": "2.0.0" - } - }, - "deep-extend": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "optional": true - }, - "delegates": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "detect-libc": { - "version": "1.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "fs-minipass": { - "version": "1.2.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "gauge": { - "version": "2.7.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" - } - }, - "glob": { - "version": "7.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "has-unicode": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "iconv-lite": { - "version": "0.4.21", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safer-buffer": "^2.1.0" - } - }, - "ignore-walk": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minimatch": "^3.0.4" - } - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "bundled": true, - "dev": true - }, - "ini": { - "version": "1.3.5", - "bundled": true, - "dev": true, - "optional": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "isarray": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "bundled": true, - "dev": true - }, - "minipass": { - "version": "2.2.4", - "bundled": true, - "dev": true, - "requires": { - "safe-buffer": "^5.1.1", - "yallist": "^3.0.0" - } - }, - "minizlib": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "needle": { - "version": "2.2.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "debug": "^2.1.2", - "iconv-lite": "^0.4.4", - "sax": "^1.2.4" - } - }, - "node-pre-gyp": { - "version": "0.10.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "detect-libc": "^1.0.2", - "mkdirp": "^0.5.1", - "needle": "^2.2.0", - "nopt": "^4.0.1", - "npm-packlist": "^1.1.6", - "npmlog": "^4.0.2", - "rc": "^1.1.7", - "rimraf": "^2.6.1", - "semver": "^5.3.0", - "tar": "^4" - } - }, - "nopt": { - "version": "4.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "abbrev": "1", - "osenv": "^0.1.4" - } - }, - "npm-bundled": { - "version": "1.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "npm-packlist": { - "version": "1.1.10", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" - } - }, - "npmlog": { - "version": "4.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "once": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "os-tmpdir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "osenv": { - "version": "0.1.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "process-nextick-args": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "rc": { - "version": "1.2.7", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "deep-extend": "^0.5.1", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "readable-stream": { - "version": "2.3.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "rimraf": { - "version": "2.6.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "glob": "^7.0.5" - } - }, - "safe-buffer": { - "version": "5.1.1", - "bundled": true, - "dev": true - }, - "safer-buffer": { - "version": "2.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "sax": { - "version": "1.2.4", - "bundled": true, - "dev": true, - "optional": true - }, - "semver": { - "version": "5.5.0", - "bundled": true, - "dev": true, - "optional": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "tar": { - "version": "4.4.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "chownr": "^1.0.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.2.4", - "minizlib": "^1.1.0", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.1", - "yallist": "^3.0.2" - } - }, - "util-deprecate": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "wide-align": { - "version": "1.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "string-width": "^1.0.2" - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "yallist": { - "version": "3.0.2", - "bundled": true, - "dev": true - } - } - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" - }, - "get-stdin": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz", - "integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==" - }, - "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" - }, - "glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-base": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", - "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", - "dev": true, - "requires": { - "glob-parent": "^2.0.0", - "is-glob": "^2.0.0" - } - }, - "glob-parent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", - "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", - "dev": true, - "requires": { - "is-glob": "^2.0.0" - } - }, - "graceful-fs": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", - "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", - "dev": true - }, - "hosted-git-info": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", - "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==" - }, - "https-browserify": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-0.0.1.tgz", - "integrity": "sha1-P5E2XKvmC3ftDruiS0VOPgnZWoI=", - "dev": true - }, - "i": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/i/-/i-0.3.6.tgz", - "integrity": "sha1-2WyScyB28HJxG2sQ/X1PZa2O4j0=" - }, - "ieee754": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.12.tgz", - "integrity": "sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA==" - }, - "immediate": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", - "integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=" - }, - "indent-string": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz", - "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=" - }, - "indexof": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", - "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=", - "dev": true - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - }, - "interpret": { - "version": "0.6.6", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-0.6.6.tgz", - "integrity": "sha1-/s16GOfOXKar+5U+H4YhOknxYls=", - "dev": true - }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" - }, - "is-binary-path": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", - "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", - "dev": true, - "requires": { - "binary-extensions": "^1.0.0" - } - }, - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true - }, - "is-builtin-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", - "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", - "requires": { - "builtin-modules": "^1.0.0" - } - }, - "is-callable": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", - "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==" - }, - "is-date-object": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", - "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=" - }, - "is-dotfile": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", - "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=", - "dev": true - }, - "is-equal-shallow": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", - "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", - "dev": true, - "requires": { - "is-primitive": "^2.0.0" - } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true - }, - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "dev": true - }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "dev": true, - "requires": { - "is-extglob": "^1.0.0" - } - }, - "is-number": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", - "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-plain-obj": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", - "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=" - }, - "is-posix-bracket": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", - "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=", - "dev": true - }, - "is-primitive": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", - "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", - "dev": true - }, - "is-regex": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", - "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", - "requires": { - "has": "^1.0.1" - } - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" - }, - "is-symbol": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.1.tgz", - "integrity": "sha1-PMWfAAJRlLarLjjbrmaJJWtmBXI=" - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" - }, - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dev": true, - "requires": { - "isarray": "1.0.0" - } - }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" - }, - "json-in-place": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-in-place/-/json-in-place-1.0.1.tgz", - "integrity": "sha1-ih7NJaac4ZAFUs1xUr2TdU3k4fA=", - "requires": { - "json-lexer": "1.1.1" - } - }, - "json-lexer": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/json-lexer/-/json-lexer-1.1.1.tgz", - "integrity": "sha1-vT7V1+Vgudma0iNPKMpwb7N3t9Q=" - }, - "json-parse-better-errors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==" - }, - "json5": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", - "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", - "dev": true - }, - "jszip": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.1.5.tgz", - "integrity": "sha512-5W8NUaFRFRqTOL7ZDDrx5qWHJyBXy6velVudIzQUSoqAAYqzSh2Z7/m0Rf1QbmQJccegD0r+YZxBjzqoBiEeJQ==", - "requires": { - "core-js": "~2.3.0", - "es6-promise": "~3.0.2", - "lie": "~3.1.0", - "pako": "~1.0.2", - "readable-stream": "~2.0.6" - }, - "dependencies": { - "process-nextick-args": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" - }, - "readable-stream": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", - "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "~1.0.0", - "process-nextick-args": "~1.0.6", - "string_decoder": "~0.10.x", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" - } - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - }, - "lazy-cache": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", - "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", - "dev": true - }, - "lazystream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz", - "integrity": "sha1-9plf4PggOS9hOWvolGJAe7dxaOQ=", - "requires": { - "readable-stream": "^2.0.5" - } - }, - "lie": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/lie/-/lie-3.1.1.tgz", - "integrity": "sha1-mkNrLMd0bKWd56QfpGmz77dr2H4=", - "requires": { - "immediate": "~3.0.5" - } - }, - "load-json-file": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", - "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", - "strip-bom": "^3.0.0" - } - }, - "loader-utils": { - "version": "0.2.17", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.17.tgz", - "integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=", - "dev": true, - "requires": { - "big.js": "^3.1.3", - "emojis-list": "^2.0.0", - "json5": "^0.5.0", - "object-assign": "^4.0.1" - } - }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - } - }, - "lodash": { - "version": "4.17.10", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", - "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==" - }, - "longest": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", - "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", - "dev": true - }, - "loud-rejection": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", - "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", - "requires": { - "currently-unhandled": "^0.4.1", - "signal-exit": "^3.0.0" - } - }, - "lru-cache": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", - "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "map-obj": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-2.0.0.tgz", - "integrity": "sha1-plzSkIepJZi4eRJXpSPgISIqwfk=" - }, - "math-random": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.1.tgz", - "integrity": "sha1-izqsWIuKZuSXXjzepn97sylgH6w=", - "dev": true - }, - "memory-fs": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.3.0.tgz", - "integrity": "sha1-e8xrYp46Q+hx1+Kaymrop/FcuyA=", - "dev": true, - "requires": { - "errno": "^0.1.3", - "readable-stream": "^2.0.1" - } - }, - "meow": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-5.0.0.tgz", - "integrity": "sha512-CbTqYU17ABaLefO8vCU153ZZlprKYWDljcndKKDCFcYQITzWCXZAVk4QMFZPgvzrnUQ3uItnIE/LoUOwrT15Ig==", - "requires": { - "camelcase-keys": "^4.0.0", - "decamelize-keys": "^1.0.0", - "loud-rejection": "^1.0.0", - "minimist-options": "^3.0.1", - "normalize-package-data": "^2.3.4", - "read-pkg-up": "^3.0.0", - "redent": "^2.0.0", - "trim-newlines": "^2.0.0", - "yargs-parser": "^10.0.0" - } - }, - "micromatch": { - "version": "2.3.11", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", - "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", - "dev": true, - "requires": { - "arr-diff": "^2.0.0", - "array-unique": "^0.2.1", - "braces": "^1.8.2", - "expand-brackets": "^0.1.4", - "extglob": "^0.3.1", - "filename-regex": "^2.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.1", - "kind-of": "^3.0.2", - "normalize-path": "^2.0.1", - "object.omit": "^2.0.0", - "parse-glob": "^3.0.4", - "regex-cache": "^0.4.2" - } - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" - }, - "minimist-options": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-3.0.2.tgz", - "integrity": "sha512-FyBrT/d0d4+uiZRbqznPXqw3IpZZG3gl3wKWiX784FycUKVwBt0uLBFkQrtE4tZOrgo78nZp2jnKz3L65T5LdQ==", - "requires": { - "arrify": "^1.0.1", - "is-plain-obj": "^1.1.0" - } - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "requires": { - "minimist": "0.0.8" - }, - "dependencies": { - "minimist": { - "version": "0.0.8", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" - } - } - }, - "mute-stream": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", - "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=" - }, - "nan": { - "version": "2.11.1", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.11.1.tgz", - "integrity": "sha512-iji6k87OSXa0CcrLl9z+ZiYSuR2o+c0bGuNmXdrhTQTakxytAFsC56SArGYoiHlJlFoHSnvmhpceZJaXkVuOtA==", - "dev": true, - "optional": true - }, - "ncp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ncp/-/ncp-2.0.0.tgz", - "integrity": "sha1-GVoh1sRuNh0vsSgbo4uR6d9727M=", - "dev": true - }, - "node-libs-browser": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-0.7.0.tgz", - "integrity": "sha1-PicsCBnjCJNeJmdECNevDhSRuDs=", - "dev": true, - "requires": { - "assert": "^1.1.1", - "browserify-zlib": "^0.1.4", - "buffer": "^4.9.0", - "console-browserify": "^1.1.0", - "constants-browserify": "^1.0.0", - "crypto-browserify": "3.3.0", - "domain-browser": "^1.1.1", - "events": "^1.0.0", - "https-browserify": "0.0.1", - "os-browserify": "^0.2.0", - "path-browserify": "0.0.0", - "process": "^0.11.0", - "punycode": "^1.2.4", - "querystring-es3": "^0.2.0", - "readable-stream": "^2.0.5", - "stream-browserify": "^2.0.1", - "stream-http": "^2.3.1", - "string_decoder": "^0.10.25", - "timers-browserify": "^2.0.2", - "tty-browserify": "0.0.0", - "url": "^0.11.0", - "util": "^0.10.3", - "vm-browserify": "0.0.4" - }, - "dependencies": { - "buffer": { - "version": "4.9.1", - "resolved": "http://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", - "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", - "dev": true, - "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4", - "isarray": "^1.0.0" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - } - } - }, - "normalize-package-data": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", - "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", - "requires": { - "hosted-git-info": "^2.1.4", - "is-builtin-module": "^1.0.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "requires": { - "remove-trailing-separator": "^1.0.1" - } - }, - "npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", - "requires": { - "path-key": "^2.0.0" - } - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "dev": true - }, - "object-keys": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz", - "integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==" - }, - "object.getownpropertydescriptors": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz", - "integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=", - "requires": { - "define-properties": "^1.1.2", - "es-abstract": "^1.5.1" - } - }, - "object.omit": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", - "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", - "dev": true, - "requires": { - "for-own": "^0.1.4", - "is-extendable": "^0.1.1" - } - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "requires": { - "wrappy": "1" - } - }, - "onecolor": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/onecolor/-/onecolor-2.5.0.tgz", - "integrity": "sha1-Ila2UdyAfBAfAK7b1JklxXpEMcE=" - }, - "optimist": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", - "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", - "dev": true, - "requires": { - "minimist": "~0.0.1", - "wordwrap": "~0.0.2" - }, - "dependencies": { - "minimist": { - "version": "0.0.10", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", - "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=", - "dev": true - } - } - }, - "os": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/os/-/os-0.1.1.tgz", - "integrity": "sha1-IIhF6J4ZOtTZcUdLk5R3NqVtE/M=" - }, - "os-browserify": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.2.1.tgz", - "integrity": "sha1-Y/xMzuXS13Y9Jrv4YBB45sLgBE8=", - "dev": true - }, - "os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" - }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" - }, - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=" - }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=" - }, - "pako": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.6.tgz", - "integrity": "sha512-lQe48YPsMJAig+yngZ87Lus+NF+3mtu7DVOBu6b/gHO1YpKwIj5AWjZ/TOS7i46HD/UixzWb1zeWDZfGZ3iYcg==" - }, - "parse-glob": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", - "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", - "dev": true, - "requires": { - "glob-base": "^0.3.0", - "is-dotfile": "^1.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.0" - } - }, - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - } - }, - "path-browserify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz", - "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=", - "dev": true - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" - }, - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=" - }, - "path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", - "requires": { - "pify": "^3.0.0" - } - }, - "pbkdf2-compat": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pbkdf2-compat/-/pbkdf2-compat-2.0.1.tgz", - "integrity": "sha1-tuDI+plJTZTgURV1gCpZpcFC8og=", - "dev": true - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" - }, - "pkginfo": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/pkginfo/-/pkginfo-0.4.1.tgz", - "integrity": "sha1-tUGO8EOd5UJfxJlQQtztFPsqhP8=" - }, - "preserve": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", - "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=", - "dev": true - }, - "process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", - "dev": true - }, - "process-nextick-args": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" - }, - "prompt": { - "version": "0.2.14", - "resolved": "https://registry.npmjs.org/prompt/-/prompt-0.2.14.tgz", - "integrity": "sha1-V3VPZPVD/XsIRXB8gY7OYY8F/9w=", - "requires": { - "pkginfo": "0.x.x", - "read": "1.0.x", - "revalidator": "0.1.x", - "utile": "0.2.x", - "winston": "0.8.x" - } - }, - "prr": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", - "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", - "dev": true - }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" - }, - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true - }, - "querystring": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", - "dev": true - }, - "querystring-es3": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", - "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", - "dev": true - }, - "quick-lru": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-1.1.0.tgz", - "integrity": "sha1-Q2CxfGETatOAeDl/8RQW4Ybc+7g=" - }, - "randomatic": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-3.1.0.tgz", - "integrity": "sha512-KnGPVE0lo2WoXxIZ7cPR8YBpiol4gsSuOwDSg410oHh80ZMp5EiypNqL2K4Z77vJn6lB5rap7IkAmcUlalcnBQ==", - "dev": true, - "requires": { - "is-number": "^4.0.0", - "kind-of": "^6.0.0", - "math-random": "^1.0.1" - }, - "dependencies": { - "is-number": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", - "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", - "dev": true - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true - } - } - }, - "read": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/read/-/read-1.0.7.tgz", - "integrity": "sha1-s9oZvQUkMal2cdRKQmNK33ELQMQ=", - "requires": { - "mute-stream": "~0.0.4" - } - }, - "read-pkg": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", - "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", - "requires": { - "load-json-file": "^4.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^3.0.0" - } - }, - "read-pkg-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", - "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", - "requires": { - "find-up": "^2.0.0", - "read-pkg": "^3.0.0" - } - }, - "readable-stream": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "readdirp": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz", - "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "minimatch": "^3.0.2", - "readable-stream": "^2.0.2", - "set-immediate-shim": "^1.0.1" - } - }, - "redent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-2.0.0.tgz", - "integrity": "sha1-wbIAe0LVfrE4kHmzyDM2OdXhzKo=", - "requires": { - "indent-string": "^3.0.0", - "strip-indent": "^2.0.0" - } - }, - "regex-cache": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", - "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", - "dev": true, - "requires": { - "is-equal-shallow": "^0.1.3" - } - }, - "remove-trailing-separator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=" - }, - "repeat-element": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", - "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", - "dev": true - }, - "repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", - "dev": true - }, - "revalidator": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/revalidator/-/revalidator-0.1.8.tgz", - "integrity": "sha1-/s5hv6DBtSoga9axgZgYS91SOjs=" - }, - "right-align": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", - "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", - "dev": true, - "requires": { - "align-text": "^0.1.1" - } - }, - "rimraf": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", - "requires": { - "glob": "^7.0.5" - } - }, - "ripemd160": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-0.2.0.tgz", - "integrity": "sha1-K/GYveFnys+lHAqSjoS2i74XH84=", - "dev": true - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "sax": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" - }, - "semver": { - "version": "5.5.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.1.tgz", - "integrity": "sha512-PqpAxfrEhlSUWge8dwIp4tZnQ25DIOthpiaHNIthsjEFQD6EvqUKUDM7L8O2rShkFccYo1VjJR0coWfNkCubRw==" - }, - "set-immediate-shim": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", - "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=", - "dev": true - }, - "setimmediate": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", - "dev": true - }, - "sha.js": { - "version": "2.2.6", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.2.6.tgz", - "integrity": "sha1-F93t3F9yL7ZlAWWIlUYZd4ZzFbo=", - "dev": true - }, - "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "requires": { - "shebang-regex": "^1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" - }, - "shelljs": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.5.3.tgz", - "integrity": "sha1-xUmCuZbHbvDB5rWfvcWCX1txMRM=" - }, - "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" - }, - "source-list-map": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-0.1.8.tgz", - "integrity": "sha1-xVCyq1Qn9rPyH1r+rYjE9Vh7IQY=", - "dev": true - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - }, - "spdx-correct": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz", - "integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==", - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-exceptions": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz", - "integrity": "sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg==" - }, - "spdx-expression-parse": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", - "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", - "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-license-ids": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz", - "integrity": "sha512-2+EPwgbnmOIl8HjGBXXMd9NAu02vLjOO1nWw4kmeRDFyHn+M/ETfHxQUK0oXg8ctgVnl9t3rosNVsZ1jG61nDA==" - }, - "stack-trace": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", - "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=" - }, - "stream-browserify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz", - "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=", - "dev": true, - "requires": { - "inherits": "~2.0.1", - "readable-stream": "^2.0.2" - } - }, - "stream-http": { - "version": "2.8.3", - "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz", - "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==", - "dev": true, - "requires": { - "builtin-status-codes": "^3.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.3.6", - "to-arraybuffer": "^1.0.0", - "xtend": "^4.0.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" - }, - "strip-eof": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=" - }, - "strip-indent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz", - "integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=" - }, - "supports-color": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", - "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", - "dev": true, - "requires": { - "has-flag": "^1.0.0" - } - }, - "tapable": { - "version": "0.1.10", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-0.1.10.tgz", - "integrity": "sha1-KcNXB8K3DlDQdIK10gLo7URtr9Q=", - "dev": true - }, - "tar-stream": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.1.tgz", - "integrity": "sha512-IFLM5wp3QrJODQFPm6/to3LJZrONdBY/otxcvDIQzu217zKye6yVR3hhi9lAjrC2Z+m/j5oDxMPb1qcd8cIvpA==", - "requires": { - "bl": "^1.0.0", - "buffer-alloc": "^1.1.0", - "end-of-stream": "^1.0.0", - "fs-constants": "^1.0.0", - "readable-stream": "^2.3.0", - "to-buffer": "^1.1.0", - "xtend": "^4.0.0" - } - }, - "timers-browserify": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.10.tgz", - "integrity": "sha512-YvC1SV1XdOUaL6gx5CoGroT3Gu49pK9+TZ38ErPldOWW4j49GI1HKs9DV+KGq/w6y+LZ72W1c8cKz2vzY+qpzg==", - "dev": true, - "requires": { - "setimmediate": "^1.0.4" - } - }, - "tinytim": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/tinytim/-/tinytim-0.1.1.tgz", - "integrity": "sha1-yWih5VWa2VUyJO92J7qzTjyu+Kg=" - }, - "tmp": { - "version": "0.0.26", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.26.tgz", - "integrity": "sha1-nvqCDOKhD4H4l5VVus4/FVJs4fI=", - "requires": { - "os-tmpdir": "~1.0.0" - } - }, - "to-arraybuffer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", - "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=", - "dev": true - }, - "to-buffer": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz", - "integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==" - }, - "tracer": { - "version": "0.7.4", - "resolved": "https://registry.npmjs.org/tracer/-/tracer-0.7.4.tgz", - "integrity": "sha1-d/oEN8+Ct2vNvNRLhHRHcuWeUlk=", - "requires": { - "colors": "1.0.3", - "dateformat": "1.0.11", - "tinytim": "0.1.1" - }, - "dependencies": { - "colors": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", - "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=" - } - } - }, - "trim-newlines": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-2.0.0.tgz", - "integrity": "sha1-tAPQuRvlDDMd/EuC7s6yLD3hbSA=" - }, - "tty-browserify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", - "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=", - "dev": true - }, - "tunnel": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.4.tgz", - "integrity": "sha1-LTeFoVjBdMmhbcLARuxfxfF0IhM=" - }, - "typed-rest-client": { -<<<<<<< HEAD - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.0.9.tgz", - "integrity": "sha512-iOdwgmnP/tF6Qs+oY4iEtCf/3fnCDl7Gy9LGPJ4E3M4Wj3uaSko15FVwbsaBmnBqTJORnXBWVY5306D4HH8oiA==", - "requires": { - "tunnel": "0.0.4", - "underscore": "1.8.3" - }, - "dependencies": { - "underscore": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", - "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" - } -======= - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.2.0.tgz", - "integrity": "sha512-FrUshzZ1yxH8YwGR29PWWnfksLEILbWJydU7zfIRkyH7kAEzB62uMAl2WY6EyolWpLpVHeJGgQm45/MaruaHpw==", - "requires": { - "tunnel": "0.0.4", - "underscore": "1.8.3" ->>>>>>> 94a89d1425d14d461f263b5f18329ba64a1e8e70 - } - }, - "typescript": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.6.2.tgz", - "integrity": "sha1-PFtv1/beCRQmkCfwPAlGdY92c6Q=", - "dev": true - }, - "uglify-js": { - "version": "2.7.5", - "resolved": "http://registry.npmjs.org/uglify-js/-/uglify-js-2.7.5.tgz", - "integrity": "sha1-RhLAx7qu4rp8SH3kkErhIgefLKg=", - "dev": true, - "requires": { - "async": "~0.2.6", - "source-map": "~0.5.1", - "uglify-to-browserify": "~1.0.0", - "yargs": "~3.10.0" - }, - "dependencies": { - "async": { - "version": "0.2.10", - "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz", - "integrity": "sha1-trvgsGdLnXGXCMo43owjfLUmw9E=", - "dev": true - } - } - }, - "uglify-to-browserify": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", - "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", - "dev": true - }, - "underscore": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", - "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" - }, - "url": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", - "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", - "dev": true, - "requires": { - "punycode": "1.3.2", - "querystring": "0.2.0" - }, - "dependencies": { - "punycode": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", - "dev": true - } - } - }, - "util": { - "version": "0.10.4", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", - "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==", - "dev": true, - "requires": { - "inherits": "2.0.3" - } - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" - }, - "util.promisify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.0.tgz", - "integrity": "sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA==", - "requires": { - "define-properties": "^1.1.2", - "object.getownpropertydescriptors": "^2.0.3" - } - }, - "utile": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/utile/-/utile-0.2.1.tgz", - "integrity": "sha1-kwyI6ZCY1iIINMNWy9mncFItkNc=", - "requires": { - "async": "~0.2.9", - "deep-equal": "*", - "i": "0.3.x", - "mkdirp": "0.x.x", - "ncp": "0.4.x", - "rimraf": "2.x.x" - }, - "dependencies": { - "async": { - "version": "0.2.10", - "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz", - "integrity": "sha1-trvgsGdLnXGXCMo43owjfLUmw9E=" - }, - "ncp": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/ncp/-/ncp-0.4.2.tgz", - "integrity": "sha1-q8xsvT7C7Spyn/bnwfqPAXhKhXQ=" - } - } - }, - "uuid": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" - }, - "validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "validator": { - "version": "3.43.0", - "resolved": "http://registry.npmjs.org/validator/-/validator-3.43.0.tgz", - "integrity": "sha1-lkZLmS1BloM9l6GUv0Cxn/VLrgU=" - }, - "vm-browserify": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", - "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=", - "dev": true, - "requires": { - "indexof": "0.0.1" - } - }, -<<<<<<< HEAD - "vso-node-api": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/vso-node-api/-/vso-node-api-5.1.2.tgz", - "integrity": "sha1-gXtm/+1uEcvXH5O5FvSxicljQls=", - "requires": { - "q": "^1.0.1", - "tunnel": "0.0.4", - "underscore": "^1.8.3" - } - }, -======= ->>>>>>> 94a89d1425d14d461f263b5f18329ba64a1e8e70 - "walkdir": { - "version": "0.0.11", - "resolved": "https://registry.npmjs.org/walkdir/-/walkdir-0.0.11.tgz", - "integrity": "sha1-oW0CXrkxvQO1LzCMrtD0D86+lTI=" - }, - "watchpack": { - "version": "0.2.9", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-0.2.9.tgz", - "integrity": "sha1-Yuqkq15bo1/fwBgnVibjwPXj+ws=", - "dev": true, - "requires": { - "async": "^0.9.0", - "chokidar": "^1.0.0", - "graceful-fs": "^4.1.2" - }, - "dependencies": { - "async": { - "version": "0.9.2", - "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", - "integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0=", - "dev": true - } - } - }, - "webpack": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-1.15.0.tgz", - "integrity": "sha1-T/MfU9sDM55VFkqdRo7gMklo/pg=", - "dev": true, - "requires": { - "acorn": "^3.0.0", - "async": "^1.3.0", - "clone": "^1.0.2", - "enhanced-resolve": "~0.9.0", - "interpret": "^0.6.4", - "loader-utils": "^0.2.11", - "memory-fs": "~0.3.0", - "mkdirp": "~0.5.0", - "node-libs-browser": "^0.7.0", - "optimist": "~0.6.0", - "supports-color": "^3.1.0", - "tapable": "~0.1.8", - "uglify-js": "~2.7.3", - "watchpack": "^0.2.1", - "webpack-core": "~0.6.9" - } - }, - "webpack-core": { - "version": "0.6.9", - "resolved": "https://registry.npmjs.org/webpack-core/-/webpack-core-0.6.9.tgz", - "integrity": "sha1-/FcViMhVjad76e+23r3Fo7FyvcI=", - "dev": true, - "requires": { - "source-list-map": "~0.1.7", - "source-map": "~0.4.1" - }, - "dependencies": { - "source-map": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", - "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", - "dev": true, - "requires": { - "amdefine": ">=0.0.4" - } - } - } - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "requires": { - "isexe": "^2.0.0" - } - }, - "window-size": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", - "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", - "dev": true - }, - "winreg": { - "version": "0.0.12", - "resolved": "https://registry.npmjs.org/winreg/-/winreg-0.0.12.tgz", - "integrity": "sha1-BxBVVLoanQiXklHRKUdb/64wBrc=" - }, - "winston": { - "version": "0.8.3", - "resolved": "http://registry.npmjs.org/winston/-/winston-0.8.3.tgz", - "integrity": "sha1-ZLar9M0Brcrv1QCTk7HY6L7BnbA=", - "requires": { - "async": "0.2.x", - "colors": "0.6.x", - "cycle": "1.0.x", - "eyes": "0.1.x", - "isstream": "0.1.x", - "pkginfo": "0.3.x", - "stack-trace": "0.0.x" - }, - "dependencies": { - "async": { - "version": "0.2.10", - "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz", - "integrity": "sha1-trvgsGdLnXGXCMo43owjfLUmw9E=" - }, - "colors": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/colors/-/colors-0.6.2.tgz", - "integrity": "sha1-JCP+ZnisDF2uiFLl0OW+CMmXq8w=" - }, - "pkginfo": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/pkginfo/-/pkginfo-0.3.1.tgz", - "integrity": "sha1-Wyn2qB9wcXFC4J52W76rl7T4HiE=" - } - } - }, - "wordwrap": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", - "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", - "dev": true - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - }, - "xml2js": { - "version": "0.4.19", - "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz", - "integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==", - "requires": { - "sax": ">=0.6.0", - "xmlbuilder": "~9.0.1" - } - }, - "xmlbuilder": { - "version": "9.0.7", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", - "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=" - }, - "xtend": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", - "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" - }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" - }, - "yargs": { - "version": "3.10.0", - "resolved": "http://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", - "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", - "dev": true, - "requires": { - "camelcase": "^1.0.2", - "cliui": "^2.1.0", - "decamelize": "^1.0.0", - "window-size": "0.1.0" - }, - "dependencies": { - "camelcase": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", - "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", - "dev": true - } - } - }, - "yargs-parser": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz", - "integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==", - "requires": { - "camelcase": "^4.1.0" - } - }, - "zip-stream": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-1.2.0.tgz", - "integrity": "sha1-qLxF9MG0lpnGuQGYuqyqzbzUugQ=", - "requires": { - "archiver-utils": "^1.3.0", - "compress-commons": "^1.2.0", - "lodash": "^4.8.0", - "readable-stream": "^2.0.0" - } - } - } -} diff --git a/package.json b/package.json index b9e5e52e..4a14d197 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tfx-cli", - "version": "0.7.3", + "version": "0.7.4", "description": "CLI for Azure DevOps Services and Team Foundation Server", "repository": { "type": "git", diff --git a/tsd.json b/tsd.json index 9c5c6a71..315352e3 100644 --- a/tsd.json +++ b/tsd.json @@ -44,7 +44,7 @@ "form-data/form-data.d.ts": { "commit": "43b6bf88758852b9ab713a9b011487f047f94f4e" }, - "vso-node-api/vso-node-api.d.ts": { + "azure-devops-node-api/azure-devops-node-api.d.ts": { "commit": "b9c534a52a50547c61c5f80519aaed285eb3e8b8" }, "mkdirp/mkdirp.d.ts": { From 2da064610f45fc4b0654d027c4a5cb5d31b0a980 Mon Sep 17 00:00:00 2001 From: Shani Feldman Date: Sun, 5 May 2019 09:41:02 +0300 Subject: [PATCH 221/235] complete refactor to azure-devops-node-api --- app/exec/build/definitions/queuestatus.ts | 2 +- app/exec/build/delete.ts | 7 +++--- app/exec/build/details.ts | 4 ++-- app/exec/build/keep.ts | 26 ++++++++++++----------- app/exec/build/logs.ts | 20 ++++++++++------- app/exec/build/pool/create.ts | 5 +++-- app/exec/build/report.ts | 12 +++++++---- app/exec/code/git/abandon.ts | 6 +++--- app/exec/code/git/complete.ts | 6 +++--- app/exec/code/git/createrepo.ts | 2 +- app/exec/code/git/deleterepo.ts | 2 +- app/exec/code/git/pullrequest.ts | 14 ++++++------ app/exec/code/git/repodetails.ts | 2 +- app/exec/code/git/repolist.ts | 2 +- app/exec/code/git/requestdetails.ts | 4 ++-- app/exec/code/git/requestlist.ts | 5 ++--- app/exec/code/git/requestoptions.ts | 4 ++-- app/exec/endpoints/list.ts | 12 +++++++---- app/exec/endpoints/set.ts | 18 ++++++++++------ app/exec/endpoints/show.ts | 10 ++++++--- app/exec/workitem/links.ts | 2 +- 21 files changed, 95 insertions(+), 70 deletions(-) diff --git a/app/exec/build/definitions/queuestatus.ts b/app/exec/build/definitions/queuestatus.ts index 3d38ec87..3a844770 100644 --- a/app/exec/build/definitions/queuestatus.ts +++ b/app/exec/build/definitions/queuestatus.ts @@ -58,7 +58,7 @@ export class DefinitionQueueStatus extends TfCommand { return bapi.updateDefinition(definition, definition.id, definition.project.name); }); }); }); }); diff --git a/app/exec/build/delete.ts b/app/exec/build/delete.ts index 32f96d34..ae3860d6 100644 --- a/app/exec/build/delete.ts +++ b/app/exec/build/delete.ts @@ -38,14 +38,14 @@ export class BuildDelete extends buildBase.BuildBase, buildId: number, project: string) { trace.info("Deleting build...") - return buildapi.getBuild(buildId,project).then((build: buildContracts.Build) => { + return buildapi.then((api) => { api.getBuild(buildId,project).then((build: buildContracts.Build) => { if (!build.keepForever) { build.deleted = true; build.status = buildContracts.BuildStatus.Completed build.result = buildContracts.BuildResult.Failed if (build.deleted && build.status == buildContracts.BuildStatus.Completed) { - buildapi.updateBuild(build,build.id) - buildapi.deleteBuild(build.id,build.project.name) + buildapi.then((api) => { api.updateBuild(build, build.id) }); + buildapi.then((api) => { api.deleteBuild(build.id,build.project.name) }); trace.info("build deleted") } else { trace.error("failed to delete") @@ -54,5 +54,6 @@ export class BuildDelete extends buildBase.BuildBase { trace.debug("build-details.exec"); - var buildapi: buildClient.IBuildApi = this.webApi.getBuildApi(); + var buildapi = this.webApi.getBuildApi(); return this.commandArgs.project.val().then((project) => { return this.commandArgs.buildId.val().then((buildId) => { - return buildapi.getBuild(buildId, project); + return buildapi.then((api) => { return api.getBuild(buildId, project); }); }); }); diff --git a/app/exec/build/keep.ts b/app/exec/build/keep.ts index 534ea27c..2206afd8 100644 --- a/app/exec/build/keep.ts +++ b/app/exec/build/keep.ts @@ -23,7 +23,7 @@ export class BuildKeep extends buildBase.BuildBase { trace.debug("keep-build.exec"); - var buildapi: buildClient.IBuildApi = this.webApi.getBuildApi(); + var buildapi = this.webApi.getBuildApi(); return this.commandArgs.project.val().then((project) => { return this.commandArgs.buildId.val().then((buildId) => { return this._keepBuild(buildapi, buildId, project); @@ -36,17 +36,19 @@ export class BuildKeep extends buildBase.BuildBase, buildId: number, project: string) :Promise { trace.info("Searching for build...") - return buildapi.getBuild(buildId,project).then((build: buildContracts.Build) => { - if (build.keepForever) { - trace.warn("Retention unlocked for %s", build.buildNumber); - build.keepForever = false; - } else { - trace.warn("Build %s Retained indefinatly", build.buildNumber); - build.keepForever = true; - } - return buildapi.updateBuild(build,build.id); - }); + return buildapi.then((api) => { + return api.getBuild(buildId,project).then((build: buildContracts.Build) => { + if (build.keepForever) { + trace.warn("Retention unlocked for %s", build.buildNumber); + build.keepForever = false; + } else { + trace.warn("Build %s Retained indefinatly", build.buildNumber); + build.keepForever = true; + } + return buildapi.then((api) => { return api.updateBuild(build, build.id); }); + }); + }); } } \ No newline at end of file diff --git a/app/exec/build/logs.ts b/app/exec/build/logs.ts index 54051f8b..37745bd9 100644 --- a/app/exec/build/logs.ts +++ b/app/exec/build/logs.ts @@ -20,16 +20,20 @@ export class BuildLogs extends buildBase.BuildBase { trace.debug("build-logs.exec"); - var buildapi: buildClient.IBuildApi = this.webApi.getBuildApi(); + var buildapi = this.webApi.getBuildApi(); return this.commandArgs.project.val().then((project) => { return this.commandArgs.buildId.val().then((buildId) => { - return buildapi.getBuild(buildId, project).then((build) => { - return buildapi.getBuildLogsZip(build.project.name, build.id).then((stream) => { - var archiveName = build.definition.name + "-" + build.buildNumber + "_" + build.id + ".zip"; - trace.info('Downloading ... '); - trace.info('File: %s Created', archiveName); - stream.pipe(fs.createWriteStream(archiveName)); - return build; + return buildapi.then((api) => { + return api.getBuild(buildId, project).then((build) => { + return buildapi.then((api) => { + return api.getBuildLogsZip(build.project.name, build.id).then((stream) => { + var archiveName = build.definition.name + "-" + build.buildNumber + "_" + build.id + ".zip"; + trace.info('Downloading ... '); + trace.info('File: %s Created', archiveName); + stream.pipe(fs.createWriteStream(archiveName)); + return build; + }); + }); }); }); }); diff --git a/app/exec/build/pool/create.ts b/app/exec/build/pool/create.ts index f87cca36..8645cd0b 100644 --- a/app/exec/build/pool/create.ts +++ b/app/exec/build/pool/create.ts @@ -48,7 +48,7 @@ export class CreatePool extends TfCommand { api.addAgentPool(NewPool).then((pool) => { + return agentapi.then((api) => {return api.addAgentPool(NewPool).then((pool) => { return pool; }); }); @@ -66,9 +66,10 @@ export class CreatePool extends TfCommand { + return agentapi.then((api) => {return api.addAgentPool(NewPool).then((pool) => { return pool; }); + }); } } diff --git a/app/exec/build/report.ts b/app/exec/build/report.ts index 919bf16c..548b757c 100644 --- a/app/exec/build/report.ts +++ b/app/exec/build/report.ts @@ -20,12 +20,16 @@ export class BuildReport extends buildBase.BuildBase { trace.debug("build-logs.exec"); - var buildapi: buildClient.IBuildApi = this.webApi.getBuildApi(); + var buildapi = this.webApi.getBuildApi(); return this.commandArgs.project.val().then((project) => { return this.commandArgs.buildId.val().then((buildId) => { - return buildapi.getBuild(buildId, project).then((build) => { - return buildapi.getBuildReport(build.project.name, build.id).then((report) => { - return report + return buildapi.then((api) => { + return api.getBuild(buildId, project).then((build) => { + return buildapi.then((api) => { + return api.getBuildReport(build.project.name, build.id).then((report) => { + return report + }); + }); }); }); }); diff --git a/app/exec/code/git/abandon.ts b/app/exec/code/git/abandon.ts index e8d694e4..8714b586 100644 --- a/app/exec/code/git/abandon.ts +++ b/app/exec/code/git/abandon.ts @@ -28,7 +28,7 @@ export class Abandon extends codedBase.CodeBase { if (!pullRequestName) { pullRequestId = await this.commandArgs.pullrequestid.val(); } - var gitRepositories = await gitApi.getRepositories(project); + var gitRepositories = await gitApi.then((api) => { return api.getRepositories(project); }); var gitRepositorie; var myPullRequest @@ -38,7 +38,7 @@ export class Abandon extends codedBase.CodeBase { return; }; }); - var pullRequestes = await gitApi.getPullRequests(gitRepositorie.id, null); + var pullRequestes = await gitApi.then((api) => { return api.getPullRequests(gitRepositorie.id, null); }); var myPullRequestId var count = 0; pullRequestes.forEach(request => { @@ -69,7 +69,7 @@ export class Abandon extends codedBase.CodeBase { var updatedPullRequest: GR = new GR; updatedPullRequest.status = 2 //abandoned; - return await gitApi.updatePullRequest(updatedPullRequest, gitRepositorie.id, pullRequestId, project) + return await gitApi.then((api) => { api.updatePullRequest(updatedPullRequest, gitRepositorie.id, pullRequestId, project) }); }; public friendlyOutput(data: gi.GitPullRequest): void { diff --git a/app/exec/code/git/complete.ts b/app/exec/code/git/complete.ts index 1708d88b..537871b6 100644 --- a/app/exec/code/git/complete.ts +++ b/app/exec/code/git/complete.ts @@ -29,7 +29,7 @@ export class Complete extends codedBase.CodeBase if (!pullRequestName) { pullRequestId = await this.commandArgs.pullrequestid.val(); } - var gitRepositories = await gitApi.getRepositories(project); + var gitRepositories = await gitApi.then((api) => { return api.getRepositories(project); }); var gitRepositorie; var myPullRequest @@ -39,7 +39,7 @@ export class Complete extends codedBase.CodeBase return; }; }); - var pullRequestes = await gitApi.getPullRequests(gitRepositorie.id, null); + var pullRequestes = await gitApi.then((api) => { return api.getPullRequests(gitRepositorie.id, null); }); var myPullRequestId var count = 0; pullRequestes.forEach(request => { @@ -78,7 +78,7 @@ export class Complete extends codedBase.CodeBase completionOptions.deleteSourceBranch = delSources updatedPullRequest.completionOptions = completionOptions; } - return await gitApi.updatePullRequest(updatedPullRequest, gitRepositorie.id, pullRequestId, project); + return await gitApi.then((api) => { return api.updatePullRequest(updatedPullRequest, gitRepositorie.id, pullRequestId, project); }); }; diff --git a/app/exec/code/git/createrepo.ts b/app/exec/code/git/createrepo.ts index 5ff24e55..99a99ed0 100644 --- a/app/exec/code/git/createrepo.ts +++ b/app/exec/code/git/createrepo.ts @@ -37,7 +37,7 @@ export class CreateRepository extends codedBase.CodeBase { return api.createRepository(NewRepo, project); }); }; public friendlyOutput(data: gi.GitRepository): void { diff --git a/app/exec/code/git/deleterepo.ts b/app/exec/code/git/deleterepo.ts index e6b1dbf5..b026861c 100644 --- a/app/exec/code/git/deleterepo.ts +++ b/app/exec/code/git/deleterepo.ts @@ -25,7 +25,7 @@ export class DeleteRepository extends codedBase.CodeBase { return api.deleteRepository(repositoryid, project); }); }; public friendlyOutput(data: gi.GitRepository): void { diff --git a/app/exec/code/git/pullrequest.ts b/app/exec/code/git/pullrequest.ts index 928b921c..7de18012 100644 --- a/app/exec/code/git/pullrequest.ts +++ b/app/exec/code/git/pullrequest.ts @@ -67,7 +67,7 @@ export class PullRequest extends codedBase.CodeBase { return api.getRepositories(project); }); var gitRepositorie; gitRepositories.forEach(repo => { if (repo.name.toLowerCase() == repositoryName.toLowerCase()) { @@ -80,7 +80,7 @@ export class PullRequest extends codedBase.CodeBase { return api.getPullRequests(gitRepositorieId, null) }); var myBranchComment = ''; var newPullrequest: GR = new GR; newPullrequest.sourceRefName = 'refs/heads/' + source; @@ -89,7 +89,7 @@ export class PullRequest extends codedBase.CodeBase { return api.getSuggestions(gitRepositorieId, project) }); target = gitRepositorie.defaultBranch.split('/')[gitRepositorie.defaultBranch.split('/').length - 1]; newPullrequest.targetRefName = gitRepositorie.defaultBranch; } @@ -99,7 +99,7 @@ export class PullRequest extends codedBase.CodeBase { return api.getBranches(gitRepositorieId, project); }); branches.forEach(branch => { if (branch.name == source) { myBranch = branch; @@ -117,15 +117,15 @@ export class PullRequest extends codedBase.CodeBase { return api.createPullRequest(newPullrequest, gitRepositorieId, project) }); - var createdRequest = await gitApi.createPullRequest(newPullrequest, gitRepositorieId, project) + var createdRequest = await gitApi.then((api) => { return api.createPullRequest(newPullrequest, gitRepositorieId, project) }); var newPullrequest: GR = new GR; if (delSources) { newPullrequest.completionOptions.deleteSourceBranch = true } newPullrequest.autoCompleteSetBy = createdRequest.createdBy; - return await gitApi.updatePullRequest(newPullrequest, gitRepositorieId, createdRequest.pullRequestId, project); + return await gitApi.then((api) => { return api.updatePullRequest(newPullrequest, gitRepositorieId, createdRequest.pullRequestId, project); }); }; public friendlyOutput(data: gi.GitPullRequest): void { diff --git a/app/exec/code/git/repodetails.ts b/app/exec/code/git/repodetails.ts index e7c358fc..fcceb82a 100644 --- a/app/exec/code/git/repodetails.ts +++ b/app/exec/code/git/repodetails.ts @@ -24,7 +24,7 @@ export class GetRepositoryDetails extends codedBase.CodeBase { return api.getRepository(id); }); }; public friendlyOutput(data: gi.GitRepository): void { diff --git a/app/exec/code/git/repolist.ts b/app/exec/code/git/repolist.ts index 67e1f7ca..574511f9 100644 --- a/app/exec/code/git/repolist.ts +++ b/app/exec/code/git/repolist.ts @@ -24,7 +24,7 @@ export class ListRepositories extends codedBase.CodeBase { return api.getRepositories(project); }); }; public friendlyOutput(data: gi.GitRepository[]): void { diff --git a/app/exec/code/git/requestdetails.ts b/app/exec/code/git/requestdetails.ts index a80508a1..1b853258 100644 --- a/app/exec/code/git/requestdetails.ts +++ b/app/exec/code/git/requestdetails.ts @@ -26,7 +26,7 @@ export class RequestDetails extends codedBase.CodeBase { return api.getRepositories(project); }); var requestId = await this.commandArgs.pullrequestid.val(); var gitRepositorie; gitRepositories.forEach(repo => { @@ -36,7 +36,7 @@ export class RequestDetails extends codedBase.CodeBase { return api.getPullRequest(gitRepositorie.id, +requestId); }); }; public friendlyOutput(req: gi.GitPullRequest): void { diff --git a/app/exec/code/git/requestlist.ts b/app/exec/code/git/requestlist.ts index a5ecd00b..492cbc10 100644 --- a/app/exec/code/git/requestlist.ts +++ b/app/exec/code/git/requestlist.ts @@ -1,4 +1,3 @@ -import { ChangeListSearchCriteria } from 'azure-devops-node-api/interfaces/TfvcInterfaces'; import { success, warn } from '../../../lib/trace'; import { errLog } from '../../../lib/errorhandler'; import args = require('../../../lib/arguments'); @@ -28,7 +27,7 @@ export class RequestList extends codedBase.CodeBase { return api.getRepositories(project); }); var gitRepositorie; gitRepositories.forEach(repo => { if (repo.name.toLowerCase() == repositoryName.toLowerCase()) { @@ -43,7 +42,7 @@ export class RequestList extends codedBase.CodeBase { return api.getPullRequests(gitRepositorie.id, searchCriteria, null, null, null, top); }); }; public friendlyOutput(data: gi.GitPullRequest[]): void { diff --git a/app/exec/code/git/requestoptions.ts b/app/exec/code/git/requestoptions.ts index 694a3401..99bbd45a 100644 --- a/app/exec/code/git/requestoptions.ts +++ b/app/exec/code/git/requestoptions.ts @@ -26,7 +26,7 @@ export class RequestOptions extends codedBase.CodeBase { return api.getRepositories(project); }); var requestId = await this.commandArgs.pullrequestid.val(); var gitRepositorie; gitRepositories.forEach(repo => { @@ -35,7 +35,7 @@ export class RequestOptions extends codedBase.CodeBase { return api.getPullRequest(gitRepositorie.id, +requestId); }); var gprco = request.completionOptions as GPRCO; gprco.requestId = request.pullRequestId; return gprco; diff --git a/app/exec/endpoints/list.ts b/app/exec/endpoints/list.ts index 29c77c13..06c86548 100644 --- a/app/exec/endpoints/list.ts +++ b/app/exec/endpoints/list.ts @@ -23,10 +23,14 @@ export class ListEndpoints extends TfCommand { - return coreapi.getProject(project).then((projectObj) =>{ - return agentapi.getServiceEndpoints(projectObj.id).then((endpoints) => { - trace.debug("Retrieved " + endpoints.length + " build endpoints from server."); - return endpoints; + return coreapi.then((api) =>{ + return api.getProject(project).then((projectObj) =>{ + return agentapi.then((api) => { + return api.getServiceEndpoints(projectObj.id).then((endpoints) => { + trace.debug("Retrieved " + endpoints.length + " build endpoints from server."); + return endpoints; + }); + }); }); }); }); diff --git a/app/exec/endpoints/set.ts b/app/exec/endpoints/set.ts index f5974201..6f697e2d 100644 --- a/app/exec/endpoints/set.ts +++ b/app/exec/endpoints/set.ts @@ -31,12 +31,18 @@ export class ShowEndpoint extends TfCommand { return this.commandArgs.id.val().then((id) =>{ return this.commandArgs.parameters.val().then((params) => { - return coreapi.getProject(project).then((projectObj) =>{ - return agentapi.getServiceEndpointDetails(projectObj.id,id).then((endpoint) => { - //trace.info(JSON.stringify(JSON.parse(params))); - endpoint.authorization.parameters = JSON.parse(params); - return agentapi.updateServiceEndpoint(endpoint,projectObj.name,endpoint.id).then(() => { - return endpoint; + return coreapi.then((api) => { + return api.getProject(project).then((projectObj) =>{ + return agentapi.then((api)=>{ + return api.getServiceEndpointDetails(projectObj.id,id).then((endpoint) => { + //trace.info(JSON.stringify(JSON.parse(params))); + endpoint.authorization.parameters = JSON.parse(params); + return agentapi.then((api) => { + return api.updateServiceEndpoint(endpoint,projectObj.name,endpoint.id).then(() => { + return endpoint; + }); + }); + }); }); }); }); diff --git a/app/exec/endpoints/show.ts b/app/exec/endpoints/show.ts index 4f8b1477..d58e0ac6 100644 --- a/app/exec/endpoints/show.ts +++ b/app/exec/endpoints/show.ts @@ -30,9 +30,13 @@ export class ShowEndpoint extends TfCommand { return this.commandArgs.id.val().then((id) =>{ - return coreapi.getProject(project).then((projectObj) =>{ - return agentapi.getServiceEndpointDetails(projectObj.id,id).then((endpoint) => { - return endpoint; + return coreapi.then((api) => { + return api. getProject(project).then((projectObj) =>{ + return agentapi.then((api)=>{ + return api.getServiceEndpointDetails(projectObj.id,id).then((endpoint) => { + return endpoint; + }); + }); }); }); }); diff --git a/app/exec/workitem/links.ts b/app/exec/workitem/links.ts index 42203664..a2641acd 100644 --- a/app/exec/workitem/links.ts +++ b/app/exec/workitem/links.ts @@ -24,7 +24,7 @@ export class WorkItemLinks extends witBase.WorkItemBase var witapi = this.webApi.getWorkItemTrackingApi(); return this.commandArgs.workItemId.val().then((workItemId) => { ids[0] = workItemId; - return witapi.getWorkItems(ids,null,null,WorkItemExpand.All) + return witapi.then((api) => { return api.getWorkItems(ids, null, null, WorkItemExpand.All) }); }); } From 11609626d4887a0e4c54a1999f33ba3a0eb5a565 Mon Sep 17 00:00:00 2001 From: Shani Feldman Date: Mon, 6 May 2019 12:56:31 +0300 Subject: [PATCH 222/235] use all parameters in overload method --- app/exec/build/definitions/update.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/exec/build/definitions/update.ts b/app/exec/build/definitions/update.ts index 9b3dc95f..928e9290 100644 --- a/app/exec/build/definitions/update.ts +++ b/app/exec/build/definitions/update.ts @@ -45,7 +45,7 @@ export class UpdateDefinition extends TfCommand {return defapi.updateDefinition(definition, definitionId as number, project as string).then((definition) => { + return api.then((defapi) => {return defapi.updateDefinition(definition, definitionId as number, project as string,currentDefinition.id,currentDefinition.revision).then((definition) => { return definition; }); }); From 3743d390889cda480b9cedca96d38d72518505f2 Mon Sep 17 00:00:00 2001 From: Shani Feldman Date: Thu, 23 May 2019 22:31:37 +0300 Subject: [PATCH 223/235] pop version number to update npm package --- package-lock.json | 2914 --------------------------------------------- package.json | 2 +- 2 files changed, 1 insertion(+), 2915 deletions(-) delete mode 100644 package-lock.json diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index 532af1cb..00000000 --- a/package-lock.json +++ /dev/null @@ -1,2914 +0,0 @@ -{ - "name": "tfx-cli", - "version": "0.7.4", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "@types/clipboardy": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@types/clipboardy/-/clipboardy-1.1.0.tgz", - "integrity": "sha512-KOxf4ah9diZWmREM5jCupx2+pZaBPwKk5d5jeNK2+TY6IgEO35uhG55NnDT4cdXeRX8irDSHQPtdRrr0JOTQIw==", - "dev": true - }, - "@types/events": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@types/events/-/events-1.2.0.tgz", - "integrity": "sha512-KEIlhXnIutzKwRbQkGWb/I4HFqBuUykAdHgDED6xqwXJfONCjF5VoE0cXEiurh3XauygxzeDzgtXUqvLkxFzzA==", - "dev": true - }, - "@types/glob": { - "version": "5.0.35", - "resolved": "https://registry.npmjs.org/@types/glob/-/glob-5.0.35.tgz", - "integrity": "sha512-wc+VveszMLyMWFvXLkloixT4n0harUIVZjnpzztaZ0nKLuul7Z32iMt2fUFGAaZ4y1XWjFRMtCI5ewvyh4aIeg==", - "dev": true, - "requires": { - "@types/events": "*", - "@types/minimatch": "*", - "@types/node": "*" - } - }, - "@types/jszip": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@types/jszip/-/jszip-3.1.4.tgz", - "integrity": "sha512-UaVbz4buRlBEolZYrxqkrGDOypugYlbqGNrUFB4qBaexrLypTH0jyvaF5jolNy5D+5C4kKV1WJ3Yx9cn/JH8oA==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/lodash": { - "version": "4.14.116", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.116.tgz", - "integrity": "sha512-lRnAtKnxMXcYYXqOiotTmJd74uawNWuPnsnPrrO7HiFuE3npE2iQhfABatbYDyxTNqZNuXzcKGhw37R7RjBFLg==", - "dev": true - }, - "@types/minimatch": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", - "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==", - "dev": true - }, - "@types/mkdirp": { - "version": "0.3.29", - "resolved": "https://registry.npmjs.org/@types/mkdirp/-/mkdirp-0.3.29.tgz", - "integrity": "sha1-fyrX7FX5FEgvybHsS7GuYCjUYGY=", - "dev": true - }, - "@types/node": { - "version": "8.5.10", - "resolved": "https://registry.npmjs.org/@types/node/-/node-8.5.10.tgz", - "integrity": "sha512-Duk5LjhRghZEzSYnjpJDxuWSUrswq1TeJGxqU/vbWx9v7PiwdwgxYBMGtkAx/E2pnWrDgrxOVdbr948VnKuIuQ==", - "dev": true - }, - "@types/shelljs": { - "version": "0.3.33", - "resolved": "https://registry.npmjs.org/@types/shelljs/-/shelljs-0.3.33.tgz", - "integrity": "sha1-32E73biCJe0JzlyDX2INyq8VXms=", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/uuid": { - "version": "2.0.30", - "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-2.0.30.tgz", - "integrity": "sha512-nmSJ0AL2mZAi68dYb7nKSIJ9YiM68eToP3Ugz66Ou7qkSatIptDM6CvOUmj4epMKWvO9gr9fFBxEEJkromp1Qg==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/validator": { - "version": "4.5.29", - "resolved": "https://registry.npmjs.org/@types/validator/-/validator-4.5.29.tgz", - "integrity": "sha1-R3/qhLcwCcHxPOYq7AU1leIiW+k=", - "dev": true - }, - "@types/winreg": { - "version": "1.2.30", - "resolved": "https://registry.npmjs.org/@types/winreg/-/winreg-1.2.30.tgz", - "integrity": "sha1-kdZxDlNtNFucmwF8V0z2qNpkxRg=", - "dev": true - }, - "@types/xml2js": { - "version": "0.0.27", - "resolved": "https://registry.npmjs.org/@types/xml2js/-/xml2js-0.0.27.tgz", - "integrity": "sha1-5a01i5UNhH2wPl6jihr4c2vR78c=", - "dev": true - }, - "acorn": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz", - "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=", - "dev": true - }, - "align-text": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", - "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", - "dev": true, - "requires": { - "kind-of": "^3.0.2", - "longest": "^1.0.1", - "repeat-string": "^1.5.2" - } - }, - "amdefine": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", - "dev": true - }, - "anymatch": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz", - "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", - "dev": true, - "requires": { - "micromatch": "^2.1.5", - "normalize-path": "^2.0.0" - } - }, - "app-root-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/app-root-path/-/app-root-path-1.0.0.tgz", - "integrity": "sha1-LHKZF0vGHLhv46SnmOAeSTt9U30=" - }, - "arch": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/arch/-/arch-2.1.1.tgz", - "integrity": "sha512-BLM56aPo9vLLFVa8+/+pJLnrZ7QGGTVHWsCwieAWT9o9K8UeGaQbzZbGoabWLOo2ksBCztoXdqBZBplqLDDCSg==" - }, - "archiver": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/archiver/-/archiver-2.0.3.tgz", - "integrity": "sha1-tDYLtYSvFDeZGUJxbyHXxSPR270=", - "requires": { - "archiver-utils": "^1.3.0", - "async": "^2.0.0", - "buffer-crc32": "^0.2.1", - "glob": "^7.0.0", - "lodash": "^4.8.0", - "readable-stream": "^2.0.0", - "tar-stream": "^1.5.0", - "walkdir": "^0.0.11", - "zip-stream": "^1.2.0" - }, - "dependencies": { - "async": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", - "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", - "requires": { - "lodash": "^4.17.10" - } - } - } - }, - "archiver-utils": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/archiver-utils/-/archiver-utils-1.3.0.tgz", - "integrity": "sha1-5QtMCccL89aA4y/xt5lOn52JUXQ=", - "requires": { - "glob": "^7.0.0", - "graceful-fs": "^4.1.0", - "lazystream": "^1.0.0", - "lodash": "^4.8.0", - "normalize-path": "^2.0.0", - "readable-stream": "^2.0.0" - } - }, - "arr-diff": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", - "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", - "dev": true, - "requires": { - "arr-flatten": "^1.0.1" - } - }, - "arr-flatten": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", - "dev": true - }, - "array-find-index": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", - "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=" - }, - "array-unique": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", - "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", - "dev": true - }, - "arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=" - }, - "assert": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz", - "integrity": "sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=", - "dev": true, - "requires": { - "util": "0.10.3" - }, - "dependencies": { - "inherits": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", - "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", - "dev": true - }, - "util": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", - "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", - "dev": true, - "requires": { - "inherits": "2.0.1" - } - } - } - }, - "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" - }, - "async-each": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", - "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=", - "dev": true - }, - "azure-devops-node-api": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/azure-devops-node-api/-/azure-devops-node-api-7.2.0.tgz", - "integrity": "sha512-pMfGJ6gAQ7LRKTHgiRF+8iaUUeGAI0c8puLaqHLc7B8AR7W6GJLozK9RFeUHFjEGybC9/EB3r67WPd7e46zQ8w==", - "requires": { - "os": "0.1.1", - "tunnel": "0.0.4", - "typed-rest-client": "1.2.0", - "underscore": "1.8.3" - }, - "dependencies": { - "underscore": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", - "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" - } - } - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" - }, - "base64-js": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", - "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==" - }, - "big.js": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz", - "integrity": "sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==", - "dev": true - }, - "binary-extensions": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.11.0.tgz", - "integrity": "sha1-RqoXUftqL5PuXmibsQh9SxTGwgU=", - "dev": true - }, - "bl": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.2.tgz", - "integrity": "sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==", - "requires": { - "readable-stream": "^2.3.5", - "safe-buffer": "^5.1.1" - } - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", - "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", - "dev": true, - "requires": { - "expand-range": "^1.8.1", - "preserve": "^0.2.0", - "repeat-element": "^1.1.2" - } - }, - "browserify-aes": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-0.4.0.tgz", - "integrity": "sha1-BnFJtmjfMcS1hTPgLQHoBthgjiw=", - "dev": true, - "requires": { - "inherits": "^2.0.1" - } - }, - "browserify-zlib": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.1.4.tgz", - "integrity": "sha1-uzX4pRn2AOD6a4SFJByXnQFB+y0=", - "dev": true, - "requires": { - "pako": "~0.2.0" - }, - "dependencies": { - "pako": { - "version": "0.2.9", - "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz", - "integrity": "sha1-8/dSL073gjSNqBYbrZ7P1Rv4OnU=", - "dev": true - } - } - }, - "buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.2.1.tgz", - "integrity": "sha512-c+Ko0loDaFfuPWiL02ls9Xd3GO3cPVmUobQ6t3rXNUk304u6hGq+8N/kFi+QEIKhzK3uwolVhLzszmfLmMLnqg==", - "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4" - } - }, - "buffer-alloc": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", - "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", - "requires": { - "buffer-alloc-unsafe": "^1.1.0", - "buffer-fill": "^1.0.0" - } - }, - "buffer-alloc-unsafe": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", - "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==" - }, - "buffer-crc32": { - "version": "0.2.13", - "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", - "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=" - }, - "buffer-fill": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", - "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=" - }, - "builtin-modules": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=" - }, - "builtin-status-codes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", - "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", - "dev": true - }, - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=" - }, - "camelcase-keys": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-4.2.0.tgz", - "integrity": "sha1-oqpfsa9oh1glnDLBQUJteJI7m3c=", - "requires": { - "camelcase": "^4.1.0", - "map-obj": "^2.0.0", - "quick-lru": "^1.0.0" - } - }, - "center-align": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", - "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", - "dev": true, - "requires": { - "align-text": "^0.1.3", - "lazy-cache": "^1.0.3" - } - }, - "chokidar": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", - "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", - "dev": true, - "requires": { - "anymatch": "^1.3.0", - "async-each": "^1.0.0", - "fsevents": "^1.0.0", - "glob-parent": "^2.0.0", - "inherits": "^2.0.1", - "is-binary-path": "^1.0.0", - "is-glob": "^2.0.0", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.0.0" - } - }, - "clipboardy": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/clipboardy/-/clipboardy-1.2.3.tgz", - "integrity": "sha512-2WNImOvCRe6r63Gk9pShfkwXsVtKCroMAevIbiae021mS850UkWPbevxsBz3tnvjZIEGvlwaqCPsw+4ulzNgJA==", - "requires": { - "arch": "^2.1.0", - "execa": "^0.8.0" - } - }, - "cliui": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", - "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", - "dev": true, - "requires": { - "center-align": "^0.1.1", - "right-align": "^0.1.1", - "wordwrap": "0.0.2" - }, - "dependencies": { - "wordwrap": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", - "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", - "dev": true - } - } - }, - "clone": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", - "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", - "dev": true - }, - "colors": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.3.2.tgz", - "integrity": "sha512-rhP0JSBGYvpcNQj4s5AdShMeE5ahMop96cTeDl/v9qQQm2fYClE2QXZRi8wLzc+GmXSxdIqqbOIAhyObEXDbfQ==" - }, - "compress-commons": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/compress-commons/-/compress-commons-1.2.2.tgz", - "integrity": "sha1-UkqfEJA/OoEzibAiXSfEi7dRiQ8=", - "requires": { - "buffer-crc32": "^0.2.1", - "crc32-stream": "^2.0.0", - "normalize-path": "^2.0.0", - "readable-stream": "^2.0.0" - } - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "console-browserify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", - "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", - "dev": true, - "requires": { - "date-now": "^0.1.4" - } - }, - "constants-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", - "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", - "dev": true - }, - "core-js": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.3.0.tgz", - "integrity": "sha1-+rg/uwstjchfpjbEudNMdUIMbWU=" - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" - }, - "crc": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/crc/-/crc-3.8.0.tgz", - "integrity": "sha512-iX3mfgcTMIq3ZKLIsVFAbv7+Mc10kxabAGQb8HvjA1o3T1PIYprbakQ65d3I+2HGHt6nSKkM9PYjgoJO2KcFBQ==", - "requires": { - "buffer": "^5.1.0" - } - }, - "crc32-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/crc32-stream/-/crc32-stream-2.0.0.tgz", - "integrity": "sha1-483TtN8xaN10494/u8t7KX/pCPQ=", - "requires": { - "crc": "^3.4.4", - "readable-stream": "^2.0.0" - } - }, - "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", - "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "crypto-browserify": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.3.0.tgz", - "integrity": "sha1-ufx1u0oO1h3PHNXa6W6zDJw+UGw=", - "dev": true, - "requires": { - "browserify-aes": "0.4.0", - "pbkdf2-compat": "2.0.1", - "ripemd160": "0.2.0", - "sha.js": "2.2.6" - } - }, - "currently-unhandled": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", - "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", - "requires": { - "array-find-index": "^1.0.1" - } - }, - "cycle": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/cycle/-/cycle-1.0.3.tgz", - "integrity": "sha1-IegLK+hYD5i0aPN5QwZisEbDStI=" - }, - "date-now": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", - "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", - "dev": true - }, - "dateformat": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.11.tgz", - "integrity": "sha1-8ny+56ASu/uC6gUVYtOXf2CT27E=", - "requires": { - "get-stdin": "*", - "meow": "*" - } - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" - }, - "decamelize-keys": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.0.tgz", - "integrity": "sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk=", - "requires": { - "decamelize": "^1.1.0", - "map-obj": "^1.0.0" - }, - "dependencies": { - "map-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=" - } - } - }, - "deep-equal": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", - "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=" - }, - "define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "requires": { - "object-keys": "^1.0.12" - } - }, - "domain-browser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", - "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", - "dev": true - }, - "emojis-list": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", - "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=", - "dev": true - }, - "end-of-stream": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", - "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", - "requires": { - "once": "^1.4.0" - } - }, - "enhanced-resolve": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-0.9.1.tgz", - "integrity": "sha1-TW5omzcl+GCQknzMhs2fFjW4ni4=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "memory-fs": "^0.2.0", - "tapable": "^0.1.8" - }, - "dependencies": { - "memory-fs": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.2.0.tgz", - "integrity": "sha1-8rslNovBIeORwlIN6Slpyu4KApA=", - "dev": true - } - } - }, - "errno": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", - "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", - "dev": true, - "requires": { - "prr": "~1.0.1" - } - }, - "error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "requires": { - "is-arrayish": "^0.2.1" - } - }, - "es-abstract": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.12.0.tgz", - "integrity": "sha512-C8Fx/0jFmV5IPoMOFPA9P9G5NtqW+4cOPit3MIuvR2t7Ag2K15EJTpxnHAYTzL+aYQJIESYeXZmDBfOBE1HcpA==", - "requires": { - "es-to-primitive": "^1.1.1", - "function-bind": "^1.1.1", - "has": "^1.0.1", - "is-callable": "^1.1.3", - "is-regex": "^1.0.4" - } - }, - "es-to-primitive": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.1.1.tgz", - "integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=", - "requires": { - "is-callable": "^1.1.1", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.1" - } - }, - "es6-promise": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.0.2.tgz", - "integrity": "sha1-AQ1YWEI6XxGJeWZfRkhqlcbuK7Y=" - }, - "events": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", - "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=", - "dev": true - }, - "execa": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.8.0.tgz", - "integrity": "sha1-2NdrvBtVIX7RkP1t1J08d07PyNo=", - "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, - "expand-brackets": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", - "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", - "dev": true, - "requires": { - "is-posix-bracket": "^0.1.0" - } - }, - "expand-range": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", - "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", - "dev": true, - "requires": { - "fill-range": "^2.1.0" - } - }, - "extglob": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", - "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", - "dev": true, - "requires": { - "is-extglob": "^1.0.0" - } - }, - "eyes": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz", - "integrity": "sha1-Ys8SAjTGg3hdkCNIqADvPgzCC8A=" - }, - "filename-regex": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", - "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=", - "dev": true - }, - "fill-range": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz", - "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==", - "dev": true, - "requires": { - "is-number": "^2.1.0", - "isobject": "^2.0.0", - "randomatic": "^3.0.0", - "repeat-element": "^1.1.2", - "repeat-string": "^1.5.2" - } - }, - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "requires": { - "locate-path": "^2.0.0" - } - }, - "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", - "dev": true - }, - "for-own": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", - "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", - "dev": true, - "requires": { - "for-in": "^1.0.1" - } - }, - "fs-constants": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", - "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, - "fsevents": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.9.tgz", - "integrity": "sha512-oeyj2H3EjjonWcFjD5NvZNE9Rqe4UW+nQBU2HNeKw0koVLEFIhtyETyAakeAM3de7Z/SW5kcA+fZUait9EApnw==", - "dev": true, - "optional": true, - "requires": { - "nan": "^2.12.1", - "node-pre-gyp": "^0.12.0" - }, - "dependencies": { - "abbrev": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "aproba": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - }, - "are-we-there-yet": { - "version": "1.1.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, - "balanced-match": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "brace-expansion": { - "version": "1.1.11", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "chownr": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "console-control-strings": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true - }, - "core-util-is": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "debug": { - "version": "4.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ms": "^2.1.1" - } - }, - "deep-extend": { - "version": "0.6.0", - "bundled": true, - "dev": true, - "optional": true - }, - "delegates": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "detect-libc": { - "version": "1.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "fs-minipass": { - "version": "1.2.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "gauge": { - "version": "2.7.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" - } - }, - "glob": { - "version": "7.1.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "has-unicode": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "iconv-lite": { - "version": "0.4.24", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "ignore-walk": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minimatch": "^3.0.4" - } - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "ini": { - "version": "1.3.5", - "bundled": true, - "dev": true, - "optional": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "isarray": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "bundled": true, - "dev": true, - "optional": true - }, - "minipass": { - "version": "2.3.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "^5.1.2", - "yallist": "^3.0.0" - } - }, - "minizlib": { - "version": "1.2.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "needle": { - "version": "2.3.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "debug": "^4.1.0", - "iconv-lite": "^0.4.4", - "sax": "^1.2.4" - } - }, - "node-pre-gyp": { - "version": "0.12.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "detect-libc": "^1.0.2", - "mkdirp": "^0.5.1", - "needle": "^2.2.1", - "nopt": "^4.0.1", - "npm-packlist": "^1.1.6", - "npmlog": "^4.0.2", - "rc": "^1.2.7", - "rimraf": "^2.6.1", - "semver": "^5.3.0", - "tar": "^4" - } - }, - "nopt": { - "version": "4.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "abbrev": "1", - "osenv": "^0.1.4" - } - }, - "npm-bundled": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "optional": true - }, - "npm-packlist": { - "version": "1.4.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" - } - }, - "npmlog": { - "version": "4.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "once": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "wrappy": "1" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "os-tmpdir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "osenv": { - "version": "0.1.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "process-nextick-args": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "rc": { - "version": "1.2.8", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "readable-stream": { - "version": "2.3.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "rimraf": { - "version": "2.6.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "glob": "^7.1.3" - } - }, - "safe-buffer": { - "version": "5.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "safer-buffer": { - "version": "2.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "sax": { - "version": "1.2.4", - "bundled": true, - "dev": true, - "optional": true - }, - "semver": { - "version": "5.7.0", - "bundled": true, - "dev": true, - "optional": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "tar": { - "version": "4.4.8", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "chownr": "^1.1.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.3.4", - "minizlib": "^1.1.1", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.2", - "yallist": "^3.0.2" - } - }, - "util-deprecate": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "wide-align": { - "version": "1.1.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "string-width": "^1.0.2 || 2" - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "yallist": { - "version": "3.0.3", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" - }, - "get-stdin": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz", - "integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==" - }, - "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" - }, - "glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-base": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", - "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", - "dev": true, - "requires": { - "glob-parent": "^2.0.0", - "is-glob": "^2.0.0" - } - }, - "glob-parent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", - "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", - "dev": true, - "requires": { - "is-glob": "^2.0.0" - } - }, - "graceful-fs": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", - "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", - "dev": true - }, - "hosted-git-info": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", - "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==" - }, - "https-browserify": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-0.0.1.tgz", - "integrity": "sha1-P5E2XKvmC3ftDruiS0VOPgnZWoI=", - "dev": true - }, - "i": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/i/-/i-0.3.6.tgz", - "integrity": "sha1-2WyScyB28HJxG2sQ/X1PZa2O4j0=" - }, - "ieee754": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.12.tgz", - "integrity": "sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA==" - }, - "immediate": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", - "integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=" - }, - "indent-string": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz", - "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=" - }, - "indexof": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", - "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=", - "dev": true - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - }, - "interpret": { - "version": "0.6.6", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-0.6.6.tgz", - "integrity": "sha1-/s16GOfOXKar+5U+H4YhOknxYls=", - "dev": true - }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" - }, - "is-binary-path": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", - "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", - "dev": true, - "requires": { - "binary-extensions": "^1.0.0" - } - }, - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true - }, - "is-builtin-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", - "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", - "requires": { - "builtin-modules": "^1.0.0" - } - }, - "is-callable": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", - "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==" - }, - "is-date-object": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", - "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=" - }, - "is-dotfile": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", - "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=", - "dev": true - }, - "is-equal-shallow": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", - "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", - "dev": true, - "requires": { - "is-primitive": "^2.0.0" - } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true - }, - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "dev": true - }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "dev": true, - "requires": { - "is-extglob": "^1.0.0" - } - }, - "is-number": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", - "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-plain-obj": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", - "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=" - }, - "is-posix-bracket": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", - "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=", - "dev": true - }, - "is-primitive": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", - "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", - "dev": true - }, - "is-regex": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", - "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", - "requires": { - "has": "^1.0.1" - } - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" - }, - "is-symbol": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.1.tgz", - "integrity": "sha1-PMWfAAJRlLarLjjbrmaJJWtmBXI=" - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" - }, - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dev": true, - "requires": { - "isarray": "1.0.0" - } - }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" - }, - "json-in-place": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-in-place/-/json-in-place-1.0.1.tgz", - "integrity": "sha1-ih7NJaac4ZAFUs1xUr2TdU3k4fA=", - "requires": { - "json-lexer": "1.1.1" - } - }, - "json-lexer": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/json-lexer/-/json-lexer-1.1.1.tgz", - "integrity": "sha1-vT7V1+Vgudma0iNPKMpwb7N3t9Q=" - }, - "json-parse-better-errors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==" - }, - "json5": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", - "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", - "dev": true - }, - "jszip": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.1.5.tgz", - "integrity": "sha512-5W8NUaFRFRqTOL7ZDDrx5qWHJyBXy6velVudIzQUSoqAAYqzSh2Z7/m0Rf1QbmQJccegD0r+YZxBjzqoBiEeJQ==", - "requires": { - "core-js": "~2.3.0", - "es6-promise": "~3.0.2", - "lie": "~3.1.0", - "pako": "~1.0.2", - "readable-stream": "~2.0.6" - }, - "dependencies": { - "process-nextick-args": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" - }, - "readable-stream": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", - "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "~1.0.0", - "process-nextick-args": "~1.0.6", - "string_decoder": "~0.10.x", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" - } - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - }, - "lazy-cache": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", - "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", - "dev": true - }, - "lazystream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz", - "integrity": "sha1-9plf4PggOS9hOWvolGJAe7dxaOQ=", - "requires": { - "readable-stream": "^2.0.5" - } - }, - "lie": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/lie/-/lie-3.1.1.tgz", - "integrity": "sha1-mkNrLMd0bKWd56QfpGmz77dr2H4=", - "requires": { - "immediate": "~3.0.5" - } - }, - "load-json-file": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", - "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", - "strip-bom": "^3.0.0" - } - }, - "loader-utils": { - "version": "0.2.17", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.17.tgz", - "integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=", - "dev": true, - "requires": { - "big.js": "^3.1.3", - "emojis-list": "^2.0.0", - "json5": "^0.5.0", - "object-assign": "^4.0.1" - } - }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - } - }, - "lodash": { - "version": "4.17.10", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", - "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==" - }, - "longest": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", - "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", - "dev": true - }, - "loud-rejection": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", - "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", - "requires": { - "currently-unhandled": "^0.4.1", - "signal-exit": "^3.0.0" - } - }, - "lru-cache": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", - "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "map-obj": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-2.0.0.tgz", - "integrity": "sha1-plzSkIepJZi4eRJXpSPgISIqwfk=" - }, - "math-random": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.1.tgz", - "integrity": "sha1-izqsWIuKZuSXXjzepn97sylgH6w=", - "dev": true - }, - "memory-fs": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.3.0.tgz", - "integrity": "sha1-e8xrYp46Q+hx1+Kaymrop/FcuyA=", - "dev": true, - "requires": { - "errno": "^0.1.3", - "readable-stream": "^2.0.1" - } - }, - "meow": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-5.0.0.tgz", - "integrity": "sha512-CbTqYU17ABaLefO8vCU153ZZlprKYWDljcndKKDCFcYQITzWCXZAVk4QMFZPgvzrnUQ3uItnIE/LoUOwrT15Ig==", - "requires": { - "camelcase-keys": "^4.0.0", - "decamelize-keys": "^1.0.0", - "loud-rejection": "^1.0.0", - "minimist-options": "^3.0.1", - "normalize-package-data": "^2.3.4", - "read-pkg-up": "^3.0.0", - "redent": "^2.0.0", - "trim-newlines": "^2.0.0", - "yargs-parser": "^10.0.0" - } - }, - "micromatch": { - "version": "2.3.11", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", - "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", - "dev": true, - "requires": { - "arr-diff": "^2.0.0", - "array-unique": "^0.2.1", - "braces": "^1.8.2", - "expand-brackets": "^0.1.4", - "extglob": "^0.3.1", - "filename-regex": "^2.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.1", - "kind-of": "^3.0.2", - "normalize-path": "^2.0.1", - "object.omit": "^2.0.0", - "parse-glob": "^3.0.4", - "regex-cache": "^0.4.2" - } - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" - }, - "minimist-options": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-3.0.2.tgz", - "integrity": "sha512-FyBrT/d0d4+uiZRbqznPXqw3IpZZG3gl3wKWiX784FycUKVwBt0uLBFkQrtE4tZOrgo78nZp2jnKz3L65T5LdQ==", - "requires": { - "arrify": "^1.0.1", - "is-plain-obj": "^1.1.0" - } - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "requires": { - "minimist": "0.0.8" - }, - "dependencies": { - "minimist": { - "version": "0.0.8", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" - } - } - }, - "mute-stream": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", - "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=" - }, - "nan": { - "version": "2.13.2", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.13.2.tgz", - "integrity": "sha512-TghvYc72wlMGMVMluVo9WRJc0mB8KxxF/gZ4YYFy7V2ZQX9l7rgbPg7vjS9mt6U5HXODVFVI2bOduCzwOMv/lw==", - "dev": true, - "optional": true - }, - "ncp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ncp/-/ncp-2.0.0.tgz", - "integrity": "sha1-GVoh1sRuNh0vsSgbo4uR6d9727M=", - "dev": true - }, - "node-libs-browser": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-0.7.0.tgz", - "integrity": "sha1-PicsCBnjCJNeJmdECNevDhSRuDs=", - "dev": true, - "requires": { - "assert": "^1.1.1", - "browserify-zlib": "^0.1.4", - "buffer": "^4.9.0", - "console-browserify": "^1.1.0", - "constants-browserify": "^1.0.0", - "crypto-browserify": "3.3.0", - "domain-browser": "^1.1.1", - "events": "^1.0.0", - "https-browserify": "0.0.1", - "os-browserify": "^0.2.0", - "path-browserify": "0.0.0", - "process": "^0.11.0", - "punycode": "^1.2.4", - "querystring-es3": "^0.2.0", - "readable-stream": "^2.0.5", - "stream-browserify": "^2.0.1", - "stream-http": "^2.3.1", - "string_decoder": "^0.10.25", - "timers-browserify": "^2.0.2", - "tty-browserify": "0.0.0", - "url": "^0.11.0", - "util": "^0.10.3", - "vm-browserify": "0.0.4" - }, - "dependencies": { - "buffer": { - "version": "4.9.1", - "resolved": "http://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", - "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", - "dev": true, - "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4", - "isarray": "^1.0.0" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - } - } - }, - "normalize-package-data": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", - "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", - "requires": { - "hosted-git-info": "^2.1.4", - "is-builtin-module": "^1.0.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "requires": { - "remove-trailing-separator": "^1.0.1" - } - }, - "npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", - "requires": { - "path-key": "^2.0.0" - } - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "dev": true - }, - "object-keys": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz", - "integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==" - }, - "object.getownpropertydescriptors": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz", - "integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=", - "requires": { - "define-properties": "^1.1.2", - "es-abstract": "^1.5.1" - } - }, - "object.omit": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", - "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", - "dev": true, - "requires": { - "for-own": "^0.1.4", - "is-extendable": "^0.1.1" - } - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "requires": { - "wrappy": "1" - } - }, - "onecolor": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/onecolor/-/onecolor-2.5.0.tgz", - "integrity": "sha1-Ila2UdyAfBAfAK7b1JklxXpEMcE=" - }, - "optimist": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", - "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", - "dev": true, - "requires": { - "minimist": "~0.0.1", - "wordwrap": "~0.0.2" - }, - "dependencies": { - "minimist": { - "version": "0.0.10", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", - "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=", - "dev": true - } - } - }, - "os": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/os/-/os-0.1.1.tgz", - "integrity": "sha1-IIhF6J4ZOtTZcUdLk5R3NqVtE/M=" - }, - "os-browserify": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.2.1.tgz", - "integrity": "sha1-Y/xMzuXS13Y9Jrv4YBB45sLgBE8=", - "dev": true - }, - "os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" - }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" - }, - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=" - }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=" - }, - "pako": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.6.tgz", - "integrity": "sha512-lQe48YPsMJAig+yngZ87Lus+NF+3mtu7DVOBu6b/gHO1YpKwIj5AWjZ/TOS7i46HD/UixzWb1zeWDZfGZ3iYcg==" - }, - "parse-glob": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", - "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", - "dev": true, - "requires": { - "glob-base": "^0.3.0", - "is-dotfile": "^1.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.0" - } - }, - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - } - }, - "path-browserify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz", - "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=", - "dev": true - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" - }, - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=" - }, - "path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", - "requires": { - "pify": "^3.0.0" - } - }, - "pbkdf2-compat": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pbkdf2-compat/-/pbkdf2-compat-2.0.1.tgz", - "integrity": "sha1-tuDI+plJTZTgURV1gCpZpcFC8og=", - "dev": true - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" - }, - "pkginfo": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/pkginfo/-/pkginfo-0.4.1.tgz", - "integrity": "sha1-tUGO8EOd5UJfxJlQQtztFPsqhP8=" - }, - "preserve": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", - "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=", - "dev": true - }, - "process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", - "dev": true - }, - "process-nextick-args": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" - }, - "prompt": { - "version": "0.2.14", - "resolved": "https://registry.npmjs.org/prompt/-/prompt-0.2.14.tgz", - "integrity": "sha1-V3VPZPVD/XsIRXB8gY7OYY8F/9w=", - "requires": { - "pkginfo": "0.x.x", - "read": "1.0.x", - "revalidator": "0.1.x", - "utile": "0.2.x", - "winston": "0.8.x" - } - }, - "prr": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", - "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", - "dev": true - }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" - }, - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true - }, - "querystring": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", - "dev": true - }, - "querystring-es3": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", - "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", - "dev": true - }, - "quick-lru": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-1.1.0.tgz", - "integrity": "sha1-Q2CxfGETatOAeDl/8RQW4Ybc+7g=" - }, - "randomatic": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-3.1.0.tgz", - "integrity": "sha512-KnGPVE0lo2WoXxIZ7cPR8YBpiol4gsSuOwDSg410oHh80ZMp5EiypNqL2K4Z77vJn6lB5rap7IkAmcUlalcnBQ==", - "dev": true, - "requires": { - "is-number": "^4.0.0", - "kind-of": "^6.0.0", - "math-random": "^1.0.1" - }, - "dependencies": { - "is-number": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", - "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", - "dev": true - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true - } - } - }, - "read": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/read/-/read-1.0.7.tgz", - "integrity": "sha1-s9oZvQUkMal2cdRKQmNK33ELQMQ=", - "requires": { - "mute-stream": "~0.0.4" - } - }, - "read-pkg": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", - "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", - "requires": { - "load-json-file": "^4.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^3.0.0" - } - }, - "read-pkg-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", - "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", - "requires": { - "find-up": "^2.0.0", - "read-pkg": "^3.0.0" - } - }, - "readable-stream": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "readdirp": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz", - "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "minimatch": "^3.0.2", - "readable-stream": "^2.0.2", - "set-immediate-shim": "^1.0.1" - } - }, - "redent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-2.0.0.tgz", - "integrity": "sha1-wbIAe0LVfrE4kHmzyDM2OdXhzKo=", - "requires": { - "indent-string": "^3.0.0", - "strip-indent": "^2.0.0" - } - }, - "regex-cache": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", - "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", - "dev": true, - "requires": { - "is-equal-shallow": "^0.1.3" - } - }, - "remove-trailing-separator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=" - }, - "repeat-element": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", - "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", - "dev": true - }, - "repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", - "dev": true - }, - "revalidator": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/revalidator/-/revalidator-0.1.8.tgz", - "integrity": "sha1-/s5hv6DBtSoga9axgZgYS91SOjs=" - }, - "right-align": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", - "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", - "dev": true, - "requires": { - "align-text": "^0.1.1" - } - }, - "rimraf": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", - "requires": { - "glob": "^7.0.5" - } - }, - "ripemd160": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-0.2.0.tgz", - "integrity": "sha1-K/GYveFnys+lHAqSjoS2i74XH84=", - "dev": true - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "sax": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" - }, - "semver": { - "version": "5.5.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.1.tgz", - "integrity": "sha512-PqpAxfrEhlSUWge8dwIp4tZnQ25DIOthpiaHNIthsjEFQD6EvqUKUDM7L8O2rShkFccYo1VjJR0coWfNkCubRw==" - }, - "set-immediate-shim": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", - "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=", - "dev": true - }, - "setimmediate": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", - "dev": true - }, - "sha.js": { - "version": "2.2.6", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.2.6.tgz", - "integrity": "sha1-F93t3F9yL7ZlAWWIlUYZd4ZzFbo=", - "dev": true - }, - "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "requires": { - "shebang-regex": "^1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" - }, - "shelljs": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.5.3.tgz", - "integrity": "sha1-xUmCuZbHbvDB5rWfvcWCX1txMRM=" - }, - "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" - }, - "source-list-map": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-0.1.8.tgz", - "integrity": "sha1-xVCyq1Qn9rPyH1r+rYjE9Vh7IQY=", - "dev": true - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - }, - "spdx-correct": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz", - "integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==", - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-exceptions": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz", - "integrity": "sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg==" - }, - "spdx-expression-parse": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", - "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", - "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-license-ids": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz", - "integrity": "sha512-2+EPwgbnmOIl8HjGBXXMd9NAu02vLjOO1nWw4kmeRDFyHn+M/ETfHxQUK0oXg8ctgVnl9t3rosNVsZ1jG61nDA==" - }, - "stack-trace": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", - "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=" - }, - "stream-browserify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz", - "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=", - "dev": true, - "requires": { - "inherits": "~2.0.1", - "readable-stream": "^2.0.2" - } - }, - "stream-http": { - "version": "2.8.3", - "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz", - "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==", - "dev": true, - "requires": { - "builtin-status-codes": "^3.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.3.6", - "to-arraybuffer": "^1.0.0", - "xtend": "^4.0.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" - }, - "strip-eof": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=" - }, - "strip-indent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz", - "integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=" - }, - "supports-color": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", - "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", - "dev": true, - "requires": { - "has-flag": "^1.0.0" - } - }, - "tapable": { - "version": "0.1.10", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-0.1.10.tgz", - "integrity": "sha1-KcNXB8K3DlDQdIK10gLo7URtr9Q=", - "dev": true - }, - "tar-stream": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.1.tgz", - "integrity": "sha512-IFLM5wp3QrJODQFPm6/to3LJZrONdBY/otxcvDIQzu217zKye6yVR3hhi9lAjrC2Z+m/j5oDxMPb1qcd8cIvpA==", - "requires": { - "bl": "^1.0.0", - "buffer-alloc": "^1.1.0", - "end-of-stream": "^1.0.0", - "fs-constants": "^1.0.0", - "readable-stream": "^2.3.0", - "to-buffer": "^1.1.0", - "xtend": "^4.0.0" - } - }, - "timers-browserify": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.10.tgz", - "integrity": "sha512-YvC1SV1XdOUaL6gx5CoGroT3Gu49pK9+TZ38ErPldOWW4j49GI1HKs9DV+KGq/w6y+LZ72W1c8cKz2vzY+qpzg==", - "dev": true, - "requires": { - "setimmediate": "^1.0.4" - } - }, - "tinytim": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/tinytim/-/tinytim-0.1.1.tgz", - "integrity": "sha1-yWih5VWa2VUyJO92J7qzTjyu+Kg=" - }, - "tmp": { - "version": "0.0.26", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.26.tgz", - "integrity": "sha1-nvqCDOKhD4H4l5VVus4/FVJs4fI=", - "requires": { - "os-tmpdir": "~1.0.0" - } - }, - "to-arraybuffer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", - "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=", - "dev": true - }, - "to-buffer": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz", - "integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==" - }, - "tracer": { - "version": "0.7.4", - "resolved": "https://registry.npmjs.org/tracer/-/tracer-0.7.4.tgz", - "integrity": "sha1-d/oEN8+Ct2vNvNRLhHRHcuWeUlk=", - "requires": { - "colors": "1.0.3", - "dateformat": "1.0.11", - "tinytim": "0.1.1" - }, - "dependencies": { - "colors": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", - "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=" - } - } - }, - "trim-newlines": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-2.0.0.tgz", - "integrity": "sha1-tAPQuRvlDDMd/EuC7s6yLD3hbSA=" - }, - "tty-browserify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", - "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=", - "dev": true - }, - "tunnel": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.4.tgz", - "integrity": "sha1-LTeFoVjBdMmhbcLARuxfxfF0IhM=" - }, - "typed-rest-client": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.2.0.tgz", - "integrity": "sha512-FrUshzZ1yxH8YwGR29PWWnfksLEILbWJydU7zfIRkyH7kAEzB62uMAl2WY6EyolWpLpVHeJGgQm45/MaruaHpw==", - "requires": { - "tunnel": "0.0.4", - "underscore": "1.8.3" - }, - "dependencies": { - "underscore": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", - "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" - } - } - }, - "typescript": { - "version": "3.4.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.4.5.tgz", - "integrity": "sha512-YycBxUb49UUhdNMU5aJ7z5Ej2XGmaIBL0x34vZ82fn3hGvD+bgrMrVDpatgz2f7YxUMJxMkbWxJZeAvDxVe7Vw==", - "dev": true - }, - "uglify-js": { - "version": "2.7.5", - "resolved": "http://registry.npmjs.org/uglify-js/-/uglify-js-2.7.5.tgz", - "integrity": "sha1-RhLAx7qu4rp8SH3kkErhIgefLKg=", - "dev": true, - "requires": { - "async": "~0.2.6", - "source-map": "~0.5.1", - "uglify-to-browserify": "~1.0.0", - "yargs": "~3.10.0" - }, - "dependencies": { - "async": { - "version": "0.2.10", - "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz", - "integrity": "sha1-trvgsGdLnXGXCMo43owjfLUmw9E=", - "dev": true - } - } - }, - "uglify-to-browserify": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", - "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", - "dev": true - }, - "url": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", - "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", - "dev": true, - "requires": { - "punycode": "1.3.2", - "querystring": "0.2.0" - }, - "dependencies": { - "punycode": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", - "dev": true - } - } - }, - "util": { - "version": "0.10.4", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", - "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==", - "dev": true, - "requires": { - "inherits": "2.0.3" - } - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" - }, - "util.promisify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.0.tgz", - "integrity": "sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA==", - "requires": { - "define-properties": "^1.1.2", - "object.getownpropertydescriptors": "^2.0.3" - } - }, - "utile": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/utile/-/utile-0.2.1.tgz", - "integrity": "sha1-kwyI6ZCY1iIINMNWy9mncFItkNc=", - "requires": { - "async": "~0.2.9", - "deep-equal": "*", - "i": "0.3.x", - "mkdirp": "0.x.x", - "ncp": "0.4.x", - "rimraf": "2.x.x" - }, - "dependencies": { - "async": { - "version": "0.2.10", - "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz", - "integrity": "sha1-trvgsGdLnXGXCMo43owjfLUmw9E=" - }, - "ncp": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/ncp/-/ncp-0.4.2.tgz", - "integrity": "sha1-q8xsvT7C7Spyn/bnwfqPAXhKhXQ=" - } - } - }, - "uuid": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" - }, - "validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "validator": { - "version": "3.43.0", - "resolved": "http://registry.npmjs.org/validator/-/validator-3.43.0.tgz", - "integrity": "sha1-lkZLmS1BloM9l6GUv0Cxn/VLrgU=" - }, - "vm-browserify": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", - "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=", - "dev": true, - "requires": { - "indexof": "0.0.1" - } - }, - "walkdir": { - "version": "0.0.11", - "resolved": "https://registry.npmjs.org/walkdir/-/walkdir-0.0.11.tgz", - "integrity": "sha1-oW0CXrkxvQO1LzCMrtD0D86+lTI=" - }, - "watchpack": { - "version": "0.2.9", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-0.2.9.tgz", - "integrity": "sha1-Yuqkq15bo1/fwBgnVibjwPXj+ws=", - "dev": true, - "requires": { - "async": "^0.9.0", - "chokidar": "^1.0.0", - "graceful-fs": "^4.1.2" - }, - "dependencies": { - "async": { - "version": "0.9.2", - "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", - "integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0=", - "dev": true - } - } - }, - "webpack": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-1.15.0.tgz", - "integrity": "sha1-T/MfU9sDM55VFkqdRo7gMklo/pg=", - "dev": true, - "requires": { - "acorn": "^3.0.0", - "async": "^1.3.0", - "clone": "^1.0.2", - "enhanced-resolve": "~0.9.0", - "interpret": "^0.6.4", - "loader-utils": "^0.2.11", - "memory-fs": "~0.3.0", - "mkdirp": "~0.5.0", - "node-libs-browser": "^0.7.0", - "optimist": "~0.6.0", - "supports-color": "^3.1.0", - "tapable": "~0.1.8", - "uglify-js": "~2.7.3", - "watchpack": "^0.2.1", - "webpack-core": "~0.6.9" - } - }, - "webpack-core": { - "version": "0.6.9", - "resolved": "https://registry.npmjs.org/webpack-core/-/webpack-core-0.6.9.tgz", - "integrity": "sha1-/FcViMhVjad76e+23r3Fo7FyvcI=", - "dev": true, - "requires": { - "source-list-map": "~0.1.7", - "source-map": "~0.4.1" - }, - "dependencies": { - "source-map": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", - "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", - "dev": true, - "requires": { - "amdefine": ">=0.0.4" - } - } - } - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "requires": { - "isexe": "^2.0.0" - } - }, - "window-size": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", - "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", - "dev": true - }, - "winreg": { - "version": "0.0.12", - "resolved": "https://registry.npmjs.org/winreg/-/winreg-0.0.12.tgz", - "integrity": "sha1-BxBVVLoanQiXklHRKUdb/64wBrc=" - }, - "winston": { - "version": "0.8.3", - "resolved": "http://registry.npmjs.org/winston/-/winston-0.8.3.tgz", - "integrity": "sha1-ZLar9M0Brcrv1QCTk7HY6L7BnbA=", - "requires": { - "async": "0.2.x", - "colors": "0.6.x", - "cycle": "1.0.x", - "eyes": "0.1.x", - "isstream": "0.1.x", - "pkginfo": "0.3.x", - "stack-trace": "0.0.x" - }, - "dependencies": { - "async": { - "version": "0.2.10", - "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz", - "integrity": "sha1-trvgsGdLnXGXCMo43owjfLUmw9E=" - }, - "colors": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/colors/-/colors-0.6.2.tgz", - "integrity": "sha1-JCP+ZnisDF2uiFLl0OW+CMmXq8w=" - }, - "pkginfo": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/pkginfo/-/pkginfo-0.3.1.tgz", - "integrity": "sha1-Wyn2qB9wcXFC4J52W76rl7T4HiE=" - } - } - }, - "wordwrap": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", - "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", - "dev": true - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - }, - "xml2js": { - "version": "0.4.19", - "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz", - "integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==", - "requires": { - "sax": ">=0.6.0", - "xmlbuilder": "~9.0.1" - } - }, - "xmlbuilder": { - "version": "9.0.7", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", - "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=" - }, - "xtend": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", - "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" - }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" - }, - "yargs": { - "version": "3.10.0", - "resolved": "http://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", - "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", - "dev": true, - "requires": { - "camelcase": "^1.0.2", - "cliui": "^2.1.0", - "decamelize": "^1.0.0", - "window-size": "0.1.0" - }, - "dependencies": { - "camelcase": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", - "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", - "dev": true - } - } - }, - "yargs-parser": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz", - "integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==", - "requires": { - "camelcase": "^4.1.0" - } - }, - "zip-stream": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-1.2.0.tgz", - "integrity": "sha1-qLxF9MG0lpnGuQGYuqyqzbzUugQ=", - "requires": { - "archiver-utils": "^1.3.0", - "compress-commons": "^1.2.0", - "lodash": "^4.8.0", - "readable-stream": "^2.0.0" - } - } - } -} diff --git a/package.json b/package.json index 5e190bca..1c10daa7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tfx-cli", - "version": "0.7.5", + "version": "0.7.51", "description": "CLI for Azure DevOps Services and Team Foundation Server", "repository": { "type": "git", From d73f70d35dc6439999b35bdf427fb0bbcf40895f Mon Sep 17 00:00:00 2001 From: Shani Feldman Date: Thu, 23 May 2019 22:37:42 +0300 Subject: [PATCH 224/235] pop version number to update npm package --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1c10daa7..380e0443 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tfx-cli", - "version": "0.7.51", + "version": "0.7.6", "description": "CLI for Azure DevOps Services and Team Foundation Server", "repository": { "type": "git", From b98f2653b37e671f781a5c0d63417e60db9eb59d Mon Sep 17 00:00:00 2001 From: Shani Feldman Date: Thu, 23 May 2019 22:43:35 +0300 Subject: [PATCH 225/235] add packa-lock file --- package-lock.json | 1357 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1357 insertions(+) create mode 100644 package-lock.json diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 00000000..d4767e29 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,1357 @@ +{ + "name": "tfx-cli", + "version": "0.7.6", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@types/clipboardy": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@types/clipboardy/-/clipboardy-1.1.0.tgz", + "integrity": "sha512-KOxf4ah9diZWmREM5jCupx2+pZaBPwKk5d5jeNK2+TY6IgEO35uhG55NnDT4cdXeRX8irDSHQPtdRrr0JOTQIw==", + "dev": true + }, + "@types/events": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@types/events/-/events-1.2.0.tgz", + "integrity": "sha512-KEIlhXnIutzKwRbQkGWb/I4HFqBuUykAdHgDED6xqwXJfONCjF5VoE0cXEiurh3XauygxzeDzgtXUqvLkxFzzA==", + "dev": true + }, + "@types/glob": { + "version": "5.0.35", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-5.0.35.tgz", + "integrity": "sha512-wc+VveszMLyMWFvXLkloixT4n0harUIVZjnpzztaZ0nKLuul7Z32iMt2fUFGAaZ4y1XWjFRMtCI5ewvyh4aIeg==", + "dev": true, + "requires": { + "@types/events": "*", + "@types/minimatch": "*", + "@types/node": "*" + } + }, + "@types/jszip": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/@types/jszip/-/jszip-3.1.4.tgz", + "integrity": "sha512-UaVbz4buRlBEolZYrxqkrGDOypugYlbqGNrUFB4qBaexrLypTH0jyvaF5jolNy5D+5C4kKV1WJ3Yx9cn/JH8oA==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/lodash": { + "version": "4.14.116", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.116.tgz", + "integrity": "sha512-lRnAtKnxMXcYYXqOiotTmJd74uawNWuPnsnPrrO7HiFuE3npE2iQhfABatbYDyxTNqZNuXzcKGhw37R7RjBFLg==", + "dev": true + }, + "@types/minimatch": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", + "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==", + "dev": true + }, + "@types/mkdirp": { + "version": "0.3.29", + "resolved": "https://registry.npmjs.org/@types/mkdirp/-/mkdirp-0.3.29.tgz", + "integrity": "sha1-fyrX7FX5FEgvybHsS7GuYCjUYGY=", + "dev": true + }, + "@types/node": { + "version": "8.5.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.5.10.tgz", + "integrity": "sha512-Duk5LjhRghZEzSYnjpJDxuWSUrswq1TeJGxqU/vbWx9v7PiwdwgxYBMGtkAx/E2pnWrDgrxOVdbr948VnKuIuQ==", + "dev": true + }, + "@types/shelljs": { + "version": "0.3.33", + "resolved": "https://registry.npmjs.org/@types/shelljs/-/shelljs-0.3.33.tgz", + "integrity": "sha1-32E73biCJe0JzlyDX2INyq8VXms=", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/uuid": { + "version": "2.0.30", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-2.0.30.tgz", + "integrity": "sha512-nmSJ0AL2mZAi68dYb7nKSIJ9YiM68eToP3Ugz66Ou7qkSatIptDM6CvOUmj4epMKWvO9gr9fFBxEEJkromp1Qg==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/validator": { + "version": "4.5.29", + "resolved": "https://registry.npmjs.org/@types/validator/-/validator-4.5.29.tgz", + "integrity": "sha1-R3/qhLcwCcHxPOYq7AU1leIiW+k=", + "dev": true + }, + "@types/winreg": { + "version": "1.2.30", + "resolved": "https://registry.npmjs.org/@types/winreg/-/winreg-1.2.30.tgz", + "integrity": "sha1-kdZxDlNtNFucmwF8V0z2qNpkxRg=", + "dev": true + }, + "@types/xml2js": { + "version": "0.0.27", + "resolved": "https://registry.npmjs.org/@types/xml2js/-/xml2js-0.0.27.tgz", + "integrity": "sha1-5a01i5UNhH2wPl6jihr4c2vR78c=", + "dev": true + }, + "app-root-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/app-root-path/-/app-root-path-1.0.0.tgz", + "integrity": "sha1-LHKZF0vGHLhv46SnmOAeSTt9U30=" + }, + "arch": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/arch/-/arch-2.1.1.tgz", + "integrity": "sha512-BLM56aPo9vLLFVa8+/+pJLnrZ7QGGTVHWsCwieAWT9o9K8UeGaQbzZbGoabWLOo2ksBCztoXdqBZBplqLDDCSg==" + }, + "archiver": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/archiver/-/archiver-2.0.3.tgz", + "integrity": "sha1-tDYLtYSvFDeZGUJxbyHXxSPR270=", + "requires": { + "archiver-utils": "^1.3.0", + "async": "^2.0.0", + "buffer-crc32": "^0.2.1", + "glob": "^7.0.0", + "lodash": "^4.8.0", + "readable-stream": "^2.0.0", + "tar-stream": "^1.5.0", + "walkdir": "^0.0.11", + "zip-stream": "^1.2.0" + }, + "dependencies": { + "async": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", + "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", + "requires": { + "lodash": "^4.17.10" + } + } + } + }, + "archiver-utils": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/archiver-utils/-/archiver-utils-1.3.0.tgz", + "integrity": "sha1-5QtMCccL89aA4y/xt5lOn52JUXQ=", + "requires": { + "glob": "^7.0.0", + "graceful-fs": "^4.1.0", + "lazystream": "^1.0.0", + "lodash": "^4.8.0", + "normalize-path": "^2.0.0", + "readable-stream": "^2.0.0" + } + }, + "array-find-index": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", + "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=" + }, + "arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=" + }, + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" + }, + "azure-devops-node-api": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/azure-devops-node-api/-/azure-devops-node-api-7.2.0.tgz", + "integrity": "sha512-pMfGJ6gAQ7LRKTHgiRF+8iaUUeGAI0c8puLaqHLc7B8AR7W6GJLozK9RFeUHFjEGybC9/EB3r67WPd7e46zQ8w==", + "requires": { + "os": "0.1.1", + "tunnel": "0.0.4", + "typed-rest-client": "1.2.0", + "underscore": "1.8.3" + }, + "dependencies": { + "underscore": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", + "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" + } + } + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "base64-js": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", + "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==" + }, + "bl": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.2.tgz", + "integrity": "sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==", + "requires": { + "readable-stream": "^2.3.5", + "safe-buffer": "^5.1.1" + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.2.1.tgz", + "integrity": "sha512-c+Ko0loDaFfuPWiL02ls9Xd3GO3cPVmUobQ6t3rXNUk304u6hGq+8N/kFi+QEIKhzK3uwolVhLzszmfLmMLnqg==", + "requires": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4" + } + }, + "buffer-alloc": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", + "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", + "requires": { + "buffer-alloc-unsafe": "^1.1.0", + "buffer-fill": "^1.0.0" + } + }, + "buffer-alloc-unsafe": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", + "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==" + }, + "buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=" + }, + "buffer-fill": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", + "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=" + }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=" + }, + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=" + }, + "camelcase-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-4.2.0.tgz", + "integrity": "sha1-oqpfsa9oh1glnDLBQUJteJI7m3c=", + "requires": { + "camelcase": "^4.1.0", + "map-obj": "^2.0.0", + "quick-lru": "^1.0.0" + } + }, + "clipboardy": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/clipboardy/-/clipboardy-1.2.3.tgz", + "integrity": "sha512-2WNImOvCRe6r63Gk9pShfkwXsVtKCroMAevIbiae021mS850UkWPbevxsBz3tnvjZIEGvlwaqCPsw+4ulzNgJA==", + "requires": { + "arch": "^2.1.0", + "execa": "^0.8.0" + } + }, + "colors": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.3.2.tgz", + "integrity": "sha512-rhP0JSBGYvpcNQj4s5AdShMeE5ahMop96cTeDl/v9qQQm2fYClE2QXZRi8wLzc+GmXSxdIqqbOIAhyObEXDbfQ==" + }, + "compress-commons": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/compress-commons/-/compress-commons-1.2.2.tgz", + "integrity": "sha1-UkqfEJA/OoEzibAiXSfEi7dRiQ8=", + "requires": { + "buffer-crc32": "^0.2.1", + "crc32-stream": "^2.0.0", + "normalize-path": "^2.0.0", + "readable-stream": "^2.0.0" + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "core-js": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.3.0.tgz", + "integrity": "sha1-+rg/uwstjchfpjbEudNMdUIMbWU=" + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "crc": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/crc/-/crc-3.8.0.tgz", + "integrity": "sha512-iX3mfgcTMIq3ZKLIsVFAbv7+Mc10kxabAGQb8HvjA1o3T1PIYprbakQ65d3I+2HGHt6nSKkM9PYjgoJO2KcFBQ==", + "requires": { + "buffer": "^5.1.0" + } + }, + "crc32-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/crc32-stream/-/crc32-stream-2.0.0.tgz", + "integrity": "sha1-483TtN8xaN10494/u8t7KX/pCPQ=", + "requires": { + "crc": "^3.4.4", + "readable-stream": "^2.0.0" + } + }, + "cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "requires": { + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "currently-unhandled": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", + "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", + "requires": { + "array-find-index": "^1.0.1" + } + }, + "cycle": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/cycle/-/cycle-1.0.3.tgz", + "integrity": "sha1-IegLK+hYD5i0aPN5QwZisEbDStI=" + }, + "dateformat": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.11.tgz", + "integrity": "sha1-8ny+56ASu/uC6gUVYtOXf2CT27E=", + "requires": { + "get-stdin": "*", + "meow": "*" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" + }, + "decamelize-keys": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.0.tgz", + "integrity": "sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk=", + "requires": { + "decamelize": "^1.1.0", + "map-obj": "^1.0.0" + }, + "dependencies": { + "map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=" + } + } + }, + "deep-equal": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", + "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=" + }, + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "requires": { + "object-keys": "^1.0.12" + } + }, + "end-of-stream": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", + "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", + "requires": { + "once": "^1.4.0" + } + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "es-abstract": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.12.0.tgz", + "integrity": "sha512-C8Fx/0jFmV5IPoMOFPA9P9G5NtqW+4cOPit3MIuvR2t7Ag2K15EJTpxnHAYTzL+aYQJIESYeXZmDBfOBE1HcpA==", + "requires": { + "es-to-primitive": "^1.1.1", + "function-bind": "^1.1.1", + "has": "^1.0.1", + "is-callable": "^1.1.3", + "is-regex": "^1.0.4" + } + }, + "es-to-primitive": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.1.1.tgz", + "integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=", + "requires": { + "is-callable": "^1.1.1", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.1" + } + }, + "es6-promise": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.0.2.tgz", + "integrity": "sha1-AQ1YWEI6XxGJeWZfRkhqlcbuK7Y=" + }, + "execa": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.8.0.tgz", + "integrity": "sha1-2NdrvBtVIX7RkP1t1J08d07PyNo=", + "requires": { + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + }, + "eyes": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz", + "integrity": "sha1-Ys8SAjTGg3hdkCNIqADvPgzCC8A=" + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "requires": { + "locate-path": "^2.0.0" + } + }, + "fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "get-stdin": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz", + "integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==" + }, + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" + }, + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "requires": { + "function-bind": "^1.1.1" + } + }, + "hosted-git-info": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", + "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==" + }, + "i": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/i/-/i-0.3.6.tgz", + "integrity": "sha1-2WyScyB28HJxG2sQ/X1PZa2O4j0=" + }, + "ieee754": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.12.tgz", + "integrity": "sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA==" + }, + "immediate": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", + "integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=" + }, + "indent-string": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz", + "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=" + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" + }, + "is-builtin-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", + "requires": { + "builtin-modules": "^1.0.0" + } + }, + "is-callable": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", + "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==" + }, + "is-date-object": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", + "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=" + }, + "is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=" + }, + "is-regex": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", + "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", + "requires": { + "has": "^1.0.1" + } + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" + }, + "is-symbol": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.1.tgz", + "integrity": "sha1-PMWfAAJRlLarLjjbrmaJJWtmBXI=" + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + }, + "json-in-place": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-in-place/-/json-in-place-1.0.1.tgz", + "integrity": "sha1-ih7NJaac4ZAFUs1xUr2TdU3k4fA=", + "requires": { + "json-lexer": "1.1.1" + } + }, + "json-lexer": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/json-lexer/-/json-lexer-1.1.1.tgz", + "integrity": "sha1-vT7V1+Vgudma0iNPKMpwb7N3t9Q=" + }, + "json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==" + }, + "jszip": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.1.5.tgz", + "integrity": "sha512-5W8NUaFRFRqTOL7ZDDrx5qWHJyBXy6velVudIzQUSoqAAYqzSh2Z7/m0Rf1QbmQJccegD0r+YZxBjzqoBiEeJQ==", + "requires": { + "core-js": "~2.3.0", + "es6-promise": "~3.0.2", + "lie": "~3.1.0", + "pako": "~1.0.2", + "readable-stream": "~2.0.6" + }, + "dependencies": { + "process-nextick-args": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" + }, + "readable-stream": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", + "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "~1.0.0", + "process-nextick-args": "~1.0.6", + "string_decoder": "~0.10.x", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + } + } + }, + "lazystream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz", + "integrity": "sha1-9plf4PggOS9hOWvolGJAe7dxaOQ=", + "requires": { + "readable-stream": "^2.0.5" + } + }, + "lie": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/lie/-/lie-3.1.1.tgz", + "integrity": "sha1-mkNrLMd0bKWd56QfpGmz77dr2H4=", + "requires": { + "immediate": "~3.0.5" + } + }, + "load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "lodash": { + "version": "4.17.11", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==" + }, + "loud-rejection": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", + "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", + "requires": { + "currently-unhandled": "^0.4.1", + "signal-exit": "^3.0.0" + } + }, + "lru-cache": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", + "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "map-obj": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-2.0.0.tgz", + "integrity": "sha1-plzSkIepJZi4eRJXpSPgISIqwfk=" + }, + "meow": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-5.0.0.tgz", + "integrity": "sha512-CbTqYU17ABaLefO8vCU153ZZlprKYWDljcndKKDCFcYQITzWCXZAVk4QMFZPgvzrnUQ3uItnIE/LoUOwrT15Ig==", + "requires": { + "camelcase-keys": "^4.0.0", + "decamelize-keys": "^1.0.0", + "loud-rejection": "^1.0.0", + "minimist-options": "^3.0.1", + "normalize-package-data": "^2.3.4", + "read-pkg-up": "^3.0.0", + "redent": "^2.0.0", + "trim-newlines": "^2.0.0", + "yargs-parser": "^10.0.0" + } + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + }, + "minimist-options": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-3.0.2.tgz", + "integrity": "sha512-FyBrT/d0d4+uiZRbqznPXqw3IpZZG3gl3wKWiX784FycUKVwBt0uLBFkQrtE4tZOrgo78nZp2jnKz3L65T5LdQ==", + "requires": { + "arrify": "^1.0.1", + "is-plain-obj": "^1.1.0" + } + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "requires": { + "minimist": "0.0.8" + }, + "dependencies": { + "minimist": { + "version": "0.0.8", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" + } + } + }, + "mute-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=" + }, + "ncp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ncp/-/ncp-2.0.0.tgz", + "integrity": "sha1-GVoh1sRuNh0vsSgbo4uR6d9727M=", + "dev": true + }, + "normalize-package-data": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", + "requires": { + "hosted-git-info": "^2.1.4", + "is-builtin-module": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "requires": { + "remove-trailing-separator": "^1.0.1" + } + }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "requires": { + "path-key": "^2.0.0" + } + }, + "object-keys": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz", + "integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==" + }, + "object.getownpropertydescriptors": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz", + "integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=", + "requires": { + "define-properties": "^1.1.2", + "es-abstract": "^1.5.1" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } + }, + "onecolor": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/onecolor/-/onecolor-2.5.0.tgz", + "integrity": "sha1-Ila2UdyAfBAfAK7b1JklxXpEMcE=" + }, + "os": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/os/-/os-0.1.1.tgz", + "integrity": "sha1-IIhF6J4ZOtTZcUdLk5R3NqVtE/M=" + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=" + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=" + }, + "pako": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.6.tgz", + "integrity": "sha512-lQe48YPsMJAig+yngZ87Lus+NF+3mtu7DVOBu6b/gHO1YpKwIj5AWjZ/TOS7i46HD/UixzWb1zeWDZfGZ3iYcg==" + }, + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=" + }, + "path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "requires": { + "pify": "^3.0.0" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" + }, + "pkginfo": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/pkginfo/-/pkginfo-0.4.1.tgz", + "integrity": "sha1-tUGO8EOd5UJfxJlQQtztFPsqhP8=" + }, + "process-nextick-args": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" + }, + "prompt": { + "version": "0.2.14", + "resolved": "https://registry.npmjs.org/prompt/-/prompt-0.2.14.tgz", + "integrity": "sha1-V3VPZPVD/XsIRXB8gY7OYY8F/9w=", + "requires": { + "pkginfo": "0.x.x", + "read": "1.0.x", + "revalidator": "0.1.x", + "utile": "0.2.x", + "winston": "0.8.x" + } + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" + }, + "quick-lru": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-1.1.0.tgz", + "integrity": "sha1-Q2CxfGETatOAeDl/8RQW4Ybc+7g=" + }, + "read": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/read/-/read-1.0.7.tgz", + "integrity": "sha1-s9oZvQUkMal2cdRKQmNK33ELQMQ=", + "requires": { + "mute-stream": "~0.0.4" + } + }, + "read-pkg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", + "requires": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + } + }, + "read-pkg-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", + "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", + "requires": { + "find-up": "^2.0.0", + "read-pkg": "^3.0.0" + } + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "redent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-2.0.0.tgz", + "integrity": "sha1-wbIAe0LVfrE4kHmzyDM2OdXhzKo=", + "requires": { + "indent-string": "^3.0.0", + "strip-indent": "^2.0.0" + } + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=" + }, + "revalidator": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/revalidator/-/revalidator-0.1.8.tgz", + "integrity": "sha1-/s5hv6DBtSoga9axgZgYS91SOjs=" + }, + "rimraf": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "requires": { + "glob": "^7.0.5" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" + }, + "semver": { + "version": "5.5.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.1.tgz", + "integrity": "sha512-PqpAxfrEhlSUWge8dwIp4tZnQ25DIOthpiaHNIthsjEFQD6EvqUKUDM7L8O2rShkFccYo1VjJR0coWfNkCubRw==" + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" + }, + "shelljs": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.5.3.tgz", + "integrity": "sha1-xUmCuZbHbvDB5rWfvcWCX1txMRM=" + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" + }, + "spdx-correct": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz", + "integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==", + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz", + "integrity": "sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg==" + }, + "spdx-expression-parse": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", + "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz", + "integrity": "sha512-2+EPwgbnmOIl8HjGBXXMd9NAu02vLjOO1nWw4kmeRDFyHn+M/ETfHxQUK0oXg8ctgVnl9t3rosNVsZ1jG61nDA==" + }, + "stack-trace": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", + "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=" + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" + }, + "strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=" + }, + "strip-indent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz", + "integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=" + }, + "tar-stream": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.1.tgz", + "integrity": "sha512-IFLM5wp3QrJODQFPm6/to3LJZrONdBY/otxcvDIQzu217zKye6yVR3hhi9lAjrC2Z+m/j5oDxMPb1qcd8cIvpA==", + "requires": { + "bl": "^1.0.0", + "buffer-alloc": "^1.1.0", + "end-of-stream": "^1.0.0", + "fs-constants": "^1.0.0", + "readable-stream": "^2.3.0", + "to-buffer": "^1.1.0", + "xtend": "^4.0.0" + } + }, + "tinytim": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/tinytim/-/tinytim-0.1.1.tgz", + "integrity": "sha1-yWih5VWa2VUyJO92J7qzTjyu+Kg=" + }, + "tmp": { + "version": "0.0.26", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.26.tgz", + "integrity": "sha1-nvqCDOKhD4H4l5VVus4/FVJs4fI=", + "requires": { + "os-tmpdir": "~1.0.0" + } + }, + "to-buffer": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz", + "integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==" + }, + "tracer": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/tracer/-/tracer-0.7.4.tgz", + "integrity": "sha1-d/oEN8+Ct2vNvNRLhHRHcuWeUlk=", + "requires": { + "colors": "1.0.3", + "dateformat": "1.0.11", + "tinytim": "0.1.1" + }, + "dependencies": { + "colors": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", + "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=" + } + } + }, + "trim-newlines": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-2.0.0.tgz", + "integrity": "sha1-tAPQuRvlDDMd/EuC7s6yLD3hbSA=" + }, + "tunnel": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.4.tgz", + "integrity": "sha1-LTeFoVjBdMmhbcLARuxfxfF0IhM=" + }, + "typed-rest-client": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.2.0.tgz", + "integrity": "sha512-FrUshzZ1yxH8YwGR29PWWnfksLEILbWJydU7zfIRkyH7kAEzB62uMAl2WY6EyolWpLpVHeJGgQm45/MaruaHpw==", + "requires": { + "tunnel": "0.0.4", + "underscore": "1.8.3" + }, + "dependencies": { + "underscore": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", + "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" + } + } + }, + "typescript": { + "version": "3.4.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.4.5.tgz", + "integrity": "sha512-YycBxUb49UUhdNMU5aJ7z5Ej2XGmaIBL0x34vZ82fn3hGvD+bgrMrVDpatgz2f7YxUMJxMkbWxJZeAvDxVe7Vw==", + "dev": true + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "util.promisify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.0.tgz", + "integrity": "sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA==", + "requires": { + "define-properties": "^1.1.2", + "object.getownpropertydescriptors": "^2.0.3" + } + }, + "utile": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/utile/-/utile-0.2.1.tgz", + "integrity": "sha1-kwyI6ZCY1iIINMNWy9mncFItkNc=", + "requires": { + "async": "~0.2.9", + "deep-equal": "*", + "i": "0.3.x", + "mkdirp": "0.x.x", + "ncp": "0.4.x", + "rimraf": "2.x.x" + }, + "dependencies": { + "async": { + "version": "0.2.10", + "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz", + "integrity": "sha1-trvgsGdLnXGXCMo43owjfLUmw9E=" + }, + "ncp": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/ncp/-/ncp-0.4.2.tgz", + "integrity": "sha1-q8xsvT7C7Spyn/bnwfqPAXhKhXQ=" + } + } + }, + "uuid": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" + }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "validator": { + "version": "3.43.0", + "resolved": "http://registry.npmjs.org/validator/-/validator-3.43.0.tgz", + "integrity": "sha1-lkZLmS1BloM9l6GUv0Cxn/VLrgU=" + }, + "walkdir": { + "version": "0.0.11", + "resolved": "https://registry.npmjs.org/walkdir/-/walkdir-0.0.11.tgz", + "integrity": "sha1-oW0CXrkxvQO1LzCMrtD0D86+lTI=" + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "requires": { + "isexe": "^2.0.0" + } + }, + "winreg": { + "version": "0.0.12", + "resolved": "https://registry.npmjs.org/winreg/-/winreg-0.0.12.tgz", + "integrity": "sha1-BxBVVLoanQiXklHRKUdb/64wBrc=" + }, + "winston": { + "version": "0.8.3", + "resolved": "http://registry.npmjs.org/winston/-/winston-0.8.3.tgz", + "integrity": "sha1-ZLar9M0Brcrv1QCTk7HY6L7BnbA=", + "requires": { + "async": "0.2.x", + "colors": "0.6.x", + "cycle": "1.0.x", + "eyes": "0.1.x", + "isstream": "0.1.x", + "pkginfo": "0.3.x", + "stack-trace": "0.0.x" + }, + "dependencies": { + "async": { + "version": "0.2.10", + "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz", + "integrity": "sha1-trvgsGdLnXGXCMo43owjfLUmw9E=" + }, + "colors": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/colors/-/colors-0.6.2.tgz", + "integrity": "sha1-JCP+ZnisDF2uiFLl0OW+CMmXq8w=" + }, + "pkginfo": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/pkginfo/-/pkginfo-0.3.1.tgz", + "integrity": "sha1-Wyn2qB9wcXFC4J52W76rl7T4HiE=" + } + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "xml2js": { + "version": "0.4.19", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz", + "integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==", + "requires": { + "sax": ">=0.6.0", + "xmlbuilder": "~9.0.1" + } + }, + "xmlbuilder": { + "version": "9.0.7", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", + "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=" + }, + "xtend": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" + }, + "yargs-parser": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz", + "integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==", + "requires": { + "camelcase": "^4.1.0" + } + }, + "zip-stream": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-1.2.0.tgz", + "integrity": "sha1-qLxF9MG0lpnGuQGYuqyqzbzUugQ=", + "requires": { + "archiver-utils": "^1.3.0", + "compress-commons": "^1.2.0", + "lodash": "^4.8.0", + "readable-stream": "^2.0.0" + } + } + } +} From cfdf2e883321a0622200c7f3de8ed3d57aa491f2 Mon Sep 17 00:00:00 2001 From: Shani Feldman Date: Mon, 27 May 2019 11:38:00 +0300 Subject: [PATCH 226/235] refactor to support vsts node api 8.0.0 (still need to resolve Endpoint in TaskAgentBase missing) --- app/exec/build/definition.ts | 2 +- app/exec/build/definitions/delete.ts | 3 ++- app/exec/build/definitions/export.ts | 3 ++- app/exec/build/definitions/queuestatus.ts | 5 +++-- app/exec/build/definitions/update.ts | 6 ++++-- app/exec/build/delete.ts | 7 ++++--- app/exec/build/details.ts | 2 +- app/exec/build/keep.ts | 4 ++-- app/exec/build/logs.ts | 2 +- app/exec/build/queue.ts | 4 ++-- app/exec/build/report.ts | 2 +- app/exec/build/show.ts | 2 +- app/exec/endpoints/list.ts | 21 +++++++++------------ app/exec/endpoints/set.ts | 23 +++++++++++------------ app/exec/endpoints/show.ts | 13 ++++++------- package.json | 2 +- 16 files changed, 51 insertions(+), 50 deletions(-) diff --git a/app/exec/build/definition.ts b/app/exec/build/definition.ts index 28f830cc..d33bcafa 100644 --- a/app/exec/build/definition.ts +++ b/app/exec/build/definition.ts @@ -22,7 +22,7 @@ export class BuildDefinition extends buildBase.BuildBase { return this.commandArgs.definitionName.val().then((definitionName) => { if (definitionId){ - return buildapi.then((api) => {return api.getDefinition(definitionId,project,null,null) }); + return buildapi.then((api) => { return api.getDefinition(project,definitionId,null,null) }); } else { if (definitionName) { return this._getDefinitionByName(definitionName, project, buildapi); diff --git a/app/exec/build/definitions/delete.ts b/app/exec/build/definitions/delete.ts index bb2e4df4..5ccc3e64 100644 --- a/app/exec/build/definitions/delete.ts +++ b/app/exec/build/definitions/delete.ts @@ -35,7 +35,8 @@ export class DeleteDefinition extends TfCommand { const [project, definitionId] = values; trace.debug("Deleting build definition %s...", definitionId); - return api.then((defapi) => {return defapi.deleteDefinition(definitionId as number, project as string).then((definition) => { + return api.then((defapi) => { + return defapi.deleteDefinition(project as string,definitionId as number).then((definition) => { return { id: definitionId } }); }); diff --git a/app/exec/build/definitions/export.ts b/app/exec/build/definitions/export.ts index f76070e3..f31006e0 100644 --- a/app/exec/build/definitions/export.ts +++ b/app/exec/build/definitions/export.ts @@ -44,7 +44,8 @@ export class ExportDefinition extends TfCommand { const [project, definitionId, definitionPath, overwrite, revision] = values; trace.debug("Retrieving build definition %s...", definitionId); - return api.then((defapi) => {return defapi.getDefinition(definitionId as number, project as string, revision as number).then((definition) => { + return api.then((defapi) => { + return defapi.getDefinition(project as string, definitionId as number, revision as number).then((definition) => { var defpath = ""; if (!definitionPath) { defpath = definition.name + '-' + definition.id + '-' + definition.revision + '.json'; diff --git a/app/exec/build/definitions/queuestatus.ts b/app/exec/build/definitions/queuestatus.ts index 3a844770..8a498440 100644 --- a/app/exec/build/definitions/queuestatus.ts +++ b/app/exec/build/definitions/queuestatus.ts @@ -36,7 +36,8 @@ export class DefinitionQueueStatus extends TfCommand { const [project, definitionId, status] = values; - return api.then((defapi) => {return defapi.getDefinition(definitionId as number, project as string).then((definition) => { + return api.then((defapi) => { + return defapi.getDefinition(project as string, definitionId as number).then((definition) => { var currentStatus = buildContracts.DefinitionQueueStatus[definition.queueStatus]; if (!currentStatus){ currentStatus = buildContracts.DefinitionQueueStatus[0] @@ -58,7 +59,7 @@ export class DefinitionQueueStatus extends TfCommand { return bapi.updateDefinition(definition, definition.id, definition.project.name); }); + return api.then((bapi) => { return bapi.updateDefinition(definition, definition.project.name, definition.id); }); }); }); }); diff --git a/app/exec/build/definitions/update.ts b/app/exec/build/definitions/update.ts index 928e9290..1967af13 100644 --- a/app/exec/build/definitions/update.ts +++ b/app/exec/build/definitions/update.ts @@ -38,14 +38,16 @@ export class UpdateDefinition extends TfCommand {return defapi.getDefinition(definitionId as number, project as string).then(currentDefinition => { + return api.then((defapi) => { + return defapi.getDefinition(project as string, definitionId as number).then(currentDefinition => { trace.debug("Reading build definition from %s...", definitionPath.toString()); let definition: buildContracts.BuildDefinition = JSON.parse(fs.readFileSync(definitionPath.toString(), 'utf-8')); definition.id = currentDefinition.id; definition.revision = currentDefinition.revision; trace.debug("Updating build definition %s...", definitionId); - return api.then((defapi) => {return defapi.updateDefinition(definition, definitionId as number, project as string,currentDefinition.id,currentDefinition.revision).then((definition) => { + return api.then((defapi) => { + return defapi.updateDefinition(definition, project as string, definitionId as number,currentDefinition.id,currentDefinition.revision).then((definition) => { return definition; }); }); diff --git a/app/exec/build/delete.ts b/app/exec/build/delete.ts index ae3860d6..b6a6f20d 100644 --- a/app/exec/build/delete.ts +++ b/app/exec/build/delete.ts @@ -38,14 +38,15 @@ export class BuildDelete extends buildBase.BuildBase, buildId: number, project: string) { trace.info("Deleting build...") - return buildapi.then((api) => { api.getBuild(buildId,project).then((build: buildContracts.Build) => { + return buildapi.then((api) => { + api.getBuild(project, buildId).then((build: buildContracts.Build) => { if (!build.keepForever) { build.deleted = true; build.status = buildContracts.BuildStatus.Completed build.result = buildContracts.BuildResult.Failed if (build.deleted && build.status == buildContracts.BuildStatus.Completed) { - buildapi.then((api) => { api.updateBuild(build, build.id) }); - buildapi.then((api) => { api.deleteBuild(build.id,build.project.name) }); + buildapi.then((api) => { api.updateBuild(build, project ,build.id) }); + buildapi.then((api) => { api.deleteBuild(build.project.name, build.id) }); trace.info("build deleted") } else { trace.error("failed to delete") diff --git a/app/exec/build/details.ts b/app/exec/build/details.ts index ec6a3a3f..8890f565 100644 --- a/app/exec/build/details.ts +++ b/app/exec/build/details.ts @@ -21,7 +21,7 @@ export class BuildDetails extends buildBase.BuildBase { return this.commandArgs.buildId.val().then((buildId) => { - return buildapi.then((api) => { return api.getBuild(buildId, project); }); + return buildapi.then((api) => { return api.getBuild(project, buildId); }); }); }); diff --git a/app/exec/build/keep.ts b/app/exec/build/keep.ts index 2206afd8..e60672c7 100644 --- a/app/exec/build/keep.ts +++ b/app/exec/build/keep.ts @@ -39,7 +39,7 @@ export class BuildKeep extends buildBase.BuildBase, buildId: number, project: string) :Promise { trace.info("Searching for build...") return buildapi.then((api) => { - return api.getBuild(buildId,project).then((build: buildContracts.Build) => { + return api.getBuild(project, buildId).then((build: buildContracts.Build) => { if (build.keepForever) { trace.warn("Retention unlocked for %s", build.buildNumber); build.keepForever = false; @@ -47,7 +47,7 @@ export class BuildKeep extends buildBase.BuildBase { return api.updateBuild(build, build.id); }); + return buildapi.then((api) => { return api.updateBuild(build, project, build.id); }); }); }); } diff --git a/app/exec/build/logs.ts b/app/exec/build/logs.ts index 37745bd9..8abe5a49 100644 --- a/app/exec/build/logs.ts +++ b/app/exec/build/logs.ts @@ -24,7 +24,7 @@ export class BuildLogs extends buildBase.BuildBase { return this.commandArgs.buildId.val().then((buildId) => { return buildapi.then((api) => { - return api.getBuild(buildId, project).then((build) => { + return api.getBuild(project, buildId).then((build) => { return buildapi.then((api) => { return api.getBuildLogsZip(build.project.name, build.id).then((stream) => { var archiveName = build.definition.name + "-" + build.buildNumber + "_" + build.id + ".zip"; diff --git a/app/exec/build/queue.ts b/app/exec/build/queue.ts index 216172e6..e9801dc5 100644 --- a/app/exec/build/queue.ts +++ b/app/exec/build/queue.ts @@ -28,7 +28,7 @@ export class BuildQueue extends buildBase.BuildBase { let definitionPromise: Promise; if (definitionId) { - definitionPromise = buildapi.getDefinition(definitionId, project); + definitionPromise = buildapi.getDefinition(project, definitionId); } else { definitionPromise = this.commandArgs.definitionName.val().then(definitionName => { trace.debug("No definition id provided, Searching for definitions with name: " + definitionName); @@ -129,7 +129,7 @@ export class BuildQueue extends buildBase.BuildBase{ + return buildapi.updateBuild(queuedBuild, project, queuedBuild.id).then((updatedQueuedBuild) =>{ if (updatedQueuedBuild.status == buildContracts.BuildStatus.Completed || (timeout != 0 && counter >= timeout)) { if (updatedQueuedBuild.status != buildContracts.BuildStatus.Completed){ trace.println(); diff --git a/app/exec/build/report.ts b/app/exec/build/report.ts index 548b757c..66fc2f3e 100644 --- a/app/exec/build/report.ts +++ b/app/exec/build/report.ts @@ -24,7 +24,7 @@ export class BuildReport extends buildBase.BuildBase { return this.commandArgs.buildId.val().then((buildId) => { return buildapi.then((api) => { - return api.getBuild(buildId, project).then((build) => { + return api.getBuild(project, buildId).then((build) => { return buildapi.then((api) => { return api.getBuildReport(build.project.name, build.id).then((report) => { return report diff --git a/app/exec/build/show.ts b/app/exec/build/show.ts index f32eed08..2a29d401 100644 --- a/app/exec/build/show.ts +++ b/app/exec/build/show.ts @@ -22,7 +22,7 @@ export class BuildShow extends buildBase.BuildBase { return this.commandArgs.buildId.val().then(buildId => { - return buildapi.getBuild(buildId, project); + return buildapi.getBuild(project, buildId); }); }); } diff --git a/app/exec/endpoints/list.ts b/app/exec/endpoints/list.ts index 06c86548..c841c579 100644 --- a/app/exec/endpoints/list.ts +++ b/app/exec/endpoints/list.ts @@ -1,10 +1,7 @@ import { TfCommand, CoreArguments } from "../../lib/tfcommand"; -import buildContracts = require('azure-devops-node-api/interfaces/BuildInterfaces'); -import args = require("../../lib/arguments"); import trace = require('../../lib/trace'); import taskAgentContracts = require("azure-devops-node-api/interfaces/TaskAgentInterfaces"); import agentClient = require("azure-devops-node-api/TaskAgentApiBase"); -import corem = require('azure-devops-node-api/CoreApi'); export function getCommand(args: string[]): ListEndpoints { return new ListEndpoints(args); @@ -19,17 +16,17 @@ export class ListEndpoints extends TfCommand { - var agentapi = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl()); var coreapi = this.webApi.getCoreApi(this.connection.getCollectionUrl()) trace.debug("Searching for Service Endpoints ..."); - return this.commandArgs.project.val().then((project) => { - return coreapi.then((api) =>{ - return api.getProject(project).then((projectObj) =>{ - return agentapi.then((api) => { - return api.getServiceEndpoints(projectObj.id).then((endpoints) => { - trace.debug("Retrieved " + endpoints.length + " build endpoints from server."); - return endpoints; - }); + return this.webApi.getTaskAgentApi(this.connection.getCollectionUrl()).then((agentapi: agentClient.ITaskAgentApiBase) => { + return this.commandArgs.project.val().then((project) => { + return coreapi.then((api) =>{ + return api.getProject(project).then((projectObj) =>{ + return agentapi.getServiceEndpoints(projectObj.id).then((endpoints) => { + trace.debug("Retrieved " + endpoints.length + " build endpoints from server."); + return endpoints; + }); + //});// }); }); }); diff --git a/app/exec/endpoints/set.ts b/app/exec/endpoints/set.ts index 6f697e2d..fcff8bd6 100644 --- a/app/exec/endpoints/set.ts +++ b/app/exec/endpoints/set.ts @@ -25,20 +25,19 @@ export class ShowEndpoint extends TfCommand { - var agentapi = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl()); + //var agentapi = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl()); var coreapi = this.webApi.getCoreApi(this.connection.getCollectionUrl()) trace.debug("Searching for Service Endpoints ..."); - return this.commandArgs.project.val().then((project) => { - return this.commandArgs.id.val().then((id) =>{ - return this.commandArgs.parameters.val().then((params) => { - return coreapi.then((api) => { - return api.getProject(project).then((projectObj) =>{ - return agentapi.then((api)=>{ - return api.getServiceEndpointDetails(projectObj.id,id).then((endpoint) => { - //trace.info(JSON.stringify(JSON.parse(params))); - endpoint.authorization.parameters = JSON.parse(params); - return agentapi.then((api) => { - return api.updateServiceEndpoint(endpoint,projectObj.name,endpoint.id).then(() => { + return this.webApi.getTaskAgentApi(this.connection.getCollectionUrl()).then((agentapi: agentClient.ITaskAgentApiBase) => { + return this.commandArgs.project.val().then((project) => { + return this.commandArgs.id.val().then((id) =>{ + return this.commandArgs.parameters.val().then((params) => { + return coreapi.then((api) => { + return api.getProject(project).then((projectObj) =>{ + return agentapi.then((api)=>{ + return api.getServiceEndpointDetails(projectObj.id,id).then((endpoint) => { + endpoint.authorization.parameters = JSON.parse(params); + return agentapi.updateServiceEndpoint(endpoint,projectObj.name,endpoint.id).then(() => { return endpoint; }); }); diff --git a/app/exec/endpoints/show.ts b/app/exec/endpoints/show.ts index d58e0ac6..6dd59305 100644 --- a/app/exec/endpoints/show.ts +++ b/app/exec/endpoints/show.ts @@ -25,15 +25,14 @@ export class ShowEndpoint extends TfCommand { - var agentapi = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl()); var coreapi = this.webApi.getCoreApi(this.connection.getCollectionUrl()) trace.debug("Searching for Service Endpoints ..."); - return this.commandArgs.project.val().then((project) => { - return this.commandArgs.id.val().then((id) =>{ - return coreapi.then((api) => { - return api. getProject(project).then((projectObj) =>{ - return agentapi.then((api)=>{ - return api.getServiceEndpointDetails(projectObj.id,id).then((endpoint) => { + return this.webApi.getTaskAgentApi(this.connection.getCollectionUrl()).then((agentapi: agentClient.ITaskAgentApiBase) => { + return this.commandArgs.project.val().then((project) => { + return this.commandArgs.id.val().then((id) =>{ + return coreapi.then((api) => { + return api. getProject(project).then((projectObj) =>{ + return agentapi.getServiceEndpointDetails(projectObj.id,id).then((endpoint) => { return endpoint; }); }); diff --git a/package.json b/package.json index 380e0443..1ac7de80 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "app-root-path": "1.0.0", "archiver": "2.0.3", "async": "^1.4.0", - "azure-devops-node-api": "~7.2.0", + "azure-devops-node-api": "~8.0.0", "clipboardy": "~1.2.3", "colors": "~1.3.0", "glob": "7.1.2", From 82769cad37f1a0d9f84b190f2d73ce58eb88b4c4 Mon Sep 17 00:00:00 2001 From: Shani Feldman Date: Mon, 3 Jun 2019 14:57:50 +0300 Subject: [PATCH 227/235] fix compilation issue after api change of connected services (TODO: fix endpoint list,set,show) --- app/exec/endpoints/list.ts | 23 +++++++++++++---------- app/exec/endpoints/set.ts | 32 ++++++++++++++------------------ app/exec/endpoints/show.ts | 22 ++++++++++------------ package-lock.json | 33 +++++++++------------------------ package.json | 4 ++-- 5 files changed, 48 insertions(+), 66 deletions(-) diff --git a/app/exec/endpoints/list.ts b/app/exec/endpoints/list.ts index c841c579..604a8f0e 100644 --- a/app/exec/endpoints/list.ts +++ b/app/exec/endpoints/list.ts @@ -1,6 +1,7 @@ import { TfCommand, CoreArguments } from "../../lib/tfcommand"; import trace = require('../../lib/trace'); import taskAgentContracts = require("azure-devops-node-api/interfaces/TaskAgentInterfaces"); +import CoreContracts = require("azure-devops-node-api/interfaces/CoreInterfaces"); import agentClient = require("azure-devops-node-api/TaskAgentApiBase"); export function getCommand(args: string[]): ListEndpoints { @@ -15,25 +16,24 @@ export class ListEndpoints extends TfCommand { + public exec(): Promise { var coreapi = this.webApi.getCoreApi(this.connection.getCollectionUrl()) trace.debug("Searching for Service Endpoints ..."); return this.webApi.getTaskAgentApi(this.connection.getCollectionUrl()).then((agentapi: agentClient.ITaskAgentApiBase) => { return this.commandArgs.project.val().then((project) => { return coreapi.then((api) =>{ return api.getProject(project).then((projectObj) =>{ - return agentapi.getServiceEndpoints(projectObj.id).then((endpoints) => { - trace.debug("Retrieved " + endpoints.length + " build endpoints from server."); - return endpoints; - }); - //});// + return api.getConnectedServices(projectObj.id).then((endpoints) => { + trace.debug("Retrieved " + endpoints.length + " build endpoints from server."); + return endpoints; + }); }); }); }); }); } - public friendlyOutput(data: taskAgentContracts.ServiceEndpoint[]): void { + public friendlyOutput(data: CoreContracts.WebApiConnectedServiceDetails[]): void { if (!data) { throw new Error('no endpoints supplied'); } @@ -44,9 +44,12 @@ export class ListEndpoints extends TfCommand { trace.println(); - trace.info('name : %s',endpoint.name); - trace.info('id : %s',endpoint.id); - trace.info('type : %s',endpoint.type); + trace.info(JSON.stringify(endpoint)) + trace.info('name : %s',endpoint.connectedServiceMetaData.friendlyName); + trace.info('description : %s', endpoint.connectedServiceMetaData.description); + trace.info('author : %s', endpoint.connectedServiceMetaData.authenticatedBy.displayName); + trace.info('id : %s',endpoint.connectedServiceMetaData.id); + trace.info('type : %s',endpoint.connectedServiceMetaData.kind); }); } } diff --git a/app/exec/endpoints/set.ts b/app/exec/endpoints/set.ts index fcff8bd6..fa8f99a9 100644 --- a/app/exec/endpoints/set.ts +++ b/app/exec/endpoints/set.ts @@ -3,7 +3,7 @@ import args = require("../../lib/arguments"); import trace = require('../../lib/trace'); import taskAgentContracts = require("azure-devops-node-api/interfaces/TaskAgentInterfaces"); import agentClient = require("azure-devops-node-api/TaskAgentApiBase"); -import corem = require('azure-devops-node-api/CoreApi'); +import CoreContracts = require("azure-devops-node-api/interfaces/CoreInterfaces"); export function getCommand(args: string[]): ShowEndpoint { return new ShowEndpoint(args); @@ -24,8 +24,8 @@ export class ShowEndpoint extends TfCommand { - //var agentapi = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl()); + public exec(): Promise { + var agentapi = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl()); var coreapi = this.webApi.getCoreApi(this.connection.getCollectionUrl()) trace.debug("Searching for Service Endpoints ..."); return this.webApi.getTaskAgentApi(this.connection.getCollectionUrl()).then((agentapi: agentClient.ITaskAgentApiBase) => { @@ -34,12 +34,10 @@ export class ShowEndpoint extends TfCommand { return coreapi.then((api) => { return api.getProject(project).then((projectObj) =>{ - return agentapi.then((api)=>{ - return api.getServiceEndpointDetails(projectObj.id,id).then((endpoint) => { - endpoint.authorization.parameters = JSON.parse(params); - return agentapi.updateServiceEndpoint(endpoint,projectObj.name,endpoint.id).then(() => { - return endpoint; - }); + return api.getConnectedServiceDetails(projectObj.id,id).then((endpoint) => { + endpoint.credentialsXml = JSON.parse(params); + return api.createConnectedService(endpoint,projectObj.id).then(() => { + return endpoint; }); }); }); @@ -50,19 +48,17 @@ export class ShowEndpoint extends TfCommand { + public exec(): Promise { var coreapi = this.webApi.getCoreApi(this.connection.getCollectionUrl()) trace.debug("Searching for Service Endpoints ..."); return this.webApi.getTaskAgentApi(this.connection.getCollectionUrl()).then((agentapi: agentClient.ITaskAgentApiBase) => { @@ -32,7 +32,7 @@ export class ShowEndpoint extends TfCommand{ return coreapi.then((api) => { return api. getProject(project).then((projectObj) =>{ - return agentapi.getServiceEndpointDetails(projectObj.id,id).then((endpoint) => { + return api.getConnectedServiceDetails(projectObj.id,id).then((endpoint) => { return endpoint; }); }); @@ -42,19 +42,17 @@ export class ShowEndpoint extends TfCommand Date: Mon, 3 Jun 2019 14:59:40 +0300 Subject: [PATCH 228/235] missing saved change --- app/exec/endpoints/list.ts | 1 - package.json | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/exec/endpoints/list.ts b/app/exec/endpoints/list.ts index 604a8f0e..1e238c05 100644 --- a/app/exec/endpoints/list.ts +++ b/app/exec/endpoints/list.ts @@ -44,7 +44,6 @@ export class ListEndpoints extends TfCommand { trace.println(); - trace.info(JSON.stringify(endpoint)) trace.info('name : %s',endpoint.connectedServiceMetaData.friendlyName); trace.info('description : %s', endpoint.connectedServiceMetaData.description); trace.info('author : %s', endpoint.connectedServiceMetaData.authenticatedBy.displayName); diff --git a/package.json b/package.json index 19565b0c..a13af08c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tfx-cli", - "version": "0.7.7", + "version": "0.7.61", "description": "CLI for Azure DevOps Services and Team Foundation Server", "repository": { "type": "git", From 5798df3e7fdd6fd9e31f92ae786f8ff46c9a6b48 Mon Sep 17 00:00:00 2001 From: Shani Feldman Date: Wed, 26 Jun 2019 13:44:10 +0300 Subject: [PATCH 229/235] add build timeline to json function --- ...dy-CI-and-create-PR-23084075_23084075.json | 890 ++++++++++++++++++ app/exec/build/timeline.ts | 55 ++ package-lock.json | 2 +- 3 files changed, 946 insertions(+), 1 deletion(-) create mode 100644 Trigger-Buddy-CI-and-create-PR-23084075_23084075.json create mode 100644 app/exec/build/timeline.ts diff --git a/Trigger-Buddy-CI-and-create-PR-23084075_23084075.json b/Trigger-Buddy-CI-and-create-PR-23084075_23084075.json new file mode 100644 index 00000000..cfb257c7 --- /dev/null +++ b/Trigger-Buddy-CI-and-create-PR-23084075_23084075.json @@ -0,0 +1,890 @@ +{ + "records": [ + { + "previousAttempts": [], + "id": "7cc137c2-61f2-5d65-b5f8-0e03d1af3170", + "parentId": "fd490c07-0b22-5182-fac9-6d67fe1e939b", + "type": "Task", + "name": "Log-in to tfx", + "startTime": "2019-06-25T21:07:43.693Z", + "finishTime": "2019-06-25T21:07:45.756Z", + "currentOperation": null, + "percentComplete": null, + "state": 2, + "result": 0, + "resultCode": null, + "changeId": 26, + "lastModified": "0000-12-31T21:39:06.000Z", + "workerName": "Hosted Agent 10", + "order": 9, + "details": null, + "errorCount": 0, + "warningCount": 0, + "url": null, + "log": { + "id": 11, + "type": "Container", + "url": "https://msazure.visualstudio.com/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/build/builds/23084075/logs/11" + }, + "task": { + "id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9", + "name": "CmdLine", + "version": "2.151.1" + }, + "attempt": 1, + "identifier": null + }, + { + "previousAttempts": [], + "id": "110d6b26-e88e-59e8-a760-101bf8f8cd53", + "parentId": "fd490c07-0b22-5182-fac9-6d67fe1e939b", + "type": "Task", + "name": "Trigger a new build of Azure-Kusto-Service-Windows-Buddy", + "startTime": "2019-06-25T20:37:37.750Z", + "finishTime": "2019-06-25T21:07:42.213Z", + "currentOperation": null, + "percentComplete": null, + "state": 2, + "result": 2, + "resultCode": null, + "changeId": 21, + "lastModified": "0000-12-31T21:39:06.000Z", + "workerName": "Hosted Agent 10", + "order": 7, + "details": null, + "errorCount": 1, + "warningCount": 0, + "url": null, + "log": { + "id": 9, + "type": "Container", + "url": "https://msazure.visualstudio.com/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/build/builds/23084075/logs/9" + }, + "task": { + "id": "32abcf98-0df6-4711-b2e4-66a405d3c1a6", + "name": "TriggerBuild", + "version": "3.0.7" + }, + "attempt": 1, + "identifier": null, + "issues": [ + { + "type": 1, + "category": "General", + "message": "Build 23084188 (Azure-Kusto-Service-Windows-Buddy) was not successful. See following link for more info: https://msazure.visualstudio.com/b32aa71e-8ed2-41b2-9d77-5bc261222004/_build/results?buildId=23084188", + "data": { + "type": "error", + "logFileLineNumber": "127" + } + } + ] + }, + { + "previousAttempts": [], + "id": "5552b382-64d1-58e8-ad13-103a0d4e23a9", + "parentId": "fd490c07-0b22-5182-fac9-6d67fe1e939b", + "type": "Task", + "name": "Add PR Hyperlink", + "startTime": "2019-06-25T21:08:11.236Z", + "finishTime": "2019-06-25T21:08:11.236Z", + "currentOperation": null, + "percentComplete": null, + "state": 2, + "result": 4, + "resultCode": "Evaluating: succeeded()\r\nResult: False\r\n", + "changeId": 34, + "lastModified": "0000-12-31T21:39:06.000Z", + "workerName": "Hosted Agent 10", + "order": 16, + "details": null, + "errorCount": 0, + "warningCount": 0, + "url": null, + "log": { + "id": 18, + "type": "Container", + "url": "https://msazure.visualstudio.com/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/build/builds/23084075/logs/18" + }, + "task": { + "id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9", + "name": "CmdLine", + "version": "2.151.1" + }, + "attempt": 1, + "identifier": null + }, + { + "previousAttempts": [], + "id": "8af02db6-92c4-44f7-b2ea-11fcb9346894", + "parentId": "fd490c07-0b22-5182-fac9-6d67fe1e939b", + "type": "Task", + "name": "Initialize Job", + "startTime": "2019-06-25T20:34:13.363Z", + "finishTime": "2019-06-25T20:34:20.680Z", + "currentOperation": null, + "percentComplete": null, + "state": 2, + "result": 0, + "resultCode": null, + "changeId": 7, + "lastModified": "0000-12-31T21:39:06.000Z", + "workerName": "Hosted Agent 10", + "order": 1, + "details": null, + "errorCount": 0, + "warningCount": 0, + "url": null, + "log": { + "id": 3, + "type": "Container", + "url": "https://msazure.visualstudio.com/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/build/builds/23084075/logs/3" + }, + "task": null, + "attempt": 1, + "identifier": null + }, + { + "previousAttempts": [], + "id": "e6cb60a8-b2c5-4782-ba44-1560176630b1", + "parentId": "fd490c07-0b22-5182-fac9-6d67fe1e939b", + "type": "Task", + "name": "Post-job: Checkout", + "startTime": "2019-06-25T21:08:26.143Z", + "finishTime": "2019-06-25T21:08:26.680Z", + "currentOperation": null, + "percentComplete": null, + "state": 2, + "result": 0, + "resultCode": null, + "changeId": 37, + "lastModified": "0000-12-31T21:39:06.000Z", + "workerName": "Hosted Agent 10", + "order": 20, + "details": null, + "errorCount": 0, + "warningCount": 0, + "url": null, + "log": { + "id": 22, + "type": "Container", + "url": "https://msazure.visualstudio.com/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/build/builds/23084075/logs/22" + }, + "task": null, + "attempt": 1, + "identifier": null + }, + { + "previousAttempts": [], + "id": "ba74ecde-bc02-55b4-e940-2ad9ea206749", + "parentId": "fd490c07-0b22-5182-fac9-6d67fe1e939b", + "type": "Task", + "name": "create Dynamic branch", + "startTime": "2019-06-25T21:08:11.233Z", + "finishTime": "2019-06-25T21:08:11.236Z", + "currentOperation": null, + "percentComplete": null, + "state": 2, + "result": 4, + "resultCode": "Evaluating: succeeded()\r\nResult: False\r\n", + "changeId": 33, + "lastModified": "0000-12-31T21:39:06.000Z", + "workerName": "Hosted Agent 10", + "order": 14, + "details": null, + "errorCount": 0, + "warningCount": 0, + "url": null, + "log": { + "id": 16, + "type": "Container", + "url": "https://msazure.visualstudio.com/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/build/builds/23084075/logs/16" + }, + "task": { + "id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9", + "name": "CmdLine", + "version": "2.151.1" + }, + "attempt": 1, + "identifier": null + }, + { + "previousAttempts": [], + "id": "17ec34e0-4c05-5384-4feb-35d450a9ae1d", + "parentId": "fd490c07-0b22-5182-fac9-6d67fe1e939b", + "type": "Task", + "name": "list pull reguests", + "startTime": "2019-06-25T21:08:11.233Z", + "finishTime": "2019-06-25T21:08:11.233Z", + "currentOperation": null, + "percentComplete": null, + "state": 2, + "result": 4, + "resultCode": "Evaluating: succeeded()\r\nResult: False\r\n", + "changeId": 33, + "lastModified": "0000-12-31T21:39:06.000Z", + "workerName": "Hosted Agent 10", + "order": 13, + "details": null, + "errorCount": 0, + "warningCount": 0, + "url": null, + "log": { + "id": 15, + "type": "Container", + "url": "https://msazure.visualstudio.com/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/build/builds/23084075/logs/15" + }, + "task": { + "id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9", + "name": "CmdLine", + "version": "2.151.1" + }, + "attempt": 1, + "identifier": null + }, + { + "previousAttempts": [], + "id": "52de66d1-5123-55ba-6be6-3e1c005ec87b", + "parentId": "fd490c07-0b22-5182-fac9-6d67fe1e939b", + "type": "Task", + "name": "Component Detection (auto-injected by policy)", + "startTime": "2019-06-25T21:08:26.140Z", + "finishTime": "2019-06-25T21:08:26.143Z", + "currentOperation": null, + "percentComplete": null, + "state": 2, + "result": 4, + "resultCode": "Evaluating: and(succeeded(), ne(variables['CG_RAN'], 'true'))\r\nExpanded: and(False, ne(variables['CG_RAN'], 'true'))\r\nResult: False\r\n", + "changeId": 37, + "lastModified": "0000-12-31T21:39:06.000Z", + "workerName": "Hosted Agent 10", + "order": 19, + "details": null, + "errorCount": 0, + "warningCount": 0, + "url": null, + "log": { + "id": 21, + "type": "Container", + "url": "https://msazure.visualstudio.com/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/build/builds/23084075/logs/21" + }, + "task": { + "id": "f2f0881f-4b99-4a1c-80ea-f5b13fd6cec4", + "name": "ComponentGovernanceComponentDetection", + "version": "0.20614.1" + }, + "attempt": 1, + "identifier": null + }, + { + "previousAttempts": [], + "id": "96da07f6-0fa7-579e-8e42-3e66cb7a1abe", + "parentId": "fd490c07-0b22-5182-fac9-6d67fe1e939b", + "type": "Task", + "name": "Publish Pipeline Artifact", + "startTime": "2019-06-25T21:08:11.236Z", + "finishTime": "2019-06-25T21:08:15.740Z", + "currentOperation": null, + "percentComplete": null, + "state": 2, + "result": 0, + "resultCode": null, + "changeId": 35, + "lastModified": "0000-12-31T21:39:06.000Z", + "workerName": "Hosted Agent 10", + "order": 17, + "details": null, + "errorCount": 0, + "warningCount": 0, + "url": null, + "log": { + "id": 19, + "type": "Container", + "url": "https://msazure.visualstudio.com/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/build/builds/23084075/logs/19" + }, + "task": { + "id": "ecdc45f6-832d-4ad9-b52b-ee49e94659be", + "name": "PublishPipelineArtifact", + "version": "0.139.0" + }, + "attempt": 1, + "identifier": null + }, + { + "previousAttempts": [], + "id": "262ac53a-4b77-54e8-72eb-48ed63d484e8", + "parentId": "fd490c07-0b22-5182-fac9-6d67fe1e939b", + "type": "Task", + "name": "npm custom (install tfx)", + "startTime": "2019-06-25T20:36:18.573Z", + "finishTime": "2019-06-25T20:37:17.480Z", + "currentOperation": null, + "percentComplete": null, + "state": 2, + "result": 0, + "resultCode": null, + "changeId": 17, + "lastModified": "0000-12-31T21:39:06.000Z", + "workerName": "Hosted Agent 10", + "order": 5, + "details": null, + "errorCount": 0, + "warningCount": 0, + "url": null, + "log": { + "id": 7, + "type": "Container", + "url": "https://msazure.visualstudio.com/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/build/builds/23084075/logs/7" + }, + "task": { + "id": "fe47e961-9fa8-4106-8639-368c022d43ad", + "name": "Npm", + "version": "1.153.0" + }, + "attempt": 1, + "identifier": null + }, + { + "previousAttempts": [], + "id": "306d64a5-7536-4380-bc85-4c0d9aafbf05", + "parentId": "96ac2280-8cb4-5df5-99de-dd2da759617d", + "type": "Checkpoint", + "name": "Checkpoint", + "startTime": "2019-06-25T20:34:01.073Z", + "finishTime": "2019-06-25T20:34:01.073Z", + "currentOperation": null, + "percentComplete": null, + "state": 2, + "result": 0, + "resultCode": null, + "changeId": 2, + "lastModified": "0000-12-31T21:39:06.000Z", + "workerName": null, + "details": null, + "errorCount": 0, + "warningCount": 0, + "url": null, + "log": null, + "task": null, + "attempt": 1, + "identifier": "Checkpoint" + }, + { + "previousAttempts": [], + "id": "c3337a25-d2db-5dd2-0a1f-5c847522258c", + "parentId": "fd490c07-0b22-5182-fac9-6d67fe1e939b", + "type": "Task", + "name": "Download secrets: shfeldma-keyvault", + "startTime": "2019-06-25T20:34:20.690Z", + "finishTime": "2019-06-25T20:34:22.646Z", + "currentOperation": null, + "percentComplete": null, + "state": 2, + "result": 0, + "resultCode": null, + "changeId": 9, + "lastModified": "0000-12-31T21:39:06.000Z", + "workerName": "Hosted Agent 10", + "order": 2, + "details": null, + "errorCount": 0, + "warningCount": 0, + "url": null, + "log": { + "id": 4, + "type": "Container", + "url": "https://msazure.visualstudio.com/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/build/builds/23084075/logs/4" + }, + "task": { + "id": "1e244d32-2dd4-4165-96fb-b7441ca9331e", + "name": "AzureKeyVault", + "version": "1.0.36" + }, + "attempt": 1, + "identifier": null + }, + { + "previousAttempts": [], + "id": "08d41a1b-6013-5b01-b962-661a2fb402c0", + "parentId": "fd490c07-0b22-5182-fac9-6d67fe1e939b", + "type": "Task", + "name": "Get Build Authors", + "startTime": "2019-06-25T21:08:05.243Z", + "finishTime": "2019-06-25T21:08:11.233Z", + "currentOperation": null, + "percentComplete": null, + "state": 2, + "result": 0, + "resultCode": null, + "changeId": 32, + "lastModified": "0000-12-31T21:39:06.000Z", + "workerName": "Hosted Agent 10", + "order": 12, + "details": null, + "errorCount": 0, + "warningCount": 0, + "url": null, + "log": { + "id": 14, + "type": "Container", + "url": "https://msazure.visualstudio.com/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/build/builds/23084075/logs/14" + }, + "task": { + "id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9", + "name": "CmdLine", + "version": "2.151.1" + }, + "attempt": 1, + "identifier": null + }, + { + "previousAttempts": [], + "id": "ce91d5d6-0c55-50f5-8ab9-6695c03ab102", + "parentId": "fd490c07-0b22-5182-fac9-6d67fe1e939b", + "type": "Task", + "name": "Collect build results", + "startTime": "2019-06-25T21:07:45.756Z", + "finishTime": "2019-06-25T21:07:52.183Z", + "currentOperation": null, + "percentComplete": null, + "state": 2, + "result": 1, + "resultCode": null, + "changeId": 29, + "lastModified": "0000-12-31T21:39:06.000Z", + "workerName": "Hosted Agent 10", + "order": 10, + "details": null, + "errorCount": 2, + "warningCount": 0, + "url": null, + "log": { + "id": 12, + "type": "Container", + "url": "https://msazure.visualstudio.com/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/build/builds/23084075/logs/12" + }, + "task": { + "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1", + "name": "PowerShell", + "version": "2.151.1" + }, + "attempt": 1, + "identifier": null, + "issues": [ + { + "type": 1, + "category": "General", + "message": "2019-06-25T21:04:10.3732145Z [INFO] [13563] C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\MSBuild\\15.0\\bin\\Microsoft.Common.CurrentVersion.targets(4529,5): error MSB3030: Could not copy the file \"C:\\source\\Tools\\pq2json\\pq2json.exe\" because it was not found. [C:\\source\\Src\\Engine\\Kusto.DataNode.Svc.Common\\Kusto.DataNode.Svc.Common.csproj]", + "data": { + "type": "error", + "logFileLineNumber": "90" + } + }, + { + "type": 1, + "category": "General", + "message": "PowerShell exited with code '1'.", + "data": { + "type": "error", + "logFileLineNumber": "97" + } + } + ] + }, + { + "previousAttempts": [], + "id": "fd490c07-0b22-5182-fac9-6d67fe1e939b", + "parentId": "d46bdafb-39a9-561e-f56f-8f45577d0334", + "type": "Job", + "name": "Agent job 1", + "startTime": "2019-06-25T20:34:13.133Z", + "finishTime": "2019-06-25T21:08:26.696Z", + "currentOperation": null, + "percentComplete": null, + "state": 2, + "result": 2, + "resultCode": null, + "changeId": 41, + "lastModified": "0000-12-31T21:39:06.000Z", + "workerName": "Hosted Agent 10", + "order": 1, + "details": null, + "errorCount": 0, + "warningCount": 0, + "url": null, + "log": { + "id": 24, + "type": "Container", + "url": "https://msazure.visualstudio.com/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/build/builds/23084075/logs/24" + }, + "task": null, + "attempt": 1, + "identifier": "Phase_1.__default" + }, + { + "previousAttempts": [], + "id": "c576f351-4094-5329-ed7f-6ece78f14b9a", + "parentId": "fd490c07-0b22-5182-fac9-6d67fe1e939b", + "type": "Task", + "name": "create Pull Rquest", + "startTime": "2019-06-25T21:08:11.236Z", + "finishTime": "2019-06-25T21:08:11.236Z", + "currentOperation": null, + "percentComplete": null, + "state": 2, + "result": 4, + "resultCode": "Evaluating: succeeded()\r\nResult: False\r\n", + "changeId": 34, + "lastModified": "0000-12-31T21:39:06.000Z", + "workerName": "Hosted Agent 10", + "order": 15, + "details": null, + "errorCount": 0, + "warningCount": 0, + "url": null, + "log": { + "id": 17, + "type": "Container", + "url": "https://msazure.visualstudio.com/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/build/builds/23084075/logs/17" + }, + "task": { + "id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9", + "name": "CmdLine", + "version": "2.151.1" + }, + "attempt": 1, + "identifier": null + }, + { + "previousAttempts": [], + "id": "6c0dc9a0-5e79-5d03-2eb1-7a6d7e4ff35d", + "parentId": "fd490c07-0b22-5182-fac9-6d67fe1e939b", + "type": "Task", + "name": "Use Node 10.x", + "startTime": "2019-06-25T20:36:09.306Z", + "finishTime": "2019-06-25T20:36:18.570Z", + "currentOperation": null, + "percentComplete": null, + "state": 2, + "result": 0, + "resultCode": null, + "changeId": 15, + "lastModified": "0000-12-31T21:39:06.000Z", + "workerName": "Hosted Agent 10", + "order": 4, + "details": null, + "errorCount": 0, + "warningCount": 0, + "url": null, + "log": { + "id": 6, + "type": "Container", + "url": "https://msazure.visualstudio.com/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/build/builds/23084075/logs/6" + }, + "task": { + "id": "31c75bbb-bcdf-4706-8d7c-4da6a1959bc2", + "name": "NodeTool", + "version": "0.151.1" + }, + "attempt": 1, + "identifier": null + }, + { + "previousAttempts": [], + "id": "935c0358-4553-4c29-984b-8aa33d3a219b", + "parentId": "fd490c07-0b22-5182-fac9-6d67fe1e939b", + "type": "Task", + "name": "Finalize Job", + "startTime": "2019-06-25T21:08:26.686Z", + "finishTime": "2019-06-25T21:08:26.693Z", + "currentOperation": null, + "percentComplete": 100, + "state": 2, + "result": 0, + "resultCode": null, + "changeId": 37, + "lastModified": "0000-12-31T21:39:06.000Z", + "workerName": "Hosted Agent 10", + "order": 21, + "details": null, + "errorCount": 0, + "warningCount": 0, + "url": null, + "log": { + "id": 23, + "type": "Container", + "url": "https://msazure.visualstudio.com/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/build/builds/23084075/logs/23" + }, + "task": null, + "attempt": 1, + "identifier": null + }, + { + "previousAttempts": [], + "id": "d46bdafb-39a9-561e-f56f-8f45577d0334", + "parentId": "96ac2280-8cb4-5df5-99de-dd2da759617d", + "type": "Phase", + "name": "Agent job 1", + "startTime": "2019-06-25T20:34:13.133Z", + "finishTime": "2019-06-25T21:08:30.130Z", + "currentOperation": null, + "percentComplete": null, + "state": 2, + "result": 2, + "resultCode": null, + "changeId": 38, + "lastModified": "0000-12-31T21:39:06.000Z", + "workerName": null, + "order": 1, + "details": null, + "errorCount": 0, + "warningCount": 0, + "url": null, + "log": { + "id": 2, + "type": "Container", + "url": "https://msazure.visualstudio.com/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/build/builds/23084075/logs/2" + }, + "task": null, + "attempt": 1, + "identifier": "Phase_1" + }, + { + "previousAttempts": [], + "id": "70b92200-87db-50c8-35f9-975ba5f9e5b7", + "parentId": "fd490c07-0b22-5182-fac9-6d67fe1e939b", + "type": "Task", + "name": "Install Tools", + "startTime": "2019-06-25T20:37:17.480Z", + "finishTime": "2019-06-25T20:37:37.746Z", + "currentOperation": null, + "percentComplete": null, + "state": 2, + "result": 0, + "resultCode": null, + "changeId": 19, + "lastModified": "0000-12-31T21:39:06.000Z", + "workerName": "Hosted Agent 10", + "order": 6, + "details": null, + "errorCount": 0, + "warningCount": 0, + "url": null, + "log": { + "id": 8, + "type": "Container", + "url": "https://msazure.visualstudio.com/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/build/builds/23084075/logs/8" + }, + "task": { + "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1", + "name": "PowerShell", + "version": "2.151.1" + }, + "attempt": 1, + "identifier": null + }, + { + "previousAttempts": [], + "id": "b9f92487-6ffa-512f-a3ec-c452df83e5c7", + "parentId": "fd490c07-0b22-5182-fac9-6d67fe1e939b", + "type": "Task", + "name": "Publish Test Results $(Build.SourcesDirectory)\\**\\*.trx", + "startTime": "2019-06-25T21:07:52.183Z", + "finishTime": "2019-06-25T21:08:05.243Z", + "currentOperation": null, + "percentComplete": null, + "state": 2, + "result": 0, + "resultCode": null, + "changeId": 30, + "lastModified": "0000-12-31T21:39:06.000Z", + "workerName": "Hosted Agent 10", + "order": 11, + "details": null, + "errorCount": 0, + "warningCount": 1, + "url": null, + "log": { + "id": 13, + "type": "Container", + "url": "https://msazure.visualstudio.com/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/build/builds/23084075/logs/13" + }, + "task": { + "id": "eb430c81-cc1b-4d21-9815-dad76d441207", + "name": "PublishTestResultsExtended", + "version": "1.0.73" + }, + "attempt": 1, + "identifier": null, + "issues": [ + { + "type": 2, + "category": "General", + "message": "No test result files were found using search pattern 'D:\\a\\1\\s\\**\\*.trx'.", + "data": { + "type": "warning", + "logFileLineNumber": "107" + } + } + ] + }, + { + "previousAttempts": [], + "id": "78db2542-c627-4140-8a7a-d06178fff4e4", + "parentId": "fd490c07-0b22-5182-fac9-6d67fe1e939b", + "type": "Task", + "name": "Report build status", + "startTime": "2019-06-25T21:08:31.870Z", + "finishTime": "2019-06-25T21:08:32.000Z", + "currentOperation": null, + "percentComplete": null, + "state": 2, + "result": 0, + "resultCode": null, + "changeId": 40, + "lastModified": "0000-12-31T21:39:06.000Z", + "workerName": null, + "order": 2147483647, + "details": null, + "errorCount": 0, + "warningCount": 0, + "url": null, + "log": { + "id": 25, + "type": "Container", + "url": "https://msazure.visualstudio.com/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/build/builds/23084075/logs/25" + }, + "task": null, + "attempt": 1, + "identifier": null + }, + { + "previousAttempts": [], + "id": "ec339c2b-c439-539d-f401-d5569bbc95f9", + "parentId": "fd490c07-0b22-5182-fac9-6d67fe1e939b", + "type": "Task", + "name": "Add Child Hyperlink", + "startTime": "2019-06-25T21:07:42.213Z", + "finishTime": "2019-06-25T21:07:43.693Z", + "currentOperation": null, + "percentComplete": null, + "state": 2, + "result": 0, + "resultCode": null, + "changeId": 24, + "lastModified": "0000-12-31T21:39:06.000Z", + "workerName": "Hosted Agent 10", + "order": 8, + "details": null, + "errorCount": 0, + "warningCount": 0, + "url": null, + "log": { + "id": 10, + "type": "Container", + "url": "https://msazure.visualstudio.com/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/build/builds/23084075/logs/10" + }, + "task": { + "id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9", + "name": "CmdLine", + "version": "2.151.1" + }, + "attempt": 1, + "identifier": null + }, + { + "previousAttempts": [], + "id": "f03d4b0b-5c7f-5a3c-32ca-d79e6a87d689", + "parentId": "fd490c07-0b22-5182-fac9-6d67fe1e939b", + "type": "Task", + "name": "Checkout", + "startTime": "2019-06-25T20:34:22.646Z", + "finishTime": "2019-06-25T20:36:09.306Z", + "currentOperation": null, + "percentComplete": null, + "state": 2, + "result": 0, + "resultCode": null, + "changeId": 13, + "lastModified": "0000-12-31T21:39:06.000Z", + "workerName": "Hosted Agent 10", + "order": 3, + "details": null, + "errorCount": 0, + "warningCount": 0, + "url": null, + "log": { + "id": 5, + "type": "Container", + "url": "https://msazure.visualstudio.com/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/build/builds/23084075/logs/5" + }, + "task": null, + "attempt": 1, + "identifier": null + }, + { + "previousAttempts": [], + "id": "96ac2280-8cb4-5df5-99de-dd2da759617d", + "parentId": null, + "type": "Stage", + "name": "__default", + "startTime": "2019-06-25T20:34:13.133Z", + "finishTime": "2019-06-25T21:08:31.820Z", + "currentOperation": null, + "percentComplete": null, + "state": 2, + "result": 2, + "resultCode": null, + "changeId": 5, + "lastModified": "0000-12-31T21:39:06.000Z", + "workerName": null, + "order": 1, + "details": null, + "errorCount": 0, + "warningCount": 0, + "url": null, + "log": null, + "task": null, + "attempt": 1, + "identifier": "__default" + }, + { + "previousAttempts": [], + "id": "66cfd6ef-8217-5bf8-f216-e4446caa86ae", + "parentId": "fd490c07-0b22-5182-fac9-6d67fe1e939b", + "type": "Task", + "name": "Send Email Report On validation Failure", + "startTime": "2019-06-25T21:08:15.740Z", + "finishTime": "2019-06-25T21:08:26.140Z", + "currentOperation": null, + "percentComplete": null, + "state": 2, + "result": 0, + "resultCode": null, + "changeId": 37, + "lastModified": "0000-12-31T21:39:06.000Z", + "workerName": "Hosted Agent 10", + "order": 18, + "details": null, + "errorCount": 0, + "warningCount": 0, + "url": null, + "log": { + "id": 20, + "type": "Container", + "url": "https://msazure.visualstudio.com/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/build/builds/23084075/logs/20" + }, + "task": { + "id": "36fd41b1-8024-4ce9-a5a0-53c3e54ed105", + "name": "EmailReport", + "version": "1.0.4" + }, + "attempt": 1, + "identifier": null + } + ], + "lastChangedBy": "00000002-0000-8888-8000-000000000000", + "lastChangedOn": "2019-06-25T21:08:32.017Z", + "id": "604d47ff-bdc4-44fc-9cc0-97f0f991a147", + "changeId": 41, + "url": "https://msazure.visualstudio.com/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/build/builds/23084075/Timeline/604d47ff-bdc4-44fc-9cc0-97f0f991a147" +} \ No newline at end of file diff --git a/app/exec/build/timeline.ts b/app/exec/build/timeline.ts new file mode 100644 index 00000000..10d819ac --- /dev/null +++ b/app/exec/build/timeline.ts @@ -0,0 +1,55 @@ +import { TfCommand } from "../../lib/tfcommand"; +import args = require("../../lib/arguments"); +import buildBase = require("./default"); +import buildClient = require("azure-devops-node-api/BuildApi"); +import buildContracts = require("azure-devops-node-api/interfaces/BuildInterfaces"); +import trace = require("../../lib/trace"); +import fs = require("fs"); +import { TLSSocket } from "tls"; +import { Stream } from "stream"; + +export function getCommand(args: string[]): BuildLogs { + return new BuildLogs(args); +} + +export class BuildLogs extends buildBase.BuildBase { + protected description = "Download build logs to zip archive."; + protected serverCommand = true; + + protected getHelpArgs(): string[] { + return ["project", "buildId"]; + } + + public exec(): Promise { + trace.debug("build-logs.exec"); + var buildapi = this.webApi.getBuildApi(); + return this.commandArgs.project.val().then((project) => { + return this.commandArgs.buildId.val().then((buildId) => { + return buildapi.then((api) => { + return api.getBuild(project, buildId).then((build) => { + return buildapi.then((api) => { + return api.getBuildTimeline(build.project.name, build.id).then((timeline) => { + var filename = build.definition.name + "-" + build.buildNumber + "_" + build.id + ".json"; + trace.info('Downloading ... '); + fs.writeFile(filename, JSON.stringify(timeline), function (err) { + if (err) { + trace.error(err); + } + }); + trace.info('File: %s Created', filename); + return timeline; + }); + }); + }); + }); + }); + }); + } + public friendlyOutput(timeline: buildContracts.Timeline): void { + if (!timeline) { + throw new Error("no build supplied"); + } + trace.println(); + trace.info("%s", timeline.id); + } +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 3563d043..050f69e4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "tfx-cli", - "version": "0.7.7", + "version": "0.7.62", "lockfileVersion": 1, "requires": true, "dependencies": { From 6bb1e2132d3bfa623272adf6f6b72ebb286fd1a2 Mon Sep 17 00:00:00 2001 From: Shani Feldman Date: Wed, 26 Jun 2019 15:16:19 +0300 Subject: [PATCH 230/235] update package vesion number --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a13af08c..5526035a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tfx-cli", - "version": "0.7.61", + "version": "0.7.62", "description": "CLI for Azure DevOps Services and Team Foundation Server", "repository": { "type": "git", From 27c971322788615e360a20509bbda94c20fab1dd Mon Sep 17 00:00:00 2001 From: Shani Feldman Date: Wed, 26 Jun 2019 15:17:50 +0300 Subject: [PATCH 231/235] remove redundant file from repo --- ...dy-CI-and-create-PR-23084075_23084075.json | 890 ------------------ 1 file changed, 890 deletions(-) delete mode 100644 Trigger-Buddy-CI-and-create-PR-23084075_23084075.json diff --git a/Trigger-Buddy-CI-and-create-PR-23084075_23084075.json b/Trigger-Buddy-CI-and-create-PR-23084075_23084075.json deleted file mode 100644 index cfb257c7..00000000 --- a/Trigger-Buddy-CI-and-create-PR-23084075_23084075.json +++ /dev/null @@ -1,890 +0,0 @@ -{ - "records": [ - { - "previousAttempts": [], - "id": "7cc137c2-61f2-5d65-b5f8-0e03d1af3170", - "parentId": "fd490c07-0b22-5182-fac9-6d67fe1e939b", - "type": "Task", - "name": "Log-in to tfx", - "startTime": "2019-06-25T21:07:43.693Z", - "finishTime": "2019-06-25T21:07:45.756Z", - "currentOperation": null, - "percentComplete": null, - "state": 2, - "result": 0, - "resultCode": null, - "changeId": 26, - "lastModified": "0000-12-31T21:39:06.000Z", - "workerName": "Hosted Agent 10", - "order": 9, - "details": null, - "errorCount": 0, - "warningCount": 0, - "url": null, - "log": { - "id": 11, - "type": "Container", - "url": "https://msazure.visualstudio.com/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/build/builds/23084075/logs/11" - }, - "task": { - "id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9", - "name": "CmdLine", - "version": "2.151.1" - }, - "attempt": 1, - "identifier": null - }, - { - "previousAttempts": [], - "id": "110d6b26-e88e-59e8-a760-101bf8f8cd53", - "parentId": "fd490c07-0b22-5182-fac9-6d67fe1e939b", - "type": "Task", - "name": "Trigger a new build of Azure-Kusto-Service-Windows-Buddy", - "startTime": "2019-06-25T20:37:37.750Z", - "finishTime": "2019-06-25T21:07:42.213Z", - "currentOperation": null, - "percentComplete": null, - "state": 2, - "result": 2, - "resultCode": null, - "changeId": 21, - "lastModified": "0000-12-31T21:39:06.000Z", - "workerName": "Hosted Agent 10", - "order": 7, - "details": null, - "errorCount": 1, - "warningCount": 0, - "url": null, - "log": { - "id": 9, - "type": "Container", - "url": "https://msazure.visualstudio.com/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/build/builds/23084075/logs/9" - }, - "task": { - "id": "32abcf98-0df6-4711-b2e4-66a405d3c1a6", - "name": "TriggerBuild", - "version": "3.0.7" - }, - "attempt": 1, - "identifier": null, - "issues": [ - { - "type": 1, - "category": "General", - "message": "Build 23084188 (Azure-Kusto-Service-Windows-Buddy) was not successful. See following link for more info: https://msazure.visualstudio.com/b32aa71e-8ed2-41b2-9d77-5bc261222004/_build/results?buildId=23084188", - "data": { - "type": "error", - "logFileLineNumber": "127" - } - } - ] - }, - { - "previousAttempts": [], - "id": "5552b382-64d1-58e8-ad13-103a0d4e23a9", - "parentId": "fd490c07-0b22-5182-fac9-6d67fe1e939b", - "type": "Task", - "name": "Add PR Hyperlink", - "startTime": "2019-06-25T21:08:11.236Z", - "finishTime": "2019-06-25T21:08:11.236Z", - "currentOperation": null, - "percentComplete": null, - "state": 2, - "result": 4, - "resultCode": "Evaluating: succeeded()\r\nResult: False\r\n", - "changeId": 34, - "lastModified": "0000-12-31T21:39:06.000Z", - "workerName": "Hosted Agent 10", - "order": 16, - "details": null, - "errorCount": 0, - "warningCount": 0, - "url": null, - "log": { - "id": 18, - "type": "Container", - "url": "https://msazure.visualstudio.com/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/build/builds/23084075/logs/18" - }, - "task": { - "id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9", - "name": "CmdLine", - "version": "2.151.1" - }, - "attempt": 1, - "identifier": null - }, - { - "previousAttempts": [], - "id": "8af02db6-92c4-44f7-b2ea-11fcb9346894", - "parentId": "fd490c07-0b22-5182-fac9-6d67fe1e939b", - "type": "Task", - "name": "Initialize Job", - "startTime": "2019-06-25T20:34:13.363Z", - "finishTime": "2019-06-25T20:34:20.680Z", - "currentOperation": null, - "percentComplete": null, - "state": 2, - "result": 0, - "resultCode": null, - "changeId": 7, - "lastModified": "0000-12-31T21:39:06.000Z", - "workerName": "Hosted Agent 10", - "order": 1, - "details": null, - "errorCount": 0, - "warningCount": 0, - "url": null, - "log": { - "id": 3, - "type": "Container", - "url": "https://msazure.visualstudio.com/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/build/builds/23084075/logs/3" - }, - "task": null, - "attempt": 1, - "identifier": null - }, - { - "previousAttempts": [], - "id": "e6cb60a8-b2c5-4782-ba44-1560176630b1", - "parentId": "fd490c07-0b22-5182-fac9-6d67fe1e939b", - "type": "Task", - "name": "Post-job: Checkout", - "startTime": "2019-06-25T21:08:26.143Z", - "finishTime": "2019-06-25T21:08:26.680Z", - "currentOperation": null, - "percentComplete": null, - "state": 2, - "result": 0, - "resultCode": null, - "changeId": 37, - "lastModified": "0000-12-31T21:39:06.000Z", - "workerName": "Hosted Agent 10", - "order": 20, - "details": null, - "errorCount": 0, - "warningCount": 0, - "url": null, - "log": { - "id": 22, - "type": "Container", - "url": "https://msazure.visualstudio.com/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/build/builds/23084075/logs/22" - }, - "task": null, - "attempt": 1, - "identifier": null - }, - { - "previousAttempts": [], - "id": "ba74ecde-bc02-55b4-e940-2ad9ea206749", - "parentId": "fd490c07-0b22-5182-fac9-6d67fe1e939b", - "type": "Task", - "name": "create Dynamic branch", - "startTime": "2019-06-25T21:08:11.233Z", - "finishTime": "2019-06-25T21:08:11.236Z", - "currentOperation": null, - "percentComplete": null, - "state": 2, - "result": 4, - "resultCode": "Evaluating: succeeded()\r\nResult: False\r\n", - "changeId": 33, - "lastModified": "0000-12-31T21:39:06.000Z", - "workerName": "Hosted Agent 10", - "order": 14, - "details": null, - "errorCount": 0, - "warningCount": 0, - "url": null, - "log": { - "id": 16, - "type": "Container", - "url": "https://msazure.visualstudio.com/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/build/builds/23084075/logs/16" - }, - "task": { - "id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9", - "name": "CmdLine", - "version": "2.151.1" - }, - "attempt": 1, - "identifier": null - }, - { - "previousAttempts": [], - "id": "17ec34e0-4c05-5384-4feb-35d450a9ae1d", - "parentId": "fd490c07-0b22-5182-fac9-6d67fe1e939b", - "type": "Task", - "name": "list pull reguests", - "startTime": "2019-06-25T21:08:11.233Z", - "finishTime": "2019-06-25T21:08:11.233Z", - "currentOperation": null, - "percentComplete": null, - "state": 2, - "result": 4, - "resultCode": "Evaluating: succeeded()\r\nResult: False\r\n", - "changeId": 33, - "lastModified": "0000-12-31T21:39:06.000Z", - "workerName": "Hosted Agent 10", - "order": 13, - "details": null, - "errorCount": 0, - "warningCount": 0, - "url": null, - "log": { - "id": 15, - "type": "Container", - "url": "https://msazure.visualstudio.com/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/build/builds/23084075/logs/15" - }, - "task": { - "id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9", - "name": "CmdLine", - "version": "2.151.1" - }, - "attempt": 1, - "identifier": null - }, - { - "previousAttempts": [], - "id": "52de66d1-5123-55ba-6be6-3e1c005ec87b", - "parentId": "fd490c07-0b22-5182-fac9-6d67fe1e939b", - "type": "Task", - "name": "Component Detection (auto-injected by policy)", - "startTime": "2019-06-25T21:08:26.140Z", - "finishTime": "2019-06-25T21:08:26.143Z", - "currentOperation": null, - "percentComplete": null, - "state": 2, - "result": 4, - "resultCode": "Evaluating: and(succeeded(), ne(variables['CG_RAN'], 'true'))\r\nExpanded: and(False, ne(variables['CG_RAN'], 'true'))\r\nResult: False\r\n", - "changeId": 37, - "lastModified": "0000-12-31T21:39:06.000Z", - "workerName": "Hosted Agent 10", - "order": 19, - "details": null, - "errorCount": 0, - "warningCount": 0, - "url": null, - "log": { - "id": 21, - "type": "Container", - "url": "https://msazure.visualstudio.com/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/build/builds/23084075/logs/21" - }, - "task": { - "id": "f2f0881f-4b99-4a1c-80ea-f5b13fd6cec4", - "name": "ComponentGovernanceComponentDetection", - "version": "0.20614.1" - }, - "attempt": 1, - "identifier": null - }, - { - "previousAttempts": [], - "id": "96da07f6-0fa7-579e-8e42-3e66cb7a1abe", - "parentId": "fd490c07-0b22-5182-fac9-6d67fe1e939b", - "type": "Task", - "name": "Publish Pipeline Artifact", - "startTime": "2019-06-25T21:08:11.236Z", - "finishTime": "2019-06-25T21:08:15.740Z", - "currentOperation": null, - "percentComplete": null, - "state": 2, - "result": 0, - "resultCode": null, - "changeId": 35, - "lastModified": "0000-12-31T21:39:06.000Z", - "workerName": "Hosted Agent 10", - "order": 17, - "details": null, - "errorCount": 0, - "warningCount": 0, - "url": null, - "log": { - "id": 19, - "type": "Container", - "url": "https://msazure.visualstudio.com/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/build/builds/23084075/logs/19" - }, - "task": { - "id": "ecdc45f6-832d-4ad9-b52b-ee49e94659be", - "name": "PublishPipelineArtifact", - "version": "0.139.0" - }, - "attempt": 1, - "identifier": null - }, - { - "previousAttempts": [], - "id": "262ac53a-4b77-54e8-72eb-48ed63d484e8", - "parentId": "fd490c07-0b22-5182-fac9-6d67fe1e939b", - "type": "Task", - "name": "npm custom (install tfx)", - "startTime": "2019-06-25T20:36:18.573Z", - "finishTime": "2019-06-25T20:37:17.480Z", - "currentOperation": null, - "percentComplete": null, - "state": 2, - "result": 0, - "resultCode": null, - "changeId": 17, - "lastModified": "0000-12-31T21:39:06.000Z", - "workerName": "Hosted Agent 10", - "order": 5, - "details": null, - "errorCount": 0, - "warningCount": 0, - "url": null, - "log": { - "id": 7, - "type": "Container", - "url": "https://msazure.visualstudio.com/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/build/builds/23084075/logs/7" - }, - "task": { - "id": "fe47e961-9fa8-4106-8639-368c022d43ad", - "name": "Npm", - "version": "1.153.0" - }, - "attempt": 1, - "identifier": null - }, - { - "previousAttempts": [], - "id": "306d64a5-7536-4380-bc85-4c0d9aafbf05", - "parentId": "96ac2280-8cb4-5df5-99de-dd2da759617d", - "type": "Checkpoint", - "name": "Checkpoint", - "startTime": "2019-06-25T20:34:01.073Z", - "finishTime": "2019-06-25T20:34:01.073Z", - "currentOperation": null, - "percentComplete": null, - "state": 2, - "result": 0, - "resultCode": null, - "changeId": 2, - "lastModified": "0000-12-31T21:39:06.000Z", - "workerName": null, - "details": null, - "errorCount": 0, - "warningCount": 0, - "url": null, - "log": null, - "task": null, - "attempt": 1, - "identifier": "Checkpoint" - }, - { - "previousAttempts": [], - "id": "c3337a25-d2db-5dd2-0a1f-5c847522258c", - "parentId": "fd490c07-0b22-5182-fac9-6d67fe1e939b", - "type": "Task", - "name": "Download secrets: shfeldma-keyvault", - "startTime": "2019-06-25T20:34:20.690Z", - "finishTime": "2019-06-25T20:34:22.646Z", - "currentOperation": null, - "percentComplete": null, - "state": 2, - "result": 0, - "resultCode": null, - "changeId": 9, - "lastModified": "0000-12-31T21:39:06.000Z", - "workerName": "Hosted Agent 10", - "order": 2, - "details": null, - "errorCount": 0, - "warningCount": 0, - "url": null, - "log": { - "id": 4, - "type": "Container", - "url": "https://msazure.visualstudio.com/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/build/builds/23084075/logs/4" - }, - "task": { - "id": "1e244d32-2dd4-4165-96fb-b7441ca9331e", - "name": "AzureKeyVault", - "version": "1.0.36" - }, - "attempt": 1, - "identifier": null - }, - { - "previousAttempts": [], - "id": "08d41a1b-6013-5b01-b962-661a2fb402c0", - "parentId": "fd490c07-0b22-5182-fac9-6d67fe1e939b", - "type": "Task", - "name": "Get Build Authors", - "startTime": "2019-06-25T21:08:05.243Z", - "finishTime": "2019-06-25T21:08:11.233Z", - "currentOperation": null, - "percentComplete": null, - "state": 2, - "result": 0, - "resultCode": null, - "changeId": 32, - "lastModified": "0000-12-31T21:39:06.000Z", - "workerName": "Hosted Agent 10", - "order": 12, - "details": null, - "errorCount": 0, - "warningCount": 0, - "url": null, - "log": { - "id": 14, - "type": "Container", - "url": "https://msazure.visualstudio.com/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/build/builds/23084075/logs/14" - }, - "task": { - "id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9", - "name": "CmdLine", - "version": "2.151.1" - }, - "attempt": 1, - "identifier": null - }, - { - "previousAttempts": [], - "id": "ce91d5d6-0c55-50f5-8ab9-6695c03ab102", - "parentId": "fd490c07-0b22-5182-fac9-6d67fe1e939b", - "type": "Task", - "name": "Collect build results", - "startTime": "2019-06-25T21:07:45.756Z", - "finishTime": "2019-06-25T21:07:52.183Z", - "currentOperation": null, - "percentComplete": null, - "state": 2, - "result": 1, - "resultCode": null, - "changeId": 29, - "lastModified": "0000-12-31T21:39:06.000Z", - "workerName": "Hosted Agent 10", - "order": 10, - "details": null, - "errorCount": 2, - "warningCount": 0, - "url": null, - "log": { - "id": 12, - "type": "Container", - "url": "https://msazure.visualstudio.com/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/build/builds/23084075/logs/12" - }, - "task": { - "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1", - "name": "PowerShell", - "version": "2.151.1" - }, - "attempt": 1, - "identifier": null, - "issues": [ - { - "type": 1, - "category": "General", - "message": "2019-06-25T21:04:10.3732145Z [INFO] [13563] C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\MSBuild\\15.0\\bin\\Microsoft.Common.CurrentVersion.targets(4529,5): error MSB3030: Could not copy the file \"C:\\source\\Tools\\pq2json\\pq2json.exe\" because it was not found. [C:\\source\\Src\\Engine\\Kusto.DataNode.Svc.Common\\Kusto.DataNode.Svc.Common.csproj]", - "data": { - "type": "error", - "logFileLineNumber": "90" - } - }, - { - "type": 1, - "category": "General", - "message": "PowerShell exited with code '1'.", - "data": { - "type": "error", - "logFileLineNumber": "97" - } - } - ] - }, - { - "previousAttempts": [], - "id": "fd490c07-0b22-5182-fac9-6d67fe1e939b", - "parentId": "d46bdafb-39a9-561e-f56f-8f45577d0334", - "type": "Job", - "name": "Agent job 1", - "startTime": "2019-06-25T20:34:13.133Z", - "finishTime": "2019-06-25T21:08:26.696Z", - "currentOperation": null, - "percentComplete": null, - "state": 2, - "result": 2, - "resultCode": null, - "changeId": 41, - "lastModified": "0000-12-31T21:39:06.000Z", - "workerName": "Hosted Agent 10", - "order": 1, - "details": null, - "errorCount": 0, - "warningCount": 0, - "url": null, - "log": { - "id": 24, - "type": "Container", - "url": "https://msazure.visualstudio.com/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/build/builds/23084075/logs/24" - }, - "task": null, - "attempt": 1, - "identifier": "Phase_1.__default" - }, - { - "previousAttempts": [], - "id": "c576f351-4094-5329-ed7f-6ece78f14b9a", - "parentId": "fd490c07-0b22-5182-fac9-6d67fe1e939b", - "type": "Task", - "name": "create Pull Rquest", - "startTime": "2019-06-25T21:08:11.236Z", - "finishTime": "2019-06-25T21:08:11.236Z", - "currentOperation": null, - "percentComplete": null, - "state": 2, - "result": 4, - "resultCode": "Evaluating: succeeded()\r\nResult: False\r\n", - "changeId": 34, - "lastModified": "0000-12-31T21:39:06.000Z", - "workerName": "Hosted Agent 10", - "order": 15, - "details": null, - "errorCount": 0, - "warningCount": 0, - "url": null, - "log": { - "id": 17, - "type": "Container", - "url": "https://msazure.visualstudio.com/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/build/builds/23084075/logs/17" - }, - "task": { - "id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9", - "name": "CmdLine", - "version": "2.151.1" - }, - "attempt": 1, - "identifier": null - }, - { - "previousAttempts": [], - "id": "6c0dc9a0-5e79-5d03-2eb1-7a6d7e4ff35d", - "parentId": "fd490c07-0b22-5182-fac9-6d67fe1e939b", - "type": "Task", - "name": "Use Node 10.x", - "startTime": "2019-06-25T20:36:09.306Z", - "finishTime": "2019-06-25T20:36:18.570Z", - "currentOperation": null, - "percentComplete": null, - "state": 2, - "result": 0, - "resultCode": null, - "changeId": 15, - "lastModified": "0000-12-31T21:39:06.000Z", - "workerName": "Hosted Agent 10", - "order": 4, - "details": null, - "errorCount": 0, - "warningCount": 0, - "url": null, - "log": { - "id": 6, - "type": "Container", - "url": "https://msazure.visualstudio.com/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/build/builds/23084075/logs/6" - }, - "task": { - "id": "31c75bbb-bcdf-4706-8d7c-4da6a1959bc2", - "name": "NodeTool", - "version": "0.151.1" - }, - "attempt": 1, - "identifier": null - }, - { - "previousAttempts": [], - "id": "935c0358-4553-4c29-984b-8aa33d3a219b", - "parentId": "fd490c07-0b22-5182-fac9-6d67fe1e939b", - "type": "Task", - "name": "Finalize Job", - "startTime": "2019-06-25T21:08:26.686Z", - "finishTime": "2019-06-25T21:08:26.693Z", - "currentOperation": null, - "percentComplete": 100, - "state": 2, - "result": 0, - "resultCode": null, - "changeId": 37, - "lastModified": "0000-12-31T21:39:06.000Z", - "workerName": "Hosted Agent 10", - "order": 21, - "details": null, - "errorCount": 0, - "warningCount": 0, - "url": null, - "log": { - "id": 23, - "type": "Container", - "url": "https://msazure.visualstudio.com/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/build/builds/23084075/logs/23" - }, - "task": null, - "attempt": 1, - "identifier": null - }, - { - "previousAttempts": [], - "id": "d46bdafb-39a9-561e-f56f-8f45577d0334", - "parentId": "96ac2280-8cb4-5df5-99de-dd2da759617d", - "type": "Phase", - "name": "Agent job 1", - "startTime": "2019-06-25T20:34:13.133Z", - "finishTime": "2019-06-25T21:08:30.130Z", - "currentOperation": null, - "percentComplete": null, - "state": 2, - "result": 2, - "resultCode": null, - "changeId": 38, - "lastModified": "0000-12-31T21:39:06.000Z", - "workerName": null, - "order": 1, - "details": null, - "errorCount": 0, - "warningCount": 0, - "url": null, - "log": { - "id": 2, - "type": "Container", - "url": "https://msazure.visualstudio.com/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/build/builds/23084075/logs/2" - }, - "task": null, - "attempt": 1, - "identifier": "Phase_1" - }, - { - "previousAttempts": [], - "id": "70b92200-87db-50c8-35f9-975ba5f9e5b7", - "parentId": "fd490c07-0b22-5182-fac9-6d67fe1e939b", - "type": "Task", - "name": "Install Tools", - "startTime": "2019-06-25T20:37:17.480Z", - "finishTime": "2019-06-25T20:37:37.746Z", - "currentOperation": null, - "percentComplete": null, - "state": 2, - "result": 0, - "resultCode": null, - "changeId": 19, - "lastModified": "0000-12-31T21:39:06.000Z", - "workerName": "Hosted Agent 10", - "order": 6, - "details": null, - "errorCount": 0, - "warningCount": 0, - "url": null, - "log": { - "id": 8, - "type": "Container", - "url": "https://msazure.visualstudio.com/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/build/builds/23084075/logs/8" - }, - "task": { - "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1", - "name": "PowerShell", - "version": "2.151.1" - }, - "attempt": 1, - "identifier": null - }, - { - "previousAttempts": [], - "id": "b9f92487-6ffa-512f-a3ec-c452df83e5c7", - "parentId": "fd490c07-0b22-5182-fac9-6d67fe1e939b", - "type": "Task", - "name": "Publish Test Results $(Build.SourcesDirectory)\\**\\*.trx", - "startTime": "2019-06-25T21:07:52.183Z", - "finishTime": "2019-06-25T21:08:05.243Z", - "currentOperation": null, - "percentComplete": null, - "state": 2, - "result": 0, - "resultCode": null, - "changeId": 30, - "lastModified": "0000-12-31T21:39:06.000Z", - "workerName": "Hosted Agent 10", - "order": 11, - "details": null, - "errorCount": 0, - "warningCount": 1, - "url": null, - "log": { - "id": 13, - "type": "Container", - "url": "https://msazure.visualstudio.com/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/build/builds/23084075/logs/13" - }, - "task": { - "id": "eb430c81-cc1b-4d21-9815-dad76d441207", - "name": "PublishTestResultsExtended", - "version": "1.0.73" - }, - "attempt": 1, - "identifier": null, - "issues": [ - { - "type": 2, - "category": "General", - "message": "No test result files were found using search pattern 'D:\\a\\1\\s\\**\\*.trx'.", - "data": { - "type": "warning", - "logFileLineNumber": "107" - } - } - ] - }, - { - "previousAttempts": [], - "id": "78db2542-c627-4140-8a7a-d06178fff4e4", - "parentId": "fd490c07-0b22-5182-fac9-6d67fe1e939b", - "type": "Task", - "name": "Report build status", - "startTime": "2019-06-25T21:08:31.870Z", - "finishTime": "2019-06-25T21:08:32.000Z", - "currentOperation": null, - "percentComplete": null, - "state": 2, - "result": 0, - "resultCode": null, - "changeId": 40, - "lastModified": "0000-12-31T21:39:06.000Z", - "workerName": null, - "order": 2147483647, - "details": null, - "errorCount": 0, - "warningCount": 0, - "url": null, - "log": { - "id": 25, - "type": "Container", - "url": "https://msazure.visualstudio.com/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/build/builds/23084075/logs/25" - }, - "task": null, - "attempt": 1, - "identifier": null - }, - { - "previousAttempts": [], - "id": "ec339c2b-c439-539d-f401-d5569bbc95f9", - "parentId": "fd490c07-0b22-5182-fac9-6d67fe1e939b", - "type": "Task", - "name": "Add Child Hyperlink", - "startTime": "2019-06-25T21:07:42.213Z", - "finishTime": "2019-06-25T21:07:43.693Z", - "currentOperation": null, - "percentComplete": null, - "state": 2, - "result": 0, - "resultCode": null, - "changeId": 24, - "lastModified": "0000-12-31T21:39:06.000Z", - "workerName": "Hosted Agent 10", - "order": 8, - "details": null, - "errorCount": 0, - "warningCount": 0, - "url": null, - "log": { - "id": 10, - "type": "Container", - "url": "https://msazure.visualstudio.com/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/build/builds/23084075/logs/10" - }, - "task": { - "id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9", - "name": "CmdLine", - "version": "2.151.1" - }, - "attempt": 1, - "identifier": null - }, - { - "previousAttempts": [], - "id": "f03d4b0b-5c7f-5a3c-32ca-d79e6a87d689", - "parentId": "fd490c07-0b22-5182-fac9-6d67fe1e939b", - "type": "Task", - "name": "Checkout", - "startTime": "2019-06-25T20:34:22.646Z", - "finishTime": "2019-06-25T20:36:09.306Z", - "currentOperation": null, - "percentComplete": null, - "state": 2, - "result": 0, - "resultCode": null, - "changeId": 13, - "lastModified": "0000-12-31T21:39:06.000Z", - "workerName": "Hosted Agent 10", - "order": 3, - "details": null, - "errorCount": 0, - "warningCount": 0, - "url": null, - "log": { - "id": 5, - "type": "Container", - "url": "https://msazure.visualstudio.com/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/build/builds/23084075/logs/5" - }, - "task": null, - "attempt": 1, - "identifier": null - }, - { - "previousAttempts": [], - "id": "96ac2280-8cb4-5df5-99de-dd2da759617d", - "parentId": null, - "type": "Stage", - "name": "__default", - "startTime": "2019-06-25T20:34:13.133Z", - "finishTime": "2019-06-25T21:08:31.820Z", - "currentOperation": null, - "percentComplete": null, - "state": 2, - "result": 2, - "resultCode": null, - "changeId": 5, - "lastModified": "0000-12-31T21:39:06.000Z", - "workerName": null, - "order": 1, - "details": null, - "errorCount": 0, - "warningCount": 0, - "url": null, - "log": null, - "task": null, - "attempt": 1, - "identifier": "__default" - }, - { - "previousAttempts": [], - "id": "66cfd6ef-8217-5bf8-f216-e4446caa86ae", - "parentId": "fd490c07-0b22-5182-fac9-6d67fe1e939b", - "type": "Task", - "name": "Send Email Report On validation Failure", - "startTime": "2019-06-25T21:08:15.740Z", - "finishTime": "2019-06-25T21:08:26.140Z", - "currentOperation": null, - "percentComplete": null, - "state": 2, - "result": 0, - "resultCode": null, - "changeId": 37, - "lastModified": "0000-12-31T21:39:06.000Z", - "workerName": "Hosted Agent 10", - "order": 18, - "details": null, - "errorCount": 0, - "warningCount": 0, - "url": null, - "log": { - "id": 20, - "type": "Container", - "url": "https://msazure.visualstudio.com/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/build/builds/23084075/logs/20" - }, - "task": { - "id": "36fd41b1-8024-4ce9-a5a0-53c3e54ed105", - "name": "EmailReport", - "version": "1.0.4" - }, - "attempt": 1, - "identifier": null - } - ], - "lastChangedBy": "00000002-0000-8888-8000-000000000000", - "lastChangedOn": "2019-06-25T21:08:32.017Z", - "id": "604d47ff-bdc4-44fc-9cc0-97f0f991a147", - "changeId": 41, - "url": "https://msazure.visualstudio.com/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/build/builds/23084075/Timeline/604d47ff-bdc4-44fc-9cc0-97f0f991a147" -} \ No newline at end of file From 7df805c44a176268f6f0bf40e23130f6ff78d05d Mon Sep 17 00:00:00 2001 From: Shani Feldman Date: Tue, 2 Jul 2019 11:01:38 +0300 Subject: [PATCH 232/235] fix create PR by adding empty searchCriteria TODO: fix deleteSourceBranch of undefined --- app/exec/code/git/pullrequest.ts | 18 +++++++++++++++--- package-lock.json | 2 +- package.json | 2 +- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/app/exec/code/git/pullrequest.ts b/app/exec/code/git/pullrequest.ts index 7de18012..b5eb7758 100644 --- a/app/exec/code/git/pullrequest.ts +++ b/app/exec/code/git/pullrequest.ts @@ -41,11 +41,21 @@ class GR implements gi.GitPullRequest { url: string; workItemRefs: VSSInterfaces.ResourceRef[]; } +class GSC implements gi.GitPullRequestSearchCriteria { + creatorId?: string; + includeLinks?: boolean; + repositoryId?: string; + reviewerId?: string; + sourceRefName?: string; + sourceRepositoryId?: string; + status?: gi.PullRequestStatus; + targetRefName?: string; +} class completionOptions implements gi.GitPullRequestCompletionOptions { deleteSourceBranch: boolean; mergeCommitMessage: string; - squashMerge: boolean;; + squashMerge: boolean; } export class PullRequest extends codedBase.CodeBase { @@ -80,7 +90,8 @@ export class PullRequest extends codedBase.CodeBase { return api.getPullRequests(gitRepositorieId, null) }); + var searchCriteria = new GSC + var pullRequests = await gitApi.then((api) => { return api.getPullRequests(gitRepositorieId, searchCriteria) }); var myBranchComment = ''; var newPullrequest: GR = new GR; newPullrequest.sourceRefName = 'refs/heads/' + source; @@ -122,6 +133,7 @@ export class PullRequest extends codedBase.CodeBase { return api.createPullRequest(newPullrequest, gitRepositorieId, project) }); var newPullrequest: GR = new GR; if (delSources) { + newPullrequest.completionOptions = new completionOptions newPullrequest.completionOptions.deleteSourceBranch = true } newPullrequest.autoCompleteSetBy = createdRequest.createdBy; @@ -138,7 +150,7 @@ export class PullRequest extends codedBase.CodeBase Date: Tue, 2 Jul 2019 17:23:32 +0300 Subject: [PATCH 233/235] bump version number after upstream sync --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 886db347..373ebf1b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "tfx-cli", - "version": "0.7.63", + "version": "0.7.64", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 983e5807..1ae5720e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tfx-cli", - "version": "0.7.63", + "version": "0.7.64", "description": "CLI for Azure DevOps Services and Team Foundation Server", "repository": { "type": "git", From 72a233fefcadae02c4715de93df2c460676ed555 Mon Sep 17 00:00:00 2001 From: Shani Feldman Date: Wed, 3 Jul 2019 22:31:37 +0300 Subject: [PATCH 234/235] upstream sync and bump version number to 0.7.81 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index caee2e51..949436c5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "tfx-cli", - "version": "0.7.8", + "version": "0.7.81", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 513f981a..8eb01409 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tfx-cli", - "version": "0.7.8", + "version": "0.7.81", "description": "CLI for Azure DevOps Services and Team Foundation Server", "repository": { "type": "git", From ab40daa35ffde88551a64ad3df588b5d72e588ab Mon Sep 17 00:00:00 2001 From: Samuel Levy Date: Mon, 15 Jul 2019 22:42:15 +0300 Subject: [PATCH 235/235] add merge completion options --- app/exec/code/git/default.ts | 2 ++ app/exec/code/git/pullrequest.ts | 13 ++++++++++++- package-lock.json | 2 +- package.json | 2 +- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/app/exec/code/git/default.ts b/app/exec/code/git/default.ts index c23e073d..826d8671 100644 --- a/app/exec/code/git/default.ts +++ b/app/exec/code/git/default.ts @@ -18,6 +18,7 @@ export interface CodeArguments extends CoreArguments { deletesourcebranch: args.BooleanArgument; repositoryid: args.StringArgument; autocomplete: args.BooleanArgument; + mergemethod: args.StringArgument; } export class CodeBase extends TfCommand { @@ -38,6 +39,7 @@ export class CodeBase extends TfComma this.registerCommandArgument(["requeststatus"], "filter by status (Active, Abandoned, Completed, All)", null, args.StringArgument, null); this.registerCommandArgument(["deletesourcebranch"], "delete source branch", "delete source branch on successfull merge",args.BooleanArgument,null); this.registerCommandArgument(["autocomplete"], "Auto Complete", "Set auto completion for a new pull request.", args.BooleanArgument, null); + this.registerCommandArgument(["mergemethod"], "Merge Method", "Set auto merge method for completing the pull request.", args.IntArgument, '1'); } public exec(cmd?: any): Promise { return this.getHelp(cmd); diff --git a/app/exec/code/git/pullrequest.ts b/app/exec/code/git/pullrequest.ts index b5eb7758..32287813 100644 --- a/app/exec/code/git/pullrequest.ts +++ b/app/exec/code/git/pullrequest.ts @@ -56,6 +56,7 @@ class completionOptions implements gi.GitPullRequestCompletionOptions { deleteSourceBranch: boolean; mergeCommitMessage: string; squashMerge: boolean; + mergeStrategy?: gi.GitPullRequestMergeStrategy; } export class PullRequest extends codedBase.CodeBase { @@ -63,7 +64,7 @@ export class PullRequest extends codedBase.CodeBase { @@ -76,6 +77,8 @@ export class PullRequest extends codedBase.CodeBase { return api.getRepositories(project); }); var gitRepositorie; @@ -135,6 +138,14 @@ export class PullRequest extends codedBase.CodeBase 4) + { + errLog('Merge Method ' + mergeMethod + ' is not valid, should be one of 1 (NoFastForward),2 (Squash),3 (Rebase),4 (RebaseMerge)'); + process.exit(1); + } + + newPullrequest.completionOptions.mergeStrategy = gi.GitPullRequestMergeStrategy[gi.GitPullRequestMergeStrategy[mergeMethod]] } newPullrequest.autoCompleteSetBy = createdRequest.createdBy; return await gitApi.then((api) => { return api.updatePullRequest(newPullrequest, gitRepositorieId, createdRequest.pullRequestId, project); }); diff --git a/package-lock.json b/package-lock.json index 949436c5..0997bcc9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "tfx-cli", - "version": "0.7.81", + "version": "0.7.82", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 8eb01409..55ad27a9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tfx-cli", - "version": "0.7.81", + "version": "0.7.82", "description": "CLI for Azure DevOps Services and Team Foundation Server", "repository": { "type": "git",