UNPKG

azure-devops-node-api

Version:
220 lines (219 loc) 15.9 kB
import basem = require('./ClientApiBases'); import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces'); import ServiceEndpointInterfaces = require("./interfaces/ServiceEndpointInterfaces"); import VSSInterfaces = require("./interfaces/common/VSSInterfaces"); export interface IServiceEndpointApiBase extends basem.ClientApiBase { getAzureManagementGroups(): Promise<ServiceEndpointInterfaces.AzureManagementGroupQueryResult>; getAzureSubscriptions(): Promise<ServiceEndpointInterfaces.AzureSubscriptionQueryResult>; executeServiceEndpointRequest(serviceEndpointRequest: ServiceEndpointInterfaces.ServiceEndpointRequest, project: string, endpointId: string): Promise<ServiceEndpointInterfaces.ServiceEndpointRequestResult>; queryServiceEndpoint(binding: ServiceEndpointInterfaces.DataSourceBinding, project: string): Promise<string[]>; createServiceEndpoint(endpoint: ServiceEndpointInterfaces.ServiceEndpoint): Promise<ServiceEndpointInterfaces.ServiceEndpoint>; deleteServiceEndpoint(endpointId: string, projectIds: string[], deep?: boolean): Promise<void>; getServiceEndpointsByTypeAndOwner(type: string, owner: string): Promise<ServiceEndpointInterfaces.ServiceEndpoint[]>; shareServiceEndpoint(endpointProjectReferences: ServiceEndpointInterfaces.ServiceEndpointProjectReference[], endpointId: string): Promise<void>; updateServiceEndpoint(endpoint: ServiceEndpointInterfaces.ServiceEndpoint, endpointId: string, operation?: string): Promise<ServiceEndpointInterfaces.ServiceEndpoint>; updateServiceEndpoints(endpoints: ServiceEndpointInterfaces.ServiceEndpoint[]): Promise<ServiceEndpointInterfaces.ServiceEndpoint[]>; getServiceEndpointDetails(project: string, endpointId: string, actionFilter?: ServiceEndpointInterfaces.ServiceEndpointActionFilter, loadConfidentialData?: boolean): Promise<ServiceEndpointInterfaces.ServiceEndpoint>; getServiceEndpoints(project: string, type?: string, authSchemes?: string[], endpointIds?: string[], owner?: string, includeFailed?: boolean, includeDetails?: boolean, actionFilter?: ServiceEndpointInterfaces.ServiceEndpointActionFilter): Promise<ServiceEndpointInterfaces.ServiceEndpoint[]>; getServiceEndpointsByNames(project: string, endpointNames: string[], type?: string, authSchemes?: string[], owner?: string, includeFailed?: boolean, includeDetails?: boolean): Promise<ServiceEndpointInterfaces.ServiceEndpoint[]>; getServiceEndpointsWithRefreshedAuthentication(refreshAuthenticationParameters: ServiceEndpointInterfaces.RefreshAuthenticationParameters[], project: string, endpointIds: string[]): Promise<ServiceEndpointInterfaces.ServiceEndpoint[]>; getServiceEndpointExecutionRecords(project: string, endpointId: string, top?: number, continuationToken?: number): Promise<VSSInterfaces.PagedList<ServiceEndpointInterfaces.ServiceEndpointExecutionRecord>>; addServiceEndpointExecutionRecords(input: ServiceEndpointInterfaces.ServiceEndpointExecutionRecordsInput, project: string): Promise<ServiceEndpointInterfaces.ServiceEndpointExecutionRecord[]>; createOAuthConfiguration(configurationParams: ServiceEndpointInterfaces.OAuthConfigurationParams): Promise<ServiceEndpointInterfaces.OAuthConfiguration>; deleteOAuthConfiguration(configurationId: string): Promise<ServiceEndpointInterfaces.OAuthConfiguration>; getOAuthConfiguration(configurationId: string): Promise<ServiceEndpointInterfaces.OAuthConfiguration>; getOAuthConfigurations(endpointType?: string, actionFilter?: ServiceEndpointInterfaces.OAuthConfigurationActionFilter): Promise<ServiceEndpointInterfaces.OAuthConfiguration[]>; updateOAuthConfiguration(configurationParams: ServiceEndpointInterfaces.OAuthConfigurationParams, configurationId: string): Promise<ServiceEndpointInterfaces.OAuthConfiguration>; querySharedProjects(endpointId: string, project: string): Promise<ServiceEndpointInterfaces.ProjectReference[]>; shareEndpointWithProject(endpointId: string, fromProject: string, withProject: string): Promise<void>; getServiceEndpointTypes(type?: string, scheme?: string): Promise<ServiceEndpointInterfaces.ServiceEndpointType[]>; getFilteredServiceEndpointTypes(typesFilter: string[]): Promise<ServiceEndpointInterfaces.ServiceEndpointType[]>; createAadOAuthRequest(tenantId: string, redirectUri: string, promptOption?: ServiceEndpointInterfaces.AadLoginPromptOption, completeCallbackPayload?: string, completeCallbackByAuthCode?: boolean): Promise<string>; getVstsAadTenantId(): Promise<string>; } export declare class ServiceEndpointApiBase extends basem.ClientApiBase implements IServiceEndpointApiBase { constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions, userAgent?: string); static readonly RESOURCE_AREA_ID = "1814ab31-2f4f-4a9f-8761-f4d77dc5a5d7"; /** * Returns list of azure subscriptions * */ getAzureManagementGroups(): Promise<ServiceEndpointInterfaces.AzureManagementGroupQueryResult>; /** * Returns list of azure subscriptions * */ getAzureSubscriptions(): Promise<ServiceEndpointInterfaces.AzureSubscriptionQueryResult>; /** * Proxy for a GET request defined by a service endpoint. * * @param {ServiceEndpointInterfaces.ServiceEndpointRequest} serviceEndpointRequest - Service endpoint request. * @param {string} project - Project ID or project name * @param {string} endpointId - Id of the service endpoint. */ executeServiceEndpointRequest(serviceEndpointRequest: ServiceEndpointInterfaces.ServiceEndpointRequest, project: string, endpointId: string): Promise<ServiceEndpointInterfaces.ServiceEndpointRequestResult>; /** * Proxy for a GET request defined by a service endpoint. The request is authorized using a data source in service endpoint. The response is filtered using an XPath/Json based selector. * * @param {ServiceEndpointInterfaces.DataSourceBinding} binding - Describes the data source to fetch. * @param {string} project - Project ID or project name */ queryServiceEndpoint(binding: ServiceEndpointInterfaces.DataSourceBinding, project: string): Promise<string[]>; /** * Creates a new service endpoint * * @param {ServiceEndpointInterfaces.ServiceEndpoint} endpoint - Service endpoint to create */ createServiceEndpoint(endpoint: ServiceEndpointInterfaces.ServiceEndpoint): Promise<ServiceEndpointInterfaces.ServiceEndpoint>; /** * Delete a service endpoint * * @param {string} endpointId - Endpoint Id of endpoint to delete * @param {string[]} projectIds - project Ids from which endpoint needs to be deleted * @param {boolean} deep - delete the spn created by endpoint */ deleteServiceEndpoint(endpointId: string, projectIds: string[], deep?: boolean): Promise<void>; /** * Get service endpoints for org by type and owner. Returns only id, name and url and used only internally by licensing service * * @param {string} type - Type of the service endpoints. * @param {string} owner - Owner for service endpoints. */ getServiceEndpointsByTypeAndOwner(type: string, owner: string): Promise<ServiceEndpointInterfaces.ServiceEndpoint[]>; /** * Share service endpoint across projects * * @param {ServiceEndpointInterfaces.ServiceEndpointProjectReference[]} endpointProjectReferences - Project reference details of the target project * @param {string} endpointId - Endpoint Id of the endpoint to share */ shareServiceEndpoint(endpointProjectReferences: ServiceEndpointInterfaces.ServiceEndpointProjectReference[], endpointId: string): Promise<void>; /** * Update the service endpoint * * @param {ServiceEndpointInterfaces.ServiceEndpoint} endpoint - Updated data for the endpoint * @param {string} endpointId - Endpoint Id of the endpoint to update * @param {string} operation - operation type */ updateServiceEndpoint(endpoint: ServiceEndpointInterfaces.ServiceEndpoint, endpointId: string, operation?: string): Promise<ServiceEndpointInterfaces.ServiceEndpoint>; /** * Update the service endpoints. * * @param {ServiceEndpointInterfaces.ServiceEndpoint[]} endpoints - Names of the service endpoints to update. */ updateServiceEndpoints(endpoints: ServiceEndpointInterfaces.ServiceEndpoint[]): Promise<ServiceEndpointInterfaces.ServiceEndpoint[]>; /** * Get the service endpoint details. * * @param {string} project - Project ID or project name * @param {string} endpointId - Id of the service endpoint. * @param {ServiceEndpointInterfaces.ServiceEndpointActionFilter} actionFilter - Action filter for the service connection. It specifies the action which can be performed on the service connection. * @param {boolean} loadConfidentialData - Flag to include confidential details of service endpoint. This is for internal use only. */ getServiceEndpointDetails(project: string, endpointId: string, actionFilter?: ServiceEndpointInterfaces.ServiceEndpointActionFilter, loadConfidentialData?: boolean): Promise<ServiceEndpointInterfaces.ServiceEndpoint>; /** * Get the service endpoints. * * @param {string} project - Project ID or project name * @param {string} type - Type of the service endpoints. * @param {string[]} authSchemes - Authorization schemes used for service endpoints. * @param {string[]} endpointIds - Ids of the service endpoints. * @param {string} owner - Owner for service endpoints. * @param {boolean} includeFailed - Failed flag for service endpoints. * @param {boolean} includeDetails - Flag to include more details for service endpoints. This is for internal use only and the flag will be treated as false for all other requests * @param {ServiceEndpointInterfaces.ServiceEndpointActionFilter} actionFilter - The "actionFilter" parameter allows users to evaluate requestor permissions and retrieve a list of endpoints that match the specified conditions, ensuring that only relevant endpoints are returned based on their permissions */ getServiceEndpoints(project: string, type?: string, authSchemes?: string[], endpointIds?: string[], owner?: string, includeFailed?: boolean, includeDetails?: boolean, actionFilter?: ServiceEndpointInterfaces.ServiceEndpointActionFilter): Promise<ServiceEndpointInterfaces.ServiceEndpoint[]>; /** * Get the service endpoints by name. * * @param {string} project - Project ID or project name * @param {string[]} endpointNames - Names of the service endpoints. * @param {string} type - Type of the service endpoints. * @param {string[]} authSchemes - Authorization schemes used for service endpoints. * @param {string} owner - Owner for service endpoints. * @param {boolean} includeFailed - Failed flag for service endpoints. * @param {boolean} includeDetails - Flag to include more details for service endpoints. This is for internal use only and the flag will be treated as false for all other requests */ getServiceEndpointsByNames(project: string, endpointNames: string[], type?: string, authSchemes?: string[], owner?: string, includeFailed?: boolean, includeDetails?: boolean): Promise<ServiceEndpointInterfaces.ServiceEndpoint[]>; /** * Gets the service endpoints and patch new authorization parameters * * @param {ServiceEndpointInterfaces.RefreshAuthenticationParameters[]} refreshAuthenticationParameters - Scope, Validity of Token requested. * @param {string} project - Project ID or project name * @param {string[]} endpointIds - Ids of the service endpoints. */ getServiceEndpointsWithRefreshedAuthentication(refreshAuthenticationParameters: ServiceEndpointInterfaces.RefreshAuthenticationParameters[], project: string, endpointIds: string[]): Promise<ServiceEndpointInterfaces.ServiceEndpoint[]>; /** * Get service endpoint execution records. * * @param {string} project - Project ID or project name * @param {string} endpointId - Id of the service endpoint. * @param {number} top - Number of service endpoint execution records to get. * @param {number} continuationToken - A continuation token, returned by a previous call to this method, that can be used to return the next set of records */ getServiceEndpointExecutionRecords(project: string, endpointId: string, top?: number, continuationToken?: number): Promise<VSSInterfaces.PagedList<ServiceEndpointInterfaces.ServiceEndpointExecutionRecord>>; /** * Add service endpoint execution records. * * @param {ServiceEndpointInterfaces.ServiceEndpointExecutionRecordsInput} input - Service endpoint execution records to add. * @param {string} project - Project ID or project name */ addServiceEndpointExecutionRecords(input: ServiceEndpointInterfaces.ServiceEndpointExecutionRecordsInput, project: string): Promise<ServiceEndpointInterfaces.ServiceEndpointExecutionRecord[]>; /** * @param {ServiceEndpointInterfaces.OAuthConfigurationParams} configurationParams */ createOAuthConfiguration(configurationParams: ServiceEndpointInterfaces.OAuthConfigurationParams): Promise<ServiceEndpointInterfaces.OAuthConfiguration>; /** * @param {string} configurationId */ deleteOAuthConfiguration(configurationId: string): Promise<ServiceEndpointInterfaces.OAuthConfiguration>; /** * @param {string} configurationId */ getOAuthConfiguration(configurationId: string): Promise<ServiceEndpointInterfaces.OAuthConfiguration>; /** * @param {string} endpointType * @param {ServiceEndpointInterfaces.OAuthConfigurationActionFilter} actionFilter */ getOAuthConfigurations(endpointType?: string, actionFilter?: ServiceEndpointInterfaces.OAuthConfigurationActionFilter): Promise<ServiceEndpointInterfaces.OAuthConfiguration[]>; /** * @param {ServiceEndpointInterfaces.OAuthConfigurationParams} configurationParams * @param {string} configurationId */ updateOAuthConfiguration(configurationParams: ServiceEndpointInterfaces.OAuthConfigurationParams, configurationId: string): Promise<ServiceEndpointInterfaces.OAuthConfiguration>; /** * @param {string} endpointId * @param {string} project */ querySharedProjects(endpointId: string, project: string): Promise<ServiceEndpointInterfaces.ProjectReference[]>; /** * @param {string} endpointId * @param {string} fromProject * @param {string} withProject */ shareEndpointWithProject(endpointId: string, fromProject: string, withProject: string): Promise<void>; /** * Get service endpoint types. * * @param {string} type - Type of service endpoint. * @param {string} scheme - Scheme of service endpoint. */ getServiceEndpointTypes(type?: string, scheme?: string): Promise<ServiceEndpointInterfaces.ServiceEndpointType[]>; /** * Get service endpoint types with passed types filter. * * @param {string[]} typesFilter - Filter to limit returned types */ getFilteredServiceEndpointTypes(typesFilter: string[]): Promise<ServiceEndpointInterfaces.ServiceEndpointType[]>; /** * @param {string} tenantId * @param {string} redirectUri * @param {ServiceEndpointInterfaces.AadLoginPromptOption} promptOption * @param {string} completeCallbackPayload * @param {boolean} completeCallbackByAuthCode */ createAadOAuthRequest(tenantId: string, redirectUri: string, promptOption?: ServiceEndpointInterfaces.AadLoginPromptOption, completeCallbackPayload?: string, completeCallbackByAuthCode?: boolean): Promise<string>; /** */ getVstsAadTenantId(): Promise<string>; }