react-native-firework-sdk 1.0.4 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (186) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +2 -40
  3. package/android/build.gradle +6 -3
  4. package/android/gradle.properties +2 -1
  5. package/android/proguard-rules.pro +22 -0
  6. package/android/publish.gradle +4 -3
  7. package/android/settings.gradle +1 -0
  8. package/android/src/main/AndroidManifest.xml +5 -2
  9. package/android/src/main/java/com/fireworksdk/bridge/components/videofeed/FWVideoFeed.kt +226 -0
  10. package/android/src/main/java/com/{reactnativefireworksdk → fireworksdk/bridge}/constants/FWCommandConstant.kt +1 -1
  11. package/android/src/main/java/com/{reactnativefireworksdk → fireworksdk/bridge}/constants/FWVideoPlayerConstant.kt +13 -1
  12. package/android/src/main/java/com/fireworksdk/bridge/models/FWAdBadgeConfigModel.kt +9 -0
  13. package/android/src/main/java/com/{reactnativefireworksdk → fireworksdk/bridge}/models/FWEventName.kt +10 -1
  14. package/android/src/main/java/com/fireworksdk/bridge/models/FWLiveStreamEventDetailsModel.kt +9 -0
  15. package/android/src/main/java/com/fireworksdk/bridge/models/FWLiveStreamMessageDetailsModel.kt +11 -0
  16. package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoFeedConfigModel.kt +28 -0
  17. package/android/src/main/java/com/{reactnativefireworksdk → fireworksdk/bridge}/models/FWVideoFeedItemDetailsModel.kt +2 -1
  18. package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoFeedModel.kt +7 -0
  19. package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoFeedPropsModel.kt +18 -0
  20. package/android/src/main/java/com/{reactnativefireworksdk → fireworksdk/bridge}/models/FWVideoFeedSource.kt +2 -1
  21. package/android/src/main/java/com/{reactnativefireworksdk → fireworksdk/bridge}/models/FWVideoFeedTitlePosition.kt +1 -1
  22. package/android/src/main/java/com/{reactnativefireworksdk → fireworksdk/bridge}/models/FWVideoPlaybackDetails.kt +1 -1
  23. package/android/src/main/java/com/fireworksdk/bridge/models/FWVideoPlayerConfigModel.kt +23 -0
  24. package/android/src/main/java/com/{reactnativefireworksdk → fireworksdk/bridge}/models/FWVideoShoppingProduct.kt +1 -1
  25. package/android/src/main/java/com/fireworksdk/bridge/models/WeakProperty.kt +19 -0
  26. package/android/src/main/java/com/{reactnativefireworksdk → fireworksdk/bridge/reactnative}/FireworkSDKPackage.kt +10 -5
  27. package/android/src/main/java/com/fireworksdk/bridge/reactnative/manager/FWVideoFeedManager.kt +175 -0
  28. package/android/src/main/java/com/fireworksdk/bridge/reactnative/models/FWLiveStreamInterface.kt +5 -0
  29. package/android/src/main/java/com/{reactnativefireworksdk → fireworksdk/bridge/reactnative}/models/FWVideoShoppingInterface.kt +3 -2
  30. package/android/src/main/java/com/{reactnativefireworksdk → fireworksdk/bridge/reactnative}/models/FireworkSDKInterface.kt +4 -2
  31. package/android/src/main/java/com/fireworksdk/bridge/reactnative/module/FWLiveStreamModule.kt +88 -0
  32. package/android/src/main/java/com/{reactnativefireworksdk → fireworksdk/bridge/reactnative}/module/FWVideoShoppingModule.kt +53 -39
  33. package/android/src/main/java/com/{reactnativefireworksdk → fireworksdk/bridge/reactnative}/module/FireworkSDKModule.kt +23 -22
  34. package/android/src/main/java/com/{reactnativefireworksdk → fireworksdk/bridge/reactnative}/pages/FWVideoShoppingCartActivity.kt +4 -4
  35. package/android/src/main/java/com/{reactnativefireworksdk → fireworksdk/bridge/reactnative}/utils/FWEventUtils.kt +61 -7
  36. package/android/src/main/java/com/{reactnativefireworksdk → fireworksdk/bridge}/utils/FWJsonUtils.kt +29 -1
  37. package/android/src/main/java/com/{reactnativefireworksdk → fireworksdk/bridge}/utils/FWLogUtils.kt +2 -2
  38. package/android/src/main/java/com/{reactnativefireworksdk → fireworksdk/bridge}/utils/FWUrlUtils.kt +1 -1
  39. package/android/src/main/java/com/fireworksdk/bridge/utils/FWVideoPlayerUtils.kt +94 -0
  40. package/android/src/main/res/layout/fw_bridge_fragment_playlistfeed.xml +18 -0
  41. package/android/src/main/res/layout/{fwrn_fragment_shoppingcart.xml → fw_bridge_fragment_shoppingcart.xml} +1 -1
  42. package/android/src/main/res/layout/{fwrn_fragment_videofeed.xml → fw_bridge_fragment_videofeed.xml} +2 -1
  43. package/android/src/main/res/values/colors.xml +4 -0
  44. package/ios/{Component → Components}/VideoFeed.swift +60 -3
  45. package/ios/{Component → Components}/VideoFeedConfiguration.swift +2 -0
  46. package/ios/{Component → Components}/VideoFeedManager.m +2 -0
  47. package/ios/{Component → Components}/VideoFeedManager.swift +0 -0
  48. package/ios/{Component → Components}/VideoPlayerConfiguration.swift +7 -0
  49. package/ios/Models/{FireworkJsEvent.swift → NativeToRN/FireworkEventName.swift} +20 -0
  50. package/ios/Models/{FireworkSDK+JsModel.swift → NativeToRN/FireworkSDK+Json.swift} +33 -3
  51. package/ios/Models/{RCTConvert+FireworkSDKModule.swift → RNToNative/RCTConvert+FireworkSDKModule.swift} +20 -0
  52. package/ios/Models/{RCTConvert+Shopping.swift → RNToNative/RCTConvert+Shopping.swift} +15 -0
  53. package/ios/Models/{RCTConvert+VideoFeed.swift → RNToNative/RCTConvert+VideoFeed.swift} +2 -1
  54. package/ios/Modules/FireworkSDKModule/AdBadgeConfiguration.swift +18 -0
  55. package/ios/Modules/FireworkSDKModule/FireworkSDKModule+CTA.swift +1 -1
  56. package/ios/Modules/FireworkSDKModule/FireworkSDKModule+EventTracking.swift +10 -14
  57. package/ios/Modules/FireworkSDKModule/FireworkSDKModule.m +2 -1
  58. package/ios/Modules/FireworkSDKModule/FireworkSDKModule.swift +16 -4
  59. package/ios/Modules/LiveStream/LiveStreamModule.m +14 -0
  60. package/ios/Modules/LiveStream/LiveStreamModule.swift +43 -0
  61. package/ios/Modules/Shopping/ShoppingModule.m +1 -1
  62. package/ios/Modules/Shopping/ShoppingModule.swift +10 -9
  63. package/lib/commonjs/FireworkSDK.js +61 -38
  64. package/lib/commonjs/FireworkSDK.js.map +1 -1
  65. package/lib/commonjs/LiveStream.js +60 -0
  66. package/lib/commonjs/LiveStream.js.map +1 -0
  67. package/lib/commonjs/VideoShopping.js +20 -18
  68. package/lib/commonjs/VideoShopping.js.map +1 -1
  69. package/lib/commonjs/components/VideoFeed.js +47 -2
  70. package/lib/commonjs/components/VideoFeed.js.map +1 -1
  71. package/lib/commonjs/index.js +24 -0
  72. package/lib/commonjs/index.js.map +1 -1
  73. package/lib/commonjs/models/AdBadgeConfiguration.js +2 -0
  74. package/lib/commonjs/models/{ADConfig.js.map → AdBadgeConfiguration.js.map} +0 -0
  75. package/lib/commonjs/models/AdConfig.js +2 -0
  76. package/lib/{module/models/ADConfig.js.map → commonjs/models/AdConfig.js.map} +0 -0
  77. package/lib/commonjs/models/FWEventName.js +24 -0
  78. package/lib/commonjs/models/FWEventName.js.map +1 -0
  79. package/lib/commonjs/models/FWEvents.js +0 -14
  80. package/lib/commonjs/models/FWEvents.js.map +1 -1
  81. package/lib/commonjs/models/LiveStreamChatEventName.js +15 -0
  82. package/lib/commonjs/models/LiveStreamChatEventName.js.map +1 -0
  83. package/lib/commonjs/models/LiveStreamEventDetails.js +2 -0
  84. package/lib/commonjs/models/LiveStreamEventDetails.js.map +1 -0
  85. package/lib/commonjs/models/LiveStreamEventName.js +17 -0
  86. package/lib/commonjs/models/LiveStreamEventName.js.map +1 -0
  87. package/lib/commonjs/models/LiveStreamMessageDetails.js +2 -0
  88. package/lib/commonjs/models/LiveStreamMessageDetails.js.map +1 -0
  89. package/lib/commonjs/models/VideoFeedSource.js +6 -0
  90. package/lib/commonjs/models/VideoFeedSource.js.map +1 -0
  91. package/lib/commonjs/models/VideoPlaybackEventName.js.map +1 -1
  92. package/lib/commonjs/modules/FireworkSDKModule.js +3 -1
  93. package/lib/commonjs/modules/FireworkSDKModule.js.map +1 -1
  94. package/lib/commonjs/modules/LiveStreamModule.js +22 -0
  95. package/lib/commonjs/modules/LiveStreamModule.js.map +1 -0
  96. package/lib/commonjs/modules/ShoppingModule.js +3 -1
  97. package/lib/commonjs/modules/ShoppingModule.js.map +1 -1
  98. package/lib/module/FireworkSDK.js +50 -34
  99. package/lib/module/FireworkSDK.js.map +1 -1
  100. package/lib/module/LiveStream.js +51 -0
  101. package/lib/module/LiveStream.js.map +1 -0
  102. package/lib/module/VideoShopping.js +14 -13
  103. package/lib/module/VideoShopping.js.map +1 -1
  104. package/lib/module/components/VideoFeed.js +42 -3
  105. package/lib/module/components/VideoFeed.js.map +1 -1
  106. package/lib/module/index.js +4 -1
  107. package/lib/module/index.js.map +1 -1
  108. package/lib/module/models/AdBadgeConfiguration.js +2 -0
  109. package/lib/module/models/AdBadgeConfiguration.js.map +1 -0
  110. package/lib/module/models/AdConfig.js +2 -0
  111. package/lib/module/models/AdConfig.js.map +1 -0
  112. package/lib/module/models/FWEventName.js +17 -0
  113. package/lib/module/models/FWEventName.js.map +1 -0
  114. package/lib/module/models/FWEvents.js +1 -12
  115. package/lib/module/models/FWEvents.js.map +1 -1
  116. package/lib/module/models/LiveStreamChatEventName.js +8 -0
  117. package/lib/module/models/LiveStreamChatEventName.js.map +1 -0
  118. package/lib/module/models/LiveStreamEventDetails.js +2 -0
  119. package/lib/module/models/LiveStreamEventDetails.js.map +1 -0
  120. package/lib/module/models/LiveStreamEventName.js +10 -0
  121. package/lib/module/models/LiveStreamEventName.js.map +1 -0
  122. package/lib/module/models/LiveStreamMessageDetails.js +2 -0
  123. package/lib/module/models/LiveStreamMessageDetails.js.map +1 -0
  124. package/lib/module/models/VideoFeedSource.js +2 -0
  125. package/lib/module/models/VideoFeedSource.js.map +1 -0
  126. package/lib/module/models/VideoPlaybackEventName.js.map +1 -1
  127. package/lib/module/modules/FireworkSDKModule.js +3 -0
  128. package/lib/module/modules/FireworkSDKModule.js.map +1 -1
  129. package/lib/module/modules/LiveStreamModule.js +12 -0
  130. package/lib/module/modules/LiveStreamModule.js.map +1 -0
  131. package/lib/module/modules/ShoppingModule.js +3 -1
  132. package/lib/module/modules/ShoppingModule.js.map +1 -1
  133. package/lib/typescript/FireworkSDK.d.ts +26 -24
  134. package/lib/typescript/LiveStream.d.ts +21 -0
  135. package/lib/typescript/VideoShopping.d.ts +6 -6
  136. package/lib/typescript/components/VideoFeed.d.ts +11 -4
  137. package/lib/typescript/index.d.ts +15 -6
  138. package/lib/typescript/models/AdBadgeConfiguration.d.ts +15 -0
  139. package/lib/typescript/models/{ADConfig.d.ts → AdConfig.d.ts} +1 -1
  140. package/lib/typescript/models/FWEventName.d.ts +14 -0
  141. package/lib/typescript/models/FWEvents.d.ts +15 -12
  142. package/lib/typescript/models/FeedItemDetails.d.ts +11 -4
  143. package/lib/typescript/models/LiveStreamChatEventName.d.ts +7 -0
  144. package/lib/typescript/models/LiveStreamEventDetails.d.ts +3 -0
  145. package/lib/typescript/models/LiveStreamEventName.d.ts +15 -0
  146. package/lib/typescript/models/LiveStreamMessageDetails.d.ts +14 -0
  147. package/lib/typescript/models/VideoFeedConfiguration.d.ts +7 -3
  148. package/lib/typescript/models/VideoFeedSource.d.ts +2 -0
  149. package/lib/typescript/models/VideoPlaybackDetails.d.ts +1 -2
  150. package/lib/typescript/models/VideoPlaybackEventName.d.ts +1 -1
  151. package/lib/typescript/models/VideoPlayerConfiguration.d.ts +13 -0
  152. package/lib/typescript/modules/FireworkSDKModule.d.ts +8 -4
  153. package/lib/typescript/modules/LiveStreamModule.d.ts +8 -0
  154. package/lib/typescript/modules/ShoppingModule.d.ts +4 -2
  155. package/package.json +3 -4
  156. package/react-native-firework-sdk.podspec +3 -1
  157. package/src/FireworkSDK.ts +49 -33
  158. package/src/LiveStream.ts +51 -0
  159. package/src/VideoShopping.ts +15 -13
  160. package/src/components/VideoFeed.tsx +69 -7
  161. package/src/index.tsx +32 -15
  162. package/src/models/AdBadgeConfiguration.ts +16 -0
  163. package/src/models/{ADConfig.ts → AdConfig.ts} +1 -1
  164. package/src/models/FWEventName.ts +14 -0
  165. package/src/models/FWEvents.ts +17 -13
  166. package/src/models/FeedItemDetails.ts +12 -4
  167. package/src/models/LiveStreamChatEventName.ts +8 -0
  168. package/src/models/LiveStreamEventDetails.ts +4 -0
  169. package/src/models/LiveStreamEventName.ts +16 -0
  170. package/src/models/LiveStreamMessageDetails.ts +14 -0
  171. package/src/models/VideoFeedConfiguration.ts +7 -3
  172. package/src/models/VideoFeedSource.ts +2 -0
  173. package/src/models/VideoPlaybackDetails.ts +1 -3
  174. package/src/models/VideoPlaybackEventName.ts +1 -1
  175. package/src/models/VideoPlayerConfiguration.ts +14 -0
  176. package/src/modules/FireworkSDKModule.ts +10 -4
  177. package/src/modules/LiveStreamModule.ts +26 -0
  178. package/src/modules/ShoppingModule.ts +14 -7
  179. package/android/src/main/java/com/reactnativefireworksdk/components/videofeed/FWVideoFeed.kt +0 -124
  180. package/android/src/main/java/com/reactnativefireworksdk/manager/FWVideoFeedManager.kt +0 -88
  181. package/android/src/main/java/com/reactnativefireworksdk/models/FWVideoFeedConfigModel.kt +0 -27
  182. package/android/src/main/java/com/reactnativefireworksdk/models/FWVideoFeedMode.kt +0 -7
  183. package/android/src/main/java/com/reactnativefireworksdk/models/FWVideoPlayerConfigModel.kt +0 -20
  184. package/android/src/main/java/com/reactnativefireworksdk/utils/FWVideoPlayerUtils.kt +0 -18
  185. package/lib/commonjs/models/ADConfig.js +0 -2
  186. package/lib/module/models/ADConfig.js +0 -2
