@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
package/native-bridge/iOS/Source/UI/Presenters/PresentingViewControllerViewControllerPresenter.swift
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// Copyright © 2018-2023 Kaleyra S.p.a. All Rights Reserved.
|
|
2
|
+
// See LICENSE for licensing information
|
|
3
|
+
|
|
4
|
+
import Foundation
|
|
5
|
+
import UIKit
|
|
6
|
+
|
|
7
|
+
@available(iOS 12.0, *)
|
|
8
|
+
class PresentingViewControllerViewControllerPresenter: ViewControllerPresenter {
|
|
9
|
+
|
|
10
|
+
// MARK: - Properties
|
|
11
|
+
|
|
12
|
+
private unowned let presentingViewController: UIViewController
|
|
13
|
+
|
|
14
|
+
var isPresenting: Bool {
|
|
15
|
+
presentingViewController.presentedViewController != nil
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// MARK: - Init
|
|
19
|
+
|
|
20
|
+
init(presentingViewController: UIViewController) {
|
|
21
|
+
self.presentingViewController = presentingViewController
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// MARK: - ViewControllerPresenter
|
|
25
|
+
|
|
26
|
+
func present(_ viewController: UIViewController, animated flag: Bool, completion: (() -> Void)?) {
|
|
27
|
+
presentingViewController.present(viewController, animated: flag, completion: completion)
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
func dismiss(_ viewController: UIViewController, animated flag: Bool, completion: (() -> Void)?) {
|
|
31
|
+
viewController.dismiss(animated: flag, completion: completion)
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
func displayAlert(title: String, message: String, dismissButtonText: String) {
|
|
35
|
+
let alert = UIAlertController(title: title, message: message, preferredStyle: .alert)
|
|
36
|
+
let action = UIAlertAction(title: dismissButtonText, style: .cancel)
|
|
37
|
+
alert.addAction(action)
|
|
38
|
+
presentingViewController.present(alert, animated: true)
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
func dismissAll(animated flag: Bool, completion: (() -> Void)?) {
|
|
42
|
+
presentingViewController.dismiss(animated: flag, completion: completion)
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// Copyright © 2018-2023 Kaleyra S.p.a. All Rights Reserved.
|
|
2
|
+
// See LICENSE for licensing information
|
|
3
|
+
|
|
4
|
+
import Foundation
|
|
5
|
+
import UIKit
|
|
6
|
+
|
|
7
|
+
@available(iOS 12.0, *)
|
|
8
|
+
protocol ViewControllerPresenter {
|
|
9
|
+
|
|
10
|
+
var isPresenting: Bool { get }
|
|
11
|
+
|
|
12
|
+
func present(_ viewController: UIViewController, animated flag: Bool, completion: (() -> Void)?)
|
|
13
|
+
func displayAlert(title: String, message: String, dismissButtonText: String)
|
|
14
|
+
|
|
15
|
+
func dismiss(_ viewController: UIViewController, animated flag: Bool, completion: (() -> Void)?)
|
|
16
|
+
func dismissAll(animated flag: Bool, completion: (() -> Void)?)
|
|
17
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
// Copyright © 2018-2023 Kaleyra S.p.a. All Rights Reserved.
|
|
2
|
+
// See LICENSE for licensing information
|
|
3
|
+
|
|
4
|
+
import Foundation
|
|
5
|
+
import UIKit
|
|
6
|
+
|
|
7
|
+
@available(iOS 12.0, *)
|
|
8
|
+
class WindowViewControllerPresenter: ViewControllerPresenter {
|
|
9
|
+
|
|
10
|
+
// MARK: - Nested Types
|
|
11
|
+
|
|
12
|
+
class DismissObservableAlert: UIAlertController {
|
|
13
|
+
|
|
14
|
+
var onDismiss: (() -> Void)?
|
|
15
|
+
|
|
16
|
+
override func viewDidDisappear(_ animated: Bool) {
|
|
17
|
+
super.viewDidDisappear(animated)
|
|
18
|
+
onDismiss?()
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// MARK: - Properties
|
|
23
|
+
|
|
24
|
+
var windowFactory: () -> UIWindow = {
|
|
25
|
+
let window = UIWindow()
|
|
26
|
+
window.windowLevel = .normal + 1
|
|
27
|
+
window.backgroundColor = .clear
|
|
28
|
+
return window
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
var rootViewControllerFactory: () -> UIViewController = {
|
|
32
|
+
.init()
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
private(set) var showedWindows = [UIWindow]()
|
|
36
|
+
|
|
37
|
+
private var presentedViewControllers: [UIViewController] {
|
|
38
|
+
showedWindows.compactMap({ $0.rootViewController?.presentedViewController })
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
var isPresenting: Bool {
|
|
42
|
+
!presentedViewControllers.isEmpty
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// MARK: - ViewControllerPresenter
|
|
46
|
+
|
|
47
|
+
func present(_ viewController: UIViewController, animated flag: Bool, completion: (() -> Void)?) {
|
|
48
|
+
let window = windowFactory()
|
|
49
|
+
let rootViewController = rootViewControllerFactory()
|
|
50
|
+
|
|
51
|
+
window.makeKeyAndVisible()
|
|
52
|
+
window.rootViewController = rootViewController
|
|
53
|
+
|
|
54
|
+
if let alert = viewController as? DismissObservableAlert {
|
|
55
|
+
alert.onDismiss = { [weak self, weak window] in
|
|
56
|
+
guard let self = self, let window = window else { return }
|
|
57
|
+
|
|
58
|
+
self.hideWindow(window)
|
|
59
|
+
}
|
|
60
|
+
} else {
|
|
61
|
+
viewController.modalPresentationStyle = .fullScreen
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
rootViewController.present(viewController, animated: flag, completion: completion)
|
|
65
|
+
|
|
66
|
+
showedWindows.append(window)
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
func dismiss(_ viewController: UIViewController, animated flag: Bool, completion: (() -> Void)?) {
|
|
70
|
+
guard let window = viewController.view.window else { return }
|
|
71
|
+
|
|
72
|
+
let continueWith = { [weak self] in
|
|
73
|
+
self?.hideWindow(window)
|
|
74
|
+
completion?()
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
if let rootViewController = window.rootViewController {
|
|
78
|
+
rootViewController.dismiss(animated: true, completion: continueWith)
|
|
79
|
+
} else {
|
|
80
|
+
continueWith()
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
func displayAlert(title: String, message: String, dismissButtonText: String) {
|
|
85
|
+
let alert = DismissObservableAlert(title: title, message: message, preferredStyle: .alert)
|
|
86
|
+
let action = UIAlertAction(title: dismissButtonText, style: .cancel)
|
|
87
|
+
alert.addAction(action)
|
|
88
|
+
present(alert, animated: true, completion: nil)
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
func dismissAll(animated flag: Bool, completion: (() -> Void)?){
|
|
92
|
+
guard let topPresented = presentedViewControllers.first else {
|
|
93
|
+
completion?()
|
|
94
|
+
return
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
if presentedViewControllers.count > 1 {
|
|
98
|
+
dismiss(topPresented, animated: flag) { [weak self] in
|
|
99
|
+
self?.dismissAll(animated: flag, completion: completion)
|
|
100
|
+
}
|
|
101
|
+
} else {
|
|
102
|
+
dismiss(topPresented, animated: flag, completion: completion)
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
private func hideWindow(_ window: UIWindow) {
|
|
107
|
+
window.isHidden = true
|
|
108
|
+
window.rootViewController = nil
|
|
109
|
+
showedWindows.removeAll(where: { $0 == window })
|
|
110
|
+
}
|
|
111
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// Copyright © 2018-2023 Kaleyra S.p.a. All Rights Reserved.
|
|
2
|
+
// See LICENSE for licensing information
|
|
3
|
+
|
|
4
|
+
import Foundation
|
|
5
|
+
|
|
6
|
+
@available(iOS 12.0, *)
|
|
7
|
+
extension MainQueueRelay: UserInterfacePresenter where Decoratee: UserInterfacePresenter {
|
|
8
|
+
|
|
9
|
+
func configure(with configuration: UserInterfacePresenterConfiguration) {
|
|
10
|
+
decoratee.configure(with: configuration)
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
func presentCall(_ options: CreateCallOptions) {
|
|
14
|
+
dispatch { [weak self] in
|
|
15
|
+
self?.decoratee.presentCall(options)
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
func presentCall(_ url: URL) {
|
|
20
|
+
dispatch { [weak self] in
|
|
21
|
+
self?.decoratee.presentCall(url)
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
func presentChat(with userID: String) {
|
|
26
|
+
dispatch { [weak self] in
|
|
27
|
+
self?.decoratee.presentChat(with: userID)
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Copyright © 2018-2023 Kaleyra S.p.a. All Rights Reserved.
|
|
2
|
+
// See LICENSE for licensing information
|
|
3
|
+
|
|
4
|
+
import Foundation
|
|
5
|
+
|
|
6
|
+
@available(iOS 12.0, *)
|
|
7
|
+
protocol UserInterfacePresenter {
|
|
8
|
+
|
|
9
|
+
func configure(with configuration: UserInterfacePresenterConfiguration)
|
|
10
|
+
|
|
11
|
+
func presentCall(_ options: CreateCallOptions)
|
|
12
|
+
func presentCall(_ url: URL)
|
|
13
|
+
func presentChat(with userID: String)
|
|
14
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// Copyright © 2018-2023 Kaleyra S.p.a. All Rights Reserved.
|
|
2
|
+
// See LICENSE for licensing information
|
|
3
|
+
|
|
4
|
+
import Foundation
|
|
5
|
+
import Bandyer
|
|
6
|
+
|
|
7
|
+
@available(iOS 12.0, *)
|
|
8
|
+
class UsersDetailsCache {
|
|
9
|
+
|
|
10
|
+
private lazy var items = [String : Bandyer.UserDetails]()
|
|
11
|
+
private let lock: Lock = NSRecursiveLock()
|
|
12
|
+
|
|
13
|
+
func setItem(_ item: Bandyer.UserDetails, forKey key: String) {
|
|
14
|
+
lock.sync {
|
|
15
|
+
items[key] = item
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
func setItems(_ items: [Bandyer.UserDetails]) {
|
|
20
|
+
lock.sync {
|
|
21
|
+
items.forEach { setItem($0, forKey: $0.userID) }
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
func item(forKey key: String) -> Bandyer.UserDetails? {
|
|
26
|
+
lock.sync {
|
|
27
|
+
items[key]
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
func purge() {
|
|
32
|
+
lock.sync {
|
|
33
|
+
items.removeAll()
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// Copyright © 2018-2023 Kaleyra S.p.a. All Rights Reserved.
|
|
2
|
+
// See LICENSE for licensing information
|
|
3
|
+
|
|
4
|
+
import Foundation
|
|
5
|
+
|
|
6
|
+
@available(iOS 12.0, *)
|
|
7
|
+
class FormatterProxy: Formatter {
|
|
8
|
+
|
|
9
|
+
private static let defaultFormatter = UserDetailsFormatter(format: "${useralias}")
|
|
10
|
+
|
|
11
|
+
private let lock: Lock = NSRecursiveLock()
|
|
12
|
+
private var _formatter: Formatter
|
|
13
|
+
|
|
14
|
+
var formatter: Formatter! {
|
|
15
|
+
get {
|
|
16
|
+
lock.sync {
|
|
17
|
+
_formatter
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
set {
|
|
22
|
+
lock.sync {
|
|
23
|
+
guard newValue != nil else {
|
|
24
|
+
_formatter = Self.defaultFormatter
|
|
25
|
+
return
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
_formatter = newValue
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
override init() {
|
|
34
|
+
_formatter = Self.defaultFormatter
|
|
35
|
+
super.init()
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
required init?(coder: NSCoder) {
|
|
39
|
+
_formatter = Self.defaultFormatter
|
|
40
|
+
super.init(coder: coder)
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
override func string(for obj: Any?) -> String? {
|
|
44
|
+
formatter.string(for: obj)
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
// Copyright © 2018-2023 Kaleyra S.p.a. All Rights Reserved.
|
|
2
|
+
// See LICENSE for licensing information
|
|
3
|
+
|
|
4
|
+
import Foundation
|
|
5
|
+
import Bandyer
|
|
6
|
+
|
|
7
|
+
@available(iOS 12.0, *)
|
|
8
|
+
class UserDetailsFormatter: Formatter {
|
|
9
|
+
|
|
10
|
+
let format: NSString
|
|
11
|
+
private let tokensMap: [String : String]
|
|
12
|
+
|
|
13
|
+
init(format: String) {
|
|
14
|
+
self.format = format as NSString
|
|
15
|
+
self.tokensMap = [
|
|
16
|
+
"${useralias}" : "userID",
|
|
17
|
+
"${userid}" : "userID",
|
|
18
|
+
"${firstname}" : "firstname",
|
|
19
|
+
"${lastname}" : "lastname",
|
|
20
|
+
"${nickname}" : "nickname",
|
|
21
|
+
"${email}" : "email"
|
|
22
|
+
]
|
|
23
|
+
super.init()
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
required init?(coder: NSCoder) {
|
|
27
|
+
fatalError("init(coder:) has not been implemented")
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// MARK: - Formatting
|
|
31
|
+
|
|
32
|
+
override func string(for obj: Any?) -> String? {
|
|
33
|
+
if let items = obj as? [Bandyer.UserDetails] {
|
|
34
|
+
return stringForItem(items)
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
if let item = obj as? Bandyer.UserDetails {
|
|
38
|
+
return stringForItem(item)
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return nil
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
private func stringForItem(_ items: [Bandyer.UserDetails]) -> String {
|
|
45
|
+
items.map(stringForItem(_:)).joined(separator: ", ")
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
private func stringForItem(_ item: Bandyer.UserDetails) -> String {
|
|
49
|
+
do {
|
|
50
|
+
let tokens = try matchingTokensInFormat()
|
|
51
|
+
let string = tokens.reduce(format) { result, token in
|
|
52
|
+
guard let propertyName = tokensMap[token.lowercased()] else { return result }
|
|
53
|
+
guard let propertyValue = item.value(forKey: propertyName) as? String else { return result.replacingOccurrences(of: token, with: "") as NSString }
|
|
54
|
+
return result.replacingOccurrences(of: token, with: propertyValue) as NSString
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
let trimmed = string.trimmingCharacters(in: .whitespaces)
|
|
58
|
+
guard !trimmed.isEmpty else { return item.userID }
|
|
59
|
+
return trimmed
|
|
60
|
+
} catch {
|
|
61
|
+
return item.userID
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
private func matchingTokensInFormat() throws -> [String] {
|
|
66
|
+
let pattern = "\\$\\{([\\w]+)\\}"
|
|
67
|
+
let regexp = try NSRegularExpression(pattern: pattern, options: .caseInsensitive)
|
|
68
|
+
let matches = regexp.matches(in: format as String, range: .init(location: 0, length: format.length))
|
|
69
|
+
|
|
70
|
+
return matches.compactMap { match in
|
|
71
|
+
guard match.range.location != NSNotFound else { return nil }
|
|
72
|
+
return format.substring(with: match.range)
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
private func tokenReplacements(tokens: [String], item: Bandyer.UserDetails) -> [(String, String)] {
|
|
77
|
+
tokens.map { token in
|
|
78
|
+
guard let propertyName = tokensMap[token] else { return (token, "") }
|
|
79
|
+
guard let propertyValue = item.value(forKey: propertyName) as? String else { return (token, "") }
|
|
80
|
+
return (token, propertyValue)
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// Copyright © 2018-2023 Kaleyra S.p.a. All Rights Reserved.
|
|
2
|
+
// See LICENSE for licensing information
|
|
3
|
+
|
|
4
|
+
import Foundation
|
|
5
|
+
import CallKit
|
|
6
|
+
import Bandyer
|
|
7
|
+
|
|
8
|
+
@available(iOS 12.0, *)
|
|
9
|
+
class UsersDetailsProvider: NSObject, UserDetailsProvider {
|
|
10
|
+
|
|
11
|
+
private let cache: UsersDetailsCache
|
|
12
|
+
private let formatter: Formatter
|
|
13
|
+
|
|
14
|
+
init(cache: UsersDetailsCache, formatter: Formatter) {
|
|
15
|
+
self.cache = cache
|
|
16
|
+
self.formatter = formatter
|
|
17
|
+
super.init()
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
func provideDetails(_ userIds: [String], completion: @escaping ([Bandyer.UserDetails]) -> Void) {
|
|
21
|
+
completion(detailsFor(userIds: userIds))
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
func provideHandle(_ userIds: [String], completion: @escaping (CXHandle) -> Void) {
|
|
25
|
+
completion(handleFor(userIds: userIds))
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
private func detailsFor(userIds: [String]) -> [Bandyer.UserDetails] {
|
|
29
|
+
userIds.map { id in
|
|
30
|
+
cache.item(forKey: id) ?? .init(userID: id)
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
private func handleFor(userIds: [String]) -> CXHandle {
|
|
35
|
+
guard !userIds.isEmpty else { return .init(type: .generic, value: "Unknown") }
|
|
36
|
+
let details = detailsFor(userIds: userIds)
|
|
37
|
+
return .init(type: .generic, value: formatter.string(for: details) ?? "Unknown" )
|
|
38
|
+
}
|
|
39
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@kaleyra/video-react-native-module",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Kaleyra Video module for react native.",
|
|
5
|
+
"main": "lib/commonjs/index.js",
|
|
6
|
+
"module": "lib/module/index.js",
|
|
7
|
+
"types": "lib/typescript/index.d.ts",
|
|
8
|
+
"react-native": "index.ts",
|
|
9
|
+
"source": "index.ts",
|
|
10
|
+
"files": [
|
|
11
|
+
"src",
|
|
12
|
+
"lib",
|
|
13
|
+
"index.ts",
|
|
14
|
+
"android",
|
|
15
|
+
"ios",
|
|
16
|
+
"cpp",
|
|
17
|
+
"*.podspec",
|
|
18
|
+
"native-bridge",
|
|
19
|
+
"!lib/typescript/example",
|
|
20
|
+
"!ios/build",
|
|
21
|
+
"!native-bridge/iOS/Tests",
|
|
22
|
+
"!android/build",
|
|
23
|
+
"!native-bridge/android/src/test",
|
|
24
|
+
"!android/gradle",
|
|
25
|
+
"!android/gradlew",
|
|
26
|
+
"!android/gradlew.bat",
|
|
27
|
+
"!android/local.properties",
|
|
28
|
+
"!**/__tests__",
|
|
29
|
+
"!**/__fixtures__",
|
|
30
|
+
"!**/__mocks__",
|
|
31
|
+
"!**/.*"
|
|
32
|
+
],
|
|
33
|
+
"scripts": {
|
|
34
|
+
"test": "jest",
|
|
35
|
+
"typecheck": "tsc --noEmit",
|
|
36
|
+
"lint": "eslint \"**/*.{js,ts,tsx}\"",
|
|
37
|
+
"prepack": "yarn buildJs && rm -rf ./lib && tsc --build ./tsconfig.cjs.json ./tsconfig.esm.json ./tsconfig.types.json",
|
|
38
|
+
"example": "yarn --cwd example",
|
|
39
|
+
"bootstrap": "yarn example && yarn install && yarn example pods",
|
|
40
|
+
"clean": "del-cli android/build example/android/build example/android/app/build example/ios/build",
|
|
41
|
+
"genAndroidSources": "quicktype --src-lang typescript --framework kotlinx --package com.kaleyra.video_hybrid_native_bridge.events --src native-bridge/TypeScript/Events.ts -o native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/events/Events.kt",
|
|
42
|
+
"genAndroidDtos": "quicktype --src-lang typescript --framework just-types --package com.kaleyra.video_hybrid_native_bridge --src native-bridge/TypeScript/types/*.ts -o native-bridge/android/src/main/java/com/kaleyra/video_hybrid_native_bridge/DTOs.kt",
|
|
43
|
+
"genIosEvents": "quicktype --src-lang typescript -l swift --just-types --density dense --swift-5-support --src native-bridge/TypeScript/Events.ts -o native-bridge/iOS/Source/Events/Events.swift",
|
|
44
|
+
"genIosDtos": "quicktype --src-lang typescript -l swift --just-types --density dense --swift-5-support --src native-bridge/TypeScript/types/*.ts -o native-bridge/iOS/Source/DTOs/DTOs.swift",
|
|
45
|
+
"genSources": "npm run genAndroidSources && npm run genIosEvents && npm run genIosDtos",
|
|
46
|
+
"buildJs": "npm run lint && npm run genSources",
|
|
47
|
+
"doc": "typedoc",
|
|
48
|
+
"openDoc": "open ./docs/index.html",
|
|
49
|
+
"version": "npm run doc && python3 update_plugin_version.py && npm run buildJs && git add . ",
|
|
50
|
+
"postversion": "git push && git push --tags",
|
|
51
|
+
"major": "npm version major -m \"Updated to version %s\"",
|
|
52
|
+
"minor": "npm version minor -m \"Updated to version %s\"",
|
|
53
|
+
"patch": "npm version patch -m \"Updated to version %s\""
|
|
54
|
+
},
|
|
55
|
+
"keywords": [
|
|
56
|
+
"react-native",
|
|
57
|
+
"ios",
|
|
58
|
+
"android"
|
|
59
|
+
],
|
|
60
|
+
"repository": "https://github.com/KaleyraVideo/VideoReactNativeModule",
|
|
61
|
+
"author": "Kaleyra S.p.a (https://www.kaleyra.com/)",
|
|
62
|
+
"license": "LGPL-3.0-or-later",
|
|
63
|
+
"bugs": {
|
|
64
|
+
"url": "https://github.com/KaleyraVideo/VideoReactNativeModule/issues"
|
|
65
|
+
},
|
|
66
|
+
"homepage": "https://github.com/KaleyraVideo/VideoReactNativeModule#readme",
|
|
67
|
+
"publishConfig": {
|
|
68
|
+
"registry": "https://registry.npmjs.org/"
|
|
69
|
+
},
|
|
70
|
+
"devDependencies": {
|
|
71
|
+
"@commitlint/config-conventional": "^17.0.2",
|
|
72
|
+
"@evilmartians/lefthook": "^1.2.2",
|
|
73
|
+
"@react-native-community/eslint-config": "^3.0.2",
|
|
74
|
+
"@release-it/conventional-changelog": "^5.0.0",
|
|
75
|
+
"@types/jest": "^28.1.2",
|
|
76
|
+
"@types/react": "~17.0.21",
|
|
77
|
+
"@types/react-native": "0.70.0",
|
|
78
|
+
"@typescript-eslint/eslint-plugin": "^5.60.0",
|
|
79
|
+
"@typescript-eslint/parser": "^5.60.0",
|
|
80
|
+
"commitlint": "^17.0.2",
|
|
81
|
+
"del-cli": "^5.0.0",
|
|
82
|
+
"eslint": "^8.43.0",
|
|
83
|
+
"eslint-config-prettier": "^8.5.0",
|
|
84
|
+
"eslint-plugin-prettier": "^4.0.0",
|
|
85
|
+
"jest": "^28.1.1",
|
|
86
|
+
"pod-install": "^0.1.0",
|
|
87
|
+
"prettier": "^2.0.5",
|
|
88
|
+
"quicktype": "^16.0.43",
|
|
89
|
+
"react": "18.2.0",
|
|
90
|
+
"react-native": "0.71.9",
|
|
91
|
+
"typedoc": "^0.24.4",
|
|
92
|
+
"typescript": "^4.9.5"
|
|
93
|
+
},
|
|
94
|
+
"resolutions": {
|
|
95
|
+
"@types/react": "17.0.21"
|
|
96
|
+
},
|
|
97
|
+
"peerDependencies": {
|
|
98
|
+
"react": "*",
|
|
99
|
+
"react-native": "*"
|
|
100
|
+
},
|
|
101
|
+
"engines": {
|
|
102
|
+
"node": ">= 16.0.0"
|
|
103
|
+
},
|
|
104
|
+
"packageManager": "^yarn@1.22.15",
|
|
105
|
+
"jest": {
|
|
106
|
+
"preset": "react-native",
|
|
107
|
+
"modulePathIgnorePatterns": [
|
|
108
|
+
"<rootDir>/example/node_modules",
|
|
109
|
+
"<rootDir>/lib/"
|
|
110
|
+
]
|
|
111
|
+
},
|
|
112
|
+
"commitlint": {
|
|
113
|
+
"extends": [
|
|
114
|
+
"@commitlint/config-conventional"
|
|
115
|
+
]
|
|
116
|
+
},
|
|
117
|
+
"eslintConfig": {
|
|
118
|
+
"root": true,
|
|
119
|
+
"extends": [
|
|
120
|
+
"@react-native-community",
|
|
121
|
+
"prettier"
|
|
122
|
+
],
|
|
123
|
+
"rules": {
|
|
124
|
+
"prettier/prettier": [
|
|
125
|
+
"error",
|
|
126
|
+
{
|
|
127
|
+
"quoteProps": "consistent",
|
|
128
|
+
"singleQuote": true,
|
|
129
|
+
"tabWidth": 2,
|
|
130
|
+
"trailingComma": "es5",
|
|
131
|
+
"useTabs": false
|
|
132
|
+
}
|
|
133
|
+
]
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
"eslintIgnore": [
|
|
137
|
+
"node_modules/",
|
|
138
|
+
"lib/"
|
|
139
|
+
],
|
|
140
|
+
"prettier": {
|
|
141
|
+
"quoteProps": "consistent",
|
|
142
|
+
"singleQuote": true,
|
|
143
|
+
"tabWidth": 2,
|
|
144
|
+
"trailingComma": "es5",
|
|
145
|
+
"useTabs": false
|
|
146
|
+
}
|
|
147
|
+
}
|