@@ -12,19 +12,23 @@ const RepositoryService = {
12
12
vcsTypeList : string [ ] ,
13
13
projectFilter : string | undefined ,
14
14
repositoryFilter : string | undefined ,
15
- includeZeroFindingRepos = true ,
15
+ includeZeroFindingRepos : boolean ,
16
+ includeDeletedRepos : boolean ,
16
17
) : Promise <
17
18
AxiosResponse <
18
19
paths [ '/resc/v1/repositories/findings-metadata/' ] [ 'get' ] [ 'responses' ] [ '200' ] [ 'content' ] [ 'application/json' ]
19
20
>
20
21
> {
21
22
let queryParams = '' ;
22
- queryParams += QueryUtils . appendExplodArrayIf ( 'vcsprovider ' , vcsTypeList ) ;
23
+ queryParams += QueryUtils . appendExplodArrayIf ( 'vcs_provider ' , vcsTypeList ) ;
23
24
queryParams += QueryUtils . appendIf ( 'skip' , skipRowCount ) ;
24
25
queryParams += QueryUtils . appendIf ( 'limit' , perPage ) ;
25
- queryParams += QueryUtils . appendIf ( 'projectfilter' , projectFilter ) ;
26
- queryParams += QueryUtils . appendIf ( 'repositoryfilter' , repositoryFilter ) ;
27
- queryParams += QueryUtils . appendBool ( 'onlyifhasfindings' , includeZeroFindingRepos === false ) ;
26
+ queryParams += QueryUtils . appendIf ( 'project_filter' , projectFilter ) ;
27
+ queryParams += QueryUtils . appendIf ( 'repository_filter' , repositoryFilter ) ;
28
+ queryParams += QueryUtils . appendBool ( 'only_if_has_findings' , includeZeroFindingRepos === false ) ;
29
+ if ( includeDeletedRepos ) {
30
+ queryParams += QueryUtils . appendBool ( 'include_deleted_repositories' , includeDeletedRepos ) ;
31
+ }
28
32
if ( queryParams ) {
29
33
queryParams = queryParams . slice ( 1 ) ;
30
34
}
@@ -53,16 +57,20 @@ const RepositoryService = {
53
57
async getDistinctProjects (
54
58
vcsTypeList : string [ ] ,
55
59
repositoryFilter : string | undefined ,
56
- includeZeroFindingRepos = true ,
60
+ includeZeroFindingRepos : boolean ,
61
+ includeDeletedRepos : boolean ,
57
62
) : Promise <
58
63
AxiosResponse <
59
64
paths [ '/resc/v1/repositories/distinct-projects/' ] [ 'get' ] [ 'responses' ] [ '200' ] [ 'content' ] [ 'application/json' ]
60
65
>
61
66
> {
62
67
let queryParams = '' ;
63
- queryParams += QueryUtils . appendExplodArrayIf ( 'vcsprovider' , vcsTypeList ) ;
64
- queryParams += QueryUtils . appendIf ( 'repositoryfilter' , repositoryFilter ) ;
65
- queryParams += QueryUtils . appendBool ( 'onlyifhasfindings' , includeZeroFindingRepos === false ) ;
68
+ queryParams += QueryUtils . appendExplodArrayIf ( 'vcs_provider' , vcsTypeList ) ;
69
+ queryParams += QueryUtils . appendIf ( 'repository_filter' , repositoryFilter ) ;
70
+ queryParams += QueryUtils . appendBool ( 'only_if_has_findings' , includeZeroFindingRepos === false ) ;
71
+ if ( includeDeletedRepos ) {
72
+ queryParams += QueryUtils . appendBool ( 'include_deleted_repositories' , includeDeletedRepos ) ;
73
+ }
66
74
if ( queryParams ) {
67
75
queryParams = queryParams . slice ( 1 ) ;
68
76
}
@@ -73,16 +81,20 @@ const RepositoryService = {
73
81
async getDistinctRepositories (
74
82
vcsTypeList : string [ ] ,
75
83
projectFilter : string | undefined ,
76
- includeZeroFindingRepos = true ,
84
+ includeZeroFindingRepos : boolean ,
85
+ includeDeletedRepos : boolean ,
77
86
) : Promise <
78
87
AxiosResponse <
79
88
paths [ '/resc/v1/repositories/distinct-repositories/' ] [ 'get' ] [ 'responses' ] [ '200' ] [ 'content' ] [ 'application/json' ]
80
89
>
81
90
> {
82
91
let queryParams = '' ;
83
- queryParams += QueryUtils . appendExplodArrayIf ( 'vcsprovider' , vcsTypeList ) ;
84
- queryParams += QueryUtils . appendIf ( 'projectname' , projectFilter ) ;
85
- queryParams += QueryUtils . appendBool ( 'onlyifhasfindings' , includeZeroFindingRepos === false ) ;
92
+ queryParams += QueryUtils . appendExplodArrayIf ( 'vcs_provider' , vcsTypeList ) ;
93
+ queryParams += QueryUtils . appendIf ( 'project_name' , projectFilter ) ;
94
+ queryParams += QueryUtils . appendBool ( 'only_if_has_findings' , includeZeroFindingRepos === false ) ;
95
+ if ( includeDeletedRepos ) {
96
+ queryParams += QueryUtils . appendBool ( 'include_deleted_repositories' , includeDeletedRepos ) ;
97
+ }
86
98
if ( queryParams ) {
87
99
queryParams = queryParams . slice ( 1 ) ;
88
100
}
0 commit comments