/* eslint-disable */
/* tslint:disable */
/*
 * ---------------------------------------------------------------
 * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API        ##
 * ##                                                           ##
 * ## AUTHOR: adademo / https://github.com/adademo/swagger-typescript-api ##
 * ## SOURCE: https://github.com/adademo/swagger-typescript-api ##
 * ---------------------------------------------------------------
 */

import { RevokeReasonPageInput, RevokeReasonPageResponse, RevokeReasonOutput, RevokeReasonAddInput, RevokeReasonUpdateInput, RevokeTypeEnumListOutput } from '/@/api/types/RevokeType'
import { RequestParams } from './http-client'
import { ContentType, HttpClient } from './http-client'

export class RevokeReasonApi extends HttpClient {
  /**
   * 获取分页列表
   */
  getPage = (data: RevokeReasonPageInput, params: RequestParams = {}) =>
    this.request<RevokeReasonPageResponse>({
      path: `/api/admin/revoke-reason/get-page`,
      method: 'POST',
      body: data,
      type: ContentType.Json,
      ...params,
    })

  /**
   * 获取单条数据
   */
  get = (params: { id: number }, requestParams: RequestParams = {}) =>
    this.request<RevokeReasonOutput>({
      path: `/api/admin/revoke-reason/get`,
      method: 'GET',
      query: params,
      ...requestParams,
    })

  /**
   * 新增
   */
  add = (data: RevokeReasonAddInput, params: RequestParams = {}) =>
    this.request<any>({
      path: `/api/admin/revoke-reason/add`,
      method: 'POST',
      body: data,
      type: ContentType.Json,
      ...params,
    })

  /**
   * 更新
   */
  update = (data: RevokeReasonUpdateInput, params: RequestParams = {}) =>
    this.request<any>({
      path: `/api/admin/revoke-reason/update`,
      method: 'PUT',
      body: data,
      type: ContentType.Json,
      ...params,
    })

  /**
   * 软删除
   */
  softDelete = (params: { id: number }, requestParams: RequestParams = {}) =>
    this.request<any>({
      path: `/api/admin/revoke-reason/soft-delete`,
      method: 'DELETE',
      query: params,
      ...requestParams,
    })

  /**
   * 获取撤回类型枚举列表
   */
  getRevokeTypeEnumList = (params: RequestParams = {}) =>
    this.request<RevokeTypeEnumListOutput>({
      path: `/api/admin/revoke-reason/get-revoke-type-enum-list`,
      method: 'GET',
      ...params,
    })
}
