@onekeyfe/react-native-cloud-kit-module 1.1.11 → 1.1.13
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.
- package/nitrogen/generated/android/c++/JAccountInfoResult.hpp +6 -2
- package/nitrogen/generated/android/c++/JDeleteRecordParams.hpp +6 -2
- package/nitrogen/generated/android/c++/JFetchRecordParams.hpp +6 -2
- package/nitrogen/generated/android/c++/JHybridCloudKitModuleSpec.cpp +15 -5
- package/nitrogen/generated/android/c++/JHybridCloudKitModuleSpec.hpp +3 -2
- package/nitrogen/generated/android/c++/JQueryRecordsParams.hpp +6 -2
- package/nitrogen/generated/android/c++/JQueryRecordsResult.hpp +8 -3
- package/nitrogen/generated/android/c++/JRecordExistsParams.hpp +6 -2
- package/nitrogen/generated/android/c++/JRecordResult.hpp +6 -2
- package/nitrogen/generated/android/c++/JSaveRecordParams.hpp +6 -2
- package/nitrogen/generated/android/c++/JSaveRecordResult.hpp +6 -2
- package/nitrogen/generated/android/c++/JVariant_NullType_RecordResult.cpp +26 -0
- package/nitrogen/generated/android/c++/JVariant_NullType_RecordResult.hpp +72 -0
- package/nitrogen/generated/android/cloudkitmodule+autolinking.cmake +2 -1
- package/nitrogen/generated/android/cloudkitmodule+autolinking.gradle +1 -1
- package/nitrogen/generated/android/cloudkitmoduleOnLoad.cpp +1 -1
- package/nitrogen/generated/android/cloudkitmoduleOnLoad.hpp +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/cloudkitmodule/AccountInfoResult.kt +22 -13
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/cloudkitmodule/DeleteRecordParams.kt +19 -10
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/cloudkitmodule/FetchRecordParams.kt +19 -10
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/cloudkitmodule/HybridCloudKitModuleSpec.kt +11 -4
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/cloudkitmodule/QueryRecordsParams.kt +16 -7
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/cloudkitmodule/QueryRecordsResult.kt +16 -7
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/cloudkitmodule/RecordExistsParams.kt +19 -10
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/cloudkitmodule/RecordResult.kt +31 -22
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/cloudkitmodule/SaveRecordParams.kt +25 -16
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/cloudkitmodule/SaveRecordResult.kt +19 -10
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/cloudkitmodule/Variant_NullType_RecordResult.kt +59 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/cloudkitmodule/cloudkitmoduleOnLoad.kt +1 -1
- package/nitrogen/generated/ios/CloudKitModule+autolinking.rb +1 -1
- package/nitrogen/generated/ios/CloudKitModule-Swift-Cxx-Bridge.cpp +7 -6
- package/nitrogen/generated/ios/CloudKitModule-Swift-Cxx-Bridge.hpp +56 -42
- package/nitrogen/generated/ios/CloudKitModule-Swift-Cxx-Umbrella.hpp +3 -1
- package/nitrogen/generated/ios/CloudKitModuleAutolinking.mm +1 -1
- package/nitrogen/generated/ios/CloudKitModuleAutolinking.swift +1 -1
- package/nitrogen/generated/ios/c++/HybridCloudKitModuleSpecSwift.cpp +1 -1
- package/nitrogen/generated/ios/c++/HybridCloudKitModuleSpecSwift.hpp +7 -2
- package/nitrogen/generated/ios/swift/AccountInfoResult.swift +2 -1
- package/nitrogen/generated/ios/swift/DeleteRecordParams.swift +2 -1
- package/nitrogen/generated/ios/swift/FetchRecordParams.swift +2 -1
- package/nitrogen/generated/ios/swift/Func_void.swift +2 -2
- package/nitrogen/generated/ios/swift/Func_void_AccountInfoResult.swift +2 -2
- package/nitrogen/generated/ios/swift/Func_void_QueryRecordsResult.swift +2 -2
- package/nitrogen/generated/ios/swift/Func_void_SaveRecordResult.swift +2 -2
- package/nitrogen/generated/ios/swift/Func_void_bool.swift +2 -2
- package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +2 -2
- package/nitrogen/generated/ios/swift/Func_void_std__variant_nitro__NullType__RecordResult_.swift +59 -0
- package/nitrogen/generated/ios/swift/HybridCloudKitModuleSpec.swift +9 -2
- package/nitrogen/generated/ios/swift/HybridCloudKitModuleSpec_cxx.swift +23 -14
- package/nitrogen/generated/ios/swift/QueryRecordsParams.swift +2 -1
- package/nitrogen/generated/ios/swift/QueryRecordsResult.swift +17 -12
- package/nitrogen/generated/ios/swift/RecordExistsParams.swift +2 -1
- package/nitrogen/generated/ios/swift/RecordResult.swift +2 -1
- package/nitrogen/generated/ios/swift/SaveRecordParams.swift +2 -1
- package/nitrogen/generated/ios/swift/SaveRecordResult.swift +2 -1
- package/nitrogen/generated/ios/swift/Variant_NullType_RecordResult.swift +18 -0
- package/nitrogen/generated/shared/c++/AccountInfoResult.hpp +9 -1
- package/nitrogen/generated/shared/c++/DeleteRecordParams.hpp +9 -1
- package/nitrogen/generated/shared/c++/FetchRecordParams.hpp +9 -1
- package/nitrogen/generated/shared/c++/HybridCloudKitModuleSpec.cpp +1 -1
- package/nitrogen/generated/shared/c++/HybridCloudKitModuleSpec.hpp +4 -3
- package/nitrogen/generated/shared/c++/QueryRecordsParams.hpp +9 -1
- package/nitrogen/generated/shared/c++/QueryRecordsResult.hpp +9 -1
- package/nitrogen/generated/shared/c++/RecordExistsParams.hpp +9 -1
- package/nitrogen/generated/shared/c++/RecordResult.hpp +9 -1
- package/nitrogen/generated/shared/c++/SaveRecordParams.hpp +9 -1
- package/nitrogen/generated/shared/c++/SaveRecordResult.hpp +9 -1
- package/package.json +3 -4
- package/nitrogen/generated/ios/swift/Func_void_std__optional_RecordResult_.swift +0 -47
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// CloudKitModuleAutolinking.swift
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
public final class CloudKitModuleAutolinking {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// HybridCloudKitModuleSpecSwift.cpp
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#include "HybridCloudKitModuleSpecSwift.hpp"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// HybridCloudKitModuleSpecSwift.hpp
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#pragma once
|
|
@@ -37,7 +37,9 @@ namespace margelo::nitro::cloudkitmodule { struct QueryRecordsParams; }
|
|
|
37
37
|
#include <optional>
|
|
38
38
|
#include "SaveRecordResult.hpp"
|
|
39
39
|
#include "SaveRecordParams.hpp"
|
|
40
|
+
#include <NitroModules/Null.hpp>
|
|
40
41
|
#include "RecordResult.hpp"
|
|
42
|
+
#include <variant>
|
|
41
43
|
#include "FetchRecordParams.hpp"
|
|
42
44
|
#include "DeleteRecordParams.hpp"
|
|
43
45
|
#include "RecordExistsParams.hpp"
|
|
@@ -79,6 +81,9 @@ namespace margelo::nitro::cloudkitmodule {
|
|
|
79
81
|
void dispose() noexcept override {
|
|
80
82
|
_swiftPart.dispose();
|
|
81
83
|
}
|
|
84
|
+
std::string toString() override {
|
|
85
|
+
return _swiftPart.toString();
|
|
86
|
+
}
|
|
82
87
|
|
|
83
88
|
public:
|
|
84
89
|
// Properties
|
|
@@ -110,7 +115,7 @@ namespace margelo::nitro::cloudkitmodule {
|
|
|
110
115
|
auto __value = std::move(__result.value());
|
|
111
116
|
return __value;
|
|
112
117
|
}
|
|
113
|
-
inline std::shared_ptr<Promise<std::
|
|
118
|
+
inline std::shared_ptr<Promise<std::variant<nitro::NullType, RecordResult>>> fetchRecord(const FetchRecordParams& params) override {
|
|
114
119
|
auto __result = _swiftPart.fetchRecord(std::forward<decltype(params)>(params));
|
|
115
120
|
if (__result.hasError()) [[unlikely]] {
|
|
116
121
|
std::rethrow_exception(__result.error());
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
/// AccountInfoResult.swift
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
|
+
import Foundation
|
|
8
9
|
import NitroModules
|
|
9
10
|
|
|
10
11
|
/**
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
/// DeleteRecordParams.swift
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
|
+
import Foundation
|
|
8
9
|
import NitroModules
|
|
9
10
|
|
|
10
11
|
/**
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
/// FetchRecordParams.swift
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
|
+
import Foundation
|
|
8
9
|
import NitroModules
|
|
9
10
|
|
|
10
11
|
/**
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
/// Func_void.swift
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
|
+
import Foundation
|
|
8
9
|
import NitroModules
|
|
9
10
|
|
|
10
|
-
|
|
11
11
|
/**
|
|
12
12
|
* Wraps a Swift `() -> Void` as a class.
|
|
13
13
|
* This class can be used from C++, e.g. to wrap the Swift closure as a `std::function`.
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
/// Func_void_AccountInfoResult.swift
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
|
+
import Foundation
|
|
8
9
|
import NitroModules
|
|
9
10
|
|
|
10
|
-
|
|
11
11
|
/**
|
|
12
12
|
* Wraps a Swift `(_ value: AccountInfoResult) -> Void` as a class.
|
|
13
13
|
* This class can be used from C++, e.g. to wrap the Swift closure as a `std::function`.
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
/// Func_void_QueryRecordsResult.swift
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
|
+
import Foundation
|
|
8
9
|
import NitroModules
|
|
9
10
|
|
|
10
|
-
|
|
11
11
|
/**
|
|
12
12
|
* Wraps a Swift `(_ value: QueryRecordsResult) -> Void` as a class.
|
|
13
13
|
* This class can be used from C++, e.g. to wrap the Swift closure as a `std::function`.
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
/// Func_void_SaveRecordResult.swift
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
|
+
import Foundation
|
|
8
9
|
import NitroModules
|
|
9
10
|
|
|
10
|
-
|
|
11
11
|
/**
|
|
12
12
|
* Wraps a Swift `(_ value: SaveRecordResult) -> Void` as a class.
|
|
13
13
|
* This class can be used from C++, e.g. to wrap the Swift closure as a `std::function`.
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
/// Func_void_bool.swift
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
|
+
import Foundation
|
|
8
9
|
import NitroModules
|
|
9
10
|
|
|
10
|
-
|
|
11
11
|
/**
|
|
12
12
|
* Wraps a Swift `(_ value: Bool) -> Void` as a class.
|
|
13
13
|
* This class can be used from C++, e.g. to wrap the Swift closure as a `std::function`.
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
/// Func_void_std__exception_ptr.swift
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
|
+
import Foundation
|
|
8
9
|
import NitroModules
|
|
9
10
|
|
|
10
|
-
|
|
11
11
|
/**
|
|
12
12
|
* Wraps a Swift `(_ error: Error) -> Void` as a class.
|
|
13
13
|
* This class can be used from C++, e.g. to wrap the Swift closure as a `std::function`.
|
package/nitrogen/generated/ios/swift/Func_void_std__variant_nitro__NullType__RecordResult_.swift
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// Func_void_std__variant_nitro__NullType__RecordResult_.swift
|
|
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
|
+
import Foundation
|
|
9
|
+
import NitroModules
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Wraps a Swift `(_ value: Variant_NullType_RecordResult) -> Void` as a class.
|
|
13
|
+
* This class can be used from C++, e.g. to wrap the Swift closure as a `std::function`.
|
|
14
|
+
*/
|
|
15
|
+
public final class Func_void_std__variant_nitro__NullType__RecordResult_ {
|
|
16
|
+
public typealias bridge = margelo.nitro.cloudkitmodule.bridge.swift
|
|
17
|
+
|
|
18
|
+
private let closure: (_ value: Variant_NullType_RecordResult) -> Void
|
|
19
|
+
|
|
20
|
+
public init(_ closure: @escaping (_ value: Variant_NullType_RecordResult) -> Void) {
|
|
21
|
+
self.closure = closure
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@inline(__always)
|
|
25
|
+
public func call(value: bridge.std__variant_nitro__NullType__RecordResult_) -> Void {
|
|
26
|
+
self.closure({ () -> Variant_NullType_RecordResult in
|
|
27
|
+
let __variant = value
|
|
28
|
+
switch __variant.index() {
|
|
29
|
+
case 0:
|
|
30
|
+
let __actual = __variant.get_0()
|
|
31
|
+
return .first(NullType.null)
|
|
32
|
+
case 1:
|
|
33
|
+
let __actual = __variant.get_1()
|
|
34
|
+
return .second(__actual)
|
|
35
|
+
default:
|
|
36
|
+
fatalError("Variant can never have index \(__variant.index())!")
|
|
37
|
+
}
|
|
38
|
+
}())
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Casts this instance to a retained unsafe raw pointer.
|
|
43
|
+
* This acquires one additional strong reference on the object!
|
|
44
|
+
*/
|
|
45
|
+
@inline(__always)
|
|
46
|
+
public func toUnsafe() -> UnsafeMutableRawPointer {
|
|
47
|
+
return Unmanaged.passRetained(self).toOpaque()
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Casts an unsafe pointer to a `Func_void_std__variant_nitro__NullType__RecordResult_`.
|
|
52
|
+
* The pointer has to be a retained opaque `Unmanaged<Func_void_std__variant_nitro__NullType__RecordResult_>`.
|
|
53
|
+
* This removes one strong reference from the object!
|
|
54
|
+
*/
|
|
55
|
+
@inline(__always)
|
|
56
|
+
public static func fromUnsafe(_ pointer: UnsafeMutableRawPointer) -> Func_void_std__variant_nitro__NullType__RecordResult_ {
|
|
57
|
+
return Unmanaged<Func_void_std__variant_nitro__NullType__RecordResult_>.fromOpaque(pointer).takeRetainedValue()
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// HybridCloudKitModuleSpec.swift
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
import Foundation
|
|
@@ -17,12 +17,19 @@ public protocol HybridCloudKitModuleSpec_protocol: HybridObject {
|
|
|
17
17
|
func isAvailable() throws -> Promise<Bool>
|
|
18
18
|
func getAccountInfo() throws -> Promise<AccountInfoResult>
|
|
19
19
|
func saveRecord(params: SaveRecordParams) throws -> Promise<SaveRecordResult>
|
|
20
|
-
func fetchRecord(params: FetchRecordParams) throws -> Promise<
|
|
20
|
+
func fetchRecord(params: FetchRecordParams) throws -> Promise<Variant_NullType_RecordResult>
|
|
21
21
|
func deleteRecord(params: DeleteRecordParams) throws -> Promise<Void>
|
|
22
22
|
func recordExists(params: RecordExistsParams) throws -> Promise<Bool>
|
|
23
23
|
func queryRecords(params: QueryRecordsParams) throws -> Promise<QueryRecordsResult>
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
+
public extension HybridCloudKitModuleSpec_protocol {
|
|
27
|
+
/// Default implementation of ``HybridObject.toString``
|
|
28
|
+
func toString() -> String {
|
|
29
|
+
return "[HybridObject CloudKitModule]"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
26
33
|
/// See ``HybridCloudKitModuleSpec``
|
|
27
34
|
open class HybridCloudKitModuleSpec_base {
|
|
28
35
|
private weak var cxxWrapper: HybridCloudKitModuleSpec_cxx? = nil
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// HybridCloudKitModuleSpec_cxx.swift
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
import Foundation
|
|
@@ -76,7 +76,7 @@ open class HybridCloudKitModuleSpec_cxx {
|
|
|
76
76
|
*/
|
|
77
77
|
public func getCxxPart() -> bridge.std__shared_ptr_HybridCloudKitModuleSpec_ {
|
|
78
78
|
let cachedCxxPart = self.__cxxPart.lock()
|
|
79
|
-
if cachedCxxPart
|
|
79
|
+
if Bool(fromCxx: cachedCxxPart) {
|
|
80
80
|
return cachedCxxPart
|
|
81
81
|
} else {
|
|
82
82
|
let newCxxPart = bridge.create_std__shared_ptr_HybridCloudKitModuleSpec_(self.toUnsafe())
|
|
@@ -105,6 +105,14 @@ open class HybridCloudKitModuleSpec_cxx {
|
|
|
105
105
|
self.__implementation.dispose()
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
+
/**
|
|
109
|
+
* Call toString() on the Swift class.
|
|
110
|
+
*/
|
|
111
|
+
@inline(__always)
|
|
112
|
+
public func toString() -> String {
|
|
113
|
+
return self.__implementation.toString()
|
|
114
|
+
}
|
|
115
|
+
|
|
108
116
|
// Properties
|
|
109
117
|
|
|
110
118
|
|
|
@@ -167,27 +175,28 @@ open class HybridCloudKitModuleSpec_cxx {
|
|
|
167
175
|
}
|
|
168
176
|
|
|
169
177
|
@inline(__always)
|
|
170
|
-
public final func fetchRecord(params: FetchRecordParams) -> bridge.
|
|
178
|
+
public final func fetchRecord(params: FetchRecordParams) -> bridge.Result_std__shared_ptr_Promise_std__variant_nitro__NullType__RecordResult____ {
|
|
171
179
|
do {
|
|
172
180
|
let __result = try self.__implementation.fetchRecord(params: params)
|
|
173
|
-
let __resultCpp = { () -> bridge.
|
|
174
|
-
let __promise = bridge.
|
|
175
|
-
let __promiseHolder = bridge.
|
|
181
|
+
let __resultCpp = { () -> bridge.std__shared_ptr_Promise_std__variant_nitro__NullType__RecordResult___ in
|
|
182
|
+
let __promise = bridge.create_std__shared_ptr_Promise_std__variant_nitro__NullType__RecordResult___()
|
|
183
|
+
let __promiseHolder = bridge.wrap_std__shared_ptr_Promise_std__variant_nitro__NullType__RecordResult___(__promise)
|
|
176
184
|
__result
|
|
177
|
-
.then({ __result in __promiseHolder.resolve({ () -> bridge.
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
185
|
+
.then({ __result in __promiseHolder.resolve({ () -> bridge.std__variant_nitro__NullType__RecordResult_ in
|
|
186
|
+
switch __result {
|
|
187
|
+
case .first(let __value):
|
|
188
|
+
return bridge.create_std__variant_nitro__NullType__RecordResult_(margelo.nitro.NullType.null)
|
|
189
|
+
case .second(let __value):
|
|
190
|
+
return bridge.create_std__variant_nitro__NullType__RecordResult_(__value)
|
|
182
191
|
}
|
|
183
|
-
}()) })
|
|
192
|
+
}().variant) })
|
|
184
193
|
.catch({ __error in __promiseHolder.reject(__error.toCpp()) })
|
|
185
194
|
return __promise
|
|
186
195
|
}()
|
|
187
|
-
return bridge.
|
|
196
|
+
return bridge.create_Result_std__shared_ptr_Promise_std__variant_nitro__NullType__RecordResult____(__resultCpp)
|
|
188
197
|
} catch (let __error) {
|
|
189
198
|
let __exceptionPtr = __error.toCpp()
|
|
190
|
-
return bridge.
|
|
199
|
+
return bridge.create_Result_std__shared_ptr_Promise_std__variant_nitro__NullType__RecordResult____(__exceptionPtr)
|
|
191
200
|
}
|
|
192
201
|
}
|
|
193
202
|
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
/// QueryRecordsParams.swift
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
|
+
import Foundation
|
|
8
9
|
import NitroModules
|
|
9
10
|
|
|
10
11
|
/**
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
/// QueryRecordsResult.swift
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
|
+
import Foundation
|
|
8
9
|
import NitroModules
|
|
9
10
|
|
|
10
11
|
/**
|
|
@@ -19,25 +20,29 @@ public extension QueryRecordsResult {
|
|
|
19
20
|
* Create a new instance of `QueryRecordsResult`.
|
|
20
21
|
*/
|
|
21
22
|
init(records: [RecordResult]) {
|
|
22
|
-
self.init(
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
self.init({ () -> bridge.std__vector_RecordResult_ in
|
|
24
|
+
var __vector = bridge.create_std__vector_RecordResult_(records.count)
|
|
25
|
+
for __item in records {
|
|
26
|
+
__vector.push_back(__item)
|
|
27
|
+
}
|
|
28
|
+
return __vector
|
|
29
|
+
}())
|
|
25
30
|
}
|
|
26
31
|
|
|
27
32
|
var records: [RecordResult] {
|
|
28
33
|
@inline(__always)
|
|
29
34
|
get {
|
|
30
|
-
return {
|
|
31
|
-
let __data = bridge.get_data_std__vector_RecordResult_(self.__records)
|
|
32
|
-
let __size = self.__records.size()
|
|
33
|
-
return Array(UnsafeBufferPointer(start: __data, count: __size))
|
|
34
|
-
}()
|
|
35
|
+
return self.__records.map({ __item in __item })
|
|
35
36
|
}
|
|
36
37
|
@inline(__always)
|
|
37
38
|
set {
|
|
38
|
-
self.__records =
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
self.__records = { () -> bridge.std__vector_RecordResult_ in
|
|
40
|
+
var __vector = bridge.create_std__vector_RecordResult_(newValue.count)
|
|
41
|
+
for __item in newValue {
|
|
42
|
+
__vector.push_back(__item)
|
|
43
|
+
}
|
|
44
|
+
return __vector
|
|
45
|
+
}()
|
|
41
46
|
}
|
|
42
47
|
}
|
|
43
48
|
}
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
/// RecordExistsParams.swift
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
|
+
import Foundation
|
|
8
9
|
import NitroModules
|
|
9
10
|
|
|
10
11
|
/**
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
/// RecordResult.swift
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
|
+
import Foundation
|
|
8
9
|
import NitroModules
|
|
9
10
|
|
|
10
11
|
/**
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
/// SaveRecordParams.swift
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
|
+
import Foundation
|
|
8
9
|
import NitroModules
|
|
9
10
|
|
|
10
11
|
/**
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
/// SaveRecordResult.swift
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
|
+
import Foundation
|
|
8
9
|
import NitroModules
|
|
9
10
|
|
|
10
11
|
/**
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// Variant_NullType_RecordResult.swift
|
|
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
|
+
import NitroModules
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* An Swift enum with associated values representing a Variant/Union type.
|
|
12
|
+
* JS type: `null | struct`
|
|
13
|
+
*/
|
|
14
|
+
@frozen
|
|
15
|
+
public indirect enum Variant_NullType_RecordResult {
|
|
16
|
+
case first(NullType)
|
|
17
|
+
case second(RecordResult)
|
|
18
|
+
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// AccountInfoResult.hpp
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#pragma once
|
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
#else
|
|
18
18
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
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
|
|
20
25
|
|
|
21
26
|
|
|
22
27
|
|
|
@@ -66,6 +71,9 @@ namespace margelo::nitro {
|
|
|
66
71
|
return false;
|
|
67
72
|
}
|
|
68
73
|
jsi::Object obj = value.getObject(runtime);
|
|
74
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
69
77
|
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "status"))) return false;
|
|
70
78
|
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "statusName"))) return false;
|
|
71
79
|
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "containerUserId"))) return false;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// DeleteRecordParams.hpp
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#pragma once
|
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
#else
|
|
18
18
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
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
|
|
20
25
|
|
|
21
26
|
|
|
22
27
|
|
|
@@ -62,6 +67,9 @@ namespace margelo::nitro {
|
|
|
62
67
|
return false;
|
|
63
68
|
}
|
|
64
69
|
jsi::Object obj = value.getObject(runtime);
|
|
70
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
71
|
+
return false;
|
|
72
|
+
}
|
|
65
73
|
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "recordType"))) return false;
|
|
66
74
|
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "recordID"))) return false;
|
|
67
75
|
return true;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// FetchRecordParams.hpp
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#pragma once
|
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
#else
|
|
18
18
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
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
|
|
20
25
|
|
|
21
26
|
|
|
22
27
|
|
|
@@ -62,6 +67,9 @@ namespace margelo::nitro {
|
|
|
62
67
|
return false;
|
|
63
68
|
}
|
|
64
69
|
jsi::Object obj = value.getObject(runtime);
|
|
70
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
71
|
+
return false;
|
|
72
|
+
}
|
|
65
73
|
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "recordType"))) return false;
|
|
66
74
|
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "recordID"))) return false;
|
|
67
75
|
return true;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// HybridCloudKitModuleSpec.cpp
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#include "HybridCloudKitModuleSpec.hpp"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// HybridCloudKitModuleSpec.hpp
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#pragma once
|
|
@@ -36,8 +36,9 @@ namespace margelo::nitro::cloudkitmodule { struct QueryRecordsParams; }
|
|
|
36
36
|
#include "AccountInfoResult.hpp"
|
|
37
37
|
#include "SaveRecordResult.hpp"
|
|
38
38
|
#include "SaveRecordParams.hpp"
|
|
39
|
+
#include <NitroModules/Null.hpp>
|
|
39
40
|
#include "RecordResult.hpp"
|
|
40
|
-
#include <
|
|
41
|
+
#include <variant>
|
|
41
42
|
#include "FetchRecordParams.hpp"
|
|
42
43
|
#include "DeleteRecordParams.hpp"
|
|
43
44
|
#include "RecordExistsParams.hpp"
|
|
@@ -78,7 +79,7 @@ namespace margelo::nitro::cloudkitmodule {
|
|
|
78
79
|
virtual std::shared_ptr<Promise<bool>> isAvailable() = 0;
|
|
79
80
|
virtual std::shared_ptr<Promise<AccountInfoResult>> getAccountInfo() = 0;
|
|
80
81
|
virtual std::shared_ptr<Promise<SaveRecordResult>> saveRecord(const SaveRecordParams& params) = 0;
|
|
81
|
-
virtual std::shared_ptr<Promise<std::
|
|
82
|
+
virtual std::shared_ptr<Promise<std::variant<nitro::NullType, RecordResult>>> fetchRecord(const FetchRecordParams& params) = 0;
|
|
82
83
|
virtual std::shared_ptr<Promise<void>> deleteRecord(const DeleteRecordParams& params) = 0;
|
|
83
84
|
virtual std::shared_ptr<Promise<bool>> recordExists(const RecordExistsParams& params) = 0;
|
|
84
85
|
virtual std::shared_ptr<Promise<QueryRecordsResult>> queryRecords(const QueryRecordsParams& params) = 0;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// QueryRecordsParams.hpp
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#pragma once
|
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
#else
|
|
18
18
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
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
|
|
20
25
|
|
|
21
26
|
|
|
22
27
|
|
|
@@ -59,6 +64,9 @@ namespace margelo::nitro {
|
|
|
59
64
|
return false;
|
|
60
65
|
}
|
|
61
66
|
jsi::Object obj = value.getObject(runtime);
|
|
67
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
68
|
+
return false;
|
|
69
|
+
}
|
|
62
70
|
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "recordType"))) return false;
|
|
63
71
|
return true;
|
|
64
72
|
}
|