import { z } from 'zod'; import * as buffer from 'buffer'; declare const PayoutPaymentTypeSchema: z.ZodEnum<{ PAYROLL: "PAYROLL"; PROVIDERS: "PROVIDERS"; OTHER: "OTHER"; }>; declare const PayoutStatusSchema: z.ZodEnum<{ PENDING: "PENDING"; REJECTED: "REJECTED"; TOTAL_PAYMENT: "TOTAL_PAYMENT"; PARTIAL_PAYMENT: "PARTIAL_PAYMENT"; PENDING_APPROVAL: "PENDING_APPROVAL"; NOT_APPROVED: "NOT_APPROVED"; AFE_REJECTED: "AFE_REJECTED"; AFE_ON_HOLD: "AFE_ON_HOLD"; }>; declare const PayoutTransactionStatusSchema: z.ZodEnum<{ PENDING: "PENDING"; REJECTED: "REJECTED"; PROCESSING: "PROCESSING"; APPROVED: "APPROVED"; FAILED: "FAILED"; CANCELLED: "CANCELLED"; READY_TO_FILE: "READY_TO_FILE"; ADDED_TO_FILE: "ADDED_TO_FILE"; }>; declare const PayoutAccountTypeSchema: z.ZodEnum<{ AHORROS: "AHORROS"; CORRIENTE: "CORRIENTE"; DEPOSITO_ELECTRONICO: "DEPOSITO_ELECTRONICO"; }>; declare const PayoutLegalIdTypeSchema: z.ZodEnum<{ CC: "CC"; NIT: "NIT"; PP: "PP"; CE: "CE"; TI: "TI"; DNI: "DNI"; }>; declare const PayoutPersonTypeSchema: z.ZodEnum<{ NATURAL: "NATURAL"; JURIDICA: "JURIDICA"; }>; declare const BrebKeyTypeSchema: z.ZodEnum<{ ALPHANUMERIC: "ALPHANUMERIC"; MAIL: "MAIL"; PHONE: "PHONE"; IDENTIFICATION: "IDENTIFICATION"; ESTABLISHMENT_CODE: "ESTABLISHMENT_CODE"; }>; declare const PayoutAccountStatusSchema: z.ZodEnum<{ IN_REVIEW: "IN_REVIEW"; ACTIVE: "ACTIVE"; INACTIVE: "INACTIVE"; }>; declare const PayoutFileTypeSchema: z.ZodEnum<{ WOMPI: "WOMPI"; PAB: "PAB"; SAP: "SAP"; DISFON: "DISFON"; BANCO_OCCIDENTE_FC: "BANCO_OCCIDENTE_FC"; DAVIVIENDA: "DAVIVIENDA"; }>; /** File extension required by each format in Wompi's batch file table. */ declare const PAYOUT_FILE_EXTENSIONS: { readonly WOMPI: ".csv"; readonly PAB: ".txt"; readonly SAP: ".txt"; readonly DISFON: ".txt"; readonly BANCO_OCCIDENTE_FC: ".txt"; readonly DAVIVIENDA: ".txt"; }; /** * `idempotency-key` header sent when creating a batch: 1–64 characters, letters, * numbers and hyphens only. Wompi keeps it unique for 24 hours to prevent * duplicate payouts. */ declare const PayoutIdempotencyKeySchema: z.ZodString; declare const PayoutRecurringSchema: z.ZodObject<{ interval: z.ZodEnum<{ biweek: "biweek"; month: "month"; }>; months: z.ZodUnion, z.ZodLiteral<6>, z.ZodLiteral<12>]>; description: z.ZodOptional; }, z.core.$strip>; /** * One transaction inside a payout batch: either a bank account destination or * a BRE-B `key`, never both in the same transaction. Both kinds can be mixed * in one `transactions` array. */ declare const CreatePayoutTransactionSchema: z.ZodUnion; legalId: z.ZodString; bankId: z.ZodString; accountType: z.ZodEnum<{ AHORROS: "AHORROS"; CORRIENTE: "CORRIENTE"; DEPOSITO_ELECTRONICO: "DEPOSITO_ELECTRONICO"; }>; accountNumber: z.ZodString; name: z.ZodString; amount: z.ZodNumber; personType: z.ZodOptional>; description: z.ZodOptional; phone: z.ZodOptional; email: z.ZodOptional; reference: z.ZodOptional; key: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ key: z.ZodString; name: z.ZodString; amount: z.ZodNumber; email: z.ZodEmail; legalIdType: z.ZodOptional>; legalId: z.ZodOptional; personType: z.ZodOptional>; description: z.ZodOptional; phone: z.ZodOptional; reference: z.ZodOptional; bankId: z.ZodOptional; accountType: z.ZodOptional; accountNumber: z.ZodOptional; }, z.core.$strip>]>; declare const CreatePayoutInputSchema: z.ZodObject<{ reference: z.ZodString; accountId: z.ZodString; paymentType: z.ZodEnum<{ PAYROLL: "PAYROLL"; PROVIDERS: "PROVIDERS"; OTHER: "OTHER"; }>; transactionStatus: z.ZodOptional>; dispersionDatetime: z.ZodOptional; recurring: z.ZodOptional; months: z.ZodUnion, z.ZodLiteral<6>, z.ZodLiteral<12>]>; description: z.ZodOptional; }, z.core.$strip>>; transactions: z.ZodArray; legalId: z.ZodString; bankId: z.ZodString; accountType: z.ZodEnum<{ AHORROS: "AHORROS"; CORRIENTE: "CORRIENTE"; DEPOSITO_ELECTRONICO: "DEPOSITO_ELECTRONICO"; }>; accountNumber: z.ZodString; name: z.ZodString; amount: z.ZodNumber; personType: z.ZodOptional>; description: z.ZodOptional; phone: z.ZodOptional; email: z.ZodOptional; reference: z.ZodOptional; key: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ key: z.ZodString; name: z.ZodString; amount: z.ZodNumber; email: z.ZodEmail; legalIdType: z.ZodOptional>; legalId: z.ZodOptional; personType: z.ZodOptional>; description: z.ZodOptional; phone: z.ZodOptional; reference: z.ZodOptional; bankId: z.ZodOptional; accountType: z.ZodOptional; accountNumber: z.ZodOptional; }, z.core.$strip>]>>; }, z.core.$strip>; /** * Compressed batch uploads must carry the `.gz` extension and the * `application/gzip` MIME, per Wompi's file upload contract. */ declare const isGzipPayoutFile: (file: Blob) => boolean; declare const CreatePayoutFileInputSchema: z.ZodObject<{ reference: z.ZodString; file: z.ZodCustom; fileType: z.ZodEnum<{ WOMPI: "WOMPI"; PAB: "PAB"; SAP: "SAP"; DISFON: "DISFON"; BANCO_OCCIDENTE_FC: "BANCO_OCCIDENTE_FC"; DAVIVIENDA: "DAVIVIENDA"; }>; accountId: z.ZodString; paymentType: z.ZodEnum<{ PAYROLL: "PAYROLL"; PROVIDERS: "PROVIDERS"; OTHER: "OTHER"; }>; fileName: z.ZodOptional; fileMime: z.ZodOptional; transactionStatus: z.ZodOptional>; dispersionDatetime: z.ZodOptional; interval: z.ZodOptional>; months: z.ZodOptional, z.ZodLiteral<6>, z.ZodLiteral<12>]>>; description: z.ZodOptional; }, z.core.$strip>; declare const PayoutListParamsSchema: z.ZodObject<{ page: z.ZodOptional; limit: z.ZodOptional; status: z.ZodOptional, z.ZodArray>]>, z.ZodTransform>>; fromDate: z.ZodOptional; toDate: z.ZodOptional; reference: z.ZodOptional; id: z.ZodOptional; }, z.core.$strip>; declare const PayoutAccountListParamsSchema: z.ZodObject<{ bankCodes: z.ZodOptional]>, z.ZodTransform>>; status: z.ZodOptional, z.ZodArray>]>, z.ZodTransform>>; }, z.core.$strip>; declare const PayoutTransactionListParamsSchema: z.ZodObject<{ page: z.ZodOptional; limit: z.ZodOptional; status: z.ZodOptional, z.ZodArray>]>, z.ZodTransform>>; reference: z.ZodOptional; accountNumber: z.ZodOptional; payeeName: z.ZodOptional; }, z.core.$strip>; declare const PayoutTransactionsByReferenceParamsSchema: z.ZodObject<{ page: z.ZodOptional; limit: z.ZodOptional; status: z.ZodOptional, z.ZodArray>]>>; }, z.core.$strip>; declare const PayoutReportListParamsSchema: z.ZodObject<{ page: z.ZodOptional; limit: z.ZodOptional; periodicity: z.ZodEnum<{ daily: "daily"; weekly: "weekly"; biweekly: "biweekly"; monthly: "monthly"; }>; reportType: z.ZodEnum<{ transactions: "transactions"; payouts: "payouts"; }>; }, z.core.$strip>; declare const PayoutReportUrlParamsSchema: z.ZodObject<{ reportExecutionId: z.ZodString; reportIntegration: z.ZodEnum<{ payouts: "payouts"; merchant_reports: "merchant_reports"; }>; }, z.core.$strip>; declare const RechargePayoutAccountInputSchema: z.ZodObject<{ accountId: z.ZodString; amountInCents: z.ZodNumber; }, z.core.$strip>; /** * Response payload of `POST /payouts` and `POST /payouts/file`. * * Like every payments response schema, payout responses keep only their stable * identifiers required and stay loose otherwise — a successful API call must * never be reported as a validation error. */ declare const CreatePayoutResultSchema: z.ZodObject<{ payoutId: z.ZodString; transactions: z.ZodOptional; success: z.ZodOptional; failed: z.ZodOptional; }, z.core.$loose>; declare const BrebFinancialEntitySchema: z.ZodObject<{ name: z.ZodOptional; code: z.ZodOptional; }, z.core.$loose>; /** * Result of resolving a BRE-B key (`GET /v2/breb/keys/resolve/{keyValue}`). * `holderName` and `keyValue` come back partially masked by design. */ declare const BrebKeyResolutionSchema: z.ZodObject<{ holderName: z.ZodOptional; financialEntity: z.ZodOptional; code: z.ZodOptional; }, z.core.$loose>>; keyType: z.ZodOptional; keyValue: z.ZodOptional; }, z.core.$loose>; declare const PayoutPayerInfoSchema: z.ZodObject<{ name: z.ZodOptional; email: z.ZodOptional; phone: z.ZodOptional; legalId: z.ZodOptional; personType: z.ZodOptional; legalIdType: z.ZodOptional; }, z.core.$loose>; /** * A payout batch. `status` stays a plain string — the REST API and webhook * events emit values beyond the documented {@link PayoutStatusSchema} set. */ declare const PayoutSchema: z.ZodObject<{ id: z.ZodString; status: z.ZodString; reference: z.ZodOptional; type: z.ZodOptional; amountInCents: z.ZodOptional; currency: z.ZodOptional; payerInfo: z.ZodOptional; email: z.ZodOptional; phone: z.ZodOptional; legalId: z.ZodOptional; personType: z.ZodOptional; legalIdType: z.ZodOptional; }, z.core.$loose>>; statusMessage: z.ZodOptional>; totalTransactions: z.ZodOptional; dispersionDatetime: z.ZodOptional>; paymentType: z.ZodOptional; createdAt: z.ZodOptional; }, z.core.$loose>; declare const PayoutPayeeInfoSchema: z.ZodObject<{ bank: z.ZodOptional; name: z.ZodOptional; email: z.ZodOptional; legalId: z.ZodOptional; bankCode: z.ZodOptional; accountType: z.ZodOptional; legalIdType: z.ZodOptional; accountNumber: z.ZodOptional; }, z.core.$loose>; declare const PayoutFeeSchema: z.ZodObject<{ feeInCents: z.ZodOptional; vatPercentage: z.ZodOptional; gmfInCents: z.ZodOptional; dynamicFeeInCents: z.ZodOptional; vatInCents: z.ZodOptional; totalInCents: z.ZodOptional; }, z.core.$loose>; /** * A plain string on the REST API, but an object on webhook events. Bank * dispersal events word it as `{ code, message }` while BRE-B events use * `{ code, description }` — both arrive on the same events URL. */ declare const PayoutFailureReasonSchema: z.ZodUnion; message: z.ZodOptional; description: z.ZodOptional; }, z.core.$loose>]>; declare const PayoutTransactionSchema: z.ZodObject<{ id: z.ZodString; status: z.ZodString; amountInCents: z.ZodOptional; payeeInfo: z.ZodOptional; name: z.ZodOptional; email: z.ZodOptional; legalId: z.ZodOptional; bankCode: z.ZodOptional; accountType: z.ZodOptional; legalIdType: z.ZodOptional; accountNumber: z.ZodOptional; }, z.core.$loose>>; fee: z.ZodOptional; vatPercentage: z.ZodOptional; gmfInCents: z.ZodOptional; dynamicFeeInCents: z.ZodOptional; vatInCents: z.ZodOptional; totalInCents: z.ZodOptional; }, z.core.$loose>>; reference: z.ZodOptional>; failureReason: z.ZodOptional; message: z.ZodOptional; description: z.ZodOptional; }, z.core.$loose>]>>>; appliedAt: z.ZodOptional>; createdAt: z.ZodOptional; payout: z.ZodOptional; type: z.ZodOptional; amountInCents: z.ZodOptional; currency: z.ZodOptional; payerInfo: z.ZodOptional; email: z.ZodOptional; phone: z.ZodOptional; legalId: z.ZodOptional; personType: z.ZodOptional; legalIdType: z.ZodOptional; }, z.core.$loose>>; statusMessage: z.ZodOptional>; totalTransactions: z.ZodOptional; dispersionDatetime: z.ZodOptional>; paymentType: z.ZodOptional; createdAt: z.ZodOptional; }, z.core.$loose>>; }, z.core.$loose>; /** * Beneficiary shape emitted by Payouts `transaction.updated` webhooks. The * official event example identifies the payee as `document`, while other * payloads carry `legalId`/`legalIdType`; BRE-B events on the same URL have * no `bank` and add the resolved key fields instead. Everything beyond `name` * and `accountNumber` is optional so no documented variant fails the guard. */ declare const PayoutEventPayeeSchema: z.ZodObject<{ name: z.ZodString; bank: z.ZodOptional; accountNumber: z.ZodString; accountType: z.ZodOptional; document: z.ZodOptional; legalId: z.ZodOptional; legalIdType: z.ZodOptional; email: z.ZodOptional; key: z.ZodOptional; keyType: z.ZodOptional; personType: z.ZodOptional; keyResolutionId: z.ZodOptional; paymentMethodType: z.ZodOptional; }, z.core.$loose>; /** Transaction payload emitted by Payouts webhooks (distinct from the REST shape). */ declare const PayoutEventTransactionSchema: z.ZodObject<{ id: z.ZodString; payoutId: z.ZodString; amountInCents: z.ZodNumber; status: z.ZodString; payee: z.ZodObject<{ name: z.ZodString; bank: z.ZodOptional; accountNumber: z.ZodString; accountType: z.ZodOptional; document: z.ZodOptional; legalId: z.ZodOptional; legalIdType: z.ZodOptional; email: z.ZodOptional; key: z.ZodOptional; keyType: z.ZodOptional; personType: z.ZodOptional; keyResolutionId: z.ZodOptional; paymentMethodType: z.ZodOptional; }, z.core.$loose>; failureReason: z.ZodOptional; message: z.ZodOptional; description: z.ZodOptional; }, z.core.$loose>]>>>; currency: z.ZodString; }, z.core.$loose>; declare const PayoutBankSchema: z.ZodObject<{ id: z.ZodString; name: z.ZodOptional; code: z.ZodOptional; achCode: z.ZodOptional>>; swiftCode: z.ZodOptional>; allowedForOrigin: z.ZodOptional; isElectronicDeposit: z.ZodOptional; createdAt: z.ZodOptional; updatedAt: z.ZodOptional; }, z.core.$loose>; declare const PayoutAccountSchema: z.ZodObject<{ id: z.ZodString; balanceInCents: z.ZodOptional; number: z.ZodOptional; status: z.ZodOptional; accountType: z.ZodOptional; bank: z.ZodOptional; name: z.ZodOptional; }, z.core.$loose>>; updatedAt: z.ZodOptional; }, z.core.$loose>; declare const PayoutLimitsSchema: z.ZodObject<{ numberOfTransactionsConsumed: z.ZodOptional; limits: z.ZodOptional; dailyAvailable: z.ZodOptional; dailyConsumed: z.ZodOptional; }, z.core.$loose>>; }, z.core.$loose>; declare const PayoutReportSchema: z.ZodObject<{ _id: z.ZodString; reportId: z.ZodOptional; runAt: z.ZodOptional; status: z.ZodOptional; stackTrace: z.ZodOptional>; queryStartDate: z.ZodOptional; queryEndDate: z.ZodOptional; fileBucketKey: z.ZodOptional; }, z.core.$loose>; declare const PayoutHealthSchema: z.ZodObject<{ status: z.ZodEnum<{ HEALTHY: "HEALTHY"; PARTIAL_OUTAGE: "PARTIAL_OUTAGE"; UNHEALTHY: "UNHEALTHY"; }>; services: z.ZodOptional>>; }, z.core.$loose>; /** Paginated `data` payload of the payout list endpoints. */ declare const payoutPage: (itemSchema: T) => z.ZodObject<{ page: z.ZodOptional; limit: z.ZodOptional; total: z.ZodOptional; pages: z.ZodOptional; records: z.ZodArray; }, z.core.$loose>; /** `GET /reports/payouts` paginates under `reports` instead of `records`. */ declare const PayoutReportPageSchema: z.ZodObject<{ page: z.ZodOptional; limit: z.ZodOptional; total: z.ZodOptional; pages: z.ZodOptional; reports: z.ZodArray; runAt: z.ZodOptional; status: z.ZodOptional; stackTrace: z.ZodOptional>; queryStartDate: z.ZodOptional; queryEndDate: z.ZodOptional; fileBucketKey: z.ZodOptional; }, z.core.$loose>>; }, z.core.$loose>; /** * Envelope of every event the Payouts API POSTs to the configured Events URL. * Unlike payments webhooks there is no `environment` field, and the send date * arrives camelCased as `sentAt`. */ declare const PayoutEventSchema: z.ZodObject<{ event: z.ZodString; data: z.ZodRecord; signature: z.ZodObject<{ properties: z.ZodArray; checksum: z.ZodString; }, z.core.$strip>; timestamp: z.ZodNumber; sentAt: z.ZodOptional; }, z.core.$loose>; declare const PayoutUpdatedEventSchema: z.ZodObject<{ event: z.ZodLiteral<"payout.updated">; data: z.ZodObject<{ payout: z.ZodObject<{ id: z.ZodString; status: z.ZodString; reference: z.ZodOptional; type: z.ZodOptional; amountInCents: z.ZodOptional; currency: z.ZodOptional; payerInfo: z.ZodOptional; email: z.ZodOptional; phone: z.ZodOptional; legalId: z.ZodOptional; personType: z.ZodOptional; legalIdType: z.ZodOptional; }, z.core.$loose>>; statusMessage: z.ZodOptional>; totalTransactions: z.ZodOptional; dispersionDatetime: z.ZodOptional>; paymentType: z.ZodOptional; createdAt: z.ZodOptional; }, z.core.$loose>; }, z.core.$strip>; signature: z.ZodObject<{ properties: z.ZodArray; checksum: z.ZodString; }, z.core.$strip>; timestamp: z.ZodNumber; sentAt: z.ZodOptional; }, z.core.$loose>; declare const PayoutTransactionUpdatedEventSchema: z.ZodObject<{ event: z.ZodLiteral<"transaction.updated">; data: z.ZodObject<{ transaction: z.ZodObject<{ id: z.ZodString; payoutId: z.ZodString; amountInCents: z.ZodNumber; status: z.ZodString; payee: z.ZodObject<{ name: z.ZodString; bank: z.ZodOptional; accountNumber: z.ZodString; accountType: z.ZodOptional; document: z.ZodOptional; legalId: z.ZodOptional; legalIdType: z.ZodOptional; email: z.ZodOptional; key: z.ZodOptional; keyType: z.ZodOptional; personType: z.ZodOptional; keyResolutionId: z.ZodOptional; paymentMethodType: z.ZodOptional; }, z.core.$loose>; failureReason: z.ZodOptional; message: z.ZodOptional; description: z.ZodOptional; }, z.core.$loose>]>>>; currency: z.ZodString; }, z.core.$loose>; }, z.core.$strip>; signature: z.ZodObject<{ properties: z.ZodArray; checksum: z.ZodString; }, z.core.$strip>; timestamp: z.ZodNumber; sentAt: z.ZodOptional; }, z.core.$loose>; /** Error body of the Payouts API, preserving service diagnostics and trace metadata. */ declare const PayoutApiErrorResponseSchema: z.ZodObject<{ code: z.ZodString; message: z.ZodUnion]>; type: z.ZodOptional; data: z.ZodOptional; meta: z.ZodOptional; }, z.core.$loose>>; }, z.core.$loose>; declare const WompiPayoutsClientOptionsSchema: z.ZodObject<{ apiKey: z.ZodString; userPrincipalId: z.ZodString; sandbox: z.ZodDefault; }, z.core.$strip>; type PayoutPaymentType = z.output; type PayoutStatus = z.output; type PayoutTransactionStatus = z.output; type PayoutAccountType = z.output; type PayoutLegalIdType = z.output; type PayoutPersonType = z.output; type PayoutAccountStatus = z.output; type PayoutFileType = z.output; type BrebKeyType = z.output; type PayoutRecurring = z.output; type CreatePayoutTransaction = z.output; type CreatePayoutInput = z.output; type CreatePayoutFileInput = z.output; type CreatePayoutResult = z.output; type PayoutListParams = z.input; type PayoutAccountListParams = z.input; type PayoutTransactionListParams = z.input; type PayoutTransactionsByReferenceParams = z.input; type PayoutReportListParams = z.input; type PayoutReportUrlParams = z.input; type RechargePayoutAccountInput = z.output; type BrebFinancialEntity = z.output; type BrebKeyResolution = z.output; type PayoutPayerInfo = z.output; type Payout = z.output; type PayoutPayeeInfo = z.output; type PayoutFee = z.output; type PayoutTransaction = z.output; type PayoutEventPayee = z.output; type PayoutEventTransaction = z.output; type PayoutBank = z.output; type PayoutAccount = z.output; type PayoutLimits = z.output; type PayoutReport = z.output; type PayoutReportPage = z.output; type PayoutHealth = z.output; type PayoutPage = { page?: number; limit?: number; total?: number; pages?: number; records: T[]; }; type PayoutEvent = z.output; type PayoutUpdatedEvent = z.output; type PayoutTransactionUpdatedEvent = z.output; type PayoutApiErrorResponse = z.output; type WompiPayoutsClientOptions = z.input; declare class WompiPayoutApiError extends WompiError { readonly type: "PAYOUT_API_ERROR"; readonly code: string; readonly statusCode: number; readonly body: PayoutApiErrorResponse; constructor(statusCode: number, response: PayoutApiErrorResponse); } /** Maximum amount Wompi accepts, in cents (spec: `amount_in_cents` `maximum: 1E12`). */ declare const MAX_AMOUNT_IN_CENTS = 1000000000000; declare const CurrencySchema: z.ZodLiteral<"COP">; declare const PaymentMethodTypeSchema: z.ZodEnum<{ CARD: "CARD"; NEQUI: "NEQUI"; PSE: "PSE"; BANCOLOMBIA: "BANCOLOMBIA"; BANCOLOMBIA_TRANSFER: "BANCOLOMBIA_TRANSFER"; BANCOLOMBIA_COLLECT: "BANCOLOMBIA_COLLECT"; BANCOLOMBIA_QR: "BANCOLOMBIA_QR"; BANCOLOMBIA_BNPL: "BANCOLOMBIA_BNPL"; DAVIPLATA: "DAVIPLATA"; SU_PLUS: "SU_PLUS"; CARD_POS: "CARD_POS"; }>; declare const TransactionStatusSchema: z.ZodEnum<{ PENDING: "PENDING"; APPROVED: "APPROVED"; DECLINED: "DECLINED"; ERROR: "ERROR"; VOIDED: "VOIDED"; }>; declare const PaymentSourceTypeSchema: z.ZodEnum<{ CARD: "CARD"; NEQUI: "NEQUI"; }>; declare const PaymentSourceStatusSchema: z.ZodEnum<{ PENDING: "PENDING"; AVAILABLE: "AVAILABLE"; }>; declare const NequiTokenStatusSchema: z.ZodEnum<{ PENDING: "PENDING"; APPROVED: "APPROVED"; DECLINED: "DECLINED"; }>; declare const LegalIdTypeSchema: z.ZodEnum<{ OTHER: "OTHER"; CC: "CC"; NIT: "NIT"; PP: "PP"; CE: "CE"; TI: "TI"; DNI: "DNI"; RG: "RG"; }>; declare const TaxTypeSchema: z.ZodEnum<{ VAT: "VAT"; CONSUMPTION: "CONSUMPTION"; }>; declare const OrderDirectionSchema: z.ZodEnum<{ DESC: "DESC"; ASC: "ASC"; }>; declare const AcceptanceTypeSchema: z.ZodLiteral<"END_USER_POLICY">; declare const MerchantLegalIdTypeSchema: z.ZodEnum<{ CC: "CC"; NIT: "NIT"; }>; declare const CustomerDataSchema: z.ZodObject<{ phone_number: z.ZodOptional; full_name: z.ZodString; legal_id: z.ZodOptional; legal_id_type: z.ZodOptional>; }, z.core.$strip>; declare const ShippingAddressSchema: z.ZodObject<{ address_line_1: z.ZodString; address_line_2: z.ZodOptional; country: z.ZodString; region: z.ZodString; city: z.ZodString; name: z.ZodOptional; phone_number: z.ZodString; postal_code: z.ZodOptional; }, z.core.$strip>; /** * Lenient by design: the direct flow sends `{ type, token, installments… }`, * while charges against a saved `payment_source_id` send only * `{ installments }` — Wompi infers the type from the source. */ declare const TransactionPaymentMethodSchema: z.ZodObject<{ type: z.ZodOptional; installments: z.ZodOptional; }, z.core.$loose>; declare const CreateTransactionInputSchema: z.ZodObject<{ acceptance_token: z.ZodString; amount_in_cents: z.ZodNumber; currency: z.ZodLiteral<"COP">; signature: z.ZodString; customer_email: z.ZodEmail; payment_method: z.ZodOptional; installments: z.ZodOptional; }, z.core.$loose>>; payment_source_id: z.ZodOptional; redirect_url: z.ZodOptional; reference: z.ZodString; expiration_time: z.ZodOptional; customer_data: z.ZodOptional; full_name: z.ZodString; legal_id: z.ZodOptional; legal_id_type: z.ZodOptional>; }, z.core.$strip>>; shipping_address: z.ZodOptional; country: z.ZodString; region: z.ZodString; city: z.ZodString; name: z.ZodOptional; phone_number: z.ZodString; postal_code: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>; /** * Response shape of a transaction. * * Wompi's spec marks no response field as required, so every non-identity field is * optional/nullish and unknown fields pass through — a successful API call must never * be reported as a validation error. Only `id`, `status` and `reference` are kept * required, as the stable identifiers consumers rely on. */ declare const TransactionSchema: z.ZodObject<{ id: z.ZodString; status: z.ZodEnum<{ PENDING: "PENDING"; APPROVED: "APPROVED"; DECLINED: "DECLINED"; ERROR: "ERROR"; VOIDED: "VOIDED"; }>; reference: z.ZodString; created_at: z.ZodOptional; amount_in_cents: z.ZodOptional; customer_email: z.ZodOptional; currency: z.ZodOptional>; payment_method_type: z.ZodOptional; payment_method: z.ZodOptional; installments: z.ZodOptional; }, z.core.$loose>>; status_message: z.ZodOptional>; shipping_address: z.ZodOptional; country: z.ZodString; region: z.ZodString; city: z.ZodString; name: z.ZodOptional; phone_number: z.ZodString; postal_code: z.ZodOptional; }, z.core.$strip>>>; redirect_url: z.ZodOptional>; payment_link_id: z.ZodOptional>; }, z.core.$loose>; declare const TransactionListParamsSchema: z.ZodObject<{ reference: z.ZodOptional; from_date: z.ZodOptional; until_date: z.ZodOptional; page: z.ZodOptional; page_size: z.ZodOptional; id: z.ZodOptional; payment_method_type: z.ZodOptional>; status: z.ZodOptional>; customer_email: z.ZodOptional; order_by: z.ZodOptional; order: z.ZodOptional>; }, z.core.$strip>; declare const VoidTransactionInputSchema: z.ZodObject<{ amount_in_cents: z.ZodOptional; }, z.core.$strip>; /** * Response payload of `POST /transactions/{id}/void`. * * Wompi's spec documents an empty `201`, but the API actually answers with a * body wrapping the void outcome: a top-level `status` plus the voided * transaction nested under `transaction`. Lenient, like every response schema. */ declare const VoidTransactionResultSchema: z.ZodObject<{ status: z.ZodOptional; status_message: z.ZodOptional>; transaction: z.ZodOptional; reference: z.ZodString; created_at: z.ZodOptional; amount_in_cents: z.ZodOptional; customer_email: z.ZodOptional; currency: z.ZodOptional>; payment_method_type: z.ZodOptional; payment_method: z.ZodOptional; installments: z.ZodOptional; }, z.core.$loose>>; status_message: z.ZodOptional>; shipping_address: z.ZodOptional; country: z.ZodString; region: z.ZodString; city: z.ZodString; name: z.ZodOptional; phone_number: z.ZodString; postal_code: z.ZodOptional; }, z.core.$strip>>>; redirect_url: z.ZodOptional>; payment_link_id: z.ZodOptional>; }, z.core.$loose>>; }, z.core.$loose>; declare const TokenizeCardInputSchema: z.ZodObject<{ number: z.ZodString; cvc: z.ZodString; exp_month: z.ZodString; exp_year: z.ZodString; card_holder: z.ZodString; }, z.core.$strip>; declare const TokenizeNequiInputSchema: z.ZodObject<{ phone_number: z.ZodString; }, z.core.$strip>; declare const CardTokenSchema: z.ZodObject<{ id: z.ZodString; created_at: z.ZodOptional; brand: z.ZodOptional; name: z.ZodOptional; last_four: z.ZodOptional; bin: z.ZodOptional; exp_year: z.ZodOptional; exp_month: z.ZodOptional; card_holder: z.ZodOptional; expires_at: z.ZodOptional; }, z.core.$loose>; declare const NequiTokenSchema: z.ZodObject<{ id: z.ZodString; status: z.ZodEnum<{ PENDING: "PENDING"; APPROVED: "APPROVED"; DECLINED: "DECLINED"; }>; phone_number: z.ZodOptional; name: z.ZodOptional; }, z.core.$loose>; declare const PaymentSourcePublicDataSchema: z.ZodObject<{ type: z.ZodEnum<{ CARD: "CARD"; NEQUI: "NEQUI"; }>; phone_number: z.ZodOptional; }, z.core.$strip>; declare const PaymentSourceSchema: z.ZodObject<{ id: z.ZodNumber; status: z.ZodEnum<{ PENDING: "PENDING"; AVAILABLE: "AVAILABLE"; }>; type: z.ZodOptional>; token: z.ZodOptional; customer_email: z.ZodOptional; public_data: z.ZodOptional; phone_number: z.ZodOptional; }, z.core.$strip>>; }, z.core.$loose>; declare const CreatePaymentSourceInputSchema: z.ZodObject<{ type: z.ZodEnum<{ CARD: "CARD"; NEQUI: "NEQUI"; }>; token: z.ZodString; acceptance_token: z.ZodString; customer_email: z.ZodEmail; }, z.core.$strip>; declare const CustomerReferenceSchema: z.ZodObject<{ label: z.ZodString; is_required: z.ZodBoolean; }, z.core.$strip>; declare const PaymentLinkCustomerDataSchema: z.ZodObject<{ customer_references: z.ZodOptional>>; }, z.core.$strip>; declare const TaxByAmountSchema: z.ZodObject<{ type: z.ZodEnum<{ VAT: "VAT"; CONSUMPTION: "CONSUMPTION"; }>; amount_in_cents: z.ZodNumber; }, z.core.$strip>; declare const TaxByPercentageSchema: z.ZodObject<{ type: z.ZodEnum<{ VAT: "VAT"; CONSUMPTION: "CONSUMPTION"; }>; percentage: z.ZodNumber; }, z.core.$strip>; declare const TaxSchema: z.ZodUnion; amount_in_cents: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodEnum<{ VAT: "VAT"; CONSUMPTION: "CONSUMPTION"; }>; percentage: z.ZodNumber; }, z.core.$strip>]>; declare const CreatePaymentLinkInputSchema: z.ZodObject<{ name: z.ZodString; description: z.ZodString; single_use: z.ZodBoolean; collect_shipping: z.ZodBoolean; collect_customer_legal_id: z.ZodOptional; amount_in_cents: z.ZodOptional; currency: z.ZodOptional>; signature: z.ZodOptional; reference: z.ZodOptional; expiration_time: z.ZodOptional; sku: z.ZodOptional; expires_at: z.ZodOptional; redirect_url: z.ZodOptional; image_url: z.ZodOptional; customer_data: z.ZodOptional>>; }, z.core.$strip>>; taxes: z.ZodOptional; amount_in_cents: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodEnum<{ VAT: "VAT"; CONSUMPTION: "CONSUMPTION"; }>; percentage: z.ZodNumber; }, z.core.$strip>]>>>; }, z.core.$strip>; /** * Response shape of a payment link. * * Wompi returns `null` (not absent) for every optional field the merchant did not set, * so all such fields are `.nullish()` — a successful API call must never be reported as * a validation error. `checkout_url` is injected by the SDK after parsing, so callers * don't have to build `https://checkout.wompi.co/l/{id}` themselves. */ declare const PaymentLinkSchema: z.ZodObject<{ id: z.ZodString; name: z.ZodOptional>; description: z.ZodOptional>; single_use: z.ZodOptional>; collect_shipping: z.ZodOptional>; collect_customer_legal_id: z.ZodOptional>; amount_in_cents: z.ZodOptional>; currency: z.ZodOptional>>; signature: z.ZodOptional>; reference: z.ZodOptional>; expiration_time: z.ZodOptional>; sku: z.ZodOptional>; expires_at: z.ZodOptional>; redirect_url: z.ZodOptional>; image_url: z.ZodOptional>; customer_data: z.ZodOptional>>; }, z.core.$strip>>>; taxes: z.ZodOptional; amount_in_cents: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodEnum<{ VAT: "VAT"; CONSUMPTION: "CONSUMPTION"; }>; percentage: z.ZodNumber; }, z.core.$strip>]>>>>; active: z.ZodOptional; created_at: z.ZodOptional; updated_at: z.ZodOptional; checkout_url: z.ZodOptional; }, z.core.$loose>; declare const UpdatePaymentLinkInputSchema: z.ZodObject<{ active: z.ZodBoolean; }, z.core.$strip>; declare const PresignedAcceptanceSchema: z.ZodObject<{ acceptance_token: z.ZodString; permalink: z.ZodString; type: z.ZodLiteral<"END_USER_POLICY">; }, z.core.$strip>; declare const MerchantSchema: z.ZodObject<{ id: z.ZodNumber; name: z.ZodOptional; legal_name: z.ZodOptional; legal_id: z.ZodOptional; legal_id_type: z.ZodOptional; phone_number: z.ZodOptional; active: z.ZodOptional; logo_url: z.ZodOptional>; email: z.ZodOptional; contact_name: z.ZodOptional; public_key: z.ZodOptional; accepted_payment_methods: z.ZodOptional>; accepted_currencies: z.ZodOptional>>; presigned_acceptance: z.ZodOptional; }, z.core.$strip>>; }, z.core.$loose>; declare const FinancialInstitutionSchema: z.ZodObject<{ financial_institution_code: z.ZodString; financial_institution_name: z.ZodOptional; }, z.core.$loose>; /** * Wraps a data schema in Wompi's `{ data, meta? }` envelope and immediately * unwraps to `data` after parsing. The wire format is preserved for validation, * but callers receive the payload directly — `response.X` instead of * `response.data.X`. The `meta` channel (only carries pagination) is dropped. */ declare const wompiResponse: (dataSchema: T) => z.ZodPipe>; }, z.core.$strip>, z.ZodTransform>, ({ data: T; meta: z.ZodOptional>; } extends infer T_2 extends z.core.$ZodLooseShape ? { -readonly [k in keyof T_2 as { data: T; meta: z.ZodOptional>; }[k] extends { _zod: { optout: "optional"; }; } ? never : k]: T_2[k]["_zod"]["output"]; } : never) & ({ data: T; meta: z.ZodOptional>; } extends infer T_3 extends z.core.$ZodLooseShape ? { -readonly [k_1 in keyof T_3 as { data: T; meta: z.ZodOptional>; }[k_1] extends { _zod: { optout: "optional"; }; } ? k_1 : never]?: T_3[k_1]["_zod"]["output"] | undefined; } : never) extends infer T_1 ? { [K in keyof T_1]: T_1[K]; } : never>>; declare const wompiListResponse: (itemSchema: T) => z.ZodPipe; meta: z.ZodOptional>; }, z.core.$strip>, z.ZodTransform[], { data: z.core.output[]; meta?: Record | undefined; }>>; declare const WebhookSignatureSchema: z.ZodObject<{ properties: z.ZodArray; checksum: z.ZodString; }, z.core.$strip>; /** * Envelope of every event Wompi POSTs to the configured Events URL. * * `event` stays a plain string (Wompi adds event types over time); use * {@link TransactionUpdatedEventSchema} or the `isTransactionUpdatedEvent` * guard from `/server` to narrow the payload of known types. */ declare const WebhookEventSchema: z.ZodObject<{ event: z.ZodString; data: z.ZodRecord; environment: z.ZodString; signature: z.ZodObject<{ properties: z.ZodArray; checksum: z.ZodString; }, z.core.$strip>; timestamp: z.ZodNumber; sent_at: z.ZodOptional; }, z.core.$loose>; declare const TransactionUpdatedEventSchema: z.ZodObject<{ event: z.ZodLiteral<"transaction.updated">; data: z.ZodObject<{ transaction: z.ZodObject<{ id: z.ZodString; status: z.ZodEnum<{ PENDING: "PENDING"; APPROVED: "APPROVED"; DECLINED: "DECLINED"; ERROR: "ERROR"; VOIDED: "VOIDED"; }>; reference: z.ZodString; created_at: z.ZodOptional; amount_in_cents: z.ZodOptional; customer_email: z.ZodOptional; currency: z.ZodOptional>; payment_method_type: z.ZodOptional; payment_method: z.ZodOptional; installments: z.ZodOptional; }, z.core.$loose>>; status_message: z.ZodOptional>; shipping_address: z.ZodOptional; country: z.ZodString; region: z.ZodString; city: z.ZodString; name: z.ZodOptional; phone_number: z.ZodString; postal_code: z.ZodOptional; }, z.core.$strip>>>; redirect_url: z.ZodOptional>; payment_link_id: z.ZodOptional>; }, z.core.$loose>; }, z.core.$strip>; environment: z.ZodString; signature: z.ZodObject<{ properties: z.ZodArray; checksum: z.ZodString; }, z.core.$strip>; timestamp: z.ZodNumber; sent_at: z.ZodOptional; }, z.core.$loose>; declare const NequiTokenUpdatedEventSchema: z.ZodObject<{ event: z.ZodLiteral<"nequi_token.updated">; data: z.ZodObject<{ nequi_token: z.ZodObject<{ id: z.ZodString; status: z.ZodEnum<{ PENDING: "PENDING"; APPROVED: "APPROVED"; DECLINED: "DECLINED"; }>; phone_number: z.ZodOptional; name: z.ZodOptional; }, z.core.$loose>; }, z.core.$strip>; environment: z.ZodString; signature: z.ZodObject<{ properties: z.ZodArray; checksum: z.ZodString; }, z.core.$strip>; timestamp: z.ZodNumber; sent_at: z.ZodOptional; }, z.core.$loose>; declare const NotFoundErrorResponseSchema: z.ZodObject<{ error: z.ZodObject<{ type: z.ZodLiteral<"NOT_FOUND_ERROR">; reason: z.ZodString; }, z.core.$strip>; }, z.core.$strip>; declare const InputValidationErrorResponseSchema: z.ZodObject<{ error: z.ZodObject<{ type: z.ZodLiteral<"INPUT_VALIDATION_ERROR">; messages: z.ZodRecord>; }, z.core.$strip>; }, z.core.$strip>; declare const WompiClientOptionsSchema: z.ZodObject<{ publicKey: z.ZodString; privateKey: z.ZodOptional; sandbox: z.ZodDefault; }, z.core.$strip>; type Currency = z.output; type PaymentMethodType = z.output; type TransactionStatus = z.output; type PaymentSourceType = z.output; type PaymentSourceStatus = z.output; type NequiTokenStatus = z.output; type LegalIdType = z.output; type TaxType = z.output; type OrderDirection = z.output; type AcceptanceType = z.output; type MerchantLegalIdType = z.output; type CustomerData = z.output; type ShippingAddress = z.output; type TransactionPaymentMethod = z.output; type CreateTransactionInput = z.output; type Transaction = z.output; type TransactionListParams = z.output; type VoidTransactionInput = z.output; type VoidTransactionResult = z.output; type TokenizeCardInput = z.output; type TokenizeNequiInput = z.output; type CardToken = z.output; type NequiToken = z.output; type PaymentSourcePublicData = z.output; type PaymentSource = z.output; type CreatePaymentSourceInput = z.output; type CustomerReference = z.output; type PaymentLinkCustomerData = z.output; type TaxByAmount = z.output; type TaxByPercentage = z.output; type Tax = z.output; type CreatePaymentLinkInput = z.output; type PaymentLink = z.output; type UpdatePaymentLinkInput = z.output; type PresignedAcceptance = z.output; type Merchant = z.output; type FinancialInstitution = z.output; type WebhookSignature = z.output; type WebhookEvent = z.output; type TransactionUpdatedEvent = z.output; type NequiTokenUpdatedEvent = z.output; type NotFoundErrorResponse = z.output; type InputValidationErrorResponse = z.output; type WompiClientOptions = z.input; declare class WompiError extends Error { constructor(message: string); } declare class WompiNotFoundError extends WompiError { readonly type: "NOT_FOUND_ERROR"; readonly reason: string; constructor(response: NotFoundErrorResponse); } declare class WompiValidationError extends WompiError { readonly type: "INPUT_VALIDATION_ERROR"; readonly messages: Record; constructor(response: InputValidationErrorResponse); } declare class WompiRequestError extends WompiError { readonly statusCode: number; readonly body: unknown; constructor(statusCode: number, body: unknown); } declare class WompiWebhookVerificationError extends WompiError { readonly type: "WEBHOOK_VERIFICATION_ERROR"; constructor(message: string); } /** * Every error a {@link Result} can carry. The subclasses expose discriminants * (`.type` on not-found / validation errors, `.statusCode` on request errors), so * consumers can branch without `instanceof`. */ type WompiErrorResult = WompiError | WompiNotFoundError | WompiPayoutApiError | WompiRequestError | WompiValidationError | WompiWebhookVerificationError; /** * Discriminated result tuple for error-first handling. * * Usage: * ```ts * const [error, data] = await wompi.transactions.getTransaction("id"); * if (error) { * // error is a WompiError (or one of its subclasses) * return; * } * // data is fully typed * ``` */ type Result = [error: WompiErrorResult, data: null] | [error: null, data: T]; export { type AcceptanceType, AcceptanceTypeSchema, type BrebFinancialEntity, BrebFinancialEntitySchema, type BrebKeyResolution, BrebKeyResolutionSchema, type BrebKeyType, BrebKeyTypeSchema, type CardToken, CardTokenSchema, type CreatePaymentLinkInput, CreatePaymentLinkInputSchema, type CreatePaymentSourceInput, CreatePaymentSourceInputSchema, type CreatePayoutFileInput, CreatePayoutFileInputSchema, type CreatePayoutInput, CreatePayoutInputSchema, type CreatePayoutResult, CreatePayoutResultSchema, type CreatePayoutTransaction, CreatePayoutTransactionSchema, type CreateTransactionInput, CreateTransactionInputSchema, type Currency, CurrencySchema, type CustomerData, CustomerDataSchema, type CustomerReference, CustomerReferenceSchema, type FinancialInstitution, FinancialInstitutionSchema, type InputValidationErrorResponse, InputValidationErrorResponseSchema, type LegalIdType, LegalIdTypeSchema, MAX_AMOUNT_IN_CENTS, type Merchant, type MerchantLegalIdType, MerchantLegalIdTypeSchema, MerchantSchema, type NequiToken, NequiTokenSchema, type NequiTokenStatus, NequiTokenStatusSchema, type NequiTokenUpdatedEvent, NequiTokenUpdatedEventSchema, type NotFoundErrorResponse, NotFoundErrorResponseSchema, type OrderDirection, OrderDirectionSchema, PAYOUT_FILE_EXTENSIONS, type PaymentLink, type PaymentLinkCustomerData, PaymentLinkCustomerDataSchema, PaymentLinkSchema, type PaymentMethodType, PaymentMethodTypeSchema, type PaymentSource, type PaymentSourcePublicData, PaymentSourcePublicDataSchema, PaymentSourceSchema, type PaymentSourceStatus, PaymentSourceStatusSchema, type PaymentSourceType, PaymentSourceTypeSchema, type Payout, type PayoutAccount, type PayoutAccountListParams, PayoutAccountListParamsSchema, PayoutAccountSchema, type PayoutAccountStatus, PayoutAccountStatusSchema, type PayoutAccountType, PayoutAccountTypeSchema, type PayoutApiErrorResponse, PayoutApiErrorResponseSchema, type PayoutBank, PayoutBankSchema, type PayoutEvent, type PayoutEventPayee, PayoutEventPayeeSchema, PayoutEventSchema, type PayoutEventTransaction, PayoutEventTransactionSchema, PayoutFailureReasonSchema, type PayoutFee, PayoutFeeSchema, type PayoutFileType, PayoutFileTypeSchema, type PayoutHealth, PayoutHealthSchema, PayoutIdempotencyKeySchema, type PayoutLegalIdType, PayoutLegalIdTypeSchema, type PayoutLimits, PayoutLimitsSchema, type PayoutListParams, PayoutListParamsSchema, type PayoutPage, type PayoutPayeeInfo, PayoutPayeeInfoSchema, type PayoutPayerInfo, PayoutPayerInfoSchema, type PayoutPaymentType, PayoutPaymentTypeSchema, type PayoutPersonType, PayoutPersonTypeSchema, type PayoutRecurring, PayoutRecurringSchema, type PayoutReport, type PayoutReportListParams, PayoutReportListParamsSchema, type PayoutReportPage, PayoutReportPageSchema, PayoutReportSchema, type PayoutReportUrlParams, PayoutReportUrlParamsSchema, PayoutSchema, type PayoutStatus, PayoutStatusSchema, type PayoutTransaction, type PayoutTransactionListParams, PayoutTransactionListParamsSchema, PayoutTransactionSchema, type PayoutTransactionStatus, PayoutTransactionStatusSchema, type PayoutTransactionUpdatedEvent, PayoutTransactionUpdatedEventSchema, type PayoutTransactionsByReferenceParams, PayoutTransactionsByReferenceParamsSchema, type PayoutUpdatedEvent, PayoutUpdatedEventSchema, type PresignedAcceptance, PresignedAcceptanceSchema, type RechargePayoutAccountInput, RechargePayoutAccountInputSchema, type Result, type ShippingAddress, ShippingAddressSchema, type Tax, type TaxByAmount, TaxByAmountSchema, type TaxByPercentage, TaxByPercentageSchema, TaxSchema, type TaxType, TaxTypeSchema, type TokenizeCardInput, TokenizeCardInputSchema, type TokenizeNequiInput, TokenizeNequiInputSchema, type Transaction, type TransactionListParams, TransactionListParamsSchema, type TransactionPaymentMethod, TransactionPaymentMethodSchema, TransactionSchema, type TransactionStatus, TransactionStatusSchema, type TransactionUpdatedEvent, TransactionUpdatedEventSchema, type UpdatePaymentLinkInput, UpdatePaymentLinkInputSchema, type VoidTransactionInput, VoidTransactionInputSchema, type VoidTransactionResult, VoidTransactionResultSchema, type WebhookEvent, WebhookEventSchema, type WebhookSignature, WebhookSignatureSchema, type WompiClientOptions, WompiClientOptionsSchema, WompiError, type WompiErrorResult, WompiNotFoundError, WompiPayoutApiError, type WompiPayoutsClientOptions, WompiPayoutsClientOptionsSchema, WompiRequestError, WompiValidationError, WompiWebhookVerificationError, isGzipPayoutFile, payoutPage, wompiListResponse, wompiResponse };