* Separated out service layer for trusted apps. * Improved the type structure a bit to avoid using explicit string literals and to add possibility to return OS specific parts of trusted app object in type safe manner. * Added support for mapping of trusted app to exception item and back. * Changed schema to support signer in the API. * Renamed utils to mapping. * Exported some types in lists plugin and used them in trusted apps. * Added tests for mapping. * Added tests for service. * Switched deletion to use exceptions for not found case. * Added resetting of the mocks in service layer tests. * Added handlers tests. * Refactored mapping tests to be more granular based on the case. * Restored lowercasing of hash. * Added schema tests for signer field. * Removed the grouped tests (they were split into tests for separate concerns). * Corrected the tests. * Lowercased the hashes in the service test. * Moved the lowercasing to the right location. * Fixed the tests. * Added test for lowercasing hash value. * Introduced OperatingSystem enum instead of current types. * Removed os list constant in favour of separate lists in places that use it (each place has own needs to the ordering). * Fixed the missed OperatingSystem enum usage.
21 lines
929 B
TypeScript
21 lines
929 B
TypeScript
/*
|
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
* or more contributor license agreements. Licensed under the Elastic License;
|
|
* you may not use this file except in compliance with the Elastic License.
|
|
*/
|
|
|
|
import { PluginInitializerContext } from '../../../../src/core/server';
|
|
|
|
import { ConfigSchema } from './config';
|
|
import { ListPlugin } from './plugin';
|
|
|
|
// exporting these since its required at top level in siem plugin
|
|
export { ListClient } from './services/lists/list_client';
|
|
export { CreateExceptionListItemOptions } from './services/exception_lists/exception_list_client_types';
|
|
export { ExceptionListClient } from './services/exception_lists/exception_list_client';
|
|
export { ListPluginSetup } from './types';
|
|
|
|
export const config = { schema: ConfigSchema };
|
|
export const plugin = (initializerContext: PluginInitializerContext): ListPlugin =>
|
|
new ListPlugin(initializerContext);
|