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

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 (237) hide show
  1. package/CHANGELOG.md +31 -16
  2. package/README.md +469 -469
  3. package/TelnyxVoiceCommons.podspec +31 -31
  4. package/android/build/.transforms/35d64beab84343a7420320f8057c40b9/results.bin +1 -0
  5. package/android/build/.transforms/35d64beab84343a7420320f8057c40b9/transformed/classes/classes_dex/classes.dex +0 -0
  6. package/android/build/.transforms/81896f393ea3c2e44a76283db01ad461/results.bin +1 -0
  7. package/android/build/.transforms/81896f393ea3c2e44a76283db01ad461/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/BuildConfig.dex +0 -0
  8. package/android/build/.transforms/81896f393ea3c2e44a76283db01ad461/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/CallForegroundService$Companion.dex +0 -0
  9. package/android/build/.transforms/81896f393ea3c2e44a76283db01ad461/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/CallForegroundService.dex +0 -0
  10. package/android/build/.transforms/81896f393ea3c2e44a76283db01ad461/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/TelnyxFirebaseMessagingService.dex +0 -0
  11. package/android/build/.transforms/81896f393ea3c2e44a76283db01ad461/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/TelnyxMainActivity$Companion.dex +0 -0
  12. package/android/build/.transforms/81896f393ea3c2e44a76283db01ad461/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/TelnyxMainActivity.dex +0 -0
  13. package/android/build/.transforms/81896f393ea3c2e44a76283db01ad461/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/TelnyxNotificationActionReceiver.dex +0 -0
  14. package/android/build/.transforms/81896f393ea3c2e44a76283db01ad461/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/TelnyxNotificationHelper$Companion.dex +0 -0
  15. package/android/build/.transforms/81896f393ea3c2e44a76283db01ad461/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/TelnyxNotificationHelper.dex +0 -0
  16. package/android/build/.transforms/81896f393ea3c2e44a76283db01ad461/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/VoicePnBridgeModule$Companion.dex +0 -0
  17. package/android/build/.transforms/81896f393ea3c2e44a76283db01ad461/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/VoicePnBridgeModule.dex +0 -0
  18. package/android/build/.transforms/81896f393ea3c2e44a76283db01ad461/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/VoicePnBridgePackage.dex +0 -0
  19. package/android/build/.transforms/81896f393ea3c2e44a76283db01ad461/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/VoicePnManager.dex +0 -0
  20. package/android/build/.transforms/81896f393ea3c2e44a76283db01ad461/transformed/bundleLibRuntimeToDirDebug/desugar_graph.bin +0 -0
  21. package/android/build/.transforms/8ebc6907344eccd2b9c23d903854d4fb/results.bin +1 -0
  22. package/android/build/.transforms/8ebc6907344eccd2b9c23d903854d4fb/transformed/classes/classes_dex/classes.dex +0 -0
  23. package/android/build/.transforms/af1ab9e262e91ec4942977987fb9a0ae/results.bin +1 -0
  24. package/android/build/.transforms/af1ab9e262e91ec4942977987fb9a0ae/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/BuildConfig.dex +0 -0
  25. package/android/build/.transforms/af1ab9e262e91ec4942977987fb9a0ae/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/TelnyxFirebaseMessagingService.dex +0 -0
  26. package/android/build/.transforms/af1ab9e262e91ec4942977987fb9a0ae/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/TelnyxMainActivity$Companion.dex +0 -0
  27. package/android/build/.transforms/af1ab9e262e91ec4942977987fb9a0ae/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/TelnyxMainActivity.dex +0 -0
  28. package/android/build/.transforms/af1ab9e262e91ec4942977987fb9a0ae/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/TelnyxNotificationActionReceiver.dex +0 -0
  29. package/android/build/.transforms/af1ab9e262e91ec4942977987fb9a0ae/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/TelnyxNotificationHelper$Companion.dex +0 -0
  30. package/android/build/.transforms/af1ab9e262e91ec4942977987fb9a0ae/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/TelnyxNotificationHelper.dex +0 -0
  31. package/android/build/.transforms/af1ab9e262e91ec4942977987fb9a0ae/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/VoicePnBridgeModule.dex +0 -0
  32. package/android/build/.transforms/af1ab9e262e91ec4942977987fb9a0ae/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/VoicePnBridgePackage.dex +0 -0
  33. package/android/build/.transforms/af1ab9e262e91ec4942977987fb9a0ae/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/VoicePnManager.dex +0 -0
  34. package/android/build/.transforms/af1ab9e262e91ec4942977987fb9a0ae/transformed/bundleLibRuntimeToDirDebug/desugar_graph.bin +0 -0
  35. package/android/build/generated/source/buildConfig/debug/com/telnyx/react_voice_commons/BuildConfig.java +10 -0
  36. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +42 -0
  37. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output-metadata.json +18 -0
  38. package/android/build/intermediates/aar_metadata/debug/writeDebugAarMetadata/aar-metadata.properties +6 -0
  39. package/android/build/intermediates/annotation_processor_list/debug/javaPreCompileDebug/annotationProcessors.json +1 -0
  40. package/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
  41. package/android/build/intermediates/compile_r_class_jar/debug/generateDebugRFile/R.jar +0 -0
  42. package/android/build/intermediates/compile_symbol_list/debug/generateDebugRFile/R.txt +0 -0
  43. package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +1 -0
  44. package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +2 -0
  45. package/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +2 -0
  46. package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +2 -0
  47. package/android/build/intermediates/incremental/packageDebugAssets/merger.xml +2 -0
  48. package/android/build/intermediates/java_res/debug/processDebugJavaRes/out/META-INF/telnyx_react-voice-commons-sdk_debug.kotlin_module +0 -0
  49. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/telnyx/react_voice_commons/BuildConfig.class +0 -0
  50. package/android/build/intermediates/local_only_symbol_list/debug/parseDebugLocalResources/R-def.txt +2 -0
  51. package/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +75 -0
  52. package/android/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +42 -0
  53. package/android/build/intermediates/navigation_json/debug/extractDeepLinksDebug/navigation.json +1 -0
  54. package/android/build/intermediates/nested_resources_validation_report/debug/generateDebugResources/nestedResourcesValidationReport.txt +1 -0
  55. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/META-INF/telnyx_react-voice-commons-sdk_debug.kotlin_module +0 -0
  56. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/telnyx/react_voice_commons/BuildConfig.class +0 -0
  57. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/telnyx/react_voice_commons/CallForegroundService$Companion.class +0 -0
  58. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/telnyx/react_voice_commons/CallForegroundService.class +0 -0
  59. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/telnyx/react_voice_commons/TelnyxFirebaseMessagingService.class +0 -0
  60. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/telnyx/react_voice_commons/TelnyxMainActivity$Companion.class +0 -0
  61. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/telnyx/react_voice_commons/TelnyxMainActivity.class +0 -0
  62. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/telnyx/react_voice_commons/TelnyxNotificationActionReceiver.class +0 -0
  63. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/telnyx/react_voice_commons/TelnyxNotificationHelper$Companion.class +0 -0
  64. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/telnyx/react_voice_commons/TelnyxNotificationHelper.class +0 -0
  65. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/telnyx/react_voice_commons/VoicePnBridgeModule$Companion.class +0 -0
  66. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/telnyx/react_voice_commons/VoicePnBridgeModule.class +0 -0
  67. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/telnyx/react_voice_commons/VoicePnBridgePackage.class +0 -0
  68. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/telnyx/react_voice_commons/VoicePnManager.class +0 -0
  69. package/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
  70. package/android/build/intermediates/symbol_list_with_package_name/debug/generateDebugRFile/package-aware-r.txt +1 -0
  71. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab +0 -0
  72. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream +0 -0
  73. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream.len +0 -0
  74. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.len +0 -0
  75. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
  76. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i +0 -0
  77. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i.len +0 -0
  78. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
  79. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
  80. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len +0 -0
  81. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.len +0 -0
  82. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at +0 -0
  83. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i +0 -0
  84. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i.len +0 -0
  85. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
  86. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
  87. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len +0 -0
  88. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len +0 -0
  89. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
  90. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
  91. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i.len +0 -0
  92. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab +0 -0
  93. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream +0 -0
  94. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream.len +0 -0
  95. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.len +0 -0
  96. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.values.at +0 -0
  97. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i +0 -0
  98. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i.len +0 -0
  99. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
  100. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
  101. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
  102. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len +0 -0
  103. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
  104. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
  105. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i.len +0 -0
  106. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab +0 -0
  107. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
  108. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
  109. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.len +0 -0
  110. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
  111. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i +0 -0
  112. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i.len +0 -0
  113. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
  114. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream +0 -0
  115. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len +0 -0
  116. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.len +0 -0
  117. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
  118. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i +0 -0
  119. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i.len +0 -0
  120. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
  121. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream +0 -0
  122. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len +0 -0
  123. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.len +0 -0
  124. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
  125. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i +0 -0
  126. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i.len +0 -0
  127. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
  128. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
  129. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len +0 -0
  130. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.len +0 -0
  131. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
  132. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
  133. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i.len +0 -0
  134. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/counters.tab +2 -0
  135. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab +0 -0
  136. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream +0 -0
  137. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream.len +0 -0
  138. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.len +0 -0
  139. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at +0 -0
  140. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i +0 -0
  141. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i.len +0 -0
  142. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab +0 -0
  143. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream +0 -0
  144. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
  145. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len +0 -0
  146. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
  147. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i +0 -0
  148. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i.len +0 -0
  149. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
  150. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
  151. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
  152. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.len +0 -0
  153. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
  154. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
  155. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i.len +0 -0
  156. package/android/build/kotlin/compileDebugKotlin/cacheable/last-build.bin +0 -0
  157. package/android/build/kotlin/compileDebugKotlin/classpath-snapshot/shrunk-classpath-snapshot.bin +0 -0
  158. package/android/build/kotlin/compileDebugKotlin/local-state/build-history.bin +0 -0
  159. package/android/build/outputs/logs/manifest-merger-debug-report.txt +82 -0
  160. package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
  161. package/android/build/tmp/kotlin-classes/debug/META-INF/telnyx_react-voice-commons-sdk_debug.kotlin_module +0 -0
  162. package/android/build/tmp/kotlin-classes/debug/com/telnyx/react_voice_commons/CallForegroundService$Companion.class +0 -0
  163. package/android/build/tmp/kotlin-classes/debug/com/telnyx/react_voice_commons/CallForegroundService.class +0 -0
  164. package/android/build/tmp/kotlin-classes/debug/com/telnyx/react_voice_commons/TelnyxFirebaseMessagingService.class +0 -0
  165. package/android/build/tmp/kotlin-classes/debug/com/telnyx/react_voice_commons/TelnyxMainActivity$Companion.class +0 -0
  166. package/android/build/tmp/kotlin-classes/debug/com/telnyx/react_voice_commons/TelnyxMainActivity.class +0 -0
  167. package/android/build/tmp/kotlin-classes/debug/com/telnyx/react_voice_commons/TelnyxNotificationActionReceiver.class +0 -0
  168. package/android/build/tmp/kotlin-classes/debug/com/telnyx/react_voice_commons/TelnyxNotificationHelper$Companion.class +0 -0
  169. package/android/build/tmp/kotlin-classes/debug/com/telnyx/react_voice_commons/TelnyxNotificationHelper.class +0 -0
  170. package/android/build/tmp/kotlin-classes/debug/com/telnyx/react_voice_commons/VoicePnBridgeModule$Companion.class +0 -0
  171. package/android/build/tmp/kotlin-classes/debug/com/telnyx/react_voice_commons/VoicePnBridgeModule.class +0 -0
  172. package/android/build/tmp/kotlin-classes/debug/com/telnyx/react_voice_commons/VoicePnBridgePackage.class +0 -0
  173. package/android/build/tmp/kotlin-classes/debug/com/telnyx/react_voice_commons/VoicePnManager.class +0 -0
  174. package/android/build.gradle +45 -0
  175. package/android/local.properties +8 -0
  176. package/android/src/main/AndroidManifest.xml +38 -0
  177. package/android/src/main/java/com/telnyx/react_voice_commons/CallForegroundService.kt +83 -0
  178. package/android/src/main/java/com/telnyx/react_voice_commons/TelnyxFirebaseMessagingService.kt +179 -0
  179. package/android/src/main/java/com/telnyx/react_voice_commons/TelnyxMainActivity.kt +216 -0
  180. package/android/src/main/java/com/telnyx/react_voice_commons/TelnyxNotificationActionReceiver.kt +177 -0
  181. package/android/src/main/java/com/telnyx/react_voice_commons/TelnyxNotificationHelper.kt +277 -0
  182. package/android/src/main/java/com/telnyx/react_voice_commons/VoicePnBridgeModule.kt +247 -0
  183. package/android/src/main/java/com/telnyx/react_voice_commons/VoicePnBridgePackage.kt +17 -0
  184. package/android/src/main/java/com/telnyx/react_voice_commons/VoicePnManager.kt +154 -0
  185. package/ios/CallKitBridge.m +43 -43
  186. package/ios/CallKitBridge.swift +874 -874
  187. package/ios/VoicePnBridge.m +30 -30
  188. package/ios/VoicePnBridge.swift +86 -86
  189. package/lib/callkit/callkit-coordinator.d.ts +114 -110
  190. package/lib/callkit/callkit-coordinator.js +706 -664
  191. package/lib/callkit/callkit.d.ts +41 -41
  192. package/lib/callkit/callkit.js +242 -252
  193. package/lib/callkit/index.js +47 -15
  194. package/lib/callkit/use-callkit.d.ts +19 -19
  195. package/lib/callkit/use-callkit.js +310 -270
  196. package/lib/context/TelnyxVoiceContext.d.ts +9 -9
  197. package/lib/context/TelnyxVoiceContext.js +13 -10
  198. package/lib/hooks/use-callkit-coordinator.d.ts +17 -9
  199. package/lib/hooks/use-callkit-coordinator.js +50 -45
  200. package/lib/hooks/useAppReadyNotifier.js +15 -13
  201. package/lib/hooks/useAppStateHandler.d.ts +11 -6
  202. package/lib/hooks/useAppStateHandler.js +110 -95
  203. package/lib/index.d.ts +21 -3
  204. package/lib/index.js +201 -50
  205. package/lib/internal/CallKitHandler.d.ts +6 -6
  206. package/lib/internal/CallKitHandler.js +104 -96
  207. package/lib/internal/callkit-manager.d.ts +57 -57
  208. package/lib/internal/callkit-manager.js +316 -299
  209. package/lib/internal/calls/call-state-controller.d.ts +78 -73
  210. package/lib/internal/calls/call-state-controller.js +326 -265
  211. package/lib/internal/session/session-manager.d.ts +71 -71
  212. package/lib/internal/session/session-manager.js +437 -360
  213. package/lib/internal/user-defaults-helpers.js +39 -49
  214. package/lib/internal/voice-pn-bridge.d.ts +112 -104
  215. package/lib/internal/voice-pn-bridge.js +193 -203
  216. package/lib/models/call-state.d.ts +46 -46
  217. package/lib/models/call-state.js +74 -70
  218. package/lib/models/call.d.ts +173 -157
  219. package/lib/models/call.js +492 -448
  220. package/lib/models/config.d.ts +18 -11
  221. package/lib/models/config.js +35 -37
  222. package/lib/models/connection-state.d.ts +10 -10
  223. package/lib/models/connection-state.js +16 -16
  224. package/lib/telnyx-voice-app.d.ts +28 -28
  225. package/lib/telnyx-voice-app.js +561 -509
  226. package/lib/telnyx-voip-client.d.ts +174 -167
  227. package/lib/telnyx-voip-client.js +397 -385
  228. package/package.json +116 -115
  229. package/src/callkit/callkit-coordinator.ts +830 -830
  230. package/src/internal/calls/call-state-controller.ts +407 -407
  231. package/src/internal/session/session-manager.ts +483 -483
  232. package/src/internal/voice-pn-bridge.ts +266 -266
  233. package/src/models/call-state.ts +105 -105
  234. package/src/models/call.ts +502 -502
  235. package/src/telnyx-voice-app.tsx +787 -788
  236. package/src/telnyx-voip-client.ts +551 -551
  237. package/src/types/telnyx-sdk.d.ts +93 -93
