/** * Importing npm packages */ /** * Importing user defined packages */ /** * Defining types */ export declare enum ErrorType { /*! * Below error types need to be removed in the next major version */ CLIENT_ERROR = "CLIENT_ERROR", HTTP_ERROR = "HTTP_ERROR", UNAUTHORIZED = "UNAUTHORIZED", SERVER_ERROR = "SERVER_ERROR", /** The operation failed because the request syntax or command structure was malformed */ INVALID_REQUEST = "INVALID_REQUEST", /** An external dependency (network, database, file system, API) failed to complete the operation */ IO_ERROR = "IO_ERROR", /** The requested resource or identifier could not be located in the system */ NOT_FOUND = "NOT_FOUND", /** The operation requires an established identity, but no valid credentials were provided */ UNAUTHENTICATED = "UNAUTHENTICATED", /** The authenticated identity lacks the necessary privileges or roles to perform this operation */ PERMISSION_DENIED = "PERMISSION_DENIED", /** The input parameters are syntactically correct but violate specific business rules or data constraints */ VALIDATION_ERROR = "VALIDATION_ERROR", /** An unexpected condition, configuration defect, or logic bug prevented the system from fulfilling the request */ INTERNAL_ERROR = "INTERNAL_ERROR", /** The operation is valid in isolation but cannot be performed due to the current state of the target resource */ CONFLICT = "CONFLICT" } /** * Declaring the constants */ export declare class ErrorCode { private readonly code; private readonly type; private readonly msg; protected constructor(code: string, type: ErrorType, msg: string); getCode(): string; getType(): ErrorType; getMessage(): string; /** Unknown Error */ static readonly UNKNOWN: ErrorCode; /** Unexpected Error */ static readonly UNEXPECTED: ErrorCode; /** Validation Error */ static readonly VALIDATION_ERROR: ErrorCode; /** * Flow Manager and Registry System Errors */ /** The state '{targetState}' is not defined in the flow '{flowName}'. Check your flow definition. */ static readonly UNKNOWN_FLOW_STATE: ErrorCode; /** Invalid Transition: Cannot move from '{currentState}' to '{targetState}' in flow '{flowName}'. Allowed transitions: [{allowed}]. */ static readonly INVALID_FLOW_TRANSITION: ErrorCode; /** Cannot initialize FlowManager. The provided definition is missing or invalid for flow '{flowName}'. */ static readonly MISSING_FLOW_DEFINITION: ErrorCode; /** Transition prevented: The guard condition (onLeave) failed when trying to leave '{currentState}' for '{targetState}'. */ static readonly FLOW_GUARD_VIOLATION: ErrorCode; /** Flow execution stopped because it exceeded the maximum recursion depth of {maxDepth}. Check for infinite loops in your actions. */ static readonly FLOW_MAX_DEPTH_EXCEEDED: ErrorCode; /** Cannot load snapshot. The snapshot is for flow '{snapshotFlowName}', but the manager was initialized with definition '{currentFlowName}'. */ static readonly FLOW_SNAPSHOT_MISMATCH: ErrorCode; static readonly FLOW_ALREADY_REGISTERED: ErrorCode; /** Flow definition '{flowName}' is not registered in the FlowRegistry. Cannot retrieve unregistered flows. */ static readonly FLOW_NOT_REGISTERED: ErrorCode; /** Cannot restore FlowManager from snapshot. The provided snapshot is invalid or corrupted. */ static readonly FLOW_SNAPSHOT_INVALID: ErrorCode; }