Multiple incorrect type definitions in `src/video/domain.ts`
philcluff opened this issue · 5 comments
It looks like we're got a few broken types in src/video/domain.ts
- the following types all have a data
attribute:
GetAssetPlaybackIdResponse
GetLiveStreamPlaybackIdResponse
PlaybackRestrictionResponse
ListPlaybackRestrictionsResponse
SpaceResponse
BroadcastResponse
ListSpacesResponse
StartSpaceBroadcastResponse
StopSpaceBroadcastResponse
ListTranscriptionVocabulariesResponse
TranscriptionVocabularyResponse
However, any API response which returns a response nested in a data
field already gets automatically unwrapped here: https://github.com/muxinc/mux-node-sdk/blob/master/src/base.ts#L81-L96
We should fix up these definitions, it looks like this also causes #190.
huh do we have any objections to just using the non response types where it's appropriate? It doesn't look like all of these are even used
So we've talked about this from the OpenAPI perspective before, and chose to model the empty objects as a generic "empty object" because then in the future if we did add fields to that API response, then it's not a breaking change for strictly typed languages.
I think this can now be closed, right @philcluff ?
Yep!