@codacy/codacy-mcp
Version:
Codacy MCP server
98 lines (97 loc) • 4.56 kB
JavaScript
import { OpenAPI } from '../core/OpenAPI.js';
import { request as __request } from '../core/request.js';
export class SbomService {
/**
* Return a list of SBOM dependencies, used across the organization.
* @param provider Git provider* @param remoteOrganizationName Organization name on the Git provider* @param cursor Cursor to [specify a batch of results to request](https://docs.codacy.com/codacy-api/using-the-codacy-api/#using-pagination)* @param limit Maximum number of items to return* @param requestBody Request body with filters. * @returns SearchSbomDependenciesResponse Successful operation
* @throws ApiError
*/
static searchSbomDependencies(provider, remoteOrganizationName, cursor, limit = 100, requestBody, abortSignal) {
return __request(OpenAPI, {
method: 'POST',
url: '/organizations/{provider}/{remoteOrganizationName}/sbom/dependencies/search',
path: {
'provider': provider,
'remoteOrganizationName': remoteOrganizationName,
},
query: {
'cursor': cursor,
'limit': limit,
},
abortSignal,
body: requestBody,
mediaType: 'application/json',
errors: {
400: `Bad Request`,
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
500: `Internal Server Error`,
501: `Not Implemented`,
502: `Bad Gateway`,
},
});
}
/**
* Return a paginated list of repositories where a version of the specified SBOM dependency is used.
* @param provider Git provider* @param remoteOrganizationName Organization name on the Git provider* @param requestBody Request body with filters.* @param cursor Cursor to [specify a batch of results to request](https://docs.codacy.com/codacy-api/using-the-codacy-api/#using-pagination)* @param limit Maximum number of items to return * @returns SearchRepositoriesOfSbomDependencyResponse Successful operation
* @throws ApiError
*/
static searchRepositoriesOfSbomDependency(provider, remoteOrganizationName, requestBody, cursor, limit = 100, abortSignal) {
return __request(OpenAPI, {
method: 'POST',
url: '/organizations/{provider}/{remoteOrganizationName}/sbom/dependencies/repositories/search',
path: {
'provider': provider,
'remoteOrganizationName': remoteOrganizationName,
},
query: {
'cursor': cursor,
'limit': limit,
},
abortSignal,
body: requestBody,
mediaType: 'application/json',
errors: {
400: `Bad Request`,
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
500: `Internal Server Error`,
501: `Not Implemented`,
502: `Bad Gateway`,
},
});
}
/**
* Return a list of repositories with SBOM dependency information.
* @param provider Git provider* @param remoteOrganizationName Organization name on the Git provider* @param cursor Cursor to [specify a batch of results to request](https://docs.codacy.com/codacy-api/using-the-codacy-api/#using-pagination)* @param limit Maximum number of items to return* @param requestBody Request body with filters. * @returns SearchSbomRepositoriesResponse Successful operation
* @throws ApiError
*/
static searchSbomRepositories(provider, remoteOrganizationName, cursor, limit = 100, requestBody, abortSignal) {
return __request(OpenAPI, {
method: 'POST',
url: '/organizations/{provider}/{remoteOrganizationName}/sbom/repositories/search',
path: {
'provider': provider,
'remoteOrganizationName': remoteOrganizationName,
},
query: {
'cursor': cursor,
'limit': limit,
},
abortSignal,
body: requestBody,
mediaType: 'application/json',
errors: {
400: `Bad Request`,
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
500: `Internal Server Error`,
501: `Not Implemented`,
502: `Bad Gateway`,
},
});
}
}