@@ -1,13 +1,2 @@
1
- export let FWEventName;
2
-
3
- (function (FWEventName) {
4
- FWEventName["SDKInit"] = "fw:sdk-init";
5
- FWEventName["CustomCTAClick"] = "fw:custom-cta-click";
6
- FWEventName["VideoPlayback"] = "fw:video-playback";
7
- FWEventName["VideoFeedClick"] = "fw:video-feed-click";
8
- FWEventName["AddToCart"] = "fw:shopping:add-to-cart";
9
- FWEventName["ClickCartIcon"] = "fw:shopping:click-cart-icon";
10
- FWEventName["UpdateProductDetails"] = "fw:shopping:update-product-details";
11
- FWEventName["WillDisplayProduct"] = "fw:shopping:will-display-product";
12
- })(FWEventName || (FWEventName = {}));
1
+ export {};
13
2
  //# sourceMappingURL=FWEvents.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["FWEvents.ts"],"names":["FWEventName"],"mappings":"AAKA,WAAYA,WAAZ;;WAAYA,W;AAAAA,EAAAA,W;AAAAA,EAAAA,W;AAAAA,EAAAA,W;AAAAA,EAAAA,W;AAAAA,EAAAA,W;AAAAA,EAAAA,W;AAAAA,EAAAA,W;AAAAA,EAAAA,W;GAAAA,W,KAAAA,W","sourcesContent":["import type VideoPlaybackDetails from './VideoPlaybackDetails';\nimport type FWError from './FWError';\nimport type VideoPlaybackEventName from './VideoPlaybackEventName';\nimport type FeedItemDetails from './FeedItemDetails';\n\nexport enum FWEventName {\n SDKInit = 'fw:sdk-init',\n CustomCTAClick = 'fw:custom-cta-click',\n VideoPlayback = 'fw:video-playback',\n VideoFeedClick = 'fw:video-feed-click',\n AddToCart = 'fw:shopping:add-to-cart',\n ClickCartIcon = 'fw:shopping:click-cart-icon',\n UpdateProductDetails = 'fw:shopping:update-product-details',\n WillDisplayProduct = 'fw:shopping:will-display-product',\n}\n\nexport interface SDKInitEvent {\n /**\n * If error equals undefined/null, it means the initialization is successful.\n */\n error?: FWError | null;\n}\n\nexport interface CustomCTAClickEvent {\n /**\n * Action URL that is associated with this CTA\n */\n url: string;\n}\n\nexport interface VideoPlaybackEvent {\n eventName: VideoPlaybackEventName;\n info: VideoPlaybackDetails;\n}\n\nexport interface VideoFeedClickEvent {\n info: FeedItemDetails;\n}\n\nexport interface AddToCartEvent {\n /**\n * A unique identifier of the product.\n */\n productId: string;\n /**\n * A unique identifier of the product unit.\n */\n unitId: string;\n}\n\nexport interface UpdateProductDetailsEvent {\n /**\n * A unique identifier of the product.\n */\n productId: string;\n}\n\nexport interface WillDisplayProductEvent {\n /**\n * A unique identifier of the video.\n */\n videoId: string;\n}"]}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
