/** * 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 { FiscalCode } from "./FiscalCode"; import { TimeToLiveSeconds } from "./TimeToLiveSeconds"; import { Timestamp } from "./Timestamp"; import { MessageContent } from "./MessageContent"; import * as t from "io-ts"; import { NonEmptyString } from "@pagopa/ts-commons/lib/strings"; // required attributes const CreatedMessageWithContentR = t.interface({ id: t.string, fiscal_code: FiscalCode, created_at: Timestamp, content: MessageContent, sender_service_id: NonEmptyString }); // optional attributes const CreatedMessageWithContentO = t.partial({ time_to_live: TimeToLiveSeconds }); export const CreatedMessageWithContent = t.exact( t.intersection( [CreatedMessageWithContentR, CreatedMessageWithContentO], "CreatedMessageWithContent" ) ); export type CreatedMessageWithContent = t.TypeOf< typeof CreatedMessageWithContent >;