Skip to content

feat: add quiet-hours, billing/usage, api-keys revoke, trash restore#1086

Merged
davedumto merged 1 commit into
davedumto:mainfrom
Akpamgbo:feat/close-1048-1045-1040-1022
Jun 25, 2026
Merged

feat: add quiet-hours, billing/usage, api-keys revoke, trash restore#1086
davedumto merged 1 commit into
davedumto:mainfrom
Akpamgbo:feat/close-1048-1045-1040-1022

Conversation

@Akpamgbo

Copy link
Copy Markdown
Contributor

Summary

Closes #1048
Closes #1045
Closes #1040
Closes #1022

Changes

#1048 — POST /api/routes-d/quiet-hours

Configure quiet hours for notifications. Validates enabled (boolean), startTime/endTime (HH:MM format when enabled), and days (mon–sun). Upserts a notificationPreference record with quietHours JSON.

#1045 — GET /api/routes-d/billing/usage

Current usage and plan limits. Aggregates invoice count, API call count, and storage bytes for the current billing period. Returns per-resource used/limit pairs based on the user's subscription plan (free/starter/pro/enterprise).

#1040 — DELETE /api/routes-d/api-keys/[id]

Revoke an API signing key. Verifies ownership, returns 404 if not found, 409 if already revoked. Sets revoked: true and revokedAt, returns 204 No Content.

#1022 — POST /api/routes-b/trash/[id]/restore

Restore an item from trash. Finds the trashItem by id and user, removes it from trash and clears deletedAt on the associated resource in a single $transaction. Wrapped with withRequestId.

Test plan

  • Quiet hours: 422 on non-boolean enabled, 422 on bad time format, 200 on success
  • Billing usage: 200 with correct plan limits and aggregated usage
  • API key revoke: 404 not found, 409 already revoked, 204 on success
  • Trash restore: 404 when not in trash, 200 with restored resource info

@vercel

vercel Bot commented Jun 25, 2026

Copy link
Copy Markdown

@Akpamgbo is attempting to deploy a commit to the david's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jun 25, 2026

Copy link
Copy Markdown

@Akpamgbo Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@davedumto davedumto merged commit 3d75d6d into davedumto:main Jun 25, 2026
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants