/** * Do not edit this file it is auto-generated by io-utils / gen-api-models. * See https://github.com/pagopa/io-utils */ /* tslint:disable */ import * as t from "io-ts"; import { ServicePayload } from "./ServicePayload"; import { ServiceId } from "./ServiceId"; import { FiscalCode } from "./FiscalCode"; import { MaxAllowedPaymentAmount } from "./MaxAllowedPaymentAmount"; /** * A service tied to user's subscription. */ // required attributes const Service2R = t.interface({ service_id: ServiceId, authorized_recipients: t.readonlyArray(FiscalCode, "array of FiscalCode") }); // optional attributes const Service2O = t.partial({ id: t.string, max_allowed_payment_amount: MaxAllowedPaymentAmount }); export const Service2 = t.exact( t.intersection([Service2R, Service2O], "Service2") ); export type Service2 = t.TypeOf; export const Service = t.intersection([ServicePayload, Service2], "Service"); export type Service = t.TypeOf;