aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/api/quality-profiles.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-web/src/main/js/api/quality-profiles.ts')
-rw-r--r--server/sonar-web/src/main/js/api/quality-profiles.ts21
1 files changed, 20 insertions, 1 deletions
diff --git a/server/sonar-web/src/main/js/api/quality-profiles.ts b/server/sonar-web/src/main/js/api/quality-profiles.ts
index 630effa1831..9ee43f3eabf 100644
--- a/server/sonar-web/src/main/js/api/quality-profiles.ts
+++ b/server/sonar-web/src/main/js/api/quality-profiles.ts
@@ -27,10 +27,29 @@ import {
RequestData
} from '../helpers/request';
+export interface Profile {
+ key: string;
+ name: string;
+ language: string;
+ languageName: string;
+ isInherited?: boolean;
+ parentKey?: string;
+ parentName?: string;
+ isDefault?: boolean;
+ activeRuleCount: number;
+ activeDeprecatedRuleCount: number;
+ rulesUpdatedAt?: string;
+ lastUsed?: string;
+ userUpdatedAt?: string;
+ organization: string;
+ isBuiltIn?: boolean;
+ projectCount?: number;
+}
+
export function searchQualityProfiles(data: {
organization?: string;
projectKey?: string;
-}): Promise<any> {
+}): Promise<Profile[]> {
return getJSON('/api/qualityprofiles/search', data).then(r => r.profiles);
}