azure-devops-extension-api 4.236.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.
package/Alert/Alert.d.ts CHANGED
@@ -44,6 +44,10 @@ export interface Alert {
44
44
  * This value is computed and returned by the service. It is a value based on the results from all analysis configurations. An example of a physical location is a file location.
45
45
  */
46
46
  physicalLocations: PhysicalLocation[];
47
+ /**
48
+ * Relations between alerts and other artifacts.
49
+ */
50
+ relations: RelationMetadata[];
47
51
  /**
48
52
  * Repository URL where the alert was detected.
49
53
  */
@@ -149,12 +153,20 @@ export declare enum AlertType {
149
153
  /**
150
154
  * The code contains a weakness determined by static analysis.
151
155
  */
152
- Code = 3
156
+ Code = 3,
157
+ /**
158
+ * The code uses a dependency with potential license incompliance.
159
+ */
160
+ License = 4
153
161
  }
154
162
  /**
155
163
  * AnalysisConfiguration class models a build definition.
156
164
  */
157
165
  export interface AnalysisConfiguration {
166
+ /**
167
+ * The type of alert this configuration is setup to detect.
168
+ */
169
+ alertType: AlertType;
158
170
  /**
159
171
  * Details for the configuration. Populated values depend on the type of configuration.
160
172
  */
@@ -177,6 +189,12 @@ export interface AnalysisConfiguration {
177
189
  toolVersion: string;
178
190
  }
179
191
  export interface AnalysisConfigurationDetails {
192
+ /**
193
+ * Properties of the pipeline.
194
+ */
195
+ additionalProperties: {
196
+ [key: string]: any;
197
+ };
180
198
  /**
181
199
  * Reference to a git object, e.g. branch ref.
182
200
  */
@@ -352,6 +370,10 @@ export interface Dependency {
352
370
  * Unique ID for the dependency
353
371
  */
354
372
  dependencyId: number;
373
+ /**
374
+ * License information of the Component
375
+ */
376
+ license: License;
355
377
  }
356
378
  /**
357
379
  * An instance of a vulnerable dependency that was detected
@@ -432,6 +454,41 @@ export declare enum ExpandOption {
432
454
  */
433
455
  ValidationFingerprint = 1
434
456
  }
457
+ /**
458
+ * License information for dependencies
459
+ */
460
+ export interface License {
461
+ /**
462
+ * Unique ID for the license
463
+ */
464
+ id: number;
465
+ /**
466
+ * License name
467
+ */
468
+ name: string;
469
+ /**
470
+ * License state
471
+ */
472
+ state: LicenseState;
473
+ /**
474
+ * Url for license information
475
+ */
476
+ url: string;
477
+ }
478
+ export declare enum LicenseState {
479
+ /**
480
+ * Information of the license has not been harvested by ClearlyDefined
481
+ */
482
+ Unknown = 0,
483
+ /**
484
+ * Information of the license has not been harvested by ClearlyDefined
485
+ */
486
+ NotHarvested = 1,
487
+ /**
488
+ * Information of the license has been harvested by ClearlyDefined
489
+ */
490
+ Harvested = 2
491
+ }
435
492
  export interface LogicalLocation {
436
493
  fullyQualifiedName: string;
437
494
  /**
@@ -478,8 +535,18 @@ export declare enum MetadataChangeType {
478
535
  * The operation to be performed on the metadata.
479
536
  */
480
537
  export declare enum MetadataOperation {
481
- Add = 0,
482
- Remove = 1
538
+ /**
539
+ * Represents the defualt value if the operation is not specified or not supported.
540
+ */
541
+ None = 0,
542
+ /**
543
+ * Represents the addition of the metadata.
544
+ */
545
+ Add = 1,
546
+ /**
547
+ * Represents the removal of the metadata.
548
+ */
549
+ Remove = 2
483
550
  }
484
551
  /**
485
552
  * Location in the source control system where the issue was found
@@ -503,6 +570,9 @@ export interface Pipeline {
503
570
  name: string;
504
571
  phase: string;
505
572
  phaseId: string;
573
+ properties: {
574
+ [key: string]: any;
575
+ };
506
576
  }
507
577
  export interface Region {
508
578
  /**
@@ -746,7 +816,8 @@ export declare enum Severity {
746
816
  Critical = 3,
747
817
  Note = 4,
748
818
  Warning = 5,
749
- Error = 6
819
+ Error = 6,
820
+ Undefined = 7
750
821
  }
751
822
  export declare enum State {
752
823
  /**
package/Alert/Alert.js CHANGED
@@ -24,6 +24,10 @@ define(["require", "exports"], function (require, exports) {
24
24
  * The code contains a weakness determined by static analysis.
25
25
  */
26
26
  AlertType[AlertType["Code"] = 3] = "Code";
27
+ /**
28
+ * The code uses a dependency with potential license incompliance.
29
+ */
30
+ AlertType[AlertType["License"] = 4] = "License";
27
31
  })(AlertType = exports.AlertType || (exports.AlertType = {}));
28
32
  var AnalysisConfigurationType;
29
33
  (function (AnalysisConfigurationType) {
@@ -145,6 +149,21 @@ define(["require", "exports"], function (require, exports) {
145
149
  */
146
150
  ExpandOption[ExpandOption["ValidationFingerprint"] = 1] = "ValidationFingerprint";
147
151
  })(ExpandOption = exports.ExpandOption || (exports.ExpandOption = {}));
152
+ var LicenseState;
153
+ (function (LicenseState) {
154
+ /**
155
+ * Information of the license has not been harvested by ClearlyDefined
156
+ */
157
+ LicenseState[LicenseState["Unknown"] = 0] = "Unknown";
158
+ /**
159
+ * Information of the license has not been harvested by ClearlyDefined
160
+ */
161
+ LicenseState[LicenseState["NotHarvested"] = 1] = "NotHarvested";
162
+ /**
163
+ * Information of the license has been harvested by ClearlyDefined
164
+ */
165
+ LicenseState[LicenseState["Harvested"] = 2] = "Harvested";
166
+ })(LicenseState = exports.LicenseState || (exports.LicenseState = {}));
148
167
  /**
149
168
  * The type of change that occurred to the metadata.
150
169
  */
@@ -160,8 +179,18 @@ define(["require", "exports"], function (require, exports) {
160
179
  */
161
180
  var MetadataOperation;
162
181
  (function (MetadataOperation) {
163
- MetadataOperation[MetadataOperation["Add"] = 0] = "Add";
164
- MetadataOperation[MetadataOperation["Remove"] = 1] = "Remove";
182
+ /**
183
+ * Represents the defualt value if the operation is not specified or not supported.
184
+ */
185
+ MetadataOperation[MetadataOperation["None"] = 0] = "None";
186
+ /**
187
+ * Represents the addition of the metadata.
188
+ */
189
+ MetadataOperation[MetadataOperation["Add"] = 1] = "Add";
190
+ /**
191
+ * Represents the removal of the metadata.
192
+ */
193
+ MetadataOperation[MetadataOperation["Remove"] = 2] = "Remove";
165
194
  })(MetadataOperation = exports.MetadataOperation || (exports.MetadataOperation = {}));
166
195
  /**
167
196
  * This enum defines the different result types.
@@ -209,6 +238,7 @@ define(["require", "exports"], function (require, exports) {
209
238
  Severity[Severity["Note"] = 4] = "Note";
210
239
  Severity[Severity["Warning"] = 5] = "Warning";
211
240
  Severity[Severity["Error"] = 6] = "Error";
241
+ Severity[Severity["Undefined"] = 7] = "Undefined";
212
242
  })(Severity = exports.Severity || (exports.Severity = {}));
213
243
  var State;
214
244
  (function (State) {
@@ -1 +1 @@
1
- define(["require","exports"],function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});!function(e){e[e.Unknown=0]="Unknown",e[e.Dependency=1]="Dependency",e[e.Secret=2]="Secret",e[e.Code=3]="Code"}(n.AlertType||(n.AlertType={}));!function(e){e[e.Default=0]="Default",e[e.AdoPipeline=1]="AdoPipeline"}(n.AnalysisConfigurationType||(n.AnalysisConfigurationType={}));!function(e){e[e.Unknown=0]="Unknown",e[e.NuGet=1]="NuGet",e[e.Npm=2]="Npm",e[e.Maven=3]="Maven",e[e.Git=4]="Git",e[e.Other=5]="Other",e[e.RubyGems=6]="RubyGems",e[e.Cargo=7]="Cargo",e[e.Pip=8]="Pip",e[e.File=9]="File",e[e.Go=10]="Go",e[e.DockerImage=11]="DockerImage",e[e.Pod=12]="Pod",e[e.Linux=13]="Linux",e[e.Conda=14]="Conda",e[e.DockerReference=15]="DockerReference",e[e.Vcpkg=16]="Vcpkg"}(n.ComponentType||(n.ComponentType={}));!function(e){e[e.High=0]="High",e[e.Other=1]="Other"}(n.Confidence||(n.Confidence={}));!function(e){e[e.Unknown=0]="Unknown",e[e.Fixed=1]="Fixed",e[e.AcceptedRisk=2]="AcceptedRisk",e[e.FalsePositive=3]="FalsePositive"}(n.DismissalType||(n.DismissalType={}));!function(e){e[e.None=0]="None",e[e.ValidationFingerprint=1]="ValidationFingerprint"}(n.ExpandOption||(n.ExpandOption={}));!function(e){e[e.None=0]="None",e[e.Created=1]="Created",e[e.Updated=2]="Updated",e[e.Deleted=3]="Deleted"}(n.MetadataChangeType||(n.MetadataChangeType={}));!function(e){e[e.Add=0]="Add",e[e.Remove=1]="Remove"}(n.MetadataOperation||(n.MetadataOperation={}));!function(e){e[e.Unknown=0]="Unknown",e[e.Dependency=1]="Dependency",e[e.VersionControl=2]="VersionControl"}(n.ResultType||(n.ResultType={}));!function(e){e[e.New=0]="New",e[e.Queued=1]="Queued",e[e.Completed=2]="Completed",e[e.Failed=3]="Failed"}(n.SarifJobStatus||(n.SarifJobStatus={}));!function(e){e[e.Low=0]="Low",e[e.Medium=1]="Medium",e[e.High=2]="High",e[e.Critical=3]="Critical",e[e.Note=4]="Note",e[e.Warning=5]="Warning",e[e.Error=6]="Error"}(n.Severity||(n.Severity={}));!function(e){e[e.Unknown=0]="Unknown",e[e.Active=1]="Active",e[e.Dismissed=2]="Dismissed",e[e.Fixed=4]="Fixed",e[e.AutoDismissed=8]="AutoDismissed"}(n.State||(n.State={}))});
1
+ define(["require","exports"],function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});!function(e){e[e.Unknown=0]="Unknown",e[e.Dependency=1]="Dependency",e[e.Secret=2]="Secret",e[e.Code=3]="Code",e[e.License=4]="License"}(n.AlertType||(n.AlertType={}));!function(e){e[e.Default=0]="Default",e[e.AdoPipeline=1]="AdoPipeline"}(n.AnalysisConfigurationType||(n.AnalysisConfigurationType={}));!function(e){e[e.Unknown=0]="Unknown",e[e.NuGet=1]="NuGet",e[e.Npm=2]="Npm",e[e.Maven=3]="Maven",e[e.Git=4]="Git",e[e.Other=5]="Other",e[e.RubyGems=6]="RubyGems",e[e.Cargo=7]="Cargo",e[e.Pip=8]="Pip",e[e.File=9]="File",e[e.Go=10]="Go",e[e.DockerImage=11]="DockerImage",e[e.Pod=12]="Pod",e[e.Linux=13]="Linux",e[e.Conda=14]="Conda",e[e.DockerReference=15]="DockerReference",e[e.Vcpkg=16]="Vcpkg"}(n.ComponentType||(n.ComponentType={}));!function(e){e[e.High=0]="High",e[e.Other=1]="Other"}(n.Confidence||(n.Confidence={}));!function(e){e[e.Unknown=0]="Unknown",e[e.Fixed=1]="Fixed",e[e.AcceptedRisk=2]="AcceptedRisk",e[e.FalsePositive=3]="FalsePositive"}(n.DismissalType||(n.DismissalType={}));!function(e){e[e.None=0]="None",e[e.ValidationFingerprint=1]="ValidationFingerprint"}(n.ExpandOption||(n.ExpandOption={}));!function(e){e[e.Unknown=0]="Unknown",e[e.NotHarvested=1]="NotHarvested",e[e.Harvested=2]="Harvested"}(n.LicenseState||(n.LicenseState={}));!function(e){e[e.None=0]="None",e[e.Created=1]="Created",e[e.Updated=2]="Updated",e[e.Deleted=3]="Deleted"}(n.MetadataChangeType||(n.MetadataChangeType={}));!function(e){e[e.None=0]="None",e[e.Add=1]="Add",e[e.Remove=2]="Remove"}(n.MetadataOperation||(n.MetadataOperation={}));!function(e){e[e.Unknown=0]="Unknown",e[e.Dependency=1]="Dependency",e[e.VersionControl=2]="VersionControl"}(n.ResultType||(n.ResultType={}));!function(e){e[e.New=0]="New",e[e.Queued=1]="Queued",e[e.Completed=2]="Completed",e[e.Failed=3]="Failed"}(n.SarifJobStatus||(n.SarifJobStatus={}));!function(e){e[e.Low=0]="Low",e[e.Medium=1]="Medium",e[e.High=2]="High",e[e.Critical=3]="Critical",e[e.Note=4]="Note",e[e.Warning=5]="Warning",e[e.Error=6]="Error",e[e.Undefined=7]="Undefined"}(n.Severity||(n.Severity={}));!function(e){e[e.Unknown=0]="Unknown",e[e.Active=1]="Active",e[e.Dismissed=2]="Dismissed",e[e.Fixed=4]="Fixed",e[e.AutoDismissed=8]="AutoDismissed"}(n.State||(n.State={}))});
@@ -357,6 +357,89 @@ export declare class GitRestClient extends RestClientBase {
357
357
  * @param includeLinks - True to include links.
358
358
  */
359
359
  getForkSyncRequests(repositoryNameOrId: string, project?: string, includeAbandoned?: boolean, includeLinks?: boolean): Promise<Git.GitForkSyncRequest[]>;
360
+ /**
361
+ * 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.
362
+ *
363
+ * @param repositoryId - The name or ID of the repository.
364
+ * @param path - The item path.
365
+ * @param project - Project ID or project name
366
+ * @param scopePath - The path scope. The default is null.
367
+ * @param recursionLevel - The recursion level of this request. The default is 'none', no recursion.
368
+ * @param includeContentMetadata - Set to true to include content metadata. Default is false.
369
+ * @param latestProcessedChange - Set to true to include the latest changes. Default is false.
370
+ * @param download - Set to true to download the response as a file. Default is false.
371
+ * @param versionDescriptor - Version descriptor. Default is the default branch for the repository.
372
+ * @param includeContent - Set to true to include item content when requesting json. Default is false.
373
+ * @param resolveHfs - Set to true to resolve Git HFS pointer files to return actual content from Git HFS. Default is true.
374
+ * @param sanitize - Set to true to sanitize an svg file and return it as image. Useful only if requested for svg file. Default is false.
375
+ */
376
+ getHfsItem(repositoryId: string, path: string, project?: string, scopePath?: string, recursionLevel?: Git.VersionControlRecursionType, includeContentMetadata?: boolean, latestProcessedChange?: boolean, download?: boolean, versionDescriptor?: Git.GitVersionDescriptor, includeContent?: boolean, resolveHfs?: boolean, sanitize?: boolean): Promise<Git.GitItem>;
377
+ /**
378
+ * 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.
379
+ *
380
+ * @param repositoryId - The name or ID of the repository.
381
+ * @param path - The item path.
382
+ * @param project - Project ID or project name
383
+ * @param scopePath - The path scope. The default is null.
384
+ * @param recursionLevel - The recursion level of this request. The default is 'none', no recursion.
385
+ * @param includeContentMetadata - Set to true to include content metadata. Default is false.
386
+ * @param latestProcessedChange - Set to true to include the latest changes. Default is false.
387
+ * @param download - Set to true to download the response as a file. Default is false.
388
+ * @param versionDescriptor - Version descriptor. Default is the default branch for the repository.
389
+ * @param includeContent - Set to true to include item content when requesting json. Default is false.
390
+ * @param resolveHfs - Set to true to resolve Git HFS pointer files to return actual content from Git HFS. Default is true.
391
+ * @param sanitize - Set to true to sanitize an svg file and return it as image. Useful only if requested for svg file. Default is false.
392
+ */
393
+ getHfsItemContent(repositoryId: string, path: string, project?: string, scopePath?: string, recursionLevel?: Git.VersionControlRecursionType, includeContentMetadata?: boolean, latestProcessedChange?: boolean, download?: boolean, versionDescriptor?: Git.GitVersionDescriptor, includeContent?: boolean, resolveHfs?: boolean, sanitize?: boolean): Promise<ArrayBuffer>;
394
+ /**
395
+ * 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.
396
+ *
397
+ * @param repositoryId - The name or ID of the repository.
398
+ * @param project - Project ID or project name
399
+ * @param scopePath - The path scope. The default is null.
400
+ * @param recursionLevel - The recursion level of this request. The default is 'none', no recursion.
401
+ * @param includeContentMetadata - Set to true to include content metadata. Default is false.
402
+ * @param latestProcessedChange - Set to true to include the latest changes. Default is false.
403
+ * @param download - Set to true to download the response as a file. Default is false.
404
+ * @param includeLinks - Set to true to include links to items. Default is false.
405
+ * @param versionDescriptor - Version descriptor. Default is the default branch for the repository.
406
+ * @param zipForUnix - Set to true to keep the file permissions for unix (and POSIX) systems like executables and symlinks
407
+ */
408
+ getHfsItems(repositoryId: string, project?: string, scopePath?: string, recursionLevel?: Git.VersionControlRecursionType, includeContentMetadata?: boolean, latestProcessedChange?: boolean, download?: boolean, includeLinks?: boolean, versionDescriptor?: Git.GitVersionDescriptor, zipForUnix?: boolean): Promise<Git.GitItem[]>;
409
+ /**
410
+ * 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.
411
+ *
412
+ * @param repositoryId - The name or ID of the repository.
413
+ * @param path - The item path.
414
+ * @param project - Project ID or project name
415
+ * @param scopePath - The path scope. The default is null.
416
+ * @param recursionLevel - The recursion level of this request. The default is 'none', no recursion.
417
+ * @param includeContentMetadata - Set to true to include content metadata. Default is false.
418
+ * @param latestProcessedChange - Set to true to include the latest changes. Default is false.
419
+ * @param download - Set to true to download the response as a file. Default is false.
420
+ * @param versionDescriptor - Version descriptor. Default is the default branch for the repository.
421
+ * @param includeContent - Set to true to include item content when requesting json. Default is false.
422
+ * @param resolveHfs - Set to true to resolve Git HFS pointer files to return actual content from Git HFS. Default is true.
423
+ * @param sanitize - Set to true to sanitize an svg file and return it as image. Useful only if requested for svg file. Default is false.
424
+ */
425
+ getHfsItemText(repositoryId: string, path: string, project?: string, scopePath?: string, recursionLevel?: Git.VersionControlRecursionType, includeContentMetadata?: boolean, latestProcessedChange?: boolean, download?: boolean, versionDescriptor?: Git.GitVersionDescriptor, includeContent?: boolean, resolveHfs?: boolean, sanitize?: boolean): Promise<string>;
426
+ /**
427
+ * 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.
428
+ *
429
+ * @param repositoryId - The name or ID of the repository.
430
+ * @param path - The item path.
431
+ * @param project - Project ID or project name
432
+ * @param scopePath - The path scope. The default is null.
433
+ * @param recursionLevel - The recursion level of this request. The default is 'none', no recursion.
434
+ * @param includeContentMetadata - Set to true to include content metadata. Default is false.
435
+ * @param latestProcessedChange - Set to true to include the latest changes. Default is false.
436
+ * @param download - Set to true to download the response as a file. Default is false.
437
+ * @param versionDescriptor - Version descriptor. Default is the default branch for the repository.
438
+ * @param includeContent - Set to true to include item content when requesting json. Default is false.
439
+ * @param resolveHfs - Set to true to resolve Git HFS pointer files to return actual content from Git HFS. Default is true.
440
+ * @param sanitize - Set to true to sanitize an svg file and return it as image. Useful only if requested for svg file. Default is false.
441
+ */
442
+ getHfsItemZip(repositoryId: string, path: string, project?: string, scopePath?: string, recursionLevel?: Git.VersionControlRecursionType, includeContentMetadata?: boolean, latestProcessedChange?: boolean, download?: boolean, versionDescriptor?: Git.GitVersionDescriptor, includeContent?: boolean, resolveHfs?: boolean, sanitize?: boolean): Promise<ArrayBuffer>;
360
443
  /**
361
444
  * Create an import request.
362
445
  *
package/Git/GitClient.js CHANGED
@@ -1149,6 +1149,225 @@ define(["require", "exports", "../Common/RestClientBase", "../Common/Util/Serial
1149
1149
  });
1150
1150
  });
1151
1151
  };
1152
+ /**
1153
+ * 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.
1154
+ *
1155
+ * @param repositoryId - The name or ID of the repository.
1156
+ * @param path - The item path.
1157
+ * @param project - Project ID or project name
1158
+ * @param scopePath - The path scope. The default is null.
1159
+ * @param recursionLevel - The recursion level of this request. The default is 'none', no recursion.
1160
+ * @param includeContentMetadata - Set to true to include content metadata. Default is false.
1161
+ * @param latestProcessedChange - Set to true to include the latest changes. Default is false.
1162
+ * @param download - Set to true to download the response as a file. Default is false.
1163
+ * @param versionDescriptor - Version descriptor. Default is the default branch for the repository.
1164
+ * @param includeContent - Set to true to include item content when requesting json. Default is false.
1165
+ * @param resolveHfs - Set to true to resolve Git HFS pointer files to return actual content from Git HFS. Default is true.
1166
+ * @param sanitize - Set to true to sanitize an svg file and return it as image. Useful only if requested for svg file. Default is false.
1167
+ */
1168
+ GitRestClient.prototype.getHfsItem = function (repositoryId, path, project, scopePath, recursionLevel, includeContentMetadata, latestProcessedChange, download, versionDescriptor, includeContent, resolveHfs, sanitize) {
1169
+ return __awaiter(this, void 0, void 0, function () {
1170
+ var queryValues;
1171
+ return __generator(this, function (_a) {
1172
+ queryValues = {
1173
+ path: path,
1174
+ scopePath: scopePath,
1175
+ recursionLevel: recursionLevel,
1176
+ includeContentMetadata: includeContentMetadata,
1177
+ latestProcessedChange: latestProcessedChange,
1178
+ download: download,
1179
+ versionDescriptor: versionDescriptor,
1180
+ includeContent: includeContent,
1181
+ resolveHfs: resolveHfs,
1182
+ sanitize: sanitize
1183
+ };
1184
+ return [2 /*return*/, this.beginRequest({
1185
+ apiVersion: "7.2-preview.1",
1186
+ routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/HfsItems/{*path}",
1187
+ routeValues: {
1188
+ project: project,
1189
+ repositoryId: repositoryId
1190
+ },
1191
+ queryParams: queryValues
1192
+ })];
1193
+ });
1194
+ });
1195
+ };
1196
+ /**
1197
+ * 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.
1198
+ *
1199
+ * @param repositoryId - The name or ID of the repository.
1200
+ * @param path - The item path.
1201
+ * @param project - Project ID or project name
1202
+ * @param scopePath - The path scope. The default is null.
1203
+ * @param recursionLevel - The recursion level of this request. The default is 'none', no recursion.
1204
+ * @param includeContentMetadata - Set to true to include content metadata. Default is false.
1205
+ * @param latestProcessedChange - Set to true to include the latest changes. Default is false.
1206
+ * @param download - Set to true to download the response as a file. Default is false.
1207
+ * @param versionDescriptor - Version descriptor. Default is the default branch for the repository.
1208
+ * @param includeContent - Set to true to include item content when requesting json. Default is false.
1209
+ * @param resolveHfs - Set to true to resolve Git HFS pointer files to return actual content from Git HFS. Default is true.
1210
+ * @param sanitize - Set to true to sanitize an svg file and return it as image. Useful only if requested for svg file. Default is false.
1211
+ */
1212
+ GitRestClient.prototype.getHfsItemContent = function (repositoryId, path, project, scopePath, recursionLevel, includeContentMetadata, latestProcessedChange, download, versionDescriptor, includeContent, resolveHfs, sanitize) {
1213
+ return __awaiter(this, void 0, void 0, function () {
1214
+ var queryValues;
1215
+ return __generator(this, function (_a) {
1216
+ queryValues = {
1217
+ path: path,
1218
+ scopePath: scopePath,
1219
+ recursionLevel: recursionLevel,
1220
+ includeContentMetadata: includeContentMetadata,
1221
+ latestProcessedChange: latestProcessedChange,
1222
+ download: download,
1223
+ versionDescriptor: versionDescriptor,
1224
+ includeContent: includeContent,
1225
+ resolveHfs: resolveHfs,
1226
+ sanitize: sanitize
1227
+ };
1228
+ return [2 /*return*/, this.beginRequest({
1229
+ apiVersion: "7.2-preview.1",
1230
+ httpResponseType: "application/octet-stream",
1231
+ routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/HfsItems/{*path}",
1232
+ routeValues: {
1233
+ project: project,
1234
+ repositoryId: repositoryId
1235
+ },
1236
+ queryParams: queryValues
1237
+ })];
1238
+ });
1239
+ });
1240
+ };
1241
+ /**
1242
+ * 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.
1243
+ *
1244
+ * @param repositoryId - The name or ID of the repository.
1245
+ * @param project - Project ID or project name
1246
+ * @param scopePath - The path scope. The default is null.
1247
+ * @param recursionLevel - The recursion level of this request. The default is 'none', no recursion.
1248
+ * @param includeContentMetadata - Set to true to include content metadata. Default is false.
1249
+ * @param latestProcessedChange - Set to true to include the latest changes. Default is false.
1250
+ * @param download - Set to true to download the response as a file. Default is false.
1251
+ * @param includeLinks - Set to true to include links to items. Default is false.
1252
+ * @param versionDescriptor - Version descriptor. Default is the default branch for the repository.
1253
+ * @param zipForUnix - Set to true to keep the file permissions for unix (and POSIX) systems like executables and symlinks
1254
+ */
1255
+ GitRestClient.prototype.getHfsItems = function (repositoryId, project, scopePath, recursionLevel, includeContentMetadata, latestProcessedChange, download, includeLinks, versionDescriptor, zipForUnix) {
1256
+ return __awaiter(this, void 0, void 0, function () {
1257
+ var queryValues;
1258
+ return __generator(this, function (_a) {
1259
+ queryValues = {
1260
+ scopePath: scopePath,
1261
+ recursionLevel: recursionLevel,
1262
+ includeContentMetadata: includeContentMetadata,
1263
+ latestProcessedChange: latestProcessedChange,
1264
+ download: download,
1265
+ includeLinks: includeLinks,
1266
+ versionDescriptor: versionDescriptor,
1267
+ zipForUnix: zipForUnix
1268
+ };
1269
+ return [2 /*return*/, this.beginRequest({
1270
+ apiVersion: "7.2-preview.1",
1271
+ routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/HfsItems/{*path}",
1272
+ routeValues: {
1273
+ project: project,
1274
+ repositoryId: repositoryId
1275
+ },
1276
+ queryParams: queryValues
1277
+ })];
1278
+ });
1279
+ });
1280
+ };
1281
+ /**
1282
+ * 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.
1283
+ *
1284
+ * @param repositoryId - The name or ID of the repository.
1285
+ * @param path - The item path.
1286
+ * @param project - Project ID or project name
1287
+ * @param scopePath - The path scope. The default is null.
1288
+ * @param recursionLevel - The recursion level of this request. The default is 'none', no recursion.
1289
+ * @param includeContentMetadata - Set to true to include content metadata. Default is false.
1290
+ * @param latestProcessedChange - Set to true to include the latest changes. Default is false.
1291
+ * @param download - Set to true to download the response as a file. Default is false.
1292
+ * @param versionDescriptor - Version descriptor. Default is the default branch for the repository.
1293
+ * @param includeContent - Set to true to include item content when requesting json. Default is false.
1294
+ * @param resolveHfs - Set to true to resolve Git HFS pointer files to return actual content from Git HFS. Default is true.
1295
+ * @param sanitize - Set to true to sanitize an svg file and return it as image. Useful only if requested for svg file. Default is false.
1296
+ */
1297
+ GitRestClient.prototype.getHfsItemText = function (repositoryId, path, project, scopePath, recursionLevel, includeContentMetadata, latestProcessedChange, download, versionDescriptor, includeContent, resolveHfs, sanitize) {
1298
+ return __awaiter(this, void 0, void 0, function () {
1299
+ var queryValues;
1300
+ return __generator(this, function (_a) {
1301
+ queryValues = {
1302
+ path: path,
1303
+ scopePath: scopePath,
1304
+ recursionLevel: recursionLevel,
1305
+ includeContentMetadata: includeContentMetadata,
1306
+ latestProcessedChange: latestProcessedChange,
1307
+ download: download,
1308
+ versionDescriptor: versionDescriptor,
1309
+ includeContent: includeContent,
1310
+ resolveHfs: resolveHfs,
1311
+ sanitize: sanitize
1312
+ };
1313
+ return [2 /*return*/, this.beginRequest({
1314
+ apiVersion: "7.2-preview.1",
1315
+ httpResponseType: "text/plain",
1316
+ routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/HfsItems/{*path}",
1317
+ routeValues: {
1318
+ project: project,
1319
+ repositoryId: repositoryId
1320
+ },
1321
+ queryParams: queryValues
1322
+ })];
1323
+ });
1324
+ });
1325
+ };
1326
+ /**
1327
+ * 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.
1328
+ *
1329
+ * @param repositoryId - The name or ID of the repository.
1330
+ * @param path - The item path.
1331
+ * @param project - Project ID or project name
1332
+ * @param scopePath - The path scope. The default is null.
1333
+ * @param recursionLevel - The recursion level of this request. The default is 'none', no recursion.
1334
+ * @param includeContentMetadata - Set to true to include content metadata. Default is false.
1335
+ * @param latestProcessedChange - Set to true to include the latest changes. Default is false.
1336
+ * @param download - Set to true to download the response as a file. Default is false.
1337
+ * @param versionDescriptor - Version descriptor. Default is the default branch for the repository.
1338
+ * @param includeContent - Set to true to include item content when requesting json. Default is false.
1339
+ * @param resolveHfs - Set to true to resolve Git HFS pointer files to return actual content from Git HFS. Default is true.
1340
+ * @param sanitize - Set to true to sanitize an svg file and return it as image. Useful only if requested for svg file. Default is false.
1341
+ */
1342
+ GitRestClient.prototype.getHfsItemZip = function (repositoryId, path, project, scopePath, recursionLevel, includeContentMetadata, latestProcessedChange, download, versionDescriptor, includeContent, resolveHfs, sanitize) {
1343
+ return __awaiter(this, void 0, void 0, function () {
1344
+ var queryValues;
1345
+ return __generator(this, function (_a) {
1346
+ queryValues = {
1347
+ path: path,
1348
+ scopePath: scopePath,
1349
+ recursionLevel: recursionLevel,
1350
+ includeContentMetadata: includeContentMetadata,
1351
+ latestProcessedChange: latestProcessedChange,
1352
+ download: download,
1353
+ versionDescriptor: versionDescriptor,
1354
+ includeContent: includeContent,
1355
+ resolveHfs: resolveHfs,
1356
+ sanitize: sanitize
1357
+ };
1358
+ return [2 /*return*/, this.beginRequest({
1359
+ apiVersion: "7.2-preview.1",
1360
+ httpResponseType: "application/zip",
1361
+ routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/HfsItems/{*path}",
1362
+ routeValues: {
1363
+ project: project,
1364
+ repositoryId: repositoryId
1365
+ },
1366
+ queryParams: queryValues
1367
+ })];
1368
+ });
1369
+ });
1370
+ };
1152
1371
  /**
1153
1372
  * Create an import request.
1154
1373
  *