/** * 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 * as t from "io-ts"; import { FiscalCode } from "./FiscalCode"; import { TimeToLiveSeconds } from "./TimeToLiveSeconds"; import { Timestamp } from "./Timestamp"; import { ServiceId } from "./ServiceId"; import { OrganizationFiscalCode } from "./OrganizationFiscalCode"; import { MessageCategory } from "./MessageCategory"; import { withDefault } from "@pagopa/ts-commons/lib/types"; import { MessageStatusAttributes } from "./MessageStatusAttributes"; // required attributes const EnrichedMessage1R = t.interface({ id: t.string, fiscal_code: FiscalCode, created_at: Timestamp, sender_service_id: ServiceId, service_name: t.string, organization_name: t.string, organization_fiscal_code: OrganizationFiscalCode, message_title: t.string }); // optional attributes const EnrichedMessage1O = t.partial({ time_to_live: TimeToLiveSeconds, category: MessageCategory, has_attachments: withDefault(t.boolean, false), has_precondition: withDefault(t.boolean, false) }); export const EnrichedMessage1 = t.exact( t.intersection([EnrichedMessage1R, EnrichedMessage1O], "EnrichedMessage1") ); export type EnrichedMessage1 = t.TypeOf; export const EnrichedMessage = t.intersection( [EnrichedMessage1, MessageStatusAttributes], "EnrichedMessage" ); export type EnrichedMessage = t.TypeOf;