@kaleyra/video-react-native-module 1.0.0

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 (271) hide show
  1. package/LICENSE +165 -0
  2. package/README.md +292 -0
  3. package/android/build.gradle +100 -0
  4. package/android/gradle.properties +9 -0
  5. package/android/settings.gradle +6 -0
  6. package/android/src/main/AndroidManifest.xml +1 -0
  7. package/android/src/main/assets/kaleyra_video_wrapper_info.txt +1 -0
  8. package/android/src/main/java/com/kaleyra/video_react_native_module/ReactNativeAccessTokenProvider.kt +22 -0
  9. package/android/src/main/java/com/kaleyra/video_react_native_module/ReactNativeContextContainer.kt +9 -0
  10. package/android/src/main/java/com/kaleyra/video_react_native_module/ReactNativeVideoHybridBridge.kt +30 -0
  11. package/android/src/main/java/com/kaleyra/video_react_native_module/VideoNativeEmitter.kt +45 -0
  12. package/android/src/main/java/com/kaleyra/video_react_native_module/VideoNativeModule.kt +109 -0
  13. package/android/src/main/java/com/kaleyra/video_react_native_module/VideoReactPackage.kt +20 -0
  14. package/index.ts +47 -0
  15. package/ios/PluginInfo/_KaleyraVideoHybridVersionInfo.swift +31 -0
  16. package/ios/ReactEvents/ReactNativeEventEmitter.swift +31 -0
  17. package/ios/ReactEvents/VideoNativeEmitter.m +17 -0
  18. package/ios/ReactEvents/VideoNativeEmitter.swift +42 -0
  19. package/ios/ReactNativePlugin-Bridging-Header.h +5 -0
  20. package/ios/ReactNativePlugin.xcodeproj/project.pbxproj +301 -0
  21. package/ios/VideoNativeModule.m +45 -0
  22. package/ios/VideoNativeModule.swift +154 -0
  23. package/lib/commonjs/index.js +12 -0
  24. package/lib/commonjs/native-bridge/TypeScript/Environments.js +41 -0
  25. package/lib/commonjs/native-bridge/TypeScript/Events.js +46 -0
  26. package/lib/commonjs/native-bridge/TypeScript/Regions.js +47 -0
  27. package/lib/commonjs/native-bridge/TypeScript/UserDetailsFormatValidator.js +32 -0
  28. package/lib/commonjs/native-bridge/TypeScript/errors/IllegalArgumentError.js +12 -0
  29. package/lib/commonjs/native-bridge/TypeScript/types/AccessTokenRequest.js +4 -0
  30. package/lib/commonjs/native-bridge/TypeScript/types/AccessTokenResponse.js +36 -0
  31. package/lib/commonjs/native-bridge/TypeScript/types/AudioCallOptions.js +4 -0
  32. package/lib/commonjs/native-bridge/TypeScript/types/AudioCallType.js +19 -0
  33. package/lib/commonjs/native-bridge/TypeScript/types/CallDisplayMode.js +23 -0
  34. package/lib/commonjs/native-bridge/TypeScript/types/CallKitConfiguration.js +4 -0
  35. package/lib/commonjs/native-bridge/TypeScript/types/CallOptions.js +4 -0
  36. package/lib/commonjs/native-bridge/TypeScript/types/CallType.js +23 -0
  37. package/lib/commonjs/native-bridge/TypeScript/types/ChatToolConfiguration.js +4 -0
  38. package/lib/commonjs/native-bridge/TypeScript/types/CreateCallOptions.js +4 -0
  39. package/lib/commonjs/native-bridge/TypeScript/types/Environment.js +4 -0
  40. package/lib/commonjs/native-bridge/TypeScript/types/IosConfiguration.js +4 -0
  41. package/lib/commonjs/native-bridge/TypeScript/types/KaleyraVideoConfiguration.js +4 -0
  42. package/lib/commonjs/native-bridge/TypeScript/types/RecordingType.js +23 -0
  43. package/lib/commonjs/native-bridge/TypeScript/types/Region.js +4 -0
  44. package/lib/commonjs/native-bridge/TypeScript/types/ScreenShareToolConfiguration.js +4 -0
  45. package/lib/commonjs/native-bridge/TypeScript/types/Session.js +4 -0
  46. package/lib/commonjs/native-bridge/TypeScript/types/Tools.js +4 -0
  47. package/lib/commonjs/native-bridge/TypeScript/types/UserDetails.js +4 -0
  48. package/lib/commonjs/native-bridge/TypeScript/types/UserDetailsFormat.js +4 -0
  49. package/lib/commonjs/native-bridge/TypeScript/types/VoipHandlingStrategy.js +19 -0
  50. package/lib/commonjs/src/KaleyraVideo.js +259 -0
  51. package/lib/commonjs/src/ReactNativeEventEmitter.js +40 -0
  52. package/lib/commonjs/src/events/Events.js +4 -0
  53. package/lib/module/index.js +2 -0
  54. package/lib/module/native-bridge/TypeScript/Environments.js +37 -0
  55. package/lib/module/native-bridge/TypeScript/Events.js +43 -0
  56. package/lib/module/native-bridge/TypeScript/Regions.js +43 -0
  57. package/lib/module/native-bridge/TypeScript/UserDetailsFormatValidator.js +28 -0
  58. package/lib/module/native-bridge/TypeScript/errors/IllegalArgumentError.js +8 -0
  59. package/lib/module/native-bridge/TypeScript/types/AccessTokenRequest.js +3 -0
  60. package/lib/module/native-bridge/TypeScript/types/AccessTokenResponse.js +32 -0
  61. package/lib/module/native-bridge/TypeScript/types/AudioCallOptions.js +3 -0
  62. package/lib/module/native-bridge/TypeScript/types/AudioCallType.js +16 -0
  63. package/lib/module/native-bridge/TypeScript/types/CallDisplayMode.js +20 -0
  64. package/lib/module/native-bridge/TypeScript/types/CallKitConfiguration.js +3 -0
  65. package/lib/module/native-bridge/TypeScript/types/CallOptions.js +3 -0
  66. package/lib/module/native-bridge/TypeScript/types/CallType.js +20 -0
  67. package/lib/module/native-bridge/TypeScript/types/ChatToolConfiguration.js +3 -0
  68. package/lib/module/native-bridge/TypeScript/types/CreateCallOptions.js +3 -0
  69. package/lib/module/native-bridge/TypeScript/types/Environment.js +3 -0
  70. package/lib/module/native-bridge/TypeScript/types/IosConfiguration.js +3 -0
  71. package/lib/module/native-bridge/TypeScript/types/KaleyraVideoConfiguration.js +3 -0
  72. package/lib/module/native-bridge/TypeScript/types/RecordingType.js +20 -0
  73. package/lib/module/native-bridge/TypeScript/types/Region.js +3 -0
  74. package/lib/module/native-bridge/TypeScript/types/ScreenShareToolConfiguration.js +3 -0
  75. package/lib/module/native-bridge/TypeScript/types/Session.js +3 -0
  76. package/lib/module/native-bridge/TypeScript/types/Tools.js +3 -0
  77. package/lib/module/native-bridge/TypeScript/types/UserDetails.js +3 -0
  78. package/lib/module/native-bridge/TypeScript/types/UserDetailsFormat.js +3 -0
  79. package/lib/module/native-bridge/TypeScript/types/VoipHandlingStrategy.js +16 -0
  80. package/lib/module/src/KaleyraVideo.js +249 -0
  81. package/lib/module/src/ReactNativeEventEmitter.js +36 -0
  82. package/lib/module/src/events/Events.js +3 -0
  83. package/lib/typescript/index.d.ts +2 -0
  84. package/lib/typescript/native-bridge/TypeScript/Environments.d.ts +28 -0
  85. package/lib/typescript/native-bridge/TypeScript/Events.d.ts +40 -0
  86. package/lib/typescript/native-bridge/TypeScript/Regions.d.ts +32 -0
  87. package/lib/typescript/native-bridge/TypeScript/UserDetailsFormatValidator.d.ts +4 -0
  88. package/lib/typescript/native-bridge/TypeScript/errors/IllegalArgumentError.d.ts +6 -0
  89. package/lib/typescript/native-bridge/TypeScript/types/AccessTokenRequest.d.ts +4 -0
  90. package/lib/typescript/native-bridge/TypeScript/types/AccessTokenResponse.d.ts +12 -0
  91. package/lib/typescript/native-bridge/TypeScript/types/AudioCallOptions.d.ts +11 -0
  92. package/lib/typescript/native-bridge/TypeScript/types/AudioCallType.d.ts +13 -0
  93. package/lib/typescript/native-bridge/TypeScript/types/CallDisplayMode.d.ts +17 -0
  94. package/lib/typescript/native-bridge/TypeScript/types/CallKitConfiguration.d.ts +26 -0
  95. package/lib/typescript/native-bridge/TypeScript/types/CallOptions.d.ts +13 -0
  96. package/lib/typescript/native-bridge/TypeScript/types/CallType.d.ts +17 -0
  97. package/lib/typescript/native-bridge/TypeScript/types/ChatToolConfiguration.d.ts +15 -0
  98. package/lib/typescript/native-bridge/TypeScript/types/CreateCallOptions.d.ts +15 -0
  99. package/lib/typescript/native-bridge/TypeScript/types/Environment.d.ts +9 -0
  100. package/lib/typescript/native-bridge/TypeScript/types/IosConfiguration.d.ts +23 -0
  101. package/lib/typescript/native-bridge/TypeScript/types/KaleyraVideoConfiguration.d.ts +33 -0
  102. package/lib/typescript/native-bridge/TypeScript/types/RecordingType.d.ts +17 -0
  103. package/lib/typescript/native-bridge/TypeScript/types/Region.d.ts +9 -0
  104. package/lib/typescript/native-bridge/TypeScript/types/ScreenShareToolConfiguration.d.ts +19 -0
  105. package/lib/typescript/native-bridge/TypeScript/types/Session.d.ts +16 -0
  106. package/lib/typescript/native-bridge/TypeScript/types/Tools.d.ts +42 -0
  107. package/lib/typescript/native-bridge/TypeScript/types/UserDetails.d.ts +29 -0
  108. package/lib/typescript/native-bridge/TypeScript/types/UserDetailsFormat.d.ts +19 -0
  109. package/lib/typescript/native-bridge/TypeScript/types/VoipHandlingStrategy.d.ts +13 -0
  110. package/lib/typescript/src/KaleyraVideo.d.ts +125 -0
  111. package/lib/typescript/src/ReactNativeEventEmitter.d.ts +15 -0
  112. package/lib/typescript/src/events/Events.d.ts +37 -0
  113. package/native-bridge/LICENSE +165 -0
  114. package/native-bridge/TypeScript/Environments.ts +44 -0
  115. package/native-bridge/TypeScript/Events.ts +43 -0
  116. package/native-bridge/TypeScript/Regions.ts +51 -0
  117. package/native-bridge/TypeScript/UserDetailsFormatValidator.ts +35 -0
  118. package/native-bridge/TypeScript/errors/IllegalArgumentError.ts +9 -0
  119. package/native-bridge/TypeScript/types/AccessTokenRequest.ts +7 -0
  120. package/native-bridge/TypeScript/types/AccessTokenResponse.ts +41 -0
  121. package/native-bridge/TypeScript/types/AudioCallOptions.ts +15 -0
  122. package/native-bridge/TypeScript/types/AudioCallType.ts +17 -0
  123. package/native-bridge/TypeScript/types/CallDisplayMode.ts +22 -0
  124. package/native-bridge/TypeScript/types/CallKitConfiguration.ts +32 -0
  125. package/native-bridge/TypeScript/types/CallOptions.ts +18 -0
  126. package/native-bridge/TypeScript/types/CallType.ts +22 -0
  127. package/native-bridge/TypeScript/types/ChatToolConfiguration.ts +21 -0
  128. package/native-bridge/TypeScript/types/CreateCallOptions.ts +20 -0
  129. package/native-bridge/TypeScript/types/Environment.ts +12 -0
  130. package/native-bridge/TypeScript/types/IosConfiguration.ts +29 -0
  131. package/native-bridge/TypeScript/types/KaleyraVideoConfiguration.ts +42 -0
  132. package/native-bridge/TypeScript/types/RecordingType.ts +22 -0
  133. package/native-bridge/TypeScript/types/Region.ts +12 -0
  134. package/native-bridge/TypeScript/types/ScreenShareToolConfiguration.ts +24 -0
  135. package/native-bridge/TypeScript/types/Session.ts +20 -0
  136. package/native-bridge/TypeScript/types/Tools.ts +50 -0
  137. package/native-bridge/TypeScript/types/UserDetails.ts +37 -0
  138. package/native-bridge/TypeScript/types/UserDetailsFormat.ts +23 -0
  139. package/native-bridge/TypeScript/types/VoipHandlingStrategy.ts +17 -0
  140. package/native-bridge/android/build.gradle +72 -0
  141. package/native-bridge/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  142. package/native-bridge/android/gradle/wrapper/gradle-wrapper.properties +5 -0
  143. package/native-bridge/android/gradle.properties +22 -0
  144. package/native-bridge/android/gradlew +234 -0
  145. package/native-bridge/android/gradlew.bat +89 -0
  146. package/native-bridge/android/settings.gradle +1 -0
  147. package/native-bridge/android/src/main/AndroidManifest.xml +1 -0
  148. package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/AccessTokenProvider.kt +8 -0
  149. package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/CallOptionsProxy.kt +9 -0
  150. package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/ContextContainer.kt +10 -0
  151. package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/DTOs.kt +407 -0
  152. package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/SDKAccessTokenProviderProxy.kt +16 -0
  153. package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/VideoHybridBridge.kt +21 -0
  154. package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/VideoSDKHybridBridge.kt +64 -0
  155. package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/configurator/CachedSDKConfigurator.kt +15 -0
  156. package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/configurator/VideoSDKConfigurator.kt +46 -0
  157. package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/connector/CachedUserConnector.kt +15 -0
  158. package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/connector/VideoSDKCachedUserConnector.kt +60 -0
  159. package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/events/Events.kt +29 -0
  160. package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/events/EventsEmitter.kt +8 -0
  161. package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/events/EventsReporter.kt +9 -0
  162. package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/events/reporter/CallEventsReporter.kt +54 -0
  163. package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/events/reporter/ChatEventsReporter.kt +43 -0
  164. package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/events/reporter/CrossPlatformModuleStatus.kt +29 -0
  165. package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/events/reporter/ModuleEventsReporter.kt +34 -0
  166. package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/events/reporter/SDKEventsReporter.kt +63 -0
  167. package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/extensions/CallDisplayExtension.kt +15 -0
  168. package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/extensions/ConfigurationExtension.kt +39 -0
  169. package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/extensions/EnvironmentExtension.kt +12 -0
  170. package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/extensions/RecordingTypeExtension.kt +15 -0
  171. package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/extensions/RegionExtension.kt +13 -0
  172. package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/extensions/ScreenShareToolConfigurationExtension.kt +15 -0
  173. package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/extensions/ToolsExtension.kt +95 -0
  174. package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/extensions/UserExtensions.kt +35 -0
  175. package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/notifications/KaleyraVideoNotificationReceiver.kt +139 -0
  176. package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/notifications/KaleyraVideoNotificationService.kt +85 -0
  177. package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/repository/ConfigurationEntity.kt +27 -0
  178. package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/repository/ConnectedUserEntity.kt +30 -0
  179. package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/repository/Converters.kt +25 -0
  180. package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/repository/UserDetailsDao.kt +21 -0
  181. package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/repository/UserDetailsEntity.kt +22 -0
  182. package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/repository/VideoHybridBridgeRepository.kt +39 -0
  183. package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/ui/SDKUserInterfacePresenter.kt +49 -0
  184. package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/ui/UserInterfacePresenter.kt +14 -0
  185. package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/user_details/CachedUserDetails.kt +18 -0
  186. package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/user_details/CachedUserDetailsFormatter.kt +59 -0
  187. package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/user_details/SDKCachedUserDetails.kt +74 -0
  188. package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/utils/CaseInsensitiveEnumTypeAdapterFactory.kt +48 -0
  189. package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/utils/TLSSocketFactoryCompat.kt +76 -0
  190. package/native-bridge/iOS/KaleyraVideoHybridNativeBridge.xcodeproj/project.pbxproj +1399 -0
  191. package/native-bridge/iOS/KaleyraVideoHybridNativeBridge.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  192. package/native-bridge/iOS/KaleyraVideoHybridNativeBridge.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  193. package/native-bridge/iOS/KaleyraVideoHybridNativeBridge.xcodeproj/xcshareddata/IDETemplateMacros.plist +9 -0
  194. package/native-bridge/iOS/KaleyraVideoHybridNativeBridge.xcodeproj/xcshareddata/xcschemes/KaleyraVideoHybridNativeBridge.xcscheme +79 -0
  195. package/native-bridge/iOS/KaleyraVideoHybridNativeBridge.xcworkspace/contents.xcworkspacedata +10 -0
  196. package/native-bridge/iOS/KaleyraVideoHybridNativeBridge.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  197. package/native-bridge/iOS/Podfile +28 -0
  198. package/native-bridge/iOS/Podfile.lock +20 -0
  199. package/native-bridge/iOS/Source/Abstractions/BandyerSDKProtocol.swift +24 -0
  200. package/native-bridge/iOS/Source/Abstractions/CallWindowProtocol.swift +18 -0
  201. package/native-bridge/iOS/Source/AccessToken/AccessTokenRequester.swift +9 -0
  202. package/native-bridge/iOS/Source/AccessToken/TokenProvider.swift +78 -0
  203. package/native-bridge/iOS/Source/Broadcast/BroadcastConfigurationPlistReader.swift +49 -0
  204. package/native-bridge/iOS/Source/Concurrency/DispatchQueue+isMain.swift +19 -0
  205. package/native-bridge/iOS/Source/Concurrency/Lock.swift +21 -0
  206. package/native-bridge/iOS/Source/Concurrency/MainQueueDispatcher.swift +23 -0
  207. package/native-bridge/iOS/Source/Concurrency/MainQueueRelay.swift +18 -0
  208. package/native-bridge/iOS/Source/DTOs/AccessTokenRequest+Encodable.swift +27 -0
  209. package/native-bridge/iOS/Source/DTOs/AccessTokenResponse+Decodable.swift +24 -0
  210. package/native-bridge/iOS/Source/DTOs/Array+JSON.swift +6 -0
  211. package/native-bridge/iOS/Source/DTOs/AudioCallOptions+Bandyer.swift +14 -0
  212. package/native-bridge/iOS/Source/DTOs/AudioCallOptions+Decodable.swift +18 -0
  213. package/native-bridge/iOS/Source/DTOs/AudioCallOptions+Equatable.swift +12 -0
  214. package/native-bridge/iOS/Source/DTOs/AudioCallType+Bandyer.swift +18 -0
  215. package/native-bridge/iOS/Source/DTOs/AudioCallType+Decodable.swift +25 -0
  216. package/native-bridge/iOS/Source/DTOs/CallKitConfiguration+Decodable.swift +20 -0
  217. package/native-bridge/iOS/Source/DTOs/CallOptions+Bandyer.swift +14 -0
  218. package/native-bridge/iOS/Source/DTOs/CallOptions+Decodable.swift +16 -0
  219. package/native-bridge/iOS/Source/DTOs/CallOptions+Equatable.swift +12 -0
  220. package/native-bridge/iOS/Source/DTOs/CallType+Bandyer.swift +20 -0
  221. package/native-bridge/iOS/Source/DTOs/CallType+Decodable.swift +27 -0
  222. package/native-bridge/iOS/Source/DTOs/ChatToolConfiguration+Decodable.swift +18 -0
  223. package/native-bridge/iOS/Source/DTOs/CreateCallOptions+Decodable.swift +22 -0
  224. package/native-bridge/iOS/Source/DTOs/CreateCallOptions+Equatable.swift +13 -0
  225. package/native-bridge/iOS/Source/DTOs/CreateCallOptions+Intent.swift +17 -0
  226. package/native-bridge/iOS/Source/DTOs/DTOs.swift +314 -0
  227. package/native-bridge/iOS/Source/DTOs/Environment+Bandyer.swift +20 -0
  228. package/native-bridge/iOS/Source/DTOs/Environment+Decodable.swift +16 -0
  229. package/native-bridge/iOS/Source/DTOs/IosConfiguration+Decodable.swift +18 -0
  230. package/native-bridge/iOS/Source/DTOs/JSONDecodable.swift +27 -0
  231. package/native-bridge/iOS/Source/DTOs/KaleyraVideoConfiguration+Bandyer.swift +158 -0
  232. package/native-bridge/iOS/Source/DTOs/KaleyraVideoConfiguration+Decodable.swift +28 -0
  233. package/native-bridge/iOS/Source/DTOs/KaleyraVideoConfiguration+UserInterfacePresenterConfiguration.swift +29 -0
  234. package/native-bridge/iOS/Source/DTOs/RecordingType+Bandyer.swift +33 -0
  235. package/native-bridge/iOS/Source/DTOs/RecordingType+Decodable.swift +27 -0
  236. package/native-bridge/iOS/Source/DTOs/Region+Bandyer.swift +22 -0
  237. package/native-bridge/iOS/Source/DTOs/Region+Decodable.swift +16 -0
  238. package/native-bridge/iOS/Source/DTOs/ScreenShareToolConfiguration+Decodable.swift +18 -0
  239. package/native-bridge/iOS/Source/DTOs/Tools+Decodable.swift +24 -0
  240. package/native-bridge/iOS/Source/DTOs/UserDetails+Bandyer.swift +18 -0
  241. package/native-bridge/iOS/Source/DTOs/UserDetails+Decodable.swift +28 -0
  242. package/native-bridge/iOS/Source/DTOs/UserDetailsFormat+Decodable.swift +19 -0
  243. package/native-bridge/iOS/Source/DTOs/VoipHandlingStrategy+Decodable.swift +25 -0
  244. package/native-bridge/iOS/Source/Events/Emitter/EventEmitter.swift +8 -0
  245. package/native-bridge/iOS/Source/Events/Events+CaseIterable.swift +18 -0
  246. package/native-bridge/iOS/Source/Events/Events+Description.swift +28 -0
  247. package/native-bridge/iOS/Source/Events/Events.swift +21 -0
  248. package/native-bridge/iOS/Source/Events/Reporters/CallClientEventsReporter.swift +46 -0
  249. package/native-bridge/iOS/Source/Events/Reporters/ChatClientEventsReporter.swift +46 -0
  250. package/native-bridge/iOS/Source/Events/Reporters/ClientState.swift +61 -0
  251. package/native-bridge/iOS/Source/Events/Reporters/EventsReporter.swift +69 -0
  252. package/native-bridge/iOS/Source/Events/Reporters/PushTokenEventsReporter.swift +34 -0
  253. package/native-bridge/iOS/Source/Extensions/URL+FromString.swift +26 -0
  254. package/native-bridge/iOS/Source/KaleyraVideoHybridNativeBridge.h +14 -0
  255. package/native-bridge/iOS/Source/NativeHybridBridge/VideoHybridNativeBridge.swift +173 -0
  256. package/native-bridge/iOS/Source/NativeHybridBridge/VideoHybridNativeBridgeError.swift +33 -0
  257. package/native-bridge/iOS/Source/UI/KaleyraVideoSDKUserInterfacePresenter.swift +249 -0
  258. package/native-bridge/iOS/Source/UI/Presenters/PresentingViewControllerViewControllerPresenter.swift +44 -0
  259. package/native-bridge/iOS/Source/UI/Presenters/ViewControllerPresenter.swift +17 -0
  260. package/native-bridge/iOS/Source/UI/Presenters/WindowViewControllerPresenter.swift +111 -0
  261. package/native-bridge/iOS/Source/UI/UserInterfacePresenter+MainQueueRelay.swift +30 -0
  262. package/native-bridge/iOS/Source/UI/UserInterfacePresenter.swift +14 -0
  263. package/native-bridge/iOS/Source/User Details/Cache/UsersDetailsCache.swift +36 -0
  264. package/native-bridge/iOS/Source/User Details/Formatter/FormatterProxy.swift +47 -0
  265. package/native-bridge/iOS/Source/User Details/Formatter/UserDetailsFormatter.swift +83 -0
  266. package/native-bridge/iOS/Source/User Details/Providers/UsersDetailsProvider.swift +39 -0
  267. package/package.json +147 -0
  268. package/src/KaleyraVideo.ts +343 -0
  269. package/src/ReactNativeEventEmitter.ts +51 -0
  270. package/src/events/Events.ts +46 -0
  271. package/video-react-native-module.podspec +36 -0
