@onekeyfe/react-native-range-downloader 3.0.81-alpha.7 → 3.0.81

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 (111) hide show
  1. package/ReactNativeRangeDownloader.podspec +0 -8
  2. package/android/build.gradle +0 -1
  3. package/android/src/main/java/com/margelo/nitro/reactnativerangedownloader/ReactNativeRangeDownloader.kt +0 -144
  4. package/ios/RangeDownloadLogic.swift +0 -120
  5. package/ios/ReactNativeRangeDownloader.swift +6 -623
  6. package/lib/module/index.js +1 -2
  7. package/lib/module/index.js.map +1 -1
  8. package/lib/typescript/src/ReactNativeRangeDownloader.nitro.d.ts +1 -91
  9. package/lib/typescript/src/ReactNativeRangeDownloader.nitro.d.ts.map +1 -1
  10. package/lib/typescript/src/index.d.ts +0 -1
  11. package/lib/typescript/src/index.d.ts.map +1 -1
  12. package/nitrogen/generated/android/c++/JDownloadChannel.hpp +0 -3
  13. package/nitrogen/generated/android/c++/JHybridReactNativeRangeDownloaderSpec.cpp +0 -248
  14. package/nitrogen/generated/android/c++/JHybridReactNativeRangeDownloaderSpec.hpp +0 -12
  15. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/DownloadChannel.kt +1 -2
  16. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/HybridReactNativeRangeDownloaderSpec.kt +0 -49
  17. package/nitrogen/generated/ios/ReactNativeRangeDownloader-Swift-Cxx-Bridge.cpp +0 -48
  18. package/nitrogen/generated/ios/ReactNativeRangeDownloader-Swift-Cxx-Bridge.hpp +0 -329
  19. package/nitrogen/generated/ios/ReactNativeRangeDownloader-Swift-Cxx-Umbrella.hpp +0 -53
  20. package/nitrogen/generated/ios/c++/HybridReactNativeRangeDownloaderSpecSwift.hpp +0 -152
  21. package/nitrogen/generated/ios/swift/DownloadChannel.swift +0 -4
  22. package/nitrogen/generated/ios/swift/HybridReactNativeRangeDownloaderSpec.swift +0 -12
  23. package/nitrogen/generated/ios/swift/HybridReactNativeRangeDownloaderSpec_cxx.swift +0 -221
  24. package/nitrogen/generated/shared/c++/DownloadChannel.hpp +0 -4
  25. package/nitrogen/generated/shared/c++/HybridReactNativeRangeDownloaderSpec.cpp +0 -12
  26. package/nitrogen/generated/shared/c++/HybridReactNativeRangeDownloaderSpec.hpp +0 -58
  27. package/package.json +2 -4
  28. package/src/ReactNativeRangeDownloader.nitro.ts +1 -127
  29. package/src/index.tsx +1 -3
  30. package/android/src/main/java/com/margelo/nitro/reactnativerangedownloader/FirmwareArchiveRules.kt +0 -284
  31. package/android/src/main/java/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactStore.kt +0 -774
  32. package/android/src/test/java/com/margelo/nitro/reactnativerangedownloader/FirmwareArchiveRulesTest.kt +0 -75
  33. package/android/src/test/java/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactDeadlineTest.kt +0 -26
  34. package/ios/FirmwareArchiveMinizipBridge.h +0 -33
  35. package/ios/FirmwareArchiveMinizipBridge.mm +0 -213
  36. package/ios/FirmwareArtifactStore.swift +0 -1445
  37. package/ios/FirmwareBackgroundSessionEventRouter.swift +0 -17
  38. package/nitrogen/generated/android/c++/JFirmwareArchiveExpectedEntry.hpp +0 -69
  39. package/nitrogen/generated/android/c++/JFirmwareArchiveMaterializeParams.hpp +0 -86
  40. package/nitrogen/generated/android/c++/JFirmwareArchiveMaterializeResult.hpp +0 -80
  41. package/nitrogen/generated/android/c++/JFirmwareArchiveMaterializedArtifact.hpp +0 -63
  42. package/nitrogen/generated/android/c++/JFirmwareArtifactCancelParams.hpp +0 -57
  43. package/nitrogen/generated/android/c++/JFirmwareArtifactCapabilities.hpp +0 -88
  44. package/nitrogen/generated/android/c++/JFirmwareArtifactDownloadParams.hpp +0 -98
  45. package/nitrogen/generated/android/c++/JFirmwareArtifactLease.hpp +0 -57
  46. package/nitrogen/generated/android/c++/JFirmwareArtifactLeaseCreateParams.hpp +0 -57
  47. package/nitrogen/generated/android/c++/JFirmwareArtifactLeaseReleaseParams.hpp +0 -61
  48. package/nitrogen/generated/android/c++/JFirmwareArtifactLeaseRetainParams.hpp +0 -61
  49. package/nitrogen/generated/android/c++/JFirmwareArtifactReaderCloseParams.hpp +0 -57
  50. package/nitrogen/generated/android/c++/JFirmwareArtifactReaderInfo.hpp +0 -61
  51. package/nitrogen/generated/android/c++/JFirmwareArtifactReaderReadParams.hpp +0 -65
  52. package/nitrogen/generated/android/c++/JFirmwareArtifactReceipt.hpp +0 -65
  53. package/nitrogen/generated/android/c++/JFirmwareArtifactRefParams.hpp +0 -57
  54. package/nitrogen/generated/android/c++/JFirmwareArtifactSweepResult.hpp +0 -61
  55. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArchiveExpectedEntry.kt +0 -47
  56. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArchiveMaterializeParams.kt +0 -44
  57. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArchiveMaterializeResult.kt +0 -38
  58. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArchiveMaterializedArtifact.kt +0 -41
  59. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactCancelParams.kt +0 -38
  60. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactCapabilities.kt +0 -47
  61. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactDownloadParams.kt +0 -68
  62. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactLease.kt +0 -38
  63. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactLeaseCreateParams.kt +0 -38
  64. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactLeaseReleaseParams.kt +0 -41
  65. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactLeaseRetainParams.kt +0 -41
  66. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactReaderCloseParams.kt +0 -38
  67. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactReaderInfo.kt +0 -41
  68. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactReaderReadParams.kt +0 -44
  69. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactReceipt.kt +0 -44
  70. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactRefParams.kt +0 -38
  71. package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactSweepResult.kt +0 -41
  72. package/nitrogen/generated/ios/swift/FirmwareArchiveExpectedEntry.swift +0 -69
  73. package/nitrogen/generated/ios/swift/FirmwareArchiveMaterializeParams.swift +0 -70
  74. package/nitrogen/generated/ios/swift/FirmwareArchiveMaterializeResult.swift +0 -48
  75. package/nitrogen/generated/ios/swift/FirmwareArchiveMaterializedArtifact.swift +0 -47
  76. package/nitrogen/generated/ios/swift/FirmwareArtifactCancelParams.swift +0 -36
  77. package/nitrogen/generated/ios/swift/FirmwareArtifactCapabilities.swift +0 -81
  78. package/nitrogen/generated/ios/swift/FirmwareArtifactDownloadParams.swift +0 -177
  79. package/nitrogen/generated/ios/swift/FirmwareArtifactLease.swift +0 -36
  80. package/nitrogen/generated/ios/swift/FirmwareArtifactLeaseCreateParams.swift +0 -36
  81. package/nitrogen/generated/ios/swift/FirmwareArtifactLeaseReleaseParams.swift +0 -47
  82. package/nitrogen/generated/ios/swift/FirmwareArtifactLeaseRetainParams.swift +0 -47
  83. package/nitrogen/generated/ios/swift/FirmwareArtifactReaderCloseParams.swift +0 -36
  84. package/nitrogen/generated/ios/swift/FirmwareArtifactReaderInfo.swift +0 -47
  85. package/nitrogen/generated/ios/swift/FirmwareArtifactReaderReadParams.swift +0 -58
  86. package/nitrogen/generated/ios/swift/FirmwareArtifactReceipt.swift +0 -58
  87. package/nitrogen/generated/ios/swift/FirmwareArtifactRefParams.swift +0 -36
  88. package/nitrogen/generated/ios/swift/FirmwareArtifactSweepResult.swift +0 -47
  89. package/nitrogen/generated/ios/swift/Func_void_FirmwareArchiveMaterializeResult.swift +0 -47
  90. package/nitrogen/generated/ios/swift/Func_void_FirmwareArtifactLease.swift +0 -47
  91. package/nitrogen/generated/ios/swift/Func_void_FirmwareArtifactReaderInfo.swift +0 -47
  92. package/nitrogen/generated/ios/swift/Func_void_FirmwareArtifactReceipt.swift +0 -47
  93. package/nitrogen/generated/ios/swift/Func_void_FirmwareArtifactSweepResult.swift +0 -47
  94. package/nitrogen/generated/ios/swift/Func_void_std__shared_ptr_ArrayBuffer_.swift +0 -47
  95. package/nitrogen/generated/shared/c++/FirmwareArchiveExpectedEntry.hpp +0 -87
  96. package/nitrogen/generated/shared/c++/FirmwareArchiveMaterializeParams.hpp +0 -86
  97. package/nitrogen/generated/shared/c++/FirmwareArchiveMaterializeResult.hpp +0 -77
  98. package/nitrogen/generated/shared/c++/FirmwareArchiveMaterializedArtifact.hpp +0 -81
  99. package/nitrogen/generated/shared/c++/FirmwareArtifactCancelParams.hpp +0 -75
  100. package/nitrogen/generated/shared/c++/FirmwareArtifactCapabilities.hpp +0 -88
  101. package/nitrogen/generated/shared/c++/FirmwareArtifactDownloadParams.hpp +0 -116
  102. package/nitrogen/generated/shared/c++/FirmwareArtifactLease.hpp +0 -75
  103. package/nitrogen/generated/shared/c++/FirmwareArtifactLeaseCreateParams.hpp +0 -75
  104. package/nitrogen/generated/shared/c++/FirmwareArtifactLeaseReleaseParams.hpp +0 -79
  105. package/nitrogen/generated/shared/c++/FirmwareArtifactLeaseRetainParams.hpp +0 -79
  106. package/nitrogen/generated/shared/c++/FirmwareArtifactReaderCloseParams.hpp +0 -75
  107. package/nitrogen/generated/shared/c++/FirmwareArtifactReaderInfo.hpp +0 -79
  108. package/nitrogen/generated/shared/c++/FirmwareArtifactReaderReadParams.hpp +0 -83
  109. package/nitrogen/generated/shared/c++/FirmwareArtifactReceipt.hpp +0 -83
  110. package/nitrogen/generated/shared/c++/FirmwareArtifactRefParams.hpp +0 -75
  111. package/nitrogen/generated/shared/c++/FirmwareArtifactSweepResult.hpp +0 -79
