feat(zendesk-messaging-hitl): add integration#14606
Conversation
franklevasseur
left a comment
There was a problem hiding this comment.
Good Work man!
I know this is still a WIP, but here are a couple of comments.
It might take some time, but we'll need to remove all any
…zendesk_messaging_hitl
| throw new RuntimeError('No switchboards found. Please create a switchboard in Sunshine Conversations first.') | ||
| } | ||
| const firstSwitchboard = switchboards[0] | ||
| if (!firstSwitchboard) { |
There was a problem hiding this comment.
nitpick: You could add a check if there is more than 1 switchboard to log.
There was a problem hiding this comment.
I couldn't create another switchboard using their API it throws me an error saying that can be only one switchboard per app, and its the same app for every Conversation API key that I generate, so I guess this Switchboard API was adapted from Sunco to the Zendesk Messaging backend after they bought it and they only have a default and another can't be created, but we should indeed add that check in case that changes in the future, we should probably throw so it becomes visible to us, since we wouldn't be sure on which one to pick if that ever changes
…zendesk_messaging_hitl
| messageParts: Array<MessageContent> | ||
| ) { | ||
| try { | ||
| let message |
There was a problem hiding this comment.
todo: missing a type here; this is considered an implicit any
| }) | ||
|
|
||
| if (!result?.conversation?.id) { | ||
| throw new RuntimeError('Conversation creation succeeded but no ID returned') |
There was a problem hiding this comment.
todo: use SuncoClientError to make sure this error does not get wrapped / mapped
The same comment applies many times below.
| @@ -0,0 +1,565 @@ | |||
| // @ts-expect-error No types for sunshine-conversations-client | |||
This PR will create a new Integration allow using Sunshine Conversations as HITL(Downstream) channel