@ministryofjustice/hmpps-digital-prison-reporting-frontend
Version:
The Digital Prison Reporting Frontend contains templates and code to help display data effectively in UI applications.
28 lines (27 loc) • 941 B
TypeScript
import type ReportingClient from '../data/reportingClient';
import { ServiceFeatureConfig } from '../types/DprConfig';
export default class SubscriptionService {
private readonly reportingClient;
enabled: boolean;
constructor(reportingClient: ReportingClient, serviceFeatureConfig: ServiceFeatureConfig);
subscribe(token: string, reportId: string, id: string): Promise<{
tableId: string;
} | undefined>;
unsubscribe(token: string, reportId: string, id: string): Promise<{
success: boolean;
} | undefined>;
getSubscription(token: string, reportId: string, id: string): Promise<{
reportId: string;
id: string;
tableId: string;
createdAt: string;
addedAt: string;
}[]>;
getSubscriptions(token: string): Promise<{
reportId: string;
id: string;
tableId: string;
createdAt: string;
addedAt: string;
}[]>;
}