@ministryofjustice/hmpps-digital-prison-reporting-frontend
Version:
The Digital Prison Reporting Frontend contains templates and code to help display data effectively in UI applications.
30 lines (27 loc) • 1.52 kB
TypeScript
import { ReportStoreService } from '../../../../services/reportStoreService.js';
import { ReportDataStore } from '../../../../data/reportDataStore.js';
import { SubscribedReport, StoredReportData } from '../../../../types/UserReports.js';
import { ServiceFeatureConfig } from '../../../../types/DprConfig.js';
declare class SubscriptionStoreService extends ReportStoreService {
enabled: boolean;
constructor(userDataStore: ReportDataStore, serviceFeatureConfig: ServiceFeatureConfig);
private getSubscriptionsState;
getAllReports(userId: string): Promise<SubscribedReport[]>;
getReportByExecutionId(id: string, userId: string): Promise<StoredReportData | undefined>;
getReportByTableId(id: string, userId: string): Promise<StoredReportData | undefined>;
addReport(userId: string, reportStateData: SubscribedReport): Promise<void>;
removeReport(userId: string, reportId: string, id: string): Promise<void>;
isSubscribed(reportId: string, id: string, userId: string): Promise<boolean>;
getSubscription(reportId: string, id: string, userId: string): Promise<StoredReportData | undefined>;
updateTimestamps(tsDataArray: {
tableId: string;
createdAt: string;
addedAt: string;
}[], userId: string): Promise<StoredReportData[]>;
updateRefreshedTimestamp(tsData: {
tableId: string;
createdAt: string;
addedAt: string;
}, subscriptions: StoredReportData[]): StoredReportData[];
}
export { SubscriptionStoreService as default };