Skip to content

Commit 3c7622f

Browse files
author
Danny McCormick
authored
regen (#320)
1 parent 2e02035 commit 3c7622f

21 files changed

Lines changed: 602 additions & 105 deletions

api/BuildApi.ts

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1728,19 +1728,26 @@ export class BuildApi extends basem.ClientApiBase implements IBuildApi {
17281728
project: string,
17291729
path: string
17301730
): Promise<BuildInterfaces.Folder> {
1731+
if (path == null) {
1732+
throw new TypeError('path can not be null or undefined');
1733+
}
17311734

17321735
return new Promise<BuildInterfaces.Folder>(async (resolve, reject) => {
17331736
let routeValues: any = {
1734-
project: project,
1735-
path: path
1737+
project: project
17361738
};
17371739

1740+
let queryValues: any = {
1741+
path: path,
1742+
};
1743+
17381744
try {
17391745
let verData: vsom.ClientVersioningData = await this.vsoClient.getVersioningData(
17401746
"5.1-preview.2",
17411747
"build",
17421748
"a906531b-d2da-4f55-bda7-f3e676cc50d9",
1743-
routeValues);
1749+
routeValues,
1750+
queryValues);
17441751

17451752
let url: string = verData.requestUrl!;
17461753
let options: restm.IRequestOptions = this.createRequestOptions('application/json',
@@ -1772,19 +1779,26 @@ export class BuildApi extends basem.ClientApiBase implements IBuildApi {
17721779
project: string,
17731780
path: string
17741781
): Promise<void> {
1782+
if (path == null) {
1783+
throw new TypeError('path can not be null or undefined');
1784+
}
17751785

17761786
return new Promise<void>(async (resolve, reject) => {
17771787
let routeValues: any = {
1778-
project: project,
1779-
path: path
1788+
project: project
17801789
};
17811790

1791+
let queryValues: any = {
1792+
path: path,
1793+
};
1794+
17821795
try {
17831796
let verData: vsom.ClientVersioningData = await this.vsoClient.getVersioningData(
17841797
"5.1-preview.2",
17851798
"build",
17861799
"a906531b-d2da-4f55-bda7-f3e676cc50d9",
1787-
routeValues);
1800+
routeValues,
1801+
queryValues);
17881802

17891803
let url: string = verData.requestUrl!;
17901804
let options: restm.IRequestOptions = this.createRequestOptions('application/json',
@@ -1869,19 +1883,26 @@ export class BuildApi extends basem.ClientApiBase implements IBuildApi {
18691883
project: string,
18701884
path: string
18711885
): Promise<BuildInterfaces.Folder> {
1886+
if (path == null) {
1887+
throw new TypeError('path can not be null or undefined');
1888+
}
18721889

18731890
return new Promise<BuildInterfaces.Folder>(async (resolve, reject) => {
18741891
let routeValues: any = {
1875-
project: project,
1876-
path: path
1892+
project: project
18771893
};
18781894

1895+
let queryValues: any = {
1896+
path: path,
1897+
};
1898+
18791899
try {
18801900
let verData: vsom.ClientVersioningData = await this.vsoClient.getVersioningData(
18811901
"5.1-preview.2",
18821902
"build",
18831903
"a906531b-d2da-4f55-bda7-f3e676cc50d9",
1884-
routeValues);
1904+
routeValues,
1905+
queryValues);
18851906

18861907
let url: string = verData.requestUrl!;
18871908
let options: restm.IRequestOptions = this.createRequestOptions('application/json',

api/CoreApi.ts

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ export interface ICoreApi extends basem.ClientApiBase {
3939
queueCreateProject(projectToCreate: CoreInterfaces.TeamProject): Promise<OperationsInterfaces.OperationReference>;
4040
queueDeleteProject(projectId: string): Promise<OperationsInterfaces.OperationReference>;
4141
updateProject(projectUpdate: CoreInterfaces.TeamProject, projectId: string): Promise<OperationsInterfaces.OperationReference>;
42+
getProjectsProperties(projectIds: string[], properties?: string[]): Promise<CoreInterfaces.ProjectProperties[]>;
4243
getProjectProperties(projectId: string, keys?: string[]): Promise<CoreInterfaces.ProjectProperty[]>;
4344
setProjectProperties(customHeaders: any, projectId: string, patchDocument: VSSInterfaces.JsonPatchDocument): Promise<void>;
4445
createOrUpdateProxy(proxy: CoreInterfaces.Proxy): Promise<CoreInterfaces.Proxy>;
@@ -933,6 +934,57 @@ export class CoreApi extends basem.ClientApiBase implements ICoreApi {
933934
});
934935
}
935936

937+
/**
938+
* Get a collection of team project properties for multiple projects.
939+
*
940+
* @param {string[]} projectIds - A comma-delimited string of team project IDs
941+
* @param {string[]} properties
942+
*/
943+
public async getProjectsProperties(
944+
projectIds: string[],
945+
properties?: string[]
946+
): Promise<CoreInterfaces.ProjectProperties[]> {
947+
if (projectIds == null) {
948+
throw new TypeError('projectIds can not be null or undefined');
949+
}
950+
951+
return new Promise<CoreInterfaces.ProjectProperties[]>(async (resolve, reject) => {
952+
let routeValues: any = {
953+
};
954+
955+
let queryValues: any = {
956+
projectIds: projectIds && projectIds.join(","),
957+
properties: properties && properties.join(","),
958+
};
959+
960+
try {
961+
let verData: vsom.ClientVersioningData = await this.vsoClient.getVersioningData(
962+
"5.1-preview.1",
963+
"core",
964+
"0a3ffdfc-fe94-47a6-bb27-79bf3f762eac",
965+
routeValues,
966+
queryValues);
967+
968+
let url: string = verData.requestUrl!;
969+
let options: restm.IRequestOptions = this.createRequestOptions('application/json',
970+
verData.apiVersion);
971+
972+
let res: restm.IRestResponse<CoreInterfaces.ProjectProperties[]>;
973+
res = await this.rest.get<CoreInterfaces.ProjectProperties[]>(url, options);
974+
975+
let ret = this.formatResponse(res.result,
976+
null,
977+
true);
978+
979+
resolve(ret);
980+
981+
}
982+
catch (err) {
983+
reject(err);
984+
}
985+
});
986+
}
987+
936988
/**
937989
* Get a collection of team project properties.
938990
*

api/ExtensionManagementApi.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export interface IExtensionManagementApi extends basem.ClientApiBase {
2929
setDocumentByName(doc: any, publisherName: string, extensionName: string, scopeType: string, scopeValue: string, collectionName: string): Promise<any>;
3030
updateDocumentByName(doc: any, publisherName: string, extensionName: string, scopeType: string, scopeValue: string, collectionName: string): Promise<any>;
3131
queryCollectionsByName(collectionQuery: ExtensionManagementInterfaces.ExtensionDataCollectionQuery, publisherName: string, extensionName: string): Promise<ExtensionManagementInterfaces.ExtensionDataCollection[]>;
32-
getStates(includeDisabled?: boolean, includeErrors?: boolean, includeInstallationIssues?: boolean): Promise<ExtensionManagementInterfaces.ExtensionState[]>;
32+
getStates(includeDisabled?: boolean, includeErrors?: boolean, includeInstallationIssues?: boolean, forceRefresh?: boolean): Promise<ExtensionManagementInterfaces.ExtensionState[]>;
3333
queryExtensions(query: ExtensionManagementInterfaces.InstalledExtensionQuery): Promise<ExtensionManagementInterfaces.InstalledExtension[]>;
3434
getInstalledExtensions(includeDisabledExtensions?: boolean, includeErrors?: boolean, assetTypes?: string[], includeInstallationIssues?: boolean): Promise<ExtensionManagementInterfaces.InstalledExtension[]>;
3535
updateInstalledExtension(extension: ExtensionManagementInterfaces.InstalledExtension): Promise<ExtensionManagementInterfaces.InstalledExtension>;
@@ -611,11 +611,13 @@ export class ExtensionManagementApi extends basem.ClientApiBase implements IExte
611611
* @param {boolean} includeDisabled - If true (the default), include disabled extensions in the results.
612612
* @param {boolean} includeErrors - If true, include installed extensions in an error state in the results.
613613
* @param {boolean} includeInstallationIssues
614+
* @param {boolean} forceRefresh
614615
*/
615616
public async getStates(
616617
includeDisabled?: boolean,
617618
includeErrors?: boolean,
618-
includeInstallationIssues?: boolean
619+
includeInstallationIssues?: boolean,
620+
forceRefresh?: boolean
619621
): Promise<ExtensionManagementInterfaces.ExtensionState[]> {
620622

621623
return new Promise<ExtensionManagementInterfaces.ExtensionState[]>(async (resolve, reject) => {
@@ -626,6 +628,7 @@ export class ExtensionManagementApi extends basem.ClientApiBase implements IExte
626628
includeDisabled: includeDisabled,
627629
includeErrors: includeErrors,
628630
includeInstallationIssues: includeInstallationIssues,
631+
forceRefresh: forceRefresh,
629632
};
630633

631634
try {

api/NotificationApi.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -833,8 +833,10 @@ export class NotificationApi extends basem.ClientApiBase implements INotificatio
833833
}
834834

835835
/**
836-
* @param {string} targetId
837-
* @param {string[]} ids
836+
* Get a list of notification subscriptions, either by subscription IDs or by all subscriptions for a given user or group.
837+
*
838+
* @param {string} targetId - User or Group ID
839+
* @param {string[]} ids - List of subscription IDs
838840
* @param {NotificationInterfaces.SubscriptionQueryFlags} queryFlags
839841
*/
840842
public async listSubscriptions(

api/ReleaseApi.ts

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export interface IReleaseApi extends basem.ClientApiBase {
5252
deleteFavorites(project: string, scope: string, identityId?: string, favoriteItemIds?: string): Promise<void>;
5353
getFavorites(project: string, scope: string, identityId?: string): Promise<ReleaseInterfaces.FavoriteItem[]>;
5454
getFlightAssignments(flightName?: string): Promise<string[]>;
55-
createFolder(folder: ReleaseInterfaces.Folder, project: string, path: string): Promise<ReleaseInterfaces.Folder>;
55+
createFolder(folder: ReleaseInterfaces.Folder, project: string, path?: string): Promise<ReleaseInterfaces.Folder>;
5656
deleteFolder(project: string, path: string): Promise<void>;
5757
getFolders(project: string, path?: string, queryOrder?: ReleaseInterfaces.FolderPathQueryOrder): Promise<ReleaseInterfaces.Folder[]>;
5858
updateFolder(folder: ReleaseInterfaces.Folder, project: string, path: string): Promise<ReleaseInterfaces.Folder>;
@@ -1879,16 +1879,16 @@ export class ReleaseApi extends basem.ClientApiBase implements IReleaseApi {
18791879
}
18801880

18811881
/**
1882-
* Creates a new folder
1882+
* Creates a new folder.
18831883
*
1884-
* @param {ReleaseInterfaces.Folder} folder
1884+
* @param {ReleaseInterfaces.Folder} folder - folder.
18851885
* @param {string} project - Project ID or project name
1886-
* @param {string} path
1886+
* @param {string} path - Path of the folder.
18871887
*/
18881888
public async createFolder(
18891889
folder: ReleaseInterfaces.Folder,
18901890
project: string,
1891-
path: string
1891+
path?: string
18921892
): Promise<ReleaseInterfaces.Folder> {
18931893

18941894
return new Promise<ReleaseInterfaces.Folder>(async (resolve, reject) => {
@@ -1899,7 +1899,7 @@ export class ReleaseApi extends basem.ClientApiBase implements IReleaseApi {
18991899

19001900
try {
19011901
let verData: vsom.ClientVersioningData = await this.vsoClient.getVersioningData(
1902-
"5.1-preview.1",
1902+
"5.1-preview.2",
19031903
"Release",
19041904
"f7ddf76d-ce0c-4d68-94ff-becaec5d9dea",
19051905
routeValues);
@@ -1925,10 +1925,10 @@ export class ReleaseApi extends basem.ClientApiBase implements IReleaseApi {
19251925
}
19261926

19271927
/**
1928-
* Deletes a definition folder for given folder name and path and all it's existing definitions
1928+
* Deletes a definition folder for given folder name and path and all it's existing definitions.
19291929
*
19301930
* @param {string} project - Project ID or project name
1931-
* @param {string} path
1931+
* @param {string} path - Path of the folder to delete.
19321932
*/
19331933
public async deleteFolder(
19341934
project: string,
@@ -1943,7 +1943,7 @@ export class ReleaseApi extends basem.ClientApiBase implements IReleaseApi {
19431943

19441944
try {
19451945
let verData: vsom.ClientVersioningData = await this.vsoClient.getVersioningData(
1946-
"5.1-preview.1",
1946+
"5.1-preview.2",
19471947
"Release",
19481948
"f7ddf76d-ce0c-4d68-94ff-becaec5d9dea",
19491949
routeValues);
@@ -1969,11 +1969,11 @@ export class ReleaseApi extends basem.ClientApiBase implements IReleaseApi {
19691969
}
19701970

19711971
/**
1972-
* Gets folders
1972+
* Gets folders.
19731973
*
19741974
* @param {string} project - Project ID or project name
1975-
* @param {string} path
1976-
* @param {ReleaseInterfaces.FolderPathQueryOrder} queryOrder
1975+
* @param {string} path - Path of the folder.
1976+
* @param {ReleaseInterfaces.FolderPathQueryOrder} queryOrder - Gets the results in the defined order. Default is 'None'.
19771977
*/
19781978
public async getFolders(
19791979
project: string,
@@ -1993,7 +1993,7 @@ export class ReleaseApi extends basem.ClientApiBase implements IReleaseApi {
19931993

19941994
try {
19951995
let verData: vsom.ClientVersioningData = await this.vsoClient.getVersioningData(
1996-
"5.1-preview.1",
1996+
"5.1-preview.2",
19971997
"Release",
19981998
"f7ddf76d-ce0c-4d68-94ff-becaec5d9dea",
19991999
routeValues,
@@ -2020,11 +2020,11 @@ export class ReleaseApi extends basem.ClientApiBase implements IReleaseApi {
20202020
}
20212021

20222022
/**
2023-
* Updates an existing folder at given existing path
2023+
* Updates an existing folder at given existing path.
20242024
*
2025-
* @param {ReleaseInterfaces.Folder} folder
2025+
* @param {ReleaseInterfaces.Folder} folder - folder.
20262026
* @param {string} project - Project ID or project name
2027-
* @param {string} path
2027+
* @param {string} path - Path of the folder to update.
20282028
*/
20292029
public async updateFolder(
20302030
folder: ReleaseInterfaces.Folder,
@@ -2040,7 +2040,7 @@ export class ReleaseApi extends basem.ClientApiBase implements IReleaseApi {
20402040

20412041
try {
20422042
let verData: vsom.ClientVersioningData = await this.vsoClient.getVersioningData(
2043-
"5.1-preview.1",
2043+
"5.1-preview.2",
20442044
"Release",
20452045
"f7ddf76d-ce0c-4d68-94ff-becaec5d9dea",
20462046
routeValues);

api/TaskAgentApiBase.ts

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ export interface ITaskAgentApiBase extends basem.ClientApiBase {
6868
addKubernetesResource(createParameters: TaskAgentInterfaces.KubernetesResourceCreateParameters, project: string, environmentId: number): Promise<TaskAgentInterfaces.KubernetesResource>;
6969
deleteKubernetesResource(project: string, environmentId: number, resourceId: number): Promise<void>;
7070
getKubernetesResource(project: string, environmentId: number, resourceId: number): Promise<TaskAgentInterfaces.KubernetesResource>;
71-
updateKubernetesResource(resource: TaskAgentInterfaces.KubernetesResource, project: string, environmentId: number): Promise<TaskAgentInterfaces.KubernetesResource>;
7271
generateDeploymentMachineGroupAccessToken(project: string, machineGroupId: number): Promise<string>;
7372
addDeploymentMachineGroup(machineGroup: TaskAgentInterfaces.DeploymentMachineGroup, project: string): Promise<TaskAgentInterfaces.DeploymentMachineGroup>;
7473
deleteDeploymentMachineGroup(project: string, machineGroupId: number): Promise<void>;
@@ -2590,50 +2589,6 @@ export class TaskAgentApiBase extends basem.ClientApiBase implements ITaskAgentA
25902589
});
25912590
}
25922591

2593-
/**
2594-
* @param {TaskAgentInterfaces.KubernetesResource} resource
2595-
* @param {string} project - Project ID or project name
2596-
* @param {number} environmentId
2597-
*/
2598-
public async updateKubernetesResource(
2599-
resource: TaskAgentInterfaces.KubernetesResource,
2600-
project: string,
2601-
environmentId: number
2602-
): Promise<TaskAgentInterfaces.KubernetesResource> {
2603-
2604-
return new Promise<TaskAgentInterfaces.KubernetesResource>(async (resolve, reject) => {
2605-
let routeValues: any = {
2606-
project: project,
2607-
environmentId: environmentId
2608-
};
2609-
2610-
try {
2611-
let verData: vsom.ClientVersioningData = await this.vsoClient.getVersioningData(
2612-
"5.1-preview.1",
2613-
"distributedtask",
2614-
"73fba52f-15ab-42b3-a538-ce67a9223a04",
2615-
routeValues);
2616-
2617-
let url: string = verData.requestUrl!;
2618-
let options: restm.IRequestOptions = this.createRequestOptions('application/json',
2619-
verData.apiVersion);
2620-
2621-
let res: restm.IRestResponse<TaskAgentInterfaces.KubernetesResource>;
2622-
res = await this.rest.update<TaskAgentInterfaces.KubernetesResource>(url, resource, options);
2623-
2624-
let ret = this.formatResponse(res.result,
2625-
TaskAgentInterfaces.TypeInfo.KubernetesResource,
2626-
false);
2627-
2628-
resolve(ret);
2629-
2630-
}
2631-
catch (err) {
2632-
reject(err);
2633-
}
2634-
});
2635-
}
2636-
26372592
/**
26382593
* @param {string} project - Project ID or project name
26392594
* @param {number} machineGroupId

0 commit comments

Comments
 (0)