types.d.ts 933 字节
Newer Older
T
Tomas Vik 已提交
1
/* eslint-disable camelcase */
2 3 4 5 6 7 8 9

/**
 * An issuable instance repesents one of these entities:
 *  - Merge Request
 *  - Issue
 *  - Epic
 *  - Snippet
 */
T
Tomas Vik 已提交
10 11 12 13 14 15
interface RestIssuable {
  id: number;
  iid: number;
  title: string;
  project_id: number;
  web_url: string;
16
  author: { name: string; avatar_url: string };
T
Tomas Vik 已提交
17
  sha?: string; // only present in MR, legacy logic uses the presence to decide issuable type
18 19 20
  references: {
    full: string; // e.g. "gitlab-org/gitlab#219925"
  };
T
Tomas Vik 已提交
21 22
}

23
interface RestMrVersion {
T
Tomas Vik 已提交
24 25
  head_commit_sha: string;
  base_commit_sha: string;
26 27 28 29
  diffs: RestDiffFile[];
}

interface RestDiffFile {
T
Tomas Vik 已提交
30 31 32 33 34 35 36 37 38 39
  new_path: string;
  old_path: string;
  deleted_file: boolean;
  new_file: boolean;
  renamed_file: boolean;
}

interface VsProject {
  label: string;
  uri: string;
40
  error?: boolean;
T
Tomas Vik 已提交
41 42 43 44 45 46 47 48 49 50
}

interface RestVulnerability {
  location?: {
    file: string;
  };
  web_url: string;
  severity: string;
  name: string;
}