react-native-firework-sdk 1.0.0-beta

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 (190) hide show
  1. package/README.md +39 -0
  2. package/android/build.gradle +193 -0
  3. package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  4. package/android/gradle/wrapper/gradle-wrapper.properties +5 -0
  5. package/android/gradle.properties +5 -0
  6. package/android/gradlew +185 -0
  7. package/android/gradlew.bat +89 -0
  8. package/android/publish.gradle +65 -0
  9. package/android/src/main/AndroidManifest.xml +16 -0
  10. package/android/src/main/java/com/reactnativefireworksdk/FireworkSDKPackage.kt +20 -0
  11. package/android/src/main/java/com/reactnativefireworksdk/components/videofeed/FWVideoFeed.kt +123 -0
  12. package/android/src/main/java/com/reactnativefireworksdk/constants/FWCommandConstant.kt +6 -0
  13. package/android/src/main/java/com/reactnativefireworksdk/constants/FWVideoPlayerConstant.kt +20 -0
  14. package/android/src/main/java/com/reactnativefireworksdk/manager/FWVideoFeedManager.kt +88 -0
  15. package/android/src/main/java/com/reactnativefireworksdk/models/FWEventName.kt +35 -0
  16. package/android/src/main/java/com/reactnativefireworksdk/models/FWVideoFeedConfigModel.kt +27 -0
  17. package/android/src/main/java/com/reactnativefireworksdk/models/FWVideoFeedItemDetailsModel.kt +11 -0
  18. package/android/src/main/java/com/reactnativefireworksdk/models/FWVideoFeedMode.kt +7 -0
  19. package/android/src/main/java/com/reactnativefireworksdk/models/FWVideoFeedSource.kt +7 -0
  20. package/android/src/main/java/com/reactnativefireworksdk/models/FWVideoFeedTitlePosition.kt +7 -0
  21. package/android/src/main/java/com/reactnativefireworksdk/models/FWVideoPlaybackDetails.kt +19 -0
  22. package/android/src/main/java/com/reactnativefireworksdk/models/FWVideoPlayerConfigModel.kt +20 -0
  23. package/android/src/main/java/com/reactnativefireworksdk/models/FWVideoShoppingInterface.kt +13 -0
  24. package/android/src/main/java/com/reactnativefireworksdk/models/FWVideoShoppingProduct.kt +34 -0
  25. package/android/src/main/java/com/reactnativefireworksdk/models/FireworkSDKInterface.kt +12 -0
  26. package/android/src/main/java/com/reactnativefireworksdk/module/FWVideoShoppingModule.kt +190 -0
  27. package/android/src/main/java/com/reactnativefireworksdk/module/FireworkSDKModule.kt +248 -0
  28. package/android/src/main/java/com/reactnativefireworksdk/pages/FWVideoShoppingCartActivity.kt +43 -0
  29. package/android/src/main/java/com/reactnativefireworksdk/utils/FWEventUtils.kt +127 -0
  30. package/android/src/main/java/com/reactnativefireworksdk/utils/FWJsonUtils.kt +57 -0
  31. package/android/src/main/java/com/reactnativefireworksdk/utils/FWLogUtils.kt +147 -0
  32. package/android/src/main/java/com/reactnativefireworksdk/utils/FWUrlUtils.kt +68 -0
  33. package/android/src/main/java/com/reactnativefireworksdk/utils/FWVideoPlayerUtils.kt +18 -0
  34. package/android/src/main/res/layout/fwrn_fragment_shoppingcart.xml +8 -0
  35. package/android/src/main/res/layout/fwrn_fragment_videofeed.xml +20 -0
  36. package/android/src/main/res/values/styles.xml +43 -0
  37. package/ios/Component/VideoFeed.swift +262 -0
  38. package/ios/Component/VideoFeedConfiguration.swift +32 -0
  39. package/ios/Component/VideoFeedManager.m +51 -0
  40. package/ios/Component/VideoFeedManager.swift +40 -0
  41. package/ios/Component/VideoPlayerConfiguration.swift +30 -0
  42. package/ios/FireworkSdk-Bridging-Header.h +6 -0
  43. package/ios/FireworkSdk.xcodeproj/project.pbxproj +291 -0
  44. package/ios/Models/FireworkJsEvent.swift +34 -0
  45. package/ios/Models/FireworkSDK+JsModel.swift +62 -0
  46. package/ios/Models/RCTConvert+FireworkSDKModule.swift +91 -0
  47. package/ios/Models/RCTConvert+Shopping.swift +49 -0
  48. package/ios/Models/RCTConvert+VideoFeed.swift +69 -0
  49. package/ios/Modules/FireworkSDKModule/FireworkSDKModule+CTA.swift +17 -0
  50. package/ios/Modules/FireworkSDKModule/FireworkSDKModule+EventTracking.swift +74 -0
  51. package/ios/Modules/FireworkSDKModule/FireworkSDKModule.m +19 -0
  52. package/ios/Modules/FireworkSDKModule/FireworkSDKModule.swift +106 -0
  53. package/ios/Modules/FireworkSDKModule/MobileADConfiguration.swift +17 -0
  54. package/ios/Modules/Shopping/CartViewController.swift +98 -0
  55. package/ios/Modules/Shopping/Product.swift +33 -0
  56. package/ios/Modules/Shopping/ProductInfoViewConfiguration.swift +24 -0
  57. package/ios/Modules/Shopping/ShoppingModule.m +19 -0
  58. package/ios/Modules/Shopping/ShoppingModule.swift +214 -0
  59. package/ios/Utils/String+Color.swift +38 -0
  60. package/ios/Utils/UIView+Constraints.swift +91 -0
  61. package/ios/Utils/UIView+ParentViewController.swift +21 -0
  62. package/ios/Utils/UIViewController+AttachChild.swift +69 -0
  63. package/lib/commonjs/FireworkSDK.js +171 -0
  64. package/lib/commonjs/FireworkSDK.js.map +1 -0
  65. package/lib/commonjs/VideoShopping.js +146 -0
  66. package/lib/commonjs/VideoShopping.js.map +1 -0
  67. package/lib/commonjs/components/CartContainer.js +35 -0
  68. package/lib/commonjs/components/CartContainer.js.map +1 -0
  69. package/lib/commonjs/components/FWVideoFeed.js +18 -0
  70. package/lib/commonjs/components/FWVideoFeed.js.map +1 -0
  71. package/lib/commonjs/components/VideoFeed.js +82 -0
  72. package/lib/commonjs/components/VideoFeed.js.map +1 -0
  73. package/lib/commonjs/constants/FWErrorMessage.js +15 -0
  74. package/lib/commonjs/constants/FWErrorMessage.js.map +1 -0
  75. package/lib/commonjs/index.js +44 -0
  76. package/lib/commonjs/index.js.map +1 -0
  77. package/lib/commonjs/models/ADConfig.js +2 -0
  78. package/lib/commonjs/models/ADConfig.js.map +1 -0
  79. package/lib/commonjs/models/AddToCartResult.js +2 -0
  80. package/lib/commonjs/models/AddToCartResult.js.map +1 -0
  81. package/lib/commonjs/models/FWError.js +2 -0
  82. package/lib/commonjs/models/FWError.js.map +1 -0
  83. package/lib/commonjs/models/FWEvents.js +20 -0
  84. package/lib/commonjs/models/FWEvents.js.map +1 -0
  85. package/lib/commonjs/models/FeedItemDetails.js +2 -0
  86. package/lib/commonjs/models/FeedItemDetails.js.map +1 -0
  87. package/lib/commonjs/models/Product.js +2 -0
  88. package/lib/commonjs/models/Product.js.map +1 -0
  89. package/lib/commonjs/models/ProductInfoViewConfiguration.js +2 -0
  90. package/lib/commonjs/models/ProductInfoViewConfiguration.js.map +1 -0
  91. package/lib/commonjs/models/ProductUnit.js +2 -0
  92. package/lib/commonjs/models/ProductUnit.js.map +1 -0
  93. package/lib/commonjs/models/VideoFeedConfiguration.js +2 -0
  94. package/lib/commonjs/models/VideoFeedConfiguration.js.map +1 -0
  95. package/lib/commonjs/models/VideoPlaybackDetails.js +2 -0
  96. package/lib/commonjs/models/VideoPlaybackDetails.js.map +1 -0
  97. package/lib/commonjs/models/VideoPlaybackEventName.js +23 -0
  98. package/lib/commonjs/models/VideoPlaybackEventName.js.map +1 -0
  99. package/lib/commonjs/models/VideoPlayerConfiguration.js +2 -0
  100. package/lib/commonjs/models/VideoPlayerConfiguration.js.map +1 -0
  101. package/lib/commonjs/modules/FireworkSDKModule.js +20 -0
  102. package/lib/commonjs/modules/FireworkSDKModule.js.map +1 -0
  103. package/lib/commonjs/modules/ShoppingModule.js +20 -0
  104. package/lib/commonjs/modules/ShoppingModule.js.map +1 -0
  105. package/lib/module/FireworkSDK.js +153 -0
  106. package/lib/module/FireworkSDK.js.map +1 -0
  107. package/lib/module/VideoShopping.js +134 -0
  108. package/lib/module/VideoShopping.js.map +1 -0
  109. package/lib/module/components/CartContainer.js +18 -0
  110. package/lib/module/components/CartContainer.js.map +1 -0
  111. package/lib/module/components/FWVideoFeed.js +8 -0
  112. package/lib/module/components/FWVideoFeed.js.map +1 -0
  113. package/lib/module/components/VideoFeed.js +66 -0
  114. package/lib/module/components/VideoFeed.js.map +1 -0
  115. package/lib/module/constants/FWErrorMessage.js +7 -0
  116. package/lib/module/constants/FWErrorMessage.js.map +1 -0
  117. package/lib/module/index.js +10 -0
  118. package/lib/module/index.js.map +1 -0
  119. package/lib/module/models/ADConfig.js +2 -0
  120. package/lib/module/models/ADConfig.js.map +1 -0
  121. package/lib/module/models/AddToCartResult.js +2 -0
  122. package/lib/module/models/AddToCartResult.js.map +1 -0
  123. package/lib/module/models/FWError.js +2 -0
  124. package/lib/module/models/FWError.js.map +1 -0
  125. package/lib/module/models/FWEvents.js +13 -0
  126. package/lib/module/models/FWEvents.js.map +1 -0
  127. package/lib/module/models/FeedItemDetails.js +2 -0
  128. package/lib/module/models/FeedItemDetails.js.map +1 -0
  129. package/lib/module/models/Product.js +2 -0
  130. package/lib/module/models/Product.js.map +1 -0
  131. package/lib/module/models/ProductInfoViewConfiguration.js +2 -0
  132. package/lib/module/models/ProductInfoViewConfiguration.js.map +1 -0
  133. package/lib/module/models/ProductUnit.js +2 -0
  134. package/lib/module/models/ProductUnit.js.map +1 -0
  135. package/lib/module/models/VideoFeedConfiguration.js +2 -0
  136. package/lib/module/models/VideoFeedConfiguration.js.map +1 -0
  137. package/lib/module/models/VideoPlaybackDetails.js +2 -0
  138. package/lib/module/models/VideoPlaybackDetails.js.map +1 -0
  139. package/lib/module/models/VideoPlaybackEventName.js +16 -0
  140. package/lib/module/models/VideoPlaybackEventName.js.map +1 -0
  141. package/lib/module/models/VideoPlayerConfiguration.js +2 -0
  142. package/lib/module/models/VideoPlayerConfiguration.js.map +1 -0
  143. package/lib/module/modules/FireworkSDKModule.js +10 -0
  144. package/lib/module/modules/FireworkSDKModule.js.map +1 -0
  145. package/lib/module/modules/ShoppingModule.js +10 -0
  146. package/lib/module/modules/ShoppingModule.js.map +1 -0
  147. package/lib/typescript/FireworkSDK.d.ts +74 -0
  148. package/lib/typescript/VideoShopping.d.ts +54 -0
  149. package/lib/typescript/components/CartContainer.d.ts +3 -0
  150. package/lib/typescript/components/FWVideoFeed.d.ts +2 -0
  151. package/lib/typescript/components/VideoFeed.d.ts +53 -0
  152. package/lib/typescript/constants/FWErrorMessage.d.ts +2 -0
  153. package/lib/typescript/index.d.ts +25 -0
  154. package/lib/typescript/models/ADConfig.d.ts +10 -0
  155. package/lib/typescript/models/AddToCartResult.d.ts +10 -0
  156. package/lib/typescript/models/FWError.d.ts +10 -0
  157. package/lib/typescript/models/FWEvents.d.ts +55 -0
  158. package/lib/typescript/models/FeedItemDetails.d.ts +14 -0
  159. package/lib/typescript/models/Product.d.ts +19 -0
  160. package/lib/typescript/models/ProductInfoViewConfiguration.d.ts +18 -0
  161. package/lib/typescript/models/ProductUnit.d.ts +22 -0
  162. package/lib/typescript/models/VideoFeedConfiguration.d.ts +32 -0
  163. package/lib/typescript/models/VideoPlaybackDetails.d.ts +31 -0
  164. package/lib/typescript/models/VideoPlaybackEventName.d.ts +39 -0
  165. package/lib/typescript/models/VideoPlayerConfiguration.d.ts +25 -0
  166. package/lib/typescript/modules/FireworkSDKModule.d.ts +12 -0
  167. package/lib/typescript/modules/ShoppingModule.d.ts +13 -0
  168. package/package.json +147 -0
  169. package/react-native-firework-sdk.podspec +22 -0
  170. package/src/FireworkSDK.ts +153 -0
  171. package/src/VideoShopping.ts +165 -0
  172. package/src/components/CartContainer.tsx +20 -0
  173. package/src/components/FWVideoFeed.tsx +10 -0
  174. package/src/components/VideoFeed.tsx +109 -0
  175. package/src/constants/FWErrorMessage.ts +11 -0
  176. package/src/index.tsx +109 -0
  177. package/src/models/ADConfig.ts +10 -0
  178. package/src/models/AddToCartResult.ts +10 -0
  179. package/src/models/FWError.ts +10 -0
  180. package/src/models/FWEvents.ts +63 -0
  181. package/src/models/FeedItemDetails.ts +14 -0
  182. package/src/models/Product.ts +20 -0
  183. package/src/models/ProductInfoViewConfiguration.ts +20 -0
  184. package/src/models/ProductUnit.ts +23 -0
  185. package/src/models/VideoFeedConfiguration.ts +35 -0
  186. package/src/models/VideoPlaybackDetails.ts +33 -0
  187. package/src/models/VideoPlaybackEventName.ts +40 -0
  188. package/src/models/VideoPlayerConfiguration.ts +26 -0
  189. package/src/modules/FireworkSDKModule.ts +27 -0
  190. package/src/modules/ShoppingModule.ts +29 -0
