@datadog/mobile-react-native-openfeature 3.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 (261) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +117 -0
  3. package/lib/commonjs/index.js +13 -0
  4. package/lib/commonjs/index.js.map +1 -0
  5. package/lib/commonjs/provider.js +106 -0
  6. package/lib/commonjs/provider.js.map +1 -0
  7. package/lib/module/index.js +9 -0
  8. package/lib/module/index.js.map +1 -0
  9. package/lib/module/provider.js +99 -0
  10. package/lib/module/provider.js.map +1 -0
  11. package/lib/typescript/core/src/DdAttributes.d.ts +20 -0
  12. package/lib/typescript/core/src/DdAttributes.d.ts.map +1 -0
  13. package/lib/typescript/core/src/DdSdkReactNative.d.ts +122 -0
  14. package/lib/typescript/core/src/DdSdkReactNative.d.ts.map +1 -0
  15. package/lib/typescript/core/src/InternalLog.d.ts +13 -0
  16. package/lib/typescript/core/src/InternalLog.d.ts.map +1 -0
  17. package/lib/typescript/core/src/config/DatadogProviderConfiguration.d.ts +12 -0
  18. package/lib/typescript/core/src/config/DatadogProviderConfiguration.d.ts.map +1 -0
  19. package/lib/typescript/core/src/config/FileBasedConfiguration.d.ts +17 -0
  20. package/lib/typescript/core/src/config/FileBasedConfiguration.d.ts.map +1 -0
  21. package/lib/typescript/core/src/config/FileBasedConfiguration.type.d.ts +52 -0
  22. package/lib/typescript/core/src/config/FileBasedConfiguration.type.d.ts.map +1 -0
  23. package/lib/typescript/core/src/config/async/AutoInstrumentationConfiguration.d.ts +60 -0
  24. package/lib/typescript/core/src/config/async/AutoInstrumentationConfiguration.d.ts.map +1 -0
  25. package/lib/typescript/core/src/config/async/PartialInitializationConfiguration.d.ts +47 -0
  26. package/lib/typescript/core/src/config/async/PartialInitializationConfiguration.d.ts.map +1 -0
  27. package/lib/typescript/core/src/config/async/asyncInitializationHelper.d.ts +5 -0
  28. package/lib/typescript/core/src/config/async/asyncInitializationHelper.d.ts.map +1 -0
  29. package/lib/typescript/core/src/config/features/CoreConfiguration.d.ts +52 -0
  30. package/lib/typescript/core/src/config/features/CoreConfiguration.d.ts.map +1 -0
  31. package/lib/typescript/core/src/config/features/CoreConfiguration.type.d.ts +90 -0
  32. package/lib/typescript/core/src/config/features/CoreConfiguration.type.d.ts.map +1 -0
  33. package/lib/typescript/core/src/config/features/CoreConfigurationNative.d.ts +54 -0
  34. package/lib/typescript/core/src/config/features/CoreConfigurationNative.d.ts.map +1 -0
  35. package/lib/typescript/core/src/config/features/LogsConfiguration.d.ts +17 -0
  36. package/lib/typescript/core/src/config/features/LogsConfiguration.d.ts.map +1 -0
  37. package/lib/typescript/core/src/config/features/LogsConfiguration.type.d.ts +24 -0
  38. package/lib/typescript/core/src/config/features/LogsConfiguration.type.d.ts.map +1 -0
  39. package/lib/typescript/core/src/config/features/LogsConfigurationNative.d.ts +6 -0
  40. package/lib/typescript/core/src/config/features/LogsConfigurationNative.d.ts.map +1 -0
  41. package/lib/typescript/core/src/config/features/RumConfiguration.d.ts +66 -0
  42. package/lib/typescript/core/src/config/features/RumConfiguration.d.ts.map +1 -0
  43. package/lib/typescript/core/src/config/features/RumConfiguration.type.d.ts +131 -0
  44. package/lib/typescript/core/src/config/features/RumConfiguration.type.d.ts.map +1 -0
  45. package/lib/typescript/core/src/config/features/RumConfigurationNative.d.ts +25 -0
  46. package/lib/typescript/core/src/config/features/RumConfigurationNative.d.ts.map +1 -0
  47. package/lib/typescript/core/src/config/features/TraceConfiguration.d.ts +10 -0
  48. package/lib/typescript/core/src/config/features/TraceConfiguration.d.ts.map +1 -0
  49. package/lib/typescript/core/src/config/features/TraceConfiguration.type.d.ts +11 -0
  50. package/lib/typescript/core/src/config/features/TraceConfiguration.type.d.ts.map +1 -0
  51. package/lib/typescript/core/src/config/features/TraceConfigurationNative.d.ts +4 -0
  52. package/lib/typescript/core/src/config/features/TraceConfigurationNative.d.ts.map +1 -0
  53. package/lib/typescript/core/src/config/types/BatchProcessingLevel.d.ts +18 -0
  54. package/lib/typescript/core/src/config/types/BatchProcessingLevel.d.ts.map +1 -0
  55. package/lib/typescript/core/src/config/types/BatchSize.d.ts +19 -0
  56. package/lib/typescript/core/src/config/types/BatchSize.d.ts.map +1 -0
  57. package/lib/typescript/core/src/config/types/InitializationMode.d.ts +5 -0
  58. package/lib/typescript/core/src/config/types/InitializationMode.d.ts.map +1 -0
  59. package/lib/typescript/core/src/config/types/InitializationModeForTelemetry.d.ts +2 -0
  60. package/lib/typescript/core/src/config/types/InitializationModeForTelemetry.d.ts.map +1 -0
  61. package/lib/typescript/core/src/config/types/ProxyConfiguration.d.ts +49 -0
  62. package/lib/typescript/core/src/config/types/ProxyConfiguration.d.ts.map +1 -0
  63. package/lib/typescript/core/src/config/types/SdkVerbosity.d.ts +10 -0
  64. package/lib/typescript/core/src/config/types/SdkVerbosity.d.ts.map +1 -0
  65. package/lib/typescript/core/src/config/types/TrackingConsent.d.ts +9 -0
  66. package/lib/typescript/core/src/config/types/TrackingConsent.d.ts.map +1 -0
  67. package/lib/typescript/core/src/config/types/UploadFrequency.d.ts +18 -0
  68. package/lib/typescript/core/src/config/types/UploadFrequency.d.ts.map +1 -0
  69. package/lib/typescript/core/src/config/types/VitalsUpdateFrequency.d.ts +7 -0
  70. package/lib/typescript/core/src/config/types/VitalsUpdateFrequency.d.ts.map +1 -0
  71. package/lib/typescript/core/src/config/types/index.d.ts +10 -0
  72. package/lib/typescript/core/src/config/types/index.d.ts.map +1 -0
  73. package/lib/typescript/core/src/flags/DdFlags.d.ts +3 -0
  74. package/lib/typescript/core/src/flags/DdFlags.d.ts.map +1 -0
  75. package/lib/typescript/core/src/flags/FlagsClient.d.ts +114 -0
  76. package/lib/typescript/core/src/flags/FlagsClient.d.ts.map +1 -0
  77. package/lib/typescript/core/src/flags/internal.d.ts +14 -0
  78. package/lib/typescript/core/src/flags/internal.d.ts.map +1 -0
  79. package/lib/typescript/core/src/flags/types.d.ts +202 -0
  80. package/lib/typescript/core/src/flags/types.d.ts.map +1 -0
  81. package/lib/typescript/core/src/index.d.ts +41 -0
  82. package/lib/typescript/core/src/index.d.ts.map +1 -0
  83. package/lib/typescript/core/src/logs/DdLogs.d.ts +24 -0
  84. package/lib/typescript/core/src/logs/DdLogs.d.ts.map +1 -0
  85. package/lib/typescript/core/src/logs/eventMapper.d.ts +13 -0
  86. package/lib/typescript/core/src/logs/eventMapper.d.ts.map +1 -0
  87. package/lib/typescript/core/src/logs/types.d.ts +74 -0
  88. package/lib/typescript/core/src/logs/types.d.ts.map +1 -0
  89. package/lib/typescript/core/src/metro/debugIdResolver.d.ts +3 -0
  90. package/lib/typescript/core/src/metro/debugIdResolver.d.ts.map +1 -0
  91. package/lib/typescript/core/src/nativeModulesTypes.d.ts +86 -0
  92. package/lib/typescript/core/src/nativeModulesTypes.d.ts.map +1 -0
  93. package/lib/typescript/core/src/rum/DdRum.d.ts +59 -0
  94. package/lib/typescript/core/src/rum/DdRum.d.ts.map +1 -0
  95. package/lib/typescript/core/src/rum/constants.d.ts +2 -0
  96. package/lib/typescript/core/src/rum/constants.d.ts.map +1 -0
  97. package/lib/typescript/core/src/rum/eventMappers/actionEventMapper.d.ts +22 -0
  98. package/lib/typescript/core/src/rum/eventMappers/actionEventMapper.d.ts.map +1 -0
  99. package/lib/typescript/core/src/rum/eventMappers/errorEventMapper.d.ts +24 -0
  100. package/lib/typescript/core/src/rum/eventMappers/errorEventMapper.d.ts.map +1 -0
  101. package/lib/typescript/core/src/rum/eventMappers/resourceEventMapper.d.ts +25 -0
  102. package/lib/typescript/core/src/rum/eventMappers/resourceEventMapper.d.ts.map +1 -0
  103. package/lib/typescript/core/src/rum/helper.d.ts +10 -0
  104. package/lib/typescript/core/src/rum/helper.d.ts.map +1 -0
  105. package/lib/typescript/core/src/rum/instrumentation/DdRumErrorTracking.d.ts +17 -0
  106. package/lib/typescript/core/src/rum/instrumentation/DdRumErrorTracking.d.ts.map +1 -0
  107. package/lib/typescript/core/src/rum/instrumentation/interactionTracking/DdBabelInteractionTracking.d.ts +38 -0
  108. package/lib/typescript/core/src/rum/instrumentation/interactionTracking/DdBabelInteractionTracking.d.ts.map +1 -0
  109. package/lib/typescript/core/src/rum/instrumentation/interactionTracking/DdEventsInterceptor.d.ts +25 -0
  110. package/lib/typescript/core/src/rum/instrumentation/interactionTracking/DdEventsInterceptor.d.ts.map +1 -0
  111. package/lib/typescript/core/src/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.d.ts +29 -0
  112. package/lib/typescript/core/src/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.d.ts.map +1 -0
  113. package/lib/typescript/core/src/rum/instrumentation/interactionTracking/EventsInterceptor.d.ts +4 -0
  114. package/lib/typescript/core/src/rum/instrumentation/interactionTracking/EventsInterceptor.d.ts.map +1 -0
  115. package/lib/typescript/core/src/rum/instrumentation/interactionTracking/NoOpEventsInterceptor.d.ts +5 -0
  116. package/lib/typescript/core/src/rum/instrumentation/interactionTracking/NoOpEventsInterceptor.d.ts.map +1 -0
  117. package/lib/typescript/core/src/rum/instrumentation/interactionTracking/ShallowObjectEqualityChecker.d.ts +8 -0
  118. package/lib/typescript/core/src/rum/instrumentation/interactionTracking/ShallowObjectEqualityChecker.d.ts.map +1 -0
  119. package/lib/typescript/core/src/rum/instrumentation/interactionTracking/ddBabelUtils.d.ts +9 -0
  120. package/lib/typescript/core/src/rum/instrumentation/interactionTracking/ddBabelUtils.d.ts.map +1 -0
  121. package/lib/typescript/core/src/rum/instrumentation/interactionTracking/getJsxRuntime.d.ts +2 -0
  122. package/lib/typescript/core/src/rum/instrumentation/interactionTracking/getJsxRuntime.d.ts.map +1 -0
  123. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/DdRumResourceTracking.d.ts +23 -0
  124. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/DdRumResourceTracking.d.ts.map +1 -0
  125. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/distributedTracing/DatadogTracingContext.d.ts +46 -0
  126. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/distributedTracing/DatadogTracingContext.d.ts.map +1 -0
  127. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/distributedTracing/DatadogTracingIdentifier.d.ts +24 -0
  128. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/distributedTracing/DatadogTracingIdentifier.d.ts.map +1 -0
  129. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/distributedTracing/TracingIdentifier.d.ts +121 -0
  130. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/distributedTracing/TracingIdentifier.d.ts.map +1 -0
  131. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.d.ts +14 -0
  132. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.d.ts.map +1 -0
  133. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingAttributes.d.ts +20 -0
  134. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingAttributes.d.ts.map +1 -0
  135. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingHeaders.d.ts +11 -0
  136. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingHeaders.d.ts.map +1 -0
  137. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingSampling.d.ts +12 -0
  138. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingSampling.d.ts.map +1 -0
  139. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/distributedTracing/firstPartyHosts.d.ts +9 -0
  140. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/distributedTracing/firstPartyHosts.d.ts.map +1 -0
  141. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/distributedTracing/headers.d.ts +24 -0
  142. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/distributedTracing/headers.d.ts.map +1 -0
  143. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/graphql/graphqlHeaders.d.ts +4 -0
  144. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/graphql/graphqlHeaders.d.ts.map +1 -0
  145. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/headers.d.ts +4 -0
  146. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/headers.d.ts.map +1 -0
  147. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/DatadogRumResource/ResourceReporter.d.ts +9 -0
  148. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/DatadogRumResource/ResourceReporter.d.ts.map +1 -0
  149. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/DatadogRumResource/internalDevResourceBlocklist.d.ts +7 -0
  150. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/DatadogRumResource/internalDevResourceBlocklist.d.ts.map +1 -0
  151. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/DatadogRumResource/resourceTiming.d.ts +18 -0
  152. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/DatadogRumResource/resourceTiming.d.ts.map +1 -0
  153. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/URLHostParser.d.ts +7 -0
  154. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/URLHostParser.d.ts.map +1 -0
  155. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.d.ts +22 -0
  156. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.d.ts.map +1 -0
  157. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/baggageHeaderUtils.d.ts +6 -0
  158. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/baggageHeaderUtils.d.ts.map +1 -0
  159. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/responseSize.d.ts +3 -0
  160. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/responseSize.d.ts.map +1 -0
  161. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/requestProxy/interfaces/RequestProxy.d.ts +14 -0
  162. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/requestProxy/interfaces/RequestProxy.d.ts.map +1 -0
  163. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/requestProxy/interfaces/RumResource.d.ts +28 -0
  164. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/requestProxy/interfaces/RumResource.d.ts.map +1 -0
  165. package/lib/typescript/core/src/rum/types.d.ts +218 -0
  166. package/lib/typescript/core/src/rum/types.d.ts.map +1 -0
  167. package/lib/typescript/core/src/sdk/AccountInfoSingleton/AccountInfoSingleton.d.ts +15 -0
  168. package/lib/typescript/core/src/sdk/AccountInfoSingleton/AccountInfoSingleton.d.ts.map +1 -0
  169. package/lib/typescript/core/src/sdk/AccountInfoSingleton/types.d.ts +6 -0
  170. package/lib/typescript/core/src/sdk/AccountInfoSingleton/types.d.ts.map +1 -0
  171. package/lib/typescript/core/src/sdk/AttributesEncoding/attributesEncoding.d.ts +13 -0
  172. package/lib/typescript/core/src/sdk/AttributesEncoding/attributesEncoding.d.ts.map +1 -0
  173. package/lib/typescript/core/src/sdk/AttributesEncoding/defaultEncoders.d.ts +33 -0
  174. package/lib/typescript/core/src/sdk/AttributesEncoding/defaultEncoders.d.ts.map +1 -0
  175. package/lib/typescript/core/src/sdk/AttributesEncoding/errorUtils.d.ts +15 -0
  176. package/lib/typescript/core/src/sdk/AttributesEncoding/errorUtils.d.ts.map +1 -0
  177. package/lib/typescript/core/src/sdk/AttributesEncoding/helpers.d.ts +17 -0
  178. package/lib/typescript/core/src/sdk/AttributesEncoding/helpers.d.ts.map +1 -0
  179. package/lib/typescript/core/src/sdk/AttributesEncoding/types.d.ts +21 -0
  180. package/lib/typescript/core/src/sdk/AttributesEncoding/types.d.ts.map +1 -0
  181. package/lib/typescript/core/src/sdk/AttributesEncoding/utils.d.ts +7 -0
  182. package/lib/typescript/core/src/sdk/AttributesEncoding/utils.d.ts.map +1 -0
  183. package/lib/typescript/core/src/sdk/AttributesSingleton/AttributesSingleton.d.ts +17 -0
  184. package/lib/typescript/core/src/sdk/AttributesSingleton/AttributesSingleton.d.ts.map +1 -0
  185. package/lib/typescript/core/src/sdk/AttributesSingleton/types.d.ts +4 -0
  186. package/lib/typescript/core/src/sdk/AttributesSingleton/types.d.ts.map +1 -0
  187. package/lib/typescript/core/src/sdk/DatadogEventEmitter/DatadogBatchedBridgeEventEmitter.d.ts +11 -0
  188. package/lib/typescript/core/src/sdk/DatadogEventEmitter/DatadogBatchedBridgeEventEmitter.d.ts.map +1 -0
  189. package/lib/typescript/core/src/sdk/DatadogEventEmitter/DatadogDefaultEventEmitter.d.ts +10 -0
  190. package/lib/typescript/core/src/sdk/DatadogEventEmitter/DatadogDefaultEventEmitter.d.ts.map +1 -0
  191. package/lib/typescript/core/src/sdk/DatadogEventEmitter/DatadogEventEmitter.d.ts +7 -0
  192. package/lib/typescript/core/src/sdk/DatadogEventEmitter/DatadogEventEmitter.d.ts.map +1 -0
  193. package/lib/typescript/core/src/sdk/DatadogEventEmitter/DatadogNativeEventEmitter.d.ts +12 -0
  194. package/lib/typescript/core/src/sdk/DatadogEventEmitter/DatadogNativeEventEmitter.d.ts.map +1 -0
  195. package/lib/typescript/core/src/sdk/DatadogInternalBridge/DdSdkInternalNativeBridge.d.ts +14 -0
  196. package/lib/typescript/core/src/sdk/DatadogInternalBridge/DdSdkInternalNativeBridge.d.ts.map +1 -0
  197. package/lib/typescript/core/src/sdk/DatadogInternalBridge/DdSdkInternalNativeBridgeEvent.d.ts +6 -0
  198. package/lib/typescript/core/src/sdk/DatadogInternalBridge/DdSdkInternalNativeBridgeEvent.d.ts.map +1 -0
  199. package/lib/typescript/core/src/sdk/DatadogProvider/Buffer/BoundedBuffer.d.ts +18 -0
  200. package/lib/typescript/core/src/sdk/DatadogProvider/Buffer/BoundedBuffer.d.ts.map +1 -0
  201. package/lib/typescript/core/src/sdk/DatadogProvider/Buffer/BufferSingleton.d.ts +8 -0
  202. package/lib/typescript/core/src/sdk/DatadogProvider/Buffer/BufferSingleton.d.ts.map +1 -0
  203. package/lib/typescript/core/src/sdk/DatadogProvider/Buffer/DatadogBuffer.d.ts +21 -0
  204. package/lib/typescript/core/src/sdk/DatadogProvider/Buffer/DatadogBuffer.d.ts.map +1 -0
  205. package/lib/typescript/core/src/sdk/DatadogProvider/Buffer/PassThroughBuffer.d.ts +8 -0
  206. package/lib/typescript/core/src/sdk/DatadogProvider/Buffer/PassThroughBuffer.d.ts.map +1 -0
  207. package/lib/typescript/core/src/sdk/DatadogProvider/Buffer/bufferNativeCall.d.ts +4 -0
  208. package/lib/typescript/core/src/sdk/DatadogProvider/Buffer/bufferNativeCall.d.ts.map +1 -0
  209. package/lib/typescript/core/src/sdk/DatadogProvider/DatadogProvider.d.ts +29 -0
  210. package/lib/typescript/core/src/sdk/DatadogProvider/DatadogProvider.d.ts.map +1 -0
  211. package/lib/typescript/core/src/sdk/DatadogProvider/DatadogProviderState.d.ts +9 -0
  212. package/lib/typescript/core/src/sdk/DatadogProvider/DatadogProviderState.d.ts.map +1 -0
  213. package/lib/typescript/core/src/sdk/DdSdk.d.ts +3 -0
  214. package/lib/typescript/core/src/sdk/DdSdk.d.ts.map +1 -0
  215. package/lib/typescript/core/src/sdk/DdSdkInternal.d.ts +39 -0
  216. package/lib/typescript/core/src/sdk/DdSdkInternal.d.ts.map +1 -0
  217. package/lib/typescript/core/src/sdk/EventMappers/EventMapper.d.ts +27 -0
  218. package/lib/typescript/core/src/sdk/EventMappers/EventMapper.d.ts.map +1 -0
  219. package/lib/typescript/core/src/sdk/EventMappers/utils/deepClone.d.ts +11 -0
  220. package/lib/typescript/core/src/sdk/EventMappers/utils/deepClone.d.ts.map +1 -0
  221. package/lib/typescript/core/src/sdk/GlobalState/GlobalState.d.ts +13 -0
  222. package/lib/typescript/core/src/sdk/GlobalState/GlobalState.d.ts.map +1 -0
  223. package/lib/typescript/core/src/sdk/UserInfoSingleton/UserInfoSingleton.d.ts +14 -0
  224. package/lib/typescript/core/src/sdk/UserInfoSingleton/UserInfoSingleton.d.ts.map +1 -0
  225. package/lib/typescript/core/src/sdk/UserInfoSingleton/types.d.ts +7 -0
  226. package/lib/typescript/core/src/sdk/UserInfoSingleton/types.d.ts.map +1 -0
  227. package/lib/typescript/core/src/specs/NativeDdFlags.d.ts +15 -0
  228. package/lib/typescript/core/src/specs/NativeDdFlags.d.ts.map +1 -0
  229. package/lib/typescript/core/src/specs/NativeDdLogs.d.ts +70 -0
  230. package/lib/typescript/core/src/specs/NativeDdLogs.d.ts.map +1 -0
  231. package/lib/typescript/core/src/specs/NativeDdRum.d.ts +149 -0
  232. package/lib/typescript/core/src/specs/NativeDdRum.d.ts.map +1 -0
  233. package/lib/typescript/core/src/specs/NativeDdSdk.d.ts +105 -0
  234. package/lib/typescript/core/src/specs/NativeDdSdk.d.ts.map +1 -0
  235. package/lib/typescript/core/src/specs/NativeDdTrace.d.ts +24 -0
  236. package/lib/typescript/core/src/specs/NativeDdTrace.d.ts.map +1 -0
  237. package/lib/typescript/core/src/trace/DdTrace.d.ts +3 -0
  238. package/lib/typescript/core/src/trace/DdTrace.d.ts.map +1 -0
  239. package/lib/typescript/core/src/types.d.ts +130 -0
  240. package/lib/typescript/core/src/types.d.ts.map +1 -0
  241. package/lib/typescript/core/src/utils/Timer.d.ts +22 -0
  242. package/lib/typescript/core/src/utils/Timer.d.ts.map +1 -0
  243. package/lib/typescript/core/src/utils/jsUtils.d.ts +2 -0
  244. package/lib/typescript/core/src/utils/jsUtils.d.ts.map +1 -0
  245. package/lib/typescript/core/src/utils/longTasksUtils.d.ts +7 -0
  246. package/lib/typescript/core/src/utils/longTasksUtils.d.ts.map +1 -0
  247. package/lib/typescript/core/src/utils/singletonUtils.d.ts +2 -0
  248. package/lib/typescript/core/src/utils/singletonUtils.d.ts.map +1 -0
  249. package/lib/typescript/core/src/utils/time-provider/DefaultTimeProvider.d.ts +8 -0
  250. package/lib/typescript/core/src/utils/time-provider/DefaultTimeProvider.d.ts.map +1 -0
  251. package/lib/typescript/core/src/utils/time-provider/TimeProvider.d.ts +19 -0
  252. package/lib/typescript/core/src/utils/time-provider/TimeProvider.d.ts.map +1 -0
  253. package/lib/typescript/core/src/version.d.ts +2 -0
  254. package/lib/typescript/core/src/version.d.ts.map +1 -0
  255. package/lib/typescript/react-native-openfeature/src/index.d.ts +5 -0
  256. package/lib/typescript/react-native-openfeature/src/index.d.ts.map +1 -0
  257. package/lib/typescript/react-native-openfeature/src/provider.d.ts +27 -0
  258. package/lib/typescript/react-native-openfeature/src/provider.d.ts.map +1 -0
  259. package/package.json +87 -0
  260. package/src/index.ts +11 -0
  261. package/src/provider.ts +180 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NativeDdRum.d.ts","sourceRoot":"","sources":["../../../../../../core/src/specs/NativeDdRum.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD;;GAEG;AACH,MAAM,WAAW,IAAK,SAAQ,WAAW;IACrC,QAAQ,CAAC,YAAY,EAAE,MAAM,EAAE,CAAC;IAEhC;;;;;;OAMG;IACH,SAAS,CACL,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,GACpB,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjB;;;;;OAKG;IACH,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE3E;;;;;;OAMG;IACH,WAAW,CACP,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,M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,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEhD;;;OAGG;IACH,iBAAiB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAErD;;;OAGG;IACH,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEpD;;;;OAIG;IACH,kBAAkB,CAAC,SAAS,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEtD;;OAEG;IACH,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAE7B;;;;;OAKG;IACH,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAErE;;OAEG;IACH,mBAAmB,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAEnD;;;;;OAKG;IACH,qBAAqB,CACjB,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,MAAM,GAAG,IAAI,EAC3B,UAAU,EAAE,MAAM,GACnB,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjB;;;;;;OAMG;IACH,uBAAuB,CACnB,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,MAAM,GAAG,IAAI,EAC3B,UAAU,EAAE,MAAM,GACnB,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjB;;;;;;;OAOG;IACH,oBAAoB,CAChB,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,MAAM,GAAG,IAAI,EAC3B,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,GACnB,OAAO,CAAC,IAAI,CAAC,CAAC;CACpB;;AAGD,wBAAsD"}
