/** * 钱包列表查询参数接口 */ export interface IWalletListParmsProps { tags?: string[]; sales_status?: 1 | 0 | -1; machine_search?: string; createdDate?: string; limit_status?: string; relation_id?: string; relation_type?: string; customer_id?: number; sort?: 'desc' | 'asc'; order_by?: string; used_status?: string; num?: number; skip?: number; filter_wallet_id?: string; filter_holder_id?: string; available: 0 | 1; with?: string[]; } /** * 钱包列表项属性接口 */ export interface IWalletListItemProps { id?: number | string; encoded?: string; code?: string; limit_status?: string; customer_id?: number; generate_method?: 'not_settable' | 'before_order' | 'after_order'; created_at?: string; product_id?: number; sales_status?: 1 | 0; tag?: string; status?: string; redeemed_at?: string; collection_time?: string; order_id?: number; par_value?: string; write_status?: number; expire_date?: string; balance?: string; extension_id?: string; product_title?: string; product_cover?: string; product?: IProductProps; unified_available_status?: 0 | 1; unified_error_code?: number; shop: IShop; unified_messages: any; machinecode_config?: { hide_recharge?: number; }; } /** * 商店信息接口 */ export interface IShop { name: string; id: number; } /** * 商品属性接口 */ export interface IProductProps { id?: number; title?: string; description?: string; } /** * API响应接口 */ export interface ApiResponse { data: T; code?: number; message?: string; } /** * 错误处理函数类型 */ export declare type ErrorCallback = () => void; /** * 获取钱包列表 * @param params 查询参数 * @returns Promise<{list: IWalletListItemProps[], count: number}> 钱包列表和总数 * @throws 请求失败时抛出错误 */ export declare const getWalletPassList: (params: IWalletListParmsProps, options?: { apiPrefix: string; }) => Promise<{ list: IWalletListItemProps[]; count: number; }>; /** * 通过code绑定客户 * @param params 请求参数,包含code * @param errCallback 错误回调 * @returns Promise 绑定结果 */ export declare const bindCodeToCustomer: (params: { code: string; }) => Promise; /** * 用户根据code查询待绑定识别码列表 * @param params 请求参数,包含code和tag * @param errCallback 错误回调函数 * @returns Promise 未绑定的钱包卡列表 */ export declare const getUnbindList: (params: { code: string; tag?: string; }) => Promise; /** * 下单请求参数接口 */ export interface IOrderParams { voucher_id: string; product_id: string; product_variant_id: string; quantity: number; type: string; platform: string; currency_code: { currency_code: string; currency_symbol: string; currency_format: string; }; } /** * 下单 * @param params 下单参数 * @returns Promise 下单结果 * @throws 请求失败时抛出错误 */ export declare const goOrder: (params: IOrderParams) => Promise; /** * 设置请求对象 * @param req 请求对象 */ export declare const setRequest: (req: any) => void; interface IAssetListProps { skip?: string; num?: string; card_id?: string; sourceType?: string; business_object?: string; tag?: string; } export interface IAssetItem { id?: string; tag?: 'gift_card' | 'product_voucher' | 'point_card' | 'product_discount_card'; shop_id?: string; transaction_id?: string; title?: string; created_at?: string; amount?: string; balance?: string; currency_symbol?: string; action?: 'recharge' | 'order_expend' | 'order_refund' | 'expire'; } /** * 资产明细列表 * @param params 接口请求参数 * @returns 资产明细列表 */ export declare const getAssetList: (params: IAssetListProps) => Promise<{ list: IAssetItem[]; }>; /** * 资产明细(admin) */ export declare const getActiveLogs: (params: { filter_card_id: string; }) => Promise<{ list: IAssetItem[]; }>; /** * 获取资产详情 * @param params 接口请求参数 * @returns 资产详情 */ export declare const getDetailApi: (params: { id: string; order_behavior_count_customer_id: string; apiPrefix: string; }) => Promise; /** * 详情响应数据结构,供组件消费 */ export interface IDetailResponse { detailId?: string; productId?: string; gift_option?: Array<{ id: string; name: string; gift_price: number; price: number; variant_id?: string; }>; [key: string]: any; } interface OrderParams { voucher_id: string; product_id: string; product_variant_id: string; quantity: number; type: string; platform: string; currency_code: { currency_code: string; currency_symbol: string; currency_format: string; }; } interface OrderResponse { order_id: string; } /** * 下单接口 * @param params - 订单参数 * @returns 订单响应数据 */ export declare const orderRechargeProduct: (params: OrderParams) => Promise; /** * @desc: 获取钱包信息 * @author: Arthur * @date: 2025-11-03 15:30 */ export declare const getWalletDetail: (id: string | number) => Promise; /** * 更新卡券持有人 * @param id 卡券ID * @param params 更新参数 * @returns 更新结果 */ export declare const updateWalletPassHolder: (id: string, params: any) => Promise; /** * 获取卡券详情 * @param id 卡券ID * @returns 卡券详情 */ export declare const getWalletPassDetail: (id: string, params: any) => Promise; export {};