import { ContentType, HttpClient, RequestParams, } from "/@/api/admin/http-client";
import { pushTemplateModel, TemplateFilterDtoResult, TemplateFilterDto,PageInputPushTemplateFilterModel } from "/@/api/admin/AlarmService/pushTemplateDto";
import { AxiosResponse } from "axios/index";

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

    /**
     * No description
     *
     * @tags
     * @name updateForm
     * @summary 上传模板
     * @request POST:
     * @secure
     */
    addForm = (data: pushTemplateModel, params: RequestParams = {}) =>
        this.request<AxiosResponse, any>({
            path: '/api/app/push/upload-template',
            method: 'POST',
            body: data,
            secure: true,
            type: ContentType.Json,
            format: 'json',
            ...params
        }
        )

    /**
    * No description
    *
    * @tags
    * @name getPageData
    * @summary 查询
    * @request GET:
    * @secure
    */
    getData = (data?: TemplateFilterDto, params: RequestParams = {}) =>
        this.request<TemplateFilterDtoResult, any>({
            path: '/api/app/push/get-push-template',
            method: 'POST',
            secure: true,
            type: ContentType.Json,
            format: 'json',
            body:data,
            ...params
        })

    getPage = (data: PageInputPushTemplateFilterModel, params: RequestParams = {}) =>
        this.request<TemplateFilterDtoResult, any>({
            path: '/api/app/push/get-push-template',
            method: 'POST',
            body: data,
            secure: true,
            type: ContentType.Json,
            format: 'json',
            ...params
        })
}
