import { z } from 'zod'; import { CatalogDetails, ErrorKind } from './catalog_types'; /** * ERP domain-specific error codes. Add here any code that does not fit * the generic HTTP categories in `BASE_ERROR_CODES`. */ export declare enum API_ERROR_CODES { FORBIDDEN_CONTACT = "FORBIDDEN_CONTACT", CONTACTS_PERSON_EMAIL_ALREADY_IN_USE = "CONTACTS_PERSON_EMAIL_ALREADY_IN_USE", CONTACTS_PERSON_PHONE_ALREADY_IN_USE = "CONTACTS_PERSON_PHONE_ALREADY_IN_USE", CONTACTS_PERSON_BRANCH_MAIN_CANNOT_BE_DELETED = "CONTACTS_PERSON_BRANCH_MAIN_CANNOT_BE_DELETED", CONTACTS_PERSON_BRANCH_CONTACT_NOT_FOUND = "CONTACTS_PERSON_BRANCH_CONTACT_NOT_FOUND", HORIZONTAL_BULK_MESSAGING_ATTACHMENTS_TOO_LARGE = "HORIZONTAL_BULK_MESSAGING_ATTACHMENTS_TOO_LARGE", HORIZONTAL_CLAIM_POLICY_COMMUNITY_MISMATCH = "HORIZONTAL_CLAIM_POLICY_COMMUNITY_MISMATCH", HORIZONTAL_CLAIM_CONTACT_ALREADY_LINKED = "HORIZONTAL_CLAIM_CONTACT_ALREADY_LINKED", HORIZONTAL_CLAIM_CLOSED_BEFORE_OPENED = "HORIZONTAL_CLAIM_CLOSED_BEFORE_OPENED", HORIZONTAL_PROPERTY_OWNER_REQUIRED = "HORIZONTAL_PROPERTY_OWNER_REQUIRED", HORIZONTAL_MEETING_AGENTS_REQUIRED = "HORIZONTAL_MEETING_AGENTS_REQUIRED", HORIZONTAL_MEETING_LAST_AGENT = "HORIZONTAL_MEETING_LAST_AGENT", HORIZONTAL_MEETING_RENEWAL_FORBIDDEN = "HORIZONTAL_MEETING_RENEWAL_FORBIDDEN", HORIZONTAL_MEETING_RENEWAL_ALREADY_ANSWERED = "HORIZONTAL_MEETING_RENEWAL_ALREADY_ANSWERED", HORIZONTAL_MEETING_RENEWAL_NOT_DUE = "HORIZONTAL_MEETING_RENEWAL_NOT_DUE", HORIZONTAL_MEETING_RENEWAL_INVALID_DATES = "HORIZONTAL_MEETING_RENEWAL_INVALID_DATES", HORIZONTAL_MEETING_RENEWAL_USE_DEDICATED_ENDPOINT = "HORIZONTAL_MEETING_RENEWAL_USE_DEDICATED_ENDPOINT", HORIZONTAL_MEETING_RENEWALS_REJECTED = "HORIZONTAL_MEETING_RENEWALS_REJECTED", TICKETING_TASK_CLAIM_SUBREF_NOT_ALLOWED = "TICKETING_TASK_CLAIM_SUBREF_NOT_ALLOWED", TICKETING_TASK_CLAIM_ALREADY_ASSOCIATED = "TICKETING_TASK_CLAIM_ALREADY_ASSOCIATED", INBOX_EMAIL_FILTERING_TLD_ALREADY_ADDED = "INBOX_EMAIL_FILTERING_TLD_ALREADY_ADDED", INBOX_EMAIL_FILTERING_TLD_ALREADY_ROUTED = "INBOX_EMAIL_FILTERING_TLD_ALREADY_ROUTED" } /** Maps every `API_ERROR_CODES` member to its catalog entry. */ export declare const API_ERRORS_CATALOG: { FORBIDDEN_CONTACT: { kind: ErrorKind.DOMAIN; status: number; details: z.ZodObject<{ /** UUID of the contact person the caller was denied access to. */ contactId: z.ZodString; }, "strip", z.ZodTypeAny, { contactId: string; }, { contactId: string; }>; message: string; }; CONTACTS_PERSON_EMAIL_ALREADY_IN_USE: { kind: ErrorKind.DOMAIN; status: number; details: z.ZodObject<{ email: z.ZodString; }, "strip", z.ZodTypeAny, { email: string; }, { email: string; }>; message: string; }; CONTACTS_PERSON_PHONE_ALREADY_IN_USE: { kind: ErrorKind.DOMAIN; status: number; details: z.ZodObject<{ phone: z.ZodString; }, "strip", z.ZodTypeAny, { phone: string; }, { phone: string; }>; message: string; }; CONTACTS_PERSON_BRANCH_MAIN_CANNOT_BE_DELETED: { kind: ErrorKind.DOMAIN; status: number; details: z.ZodObject<{ branchId: z.ZodString; }, "strip", z.ZodTypeAny, { branchId: string; }, { branchId: string; }>; message: string; }; CONTACTS_PERSON_BRANCH_CONTACT_NOT_FOUND: { kind: ErrorKind.DOMAIN; status: number; details: z.ZodObject<{ contactId: z.ZodString; }, "strip", z.ZodTypeAny, { contactId: string; }, { contactId: string; }>; message: string; }; HORIZONTAL_BULK_MESSAGING_ATTACHMENTS_TOO_LARGE: { kind: ErrorKind.DOMAIN; status: number; details: z.ZodObject<{ /** Maximum total size allowed for all attachments, in bytes. */ maxBytes: z.ZodNumber; /** Total size of the submitted attachments, in bytes. */ totalBytes: z.ZodNumber; }, "strip", z.ZodTypeAny, { maxBytes: number; totalBytes: number; }, { maxBytes: number; totalBytes: number; }>; message: string; }; HORIZONTAL_CLAIM_POLICY_COMMUNITY_MISMATCH: { kind: ErrorKind.DOMAIN; status: number; details: z.ZodObject<{ policyId: z.ZodString; communityId: z.ZodString; }, "strip", z.ZodTypeAny, { policyId: string; communityId: string; }, { policyId: string; communityId: string; }>; message: string; }; HORIZONTAL_CLAIM_CONTACT_ALREADY_LINKED: { kind: ErrorKind.DOMAIN; status: number; details: z.ZodObject<{ claimId: z.ZodString; contactId: z.ZodString; }, "strip", z.ZodTypeAny, { contactId: string; claimId: string; }, { contactId: string; claimId: string; }>; message: string; }; HORIZONTAL_CLAIM_CLOSED_BEFORE_OPENED: { kind: ErrorKind.DOMAIN; status: number; details: z.ZodObject<{ openedAt: z.ZodString; closedAt: z.ZodString; }, "strip", z.ZodTypeAny, { openedAt: string; closedAt: string; }, { openedAt: string; closedAt: string; }>; message: string; }; HORIZONTAL_PROPERTY_OWNER_REQUIRED: { kind: ErrorKind.DOMAIN; status: number; details: z.ZodObject<{ propertyId: z.ZodString; }, "strip", z.ZodTypeAny, { propertyId: string; }, { propertyId: string; }>; message: string; }; HORIZONTAL_MEETING_AGENTS_REQUIRED: { kind: ErrorKind.DOMAIN; status: number; details: z.ZodObject<{ meetingId: z.ZodString; }, "strip", z.ZodTypeAny, { meetingId: string; }, { meetingId: string; }>; message: string; }; HORIZONTAL_MEETING_LAST_AGENT: { kind: ErrorKind.DOMAIN; status: number; details: z.ZodObject<{ meetingId: z.ZodString; agentIds: z.ZodArray; }, "strip", z.ZodTypeAny, { meetingId: string; agentIds: string[]; }, { meetingId: string; agentIds: string[]; }>; message: string; }; HORIZONTAL_MEETING_RENEWAL_FORBIDDEN: { kind: ErrorKind.DOMAIN; status: number; details: z.ZodObject<{ meetingId: z.ZodString; }, "strip", z.ZodTypeAny, { meetingId: string; }, { meetingId: string; }>; message: string; }; HORIZONTAL_MEETING_RENEWAL_ALREADY_ANSWERED: { kind: ErrorKind.DOMAIN; status: number; details: z.ZodObject<{ meetingId: z.ZodString; }, "strip", z.ZodTypeAny, { meetingId: string; }, { meetingId: string; }>; message: string; }; HORIZONTAL_MEETING_RENEWAL_NOT_DUE: { kind: ErrorKind.DOMAIN; status: number; details: z.ZodObject<{ meetingId: z.ZodString; }, "strip", z.ZodTypeAny, { meetingId: string; }, { meetingId: string; }>; message: string; }; HORIZONTAL_MEETING_RENEWAL_INVALID_DATES: { kind: ErrorKind.DOMAIN; status: number; details: z.ZodObject<{ meetingId: z.ZodString; status: z.ZodString; }, "strip", z.ZodTypeAny, { status: string; meetingId: string; }, { status: string; meetingId: string; }>; message: string; }; HORIZONTAL_MEETING_RENEWAL_USE_DEDICATED_ENDPOINT: { kind: ErrorKind.DOMAIN; status: number; details: z.ZodObject<{ meetingId: z.ZodString; }, "strip", z.ZodTypeAny, { meetingId: string; }, { meetingId: string; }>; message: string; }; HORIZONTAL_MEETING_RENEWALS_REJECTED: { kind: ErrorKind.DOMAIN; status: number; details: z.ZodObject<{ failures: z.ZodArray; }, "strip", z.ZodTypeAny, { code: API_ERROR_CODES.HORIZONTAL_MEETING_RENEWAL_FORBIDDEN | API_ERROR_CODES.HORIZONTAL_MEETING_RENEWAL_ALREADY_ANSWERED | API_ERROR_CODES.HORIZONTAL_MEETING_RENEWAL_NOT_DUE | API_ERROR_CODES.HORIZONTAL_MEETING_RENEWAL_INVALID_DATES; meetingId: string; }, { code: API_ERROR_CODES.HORIZONTAL_MEETING_RENEWAL_FORBIDDEN | API_ERROR_CODES.HORIZONTAL_MEETING_RENEWAL_ALREADY_ANSWERED | API_ERROR_CODES.HORIZONTAL_MEETING_RENEWAL_NOT_DUE | API_ERROR_CODES.HORIZONTAL_MEETING_RENEWAL_INVALID_DATES; meetingId: string; }>, "many">; }, "strip", z.ZodTypeAny, { failures: { code: API_ERROR_CODES.HORIZONTAL_MEETING_RENEWAL_FORBIDDEN | API_ERROR_CODES.HORIZONTAL_MEETING_RENEWAL_ALREADY_ANSWERED | API_ERROR_CODES.HORIZONTAL_MEETING_RENEWAL_NOT_DUE | API_ERROR_CODES.HORIZONTAL_MEETING_RENEWAL_INVALID_DATES; meetingId: string; }[]; }, { failures: { code: API_ERROR_CODES.HORIZONTAL_MEETING_RENEWAL_FORBIDDEN | API_ERROR_CODES.HORIZONTAL_MEETING_RENEWAL_ALREADY_ANSWERED | API_ERROR_CODES.HORIZONTAL_MEETING_RENEWAL_NOT_DUE | API_ERROR_CODES.HORIZONTAL_MEETING_RENEWAL_INVALID_DATES; meetingId: string; }[]; }>; message: string; }; TICKETING_TASK_CLAIM_SUBREF_NOT_ALLOWED: { kind: ErrorKind.DOMAIN; status: number; details: z.ZodObject<{ taskId: z.ZodString; refId: z.ZodString; }, "strip", z.ZodTypeAny, { taskId: string; refId: string; }, { taskId: string; refId: string; }>; message: string; }; TICKETING_TASK_CLAIM_ALREADY_ASSOCIATED: { kind: ErrorKind.DOMAIN; status: number; details: z.ZodObject<{ taskId: z.ZodString; refId: z.ZodString; }, "strip", z.ZodTypeAny, { taskId: string; refId: string; }, { taskId: string; refId: string; }>; message: string; }; INBOX_EMAIL_FILTERING_TLD_ALREADY_ADDED: { kind: ErrorKind.DOMAIN; status: number; details: z.ZodObject<{ tld: z.ZodString; }, "strip", z.ZodTypeAny, { tld: string; }, { tld: string; }>; message: string; }; INBOX_EMAIL_FILTERING_TLD_ALREADY_ROUTED: { kind: ErrorKind.DOMAIN; status: number; details: z.ZodObject<{ tld: z.ZodString; }, "strip", z.ZodTypeAny, { tld: string; }, { tld: string; }>; message: string; }; }; /** * Strongly-typed `details` shape for a given `API_ERROR_CODES` member. * @example * type ForbiddenContactDetails = APIErrorDetails * // → { contactId: string } */ export type APIErrorDetails = CatalogDetails; //# sourceMappingURL=catalog_api.d.ts.map