UNPKG

@ministryofjustice/hmpps-digital-prison-reporting-frontend

Version:

The Digital Prison Reporting Frontend contains templates and code to help display data effectively in UI applications.

29 lines (28 loc) 1.41 kB
import ReportStoreService from '../../../../services/reportStoreService'; import ReportDataStore from '../../../../data/reportDataStore'; import { ReportType } from '../../../../types/UserReports'; import { ReportStoreConfig } from '../../../../types/ReportStore'; import { BookmarkStoreData } from '../../../../types/Bookmark'; import { ServiceFeatureConfig } from '../../../../types/DprConfig'; declare class BookmarkService extends ReportStoreService { enabled: boolean; constructor(reportDataStore: ReportDataStore, serviceFeatureConfig: ServiceFeatureConfig); getAllBookmarks(userId: string): Promise<BookmarkStoreData[]>; addBookmark(userId: string, reportId: string, id: string, type: ReportType, automatic?: boolean): Promise<void>; removeBookmark(userId: string, id: string, reportId: string): Promise<void>; isBookmarked: (id: string, reportId: string, userId: string) => Promise<boolean | undefined>; private isBookmarkedCheck; private getBookmark; createBookMarkButtonHtml({ userConfig, reportId, id, csrfToken, ctxId, reportType, isMissing, endpoint, }: { userConfig: ReportStoreConfig; reportId: string; id: string; csrfToken: string; ctxId: string; reportType: ReportType; isMissing: boolean; endpoint: string; }): Promise<string>; } export { BookmarkService }; export default BookmarkService;