1 | import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces');
|
2 | import alertm = require('./AlertApi');
|
3 | import buildm = require('./BuildApi');
|
4 | import corem = require('./CoreApi');
|
5 | import dashboardm = require('./DashboardApi');
|
6 | import extmgmtm = require("./ExtensionManagementApi");
|
7 | import featuremgmtm = require("./FeatureManagementApi");
|
8 | import filecontainerm = require('./FileContainerApi');
|
9 | import gallerym = require('./GalleryApi');
|
10 | import gitm = require('./GitApi');
|
11 | import locationsm = require('./LocationsApi');
|
12 | import managementm = require('./ManagementApi');
|
13 | import notificationm = require('./NotificationApi');
|
14 | import policym = require('./PolicyApi');
|
15 | import profilem = require('./ProfileApi');
|
16 | import projectm = require('./ProjectAnalysisApi');
|
17 | import releasem = require('./ReleaseApi');
|
18 | import securityrolesm = require('./SecurityRolesApi');
|
19 | import taskagentm = require('./TaskAgentApi');
|
20 | import taskm = require('./TaskApi');
|
21 | import testm = require('./TestApi');
|
22 | import testplanm = require('./TestPlanApi');
|
23 | import testresultsm = require('./TestResultsApi');
|
24 | import tfvcm = require('./TfvcApi');
|
25 | import wikim = require('./WikiApi');
|
26 | import workm = require('./WorkApi');
|
27 | import pipelinesm = require('./PipelinesApi');
|
28 | import cixm = require('./CIXApi');
|
29 | import workitemtrackingm = require('./WorkItemTrackingApi');
|
30 | import workitemtrackingprocessm = require('./WorkItemTrackingProcessApi');
|
31 | import workitemtrackingprocessdefinitionm = require('./WorkItemTrackingProcessDefinitionsApi');
|
32 | import * as rm from 'typed-rest-client/RestClient';
|
33 | import vsom = require('./VsoClient');
|
34 | import lim = require("./interfaces/LocationsInterfaces");
|
35 |
|
36 |
|
37 |
|
38 | export declare function getBasicHandler(username: string, password: string, allowCrossOriginAuthentication?: boolean): VsoBaseInterfaces.IRequestHandler;
|
39 | export declare function getNtlmHandler(username: string, password: string, workstation?: string, domain?: string): VsoBaseInterfaces.IRequestHandler;
|
40 | export declare function getBearerHandler(token: string, allowCrossOriginAuthentication?: boolean): VsoBaseInterfaces.IRequestHandler;
|
41 | export declare function getPersonalAccessTokenHandler(token: string, allowCrossOriginAuthentication?: boolean): VsoBaseInterfaces.IRequestHandler;
|
42 | export declare function getHandlerFromToken(token: string, allowCrossOriginAuthentication?: boolean): VsoBaseInterfaces.IRequestHandler;
|
43 | export interface IWebApiRequestSettings {
|
44 | productName: string;
|
45 | productVersion: string;
|
46 | }
|
47 | export declare class WebApi {
|
48 | serverUrl: string;
|
49 | authHandler: VsoBaseInterfaces.IRequestHandler;
|
50 | rest: rm.RestClient;
|
51 | vsoClient: vsom.VsoClient;
|
52 | options: VsoBaseInterfaces.IRequestOptions;
|
53 | private _resourceAreas;
|
54 | constructor(defaultUrl: string, authHandler: VsoBaseInterfaces.IRequestHandler, options?: VsoBaseInterfaces.IRequestOptions, requestSettings?: IWebApiRequestSettings);
|
55 | /**
|
56 | * Convenience factory to create with a bearer token.
|
57 | * @param defaultServerUrl default server url to use when creating new apis from factory methods
|
58 | * @param defaultAuthHandler default authentication credentials to use when creating new apis from factory methods
|
59 | */
|
60 | static createWithBearerToken(defaultUrl: string, token: string, options?: VsoBaseInterfaces.IRequestOptions): WebApi;
|
61 | connect(): Promise<lim.ConnectionData>;
|
62 | /**
|
63 | * Each factory method can take a serverUrl and a list of handlers
|
64 | * if these aren't provided, the default url and auth handler given to the constructor for this class will be used
|
65 | */
|
66 | getAlertApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise<alertm.IAlertApi>;
|
67 | getBuildApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise<buildm.IBuildApi>;
|
68 | getCoreApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise<corem.ICoreApi>;
|
69 | getDashboardApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise<dashboardm.IDashboardApi>;
|
70 | getExtensionManagementApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise<extmgmtm.IExtensionManagementApi>;
|
71 | getFeatureManagementApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise<featuremgmtm.IFeatureManagementApi>;
|
72 | getFileContainerApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise<filecontainerm.IFileContainerApi>;
|
73 | getGalleryApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise<gallerym.IGalleryApi>;
|
74 | getGitApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise<gitm.IGitApi>;
|
75 | getLocationsApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise<locationsm.ILocationsApi>;
|
76 | getManagementApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise<managementm.IManagementApi>;
|
77 | getNotificationApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise<notificationm.INotificationApi>;
|
78 | getPolicyApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise<policym.IPolicyApi>;
|
79 | getProfileApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise<profilem.IProfileApi>;
|
80 | getProjectAnalysisApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise<projectm.IProjectAnalysisApi>;
|
81 | getSecurityRolesApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise<securityrolesm.ISecurityRolesApi>;
|
82 | getReleaseApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise<releasem.IReleaseApi>;
|
83 | getTaskApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise<taskm.ITaskApi>;
|
84 | getTaskAgentApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise<taskagentm.ITaskAgentApi>;
|
85 | getTestApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise<testm.ITestApi>;
|
86 | getTestPlanApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise<testplanm.ITestPlanApi>;
|
87 | getTestResultsApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise<testresultsm.ITestResultsApi>;
|
88 | getTfvcApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise<tfvcm.ITfvcApi>;
|
89 | getWikiApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise<wikim.IWikiApi>;
|
90 | getWorkApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise<workm.IWorkApi>;
|
91 | getWorkItemTrackingApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise<workitemtrackingm.IWorkItemTrackingApi>;
|
92 | getWorkItemTrackingProcessApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise<workitemtrackingprocessm.IWorkItemTrackingProcessApi>;
|
93 | getWorkItemTrackingProcessDefinitionApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise<workitemtrackingprocessdefinitionm.IWorkItemTrackingProcessDefinitionsApi>;
|
94 | getPipelinesApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise<pipelinesm.IPipelinesApi>;
|
95 | getCixApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise<cixm.ICixApi>;
|
96 | /**
|
97 | * Determines if the domain is exluded for proxy via the no_proxy env var
|
98 | * @param url: the server url
|
99 | */
|
100 | isNoProxyHost: (_url: string) => boolean;
|
101 | private _getResourceAreaUrl;
|
102 | private _getResourceAreas;
|
103 | private _readTaskLibSecrets;
|
104 | }
|