export type GetApiAdminMcpSupportFunnelfoxTransactionsByCardArgs = {'x-mcp-api-key': string, first6?: string | undefined, last4?: string | undefined, status?: string | undefined, page?: string | undefined, limit?: string | undefined}; export type GetApiAdminMcpSupportFunnelfoxTransactionsByCardOptions = {baseUrl: string, bearer?: string | undefined, fetch?: typeof fetch | undefined}; /** * Find FunnelFox transactions by a partial card number * * GET /admin/mcp/support/funnelfox-transactions/by-card */ export const getApiAdminMcpSupportFunnelfoxTransactionsByCard = async (args: GetApiAdminMcpSupportFunnelfoxTransactionsByCardArgs, options: GetApiAdminMcpSupportFunnelfoxTransactionsByCardOptions) => { const {baseUrl, fetch: fetchFn = fetch, bearer} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args['x-mcp-api-key'] != null) headers.set("x-mcp-api-key", String(args['x-mcp-api-key'])) if (args.first6 != null) query.append("first6", String(args.first6)) if (args.last4 != null) query.append("last4", String(args.last4)) if (args.status != null) query.append("status", String(args.status)) if (args.page != null) query.append("page", String(args.page)) if (args.limit != null) query.append("limit", String(args.limit)) if (bearer !== undefined) headers.set('authorization', `Bearer ${bearer}`) const url = `${baseUrl.replace(/\/+$/, '')}/admin/mcp/support/funnelfox-transactions/by-card${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "GET", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };