File tree Expand file tree Collapse file tree
extensions/ql-vscode/src/mocks Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import { Repository } from '../remote-queries/gh-api/repository' ;
2+ import { VariantAnalysis , VariantAnalysisRepoTask } from '../remote-queries/gh-api/variant-analysis' ;
3+
4+ // Types that represent requests/responses from the GitHub API
5+ // that we need to mock.
6+
7+ export enum RequestKind {
8+ GetRepo = 'getRepo' ,
9+ SubmitVariantAnalysis = 'submitVariantAnalysis' ,
10+ GetVariantAnalysis = 'getVariantAnalysis' ,
11+ GetVariantAnalysisRepo = 'getVariantAnalysisRepo' ,
12+ GetVariantAnalysisRepoResult = 'getVariantAnalysisRepoResult' ,
13+ }
14+
15+ export interface GetRepoRequest {
16+ request : {
17+ kind : RequestKind . GetRepo
18+ } ,
19+ response : {
20+ status : number ,
21+ body : Repository
22+ }
23+ }
24+
25+ export interface GetVariantAnalysisRequest {
26+ request : {
27+ kind : RequestKind . GetVariantAnalysis
28+ } ,
29+ response : {
30+ status : number ,
31+ body : VariantAnalysis
32+ }
33+ }
34+
35+ export interface GetVariantAnalysisRepoRequest {
36+ request : {
37+ kind : RequestKind . GetVariantAnalysisRepo ,
38+ repositoryId : number
39+ } ,
40+ response : {
41+ status : number ,
42+ body : VariantAnalysisRepoTask
43+ }
44+ }
45+
46+ export interface GetVariantAnalysisRepoResultRequest {
47+ request : {
48+ kind : RequestKind . GetVariantAnalysisRepoResult ,
49+ repositoryId : number
50+ } ,
51+ response : {
52+ status : number ,
53+ body : ArrayBuffer
54+ }
55+ }
You can’t perform that action at this time.
0 commit comments