@telnyx/react-voice-commons-sdk 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +42 -0
- package/TelnyxVoiceCommons.podspec +31 -31
- package/ios/CallKitBridge.m +43 -43
- package/ios/CallKitBridge.swift +874 -879
- package/ios/VoicePnBridge.m +30 -30
- package/ios/VoicePnBridge.swift +86 -86
- package/lib/callkit/callkit-coordinator.d.ts +110 -117
- package/lib/callkit/callkit-coordinator.js +664 -727
- package/lib/callkit/callkit.d.ts +41 -41
- package/lib/callkit/callkit.js +252 -242
- package/lib/callkit/index.js +15 -47
- package/lib/callkit/use-callkit.d.ts +19 -19
- package/lib/callkit/use-callkit.js +270 -310
- package/lib/context/TelnyxVoiceContext.d.ts +9 -9
- package/lib/context/TelnyxVoiceContext.js +10 -13
- package/lib/hooks/use-callkit-coordinator.d.ts +9 -17
- package/lib/hooks/use-callkit-coordinator.js +45 -50
- package/lib/hooks/useAppReadyNotifier.js +13 -15
- package/lib/hooks/useAppStateHandler.d.ts +6 -11
- package/lib/hooks/useAppStateHandler.js +95 -110
- package/lib/hooks/useNetworkStateHandler.d.ts +0 -0
- package/lib/hooks/useNetworkStateHandler.js +0 -0
- package/lib/index.d.ts +3 -21
- package/lib/index.js +50 -201
- package/lib/internal/CallKitHandler.d.ts +6 -6
- package/lib/internal/CallKitHandler.js +96 -104
- package/lib/internal/callkit-manager.d.ts +57 -57
- package/lib/internal/callkit-manager.js +299 -316
- package/lib/internal/calls/call-state-controller.d.ts +73 -86
- package/lib/internal/calls/call-state-controller.js +263 -307
- package/lib/internal/session/session-manager.d.ts +71 -75
- package/lib/internal/session/session-manager.js +360 -424
- package/lib/internal/user-defaults-helpers.js +49 -39
- package/lib/internal/voice-pn-bridge.d.ts +114 -12
- package/lib/internal/voice-pn-bridge.js +212 -5
- package/lib/models/call-state.d.ts +46 -44
- package/lib/models/call-state.js +70 -68
- package/lib/models/call.d.ts +161 -133
- package/lib/models/call.js +454 -382
- package/lib/models/config.d.ts +11 -18
- package/lib/models/config.js +37 -35
- package/lib/models/connection-state.d.ts +10 -10
- package/lib/models/connection-state.js +16 -16
- package/lib/telnyx-voice-app.d.ts +28 -28
- package/lib/telnyx-voice-app.js +463 -481
- package/lib/telnyx-voip-client.d.ts +167 -167
- package/lib/telnyx-voip-client.js +385 -390
- package/package.json +11 -4
- package/src/callkit/callkit-coordinator.ts +18 -34
- package/src/hooks/useNetworkStateHandler.ts +0 -0
- package/src/internal/calls/call-state-controller.ts +81 -58
- package/src/internal/session/session-manager.ts +42 -26
- package/src/internal/voice-pn-bridge.ts +250 -2
- package/src/models/call-state.ts +8 -1
- package/src/models/call.ts +119 -5
- package/src/telnyx-voice-app.tsx +87 -40
- package/src/telnyx-voip-client.ts +15 -3
- package/src/types/telnyx-sdk.d.ts +16 -2
|
@@ -1,21 +1,13 @@
|
|
|
1
1
|
import { Call } from '@telnyx/react-native-voice-sdk';
|
|
2
2
|
import { TelnyxVoipClient } from '../telnyx-voip-client';
|
|
3
3
|
export declare function useCallKitCoordinator(): {
|
|
4
|
-
|
|
5
|
-
call: Call,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
call: Call,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
) => Promise<string | null>;
|
|
14
|
-
answerCallFromUI: (call: Call) => Promise<boolean>;
|
|
15
|
-
endCallFromUI: (call: Call) => Promise<boolean>;
|
|
16
|
-
getCallKitUUID: (call: Call) => string | null;
|
|
17
|
-
getWebRTCCall: (callKitUUID: string) => Call | null;
|
|
18
|
-
linkExistingCallKitCall: (call: Call, callKitUUID: string) => void;
|
|
19
|
-
isAvailable: () => boolean;
|
|
20
|
-
setVoipClient: (voipClient: TelnyxVoipClient) => void;
|
|
4
|
+
reportIncomingCall: (call: Call, callerName: string, callerNumber: string) => Promise<string | null>;
|
|
5
|
+
startOutgoingCall: (call: Call, destinationNumber: string, displayName?: string) => Promise<string | null>;
|
|
6
|
+
answerCallFromUI: (call: Call) => Promise<boolean>;
|
|
7
|
+
endCallFromUI: (call: Call) => Promise<boolean>;
|
|
8
|
+
getCallKitUUID: (call: Call) => string | null;
|
|
9
|
+
getWebRTCCall: (callKitUUID: string) => Call | null;
|
|
10
|
+
linkExistingCallKitCall: (call: Call, callKitUUID: string) => void;
|
|
11
|
+
isAvailable: () => boolean;
|
|
12
|
+
setVoipClient: (voipClient: TelnyxVoipClient) => void;
|
|
21
13
|
};
|
|
@@ -1,53 +1,48 @@
|
|
|
1
|
-
|
|
2
|
-
var __importDefault =
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
};
|
|
7
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
6
|
exports.useCallKitCoordinator = useCallKitCoordinator;
|
|
9
|
-
const react_1 = require(
|
|
10
|
-
const callkit_coordinator_1 = __importDefault(require(
|
|
7
|
+
const react_1 = require("react");
|
|
8
|
+
const callkit_coordinator_1 = __importDefault(require("../callkit/callkit-coordinator"));
|
|
11
9
|
function useCallKitCoordinator() {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
isAvailable,
|
|
51
|
-
setVoipClient,
|
|
52
|
-
};
|
|
10
|
+
const reportIncomingCall = (0, react_1.useCallback)(async (call, callerName, callerNumber) => {
|
|
11
|
+
return callkit_coordinator_1.default.reportIncomingCall(call, callerName, callerNumber);
|
|
12
|
+
}, []);
|
|
13
|
+
const startOutgoingCall = (0, react_1.useCallback)(async (call, destinationNumber, displayName) => {
|
|
14
|
+
return callkit_coordinator_1.default.startOutgoingCall(call, destinationNumber, displayName);
|
|
15
|
+
}, []);
|
|
16
|
+
const answerCallFromUI = (0, react_1.useCallback)(async (call) => {
|
|
17
|
+
return callkit_coordinator_1.default.answerCallFromUI(call);
|
|
18
|
+
}, []);
|
|
19
|
+
const endCallFromUI = (0, react_1.useCallback)(async (call) => {
|
|
20
|
+
return callkit_coordinator_1.default.endCallFromUI(call);
|
|
21
|
+
}, []);
|
|
22
|
+
const getCallKitUUID = (0, react_1.useCallback)((call) => {
|
|
23
|
+
return callkit_coordinator_1.default.getCallKitUUID(call);
|
|
24
|
+
}, []);
|
|
25
|
+
const getWebRTCCall = (0, react_1.useCallback)((callKitUUID) => {
|
|
26
|
+
return callkit_coordinator_1.default.getWebRTCCall(callKitUUID);
|
|
27
|
+
}, []);
|
|
28
|
+
const linkExistingCallKitCall = (0, react_1.useCallback)((call, callKitUUID) => {
|
|
29
|
+
callkit_coordinator_1.default.linkExistingCallKitCall(call, callKitUUID);
|
|
30
|
+
}, []);
|
|
31
|
+
const isAvailable = (0, react_1.useCallback)(() => {
|
|
32
|
+
return callkit_coordinator_1.default.isAvailable();
|
|
33
|
+
}, []);
|
|
34
|
+
const setVoipClient = (0, react_1.useCallback)((voipClient) => {
|
|
35
|
+
callkit_coordinator_1.default.setVoipClient(voipClient);
|
|
36
|
+
}, []);
|
|
37
|
+
return {
|
|
38
|
+
reportIncomingCall,
|
|
39
|
+
startOutgoingCall,
|
|
40
|
+
answerCallFromUI,
|
|
41
|
+
endCallFromUI,
|
|
42
|
+
getCallKitUUID,
|
|
43
|
+
getWebRTCCall,
|
|
44
|
+
linkExistingCallKitCall,
|
|
45
|
+
isAvailable,
|
|
46
|
+
setVoipClient,
|
|
47
|
+
};
|
|
53
48
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports,
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useAppReadyNotifier = void 0;
|
|
4
|
-
const react_1 = require(
|
|
5
|
-
const react_native_1 = require(
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const react_native_1 = require("react-native");
|
|
6
6
|
/**
|
|
7
7
|
* Hook to notify the native side when React Native is ready
|
|
8
8
|
* Call this hook when your main screen/login screen is visible and ready
|
|
@@ -12,16 +12,14 @@ const react_native_1 = require('react-native');
|
|
|
12
12
|
* handled automatically by the native Android services, so this hook is simplified.
|
|
13
13
|
*/
|
|
14
14
|
const useAppReadyNotifier = () => {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
}, []);
|
|
15
|
+
(0, react_1.useEffect)(() => {
|
|
16
|
+
// Only notify on Android since this is Android-specific functionality
|
|
17
|
+
if (react_native_1.Platform.OS === 'android') {
|
|
18
|
+
console.log('useAppReadyNotifier: React Native is ready (native services handle FCM automatically)');
|
|
19
|
+
// Note: The VoicePnManager in the native Android code automatically handles
|
|
20
|
+
// push notification state when the Firebase messaging service receives notifications.
|
|
21
|
+
// No JavaScript module communication is needed anymore.
|
|
22
|
+
}
|
|
23
|
+
}, []);
|
|
26
24
|
};
|
|
27
25
|
exports.useAppReadyNotifier = useAppReadyNotifier;
|
|
@@ -1,21 +1,16 @@
|
|
|
1
1
|
import { AppStateStatus } from 'react-native';
|
|
2
2
|
import { TelnyxVoipClient } from '../telnyx-voip-client';
|
|
3
3
|
interface UseAppStateHandlerOptions {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
voipClient: TelnyxVoipClient;
|
|
5
|
+
disconnectOnBackground?: boolean;
|
|
6
|
+
navigateToLoginOnDisconnect?: boolean;
|
|
7
|
+
debug?: boolean;
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
10
|
* Hook to handle app state changes for VoIP behavior
|
|
11
11
|
* When app goes to background without an active call, disconnect socket and redirect to login
|
|
12
12
|
*/
|
|
13
|
-
export declare const useAppStateHandler: ({
|
|
14
|
-
|
|
15
|
-
disconnectOnBackground,
|
|
16
|
-
navigateToLoginOnDisconnect,
|
|
17
|
-
debug,
|
|
18
|
-
}: UseAppStateHandlerOptions) => {
|
|
19
|
-
currentAppState: AppStateStatus;
|
|
13
|
+
export declare const useAppStateHandler: ({ voipClient, disconnectOnBackground, navigateToLoginOnDisconnect, debug, }: UseAppStateHandlerOptions) => {
|
|
14
|
+
currentAppState: AppStateStatus;
|
|
20
15
|
};
|
|
21
16
|
export {};
|
|
@@ -1,120 +1,105 @@
|
|
|
1
|
-
|
|
2
|
-
var __importDefault =
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
};
|
|
7
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
6
|
exports.useAppStateHandler = void 0;
|
|
9
|
-
const react_1 = require(
|
|
10
|
-
const react_native_1 = require(
|
|
11
|
-
const expo_router_1 = require(
|
|
12
|
-
const async_storage_1 = __importDefault(require(
|
|
13
|
-
const connection_state_1 = require(
|
|
14
|
-
const call_state_1 = require(
|
|
7
|
+
const react_1 = require("react");
|
|
8
|
+
const react_native_1 = require("react-native");
|
|
9
|
+
const expo_router_1 = require("expo-router");
|
|
10
|
+
const async_storage_1 = __importDefault(require("@react-native-async-storage/async-storage"));
|
|
11
|
+
const connection_state_1 = require("../models/connection-state");
|
|
12
|
+
const call_state_1 = require("../models/call-state");
|
|
15
13
|
/**
|
|
16
14
|
* Hook to handle app state changes for VoIP behavior
|
|
17
15
|
* When app goes to background without an active call, disconnect socket and redirect to login
|
|
18
16
|
*/
|
|
19
|
-
const useAppStateHandler = ({
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
17
|
+
const useAppStateHandler = ({ voipClient, disconnectOnBackground = true, navigateToLoginOnDisconnect = true, debug = false, }) => {
|
|
18
|
+
const appState = (0, react_1.useRef)(react_native_1.AppState.currentState);
|
|
19
|
+
const log = debug ? console.log : () => { };
|
|
20
|
+
(0, react_1.useEffect)(() => {
|
|
21
|
+
const handleAppStateChange = async (nextAppState) => {
|
|
22
|
+
log('AppStateHandler: App state changed from', appState.current, 'to', nextAppState);
|
|
23
|
+
// When app goes to background
|
|
24
|
+
if (appState.current.match(/active/) && nextAppState === 'background') {
|
|
25
|
+
log('AppStateHandler: App went to background, checking for active calls...');
|
|
26
|
+
const connectionState = voipClient.currentConnectionState;
|
|
27
|
+
if (connectionState !== connection_state_1.TelnyxConnectionState.CONNECTED) {
|
|
28
|
+
log('AppStateHandler: Not connected, skipping background handling');
|
|
29
|
+
appState.current = nextAppState;
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
// Check if there's an active call (including ringing calls)
|
|
33
|
+
const activeCalls = voipClient.currentCalls;
|
|
34
|
+
const hasActiveCall = activeCalls.length > 0 &&
|
|
35
|
+
activeCalls.some((call) => call_state_1.CallStateHelpers.isActive(call.currentState) ||
|
|
36
|
+
call.currentState === call_state_1.TelnyxCallState.RINGING);
|
|
37
|
+
log('AppStateHandler: Active call check:', {
|
|
38
|
+
callCount: activeCalls.length,
|
|
39
|
+
hasActiveCall,
|
|
40
|
+
callStates: activeCalls.map((call) => ({
|
|
41
|
+
callId: call.callId,
|
|
42
|
+
currentState: call.currentState,
|
|
43
|
+
destination: call.destination,
|
|
44
|
+
isIncoming: call.isIncoming,
|
|
45
|
+
})),
|
|
46
|
+
});
|
|
47
|
+
if (!hasActiveCall && disconnectOnBackground) {
|
|
48
|
+
// Check if there's a push notification call in progress
|
|
49
|
+
const isPushNotificationInProgress = await async_storage_1.default.getItem('@push_notification_payload');
|
|
50
|
+
if (isPushNotificationInProgress) {
|
|
51
|
+
log('AppStateHandler: Push notification call in progress, keeping socket connected');
|
|
52
|
+
// Wait a bit longer before allowing disconnection to give time for WebRTC call to establish
|
|
53
|
+
setTimeout(async () => {
|
|
54
|
+
const stillInProgress = await async_storage_1.default.getItem('@push_notification_payload');
|
|
55
|
+
if (!stillInProgress) {
|
|
56
|
+
log('AppStateHandler: Push notification call completed, now disconnecting socket');
|
|
57
|
+
await voipClient.logout();
|
|
58
|
+
if (navigateToLoginOnDisconnect) {
|
|
59
|
+
expo_router_1.router.replace('/');
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}, 5000); // Wait 5 seconds
|
|
63
|
+
appState.current = nextAppState;
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
log('AppStateHandler: No active call detected, disconnecting socket...');
|
|
67
|
+
try {
|
|
68
|
+
// Disconnect the socket with background reason
|
|
69
|
+
await voipClient.logout();
|
|
70
|
+
log('AppStateHandler: Socket disconnected successfully');
|
|
71
|
+
// Navigate to login screen
|
|
72
|
+
if (navigateToLoginOnDisconnect) {
|
|
73
|
+
// Use a small delay to ensure the disconnect completes
|
|
74
|
+
setTimeout(() => {
|
|
75
|
+
log('AppStateHandler: Navigating to login screen');
|
|
76
|
+
expo_router_1.router.replace('/');
|
|
77
|
+
}, 100);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
catch (error) {
|
|
81
|
+
console.error('AppStateHandler: Error during background disconnect:', error);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
log('AppStateHandler: Active call detected or disconnect disabled, keeping socket connected');
|
|
75
86
|
}
|
|
76
|
-
}
|
|
77
|
-
}, 5000); // Wait 5 seconds
|
|
78
|
-
appState.current = nextAppState;
|
|
79
|
-
return;
|
|
80
|
-
}
|
|
81
|
-
log('AppStateHandler: No active call detected, disconnecting socket...');
|
|
82
|
-
try {
|
|
83
|
-
// Disconnect the socket with background reason
|
|
84
|
-
await voipClient.logout();
|
|
85
|
-
log('AppStateHandler: Socket disconnected successfully');
|
|
86
|
-
// Navigate to login screen
|
|
87
|
-
if (navigateToLoginOnDisconnect) {
|
|
88
|
-
// Use a small delay to ensure the disconnect completes
|
|
89
|
-
setTimeout(() => {
|
|
90
|
-
log('AppStateHandler: Navigating to login screen');
|
|
91
|
-
expo_router_1.router.replace('/');
|
|
92
|
-
}, 100);
|
|
93
87
|
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
appState.current = nextAppState;
|
|
110
|
-
};
|
|
111
|
-
const subscription = react_native_1.AppState.addEventListener('change', handleAppStateChange);
|
|
112
|
-
return () => {
|
|
113
|
-
subscription?.remove();
|
|
88
|
+
// When app comes to foreground
|
|
89
|
+
if (appState.current.match(/background/) && nextAppState === 'active') {
|
|
90
|
+
log('AppStateHandler: App came to foreground');
|
|
91
|
+
// User will need to manually login again when returning from background
|
|
92
|
+
// Auto-login only happens for push notification calls
|
|
93
|
+
}
|
|
94
|
+
appState.current = nextAppState;
|
|
95
|
+
};
|
|
96
|
+
const subscription = react_native_1.AppState.addEventListener('change', handleAppStateChange);
|
|
97
|
+
return () => {
|
|
98
|
+
subscription?.remove();
|
|
99
|
+
};
|
|
100
|
+
}, [voipClient, disconnectOnBackground, navigateToLoginOnDisconnect, log]);
|
|
101
|
+
return {
|
|
102
|
+
currentAppState: appState.current,
|
|
114
103
|
};
|
|
115
|
-
}, [voipClient, disconnectOnBackground, navigateToLoginOnDisconnect, log]);
|
|
116
|
-
return {
|
|
117
|
-
currentAppState: appState.current,
|
|
118
|
-
};
|
|
119
104
|
};
|
|
120
105
|
exports.useAppStateHandler = useAppStateHandler;
|
|
File without changes
|
|
File without changes
|
package/lib/index.d.ts
CHANGED
|
@@ -8,34 +8,16 @@
|
|
|
8
8
|
* call state transitions, push notification processing, and native call UI
|
|
9
9
|
* integration.
|
|
10
10
|
*/
|
|
11
|
-
export {
|
|
12
|
-
TelnyxVoipClient,
|
|
13
|
-
createTelnyxVoipClient,
|
|
14
|
-
createBackgroundTelnyxVoipClient,
|
|
15
|
-
} from './telnyx-voip-client';
|
|
11
|
+
export { TelnyxVoipClient, createTelnyxVoipClient, createBackgroundTelnyxVoipClient, } from './telnyx-voip-client';
|
|
16
12
|
export type { TelnyxVoipClientOptions } from './telnyx-voip-client';
|
|
17
13
|
export { TelnyxVoiceApp } from './telnyx-voice-app';
|
|
18
14
|
export type { TelnyxVoiceAppOptions, TelnyxVoiceAppProps } from './telnyx-voice-app';
|
|
19
15
|
export { useAppStateHandler } from './hooks/useAppStateHandler';
|
|
20
16
|
export { useTelnyxVoice } from './context/TelnyxVoiceContext';
|
|
21
17
|
export { Call } from './models/call';
|
|
22
|
-
export {
|
|
23
|
-
TelnyxConnectionState,
|
|
24
|
-
isTelnyxConnectionState,
|
|
25
|
-
canMakeCalls,
|
|
26
|
-
isConnected,
|
|
27
|
-
isTransitioning,
|
|
28
|
-
} from './models/connection-state';
|
|
18
|
+
export { TelnyxConnectionState, isTelnyxConnectionState, canMakeCalls, isConnected, isTransitioning, } from './models/connection-state';
|
|
29
19
|
export { TelnyxCallState, isTelnyxCallState, CallStateHelpers } from './models/call-state';
|
|
30
|
-
export {
|
|
31
|
-
isCredentialConfig,
|
|
32
|
-
isTokenConfig,
|
|
33
|
-
validateConfig,
|
|
34
|
-
validateCredentialConfig,
|
|
35
|
-
validateTokenConfig,
|
|
36
|
-
createCredentialConfig,
|
|
37
|
-
createTokenConfig,
|
|
38
|
-
} from './models/config';
|
|
20
|
+
export { isCredentialConfig, isTokenConfig, validateConfig, validateCredentialConfig, validateTokenConfig, createCredentialConfig, createTokenConfig, } from './models/config';
|
|
39
21
|
export type { Config, CredentialConfig, TokenConfig } from './models/config';
|
|
40
22
|
export type { Call as TelnyxCall } from '@telnyx/react-native-voice-sdk';
|
|
41
23
|
export * from './callkit';
|