( projectId: string )
| 233 | } |
| 234 | |
| 235 | export async function getGroupPropertyKeys( |
| 236 | projectId: string |
| 237 | ): Promise<string[]> { |
| 238 | const rows = await chQuery<{ key: string }>(` |
| 239 | SELECT DISTINCT arrayJoin(mapKeys(properties)) as key |
| 240 | FROM ${TABLE_NAMES.groups} FINAL |
| 241 | WHERE project_id = ${sqlstring.escape(projectId)} |
| 242 | AND deleted = 0 |
| 243 | `); |
| 244 | return rows.map((r) => r.key).sort(); |
| 245 | } |
| 246 | |
| 247 | export type IServiceGroupStats = { |
| 248 | groupId: string; |