import * as t from 'io-ts' ; import { NamespaceType } from '../../common/default_namespace' ; import { DefaultUpdateCommentsArray } from '../../common/default_update_comments_array' ; import { EntriesArray } from '../../common/entries' ; import { exceptionListItemType } from '../../common/exception_list_item_type' ; import { nonEmptyEntriesArray } from '../../common/non_empty_entries_array' ; import { OsTypeArray , osTypeArrayOrUndefined } from '../../common/os_type' ; import { RequiredKeepUndefined } from '../../common/required_keep_undefined' ; import { Tags , tags } from '../../common/tags' ; import { UpdateCommentsArray } from '../../common/update_comment' ; import { description } from '../../common/description' ; import { name } from '../../common/name' ; import { _version } from '../../common/underscore_version' ; import { id } from '../../common/id' ; import { meta } from '../../common/meta' ; import { namespace_type } from '../../common/namespace_type' ; export const updateExceptionListItemSchema = t . intersection ( [ t . exact ( t . type ( { description , entries : nonEmptyEntriesArray , name , type : exceptionListItemType , } ) ) , t . exact ( t . partial ( { _version , comments : DefaultUpdateCommentsArray , id , item_id : t . union ( [ t . string , t . undefined ] ) , meta , namespace_type , os_types : osTypeArrayOrUndefined , tags , } ) ) , ] ) ; export type UpdateExceptionListItemSchema = t . OutputOf < typeof updateExceptionListItemSchema > ; export type UpdateExceptionListItemSchemaDecoded = Omit < RequiredKeepUndefined < t . TypeOf < typeof updateExceptionListItemSchema > > , 'tags' | 'entries' | 'namespace_type' | 'comments' | 'os_types' > & { comments : UpdateCommentsArray ; tags : Tags ; entries : EntriesArray ; namespace_type : NamespaceType ; os_types : OsTypeArray ; } ;