Commit 9de4aa9
authored
feat(notifications): add auto top-up notification for organization owners (#970)
## Summary
Adds a new `generateAutoTopUpOrgsNotification` notification generator
that promotes the auto top-up feature to organization owners. The
notification is only shown to users who have `'owner'` role in at least
one organization, using the existing `getUserOrganizationsWithSeats`
function to check membership roles. Wired into the existing
`generateUserNotifications` aggregation alongside the other conditional
generators.
## Verification
- [x] `pnpm typecheck` — passes cleanly, no type errors
## Visual Changes
N/A
## Reviewer Notes
- The `OrganizationRole` type is `'owner' | 'member' |
'billing_manager'` — there is no `'admin'` role in the schema, so the
check filters on `role === 'owner'` only, which is the admin-equivalent
role for organizations.
- The function reuses the existing `getUserOrganizationsWithSeats`
import already present in the file (used by
`generateAutoTopUpNotification` and `generateKiloPassNotification`).
---
Built for
[jobrietbergen](https://kilo-code.slack.com/archives/D0A4KC7N79S/p1773122885350309?thread_ts=1773121117.801719&cid=D0A4KC7N79S)
by [Kilo for Slack](https://kilo.ai/features/slack-integration)1 file changed
Lines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| 85 | + | |
85 | 86 | | |
86 | 87 | | |
87 | 88 | | |
| |||
153 | 154 | | |
154 | 155 | | |
155 | 156 | | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
156 | 177 | | |
157 | 178 | | |
158 | 179 | | |
| |||
0 commit comments