MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / handleLowBalanceAlert

Function handleLowBalanceAlert

packages/billing/src/org-monitoring.ts:197–210  ·  view source on GitHub ↗
(
  params: OrganizationCreditAlert & {
    logger: Logger
  },
)

Source from the content-addressed store, hash-verified

195}
196
197async function handleLowBalanceAlert(
198 params: OrganizationCreditAlert & {
199 logger: Logger
200 },
201): Promise<void> {
202 const { organizationId, currentBalance, logger } = params
203
204 // TODO: Send email to organization owners about low balance
205 // TODO: Suggest auto-topup or manual credit purchase
206 logger.info(
207 { organizationId, balance: currentBalance },
208 'Low balance alert sent to organization owners',
209 )
210}
211
212async function handleHighUsageAlert(
213 params: OrganizationCreditAlert & {

Callers 1

sendOrganizationAlertFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected