Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[connectors] Content node retrieval functions for Zendesk (#8216)
* refactor: remove unused function * feat: implement retrieveContentNodeParents * feat: implement the batch content node retrieval * refactor: replace then with awaits * feat: use the new permission system for batch node retrieval * feat: set Help Centers and Tickets to be folders instead of databases * refactor: define a generic method to identify the type of an internal ID in batch/parent retrieval and permissions setting * refactor: use the generic getIdFromInternalId when retrieving help center permissions * refactor: use the generic getIdFromInternalId when retrieving tickets permissions * refactor: prevent get...IdFromInternalId functions from being exported * refactor: use the generic getIdFromInternalId when retrieving help center permissions * refactor: use the generic getIdFromInternalId when retrieving tickets permissions * refactor: add a method toContentNode for the ZendeskArticleResource * perf: replace a Promise.all of 3 requests with a single one + filters * refactor: add methods getHelpCenterContentNode and getTicketsContentNode to centralize the content node definition in zendesk_resources.ts * fix: remove an obsolete catch * refactor: add a method toContentNode for the ZendeskTicketResource * fix: remove an unused import * refactor: use the toContentNode methods in retrieveSelectedNodes * refactor: regroup the permission retrieval functions into one that handles all cases * update connectors/src/connectors/zendesk/lib/permissions.ts Co-authored-by: Thomas Draier <[email protected]> * feat: throw errors on unrecognized internal IDs * refactor: add assertNevers on id types and handle missing cases --------- Co-authored-by: Thomas Draier <[email protected]>
- Loading branch information