@@ -0,0 +1,8 @@
1
+ var LiveStreamChatEventName;
2
+
3
+ (function (LiveStreamChatEventName) {
4
+ LiveStreamChatEventName["userSendChat"] = "fw:livestream:user-send-chat";
5
+ })(LiveStreamChatEventName || (LiveStreamChatEventName = {}));
6
+
7
+ export default LiveStreamChatEventName;
8
+ //# sourceMappingURL=LiveStreamChatEventName.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["LiveStreamChatEventName.ts"],"names":["LiveStreamChatEventName"],"mappings":"IAAKA,uB;;WAAAA,uB;AAAAA,EAAAA,uB;GAAAA,uB,KAAAA,uB;;AAOL,eAAeA,uBAAf","sourcesContent":["enum LiveStreamChatEventName {\n /**\n * Called when a user sends messages to an active live stream.\n */\n userSendChat = 'fw:livestream:user-send-chat',\n}\n\nexport default LiveStreamChatEventName;\n"]}
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=LiveStreamEventDetails.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
@@ -0,0 +1,10 @@
1
+ var LiveStreamEventName;
2
+
3
+ (function (LiveStreamEventName) {
4
+ LiveStreamEventName["userDidjoin"] = "fw:livestream:user-join";
5
+ LiveStreamEventName["userDidLeave"] = "fw:livestream:user-leave";
6
+ LiveStreamEventName["userSendLike"] = "fw:livestream:user-send-like";
7
+ })(LiveStreamEventName || (LiveStreamEventName = {}));
8
+
9
+ export default LiveStreamEventName;
10
+ //# sourceMappingURL=LiveStreamEventName.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["LiveStreamEventName.ts"],"names":["LiveStreamEventName"],"mappings":"IAAKA,mB;;WAAAA,mB;AAAAA,EAAAA,mB;AAAAA,EAAAA,mB;AAAAA,EAAAA,mB;GAAAA,mB,KAAAA,mB;;AAeL,eAAeA,mBAAf","sourcesContent":["enum LiveStreamEventName {\n /**\n * Called when a user joins an active live stream.\n */\n userDidjoin = 'fw:livestream:user-join',\n /**\n * Called when the user leaves an active live stream.\n */\n userDidLeave = 'fw:livestream:user-leave',\n /**\n * Called when a user sends a like to an active live stream.\n */\n userSendLike = 'fw:livestream:user-send-like',\n}\n\nexport default LiveStreamEventName;\n"]}
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=LiveStreamMessageDetails.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=VideoFeedSource.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
@@ -1 +1 @@
1
- {"version":3,"sources":["VideoPlaybackEventName.ts"],"names":["VideoPlaybackEventName"],"mappings":"IAAKA,sB;;WAAAA,sB;AAAAA,EAAAA,sB;AAAAA,EAAAA,sB;AAAAA,EAAAA,sB;AAAAA,EAAAA,sB;AAAAA,EAAAA,sB;AAAAA,EAAAA,sB;AAAAA,EAAAA,sB;AAAAA,EAAAA,sB;AAAAA,EAAAA,sB;GAAAA,sB,KAAAA,sB;;AAuCL,eAAeA,sBAAf","sourcesContent":["enum VideoPlaybackEventName {\n /**\n * When video is shown to the user.\n */\n Impression = 'fw:video:impression',\n /**\n * Video started.\n */\n Start = 'fw:video:start',\n /**\n * Video reached 25%.\n */\n FirstQuartile = 'fw:video:first-quartile',\n /**\n * Video reached 50%.\n */\n Midpoint = 'fw:video:midpoint',\n /**\n * Video reached 75%.\n */\n ThirdQuartile = 'fw:video:third-quartile',\n /**\n * Video reached 100%.\n */\n Complete = 'fw:video:complete',\n /**\n * When ad video finishes playing\n */\n AdEnd = 'fw:video:ad-end',\n /**\n * When a visitor clicks on CTA button (if available).\n */\n ClickCTA = 'fw:video:click-cta',\n /**\n * When user clicks on \"Share\" button.\n */\n ClickShare = 'fw:video:click-share',\n}\n\nexport default VideoPlaybackEventName;\n"]}
1
+ {"version":3,"sources":["VideoPlaybackEventName.ts"],"names":["VideoPlaybackEventName"],"mappings":"IAAKA,sB;;WAAAA,sB;AAAAA,EAAAA,sB;AAAAA,EAAAA,sB;AAAAA,EAAAA,sB;AAAAA,EAAAA,sB;AAAAA,EAAAA,sB;AAAAA,EAAAA,sB;AAAAA,EAAAA,sB;AAAAA,EAAAA,sB;AAAAA,EAAAA,sB;GAAAA,sB,KAAAA,sB;;AAuCL,eAAeA,sBAAf","sourcesContent":["enum VideoPlaybackEventName {\n /**\n * When video is shown to the user.\n */\n Impression = 'fw:video:impression',\n /**\n * Video started.\n */\n Start = 'fw:video:start',\n /**\n * Video reached 25%.\n */\n FirstQuartile = 'fw:video:first-quartile',\n /**\n * Video reached 50%.\n */\n Midpoint = 'fw:video:midpoint',\n /**\n * Video reached 75%.\n */\n ThirdQuartile = 'fw:video:third-quartile',\n /**\n * Video reached 100%.\n */\n Complete = 'fw:video:complete',\n /**\n * When ad video finishes playing.\n */\n AdEnd = 'fw:video:ad-end',\n /**\n * When a visitor clicks on CTA button (if available).\n */\n ClickCTA = 'fw:video:click-cta',\n /**\n * When user clicks on \"Share\" button.\n */\n ClickShare = 'fw:video:click-share',\n}\n\nexport default VideoPlaybackEventName;\n"]}
@@ -1,3 +1,4 @@
1
+ import { NativeEventEmitter } from 'react-native';
1
2
  import { NativeModules } from 'react-native';
