"""WeChat XPay (Virtual Payment) Python SDK."""

from wechat_xpay import models
from wechat_xpay.async_client import XPayAsyncClient
from wechat_xpay.auth import (
    calc_pay_sig,
    calc_signature,
    generate_nonce_str,
    generate_request_signature,
    generate_timestamp,
    verify_webhook_signature,
)
from wechat_xpay.client import XPayClient
from wechat_xpay.exceptions import (
    ERR_ACCOUNT_FROZEN,
    ERR_ADVER_FUNDS_NOT_ENOUGH,
    ERR_AMOUNT_MISMATCH,
    ERR_BAD_REQUEST_PARAMS,
    ERR_BALANCE_NOT_ENOUGH,
    ERR_BATCH_TASK_FAILED,
    ERR_BATCH_TASK_RUNNING,
    ERR_BILL_GENERATING,
    ERR_CANNOT_REFUND_VERIFIED_ORDER,
    ERR_COMPLAINT_NOT_EXIST,
    ERR_DATA_GENERATING,
    ERR_DUPLICATE_OPERATION,
    ERR_IMAGE_FORMAT_NOT_SUPPORTED,
    ERR_IMAGE_SIZE_EXCEEDED,
    ERR_INSUFFICIENT_TOKEN_BALANCE,
    ERR_INVALID_APPID,
    ERR_INVALID_BODY_PARAM,
    ERR_INVALID_ENV,
    ERR_INVALID_FILE_TYPE,
    ERR_INVALID_GOODS_CONFIG,
    ERR_INVALID_MEDIA_TYPE,
    ERR_INVALID_OPENID,
    ERR_INVALID_SIGN_TYPE,
    ERR_INVALID_TRANSACTION_ID,
    ERR_LEFT_FEE_MISMATCH,
    ERR_MCH_ACCOUNT_ABNORMAL,
    ERR_MCH_CONFIG_LIMITED,
    ERR_MCH_NO_PERMISSION,
    ERR_MCH_NOT_EXISTS,
    ERR_MEDIA_UPLOAD_FAILED,
    ERR_NEGOTIATION_FAILED,
    ERR_ORDER_ALREADY_REFUNDED,
    ERR_ORDER_CLOSED,
    ERR_ORDER_NOT_EXIST,
    ERR_ORDER_PAID,
    ERR_RATE_LIMIT_EXCEEDED,
    ERR_REAL_NAME_REQUIRED,
    ERR_REFUND_AMOUNT_LIMIT,
    ERR_REFUND_APPLICATION_EXIST,
    ERR_REFUND_FEE_EXCEEDED,
    ERR_REFUND_FEE_LIMIT,
    ERR_REFUND_IN_PROGRESS,
    ERR_REFUND_NOT_EXIST,
    ERR_SENSITIVE_CONTENT,
    ERR_SERVICE_NOT_ENABLED,
    ERR_SESSION_KEY_EXPIRED,
    ERR_SIGN_VERIFICATION_FAILED,
    ERR_SIGNATURE_ERROR,
    ERR_SYSTEM_BUSY,
    ERR_SYSTEM_ERROR,
    ERR_TOKEN_NOT_PUBLISHED,
    ERR_TRANSFER_ACCOUNT_NOT_BOUND,
    ERR_UPLOAD_FILE_FAILED,
    ERR_USER_NOT_REGISTERED,
    ERR_VIDEO_FORMAT_NOT_SUPPORTED,
    ERR_VIDEO_SIZE_EXCEEDED,
    ERR_WITHDRAW_AMOUNT_LIMIT,
    ERR_WITHDRAW_COUNT_LIMIT,
    ERR_WITHDRAW_FEE_LIMIT,
    XPayAPIError,
    XPayError,
)

__all__ = [
    # Client
    "XPayClient",
    "XPayAsyncClient",
    # Auth
    "calc_pay_sig",
    "calc_signature",
    "generate_request_signature",
    "verify_webhook_signature",
    "generate_timestamp",
    "generate_nonce_str",
    # Exceptions
    "XPayError",
    "XPayAPIError",
    # Error Codes
    "ERR_SYSTEM_ERROR",
    "ERR_INVALID_OPENID",
    "ERR_BAD_REQUEST_PARAMS",
    "ERR_SIGNATURE_ERROR",
    "ERR_DUPLICATE_OPERATION",
    "ERR_ORDER_ALREADY_REFUNDED",
    "ERR_INSUFFICIENT_TOKEN_BALANCE",
    "ERR_SENSITIVE_CONTENT",
    "ERR_TOKEN_NOT_PUBLISHED",
    "ERR_SESSION_KEY_EXPIRED",
    "ERR_DATA_GENERATING",
    "ERR_BATCH_TASK_RUNNING",
    "ERR_CANNOT_REFUND_VERIFIED_ORDER",
    "ERR_REFUND_IN_PROGRESS",
    "ERR_RATE_LIMIT_EXCEEDED",
    "ERR_LEFT_FEE_MISMATCH",
    "ERR_ACCOUNT_FROZEN",
    "ERR_ADVER_FUNDS_NOT_ENOUGH",
    "ERR_AMOUNT_MISMATCH",
    "ERR_BALANCE_NOT_ENOUGH",
    "ERR_BATCH_TASK_FAILED",
    "ERR_BILL_GENERATING",
    "ERR_COMPLAINT_NOT_EXIST",
    "ERR_IMAGE_FORMAT_NOT_SUPPORTED",
    "ERR_IMAGE_SIZE_EXCEEDED",
    "ERR_INVALID_APPID",
    "ERR_INVALID_BODY_PARAM",
    "ERR_INVALID_ENV",
    "ERR_INVALID_FILE_TYPE",
    "ERR_INVALID_GOODS_CONFIG",
    "ERR_INVALID_MEDIA_TYPE",
    "ERR_INVALID_SIGN_TYPE",
    "ERR_INVALID_TRANSACTION_ID",
    "ERR_MCH_ACCOUNT_ABNORMAL",
    "ERR_MCH_CONFIG_LIMITED",
    "ERR_MCH_NO_PERMISSION",
    "ERR_MCH_NOT_EXISTS",
    "ERR_MEDIA_UPLOAD_FAILED",
    "ERR_NEGOTIATION_FAILED",
    "ERR_ORDER_CLOSED",
    "ERR_ORDER_NOT_EXIST",
    "ERR_ORDER_PAID",
    "ERR_REAL_NAME_REQUIRED",
    "ERR_REFUND_AMOUNT_LIMIT",
    "ERR_REFUND_APPLICATION_EXIST",
    "ERR_REFUND_FEE_EXCEEDED",
    "ERR_REFUND_FEE_LIMIT",
    "ERR_REFUND_NOT_EXIST",
    "ERR_SERVICE_NOT_ENABLED",
    "ERR_SIGN_VERIFICATION_FAILED",
    "ERR_SYSTEM_BUSY",
    "ERR_TRANSFER_ACCOUNT_NOT_BOUND",
    "ERR_UPLOAD_FILE_FAILED",
    "ERR_USER_NOT_REGISTERED",
    "ERR_VIDEO_FORMAT_NOT_SUPPORTED",
    "ERR_VIDEO_SIZE_EXCEEDED",
    "ERR_WITHDRAW_AMOUNT_LIMIT",
    "ERR_WITHDRAW_COUNT_LIMIT",
    "ERR_WITHDRAW_FEE_LIMIT",
    # Models
    "models",
]
