Skip to content

feat: add update_employee operation to EmployeeAPI#3

Merged
joamag merged 1 commit into
masterfrom
feat/update-employee
Jun 25, 2026
Merged

feat: add update_employee operation to EmployeeAPI#3
joamag merged 1 commit into
masterfrom
feat/update-employee

Conversation

@joamag

@joamag joamag commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Adds support for updating an employee through the EmployeeAPI client, mirroring the existing update_* operations (update_person, update_entity, update_merchandise).

Changes

  • update_employee(object_id, payload) in EmployeeAPI, posting the payload to omni/employees/<id>/update.json.
  • Matching type stub update_employee(self, object_id: int, payload: EmployeeDelta) -> Employee, mirroring the update_person stub.
  • CHANGELOG entry under the unreleased Added section.

The backend route is POST omni/employees/<id>/update, guarded by the foundation.employee.update permission.

Context

Required by the update_employee MCP tool in omni-mcp (hivesolutions/omni-mcp#12), which delegates to this client.

- 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
@joamag joamag self-assigned this Jun 25, 2026
@joamag joamag marked this pull request as ready for review June 25, 2026 18:21
Copilot AI review requested due to automatic review settings June 25, 2026 18:21
@joamag joamag merged commit 4659976 into master Jun 25, 2026
16 checks passed
@joamag joamag deleted the feat/update-employee branch June 25, 2026 18:21
@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@joamag, we couldn't start this review because you've reached your PR review rate limit.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8bec6f85-9bf0-44c6-bf85-57c7f28e403f

📥 Commits

Reviewing files that changed from the base of the PR and between eeb017a and c88a36f.

📒 Files selected for processing (3)
  • CHANGELOG.md
  • src/omni/employee.py
  • src/omni/employee.pyi
📝 Walkthrough

Walkthrough

EmployeeAPI now declares and implements update_employee, which posts a payload to the employee update endpoint and returns the response contents. The changelog also records support for the new operation.

Changes

Employee update operation

Layer / File(s) Summary
Employee update method, stub, and changelog
src/omni/employee.pyi, src/omni/employee.py, CHANGELOG.md
EmployeeAPI now declares and implements update_employee, which posts the payload to omni/employees/{object_id}/update.json and returns contents; the changelog adds an Unreleased entry for the operation.

Poem

A rabbit hopped by with a cheerful little grin,
“Update the employee, let the change begin!”
With stub and endpoint all snug in a row,
The bunny says, “Ship it — let the payload flow!” 🐇


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_employee method signature to src/omni/employee.pyi using EmployeeDelta -> 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants