@onekeyfe/react-native-cloud-kit-module 3.0.81 → 3.0.82
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 +2 -2
- package/nitrogen/generated/android/c++/JDeleteRecordParams.hpp +2 -2
- package/nitrogen/generated/android/c++/JFetchRecordParams.hpp +2 -2
- package/nitrogen/generated/android/c++/JHybridCloudKitModuleSpec.cpp +28 -26
- package/nitrogen/generated/android/c++/JHybridCloudKitModuleSpec.hpp +20 -22
- package/nitrogen/generated/android/c++/JQueryRecordsParams.hpp +2 -2
- package/nitrogen/generated/android/c++/JQueryRecordsResult.hpp +2 -2
- package/nitrogen/generated/android/c++/JRecordExistsParams.hpp +2 -2
- package/nitrogen/generated/android/c++/JRecordResult.hpp +2 -2
- package/nitrogen/generated/android/c++/JSaveRecordParams.hpp +2 -2
- package/nitrogen/generated/android/c++/JSaveRecordResult.hpp +2 -2
- package/nitrogen/generated/android/c++/JVariant_NullType_RecordResult.cpp +1 -1
- package/nitrogen/generated/android/c++/JVariant_NullType_RecordResult.hpp +6 -6
- package/nitrogen/generated/android/cloudkitmodule+autolinking.cmake +1 -1
- package/nitrogen/generated/android/cloudkitmodule+autolinking.gradle +1 -1
- package/nitrogen/generated/android/cloudkitmoduleOnLoad.cpp +27 -17
- package/nitrogen/generated/android/cloudkitmoduleOnLoad.hpp +14 -5
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/cloudkitmodule/AccountInfoResult.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/cloudkitmodule/DeleteRecordParams.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/cloudkitmodule/FetchRecordParams.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/cloudkitmodule/HybridCloudKitModuleSpec.kt +16 -19
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/cloudkitmodule/QueryRecordsParams.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/cloudkitmodule/QueryRecordsResult.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/cloudkitmodule/RecordExistsParams.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/cloudkitmodule/RecordResult.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/cloudkitmodule/SaveRecordParams.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/cloudkitmodule/SaveRecordResult.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/cloudkitmodule/Variant_NullType_RecordResult.kt +1 -7
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/cloudkitmodule/cloudkitmoduleOnLoad.kt +1 -1
- package/nitrogen/generated/ios/CloudKitModule+autolinking.rb +2 -2
- package/nitrogen/generated/ios/CloudKitModule-Swift-Cxx-Bridge.cpp +1 -1
- package/nitrogen/generated/ios/CloudKitModule-Swift-Cxx-Bridge.hpp +3 -3
- package/nitrogen/generated/ios/CloudKitModule-Swift-Cxx-Umbrella.hpp +1 -1
- package/nitrogen/generated/ios/CloudKitModuleAutolinking.mm +1 -1
- package/nitrogen/generated/ios/CloudKitModuleAutolinking.swift +9 -8
- package/nitrogen/generated/ios/c++/HybridCloudKitModuleSpecSwift.cpp +1 -1
- package/nitrogen/generated/ios/c++/HybridCloudKitModuleSpecSwift.hpp +7 -1
- package/nitrogen/generated/ios/swift/AccountInfoResult.swift +14 -39
- package/nitrogen/generated/ios/swift/DeleteRecordParams.swift +5 -18
- package/nitrogen/generated/ios/swift/FetchRecordParams.swift +5 -18
- package/nitrogen/generated/ios/swift/Func_void.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_AccountInfoResult.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_QueryRecordsResult.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_SaveRecordResult.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_bool.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_std__variant_nitro__NullType__RecordResult_.swift +1 -2
- package/nitrogen/generated/ios/swift/HybridCloudKitModuleSpec.swift +3 -4
- package/nitrogen/generated/ios/swift/HybridCloudKitModuleSpec_cxx.swift +9 -2
- package/nitrogen/generated/ios/swift/QueryRecordsParams.swift +3 -10
- package/nitrogen/generated/ios/swift/QueryRecordsResult.swift +3 -16
- package/nitrogen/generated/ios/swift/RecordExistsParams.swift +5 -18
- package/nitrogen/generated/ios/swift/RecordResult.swift +13 -50
- package/nitrogen/generated/ios/swift/SaveRecordParams.swift +9 -34
- package/nitrogen/generated/ios/swift/SaveRecordResult.swift +5 -18
- package/nitrogen/generated/ios/swift/Variant_NullType_RecordResult.swift +1 -1
- package/nitrogen/generated/shared/c++/AccountInfoResult.hpp +19 -11
- package/nitrogen/generated/shared/c++/DeleteRecordParams.hpp +16 -8
- package/nitrogen/generated/shared/c++/FetchRecordParams.hpp +16 -8
- package/nitrogen/generated/shared/c++/HybridCloudKitModuleSpec.cpp +1 -1
- package/nitrogen/generated/shared/c++/HybridCloudKitModuleSpec.hpp +1 -1
- package/nitrogen/generated/shared/c++/QueryRecordsParams.hpp +13 -5
- package/nitrogen/generated/shared/c++/QueryRecordsResult.hpp +13 -5
- package/nitrogen/generated/shared/c++/RecordExistsParams.hpp +16 -8
- package/nitrogen/generated/shared/c++/RecordResult.hpp +28 -20
- package/nitrogen/generated/shared/c++/SaveRecordParams.hpp +22 -14
- package/nitrogen/generated/shared/c++/SaveRecordResult.hpp +16 -8
- package/package.json +4 -4
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// RecordExistsParams.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 © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#pragma once
|
|
@@ -22,6 +22,11 @@
|
|
|
22
22
|
#else
|
|
23
23
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
24
|
#endif
|
|
25
|
+
#if __has_include(<NitroModules/PropNameIDCache.hpp>)
|
|
26
|
+
#include <NitroModules/PropNameIDCache.hpp>
|
|
27
|
+
#else
|
|
28
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
29
|
+
#endif
|
|
25
30
|
|
|
26
31
|
|
|
27
32
|
|
|
@@ -32,7 +37,7 @@ namespace margelo::nitro::cloudkitmodule {
|
|
|
32
37
|
/**
|
|
33
38
|
* A struct which can be represented as a JavaScript object (RecordExistsParams).
|
|
34
39
|
*/
|
|
35
|
-
struct RecordExistsParams {
|
|
40
|
+
struct RecordExistsParams final {
|
|
36
41
|
public:
|
|
37
42
|
std::string recordType SWIFT_PRIVATE;
|
|
38
43
|
std::string recordID SWIFT_PRIVATE;
|
|
@@ -40,6 +45,9 @@ namespace margelo::nitro::cloudkitmodule {
|
|
|
40
45
|
public:
|
|
41
46
|
RecordExistsParams() = default;
|
|
42
47
|
explicit RecordExistsParams(std::string recordType, std::string recordID): recordType(recordType), recordID(recordID) {}
|
|
48
|
+
|
|
49
|
+
public:
|
|
50
|
+
friend bool operator==(const RecordExistsParams& lhs, const RecordExistsParams& rhs) = default;
|
|
43
51
|
};
|
|
44
52
|
|
|
45
53
|
} // namespace margelo::nitro::cloudkitmodule
|
|
@@ -52,14 +60,14 @@ namespace margelo::nitro {
|
|
|
52
60
|
static inline margelo::nitro::cloudkitmodule::RecordExistsParams fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
53
61
|
jsi::Object obj = arg.asObject(runtime);
|
|
54
62
|
return margelo::nitro::cloudkitmodule::RecordExistsParams(
|
|
55
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "recordType")),
|
|
56
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "recordID"))
|
|
63
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "recordType"))),
|
|
64
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "recordID")))
|
|
57
65
|
);
|
|
58
66
|
}
|
|
59
67
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::cloudkitmodule::RecordExistsParams& arg) {
|
|
60
68
|
jsi::Object obj(runtime);
|
|
61
|
-
obj.setProperty(runtime, "recordType", JSIConverter<std::string>::toJSI(runtime, arg.recordType));
|
|
62
|
-
obj.setProperty(runtime, "recordID", JSIConverter<std::string>::toJSI(runtime, arg.recordID));
|
|
69
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "recordType"), JSIConverter<std::string>::toJSI(runtime, arg.recordType));
|
|
70
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "recordID"), JSIConverter<std::string>::toJSI(runtime, arg.recordID));
|
|
63
71
|
return obj;
|
|
64
72
|
}
|
|
65
73
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -70,8 +78,8 @@ namespace margelo::nitro {
|
|
|
70
78
|
if (!nitro::isPlainObject(runtime, obj)) {
|
|
71
79
|
return false;
|
|
72
80
|
}
|
|
73
|
-
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "recordType"))) return false;
|
|
74
|
-
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "recordID"))) return false;
|
|
81
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "recordType")))) return false;
|
|
82
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "recordID")))) return false;
|
|
75
83
|
return true;
|
|
76
84
|
}
|
|
77
85
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// RecordResult.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 © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#pragma once
|
|
@@ -22,6 +22,11 @@
|
|
|
22
22
|
#else
|
|
23
23
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
24
|
#endif
|
|
25
|
+
#if __has_include(<NitroModules/PropNameIDCache.hpp>)
|
|
26
|
+
#include <NitroModules/PropNameIDCache.hpp>
|
|
27
|
+
#else
|
|
28
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
29
|
+
#endif
|
|
25
30
|
|
|
26
31
|
|
|
27
32
|
|
|
@@ -32,7 +37,7 @@ namespace margelo::nitro::cloudkitmodule {
|
|
|
32
37
|
/**
|
|
33
38
|
* A struct which can be represented as a JavaScript object (RecordResult).
|
|
34
39
|
*/
|
|
35
|
-
struct RecordResult {
|
|
40
|
+
struct RecordResult final {
|
|
36
41
|
public:
|
|
37
42
|
std::string recordID SWIFT_PRIVATE;
|
|
38
43
|
std::string recordType SWIFT_PRIVATE;
|
|
@@ -44,6 +49,9 @@ namespace margelo::nitro::cloudkitmodule {
|
|
|
44
49
|
public:
|
|
45
50
|
RecordResult() = default;
|
|
46
51
|
explicit RecordResult(std::string recordID, std::string recordType, std::string data, std::string meta, double createdAt, double modifiedAt): recordID(recordID), recordType(recordType), data(data), meta(meta), createdAt(createdAt), modifiedAt(modifiedAt) {}
|
|
52
|
+
|
|
53
|
+
public:
|
|
54
|
+
friend bool operator==(const RecordResult& lhs, const RecordResult& rhs) = default;
|
|
47
55
|
};
|
|
48
56
|
|
|
49
57
|
} // namespace margelo::nitro::cloudkitmodule
|
|
@@ -56,22 +64,22 @@ namespace margelo::nitro {
|
|
|
56
64
|
static inline margelo::nitro::cloudkitmodule::RecordResult fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
57
65
|
jsi::Object obj = arg.asObject(runtime);
|
|
58
66
|
return margelo::nitro::cloudkitmodule::RecordResult(
|
|
59
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "recordID")),
|
|
60
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "recordType")),
|
|
61
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "data")),
|
|
62
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "meta")),
|
|
63
|
-
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "createdAt")),
|
|
64
|
-
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "modifiedAt"))
|
|
67
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "recordID"))),
|
|
68
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "recordType"))),
|
|
69
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "data"))),
|
|
70
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "meta"))),
|
|
71
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "createdAt"))),
|
|
72
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "modifiedAt")))
|
|
65
73
|
);
|
|
66
74
|
}
|
|
67
75
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::cloudkitmodule::RecordResult& arg) {
|
|
68
76
|
jsi::Object obj(runtime);
|
|
69
|
-
obj.setProperty(runtime, "recordID", JSIConverter<std::string>::toJSI(runtime, arg.recordID));
|
|
70
|
-
obj.setProperty(runtime, "recordType", JSIConverter<std::string>::toJSI(runtime, arg.recordType));
|
|
71
|
-
obj.setProperty(runtime, "data", JSIConverter<std::string>::toJSI(runtime, arg.data));
|
|
72
|
-
obj.setProperty(runtime, "meta", JSIConverter<std::string>::toJSI(runtime, arg.meta));
|
|
73
|
-
obj.setProperty(runtime, "createdAt", JSIConverter<double>::toJSI(runtime, arg.createdAt));
|
|
74
|
-
obj.setProperty(runtime, "modifiedAt", JSIConverter<double>::toJSI(runtime, arg.modifiedAt));
|
|
77
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "recordID"), JSIConverter<std::string>::toJSI(runtime, arg.recordID));
|
|
78
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "recordType"), JSIConverter<std::string>::toJSI(runtime, arg.recordType));
|
|
79
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "data"), JSIConverter<std::string>::toJSI(runtime, arg.data));
|
|
80
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "meta"), JSIConverter<std::string>::toJSI(runtime, arg.meta));
|
|
81
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "createdAt"), JSIConverter<double>::toJSI(runtime, arg.createdAt));
|
|
82
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "modifiedAt"), JSIConverter<double>::toJSI(runtime, arg.modifiedAt));
|
|
75
83
|
return obj;
|
|
76
84
|
}
|
|
77
85
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -82,12 +90,12 @@ namespace margelo::nitro {
|
|
|
82
90
|
if (!nitro::isPlainObject(runtime, obj)) {
|
|
83
91
|
return false;
|
|
84
92
|
}
|
|
85
|
-
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "recordID"))) return false;
|
|
86
|
-
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "recordType"))) return false;
|
|
87
|
-
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "data"))) return false;
|
|
88
|
-
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "meta"))) return false;
|
|
89
|
-
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "createdAt"))) return false;
|
|
90
|
-
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "modifiedAt"))) return false;
|
|
93
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "recordID")))) return false;
|
|
94
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "recordType")))) return false;
|
|
95
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "data")))) return false;
|
|
96
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "meta")))) return false;
|
|
97
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "createdAt")))) return false;
|
|
98
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "modifiedAt")))) return false;
|
|
91
99
|
return true;
|
|
92
100
|
}
|
|
93
101
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// SaveRecordParams.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 © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#pragma once
|
|
@@ -22,6 +22,11 @@
|
|
|
22
22
|
#else
|
|
23
23
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
24
|
#endif
|
|
25
|
+
#if __has_include(<NitroModules/PropNameIDCache.hpp>)
|
|
26
|
+
#include <NitroModules/PropNameIDCache.hpp>
|
|
27
|
+
#else
|
|
28
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
29
|
+
#endif
|
|
25
30
|
|
|
26
31
|
|
|
27
32
|
|
|
@@ -32,7 +37,7 @@ namespace margelo::nitro::cloudkitmodule {
|
|
|
32
37
|
/**
|
|
33
38
|
* A struct which can be represented as a JavaScript object (SaveRecordParams).
|
|
34
39
|
*/
|
|
35
|
-
struct SaveRecordParams {
|
|
40
|
+
struct SaveRecordParams final {
|
|
36
41
|
public:
|
|
37
42
|
std::string recordType SWIFT_PRIVATE;
|
|
38
43
|
std::string recordID SWIFT_PRIVATE;
|
|
@@ -42,6 +47,9 @@ namespace margelo::nitro::cloudkitmodule {
|
|
|
42
47
|
public:
|
|
43
48
|
SaveRecordParams() = default;
|
|
44
49
|
explicit SaveRecordParams(std::string recordType, std::string recordID, std::string data, std::string meta): recordType(recordType), recordID(recordID), data(data), meta(meta) {}
|
|
50
|
+
|
|
51
|
+
public:
|
|
52
|
+
friend bool operator==(const SaveRecordParams& lhs, const SaveRecordParams& rhs) = default;
|
|
45
53
|
};
|
|
46
54
|
|
|
47
55
|
} // namespace margelo::nitro::cloudkitmodule
|
|
@@ -54,18 +62,18 @@ namespace margelo::nitro {
|
|
|
54
62
|
static inline margelo::nitro::cloudkitmodule::SaveRecordParams fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
55
63
|
jsi::Object obj = arg.asObject(runtime);
|
|
56
64
|
return margelo::nitro::cloudkitmodule::SaveRecordParams(
|
|
57
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "recordType")),
|
|
58
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "recordID")),
|
|
59
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "data")),
|
|
60
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "meta"))
|
|
65
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "recordType"))),
|
|
66
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "recordID"))),
|
|
67
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "data"))),
|
|
68
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "meta")))
|
|
61
69
|
);
|
|
62
70
|
}
|
|
63
71
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::cloudkitmodule::SaveRecordParams& arg) {
|
|
64
72
|
jsi::Object obj(runtime);
|
|
65
|
-
obj.setProperty(runtime, "recordType", JSIConverter<std::string>::toJSI(runtime, arg.recordType));
|
|
66
|
-
obj.setProperty(runtime, "recordID", JSIConverter<std::string>::toJSI(runtime, arg.recordID));
|
|
67
|
-
obj.setProperty(runtime, "data", JSIConverter<std::string>::toJSI(runtime, arg.data));
|
|
68
|
-
obj.setProperty(runtime, "meta", JSIConverter<std::string>::toJSI(runtime, arg.meta));
|
|
73
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "recordType"), JSIConverter<std::string>::toJSI(runtime, arg.recordType));
|
|
74
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "recordID"), JSIConverter<std::string>::toJSI(runtime, arg.recordID));
|
|
75
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "data"), JSIConverter<std::string>::toJSI(runtime, arg.data));
|
|
76
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "meta"), JSIConverter<std::string>::toJSI(runtime, arg.meta));
|
|
69
77
|
return obj;
|
|
70
78
|
}
|
|
71
79
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -76,10 +84,10 @@ namespace margelo::nitro {
|
|
|
76
84
|
if (!nitro::isPlainObject(runtime, obj)) {
|
|
77
85
|
return false;
|
|
78
86
|
}
|
|
79
|
-
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "recordType"))) return false;
|
|
80
|
-
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "recordID"))) return false;
|
|
81
|
-
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "data"))) return false;
|
|
82
|
-
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "meta"))) return false;
|
|
87
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "recordType")))) return false;
|
|
88
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "recordID")))) return false;
|
|
89
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "data")))) return false;
|
|
90
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "meta")))) return false;
|
|
83
91
|
return true;
|
|
84
92
|
}
|
|
85
93
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// SaveRecordResult.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 © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#pragma once
|
|
@@ -22,6 +22,11 @@
|
|
|
22
22
|
#else
|
|
23
23
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
24
|
#endif
|
|
25
|
+
#if __has_include(<NitroModules/PropNameIDCache.hpp>)
|
|
26
|
+
#include <NitroModules/PropNameIDCache.hpp>
|
|
27
|
+
#else
|
|
28
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
29
|
+
#endif
|
|
25
30
|
|
|
26
31
|
|
|
27
32
|
|
|
@@ -32,7 +37,7 @@ namespace margelo::nitro::cloudkitmodule {
|
|
|
32
37
|
/**
|
|
33
38
|
* A struct which can be represented as a JavaScript object (SaveRecordResult).
|
|
34
39
|
*/
|
|
35
|
-
struct SaveRecordResult {
|
|
40
|
+
struct SaveRecordResult final {
|
|
36
41
|
public:
|
|
37
42
|
std::string recordID SWIFT_PRIVATE;
|
|
38
43
|
double createdAt SWIFT_PRIVATE;
|
|
@@ -40,6 +45,9 @@ namespace margelo::nitro::cloudkitmodule {
|
|
|
40
45
|
public:
|
|
41
46
|
SaveRecordResult() = default;
|
|
42
47
|
explicit SaveRecordResult(std::string recordID, double createdAt): recordID(recordID), createdAt(createdAt) {}
|
|
48
|
+
|
|
49
|
+
public:
|
|
50
|
+
friend bool operator==(const SaveRecordResult& lhs, const SaveRecordResult& rhs) = default;
|
|
43
51
|
};
|
|
44
52
|
|
|
45
53
|
} // namespace margelo::nitro::cloudkitmodule
|
|
@@ -52,14 +60,14 @@ namespace margelo::nitro {
|
|
|
52
60
|
static inline margelo::nitro::cloudkitmodule::SaveRecordResult fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
53
61
|
jsi::Object obj = arg.asObject(runtime);
|
|
54
62
|
return margelo::nitro::cloudkitmodule::SaveRecordResult(
|
|
55
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "recordID")),
|
|
56
|
-
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "createdAt"))
|
|
63
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "recordID"))),
|
|
64
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "createdAt")))
|
|
57
65
|
);
|
|
58
66
|
}
|
|
59
67
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::cloudkitmodule::SaveRecordResult& arg) {
|
|
60
68
|
jsi::Object obj(runtime);
|
|
61
|
-
obj.setProperty(runtime, "recordID", JSIConverter<std::string>::toJSI(runtime, arg.recordID));
|
|
62
|
-
obj.setProperty(runtime, "createdAt", JSIConverter<double>::toJSI(runtime, arg.createdAt));
|
|
69
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "recordID"), JSIConverter<std::string>::toJSI(runtime, arg.recordID));
|
|
70
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "createdAt"), JSIConverter<double>::toJSI(runtime, arg.createdAt));
|
|
63
71
|
return obj;
|
|
64
72
|
}
|
|
65
73
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -70,8 +78,8 @@ namespace margelo::nitro {
|
|
|
70
78
|
if (!nitro::isPlainObject(runtime, obj)) {
|
|
71
79
|
return false;
|
|
72
80
|
}
|
|
73
|
-
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "recordID"))) return false;
|
|
74
|
-
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "createdAt"))) return false;
|
|
81
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "recordID")))) return false;
|
|
82
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "createdAt")))) return false;
|
|
75
83
|
return true;
|
|
76
84
|
}
|
|
77
85
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onekeyfe/react-native-cloud-kit-module",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.82",
|
|
4
4
|
"description": "react-native-cloud-kit-module",
|
|
5
5
|
"main": "./lib/module/index.js",
|
|
6
6
|
"types": "./lib/typescript/src/index.d.ts",
|
|
@@ -78,12 +78,12 @@
|
|
|
78
78
|
"eslint-plugin-prettier": "^5.5.4",
|
|
79
79
|
"jest": "^29.7.0",
|
|
80
80
|
"lefthook": "^2.0.3",
|
|
81
|
-
"nitrogen": "0.
|
|
81
|
+
"nitrogen": "0.35.2",
|
|
82
82
|
"prettier": "^2.8.8",
|
|
83
83
|
"react": "19.2.0",
|
|
84
84
|
"react-native": "patch:react-native@npm%3A0.83.0#~/.yarn/patches/react-native-npm-0.83.0-577d0f2d83.patch",
|
|
85
85
|
"react-native-builder-bob": "^0.40.13",
|
|
86
|
-
"react-native-nitro-modules": "0.
|
|
86
|
+
"react-native-nitro-modules": "0.35.2",
|
|
87
87
|
"release-it": "^19.0.4",
|
|
88
88
|
"turbo": "^2.5.6",
|
|
89
89
|
"typescript": "^5.9.2"
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"peerDependencies": {
|
|
92
92
|
"react": "*",
|
|
93
93
|
"react-native": "*",
|
|
94
|
-
"react-native-nitro-modules": "0.
|
|
94
|
+
"react-native-nitro-modules": "0.35.2"
|
|
95
95
|
},
|
|
96
96
|
"react-native-builder-bob": {
|
|
97
97
|
"source": "src",
|