export class PgNotifyContext { private readonly processId : number ; private readonly channel : string | Record < string , any > ; private readonly data ? : any ; private readonly requestId ? : string ; constructor ( processId , channel , data ? , requestId ? ) { this . processId = processId ; this . data = data ; this . requestId = requestId ; try { this . channel = JSON . parse ( channel ) ; } catch ( error ) { this . channel = channel ; } } public getProcessId ( ) { return this . processId ; } public getChannel ( ) { return this . channel ; } public getData ( ) { return this . data ; } public getRequestId ( ) { return this . requestId ; } }