/** * Do not edit this file it is auto-generated by io-utils / gen-api-models. * See https://github.com/pagopa/io-utils */ /* eslint-disable */ import { ServiceId } from "./ServiceId"; import { withDefault } from "@pagopa/ts-commons/lib/types"; import * as t from "io-ts"; import { NonEmptyString } from "@pagopa/ts-commons/lib/strings"; // required attributes const LegalDataR = t.interface({ sender_mail_from: NonEmptyString, has_attachment: withDefault(t.boolean, false), message_unique_id: NonEmptyString }); // optional attributes const LegalDataO = t.partial({ original_message_url: NonEmptyString, pec_server_service_id: ServiceId }); export const LegalData = t.exact( t.intersection([LegalDataR, LegalDataO], "LegalData") ); export type LegalData = t.TypeOf;