Add employee apis#96
Conversation
- Introduce OrganizationApiKey model in Prisma schema - Create API key schema and validation in actions - Update ActionResponse type to support more detailed error handling - Add API keys section to settings layout and translations - Prepare groundwork for API key creation, management, and security features
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
Caution Review failedThe pull request is closed. WalkthroughThis update implements a comprehensive API key management system. New actions allow creating, retrieving, and revoking API keys with proper input validation, key generation, hashing, and expiration handling. The changes introduce new API endpoints, UI components, and a settings page with updated navigation. Localization files are extended with API key-related strings, and database migrations add a dedicated table with the necessary indexes and constraints. Additional endpoints for employee management and updates to common types ensure consistency across the application. Changes
Sequence Diagram(s)sequenceDiagram
participant U as User
participant D as CreateApiKeyDialog
participant A as createApiKeyAction
participant DB as Database
U->>D: Submit API key form (name, expiresAt)
D->>A: Invoke createApiKeyAction
A->>A: Validate input & generate key, salt, hash
A->>DB: Store API key record
DB-->>A: Return stored record
A-->>D: Return plain text API key
D->>U: Display key and copy option
sequenceDiagram
participant U as User
participant T as ApiKeysTable
participant R as revokeApiKeyAction
participant DB as Database
U->>T: Click "Revoke" on API key
T->>R: Invoke revokeApiKeyAction(apiKeyId)
R->>DB: Update API key (set isActive = false)
DB-->>R: Confirmation/Error response
R-->>T: Return status message
T->>U: Display revocation result
Possibly related PRs
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (22)
✨ Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Summary by CodeRabbit