@@ -0,0 +1,16 @@
1
+ // Copyright © 2018-2023 Kaleyra S.p.a. All Rights Reserved.
2
+ // See LICENSE for licensing information
3
+ /**
4
+ * This class defines the voip notification strategy per call.
5
+ */
6
+ export var VoipHandlingStrategy;
7
+ (function (VoipHandlingStrategy) {
8
+ /**
9
+ * The voip notifications will not be handled
10
+ */
11
+ VoipHandlingStrategy["DISABLED"] = "disabled";
12
+ /**
13
+ * The voip notifications will be handled automatically from the plugin
14
+ */
15
+ VoipHandlingStrategy["AUTOMATIC"] = "automatic";
16
+ })(VoipHandlingStrategy || (VoipHandlingStrategy = {}));
@@ -0,0 +1,249 @@
1
+ // Copyright © 2018-2023 Kaleyra S.p.a. All Rights Reserved.
2
+ // See LICENSE for licensing information
3
+ import { NativeModules, Platform } from 'react-native';
4
+ import { UserDetailsFormatValidator } from '../native-bridge/TypeScript/UserDetailsFormatValidator';
5
+ import { CallType } from '../native-bridge/TypeScript/types/CallType';
6
+ import { IllegalArgumentError } from '../native-bridge/TypeScript/errors/IllegalArgumentError';
7
+ import { Environments } from '../native-bridge/TypeScript/Environments';
8
+ import { CallDisplayMode } from '../native-bridge/TypeScript/types/CallDisplayMode';
9
+ import { Regions } from '../native-bridge/TypeScript/Regions';
10
+ import { RecordingType } from '../native-bridge/TypeScript/types/RecordingType';
11
+ import { AudioCallType } from '../native-bridge/TypeScript/types/AudioCallType';
12
+ import { VoipHandlingStrategy } from '../native-bridge/TypeScript/types/VoipHandlingStrategy';
13
+ import { AccessTokenResponse } from '../native-bridge/TypeScript/types/AccessTokenResponse';
14
+ import { Events as HybridEvents } from '../native-bridge/TypeScript/Events';
15
+ import { ReactNativeEventEmitter } from './ReactNativeEventEmitter';
16
+ const LINKING_ERROR = `The package 'video-react-native-module' doesn't seem to be linked. Make sure: \n\n` +
17
+ Platform.select({ ios: '- You have run \'pod install\'\n', default: '' }) +
18
+ '- You rebuilt the app after installing the package\n' +
19
+ '- You are not using Expo Go\n';
20
+ const VideoNativeModuleBridge = NativeModules.VideoNativeModule
21
+ ? NativeModules.VideoNativeModule
22
+ : new Proxy({}, {
23
+ get() {
24
+ throw new Error(LINKING_ERROR);
25
+ },
26
+ });
27
+ const VideoNativeEmitter = NativeModules.VideoNativeEmitter
28
+ ? NativeModules.VideoNativeEmitter
29
+ : new Proxy({}, {
30
+ get() {
31
+ throw new Error(LINKING_ERROR);
32
+ },
33
+ });
34
+ /**
35
+ * KaleyraVideo
36
+ */
37
+ class KaleyraVideo {
38
+ /**
39
+ * <b>To create an instance of the Kaleyra Video invoke the [[configure]] method</b>
40
+ */
41
+ static instance;
42
+ eventEmitter;
43
+ events;
44
+ constructor(eventEmitter) {
45
+ this.eventEmitter = eventEmitter;
46
+ this.events = eventEmitter;
47
+ }
48
+ /**
49
+ * Call this method when device is ready to configure the module
50
+ * @param configuration
51
+ * @throws IllegalArgumentError
52
+ */
53
+ static configure(configuration) {
54
+ if (configuration.appID === '') {
55
+ throw new IllegalArgumentError('Expected a not empty appId!');
56
+ }
57
+ if (this.instance) {
58
+ console.warn('KaleyraVideo was already setup.');
59
+ return this.instance;
60
+ }
61
+ VideoNativeModuleBridge.configure(JSON.stringify(configuration));
62
+ this.instance = new KaleyraVideo(new ReactNativeEventEmitter(VideoNativeEmitter));
63
+ return this.instance;
64
+ }
65
+ /**
66
+ * @ignore
67
+ * @private
68
+ */
69
+ static _isAndroid() {
70
+ return Platform.OS === 'android';
71
+ }
72
+ /**
73
+ * @ignore
74
+ * @private
75
+ */
76
+ static _isIOS() {
77
+ return Platform.OS === 'ios';
78
+ }
79
+ /**
80
+ * Connect the plugin
81
+ * @param session session to connect with
82
+ * @throws IllegalArgumentError
83
+ */
84
+ connect(session) {
85
+ if (session.userID === '') {
86
+ throw new IllegalArgumentError('Expected a not empty userId!');
87
+ }
88
+ this.eventEmitter.on(HybridEvents.accessTokenRequest, (data) => {
89
+ const accessTokenRequest = JSON.parse(data);
90
+ session.accessTokenProvider(accessTokenRequest.userID).then((token) => {
91
+ const response = AccessTokenResponse.success(accessTokenRequest.requestID, token);
92
+ VideoNativeModuleBridge.setAccessTokenResponse(JSON.stringify(response));
93
+ }, (err) => {
94
+ const response = AccessTokenResponse.failed(accessTokenRequest.requestID, err);
95
+ VideoNativeModuleBridge.setAccessTokenResponse(JSON.stringify(response));
96
+ });
97
+ });
98
+ VideoNativeModuleBridge.connect(session.userID);
99
+ }
100
+ /**
101
+ * Stop the plugin
102
+ */
103
+ disconnect() {
104
+ VideoNativeModuleBridge.disconnect();
105
+ this.eventEmitter.clear();
106
+ }
107
+ /**
108
+ * This method allows you to reset the configuration.
109
+ */
110
+ reset() {
111
+ if (KaleyraVideo._isAndroid()) {
112
+ VideoNativeModuleBridge.reset();
113
+ }
114
+ else {
115
+ console.warn('Not yet supported on ', Platform.OS, ' platform.');
116
+ }
117
+ }
118
+ /**
119
+ * Get the current state of the plugin
120
+ * @return the state as a promise
121
+ */
122
+ // state() {
123
+ // return new Promise((resolve, reject) => {
124
+ // cordova.exec(resolve, reject, 'BandyerPlugin', 'state', []);
125
+ // });
126
+ // }
127
+ /**
128
+ * Start Call with the callee defined
129
+ * @param callOptions
130
+ * @throws IllegalArgumentError
131
+ */
132
+ startCall(callOptions) {
133
+ if (callOptions.callees.length === 0) {
134
+ throw new IllegalArgumentError('No userIds were provided!');
135
+ }
136
+ if (callOptions.callees.filter((str) => str.trim().length <= 0).length > 0) {
137
+ throw new IllegalArgumentError('Some empty userIds were provided');
138
+ }
139
+ VideoNativeModuleBridge.startCall(JSON.stringify(callOptions));
140
+ }
141
+ /**
142
+ * Verify the user for the current call
143
+ * @param verify true if the user is verified, false otherwise
144
+ * @throws IllegalArgumentError
145
+ */
146
+ verifyCurrentCall(verify) {
147
+ if (KaleyraVideo._isAndroid()) {
148
+ VideoNativeModuleBridge.verifyCurrentCall(verify);
149
+ }
150
+ else {
151
+ console.warn('Not yet supported on ', Platform.OS, ' platform.');
152
+ }
153
+ }
154
+ /**
155
+ * Set the UI display mode for the current call
156
+ * @param mode FOREGROUND, FOREGROUND_PICTURE_IN_PICTURE, BACKGROUND
157
+ * @throws IllegalArgumentError
158
+ */
159
+ setDisplayModeForCurrentCall(mode) {
160
+ if (KaleyraVideo._isAndroid()) {
161
+ VideoNativeModuleBridge.setDisplayModeForCurrentCall(JSON.stringify(mode));
162
+ }
163
+ else {
164
+ console.warn('Not supported by ', Platform.OS, ' platform.');
165
+ }
166
+ }
167
+ /**
168
+ * Start Call from url
169
+ * @param url received
170
+ * @throws IllegalArgumentError
171
+ */
172
+ startCallFrom(url) {
173
+ if (url === '' || url === 'undefined') {
174
+ throw new IllegalArgumentError('Invalid url!');
175
+ }
176
+ VideoNativeModuleBridge.startCallUrl(JSON.stringify(url));
177
+ }
178
+ // noinspection JSMethodCanBeStatic
179
+ /**
180
+ * Call this method to provide the details for each user to be used to set up the UI
181
+ * @param userDetails array of user details
182
+ * @throws IllegalArgumentError
183
+ */
184
+ addUsersDetails(userDetails) {
185
+ if (userDetails.length === 0) {
186
+ throw new IllegalArgumentError('No userDetails were provided!');
187
+ }
188
+ VideoNativeModuleBridge.addUsersDetails(JSON.stringify(userDetails));
189
+ }
190
+ setUserDetailsFormat(format) {
191
+ const validator = new UserDetailsFormatValidator();
192
+ validator.validate(format.default);
193
+ if (format.androidNotification !== undefined) {
194
+ validator.validate(format.androidNotification);
195
+ }
196
+ VideoNativeModuleBridge.setUserDetailsFormat(JSON.stringify(format));
197
+ }
198
+ /**
199
+ * Call this method to remove all the user details previously provided.
200
+ */
201
+ removeUsersDetails() {
202
+ VideoNativeModuleBridge.removeUsersDetails();
203
+ }
204
+ /**
205
+ * Call this method to handle a notification!
206
+ *
207
+ * @param payload notification data payload as String
208
+ * @throws IllegalArgumentError
209
+ */
210
+ handlePushNotificationPayload(payload) {
211
+ if (payload === '' || payload === 'undefined') {
212
+ throw new IllegalArgumentError('Expected a not empty payload!');
213
+ }
214
+ VideoNativeModuleBridge.handlePushNotificationPayload(JSON.stringify(payload));
215
+ }
216
+ /**
217
+ * Open chat
218
+ * @param userID user you want to chat with
219
+ * @throws IllegalArgumentError
220
+ */
221
+ startChat(userID) {
222
+ if (userID === '') {
223
+ throw new IllegalArgumentError('Expected a not empty userId!');
224
+ }
225
+ VideoNativeModuleBridge.startChat(userID);
226
+ }
227
+ /**
228
+ * This method allows you to clear all user cached data, such as chat messages and generic information.
229
+ */
230
+ clearUserCache() {
231
+ if (KaleyraVideo._isAndroid()) {
232
+ VideoNativeModuleBridge.clearUserCache();
233
+ }
234
+ else {
235
+ console.warn('Not yet supported on ', Platform.OS, ' platform.');
236
+ }
237
+ }
238
+ /**
239
+ * This method returns the current voip push token
240
+ * @return promise of voipPushToken or undefined if has not been generated yet.
241
+ */
242
+ getCurrentVoIPPushToken() {
243
+ if (!KaleyraVideo._isIOS()) {
244
+ return Promise.reject('Token has not been generated yet.');
245
+ }
246
+ return VideoNativeModuleBridge.getCurrentVoIPPushToken();
247
+ }
248
+ }
249
+ export { KaleyraVideo, AudioCallType, RecordingType, VoipHandlingStrategy, CallType, Regions, CallDisplayMode, Environments, };
@@ -0,0 +1,36 @@
1
+ /* eslint-disable @typescript-eslint/no-empty-function,@typescript-eslint/no-unused-vars,@typescript-eslint/no-explicit-any */
2
+ // Copyright © 2018-2023 Kaleyra S.p.a. All Rights Reserved.
3
+ // See LICENSE for licensing information
4
+ import { NativeEventEmitter } from 'react-native';
5
+ import { Events as HybridEvents } from '../native-bridge/TypeScript/Events';
6
+ export class ReactNativeEventEmitter extends NativeEventEmitter {
7
+ constructor(nativeModule) {
8
+ super(nativeModule);
9
+ this.on(HybridEvents.setupError, (args) => this.onSetupError(args));
10
+ this.on(HybridEvents.callError, (args) => this.onCallError(args));
11
+ this.on(HybridEvents.chatError, (args) => this.onChatError(args));
12
+ this.on(HybridEvents.iOSVoipPushTokenInvalidated, () => this.oniOSVoipPushTokenInvalidated());
13
+ this.on(HybridEvents.iOSVoipPushTokenUpdated, (args) => this.oniOSVoipPushTokenUpdated(args));
14
+ this.on(HybridEvents.callModuleStatusChanged, (args) => {
15
+ this.onCallModuleStatusChanged(args);
16
+ });
17
+ this.on(HybridEvents.chatModuleStatusChanged, (args) => this.onChatModuleStatusChanged(args));
18
+ }
19
+ onSetupError = (_) => { };
20
+ onCallModuleStatusChanged = (_) => { };
21
+ onCallError = (_) => { };
22
+ oniOSVoipPushTokenUpdated = (_) => { };
23
+ onChatError = (_) => { };
24
+ onChatModuleStatusChanged = (_) => { };
25
+ oniOSVoipPushTokenInvalidated = () => { };
26
+ on(event, listener) {
27
+ if (this.listenerCount(event) > 0)
28
+ this.removeAllListeners(event);
29
+ this.addListener(event, listener);
30
+ }
31
+ clear() {
32
+ for (const event in HybridEvents) {
33
+ this.removeAllListeners(event);
34
+ }
35
+ }
36
+ }
@@ -0,0 +1,3 @@
1
+ // Copyright © 2018-2023 Kaleyra S.p.a. All Rights Reserved.
2
+ // See LICENSE for licensing information
3
+ export {};
@@ -0,0 +1,2 @@
1
+ import { KaleyraVideo, KaleyraVideoConfiguration, CreateCallOptions, Tools, ScreenShareToolConfiguration, ChatToolConfiguration, AudioCallOptions, AudioCallType, CallOptions, RecordingType, IosConfiguration, CallKitConfiguration, VoipHandlingStrategy, CallType, Regions, UserDetails, UserDetailsFormat, CallDisplayMode, Session, Environments, Events } from './src/KaleyraVideo';
2
+ export { KaleyraVideo, KaleyraVideoConfiguration, CreateCallOptions, Tools, ScreenShareToolConfiguration, ChatToolConfiguration, AudioCallOptions, AudioCallType, CallOptions, RecordingType, IosConfiguration, CallKitConfiguration, VoipHandlingStrategy, CallType, Regions, UserDetails, UserDetailsFormat, CallDisplayMode, Session, Environments, Events, };
@@ -0,0 +1,28 @@
1
+ import type { Environment } from './types/Environment';
2
+ /**
3
+ * Available environments
4
+ */
5
+ export declare class Environments implements Environment {
6
+ /**
7
+ * Sandbox environment
8
+ */
9
+ static sandbox(): Environment;
10
+ /**
11
+ * Production environment
12
+ */
13
+ static production(): Environment;
14
+ /**
15
+ * Create environment by name
16
+ * @param name name of the environment
17
+ */
18
+ static new(name: string): Environment;
19
+ /**
20
+ * name of the environment
21
+ * @ignore
22
+ */
23
+ name: string;
24
+ /**
25
+ * @ignore
26
+ */
27
+ private constructor();
28
+ }
@@ -0,0 +1,40 @@
1
+ /**
2
+ * This enum defines all the events that may be handled
3
+ * <br/>
4
+ * <br/>
5
+ * You can listen to these events via [[BandyerPlugin.on]]
6
+ */
7
+ export declare enum Events {
8
+ /**
9
+ * Used for access token retrieval
10
+ */
11
+ accessTokenRequest = "accessTokenRequest",
12
+ /**
13
+ * Used to notify setup errors
14
+ */
15
+ setupError = "setupError",
16
+ /**
17
+ * Used to notify call module status changed
18
+ */
19
+ callModuleStatusChanged = "callModuleStatusChanged",
20
+ /**
21
+ * Used to notify call errors
22
+ */
23
+ callError = "callError",
24
+ /**
25
+ * Used to notify chat errors
26
+ */
27
+ chatError = "chatError",
28
+ /**
29
+ * Used to notify chat module status changed
30
+ */
31
+ chatModuleStatusChanged = "chatModuleStatusChanged",
32
+ /**
33
+ * Used to notify voip push token updates
34
+ */
35
+ iOSVoipPushTokenUpdated = "iOSVoipPushTokenUpdated",
36
+ /**
37
+ * Used to notify voip push token invalidation
38
+ */
39
+ iOSVoipPushTokenInvalidated = "iOSVoipPushTokenInvalidated"
40
+ }
@@ -0,0 +1,32 @@
1
+ import type { Region } from './types/Region';
2
+ /**
3
+ * Available regions
4
+ */
5
+ export declare class Regions implements Region {
6
+ /**
7
+ * India region
8
+ */
9
+ static india(): Region;
10
+ /**
11
+ * Europe region
12
+ */
13
+ static europe(): Region;
14
+ /**
15
+ * Us region
16
+ */
17
+ static us(): Region;
18
+ /**
19
+ * Create region by name
20
+ * @param name name of the region
21
+ */
22
+ static new(name: string): Region;
23
+ /**
24
+ * name of the region
25
+ * @ignore
26
+ */
27
+ name: string;
28
+ /**
29
+ * @ignore
30
+ */
31
+ private constructor();
32
+ }
@@ -0,0 +1,4 @@
1
+ export declare class UserDetailsFormatValidator {
2
+ validate(format: string): void;
3
+ private findKeywords;
4
+ }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * This error will be thrown when arguments given to a function are not of the expected type
3
+ */
4
+ export declare class IllegalArgumentError extends Error {
5
+ name: string;
6
+ }
@@ -0,0 +1,4 @@
1
+ export interface AccessTokenRequest {
2
+ requestID: string;
3
+ userID: string;
4
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @ignore
3
+ */
4
+ export declare class AccessTokenResponse {
5
+ constructor(requestID: string, success: boolean, data: string, error: string);
6
+ static failed(requestID: string, reason?: string): AccessTokenResponse;
7
+ static success(requestID: string, token: string): AccessTokenResponse;
8
+ requestID: string;
9
+ success: boolean;
10
+ data: string;
11
+ error?: string;
12
+ }
@@ -0,0 +1,11 @@
1
+ import { CallOptions } from "./CallOptions";
2
+ import { AudioCallType } from "./AudioCallType";
3
+ /**
4
+ * Audio call options used for chat
5
+ */
6
+ export interface AudioCallOptions extends CallOptions {
7
+ /**
8
+ * Type of audioCall to launch when an option of the chat is tapped.
9
+ */
10
+ type: AudioCallType;
11
+ }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * This class defines the types of audio calls supported.
3
+ */
4
+ export declare enum AudioCallType {
5
+ /**
6
+ * Audio only is a call that will only use the microphone
7
+ */
8
+ AUDIO = "audio",
9
+ /**
10
+ * Audio Upgradable is a call a type of call that starts in audio only and may be upgraded to audio&video type
11
+ */
12
+ AUDIO_UPGRADABLE = "audioUpgradable"
13
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * This class defines the display modes supported per call.
3
+ */
4
+ export declare enum CallDisplayMode {
5
+ /**
6
+ * The call UI fits completely the available window.
7
+ */
8
+ FOREGROUND = "FOREGROUND",
9
+ /**
10
+ * If the device has picture in picture feature the call UI is floating on the screen's device.
11
+ */
12
+ FOREGROUND_PICTURE_IN_PICTURE = "FOREGROUND_PICTURE_IN_PICTURE",
13
+ /**
14
+ * The call UI is not visible to the user.
15
+ */
16
+ BACKGROUND = "BACKGROUND"
17
+ }
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Configuration for callkit
3
+ */
4
+ export interface CallKitConfiguration {
5
+ /**
6
+ * Set to false to disable
7
+ * <br/>
8
+ * <br/>
9
+ * <b><font color="blue">default</font>: true</b>
10
+ */
11
+ enabled?: boolean;
12
+ /**
13
+ * The icon resource name to be used in the callkit UI to represent the app
14
+ * <br/>
15
+ * <br/>
16
+ * <b><font color="blue">default</font>: null</b>
17
+ */
18
+ appIconName?: string;
19
+ /**
20
+ * The ringtone resource name to be used when callkit is launched
21
+ * <br/>
22
+ * <br/>
23
+ * <b><font color="blue">default</font>: system</b>
24
+ */
25
+ ringtoneSoundName?: string;
26
+ }
@@ -0,0 +1,13 @@
1
+ import { RecordingType } from "./RecordingType";
2
+ /**
3
+ * Options available for a call
4
+ */
5
+ export interface CallOptions {
6
+ /**
7
+ * May have three different values, NONE, AUTOMATIC, MANUAL
8
+ * <br/>
9
+ * <br/>
10
+ * <b><font color="blue">default</font>: none</b>
11
+ */
12
+ recordingType?: RecordingType;
13
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * This class defines the types of calls supported.
3
+ */
4
+ export declare enum CallType {
5
+ /**
6
+ * Audio only is a call that will only use the microphone
7
+ */
8
+ AUDIO = "audio",
9
+ /**
10
+ * Audio Upgradable is a call a type of call that starts in audio only and may be upgraded to audio&video type
11
+ */
12
+ AUDIO_UPGRADABLE = "audioUpgradable",
13
+ /**
14
+ * Audio Video is a call that will use both the camera and the microphone
15
+ */
16
+ AUDIO_VIDEO = "audioVideo"
17
+ }
@@ -0,0 +1,15 @@
1
+ import { CallOptions } from "./CallOptions";
2
+ import { AudioCallOptions } from "./AudioCallOptions";
3
+ /**
4
+ * Chat tool configuration
5
+ */
6
+ export interface ChatToolConfiguration {
7
+ /**
8
+ * Defining this object will enable an option to start an audio call from chat UI
9
+ */
10
+ audioCallOption?: AudioCallOptions;
11
+ /**
12
+ * Defining this object will enable an option to start an audio&video call from chat UI
13
+ */
14
+ videoCallOption?: CallOptions;
15
+ }
@@ -0,0 +1,15 @@
1
+ import { CallType } from './CallType';
2
+ import { CallOptions } from './CallOptions';
3
+ /**
4
+ * Options to be used when creating a call
5
+ */
6
+ export interface CreateCallOptions extends CallOptions {
7
+ /**
8
+ * Array of callees identifiers to call.
9
+ */
10
+ callees: string[];
11
+ /**
12
+ * Type of call to create
13
+ */
14
+ callType: CallType;
15
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * An environment where your integration will run
3
+ */
4
+ export interface Environment {
5
+ /**
6
+ * name of the environment
7
+ */
8
+ name: string;
9
+ }
@@ -0,0 +1,23 @@
1
+ import { CallKitConfiguration } from "./CallKitConfiguration";
2
+ import { VoipHandlingStrategy } from "./VoipHandlingStrategy";
3
+ /**
4
+ * Configuration for iOS platform
5
+ */
6
+ export interface IosConfiguration {
7
+ /**
8
+ * Specify the callkit configuration to enable the usage and it's behaviour
9
+ * <br/>
10
+ * <br/>
11
+ * <b><font color="blue">default</font>: enabled</b>
12
+ */
13
+ callkit?: CallKitConfiguration;
14
+ /**
15
+ * Specify the voip handling strategy.
16
+ * <br/>
17
+ * This allows you to disable or leave the plugin behaviour for handling the voip notifications.
18
+ * <br/>
19
+ * <br/>
20
+ * <b><font color="blue">default</font>: VoipHandlingStrategy.AUTOMATIC </b>
21
+ */
22
+ voipHandlingStrategy?: VoipHandlingStrategy;
23
+ }
@@ -0,0 +1,33 @@
1
+ import { IosConfiguration } from "./IosConfiguration";
2
+ import { Tools } from "./Tools";
3
+ import { Environment } from "./Environment";
4
+ import { Region } from "./Region";
5
+ /**
6
+ * Generic configuration used for setup
7
+ */
8
+ export interface KaleyraVideoConfiguration {
9
+ /**
10
+ * This key will be provided to you by us.
11
+ */
12
+ appID: string;
13
+ /**
14
+ * This variable defines the environment where you will be sandbox or production.
15
+ */
16
+ environment: Environment;
17
+ /**
18
+ * This variable defines the region where you will be europe, india or us.
19
+ */
20
+ region: Region;
21
+ /**
22
+ * Set to true to enable log, default value is false
23
+ */
24
+ logEnabled?: boolean;
25
+ /**
26
+ * Define the tools to use
27
+ */
28
+ tools?: Tools;
29
+ /**
30
+ * Define to customize the iOS configuration
31
+ */
32
+ iosConfig?: IosConfiguration;
33
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Recording type of the call
3
+ */
4
+ export declare enum RecordingType {
5
+ /**
6
+ * The call will be recorded on demand
7
+ */
8
+ MANUAL = "manual",
9
+ /**
10
+ * The call will be recorded as soon it starts
11
+ */
12
+ AUTOMATIC = "automatic",
13
+ /**
14
+ * The call will not be recorded
15
+ */
16
+ NONE = "none"
17
+ }