/** * 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 { EmailAddress } from "./EmailAddress"; import { UserIdentityContract } from "./UserIdentityContract"; import { UserState } from "./UserState"; import * as t from "io-ts"; import { UTCISODateFromString } from "italia-ts-commons/lib/dates"; // required attributes const UserR = t.interface({}); // optional attributes const UserO = t.partial({ email: EmailAddress, id: t.string, identities: t.readonlyArray( UserIdentityContract, "array of UserIdentityContract" ), first_name: t.string, last_name: t.string, name: t.string, note: t.string, registration_date: UTCISODateFromString, state: UserState, type: t.string }); export const User = t.exact(t.intersection([UserR, UserO], "User")); export type User = t.TypeOf;