import * as t from 'io-ts' ; import { DefaultUuid } from '@kbn/securitysolution-io-ts-types' ; import { DefaultCreateCommentsArray } from '../../common/default_create_comments_array' ; import { CreateCommentsArray } from '../../common/create_comment' ; import { Tags } from '../../common/tags' ; import { ItemId } from '../../common/item_id' ; import { EntriesArray } from '../../common/entries' ; import { NamespaceType } from '../../common/default_namespace' ; import { OsTypeArray , osTypeArrayOrUndefined } from '../../common/os_type' ; import { RequiredKeepUndefined } from '../../common/required_keep_undefined' ; import { description } from '../../common/description' ; import { list_id } from '../../common/list_id' ; import { name } from '../../common/name' ; import { exceptionListItemType } from '../../common/exception_list_item_type' ; import { meta } from '../../common/meta' ; import { namespace_type } from '../../common/namespace_type' ; import { tags } from '../../common/tags' ; import { nonEmptyEntriesArray } from '../../common/non_empty_entries_array' ; export const createExceptionListItemSchema = t . intersection ( [ t . exact ( t . type ( { description , entries : nonEmptyEntriesArray , list_id , name , type : exceptionListItemType , } ) ) , t . exact ( t . partial ( { comments : DefaultCreateCommentsArray , item_id : DefaultUuid , meta , namespace_type , os_types : osTypeArrayOrUndefined , tags , } ) ) , ] ) ; export type CreateExceptionListItemSchema = t . OutputOf < typeof createExceptionListItemSchema > ; export type CreateExceptionListItemSchemaDecoded = Omit < RequiredKeepUndefined < t . TypeOf < typeof createExceptionListItemSchema > > , 'tags' | 'item_id' | 'entries' | 'namespace_type' | 'comments' > & { comments : CreateCommentsArray ; tags : Tags ; item_id : ItemId ; entries : EntriesArray ; namespace_type : NamespaceType ; os_types : OsTypeArray ; } ;