feat: add filtering, sorting, and pagination support - #46
Open
awhiskin-enrolhq wants to merge 3 commits into
Open
awhiskin-enrolhq wants to merge 3 commits into
awhiskin-enrolhq wants to merge 3 commits into
Conversation
- get_tickets: add filter, requester_id, email, company_id, updated_since, order_by, order_type, and include params - get_ticket_fields: fix return type (wrap list in dict) - get_ticket_conversation: add page/per_page pagination - search_tickets: add page pagination and error handling All changes are backwards-compatible.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Routes to /api/v2/search/tickets when agent_id is set (the only
Freshdesk endpoint supporting agent filtering server-side) and
normalizes the response to the existing {tickets, pagination} shape.
Incompatible params fail fast with a clear error.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
|
+1 for the @Maanaesh Can you review and merge, if possible? This PR has been open for a while? I'm also happy to open a smaller, subset PR with only the changes to |
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.
Adds missing Freshdesk API parameters to several tools:
get_tickets
filter(new_and_my_open, watching, spam, deleted)requester_id,email,company_id,updated_sinceorder_by,order_typeinclude(stats, requester, description, company)agent_id: filter by assigned agent, server-side. Freshdesk's list endpoint doesn't support agent filtering, so whenagent_idis set the tool transparently routes to/api/v2/search/ticketsand normalizes the response to the same{tickets, pagination}shape (plus atotalcount). Params the search endpoint can't honor (filter,requester_id,email,company_id,updated_since,order_by,order_type,include,per_page≠ 30,page> 10) fail fast with a clear error instead of returning silently wrong results.get_ticket_fields
get_ticket_conversation
pageandper_pageparams for pagination support.search_tickets
pageparam for pagination.All changes are backwards-compatible.