@telnyx/react-voice-commons-sdk 0.1.2 → 0.1.4

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.
Files changed (55) hide show
  1. package/CHANGELOG.md +60 -0
  2. package/README.md +469 -483
  3. package/ios/CallKitBridge.swift +2 -7
  4. package/lib/callkit/callkit-coordinator.d.ts +110 -117
  5. package/lib/callkit/callkit-coordinator.js +664 -727
  6. package/lib/callkit/callkit.d.ts +41 -41
  7. package/lib/callkit/callkit.js +252 -242
  8. package/lib/callkit/index.js +15 -47
  9. package/lib/callkit/use-callkit.d.ts +19 -19
  10. package/lib/callkit/use-callkit.js +270 -310
  11. package/lib/context/TelnyxVoiceContext.d.ts +9 -9
  12. package/lib/context/TelnyxVoiceContext.js +10 -13
  13. package/lib/hooks/use-callkit-coordinator.d.ts +9 -17
  14. package/lib/hooks/use-callkit-coordinator.js +45 -50
  15. package/lib/hooks/useAppReadyNotifier.js +13 -15
  16. package/lib/hooks/useAppStateHandler.d.ts +6 -11
  17. package/lib/hooks/useAppStateHandler.js +95 -110
  18. package/lib/hooks/useNetworkStateHandler.d.ts +0 -0
  19. package/lib/hooks/useNetworkStateHandler.js +0 -0
  20. package/lib/index.d.ts +3 -21
  21. package/lib/index.js +50 -201
  22. package/lib/internal/CallKitHandler.d.ts +6 -6
  23. package/lib/internal/CallKitHandler.js +96 -104
  24. package/lib/internal/callkit-manager.d.ts +57 -57
  25. package/lib/internal/callkit-manager.js +299 -316
  26. package/lib/internal/calls/call-state-controller.d.ts +73 -86
  27. package/lib/internal/calls/call-state-controller.js +263 -307
  28. package/lib/internal/session/session-manager.d.ts +71 -75
  29. package/lib/internal/session/session-manager.js +360 -424
  30. package/lib/internal/user-defaults-helpers.js +49 -39
  31. package/lib/internal/voice-pn-bridge.d.ts +114 -12
  32. package/lib/internal/voice-pn-bridge.js +212 -5
  33. package/lib/models/call-state.d.ts +46 -44
  34. package/lib/models/call-state.js +70 -68
  35. package/lib/models/call.d.ts +161 -133
  36. package/lib/models/call.js +454 -382
  37. package/lib/models/config.d.ts +11 -18
  38. package/lib/models/config.js +37 -35
  39. package/lib/models/connection-state.d.ts +10 -10
  40. package/lib/models/connection-state.js +16 -16
  41. package/lib/telnyx-voice-app.d.ts +28 -28
  42. package/lib/telnyx-voice-app.js +513 -480
  43. package/lib/telnyx-voip-client.d.ts +167 -167
  44. package/lib/telnyx-voip-client.js +385 -390
  45. package/package.json +115 -104
  46. package/src/callkit/callkit-coordinator.ts +830 -846
  47. package/src/hooks/useNetworkStateHandler.ts +0 -0
  48. package/src/internal/calls/call-state-controller.ts +407 -384
  49. package/src/internal/session/session-manager.ts +483 -467
  50. package/src/internal/voice-pn-bridge.ts +266 -18
  51. package/src/models/call-state.ts +105 -98
  52. package/src/models/call.ts +502 -388
  53. package/src/telnyx-voice-app.tsx +788 -690
  54. package/src/telnyx-voip-client.ts +551 -539
  55. package/src/types/telnyx-sdk.d.ts +93 -79