@@ -1,86 +0,0 @@
1
- ///
2
- /// FirmwareArchiveMaterializeParams.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
- #if __has_include(<NitroModules/JSIConverter.hpp>)
11
- #include <NitroModules/JSIConverter.hpp>
12
- #else
13
- #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
14
- #endif
15
- #if __has_include(<NitroModules/NitroDefines.hpp>)
16
- #include <NitroModules/NitroDefines.hpp>
17
- #else
18
- #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
19
- #endif
20
- #if __has_include(<NitroModules/JSIHelpers.hpp>)
21
- #include <NitroModules/JSIHelpers.hpp>
22
- #else
23
- #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
24
- #endif
25
-
26
- // Forward declaration of `FirmwareArchiveExpectedEntry` to properly resolve imports.
27
- namespace margelo::nitro::reactnativerangedownloader { struct FirmwareArchiveExpectedEntry; }
28
-
29
- #include <string>
30
- #include "FirmwareArchiveExpectedEntry.hpp"
31
- #include <vector>
32
-
33
- namespace margelo::nitro::reactnativerangedownloader {
34
-
35
- /**
36
- * A struct which can be represented as a JavaScript object (FirmwareArchiveMaterializeParams).
37
- */
38
- struct FirmwareArchiveMaterializeParams {
39
- public:
40
- std::string leaseRef SWIFT_PRIVATE;
41
- std::string archiveArtifactRef SWIFT_PRIVATE;
42
- std::vector<FirmwareArchiveExpectedEntry> expectedEntries SWIFT_PRIVATE;
43
-
44
- public:
45
- FirmwareArchiveMaterializeParams() = default;
46
- explicit FirmwareArchiveMaterializeParams(std::string leaseRef, std::string archiveArtifactRef, std::vector<FirmwareArchiveExpectedEntry> expectedEntries): leaseRef(leaseRef), archiveArtifactRef(archiveArtifactRef), expectedEntries(expectedEntries) {}
47
- };
48
-
49
- } // namespace margelo::nitro::reactnativerangedownloader
50
-
51
- namespace margelo::nitro {
52
-
53
- // C++ FirmwareArchiveMaterializeParams <> JS FirmwareArchiveMaterializeParams (object)
54
- template <>
55
- struct JSIConverter<margelo::nitro::reactnativerangedownloader::FirmwareArchiveMaterializeParams> final {
56
- static inline margelo::nitro::reactnativerangedownloader::FirmwareArchiveMaterializeParams fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
57
- jsi::Object obj = arg.asObject(runtime);
58
- return margelo::nitro::reactnativerangedownloader::FirmwareArchiveMaterializeParams(
59
- JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "leaseRef")),
60
- JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "archiveArtifactRef")),
61
- JSIConverter<std::vector<margelo::nitro::reactnativerangedownloader::FirmwareArchiveExpectedEntry>>::fromJSI(runtime, obj.getProperty(runtime, "expectedEntries"))
62
- );
63
- }
64
- static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::reactnativerangedownloader::FirmwareArchiveMaterializeParams& arg) {
65
- jsi::Object obj(runtime);
66
- obj.setProperty(runtime, "leaseRef", JSIConverter<std::string>::toJSI(runtime, arg.leaseRef));
67
- obj.setProperty(runtime, "archiveArtifactRef", JSIConverter<std::string>::toJSI(runtime, arg.archiveArtifactRef));
68
- obj.setProperty(runtime, "expectedEntries", JSIConverter<std::vector<margelo::nitro::reactnativerangedownloader::FirmwareArchiveExpectedEntry>>::toJSI(runtime, arg.expectedEntries));
69
- return obj;
70
- }
71
- static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
72
- if (!value.isObject()) {
73
- return false;
74
- }
75
- jsi::Object obj = value.getObject(runtime);
76
- if (!nitro::isPlainObject(runtime, obj)) {
77
- return false;
78
- }
79
- if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "leaseRef"))) return false;
80
- if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "archiveArtifactRef"))) return false;
81
- if (!JSIConverter<std::vector<margelo::nitro::reactnativerangedownloader::FirmwareArchiveExpectedEntry>>::canConvert(runtime, obj.getProperty(runtime, "expectedEntries"))) return false;
82
- return true;
83
- }
84
- };
85
-
86
- } // namespace margelo::nitro
@@ -1,77 +0,0 @@
1
- ///
2
- /// FirmwareArchiveMaterializeResult.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
- #if __has_include(<NitroModules/JSIConverter.hpp>)
11
- #include <NitroModules/JSIConverter.hpp>
12
- #else
13
- #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
14
- #endif
15
- #if __has_include(<NitroModules/NitroDefines.hpp>)
16
- #include <NitroModules/NitroDefines.hpp>
17
- #else
18
- #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
19
- #endif
20
- #if __has_include(<NitroModules/JSIHelpers.hpp>)
21
- #include <NitroModules/JSIHelpers.hpp>
22
- #else
23
- #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
24
- #endif
25
-
26
- // Forward declaration of `FirmwareArchiveMaterializedArtifact` to properly resolve imports.
27
- namespace margelo::nitro::reactnativerangedownloader { struct FirmwareArchiveMaterializedArtifact; }
28
-
29
- #include "FirmwareArchiveMaterializedArtifact.hpp"
30
- #include <vector>
31
-
32
- namespace margelo::nitro::reactnativerangedownloader {
33
-
34
- /**
35
- * A struct which can be represented as a JavaScript object (FirmwareArchiveMaterializeResult).
36
- */
37
- struct FirmwareArchiveMaterializeResult {
38
- public:
39
- std::vector<FirmwareArchiveMaterializedArtifact> artifacts SWIFT_PRIVATE;
40
-
41
- public:
42
- FirmwareArchiveMaterializeResult() = default;
43
- explicit FirmwareArchiveMaterializeResult(std::vector<FirmwareArchiveMaterializedArtifact> artifacts): artifacts(artifacts) {}
44
- };
45
-
46
- } // namespace margelo::nitro::reactnativerangedownloader
47
-
48
- namespace margelo::nitro {
49
-
50
- // C++ FirmwareArchiveMaterializeResult <> JS FirmwareArchiveMaterializeResult (object)
51
- template <>
52
- struct JSIConverter<margelo::nitro::reactnativerangedownloader::FirmwareArchiveMaterializeResult> final {
53
- static inline margelo::nitro::reactnativerangedownloader::FirmwareArchiveMaterializeResult fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
54
- jsi::Object obj = arg.asObject(runtime);
55
- return margelo::nitro::reactnativerangedownloader::FirmwareArchiveMaterializeResult(
56
- JSIConverter<std::vector<margelo::nitro::reactnativerangedownloader::FirmwareArchiveMaterializedArtifact>>::fromJSI(runtime, obj.getProperty(runtime, "artifacts"))
57
- );
58
- }
59
- static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::reactnativerangedownloader::FirmwareArchiveMaterializeResult& arg) {
60
- jsi::Object obj(runtime);
61
- obj.setProperty(runtime, "artifacts", JSIConverter<std::vector<margelo::nitro::reactnativerangedownloader::FirmwareArchiveMaterializedArtifact>>::toJSI(runtime, arg.artifacts));
62
- return obj;
63
- }
64
- static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
65
- if (!value.isObject()) {
66
- return false;
67
- }
68
- jsi::Object obj = value.getObject(runtime);
69
- if (!nitro::isPlainObject(runtime, obj)) {
70
- return false;
71
- }
72
- if (!JSIConverter<std::vector<margelo::nitro::reactnativerangedownloader::FirmwareArchiveMaterializedArtifact>>::canConvert(runtime, obj.getProperty(runtime, "artifacts"))) return false;
73
- return true;
74
- }
75
- };
76
-
77
- } // namespace margelo::nitro
@@ -1,81 +0,0 @@
1
- ///
2
- /// FirmwareArchiveMaterializedArtifact.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
- #if __has_include(<NitroModules/JSIConverter.hpp>)
11
- #include <NitroModules/JSIConverter.hpp>
12
- #else
13
- #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
14
- #endif
15
- #if __has_include(<NitroModules/NitroDefines.hpp>)
16
- #include <NitroModules/NitroDefines.hpp>
17
- #else
18
- #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
19
- #endif
20
- #if __has_include(<NitroModules/JSIHelpers.hpp>)
21
- #include <NitroModules/JSIHelpers.hpp>
22
- #else
23
- #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
24
- #endif
25
-
26
- // Forward declaration of `FirmwareArtifactReceipt` to properly resolve imports.
27
- namespace margelo::nitro::reactnativerangedownloader { struct FirmwareArtifactReceipt; }
28
-
29
- #include <string>
30
- #include "FirmwareArtifactReceipt.hpp"
31
-
32
- namespace margelo::nitro::reactnativerangedownloader {
33
-
34
- /**
35
- * A struct which can be represented as a JavaScript object (FirmwareArchiveMaterializedArtifact).
36
- */
37
- struct FirmwareArchiveMaterializedArtifact {
38
- public:
39
- std::string entryName SWIFT_PRIVATE;
40
- FirmwareArtifactReceipt receipt SWIFT_PRIVATE;
41
-
42
- public:
43
- FirmwareArchiveMaterializedArtifact() = default;
44
- explicit FirmwareArchiveMaterializedArtifact(std::string entryName, FirmwareArtifactReceipt receipt): entryName(entryName), receipt(receipt) {}
45
- };
46
-
47
- } // namespace margelo::nitro::reactnativerangedownloader
48
-
49
- namespace margelo::nitro {
50
-
51
- // C++ FirmwareArchiveMaterializedArtifact <> JS FirmwareArchiveMaterializedArtifact (object)
52
- template <>
53
- struct JSIConverter<margelo::nitro::reactnativerangedownloader::FirmwareArchiveMaterializedArtifact> final {
54
- static inline margelo::nitro::reactnativerangedownloader::FirmwareArchiveMaterializedArtifact fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
55
- jsi::Object obj = arg.asObject(runtime);
56
- return margelo::nitro::reactnativerangedownloader::FirmwareArchiveMaterializedArtifact(
57
- JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "entryName")),
58
- JSIConverter<margelo::nitro::reactnativerangedownloader::FirmwareArtifactReceipt>::fromJSI(runtime, obj.getProperty(runtime, "receipt"))
59
- );
60
- }
61
- static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::reactnativerangedownloader::FirmwareArchiveMaterializedArtifact& arg) {
62
- jsi::Object obj(runtime);
63
- obj.setProperty(runtime, "entryName", JSIConverter<std::string>::toJSI(runtime, arg.entryName));
64
- obj.setProperty(runtime, "receipt", JSIConverter<margelo::nitro::reactnativerangedownloader::FirmwareArtifactReceipt>::toJSI(runtime, arg.receipt));
65
- return obj;
66
- }
67
- static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
68
- if (!value.isObject()) {
69
- return false;
70
- }
71
- jsi::Object obj = value.getObject(runtime);
72
- if (!nitro::isPlainObject(runtime, obj)) {
73
- return false;
74
- }
75
- if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "entryName"))) return false;
76
- if (!JSIConverter<margelo::nitro::reactnativerangedownloader::FirmwareArtifactReceipt>::canConvert(runtime, obj.getProperty(runtime, "receipt"))) return false;
77
- return true;
78
- }
79
- };
80
-
81
- } // namespace margelo::nitro
@@ -1,75 +0,0 @@
1
- ///
2
- /// FirmwareArtifactCancelParams.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
- #if __has_include(<NitroModules/JSIConverter.hpp>)
11
- #include <NitroModules/JSIConverter.hpp>
12
- #else
13
- #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
14
- #endif
15
- #if __has_include(<NitroModules/NitroDefines.hpp>)
16
- #include <NitroModules/NitroDefines.hpp>
17
- #else
18
- #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
19
- #endif
20
- #if __has_include(<NitroModules/JSIHelpers.hpp>)
21
- #include <NitroModules/JSIHelpers.hpp>
22
- #else
23
- #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
24
- #endif
25
-
26
-
27
-
28
- #include <string>
29
-
30
- namespace margelo::nitro::reactnativerangedownloader {
31
-
32
- /**
33
- * A struct which can be represented as a JavaScript object (FirmwareArtifactCancelParams).
34
- */
35
- struct FirmwareArtifactCancelParams {
36
- public:
37
- std::string transactionId SWIFT_PRIVATE;
38
-
39
- public:
40
- FirmwareArtifactCancelParams() = default;
41
- explicit FirmwareArtifactCancelParams(std::string transactionId): transactionId(transactionId) {}
42
- };
43
-
44
- } // namespace margelo::nitro::reactnativerangedownloader
45
-
46
- namespace margelo::nitro {
47
-
48
- // C++ FirmwareArtifactCancelParams <> JS FirmwareArtifactCancelParams (object)
49
- template <>
50
- struct JSIConverter<margelo::nitro::reactnativerangedownloader::FirmwareArtifactCancelParams> final {
51
- static inline margelo::nitro::reactnativerangedownloader::FirmwareArtifactCancelParams fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
52
- jsi::Object obj = arg.asObject(runtime);
53
- return margelo::nitro::reactnativerangedownloader::FirmwareArtifactCancelParams(
54
- JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "transactionId"))
55
- );
56
- }
57
- static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::reactnativerangedownloader::FirmwareArtifactCancelParams& arg) {
58
- jsi::Object obj(runtime);
59
- obj.setProperty(runtime, "transactionId", JSIConverter<std::string>::toJSI(runtime, arg.transactionId));
60
- return obj;
61
- }
62
- static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
63
- if (!value.isObject()) {
64
- return false;
65
- }
66
- jsi::Object obj = value.getObject(runtime);
67
- if (!nitro::isPlainObject(runtime, obj)) {
68
- return false;
69
- }
70
- if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "transactionId"))) return false;
71
- return true;
72
- }
73
- };
74
-
75
- } // namespace margelo::nitro
@@ -1,88 +0,0 @@
1
- ///
2
- /// FirmwareArtifactCapabilities.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
- #if __has_include(<NitroModules/JSIConverter.hpp>)
11
- #include <NitroModules/JSIConverter.hpp>
12
- #else
13
- #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
14
- #endif
15
- #if __has_include(<NitroModules/NitroDefines.hpp>)
16
- #include <NitroModules/NitroDefines.hpp>
17
- #else
18
- #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
19
- #endif
20
- #if __has_include(<NitroModules/JSIHelpers.hpp>)
21
- #include <NitroModules/JSIHelpers.hpp>
22
- #else
23
- #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
24
- #endif
25
-
26
-
27
-
28
- #include <string>
29
- #include <vector>
30
-
31
- namespace margelo::nitro::reactnativerangedownloader {
32
-
33
- /**
34
- * A struct which can be represented as a JavaScript object (FirmwareArtifactCapabilities).
35
- */
36
- struct FirmwareArtifactCapabilities {
37
- public:
38
- double firmwareArtifactProtocolVersion SWIFT_PRIVATE;
39
- std::vector<std::string> supportedRouteTypes SWIFT_PRIVATE;
40
- bool supportsArchiveMaterialization SWIFT_PRIVATE;
41
- double maxReadBytes SWIFT_PRIVATE;
42
-
43
- public:
44
- FirmwareArtifactCapabilities() = default;
45
- explicit FirmwareArtifactCapabilities(double firmwareArtifactProtocolVersion, std::vector<std::string> supportedRouteTypes, bool supportsArchiveMaterialization, double maxReadBytes): firmwareArtifactProtocolVersion(firmwareArtifactProtocolVersion), supportedRouteTypes(supportedRouteTypes), supportsArchiveMaterialization(supportsArchiveMaterialization), maxReadBytes(maxReadBytes) {}
46
- };
47
-
48
- } // namespace margelo::nitro::reactnativerangedownloader
49
-
50
- namespace margelo::nitro {
51
-
52
- // C++ FirmwareArtifactCapabilities <> JS FirmwareArtifactCapabilities (object)
53
- template <>
54
- struct JSIConverter<margelo::nitro::reactnativerangedownloader::FirmwareArtifactCapabilities> final {
55
- static inline margelo::nitro::reactnativerangedownloader::FirmwareArtifactCapabilities fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
56
- jsi::Object obj = arg.asObject(runtime);
57
- return margelo::nitro::reactnativerangedownloader::FirmwareArtifactCapabilities(
58
- JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "firmwareArtifactProtocolVersion")),
59
- JSIConverter<std::vector<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "supportedRouteTypes")),
60
- JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, "supportsArchiveMaterialization")),
61
- JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "maxReadBytes"))
62
- );
63
- }
64
- static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::reactnativerangedownloader::FirmwareArtifactCapabilities& arg) {
65
- jsi::Object obj(runtime);
66
- obj.setProperty(runtime, "firmwareArtifactProtocolVersion", JSIConverter<double>::toJSI(runtime, arg.firmwareArtifactProtocolVersion));
67
- obj.setProperty(runtime, "supportedRouteTypes", JSIConverter<std::vector<std::string>>::toJSI(runtime, arg.supportedRouteTypes));
68
- obj.setProperty(runtime, "supportsArchiveMaterialization", JSIConverter<bool>::toJSI(runtime, arg.supportsArchiveMaterialization));
69
- obj.setProperty(runtime, "maxReadBytes", JSIConverter<double>::toJSI(runtime, arg.maxReadBytes));
70
- return obj;
71
- }
72
- static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
73
- if (!value.isObject()) {
74
- return false;
75
- }
76
- jsi::Object obj = value.getObject(runtime);
77
- if (!nitro::isPlainObject(runtime, obj)) {
78
- return false;
79
- }
80
- if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "firmwareArtifactProtocolVersion"))) return false;
81
- if (!JSIConverter<std::vector<std::string>>::canConvert(runtime, obj.getProperty(runtime, "supportedRouteTypes"))) return false;
82
- if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, "supportsArchiveMaterialization"))) return false;
83
- if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "maxReadBytes"))) return false;
84
- return true;
85
- }
86
- };
87
-
88
- } // namespace margelo::nitro
@@ -1,116 +0,0 @@
1
- ///
2
- /// FirmwareArtifactDownloadParams.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
- #if __has_include(<NitroModules/JSIConverter.hpp>)
11
- #include <NitroModules/JSIConverter.hpp>
12
- #else
13
- #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
14
- #endif
15
- #if __has_include(<NitroModules/NitroDefines.hpp>)
16
- #include <NitroModules/NitroDefines.hpp>
17
- #else
18
- #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
19
- #endif
20
- #if __has_include(<NitroModules/JSIHelpers.hpp>)
21
- #include <NitroModules/JSIHelpers.hpp>
22
- #else
23
- #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
24
- #endif
25
-
26
-
27
-
28
- #include <string>
29
- #include <optional>
30
-
31
- namespace margelo::nitro::reactnativerangedownloader {
32
-
33
- /**
34
- * A struct which can be represented as a JavaScript object (FirmwareArtifactDownloadParams).
35
- */
36
- struct FirmwareArtifactDownloadParams {
37
- public:
38
- std::string taskId SWIFT_PRIVATE;
39
- std::string transactionId SWIFT_PRIVATE;
40
- std::string leaseRef SWIFT_PRIVATE;
41
- std::string artifactId SWIFT_PRIVATE;
42
- std::string url SWIFT_PRIVATE;
43
- std::string routeType SWIFT_PRIVATE;
44
- std::optional<std::string> resolvedIp SWIFT_PRIVATE;
45
- double expectedSize SWIFT_PRIVATE;
46
- std::string expectedSha256 SWIFT_PRIVATE;
47
- double maxBytes SWIFT_PRIVATE;
48
- std::optional<double> overallDeadlineSeconds SWIFT_PRIVATE;
49
-
50
- public:
51
- FirmwareArtifactDownloadParams() = default;
52
- explicit FirmwareArtifactDownloadParams(std::string taskId, std::string transactionId, std::string leaseRef, std::string artifactId, std::string url, std::string routeType, std::optional<std::string> resolvedIp, double expectedSize, std::string expectedSha256, double maxBytes, std::optional<double> overallDeadlineSeconds): taskId(taskId), transactionId(transactionId), leaseRef(leaseRef), artifactId(artifactId), url(url), routeType(routeType), resolvedIp(resolvedIp), expectedSize(expectedSize), expectedSha256(expectedSha256), maxBytes(maxBytes), overallDeadlineSeconds(overallDeadlineSeconds) {}
53
- };
54
-
55
- } // namespace margelo::nitro::reactnativerangedownloader
56
-
57
- namespace margelo::nitro {
58
-
59
- // C++ FirmwareArtifactDownloadParams <> JS FirmwareArtifactDownloadParams (object)
60
- template <>
61
- struct JSIConverter<margelo::nitro::reactnativerangedownloader::FirmwareArtifactDownloadParams> final {
62
- static inline margelo::nitro::reactnativerangedownloader::FirmwareArtifactDownloadParams fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
63
- jsi::Object obj = arg.asObject(runtime);
64
- return margelo::nitro::reactnativerangedownloader::FirmwareArtifactDownloadParams(
65
- JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "taskId")),
66
- JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "transactionId")),
67
- JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "leaseRef")),
68
- JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "artifactId")),
69
- JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "url")),
70
- JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "routeType")),
71
- JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "resolvedIp")),
72
- JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "expectedSize")),
73
- JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "expectedSha256")),
74
- JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "maxBytes")),
75
- JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "overallDeadlineSeconds"))
76
- );
77
- }
78
- static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::reactnativerangedownloader::FirmwareArtifactDownloadParams& arg) {
79
- jsi::Object obj(runtime);
80
- obj.setProperty(runtime, "taskId", JSIConverter<std::string>::toJSI(runtime, arg.taskId));
81
- obj.setProperty(runtime, "transactionId", JSIConverter<std::string>::toJSI(runtime, arg.transactionId));
82
- obj.setProperty(runtime, "leaseRef", JSIConverter<std::string>::toJSI(runtime, arg.leaseRef));
83
- obj.setProperty(runtime, "artifactId", JSIConverter<std::string>::toJSI(runtime, arg.artifactId));
84
- obj.setProperty(runtime, "url", JSIConverter<std::string>::toJSI(runtime, arg.url));
85
- obj.setProperty(runtime, "routeType", JSIConverter<std::string>::toJSI(runtime, arg.routeType));
86
- obj.setProperty(runtime, "resolvedIp", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.resolvedIp));
87
- obj.setProperty(runtime, "expectedSize", JSIConverter<double>::toJSI(runtime, arg.expectedSize));
88
- obj.setProperty(runtime, "expectedSha256", JSIConverter<std::string>::toJSI(runtime, arg.expectedSha256));
89
- obj.setProperty(runtime, "maxBytes", JSIConverter<double>::toJSI(runtime, arg.maxBytes));
90
- obj.setProperty(runtime, "overallDeadlineSeconds", JSIConverter<std::optional<double>>::toJSI(runtime, arg.overallDeadlineSeconds));
91
- return obj;
92
- }
93
- static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
94
- if (!value.isObject()) {
95
- return false;
96
- }
97
- jsi::Object obj = value.getObject(runtime);
98
- if (!nitro::isPlainObject(runtime, obj)) {
99
- return false;
100
- }
101
- if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "taskId"))) return false;
102
- if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "transactionId"))) return false;
103
- if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "leaseRef"))) return false;
104
- if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "artifactId"))) return false;
105
- if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "url"))) return false;
106
- if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "routeType"))) return false;
107
- if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "resolvedIp"))) return false;
108
- if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "expectedSize"))) return false;
109
- if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "expectedSha256"))) return false;
110
- if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "maxBytes"))) return false;
111
- if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "overallDeadlineSeconds"))) return false;
112
- return true;
113
- }
114
- };
115
-
116
- } // namespace margelo::nitro
@@ -1,75 +0,0 @@
1
- ///
2
- /// FirmwareArtifactLease.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
- #if __has_include(<NitroModules/JSIConverter.hpp>)
11
- #include <NitroModules/JSIConverter.hpp>
12
- #else
13
- #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
14
- #endif
15
- #if __has_include(<NitroModules/NitroDefines.hpp>)
16
- #include <NitroModules/NitroDefines.hpp>
17
- #else
18
- #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
19
- #endif
20
- #if __has_include(<NitroModules/JSIHelpers.hpp>)
21
- #include <NitroModules/JSIHelpers.hpp>
22
- #else
23
- #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
24
- #endif
25
-
26
-
27
-
28
- #include <string>
29
-
30
- namespace margelo::nitro::reactnativerangedownloader {
31
-
32
- /**
33
- * A struct which can be represented as a JavaScript object (FirmwareArtifactLease).
34
- */
35
- struct FirmwareArtifactLease {
36
- public:
37
- std::string leaseRef SWIFT_PRIVATE;
38
-
39
- public:
40
- FirmwareArtifactLease() = default;
41
- explicit FirmwareArtifactLease(std::string leaseRef): leaseRef(leaseRef) {}
42
- };
43
-
44
- } // namespace margelo::nitro::reactnativerangedownloader
45
-
46
- namespace margelo::nitro {
47
-
48
- // C++ FirmwareArtifactLease <> JS FirmwareArtifactLease (object)
49
- template <>
50
- struct JSIConverter<margelo::nitro::reactnativerangedownloader::FirmwareArtifactLease> final {
51
- static inline margelo::nitro::reactnativerangedownloader::FirmwareArtifactLease fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
52
- jsi::Object obj = arg.asObject(runtime);
53
- return margelo::nitro::reactnativerangedownloader::FirmwareArtifactLease(
54
- JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "leaseRef"))
55
- );
56
- }
57
- static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::reactnativerangedownloader::FirmwareArtifactLease& arg) {
58
- jsi::Object obj(runtime);
59
- obj.setProperty(runtime, "leaseRef", JSIConverter<std::string>::toJSI(runtime, arg.leaseRef));
60
- return obj;
61
- }
62
- static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
63
- if (!value.isObject()) {
64
- return false;
65
- }
66
- jsi::Object obj = value.getObject(runtime);
67
- if (!nitro::isPlainObject(runtime, obj)) {
68
- return false;
69
- }
70
- if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "leaseRef"))) return false;
71
- return true;
72
- }
73
- };
74
-
75
- } // namespace margelo::nitro