2023-03-03 16:23:46 +01:00
|
|
|
import { inject, injectable } from "tsyringe";
|
|
|
|
|
|
|
|
import { NoteController } from "../controllers/NoteController";
|
|
|
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
|
|
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
|
|
|
import { INoteActionData } from "../models/eft/notes/INoteActionData";
|
|
|
|
|
|
|
|
@injectable()
|
|
|
|
export class NoteCallbacks
|
|
|
|
{
|
|
|
|
constructor(
|
|
|
|
@inject("NoteController") protected noteController: NoteController)
|
|
|
|
{ }
|
|
|
|
|
2023-07-15 15:49:25 +02:00
|
|
|
/** Handle AddNote event */
|
2023-03-03 16:23:46 +01:00
|
|
|
public addNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse
|
|
|
|
{
|
|
|
|
return this.noteController.addNote(pmcData, body, sessionID);
|
|
|
|
}
|
|
|
|
|
2023-07-15 15:49:25 +02:00
|
|
|
/** Handle EditNote event */
|
2023-03-03 16:23:46 +01:00
|
|
|
public editNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse
|
|
|
|
{
|
|
|
|
return this.noteController.editNote(pmcData, body, sessionID);
|
|
|
|
}
|
|
|
|
|
2023-07-15 15:49:25 +02:00
|
|
|
/** Handle DeleteNote event */
|
2023-03-03 16:23:46 +01:00
|
|
|
public deleteNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse
|
|
|
|
{
|
|
|
|
return this.noteController.deleteNote(pmcData, body, sessionID);
|
|
|
|
}
|
|
|
|
}
|