From ebca257f4b3e863f65c1bf7533f7aa6e1229d225 Mon Sep 17 00:00:00 2001 From: Newbie012 Date: Sun, 3 Dec 2023 18:35:18 +0200 Subject: [PATCH] fix: correct typing for transfer method in CallInterface --- types/resources/call.d.ts | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/types/resources/call.d.ts b/types/resources/call.d.ts index 0e2dc0ff..fa14152e 100644 --- a/types/resources/call.d.ts +++ b/types/resources/call.d.ts @@ -340,12 +340,20 @@ export class CallInterface extends PlivoResourceInterface { * @fail {Error} returns Error */ transfer(callUUID: string, params: { - legs: string; + legs: "both"; alegUrl: string; - alegMethod: string; + alegMethod?: string; blegUrl: string; - blegMethod: string; - }): Promise < any > ; + blegMethod?: string; + } | { + legs: "aleg"; + alegUrl: string; + alegMethod?: string; + } | { + legs: "bleg"; + blegUrl: string; + blegMethod?: string; + }): Promise < any > ; /** * Start a Stream over a Call