-
Notifications
You must be signed in to change notification settings - Fork 83
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:
ExtractStreamRespinterface inclient/src/typings/query.tsStreamFileMetadataSchemainserver/src/typings/stream-files.ts
The ExtractStreamResp interface has an incorrect _id field and duplicates functionality.
Proposed Solution
- Move
StreamFileMetadataSchematocommonworkspace - Update
submitExtractStreamJobto useStatic<StreamFileExtractionSchema>as props and returnStatic<StreamFileMetadataSchema> - Delete duplicate
interface ExtractStreamRespfrom 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