Skip to content

Commit

Permalink
[connectors] Content node retrieval functions for Zendesk (#8216)
Browse files Browse the repository at this point in the history
* 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
aubin-tchoi and tdraier authored Oct 25, 2024
1 parent 58a470b commit e8a7d6c
Show file tree
Hide file tree
Showing 7 changed files with 819 additions and 509 deletions.
Loading

0 comments on commit e8a7d6c

Please sign in to comment.