import { API_ERROR_CODES } from './catalog_api'; import { BASE_ERROR_CODES } from './catalog_base'; import { CatalogDetails } from './catalog_types'; /** All valid error code constants (base + API). Use with `error.is()` and factory methods. */ export declare const ERROR_CODES: { FORBIDDEN_CONTACT: API_ERROR_CODES.FORBIDDEN_CONTACT; HORIZONTAL_BULK_MESSAGING_ATTACHMENTS_TOO_LARGE: API_ERROR_CODES.HORIZONTAL_BULK_MESSAGING_ATTACHMENTS_TOO_LARGE; HORIZONTAL_CLAIM_POLICY_COMMUNITY_MISMATCH: API_ERROR_CODES.HORIZONTAL_CLAIM_POLICY_COMMUNITY_MISMATCH; HORIZONTAL_CLAIM_CONTACT_ALREADY_LINKED: API_ERROR_CODES.HORIZONTAL_CLAIM_CONTACT_ALREADY_LINKED; HORIZONTAL_CLAIM_CLOSED_BEFORE_OPENED: API_ERROR_CODES.HORIZONTAL_CLAIM_CLOSED_BEFORE_OPENED; TICKETING_TASK_CLAIM_SUBREF_NOT_ALLOWED: API_ERROR_CODES.TICKETING_TASK_CLAIM_SUBREF_NOT_ALLOWED; TICKETING_TASK_CLAIM_ALREADY_ASSOCIATED: API_ERROR_CODES.TICKETING_TASK_CLAIM_ALREADY_ASSOCIATED; VALIDATION: BASE_ERROR_CODES.VALIDATION; BAD_REQUEST: BASE_ERROR_CODES.BAD_REQUEST; AUTHENTICATION: BASE_ERROR_CODES.AUTHENTICATION; UNAUTHORIZED: BASE_ERROR_CODES.UNAUTHORIZED; NOT_FOUND: BASE_ERROR_CODES.NOT_FOUND; NOT_ACCEPTABLE: BASE_ERROR_CODES.NOT_ACCEPTABLE; CONFLICT: BASE_ERROR_CODES.CONFLICT; GONE: BASE_ERROR_CODES.GONE; UNPROCESSABLE_ENTITY: BASE_ERROR_CODES.UNPROCESSABLE_ENTITY; MANDATORY_FIELD: BASE_ERROR_CODES.MANDATORY_FIELD; INTERNAL_SERVER_ERROR: BASE_ERROR_CODES.INTERNAL_SERVER_ERROR; BAD_GATEWAY: BASE_ERROR_CODES.BAD_GATEWAY; SERVICE_UNAVAILABLE: BASE_ERROR_CODES.SERVICE_UNAVAILABLE; }; /** Union of all valid error code strings. Derived from `ERROR_CODES` to stay in sync. */ export type ErrorCode = keyof typeof ERROR_CODES; /** * Strongly-typed `details` payload for a given error code `C`, resolved directly * from `ERRORS_CATALOG`. Adding a new catalog only requires updating `ERRORS_CATALOG`. * * @example * type ValidationDetails = ErrorDetails<'VALIDATION'> * // → { errors: Array<{ validation: string; code: string; message: string; path: string[] }> } */ export type ErrorDetails = CatalogDetails; /** Merged catalog of all error codes. Single runtime lookup table for `ElevaError` construction. */ export declare const ERRORS_CATALOG: { FORBIDDEN_CONTACT: { kind: import("./catalog_types").ErrorKind.DOMAIN; status: number; details: import("zod").ZodObject<{ contactId: import("zod").ZodString; }, "strip", import("zod").ZodTypeAny, { contactId: string; }, { contactId: string; }>; message: string; }; HORIZONTAL_BULK_MESSAGING_ATTACHMENTS_TOO_LARGE: { kind: import("./catalog_types").ErrorKind.DOMAIN; status: number; details: import("zod").ZodObject<{ maxBytes: import("zod").ZodNumber; totalBytes: import("zod").ZodNumber; }, "strip", import("zod").ZodTypeAny, { maxBytes: number; totalBytes: number; }, { maxBytes: number; totalBytes: number; }>; message: string; }; HORIZONTAL_CLAIM_POLICY_COMMUNITY_MISMATCH: { kind: import("./catalog_types").ErrorKind.DOMAIN; status: number; details: import("zod").ZodObject<{ policyId: import("zod").ZodString; communityId: import("zod").ZodString; }, "strip", import("zod").ZodTypeAny, { policyId: string; communityId: string; }, { policyId: string; communityId: string; }>; message: string; }; HORIZONTAL_CLAIM_CONTACT_ALREADY_LINKED: { kind: import("./catalog_types").ErrorKind.DOMAIN; status: number; details: import("zod").ZodObject<{ claimId: import("zod").ZodString; contactId: import("zod").ZodString; }, "strip", import("zod").ZodTypeAny, { contactId: string; claimId: string; }, { contactId: string; claimId: string; }>; message: string; }; HORIZONTAL_CLAIM_CLOSED_BEFORE_OPENED: { kind: import("./catalog_types").ErrorKind.DOMAIN; status: number; details: import("zod").ZodObject<{ openedAt: import("zod").ZodString; closedAt: import("zod").ZodString; }, "strip", import("zod").ZodTypeAny, { openedAt: string; closedAt: string; }, { openedAt: string; closedAt: string; }>; message: string; }; TICKETING_TASK_CLAIM_SUBREF_NOT_ALLOWED: { kind: import("./catalog_types").ErrorKind.DOMAIN; status: number; details: import("zod").ZodObject<{ taskId: import("zod").ZodString; refId: import("zod").ZodString; }, "strip", import("zod").ZodTypeAny, { taskId: string; refId: string; }, { taskId: string; refId: string; }>; message: string; }; TICKETING_TASK_CLAIM_ALREADY_ASSOCIATED: { kind: import("./catalog_types").ErrorKind.DOMAIN; status: number; details: import("zod").ZodObject<{ taskId: import("zod").ZodString; refId: import("zod").ZodString; }, "strip", import("zod").ZodTypeAny, { taskId: string; refId: string; }, { taskId: string; refId: string; }>; message: string; }; VALIDATION: { kind: import("./catalog_types").ErrorKind.DOMAIN; status: number; details: import("zod").ZodObject<{ errors: import("zod").ZodArray; }, "strip", import("zod").ZodTypeAny, { code: string; message: string; path: string[]; validation: string; }, { code: string; message: string; path: string[]; validation: string; }>, "many">; }, "strip", import("zod").ZodTypeAny, { errors: { code: string; message: string; path: string[]; validation: string; }[]; }, { errors: { code: string; message: string; path: string[]; validation: string; }[]; }>; message: string; }; BAD_REQUEST: { kind: import("./catalog_types").ErrorKind.DOMAIN; status: number; details: import("zod").ZodObject<{ field: import("zod").ZodOptional; reason: import("zod").ZodOptional; }, "strip", import("zod").ZodTypeAny, { field?: string | undefined; reason?: string | undefined; }, { field?: string | undefined; reason?: string | undefined; }>; message: string; }; AUTHENTICATION: { kind: import("./catalog_types").ErrorKind.DOMAIN; status: number; details: import("zod").ZodObject<{ reason: import("zod").ZodOptional; }, "strip", import("zod").ZodTypeAny, { reason?: string | undefined; }, { reason?: string | undefined; }>; message: string; }; UNAUTHORIZED: { kind: import("./catalog_types").ErrorKind.DOMAIN; status: number; details: import("zod").ZodObject<{ requiredScope: import("zod").ZodOptional; resource: import("zod").ZodOptional; }, "strip", import("zod").ZodTypeAny, { requiredScope?: string | undefined; resource?: string | undefined; }, { requiredScope?: string | undefined; resource?: string | undefined; }>; message: string; }; NOT_FOUND: { kind: import("./catalog_types").ErrorKind.DOMAIN; status: number; details: import("zod").ZodObject<{ entity: import("zod").ZodOptional; }, "strip", import("zod").ZodTypeAny, { entity?: string | undefined; }, { entity?: string | undefined; }>; message: string; }; NOT_ACCEPTABLE: { kind: import("./catalog_types").ErrorKind.DOMAIN; status: number; details: import("zod").ZodObject<{ acceptedTypes: import("zod").ZodOptional>; }, "strip", import("zod").ZodTypeAny, { acceptedTypes?: string[] | undefined; }, { acceptedTypes?: string[] | undefined; }>; message: string; }; CONFLICT: { kind: import("./catalog_types").ErrorKind.DOMAIN; status: number; details: import("zod").ZodArray, "many">; message: string; }; GONE: { kind: import("./catalog_types").ErrorKind.DOMAIN; status: number; details: import("zod").ZodObject<{ since: import("zod").ZodOptional; }, "strip", import("zod").ZodTypeAny, { since?: string | undefined; }, { since?: string | undefined; }>; message: string; }; UNPROCESSABLE_ENTITY: { kind: import("./catalog_types").ErrorKind.DOMAIN; status: number; details: import("zod").ZodObject<{ field: import("zod").ZodOptional; reason: import("zod").ZodOptional; }, "strip", import("zod").ZodTypeAny, { field?: string | undefined; reason?: string | undefined; }, { field?: string | undefined; reason?: string | undefined; }>; message: string; }; MANDATORY_FIELD: { kind: import("./catalog_types").ErrorKind.DOMAIN; status: number; details: import("zod").ZodObject<{ field: import("zod").ZodString; }, "strip", import("zod").ZodTypeAny, { field: string; }, { field: string; }>; message: string; }; INTERNAL_SERVER_ERROR: { kind: import("./catalog_types").ErrorKind.SYSTEM; status: number; details: import("zod").ZodObject<{ reason: import("zod").ZodOptional; }, "strip", import("zod").ZodTypeAny, { reason?: string | undefined; }, { reason?: string | undefined; }>; message: string; }; BAD_GATEWAY: { kind: import("./catalog_types").ErrorKind.SYSTEM; status: number; details: import("zod").ZodObject<{ upstream: import("zod").ZodOptional; }, "strip", import("zod").ZodTypeAny, { upstream?: string | undefined; }, { upstream?: string | undefined; }>; message: string; }; SERVICE_UNAVAILABLE: { kind: import("./catalog_types").ErrorKind.SYSTEM; status: number; details: import("zod").ZodObject<{ retryAfter: import("zod").ZodOptional; }, "strip", import("zod").ZodTypeAny, { retryAfter?: number | undefined; }, { retryAfter?: number | undefined; }>; message: string; }; }; //# sourceMappingURL=catalog.d.ts.map