@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.
- package/LICENSE +165 -0
- package/README.md +292 -0
- package/android/build.gradle +100 -0
- package/android/gradle.properties +9 -0
- package/android/settings.gradle +6 -0
- package/android/src/main/AndroidManifest.xml +1 -0
- package/android/src/main/assets/kaleyra_video_wrapper_info.txt +1 -0
- package/android/src/main/java/com/kaleyra/video_react_native_module/ReactNativeAccessTokenProvider.kt +22 -0
- package/android/src/main/java/com/kaleyra/video_react_native_module/ReactNativeContextContainer.kt +9 -0
- package/android/src/main/java/com/kaleyra/video_react_native_module/ReactNativeVideoHybridBridge.kt +30 -0
- package/android/src/main/java/com/kaleyra/video_react_native_module/VideoNativeEmitter.kt +45 -0
- package/android/src/main/java/com/kaleyra/video_react_native_module/VideoNativeModule.kt +109 -0
- package/android/src/main/java/com/kaleyra/video_react_native_module/VideoReactPackage.kt +20 -0
- package/index.ts +47 -0
- package/ios/PluginInfo/_KaleyraVideoHybridVersionInfo.swift +31 -0
- package/ios/ReactEvents/ReactNativeEventEmitter.swift +31 -0
- package/ios/ReactEvents/VideoNativeEmitter.m +17 -0
- package/ios/ReactEvents/VideoNativeEmitter.swift +42 -0
- package/ios/ReactNativePlugin-Bridging-Header.h +5 -0
- package/ios/ReactNativePlugin.xcodeproj/project.pbxproj +301 -0
- package/ios/VideoNativeModule.m +45 -0
- package/ios/VideoNativeModule.swift +154 -0
- package/lib/commonjs/index.js +12 -0
- package/lib/commonjs/native-bridge/TypeScript/Environments.js +41 -0
- package/lib/commonjs/native-bridge/TypeScript/Events.js +46 -0
- package/lib/commonjs/native-bridge/TypeScript/Regions.js +47 -0
- package/lib/commonjs/native-bridge/TypeScript/UserDetailsFormatValidator.js +32 -0
- package/lib/commonjs/native-bridge/TypeScript/errors/IllegalArgumentError.js +12 -0
- package/lib/commonjs/native-bridge/TypeScript/types/AccessTokenRequest.js +4 -0
- package/lib/commonjs/native-bridge/TypeScript/types/AccessTokenResponse.js +36 -0
- package/lib/commonjs/native-bridge/TypeScript/types/AudioCallOptions.js +4 -0
- package/lib/commonjs/native-bridge/TypeScript/types/AudioCallType.js +19 -0
- package/lib/commonjs/native-bridge/TypeScript/types/CallDisplayMode.js +23 -0
- package/lib/commonjs/native-bridge/TypeScript/types/CallKitConfiguration.js +4 -0
- package/lib/commonjs/native-bridge/TypeScript/types/CallOptions.js +4 -0
- package/lib/commonjs/native-bridge/TypeScript/types/CallType.js +23 -0
- package/lib/commonjs/native-bridge/TypeScript/types/ChatToolConfiguration.js +4 -0
- package/lib/commonjs/native-bridge/TypeScript/types/CreateCallOptions.js +4 -0
- package/lib/commonjs/native-bridge/TypeScript/types/Environment.js +4 -0
- package/lib/commonjs/native-bridge/TypeScript/types/IosConfiguration.js +4 -0
- package/lib/commonjs/native-bridge/TypeScript/types/KaleyraVideoConfiguration.js +4 -0
- package/lib/commonjs/native-bridge/TypeScript/types/RecordingType.js +23 -0
- package/lib/commonjs/native-bridge/TypeScript/types/Region.js +4 -0
- package/lib/commonjs/native-bridge/TypeScript/types/ScreenShareToolConfiguration.js +4 -0
- package/lib/commonjs/native-bridge/TypeScript/types/Session.js +4 -0
- package/lib/commonjs/native-bridge/TypeScript/types/Tools.js +4 -0
- package/lib/commonjs/native-bridge/TypeScript/types/UserDetails.js +4 -0
- package/lib/commonjs/native-bridge/TypeScript/types/UserDetailsFormat.js +4 -0
- package/lib/commonjs/native-bridge/TypeScript/types/VoipHandlingStrategy.js +19 -0
- package/lib/commonjs/src/KaleyraVideo.js +259 -0
- package/lib/commonjs/src/ReactNativeEventEmitter.js +40 -0
- package/lib/commonjs/src/events/Events.js +4 -0
- package/lib/module/index.js +2 -0
- package/lib/module/native-bridge/TypeScript/Environments.js +37 -0
- package/lib/module/native-bridge/TypeScript/Events.js +43 -0
- package/lib/module/native-bridge/TypeScript/Regions.js +43 -0
- package/lib/module/native-bridge/TypeScript/UserDetailsFormatValidator.js +28 -0
- package/lib/module/native-bridge/TypeScript/errors/IllegalArgumentError.js +8 -0
- package/lib/module/native-bridge/TypeScript/types/AccessTokenRequest.js +3 -0
- package/lib/module/native-bridge/TypeScript/types/AccessTokenResponse.js +32 -0
- package/lib/module/native-bridge/TypeScript/types/AudioCallOptions.js +3 -0
- package/lib/module/native-bridge/TypeScript/types/AudioCallType.js +16 -0
- package/lib/module/native-bridge/TypeScript/types/CallDisplayMode.js +20 -0
- package/lib/module/native-bridge/TypeScript/types/CallKitConfiguration.js +3 -0
- package/lib/module/native-bridge/TypeScript/types/CallOptions.js +3 -0
- package/lib/module/native-bridge/TypeScript/types/CallType.js +20 -0
- package/lib/module/native-bridge/TypeScript/types/ChatToolConfiguration.js +3 -0
- package/lib/module/native-bridge/TypeScript/types/CreateCallOptions.js +3 -0
- package/lib/module/native-bridge/TypeScript/types/Environment.js +3 -0
- package/lib/module/native-bridge/TypeScript/types/IosConfiguration.js +3 -0
- package/lib/module/native-bridge/TypeScript/types/KaleyraVideoConfiguration.js +3 -0
- package/lib/module/native-bridge/TypeScript/types/RecordingType.js +20 -0
- package/lib/module/native-bridge/TypeScript/types/Region.js +3 -0
- package/lib/module/native-bridge/TypeScript/types/ScreenShareToolConfiguration.js +3 -0
- package/lib/module/native-bridge/TypeScript/types/Session.js +3 -0
- package/lib/module/native-bridge/TypeScript/types/Tools.js +3 -0
- package/lib/module/native-bridge/TypeScript/types/UserDetails.js +3 -0
- package/lib/module/native-bridge/TypeScript/types/UserDetailsFormat.js +3 -0
- package/lib/module/native-bridge/TypeScript/types/VoipHandlingStrategy.js +16 -0
- package/lib/module/src/KaleyraVideo.js +249 -0
- package/lib/module/src/ReactNativeEventEmitter.js +36 -0
- package/lib/module/src/events/Events.js +3 -0
- package/lib/typescript/index.d.ts +2 -0
- package/lib/typescript/native-bridge/TypeScript/Environments.d.ts +28 -0
- package/lib/typescript/native-bridge/TypeScript/Events.d.ts +40 -0
- package/lib/typescript/native-bridge/TypeScript/Regions.d.ts +32 -0
- package/lib/typescript/native-bridge/TypeScript/UserDetailsFormatValidator.d.ts +4 -0
- package/lib/typescript/native-bridge/TypeScript/errors/IllegalArgumentError.d.ts +6 -0
- package/lib/typescript/native-bridge/TypeScript/types/AccessTokenRequest.d.ts +4 -0
- package/lib/typescript/native-bridge/TypeScript/types/AccessTokenResponse.d.ts +12 -0
- package/lib/typescript/native-bridge/TypeScript/types/AudioCallOptions.d.ts +11 -0
- package/lib/typescript/native-bridge/TypeScript/types/AudioCallType.d.ts +13 -0
- package/lib/typescript/native-bridge/TypeScript/types/CallDisplayMode.d.ts +17 -0
- package/lib/typescript/native-bridge/TypeScript/types/CallKitConfiguration.d.ts +26 -0
- package/lib/typescript/native-bridge/TypeScript/types/CallOptions.d.ts +13 -0
- package/lib/typescript/native-bridge/TypeScript/types/CallType.d.ts +17 -0
- package/lib/typescript/native-bridge/TypeScript/types/ChatToolConfiguration.d.ts +15 -0
- package/lib/typescript/native-bridge/TypeScript/types/CreateCallOptions.d.ts +15 -0
- package/lib/typescript/native-bridge/TypeScript/types/Environment.d.ts +9 -0
- package/lib/typescript/native-bridge/TypeScript/types/IosConfiguration.d.ts +23 -0
- package/lib/typescript/native-bridge/TypeScript/types/KaleyraVideoConfiguration.d.ts +33 -0
- package/lib/typescript/native-bridge/TypeScript/types/RecordingType.d.ts +17 -0
- package/lib/typescript/native-bridge/TypeScript/types/Region.d.ts +9 -0
- package/lib/typescript/native-bridge/TypeScript/types/ScreenShareToolConfiguration.d.ts +19 -0
- package/lib/typescript/native-bridge/TypeScript/types/Session.d.ts +16 -0
- package/lib/typescript/native-bridge/TypeScript/types/Tools.d.ts +42 -0
- package/lib/typescript/native-bridge/TypeScript/types/UserDetails.d.ts +29 -0
- package/lib/typescript/native-bridge/TypeScript/types/UserDetailsFormat.d.ts +19 -0
- package/lib/typescript/native-bridge/TypeScript/types/VoipHandlingStrategy.d.ts +13 -0
- package/lib/typescript/src/KaleyraVideo.d.ts +125 -0
- package/lib/typescript/src/ReactNativeEventEmitter.d.ts +15 -0
- package/lib/typescript/src/events/Events.d.ts +37 -0
- package/native-bridge/LICENSE +165 -0
- package/native-bridge/TypeScript/Environments.ts +44 -0
- package/native-bridge/TypeScript/Events.ts +43 -0
- package/native-bridge/TypeScript/Regions.ts +51 -0
- package/native-bridge/TypeScript/UserDetailsFormatValidator.ts +35 -0
- package/native-bridge/TypeScript/errors/IllegalArgumentError.ts +9 -0
- package/native-bridge/TypeScript/types/AccessTokenRequest.ts +7 -0
- package/native-bridge/TypeScript/types/AccessTokenResponse.ts +41 -0
- package/native-bridge/TypeScript/types/AudioCallOptions.ts +15 -0
- package/native-bridge/TypeScript/types/AudioCallType.ts +17 -0
- package/native-bridge/TypeScript/types/CallDisplayMode.ts +22 -0
- package/native-bridge/TypeScript/types/CallKitConfiguration.ts +32 -0
- package/native-bridge/TypeScript/types/CallOptions.ts +18 -0
- package/native-bridge/TypeScript/types/CallType.ts +22 -0
- package/native-bridge/TypeScript/types/ChatToolConfiguration.ts +21 -0
- package/native-bridge/TypeScript/types/CreateCallOptions.ts +20 -0
- package/native-bridge/TypeScript/types/Environment.ts +12 -0
- package/native-bridge/TypeScript/types/IosConfiguration.ts +29 -0
- package/native-bridge/TypeScript/types/KaleyraVideoConfiguration.ts +42 -0
- package/native-bridge/TypeScript/types/RecordingType.ts +22 -0
- package/native-bridge/TypeScript/types/Region.ts +12 -0
- package/native-bridge/TypeScript/types/ScreenShareToolConfiguration.ts +24 -0
- package/native-bridge/TypeScript/types/Session.ts +20 -0
- package/native-bridge/TypeScript/types/Tools.ts +50 -0
- package/native-bridge/TypeScript/types/UserDetails.ts +37 -0
- package/native-bridge/TypeScript/types/UserDetailsFormat.ts +23 -0
- package/native-bridge/TypeScript/types/VoipHandlingStrategy.ts +17 -0
- package/native-bridge/android/build.gradle +72 -0
- package/native-bridge/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/native-bridge/android/gradle/wrapper/gradle-wrapper.properties +5 -0
- package/native-bridge/android/gradle.properties +22 -0
- package/native-bridge/android/gradlew +234 -0
- package/native-bridge/android/gradlew.bat +89 -0
- package/native-bridge/android/settings.gradle +1 -0
- package/native-bridge/android/src/main/AndroidManifest.xml +1 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/AccessTokenProvider.kt +8 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/CallOptionsProxy.kt +9 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/ContextContainer.kt +10 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/DTOs.kt +407 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/SDKAccessTokenProviderProxy.kt +16 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/VideoHybridBridge.kt +21 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/VideoSDKHybridBridge.kt +64 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/configurator/CachedSDKConfigurator.kt +15 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/configurator/VideoSDKConfigurator.kt +46 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/connector/CachedUserConnector.kt +15 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/connector/VideoSDKCachedUserConnector.kt +60 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/events/Events.kt +29 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/events/EventsEmitter.kt +8 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/events/EventsReporter.kt +9 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/events/reporter/CallEventsReporter.kt +54 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/events/reporter/ChatEventsReporter.kt +43 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/events/reporter/CrossPlatformModuleStatus.kt +29 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/events/reporter/ModuleEventsReporter.kt +34 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/events/reporter/SDKEventsReporter.kt +63 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/extensions/CallDisplayExtension.kt +15 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/extensions/ConfigurationExtension.kt +39 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/extensions/EnvironmentExtension.kt +12 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/extensions/RecordingTypeExtension.kt +15 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/extensions/RegionExtension.kt +13 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/extensions/ScreenShareToolConfigurationExtension.kt +15 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/extensions/ToolsExtension.kt +95 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/extensions/UserExtensions.kt +35 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/notifications/KaleyraVideoNotificationReceiver.kt +139 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/notifications/KaleyraVideoNotificationService.kt +85 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/repository/ConfigurationEntity.kt +27 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/repository/ConnectedUserEntity.kt +30 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/repository/Converters.kt +25 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/repository/UserDetailsDao.kt +21 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/repository/UserDetailsEntity.kt +22 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/repository/VideoHybridBridgeRepository.kt +39 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/ui/SDKUserInterfacePresenter.kt +49 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/ui/UserInterfacePresenter.kt +14 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/user_details/CachedUserDetails.kt +18 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/user_details/CachedUserDetailsFormatter.kt +59 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/user_details/SDKCachedUserDetails.kt +74 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/utils/CaseInsensitiveEnumTypeAdapterFactory.kt +48 -0
- package/native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/utils/TLSSocketFactoryCompat.kt +76 -0
- package/native-bridge/iOS/KaleyraVideoHybridNativeBridge.xcodeproj/project.pbxproj +1399 -0
- package/native-bridge/iOS/KaleyraVideoHybridNativeBridge.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- package/native-bridge/iOS/KaleyraVideoHybridNativeBridge.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/native-bridge/iOS/KaleyraVideoHybridNativeBridge.xcodeproj/xcshareddata/IDETemplateMacros.plist +9 -0
- package/native-bridge/iOS/KaleyraVideoHybridNativeBridge.xcodeproj/xcshareddata/xcschemes/KaleyraVideoHybridNativeBridge.xcscheme +79 -0
- package/native-bridge/iOS/KaleyraVideoHybridNativeBridge.xcworkspace/contents.xcworkspacedata +10 -0
- package/native-bridge/iOS/KaleyraVideoHybridNativeBridge.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/native-bridge/iOS/Podfile +28 -0
- package/native-bridge/iOS/Podfile.lock +20 -0
- package/native-bridge/iOS/Source/Abstractions/BandyerSDKProtocol.swift +24 -0
- package/native-bridge/iOS/Source/Abstractions/CallWindowProtocol.swift +18 -0
- package/native-bridge/iOS/Source/AccessToken/AccessTokenRequester.swift +9 -0
- package/native-bridge/iOS/Source/AccessToken/TokenProvider.swift +78 -0
- package/native-bridge/iOS/Source/Broadcast/BroadcastConfigurationPlistReader.swift +49 -0
- package/native-bridge/iOS/Source/Concurrency/DispatchQueue+isMain.swift +19 -0
- package/native-bridge/iOS/Source/Concurrency/Lock.swift +21 -0
- package/native-bridge/iOS/Source/Concurrency/MainQueueDispatcher.swift +23 -0
- package/native-bridge/iOS/Source/Concurrency/MainQueueRelay.swift +18 -0
- package/native-bridge/iOS/Source/DTOs/AccessTokenRequest+Encodable.swift +27 -0
- package/native-bridge/iOS/Source/DTOs/AccessTokenResponse+Decodable.swift +24 -0
- package/native-bridge/iOS/Source/DTOs/Array+JSON.swift +6 -0
- package/native-bridge/iOS/Source/DTOs/AudioCallOptions+Bandyer.swift +14 -0
- package/native-bridge/iOS/Source/DTOs/AudioCallOptions+Decodable.swift +18 -0
- package/native-bridge/iOS/Source/DTOs/AudioCallOptions+Equatable.swift +12 -0
- package/native-bridge/iOS/Source/DTOs/AudioCallType+Bandyer.swift +18 -0
- package/native-bridge/iOS/Source/DTOs/AudioCallType+Decodable.swift +25 -0
- package/native-bridge/iOS/Source/DTOs/CallKitConfiguration+Decodable.swift +20 -0
- package/native-bridge/iOS/Source/DTOs/CallOptions+Bandyer.swift +14 -0
- package/native-bridge/iOS/Source/DTOs/CallOptions+Decodable.swift +16 -0
- package/native-bridge/iOS/Source/DTOs/CallOptions+Equatable.swift +12 -0
- package/native-bridge/iOS/Source/DTOs/CallType+Bandyer.swift +20 -0
- package/native-bridge/iOS/Source/DTOs/CallType+Decodable.swift +27 -0
- package/native-bridge/iOS/Source/DTOs/ChatToolConfiguration+Decodable.swift +18 -0
- package/native-bridge/iOS/Source/DTOs/CreateCallOptions+Decodable.swift +22 -0
- package/native-bridge/iOS/Source/DTOs/CreateCallOptions+Equatable.swift +13 -0
- package/native-bridge/iOS/Source/DTOs/CreateCallOptions+Intent.swift +17 -0
- package/native-bridge/iOS/Source/DTOs/DTOs.swift +314 -0
- package/native-bridge/iOS/Source/DTOs/Environment+Bandyer.swift +20 -0
- package/native-bridge/iOS/Source/DTOs/Environment+Decodable.swift +16 -0
- package/native-bridge/iOS/Source/DTOs/IosConfiguration+Decodable.swift +18 -0
- package/native-bridge/iOS/Source/DTOs/JSONDecodable.swift +27 -0
- package/native-bridge/iOS/Source/DTOs/KaleyraVideoConfiguration+Bandyer.swift +158 -0
- package/native-bridge/iOS/Source/DTOs/KaleyraVideoConfiguration+Decodable.swift +28 -0
- package/native-bridge/iOS/Source/DTOs/KaleyraVideoConfiguration+UserInterfacePresenterConfiguration.swift +29 -0
- package/native-bridge/iOS/Source/DTOs/RecordingType+Bandyer.swift +33 -0
- package/native-bridge/iOS/Source/DTOs/RecordingType+Decodable.swift +27 -0
- package/native-bridge/iOS/Source/DTOs/Region+Bandyer.swift +22 -0
- package/native-bridge/iOS/Source/DTOs/Region+Decodable.swift +16 -0
- package/native-bridge/iOS/Source/DTOs/ScreenShareToolConfiguration+Decodable.swift +18 -0
- package/native-bridge/iOS/Source/DTOs/Tools+Decodable.swift +24 -0
- package/native-bridge/iOS/Source/DTOs/UserDetails+Bandyer.swift +18 -0
- package/native-bridge/iOS/Source/DTOs/UserDetails+Decodable.swift +28 -0
- package/native-bridge/iOS/Source/DTOs/UserDetailsFormat+Decodable.swift +19 -0
- package/native-bridge/iOS/Source/DTOs/VoipHandlingStrategy+Decodable.swift +25 -0
- package/native-bridge/iOS/Source/Events/Emitter/EventEmitter.swift +8 -0
- package/native-bridge/iOS/Source/Events/Events+CaseIterable.swift +18 -0
- package/native-bridge/iOS/Source/Events/Events+Description.swift +28 -0
- package/native-bridge/iOS/Source/Events/Events.swift +21 -0
- package/native-bridge/iOS/Source/Events/Reporters/CallClientEventsReporter.swift +46 -0
- package/native-bridge/iOS/Source/Events/Reporters/ChatClientEventsReporter.swift +46 -0
- package/native-bridge/iOS/Source/Events/Reporters/ClientState.swift +61 -0
- package/native-bridge/iOS/Source/Events/Reporters/EventsReporter.swift +69 -0
- package/native-bridge/iOS/Source/Events/Reporters/PushTokenEventsReporter.swift +34 -0
- package/native-bridge/iOS/Source/Extensions/URL+FromString.swift +26 -0
- package/native-bridge/iOS/Source/KaleyraVideoHybridNativeBridge.h +14 -0
- package/native-bridge/iOS/Source/NativeHybridBridge/VideoHybridNativeBridge.swift +173 -0
- package/native-bridge/iOS/Source/NativeHybridBridge/VideoHybridNativeBridgeError.swift +33 -0
- package/native-bridge/iOS/Source/UI/KaleyraVideoSDKUserInterfacePresenter.swift +249 -0
- package/native-bridge/iOS/Source/UI/Presenters/PresentingViewControllerViewControllerPresenter.swift +44 -0
- package/native-bridge/iOS/Source/UI/Presenters/ViewControllerPresenter.swift +17 -0
- package/native-bridge/iOS/Source/UI/Presenters/WindowViewControllerPresenter.swift +111 -0
- package/native-bridge/iOS/Source/UI/UserInterfacePresenter+MainQueueRelay.swift +30 -0
- package/native-bridge/iOS/Source/UI/UserInterfacePresenter.swift +14 -0
- package/native-bridge/iOS/Source/User Details/Cache/UsersDetailsCache.swift +36 -0
- package/native-bridge/iOS/Source/User Details/Formatter/FormatterProxy.swift +47 -0
- package/native-bridge/iOS/Source/User Details/Formatter/UserDetailsFormatter.swift +83 -0
- package/native-bridge/iOS/Source/User Details/Providers/UsersDetailsProvider.swift +39 -0
- package/package.json +147 -0
- package/src/KaleyraVideo.ts +343 -0
- package/src/ReactNativeEventEmitter.ts +51 -0
- package/src/events/Events.ts +46 -0
- package/video-react-native-module.podspec +36 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Screen Share tool configuration
|
|
3
|
+
*/
|
|
4
|
+
export interface ScreenShareToolConfiguration {
|
|
5
|
+
/**
|
|
6
|
+
* Set to true to enable the in app screen share
|
|
7
|
+
* <br/>
|
|
8
|
+
* <br/>
|
|
9
|
+
* <b><font color="blue">default</font>: false</b>
|
|
10
|
+
*/
|
|
11
|
+
inApp?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Set to true to enable the whole device screen share
|
|
14
|
+
* <br/>
|
|
15
|
+
* <br/>
|
|
16
|
+
* <b><font color="blue">default</font>: false</b>
|
|
17
|
+
*/
|
|
18
|
+
wholeDevice?: boolean;
|
|
19
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Session
|
|
3
|
+
*/
|
|
4
|
+
export interface Session {
|
|
5
|
+
/**
|
|
6
|
+
* The user id you want to connect
|
|
7
|
+
*/
|
|
8
|
+
userID: string;
|
|
9
|
+
/**
|
|
10
|
+
* The Kaleyra Video SDK adopts a strong authentication mechanism based on JWT access tokens.
|
|
11
|
+
* Whenever the SDK needs an access token for a particular user, this component will be asked to provide an access token for a particular user.
|
|
12
|
+
* @param userId the user which requires a token refresh
|
|
13
|
+
* @returns a promise containing the access token if completed successfully.
|
|
14
|
+
*/
|
|
15
|
+
accessTokenProvider(userId: string): Promise<string>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ScreenShareToolConfiguration } from "./ScreenShareToolConfiguration";
|
|
2
|
+
import { ChatToolConfiguration } from "./ChatToolConfiguration";
|
|
3
|
+
/**
|
|
4
|
+
* Video Module Tools
|
|
5
|
+
*/
|
|
6
|
+
export interface Tools {
|
|
7
|
+
/**
|
|
8
|
+
* Set to true to enable the file sharing feature
|
|
9
|
+
* <br/>
|
|
10
|
+
* <br/>
|
|
11
|
+
* <b><font color="blue">default</font>: false</b>
|
|
12
|
+
*/
|
|
13
|
+
fileShare?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Set to enable the screen sharing feature
|
|
16
|
+
* <br/>
|
|
17
|
+
* <br/>
|
|
18
|
+
* <b><font color="blue">default</font>: no screen share</b>
|
|
19
|
+
*/
|
|
20
|
+
screenShare?: ScreenShareToolConfiguration;
|
|
21
|
+
/**
|
|
22
|
+
* Set to enable the chat feature
|
|
23
|
+
* <br/>
|
|
24
|
+
* <br/>
|
|
25
|
+
* <b><font color="blue">default</font>: no chat</b>
|
|
26
|
+
*/
|
|
27
|
+
chat?: ChatToolConfiguration;
|
|
28
|
+
/**
|
|
29
|
+
* Set to true to enable the whiteboard feature
|
|
30
|
+
* <br/>
|
|
31
|
+
* <br/>
|
|
32
|
+
* <b><font color="blue">default</font>: false</b>
|
|
33
|
+
*/
|
|
34
|
+
whiteboard?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Set to true to enable the feedback request after a call ends.
|
|
37
|
+
* <br/>
|
|
38
|
+
* <br/>
|
|
39
|
+
* <b><font color="blue">default</font>: false</b>
|
|
40
|
+
*/
|
|
41
|
+
feedback?: boolean;
|
|
42
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This is used to define the user details in the call/chat UI
|
|
3
|
+
*/
|
|
4
|
+
export interface UserDetails {
|
|
5
|
+
/**
|
|
6
|
+
* User identifier
|
|
7
|
+
*/
|
|
8
|
+
userID: string;
|
|
9
|
+
/**
|
|
10
|
+
* Nickname for the user
|
|
11
|
+
*/
|
|
12
|
+
nickName?: string;
|
|
13
|
+
/**
|
|
14
|
+
* First name of the user
|
|
15
|
+
*/
|
|
16
|
+
firstName?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Last name of the user
|
|
19
|
+
*/
|
|
20
|
+
lastName?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Email of the user
|
|
23
|
+
*/
|
|
24
|
+
email?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Image url to use as placeholder for the user.
|
|
27
|
+
*/
|
|
28
|
+
profileImageUrl?: string;
|
|
29
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This is used to display the user details in the call/chat UI
|
|
3
|
+
*/
|
|
4
|
+
export interface UserDetailsFormat {
|
|
5
|
+
/**
|
|
6
|
+
* Format to be used to display a user details on the call/chat UI
|
|
7
|
+
* <br/>
|
|
8
|
+
* <br/>
|
|
9
|
+
* <b><font color="blue">default</font>: ${userAlias}</b>
|
|
10
|
+
*/
|
|
11
|
+
default: string;
|
|
12
|
+
/**
|
|
13
|
+
* Format to be used when displaying an android notification
|
|
14
|
+
* <br/>
|
|
15
|
+
* <br/>
|
|
16
|
+
* <b><font color="blue">default</font>: equals to UserDetailsFormatter.default</b>
|
|
17
|
+
*/
|
|
18
|
+
androidNotification?: string;
|
|
19
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This class defines the voip notification strategy per call.
|
|
3
|
+
*/
|
|
4
|
+
export declare enum VoipHandlingStrategy {
|
|
5
|
+
/**
|
|
6
|
+
* The voip notifications will not be handled
|
|
7
|
+
*/
|
|
8
|
+
DISABLED = "disabled",
|
|
9
|
+
/**
|
|
10
|
+
* The voip notifications will be handled automatically from the plugin
|
|
11
|
+
*/
|
|
12
|
+
AUTOMATIC = "automatic"
|
|
13
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import type { KaleyraVideoConfiguration } from '../native-bridge/TypeScript/types/KaleyraVideoConfiguration';
|
|
2
|
+
import type { CreateCallOptions } from '../native-bridge/TypeScript/types/CreateCallOptions';
|
|
3
|
+
import type { UserDetails } from '../native-bridge/TypeScript/types/UserDetails';
|
|
4
|
+
import type { UserDetailsFormat } from '../native-bridge/TypeScript/types/UserDetailsFormat';
|
|
5
|
+
import { CallType } from '../native-bridge/TypeScript/types/CallType';
|
|
6
|
+
import { Environments } from '../native-bridge/TypeScript/Environments';
|
|
7
|
+
import { CallDisplayMode } from '../native-bridge/TypeScript/types/CallDisplayMode';
|
|
8
|
+
import { Regions } from '../native-bridge/TypeScript/Regions';
|
|
9
|
+
import type { Session } from '../native-bridge/TypeScript/types/Session';
|
|
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 { ReactNativeEventEmitter } from './ReactNativeEventEmitter';
|
|
14
|
+
import type { Events } from './events/Events';
|
|
15
|
+
import { Tools } from '../native-bridge/TypeScript/types/Tools';
|
|
16
|
+
import { IosConfiguration } from '../native-bridge/TypeScript/types/IosConfiguration';
|
|
17
|
+
import { CallKitConfiguration } from '../native-bridge/TypeScript/types/CallKitConfiguration';
|
|
18
|
+
import { ScreenShareToolConfiguration } from '../native-bridge/TypeScript/types/ScreenShareToolConfiguration';
|
|
19
|
+
import { ChatToolConfiguration } from '../native-bridge/TypeScript/types/ChatToolConfiguration';
|
|
20
|
+
import { AudioCallOptions } from '../native-bridge/TypeScript/types/AudioCallOptions';
|
|
21
|
+
import { CallOptions } from '../native-bridge/TypeScript/types/CallOptions';
|
|
22
|
+
/**
|
|
23
|
+
* KaleyraVideo
|
|
24
|
+
*/
|
|
25
|
+
declare class KaleyraVideo {
|
|
26
|
+
/**
|
|
27
|
+
* <b>To create an instance of the Kaleyra Video invoke the [[configure]] method</b>
|
|
28
|
+
*/
|
|
29
|
+
static instance: KaleyraVideo;
|
|
30
|
+
private readonly eventEmitter;
|
|
31
|
+
events: Events;
|
|
32
|
+
constructor(eventEmitter: ReactNativeEventEmitter);
|
|
33
|
+
/**
|
|
34
|
+
* Call this method when device is ready to configure the module
|
|
35
|
+
* @param configuration
|
|
36
|
+
* @throws IllegalArgumentError
|
|
37
|
+
*/
|
|
38
|
+
static configure(configuration: KaleyraVideoConfiguration): KaleyraVideo;
|
|
39
|
+
/**
|
|
40
|
+
* @ignore
|
|
41
|
+
* @private
|
|
42
|
+
*/
|
|
43
|
+
private static _isAndroid;
|
|
44
|
+
/**
|
|
45
|
+
* @ignore
|
|
46
|
+
* @private
|
|
47
|
+
*/
|
|
48
|
+
private static _isIOS;
|
|
49
|
+
/**
|
|
50
|
+
* Connect the plugin
|
|
51
|
+
* @param session session to connect with
|
|
52
|
+
* @throws IllegalArgumentError
|
|
53
|
+
*/
|
|
54
|
+
connect(session: Session): void;
|
|
55
|
+
/**
|
|
56
|
+
* Stop the plugin
|
|
57
|
+
*/
|
|
58
|
+
disconnect(): void;
|
|
59
|
+
/**
|
|
60
|
+
* This method allows you to reset the configuration.
|
|
61
|
+
*/
|
|
62
|
+
reset(): void;
|
|
63
|
+
/**
|
|
64
|
+
* Get the current state of the plugin
|
|
65
|
+
* @return the state as a promise
|
|
66
|
+
*/
|
|
67
|
+
/**
|
|
68
|
+
* Start Call with the callee defined
|
|
69
|
+
* @param callOptions
|
|
70
|
+
* @throws IllegalArgumentError
|
|
71
|
+
*/
|
|
72
|
+
startCall(callOptions: CreateCallOptions): void;
|
|
73
|
+
/**
|
|
74
|
+
* Verify the user for the current call
|
|
75
|
+
* @param verify true if the user is verified, false otherwise
|
|
76
|
+
* @throws IllegalArgumentError
|
|
77
|
+
*/
|
|
78
|
+
verifyCurrentCall(verify: boolean): void;
|
|
79
|
+
/**
|
|
80
|
+
* Set the UI display mode for the current call
|
|
81
|
+
* @param mode FOREGROUND, FOREGROUND_PICTURE_IN_PICTURE, BACKGROUND
|
|
82
|
+
* @throws IllegalArgumentError
|
|
83
|
+
*/
|
|
84
|
+
setDisplayModeForCurrentCall(mode: CallDisplayMode): void;
|
|
85
|
+
/**
|
|
86
|
+
* Start Call from url
|
|
87
|
+
* @param url received
|
|
88
|
+
* @throws IllegalArgumentError
|
|
89
|
+
*/
|
|
90
|
+
startCallFrom(url: string): void;
|
|
91
|
+
/**
|
|
92
|
+
* Call this method to provide the details for each user to be used to set up the UI
|
|
93
|
+
* @param userDetails array of user details
|
|
94
|
+
* @throws IllegalArgumentError
|
|
95
|
+
*/
|
|
96
|
+
addUsersDetails(userDetails: UserDetails[]): void;
|
|
97
|
+
setUserDetailsFormat(format: UserDetailsFormat): void;
|
|
98
|
+
/**
|
|
99
|
+
* Call this method to remove all the user details previously provided.
|
|
100
|
+
*/
|
|
101
|
+
removeUsersDetails(): void;
|
|
102
|
+
/**
|
|
103
|
+
* Call this method to handle a notification!
|
|
104
|
+
*
|
|
105
|
+
* @param payload notification data payload as String
|
|
106
|
+
* @throws IllegalArgumentError
|
|
107
|
+
*/
|
|
108
|
+
handlePushNotificationPayload(payload: string): void;
|
|
109
|
+
/**
|
|
110
|
+
* Open chat
|
|
111
|
+
* @param userID user you want to chat with
|
|
112
|
+
* @throws IllegalArgumentError
|
|
113
|
+
*/
|
|
114
|
+
startChat(userID: string): void;
|
|
115
|
+
/**
|
|
116
|
+
* This method allows you to clear all user cached data, such as chat messages and generic information.
|
|
117
|
+
*/
|
|
118
|
+
clearUserCache(): void;
|
|
119
|
+
/**
|
|
120
|
+
* This method returns the current voip push token
|
|
121
|
+
* @return promise of voipPushToken or undefined if has not been generated yet.
|
|
122
|
+
*/
|
|
123
|
+
getCurrentVoIPPushToken(): Promise<string>;
|
|
124
|
+
}
|
|
125
|
+
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,15 @@
|
|
|
1
|
+
import { NativeEventEmitter, NativeModule } from 'react-native';
|
|
2
|
+
import type { Events } from './events/Events';
|
|
3
|
+
import { Events as HybridEvents } from '../native-bridge/TypeScript/Events';
|
|
4
|
+
export declare class ReactNativeEventEmitter extends NativeEventEmitter implements Events {
|
|
5
|
+
constructor(nativeModule: NativeModule);
|
|
6
|
+
onSetupError: (_: string) => void;
|
|
7
|
+
onCallModuleStatusChanged: (_: string) => void;
|
|
8
|
+
onCallError: (_: string) => void;
|
|
9
|
+
oniOSVoipPushTokenUpdated: (_: string) => void;
|
|
10
|
+
onChatError: (_: string) => void;
|
|
11
|
+
onChatModuleStatusChanged: (_: string) => void;
|
|
12
|
+
oniOSVoipPushTokenInvalidated: () => void;
|
|
13
|
+
on(event: HybridEvents, listener: (...args: any[]) => any): void;
|
|
14
|
+
clear(): void;
|
|
15
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This enum defines all the events that may be handled
|
|
3
|
+
* <br/>
|
|
4
|
+
* <br/>
|
|
5
|
+
* You can listen to these events via [[KaleyraVideo.on]]
|
|
6
|
+
*/
|
|
7
|
+
export interface Events {
|
|
8
|
+
/**
|
|
9
|
+
* @see [[SetupErrorEvent]]
|
|
10
|
+
*/
|
|
11
|
+
onSetupError: ((reason: string) => void) | null;
|
|
12
|
+
/**
|
|
13
|
+
* @see [[CallStatusChangedEvent]]
|
|
14
|
+
*/
|
|
15
|
+
onCallModuleStatusChanged: ((status: string) => void) | null;
|
|
16
|
+
/**
|
|
17
|
+
* Register to this event via [[KaleyraVideo.on]]
|
|
18
|
+
* @param callback with the reason as parameter
|
|
19
|
+
*/
|
|
20
|
+
onCallError: ((reason: string) => void) | null;
|
|
21
|
+
/**
|
|
22
|
+
* @see [[ChatErrorEvent]]
|
|
23
|
+
*/
|
|
24
|
+
onChatError: ((reason: string) => void) | null;
|
|
25
|
+
/**
|
|
26
|
+
* @see [[ChatStatusChangedEvent]]
|
|
27
|
+
*/
|
|
28
|
+
onChatModuleStatusChanged: ((status: string) => void) | null;
|
|
29
|
+
/**
|
|
30
|
+
* @see [[VoipPushTokenEvents]]
|
|
31
|
+
*/
|
|
32
|
+
oniOSVoipPushTokenUpdated: ((token: string) => void) | null;
|
|
33
|
+
/**
|
|
34
|
+
* @see [[VoipPushTokenEvents]]
|
|
35
|
+
*/
|
|
36
|
+
oniOSVoipPushTokenInvalidated: (() => void) | null;
|
|
37
|
+
}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
GNU LESSER GENERAL PUBLIC LICENSE
|
|
2
|
+
Version 3, 29 June 2007
|
|
3
|
+
|
|
4
|
+
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
|
5
|
+
Everyone is permitted to copy and distribute verbatim copies
|
|
6
|
+
of this license document, but changing it is not allowed.
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
This version of the GNU Lesser General Public License incorporates
|
|
10
|
+
the terms and conditions of version 3 of the GNU General Public
|
|
11
|
+
License, supplemented by the additional permissions listed below.
|
|
12
|
+
|
|
13
|
+
0. Additional Definitions.
|
|
14
|
+
|
|
15
|
+
As used herein, "this License" refers to version 3 of the GNU Lesser
|
|
16
|
+
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
|
17
|
+
General Public License.
|
|
18
|
+
|
|
19
|
+
"The Library" refers to a covered work governed by this License,
|
|
20
|
+
other than an Application or a Combined Work as defined below.
|
|
21
|
+
|
|
22
|
+
An "Application" is any work that makes use of an interface provided
|
|
23
|
+
by the Library, but which is not otherwise based on the Library.
|
|
24
|
+
Defining a subclass of a class defined by the Library is deemed a mode
|
|
25
|
+
of using an interface provided by the Library.
|
|
26
|
+
|
|
27
|
+
A "Combined Work" is a work produced by combining or linking an
|
|
28
|
+
Application with the Library. The particular version of the Library
|
|
29
|
+
with which the Combined Work was made is also called the "Linked
|
|
30
|
+
Version".
|
|
31
|
+
|
|
32
|
+
The "Minimal Corresponding Source" for a Combined Work means the
|
|
33
|
+
Corresponding Source for the Combined Work, excluding any source code
|
|
34
|
+
for portions of the Combined Work that, considered in isolation, are
|
|
35
|
+
based on the Application, and not on the Linked Version.
|
|
36
|
+
|
|
37
|
+
The "Corresponding Application Code" for a Combined Work means the
|
|
38
|
+
object code and/or source code for the Application, including any data
|
|
39
|
+
and utility programs needed for reproducing the Combined Work from the
|
|
40
|
+
Application, but excluding the System Libraries of the Combined Work.
|
|
41
|
+
|
|
42
|
+
1. Exception to Section 3 of the GNU GPL.
|
|
43
|
+
|
|
44
|
+
You may convey a covered work under sections 3 and 4 of this License
|
|
45
|
+
without being bound by section 3 of the GNU GPL.
|
|
46
|
+
|
|
47
|
+
2. Conveying Modified Versions.
|
|
48
|
+
|
|
49
|
+
If you modify a copy of the Library, and, in your modifications, a
|
|
50
|
+
facility refers to a function or data to be supplied by an Application
|
|
51
|
+
that uses the facility (other than as an argument passed when the
|
|
52
|
+
facility is invoked), then you may convey a copy of the modified
|
|
53
|
+
version:
|
|
54
|
+
|
|
55
|
+
a) under this License, provided that you make a good faith effort to
|
|
56
|
+
ensure that, in the event an Application does not supply the
|
|
57
|
+
function or data, the facility still operates, and performs
|
|
58
|
+
whatever part of its purpose remains meaningful, or
|
|
59
|
+
|
|
60
|
+
b) under the GNU GPL, with none of the additional permissions of
|
|
61
|
+
this License applicable to that copy.
|
|
62
|
+
|
|
63
|
+
3. Object Code Incorporating Material from Library Header Files.
|
|
64
|
+
|
|
65
|
+
The object code form of an Application may incorporate material from
|
|
66
|
+
a header file that is part of the Library. You may convey such object
|
|
67
|
+
code under terms of your choice, provided that, if the incorporated
|
|
68
|
+
material is not limited to numerical parameters, data structure
|
|
69
|
+
layouts and accessors, or small macros, inline functions and templates
|
|
70
|
+
(ten or fewer lines in length), you do both of the following:
|
|
71
|
+
|
|
72
|
+
a) Give prominent notice with each copy of the object code that the
|
|
73
|
+
Library is used in it and that the Library and its use are
|
|
74
|
+
covered by this License.
|
|
75
|
+
|
|
76
|
+
b) Accompany the object code with a copy of the GNU GPL and this license
|
|
77
|
+
document.
|
|
78
|
+
|
|
79
|
+
4. Combined Works.
|
|
80
|
+
|
|
81
|
+
You may convey a Combined Work under terms of your choice that,
|
|
82
|
+
taken together, effectively do not restrict modification of the
|
|
83
|
+
portions of the Library contained in the Combined Work and reverse
|
|
84
|
+
engineering for debugging such modifications, if you also do each of
|
|
85
|
+
the following:
|
|
86
|
+
|
|
87
|
+
a) Give prominent notice with each copy of the Combined Work that
|
|
88
|
+
the Library is used in it and that the Library and its use are
|
|
89
|
+
covered by this License.
|
|
90
|
+
|
|
91
|
+
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
|
92
|
+
document.
|
|
93
|
+
|
|
94
|
+
c) For a Combined Work that displays copyright notices during
|
|
95
|
+
execution, include the copyright notice for the Library among
|
|
96
|
+
these notices, as well as a reference directing the user to the
|
|
97
|
+
copies of the GNU GPL and this license document.
|
|
98
|
+
|
|
99
|
+
d) Do one of the following:
|
|
100
|
+
|
|
101
|
+
0) Convey the Minimal Corresponding Source under the terms of this
|
|
102
|
+
License, and the Corresponding Application Code in a form
|
|
103
|
+
suitable for, and under terms that permit, the user to
|
|
104
|
+
recombine or relink the Application with a modified version of
|
|
105
|
+
the Linked Version to produce a modified Combined Work, in the
|
|
106
|
+
manner specified by section 6 of the GNU GPL for conveying
|
|
107
|
+
Corresponding Source.
|
|
108
|
+
|
|
109
|
+
1) Use a suitable shared library mechanism for linking with the
|
|
110
|
+
Library. A suitable mechanism is one that (a) uses at run time
|
|
111
|
+
a copy of the Library already present on the user's computer
|
|
112
|
+
system, and (b) will operate properly with a modified version
|
|
113
|
+
of the Library that is interface-compatible with the Linked
|
|
114
|
+
Version.
|
|
115
|
+
|
|
116
|
+
e) Provide Installation Information, but only if you would otherwise
|
|
117
|
+
be required to provide such information under section 6 of the
|
|
118
|
+
GNU GPL, and only to the extent that such information is
|
|
119
|
+
necessary to install and execute a modified version of the
|
|
120
|
+
Combined Work produced by recombining or relinking the
|
|
121
|
+
Application with a modified version of the Linked Version. (If
|
|
122
|
+
you use option 4d0, the Installation Information must accompany
|
|
123
|
+
the Minimal Corresponding Source and Corresponding Application
|
|
124
|
+
Code. If you use option 4d1, you must provide the Installation
|
|
125
|
+
Information in the manner specified by section 6 of the GNU GPL
|
|
126
|
+
for conveying Corresponding Source.)
|
|
127
|
+
|
|
128
|
+
5. Combined Libraries.
|
|
129
|
+
|
|
130
|
+
You may place library facilities that are a work based on the
|
|
131
|
+
Library side by side in a single library together with other library
|
|
132
|
+
facilities that are not Applications and are not covered by this
|
|
133
|
+
License, and convey such a combined library under terms of your
|
|
134
|
+
choice, if you do both of the following:
|
|
135
|
+
|
|
136
|
+
a) Accompany the combined library with a copy of the same work based
|
|
137
|
+
on the Library, uncombined with any other library facilities,
|
|
138
|
+
conveyed under the terms of this License.
|
|
139
|
+
|
|
140
|
+
b) Give prominent notice with the combined library that part of it
|
|
141
|
+
is a work based on the Library, and explaining where to find the
|
|
142
|
+
accompanying uncombined form of the same work.
|
|
143
|
+
|
|
144
|
+
6. Revised Versions of the GNU Lesser General Public License.
|
|
145
|
+
|
|
146
|
+
The Free Software Foundation may publish revised and/or new versions
|
|
147
|
+
of the GNU Lesser General Public License from time to time. Such new
|
|
148
|
+
versions will be similar in spirit to the present version, but may
|
|
149
|
+
differ in detail to address new problems or concerns.
|
|
150
|
+
|
|
151
|
+
Each version is given a distinguishing version number. If the
|
|
152
|
+
Library as you received it specifies that a certain numbered version
|
|
153
|
+
of the GNU Lesser General Public License "or any later version"
|
|
154
|
+
applies to it, you have the option of following the terms and
|
|
155
|
+
conditions either of that published version or of any later version
|
|
156
|
+
published by the Free Software Foundation. If the Library as you
|
|
157
|
+
received it does not specify a version number of the GNU Lesser
|
|
158
|
+
General Public License, you may choose any version of the GNU Lesser
|
|
159
|
+
General Public License ever published by the Free Software Foundation.
|
|
160
|
+
|
|
161
|
+
If the Library as you received it specifies that a proxy can decide
|
|
162
|
+
whether future versions of the GNU Lesser General Public License shall
|
|
163
|
+
apply, that proxy's public statement of acceptance of any version is
|
|
164
|
+
permanent authorization for you to choose that version for the
|
|
165
|
+
Library.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// Copyright © 2018-2023 Kaleyra S.p.a. All Rights Reserved.
|
|
2
|
+
// See LICENSE for licensing information
|
|
3
|
+
|
|
4
|
+
import type { Environment } from './types/Environment';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Available environments
|
|
8
|
+
*/
|
|
9
|
+
export class Environments implements Environment {
|
|
10
|
+
/**
|
|
11
|
+
* Sandbox environment
|
|
12
|
+
*/
|
|
13
|
+
static sandbox(): Environment {
|
|
14
|
+
return new Environments('sandbox');
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Production environment
|
|
19
|
+
*/
|
|
20
|
+
static production(): Environment {
|
|
21
|
+
return new Environments('production');
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Create environment by name
|
|
26
|
+
* @param name name of the environment
|
|
27
|
+
*/
|
|
28
|
+
static new(name: string): Environment {
|
|
29
|
+
return new Environments(name);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* name of the environment
|
|
34
|
+
* @ignore
|
|
35
|
+
*/
|
|
36
|
+
name: string;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* @ignore
|
|
40
|
+
*/
|
|
41
|
+
private constructor(name: string) {
|
|
42
|
+
this.name = name;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// Copyright © 2018-2023 Kaleyra S.p.a. All Rights Reserved.
|
|
2
|
+
// See LICENSE for licensing information
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* This enum defines all the events that may be handled
|
|
6
|
+
* <br/>
|
|
7
|
+
* <br/>
|
|
8
|
+
* You can listen to these events via [[BandyerPlugin.on]]
|
|
9
|
+
*/
|
|
10
|
+
export enum Events {
|
|
11
|
+
/**
|
|
12
|
+
* Used for access token retrieval
|
|
13
|
+
*/
|
|
14
|
+
accessTokenRequest = 'accessTokenRequest',
|
|
15
|
+
/**
|
|
16
|
+
* Used to notify setup errors
|
|
17
|
+
*/
|
|
18
|
+
setupError = 'setupError',
|
|
19
|
+
/**
|
|
20
|
+
* Used to notify call module status changed
|
|
21
|
+
*/
|
|
22
|
+
callModuleStatusChanged = 'callModuleStatusChanged',
|
|
23
|
+
/**
|
|
24
|
+
* Used to notify call errors
|
|
25
|
+
*/
|
|
26
|
+
callError = 'callError',
|
|
27
|
+
/**
|
|
28
|
+
* Used to notify chat errors
|
|
29
|
+
*/
|
|
30
|
+
chatError = 'chatError',
|
|
31
|
+
/**
|
|
32
|
+
* Used to notify chat module status changed
|
|
33
|
+
*/
|
|
34
|
+
chatModuleStatusChanged = 'chatModuleStatusChanged',
|
|
35
|
+
/**
|
|
36
|
+
* Used to notify voip push token updates
|
|
37
|
+
*/
|
|
38
|
+
iOSVoipPushTokenUpdated = 'iOSVoipPushTokenUpdated',
|
|
39
|
+
/**
|
|
40
|
+
* Used to notify voip push token invalidation
|
|
41
|
+
*/
|
|
42
|
+
iOSVoipPushTokenInvalidated = 'iOSVoipPushTokenInvalidated',
|
|
43
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// Copyright © 2018-2023 Kaleyra S.p.a. All Rights Reserved.
|
|
2
|
+
// See LICENSE for licensing information
|
|
3
|
+
|
|
4
|
+
import type { Region } from './types/Region';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Available regions
|
|
8
|
+
*/
|
|
9
|
+
export class Regions implements Region {
|
|
10
|
+
/**
|
|
11
|
+
* India region
|
|
12
|
+
*/
|
|
13
|
+
static india(): Region {
|
|
14
|
+
return new Regions('india');
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Europe region
|
|
19
|
+
*/
|
|
20
|
+
static europe(): Region {
|
|
21
|
+
return new Regions('europe');
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Us region
|
|
26
|
+
*/
|
|
27
|
+
static us(): Region {
|
|
28
|
+
return new Regions('us');
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Create region by name
|
|
33
|
+
* @param name name of the region
|
|
34
|
+
*/
|
|
35
|
+
static new(name: string): Region {
|
|
36
|
+
return new Regions(name);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* name of the region
|
|
41
|
+
* @ignore
|
|
42
|
+
*/
|
|
43
|
+
name: string;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* @ignore
|
|
47
|
+
*/
|
|
48
|
+
private constructor(name: string) {
|
|
49
|
+
this.name = name;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// Copyright © 2018-2023 Kaleyra S.p.a. All Rights Reserved.
|
|
2
|
+
// See LICENSE for licensing information
|
|
3
|
+
|
|
4
|
+
import { IllegalArgumentError } from "./errors/IllegalArgumentError";
|
|
5
|
+
|
|
6
|
+
export class UserDetailsFormatValidator {
|
|
7
|
+
|
|
8
|
+
validate(format: string) {
|
|
9
|
+
const keywords = this.findKeywords(format);
|
|
10
|
+
|
|
11
|
+
if (keywords.length === 0) {
|
|
12
|
+
throw new IllegalArgumentError("Could not find any keyword, at least one keyword in the format ${keyword} must be provided");
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const allowedKeywords = ["userID", "nickName", "firstName", "lastName", "email", "profileImageUrl"];
|
|
16
|
+
|
|
17
|
+
keywords.forEach((keyword) => {
|
|
18
|
+
if (allowedKeywords.indexOf(keyword) === -1) {
|
|
19
|
+
throw new IllegalArgumentError("Declared keyword=${" + keyword + "} is not allowed. The allowedKeywords allowed are: " + allowedKeywords);
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
private findKeywords(format: string): string[] {
|
|
25
|
+
const regex = /\${([\w]+)}/g;
|
|
26
|
+
let match;
|
|
27
|
+
const matches: string[] = [];
|
|
28
|
+
while ((match = regex.exec(format)) !== null) {
|
|
29
|
+
if (match[1] && match[1] !== null) {
|
|
30
|
+
matches.push(match[1]);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return matches;
|
|
34
|
+
}
|
|
35
|
+
}
|