@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,259 @@
1
+ "use strict";
2
+ // Copyright © 2018-2023 Kaleyra S.p.a. All Rights Reserved.
3
+ // See LICENSE for licensing information
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.Environments = exports.CallDisplayMode = exports.Regions = exports.CallType = exports.VoipHandlingStrategy = exports.RecordingType = exports.AudioCallType = exports.KaleyraVideo = void 0;
6
+ const react_native_1 = require("react-native");
7
+ const UserDetailsFormatValidator_1 = require("../native-bridge/TypeScript/UserDetailsFormatValidator");
8
+ const CallType_1 = require("../native-bridge/TypeScript/types/CallType");
9
+ Object.defineProperty(exports, "CallType", { enumerable: true, get: function () { return CallType_1.CallType; } });
10
+ const IllegalArgumentError_1 = require("../native-bridge/TypeScript/errors/IllegalArgumentError");
11
+ const Environments_1 = require("../native-bridge/TypeScript/Environments");
12
+ Object.defineProperty(exports, "Environments", { enumerable: true, get: function () { return Environments_1.Environments; } });
13
+ const CallDisplayMode_1 = require("../native-bridge/TypeScript/types/CallDisplayMode");
14
+ Object.defineProperty(exports, "CallDisplayMode", { enumerable: true, get: function () { return CallDisplayMode_1.CallDisplayMode; } });
15
+ const Regions_1 = require("../native-bridge/TypeScript/Regions");
16
+ Object.defineProperty(exports, "Regions", { enumerable: true, get: function () { return Regions_1.Regions; } });
17
+ const RecordingType_1 = require("../native-bridge/TypeScript/types/RecordingType");
18
+ Object.defineProperty(exports, "RecordingType", { enumerable: true, get: function () { return RecordingType_1.RecordingType; } });
19
+ const AudioCallType_1 = require("../native-bridge/TypeScript/types/AudioCallType");
20
+ Object.defineProperty(exports, "AudioCallType", { enumerable: true, get: function () { return AudioCallType_1.AudioCallType; } });
21
+ const VoipHandlingStrategy_1 = require("../native-bridge/TypeScript/types/VoipHandlingStrategy");
22
+ Object.defineProperty(exports, "VoipHandlingStrategy", { enumerable: true, get: function () { return VoipHandlingStrategy_1.VoipHandlingStrategy; } });
23
+ const AccessTokenResponse_1 = require("../native-bridge/TypeScript/types/AccessTokenResponse");
24
+ const Events_1 = require("../native-bridge/TypeScript/Events");
25
+ const ReactNativeEventEmitter_1 = require("./ReactNativeEventEmitter");
26
+ const LINKING_ERROR = `The package 'video-react-native-module' doesn't seem to be linked. Make sure: \n\n` +
27
+ react_native_1.Platform.select({ ios: '- You have run \'pod install\'\n', default: '' }) +
28
+ '- You rebuilt the app after installing the package\n' +
29
+ '- You are not using Expo Go\n';
30
+ const VideoNativeModuleBridge = react_native_1.NativeModules.VideoNativeModule
31
+ ? react_native_1.NativeModules.VideoNativeModule
32
+ : new Proxy({}, {
33
+ get() {
34
+ throw new Error(LINKING_ERROR);
35
+ },
36
+ });
37
+ const VideoNativeEmitter = react_native_1.NativeModules.VideoNativeEmitter
38
+ ? react_native_1.NativeModules.VideoNativeEmitter
39
+ : new Proxy({}, {
40
+ get() {
41
+ throw new Error(LINKING_ERROR);
42
+ },
43
+ });
44
+ /**
45
+ * KaleyraVideo
46
+ */
47
+ class KaleyraVideo {
48
+ /**
49
+ * <b>To create an instance of the Kaleyra Video invoke the [[configure]] method</b>
50
+ */
51
+ static instance;
52
+ eventEmitter;
53
+ events;
54
+ constructor(eventEmitter) {
55
+ this.eventEmitter = eventEmitter;
56
+ this.events = eventEmitter;
57
+ }
58
+ /**
59
+ * Call this method when device is ready to configure the module
60
+ * @param configuration
61
+ * @throws IllegalArgumentError
62
+ */
63
+ static configure(configuration) {
64
+ if (configuration.appID === '') {
65
+ throw new IllegalArgumentError_1.IllegalArgumentError('Expected a not empty appId!');
66
+ }
67
+ if (this.instance) {
68
+ console.warn('KaleyraVideo was already setup.');
69
+ return this.instance;
70
+ }
71
+ VideoNativeModuleBridge.configure(JSON.stringify(configuration));
72
+ this.instance = new KaleyraVideo(new ReactNativeEventEmitter_1.ReactNativeEventEmitter(VideoNativeEmitter));
73
+ return this.instance;
74
+ }
75
+ /**
76
+ * @ignore
77
+ * @private
78
+ */
79
+ static _isAndroid() {
80
+ return react_native_1.Platform.OS === 'android';
81
+ }
82
+ /**
83
+ * @ignore
84
+ * @private
85
+ */
86
+ static _isIOS() {
87
+ return react_native_1.Platform.OS === 'ios';
88
+ }
89
+ /**
90
+ * Connect the plugin
91
+ * @param session session to connect with
92
+ * @throws IllegalArgumentError
93
+ */
94
+ connect(session) {
95
+ if (session.userID === '') {
96
+ throw new IllegalArgumentError_1.IllegalArgumentError('Expected a not empty userId!');
97
+ }
98
+ this.eventEmitter.on(Events_1.Events.accessTokenRequest, (data) => {
99
+ const accessTokenRequest = JSON.parse(data);
100
+ session.accessTokenProvider(accessTokenRequest.userID).then((token) => {
101
+ const response = AccessTokenResponse_1.AccessTokenResponse.success(accessTokenRequest.requestID, token);
102
+ VideoNativeModuleBridge.setAccessTokenResponse(JSON.stringify(response));
103
+ }, (err) => {
104
+ const response = AccessTokenResponse_1.AccessTokenResponse.failed(accessTokenRequest.requestID, err);
105
+ VideoNativeModuleBridge.setAccessTokenResponse(JSON.stringify(response));
106
+ });
107
+ });
108
+ VideoNativeModuleBridge.connect(session.userID);
109
+ }
110
+ /**
111
+ * Stop the plugin
112
+ */
113
+ disconnect() {
114
+ VideoNativeModuleBridge.disconnect();
115
+ this.eventEmitter.clear();
116
+ }
117
+ /**
118
+ * This method allows you to reset the configuration.
119
+ */
120
+ reset() {
121
+ if (KaleyraVideo._isAndroid()) {
122
+ VideoNativeModuleBridge.reset();
123
+ }
124
+ else {
125
+ console.warn('Not yet supported on ', react_native_1.Platform.OS, ' platform.');
126
+ }
127
+ }
128
+ /**
129
+ * Get the current state of the plugin
130
+ * @return the state as a promise
131
+ */
132
+ // state() {
133
+ // return new Promise((resolve, reject) => {
134
+ // cordova.exec(resolve, reject, 'BandyerPlugin', 'state', []);
135
+ // });
136
+ // }
137
+ /**
138
+ * Start Call with the callee defined
139
+ * @param callOptions
140
+ * @throws IllegalArgumentError
141
+ */
142
+ startCall(callOptions) {
143
+ if (callOptions.callees.length === 0) {
144
+ throw new IllegalArgumentError_1.IllegalArgumentError('No userIds were provided!');
145
+ }
146
+ if (callOptions.callees.filter((str) => str.trim().length <= 0).length > 0) {
147
+ throw new IllegalArgumentError_1.IllegalArgumentError('Some empty userIds were provided');
148
+ }
149
+ VideoNativeModuleBridge.startCall(JSON.stringify(callOptions));
150
+ }
151
+ /**
152
+ * Verify the user for the current call
153
+ * @param verify true if the user is verified, false otherwise
154
+ * @throws IllegalArgumentError
155
+ */
156
+ verifyCurrentCall(verify) {
157
+ if (KaleyraVideo._isAndroid()) {
158
+ VideoNativeModuleBridge.verifyCurrentCall(verify);
159
+ }
160
+ else {
161
+ console.warn('Not yet supported on ', react_native_1.Platform.OS, ' platform.');
162
+ }
163
+ }
164
+ /**
165
+ * Set the UI display mode for the current call
166
+ * @param mode FOREGROUND, FOREGROUND_PICTURE_IN_PICTURE, BACKGROUND
167
+ * @throws IllegalArgumentError
168
+ */
169
+ setDisplayModeForCurrentCall(mode) {
170
+ if (KaleyraVideo._isAndroid()) {
171
+ VideoNativeModuleBridge.setDisplayModeForCurrentCall(JSON.stringify(mode));
172
+ }
173
+ else {
174
+ console.warn('Not supported by ', react_native_1.Platform.OS, ' platform.');
175
+ }
176
+ }
177
+ /**
178
+ * Start Call from url
179
+ * @param url received
180
+ * @throws IllegalArgumentError
181
+ */
182
+ startCallFrom(url) {
183
+ if (url === '' || url === 'undefined') {
184
+ throw new IllegalArgumentError_1.IllegalArgumentError('Invalid url!');
185
+ }
186
+ VideoNativeModuleBridge.startCallUrl(JSON.stringify(url));
187
+ }
188
+ // noinspection JSMethodCanBeStatic
189
+ /**
190
+ * Call this method to provide the details for each user to be used to set up the UI
191
+ * @param userDetails array of user details
192
+ * @throws IllegalArgumentError
193
+ */
194
+ addUsersDetails(userDetails) {
195
+ if (userDetails.length === 0) {
196
+ throw new IllegalArgumentError_1.IllegalArgumentError('No userDetails were provided!');
197
+ }
198
+ VideoNativeModuleBridge.addUsersDetails(JSON.stringify(userDetails));
199
+ }
200
+ setUserDetailsFormat(format) {
201
+ const validator = new UserDetailsFormatValidator_1.UserDetailsFormatValidator();
202
+ validator.validate(format.default);
203
+ if (format.androidNotification !== undefined) {
204
+ validator.validate(format.androidNotification);
205
+ }
206
+ VideoNativeModuleBridge.setUserDetailsFormat(JSON.stringify(format));
207
+ }
208
+ /**
209
+ * Call this method to remove all the user details previously provided.
210
+ */
211
+ removeUsersDetails() {
212
+ VideoNativeModuleBridge.removeUsersDetails();
213
+ }
214
+ /**
215
+ * Call this method to handle a notification!
216
+ *
217
+ * @param payload notification data payload as String
218
+ * @throws IllegalArgumentError
219
+ */
220
+ handlePushNotificationPayload(payload) {
221
+ if (payload === '' || payload === 'undefined') {
222
+ throw new IllegalArgumentError_1.IllegalArgumentError('Expected a not empty payload!');
223
+ }
224
+ VideoNativeModuleBridge.handlePushNotificationPayload(JSON.stringify(payload));
225
+ }
226
+ /**
227
+ * Open chat
228
+ * @param userID user you want to chat with
229
+ * @throws IllegalArgumentError
230
+ */
231
+ startChat(userID) {
232
+ if (userID === '') {
233
+ throw new IllegalArgumentError_1.IllegalArgumentError('Expected a not empty userId!');
234
+ }
235
+ VideoNativeModuleBridge.startChat(userID);
236
+ }
237
+ /**
238
+ * This method allows you to clear all user cached data, such as chat messages and generic information.
239
+ */
240
+ clearUserCache() {
241
+ if (KaleyraVideo._isAndroid()) {
242
+ VideoNativeModuleBridge.clearUserCache();
243
+ }
244
+ else {
245
+ console.warn('Not yet supported on ', react_native_1.Platform.OS, ' platform.');
246
+ }
247
+ }
248
+ /**
249
+ * This method returns the current voip push token
250
+ * @return promise of voipPushToken or undefined if has not been generated yet.
251
+ */
252
+ getCurrentVoIPPushToken() {
253
+ if (!KaleyraVideo._isIOS()) {
254
+ return Promise.reject('Token has not been generated yet.');
255
+ }
256
+ return VideoNativeModuleBridge.getCurrentVoIPPushToken();
257
+ }
258
+ }
259
+ exports.KaleyraVideo = KaleyraVideo;
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ /* eslint-disable @typescript-eslint/no-empty-function,@typescript-eslint/no-unused-vars,@typescript-eslint/no-explicit-any */
3
+ // Copyright © 2018-2023 Kaleyra S.p.a. All Rights Reserved.
4
+ // See LICENSE for licensing information
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ReactNativeEventEmitter = void 0;
7
+ const react_native_1 = require("react-native");
8
+ const Events_1 = require("../native-bridge/TypeScript/Events");
9
+ class ReactNativeEventEmitter extends react_native_1.NativeEventEmitter {
10
+ constructor(nativeModule) {
11
+ super(nativeModule);
12
+ this.on(Events_1.Events.setupError, (args) => this.onSetupError(args));
13
+ this.on(Events_1.Events.callError, (args) => this.onCallError(args));
14
+ this.on(Events_1.Events.chatError, (args) => this.onChatError(args));
15
+ this.on(Events_1.Events.iOSVoipPushTokenInvalidated, () => this.oniOSVoipPushTokenInvalidated());
16
+ this.on(Events_1.Events.iOSVoipPushTokenUpdated, (args) => this.oniOSVoipPushTokenUpdated(args));
17
+ this.on(Events_1.Events.callModuleStatusChanged, (args) => {
18
+ this.onCallModuleStatusChanged(args);
19
+ });
20
+ this.on(Events_1.Events.chatModuleStatusChanged, (args) => this.onChatModuleStatusChanged(args));
21
+ }
22
+ onSetupError = (_) => { };
23
+ onCallModuleStatusChanged = (_) => { };
24
+ onCallError = (_) => { };
25
+ oniOSVoipPushTokenUpdated = (_) => { };
26
+ onChatError = (_) => { };
27
+ onChatModuleStatusChanged = (_) => { };
28
+ oniOSVoipPushTokenInvalidated = () => { };
29
+ on(event, listener) {
30
+ if (this.listenerCount(event) > 0)
31
+ this.removeAllListeners(event);
32
+ this.addListener(event, listener);
33
+ }
34
+ clear() {
35
+ for (const event in Events_1.Events) {
36
+ this.removeAllListeners(event);
37
+ }
38
+ }
39
+ }
40
+ exports.ReactNativeEventEmitter = ReactNativeEventEmitter;
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ // Copyright © 2018-2023 Kaleyra S.p.a. All Rights Reserved.
3
+ // See LICENSE for licensing information
4
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ import { KaleyraVideo, AudioCallType, RecordingType, VoipHandlingStrategy, CallType, Regions, CallDisplayMode, Environments, } from './src/KaleyraVideo';
2
+ export { KaleyraVideo, AudioCallType, RecordingType, VoipHandlingStrategy, CallType, Regions, CallDisplayMode, Environments, };
@@ -0,0 +1,37 @@
1
+ // Copyright © 2018-2023 Kaleyra S.p.a. All Rights Reserved.
2
+ // See LICENSE for licensing information
3
+ /**
4
+ * Available environments
5
+ */
6
+ export class Environments {
7
+ /**
8
+ * Sandbox environment
9
+ */
10
+ static sandbox() {
11
+ return new Environments('sandbox');
12
+ }
13
+ /**
14
+ * Production environment
15
+ */
16
+ static production() {
17
+ return new Environments('production');
18
+ }
19
+ /**
20
+ * Create environment by name
21
+ * @param name name of the environment
22
+ */
23
+ static new(name) {
24
+ return new Environments(name);
25
+ }
26
+ /**
27
+ * name of the environment
28
+ * @ignore
29
+ */
30
+ name;
31
+ /**
32
+ * @ignore
33
+ */
34
+ constructor(name) {
35
+ this.name = name;
36
+ }
37
+ }
@@ -0,0 +1,43 @@
1
+ // Copyright © 2018-2023 Kaleyra S.p.a. All Rights Reserved.
2
+ // See LICENSE for licensing information
3
+ /**
4
+ * This enum defines all the events that may be handled
5
+ * <br/>
6
+ * <br/>
7
+ * You can listen to these events via [[BandyerPlugin.on]]
8
+ */
9
+ export var Events;
10
+ (function (Events) {
11
+ /**
12
+ * Used for access token retrieval
13
+ */
14
+ Events["accessTokenRequest"] = "accessTokenRequest";
15
+ /**
16
+ * Used to notify setup errors
17
+ */
18
+ Events["setupError"] = "setupError";
19
+ /**
20
+ * Used to notify call module status changed
21
+ */
22
+ Events["callModuleStatusChanged"] = "callModuleStatusChanged";
23
+ /**
24
+ * Used to notify call errors
25
+ */
26
+ Events["callError"] = "callError";
27
+ /**
28
+ * Used to notify chat errors
29
+ */
30
+ Events["chatError"] = "chatError";
31
+ /**
32
+ * Used to notify chat module status changed
33
+ */
34
+ Events["chatModuleStatusChanged"] = "chatModuleStatusChanged";
35
+ /**
36
+ * Used to notify voip push token updates
37
+ */
38
+ Events["iOSVoipPushTokenUpdated"] = "iOSVoipPushTokenUpdated";
39
+ /**
40
+ * Used to notify voip push token invalidation
41
+ */
42
+ Events["iOSVoipPushTokenInvalidated"] = "iOSVoipPushTokenInvalidated";
43
+ })(Events || (Events = {}));
@@ -0,0 +1,43 @@
1
+ // Copyright © 2018-2023 Kaleyra S.p.a. All Rights Reserved.
2
+ // See LICENSE for licensing information
3
+ /**
4
+ * Available regions
5
+ */
6
+ export class Regions {
7
+ /**
8
+ * India region
9
+ */
10
+ static india() {
11
+ return new Regions('india');
12
+ }
13
+ /**
14
+ * Europe region
15
+ */
16
+ static europe() {
17
+ return new Regions('europe');
18
+ }
19
+ /**
20
+ * Us region
21
+ */
22
+ static us() {
23
+ return new Regions('us');
24
+ }
25
+ /**
26
+ * Create region by name
27
+ * @param name name of the region
28
+ */
29
+ static new(name) {
30
+ return new Regions(name);
31
+ }
32
+ /**
33
+ * name of the region
34
+ * @ignore
35
+ */
36
+ name;
37
+ /**
38
+ * @ignore
39
+ */
40
+ constructor(name) {
41
+ this.name = name;
42
+ }
43
+ }
@@ -0,0 +1,28 @@
1
+ // Copyright © 2018-2023 Kaleyra S.p.a. All Rights Reserved.
2
+ // See LICENSE for licensing information
3
+ import { IllegalArgumentError } from "./errors/IllegalArgumentError";
4
+ export class UserDetailsFormatValidator {
5
+ validate(format) {
6
+ const keywords = this.findKeywords(format);
7
+ if (keywords.length === 0) {
8
+ throw new IllegalArgumentError("Could not find any keyword, at least one keyword in the format ${keyword} must be provided");
9
+ }
10
+ const allowedKeywords = ["userID", "nickName", "firstName", "lastName", "email", "profileImageUrl"];
11
+ keywords.forEach((keyword) => {
12
+ if (allowedKeywords.indexOf(keyword) === -1) {
13
+ throw new IllegalArgumentError("Declared keyword=${" + keyword + "} is not allowed. The allowedKeywords allowed are: " + allowedKeywords);
14
+ }
15
+ });
16
+ }
17
+ findKeywords(format) {
18
+ const regex = /\${([\w]+)}/g;
19
+ let match;
20
+ const matches = [];
21
+ while ((match = regex.exec(format)) !== null) {
22
+ if (match[1] && match[1] !== null) {
23
+ matches.push(match[1]);
24
+ }
25
+ }
26
+ return matches;
27
+ }
28
+ }
@@ -0,0 +1,8 @@
1
+ // Copyright © 2018-2023 Kaleyra S.p.a. All Rights Reserved.
2
+ // See LICENSE for licensing information
3
+ /**
4
+ * This error will be thrown when arguments given to a function are not of the expected type
5
+ */
6
+ export class IllegalArgumentError extends Error {
7
+ name = 'IllegalArgumentError';
8
+ }
@@ -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,32 @@
1
+ // Copyright © 2018-2023 Kaleyra S.p.a. All Rights Reserved.
2
+ // See LICENSE for licensing information
3
+ /**
4
+ * @ignore
5
+ */
6
+ export class AccessTokenResponse {
7
+ constructor(requestID, success, data, error) {
8
+ this.requestID = requestID;
9
+ this.success = success;
10
+ this.data = data;
11
+ this.error = error;
12
+ }
13
+ static failed(requestID, reason) {
14
+ return {
15
+ requestID,
16
+ success: false,
17
+ data: '',
18
+ error: reason,
19
+ };
20
+ }
21
+ static success(requestID, token) {
22
+ return {
23
+ requestID,
24
+ success: true,
25
+ data: token,
26
+ };
27
+ }
28
+ requestID;
29
+ success;
30
+ data;
31
+ error;
32
+ }
@@ -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,16 @@
1
+ // Copyright © 2018-2023 Kaleyra S.p.a. All Rights Reserved.
2
+ // See LICENSE for licensing information
3
+ /**
4
+ * This class defines the types of audio calls supported.
5
+ */
6
+ export var AudioCallType;
7
+ (function (AudioCallType) {
8
+ /**
9
+ * Audio only is a call that will only use the microphone
10
+ */
11
+ AudioCallType["AUDIO"] = "audio";
12
+ /**
13
+ * Audio Upgradable is a call a type of call that starts in audio only and may be upgraded to audio&video type
14
+ */
15
+ AudioCallType["AUDIO_UPGRADABLE"] = "audioUpgradable";
16
+ })(AudioCallType || (AudioCallType = {}));
@@ -0,0 +1,20 @@
1
+ // Copyright © 2018-2023 Kaleyra S.p.a. All Rights Reserved.
2
+ // See LICENSE for licensing information
3
+ /**
4
+ * This class defines the display modes supported per call.
5
+ */
6
+ export var CallDisplayMode;
7
+ (function (CallDisplayMode) {
8
+ /**
9
+ * The call UI fits completely the available window.
10
+ */
11
+ CallDisplayMode["FOREGROUND"] = "FOREGROUND";
12
+ /**
13
+ * If the device has picture in picture feature the call UI is floating on the screen's device.
14
+ */
15
+ CallDisplayMode["FOREGROUND_PICTURE_IN_PICTURE"] = "FOREGROUND_PICTURE_IN_PICTURE";
16
+ /**
17
+ * The call UI is not visible to the user.
18
+ */
19
+ CallDisplayMode["BACKGROUND"] = "BACKGROUND";
20
+ })(CallDisplayMode || (CallDisplayMode = {}));
@@ -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,3 @@
1
+ // Copyright © 2018-2023 Kaleyra S.p.a. All Rights Reserved.
2
+ // See LICENSE for licensing information
3
+ export {};
@@ -0,0 +1,20 @@
1
+ // Copyright © 2018-2023 Kaleyra S.p.a. All Rights Reserved.
2
+ // See LICENSE for licensing information
3
+ /**
4
+ * This class defines the types of calls supported.
5
+ */
6
+ export var CallType;
7
+ (function (CallType) {
8
+ /**
9
+ * Audio only is a call that will only use the microphone
10
+ */
11
+ CallType["AUDIO"] = "audio";
12
+ /**
13
+ * Audio Upgradable is a call a type of call that starts in audio only and may be upgraded to audio&video type
14
+ */
15
+ CallType["AUDIO_UPGRADABLE"] = "audioUpgradable";
16
+ /**
17
+ * Audio Video is a call that will use both the camera and the microphone
18
+ */
19
+ CallType["AUDIO_VIDEO"] = "audioVideo";
20
+ })(CallType || (CallType = {}));
@@ -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,3 @@
1
+ // Copyright © 2018-2023 Kaleyra S.p.a. All Rights Reserved.
2
+ // See LICENSE for licensing information
3
+ export {};
@@ -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,3 @@
1
+ // Copyright © 2018-2023 Kaleyra S.p.a. All Rights Reserved.
2
+ // See LICENSE for licensing information
3
+ export {};
@@ -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,20 @@
1
+ // Copyright © 2018-2023 Kaleyra S.p.a. All Rights Reserved.
2
+ // See LICENSE for licensing information
3
+ /**
4
+ * Recording type of the call
5
+ */
6
+ export var RecordingType;
7
+ (function (RecordingType) {
8
+ /**
9
+ * The call will be recorded on demand
10
+ */
11
+ RecordingType["MANUAL"] = "manual";
12
+ /**
13
+ * The call will be recorded as soon it starts
14
+ */
15
+ RecordingType["AUTOMATIC"] = "automatic";
16
+ /**
17
+ * The call will not be recorded
18
+ */
19
+ RecordingType["NONE"] = "none";
20
+ })(RecordingType || (RecordingType = {}));
@@ -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,3 @@
1
+ // Copyright © 2018-2023 Kaleyra S.p.a. All Rights Reserved.
2
+ // See LICENSE for licensing information
3
+ export {};
@@ -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,3 @@
1
+ // Copyright © 2018-2023 Kaleyra S.p.a. All Rights Reserved.
2
+ // See LICENSE for licensing information
3
+ export {};
@@ -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,3 @@
1
+ // Copyright © 2018-2023 Kaleyra S.p.a. All Rights Reserved.
2
+ // See LICENSE for licensing information
3
+ export {};