UNPKG

4.06 kBTypeScriptView Raw
1import basem = require('./ClientApiBases');
2import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces');
3import LocationsInterfaces = require("./interfaces/LocationsInterfaces");
4import VSSInterfaces = require("./interfaces/common/VSSInterfaces");
5export interface ILocationsApi extends basem.ClientApiBase {
6 getConnectionData(connectOptions?: VSSInterfaces.ConnectOptions, lastChangeId?: number, lastChangeId64?: number): Promise<LocationsInterfaces.ConnectionData>;
7 getResourceArea(areaId: string, enterpriseName?: string, organizationName?: string): Promise<LocationsInterfaces.ResourceAreaInfo>;
8 getResourceAreaByHost(areaId: string, hostId: string): Promise<LocationsInterfaces.ResourceAreaInfo>;
9 getResourceAreas(enterpriseName?: string, organizationName?: string): Promise<LocationsInterfaces.ResourceAreaInfo[]>;
10 getResourceAreasByHost(hostId: string): Promise<LocationsInterfaces.ResourceAreaInfo[]>;
11 deleteServiceDefinition(serviceType: string, identifier: string): Promise<void>;
12 getServiceDefinition(serviceType: string, identifier: string, allowFaultIn?: boolean, previewFaultIn?: boolean): Promise<LocationsInterfaces.ServiceDefinition>;
13 getServiceDefinitions(serviceType?: string): Promise<LocationsInterfaces.ServiceDefinition[]>;
14 updateServiceDefinitions(serviceDefinitions: VSSInterfaces.VssJsonCollectionWrapperV<LocationsInterfaces.ServiceDefinition[]>): Promise<void>;
15}
16export declare class LocationsApi extends basem.ClientApiBase implements ILocationsApi {
17 constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions);
18 /**
19 * This was copied and adapted from TeamFoundationConnectionService.Connect()
20 *
21 * @param {VSSInterfaces.ConnectOptions} connectOptions
22 * @param {number} lastChangeId - Obsolete 32-bit LastChangeId
23 * @param {number} lastChangeId64 - Non-truncated 64-bit LastChangeId
24 */
25 getConnectionData(connectOptions?: VSSInterfaces.ConnectOptions, lastChangeId?: number, lastChangeId64?: number): Promise<LocationsInterfaces.ConnectionData>;
26 /**
27 * @param {string} areaId
28 * @param {string} enterpriseName
29 * @param {string} organizationName
30 */
31 getResourceArea(areaId: string, enterpriseName?: string, organizationName?: string): Promise<LocationsInterfaces.ResourceAreaInfo>;
32 /**
33 * @param {string} areaId
34 * @param {string} hostId
35 */
36 getResourceAreaByHost(areaId: string, hostId: string): Promise<LocationsInterfaces.ResourceAreaInfo>;
37 /**
38 * @param {string} enterpriseName
39 * @param {string} organizationName
40 */
41 getResourceAreas(enterpriseName?: string, organizationName?: string): Promise<LocationsInterfaces.ResourceAreaInfo[]>;
42 /**
43 * @param {string} hostId
44 */
45 getResourceAreasByHost(hostId: string): Promise<LocationsInterfaces.ResourceAreaInfo[]>;
46 /**
47 * @param {string} serviceType
48 * @param {string} identifier
49 */
50 deleteServiceDefinition(serviceType: string, identifier: string): Promise<void>;
51 /**
52 * Finds a given service definition.
53 *
54 * @param {string} serviceType
55 * @param {string} identifier
56 * @param {boolean} allowFaultIn - If true, we will attempt to fault in a host instance mapping if in SPS.
57 * @param {boolean} previewFaultIn - If true, we will calculate and return a host instance mapping, but not persist it.
58 */
59 getServiceDefinition(serviceType: string, identifier: string, allowFaultIn?: boolean, previewFaultIn?: boolean): Promise<LocationsInterfaces.ServiceDefinition>;
60 /**
61 * @param {string} serviceType
62 */
63 getServiceDefinitions(serviceType?: string): Promise<LocationsInterfaces.ServiceDefinition[]>;
64 /**
65 * @param {VSSInterfaces.VssJsonCollectionWrapperV<LocationsInterfaces.ServiceDefinition[]>} serviceDefinitions
66 */
67 updateServiceDefinitions(serviceDefinitions: VSSInterfaces.VssJsonCollectionWrapperV<LocationsInterfaces.ServiceDefinition[]>): Promise<void>;
68}