declare const ERROR_CODES: { readonly GENERIC_ERROR: readonly ["Something is wrong", "500 Internal Server Error"]; readonly MISSING_FIELD: readonly ["Field is missing", "400 Bad Request"]; readonly VALIDATION_ERROR: readonly ["Message failed validation", "400 Bad Request"]; readonly INVALID_MESSAGE: readonly ["Invalid message or invalid message format", "400 Bad Request"]; readonly NOT_SUPPORTED_ENUM_VALUE: readonly ["Enum value not supported", "400 Bad Request"]; readonly NOT_AUTHORISED: readonly ["Not authorised", "403 Forbidden"]; readonly DUPLICATE_KEY: readonly ["Record conflicts with unique index already stored in the database", "500 Internal Server Error"]; readonly INVALID_MESSAGE_TYPE: readonly ["Invalid message type", "400 Bad Request"]; readonly INVALID_DATASOURCE: readonly ["Invalid DATASOURCE_NAME", "400 Bad Request"]; readonly INVALID_PARAMETER: readonly ["MOVING_VIEW can't be true if maxView is set to 0", "400 Bad Request"]; readonly LOGIN_ERROR: readonly ["There was a problem logging in to the SOAP WebService", "401 Unauthorized"]; readonly MULTIPLE_TABLES: readonly ["Only one table can be referred", "500 Internal Server Error"]; readonly MISSING_KEY: readonly ["Key name must be provided", "400 Bad Request"]; readonly UNKNOWN_TABLE: readonly ["No such table", "400 Bad Request"]; readonly UNKNOWN_FIELD: readonly ["No such field on table", "400 Bad Request"]; readonly UNKNOWN: readonly ["Unknown error", "500 Internal Server Error"]; readonly NO_MESSAGE_TYPE: readonly ["No message type provided", "400 Bad Request"]; readonly NO_SOURCE_REF: readonly ["No source ref provided", "400 Bad Request"]; readonly NO_USER_NAME: readonly ["No user name provided", "400 Bad Request"]; readonly UNAVAILABLE: readonly ["Process is currently unavailable", "503 Service Unavailable"]; readonly UNKNOWN_MESSAGE_TYPE: readonly ["Message type not supported", "400 Bad Request"]; readonly FEATURE_NOT_PROVIDED: readonly ["Feature not provided", "400 Bad Request"]; readonly FEATURE_NOT_FOUND: readonly ["Feature not found", "404 Not Found"]; readonly JSON_SCHEMA_NOT_FOUND: readonly ["JSON schema not found", "404 Not Found"]; readonly REJECT_RULE_DOES_NOT_EXIST: readonly ["Failed to find Dynamic Rule", "404 Not Found"]; readonly ERROR_CHECKING_EXISTING_RULE: readonly ["Error while checking for rule", "400 Bad Request"]; readonly NO_DS_NAME: readonly ["No data source provided", "400 Bad Request"]; readonly INVALID_DS_NAME: readonly ["Data source does not exist", "404 Not Found"]; readonly INVALID_INDEX: readonly ["Invalid index", "400 Bad Request"]; readonly REJECT_RULE_MISSING: readonly ["Rule does not exist", "404 Not Found"]; readonly ERROR_MODIFYING_RULE: readonly ["Error encountered trying to modify rule", "500 Internal Server Error"]; readonly INVALID_CRITERIA: readonly ["Criteria has failed validation", "400 Bad Request"]; readonly MAX_LOGON_LIMIT: readonly ["Tried to connect too many times", "429 Too Many Requests"]; readonly RECORD_NOT_FOUND: readonly ["No record found for given key data", "404 Not Found"]; readonly SERVICE_NOT_FOUND: readonly ["No service found", "404 Not Found"]; readonly DATABASE_FAILURE: readonly ["There was an internal database error", "500 Internal Server Error"]; readonly DATABASE_ERROR: readonly ["Database error", "500 Internal Server Error"]; readonly OPERATION_TIMEOUT: readonly ["Server timed out", "408 Request Timeout"]; readonly DEPENDENT_RECORD_FOUND: readonly ["Dependency found on other records for changed value(s)", "500 Internal Server Error"]; readonly REQUIRES_APPROVAL: readonly ["Transaction requires approval", "403 Forbidden"]; readonly APPROVAL_MESSAGE_MISSING: readonly ["Transaction requires approval, but the approval message is missing", "400 Bad Request"]; readonly INTERNAL_ERROR: readonly ["Unexpected server error", "500 Internal Server Error"]; readonly GATEWAY_ERROR: readonly ["Notify gateway error", "400 Bad Request"]; readonly REQUEST_FAILED: readonly ["Problem handling request", "400 Bad Request"]; readonly UNABLE_TO_UPDATE_APPROVAL: readonly ["Pending approval error, unable to update approval", "500 Internal Server Error"]; readonly APPROVAL_SAME_USER_CANNOT_ACCEPT: readonly ["Pending approval error, same user cannot accept", "400 Bad Request"]; readonly APPROVAL_RECORD_NOT_FOUND: readonly ["Pending approval record not found", "404 Not Found"]; readonly REJECTED_BY_SERVICE: readonly ["Pending approval rejected by service", "500 Internal Server Error"]; readonly APPROVAL_DIFF_USER_CANNOT_CANCEL: readonly ["Pending approval different user cannot cancel", "400 Bad Request"]; readonly APPROVAL_WRONG_STATUS_CANNOT_CANCEL: readonly ["Pending approval error, wrong status cannot cancel", "400 Bad Request"]; readonly APPROVAL_WRONG_STATUS_CANNOT_ACCEPT: readonly ["Pending approval error, wrong status cannot accept", "400 Bad Request"]; readonly APPROVAL_SAME_USER_CANNOT_REJECT: readonly ["Pending approval error, same user cannot reject", "400 Bad Request"]; readonly APPROVAL_WRONG_STATUS_CANNOT_REJECT: readonly ["Pending approval error, wrong status cannot reject", "400 Bad Request"]; readonly MISSING_HOSTNAME: readonly ["Missing hostname", "400 Bad Request"]; readonly NUMBER_OF_RECORDS_DOES_NOT_MATCH: readonly ["Event nack, Number of keys and records does not match", "400 Bad Request"]; readonly OPTIMISTIC_CONCURRENCY_ERROR: readonly ["Optimistic concurrency error", "400 Bad Request"]; }; export type ErrorCodeName = keyof typeof ERROR_CODES; export declare const ErrorCode: { readonly [Name in ErrorCodeName]: Name; }; export declare function statusCodeFor(code: string): string; export declare function defaultTextFor(code: string): string | undefined; export type GenesisErrorType = 'StandardError' | 'FieldError' | 'TableStandardError' | 'LoginError' | 'PasswordValidationError'; export interface NackErrorInput { '@type'?: GenesisErrorType; CODE?: string; code?: string; TEXT?: string; text?: string; STATUS_CODE?: string; statusCode?: string; FIELD?: string; field?: string; PATH?: string | null; path?: string | null; TABLE?: string; table?: string; } export interface NackErrorEntry { '@type'?: GenesisErrorType; CODE: string; TEXT: string; STATUS_CODE?: string; FIELD?: string | null; PATH?: string | null; TABLE?: string | null; DETAILS?: null; } export declare function toNackEntry(input: NackErrorInput): NackErrorEntry; export declare function toLegacyNackEntry(input: NackErrorInput): NackErrorEntry; export interface NackErrorOptions { warnings?: NackErrorInput | NackErrorInput[]; messageType?: string; } export declare class NackError extends Error { readonly errors: NackErrorEntry[]; readonly warnings: NackErrorEntry[]; readonly inputs: readonly NackErrorInput[]; readonly warningInputs: readonly NackErrorInput[]; readonly messageType: string | undefined; constructor(errors: string | NackErrorInput | NackErrorInput[], options?: NackErrorOptions); static field(field: string, text: string, path?: string | null, code?: string): NackError; static standard(code: string, text?: string): NackError; static duplicateKey(table: string, index: string, value: unknown, text?: string): NackError; static recordNotFound(table: string, index?: string, text?: string): NackError; static nack(text: string): NackError; static warning(warnings: string | NackErrorInput | NackErrorInput[]): NackError; } export declare function nackPayload(error: unknown, legacy: boolean): { ERROR: NackErrorEntry[]; WARNING?: NackErrorEntry[]; }; export declare function warningPayload(warnings: NackErrorInput[], legacy: boolean): { ERROR: NackErrorEntry[]; WARNING?: NackErrorEntry[]; }; export {};