UNPKG

15.2 kBTypeScriptView Raw
1import basem = require('./ClientApiBases');
2import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces');
3import CoreInterfaces = require("./interfaces/CoreInterfaces");
4import OperationsInterfaces = require("./interfaces/common/OperationsInterfaces");
5import VSSInterfaces = require("./interfaces/common/VSSInterfaces");
6export interface ICoreApi extends basem.ClientApiBase {
7 removeProjectAvatar(projectId: string): Promise<void>;
8 setProjectAvatar(avatarBlob: CoreInterfaces.ProjectAvatar, projectId: string): Promise<void>;
9 getProjectTeamsByCategory(projectId: string, expandIdentity?: boolean, top?: number, skip?: number): Promise<CoreInterfaces.CategorizedWebApiTeams>;
10 createConnectedService(connectedServiceCreationData: CoreInterfaces.WebApiConnectedServiceDetails, projectId: string): Promise<CoreInterfaces.WebApiConnectedService>;
11 getConnectedServiceDetails(projectId: string, name: string): Promise<CoreInterfaces.WebApiConnectedServiceDetails>;
12 getConnectedServices(projectId: string, kind?: CoreInterfaces.ConnectedServiceKind): Promise<CoreInterfaces.WebApiConnectedService[]>;
13 createIdentityMru(mruData: CoreInterfaces.IdentityData, mruName: string): Promise<void>;
14 deleteIdentityMru(mruData: CoreInterfaces.IdentityData, mruName: string): Promise<void>;
15 getIdentityMru(mruName: string): Promise<VSSInterfaces.IdentityRef[]>;
16 updateIdentityMru(mruData: CoreInterfaces.IdentityData, mruName: string): Promise<void>;
17 getTeamMembersWithExtendedProperties(projectId: string, teamId: string, top?: number, skip?: number): Promise<VSSInterfaces.TeamMember[]>;
18 getProcessById(processId: string): Promise<CoreInterfaces.Process>;
19 getProcesses(): Promise<CoreInterfaces.Process[]>;
20 getProjectCollection(collectionId: string): Promise<CoreInterfaces.TeamProjectCollection>;
21 getProjectCollections(top?: number, skip?: number): Promise<CoreInterfaces.TeamProjectCollectionReference[]>;
22 getProjectHistoryEntries(minRevision?: number): Promise<CoreInterfaces.ProjectInfo[]>;
23 getProject(projectId: string, includeCapabilities?: boolean, includeHistory?: boolean): Promise<CoreInterfaces.TeamProject>;
24 getProjects(stateFilter?: any, top?: number, skip?: number, continuationToken?: number, getDefaultTeamImageUrl?: boolean): Promise<VSSInterfaces.PagedList<CoreInterfaces.TeamProjectReference>>;
25 queueCreateProject(projectToCreate: CoreInterfaces.TeamProject): Promise<OperationsInterfaces.OperationReference>;
26 queueDeleteProject(projectId: string): Promise<OperationsInterfaces.OperationReference>;
27 updateProject(projectUpdate: CoreInterfaces.TeamProject, projectId: string): Promise<OperationsInterfaces.OperationReference>;
28 getProjectsProperties(projectIds: string[], properties?: string[]): Promise<CoreInterfaces.ProjectProperties[]>;
29 getProjectProperties(projectId: string, keys?: string[]): Promise<CoreInterfaces.ProjectProperty[]>;
30 setProjectProperties(customHeaders: any, projectId: string, patchDocument: VSSInterfaces.JsonPatchDocument): Promise<void>;
31 createOrUpdateProxy(proxy: CoreInterfaces.Proxy): Promise<CoreInterfaces.Proxy>;
32 deleteProxy(proxyUrl: string, site?: string): Promise<void>;
33 getProxies(proxyUrl?: string): Promise<CoreInterfaces.Proxy[]>;
34 getAllTeams(mine?: boolean, top?: number, skip?: number, expandIdentity?: boolean): Promise<CoreInterfaces.WebApiTeam[]>;
35 createTeam(team: CoreInterfaces.WebApiTeam, projectId: string): Promise<CoreInterfaces.WebApiTeam>;
36 deleteTeam(projectId: string, teamId: string): Promise<void>;
37 getTeam(projectId: string, teamId: string, expandIdentity?: boolean): Promise<CoreInterfaces.WebApiTeam>;
38 getTeams(projectId: string, mine?: boolean, top?: number, skip?: number, expandIdentity?: boolean): Promise<CoreInterfaces.WebApiTeam[]>;
39 updateTeam(teamData: CoreInterfaces.WebApiTeam, projectId: string, teamId: string): Promise<CoreInterfaces.WebApiTeam>;
40}
41export declare class CoreApi extends basem.ClientApiBase implements ICoreApi {
42 constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions);
43 static readonly RESOURCE_AREA_ID = "79134c72-4a58-4b42-976c-04e7115f32bf";
44 /**
45 * Removes the avatar for the project.
46 *
47 * @param {string} projectId - The ID or name of the project.
48 */
49 removeProjectAvatar(projectId: string): Promise<void>;
50 /**
51 * Sets the avatar for the project.
52 *
53 * @param {CoreInterfaces.ProjectAvatar} avatarBlob - The avatar blob data object to upload.
54 * @param {string} projectId - The ID or name of the project.
55 */
56 setProjectAvatar(avatarBlob: CoreInterfaces.ProjectAvatar, projectId: string): Promise<void>;
57 /**
58 * Gets list of user readable teams in a project and teams user is member of (excluded from readable list).
59 *
60 * @param {string} projectId - The name or ID (GUID) of the team project containing the teams to retrieve.
61 * @param {boolean} expandIdentity - A value indicating whether or not to expand Identity information in the result WebApiTeam object.
62 * @param {number} top - Maximum number of teams to return.
63 * @param {number} skip - Number of teams to skip.
64 */
65 getProjectTeamsByCategory(projectId: string, expandIdentity?: boolean, top?: number, skip?: number): Promise<CoreInterfaces.CategorizedWebApiTeams>;
66 /**
67 * @param {CoreInterfaces.WebApiConnectedServiceDetails} connectedServiceCreationData
68 * @param {string} projectId
69 */
70 createConnectedService(connectedServiceCreationData: CoreInterfaces.WebApiConnectedServiceDetails, projectId: string): Promise<CoreInterfaces.WebApiConnectedService>;
71 /**
72 * @param {string} projectId
73 * @param {string} name
74 */
75 getConnectedServiceDetails(projectId: string, name: string): Promise<CoreInterfaces.WebApiConnectedServiceDetails>;
76 /**
77 * @param {string} projectId
78 * @param {CoreInterfaces.ConnectedServiceKind} kind
79 */
80 getConnectedServices(projectId: string, kind?: CoreInterfaces.ConnectedServiceKind): Promise<CoreInterfaces.WebApiConnectedService[]>;
81 /**
82 * @param {CoreInterfaces.IdentityData} mruData
83 * @param {string} mruName
84 */
85 createIdentityMru(mruData: CoreInterfaces.IdentityData, mruName: string): Promise<void>;
86 /**
87 * @param {CoreInterfaces.IdentityData} mruData
88 * @param {string} mruName
89 */
90 deleteIdentityMru(mruData: CoreInterfaces.IdentityData, mruName: string): Promise<void>;
91 /**
92 * @param {string} mruName
93 */
94 getIdentityMru(mruName: string): Promise<VSSInterfaces.IdentityRef[]>;
95 /**
96 * @param {CoreInterfaces.IdentityData} mruData
97 * @param {string} mruName
98 */
99 updateIdentityMru(mruData: CoreInterfaces.IdentityData, mruName: string): Promise<void>;
100 /**
101 * Get a list of members for a specific team.
102 *
103 * @param {string} projectId - The name or ID (GUID) of the team project the team belongs to.
104 * @param {string} teamId - The name or ID (GUID) of the team .
105 * @param {number} top
106 * @param {number} skip
107 */
108 getTeamMembersWithExtendedProperties(projectId: string, teamId: string, top?: number, skip?: number): Promise<VSSInterfaces.TeamMember[]>;
109 /**
110 * Get a process by ID.
111 *
112 * @param {string} processId - ID for a process.
113 */
114 getProcessById(processId: string): Promise<CoreInterfaces.Process>;
115 /**
116 * Get a list of processes.
117 *
118 */
119 getProcesses(): Promise<CoreInterfaces.Process[]>;
120 /**
121 * Get project collection with the specified id or name.
122 *
123 * @param {string} collectionId
124 */
125 getProjectCollection(collectionId: string): Promise<CoreInterfaces.TeamProjectCollection>;
126 /**
127 * Get project collection references for this application.
128 *
129 * @param {number} top
130 * @param {number} skip
131 */
132 getProjectCollections(top?: number, skip?: number): Promise<CoreInterfaces.TeamProjectCollectionReference[]>;
133 /**
134 * Gets the history of changes to the project.
135 *
136 * @param {number} minRevision - The minimum revision number to return in the history.
137 */
138 getProjectHistoryEntries(minRevision?: number): Promise<CoreInterfaces.ProjectInfo[]>;
139 /**
140 * Get project with the specified id or name, optionally including capabilities.
141 *
142 * @param {string} projectId
143 * @param {boolean} includeCapabilities - Include capabilities (such as source control) in the team project result (default: false).
144 * @param {boolean} includeHistory - Search within renamed projects (that had such name in the past).
145 */
146 getProject(projectId: string, includeCapabilities?: boolean, includeHistory?: boolean): Promise<CoreInterfaces.TeamProject>;
147 /**
148 * Get all projects in the organization that the authenticated user has access to.
149 *
150 * @param {any} stateFilter - Filter on team projects in a specific team project state (default: WellFormed).
151 * @param {number} top
152 * @param {number} skip
153 * @param {number} continuationToken - Pointer that shows how many projects already been fetched.
154 * @param {boolean} getDefaultTeamImageUrl
155 */
156 getProjects(stateFilter?: any, top?: number, skip?: number, continuationToken?: number, getDefaultTeamImageUrl?: boolean): Promise<VSSInterfaces.PagedList<CoreInterfaces.TeamProjectReference>>;
157 /**
158 * Queues a project to be created. Use the [GetOperation](../../operations/operations/get) to periodically check for create project status.
159 *
160 * @param {CoreInterfaces.TeamProject} projectToCreate - The project to create.
161 */
162 queueCreateProject(projectToCreate: CoreInterfaces.TeamProject): Promise<OperationsInterfaces.OperationReference>;
163 /**
164 * Queues a project to be deleted. Use the [GetOperation](../../operations/operations/get) to periodically check for delete project status.
165 *
166 * @param {string} projectId - The project id of the project to delete.
167 */
168 queueDeleteProject(projectId: string): Promise<OperationsInterfaces.OperationReference>;
169 /**
170 * Update an existing project's name, abbreviation, description, or restore a project.
171 *
172 * @param {CoreInterfaces.TeamProject} projectUpdate - The updates for the project. The state must be set to wellFormed to restore the project.
173 * @param {string} projectId - The project id of the project to update.
174 */
175 updateProject(projectUpdate: CoreInterfaces.TeamProject, projectId: string): Promise<OperationsInterfaces.OperationReference>;
176 /**
177 * Get a collection of team project properties for multiple projects.
178 *
179 * @param {string[]} projectIds - A comma-delimited string of team project IDs
180 * @param {string[]} properties
181 */
182 getProjectsProperties(projectIds: string[], properties?: string[]): Promise<CoreInterfaces.ProjectProperties[]>;
183 /**
184 * Get a collection of team project properties.
185 *
186 * @param {string} projectId - The team project ID.
187 * @param {string[]} keys - A comma-delimited string of team project property names. Wildcard characters ("?" and "*") are supported. If no key is specified, all properties will be returned.
188 */
189 getProjectProperties(projectId: string, keys?: string[]): Promise<CoreInterfaces.ProjectProperty[]>;
190 /**
191 * Create, update, and delete team project properties.
192 *
193 * @param {string} projectId - The team project ID.
194 * @param {VSSInterfaces.JsonPatchDocument} patchDocument - A JSON Patch document that represents an array of property operations. See RFC 6902 for more details on JSON Patch. The accepted operation verbs are Add and Remove, where Add is used for both creating and updating properties. The path consists of a forward slash and a property name.
195 */
196 setProjectProperties(customHeaders: any, projectId: string, patchDocument: VSSInterfaces.JsonPatchDocument): Promise<void>;
197 /**
198 * @param {CoreInterfaces.Proxy} proxy
199 */
200 createOrUpdateProxy(proxy: CoreInterfaces.Proxy): Promise<CoreInterfaces.Proxy>;
201 /**
202 * @param {string} proxyUrl
203 * @param {string} site
204 */
205 deleteProxy(proxyUrl: string, site?: string): Promise<void>;
206 /**
207 * @param {string} proxyUrl
208 */
209 getProxies(proxyUrl?: string): Promise<CoreInterfaces.Proxy[]>;
210 /**
211 * Get a list of all teams.
212 *
213 * @param {boolean} mine - If true, then return all teams requesting user is member. Otherwise return all teams user has read access.
214 * @param {number} top - Maximum number of teams to return.
215 * @param {number} skip - Number of teams to skip.
216 * @param {boolean} expandIdentity - A value indicating whether or not to expand Identity information in the result WebApiTeam object.
217 */
218 getAllTeams(mine?: boolean, top?: number, skip?: number, expandIdentity?: boolean): Promise<CoreInterfaces.WebApiTeam[]>;
219 /**
220 * Create a team in a team project.
221 *
222 * @param {CoreInterfaces.WebApiTeam} team - The team data used to create the team.
223 * @param {string} projectId - The name or ID (GUID) of the team project in which to create the team.
224 */
225 createTeam(team: CoreInterfaces.WebApiTeam, projectId: string): Promise<CoreInterfaces.WebApiTeam>;
226 /**
227 * Delete a team.
228 *
229 * @param {string} projectId - The name or ID (GUID) of the team project containing the team to delete.
230 * @param {string} teamId - The name or ID of the team to delete.
231 */
232 deleteTeam(projectId: string, teamId: string): Promise<void>;
233 /**
234 * Get a specific team.
235 *
236 * @param {string} projectId - The name or ID (GUID) of the team project containing the team.
237 * @param {string} teamId - The name or ID (GUID) of the team.
238 * @param {boolean} expandIdentity - A value indicating whether or not to expand Identity information in the result WebApiTeam object.
239 */
240 getTeam(projectId: string, teamId: string, expandIdentity?: boolean): Promise<CoreInterfaces.WebApiTeam>;
241 /**
242 * Get a list of teams.
243 *
244 * @param {string} projectId
245 * @param {boolean} mine - If true return all the teams requesting user is member, otherwise return all the teams user has read access.
246 * @param {number} top - Maximum number of teams to return.
247 * @param {number} skip - Number of teams to skip.
248 * @param {boolean} expandIdentity - A value indicating whether or not to expand Identity information in the result WebApiTeam object.
249 */
250 getTeams(projectId: string, mine?: boolean, top?: number, skip?: number, expandIdentity?: boolean): Promise<CoreInterfaces.WebApiTeam[]>;
251 /**
252 * Update a team's name and/or description.
253 *
254 * @param {CoreInterfaces.WebApiTeam} teamData
255 * @param {string} projectId - The name or ID (GUID) of the team project containing the team to update.
256 * @param {string} teamId - The name of ID of the team to update.
257 */
258 updateTeam(teamData: CoreInterfaces.WebApiTeam, projectId: string, teamId: string): Promise<CoreInterfaces.WebApiTeam>;
259}