VOIP-1271-service-agent-case-contact-notes-endpoints - #1144
Merged
Conversation
Add service_agents endpoints for case contact-linking and notes, reusing
existing admin-only domain logic for the agent-facing surface.
- bin-openapi-manager: Add put: to service_agents/contact_cases/{id} for
contact attach/detach
- bin-openapi-manager: Add service_agents/contact_cases/{id}/notes and
.../notes/{note_id} paths (list/create/delete), POST body restricted to
text only (author derived server-side, never client-supplied)
- bin-api-manager: Add ServiceAgentCaseUpdateContact, mirroring admin
CaseUpdateContact with PermissionAll gate
- bin-api-manager: Add ServiceAgentCaseNoteList/Create/Delete; Create
derives author from the caller's own agent identity
(cmcasenote.AuthorTypeAgent + a.AgentID()); Delete restricts to the
note's own author via a list-then-match lookup (no single-note-get RPC
exists); both reject non-agent identities (accesskey/delegate/direct)
since AgentID() is meaningless for them
- bin-api-manager: Add PutServiceAgentsContactCasesId and
Get/Post/DeleteServiceAgentsContactCasesIdNotes* server handlers
- bin-api-manager: Add servicehandler and server-level tests covering
agent-permission success, tenant isolation, direct/accesskey rejection,
and note-ownership enforcement (author mismatch, nil author, not found)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add service_agents endpoints for case contact-linking and notes, reusing existing admin-only domain logic for the agent-facing surface. square-talk's redesigned Case Detail page needs an agent to be able to link/unlink a case's contact and to read/write case notes, neither of which square-talk (agent-facing) could reach before this change.