feat: add update_employee operation to EmployeeAPI#3
Conversation
- add update_employee posting the payload to omni/employees/<id>/update.json, mirroring update_person - add the matching type stub typed as update_employee(object_id, payload: EmployeeDelta) -> Employee - note the new operation in the CHANGELOG unreleased section
|
Warning Review limit reached
More reviews will be available in 43 minutes and 38 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthrough
ChangesEmployee update operation
Poem
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Adds an update_employee operation to the EmployeeAPI client (and its type stub) so callers can update an employee via POST omni/employees/<id>/update.json, aligning with existing update_* client patterns.
Changes:
- Added
EmployeeAPI.update_employee(object_id, payload)implementation posting JSON payload to the update endpoint. - Added matching
update_employeemethod signature tosrc/omni/employee.pyiusingEmployeeDelta -> Employee. - Added an Unreleased CHANGELOG entry documenting the new operation.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/omni/employee.py | Adds update_employee method that posts to omni/employees/%d/update.json. |
| src/omni/employee.pyi | Adds update_employee type stub mirroring existing delta-based update stubs. |
| CHANGELOG.md | Documents the new EmployeeAPI update operation under Unreleased/Added. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Adds support for updating an employee through the
EmployeeAPIclient, mirroring the existingupdate_*operations (update_person,update_entity,update_merchandise).Changes
update_employee(object_id, payload)inEmployeeAPI, posting the payload toomni/employees/<id>/update.json.update_employee(self, object_id: int, payload: EmployeeDelta) -> Employee, mirroring theupdate_personstub.Addedsection.The backend route is
POST omni/employees/<id>/update, guarded by thefoundation.employee.updatepermission.Context
Required by the
update_employeeMCP tool in omni-mcp (hivesolutions/omni-mcp#12), which delegates to this client.