2
3
  import { LINKING_ERROR } from '../constants/FWErrorMessage';
3
4
  const FireworkSDKModule = NativeModules.FireworkSDK ? NativeModules.FireworkSDK : new Proxy({}, {
@@ -6,5 +7,7 @@ const FireworkSDKModule = NativeModules.FireworkSDK ? NativeModules.FireworkSDK
6
7
  }
7
8
 
8
9
  });
10
+ const FireworkSDKModuleEventEmitter = new NativeEventEmitter(FireworkSDKModule);
11
+ export { FireworkSDKModuleEventEmitter };
9
12
  export default FireworkSDKModule;
10
13
  //# sourceMappingURL=FireworkSDKModule.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["FireworkSDKModule.ts"],"names":["NativeModules","LINKING_ERROR","FireworkSDKModule","FireworkSDK","Proxy","get","Error"],"mappings":"AACA,SAASA,aAAT,QAA8B,cAA9B;AAEA,SAASC,aAAT,QAA8B,6BAA9B;AAIA,MAAMC,iBAAiB,GAAGF,aAAa,CAACG,WAAd,GACtBH,aAAa,CAACG,WADQ,GAEtB,IAAIC,KAAJ,CACE,EADF,EAEE;AACEC,EAAAA,GAAG,GAAG;AACJ,UAAM,IAAIC,KAAJ,CAAUL,aAAV,CAAN;AACD;;AAHH,CAFF,CAFJ;AAmBA,eAAeC,iBAAf","sourcesContent":["import type { NativeModule } from 'react-native';\nimport { NativeModules } from 'react-native';\n\nimport { LINKING_ERROR } from '../constants/FWErrorMessage';\nimport type ADConfig from '../models/ADConfig';\nimport type VideoPlayerConfiguration from '../models/VideoPlayerConfiguration';\n\nconst FireworkSDKModule = NativeModules.FireworkSDK\n ? NativeModules.FireworkSDK\n : new Proxy(\n {},\n {\n get() {\n throw new Error(LINKING_ERROR);\n },\n }\n );\n\ninterface IFireworkSDKModule extends NativeModule {\n init(userId?: string, adConfig?: ADConfig): void;\n openVideoPlayer(url: string, config?: VideoPlayerConfiguration): void;\n setCustomCTAClickEnabled(enabled: boolean): void;\n setShareBaseURL(url?: string): void;\n setVideoPlaybackEventEnabled(enabled: boolean): void;\n}\n\nexport default FireworkSDKModule as IFireworkSDKModule;\n"]}
1
+ {"version":3,"sources":["FireworkSDKModule.ts"],"names":["NativeEventEmitter","NativeModules","LINKING_ERROR","FireworkSDKModule","FireworkSDK","Proxy","get","Error","FireworkSDKModuleEventEmitter"],"mappings":"AAAA,SAASA,kBAAT,QAAiD,cAAjD;AACA,SAASC,aAAT,QAA8B,cAA9B;AAGA,SAASC,aAAT,QAA8B,6BAA9B;AAIA,MAAMC,iBAAiB,GAAGF,aAAa,CAACG,WAAd,GACtBH,aAAa,CAACG,WADQ,GAEtB,IAAIC,KAAJ,CACE,EADF,EAEE;AACEC,EAAAA,GAAG,GAAG;AACJ,UAAM,IAAIC,KAAJ,CAAUL,aAAV,CAAN;AACD;;AAHH,CAFF,CAFJ;AAoBA,MAAMM,6BAA6B,GAAG,IAAIR,kBAAJ,CAAuBG,iBAAvB,CAAtC;AACA,SACEK,6BADF;AAGA,eAAeL,iBAAf","sourcesContent":["import { NativeEventEmitter, NativeModule } from 'react-native';\nimport { NativeModules } from 'react-native';\nimport type AdBadgeConfiguration from 'src/models/AdBadgeConfiguration';\n\nimport { LINKING_ERROR } from '../constants/FWErrorMessage';\nimport type AdConfig from '../models/AdConfig';\nimport type VideoPlayerConfiguration from '../models/VideoPlayerConfiguration';\n\nconst FireworkSDKModule = NativeModules.FireworkSDK\n ? NativeModules.FireworkSDK\n : new Proxy(\n {},\n {\n get() {\n throw new Error(LINKING_ERROR);\n },\n }\n );\n\ninterface IFireworkSDKModule extends NativeModule {\n init(userId?: string, adConfig?: AdConfig): void;\n openVideoPlayer(url: string, config?: VideoPlayerConfiguration): void;\n setCustomCTAClickEnabled(enabled: boolean): void;\n setShareBaseURL(url?: string): Promise<any>;\n setVideoPlaybackEventEnabled(enabled: boolean): void;\n setAdBadgeConfiguration(config?: AdBadgeConfiguration): Promise<any>;\n}\n\nconst FireworkSDKModuleEventEmitter = new NativeEventEmitter(FireworkSDKModule);\nexport {\n FireworkSDKModuleEventEmitter,\n}\nexport default FireworkSDKModule as IFireworkSDKModule;\n"]}
@@ -0,0 +1,12 @@
1
+ import { NativeEventEmitter, NativeModules } from 'react-native';
2
+ import { LINKING_ERROR } from '../constants/FWErrorMessage';
3
+ const LiveStreamModule = NativeModules.LiveStreamModule ? NativeModules.LiveStreamModule : new Proxy({}, {
4
+ get() {
5
+ throw new Error(LINKING_ERROR);
6
+ }
7
+
8
+ });
9
+ const LiveStreamModuleEventEmitter = new NativeEventEmitter(LiveStreamModule);
10
+ export { LiveStreamModuleEventEmitter };
11
+ export default LiveStreamModule;
12
+ //# sourceMappingURL=LiveStreamModule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["LiveStreamModule.ts"],"names":["NativeEventEmitter","NativeModules","LINKING_ERROR","LiveStreamModule","Proxy","get","Error","LiveStreamModuleEventEmitter"],"mappings":"AAAA,SACEA,kBADF,EAGEC,aAHF,QAIO,cAJP;AAMA,SAASC,aAAT,QAA8B,6BAA9B;AAEA,MAAMC,gBAAgB,GAAGF,aAAa,CAACE,gBAAd,GACrBF,aAAa,CAACE,gBADO,GAErB,IAAIC,KAAJ,CACE,EADF,EAEE;AACEC,EAAAA,GAAG,GAAG;AACJ,UAAM,IAAIC,KAAJ,CAAUJ,aAAV,CAAN;AACD;;AAHH,CAFF,CAFJ;AAcA,MAAMK,4BAA4B,GAAG,IAAIP,kBAAJ,CAAuBG,gBAAvB,CAArC;AACA,SAASI,4BAAT;AAEA,eAAeJ,gBAAf","sourcesContent":["import {\n NativeEventEmitter,\n NativeModule,\n NativeModules,\n} from 'react-native';\n\nimport { LINKING_ERROR } from '../constants/FWErrorMessage';\n\nconst LiveStreamModule = NativeModules.LiveStreamModule\n ? NativeModules.LiveStreamModule\n : new Proxy(\n {},\n {\n get() {\n throw new Error(LINKING_ERROR);\n },\n }\n );\n\ninterface ILiveStreamModule extends NativeModule {\n init(): void;\n}\nconst LiveStreamModuleEventEmitter = new NativeEventEmitter(LiveStreamModule);\nexport { LiveStreamModuleEventEmitter };\n\nexport default LiveStreamModule as ILiveStreamModule;\n"]}
@@ -1,4 +1,4 @@
1
- import { NativeModules } from 'react-native';
1
+ import { NativeEventEmitter, NativeModules } from 'react-native';
2
2
  import { LINKING_ERROR } from '../constants/FWErrorMessage';
3
3
  const ShoppingModule = NativeModules.ShoppingModule ? NativeModules.ShoppingModule : new Proxy({}, {
4
4
  get() {
@@ -6,5 +6,7 @@ const ShoppingModule = NativeModules.ShoppingModule ? NativeModules.ShoppingModu
6
6
  }
7
7
 
8
8
  });
9
+ const ShoppingModuleEventEmitter = new NativeEventEmitter(ShoppingModule);
10
+ export { ShoppingModuleEventEmitter };
9
11
  export default ShoppingModule;
10
12
  //# sourceMappingURL=ShoppingModule.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["ShoppingModule.ts"],"names":["NativeModules","LINKING_ERROR","ShoppingModule","Proxy","get","Error"],"mappings":"AAAA,SAEEA,aAFF,QAGO,cAHP;AAMA,SAASC,aAAT,QAA8B,6BAA9B;AAEA,MAAMC,cAAc,GAAGF,aAAa,CAACE,cAAd,GACnBF,aAAa,CAACE,cADK,GAEnB,IAAIC,KAAJ,CACE,EADF,EAEE;AACEC,EAAAA,GAAG,GAAG;AACJ,UAAM,IAAIC,KAAJ,CAAUJ,aAAV,CAAN;AACD;;AAHH,CAFF,CAFJ;AAsBA,eAAeC,cAAf","sourcesContent":["import {\n NativeModule,\n NativeModules,\n} from 'react-native';\nimport type Product from '../models/Product';\nimport type ProductInfoViewConfiguration from '../models/ProductInfoViewConfiguration';\nimport { LINKING_ERROR } from '../constants/FWErrorMessage';\n\nconst ShoppingModule = NativeModules.ShoppingModule\n ? NativeModules.ShoppingModule\n : new Proxy(\n {},\n {\n get() {\n throw new Error(LINKING_ERROR);\n },\n }\n );\n\ninterface IShoppingModule extends NativeModule {\n init(): void;\n updateVideoProduct(production: Product, callbackId: number | string): void;\n updateProductViewConfig(config: ProductInfoViewConfiguration, callbackId: number | string): void;\n updateAddToCartStatus(res: string, tips: string, callbackId: number | string): void;\n jumpToCartPage(callbackId: number | string): void;\n exitCartPage(): void;\n setCartIconVisible(visible: boolean): void;\n setCartItemCount(count: number): void;\n}\n\nexport default ShoppingModule as IShoppingModule;\n"]}
1
+ {"version":3,"sources":["ShoppingModule.ts"],"names":["NativeEventEmitter","NativeModules","LINKING_ERROR","ShoppingModule","Proxy","get","Error","ShoppingModuleEventEmitter"],"mappings":"AAAA,SAASA,kBAAT,EAA2CC,aAA3C,QAAgE,cAAhE;AAGA,SAASC,aAAT,QAA8B,6BAA9B;AAEA,MAAMC,cAAc,GAAGF,aAAa,CAACE,cAAd,GACnBF,aAAa,CAACE,cADK,GAEnB,IAAIC,KAAJ,CACE,EADF,EAEE;AACEC,EAAAA,GAAG,GAAG;AACJ,UAAM,IAAIC,KAAJ,CAAUJ,aAAV,CAAN;AACD;;AAHH,CAFF,CAFJ;AA6BA,MAAMK,0BAA0B,GAAG,IAAIP,kBAAJ,CAAuBG,cAAvB,CAAnC;AACA,SAASI,0BAAT;AAEA,eAAeJ,cAAf","sourcesContent":["import { NativeEventEmitter, NativeModule, NativeModules } from 'react-native';\nimport type Product from '../models/Product';\nimport type ProductInfoViewConfiguration from '../models/ProductInfoViewConfiguration';\nimport { LINKING_ERROR } from '../constants/FWErrorMessage';\n\nconst ShoppingModule = NativeModules.ShoppingModule\n ? NativeModules.ShoppingModule\n : new Proxy(\n {},\n {\n get() {\n throw new Error(LINKING_ERROR);\n },\n }\n );\n\ninterface IShoppingModule extends NativeModule {\n init(): void;\n updateVideoProducts(products: Product[], callbackId: number | string): void;\n updateProductViewConfig(\n config: ProductInfoViewConfiguration,\n callbackId: number | string\n ): void;\n updateAddToCartStatus(\n res: string,\n tips: string,\n callbackId: number | string\n ): void;\n jumpToCartPage(callbackId: number | string): void;\n exitCartPage(): void;\n setCartIconVisible(visible: boolean): void;\n setCartItemCount(count: number): void;\n}\n\nconst ShoppingModuleEventEmitter = new NativeEventEmitter(ShoppingModule);\nexport { ShoppingModuleEventEmitter };\n\nexport default ShoppingModule as IShoppingModule;\n"]}
@@ -1,6 +1,7 @@
1
- import type ADConfig from './models/ADConfig';
2
- import type { CustomCTAClickEvent, SDKInitEvent, VideoPlaybackEvent } from './models/FWEvents';
3
- import { VideoFeedClickEvent } from './models/FWEvents';
1
+ import LiveStream from './LiveStream';
2
+ import type AdBadgeConfiguration from './models/AdBadgeConfiguration';
3
+ import type AdConfig from './models/AdConfig';
4
+ import type { CustomCTAClickEvent, SDKInitEvent, VideoFeedClickEvent, VideoPlaybackEvent } from './models/FWEvents';
4
5
  import type VideoPlayerConfiguration from './models/VideoPlayerConfiguration';
5
6
  import VideoShopping from './VideoShopping';
6
7
  export declare type SDKInitCallback = (event: SDKInitEvent) => void;
