import httpClient from '@/services/http'
import { CommonFetchOptions } from '@/services/http/types'

/**
 * 履约管理--> 我的买履约、我的卖履约 --> 违约申请
 */
export function doBreach(options: CommonFetchOptions<{ request: Model.BreachReq; }>) {
    return httpClient.commonRequest('/performance/doBreach', 'get', options)
}

/**
 * 履约管理--> 我的买履约、我的卖履约 --> 延期申请
 */
export function doDelay(options: CommonFetchOptions<{ request: Model.DelayReq; }>) {
    return httpClient.commonRequest('/performance/doDelay', 'get', options)
}

/**
 * 履约管理--> 我的买履约、我的卖履约 --> 获取列表
 */
export function queryPerformanceList(options: CommonFetchOptions<{ request: Model.PerformanceReq;  response: Model.PerformanceRsq[]}>) {
    return httpClient.commonRequest('/performance/query', 'get', options)
}

/**
 * 履约管理--> 我的买履约、我的卖履约 --> 详情
 */
export function queryPerformanceView(options: CommonFetchOptions<{ request: Model.PerformanceViewReq;  response: Model.PerformanceViewRsq}>) {
    return httpClient.commonRequest('/performance/view', 'get', options)
}