[Security Solution] Migrate lists plugin API to versioned router (#165160)

Closes https://github.com/elastic/security-team/issues/7176
This commit is contained in:
Marshall Main 2023-08-31 07:48:01 -07:00 committed by GitHub
parent deebbadc2d
commit 21879be883
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
47 changed files with 2289 additions and 1995 deletions

View file

@ -581,6 +581,7 @@ export const getExceptionFilterFromExceptionListIds = async ({
}: GetExceptionFilterFromExceptionListIdsProps): Promise<ExceptionFilterResponse> =>
http.fetch(INTERNAL_EXCEPTION_FILTER, {
method: 'POST',
version: '1',
body: JSON.stringify({
exception_list_ids: exceptionListIds,
type: 'exception_list_ids',
@ -609,6 +610,7 @@ export const getExceptionFilterFromExceptions = async ({
}: GetExceptionFilterFromExceptionsProps): Promise<ExceptionFilterResponse> =>
http.fetch(INTERNAL_EXCEPTION_FILTER, {
method: 'POST',
version: '1',
body: JSON.stringify({
exceptions,
type: 'exception_items',

View file

@ -117,6 +117,7 @@ const findListsBySize = async ({
}: ApiParams & FindListSchemaEncoded): Promise<FoundListsBySizeSchema> => {
return http.fetch(`${INTERNAL_FIND_LISTS_BY_SIZE}`, {
method: 'GET',
version: '1',
query: {
cursor,
page,
@ -272,6 +273,7 @@ export { readListIndexWithValidation as readListIndex };
// TODO add types and validation
export const readListPrivileges = async ({ http, signal }: ApiParams): Promise<unknown> =>
http.fetch<unknown>(LIST_PRIVILEGES_URL, {
version: '2023-10-31',
method: 'GET',
signal,
});