Skip to content

Conversation

zSoulweaver
Copy link
Contributor

@zSoulweaver zSoulweaver commented Jun 4, 2025

Adds missing Events REST endpoint.

Wasn't sure what to call the Event type to not conflict with the exist Event type already available in the global context, have decided on EventSubscription but happy for better suggestions. Additionally Kick sends a very slim response when subscribing to events, figured EventSubscriptionResult is good enough here.

Also moves existing types from webhooks.ts into events.ts to better align with Kick's API docs

@fb-sean
Copy link
Owner

fb-sean commented Jun 4, 2025

@zSoulweaver what do you think about naming all that "WebhookEvent"? and in genral prefix it with "Webhook"?

@zSoulweaver
Copy link
Contributor Author

@zSoulweaver what do you think about naming all that "WebhookEvent"? and in genral prefix it with "Webhook"?

Was trying to think ahead with websockets, when that ever comes, as the subscription endpoint has the option to set the method in the body. It currently only accepts webhook, but I dare say there might be a websocket there one day. I also don't see them maintaining two different event structures for webhooks and websockets.

Although I did just notice that I left WebhookUser in there instead of EventUser.

The event types also don't seem to be typed to the spec correctly either.

Additionally, I was thinking of branching the event structures into their own folder, similar to have we already have rest and payloads, introducing an events folder maybe.

@fb-sean
Copy link
Owner

fb-sean commented Jun 7, 2025

@zSoulweaver what do you think about naming all that "WebhookEvent"? and in genral prefix it with "Webhook"?

Was trying to think ahead with websockets, when that ever comes, as the subscription endpoint has the option to set the method in the body. It currently only accepts webhook, but I dare say there might be a websocket there one day. I also don't see them maintaining two different event structures for webhooks and websockets.

Although I did just notice that I left WebhookUser in there instead of EventUser.

The event types also don't seem to be typed to the spec correctly either.

Additionally, I was thinking of branching the event structures into their own folder, similar to have we already have rest and payloads, introducing an events folder maybe.

Seems fine to me ^^

@fb-sean
Copy link
Owner

fb-sean commented Jun 7, 2025

seems like that there is a conflict tho

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants