Skip to content

fix: correct typing for transfer method in CallInterface#324

Open
Newbie012 wants to merge 1 commit intoplivo:masterfrom
Newbie012:fix/transfer-typing
Open

fix: correct typing for transfer method in CallInterface#324
Newbie012 wants to merge 1 commit intoplivo:masterfrom
Newbie012:fix/transfer-typing

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