UNPKG

3.06 kBTypeScriptView Raw
1import basem = require('./ClientApiBases');
2import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces');
3import ProjectAnalysisInterfaces = require("./interfaces/ProjectAnalysisInterfaces");
4export interface IProjectAnalysisApi extends basem.ClientApiBase {
5 getProjectLanguageAnalytics(project: string): Promise<ProjectAnalysisInterfaces.ProjectLanguageAnalytics>;
6 getProjectActivityMetrics(project: string, fromDate: Date, aggregationType: ProjectAnalysisInterfaces.AggregationType): Promise<ProjectAnalysisInterfaces.ProjectActivityMetrics>;
7 getGitRepositoriesActivityMetrics(project: string, fromDate: Date, aggregationType: ProjectAnalysisInterfaces.AggregationType, skip: number, top: number): Promise<ProjectAnalysisInterfaces.RepositoryActivityMetrics[]>;
8 getRepositoryActivityMetrics(project: string, repositoryId: string, fromDate: Date, aggregationType: ProjectAnalysisInterfaces.AggregationType): Promise<ProjectAnalysisInterfaces.RepositoryActivityMetrics>;
9}
10export declare class ProjectAnalysisApi extends basem.ClientApiBase implements IProjectAnalysisApi {
11 constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions);
12 static readonly RESOURCE_AREA_ID = "7658fa33-b1bf-4580-990f-fac5896773d3";
13 /**
14 * @param {string} project - Project ID or project name
15 */
16 getProjectLanguageAnalytics(project: string): Promise<ProjectAnalysisInterfaces.ProjectLanguageAnalytics>;
17 /**
18 * @param {string} project - Project ID or project name
19 * @param {Date} fromDate
20 * @param {ProjectAnalysisInterfaces.AggregationType} aggregationType
21 */
22 getProjectActivityMetrics(project: string, fromDate: Date, aggregationType: ProjectAnalysisInterfaces.AggregationType): Promise<ProjectAnalysisInterfaces.ProjectActivityMetrics>;
23 /**
24 * Retrieves git activity metrics for repositories matching a specified criteria.
25 *
26 * @param {string} project - Project ID or project name
27 * @param {Date} fromDate - Date from which, the trends are to be fetched.
28 * @param {ProjectAnalysisInterfaces.AggregationType} aggregationType - Bucket size on which, trends are to be aggregated.
29 * @param {number} skip - The number of repositories to ignore.
30 * @param {number} top - The number of repositories for which activity metrics are to be retrieved.
31 */
32 getGitRepositoriesActivityMetrics(project: string, fromDate: Date, aggregationType: ProjectAnalysisInterfaces.AggregationType, skip: number, top: number): Promise<ProjectAnalysisInterfaces.RepositoryActivityMetrics[]>;
33 /**
34 * @param {string} project - Project ID or project name
35 * @param {string} repositoryId
36 * @param {Date} fromDate
37 * @param {ProjectAnalysisInterfaces.AggregationType} aggregationType
38 */
39 getRepositoryActivityMetrics(project: string, repositoryId: string, fromDate: Date, aggregationType: ProjectAnalysisInterfaces.AggregationType): Promise<ProjectAnalysisInterfaces.RepositoryActivityMetrics>;
40}