@ministryofjustice/hmpps-digital-prison-reporting-frontend
Version:
The Digital Prison Reporting Frontend contains templates and code to help display data effectively in UI applications.
31 lines (28 loc) • 984 B
TypeScript
import { ReportingClient } from '../data/reportingClient.js';
import { ServiceFeatureConfig } from '../types/DprConfig.js';
declare 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;
}[]>;
}
export { SubscriptionService as default };