* Builds the metadata bag attached to both stubs and fetched documents. Keeping a * single source ensures the stub and getDocument agree on tag inputs.
(recording: GrainRecording)
| 218 | * single source ensures the stub and getDocument agree on tag inputs. |
| 219 | */ |
| 220 | function buildMetadata(recording: GrainRecording): Record<string, unknown> { |
| 221 | return { |
| 222 | title: recordingTitle(recording), |
| 223 | duration: recording.duration_ms, |
| 224 | meetingDate: recording.start_datetime, |
| 225 | participants: participantNames(recording), |
| 226 | source: recording.source, |
| 227 | labels: recordingLabels(recording), |
| 228 | teams: teamNames(recording), |
| 229 | meetingType: recording.meeting_type?.name, |
| 230 | } |
| 231 | } |
| 232 | |
| 233 | /** |
| 234 | * Builds the deferred listing stub for a recording. Content is fetched lazily in |
no test coverage detected