azure-devops-extension-api 4.237.0 → 4.238.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Represents usage data that includes a count and a limit for a specific aspect.
3
+ */
4
+ export interface Usage {
5
+ /**
6
+ * Gets the current count or usage.
7
+ */
8
+ count: number;
9
+ /**
10
+ * Gets the maximum limit or capacity.
11
+ */
12
+ limit: number;
13
+ }
@@ -0,0 +1,9 @@
1
+ /*
2
+ * ---------------------------------------------------------
3
+ * Copyright(C) Microsoft Corporation. All rights reserved.
4
+ * ---------------------------------------------------------
5
+ */
6
+ define(["require", "exports"], function (require, exports) {
7
+ "use strict";
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ });
@@ -0,0 +1 @@
1
+ define(["require","exports"],function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0})});
@@ -0,0 +1,20 @@
1
+ import { IVssRestClientOptions } from "../Common/Context";
2
+ import { RestClientBase } from "../Common/RestClientBase";
3
+ import * as ResourceUsage from "../ResourceUsage/ResourceUsage";
4
+ export declare class ResourceUsageRestClient extends RestClientBase {
5
+ constructor(options: IVssRestClientOptions);
6
+ static readonly RESOURCE_AREA_ID: string;
7
+ /**
8
+ * Gets the Project Level limits and Usage for a project.
9
+ *
10
+ * @param project - Project ID or project name
11
+ */
12
+ getProjectLimit(project: string): Promise<{
13
+ [key: string]: ResourceUsage.Usage;
14
+ }>;
15
+ /**
16
+ */
17
+ getLimits(): Promise<{
18
+ [key: string]: ResourceUsage.Usage;
19
+ }>;
20
+ }
@@ -0,0 +1,93 @@
1
+ /*
2
+ * ---------------------------------------------------------
3
+ * Copyright(C) Microsoft Corporation. All rights reserved.
4
+ * ---------------------------------------------------------
5
+ */
6
+ var __extends = (this && this.__extends) || (function () {
7
+ var extendStatics = Object.setPrototypeOf ||
8
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
9
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
10
+ return function (d, b) {
11
+ extendStatics(d, b);
12
+ function __() { this.constructor = d; }
13
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14
+ };
15
+ })();
16
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
17
+ return new (P || (P = Promise))(function (resolve, reject) {
18
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
19
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
20
+ function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
21
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
22
+ });
23
+ };
24
+ var __generator = (this && this.__generator) || function (thisArg, body) {
25
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
26
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
27
+ function verb(n) { return function (v) { return step([n, v]); }; }
28
+ function step(op) {
29
+ if (f) throw new TypeError("Generator is already executing.");
30
+ while (_) try {
31
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
32
+ if (y = 0, t) op = [op[0] & 2, t.value];
33
+ switch (op[0]) {
34
+ case 0: case 1: t = op; break;
35
+ case 4: _.label++; return { value: op[1], done: false };
36
+ case 5: _.label++; y = op[1]; op = [0]; continue;
37
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
38
+ default:
39
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
40
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
41
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
42
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
43
+ if (t[2]) _.ops.pop();
44
+ _.trys.pop(); continue;
45
+ }
46
+ op = body.call(thisArg, _);
47
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
48
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
49
+ }
50
+ };
51
+ define(["require", "exports", "../Common/RestClientBase"], function (require, exports, RestClientBase_1) {
52
+ "use strict";
53
+ Object.defineProperty(exports, "__esModule", { value: true });
54
+ var ResourceUsageRestClient = /** @class */ (function (_super) {
55
+ __extends(ResourceUsageRestClient, _super);
56
+ function ResourceUsageRestClient(options) {
57
+ return _super.call(this, options) || this;
58
+ }
59
+ /**
60
+ * Gets the Project Level limits and Usage for a project.
61
+ *
62
+ * @param project - Project ID or project name
63
+ */
64
+ ResourceUsageRestClient.prototype.getProjectLimit = function (project) {
65
+ return __awaiter(this, void 0, void 0, function () {
66
+ return __generator(this, function (_a) {
67
+ return [2 /*return*/, this.beginRequest({
68
+ apiVersion: "7.1-preview.1",
69
+ routeTemplate: "{project}/_apis/ResourceUsage",
70
+ routeValues: {
71
+ project: project
72
+ }
73
+ })];
74
+ });
75
+ });
76
+ };
77
+ /**
78
+ */
79
+ ResourceUsageRestClient.prototype.getLimits = function () {
80
+ return __awaiter(this, void 0, void 0, function () {
81
+ return __generator(this, function (_a) {
82
+ return [2 /*return*/, this.beginRequest({
83
+ apiVersion: "7.1-preview.1",
84
+ routeTemplate: "_apis/ResourceUsage"
85
+ })];
86
+ });
87
+ });
88
+ };
89
+ ResourceUsageRestClient.RESOURCE_AREA_ID = "240a9b11-3dc7-4aa0-b3fe-2b7dc8a4e7ea";
90
+ return ResourceUsageRestClient;
91
+ }(RestClientBase_1.RestClientBase));
92
+ exports.ResourceUsageRestClient = ResourceUsageRestClient;
93
+ });
@@ -0,0 +1 @@
1
+ var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),__awaiter=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function u(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(a,u)}c((r=r.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function n(n){return function(a){return function(n){if(r)throw new TypeError("Generator is already executing.");for(;u;)try{if(r=1,o&&(i=2&n[0]?o.return:n[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,n[1])).done)return i;switch(o=0,i&&(n=[2&n[0],i.value]),n[0]){case 0:case 1:i=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,o=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(i=u.trys,!(i=i.length>0&&i[i.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!i||n[1]>i[0]&&n[1]<i[3])){u.label=n[1];break}if(6===n[0]&&u.label<i[1]){u.label=i[1],i=n;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(n);break}i[2]&&u.ops.pop(),u.trys.pop();continue}n=t.call(e,u)}catch(e){n=[6,e],o=0}finally{r=i=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,a])}}var r,o,i,a,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a};define(["require","exports","../Common/RestClientBase"],function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.getProjectLimit=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.beginRequest({apiVersion:"7.1-preview.1",routeTemplate:"{project}/_apis/ResourceUsage",routeValues:{project:e}})]})})},t.prototype.getLimits=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.beginRequest({apiVersion:"7.1-preview.1",routeTemplate:"_apis/ResourceUsage"})]})})},t.RESOURCE_AREA_ID="240a9b11-3dc7-4aa0-b3fe-2b7dc8a4e7ea",t}(n.RestClientBase);t.ResourceUsageRestClient=r});
package/Test/Test.d.ts CHANGED
@@ -741,6 +741,7 @@ export declare enum CustomTestFieldScope {
741
741
  None = 0,
742
742
  TestRun = 1,
743
743
  TestResult = 2,
744
+ TestRunAndTestResult = 3,
744
745
  System = 4,
745
746
  All = 7
746
747
  }
