import { ErrorCode } from "../gen/alerts/v1/price_alerts_pb.js"; import { ErrorCode as ErrorCode$1 } from "../gen/ledger/read/v1/ledger_read_pb.js"; import { ErrorCode as ErrorCode$2 } from "../gen/ai/v1/assistant_pb.js"; import { AuthErrorCode } from "../gen/auth/v1/auth_pb.js"; import { ProfileErrorCode } from "../gen/auth/v1/profile_pb.js"; import { ErrorCode as ErrorCode$3 } from "../gen/claims/v1/claims_pb.js"; import { ErrorCode as ErrorCode$4 } from "../gen/chain/withdraw/v1/withdraw_pb.js"; import { ErrorCode as ErrorCode$5 } from "../gen/marketoverview/v1/marketoverview_pb.js"; import { ErrorCode as ErrorCode$6 } from "../gen/transfer/v1/internal_transfer_pb.js"; import { OrderErrorDetail } from "../services/orders/order-errors.schemas.js"; import { RateLimitDetail } from "./rate-limit.schemas.js"; import { DescMessage, MessageShape } from "@bufbuild/protobuf"; import { ConnectError } from "@connectrpc/connect"; //#region src/shared/error-detail.d.ts type NamedCode> = keyof Enum; type PolyesterErrorDetail = { service: "auth"; code: NamedCode; message: string; } | { service: "profile"; code: NamedCode; field: string; message: string; } | ({ service: "orders"; } & OrderErrorDetail) | { service: "withdraw"; code: NamedCode; /** Request field the refusal concerns, such as `destinations[0].min_amount_e18`. */ fieldPath?: string; /** Least amount the destination accepts, as a decimal; with `MIN_AMOUNT_BELOW_FLOOR`. */ minFloor?: string; /** Epoch ms when a cooling-down destination can be paid; retry after it. */ payableFrom?: number; } | { service: "internal_transfer"; code: NamedCode; } | { service: "ledger"; code: NamedCode; } | { service: "market_overview"; code: NamedCode; } | { service: "claims"; code: NamedCode; /** Claim the error concerns; set only with `CLAIM_OUTCOME_UNKNOWN`. */ claimId?: string; } | { service: "alerts"; code: NamedCode; } | { service: "assistant"; code: NamedCode; } | /** A service's quota refusal sent as a bare `RateLimitDetail`, e.g. wallet sign-in. */ { service: "rate_limit"; code: "RATE_LIMIT_EXCEEDED"; rateLimit: RateLimitDetail; }; /** * Loads the decoders for the details on `error`, or every decoder when called * without an error. SDK transports call this before mapping errors; call it * yourself before synchronously mapping a `ConnectError` that did not come * through an SDK transport. */ declare function loadErrorDetailDecoders(error?: unknown): Promise; //#endregion export { PolyesterErrorDetail, loadErrorDetailDecoders }; //# sourceMappingURL=error-detail.d.ts.map