[Bug] Playback Restrictions API does not return expected types
I am using some of the Playback Restrictions API with TypeScript. I am noticing that when I call the following on PlaybackRestrictions:
list(): Promise<ListPlaybackRestrictionsResponse>;
...instead of returning ListPlaybackRestrictionsResponse (which has data nested), it returns data: Array<PlaybackRestriction>; directly. This means as a workaround, I need to cast it to unknown and then over to Array<PlaybackRestriction>.
The same is true for:
create(restriction: CreatePlaybackRestrictionParams): Promise<PlaybackRestrictionResponse>;
...as it returns a promise that resolves to PlaybackRestriction rather than an actual PlaybackRestrictionResponse.
This may be true of other elements of the PlaybackRestrictions API, but I have not verified that.
The version in my dependency is "@mux/mux-node": "^6.2.0",.
Can you please try version 7.0.0 and let me know if that solves the issue. Thanks!
@danzool, can you please try with v7.1.0 and let us know if that solves your problem?
Closing, as I think this has been addressed. If you still encounter errors, please open another issue.