Open
Description
It looks like the TSC support for Webhooks has fallen behind the current REST API implementations. The task here will be to fix the TSC code, docs and samples to be working and accurate again.
Summary report:
- TSC doesn't follow REST API behavior (in terms of inputs).
- TSC makes erroneous assumptions about using webhook-source name as input.
- TSC doesn't accept event name as input, despite it being advised approach.
Longer:
- The REST API Create Webhook method accepts either the event name or the webhook-source name (as specified in the Trigger Events table), though the request looks a little different, depending on which you use. Furthermore, the REST API docs advise you to use event name because the other is being deprecated in the future.
- What the TSC does is a little odd: Historically, all the webhook-source names all start with "webhook-source-event-", and it appears that the TSC assumes as much, and only work with the right hand side of the webhook-source name. For example:
webhook-source name: webhook-source-event-datasource-updated
expected name in TSC: datasource-updated (the right hand side of the above)
However, the apparent assumption that all of the inputs begin with "webhook-source-event-" is no longer accurate. So newer events, like webhook-event-user-promoted-admin will never work. - Furthermore, testing shows that TSC doesn't accept the event name as input either, despite it being advised because of the future deprecation of webhook-source name.