UNPKG

4.05 kBTypeScriptView Raw
1import basem = require('./ClientApiBases');
2import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces');
3import CIXInterfaces = require("./interfaces/CIXInterfaces");
4export interface ICixApi extends basem.ClientApiBase {
5 getConfigurations(project: string, repositoryType?: string, repositoryId?: string, branch?: string, serviceConnectionId?: string): Promise<CIXInterfaces.ConfigurationFile[]>;
6 createProjectConnection(createConnectionInputs: CIXInterfaces.CreatePipelineConnectionInputs, project: string): Promise<CIXInterfaces.PipelineConnection>;
7 getDetectedBuildFrameworks(project: string, repositoryType?: string, repositoryId?: string, branch?: string, detectionType?: CIXInterfaces.BuildFrameworkDetectionType, serviceConnectionId?: string): Promise<CIXInterfaces.DetectedBuildFramework[]>;
8 createResources(creationParameters: {
9 [key: string]: CIXInterfaces.ResourceCreationParameter;
10 }, project: string): Promise<CIXInterfaces.CreatedResources>;
11}
12export declare class CixApi extends basem.ClientApiBase implements ICixApi {
13 constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions);
14 /**
15 * Gets a list of existing configuration files for the given repository.
16 *
17 * @param {string} project - Project ID or project name
18 * @param {string} repositoryType - The type of the repository such as GitHub, TfsGit (i.e. Azure Repos), Bitbucket, etc.
19 * @param {string} repositoryId - The vendor-specific identifier or the name of the repository, e.g. Microsoft/vscode (GitHub) or e9d82045-ddba-4e01-a63d-2ab9f040af62 (Azure Repos)
20 * @param {string} branch - The repository branch where to look for the configuration file.
21 * @param {string} serviceConnectionId - If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TfsGit (i.e. Azure Repos).
22 */
23 getConfigurations(project: string, repositoryType?: string, repositoryId?: string, branch?: string, serviceConnectionId?: string): Promise<CIXInterfaces.ConfigurationFile[]>;
24 /**
25 * Creates a new Pipeline connection between the provider installation and the specified project. Returns the PipelineConnection object created.
26 *
27 * @param {CIXInterfaces.CreatePipelineConnectionInputs} createConnectionInputs
28 * @param {string} project
29 */
30 createProjectConnection(createConnectionInputs: CIXInterfaces.CreatePipelineConnectionInputs, project: string): Promise<CIXInterfaces.PipelineConnection>;
31 /**
32 * Returns a list of build frameworks that best match the given repository based on its contents.
33 *
34 * @param {string} project - Project ID or project name
35 * @param {string} repositoryType - The type of the repository such as GitHub, TfsGit (i.e. Azure Repos), Bitbucket, etc.
36 * @param {string} repositoryId - The vendor-specific identifier or the name of the repository, e.g. Microsoft/vscode (GitHub) or e9d82045-ddba-4e01-a63d-2ab9f040af62 (Azure Repos)
37 * @param {string} branch - The repository branch to detect build frameworks for.
38 * @param {CIXInterfaces.BuildFrameworkDetectionType} detectionType
39 * @param {string} serviceConnectionId - If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TfsGit (i.e. Azure Repos).
40 */
41 getDetectedBuildFrameworks(project: string, repositoryType?: string, repositoryId?: string, branch?: string, detectionType?: CIXInterfaces.BuildFrameworkDetectionType, serviceConnectionId?: string): Promise<CIXInterfaces.DetectedBuildFramework[]>;
42 /**
43 * @param {{ [key: string] : CIXInterfaces.ResourceCreationParameter; }} creationParameters
44 * @param {string} project - Project ID or project name
45 */
46 createResources(creationParameters: {
47 [key: string]: CIXInterfaces.ResourceCreationParameter;
48 }, project: string): Promise<CIXInterfaces.CreatedResources>;
49}