@@ -12,46 +13,47 @@ export declare type VideoFeedClickCallback = (event: VideoFeedClickEvent) => voi
12
13
  */
13
14
  declare class FireworkSDK {
14
15
  private static _instance?;
15
- private _onCustomCTAClick;
16
- private _onVideoPlayback?;
17
16
  /**
18
- * Clicking Video Feed callback
19
- */
20
- onVideoFeedClick?: VideoFeedClickCallback;
21
- private _shareBaseURL;
22
- /**
23
- * SDK initialization callback.
17
+ * The callback of SDK initialization.
24
18
  */
25
19
  onSDKInit?: SDKInitCallback;
26
20
  /**
27
- * Get Custom Clicking CTA callback.
21
+ * the callback of clicking Video Feed.
28
22
  */
29
- get onCustomCTAClick(): CustomCTAClickCallback | undefined;
23
+ onVideoFeedClick?: VideoFeedClickCallback;
30
24
  /**
31
- * Set Custom Clicking CTA callback.
25
+ * The callback of clicking custom CTA.
32
26
  */
27
+ get onCustomCTAClick(): CustomCTAClickCallback | undefined;
33
28
  set onCustomCTAClick(value: CustomCTAClickCallback | undefined);
29
+ private _onCustomCTAClick;
34
30
  /**
35
- * Get Video Playback callback.
31
+ * The callback of video playback.
36
32
  */
37
33
  get onVideoPlayback(): VideoPlaybackCallback | undefined;
38
- /**
39
- * Set Video Playback callback.
40
- */
41
34
  set onVideoPlayback(value: VideoPlaybackCallback | undefined);
35
+ private _onVideoPlayback?;
42
36
  /**
43
- * get Share Base URL
37
+ * The share base URL of videos.
44
38
  */
45
39
  get shareBaseURL(): string | undefined;
40
+ set shareBaseURL(value: string | undefined);
41
+ private _shareBaseURL;
46
42
  /**
47
- * set Share Base URL
43
+ * The configuration for ad badges.
48
44
  */
49
- set shareBaseURL(value: string | undefined);
50
- private eventEmitter;
45
+ get adBadgeConfiguration(): AdBadgeConfiguration | undefined;
46
+ set adBadgeConfiguration(value: AdBadgeConfiguration | undefined);
47
+ private _adBadgeConfiguration?;
48
+ private get eventEmitter();
51
49
  /**
52
50
  * Get VideoShopping object.
53
51
  */
54
52
  get shopping(): VideoShopping;
53
+ /**
54
+ * Get LiveStream object.
55
+ */
56
+ get liveStream(): LiveStream;
55
57
  /**
56
58
  * Get global single instance of FireworkSDK class.
57
59
  * @returns FireworkSDK
@@ -61,9 +63,9 @@ declare class FireworkSDK {
61
63
  /**
62
64
  * Initializes Firework SDK.
63
65
  * @param {string?} userId An id to uniquely identify device or user.
64
- * @param {ADConfig?} adConfig Configuration of Ad.
66
+ * @param {AdConfig?} adConfig Configuration of Ad.
65
67
  */
66
- init(userId?: string, adConfig?: ADConfig): void;
68
+ init(userId?: string, adConfig?: AdConfig): void;
67
69
  /**
68
70
  * Open Video URL.
69
71
  * @param {string} url
@@ -0,0 +1,21 @@
1
+ import type { LiveStreamChatEvent, LiveStreamEvent } from "./models/FWEvents";
2
+ export declare type onLiveStreamEventCallback = (event: LiveStreamEvent) => void;
3
+ export declare type onLiveStreamChatEventCallback = (event: LiveStreamChatEvent) => void;
4
+ /**
5
+ * The entry class of live stream.
6
+ */
7
+ declare class LiveStream {
8
+ private static _instance?;
9
+ /**
10
+ * The callback of live stream event.
11
+ */
12
+ onLiveStreamEvent?: onLiveStreamEventCallback;
13
+ /**
14
+ * The callback of live stream chat event.
15
+ */
16
+ onLiveStreamChatEvent?: onLiveStreamChatEventCallback;
17
+ private get eventEmitter();
18
+ static getInstance(): LiveStream;
19
+ private constructor();
20
+ }
21
+ export default LiveStream;
@@ -1,18 +1,17 @@
1
1
  /// <reference types="react" />
2
2
  import type AddToCartResult from './models/AddToCartResult';
3
- import { AddToCartEvent, UpdateProductDetailsEvent, WillDisplayProductEvent } from './models/FWEvents';
3
+ import type { AddToCartEvent, UpdateProductDetailsEvent, WillDisplayProductEvent } from './models/FWEvents';
4
4
  import type Product from './models/Product';
5
5
  import type ProductInfoViewConfiguration from './models/ProductInfoViewConfiguration';
6
6
  export declare type AddToCartCallback = (event: AddToCartEvent) => Promise<AddToCartResult | undefined | null>;
7
7
  export declare type ClickCartIconCallback = () => Promise<React.ReactNode | undefined | null>;
8
- export declare type UpdateProductDetailsCallback = (event: UpdateProductDetailsEvent) => Promise<Product | undefined | null>;
8
+ export declare type UpdateProductDetailsCallback = (event: UpdateProductDetailsEvent) => Promise<Product[] | undefined | null>;
9
9
  export declare type WillDisplayProductCallback = (event: WillDisplayProductEvent) => Promise<ProductInfoViewConfiguration | undefined | null>;
10
10
  /**
11
- * Entry class of Video Shopping
11
+ * The entry class of video shopping.
12
12
  */
13
13
  declare class VideoShopping {
14
14
  private static _instance?;
15
- private _cartIconVisible;
16
15
  /**
17
16
  * This callback is triggered when the user clicks the "Add to cart" button.
18
17
  *
@@ -28,7 +27,7 @@ declare class VideoShopping {
28
27
  /**
29
28
  * This callback is triggered when the video will be shown.
30
29
  *
31
- * The host app can return a Product object to update the latest product information.
30
+ * The host app can return a Product list to update the latest product information.
32
31
  */
33
32
  onUpdateProductDetails?: UpdateProductDetailsCallback;
34
33
  /**
@@ -42,8 +41,9 @@ declare class VideoShopping {
42
41
  */
43
42
  get cartIconVisible(): boolean;
44
43
  set cartIconVisible(value: boolean);
44
+ private _cartIconVisible;
45
45
  currentCartPage?: React.ReactNode;
46
- private eventEmitter;
46
+ private get eventEmitter();
47
47
  static getInstance(): VideoShopping;
48
48
  private constructor();
49
49
  /**
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
- import { StyleProp, ViewStyle } from 'react-native';
3
- import type VideoPlayerConfiguration from '../models/VideoPlayerConfiguration';
4
- import type VideoFeedConfiguration from '../models/VideoFeedConfiguration';
2
+ import { EmitterSubscription, StyleProp, ViewStyle } from 'react-native';
5
3
  import type FWError from '../models/FWError';
6
- export declare type VideoFeedSource = 'discover' | 'channel' | 'playlist';
4
+ import type VideoFeedConfiguration from '../models/VideoFeedConfiguration';
5
+ import type VideoFeedSource from '../models/VideoFeedSource';
6
+ import type VideoPlayerConfiguration from '../models/VideoPlayerConfiguration';
7
7
  export declare type VideoFeedMode = 'row' | 'column' | 'grid';
8
8
  export interface IVideoFeedProps {
9
9
  /**
@@ -22,6 +22,10 @@ export interface IVideoFeedProps {
22
22
  * Playlist Id for selected content. Please note channel name is necessary. Required when the source is set as playlist.
23
23
  */
24
24
  playlist?: string;
25
+ /**
26
+ * PlaylistGroup Id for selected content. Required when the source is set as playlistGroup.
27
+ */
28
+ playlistGroup?: string;
25
29
  /**
26
30
  * One of three available display modes. Defaults to row.
27
31
  */
@@ -44,10 +48,13 @@ export default class VideoFeed extends React.Component<IVideoFeedProps> {
44
48
  mode: string;
45
49
  };
46
50
  nativeComponentRef: React.RefObject<any>;
51
+ subscriptions: EmitterSubscription[];
47
52
  /**
48
53
  * Force refreshing the video feed.
49
54
  */
50
55
  refresh: () => void;
51
56
  private _onVideoFeedLoadFinished;
57
+ componentDidMount(): void;
58
+ componentWillUnmount(): void;
52
59
  render(): JSX.Element;
53
60
  }
@@ -1,12 +1,20 @@
1
- import type { IVideoFeedProps, VideoFeedMode, VideoFeedSource } from './components/VideoFeed';
1
+ import type { IVideoFeedProps, VideoFeedMode } from './components/VideoFeed';
2
2
  import VideoFeed from './components/VideoFeed';
3
3
  import type { CustomCTAClickCallback, SDKInitCallback, VideoFeedClickCallback, VideoPlaybackCallback } from './FireworkSDK';
4
4
  import FireworkSDK from './FireworkSDK';
5
- import type ADConfig from './models/ADConfig';
5
+ import type { onLiveStreamChatEventCallback, onLiveStreamEventCallback } from './LiveStream';
6
+ import LiveStream from './LiveStream';
7
+ import type AdBadgeConfiguration from './models/AdBadgeConfiguration';
8
+ import type { AdBadgeTextType } from './models/AdBadgeConfiguration';
9
+ import type AdConfig from './models/AdConfig';
6
10
  import type AddToCartResult from './models/AddToCartResult';
7
11
  import type FeedItemDetails from './models/FeedItemDetails';
8
12
  import type FWError from './models/FWError';
9
- import type { AddToCartEvent, CustomCTAClickEvent, SDKInitEvent, UpdateProductDetailsEvent, VideoPlaybackEvent, WillDisplayProductEvent } from './models/FWEvents';
13
+ import type { AddToCartEvent, CustomCTAClickEvent, LiveStreamChatEvent, LiveStreamEvent, SDKInitEvent, UpdateProductDetailsEvent, VideoPlaybackEvent, WillDisplayProductEvent } from './models/FWEvents';
14
+ import type LiveStreamEventDetails from './models/LiveStreamEventDetails';
15
+ import LiveStreamEventName from './models/LiveStreamEventName';
16
+ import type LiveStreamMessageDetails from './models/LiveStreamMessageDetails';
17
+ import LiveStreamChatEventName from './models/LiveStreamChatEventName';
10
18
  import type Product from './models/Product';
11
19
  import type ProductInfoViewConfiguration from './models/ProductInfoViewConfiguration';
12
20
  import type { AddToCartButtonConfiguration } from './models/ProductInfoViewConfiguration';
@@ -14,12 +22,13 @@ import type ProductUnit from './models/ProductUnit';
14
22
  import type { ProductPrice } from './models/ProductUnit';
15
23
  import type VideoFeedConfiguration from './models/VideoFeedConfiguration';
16
24
  import type { VideoFeedPlayIconConfiguration, VideoFeedTitleConfiguration, VideoFeedTitlePosition } from './models/VideoFeedConfiguration';
25
+ import type VideoFeedSource from './models/VideoFeedSource';
17
26
  import type VideoPlaybackDetails from './models/VideoPlaybackDetails';
18
- import type { VideoBadge, VideoPlayerSize } from './models/VideoPlaybackDetails';
27
+ import type { VideoPlayerSize } from './models/VideoPlaybackDetails';
19
28
  import VideoPlaybackEventName from './models/VideoPlaybackEventName';
20
29
  import type VideoPlayerConfiguration from './models/VideoPlayerConfiguration';
21
- import type { VideoPlayerCompleteAction, VideoPlayerCTAStyle, VideoPlayerStyle } from './models/VideoPlayerConfiguration';
30
+ import type { VideoLaunchBehavior, VideoPlayerCompleteAction, VideoPlayerCTAStyle, VideoPlayerStyle } from './models/VideoPlayerConfiguration';
22
31
  import type { AddToCartCallback, ClickCartIconCallback, UpdateProductDetailsCallback, WillDisplayProductCallback } from './VideoShopping';
23
32
  import VideoShopping from './VideoShopping';
24
33
  export default FireworkSDK;
25
- export { ADConfig, AddToCartButtonConfiguration, AddToCartCallback, AddToCartEvent, AddToCartResult, ClickCartIconCallback, CustomCTAClickCallback, CustomCTAClickEvent, FeedItemDetails, FWError, IVideoFeedProps, Product, ProductInfoViewConfiguration, ProductPrice, ProductUnit, SDKInitCallback, SDKInitEvent, UpdateProductDetailsCallback, UpdateProductDetailsEvent, VideoBadge, VideoFeed, VideoFeedClickCallback, VideoFeedConfiguration, VideoFeedMode, VideoFeedPlayIconConfiguration, VideoFeedSource, VideoFeedTitleConfiguration, VideoFeedTitlePosition, VideoPlaybackCallback, VideoPlaybackDetails, VideoPlaybackEvent, VideoPlaybackEventName, VideoPlayerCompleteAction, VideoPlayerConfiguration, VideoPlayerCTAStyle, VideoPlayerSize, VideoPlayerStyle, VideoShopping, WillDisplayProductCallback, WillDisplayProductEvent, };
34
+ export { AdBadgeConfiguration, AdBadgeTextType, AdConfig, AddToCartButtonConfiguration, AddToCartCallback, AddToCartEvent, AddToCartResult, ClickCartIconCallback, CustomCTAClickCallback, CustomCTAClickEvent, FeedItemDetails, FWError, IVideoFeedProps, LiveStream, LiveStreamChatEvent, LiveStreamEvent, LiveStreamEventDetails, LiveStreamEventName, LiveStreamMessageDetails, LiveStreamChatEventName, onLiveStreamChatEventCallback, onLiveStreamEventCallback, Product, ProductInfoViewConfiguration, ProductPrice, ProductUnit, SDKInitCallback, SDKInitEvent, UpdateProductDetailsCallback, UpdateProductDetailsEvent, VideoFeed, VideoFeedClickCallback, VideoFeedConfiguration, VideoFeedMode, VideoFeedPlayIconConfiguration, VideoFeedSource, VideoFeedTitleConfiguration, VideoFeedTitlePosition, VideoLaunchBehavior, VideoPlaybackCallback, VideoPlaybackDetails, VideoPlaybackEvent, VideoPlaybackEventName, VideoPlayerCompleteAction, VideoPlayerConfiguration, VideoPlayerCTAStyle, VideoPlayerSize, VideoPlayerStyle, VideoShopping, WillDisplayProductCallback, WillDisplayProductEvent, };
@@ -0,0 +1,15 @@
1
+ export declare type AdBadgeTextType = 'ad' | 'sponsored';
2
+ export default interface AdBadgeConfiguration {
3
+ /**
4
+ * The text type of the ad badge.
5
+ */
6
+ badgeTextType?: AdBadgeTextType;
7
+ /**
8
+ * The background color of the ad badge. Only supported on iOS.
9
+ */
10
+ backgroundColor?: string;
11
+ /**
12
+ * The color of the ad badge text. Only supported on iOS.
13
+ */
14
+ textColor?: string;
15
+ }
@@ -1,4 +1,4 @@
1
- export default interface ADConfig {
1
+ export default interface AdConfig {
2
2
  /**
3
3
  * Defaults to none. Only supported on iOS.
4
4
  */
@@ -0,0 +1,14 @@
1
+ export declare enum FWEventName {
2
+ SDKInit = "fw:sdk-init",
3
+ CustomCTAClick = "fw:custom-cta-click",
4
+ VideoPlayback = "fw:video-playback",
5
+ VideoFeedClick = "fw:video-feed-click",
6
+ AddToCart = "fw:shopping:add-to-cart",
7
+ ClickCartIcon = "fw:shopping:click-cart-icon",
8
+ UpdateProductDetails = "fw:shopping:update-product-details",
9
+ WillDisplayProduct = "fw:shopping:will-display-product",
10
+ onLiveStreamEvent = "fw:livestream",
11
+ onLiveStreamChatEvent = "fw:livestream-chat",
12
+ ShareBaseURLUpdated = "fw:share-base-url-updated",
13
+ AdBadgeConfigurationUpdated = "fw:ad-badge-configuration-updated"
14
+ }
@@ -2,16 +2,10 @@ import type VideoPlaybackDetails from './VideoPlaybackDetails';
2
2
  import type FWError from './FWError';
3
3
  import type VideoPlaybackEventName from './VideoPlaybackEventName';
4
4
  import type FeedItemDetails from './FeedItemDetails';
5
- export declare enum FWEventName {
6
- SDKInit = "fw:sdk-init",
7
- CustomCTAClick = "fw:custom-cta-click",
8
- VideoPlayback = "fw:video-playback",
9
- VideoFeedClick = "fw:video-feed-click",
10
- AddToCart = "fw:shopping:add-to-cart",
11
- ClickCartIcon = "fw:shopping:click-cart-icon",
12
- UpdateProductDetails = "fw:shopping:update-product-details",
13
- WillDisplayProduct = "fw:shopping:will-display-product"
14
- }
5
+ import type LiveStreamMessageDetails from './LiveStreamMessageDetails';
6
+ import type LiveStreamChatEventName from './LiveStreamChatEventName';
7
+ import type LiveStreamEventDetails from './LiveStreamEventDetails';
8
+ import type LiveStreamEventName from './LiveStreamEventName';
15
9
  export interface SDKInitEvent {
16
10
  /**
17
11
  * If error equals undefined/null, it means the initialization is successful.
@@ -43,9 +37,9 @@ export interface AddToCartEvent {
43
37
  }
44
38
  export interface UpdateProductDetailsEvent {
45
39
  /**
46
- * A unique identifier of the product.
40
+ * A unique identifier list of the products.
47
41
  */
48
- productId: string;
42
+ productIds: string[];
49
43
  }
50
44
  export interface WillDisplayProductEvent {
51
45
  /**
@@ -53,3 +47,12 @@ export interface WillDisplayProductEvent {
53
47
  */
54
48
  videoId: string;
55
49
  }
50
+ export interface LiveStreamEvent {
51
+ eventName: LiveStreamEventName;
52
+ info: LiveStreamEventDetails;
53
+ }
54
+ export interface LiveStreamChatEvent {
55
+ eventName: LiveStreamChatEventName;
56
+ message: LiveStreamMessageDetails;
57
+ liveStream: LiveStreamEventDetails;
58
+ }
@@ -1,14 +1,21 @@
1
+ import type VideoFeedSource from '../models/VideoFeedSource';
1
2
  export default interface FeedItemDetails {
2
3
  /**
3
- * The index of the thumbnail tapped in the video feed.
4
+ * The index of the thumbnail tapped in the feed.
4
5
  */
5
6
  index: number;
6
7
  /**
7
- * A unique id for the video.
8
+ * The unique id of the thumbnail.
9
+ * If the source is `playlistGroup` this value will represent the playlist's id; otherwise this value is the id of the selected video.
8
10
  */
9
- videoId: string;
11
+ id: string;
10
12
  /**
11
- * The total duration of the video
13
+ * The total duration of the video.
14
+ * If the source is `playlistGroup` this value will always be 0; otherwise this value is the duration of the selected video.
12
15
  */
13
16
  duration: number;
17
+ /**
18
+ * The content source of the feed.
19
+ */
20
+ source: VideoFeedSource;
14
21
  }
@@ -0,0 +1,7 @@
1
+ declare enum LiveStreamChatEventName {
2
+ /**
3
+ * Called when a user sends messages to an active live stream.
4
+ */
5
+ userSendChat = "fw:livestream:user-send-chat"
6
+ }
7
+ export default LiveStreamChatEventName;
@@ -0,0 +1,3 @@
1
+ export default interface LiveStreamEventDetails {
2
+ id: string;
3
+ }
@@ -0,0 +1,15 @@
1
+ declare enum LiveStreamEventName {
2
+ /**
3
+ * Called when a user joins an active live stream.
4
+ */
5
+ userDidjoin = "fw:livestream:user-join",
6
+ /**
7
+ * Called when the user leaves an active live stream.
8
+ */
9
+ userDidLeave = "fw:livestream:user-leave",
10
+ /**
11
+ * Called when a user sends a like to an active live stream.
12
+ */
13
+ userSendLike = "fw:livestream:user-send-like"
14
+ }
15
+ export default LiveStreamEventName;
@@ -0,0 +1,14 @@
1
+ export default interface LiveStreamMessageDetails {
2
+ /**
3
+ * A unique identifier of the message.
4
+ */
5
+ messageId: string;
6
+ /**
7
+ * The username of the user.
8
+ */
9
+ username?: string | null;
10
+ /**
11
+ * The text of the message.
12
+ */
13
+ text?: string | null;
14
+ }
@@ -10,11 +10,11 @@ export interface VideoFeedPlayIconConfiguration {
10
10
  export declare type VideoFeedTitlePosition = 'stacked' | 'nested';
11
11
  export default interface VideoFeedConfiguration {
12
12
  /**
13
- * BackgroundColor of video feed.
13
+ * Background color of video feed.
14
14
  */
15
15
  backgroundColor?: string;
16
16
  /**
17
- * CornerRadius of video feed. Only supported on iOS.
17
+ * Corner radius of video feed. Only supported on iOS.
18
18
  */
19
19
  cornerRadius?: number;
20
20
  /**
@@ -22,11 +22,15 @@ export default interface VideoFeedConfiguration {
22
22
  */
23
23
  title?: VideoFeedTitleConfiguration;
24
24
  /**
25
- * Configuration of video feed title position.
25
+ * Title position of video feed.
26
26
  */
27
27
  titlePosition?: VideoFeedTitlePosition;
28
28
  /**
29
29
  * Configuration of video feed play icon. Only supported on iOS.
30
30
  */
31
31
  playIcon?: VideoFeedPlayIconConfiguration;
32
+ /**
33
+ * Indicates if the video feed shows ad badge.
34
+ */
35
+ showAdBadge?: boolean;
32
36
  }
@@ -0,0 +1,2 @@
1
+ declare type VideoFeedSource = 'discover' | 'channel' | 'playlist' | 'playlistGroup';
2
+ export default VideoFeedSource;
@@ -2,7 +2,6 @@ export interface VideoPlayerSize {
2
2
  width: number;
3
3
  height: number;
4
4
  }
5
- export declare type VideoBadge = 'ad' | 'demo' | 'featured';
6
5
  export default interface VideoPlaybackDetails {
7
6
  /**
8
7
  * A unique identifier of the video.
@@ -19,7 +18,7 @@ export default interface VideoPlaybackDetails {
19
18
  /**
20
19
  * Video badge type.
21
20
  */
22
- badge?: VideoBadge | null;
21
+ badge?: string | null;
23
22
  /**
24
23
  * The size of the player.
25
24
  */
@@ -24,7 +24,7 @@ declare enum VideoPlaybackEventName {
24
24
  */
25
25
  Complete = "fw:video:complete",
26
26
  /**
27
- * When ad video finishes playing
27
+ * When ad video finishes playing.
28
28
  */
29
29
  AdEnd = "fw:video:ad-end",
30
30
  /**