Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: correct typing for transfer method in CallInterface #324

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Newbie012
Copy link

The types of transfer are incorrect.

According to the docs (and the JSDocs), the methods properties should be optional, and belUrl is required only when legs: "bleg". Currently, this is the only workaround for that:

client.calls.transfer(payload.CallUUID, {
    legs: "aleg",
    alegMethod: "POST",
    alegUrl: url.toString(),

    // optional props, bad typings.
    blegMethod: undefined as unknown as string,
    blegUrl: undefined as unknown as string
});

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.

1 participant