(chunkId: string)
| 2659 | } |
| 2660 | |
| 2661 | getTeamSharedChunk(chunkId: string): { chunkId: string; hubMemoryId: string; visibility: string; groupId: string | null; hubInstanceId: string; sharedAt: number } | null { |
| 2662 | const r = this.db.prepare("SELECT chunk_id, hub_memory_id, visibility, group_id, hub_instance_id, shared_at FROM team_shared_chunks WHERE chunk_id = ?").get(chunkId) as { |
| 2663 | chunk_id: string; hub_memory_id: string; visibility: string; group_id: string | null; hub_instance_id: string; shared_at: number; |
| 2664 | } | undefined; |
| 2665 | if (!r) return null; |
| 2666 | return { |
| 2667 | chunkId: r.chunk_id, |
| 2668 | hubMemoryId: r.hub_memory_id, |
| 2669 | visibility: r.visibility, |
| 2670 | groupId: r.group_id, |
| 2671 | hubInstanceId: r.hub_instance_id || "", |
| 2672 | sharedAt: r.shared_at, |
| 2673 | }; |
| 2674 | } |
| 2675 | |
| 2676 | deleteTeamSharedChunk(chunkId: string): boolean { |
| 2677 | const info = this.db.prepare("DELETE FROM team_shared_chunks WHERE chunk_id = ?").run(chunkId); |
no test coverage detected