package/package.json CHANGED
@@ -1,104 +1,115 @@
1
- {
2
- "name": "@telnyx/react-voice-commons-sdk",
3
- "version": "0.1.2",
4
- "description": "A high-level, state-agnostic, drop-in module for the Telnyx React Native SDK that simplifies WebRTC voice calling integration",
5
- "main": "lib/index.js",
6
- "module": "lib/index.js",
7
- "types": "lib/index.d.ts",
8
- "react-native": "lib/index.js",
9
- "source": "src/index.ts",
10
- "exports": {
11
- ".": {
12
- "import": "./lib/index.js",
13
- "require": "./lib/index.js",
14
- "types": "./lib/index.d.ts"
15
- }
16
- },
17
- "files": [
18
- "lib",
19
- "src",
20
- "ios",
21
- "TelnyxVoiceCommons.podspec",
22
- "README.md"
23
- ],
24
- "scripts": {
25
- "build": "tsc",
26
- "dev": "tsc --watch",
27
- "test": "jest",
28
- "test:watch": "jest --watch",
29
- "lint": "eslint src --ext .ts,.tsx",
30
- "clean": "rm -rf lib",
31
- "android": "expo run:android",
32
- "ios": "expo run:ios"
33
- },
34
- "keywords": [
35
- "react-native",
36
- "telnyx",
37
- "webrtc",
38
- "voice",
39
- "calling",
40
- "sip",
41
- "voip",
42
- "commons",
43
- "headless"
44
- ],
45
- "author": "Telnyx",
46
- "license": "MIT",
47
- "homepage": "https://github.com/team-telnyx/react-native-voice-commons",
48
- "repository": {
49
- "type": "git",
50
- "url": "git+https://github.com/team-telnyx/react-native-voice-commons.git"
51
- },
52
- "bugs": {
53
- "url": "https://github.com/team-telnyx/react-native-voice-commons/issues"
54
- },
55
- "peerDependencies": {
56
- "@react-native-async-storage/async-storage": "^2.1.0",
57
- "expo-router": "^5.1.0",
58
- "react": "^19.0.0",
59
- "react-native": "^0.79.0",
60
- "react-native-webrtc": "^124.0.5"
61
- },
62
- "peerDependenciesMeta": {
63
- "@react-native-async-storage/async-storage": {
64
- "optional": false
65
- },
66
- "expo-router": {
67
- "optional": false
68
- },
69
- "react": {
70
- "optional": false
71
- },
72
- "react-native": {
73
- "optional": false
74
- },
75
- "react-native-webrtc": {
76
- "optional": false
77
- }
78
- },
79
- "dependencies": {
80
- "@react-native-community/eslint-config": "^3.2.0",
81
- "@telnyx/react-native-voice-sdk": "^0.1.0",
82
- "eventemitter3": "^5.0.1",
83
- "expo": "~53.0.22",
84
- "react-native-voip-push-notification": "^3.3.3",
85
- "rxjs": "^7.8.2"
86
- },
87
- "devDependencies": {
88
- "@types/jest": "^29.5.0",
89
- "@types/react": "~19.0.14",
90
- "@types/react-native": "^0.72.8",
91
- "@typescript-eslint/eslint-plugin": "^6.0.0",
92
- "@typescript-eslint/parser": "^6.0.0",
93
- "eslint": "^8.0.0",
94
- "jest": "^29.5.0",
95
- "ts-jest": "^29.1.0",
96
- "typescript": "^5.0.0"
97
- },
98
- "engines": {
99
- "node": ">=16"
100
- },
101
- "publishConfig": {
102
- "access": "public"
103
- }
104
- }
1
+ {
2
+ "name": "@telnyx/react-voice-commons-sdk",
3
+ "version": "0.1.4",
4
+ "description": "A high-level, state-agnostic, drop-in module for the Telnyx React Native SDK that simplifies WebRTC voice calling integration",
5
+ "main": "lib/index.js",
6
+ "module": "lib/index.js",
7
+ "types": "lib/index.d.ts",
8
+ "react-native": "lib/index.js",
9
+ "source": "src/index.ts",
10
+ "exports": {
11
+ ".": {
12
+ "import": "./lib/index.js",
13
+ "require": "./lib/index.js",
14
+ "types": "./lib/index.d.ts"
15
+ }
16
+ },
17
+ "files": [
18
+ "lib",
19
+ "src",
20
+ "ios",
21
+ "TelnyxVoiceCommons.podspec",
22
+ "README.md",
23
+ "CHANGELOG.md"
24
+ ],
25
+ "scripts": {
26
+ "build": "tsc",
27
+ "dev": "tsc --watch",
28
+ "test": "jest",
29
+ "test:watch": "jest --watch",
30
+ "lint": "eslint src --ext .ts,.tsx",
31
+ "clean": "rm -rf lib",
32
+ "docs": "typedoc",
33
+ "docs:watch": "typedoc --watch",
34
+ "docs:markdown": "typedoc --options typedoc.markdown.json",
35
+ "docs:all": "npm run docs && npm run docs:markdown",
36
+ "android": "expo run:android",
37
+ "ios": "expo run:ios",
38
+ "dev:local": "npm pkg set dependencies.@telnyx/react-native-voice-sdk=file:../package",
39
+ "dev:published": "npm pkg set dependencies.@telnyx/react-native-voice-sdk=^0.2.0",
40
+ "prepublishOnly": "npm run dev:published && npm install",
41
+ "postpublish": "npm run dev:local && npm install"
42
+ },
43
+ "keywords": [
44
+ "react-native",
45
+ "telnyx",
46
+ "webrtc",
47
+ "voice",
48
+ "calling",
49
+ "sip",
50
+ "voip",
51
+ "commons",
52
+ "headless"
53
+ ],
54
+ "author": "Telnyx",
55
+ "license": "MIT",
56
+ "homepage": "https://github.com/team-telnyx/react-native-voice-commons",
57
+ "repository": {
58
+ "type": "git",
59
+ "url": "git+https://github.com/team-telnyx/react-native-voice-commons.git"
60
+ },
61
+ "bugs": {
62
+ "url": "https://github.com/team-telnyx/react-native-voice-commons/issues"
63
+ },
64
+ "peerDependencies": {
65
+ "@react-native-async-storage/async-storage": "^2.1.0",
66
+ "expo-router": "^5.1.0",
67
+ "react": "19.0.0",
68
+ "react-native": "^0.79.0",
69
+ "react-native-webrtc": "^124.0.5"
70
+ },
71
+ "peerDependenciesMeta": {
72
+ "@react-native-async-storage/async-storage": {
73
+ "optional": false
74
+ },
75
+ "expo-router": {
76
+ "optional": false
77
+ },
78
+ "react": {
79
+ "optional": false
80
+ },
81
+ "react-native": {
82
+ "optional": false
83
+ },
84
+ "react-native-webrtc": {
85
+ "optional": false
86
+ }
87
+ },
88
+ "dependencies": {
89
+ "@react-native-community/eslint-config": "^3.2.0",
90
+ "@telnyx/react-native-voice-sdk": "0.2.0",
91
+ "eventemitter3": "^5.0.1",
92
+ "expo": "~53.0.22",
93
+ "react-native-voip-push-notification": "^3.3.3",
94
+ "rxjs": "^7.8.2"
95
+ },
96
+ "devDependencies": {
97
+ "@types/jest": "^29.5.0",
98
+ "@types/react": "~19.0.14",
99
+ "@types/react-native": "^0.72.8",
100
+ "@typescript-eslint/eslint-plugin": "^6.0.0",
101
+ "@typescript-eslint/parser": "^6.0.0",
102
+ "eslint": "^8.0.0",
103
+ "jest": "^29.5.0",
104
+ "ts-jest": "^29.1.0",
105
+ "typedoc": "^0.28.14",
106
+ "typedoc-plugin-markdown": "^4.9.0",
107
+ "typescript": "^5.0.0"
108
+ },
109
+ "engines": {
110
+ "node": ">=16"
111
+ },
112
+ "publishConfig": {
113
+ "access": "public"
114
+ }
115
+ }