@@ -752,6 +753,10 @@ export declare enum CustomTestFieldType {
752
753
  String = 12,
753
754
  Guid = 14
754
755
  }
756
+ export interface CustomTestFieldUpdateDefinition {
757
+ fieldId: number;
758
+ fieldName: string;
759
+ }
755
760
  export interface DatedTestFieldData {
756
761
  date: Date;
757
762
  value: TestFieldData;
@@ -1196,6 +1201,23 @@ export interface LinkedWorkItemsQueryResult {
1196
1201
  testCaseId: number;
1197
1202
  workItems: WorkItemReference[];
1198
1203
  }
1204
+ /**
1205
+ * Computer which ran tests in the session
1206
+ */
1207
+ export interface Machine {
1208
+ /**
1209
+ * GUID identifier for the environment the machine was configured with
1210
+ */
1211
+ environmentUid: string;
1212
+ /**
1213
+ * Name of the machine
1214
+ */
1215
+ name: string;
1216
+ /**
1217
+ * Session Machine timeline Valid values for "type" property = (Requested, Ready, Released)
1218
+ */
1219
+ timeline: Timeline[];
1220
+ }
1199
1221
  /**
1200
1222
  * Test summary metrics.
1201
1223
  */
@@ -2215,6 +2237,19 @@ export declare enum Service {
2215
2237
  Tcm = 1,
2216
2238
  Tfs = 2
2217
2239
  }
2240
+ /**
2241
+ * Container class for TestSessionEnvironment and Machine objects related to a test session
2242
+ */
2243
+ export interface SessionEnvironmentAndMachine {
2244
+ /**
2245
+ * Session Environments
2246
+ */
2247
+ environments: TestSessionEnvironment[];
2248
+ /**
2249
+ * Session Machines
2250
+ */
2251
+ machines: Machine[];
2252
+ }
2218
2253
  export declare enum SessionResult {
2219
2254
  /**
2220
2255
  * Default
@@ -2242,24 +2277,6 @@ export interface SessionSourcePipeline {
2242
2277
  */
2243
2278
  buildUrl: string;
2244
2279
  }
2245
- export declare enum SessionTimelineType {
2246
- /**
2247
- * Default
2248
- */
2249
- None = 0,
2250
- /**
2251
- * Timeline type for Queued status
2252
- */
2253
- Queued = 1,
2254
- /**
2255
- * Timeline type for Completed status
2256
- */
2257
- Completed = 2,
2258
- /**
2259
- * Timeline type for Started status
2260
- */
2261
- Started = 3
2262
- }
2263
2280
  /**
2264
2281
  * 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.
2265
2282
  */
@@ -2850,6 +2867,10 @@ export interface TestCaseResult {
2850
2867
  * Reference to identity executed the test.
2851
2868
  */
2852
2869
  runBy: WebApi.IdentityRef;
2870
+ /**
2871
+ * TestCaseId for the testResult from the source system
2872
+ */
2873
+ sourceSystemTestCaseId: string;
2853
2874
  /**
2854
2875
  * Stacktrace with maxSize= 1000 chars.
2855
2876
  */
@@ -4284,9 +4305,9 @@ export interface TestResultsSession {
4284
4305
  */
4285
4306
  testRuns: number[];
4286
4307
  /**
4287
- * TestResultsSession timeline
4308
+ * TestResultsSession timeline Valid values for "type" property = (Queued, Completed, Started)
4288
4309
  */
4289
- timeline: Timeline<SessionTimelineType>[];
4310
+ timeline: Timeline[];
4290
4311
  /**
4291
4312
  * TestResultsSession type
4292
4313
  */
@@ -4845,6 +4866,9 @@ export interface TestSession {
4845
4866
  */
4846
4867
  url: string;
4847
4868
  }
4869
+ /**
4870
+ * Test session environment
4871
+ */
4848
4872
  export interface TestSessionEnvironment {
4849
4873
  /**
4850
4874
  * Environment display name
@@ -4854,6 +4878,10 @@ export interface TestSessionEnvironment {
4854
4878
  * Processor architecture
4855
4879
  */
4856
4880
  processorArchitecture: string;
4881
+ /**
4882
+ * Uid of environment
4883
+ */
4884
+ uid: string;
4857
4885
  }
4858
4886
  export interface TestSessionExploredWorkItemReference extends TestSessionWorkItemReference {
4859
4887
  /**
@@ -5301,7 +5329,7 @@ export interface TestVariable {
5301
5329
  /**
5302
5330
  * Timeline
5303
5331
  */
5304
- export interface Timeline<T> {
5332
+ export interface Timeline {
5305
5333
  /**
5306
5334
  * Timeline display name
5307
5335
  */
@@ -5313,7 +5341,7 @@ export interface Timeline<T> {
5313
5341
  /**
5314
5342
  * Timeline type
5315
5343
  */
5316
- type: T;
5344
+ type: string;
5317
5345
  }
5318
5346
  export interface UpdatedProperties {
5319
5347
  id: number;
package/Test/Test.js CHANGED
@@ -212,6 +212,7 @@ define(["require", "exports"], function (require, exports) {
212
212
  CustomTestFieldScope[CustomTestFieldScope["None"] = 0] = "None";
213
213
  CustomTestFieldScope[CustomTestFieldScope["TestRun"] = 1] = "TestRun";
214
214
  CustomTestFieldScope[CustomTestFieldScope["TestResult"] = 2] = "TestResult";
215
+ CustomTestFieldScope[CustomTestFieldScope["TestRunAndTestResult"] = 3] = "TestRunAndTestResult";
215
216
  CustomTestFieldScope[CustomTestFieldScope["System"] = 4] = "System";
216
217
  CustomTestFieldScope[CustomTestFieldScope["All"] = 7] = "All";
217
218
  })(CustomTestFieldScope = exports.CustomTestFieldScope || (exports.CustomTestFieldScope = {}));
@@ -405,25 +406,6 @@ define(["require", "exports"], function (require, exports) {
405
406
  */
406
407
  SessionResult[SessionResult["Failed"] = 2] = "Failed";
407
408
  })(SessionResult = exports.SessionResult || (exports.SessionResult = {}));
408
- var SessionTimelineType;
409
- (function (SessionTimelineType) {
410
- /**
411
- * Default
412
- */
413
- SessionTimelineType[SessionTimelineType["None"] = 0] = "None";
414
- /**
415
- * Timeline type for Queued status
416
- */
417
- SessionTimelineType[SessionTimelineType["Queued"] = 1] = "Queued";
418
- /**
419
- * Timeline type for Completed status
420
- */
421
- SessionTimelineType[SessionTimelineType["Completed"] = 2] = "Completed";
422
- /**
423
- * Timeline type for Started status
424
- */
425
- SessionTimelineType[SessionTimelineType["Started"] = 3] = "Started";
426
- })(SessionTimelineType = exports.SessionTimelineType || (exports.SessionTimelineType = {}));
427
409
  /**
428
410
  * Option to get details in response
429
411
  */
package/Test/Test.min.js CHANGED
@@ -1 +1 @@
1
- define(["require","exports"],function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.GeneralAttachment=0]="GeneralAttachment",e[e.AfnStrip=1]="AfnStrip",e[e.BugFilingData=2]="BugFilingData",e[e.CodeCoverage=3]="CodeCoverage",e[e.IntermediateCollectorData=4]="IntermediateCollectorData",e[e.RunConfig=5]="RunConfig",e[e.TestImpactDetails=6]="TestImpactDetails",e[e.TmiTestRunDeploymentFiles=7]="TmiTestRunDeploymentFiles",e[e.TmiTestRunReverseDeploymentFiles=8]="TmiTestRunReverseDeploymentFiles",e[e.TmiTestResultDetail=9]="TmiTestResultDetail",e[e.TmiTestRunSummary=10]="TmiTestRunSummary",e[e.ConsoleLog=11]="ConsoleLog"}(t.AttachmentType||(t.AttachmentType={}));!function(e){e[e.Failed=2]="Failed",e[e.InProgress=1]="InProgress",e[e.Queued=0]="Queued",e[e.Succeeded=3]="Succeeded"}(t.CloneOperationState||(t.CloneOperationState={}));!function(e){e[e.None=0]="None",e[e.InProgress=1]="InProgress",e[e.Finalized=2]="Finalized",e[e.Pending=3]="Pending",e[e.UpdateRequestQueued=4]="UpdateRequestQueued",e[e.NoModulesFound=5]="NoModulesFound",e[e.NumberOfFilesExceeded=6]="NumberOfFilesExceeded",e[e.NoInputFiles=7]="NoInputFiles",e[e.BuildCancelled=8]="BuildCancelled",e[e.FailedJobs=9]="FailedJobs",e[e.ModuleMergeJobTimeout=10]="ModuleMergeJobTimeout",e[e.CodeCoverageSuccess=11]="CodeCoverageSuccess",e[e.InvalidBuildConfiguration=12]="InvalidBuildConfiguration",e[e.CoverageAnalyzerBuildNotFound=13]="CoverageAnalyzerBuildNotFound",e[e.FailedToRequeue=14]="FailedToRequeue",e[e.BuildBailedOut=15]="BuildBailedOut",e[e.NoCodeCoverageTask=16]="NoCodeCoverageTask",e[e.MergeJobFailed=17]="MergeJobFailed",e[e.MergeInvokerJobFailed=18]="MergeInvokerJobFailed",e[e.MonitorJobFailed=19]="MonitorJobFailed",e[e.ModuleMergeInvokerJobTimeout=20]="ModuleMergeInvokerJobTimeout",e[e.MonitorJobTimeout=21]="MonitorJobTimeout",e[e.InvalidCoverageInput=22]="InvalidCoverageInput"}(t.CoverageDetailedSummaryStatus||(t.CoverageDetailedSummaryStatus={}));!function(e){e[e.Modules=1]="Modules",e[e.Functions=2]="Functions",e[e.BlockData=4]="BlockData"}(t.CoverageQueryFlags||(t.CoverageQueryFlags={}));!function(e){e[e.Covered=0]="Covered",e[e.NotCovered=1]="NotCovered",e[e.PartiallyCovered=2]="PartiallyCovered"}(t.CoverageStatus||(t.CoverageStatus={}));!function(e){e[e.None=0]="None",e[e.InProgress=1]="InProgress",e[e.Completed=2]="Completed",e[e.Finalized=3]="Finalized",e[e.Pending=4]="Pending",e[e.UpdateRequestQueued=5]="UpdateRequestQueued"}(t.CoverageSummaryStatus||(t.CoverageSummaryStatus={}));!function(e){e[e.None=0]="None",e[e.TestRun=1]="TestRun",e[e.TestResult=2]="TestResult",e[e.System=4]="System",e[e.All=7]="All"}(t.CustomTestFieldScope||(t.CustomTestFieldScope={}));!function(e){e[e.Bit=2]="Bit",e[e.DateTime=4]="DateTime",e[e.Int=8]="Int",e[e.Float=6]="Float",e[e.String=12]="String",e[e.Guid=14]="Guid"}(t.CustomTestFieldType||(t.CustomTestFieldType={}));!function(e){e[e.Custom=1]="Custom",e[e.System=2]="System"}(t.FlakyDetectionType||(t.FlakyDetectionType={}));!function(e){e[e.All=1]="All",e[e.ResultSummary=2]="ResultSummary",e[e.ResultsAnalysis=3]="ResultsAnalysis",e[e.RunSummary=4]="RunSummary"}(t.Metrics||(t.Metrics={}));!function(e){e[e.Add=1]="Add",e[e.Delete=2]="Delete"}(t.OperationType||(t.OperationType={}));!function(e){e[e.None=0]="None",e[e.Iterations=1]="Iterations",e[e.WorkItems=2]="WorkItems",e[e.SubResults=4]="SubResults",e[e.Point=8]="Point"}(t.ResultDetails||(t.ResultDetails={}));!function(e){e[e.None=0]="None",e[e.Rerun=1]="Rerun",e[e.DataDriven=2]="DataDriven",e[e.OrderedTest=3]="OrderedTest",e[e.Generic=4]="Generic"}(t.ResultGroupType||(t.ResultGroupType={}));!function(e){e[e.Rerun=1]="Rerun",e[e.Flaky=2]="Flaky"}(t.ResultMetadata||(t.ResultMetadata={}));!function(e){e[e.None=0]="None",e[e.FlakyIdentifiers=1]="FlakyIdentifiers"}(t.ResultMetaDataDetails||(t.ResultMetaDataDetails={}));!function(e){e[e.TestSuite=0]="TestSuite",e[e.TestPlan=1]="TestPlan"}(t.ResultObjectType||(t.ResultObjectType={}));!function(e){e[e.Unspecified=0]="Unspecified",e[e.Normal=1]="Normal",e[e.Blocking=2]="Blocking",e[e.Web=4]="Web",e[e.MtrRunInitiatedFromWeb=8]="MtrRunInitiatedFromWeb",e[e.RunWithDtlEnv=16]="RunWithDtlEnv",e[e.NoConfigRun=32]="NoConfigRun"}(t.RunType||(t.RunType={}));!function(e){e[e.Any=0]="Any",e[e.Tcm=1]="Tcm",e[e.Tfs=2]="Tfs"}(t.Service||(t.Service={}));!function(e){e[e.None=0]="None",e[e.Passed=1]="Passed",e[e.Failed=2]="Failed"}(t.SessionResult||(t.SessionResult={}));!function(e){e[e.None=0]="None",e[e.Queued=1]="Queued",e[e.Completed=2]="Completed",e[e.Started=3]="Started"}(t.SessionTimelineType||(t.SessionTimelineType={}));!function(e){e[e.Children=1]="Children",e[e.DefaultTesters=2]="DefaultTesters"}(t.SuiteExpand||(t.SuiteExpand={}));!function(e){e[e.NotStarted=0]="NotStarted",e[e.InProgress=1]="InProgress",e[e.Completed=2]="Completed",e[e.Failed=3]="Failed"}(t.TCMServiceDataMigrationStatus||(t.TCMServiceDataMigrationStatus={}));!function(e){e[e.Active=1]="Active",e[e.Inactive=2]="Inactive"}(t.TestConfigurationState||(t.TestConfigurationState={}));!function(e){e[e.Run=0]="Run",e[e.Build=1]="Build",e[e.Release=2]="Release"}(t.TestLogScope||(t.TestLogScope={}));!function(e){e[e.Success=0]="Success",e[e.Failed=1]="Failed",e[e.FileAlreadyExists=2]="FileAlreadyExists",e[e.InvalidInput=3]="InvalidInput",e[e.InvalidFileName=4]="InvalidFileName",e[e.InvalidContainer=5]="InvalidContainer",e[e.TransferFailed=6]="TransferFailed",e[e.FeatureDisabled=7]="FeatureDisabled",e[e.BuildDoesNotExist=8]="BuildDoesNotExist",e[e.RunDoesNotExist=9]="RunDoesNotExist",e[e.ContainerNotCreated=10]="ContainerNotCreated",e[e.APINotSupported=11]="APINotSupported",e[e.FileSizeExceeds=12]="FileSizeExceeds",e[e.ContainerNotFound=13]="ContainerNotFound",e[e.FileNotFound=14]="FileNotFound",e[e.DirectoryNotFound=15]="DirectoryNotFound",e[e.StorageCapacityExceeded=16]="StorageCapacityExceeded"}(t.TestLogStatusCode||(t.TestLogStatusCode={}));!function(e){e[e.Root=1]="Root",e[e.File=2]="File"}(t.TestLogStoreEndpointType||(t.TestLogStoreEndpointType={}));!function(e){e[e.Read=1]="Read",e[e.Create=2]="Create",e[e.ReadAndCreate=3]="ReadAndCreate"}(t.TestLogStoreOperationType||(t.TestLogStoreOperationType={}));!function(e){e[e.GeneralAttachment=1]="GeneralAttachment",e[e.CodeCoverage=2]="CodeCoverage",e[e.TestImpact=3]="TestImpact",e[e.Intermediate=4]="Intermediate",e[e.System=5]="System",e[e.MergedCoverageFile=6]="MergedCoverageFile"}(t.TestLogType||(t.TestLogType={}));!function(e){e[e.Unspecified=0]="Unspecified",e[e.None=1]="None",e[e.Passed=2]="Passed",e[e.Failed=3]="Failed",e[e.Inconclusive=4]="Inconclusive",e[e.Timeout=5]="Timeout",e[e.Aborted=6]="Aborted",e[e.Blocked=7]="Blocked",e[e.NotExecuted=8]="NotExecuted",e[e.Warning=9]="Warning",e[e.Error=10]="Error",e[e.NotApplicable=11]="NotApplicable",e[e.Paused=12]="Paused",e[e.InProgress=13]="InProgress",e[e.NotImpacted=14]="NotImpacted",e[e.MaxValue=14]="MaxValue"}(t.TestOutcome||(t.TestOutcome={}));!function(e){e[e.None=0]="None",e[e.Ready=1]="Ready",e[e.Completed=2]="Completed",e[e.NotReady=3]="NotReady",e[e.InProgress=4]="InProgress",e[e.MaxValue=4]="MaxValue"}(t.TestPointState||(t.TestPointState={}));!function(e){e[e.Branch=1]="Branch",e[e.Environment=2]="Environment"}(t.TestResultGroupBy||(t.TestResultGroupBy={}));!function(e){e[e.Build=1]="Build",e[e.Release=2]="Release",e[e.Pipeline=3]="Pipeline"}(t.TestResultsContextType||(t.TestResultsContextType={}));!function(e){e[e.None=0]="None",e[e.Running=1]="Running",e[e.Completed=2]="Completed",e[e.Waiting=3]="Waiting",e[e.Cancelled=4]="Cancelled"}(t.TestResultsSessionState||(t.TestResultsSessionState={}));!function(e){e[e.All=1]="All",e[e.Flaky=2]="Flaky",e[e.NewTestLogging=3]="NewTestLogging"}(t.TestResultsSettingsType||(t.TestResultsSettingsType={}));!function(e){e[e.Passed=0]="Passed",e[e.Failed=1]="Failed",e[e.NotImpacted=2]="NotImpacted",e[e.Others=3]="Others"}(t.TestRunOutcome||(t.TestRunOutcome={}));!function(e){e[e.Build=1]="Build",e[e.Release=2]="Release",e[e.All=3]="All"}(t.TestRunPublishContext||(t.TestRunPublishContext={}));!function(e){e[e.Unspecified=0]="Unspecified",e[e.NotStarted=1]="NotStarted",e[e.InProgress=2]="InProgress",e[e.Completed=3]="Completed",e[e.Aborted=4]="Aborted",e[e.Waiting=5]="Waiting",e[e.NeedsInvestigation=6]="NeedsInvestigation"}(t.TestRunState||(t.TestRunState={}));!function(e){e[e.None=0]="None",e[e.CreatingEnvironment=1]="CreatingEnvironment",e[e.RunningTests=2]="RunningTests",e[e.CanceledByUser=3]="CanceledByUser",e[e.AbortedBySystem=4]="AbortedBySystem",e[e.TimedOut=5]="TimedOut",e[e.PendingAnalysis=6]="PendingAnalysis",e[e.Analyzed=7]="Analyzed",e[e.CancellationInProgress=8]="CancellationInProgress"}(t.TestRunSubstate||(t.TestRunSubstate={}));!function(e){e[e.Unknown=0]="Unknown",e[e.XTDesktop=1]="XTDesktop",e[e.FeedbackDesktop=2]="FeedbackDesktop",e[e.XTWeb=3]="XTWeb",e[e.FeedbackWeb=4]="FeedbackWeb",e[e.XTDesktop2=5]="XTDesktop2",e[e.SessionInsightsForAll=6]="SessionInsightsForAll"}(t.TestSessionSource||(t.TestSessionSource={}));!function(e){e[e.Unspecified=0]="Unspecified",e[e.NotStarted=1]="NotStarted",e[e.InProgress=2]="InProgress",e[e.Paused=3]="Paused",e[e.Completed=4]="Completed",e[e.Declined=5]="Declined"}(t.TestSessionState||(t.TestSessionState={}))});
1
+ define(["require","exports"],function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.GeneralAttachment=0]="GeneralAttachment",e[e.AfnStrip=1]="AfnStrip",e[e.BugFilingData=2]="BugFilingData",e[e.CodeCoverage=3]="CodeCoverage",e[e.IntermediateCollectorData=4]="IntermediateCollectorData",e[e.RunConfig=5]="RunConfig",e[e.TestImpactDetails=6]="TestImpactDetails",e[e.TmiTestRunDeploymentFiles=7]="TmiTestRunDeploymentFiles",e[e.TmiTestRunReverseDeploymentFiles=8]="TmiTestRunReverseDeploymentFiles",e[e.TmiTestResultDetail=9]="TmiTestResultDetail",e[e.TmiTestRunSummary=10]="TmiTestRunSummary",e[e.ConsoleLog=11]="ConsoleLog"}(t.AttachmentType||(t.AttachmentType={}));!function(e){e[e.Failed=2]="Failed",e[e.InProgress=1]="InProgress",e[e.Queued=0]="Queued",e[e.Succeeded=3]="Succeeded"}(t.CloneOperationState||(t.CloneOperationState={}));!function(e){e[e.None=0]="None",e[e.InProgress=1]="InProgress",e[e.Finalized=2]="Finalized",e[e.Pending=3]="Pending",e[e.UpdateRequestQueued=4]="UpdateRequestQueued",e[e.NoModulesFound=5]="NoModulesFound",e[e.NumberOfFilesExceeded=6]="NumberOfFilesExceeded",e[e.NoInputFiles=7]="NoInputFiles",e[e.BuildCancelled=8]="BuildCancelled",e[e.FailedJobs=9]="FailedJobs",e[e.ModuleMergeJobTimeout=10]="ModuleMergeJobTimeout",e[e.CodeCoverageSuccess=11]="CodeCoverageSuccess",e[e.InvalidBuildConfiguration=12]="InvalidBuildConfiguration",e[e.CoverageAnalyzerBuildNotFound=13]="CoverageAnalyzerBuildNotFound",e[e.FailedToRequeue=14]="FailedToRequeue",e[e.BuildBailedOut=15]="BuildBailedOut",e[e.NoCodeCoverageTask=16]="NoCodeCoverageTask",e[e.MergeJobFailed=17]="MergeJobFailed",e[e.MergeInvokerJobFailed=18]="MergeInvokerJobFailed",e[e.MonitorJobFailed=19]="MonitorJobFailed",e[e.ModuleMergeInvokerJobTimeout=20]="ModuleMergeInvokerJobTimeout",e[e.MonitorJobTimeout=21]="MonitorJobTimeout",e[e.InvalidCoverageInput=22]="InvalidCoverageInput"}(t.CoverageDetailedSummaryStatus||(t.CoverageDetailedSummaryStatus={}));!function(e){e[e.Modules=1]="Modules",e[e.Functions=2]="Functions",e[e.BlockData=4]="BlockData"}(t.CoverageQueryFlags||(t.CoverageQueryFlags={}));!function(e){e[e.Covered=0]="Covered",e[e.NotCovered=1]="NotCovered",e[e.PartiallyCovered=2]="PartiallyCovered"}(t.CoverageStatus||(t.CoverageStatus={}));!function(e){e[e.None=0]="None",e[e.InProgress=1]="InProgress",e[e.Completed=2]="Completed",e[e.Finalized=3]="Finalized",e[e.Pending=4]="Pending",e[e.UpdateRequestQueued=5]="UpdateRequestQueued"}(t.CoverageSummaryStatus||(t.CoverageSummaryStatus={}));!function(e){e[e.None=0]="None",e[e.TestRun=1]="TestRun",e[e.TestResult=2]="TestResult",e[e.TestRunAndTestResult=3]="TestRunAndTestResult",e[e.System=4]="System",e[e.All=7]="All"}(t.CustomTestFieldScope||(t.CustomTestFieldScope={}));!function(e){e[e.Bit=2]="Bit",e[e.DateTime=4]="DateTime",e[e.Int=8]="Int",e[e.Float=6]="Float",e[e.String=12]="String",e[e.Guid=14]="Guid"}(t.CustomTestFieldType||(t.CustomTestFieldType={}));!function(e){e[e.Custom=1]="Custom",e[e.System=2]="System"}(t.FlakyDetectionType||(t.FlakyDetectionType={}));!function(e){e[e.All=1]="All",e[e.ResultSummary=2]="ResultSummary",e[e.ResultsAnalysis=3]="ResultsAnalysis",e[e.RunSummary=4]="RunSummary"}(t.Metrics||(t.Metrics={}));!function(e){e[e.Add=1]="Add",e[e.Delete=2]="Delete"}(t.OperationType||(t.OperationType={}));!function(e){e[e.None=0]="None",e[e.Iterations=1]="Iterations",e[e.WorkItems=2]="WorkItems",e[e.SubResults=4]="SubResults",e[e.Point=8]="Point"}(t.ResultDetails||(t.ResultDetails={}));!function(e){e[e.None=0]="None",e[e.Rerun=1]="Rerun",e[e.DataDriven=2]="DataDriven",e[e.OrderedTest=3]="OrderedTest",e[e.Generic=4]="Generic"}(t.ResultGroupType||(t.ResultGroupType={}));!function(e){e[e.Rerun=1]="Rerun",e[e.Flaky=2]="Flaky"}(t.ResultMetadata||(t.ResultMetadata={}));!function(e){e[e.None=0]="None",e[e.FlakyIdentifiers=1]="FlakyIdentifiers"}(t.ResultMetaDataDetails||(t.ResultMetaDataDetails={}));!function(e){e[e.TestSuite=0]="TestSuite",e[e.TestPlan=1]="TestPlan"}(t.ResultObjectType||(t.ResultObjectType={}));!function(e){e[e.Unspecified=0]="Unspecified",e[e.Normal=1]="Normal",e[e.Blocking=2]="Blocking",e[e.Web=4]="Web",e[e.MtrRunInitiatedFromWeb=8]="MtrRunInitiatedFromWeb",e[e.RunWithDtlEnv=16]="RunWithDtlEnv",e[e.NoConfigRun=32]="NoConfigRun"}(t.RunType||(t.RunType={}));!function(e){e[e.Any=0]="Any",e[e.Tcm=1]="Tcm",e[e.Tfs=2]="Tfs"}(t.Service||(t.Service={}));!function(e){e[e.None=0]="None",e[e.Passed=1]="Passed",e[e.Failed=2]="Failed"}(t.SessionResult||(t.SessionResult={}));!function(e){e[e.Children=1]="Children",e[e.DefaultTesters=2]="DefaultTesters"}(t.SuiteExpand||(t.SuiteExpand={}));!function(e){e[e.NotStarted=0]="NotStarted",e[e.InProgress=1]="InProgress",e[e.Completed=2]="Completed",e[e.Failed=3]="Failed"}(t.TCMServiceDataMigrationStatus||(t.TCMServiceDataMigrationStatus={}));!function(e){e[e.Active=1]="Active",e[e.Inactive=2]="Inactive"}(t.TestConfigurationState||(t.TestConfigurationState={}));!function(e){e[e.Run=0]="Run",e[e.Build=1]="Build",e[e.Release=2]="Release"}(t.TestLogScope||(t.TestLogScope={}));!function(e){e[e.Success=0]="Success",e[e.Failed=1]="Failed",e[e.FileAlreadyExists=2]="FileAlreadyExists",e[e.InvalidInput=3]="InvalidInput",e[e.InvalidFileName=4]="InvalidFileName",e[e.InvalidContainer=5]="InvalidContainer",e[e.TransferFailed=6]="TransferFailed",e[e.FeatureDisabled=7]="FeatureDisabled",e[e.BuildDoesNotExist=8]="BuildDoesNotExist",e[e.RunDoesNotExist=9]="RunDoesNotExist",e[e.ContainerNotCreated=10]="ContainerNotCreated",e[e.APINotSupported=11]="APINotSupported",e[e.FileSizeExceeds=12]="FileSizeExceeds",e[e.ContainerNotFound=13]="ContainerNotFound",e[e.FileNotFound=14]="FileNotFound",e[e.DirectoryNotFound=15]="DirectoryNotFound",e[e.StorageCapacityExceeded=16]="StorageCapacityExceeded"}(t.TestLogStatusCode||(t.TestLogStatusCode={}));!function(e){e[e.Root=1]="Root",e[e.File=2]="File"}(t.TestLogStoreEndpointType||(t.TestLogStoreEndpointType={}));!function(e){e[e.Read=1]="Read",e[e.Create=2]="Create",e[e.ReadAndCreate=3]="ReadAndCreate"}(t.TestLogStoreOperationType||(t.TestLogStoreOperationType={}));!function(e){e[e.GeneralAttachment=1]="GeneralAttachment",e[e.CodeCoverage=2]="CodeCoverage",e[e.TestImpact=3]="TestImpact",e[e.Intermediate=4]="Intermediate",e[e.System=5]="System",e[e.MergedCoverageFile=6]="MergedCoverageFile"}(t.TestLogType||(t.TestLogType={}));!function(e){e[e.Unspecified=0]="Unspecified",e[e.None=1]="None",e[e.Passed=2]="Passed",e[e.Failed=3]="Failed",e[e.Inconclusive=4]="Inconclusive",e[e.Timeout=5]="Timeout",e[e.Aborted=6]="Aborted",e[e.Blocked=7]="Blocked",e[e.NotExecuted=8]="NotExecuted",e[e.Warning=9]="Warning",e[e.Error=10]="Error",e[e.NotApplicable=11]="NotApplicable",e[e.Paused=12]="Paused",e[e.InProgress=13]="InProgress",e[e.NotImpacted=14]="NotImpacted",e[e.MaxValue=14]="MaxValue"}(t.TestOutcome||(t.TestOutcome={}));!function(e){e[e.None=0]="None",e[e.Ready=1]="Ready",e[e.Completed=2]="Completed",e[e.NotReady=3]="NotReady",e[e.InProgress=4]="InProgress",e[e.MaxValue=4]="MaxValue"}(t.TestPointState||(t.TestPointState={}));!function(e){e[e.Branch=1]="Branch",e[e.Environment=2]="Environment"}(t.TestResultGroupBy||(t.TestResultGroupBy={}));!function(e){e[e.Build=1]="Build",e[e.Release=2]="Release",e[e.Pipeline=3]="Pipeline"}(t.TestResultsContextType||(t.TestResultsContextType={}));!function(e){e[e.None=0]="None",e[e.Running=1]="Running",e[e.Completed=2]="Completed",e[e.Waiting=3]="Waiting",e[e.Cancelled=4]="Cancelled"}(t.TestResultsSessionState||(t.TestResultsSessionState={}));!function(e){e[e.All=1]="All",e[e.Flaky=2]="Flaky",e[e.NewTestLogging=3]="NewTestLogging"}(t.TestResultsSettingsType||(t.TestResultsSettingsType={}));!function(e){e[e.Passed=0]="Passed",e[e.Failed=1]="Failed",e[e.NotImpacted=2]="NotImpacted",e[e.Others=3]="Others"}(t.TestRunOutcome||(t.TestRunOutcome={}));!function(e){e[e.Build=1]="Build",e[e.Release=2]="Release",e[e.All=3]="All"}(t.TestRunPublishContext||(t.TestRunPublishContext={}));!function(e){e[e.Unspecified=0]="Unspecified",e[e.NotStarted=1]="NotStarted",e[e.InProgress=2]="InProgress",e[e.Completed=3]="Completed",e[e.Aborted=4]="Aborted",e[e.Waiting=5]="Waiting",e[e.NeedsInvestigation=6]="NeedsInvestigation"}(t.TestRunState||(t.TestRunState={}));!function(e){e[e.None=0]="None",e[e.CreatingEnvironment=1]="CreatingEnvironment",e[e.RunningTests=2]="RunningTests",e[e.CanceledByUser=3]="CanceledByUser",e[e.AbortedBySystem=4]="AbortedBySystem",e[e.TimedOut=5]="TimedOut",e[e.PendingAnalysis=6]="PendingAnalysis",e[e.Analyzed=7]="Analyzed",e[e.CancellationInProgress=8]="CancellationInProgress"}(t.TestRunSubstate||(t.TestRunSubstate={}));!function(e){e[e.Unknown=0]="Unknown",e[e.XTDesktop=1]="XTDesktop",e[e.FeedbackDesktop=2]="FeedbackDesktop",e[e.XTWeb=3]="XTWeb",e[e.FeedbackWeb=4]="FeedbackWeb",e[e.XTDesktop2=5]="XTDesktop2",e[e.SessionInsightsForAll=6]="SessionInsightsForAll"}(t.TestSessionSource||(t.TestSessionSource={}));!function(e){e[e.Unspecified=0]="Unspecified",e[e.NotStarted=1]="NotStarted",e[e.InProgress=2]="InProgress",e[e.Paused=3]="Paused",e[e.Completed=4]="Completed",e[e.Declined=5]="Declined"}(t.TestSessionState||(t.TestSessionState={}))});
@@ -191,6 +191,16 @@ export declare class TestResultsRestClient extends RestClientBase {
191
191
  * @param scopeFilter -
192
192
  */
193
193
  queryCustomFields(project: string, scopeFilter: Test.CustomTestFieldScope): Promise<Test.CustomTestFieldDefinition[]>;
194
+ /**
195
+ * @param project - Project ID or project name
196
+ * @param testExtensionFieldId -
197
+ */
198
+ deleteCustomFieldById(project: string, testExtensionFieldId: number): Promise<void>;
199
+ /**
200
+ * @param updateCustomTestField -
201
+ * @param project - Project ID or project name
202
+ */
203
+ updateCustomField(updateCustomTestField: Test.CustomTestFieldUpdateDefinition, project: string): Promise<Test.CustomTestFieldDefinition>;
194
204
  /**
195
205
  * Get file coverage for the specified file
196
206
  *
@@ -806,6 +816,14 @@ export declare class TestResultsRestClient extends RestClientBase {
806
816
  * @param project - Project ID or project name
807
817
  */
808
818
  createEnvironment(environments: Test.TestSessionEnvironment[], project: string): Promise<void>;
819
+ /**
820
+ * For the provided sessionId, creates environment, configuration, and machine objects in TCM data store
821
+ *
822
+ * @param sessionEnvironmentAndMachine -
823
+ * @param project - Project ID or project name
824
+ * @param sessionId -
825
+ */
826
+ createEnvironmentAndMachine(sessionEnvironmentAndMachine: Test.SessionEnvironmentAndMachine, project: string, sessionId: number): Promise<void>;
809
827
  /**
810
828
  * Retrieves TestResultsSession Layout object in TCM data store
811
829
  *
@@ -674,6 +674,44 @@ define(["require", "exports", "../Common/RestClientBase", "../Common/Util/Serial
674
674
  });
675
675
  });
676
676
  };
677
+ /**
678
+ * @param project - Project ID or project name
679
+ * @param testExtensionFieldId -
680
+ */
681
+ TestResultsRestClient.prototype.deleteCustomFieldById = function (project, testExtensionFieldId) {
682
+ return __awaiter(this, void 0, void 0, function () {
683
+ return __generator(this, function (_a) {
684
+ return [2 /*return*/, this.beginRequest({
685
+ apiVersion: "7.2-preview.1",
686
+ method: "DELETE",
687
+ routeTemplate: "{project}/_apis/testresults/extensionfields/{testExtensionFieldId}",
688
+ routeValues: {
689
+ project: project,
690
+ testExtensionFieldId: testExtensionFieldId
691
+ }
692
+ })];
693
+ });
694
+ });
695
+ };
696
+ /**
697
+ * @param updateCustomTestField -
698
+ * @param project - Project ID or project name
699
+ */
700
+ TestResultsRestClient.prototype.updateCustomField = function (updateCustomTestField, project) {
701
+ return __awaiter(this, void 0, void 0, function () {
702
+ return __generator(this, function (_a) {
703
+ return [2 /*return*/, this.beginRequest({
704
+ apiVersion: "7.2-preview.1",
705
+ method: "PATCH",
706
+ routeTemplate: "{project}/_apis/testresults/extensionfields/{testExtensionFieldId}",
707
+ routeValues: {
708
+ project: project
709
+ },
710
+ body: updateCustomTestField
711
+ })];
712
+ });
713
+ });
714
+ };
677
715
  /**
678
716
  * Get file coverage for the specified file
679
717
  *
@@ -2746,6 +2784,29 @@ define(["require", "exports", "../Common/RestClientBase", "../Common/Util/Serial
2746
2784
  });
2747
2785
  });
2748
2786
  };
2787
+ /**
2788
+ * For the provided sessionId, creates environment, configuration, and machine objects in TCM data store
2789
+ *
2790
+ * @param sessionEnvironmentAndMachine -
2791
+ * @param project - Project ID or project name
2792
+ * @param sessionId -
2793
+ */
2794
+ TestResultsRestClient.prototype.createEnvironmentAndMachine = function (sessionEnvironmentAndMachine, project, sessionId) {
2795
+ return __awaiter(this, void 0, void 0, function () {
2796
+ return __generator(this, function (_a) {
2797
+ return [2 /*return*/, this.beginRequest({
2798
+ apiVersion: "7.2-preview.2",
2799
+ method: "POST",
2800
+ routeTemplate: "{project}/_apis/testresults/testsession/{sessionId}/environment",
2801
+ routeValues: {
2802
+ project: project,
2803
+ sessionId: sessionId
2804
+ },
2805
+ body: sessionEnvironmentAndMachine
2806
+ })];
2807
+ });
2808
+ });
2809
+ };
2749
2810
  /**
2750
2811
  * Retrieves TestResultsSession Layout object in TCM data store
2751
2812
  *