import {ContentType, HttpClient, RequestParams,} from "/@/api/admin/http-client";
import {
  oilSdkAuthorDtoResult,
  oilSdkAuthorPostPageDto,
  oilSdkTableModel
} from "/@/api/admin/deviceAuthorization/oilSdkAuthorDto";
import {AxiosResponse} from "axios/index";

export class OilSdkAuthorAPI<SecurityDataType = unknown> extends HttpClient<SecurityDataType>{

 /**
 * No description
 *
 * @tags
 * @name getPageData
 * @summary 分页查询
 * @request GET:
 * @secure
 */
 getPageData = (query: oilSdkAuthorPostPageDto, params: RequestParams = {}) =>
   this.request<oilSdkAuthorDtoResult, any>({
     path:'/api/app/fueiling-sdk-auth/get-page',
     method: 'GET',
     secure: true,
     type: ContentType.Json,
     format: 'json',
     query:query,
     ...params
   })

  /**
   * No description
   *
   * @tags
   * @name updateForm
   * @summary 添加授权
   * @request POST:
   * @secure
   */
  addForm = (data:oilSdkTableModel, params: RequestParams = {}) =>
    this.request<AxiosResponse,any>({
        path:'/api/app/fueiling-sdk-auth/add',
        method: 'POST',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params
      }
    )

  /**
  * No description
  *
  * @tags
  * @name updateForm
  * @summary 更新授权
  * @request PUT:
  * @secure
  */
  updateForm = (data:oilSdkTableModel, params: RequestParams = {}) =>
    this.request<AxiosResponse,any>({
        path:'/api/app/fueiling-sdk-auth/update',
        method: 'PUT',
        body: data,
        secure: true,
        type: ContentType.Json,
        format: 'json',
        ...params
    }
    )
}
