UsePhoneCallsResult
UsePhoneCallsResult =
object
Defined in: src/react/usePhoneCalls.ts:63
Properties
createPhoneCall()
createPhoneCall: (
request:HandlersCreatePhoneCallRequest) =>Promise<HandlersPhoneCallResponse|null>
Defined in: src/react/usePhoneCalls.ts:91
Create a phone call.
Parameters
| Parameter | Type |
|---|---|
|
|
Returns
Promise<HandlersPhoneCallResponse | null>
currentCall
currentCall:
HandlersPhoneCallResponse|null
Defined in: src/react/usePhoneCalls.ts:71
The latest phone call loaded by this hook.
error
error:
Error|null
Defined in: src/react/usePhoneCalls.ts:83
Error from the last operation.
fetchAvailability()
fetchAvailability: () =>
Promise<boolean|null>
Defined in: src/react/usePhoneCalls.ts:87
Fetch whether phone calling is enabled.
Returns
Promise<boolean | null>
getPhoneCall()
getPhoneCall: (
callId:string) =>Promise<HandlersPhoneCallResponse|null>
Defined in: src/react/usePhoneCalls.ts:97
Fetch a phone call by call ID.
Parameters
| Parameter | Type |
|---|---|
|
|
|
Returns
Promise<HandlersPhoneCallResponse | null>
isEnabled
isEnabled:
boolean|null
Defined in: src/react/usePhoneCalls.ts:67
Whether phone calling is enabled on the connected portal.
isLoading
isLoading:
boolean
Defined in: src/react/usePhoneCalls.ts:75
Whether a non-polling request is in flight.
isPolling
isPolling:
boolean
Defined in: src/react/usePhoneCalls.ts:79
Whether a polling loop is currently active.
pollPhoneCall()
pollPhoneCall: (
callId:string,options?:PhoneCallPollingOptions) =>Promise<HandlersPhoneCallResponse|null>
Defined in: src/react/usePhoneCalls.ts:101
Poll a phone call until completion or the polling limit is reached.
Parameters
| Parameter | Type |
|---|---|
|
|
|
|
|
Returns
Promise<HandlersPhoneCallResponse | null>
reset()
reset: () =>
void
Defined in: src/react/usePhoneCalls.ts:112
Clear the current call and last error.
Returns
void
stopPolling()
stopPolling: () =>
void
Defined in: src/react/usePhoneCalls.ts:108
Stop any active polling loop.
Returns
void