/** * 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 { IWithinRangeIntegerTag, WithinRangeInteger } from "@pagopa/ts-commons/lib/numbers"; import * as t from "io-ts"; import { withDefault } from "@pagopa/ts-commons/lib/types"; /** * This parameter specifies for how long (in seconds) the system will * try to deliver the message to the channels configured by the user. */ export type TimeToLiveSeconds = t.TypeOf; const TimeToLiveSecondsBase = t.union([ WithinRangeInteger<3600, 604800, IWithinRangeIntegerTag<3600, 604800>>( 3600, 604800 ), t.literal(604800) ]); export const TimeToLiveSeconds = withDefault( TimeToLiveSecondsBase, 3600 as TimeToLiveSeconds );