/** * 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 { withDefault } from "italia-ts-commons/lib/types"; import * as t from "io-ts"; /** * Describes the citizen's profile, mostly interesting for preferences * attributes. */ /** * All the notification channels blocked by the user. * Each channel is related to a specific service (sender). */ // additional attributes export const ExtendedProfileBlocked_inbox_or_channels = t.dictionary( t.string, t.readonlyArray(t.string, "array of string"), "ExtendedProfileBlocked_inbox_or_channels" ); export type ExtendedProfileBlocked_inbox_or_channels = t.TypeOf< typeof ExtendedProfileBlocked_inbox_or_channels >; // required attributes const ExtendedProfileR = t.interface({ is_inbox_enabled: t.boolean, is_webhook_enabled: t.boolean, is_email_enabled: t.boolean, is_email_validated: t.boolean, version: t.Integer }); // optional attributes const ExtendedProfileO = t.partial({ email: EmailAddress, blocked_inbox_or_channels: ExtendedProfileBlocked_inbox_or_channels, preferred_languages: t.readonlyArray(t.string, "array of string"), accepted_tos_version: t.number, is_test_profile: withDefault(t.boolean, false) }); export const ExtendedProfile = t.exact( t.intersection([ExtendedProfileR, ExtendedProfileO], "ExtendedProfile") ); export type ExtendedProfile = t.TypeOf;