@@ -0,0 +1,10 @@
1
+ import { AppRegistry } from 'react-native';
2
+ import CartContainer from './components/CartContainer';
3
+ import VideoFeed from './components/VideoFeed';
4
+ import FireworkSDK from './FireworkSDK';
5
+ import VideoPlaybackEventName from './models/VideoPlaybackEventName';
6
+ import VideoShopping from './VideoShopping';
7
+ AppRegistry.registerComponent('FWShoppingCartPage', () => CartContainer);
8
+ export default FireworkSDK;
9
+ export { VideoFeed, VideoPlaybackEventName, VideoShopping };
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["index.tsx"],"names":["AppRegistry","CartContainer","VideoFeed","FireworkSDK","VideoPlaybackEventName","VideoShopping","registerComponent"],"mappings":"AAAA,SAASA,WAAT,QAA4B,cAA5B;AAEA,OAAOC,aAAP,MAA0B,4BAA1B;AAMA,OAAOC,SAAP,MAAsB,wBAAtB;AAOA,OAAOC,WAAP,MAAwB,eAAxB;AAgCA,OAAOC,sBAAP,MAAmC,iCAAnC;AAaA,OAAOC,aAAP,MAA0B,iBAA1B;AAEAL,WAAW,CAACM,iBAAZ,CAA8B,oBAA9B,EAAoD,MAAML,aAA1D;AAEA,eAAeE,WAAf;AAEA,SAsBED,SAtBF,EAiCEE,sBAjCF,EAuCEC,aAvCF","sourcesContent":["import { AppRegistry } from 'react-native';\n\nimport CartContainer from './components/CartContainer';\nimport type {\n IVideoFeedProps,\n VideoFeedMode,\n VideoFeedSource,\n} from './components/VideoFeed';\nimport VideoFeed from './components/VideoFeed';\nimport type {\n CustomCTAClickCallback,\n SDKInitCallback,\n VideoFeedClickCallback,\n VideoPlaybackCallback,\n} from './FireworkSDK';\nimport FireworkSDK from './FireworkSDK';\nimport type ADConfig from './models/ADConfig';\nimport type AddToCartResult from './models/AddToCartResult';\nimport type FeedItemDetails from './models/FeedItemDetails';\nimport type FWError from './models/FWError';\nimport type {\n AddToCartEvent,\n CustomCTAClickEvent,\n SDKInitEvent,\n UpdateProductDetailsEvent,\n VideoPlaybackEvent,\n WillDisplayProductEvent,\n} from './models/FWEvents';\nimport type Product from './models/Product';\nimport type ProductInfoViewConfiguration from './models/ProductInfoViewConfiguration';\nimport type {\n AddToCartButtonConfiguration,\n CartIconConfiguration,\n} from './models/ProductInfoViewConfiguration';\nimport type ProductUnit from './models/ProductUnit';\nimport type { ProductPrice } from './models/ProductUnit';\nimport type VideoFeedConfiguration from './models/VideoFeedConfiguration';\nimport type {\n VideoFeedPlayIconConfiguration,\n VideoFeedTitleConfiguration,\n VideoFeedTitlePosition,\n} from './models/VideoFeedConfiguration';\nimport type VideoPlaybackDetails from './models/VideoPlaybackDetails';\nimport type {\n VideoBadge,\n VideoPlayerSize,\n} from './models/VideoPlaybackDetails';\nimport VideoPlaybackEventName from './models/VideoPlaybackEventName';\nimport type VideoPlayerConfiguration from './models/VideoPlayerConfiguration';\nimport type {\n VideoPlayerCompleteAction,\n VideoPlayerCTAStyle,\n VideoPlayerStyle,\n} from './models/VideoPlayerConfiguration';\nimport type {\n AddToCartCallback,\n ClickCartIconCallback,\n UpdateProductDetailsCallback,\n WillDisplayProductCallback,\n} from './VideoShopping';\nimport VideoShopping from './VideoShopping';\n\nAppRegistry.registerComponent('FWShoppingCartPage', () => CartContainer);\n\nexport default FireworkSDK;\n\nexport {\n ADConfig,\n AddToCartButtonConfiguration,\n AddToCartCallback,\n AddToCartEvent,\n AddToCartResult,\n CartIconConfiguration,\n ClickCartIconCallback,\n CustomCTAClickCallback,\n CustomCTAClickEvent,\n FeedItemDetails,\n FWError,\n IVideoFeedProps,\n Product,\n ProductInfoViewConfiguration,\n ProductPrice,\n ProductUnit,\n SDKInitCallback,\n SDKInitEvent,\n UpdateProductDetailsCallback,\n UpdateProductDetailsEvent,\n VideoBadge,\n VideoFeed,\n VideoFeedClickCallback,\n VideoFeedConfiguration,\n VideoFeedMode,\n VideoFeedPlayIconConfiguration,\n VideoFeedSource,\n VideoFeedTitleConfiguration,\n VideoFeedTitlePosition,\n VideoPlaybackCallback,\n VideoPlaybackDetails,\n VideoPlaybackEvent,\n VideoPlaybackEventName,\n VideoPlayerCompleteAction,\n VideoPlayerConfiguration,\n VideoPlayerCTAStyle,\n VideoPlayerSize,\n VideoPlayerStyle,\n VideoShopping,\n WillDisplayProductCallback,\n WillDisplayProductEvent,\n};\n"]}
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=ADConfig.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=AddToCartResult.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=FWError.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
@@ -0,0 +1,13 @@
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 = {}));
13
+ //# sourceMappingURL=FWEvents.js.map
@@ -0,0 +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}"]}
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=FeedItemDetails.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=Product.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=ProductInfoViewConfiguration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=ProductUnit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=VideoFeedConfiguration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=VideoPlaybackDetails.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
@@ -0,0 +1,16 @@
1
+ var VideoPlaybackEventName;
2
+
3
+ (function (VideoPlaybackEventName) {
4
+ VideoPlaybackEventName["Impression"] = "fw:video:impression";
5
+ VideoPlaybackEventName["Start"] = "fw:video:start";
6
+ VideoPlaybackEventName["FirstQuartile"] = "fw:video:first-quartile";
7
+ VideoPlaybackEventName["Midpoint"] = "fw:video:midpoint";
8
+ VideoPlaybackEventName["ThirdQuartile"] = "fw:video:third-quartile";
9
+ VideoPlaybackEventName["Complete"] = "fw:video:complete";
10
+ VideoPlaybackEventName["AdEnd"] = "fw:video:ad-end";
11
+ VideoPlaybackEventName["ClickCTA"] = "fw:video:click-cta";
12
+ VideoPlaybackEventName["ClickShare"] = "fw:video:click-share";
13
+ })(VideoPlaybackEventName || (VideoPlaybackEventName = {}));
14
+
15
+ export default VideoPlaybackEventName;
16
+ //# sourceMappingURL=VideoPlaybackEventName.js.map
@@ -0,0 +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"]}
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=VideoPlayerConfiguration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
@@ -0,0 +1,10 @@
1
+ import { NativeModules } from 'react-native';
2
+ import { LINKING_ERROR } from '../constants/FWErrorMessage';
3
+ const FireworkSDKModule = NativeModules.FireworkSDK ? NativeModules.FireworkSDK : new Proxy({}, {
4
+ get() {
5
+ throw new Error(LINKING_ERROR);
6
+ }
7
+
8
+ });
9
+ export default FireworkSDKModule;
10
+ //# sourceMappingURL=FireworkSDKModule.js.map
@@ -0,0 +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"]}
@@ -0,0 +1,10 @@
1
+ import { NativeModules } from 'react-native';
2
+ import { LINKING_ERROR } from '../constants/FWErrorMessage';
3
+ const ShoppingModule = NativeModules.ShoppingModule ? NativeModules.ShoppingModule : new Proxy({}, {
4
+ get() {
5
+ throw new Error(LINKING_ERROR);
6
+ }
7
+
8
+ });
9
+ export default ShoppingModule;
10
+ //# sourceMappingURL=ShoppingModule.js.map
@@ -0,0 +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;AAoBA,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): void;\n updateProductViewConfig(config: ProductInfoViewConfiguration, callbackId: number): void;\n updateAddToCartStatus(res: string, tips: string, callbackId: number): void;\n jumpToCartPage(callbackId: number): void;\n exitCartPage(): void;\n}\n\nexport default ShoppingModule as IShoppingModule;\n"]}
@@ -0,0 +1,74 @@
1
+ import type ADConfig from './models/ADConfig';
2
+ import type { CustomCTAClickEvent, SDKInitEvent, VideoPlaybackEvent } from './models/FWEvents';
3
+ import { VideoFeedClickEvent } from './models/FWEvents';
4
+ import type VideoPlayerConfiguration from './models/VideoPlayerConfiguration';
5
+ import VideoShopping from './VideoShopping';
6
+ export declare type SDKInitCallback = (event: SDKInitEvent) => void;
7
+ export declare type CustomCTAClickCallback = (event: CustomCTAClickEvent) => void;
8
+ export declare type VideoPlaybackCallback = (event: VideoPlaybackEvent) => void;
9
+ export declare type VideoFeedClickCallback = (event: VideoFeedClickEvent) => void;
10
+ /**
11
+ * Entry class of Firework SDK, which supports the sdk initialization and global configuration.
12
+ */
13
+ declare class FireworkSDK {
14
+ private static _instance?;
15
+ private _onCustomCTAClick;
16
+ private _onVideoPlayback?;
17
+ /**
18
+ * Clicking Video Feed callback
19
+ */
20
+ onVideoFeedClick?: VideoFeedClickCallback;
21
+ private _shareBaseURL;
22
+ /**
23
+ * SDK initialization callback.
24
+ */
25
+ onSDKInit?: SDKInitCallback;
26
+ /**
27
+ * Get Custom Clicking CTA callback.
28
+ */
29
+ get onCustomCTAClick(): CustomCTAClickCallback | undefined;
30
+ /**
31
+ * Set Custom Clicking CTA callback.
32
+ */
33
+ set onCustomCTAClick(value: CustomCTAClickCallback | undefined);
34
+ /**
35
+ * Get Video Playback callback.
36
+ */
37
+ get onVideoPlayback(): VideoPlaybackCallback | undefined;
38
+ /**
39
+ * Set Video Playback callback.
40
+ */
41
+ set onVideoPlayback(value: VideoPlaybackCallback | undefined);
42
+ /**
43
+ * get Share Base URL
44
+ */
45
+ get shareBaseURL(): string | undefined;
46
+ /**
47
+ * set Share Base URL
48
+ */
49
+ set shareBaseURL(value: string | undefined);
50
+ private eventEmitter;
51
+ /**
52
+ * Get VideoShopping object.
53
+ */
54
+ get shopping(): VideoShopping;
55
+ /**
56
+ * Get global single instance of FireworkSDK class.
57
+ * @returns FireworkSDK
58
+ */
59
+ static getInstance(): FireworkSDK;
60
+ private constructor();
61
+ /**
62
+ * Initializes Firework SDK.
63
+ * @param {string?} userId An id to uniquely identify device or user.
64
+ * @param {ADConfig?} adConfig Configuration of Ad.
65
+ */
66
+ init(userId?: string, adConfig?: ADConfig): void;
67
+ /**
68
+ * Open Video URL.
69
+ * @param {string} url
70
+ * @param {VideoPlayerConfiguration} config
71
+ */
72
+ openVideoPlayer(url: string, config?: VideoPlayerConfiguration): void;
73
+ }
74
+ export default FireworkSDK;
@@ -0,0 +1,54 @@
1
+ /// <reference types="react" />
2
+ import type AddToCartResult from './models/AddToCartResult';
3
+ import { AddToCartEvent, UpdateProductDetailsEvent, WillDisplayProductEvent } from './models/FWEvents';
4
+ import type Product from './models/Product';
5
+ import type ProductInfoViewConfiguration from './models/ProductInfoViewConfiguration';
6
+ export declare type AddToCartCallback = (event: AddToCartEvent) => Promise<AddToCartResult | undefined | null>;
7
+ export declare type ClickCartIconCallback = () => Promise<React.ReactNode | undefined | null>;
8
+ export declare type UpdateProductDetailsCallback = (event: UpdateProductDetailsEvent) => Promise<Product | undefined | null>;
9
+ export declare type WillDisplayProductCallback = (event: WillDisplayProductEvent) => Promise<ProductInfoViewConfiguration | undefined | null>;
10
+ /**
11
+ * Entry class of Video Shopping
12
+ */
13
+ declare class VideoShopping {
14
+ private static _instance?;
15
+ /**
16
+ * This callback is triggered when the user clicks the "Add to cart" button.
17
+ *
18
+ * The host app can return an AddToCartResult object to tell FireworkSDK the result of adding to cart.
19
+ */
20
+ onAddToCart?: AddToCartCallback;
21
+ /**
22
+ * This callback is triggered when the user clicks the shopping cart icon.
23
+ *
24
+ * The host app can return a React.Node to integrate custom cart page to shopping flow.
25
+ */
26
+ onClickCartIcon?: ClickCartIconCallback;
27
+ /**
28
+ * This callback is triggered when the video will be shown.
29
+ *
30
+ * The host app can return a Product object to update the latest product information.
31
+ */
32
+ onUpdateProductDetails?: UpdateProductDetailsCallback;
33
+ /**
34
+ * This callback is triggered when the product will be shown.
35
+ *
36
+ * The host app can return a ProductInfoViewConfiguration object to configure "Add to cart" button style and cart icon style.
37
+ */
38
+ onWillDisplayProduct?: WillDisplayProductCallback;
39
+ currentCartPage?: React.ReactNode;
40
+ private eventEmitter;
41
+ static getInstance(): VideoShopping;
42
+ private constructor();
43
+ /**
44
+ * Exit Cart Page.
45
+ *
46
+ * The host app can call this method to exit their cart page.
47
+ */
48
+ exitCartPage(): void;
49
+ private handleAddToCartEvent;
50
+ private handleClickCartIconEvent;
51
+ private handleUpdateProductDetailsEvent;
52
+ private handleWillDisplayProductEvent;
53
+ }
54
+ export default VideoShopping;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const CartContainer: () => JSX.Element;
3
+ export default CartContainer;
@@ -0,0 +1,2 @@
1
+ declare const FWVideoFeed: import("react-native").HostComponent<any> | (() => never);
2
+ export default FWVideoFeed;
@@ -0,0 +1,53 @@
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';
5
+ import type FWError from '../models/FWError';
6
+ export declare type VideoFeedSource = 'discover' | 'channel' | 'playlist';
7
+ export declare type VideoFeedMode = 'row' | 'column' | 'grid';
8
+ export interface IVideoFeedProps {
9
+ /**
10
+ * Standard React Native View Style.
11
+ */
12
+ style?: StyleProp<ViewStyle>;
13
+ /**
14
+ * One of three available video feed sources.
15
+ */
16
+ source: VideoFeedSource;
17
+ /**
18
+ * Channel name from which content should be displayed. Videos are ordered as a channel timeline. The prop is required when the source is set as channel or playlist.
19
+ */
20
+ channel?: string;
21
+ /**
22
+ * Playlist Id for selected content. Please note channel name is necessary. Required when the source is set as playlist.
23
+ */
24
+ playlist?: string;
25
+ /**
26
+ * One of three available display modes. Defaults to row.
27
+ */
28
+ mode?: VideoFeedMode;
29
+ /**
30
+ * Configuration of Video Feed.
31
+ */
32
+ videoFeedConfiguration?: VideoFeedConfiguration;
33
+ /**
34
+ * Configuration of Video Player.
35
+ */
36
+ videoPlayerConfiguration?: VideoPlayerConfiguration;
37
+ /**
38
+ * Video feed loading result callback. It means loading successfully when error equals to undefined.
39
+ */
40
+ onVideoFeedLoadFinished?: (error?: FWError) => void;
41
+ }
42
+ export default class VideoFeed extends React.Component<IVideoFeedProps> {
43
+ static defaultProps: {
44
+ mode: string;
45
+ };
46
+ nativeComponentRef: React.RefObject<any>;
47
+ /**
48
+ * Force refreshing the video feed.
49
+ */
50
+ refresh: () => void;
51
+ private _onVideoFeedLoadFinished;
52
+ render(): JSX.Element;
53
+ }
@@ -0,0 +1,2 @@
1
+ declare const LINKING_ERROR: string;
2
+ export { LINKING_ERROR, };
@@ -0,0 +1,25 @@
1
+ import type { IVideoFeedProps, VideoFeedMode, VideoFeedSource } from './components/VideoFeed';
2
+ import VideoFeed from './components/VideoFeed';
3
+ import type { CustomCTAClickCallback, SDKInitCallback, VideoFeedClickCallback, VideoPlaybackCallback } from './FireworkSDK';
4
+ import FireworkSDK from './FireworkSDK';
5
+ import type ADConfig from './models/ADConfig';
6
+ import type AddToCartResult from './models/AddToCartResult';
7
+ import type FeedItemDetails from './models/FeedItemDetails';
8
+ import type FWError from './models/FWError';
9
+ import type { AddToCartEvent, CustomCTAClickEvent, SDKInitEvent, UpdateProductDetailsEvent, VideoPlaybackEvent, WillDisplayProductEvent } from './models/FWEvents';
10
+ import type Product from './models/Product';
11
+ import type ProductInfoViewConfiguration from './models/ProductInfoViewConfiguration';
12
+ import type { AddToCartButtonConfiguration, CartIconConfiguration } from './models/ProductInfoViewConfiguration';
13
+ import type ProductUnit from './models/ProductUnit';
14
+ import type { ProductPrice } from './models/ProductUnit';
15
+ import type VideoFeedConfiguration from './models/VideoFeedConfiguration';
16
+ import type { VideoFeedPlayIconConfiguration, VideoFeedTitleConfiguration, VideoFeedTitlePosition } from './models/VideoFeedConfiguration';
17
+ import type VideoPlaybackDetails from './models/VideoPlaybackDetails';
18
+ import type { VideoBadge, VideoPlayerSize } from './models/VideoPlaybackDetails';
19
+ import VideoPlaybackEventName from './models/VideoPlaybackEventName';
20
+ import type VideoPlayerConfiguration from './models/VideoPlayerConfiguration';
21
+ import type { VideoPlayerCompleteAction, VideoPlayerCTAStyle, VideoPlayerStyle } from './models/VideoPlayerConfiguration';
22
+ import type { AddToCartCallback, ClickCartIconCallback, UpdateProductDetailsCallback, WillDisplayProductCallback } from './VideoShopping';
23
+ import VideoShopping from './VideoShopping';
24
+ export default FireworkSDK;
25
+ export { ADConfig, AddToCartButtonConfiguration, AddToCartCallback, AddToCartEvent, AddToCartResult, CartIconConfiguration, 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, };
@@ -0,0 +1,10 @@
1
+ export default interface ADConfig {
2
+ /**
3
+ * Defaults to none.
4
+ */
5
+ type?: 'none' | 'admob' | 'ima';
6
+ /**
7
+ * Defaults to true. The property only takes effect when type is admob.
8
+ */
9
+ startMobileAds?: boolean;
10
+ }
@@ -0,0 +1,10 @@
1
+ export default interface AddToCartResult {
2
+ /**
3
+ * The result of Adding to Cart
4
+ */
5
+ res: 'success' | 'fail';
6
+ /**
7
+ * Success or fail message to display to the user
8
+ */
9
+ tips: string;
10
+ }
@@ -0,0 +1,10 @@
1
+ export default interface FWError {
2
+ /**
3
+ * Error name
4
+ */
5
+ name: string;
6
+ /**
7
+ * Error Reason
8
+ */
9
+ reason?: string | null;
10
+ }
@@ -0,0 +1,55 @@
1
+ import type VideoPlaybackDetails from './VideoPlaybackDetails';
2
+ import type FWError from './FWError';
3
+ import type VideoPlaybackEventName from './VideoPlaybackEventName';
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
+ }
15
+ export interface SDKInitEvent {
16
+ /**
17
+ * If error equals undefined/null, it means the initialization is successful.
18
+ */
19
+ error?: FWError | null;
20
+ }
21
+ export interface CustomCTAClickEvent {
22
+ /**
23
+ * Action URL that is associated with this CTA
24
+ */
25
+ url: string;
26
+ }
27
+ export interface VideoPlaybackEvent {
28
+ eventName: VideoPlaybackEventName;
29
+ info: VideoPlaybackDetails;
30
+ }
31
+ export interface VideoFeedClickEvent {
32
+ info: FeedItemDetails;
33
+ }
34
+ export interface AddToCartEvent {
35
+ /**
36
+ * A unique identifier of the product.
37
+ */
38
+ productId: string;
39
+ /**
40
+ * A unique identifier of the product unit.
41
+ */
42
+ unitId: string;
43
+ }
44
+ export interface UpdateProductDetailsEvent {
45
+ /**
46
+ * A unique identifier of the product.
47
+ */
48
+ productId: string;
49
+ }
50
+ export interface WillDisplayProductEvent {
51
+ /**
52
+ * A unique identifier of the video.
53
+ */
54
+ videoId: string;
55
+ }
@@ -0,0 +1,14 @@
1
+ export default interface FeedItemDetails {
2
+ /**
3
+ * The index of the thumbnail tapped in the video feed.
4
+ */
5
+ index: number;
6
+ /**
7
+ * A unique id for the video.
8
+ */
9
+ videoId: string;
10
+ /**
11
+ * The total duration of the video
12
+ */
13
+ duration: number;
14
+ }
@@ -0,0 +1,19 @@
1
+ import type ProductUnit from './ProductUnit';
2
+ export default interface Product {
3
+ /**
4
+ * A unique identifier of the product.
5
+ */
6
+ productId: string;
7
+ /**
8
+ * The name of the product.
9
+ */
10
+ name?: string | null;
11
+ /**
12
+ * The description of the product.
13
+ */
14
+ description?: string | null;
15
+ /**
16
+ * The unit array of the product
17
+ */
18
+ units?: ProductUnit[] | null;
19
+ }
@@ -0,0 +1,18 @@
1
+ export interface CartIconConfiguration {
2
+ isHidden?: boolean;
3
+ }
4
+ export interface AddToCartButtonConfiguration {
5
+ backgroundColor?: string;
6
+ textColor?: string;
7
+ fontSize?: number;
8
+ }
9
+ export default interface ProductInfoViewConfiguration {
10
+ /**
11
+ * Configuration of cart icon.
12
+ */
13
+ cartIcon?: CartIconConfiguration;
14
+ /**
15
+ * Configuration of "Add to cart" button.
16
+ */
17
+ addToCartButton?: AddToCartButtonConfiguration;
18
+ }
@@ -0,0 +1,22 @@
1
+ export interface ProductPrice {
2
+ amount: number;
3
+ currencyCode: string;
4
+ }
5
+ export default interface ProductUnit {
6
+ /**
7
+ * The unique identifier of the product unit.
8
+ */
9
+ unitId: string;
10
+ /**
11
+ * The name of the product unit.
12
+ */
13
+ name?: string | null;
14
+ /**
15
+ * The url of the product unit.
16
+ */
17
+ url?: string;
18
+ /**
19
+ * The price of the product unit.
20
+ */
21
+ price?: ProductPrice;
22
+ }
@@ -0,0 +1,32 @@
1
+ export interface VideoFeedTitleConfiguration {
2
+ hidden?: boolean;
3
+ textColor?: string;
4
+ fontSize?: number;
5
+ }
6
+ export interface VideoFeedPlayIconConfiguration {
7
+ hidden?: boolean;
8
+ iconWidth?: number;
9
+ }
10
+ export declare type VideoFeedTitlePosition = 'stacked' | 'nested';
11
+ export default interface VideoFeedConfiguration {
12
+ /**
13
+ * BackgroundColor of video feed.
14
+ */
15
+ backgroundColor?: string;
16
+ /**
17
+ * CornerRadius of video feed.
18
+ */
19
+ cornerRadius?: number;
20
+ /**
21
+ * Configuration of video feed title.
22
+ */
23
+ title?: VideoFeedTitleConfiguration;
24
+ /**
25
+ * Configuration of video feed title position.
26
+ */
27
+ titlePosition?: VideoFeedTitlePosition;
28
+ /**
29
+ * Configuration of video feed play icon.
30
+ */
31
+ playIcon?: VideoFeedPlayIconConfiguration;
32
+ }
@@ -0,0 +1,31 @@
1
+ export interface VideoPlayerSize {
2
+ width: number;
3
+ height: number;
4
+ }
5
+ export declare type VideoBadge = 'ad' | 'demo' | 'featured';
6
+ export default interface VideoPlaybackDetails {
7
+ /**
8
+ * A unique identifier of the video.
9
+ */
10
+ videoId: string;
11
+ /**
12
+ * The total duration of the video.
13
+ */
14
+ duration?: number | null;
15
+ /**
16
+ * The caption for the video.
17
+ */
18
+ caption?: string | null;
19
+ /**
20
+ * Video badge type.
21
+ */
22
+ badge?: VideoBadge | null;
23
+ /**
24
+ * The size of the player.
25
+ */
26
+ playerSize?: VideoPlayerSize | null;
27
+ /**
28
+ * Indicates if the video is associated with a call-to-action (CTA).
29
+ */
30
+ hasCTA?: boolean | null;
31
+ }