(id: string, projectId: string)
| 214 | } |
| 215 | |
| 216 | export async function deleteGroup(id: string, projectId: string) { |
| 217 | const existing = await getGroupById(id, projectId); |
| 218 | if (!existing) { |
| 219 | throw new Error(`Group ${id} not found`); |
| 220 | } |
| 221 | await writeGroupToCh( |
| 222 | { |
| 223 | id, |
| 224 | projectId, |
| 225 | type: existing.type, |
| 226 | name: existing.name, |
| 227 | properties: existing.properties as Record<string, string>, |
| 228 | createdAt: existing.createdAt, |
| 229 | }, |
| 230 | 1 |
| 231 | ); |
| 232 | return existing; |
| 233 | } |
| 234 | |
| 235 | export async function getGroupPropertyKeys( |
| 236 | projectId: string |
no test coverage detected