/** * Generated by orval 🍺 * Do not edit manually. * Lincodex API * OpenAPI spec version: 0.1.0 */ import * as zod from 'zod'; export const contactDisclosureFieldsMax = 4; export const contactDisclosureFullNameOneMax = 200; export const contactDisclosureFullNameOneRegExp = new RegExp('^\\S(?:.*\\S)?$'); export const contactDisclosureEmailOneMin = 3; export const contactDisclosureEmailOneMax = 254; export const contactDisclosurePhoneOneMin = 8; export const contactDisclosurePhoneOneMax = 16; export const contactDisclosurePhoneOneRegExp = new RegExp('^\\+[1-9][0-9]{6,14}$'); export const contactDisclosureTelegramOneMin = 6; export const contactDisclosureTelegramOneMax = 33; export const contactDisclosureTelegramOneRegExp = new RegExp('^@[A-Za-z0-9_]{5,32}$'); export const ContactDisclosure = zod.object({ "invitation_id": zod.uuid().describe('Invitation whose acceptance created the grant.'), "grant_id": zod.uuid().describe('Grant that allows the read.'), "fields": zod.array(zod.enum(['full_name', 'email', 'phone', 'telegram']).describe('Kind of personal data that the consent C4 can disclose to one organization (PRD FR01 and FR12). The candidate selects each kind separately; one kind never implies another.\n\n- full_name: the full name from the profile.\n- email: the contact email address from the profile.\n- phone: the contact phone number from the profile.\n- telegram: the Telegram username from the profile.\n\nThe value formats are those of ContactDisclosure: a single-line full name of up to 200 characters, an E.164 phone number, and a Telegram username with the leading @. The profile contract (FR02, TASK-066) must store contacts in the same formats, so a disclosure never has to convert or drop a stored value. The FSP results of FR14, which need their own explicit permission, are planned as additional kinds. Adding a value is a contract change.')).min(1).max(contactDisclosureFieldsMax).describe('Contact fields that the grant covers.'), "granted_at": zod.iso.datetime({"offset":true}).describe('UTC instant in RFC 3339 format with the Z suffix, for example 2026-10-05T09:30:00Z. Servers always emit UTC. Every date-time field in this contract uses this schema.'), "full_name": zod.union([zod.string().min(1).max(contactDisclosureFullNameOneMax).regex(contactDisclosureFullNameOneRegExp).describe('Full name as the candidate wrote it in the profile. Plain text without line breaks; clients show it as text, never as HTML.'),zod.null()]), "email": zod.union([zod.email().min(contactDisclosureEmailOneMin).max(contactDisclosureEmailOneMax).describe('Account email address. The server compares addresses without regard to letter case and never reveals in a response whether an address belongs to an account.'),zod.null()]), "phone": zod.union([zod.string().min(contactDisclosurePhoneOneMin).max(contactDisclosurePhoneOneMax).regex(contactDisclosurePhoneOneRegExp).describe('Phone number in the E.164 format, for example +70000000000.'),zod.null()]), "telegram": zod.union([zod.string().min(contactDisclosureTelegramOneMin).max(contactDisclosureTelegramOneMax).regex(contactDisclosureTelegramOneRegExp).describe('Telegram username with the leading @.'),zod.null()]) }).describe('Contacts of the candidate that the organization may read through an active grant of this invitation. This is the only response that carries contact values, and it is separate from the terms and from the invitation. Each field the grant does not cover is null, and so is a covered field that the profile no longer holds. The response is never cached or stored by the server for later reads, so a revocation closes the next read at once. The value formats depend on the profile contract (FR02, TASK-066), which must store the same formats; see ContactFieldKind.') export type ContactDisclosure = zod.input; export type ContactDisclosureOutput = zod.output;