@@ -1,12 +1,12 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ 'use strict';
2
+ Object.defineProperty(exports, '__esModule', { value: true });
3
3
  exports.TelnyxVoipClient = void 0;
4
4
  exports.createTelnyxVoipClient = createTelnyxVoipClient;
5
5
  exports.createBackgroundTelnyxVoipClient = createBackgroundTelnyxVoipClient;
6
- const connection_state_1 = require("./models/connection-state");
7
- const config_1 = require("./models/config");
8
- const session_manager_1 = require("./internal/session/session-manager");
9
- const call_state_controller_1 = require("./internal/calls/call-state-controller");
6
+ const connection_state_1 = require('./models/connection-state');
7
+ const config_1 = require('./models/config');
8
+ const session_manager_1 = require('./internal/session/session-manager');
9
+ const call_state_controller_1 = require('./internal/calls/call-state-controller');
10
10
  /**
11
11
  * The main public interface for the react-voice-commons module.
12
12
  *
@@ -19,412 +19,424 @@ const call_state_controller_1 = require("./internal/calls/call-state-controller"
19
19
  * into their chosen state management solution naturally.
20
20
  */
21
21
  class TelnyxVoipClient {
22
- /**
23
- * Creates a new TelnyxVoipClient instance.
24
- *
25
- * @param options Configuration options for the client
26
- */
27
- constructor(options = {}) {
28
- this._disposed = false;
29
- this._options = {
30
- enableAppStateManagement: true,
31
- debug: false,
32
- ...options,
33
- };
34
- // Initialize core components
35
- this._sessionManager = new session_manager_1.SessionManager();
36
- this._callStateController = new call_state_controller_1.CallStateController(this._sessionManager);
37
- // Set up callback to initialize call state controller listeners when client is ready
38
- this._sessionManager.setOnClientReady(() => {
39
- console.log('🔧 TelnyxVoipClient: Client ready, initializing call state controller listeners');
40
- this._callStateController.initializeClientListeners();
41
- });
42
- if (this._options.debug) {
43
- console.log('TelnyxVoipClient initialized with options:', this._options);
44
- }
22
+ /**
23
+ * Creates a new TelnyxVoipClient instance.
24
+ *
25
+ * @param options Configuration options for the client
26
+ */
27
+ constructor(options = {}) {
28
+ this._disposed = false;
29
+ this._options = {
30
+ enableAppStateManagement: true,
31
+ debug: false,
32
+ ...options,
33
+ };
34
+ // Initialize core components
35
+ this._sessionManager = new session_manager_1.SessionManager();
36
+ this._callStateController = new call_state_controller_1.CallStateController(
37
+ this._sessionManager
38
+ );
39
+ // Set up callback to initialize call state controller listeners when client is ready
40
+ this._sessionManager.setOnClientReady(() => {
41
+ console.log(
42
+ '🔧 TelnyxVoipClient: Client ready, initializing call state controller listeners'
43
+ );
44
+ this._callStateController.initializeClientListeners();
45
+ });
46
+ if (this._options.debug) {
47
+ console.log('TelnyxVoipClient initialized with options:', this._options);
45
48
  }
46
- // ========== Observable Streams ==========
47
- /**
48
- * Stream of connection state changes.
49
- *
50
- * Emits the current status of the connection to the Telnyx backend.
51
- * Values include connecting, connected, disconnected, and error states.
52
- * Listen to this to show connection indicators in your UI.
53
- */
54
- get connectionState$() {
55
- return this._sessionManager.connectionState$;
49
+ }
50
+ // ========== Observable Streams ==========
51
+ /**
52
+ * Stream of connection state changes.
53
+ *
54
+ * Emits the current status of the connection to the Telnyx backend.
55
+ * Values include connecting, connected, disconnected, and error states.
56
+ * Listen to this to show connection indicators in your UI.
57
+ */
58
+ get connectionState$() {
59
+ return this._sessionManager.connectionState$;
60
+ }
61
+ /**
62
+ * Stream of all current calls.
63
+ *
64
+ * Emits a list of all current Call objects. Use this for applications
65
+ * that need to support multiple simultaneous calls (e.g., call waiting,
66
+ * conference calls).
67
+ */
68
+ get calls$() {
69
+ return this._callStateController.calls$;
70
+ }
71
+ /**
72
+ * Stream of the currently active call.
73
+ *
74
+ * A convenience stream that emits the currently active Call object.
75
+ * It emits null when no call is in progress. Ideal for applications
76
+ * that only handle a single call at a time.
77
+ */
78
+ get activeCall$() {
79
+ return this._callStateController.activeCall$;
80
+ }
81
+ // ========== Synchronous State Access ==========
82
+ /**
83
+ * Current connection state (synchronous access).
84
+ */
85
+ get currentConnectionState() {
86
+ return this._sessionManager.currentState;
87
+ }
88
+ /**
89
+ * Current list of calls (synchronous access).
90
+ */
91
+ get currentCalls() {
92
+ return this._callStateController.currentCalls;
93
+ }
94
+ /**
95
+ * Current active call (synchronous access).
96
+ */
97
+ get currentActiveCall() {
98
+ return this._callStateController.currentActiveCall;
99
+ }
100
+ /**
101
+ * Current session ID (UUID) for this connection.
102
+ */
103
+ get sessionId() {
104
+ return this._sessionManager.sessionId;
105
+ }
106
+ /**
107
+ * Configuration options for this client instance.
108
+ */
109
+ get options() {
110
+ return this._options;
111
+ }
112
+ // ========== Authentication Methods ==========
113
+ /**
114
+ * Connects to the Telnyx platform using credential authentication.
115
+ *
116
+ * @param config The credential configuration containing SIP username and password
117
+ * @returns A Promise that completes when the connection attempt is initiated
118
+ *
119
+ * Listen to connectionState$ to monitor the actual connection status.
120
+ * Credentials are automatically stored for future reconnection.
121
+ */
122
+ async login(config) {
123
+ this._throwIfDisposed();
124
+ const errors = (0, config_1.validateConfig)(config);
125
+ if (errors.length > 0) {
126
+ throw new Error(`Invalid configuration: ${errors.join(', ')}`);
56
127
  }
57
- /**
58
- * Stream of all current calls.
59
- *
60
- * Emits a list of all current Call objects. Use this for applications
61
- * that need to support multiple simultaneous calls (e.g., call waiting,
62
- * conference calls).
63
- */
64
- get calls$() {
65
- return this._callStateController.calls$;
128
+ if (this._options.debug) {
129
+ console.log('TelnyxVoipClient: Logging in with credentials for user:', config.sipUser);
66
130
  }
67
- /**
68
- * Stream of the currently active call.
69
- *
70
- * A convenience stream that emits the currently active Call object.
71
- * It emits null when no call is in progress. Ideal for applications
72
- * that only handle a single call at a time.
73
- */
74
- get activeCall$() {
75
- return this._callStateController.activeCall$;
131
+ // Store credentials for future reconnection
132
+ await this._storeCredentials(config);
133
+ await this._sessionManager.connectWithCredential(config);
134
+ }
135
+ /**
136
+ * Connects to the Telnyx platform using token authentication.
137
+ *
138
+ * @param config The token configuration containing the authentication token
139
+ * @returns A Promise that completes when the connection attempt is initiated
140
+ *
141
+ * Listen to connectionState$ to monitor the actual connection status.
142
+ * Token is automatically stored for future reconnection.
143
+ */
144
+ async loginWithToken(config) {
145
+ this._throwIfDisposed();
146
+ const errors = (0, config_1.validateConfig)(config);
147
+ if (errors.length > 0) {
148
+ throw new Error(`Invalid configuration: ${errors.join(', ')}`);
76
149
  }
77
- // ========== Synchronous State Access ==========
78
- /**
79
- * Current connection state (synchronous access).
80
- */
81
- get currentConnectionState() {
82
- return this._sessionManager.currentState;
150
+ if (this._options.debug) {
151
+ console.log('TelnyxVoipClient: Logging in with token');
83
152
  }
84
- /**
85
- * Current list of calls (synchronous access).
86
- */
87
- get currentCalls() {
88
- return this._callStateController.currentCalls;
153
+ // Store token for future reconnection
154
+ await this._storeToken(config);
155
+ await this._sessionManager.connectWithToken(config);
156
+ }
157
+ /**
158
+ * Disconnects from the Telnyx platform.
159
+ *
160
+ * This method terminates the connection, ends any active calls, and
161
+ * cleans up all related resources.
162
+ */
163
+ async logout() {
164
+ if (this._disposed) {
165
+ return;
89
166
  }
90
- /**
91
- * Current active call (synchronous access).
92
- */
93
- get currentActiveCall() {
94
- return this._callStateController.currentActiveCall;
167
+ if (this._options.debug) {
168
+ console.log('TelnyxVoipClient: Logging out');
95
169
  }
96
- /**
97
- * Current session ID (UUID) for this connection.
98
- */
99
- get sessionId() {
100
- return this._sessionManager.sessionId;
170
+ await this._sessionManager.disconnect();
171
+ }
172
+ /**
173
+ * Attempts to reconnect using previously stored configuration.
174
+ *
175
+ * This method is used for auto-reconnection scenarios where the app
176
+ * comes back to the foreground and needs to restore the connection.
177
+ *
178
+ * @returns Promise<boolean> - true if reconnection was successful, false otherwise
179
+ */
180
+ async loginFromStoredConfig() {
181
+ this._throwIfDisposed();
182
+ if (this._options.debug) {
183
+ console.log('TelnyxVoipClient: Attempting to login from stored config');
101
184
  }
102
- /**
103
- * Configuration options for this client instance.
104
- */
105
- get options() {
106
- return this._options;
107
- }
108
- // ========== Authentication Methods ==========
109
- /**
110
- * Connects to the Telnyx platform using credential authentication.
111
- *
112
- * @param config The credential configuration containing SIP username and password
113
- * @returns A Promise that completes when the connection attempt is initiated
114
- *
115
- * Listen to connectionState$ to monitor the actual connection status.
116
- * Credentials are automatically stored for future reconnection.
117
- */
118
- async login(config) {
119
- this._throwIfDisposed();
120
- const errors = (0, config_1.validateConfig)(config);
121
- if (errors.length > 0) {
122
- throw new Error(`Invalid configuration: ${errors.join(', ')}`);
123
- }
185
+ try {
186
+ // Try to retrieve stored credentials and token from AsyncStorage
187
+ const AsyncStorage = require('@react-native-async-storage/async-storage').default;
188
+ const storedUsername = await AsyncStorage.getItem('@telnyx_username');
189
+ const storedPassword = await AsyncStorage.getItem('@telnyx_password');
190
+ const storedCredentialToken = await AsyncStorage.getItem('@credential_token');
191
+ const storedPushToken = await AsyncStorage.getItem('@push_token');
192
+ // Check if we have credential-based authentication data
193
+ if (storedUsername && storedPassword) {
194
+ // Create credential config from stored data
195
+ const { createCredentialConfig } = require('./models/config');
196
+ const config = createCredentialConfig(storedUsername, storedPassword, {
197
+ pushNotificationDeviceToken: storedPushToken,
198
+ });
124
199
  if (this._options.debug) {
125
- console.log('TelnyxVoipClient: Logging in with credentials for user:', config.sipUser);
200
+ console.log(
201
+ 'TelnyxVoipClient: Reconnecting with stored credentials for user:',
202
+ storedUsername
203
+ );
126
204
  }
127
- // Store credentials for future reconnection
128
- await this._storeCredentials(config);
129
205
  await this._sessionManager.connectWithCredential(config);
130
- }
131
- /**
132
- * Connects to the Telnyx platform using token authentication.
133
- *
134
- * @param config The token configuration containing the authentication token
135
- * @returns A Promise that completes when the connection attempt is initiated
136
- *
137
- * Listen to connectionState$ to monitor the actual connection status.
138
- * Token is automatically stored for future reconnection.
139
- */
140
- async loginWithToken(config) {
141
- this._throwIfDisposed();
142
- const errors = (0, config_1.validateConfig)(config);
143
- if (errors.length > 0) {
144
- throw new Error(`Invalid configuration: ${errors.join(', ')}`);
145
- }
206
+ return true;
207
+ }
208
+ // Check if we have token-based authentication data
209
+ if (storedCredentialToken) {
210
+ // Create token config from stored data
211
+ const { createTokenConfig } = require('./models/config');
212
+ const config = createTokenConfig(storedCredentialToken, {
213
+ pushNotificationDeviceToken: storedPushToken,
214
+ });
146
215
  if (this._options.debug) {
147
- console.log('TelnyxVoipClient: Logging in with token');
216
+ console.log('TelnyxVoipClient: Reconnecting with stored token');
148
217
  }
149
- // Store token for future reconnection
150
- await this._storeToken(config);
151
218
  await this._sessionManager.connectWithToken(config);
219
+ return true;
220
+ }
221
+ // No stored authentication data found
222
+ if (this._options.debug) {
223
+ console.log('TelnyxVoipClient: No stored credentials or token found');
224
+ }
225
+ return false;
226
+ } catch (error) {
227
+ if (this._options.debug) {
228
+ console.log('TelnyxVoipClient: Failed to login from stored config:', error);
229
+ }
230
+ return false;
152
231
  }
153
- /**
154
- * Disconnects from the Telnyx platform.
155
- *
156
- * This method terminates the connection, ends any active calls, and
157
- * cleans up all related resources.
158
- */
159
- async logout() {
160
- if (this._disposed) {
161
- return;
162
- }
163
- if (this._options.debug) {
164
- console.log('TelnyxVoipClient: Logging out');
165
- }
166
- await this._sessionManager.disconnect();
232
+ }
233
+ // ========== Call Management Methods ==========
234
+ /**
235
+ * Initiates a new outgoing call.
236
+ *
237
+ * @param destination The destination number or SIP URI to call
238
+ * @param callerName Optional caller name to display
239
+ * @param callerNumber Optional caller ID number
240
+ * @param customHeaders Optional custom headers to include with the call
241
+ * @returns A Promise that completes with the Call object once the invitation has been sent
242
+ *
243
+ * The call's state can be monitored through the returned Call object's streams.
244
+ */
245
+ async newCall(destination, callerName, callerNumber, customHeaders) {
246
+ this._throwIfDisposed();
247
+ if (!destination || destination.trim() === '') {
248
+ throw new Error('Destination is required');
167
249
  }
168
- /**
169
- * Attempts to reconnect using previously stored configuration.
170
- *
171
- * This method is used for auto-reconnection scenarios where the app
172
- * comes back to the foreground and needs to restore the connection.
173
- *
174
- * @returns Promise<boolean> - true if reconnection was successful, false otherwise
175
- */
176
- async loginFromStoredConfig() {
177
- this._throwIfDisposed();
178
- if (this._options.debug) {
179
- console.log('TelnyxVoipClient: Attempting to login from stored config');
180
- }
181
- try {
182
- // Try to retrieve stored credentials and token from AsyncStorage
183
- const AsyncStorage = require('@react-native-async-storage/async-storage').default;
184
- const storedUsername = await AsyncStorage.getItem('@telnyx_username');
185
- const storedPassword = await AsyncStorage.getItem('@telnyx_password');
186
- const storedCredentialToken = await AsyncStorage.getItem('@credential_token');
187
- const storedPushToken = await AsyncStorage.getItem('@push_token');
188
- // Check if we have credential-based authentication data
189
- if (storedUsername && storedPassword) {
190
- // Create credential config from stored data
191
- const { createCredentialConfig } = require('./models/config');
192
- const config = createCredentialConfig(storedUsername, storedPassword, {
193
- pushNotificationDeviceToken: storedPushToken,
194
- });
195
- if (this._options.debug) {
196
- console.log('TelnyxVoipClient: Reconnecting with stored credentials for user:', storedUsername);
197
- }
198
- await this._sessionManager.connectWithCredential(config);
199
- return true;
200
- }
201
- // Check if we have token-based authentication data
202
- if (storedCredentialToken) {
203
- // Create token config from stored data
204
- const { createTokenConfig } = require('./models/config');
205
- const config = createTokenConfig(storedCredentialToken, {
206
- pushNotificationDeviceToken: storedPushToken,
207
- });
208
- if (this._options.debug) {
209
- console.log('TelnyxVoipClient: Reconnecting with stored token');
210
- }
211
- await this._sessionManager.connectWithToken(config);
212
- return true;
213
- }
214
- // No stored authentication data found
215
- if (this._options.debug) {
216
- console.log('TelnyxVoipClient: No stored credentials or token found');
217
- }
218
- return false;
219
- }
220
- catch (error) {
221
- if (this._options.debug) {
222
- console.log('TelnyxVoipClient: Failed to login from stored config:', error);
223
- }
224
- return false;
225
- }
250
+ if (this.currentConnectionState !== connection_state_1.TelnyxConnectionState.CONNECTED) {
251
+ throw new Error(`Cannot make call when connection state is: ${this.currentConnectionState}`);
226
252
  }
227
- // ========== Call Management Methods ==========
228
- /**
229
- * Initiates a new outgoing call.
230
- *
231
- * @param destination The destination number or SIP URI to call
232
- * @param callerName Optional caller name to display
233
- * @param callerNumber Optional caller ID number
234
- * @param customHeaders Optional custom headers to include with the call
235
- * @returns A Promise that completes with the Call object once the invitation has been sent
236
- *
237
- * The call's state can be monitored through the returned Call object's streams.
238
- */
239
- async newCall(destination, callerName, callerNumber, customHeaders) {
240
- this._throwIfDisposed();
241
- if (!destination || destination.trim() === '') {
242
- throw new Error('Destination is required');
243
- }
244
- if (this.currentConnectionState !== connection_state_1.TelnyxConnectionState.CONNECTED) {
245
- throw new Error(`Cannot make call when connection state is: ${this.currentConnectionState}`);
246
- }
247
- if (this._options.debug) {
248
- console.log('TelnyxVoipClient: Creating new call to:', destination);
249
- }
250
- return await this._callStateController.newCall(destination, callerName, callerNumber, customHeaders);
253
+ if (this._options.debug) {
254
+ console.log('TelnyxVoipClient: Creating new call to:', destination);
251
255
  }
252
- // ========== Push Notification Methods ==========
253
- /**
254
- * Handle push notification payload.
255
- *
256
- * This is the unified entry point for all push notifications. It intelligently
257
- * determines whether to show a new incoming call UI or to process an already
258
- * actioned (accepted/declined) call upon app launch.
259
- *
260
- * @param payload The push notification payload
261
- */
262
- async handlePushNotification(payload) {
263
- this._throwIfDisposed();
264
- if (this._options.debug) {
265
- console.log('TelnyxVoipClient: Handling push notification:', payload);
266
- }
267
- try {
268
- // First, pass the push notification to the session manager for processing
269
- // This will set the isCallFromPush flag on the TelnyxRTC client
270
- await this._sessionManager.handlePushNotification(payload);
271
- // Connect if not already connected
272
- const currentState = this.currentConnectionState;
273
- if (currentState !== connection_state_1.TelnyxConnectionState.CONNECTED) {
274
- // Try to login from stored config - now the push flags should be set
275
- const loginSuccess = await this.loginFromStoredConfig();
276
- if (!loginSuccess) {
277
- console.warn('TelnyxVoipClient: Could not login from stored config for push notification');
278
- return;
279
- }
280
- }
281
- }
282
- catch (error) {
283
- console.error('TelnyxVoipClient: Error handling push notification:', error);
284
- throw error;
285
- }
256
+ return await this._callStateController.newCall(
257
+ destination,
258
+ callerName,
259
+ callerNumber,
260
+ customHeaders
261
+ );
262
+ }
263
+ // ========== Push Notification Methods ==========
264
+ /**
265
+ * Handle push notification payload.
266
+ *
267
+ * This is the unified entry point for all push notifications. It intelligently
268
+ * determines whether to show a new incoming call UI or to process an already
269
+ * actioned (accepted/declined) call upon app launch.
270
+ *
271
+ * @param payload The push notification payload
272
+ */
273
+ async handlePushNotification(payload) {
274
+ this._throwIfDisposed();
275
+ if (this._options.debug) {
276
+ console.log('TelnyxVoipClient: Handling push notification:', payload);
286
277
  }
287
- /**
288
- * Disables push notifications for the current session.
289
- *
290
- * This method sends a request to the Telnyx backend to disable push
291
- * notifications for the current registered device/session.
292
- */
293
- disablePushNotifications() {
294
- this._throwIfDisposed();
295
- if (this._options.debug) {
296
- console.log('TelnyxVoipClient: Disabling push notifications');
278
+ try {
279
+ // First, pass the push notification to the session manager for processing
280
+ // This will set the isCallFromPush flag on the TelnyxRTC client
281
+ await this._sessionManager.handlePushNotification(payload);
282
+ // Connect if not already connected
283
+ const currentState = this.currentConnectionState;
284
+ if (currentState !== connection_state_1.TelnyxConnectionState.CONNECTED) {
285
+ // Try to login from stored config - now the push flags should be set
286
+ const loginSuccess = await this.loginFromStoredConfig();
287
+ if (!loginSuccess) {
288
+ console.warn(
289
+ 'TelnyxVoipClient: Could not login from stored config for push notification'
290
+ );
291
+ return;
297
292
  }
298
- this._sessionManager.disablePushNotifications();
293
+ }
294
+ } catch (error) {
295
+ console.error('TelnyxVoipClient: Error handling push notification:', error);
296
+ throw error;
299
297
  }
300
- // ========== CallKit Integration Methods ==========
301
- /**
302
- * Set a call to connecting state (used for push notification calls when answered via CallKit)
303
- * @param callId The ID of the call to set to connecting state
304
- * @internal
305
- */
306
- setCallConnecting(callId) {
307
- this._callStateController.setCallConnecting(callId);
298
+ }
299
+ /**
300
+ * Disables push notifications for the current session.
301
+ *
302
+ * This method sends a request to the Telnyx backend to disable push
303
+ * notifications for the current registered device/session.
304
+ */
305
+ disablePushNotifications() {
306
+ this._throwIfDisposed();
307
+ if (this._options.debug) {
308
+ console.log('TelnyxVoipClient: Disabling push notifications');
308
309
  }
309
- /**
310
- * Find a call by its underlying Telnyx call object
311
- * @param telnyxCall The Telnyx call object to find
312
- * @internal
313
- */
314
- findCallByTelnyxCall(telnyxCall) {
315
- return this._callStateController.findCallByTelnyxCall(telnyxCall);
310
+ this._sessionManager.disablePushNotifications();
311
+ }
312
+ // ========== CallKit Integration Methods ==========
313
+ /**
314
+ * Set a call to connecting state (used for push notification calls when answered via CallKit)
315
+ * @param callId The ID of the call to set to connecting state
316
+ * @internal
317
+ */
318
+ setCallConnecting(callId) {
319
+ this._callStateController.setCallConnecting(callId);
320
+ }
321
+ /**
322
+ * Find a call by its underlying Telnyx call object
323
+ * @param telnyxCall The Telnyx call object to find
324
+ * @internal
325
+ */
326
+ findCallByTelnyxCall(telnyxCall) {
327
+ return this._callStateController.findCallByTelnyxCall(telnyxCall);
328
+ }
329
+ /**
330
+ * Queue an answer action for when the call invite arrives (for CallKit integration)
331
+ * This should be called when the user answers from CallKit before the socket connection is established
332
+ * @param customHeaders Optional custom headers to include with the answer
333
+ */
334
+ queueAnswerFromCallKit(customHeaders = {}) {
335
+ this._throwIfDisposed();
336
+ if (this._options.debug) {
337
+ console.log('TelnyxVoipClient: Queuing answer action from CallKit', customHeaders);
316
338
  }
317
- /**
318
- * Queue an answer action for when the call invite arrives (for CallKit integration)
319
- * This should be called when the user answers from CallKit before the socket connection is established
320
- * @param customHeaders Optional custom headers to include with the answer
321
- */
322
- queueAnswerFromCallKit(customHeaders = {}) {
323
- this._throwIfDisposed();
324
- if (this._options.debug) {
325
- console.log('TelnyxVoipClient: Queuing answer action from CallKit', customHeaders);
326
- }
327
- const telnyxClient = this._sessionManager.telnyxClient;
328
- if (telnyxClient && typeof telnyxClient.queueAnswerFromCallKit === 'function') {
329
- telnyxClient.queueAnswerFromCallKit(customHeaders);
330
- }
331
- else {
332
- console.warn('TelnyxVoipClient: TelnyxRTC client not available or method not found for queueAnswerFromCallKit');
333
- }
339
+ const telnyxClient = this._sessionManager.telnyxClient;
340
+ if (telnyxClient && typeof telnyxClient.queueAnswerFromCallKit === 'function') {
341
+ telnyxClient.queueAnswerFromCallKit(customHeaders);
342
+ } else {
343
+ console.warn(
344
+ 'TelnyxVoipClient: TelnyxRTC client not available or method not found for queueAnswerFromCallKit'
345
+ );
334
346
  }
335
- /**
336
- * Queue an end action for when the call invite arrives (for CallKit integration)
337
- * This should be called when the user ends from CallKit before the socket connection is established
338
- */
339
- queueEndFromCallKit() {
340
- this._throwIfDisposed();
341
- if (this._options.debug) {
342
- console.log('TelnyxVoipClient: Queuing end action from CallKit');
343
- }
344
- const telnyxClient = this._sessionManager.telnyxClient;
345
- if (telnyxClient && typeof telnyxClient.queueEndFromCallKit === 'function') {
346
- telnyxClient.queueEndFromCallKit();
347
- }
348
- else {
349
- console.warn('TelnyxVoipClient: TelnyxRTC client not available or method not found for queueEndFromCallKit');
350
- }
347
+ }
348
+ /**
349
+ * Queue an end action for when the call invite arrives (for CallKit integration)
350
+ * This should be called when the user ends from CallKit before the socket connection is established
351
+ */
352
+ queueEndFromCallKit() {
353
+ this._throwIfDisposed();
354
+ if (this._options.debug) {
355
+ console.log('TelnyxVoipClient: Queuing end action from CallKit');
351
356
  }
352
- // ========== Lifecycle Methods ==========
353
- /**
354
- * Dispose of the client and clean up all resources.
355
- *
356
- * After calling this method, the client instance should not be used anymore.
357
- * This is particularly important for background clients that should be
358
- * disposed after handling push notifications.
359
- */
360
- dispose() {
361
- if (this._disposed) {
362
- return;
363
- }
364
- if (this._options.debug) {
365
- console.log('TelnyxVoipClient: Disposing client');
366
- }
367
- this._disposed = true;
368
- this._callStateController.dispose();
369
- this._sessionManager.dispose();
357
+ const telnyxClient = this._sessionManager.telnyxClient;
358
+ if (telnyxClient && typeof telnyxClient.queueEndFromCallKit === 'function') {
359
+ telnyxClient.queueEndFromCallKit();
360
+ } else {
361
+ console.warn(
362
+ 'TelnyxVoipClient: TelnyxRTC client not available or method not found for queueEndFromCallKit'
363
+ );
370
364
  }
371
- // ========== Private Methods ==========
372
- /**
373
- * Store credential configuration for automatic reconnection
374
- */
375
- async _storeCredentials(config) {
376
- try {
377
- const AsyncStorage = require('@react-native-async-storage/async-storage').default;
378
- await AsyncStorage.setItem('@telnyx_username', config.sipUser);
379
- await AsyncStorage.setItem('@telnyx_password', config.sipPassword);
380
- if (config.pushNotificationDeviceToken) {
381
- await AsyncStorage.setItem('@push_token', config.pushNotificationDeviceToken);
382
- }
383
- // Clear any existing token since we're using credentials
384
- await AsyncStorage.removeItem('@credential_token');
385
- if (this._options.debug) {
386
- console.log('TelnyxVoipClient: Stored credentials for user:', config.sipUser);
387
- }
388
- }
389
- catch (error) {
390
- if (this._options.debug) {
391
- console.log('TelnyxVoipClient: Failed to store credentials:', error);
392
- }
393
- // Don't throw here - storage failure shouldn't prevent login
394
- }
365
+ }
366
+ // ========== Lifecycle Methods ==========
367
+ /**
368
+ * Dispose of the client and clean up all resources.
369
+ *
370
+ * After calling this method, the client instance should not be used anymore.
371
+ * This is particularly important for background clients that should be
372
+ * disposed after handling push notifications.
373
+ */
374
+ dispose() {
375
+ if (this._disposed) {
376
+ return;
395
377
  }
396
- /**
397
- * Store token configuration for automatic reconnection
398
- */
399
- async _storeToken(config) {
400
- try {
401
- const AsyncStorage = require('@react-native-async-storage/async-storage').default;
402
- await AsyncStorage.setItem('@credential_token', config.token);
403
- if (config.pushNotificationDeviceToken) {
404
- await AsyncStorage.setItem('@push_token', config.pushNotificationDeviceToken);
405
- }
406
- // Clear any existing credentials since we're using token
407
- await AsyncStorage.removeItem('@telnyx_username');
408
- await AsyncStorage.removeItem('@telnyx_password');
409
- if (this._options.debug) {
410
- console.log('TelnyxVoipClient: Stored authentication token');
411
- }
412
- }
413
- catch (error) {
414
- if (this._options.debug) {
415
- console.log('TelnyxVoipClient: Failed to store token:', error);
416
- }
417
- // Don't throw here - storage failure shouldn't prevent login
418
- }
378
+ if (this._options.debug) {
379
+ console.log('TelnyxVoipClient: Disposing client');
419
380
  }
420
- /**
421
- * Throw an error if the client has been disposed
422
- */
423
- _throwIfDisposed() {
424
- if (this._disposed) {
425
- throw new Error('TelnyxVoipClient has been disposed');
426
- }
381
+ this._disposed = true;
382
+ this._callStateController.dispose();
383
+ this._sessionManager.dispose();
384
+ }
385
+ // ========== Private Methods ==========
386
+ /**
387
+ * Store credential configuration for automatic reconnection
388
+ */
389
+ async _storeCredentials(config) {
390
+ try {
391
+ const AsyncStorage = require('@react-native-async-storage/async-storage').default;
392
+ await AsyncStorage.setItem('@telnyx_username', config.sipUser);
393
+ await AsyncStorage.setItem('@telnyx_password', config.sipPassword);
394
+ if (config.pushNotificationDeviceToken) {
395
+ await AsyncStorage.setItem('@push_token', config.pushNotificationDeviceToken);
396
+ }
397
+ // Clear any existing token since we're using credentials
398
+ await AsyncStorage.removeItem('@credential_token');
399
+ if (this._options.debug) {
400
+ console.log('TelnyxVoipClient: Stored credentials for user:', config.sipUser);
401
+ }
402
+ } catch (error) {
403
+ if (this._options.debug) {
404
+ console.log('TelnyxVoipClient: Failed to store credentials:', error);
405
+ }
406
+ // Don't throw here - storage failure shouldn't prevent login
407
+ }
408
+ }
409
+ /**
410
+ * Store token configuration for automatic reconnection
411
+ */
412
+ async _storeToken(config) {
413
+ try {
414
+ const AsyncStorage = require('@react-native-async-storage/async-storage').default;
415
+ await AsyncStorage.setItem('@credential_token', config.token);
416
+ if (config.pushNotificationDeviceToken) {
417
+ await AsyncStorage.setItem('@push_token', config.pushNotificationDeviceToken);
418
+ }
419
+ // Clear any existing credentials since we're using token
420
+ await AsyncStorage.removeItem('@telnyx_username');
421
+ await AsyncStorage.removeItem('@telnyx_password');
422
+ if (this._options.debug) {
423
+ console.log('TelnyxVoipClient: Stored authentication token');
424
+ }
425
+ } catch (error) {
426
+ if (this._options.debug) {
427
+ console.log('TelnyxVoipClient: Failed to store token:', error);
428
+ }
429
+ // Don't throw here - storage failure shouldn't prevent login
430
+ }
431
+ }
432
+ /**
433
+ * Throw an error if the client has been disposed
434
+ */
435
+ _throwIfDisposed() {
436
+ if (this._disposed) {
437
+ throw new Error('TelnyxVoipClient has been disposed');
427
438
  }
439
+ }
428
440
  }
429
441
  exports.TelnyxVoipClient = TelnyxVoipClient;
430
442
  // ========== Factory Functions ==========
@@ -432,11 +444,11 @@ exports.TelnyxVoipClient = TelnyxVoipClient;
432
444
  * Create a new TelnyxVoipClient instance for normal app usage
433
445
  */
434
446
  function createTelnyxVoipClient(options) {
435
- return new TelnyxVoipClient(options);
447
+ return new TelnyxVoipClient(options);
436
448
  }
437
449
  /**
438
450
  * Create a new TelnyxVoipClient instance for background push notification handling
439
451
  */
440
452
  function createBackgroundTelnyxVoipClient(options) {
441
- return new TelnyxVoipClient(options);
453
+ return new TelnyxVoipClient(options);
442
454
  }