/** * Capability error codes are primarily based on gRPC error codes: * https://grpc.github.io/grpc/core/md_doc_statuscodes.html * Custom error codes specific to this project should start from 100 to avoid * conflicts with future gRPC codes. Note: 0 (OK) is intentionally excluded * because capability errors must always indicate a failure condition. */ export type ErrorCode = number; /** Sentinel for error code strings that are not recognised. */ export declare const UnrecognisedErrorCode = -1; /** Indicates the operation was canceled (typically by the caller). */ export declare const Canceled = 1; /** Unknown error. */ export declare const Unknown = 2; /** Client specified an invalid argument. */ export declare const InvalidArgument = 3; /** Operation expired before completion. */ export declare const DeadlineExceeded = 4; /** Some requested entity was not found. */ export declare const NotFound = 5; /** An attempt to create an entity failed because one already exists. */ export declare const AlreadyExists = 6; /** The caller does not have permission to execute the specified operation. */ export declare const PermissionDenied = 7; /** Some resource has been exhausted. */ export declare const ResourceExhausted = 8; /** Operation was rejected because the system is not in a state required for execution. */ export declare const FailedPrecondition = 9; /** The operation was aborted, typically due to a concurrency issue. */ export declare const Aborted = 10; /** Operation was attempted past the valid range. */ export declare const OutOfRange = 11; /** Operation is not implemented or not supported/enabled in this service. */ export declare const Unimplemented = 12; /** Some invariants expected by the underlying system have been broken. */ export declare const Internal = 13; /** The service is currently unavailable. */ export declare const Unavailable = 14; /** Unrecoverable data loss or corruption. */ export declare const DataLoss = 15; /** The request does not have valid authentication credentials. */ export declare const Unauthenticated = 16; /** Custom error codes not defined in the gRPC error space. */ /** Failure to reach consensus. */ export declare const ConsensusFailed = 100; /** A CRE limit breach has occurred. */ export declare const LimitExceeded = 101; /** Not enough observations to enable the operation to complete. */ export declare const InsufficientObservations = 102; /** Returns the string representation of the error code. */ export declare function errorCodeToStringValue(code: ErrorCode): string; /** Converts a string to an error code. */ export declare function fromErrorCodeString(str: string): ErrorCode;