Files
speckle-server/packages/server/modules/fileuploads/domain/events.ts
T
2025-06-02 08:22:20 +02:00

21 lines
580 B
TypeScript

import { FileUploadRecordV2 } from '@/modules/fileuploads/helpers/types'
export const fileuploadEventNamespace = 'fileupload' as const
const eventPrefix = `${fileuploadEventNamespace}.` as const
export const FileuploadEvents = {
Started: `${eventPrefix}started`
} as const
export type FileuploadEvents = (typeof FileuploadEvents)[keyof typeof FileuploadEvents]
type FileuploadStartedPayload = Pick<
FileUploadRecordV2,
'userId' | 'projectId' | 'fileSize' | 'fileType'
>
export type FileuploadEventsPayloads = {
[FileuploadEvents.Started]: FileuploadStartedPayload
}