import { Inform } from "../model/inform.model"; import { InformSearchParam } from "../search/inform-search-param.model"; import { HostConfig } from '../config/host.config'; import { Injectable } from '@angular/core'; import { HttpHandler } from './http-handler.service'; import { Page } from '../response/page.type'; @Injectable({ providedIn: 'root', }) export class InformService { static PATH = '/inform'; constructor(private httpHandler: HttpHandler) {} searchNotifyRule(informSearchParam: InformSearchParam,page: number,size: number, header?: any): Promise> { return this.httpHandler.post>(`${HostConfig.DEV_HOST}${InformService.PATH}/search?page=${page}&size=${size}` ,informSearchParam, header); } markRead(informSearchParam: InformSearchParam, header?: any): Promise { return this.httpHandler.post(`${HostConfig.DEV_HOST}${InformService.PATH}/markRead` ,informSearchParam, header); } countMarkRead(informSearchParam: InformSearchParam, header?: any): Promise { return this.httpHandler.post(`${HostConfig.DEV_HOST}${InformService.PATH}/countMarkRead` ,informSearchParam, header); } }