import { AvailableMethods } from 'redux/api/api' ; export type ForgedResponse = { [ K in keyof AvailableMethods ] : { apiMethod : K ; props : Parameters < AvailableMethods [ K ] > [ number ] ; result : any ; } ; } [ keyof AvailableMethods ] ; export const forgeResult = < R > ( data ) => ( { data : { data : JSON . stringify ( data ) , statusCode : 200 } } ) ; export const forgeMarketOrder = ( data ) => forgeResult ( data ) ; export const forgeLimitOrder = ( data ) => forgeResult ( data ) ; export const forgeAmendOrder = ( data ) => forgeResult ( data ) ; export const forgeOpenOrders = ( data ) => forgeResult ( data ) ; export const forgeOrderCancel = ( data ) => forgeResult ( data ) ; export const forgeOrderCancelAll = ( data ) => forgeResult ( data ) ; export const forgeProfitTargetOrder = ( data ) => forgeResult ( data ) ;