feat: Add user API key methods#1655
Conversation
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Original prompt from drew.emery
|
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Greptile SummaryThis PR adds user-scoped API key methods to User Management. The main changes are:
Confidence Score: 5/5This PR is safe to merge with minimal risk. The changes follow existing SDK patterns for pagination, serialization, idempotency request options, and response deserialization. Tests cover the key request and response paths. No new correctness or security issues were identified beyond the previously discussed fixture concern, which is not repeated. No files require special attention.
What T-Rex did
Important Files Changed
|
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Add
userManagement.listUserApiKeys()anduserManagement.createUserApiKey()for the user-scoped API key endpoints. The new types and serializers cover pagination, organization filtering, optional permissions and expiration, idempotency keys, and camel-cased user ownership metadata.This complements #1650, which already added dual-owner
ApiKey.ownertypes and camelizedowner.organizationIdduring validation deserialization.Documentation
Does this require changes to the WorkOS Docs? E.g. the API Reference or code snippets need updates.
If yes, link a related docs PR and add a docs maintainer as a reviewer. Their approval is required.
Link to Devin session: https://app.devin.ai/sessions/d37c887495594308a34bd8db9556dee9
Requested by: @ethinallen