cactus-react-native 1.5.0 → 1.10.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 (221) hide show
  1. package/Cactus.podspec +1 -1
  2. package/README.md +347 -241
  3. package/android/CMakeLists.txt +24 -5
  4. package/android/src/main/jniLibs/arm64-v8a/libcactus.a +0 -0
  5. package/android/src/main/jniLibs/arm64-v8a/libcurl.a +0 -0
  6. package/android/src/main/jniLibs/arm64-v8a/libmbedcrypto.a +0 -0
  7. package/android/src/main/jniLibs/arm64-v8a/libmbedtls.a +0 -0
  8. package/android/src/main/jniLibs/arm64-v8a/libmbedx509.a +0 -0
  9. package/cpp/HybridCactus.cpp +197 -117
  10. package/cpp/HybridCactus.hpp +18 -9
  11. package/cpp/cactus_ffi.h +66 -42
  12. package/ios/cactus.xcframework/ios-arm64/cactus.framework/Headers/cactus.h +0 -1
  13. package/ios/cactus.xcframework/ios-arm64/cactus.framework/Headers/cactus_cloud.h +48 -0
  14. package/ios/cactus.xcframework/ios-arm64/cactus.framework/Headers/cactus_ffi.h +66 -42
  15. package/ios/cactus.xcframework/ios-arm64/cactus.framework/Headers/cactus_utils.h +568 -135
  16. package/ios/cactus.xcframework/ios-arm64/cactus.framework/Headers/engine.h +148 -17
  17. package/ios/cactus.xcframework/ios-arm64/cactus.framework/Headers/graph.h +145 -36
  18. package/ios/cactus.xcframework/ios-arm64/cactus.framework/Headers/kernel.h +187 -6
  19. package/ios/cactus.xcframework/ios-arm64/cactus.framework/Headers/kernel_utils.h +49 -149
  20. package/ios/cactus.xcframework/ios-arm64/cactus.framework/Info.plist +0 -0
  21. package/ios/cactus.xcframework/ios-arm64/cactus.framework/cactus +0 -0
  22. package/ios/cactus.xcframework/ios-arm64-simulator/cactus.framework/Headers/cactus.h +0 -1
  23. package/ios/cactus.xcframework/ios-arm64-simulator/cactus.framework/Headers/cactus_cloud.h +48 -0
  24. package/ios/cactus.xcframework/ios-arm64-simulator/cactus.framework/Headers/cactus_ffi.h +66 -42
  25. package/ios/cactus.xcframework/ios-arm64-simulator/cactus.framework/Headers/cactus_utils.h +568 -135
  26. package/ios/cactus.xcframework/ios-arm64-simulator/cactus.framework/Headers/engine.h +148 -17
  27. package/ios/cactus.xcframework/ios-arm64-simulator/cactus.framework/Headers/graph.h +145 -36
  28. package/ios/cactus.xcframework/ios-arm64-simulator/cactus.framework/Headers/kernel.h +187 -6
  29. package/ios/cactus.xcframework/ios-arm64-simulator/cactus.framework/Headers/kernel_utils.h +49 -149
  30. package/ios/cactus.xcframework/ios-arm64-simulator/cactus.framework/Info.plist +0 -0
  31. package/ios/cactus.xcframework/ios-arm64-simulator/cactus.framework/_CodeSignature/CodeResources +1 -1
  32. package/ios/cactus.xcframework/ios-arm64-simulator/cactus.framework/cactus +0 -0
  33. package/lib/module/classes/CactusLM.js +16 -49
  34. package/lib/module/classes/CactusLM.js.map +1 -1
  35. package/lib/module/classes/CactusSTT.js +41 -75
  36. package/lib/module/classes/CactusSTT.js.map +1 -1
  37. package/lib/module/classes/CactusVAD.js +95 -0
  38. package/lib/module/classes/CactusVAD.js.map +1 -0
  39. package/lib/module/hooks/useCactusLM.js +10 -11
  40. package/lib/module/hooks/useCactusLM.js.map +1 -1
  41. package/lib/module/hooks/useCactusSTT.js +23 -62
  42. package/lib/module/hooks/useCactusSTT.js.map +1 -1
  43. package/lib/module/hooks/useCactusVAD.js +171 -0
  44. package/lib/module/hooks/useCactusVAD.js.map +1 -0
  45. package/lib/module/index.js +2 -3
  46. package/lib/module/index.js.map +1 -1
  47. package/lib/module/modelRegistry.js +52 -0
  48. package/lib/module/modelRegistry.js.map +1 -0
  49. package/lib/module/native/Cactus.js +103 -23
  50. package/lib/module/native/Cactus.js.map +1 -1
  51. package/lib/module/native/CactusIndex.js.map +1 -1
  52. package/lib/module/native/index.js +0 -3
  53. package/lib/module/native/index.js.map +1 -1
  54. package/lib/module/types/CactusVAD.js +4 -0
  55. package/lib/module/{specs/CactusUtil.nitro.js.map → types/CactusVAD.js.map} +1 -1
  56. package/lib/typescript/src/classes/CactusLM.d.ts +5 -7
  57. package/lib/typescript/src/classes/CactusLM.d.ts.map +1 -1
  58. package/lib/typescript/src/classes/CactusSTT.d.ts +9 -12
  59. package/lib/typescript/src/classes/CactusSTT.d.ts.map +1 -1
  60. package/lib/typescript/src/classes/CactusVAD.d.ts +20 -0
  61. package/lib/typescript/src/classes/CactusVAD.d.ts.map +1 -0
  62. package/lib/typescript/src/hooks/useCactusLM.d.ts +2 -2
  63. package/lib/typescript/src/hooks/useCactusLM.d.ts.map +1 -1
  64. package/lib/typescript/src/hooks/useCactusSTT.d.ts +6 -8
  65. package/lib/typescript/src/hooks/useCactusSTT.d.ts.map +1 -1
  66. package/lib/typescript/src/hooks/useCactusVAD.d.ts +15 -0
  67. package/lib/typescript/src/hooks/useCactusVAD.d.ts.map +1 -0
  68. package/lib/typescript/src/index.d.ts +7 -5
  69. package/lib/typescript/src/index.d.ts.map +1 -1
  70. package/lib/typescript/src/modelRegistry.d.ts +5 -0
  71. package/lib/typescript/src/modelRegistry.d.ts.map +1 -0
  72. package/lib/typescript/src/native/Cactus.d.ts +13 -11
  73. package/lib/typescript/src/native/Cactus.d.ts.map +1 -1
  74. package/lib/typescript/src/native/CactusIndex.d.ts +2 -2
  75. package/lib/typescript/src/native/CactusIndex.d.ts.map +1 -1
  76. package/lib/typescript/src/native/index.d.ts +0 -3
  77. package/lib/typescript/src/native/index.d.ts.map +1 -1
  78. package/lib/typescript/src/specs/Cactus.nitro.d.ts +7 -6
  79. package/lib/typescript/src/specs/Cactus.nitro.d.ts.map +1 -1
  80. package/lib/typescript/src/types/CactusIndex.d.ts +2 -2
  81. package/lib/typescript/src/types/CactusIndex.d.ts.map +1 -1
  82. package/lib/typescript/src/types/CactusLM.d.ts +19 -11
  83. package/lib/typescript/src/types/CactusLM.d.ts.map +1 -1
  84. package/lib/typescript/src/types/CactusSTT.d.ts +44 -12
  85. package/lib/typescript/src/types/CactusSTT.d.ts.map +1 -1
  86. package/lib/typescript/src/types/CactusVAD.d.ts +34 -0
  87. package/lib/typescript/src/types/CactusVAD.d.ts.map +1 -0
  88. package/lib/typescript/src/types/common.d.ts +1 -6
  89. package/lib/typescript/src/types/common.d.ts.map +1 -1
  90. package/nitro.json +0 -11
  91. package/nitrogen/generated/android/cactus+autolinking.cmake +0 -5
  92. package/nitrogen/generated/android/cactusOnLoad.cpp +0 -30
  93. package/nitrogen/generated/ios/Cactus-Swift-Cxx-Bridge.cpp +0 -50
  94. package/nitrogen/generated/ios/Cactus-Swift-Cxx-Bridge.hpp +9 -147
  95. package/nitrogen/generated/ios/Cactus-Swift-Cxx-Umbrella.hpp +0 -13
  96. package/nitrogen/generated/ios/CactusAutolinking.mm +0 -26
  97. package/nitrogen/generated/ios/CactusAutolinking.swift +0 -30
  98. package/nitrogen/generated/shared/c++/HybridCactusSpec.cpp +5 -4
  99. package/nitrogen/generated/shared/c++/HybridCactusSpec.hpp +7 -6
  100. package/package.json +3 -3
  101. package/src/classes/CactusLM.ts +18 -65
  102. package/src/classes/CactusSTT.ts +52 -90
  103. package/src/classes/CactusVAD.ts +129 -0
  104. package/src/hooks/useCactusLM.ts +14 -17
  105. package/src/hooks/useCactusSTT.ts +47 -98
  106. package/src/hooks/useCactusVAD.ts +215 -0
  107. package/src/index.tsx +21 -12
  108. package/src/modelRegistry.ts +65 -0
  109. package/src/native/Cactus.ts +131 -38
  110. package/src/native/CactusIndex.ts +2 -2
  111. package/src/native/index.ts +0 -3
  112. package/src/specs/Cactus.nitro.ts +16 -7
  113. package/src/types/CactusIndex.ts +2 -2
  114. package/src/types/CactusLM.ts +19 -11
  115. package/src/types/CactusSTT.ts +47 -13
  116. package/src/types/CactusVAD.ts +39 -0
  117. package/src/types/common.ts +1 -6
  118. package/android/src/main/java/com/margelo/nitro/cactus/HybridCactusCrypto.kt +0 -46
  119. package/android/src/main/java/com/margelo/nitro/cactus/HybridCactusDeviceInfo.kt +0 -27
  120. package/android/src/main/jniLibs/arm64-v8a/libcactus_util.a +0 -0
  121. package/cpp/HybridCactusUtil.cpp +0 -47
  122. package/cpp/HybridCactusUtil.hpp +0 -27
  123. package/cpp/cactus_util.h +0 -25
  124. package/ios/HybridCactusCrypto.swift +0 -37
  125. package/ios/HybridCactusDeviceInfo.swift +0 -32
  126. package/ios/cactus.xcframework/ios-arm64/cactus.framework/Headers/cactus_telemetry.h +0 -656
  127. package/ios/cactus.xcframework/ios-arm64-simulator/cactus.framework/Headers/cactus_telemetry.h +0 -656
  128. package/ios/cactus_util.xcframework/Info.plist +0 -39
  129. package/ios/cactus_util.xcframework/ios-arm64/cactus_util.framework/Headers/cactus_util.h +0 -25
  130. package/ios/cactus_util.xcframework/ios-arm64/cactus_util.framework/Headers/database.h +0 -27
  131. package/ios/cactus_util.xcframework/ios-arm64/cactus_util.framework/Headers/ios_utils.h +0 -10
  132. package/ios/cactus_util.xcframework/ios-arm64/cactus_util.framework/Headers/logging.h +0 -25
  133. package/ios/cactus_util.xcframework/ios-arm64/cactus_util.framework/Info.plist +0 -0
  134. package/ios/cactus_util.xcframework/ios-arm64/cactus_util.framework/cactus_util +0 -0
  135. package/ios/cactus_util.xcframework/ios-arm64-simulator/cactus_util.framework/Headers/cactus_util.h +0 -25
  136. package/ios/cactus_util.xcframework/ios-arm64-simulator/cactus_util.framework/Headers/database.h +0 -27
  137. package/ios/cactus_util.xcframework/ios-arm64-simulator/cactus_util.framework/Headers/ios_utils.h +0 -10
  138. package/ios/cactus_util.xcframework/ios-arm64-simulator/cactus_util.framework/Headers/logging.h +0 -25
  139. package/ios/cactus_util.xcframework/ios-arm64-simulator/cactus_util.framework/Info.plist +0 -0
  140. package/ios/cactus_util.xcframework/ios-arm64-simulator/cactus_util.framework/_CodeSignature/CodeResources +0 -135
  141. package/ios/cactus_util.xcframework/ios-arm64-simulator/cactus_util.framework/cactus_util +0 -0
  142. package/lib/module/api/Database.js +0 -45
  143. package/lib/module/api/Database.js.map +0 -1
  144. package/lib/module/api/RemoteLM.js +0 -201
  145. package/lib/module/api/RemoteLM.js.map +0 -1
  146. package/lib/module/config/CactusConfig.js +0 -12
  147. package/lib/module/config/CactusConfig.js.map +0 -1
  148. package/lib/module/models.js +0 -336
  149. package/lib/module/models.js.map +0 -1
  150. package/lib/module/native/CactusCrypto.js +0 -10
  151. package/lib/module/native/CactusCrypto.js.map +0 -1
  152. package/lib/module/native/CactusDeviceInfo.js +0 -13
  153. package/lib/module/native/CactusDeviceInfo.js.map +0 -1
  154. package/lib/module/native/CactusUtil.js +0 -36
  155. package/lib/module/native/CactusUtil.js.map +0 -1
  156. package/lib/module/specs/CactusCrypto.nitro.js +0 -4
  157. package/lib/module/specs/CactusCrypto.nitro.js.map +0 -1
  158. package/lib/module/specs/CactusDeviceInfo.nitro.js +0 -4
  159. package/lib/module/specs/CactusDeviceInfo.nitro.js.map +0 -1
  160. package/lib/module/specs/CactusUtil.nitro.js +0 -4
  161. package/lib/module/telemetry/Telemetry.js +0 -154
  162. package/lib/module/telemetry/Telemetry.js.map +0 -1
  163. package/lib/typescript/src/api/Database.d.ts +0 -12
  164. package/lib/typescript/src/api/Database.d.ts.map +0 -1
  165. package/lib/typescript/src/api/RemoteLM.d.ts +0 -14
  166. package/lib/typescript/src/api/RemoteLM.d.ts.map +0 -1
  167. package/lib/typescript/src/config/CactusConfig.d.ts +0 -7
  168. package/lib/typescript/src/config/CactusConfig.d.ts.map +0 -1
  169. package/lib/typescript/src/models.d.ts +0 -6
  170. package/lib/typescript/src/models.d.ts.map +0 -1
  171. package/lib/typescript/src/native/CactusCrypto.d.ts +0 -5
  172. package/lib/typescript/src/native/CactusCrypto.d.ts.map +0 -1
  173. package/lib/typescript/src/native/CactusDeviceInfo.d.ts +0 -7
  174. package/lib/typescript/src/native/CactusDeviceInfo.d.ts.map +0 -1
  175. package/lib/typescript/src/native/CactusUtil.d.ts +0 -6
  176. package/lib/typescript/src/native/CactusUtil.d.ts.map +0 -1
  177. package/lib/typescript/src/specs/CactusCrypto.nitro.d.ts +0 -8
  178. package/lib/typescript/src/specs/CactusCrypto.nitro.d.ts.map +0 -1
  179. package/lib/typescript/src/specs/CactusDeviceInfo.nitro.d.ts +0 -16
  180. package/lib/typescript/src/specs/CactusDeviceInfo.nitro.d.ts.map +0 -1
  181. package/lib/typescript/src/specs/CactusUtil.nitro.d.ts +0 -10
  182. package/lib/typescript/src/specs/CactusUtil.nitro.d.ts.map +0 -1
  183. package/lib/typescript/src/telemetry/Telemetry.d.ts +0 -34
  184. package/lib/typescript/src/telemetry/Telemetry.d.ts.map +0 -1
  185. package/nitrogen/generated/android/c++/JDeviceInfo.hpp +0 -74
  186. package/nitrogen/generated/android/c++/JHybridCactusCryptoSpec.cpp +0 -65
  187. package/nitrogen/generated/android/c++/JHybridCactusCryptoSpec.hpp +0 -65
  188. package/nitrogen/generated/android/c++/JHybridCactusDeviceInfoSpec.cpp +0 -85
  189. package/nitrogen/generated/android/c++/JHybridCactusDeviceInfoSpec.hpp +0 -66
  190. package/nitrogen/generated/android/kotlin/com/margelo/nitro/cactus/DeviceInfo.kt +0 -50
  191. package/nitrogen/generated/android/kotlin/com/margelo/nitro/cactus/HybridCactusCryptoSpec.kt +0 -58
  192. package/nitrogen/generated/android/kotlin/com/margelo/nitro/cactus/HybridCactusDeviceInfoSpec.kt +0 -62
  193. package/nitrogen/generated/ios/c++/HybridCactusCryptoSpecSwift.cpp +0 -11
  194. package/nitrogen/generated/ios/c++/HybridCactusCryptoSpecSwift.hpp +0 -77
  195. package/nitrogen/generated/ios/c++/HybridCactusDeviceInfoSpecSwift.cpp +0 -11
  196. package/nitrogen/generated/ios/c++/HybridCactusDeviceInfoSpecSwift.hpp +0 -88
  197. package/nitrogen/generated/ios/swift/DeviceInfo.swift +0 -98
  198. package/nitrogen/generated/ios/swift/Func_void_DeviceInfo.swift +0 -47
  199. package/nitrogen/generated/ios/swift/Func_void_std__optional_std__string_.swift +0 -54
  200. package/nitrogen/generated/ios/swift/HybridCactusCryptoSpec.swift +0 -57
  201. package/nitrogen/generated/ios/swift/HybridCactusCryptoSpec_cxx.swift +0 -139
  202. package/nitrogen/generated/ios/swift/HybridCactusDeviceInfoSpec.swift +0 -58
  203. package/nitrogen/generated/ios/swift/HybridCactusDeviceInfoSpec_cxx.swift +0 -164
  204. package/nitrogen/generated/shared/c++/DeviceInfo.hpp +0 -92
  205. package/nitrogen/generated/shared/c++/HybridCactusCryptoSpec.cpp +0 -21
  206. package/nitrogen/generated/shared/c++/HybridCactusCryptoSpec.hpp +0 -63
  207. package/nitrogen/generated/shared/c++/HybridCactusDeviceInfoSpec.cpp +0 -22
  208. package/nitrogen/generated/shared/c++/HybridCactusDeviceInfoSpec.hpp +0 -67
  209. package/nitrogen/generated/shared/c++/HybridCactusUtilSpec.cpp +0 -23
  210. package/nitrogen/generated/shared/c++/HybridCactusUtilSpec.hpp +0 -66
  211. package/src/api/Database.ts +0 -55
  212. package/src/api/RemoteLM.ts +0 -273
  213. package/src/config/CactusConfig.ts +0 -11
  214. package/src/models.ts +0 -344
  215. package/src/native/CactusCrypto.ts +0 -11
  216. package/src/native/CactusDeviceInfo.ts +0 -18
  217. package/src/native/CactusUtil.ts +0 -43
  218. package/src/specs/CactusCrypto.nitro.ts +0 -6
  219. package/src/specs/CactusDeviceInfo.nitro.ts +0 -15
  220. package/src/specs/CactusUtil.nitro.ts +0 -8
  221. package/src/telemetry/Telemetry.ts +0 -236
