Skip to content

Consolidate stream files types into common workspace #1296

@coderabbitai

Description

@coderabbitai

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 in client/src/typings/query.ts
  • StreamFileMetadataSchema in server/src/typings/stream-files.ts

The ExtractStreamResp interface has an incorrect _id field and duplicates functionality.

Proposed Solution

  1. Move StreamFileMetadataSchema to common workspace
  2. Update submitExtractStreamJob to use Static<StreamFileExtractionSchema> as props and return Static<StreamFileMetadataSchema>
  3. Delete duplicate interface ExtractStreamResp from client
  4. Delete server/src/typings/stream-files.ts (the type StreamFilesCollection = Collection<StreamFileMetadata> can be inlined as Collection<StreamFileMetadata> in the two places it's used)

Benefits

Requested by: @hoophalab
Referenced in: #1289 (comment)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions