Map a Prisma VoiceAspect record to VoiceAspectNode
(r: {
id: string;
fact: string;
aspect: string;
userId: string;
workspaceId: string | null;
episodeUuids: string[];
createdAt: Date;
validAt: Date;
invalidAt: Date | null;
invalidatedBy: string | null;
})
| 17 | |
| 18 | /** Map a Prisma VoiceAspect record to VoiceAspectNode */ |
| 19 | function toNode(r: { |
| 20 | id: string; |
| 21 | fact: string; |
| 22 | aspect: string; |
| 23 | userId: string; |
| 24 | workspaceId: string | null; |
| 25 | episodeUuids: string[]; |
| 26 | createdAt: Date; |
| 27 | validAt: Date; |
| 28 | invalidAt: Date | null; |
| 29 | invalidatedBy: string | null; |
| 30 | }): VoiceAspectNode { |
| 31 | return { |
| 32 | uuid: r.id, |
| 33 | fact: r.fact, |
| 34 | aspect: r.aspect as VoiceAspect, |
| 35 | userId: r.userId, |
| 36 | workspaceId: r.workspaceId ?? undefined, |
| 37 | episodeUuids: r.episodeUuids, |
| 38 | createdAt: r.createdAt, |
| 39 | validAt: r.validAt, |
| 40 | invalidAt: r.invalidAt, |
| 41 | invalidatedBy: r.invalidatedBy ?? undefined, |
| 42 | }; |
| 43 | } |
| 44 | |
| 45 | /** |
| 46 | * Save voice aspects from extraction and store their embeddings |
no outgoing calls
no test coverage detected