UNPKG

2.42 kBTypeScriptView Raw
1/// <reference types="node" />
2import taskagentbasem = require('./TaskAgentApiBase');
3import TaskAgentInterfaces = require("./interfaces/TaskAgentInterfaces");
4import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces');
5export interface ITaskAgentApi extends taskagentbasem.ITaskAgentApiBase {
6 uploadTaskDefinition(customHeaders: VsoBaseInterfaces.IHeaders, contentStream: NodeJS.ReadableStream, taskId: string, overwrite: boolean): Promise<void>;
7}
8export declare class TaskAgentApi extends taskagentbasem.TaskAgentApiBase implements ITaskAgentApi {
9 private _handlers;
10 private _options;
11 private _fallbackClient;
12 constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions);
13 /**
14 * @param {string} taskId
15 * @param onResult callback function
16 */
17 deleteTaskDefinition(taskId: string): Promise<void>;
18 /**
19 * @param {string} taskId
20 * @param {string} versionString
21 * @param {string[]} visibility
22 * @param {boolean} scopeLocal
23 * @param onResult callback function with the resulting ArrayBuffer
24 */
25 getTaskContentZip(taskId: string, versionString: string, visibility: string[], scopeLocal: boolean): Promise<NodeJS.ReadableStream>;
26 /**
27 * @param {string} taskId
28 * @param {string} versionString
29 * @param {string[]} visibility
30 * @param {boolean} scopeLocal
31 * @param onResult callback function with the resulting TaskAgentInterfaces.TaskDefinition
32 */
33 getTaskDefinition(taskId: string, versionString: string, visibility: string[], scopeLocal: boolean): Promise<TaskAgentInterfaces.TaskDefinition>;
34 /**
35 * @param {string} taskId
36 * @param {string[]} visibility
37 * @param {boolean} scopeLocal
38 * @param onResult callback function with the resulting TaskAgentInterfaces.TaskDefinition[]
39 */
40 getTaskDefinitions(taskId: string, visibility: string[], scopeLocal: boolean): Promise<TaskAgentInterfaces.TaskDefinition[]>;
41 /**
42 * @param {NodeJS.ReadableStream} contentStream
43 * @param {string} taskId
44 * @param {boolean} overwrite
45 * @param onResult callback function
46 */
47 uploadTaskDefinition(customHeaders: VsoBaseInterfaces.IHeaders, contentStream: NodeJS.ReadableStream, taskId: string, overwrite: boolean): Promise<void>;
48 private _getFallbackClient;
49 private _getAccountUrl;
50}