@@ -0,0 +1,105 @@
1
+ import type { TurboModule } from 'react-native';
2
+ /**
3
+ * Do not import this Spec directly, use DdNativeSdkType instead.
4
+ */
5
+ export type RumSessionStartedEvent = {
6
+ sessionId: string | null;
7
+ };
8
+ export interface Spec extends TurboModule {
9
+ readonly getConstants: () => {};
10
+ /**
11
+ * Initializes Datadog's features.
12
+ * @param configuration: The configuration to use.
13
+ */
14
+ initialize(configuration: Object): Promise<void>;
15
+ /**
16
+ * Adds a specific attribute to the global context attached with all future Logs, Spans and RUM.
17
+ * @param key: Key that identifies the attribute.
18
+ * @param value: Value linked to the attribute.
19
+ */
20
+ addAttribute(key: string, value: Object): Promise<void>;
21
+ /**
22
+ * Removes an attribute from the context attached with all future Logs, Spans and RUM events.
23
+ * @param key: They key associated with the attribute to be removed.
24
+ */
25
+ removeAttribute(key: string): Promise<void>;
26
+ /**
27
+ * Adds the global context (set of attributes) attached with all future Logs, Spans and RUM events.
28
+ * @param attributes: The global context attributes.
29
+ */
30
+ addAttributes(attributes: Object): Promise<void>;
31
+ /**
32
+ * Removes a set of attributes from the context attached with all future Logs, Spans and RUM events.
33
+ * @param keys: They keys associated with the attributes to be removed.
34
+ */
35
+ removeAttributes(keys: string[]): Promise<void>;
36
+ /**
37
+ * Set the user information.
38
+ * @param user: The user object (use builtin attributes: 'id', 'email', 'name', and any custom attribute under extraInfo).
39
+ */
40
+ setUserInfo(user: Object): Promise<Object>;
41
+ /**
42
+ * Clears the user information.
43
+ */
44
+ clearUserInfo(): Promise<void>;
45
+ /**
46
+ * Add custom attributes to the current user information
47
+ * @param extraInfo: The extraInfo object containing additionall custom attributes
48
+ */
49
+ addUserExtraInfo(extraInfo: Object): Promise<Object>;
50
+ /**
51
+ * Set the account information.
52
+ * @param account: The account object (use builtin attributes: 'id', 'name', and any custom attribute under extraInfo).
53
+ */
54
+ setAccountInfo(account: Object): Promise<Object>;
55
+ /**
56
+ * Clears the account information.
57
+ */
58
+ clearAccountInfo(): Promise<void>;
59
+ /**
60
+ * Add custom attributes to the current account information
61
+ * @param extraInfo: The extraInfo object containing additional custom attributes
62
+ */
63
+ addAccountExtraInfo(extraInfo: Object): Promise<Object>;
64
+ /**
65
+ * Set the tracking consent regarding the data collection.
66
+ * @param trackingConsent: Consent, which can take one of the following values: 'pending', 'granted', 'not_granted'.
67
+ */
68
+ setTrackingConsent(trackingConsent: string): Promise<void>;
69
+ /**
70
+ * Sends internal telemetry message with attributes
71
+ * @param message message
72
+ * @param attributes attributes
73
+ */
74
+ sendTelemetryLog(message: string, attributes: Object, config: Object): Promise<void>;
75
+ /**
76
+ * Sends internal telemetry debug message
77
+ * @param message debug message
78
+ */
79
+ telemetryDebug(message: string): Promise<void>;
80
+ /**
81
+ * Sends internal telemetry error
82
+ * @param message error message
83
+ * @param stack error stack
84
+ * @param kind error kind
85
+ */
86
+ telemetryError(message: string, stack: string, kind: string): Promise<void>;
87
+ /**
88
+ * Send webview telemetry logs
89
+ * @param message event description
90
+ */
91
+ consumeWebviewEvent(message: string): Promise<void>;
92
+ /**
93
+ * Clears all data that has not already been sent to Datadog servers
94
+ */
95
+ clearAllData(): Promise<void>;
96
+ /**
97
+ * Required definitions, because of:
98
+ * https://github.com/react-native-community/RNNewArchitectureLibraries/tree/feat/swift-event-emitter?tab=readme-ov-file#codegen-update-codegen-specs)
99
+ */
100
+ addListener: (eventType: string) => void;
101
+ removeListeners: (count: number) => void;
102
+ }
103
+ declare const _default: Spec | null;
104
+ export default _default;
105
+ //# sourceMappingURL=NativeDdSdk.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NativeDdSdk.d.ts","sourceRoot":"","sources":["../../../../../../core/src/specs/NativeDdSdk.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD;;GAEG;AAEH,MAAM,MAAM,sBAAsB,GAAG;IACjC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B,CAAC;AAEF,MAAM,WAAW,IAAK,SAAQ,WAAW;IACrC,QAAQ,CAAC,YAAY,EAAE,MAAM,EAAE,CAAC;IAEhC;;;OAGG;IACH,UAAU,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjD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M,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE5E;;;OAGG;IACH,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEpD;;OAEG;IACH,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAE9B;;;OAGG;IACH,WAAW,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,eAAe,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAC5C;;AAGD,wBAAsD"}
@@ -0,0 +1,24 @@
1
+ import type { TurboModule } from 'react-native';
2
+ /**
3
+ * Do not import this Spec directly, use DdNativeTraceType instead.
4
+ */
5
+ export interface Spec extends TurboModule {
6
+ readonly getConstants: () => {};
7
+ /**
8
+ * Start a span, and returns a unique identifier for the span.
9
+ * @param operation: The operation name of the span.
10
+ * @param context: The additional context to send.
11
+ * @param timestampMs: The timestamp when the operation started (in milliseconds). If not provided, current timestamp will be used.
12
+ */
13
+ startSpan(operation: string, context: Object, timestampMs: number): Promise<string>;
14
+ /**
15
+ * Finish a started span.
16
+ * @param spanId: The unique identifier of the span.
17
+ * @param context: The additional context to send.
18
+ * @param timestampMs: The timestamp when the operation stopped (in milliseconds). If not provided, current timestamp will be used.
19
+ */
20
+ finishSpan(spanId: string, context: Object, timestampMs: number): Promise<void>;
21
+ }
22
+ declare const _default: Spec | null;
23
+ export default _default;
24
+ //# sourceMappingURL=NativeDdTrace.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NativeDdTrace.d.ts","sourceRoot":"","sources":["../../../../../../core/src/specs/NativeDdTrace.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD;;GAEG;AACH,MAAM,WAAW,IAAK,SAAQ,WAAW;IACrC,QAAQ,CAAC,YAAY,EAAE,MAAM,EAAE,CAAC;IAEhC;;;;;OAKG;IACH,SAAS,CACL,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,GACpB,OAAO,CAAC,MAAM,CAAC,CAAC;IAEnB;;;;;OAKG;IACH,UAAU,CACN,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,GACpB,OAAO,CAAC,IAAI,CAAC,CAAC;CACpB;;AAGD,wBAAwD"}
@@ -0,0 +1,3 @@
1
+ import type { DdTraceType } from '../types';
2
+ export declare const DdTrace: DdTraceType;
3
+ //# sourceMappingURL=DdTrace.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DdTrace.d.ts","sourceRoot":"","sources":["../../../../../../core/src/trace/DdTrace.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAkD5C,eAAO,MAAM,OAAO,EAAE,WAGrB,CAAC"}
@@ -0,0 +1,130 @@
1
+ import type { DdSdkNativeConfiguration } from './config/features/CoreConfigurationNative';
2
+ declare global {
3
+ var __DD_RN_BABEL_PLUGIN_ENABLED__: boolean;
4
+ }
5
+ /**
6
+ * The entry point to initialize Datadog's features.
7
+ */
8
+ export type DdSdkType = {
9
+ /**
10
+ * Initializes Datadog's features.
11
+ * @param configuration: The configuration to use.
12
+ */
13
+ initialize(configuration: DdSdkNativeConfiguration): Promise<void>;
14
+ /**
15
+ * Sets a specific attribute in the global context attached with all future Logs, Spans and RUM
16
+ * @param key: Key that identifies the attribute.
17
+ * @param value: Value linked to the attribute.
18
+ */
19
+ addAttribute(key: string, value: object): Promise<void>;
20
+ /**
21
+ * Removes an attribute from the context attached with all future Logs, Spans and RUM events.
22
+ * @param key: They key associated with the attribute to be removed.
23
+ */
24
+ removeAttribute(key: string): Promise<void>;
25
+ /**
26
+ * Sets the global context (set of attributes) attached with all future Logs, Spans and RUM events.
27
+ * @param attributes: The global context attributes.
28
+ */
29
+ addAttributes(attributes: object): Promise<void>;
30
+ /**
31
+ * Removes a set of attributes from the context attached with all future Logs, Spans and RUM events.
32
+ * @param keys: They keys associated with the attributes to be removed.
33
+ */
34
+ removeAttributes(keys: string[]): Promise<void>;
35
+ /**
36
+ * Sets the user information.
37
+ * @param id: A unique user identifier (relevant to your business domain)
38
+ * @param name: The user name or alias.
39
+ * @param email: The user email.
40
+ * @param extraInfo: Additional information.
41
+ */
42
+ setUserInfo(userInfo: UserInfo): Promise<void>;
43
+ /**
44
+ * Clears the user information.
45
+ */
46
+ clearUserInfo(): Promise<void>;
47
+ /**
48
+ * Add additional user information.
49
+ * @param extraUserInfo: The additional information. (To set the id, name or email please user setUserInfo).
50
+ */
51
+ addUserExtraInfo(extraUserInfo: Record<string, unknown>): Promise<void>;
52
+ /**
53
+ * Sets the account information.
54
+ * @param id: A unique account identifier (relevant to your business domain)
55
+ * @param name: The account name.
56
+ * @param extraInfo: Additional information.
57
+ */
58
+ setAccountInfo(accountInfo: AccountInfo): Promise<void>;
59
+ /**
60
+ * Clears the account information.
61
+ */
62
+ clearAccountInfo(): Promise<void>;
63
+ /**
64
+ * Add additional account information.
65
+ * @param extraAccountInfo: The additional information. (To set the id or name please use setAccountInfo).
66
+ */
67
+ addAccountExtraInfo(extraAccountInfo: Record<string, unknown>): Promise<void>;
68
+ /**
69
+ * Set the tracking consent regarding the data collection.
70
+ * @param trackingConsent: Consent, which can take one of the following values: 'pending', 'granted', 'not_granted'.
71
+ */
72
+ setTrackingConsent(trackingConsent: string): Promise<void>;
73
+ };
74
+ /**
75
+ * The entry point to use Datadog's Trace feature.
76
+ */
77
+ export type DdTraceType = {
78
+ /**
79
+ * Start a span, and returns a unique identifier for the span.
80
+ * @param operation: The operation name of the span.
81
+ * @param context: The additional context to send.
82
+ * @param timestampMs: The timestamp when the operation started (in milliseconds). If not provided, current timestamp will be used.
83
+ */
84
+ startSpan(operation: string, context?: object, timestampMs?: number): Promise<string>;
85
+ /**
86
+ * Finish a started span.
87
+ * @param spanId: The unique identifier of the span.
88
+ * @param context: The additional context to send.
89
+ * @param timestampMs: The timestamp when the operation stopped (in milliseconds). If not provided, current timestamp will be used.
90
+ */
91
+ finishSpan(spanId: string, context?: object, timestampMs?: number): Promise<void>;
92
+ };
93
+ export type UserInfo = {
94
+ id: string;
95
+ name?: string;
96
+ email?: string;
97
+ extraInfo?: object;
98
+ };
99
+ export type AccountInfo = {
100
+ id: string;
101
+ name?: string;
102
+ extraInfo?: object;
103
+ };
104
+ export type LogStatus = 'debug' | 'info' | 'warn' | 'error';
105
+ export type LogEvent = {
106
+ message: string;
107
+ context: object;
108
+ errorKind?: string;
109
+ errorMessage?: string;
110
+ stacktrace?: string;
111
+ fingerprint?: string;
112
+ readonly source?: ErrorSource;
113
+ readonly status: LogStatus;
114
+ readonly userInfo?: UserInfo;
115
+ readonly attributes?: object;
116
+ };
117
+ export type LogEventMapper = (logEvent: LogEvent) => LogEvent | null;
118
+ export declare enum ErrorSource {
119
+ NETWORK = "NETWORK",
120
+ SOURCE = "SOURCE",
121
+ CONSOLE = "CONSOLE",
122
+ WEBVIEW = "WEBVIEW",
123
+ CUSTOM = "CUSTOM"
124
+ }
125
+ export declare enum FeatureOperationFailure {
126
+ ERROR = "ERROR",
127
+ ABANDONED = "ABANDONED",
128
+ OTHER = "OTHER"
129
+ }
130
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../core/src/types.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AAE1F,OAAO,CAAC,MAAM,CAAC;IAEX,IAAI,8BAA8B,EAAE,OAAO,CAAC;CAC/C;AAED;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG;IACpB;;;OAGG;IACH,UAAU,CAAC,aAAa,EAAE,wBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEnE;;;;OAIG;IACH,YAAY,CAAC,GAAG,E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@@ -0,0 +1,22 @@
1
+ import type { TimeProvider } from './time-provider/TimeProvider';
2
+ /**
3
+ * Simple timer which records time ticks. Shouldn't be re-used once stopped.
4
+ * All timestamps/durations returned are in milliseconds.
5
+ */
6
+ export declare class Timer {
7
+ private timeProvider;
8
+ private times;
9
+ constructor(timeProvider?: TimeProvider);
10
+ get startTime(): number;
11
+ get stopTime(): number;
12
+ start(): void;
13
+ stop(): void;
14
+ recordTick(label: string): void;
15
+ hasTickFor(label: string): boolean;
16
+ durationBetween(startLabel: string, endLabel: string): number;
17
+ timeAt(label: string): number;
18
+ reset(): void;
19
+ private durationBetweenTicks;
20
+ private checkLabelExists;
21
+ }
22
+ //# sourceMappingURL=Timer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Timer.d.ts","sourceRoot":"","sources":["../../../../../../core/src/utils/Timer.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,YAAY,EAAa,MAAM,8BAA8B,CAAC;AAK5E;;;GAGG;AACH,qBAAa,KAAK;IACd,OAAO,CAAC,YAAY,CAAe;IACnC,OAAO,CAAC,KAAK,CAAiC;gBAElC,YAAY,GAAE,YAAwC;IAIlE,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED,IAAI,QAAQ,IAAI,MAAM,CAErB;IAED,KAAK,IAAI,IAAI;IAIb,IAAI,IAAI,IAAI;IAIZ,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAI/B,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;IAIlC,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM;IAU7D,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAM7B,KAAK,IAAI,IAAI;IAIb,OAAO,CAAC,oBAAoB;IAO5B,OAAO,CAAC,gBAAgB;CAK3B"}
@@ -0,0 +1,2 @@
1
+ export declare const executeWithDelay: <T>(callback: () => T, delay: number) => Promise<T>;
2
+ //# sourceMappingURL=jsUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jsUtils.d.ts","sourceRoot":"","sources":["../../../../../../core/src/utils/jsUtils.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,gBAAgB,gCAElB,MAAM,eAWhB,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Makes sure the long task threshold value is above 100 and below 5000.
3
+ * Also makes sure it is a number, passing `0` if it is `false`, as the React Native
4
+ * bridge cannot handle values with dual types.
5
+ */
6
+ export declare const adaptLongTaskThreshold: (longTaskThreshold: number) => number;
7
+ //# sourceMappingURL=longTasksUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"longTasksUtils.d.ts","sourceRoot":"","sources":["../../../../../../core/src/utils/longTasksUtils.ts"],"names":[],"mappings":"AAUA;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,sBAAuB,MAAM,KAAG,MAYlE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const getGlobalInstance: <T>(key: string, objectConstructor: () => T) => T;
2
+ //# sourceMappingURL=singletonUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"singletonUtils.d.ts","sourceRoot":"","sources":["../../../../../../core/src/utils/singletonUtils.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,iBAAiB,WACrB,MAAM,kCAUd,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { TimeProvider } from './TimeProvider';
2
+ import type { Timestamp } from './TimeProvider';
3
+ export declare class DefaultTimeProvider extends TimeProvider {
4
+ private canUsePerformanceNow;
5
+ getTimestamp(): Timestamp;
6
+ private performanceNow;
7
+ }
8
+ //# sourceMappingURL=DefaultTimeProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DefaultTimeProvider.d.ts","sourceRoot":"","sources":["../../../../../../../core/src/utils/time-provider/DefaultTimeProvider.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD,qBAAa,mBAAoB,SAAQ,YAAY;IACjD,OAAO,CAAC,oBAAoB,CAGoC;IAEhE,YAAY,IAAI,SAAS;IAOzB,OAAO,CAAC,cAAc;CAQzB"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * A Timestamp structure holding the
3
+ */
4
+ export type Timestamp = {
5
+ unix: number;
6
+ reactNative: number | null;
7
+ };
8
+ /**
9
+ * Simple class providing timestamps in milliseconds.
10
+ * If available, it will use the `performance.now()` method, and will fallback on `Date.now()` otherwise.
11
+ */
12
+ export declare abstract class TimeProvider {
13
+ /** Keeps an average offset between the unix time and the provided timestamp. */
14
+ protected baseOffset: number;
15
+ constructor();
16
+ abstract getTimestamp(): Timestamp;
17
+ now(): number;
18
+ }
19
+ //# sourceMappingURL=TimeProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TimeProvider.d.ts","sourceRoot":"","sources":["../../../../../../../core/src/utils/time-provider/TimeProvider.tsx"],"names":[],"mappings":"AAMA;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG;IAEpB,IAAI,EAAE,MAAM,CAAC;IAGb,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B,CAAC;AAEF;;;GAGG;AACH,8BAAsB,YAAY;IAC9B,gFAAgF;IAChF,SAAS,CAAC,UAAU,EAAE,MAAM,CAAC;;IAW7B,QAAQ,CAAC,YAAY,IAAI,SAAS;IAElC,GAAG,IAAI,MAAM;CAahB"}
@@ -0,0 +1,2 @@
1
+ export declare const version = "3.1.0";
2
+ //# sourceMappingURL=version.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../../../../core/src/version.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,OAAO,UAAU,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { DatadogOpenFeatureProvider } from './provider';
2
+ import type { DatadogOpenFeatureProviderOptions } from './provider';
3
+ export { DatadogOpenFeatureProvider };
4
+ export type { DatadogOpenFeatureProviderOptions };
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,YAAY,CAAC;AAEpE,OAAO,EAAE,0BAA0B,EAAE,CAAC;AACtC,YAAY,EAAE,iCAAiC,EAAE,CAAC"}
@@ -0,0 +1,27 @@
1
+ import type { EvaluationContext as OFEvaluationContext, JsonValue, Logger, Paradigm, Provider, ProviderMetadata, ResolutionDetails, ProviderEventEmitter, ProviderEvents } from '@openfeature/web-sdk';
2
+ export interface DatadogOpenFeatureProviderOptions {
3
+ /**
4
+ * The name of the Datadog Flags client to use.
5
+ *
6
+ * Provide this parameter in order to use different Datadog Flags clients for different OpenFeature domains.
7
+ *
8
+ * @default 'default'
9
+ */
10
+ clientName?: string;
11
+ }
12
+ export declare class DatadogOpenFeatureProvider implements Provider {
13
+ readonly runsOn: Paradigm;
14
+ readonly metadata: ProviderMetadata;
15
+ private options;
16
+ private flagsClient;
17
+ readonly events: ProviderEventEmitter<ProviderEvents>;
18
+ private contextChangePromise;
19
+ constructor(options?: DatadogOpenFeatureProviderOptions);
20
+ initialize(context?: OFEvaluationContext): Promise<void>;
21
+ onContextChange(_oldContext: OFEvaluationContext, newContext: OFEvaluationContext): Promise<void>;
22
+ resolveBooleanEvaluation(flagKey: string, defaultValue: boolean, _context: OFEvaluationContext, _logger: Logger): ResolutionDetails<boolean>;
23
+ resolveStringEvaluation(flagKey: string, defaultValue: string, _context: OFEvaluationContext, _logger: Logger): ResolutionDetails<string>;
24
+ resolveNumberEvaluation(flagKey: string, defaultValue: number, _context: OFEvaluationContext, _logger: Logger): ResolutionDetails<number>;
25
+ resolveObjectEvaluation<T extends JsonValue>(flagKey: string, defaultValue: T, _context: OFEvaluationContext, _logger: Logger): ResolutionDetails<T>;
26
+ }
27
+ //# sourceMappingURL=provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../../src/provider.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EACR,iBAAiB,IAAI,mBAAmB,EACxC,SAAS,EACT,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,gBAAgB,EAChB,iBAAiB,EAEjB,oBAAoB,EACpB,cAAc,EACjB,MAAM,sBAAsB,CAAC;AAE9B,MAAM,WAAW,iCAAiC;IAC9C;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,qBAAa,0BAA2B,YAAW,QAAQ;IACvD,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAY;IACrC,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,CAEjC;IAEF,OAAO,CAAC,OAAO,CAAoC;IACnD,OAAO,CAAC,WAAW,CAAc;IAEjC,QAAQ,CAAC,MAAM,EAAE,oBAAoB,CAAC,cAAc,CAAC,CAAiC;IACtF,OAAO,CAAC,oBAAoB,CAAqB;gBAErC,OAAO,GAAE,iCAAsC;IAUrD,UAAU,CAAC,OAAO,GAAE,mBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC;IAS5D,eAAe,CACjB,WAAW,EAAE,mBAAmB,EAChC,UAAU,EAAE,mBAAmB,GAChC,OAAO,CAAC,IAAI,CAAC;IAYhB,wBAAwB,CACpB,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,OAAO,EACrB,QAAQ,EAAE,mBAAmB,EAC7B,OAAO,EAAE,MAAM,GAChB,iBAAiB,CAAC,OAAO,CAAC;IAQ7B,uBAAuB,CACnB,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,mBAAmB,EAC7B,OAAO,EAAE,MAAM,GAChB,iBAAiB,CAAC,MAAM,CAAC;IAQ5B,uBAAuB,CACnB,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,mBAAmB,EAC7B,OAAO,EAAE,MAAM,GAChB,iBAAiB,CAAC,MAAM,CAAC;IAQ5B,uBAAuB,CAAC,CAAC,SAAS,SAAS,EACvC,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,CAAC,EACf,QAAQ,EAAE,mBAAmB,EAC7B,OAAO,EAAE,MAAM,GAChB,iBAAiB,CAAC,CAAC,CAAC;CAY1B"}
package/package.json ADDED
@@ -0,0 +1,87 @@
1
+ {
2
+ "name": "@datadog/mobile-react-native-openfeature",
3
+ "version": "3.1.0",
4
+ "description": "A client-side React Native module to provide OpenFeature integration with Datadog Feature Flags",
5
+ "keywords": [
6
+ "datadog",
7
+ "react-native",
8
+ "ios",
9
+ "android",
10
+ "openfeature",
11
+ "feature-flags"
12
+ ],
13
+ "author": "Datadog (https://github.com/DataDog)",
14
+ "homepage": "https://github.com/DataDog/dd-sdk-reactnative#readme",
15
+ "repository": {
16
+ "url": "https://github.com/DataDog/dd-sdk-reactnative",
17
+ "directory": "packages/react-native-openfeature"
18
+ },
19
+ "bugs": {
20
+ "url": "https://github.com/DataDog/dd-sdk-reactnative/issues"
21
+ },
22
+ "license": "Apache-2.0",
23
+ "main": "lib/commonjs/index",
24
+ "files": [
25
+ "src/**",
26
+ "lib/**"
27
+ ],
28
+ "types": "lib/typescript/react-native-openfeature/src/index.d.ts",
29
+ "react-native": "src/index",
30
+ "source": "src/index",
31
+ "module": "lib/module/index",
32
+ "publishConfig": {
33
+ "access": "public"
34
+ },
35
+ "scripts": {
36
+ "test": "jest",
37
+ "lint": "eslint .",
38
+ "prepare": "rm -rf lib && yarn bob build"
39
+ },
40
+ "devDependencies": {
41
+ "@datadog/mobile-react-native": "^3.1.0",
42
+ "@openfeature/core": "^1.8.0",
43
+ "@openfeature/web-sdk": "^1.5.0",
44
+ "@testing-library/react-native": "7.0.2",
45
+ "react-native-builder-bob": "0.26.0",
46
+ "react-native-gesture-handler": "1.10.3"
47
+ },
48
+ "peerDependencies": {
49
+ "@datadog/mobile-react-native": "^3.1.0",
50
+ "@openfeature/web-sdk": "^1.5.0",
51
+ "react": ">=16.13.1",
52
+ "react-native": ">=0.63.4 <1.0"
53
+ },
54
+ "jest": {
55
+ "preset": "react-native",
56
+ "moduleNameMapper": {
57
+ "@datadog/mobile-react-native": "<rootDir>../core/src"
58
+ },
59
+ "modulePathIgnorePatterns": [
60
+ "<rootDir>/lib/"
61
+ ],
62
+ "setupFiles": [
63
+ "./../../node_modules/react-native-gesture-handler/jestSetup.js"
64
+ ],
65
+ "testPathIgnorePatterns": [
66
+ "/__utils__/"
67
+ ],
68
+ "transformIgnorePatterns": [
69
+ "jest-runner"
70
+ ]
71
+ },
72
+ "react-native-builder-bob": {
73
+ "source": "src",
74
+ "output": "lib",
75
+ "targets": [
76
+ "commonjs",
77
+ "module",
78
+ [
79
+ "typescript",
80
+ {
81
+ "tsc": "./../../node_modules/.bin/tsc"
82
+ }
83
+ ]
84
+ ]
85
+ },
86
+ "gitHead": "fbb259da0575dba36fb1bb163aa21462d204940c"
87
+ }
package/src/index.ts ADDED
@@ -0,0 +1,11 @@
1
+ /*
2
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
3
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
4
+ * Copyright 2016-Present Datadog, Inc.
5
+ */
6
+
7
+ import { DatadogOpenFeatureProvider } from './provider';
8
+ import type { DatadogOpenFeatureProviderOptions } from './provider';
9
+
10
+ export { DatadogOpenFeatureProvider };
11
+ export type { DatadogOpenFeatureProviderOptions };