Repository navigation
Add the @submilli/zendesk curated Package (SUB-2439) - #452
Merged
Merged
Conversation
A typed Zendesk Support client: tickets, public replies and internal notes, attachments, users, organizations, groups, views, macros, Help Center articles, satisfaction ratings and ticket metrics. The account URL is a required build setting, so grants name its host. Every operation is checked with facts read from Zendesk (a ticket's group, organization, brand, assignee, requester and status); public replies are their own capability; ticket writes send safe_update so a ticket changed since the check is refused. Offline, policy, fake-host and contract tests; live tests written but not yet run (no account yet). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014d2Juedc7zHFDRspcgcBcQ
listViews pages through views.json?active=true, since views/active.json pages by number only. updateTicket writes addTags/removeTags as the whole tag list under safe_update, since Zendesk ignores additional_tags and remove_tags on a single ticket. Macro previews give a comment's visibility as text. The write tests also cover a Help Center article, and clean up tickets one at a time; the read tests use a seed ticket. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014d2Juedc7zHFDRspcgcBcQ
- A public merge is also checked as comments.reply for the target and each source, since it emails every requester. - findTickets and countTickets take one tag: Zendesk's search matches repeated tag terms as any of them (checked live). - assignTicket with an agent alone sends the ticket's current group, so Zendesk refuses an agent outside it instead of moving the ticket. - applyMacro refuses a macro that changes what it cannot write (CCs, followers, the form) rather than applying it in part. - The reply check of a new ticket with an assignee sees "open"; a macro that leaves the status sees the ticket's own. - The live people search uses the seed customer, not whoever a wildcard search lists first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014d2Juedc7zHFDRspcgcBcQ
…439) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014d2Juedc7zHFDRspcgcBcQ
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.
Problem
Support agents need to work in Zendesk under fine-grained permission rules: triage and update tickets, add internal notes, reply to customers, assign and merge tickets, apply macros, look up people, and read the Help Center. A blueprint should be able to grant each of these by operation and by group, assignee, requester or status, without granting raw HTTP to the account. It should also be able to keep public replies, which email the customer, behind a person's approval.
Solution
A curated Package,
@submilli/zendesk, with 31 capabilities (zendesk.com/<area>.<op>):How the checks are built:
comments.replywherever it comes from:reply, a public first comment on a new ticket, a macro's comment, or a public merge.updateTicketcan't change the group or assignee. OnlyassignTicketcan, and its check sees both where the ticket is and where it goes.safe_updatewith theupdated_atread for the check, so a ticket changed in between is refused with 409UpdateConflict. Merges are the exception, because Zendesk's merge has no condition; the readme says so.--config accountUrl=…, so the package's HTTP grants name the exact host.ZENDESK_ACCESS_TOKEN. API tokens are not accepted: they can act as any user, never expire and have no scopes.The design and the decisions behind it are in
plans/zendesk-package.md, including what the live tests and the review found.Outside the package:
package_policy.rs: the Salesforce fake-host test's package copy is shared, and a fake-Zendesk test is added.submilli.toml,packages/README.md, the curated-packages reference, the doc-example test, and the CI and Render workflows. The workflows install it with an example account URL.Verification
scripts/contract.test.mjsasserts the exact requests and check contexts (24).additional_tagsandremove_tags.publicas text, not a boolean.🤖 Generated with Claude Code
https://claude.ai/code/session_014d2Juedc7zHFDRspcgcBcQ