/** * 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 * as t from "io-ts"; import { NonNegativeInteger } from "@pagopa/ts-commons/lib/numbers"; /** * Return the set of preferences of a Citizen for a given Service. * It's needed by Citizens to read previoulsy expressed preferences. */ /** * Define a set of required preferences of a Citizen for a given Service. * It's needed by Citizens to express how they want Services to get in touch with them. */ // required attributes const ServicePreference1R = t.interface({ is_email_enabled: t.boolean, is_inbox_enabled: t.boolean, is_webhook_enabled: t.boolean, settings_version: NonNegativeInteger }); // optional attributes const ServicePreference1O = t.partial({}); export const ServicePreference1 = t.exact( t.intersection( [ServicePreference1R, ServicePreference1O], "ServicePreference1" ) ); export type ServicePreference1 = t.TypeOf; // required attributes const ServicePreference2R = t.interface({ can_access_message_read_status: t.boolean }); // optional attributes const ServicePreference2O = t.partial({}); export const ServicePreference2 = t.exact( t.intersection( [ServicePreference2R, ServicePreference2O], "ServicePreference2" ) ); export type ServicePreference2 = t.TypeOf; export const ServicePreference = t.intersection( [ServicePreference1, ServicePreference2], "ServicePreference" ); export type ServicePreference = t.TypeOf;