-
Notifications
You must be signed in to change notification settings - Fork 82
Open
Description
Context
This issue tracks the consolidation of stream files types that are currently duplicated between client and server components.
Related PR: #1289 - chore(webui): Move shared types to common workspace.
Discussion: #1289 (comment)
Problem
Currently there is duplication between:
ExtractStreamResp
interface inclient/src/typings/query.ts
StreamFileMetadataSchema
inserver/src/typings/stream-files.ts
The ExtractStreamResp
interface has an incorrect _id
field and duplicates functionality.
Proposed Solution
- Move
StreamFileMetadataSchema
tocommon
workspace - Update
submitExtractStreamJob
to useStatic<StreamFileExtractionSchema>
as props and returnStatic<StreamFileMetadataSchema>
- Delete duplicate
interface ExtractStreamResp
from client - Delete
server/src/typings/stream-files.ts
(thetype StreamFilesCollection = Collection<StreamFileMetadata>
can be inlined asCollection<StreamFileMetadata>
in the two places it's used)
Benefits
- Eliminates type duplication
- Ensures type consistency between client and server
- Follows the pattern established in PR refactor(webui): Move shared types to common workspace. #1289 of moving shared types to common workspace
Requested by: @hoophalab
Referenced in: #1289 (comment)
Metadata
Metadata
Assignees
Labels
No labels