ChannelRepository.leaveChannel throws a "channelId must be a string" error

I’m using @amityco/js-sdk. Calling ChannelRepository.leaveChannel is throwing an error message: ASCInvalidParameterError: "channelId" must be a string

I’m passing a valid channel ID as a string to this method, e.g.:

      await ChannelRepository.leaveChannel({
        channelId: "63976c32da4a530d94c7f345"
      });

This seems to happen with any valid channelId.

Additionally, the documentation lists a different method to use to leave a channel (Channel Management - Amity Docs), ChannelMembershipRepository.leaveChannel. However, that function doesn’t seem to exist.

Hello, could you try this code please

const channelRepo = new ChannelRepository()
    ChannelRepository.leaveChannel("${channelID}").then((value) => console.log("successfully leave channel " + JSON.stringify(value)))