@@ -1,6 +0,0 @@
1
- import type { CactusModel } from './types/common';
2
- declare const models: {
3
- [key: string]: CactusModel;
4
- };
5
- export default models;
6
- //# sourceMappingURL=models.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../src/models.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,QAAA,MAAM,MAAM,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,CAAA;CAmVzC,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -1,5 +0,0 @@
1
- export declare class CactusCrypto {
2
- private static readonly hybridCactusCrypto;
3
- static uuidv5(namespaceUuid: string, name: string): Promise<string>;
4
- }
5
- //# sourceMappingURL=CactusCrypto.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CactusCrypto.d.ts","sourceRoot":"","sources":["../../../../src/native/CactusCrypto.ts"],"names":[],"mappings":"AAGA,qBAAa,YAAY;IACvB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,kBAAkB,CAC0B;WAEtD,MAAM,CAAC,aAAa,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAG3E"}
@@ -1,7 +0,0 @@
1
- import type { DeviceInfo } from '../specs/CactusDeviceInfo.nitro';
2
- export declare class CactusDeviceInfo {
3
- private static readonly hybridCactusDeviceInfo;
4
- static getAppIdentifier(): Promise<string | undefined>;
5
- static getDeviceInfo(): Promise<DeviceInfo>;
6
- }
7
- //# sourceMappingURL=CactusDeviceInfo.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CactusDeviceInfo.d.ts","sourceRoot":"","sources":["../../../../src/native/CactusDeviceInfo.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,UAAU,EACX,MAAM,iCAAiC,CAAC;AAEzC,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,sBAAsB,CAC8B;WAE9D,gBAAgB,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;WAI/C,aAAa,IAAI,OAAO,CAAC,UAAU,CAAC;CAGnD"}
@@ -1,6 +0,0 @@
1
- export declare class CactusUtil {
2
- private static readonly hybridCactusUtil;
3
- static registerApp(encryptedData: string): Promise<string>;
4
- static getDeviceId(): Promise<string | null>;
5
- }
6
- //# sourceMappingURL=CactusUtil.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CactusUtil.d.ts","sourceRoot":"","sources":["../../../../src/native/CactusUtil.ts"],"names":[],"mappings":"AAOA,qBAAa,UAAU;IACrB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,gBAAgB,CACwB;WAE5C,WAAW,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;WASnD,WAAW,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;CAsB1D"}
@@ -1,8 +0,0 @@
1
- import type { HybridObject } from 'react-native-nitro-modules';
2
- export interface CactusCrypto extends HybridObject<{
3
- ios: 'swift';
4
- android: 'kotlin';
5
- }> {
6
- uuidv5(namespaceUuid: string, name: string): Promise<string>;
7
- }
8
- //# sourceMappingURL=CactusCrypto.nitro.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CactusCrypto.nitro.d.ts","sourceRoot":"","sources":["../../../../src/specs/CactusCrypto.nitro.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE/D,MAAM,WAAW,YACf,SAAQ,YAAY,CAAC;IAAE,GAAG,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,QAAQ,CAAA;CAAE,CAAC;IACzD,MAAM,CAAC,aAAa,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAC9D"}
@@ -1,16 +0,0 @@
1
- import type { HybridObject } from 'react-native-nitro-modules';
2
- export interface DeviceInfo {
3
- brand: string;
4
- model: string;
5
- device_id?: string;
6
- os: string;
7
- os_version: string;
8
- }
9
- export interface CactusDeviceInfo extends HybridObject<{
10
- ios: 'swift';
11
- android: 'kotlin';
12
- }> {
13
- getAppIdentifier(): Promise<string | undefined>;
14
- getDeviceInfo(): Promise<DeviceInfo>;
15
- }
16
- //# sourceMappingURL=CactusDeviceInfo.nitro.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CactusDeviceInfo.nitro.d.ts","sourceRoot":"","sources":["../../../../src/specs/CactusDeviceInfo.nitro.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE/D,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,gBACf,SAAQ,YAAY,CAAC;IAAE,GAAG,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,QAAQ,CAAA;CAAE,CAAC;IACzD,gBAAgB,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAChD,aAAa,IAAI,OAAO,CAAC,UAAU,CAAC,CAAC;CACtC"}
@@ -1,10 +0,0 @@
1
- import type { HybridObject } from 'react-native-nitro-modules';
2
- export interface CactusUtil extends HybridObject<{
3
- ios: 'c++';
4
- android: 'c++';
5
- }> {
6
- registerApp(encryptedData: string): Promise<string>;
7
- getDeviceId(token?: string): Promise<string | null>;
8
- setAndroidDataDirectory(dataDir: string): Promise<void>;
9
- }
10
- //# sourceMappingURL=CactusUtil.nitro.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CactusUtil.nitro.d.ts","sourceRoot":"","sources":["../../../../src/specs/CactusUtil.nitro.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE/D,MAAM,WAAW,UACf,SAAQ,YAAY,CAAC;IAAE,GAAG,EAAE,KAAK,CAAC;IAAC,OAAO,EAAE,KAAK,CAAA;CAAE,CAAC;IACpD,WAAW,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACpD,WAAW,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACpD,uBAAuB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACzD"}
@@ -1,34 +0,0 @@
1
- import type { CactusLMCompleteResult } from '../types/CactusLM';
2
- import type { CactusSTTTranscribeResult } from '../types/CactusSTT';
3
- export interface LogRecord {
4
- framework: 'react-native';
5
- framework_version: string;
6
- event_type: 'init' | 'completion' | 'transcription' | 'embedding' | 'image_embedding' | 'audio_embedding';
7
- model: string;
8
- success: boolean;
9
- message?: string;
10
- telemetry_token?: string;
11
- project_id?: string;
12
- device_id?: string;
13
- tokens?: number;
14
- response_time?: number;
15
- ttft?: number;
16
- tps?: number;
17
- }
18
- export declare class Telemetry {
19
- private static cactusTelemetryToken?;
20
- private static projectId?;
21
- private static deviceId?;
22
- private static readonly namespaceUrl;
23
- private static readonly logBufferPaths;
24
- private static handleLog;
25
- static isInitialized(): boolean;
26
- static init(cactusTelemetryToken?: string): Promise<void>;
27
- static logInit(model: string, success: boolean, message?: string): Promise<void>;
28
- static logCompletion(model: string, success: boolean, message?: string, result?: CactusLMCompleteResult): Promise<void>;
29
- static logTranscribe(model: string, success: boolean, message?: string, result?: CactusSTTTranscribeResult): Promise<void>;
30
- static logEmbedding(model: string, success: boolean, message?: string): Promise<void>;
31
- static logImageEmbedding(model: string, success: boolean, message?: string): Promise<void>;
32
- static logAudioEmbedding(model: string, success: boolean, message?: string): Promise<void>;
33
- }
34
- //# sourceMappingURL=Telemetry.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Telemetry.d.ts","sourceRoot":"","sources":["../../../../src/telemetry/Telemetry.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAEpE,MAAM,WAAW,SAAS;IAExB,SAAS,EAAE,cAAc,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAG1B,UAAU,EACN,MAAM,GACN,YAAY,GACZ,eAAe,GACf,WAAW,GACX,iBAAiB,GACjB,iBAAiB,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IAGjB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IAGnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,qBAAa,SAAS;IACpB,OAAO,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAS;IAC7C,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,CAAS;IAClC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAS;IAEjC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,YAAY,CAA0C;IAC9E,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,CAOpC;mBAEmB,SAAS;WAiChB,aAAa,IAAI,OAAO;WAIlB,IAAI,CAAC,oBAAoB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;WAyBxD,OAAO,CACnB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,OAAO,EAChB,OAAO,CAAC,EAAE,MAAM,GACf,OAAO,CAAC,IAAI,CAAC;WAcF,aAAa,CACzB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,OAAO,EAChB,OAAO,CAAC,EAAE,MAAM,EAChB,MAAM,CAAC,EAAE,sBAAsB,GAC9B,OAAO,CAAC,IAAI,CAAC;WAkBF,aAAa,CACzB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,OAAO,EAChB,OAAO,CAAC,EAAE,MAAM,EAChB,MAAM,CAAC,EAAE,yBAAyB,GACjC,OAAO,CAAC,IAAI,CAAC;WAkBF,YAAY,CACxB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,OAAO,EAChB,OAAO,CAAC,EAAE,MAAM,GACf,OAAO,CAAC,IAAI,CAAC;WAcF,iBAAiB,CAC7B,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,OAAO,EAChB,OAAO,CAAC,EAAE,MAAM,GACf,OAAO,CAAC,IAAI,CAAC;WAcF,iBAAiB,CAC7B,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,OAAO,EAChB,OAAO,CAAC,EAAE,MAAM,GACf,OAAO,CAAC,IAAI,CAAC;CAajB"}
@@ -1,74 +0,0 @@
1
- ///
2
- /// JDeviceInfo.hpp
3
- /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
- /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
6
- ///
7
-
8
- #pragma once
9
-
10
- #include <fbjni/fbjni.h>
11
- #include "DeviceInfo.hpp"
12
-
13
- #include <optional>
14
- #include <string>
15
-
16
- namespace margelo::nitro::cactus {
17
-
18
- using namespace facebook;
19
-
20
- /**
21
- * The C++ JNI bridge between the C++ struct "DeviceInfo" and the the Kotlin data class "DeviceInfo".
22
- */
23
- struct JDeviceInfo final: public jni::JavaClass<JDeviceInfo> {
24
- public:
25
- static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/cactus/DeviceInfo;";
26
-
27
- public:
28
- /**
29
- * Convert this Java/Kotlin-based struct to the C++ struct DeviceInfo by copying all values to C++.
30
- */
31
- [[maybe_unused]]
32
- [[nodiscard]]
33
- DeviceInfo toCpp() const {
34
- static const auto clazz = javaClassStatic();
35
- static const auto fieldBrand = clazz->getField<jni::JString>("brand");
36
- jni::local_ref<jni::JString> brand = this->getFieldValue(fieldBrand);
37
- static const auto fieldModel = clazz->getField<jni::JString>("model");
38
- jni::local_ref<jni::JString> model = this->getFieldValue(fieldModel);
39
- static const auto fieldDevice_id = clazz->getField<jni::JString>("device_id");
40
- jni::local_ref<jni::JString> device_id = this->getFieldValue(fieldDevice_id);
41
- static const auto fieldOs = clazz->getField<jni::JString>("os");
42
- jni::local_ref<jni::JString> os = this->getFieldValue(fieldOs);
43
- static const auto fieldOs_version = clazz->getField<jni::JString>("os_version");
44
- jni::local_ref<jni::JString> os_version = this->getFieldValue(fieldOs_version);
45
- return DeviceInfo(
46
- brand->toStdString(),
47
- model->toStdString(),
48
- device_id != nullptr ? std::make_optional(device_id->toStdString()) : std::nullopt,
49
- os->toStdString(),
50
- os_version->toStdString()
51
- );
52
- }
53
-
54
- public:
55
- /**
56
- * Create a Java/Kotlin-based struct by copying all values from the given C++ struct to Java.
57
- */
58
- [[maybe_unused]]
59
- static jni::local_ref<JDeviceInfo::javaobject> fromCpp(const DeviceInfo& value) {
60
- using JSignature = JDeviceInfo(jni::alias_ref<jni::JString>, jni::alias_ref<jni::JString>, jni::alias_ref<jni::JString>, jni::alias_ref<jni::JString>, jni::alias_ref<jni::JString>);
61
- static const auto clazz = javaClassStatic();
62
- static const auto create = clazz->getStaticMethod<JSignature>("fromCpp");
63
- return create(
64
- clazz,
65
- jni::make_jstring(value.brand),
66
- jni::make_jstring(value.model),
67
- value.device_id.has_value() ? jni::make_jstring(value.device_id.value()) : nullptr,
68
- jni::make_jstring(value.os),
69
- jni::make_jstring(value.os_version)
70
- );
71
- }
72
- };
73
-
74
- } // namespace margelo::nitro::cactus
@@ -1,65 +0,0 @@
1
- ///
2
- /// JHybridCactusCryptoSpec.cpp
3
- /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
- /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
6
- ///
7
-
8
- #include "JHybridCactusCryptoSpec.hpp"
9
-
10
-
11
-
12
- #include <string>
13
- #include <NitroModules/Promise.hpp>
14
- #include <NitroModules/JPromise.hpp>
15
-
16
- namespace margelo::nitro::cactus {
17
-
18
- jni::local_ref<JHybridCactusCryptoSpec::jhybriddata> JHybridCactusCryptoSpec::initHybrid(jni::alias_ref<jhybridobject> jThis) {
19
- return makeCxxInstance(jThis);
20
- }
21
-
22
- void JHybridCactusCryptoSpec::registerNatives() {
23
- registerHybrid({
24
- makeNativeMethod("initHybrid", JHybridCactusCryptoSpec::initHybrid),
25
- });
26
- }
27
-
28
- size_t JHybridCactusCryptoSpec::getExternalMemorySize() noexcept {
29
- static const auto method = javaClassStatic()->getMethod<jlong()>("getMemorySize");
30
- return method(_javaPart);
31
- }
32
-
33
- void JHybridCactusCryptoSpec::dispose() noexcept {
34
- static const auto method = javaClassStatic()->getMethod<void()>("dispose");
35
- method(_javaPart);
36
- }
37
-
38
- std::string JHybridCactusCryptoSpec::toString() {
39
- static const auto method = javaClassStatic()->getMethod<jni::JString()>("toString");
40
- auto javaString = method(_javaPart);
41
- return javaString->toStdString();
42
- }
43
-
44
- // Properties
45
-
46
-
47
- // Methods
48
- std::shared_ptr<Promise<std::string>> JHybridCactusCryptoSpec::uuidv5(const std::string& namespaceUuid, const std::string& name) {
49
- static const auto method = javaClassStatic()->getMethod<jni::local_ref<JPromise::javaobject>(jni::alias_ref<jni::JString> /* namespaceUuid */, jni::alias_ref<jni::JString> /* name */)>("uuidv5");
50
- auto __result = method(_javaPart, jni::make_jstring(namespaceUuid), jni::make_jstring(name));
51
- return [&]() {
52
- auto __promise = Promise<std::string>::create();
53
- __result->cthis()->addOnResolvedListener([=](const jni::alias_ref<jni::JObject>& __boxedResult) {
54
- auto __result = jni::static_ref_cast<jni::JString>(__boxedResult);
55
- __promise->resolve(__result->toStdString());
56
- });
57
- __result->cthis()->addOnRejectedListener([=](const jni::alias_ref<jni::JThrowable>& __throwable) {
58
- jni::JniException __jniError(__throwable);
59
- __promise->reject(std::make_exception_ptr(__jniError));
60
- });
61
- return __promise;
62
- }();
63
- }
64
-
65
- } // namespace margelo::nitro::cactus
@@ -1,65 +0,0 @@
1
- ///
2
- /// HybridCactusCryptoSpec.hpp
3
- /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
- /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
6
- ///
7
-
8
- #pragma once
9
-
10
- #include <NitroModules/JHybridObject.hpp>
11
- #include <fbjni/fbjni.h>
12
- #include "HybridCactusCryptoSpec.hpp"
13
-
14
-
15
-
16
-
17
- namespace margelo::nitro::cactus {
18
-
19
- using namespace facebook;
20
-
21
- class JHybridCactusCryptoSpec: public jni::HybridClass<JHybridCactusCryptoSpec, JHybridObject>,
22
- public virtual HybridCactusCryptoSpec {
23
- public:
24
- static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/cactus/HybridCactusCryptoSpec;";
25
- static jni::local_ref<jhybriddata> initHybrid(jni::alias_ref<jhybridobject> jThis);
26
- static void registerNatives();
27
-
28
- protected:
29
- // C++ constructor (called from Java via `initHybrid()`)
30
- explicit JHybridCactusCryptoSpec(jni::alias_ref<jhybridobject> jThis) :
31
- HybridObject(HybridCactusCryptoSpec::TAG),
32
- HybridBase(jThis),
33
- _javaPart(jni::make_global(jThis)) {}
34
-
35
- public:
36
- ~JHybridCactusCryptoSpec() override {
37
- // Hermes GC can destroy JS objects on a non-JNI Thread.
38
- jni::ThreadScope::WithClassLoader([&] { _javaPart.reset(); });
39
- }
40
-
41
- public:
42
- size_t getExternalMemorySize() noexcept override;
43
- void dispose() noexcept override;
44
- std::string toString() override;
45
-
46
- public:
47
- inline const jni::global_ref<JHybridCactusCryptoSpec::javaobject>& getJavaPart() const noexcept {
48
- return _javaPart;
49
- }
50
-
51
- public:
52
- // Properties
53
-
54
-
55
- public:
56
- // Methods
57
- std::shared_ptr<Promise<std::string>> uuidv5(const std::string& namespaceUuid, const std::string& name) override;
58
-
59
- private:
60
- friend HybridBase;
61
- using HybridBase::HybridBase;
62
- jni::global_ref<JHybridCactusCryptoSpec::javaobject> _javaPart;
63
- };
64
-
65
- } // namespace margelo::nitro::cactus
@@ -1,85 +0,0 @@
1
- ///
2
- /// JHybridCactusDeviceInfoSpec.cpp
3
- /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
- /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
6
- ///
7
-
8
- #include "JHybridCactusDeviceInfoSpec.hpp"
9
-
10
- // Forward declaration of `DeviceInfo` to properly resolve imports.
11
- namespace margelo::nitro::cactus { struct DeviceInfo; }
12
-
13
- #include <string>
14
- #include <optional>
15
- #include <NitroModules/Promise.hpp>
16
- #include <NitroModules/JPromise.hpp>
17
- #include "DeviceInfo.hpp"
18
- #include "JDeviceInfo.hpp"
19
-
20
- namespace margelo::nitro::cactus {
21
-
22
- jni::local_ref<JHybridCactusDeviceInfoSpec::jhybriddata> JHybridCactusDeviceInfoSpec::initHybrid(jni::alias_ref<jhybridobject> jThis) {
23
- return makeCxxInstance(jThis);
24
- }
25
-
26
- void JHybridCactusDeviceInfoSpec::registerNatives() {
27
- registerHybrid({
28
- makeNativeMethod("initHybrid", JHybridCactusDeviceInfoSpec::initHybrid),
29
- });
30
- }
31
-
32
- size_t JHybridCactusDeviceInfoSpec::getExternalMemorySize() noexcept {
33
- static const auto method = javaClassStatic()->getMethod<jlong()>("getMemorySize");
34
- return method(_javaPart);
35
- }
36
-
37
- void JHybridCactusDeviceInfoSpec::dispose() noexcept {
38
- static const auto method = javaClassStatic()->getMethod<void()>("dispose");
39
- method(_javaPart);
40
- }
41
-
42
- std::string JHybridCactusDeviceInfoSpec::toString() {
43
- static const auto method = javaClassStatic()->getMethod<jni::JString()>("toString");
44
- auto javaString = method(_javaPart);
45
- return javaString->toStdString();
46
- }
47
-
48
- // Properties
49
-
50
-
51
- // Methods
52
- std::shared_ptr<Promise<std::optional<std::string>>> JHybridCactusDeviceInfoSpec::getAppIdentifier() {
53
- static const auto method = javaClassStatic()->getMethod<jni::local_ref<JPromise::javaobject>()>("getAppIdentifier");
54
- auto __result = method(_javaPart);
55
- return [&]() {
56
- auto __promise = Promise<std::optional<std::string>>::create();
57
- __result->cthis()->addOnResolvedListener([=](const jni::alias_ref<jni::JObject>& __boxedResult) {
58
- auto __result = jni::static_ref_cast<jni::JString>(__boxedResult);
59
- __promise->resolve(__result != nullptr ? std::make_optional(__result->toStdString()) : std::nullopt);
60
- });
61
- __result->cthis()->addOnRejectedListener([=](const jni::alias_ref<jni::JThrowable>& __throwable) {
62
- jni::JniException __jniError(__throwable);
63
- __promise->reject(std::make_exception_ptr(__jniError));
64
- });
65
- return __promise;
66
- }();
67
- }
68
- std::shared_ptr<Promise<DeviceInfo>> JHybridCactusDeviceInfoSpec::getDeviceInfo() {
69
- static const auto method = javaClassStatic()->getMethod<jni::local_ref<JPromise::javaobject>()>("getDeviceInfo");
70
- auto __result = method(_javaPart);
71
- return [&]() {
72
- auto __promise = Promise<DeviceInfo>::create();
73
- __result->cthis()->addOnResolvedListener([=](const jni::alias_ref<jni::JObject>& __boxedResult) {
74
- auto __result = jni::static_ref_cast<JDeviceInfo>(__boxedResult);
75
- __promise->resolve(__result->toCpp());
76
- });
77
- __result->cthis()->addOnRejectedListener([=](const jni::alias_ref<jni::JThrowable>& __throwable) {
78
- jni::JniException __jniError(__throwable);
79
- __promise->reject(std::make_exception_ptr(__jniError));
80
- });
81
- return __promise;
82
- }();
83
- }
84
-
85
- } // namespace margelo::nitro::cactus
@@ -1,66 +0,0 @@
1
- ///
2
- /// HybridCactusDeviceInfoSpec.hpp
3
- /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
- /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
6
- ///
7
-
8
- #pragma once
9
-
10
- #include <NitroModules/JHybridObject.hpp>
11
- #include <fbjni/fbjni.h>
12
- #include "HybridCactusDeviceInfoSpec.hpp"
13
-
14
-
15
-
16
-
17
- namespace margelo::nitro::cactus {
18
-
19
- using namespace facebook;
20
-
21
- class JHybridCactusDeviceInfoSpec: public jni::HybridClass<JHybridCactusDeviceInfoSpec, JHybridObject>,
22
- public virtual HybridCactusDeviceInfoSpec {
23
- public:
24
- static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/cactus/HybridCactusDeviceInfoSpec;";
25
- static jni::local_ref<jhybriddata> initHybrid(jni::alias_ref<jhybridobject> jThis);
26
- static void registerNatives();
27
-
28
- protected:
29
- // C++ constructor (called from Java via `initHybrid()`)
30
- explicit JHybridCactusDeviceInfoSpec(jni::alias_ref<jhybridobject> jThis) :
31
- HybridObject(HybridCactusDeviceInfoSpec::TAG),
32
- HybridBase(jThis),
33
- _javaPart(jni::make_global(jThis)) {}
34
-
35
- public:
36
- ~JHybridCactusDeviceInfoSpec() override {
37
- // Hermes GC can destroy JS objects on a non-JNI Thread.
38
- jni::ThreadScope::WithClassLoader([&] { _javaPart.reset(); });
39
- }
40
-
41
- public:
42
- size_t getExternalMemorySize() noexcept override;
43
- void dispose() noexcept override;
44
- std::string toString() override;
45
-
46
- public:
47
- inline const jni::global_ref<JHybridCactusDeviceInfoSpec::javaobject>& getJavaPart() const noexcept {
48
- return _javaPart;
49
- }
50
-
51
- public:
52
- // Properties
53
-
54
-
55
- public:
56
- // Methods
57
- std::shared_ptr<Promise<std::optional<std::string>>> getAppIdentifier() override;
58
- std::shared_ptr<Promise<DeviceInfo>> getDeviceInfo() override;
59
-
60
- private:
61
- friend HybridBase;
62
- using HybridBase::HybridBase;
63
- jni::global_ref<JHybridCactusDeviceInfoSpec::javaobject> _javaPart;
64
- };
65
-
66
- } // namespace margelo::nitro::cactus
@@ -1,50 +0,0 @@
1
- ///
2
- /// DeviceInfo.kt
3
- /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
- /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
6
- ///
7
-
8
- package com.margelo.nitro.cactus
9
-
10
- import androidx.annotation.Keep
11
- import com.facebook.proguard.annotations.DoNotStrip
12
-
13
-
14
- /**
15
- * Represents the JavaScript object/struct "DeviceInfo".
16
- */
17
- @DoNotStrip
18
- @Keep
19
- data class DeviceInfo(
20
- @DoNotStrip
21
- @Keep
22
- val brand: String,
23
- @DoNotStrip
24
- @Keep
25
- val model: String,
26
- @DoNotStrip
27
- @Keep
28
- val device_id: String?,
29
- @DoNotStrip
30
- @Keep
31
- val os: String,
32
- @DoNotStrip
33
- @Keep
34
- val os_version: String
35
- ) {
36
- /* primary constructor */
37
-
38
- private companion object {
39
- /**
40
- * Constructor called from C++
41
- */
42
- @DoNotStrip
43
- @Keep
44
- @Suppress("unused")
45
- @JvmStatic
46
- private fun fromCpp(brand: String, model: String, device_id: String?, os: String, os_version: String): DeviceInfo {
47
- return DeviceInfo(brand, model, device_id, os, os_version)
48
- }
49
- }
50
- }
@@ -1,58 +0,0 @@
1
- ///
2
- /// HybridCactusCryptoSpec.kt
3
- /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
- /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
6
- ///
7
-
8
- package com.margelo.nitro.cactus
9
-
10
- import androidx.annotation.Keep
11
- import com.facebook.jni.HybridData
12
- import com.facebook.proguard.annotations.DoNotStrip
13
- import com.margelo.nitro.core.Promise
14
- import com.margelo.nitro.core.HybridObject
15
-
16
- /**
17
- * A Kotlin class representing the CactusCrypto HybridObject.
18
- * Implement this abstract class to create Kotlin-based instances of CactusCrypto.
19
- */
20
- @DoNotStrip
21
- @Keep
22
- @Suppress(
23
- "KotlinJniMissingFunction", "unused",
24
- "RedundantSuppression", "RedundantUnitReturnType", "SimpleRedundantLet",
25
- "LocalVariableName", "PropertyName", "PrivatePropertyName", "FunctionName"
26
- )
27
- abstract class HybridCactusCryptoSpec: HybridObject() {
28
- @DoNotStrip
29
- private var mHybridData: HybridData = initHybrid()
30
-
31
- init {
32
- super.updateNative(mHybridData)
33
- }
34
-
35
- override fun updateNative(hybridData: HybridData) {
36
- mHybridData = hybridData
37
- super.updateNative(hybridData)
38
- }
39
-
40
- // Default implementation of `HybridObject.toString()`
41
- override fun toString(): String {
42
- return "[HybridObject CactusCrypto]"
43
- }
44
-
45
- // Properties
46
-
47
-
48
- // Methods
49
- @DoNotStrip
50
- @Keep
51
- abstract fun uuidv5(namespaceUuid: String, name: String): Promise<String>
52
-
53
- private external fun initHybrid(): HybridData
54
-
55
- companion object {
56
- protected const val TAG = "HybridCactusCryptoSpec"
57
- }
58
- }
@@ -1,62 +0,0 @@
1
- ///
2
- /// HybridCactusDeviceInfoSpec.kt
3
- /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
- /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
6
- ///
7
-
8
- package com.margelo.nitro.cactus
9
-
10
- import androidx.annotation.Keep
11
- import com.facebook.jni.HybridData
12
- import com.facebook.proguard.annotations.DoNotStrip
13
- import com.margelo.nitro.core.Promise
14
- import com.margelo.nitro.core.HybridObject
15
-
16
- /**
17
- * A Kotlin class representing the CactusDeviceInfo HybridObject.
18
- * Implement this abstract class to create Kotlin-based instances of CactusDeviceInfo.
19
- */
20
- @DoNotStrip
21
- @Keep
22
- @Suppress(
23
- "KotlinJniMissingFunction", "unused",
24
- "RedundantSuppression", "RedundantUnitReturnType", "SimpleRedundantLet",
25
- "LocalVariableName", "PropertyName", "PrivatePropertyName", "FunctionName"
26
- )
27
- abstract class HybridCactusDeviceInfoSpec: HybridObject() {
28
- @DoNotStrip
29
- private var mHybridData: HybridData = initHybrid()
30
-
31
- init {
32
- super.updateNative(mHybridData)
33
- }
34
-
35
- override fun updateNative(hybridData: HybridData) {
36
- mHybridData = hybridData
37
- super.updateNative(hybridData)
38
- }
39
-
40
- // Default implementation of `HybridObject.toString()`
41
- override fun toString(): String {
42
- return "[HybridObject CactusDeviceInfo]"
43
- }
44
-
45
- // Properties
46
-
47
-
48
- // Methods
49
- @DoNotStrip
50
- @Keep
51
- abstract fun getAppIdentifier(): Promise<String?>
52
-
53
- @DoNotStrip
54
- @Keep
55
- abstract fun getDeviceInfo(): Promise<DeviceInfo>
56
-
57
- private external fun initHybrid(): HybridData
58
-
59
- companion object {
60
- protected const val TAG = "HybridCactusDeviceInfoSpec"
61
- }
62
- }