plivo-node icon indicating copy to clipboard operation
plivo-node copied to clipboard

fix: correct typing for transfer method in CallInterface

Open Newbie012 opened this issue 2 years ago • 0 comments

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
});

Newbie012 avatar Dec 03 '23 16:12 Newbie012