-
Notifications
You must be signed in to change notification settings - Fork 2
Read the directory notification types from commons-ui #956
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,12 +6,7 @@ | |
| */ | ||
| import type { UUID } from 'node:crypto'; | ||
|
|
||
| export enum NotificationType { | ||
| DELETE_DIRECTORY = 'DELETE_DIRECTORY', | ||
| ADD_DIRECTORY = 'ADD_DIRECTORY', | ||
| UPDATE_DIRECTORY = 'UPDATE_DIRECTORY', | ||
| CASE_EXPORT_FINISHED = 'caseExportFinished', | ||
| } | ||
| const CASE_EXPORT_FINISHED = 'caseExportFinished'; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Preferably, we should keep a single enum for all notification types intended for gridexplore-app, just like in gridstudy-app, otherwise, it will become complicated to manage and understand
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The thing is this one is not really related to the other directory enumeration. So I extracted the shared notification in the lib and I've let this one there. |
||
|
|
||
| export interface DirectoryInfos { | ||
| uuid: UUID; | ||
|
|
@@ -24,12 +19,12 @@ export interface ExportCaseEventData { | |
| } | ||
|
|
||
| interface ExportCaseEventDataHeaders { | ||
| notificationType: NotificationType.CASE_EXPORT_FINISHED; | ||
| notificationType: typeof CASE_EXPORT_FINISHED; | ||
| userId: string; | ||
| exportUuid: UUID; | ||
| error: string | null; | ||
| } | ||
|
|
||
| export function isExportCaseNotification(notif: unknown): notif is ExportCaseEventData { | ||
| return (notif as ExportCaseEventData).headers?.notificationType === NotificationType.CASE_EXPORT_FINISHED; | ||
| return (notif as ExportCaseEventData).headers?.notificationType === CASE_EXPORT_FINISHED; | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to be reverted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't agree for me it's related to this work