one 2.6.18 → 2.6.19
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/One.podspec +2 -0
- package/android/src/main/java/com/margelo/nitro/one/HybridOneDevice.kt +124 -0
- package/android/src/main/java/com/margelo/nitro/one/HybridOneHaptics.kt +31 -0
- package/android/src/main/java/com/margelo/nitro/one/HybridOneImageManipulator.kt +25 -5
- package/android/src/main/java/com/margelo/nitro/one/HybridOneKeepAwake.kt +34 -9
- package/android/src/main/java/com/margelo/nitro/one/HybridOneSecureStore.kt +269 -78
- package/dist/cjs/index.cjs +3 -0
- package/dist/cjs/index.native.cjs +3 -0
- package/dist/cjs/index.native.js +3 -0
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/one.cjs +1 -0
- package/dist/cjs/one.native.cjs +1 -0
- package/dist/cjs/one.native.js +1 -0
- package/dist/cjs/one.native.js.map +1 -1
- package/dist/cjs/platform/extras.cjs +4 -0
- package/dist/cjs/platform/extras.native.cjs +4 -0
- package/dist/cjs/platform/extras.native.js +4 -0
- package/dist/cjs/platform/extras.native.js.map +1 -1
- package/dist/cjs/platform/haptics/index.cjs +3 -0
- package/dist/cjs/platform/haptics/index.native.cjs +4 -0
- package/dist/cjs/platform/haptics/index.native.js +4 -0
- package/dist/cjs/platform/haptics/index.native.js.map +1 -1
- package/dist/cjs/platform/haptics/validation.cjs +28 -0
- package/dist/cjs/platform/haptics/validation.native.cjs +28 -0
- package/dist/cjs/platform/haptics/validation.native.js +28 -0
- package/dist/cjs/platform/haptics/validation.native.js.map +1 -1
- package/dist/cjs/platform/image-manipulator/index.cjs +10 -3
- package/dist/cjs/platform/image-manipulator/index.native.cjs +1 -0
- package/dist/cjs/platform/image-manipulator/index.native.js +1 -0
- package/dist/cjs/platform/image-manipulator/index.native.js.map +1 -1
- package/dist/cjs/platform/index.cjs +1 -0
- package/dist/cjs/platform/index.native.cjs +1 -0
- package/dist/cjs/platform/index.native.js +1 -0
- package/dist/cjs/platform/index.native.js.map +1 -1
- package/dist/cjs/platform/keep-awake/index.cjs +53 -14
- package/dist/cjs/platform/keep-awake/index.native.cjs +29 -2
- package/dist/cjs/platform/keep-awake/index.native.js +29 -2
- package/dist/cjs/platform/keep-awake/index.native.js.map +1 -1
- package/dist/cjs/platform/keep-awake/unavailable.cjs +11 -1
- package/dist/cjs/platform/keep-awake/unavailable.native.cjs +11 -1
- package/dist/cjs/platform/keep-awake/unavailable.native.js +11 -1
- package/dist/cjs/platform/keep-awake/unavailable.native.js.map +1 -1
- package/dist/cjs/platform/keep-awake/validate.cjs +15 -1
- package/dist/cjs/platform/keep-awake/validate.native.cjs +15 -1
- package/dist/cjs/platform/keep-awake/validate.native.js +15 -1
- package/dist/cjs/platform/keep-awake/validate.native.js.map +1 -1
- package/dist/cjs/platform/localization/index.cjs +100 -0
- package/dist/cjs/platform/localization/index.native.cjs +71 -0
- package/dist/cjs/platform/localization/index.native.js +73 -0
- package/dist/cjs/platform/localization/index.native.js.map +1 -0
- package/dist/cjs/platform/localization/map.cjs +86 -0
- package/dist/cjs/platform/localization/map.native.cjs +90 -0
- package/dist/cjs/platform/localization/map.native.js +92 -0
- package/dist/cjs/platform/localization/map.native.js.map +1 -0
- package/dist/cjs/platform/localization/types.cjs +16 -0
- package/dist/cjs/platform/localization/types.native.cjs +18 -0
- package/dist/cjs/platform/localization/types.native.js +20 -0
- package/dist/cjs/platform/localization/types.native.js.map +1 -0
- package/dist/cjs/platform/secure-store/index.cjs +12 -6
- package/dist/cjs/platform/secure-store/index.native.cjs +18 -12
- package/dist/cjs/platform/secure-store/index.native.js +18 -12
- package/dist/cjs/platform/secure-store/index.native.js.map +1 -1
- package/dist/cjs/platform/secure-store/types.cjs +16 -0
- package/dist/cjs/platform/secure-store/types.native.cjs +18 -0
- package/dist/cjs/platform/secure-store/types.native.js +20 -0
- package/dist/cjs/platform/secure-store/types.native.js.map +1 -0
- package/dist/cjs/platform/secure-store/validate.cjs +34 -0
- package/dist/cjs/platform/secure-store/validate.native.cjs +34 -0
- package/dist/cjs/platform/secure-store/validate.native.js +34 -0
- package/dist/cjs/platform/secure-store/validate.native.js.map +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.mjs +2 -2
- package/dist/esm/index.native.js +2 -2
- package/dist/esm/one.mjs +2 -1
- package/dist/esm/one.mjs.map +1 -1
- package/dist/esm/one.native.js +2 -1
- package/dist/esm/one.native.js.map +1 -1
- package/dist/esm/platform/extras.mjs +2 -1
- package/dist/esm/platform/extras.native.js +2 -1
- package/dist/esm/platform/haptics/index.mjs +4 -1
- package/dist/esm/platform/haptics/index.mjs.map +1 -1
- package/dist/esm/platform/haptics/index.native.js +5 -1
- package/dist/esm/platform/haptics/index.native.js.map +1 -1
- package/dist/esm/platform/haptics/validation.mjs +27 -1
- package/dist/esm/platform/haptics/validation.mjs.map +1 -1
- package/dist/esm/platform/haptics/validation.native.js +27 -1
- package/dist/esm/platform/haptics/validation.native.js.map +1 -1
- package/dist/esm/platform/image-manipulator/index.mjs +10 -3
- package/dist/esm/platform/image-manipulator/index.mjs.map +1 -1
- package/dist/esm/platform/image-manipulator/index.native.js +1 -0
- package/dist/esm/platform/image-manipulator/index.native.js.map +1 -1
- package/dist/esm/platform/index.mjs +2 -2
- package/dist/esm/platform/index.mjs.map +1 -1
- package/dist/esm/platform/index.native.js +2 -2
- package/dist/esm/platform/index.native.js.map +1 -1
- package/dist/esm/platform/keep-awake/index.mjs +51 -15
- package/dist/esm/platform/keep-awake/index.mjs.map +1 -1
- package/dist/esm/platform/keep-awake/index.native.js +27 -3
- package/dist/esm/platform/keep-awake/index.native.js.map +1 -1
- package/dist/esm/platform/keep-awake/unavailable.mjs +12 -2
- package/dist/esm/platform/keep-awake/unavailable.mjs.map +1 -1
- package/dist/esm/platform/keep-awake/unavailable.native.js +12 -2
- package/dist/esm/platform/keep-awake/unavailable.native.js.map +1 -1
- package/dist/esm/platform/keep-awake/validate.mjs +10 -1
- package/dist/esm/platform/keep-awake/validate.mjs.map +1 -1
- package/dist/esm/platform/keep-awake/validate.native.js +10 -1
- package/dist/esm/platform/keep-awake/validate.native.js.map +1 -1
- package/dist/esm/platform/localization/index.mjs +77 -0
- package/dist/esm/platform/localization/index.mjs.map +1 -0
- package/dist/esm/platform/localization/index.native.js +46 -0
- package/dist/esm/platform/localization/index.native.js.map +1 -0
- package/dist/esm/platform/localization/map.mjs +59 -0
- package/dist/esm/platform/localization/map.mjs.map +1 -0
- package/dist/esm/platform/localization/map.native.js +61 -0
- package/dist/esm/platform/localization/map.native.js.map +1 -0
- package/dist/esm/platform/localization/types.mjs +0 -0
- package/dist/esm/platform/localization/types.native.js +0 -0
- package/dist/esm/platform/secure-store/index.mjs +13 -7
- package/dist/esm/platform/secure-store/index.mjs.map +1 -1
- package/dist/esm/platform/secure-store/index.native.js +19 -13
- package/dist/esm/platform/secure-store/index.native.js.map +1 -1
- package/dist/esm/platform/secure-store/types.mjs +0 -0
- package/dist/esm/platform/secure-store/types.native.js +0 -0
- package/dist/esm/platform/secure-store/validate.mjs +33 -1
- package/dist/esm/platform/secure-store/validate.mjs.map +1 -1
- package/dist/esm/platform/secure-store/validate.native.js +33 -1
- package/dist/esm/platform/secure-store/validate.native.js.map +1 -1
- package/ios/Nitro/HybridOneDevice.swift +117 -0
- package/ios/Nitro/HybridOneHaptics.swift +4 -0
- package/ios/Nitro/HybridOneImageManipulator.swift +25 -8
- package/ios/Nitro/HybridOneKeepAwake.swift +34 -2
- package/ios/Nitro/HybridOneSecureStore.swift +112 -46
- package/ios/Tests/ImageManipulator/Package.swift +12 -0
- package/ios/Tests/ImageManipulator/README.md +21 -0
- package/ios/Tests/ImageManipulator/Sources/NitroModules/Promise.swift +33 -0
- package/ios/Tests/ImageManipulator/Sources/OneImageManipulatorCore/Types.swift +41 -0
- package/ios/Tests/ImageManipulator/Sources/SDWebImageWebPCoder/SDImageWebPCoder.swift +23 -0
- package/nitrogen/generated/android/c++/JAndroidHaptic.hpp +109 -0
- package/nitrogen/generated/android/c++/JCalendarInfo.hpp +70 -0
- package/nitrogen/generated/android/c++/JHapticImpact.hpp +3 -3
- package/nitrogen/generated/android/c++/JHybridOneDeviceSpec.cpp +52 -0
- package/nitrogen/generated/android/c++/JHybridOneDeviceSpec.hpp +3 -0
- package/nitrogen/generated/android/c++/JHybridOneHapticsSpec.cpp +8 -0
- package/nitrogen/generated/android/c++/JHybridOneHapticsSpec.hpp +1 -0
- package/nitrogen/generated/android/c++/JHybridOneImageManipulatorSpec.cpp +5 -1
- package/nitrogen/generated/android/c++/JHybridOneKeepAwakeSpec.cpp +31 -0
- package/nitrogen/generated/android/c++/JHybridOneKeepAwakeSpec.hpp +2 -0
- package/nitrogen/generated/android/c++/JHybridOneSecureStoreSpec.cpp +26 -19
- package/nitrogen/generated/android/c++/JHybridOneSecureStoreSpec.hpp +6 -6
- package/nitrogen/generated/android/c++/JImageTransformOptions.hpp +7 -1
- package/nitrogen/generated/android/c++/JLocaleInfo.hpp +110 -0
- package/nitrogen/generated/android/c++/JOneImageFlip.hpp +58 -0
- package/nitrogen/generated/android/c++/JOneImageFormat.hpp +3 -0
- package/nitrogen/generated/android/c++/JSecureStoreAccessibility.hpp +73 -0
- package/nitrogen/generated/android/c++/JSecureStoreOptions.hpp +76 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/one/AndroidHaptic.kt +40 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/one/CalendarInfo.kt +66 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/one/HapticImpact.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/one/HybridOneDeviceSpec.kt +17 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/one/HybridOneHapticsSpec.kt +4 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/one/HybridOneKeepAwakeSpec.kt +8 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/one/HybridOneSecureStoreSpec.kt +6 -6
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/one/ImageTransformOptions.kt +7 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/one/LocaleInfo.kt +116 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/one/OneImageFlip.kt +23 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/one/OneImageFormat.kt +2 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/one/SecureStoreAccessibility.kt +28 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/one/SecureStoreOptions.kt +71 -0
- package/nitrogen/generated/ios/One-Swift-Cxx-Bridge.hpp +133 -51
- package/nitrogen/generated/ios/One-Swift-Cxx-Umbrella.hpp +19 -1
- package/nitrogen/generated/ios/c++/HybridOneDeviceSpecSwift.hpp +31 -0
- package/nitrogen/generated/ios/c++/HybridOneHapticsSpecSwift.hpp +9 -0
- package/nitrogen/generated/ios/c++/HybridOneImageManipulatorSpecSwift.hpp +4 -1
- package/nitrogen/generated/ios/c++/HybridOneKeepAwakeSpecSwift.hpp +18 -1
- package/nitrogen/generated/ios/c++/HybridOneSecureStoreSpecSwift.hpp +18 -13
- package/nitrogen/generated/ios/swift/AndroidHaptic.swift +108 -0
- package/nitrogen/generated/ios/swift/CalendarInfo.swift +96 -0
- package/nitrogen/generated/ios/swift/HapticImpact.swift +4 -4
- package/nitrogen/generated/ios/swift/HybridOneDeviceSpec.swift +3 -0
- package/nitrogen/generated/ios/swift/HybridOneDeviceSpec_cxx.swift +56 -0
- package/nitrogen/generated/ios/swift/HybridOneHapticsSpec.swift +1 -0
- package/nitrogen/generated/ios/swift/HybridOneHapticsSpec_cxx.swift +11 -0
- package/nitrogen/generated/ios/swift/HybridOneKeepAwakeSpec.swift +3 -1
- package/nitrogen/generated/ios/swift/HybridOneKeepAwakeSpec_cxx.swift +41 -3
- package/nitrogen/generated/ios/swift/HybridOneSecureStoreSpec.swift +6 -6
- package/nitrogen/generated/ios/swift/HybridOneSecureStoreSpec_cxx.swift +12 -12
- package/nitrogen/generated/ios/swift/ImageTransformOptions.swift +16 -5
- package/nitrogen/generated/ios/swift/LocaleInfo.swift +250 -0
- package/nitrogen/generated/ios/swift/OneImageFlip.swift +40 -0
- package/nitrogen/generated/ios/swift/OneImageFormat.swift +4 -0
- package/nitrogen/generated/ios/swift/SecureStoreAccessibility.swift +60 -0
- package/nitrogen/generated/ios/swift/SecureStoreOptions.swift +107 -0
- package/nitrogen/generated/shared/c++/AndroidHaptic.hpp +144 -0
- package/nitrogen/generated/shared/c++/CalendarInfo.hpp +96 -0
- package/nitrogen/generated/shared/c++/HapticImpact.hpp +5 -5
- package/nitrogen/generated/shared/c++/HybridOneDeviceSpec.cpp +3 -0
- package/nitrogen/generated/shared/c++/HybridOneDeviceSpec.hpp +11 -0
- package/nitrogen/generated/shared/c++/HybridOneHapticsSpec.cpp +1 -0
- package/nitrogen/generated/shared/c++/HybridOneHapticsSpec.hpp +4 -0
- package/nitrogen/generated/shared/c++/HybridOneKeepAwakeSpec.cpp +2 -0
- package/nitrogen/generated/shared/c++/HybridOneKeepAwakeSpec.hpp +4 -1
- package/nitrogen/generated/shared/c++/HybridOneSecureStoreSpec.hpp +9 -7
- package/nitrogen/generated/shared/c++/ImageTransformOptions.hpp +8 -1
- package/nitrogen/generated/shared/c++/LocaleInfo.hpp +136 -0
- package/nitrogen/generated/shared/c++/OneImageFlip.hpp +76 -0
- package/nitrogen/generated/shared/c++/OneImageFormat.hpp +4 -0
- package/nitrogen/generated/shared/c++/SecureStoreAccessibility.hpp +96 -0
- package/nitrogen/generated/shared/c++/SecureStoreOptions.hpp +102 -0
- package/package.json +15 -15
- package/src/index.ts +3 -0
- package/src/one.test.ts +2 -0
- package/src/one.ts +3 -0
- package/src/platform/extras.ts +3 -0
- package/src/platform/haptics/index.native.ts +13 -3
- package/src/platform/haptics/index.ts +12 -3
- package/src/platform/haptics/types.ts +25 -0
- package/src/platform/haptics/validation.ts +31 -1
- package/src/platform/image-manipulator/index.native.ts +3 -0
- package/src/platform/image-manipulator/index.ts +10 -3
- package/src/platform/index.native.ts +3 -2
- package/src/platform/index.ts +3 -2
- package/src/platform/keep-awake/index.native.ts +31 -2
- package/src/platform/keep-awake/index.ts +66 -17
- package/src/platform/keep-awake/unavailable.ts +12 -2
- package/src/platform/keep-awake/validate.ts +16 -0
- package/src/platform/localization/index.native.ts +47 -0
- package/src/platform/localization/index.ts +90 -0
- package/src/platform/localization/map.ts +77 -0
- package/src/platform/localization/types.ts +36 -0
- package/src/platform/secure-store/index.native.ts +26 -13
- package/src/platform/secure-store/index.ts +20 -7
- package/src/platform/secure-store/types.ts +33 -0
- package/src/platform/secure-store/validate.ts +48 -0
- package/src/platform/specs/OneDevice.nitro.ts +34 -0
- package/src/platform/specs/OneHaptics.nitro.ts +4 -1
- package/src/platform/specs/OneImageManipulator.nitro.ts +4 -1
- package/src/platform/specs/OneKeepAwake.nitro.ts +2 -0
- package/src/platform/specs/OneSecureStore.nitro.ts +12 -8
- package/types/index.d.ts +1 -1
- package/types/index.d.ts.map +1 -1
- package/types/one.d.ts +2 -1
- package/types/one.d.ts.map +1 -1
- package/types/platform/extras.d.ts +3 -0
- package/types/platform/extras.d.ts.map +1 -1
- package/types/platform/haptics/index.d.ts +2 -2
- package/types/platform/haptics/index.d.ts.map +1 -1
- package/types/platform/haptics/index.native.d.ts +2 -2
- package/types/platform/haptics/index.native.d.ts.map +1 -1
- package/types/platform/haptics/types.d.ts +3 -0
- package/types/platform/haptics/types.d.ts.map +1 -1
- package/types/platform/haptics/validation.d.ts +3 -1
- package/types/platform/haptics/validation.d.ts.map +1 -1
- package/types/platform/image-manipulator/index.d.ts +1 -1
- package/types/platform/image-manipulator/index.d.ts.map +1 -1
- package/types/platform/image-manipulator/index.native.d.ts +1 -1
- package/types/platform/image-manipulator/index.native.d.ts.map +1 -1
- package/types/platform/index.d.ts +3 -3
- package/types/platform/index.d.ts.map +1 -1
- package/types/platform/index.native.d.ts +3 -3
- package/types/platform/index.native.d.ts.map +1 -1
- package/types/platform/keep-awake/index.d.ts +3 -0
- package/types/platform/keep-awake/index.d.ts.map +1 -1
- package/types/platform/keep-awake/index.native.d.ts +5 -0
- package/types/platform/keep-awake/index.native.d.ts.map +1 -1
- package/types/platform/keep-awake/unavailable.d.ts +4 -0
- package/types/platform/keep-awake/unavailable.d.ts.map +1 -1
- package/types/platform/keep-awake/validate.d.ts +3 -0
- package/types/platform/keep-awake/validate.d.ts.map +1 -1
- package/types/platform/localization/index.d.ts +7 -0
- package/types/platform/localization/index.d.ts.map +1 -0
- package/types/platform/localization/index.native.d.ts +7 -0
- package/types/platform/localization/index.native.d.ts.map +1 -0
- package/types/platform/localization/map.d.ts +9 -0
- package/types/platform/localization/map.d.ts.map +1 -0
- package/types/platform/localization/types.d.ts +31 -0
- package/types/platform/localization/types.d.ts.map +1 -0
- package/types/platform/secure-store/index.d.ts +8 -7
- package/types/platform/secure-store/index.d.ts.map +1 -1
- package/types/platform/secure-store/index.native.d.ts +8 -7
- package/types/platform/secure-store/index.native.d.ts.map +1 -1
- package/types/platform/secure-store/types.d.ts +24 -0
- package/types/platform/secure-store/types.d.ts.map +1 -0
- package/types/platform/secure-store/validate.d.ts +3 -0
- package/types/platform/secure-store/validate.d.ts.map +1 -1
- package/types/platform/specs/OneDevice.nitro.d.ts +25 -0
- package/types/platform/specs/OneDevice.nitro.d.ts.map +1 -1
- package/types/platform/specs/OneHaptics.nitro.d.ts +2 -1
- package/types/platform/specs/OneHaptics.nitro.d.ts.map +1 -1
- package/types/platform/specs/OneImageManipulator.nitro.d.ts +3 -1
- package/types/platform/specs/OneImageManipulator.nitro.d.ts.map +1 -1
- package/types/platform/specs/OneKeepAwake.nitro.d.ts +2 -0
- package/types/platform/specs/OneKeepAwake.nitro.d.ts.map +1 -1
- package/types/platform/specs/OneSecureStore.nitro.d.ts +8 -6
- package/types/platform/specs/OneSecureStore.nitro.d.ts.map +1 -1
|
@@ -84,7 +84,7 @@ open class HybridOneKeepAwakeSpec_cxx {
|
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
|
|
87
|
+
|
|
88
88
|
|
|
89
89
|
/**
|
|
90
90
|
* Get the memory size of the Swift class (plus size of any other allocations)
|
|
@@ -121,7 +121,7 @@ open class HybridOneKeepAwakeSpec_cxx {
|
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
// Properties
|
|
124
|
-
|
|
124
|
+
|
|
125
125
|
|
|
126
126
|
// Methods
|
|
127
127
|
@inline(__always)
|
|
@@ -142,7 +142,7 @@ open class HybridOneKeepAwakeSpec_cxx {
|
|
|
142
142
|
return bridge.create_Result_std__shared_ptr_Promise_bool___(__exceptionPtr)
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
|
-
|
|
145
|
+
|
|
146
146
|
@inline(__always)
|
|
147
147
|
public final func setEnabled(enabled: Bool) -> bridge.Result_std__shared_ptr_Promise_void___ {
|
|
148
148
|
do {
|
|
@@ -161,4 +161,42 @@ open class HybridOneKeepAwakeSpec_cxx {
|
|
|
161
161
|
return bridge.create_Result_std__shared_ptr_Promise_void___(__exceptionPtr)
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
|
+
|
|
165
|
+
@inline(__always)
|
|
166
|
+
public final func activate(tag: std.string) -> bridge.Result_std__shared_ptr_Promise_void___ {
|
|
167
|
+
do {
|
|
168
|
+
let __result = try self.__implementation.activate(tag: String(tag))
|
|
169
|
+
let __resultCpp = { () -> bridge.std__shared_ptr_Promise_void__ in
|
|
170
|
+
let __promise = bridge.create_std__shared_ptr_Promise_void__()
|
|
171
|
+
let __promiseHolder = bridge.wrap_std__shared_ptr_Promise_void__(__promise)
|
|
172
|
+
__result
|
|
173
|
+
.then({ __result in __promiseHolder.resolve() })
|
|
174
|
+
.catch({ __error in __promiseHolder.reject(__error.toCpp()) })
|
|
175
|
+
return __promise
|
|
176
|
+
}()
|
|
177
|
+
return bridge.create_Result_std__shared_ptr_Promise_void___(__resultCpp)
|
|
178
|
+
} catch (let __error) {
|
|
179
|
+
let __exceptionPtr = __error.toCpp()
|
|
180
|
+
return bridge.create_Result_std__shared_ptr_Promise_void___(__exceptionPtr)
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
@inline(__always)
|
|
185
|
+
public final func deactivate(tag: std.string) -> bridge.Result_std__shared_ptr_Promise_void___ {
|
|
186
|
+
do {
|
|
187
|
+
let __result = try self.__implementation.deactivate(tag: String(tag))
|
|
188
|
+
let __resultCpp = { () -> bridge.std__shared_ptr_Promise_void__ in
|
|
189
|
+
let __promise = bridge.create_std__shared_ptr_Promise_void__()
|
|
190
|
+
let __promiseHolder = bridge.wrap_std__shared_ptr_Promise_void__(__promise)
|
|
191
|
+
__result
|
|
192
|
+
.then({ __result in __promiseHolder.resolve() })
|
|
193
|
+
.catch({ __error in __promiseHolder.reject(__error.toCpp()) })
|
|
194
|
+
return __promise
|
|
195
|
+
}()
|
|
196
|
+
return bridge.create_Result_std__shared_ptr_Promise_void___(__resultCpp)
|
|
197
|
+
} catch (let __error) {
|
|
198
|
+
let __exceptionPtr = __error.toCpp()
|
|
199
|
+
return bridge.create_Result_std__shared_ptr_Promise_void___(__exceptionPtr)
|
|
200
|
+
}
|
|
201
|
+
}
|
|
164
202
|
}
|
|
@@ -13,12 +13,12 @@ public protocol HybridOneSecureStoreSpec_protocol: HybridObject {
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
// Methods
|
|
16
|
-
func getItem(key: String) throws -> Promise<String?>
|
|
17
|
-
func setItem(key: String, value: String) throws -> Promise<Void>
|
|
18
|
-
func deleteItem(key: String) throws -> Promise<Void>
|
|
19
|
-
func getItemSync(key: String) throws -> String?
|
|
20
|
-
func setItemSync(key: String, value: String) throws -> Void
|
|
21
|
-
func deleteItemSync(key: String) throws -> Void
|
|
16
|
+
func getItem(key: String, options: SecureStoreOptions) throws -> Promise<String?>
|
|
17
|
+
func setItem(key: String, value: String, options: SecureStoreOptions) throws -> Promise<Void>
|
|
18
|
+
func deleteItem(key: String, options: SecureStoreOptions) throws -> Promise<Void>
|
|
19
|
+
func getItemSync(key: String, options: SecureStoreOptions) throws -> String?
|
|
20
|
+
func setItemSync(key: String, value: String, options: SecureStoreOptions) throws -> Void
|
|
21
|
+
func deleteItemSync(key: String, options: SecureStoreOptions) throws -> Void
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
public extension HybridOneSecureStoreSpec_protocol {
|
|
@@ -125,9 +125,9 @@ open class HybridOneSecureStoreSpec_cxx {
|
|
|
125
125
|
|
|
126
126
|
// Methods
|
|
127
127
|
@inline(__always)
|
|
128
|
-
public final func getItem(key: std.string) -> bridge.Result_std__shared_ptr_Promise_std__optional_std__string____ {
|
|
128
|
+
public final func getItem(key: std.string, options: SecureStoreOptions) -> bridge.Result_std__shared_ptr_Promise_std__optional_std__string____ {
|
|
129
129
|
do {
|
|
130
|
-
let __result = try self.__implementation.getItem(key: String(key))
|
|
130
|
+
let __result = try self.__implementation.getItem(key: String(key), options: options)
|
|
131
131
|
let __resultCpp = { () -> bridge.std__shared_ptr_Promise_std__optional_std__string___ in
|
|
132
132
|
let __promise = bridge.create_std__shared_ptr_Promise_std__optional_std__string___()
|
|
133
133
|
let __promiseHolder = bridge.wrap_std__shared_ptr_Promise_std__optional_std__string___(__promise)
|
|
@@ -150,9 +150,9 @@ open class HybridOneSecureStoreSpec_cxx {
|
|
|
150
150
|
}
|
|
151
151
|
|
|
152
152
|
@inline(__always)
|
|
153
|
-
public final func setItem(key: std.string, value: std.string) -> bridge.Result_std__shared_ptr_Promise_void___ {
|
|
153
|
+
public final func setItem(key: std.string, value: std.string, options: SecureStoreOptions) -> bridge.Result_std__shared_ptr_Promise_void___ {
|
|
154
154
|
do {
|
|
155
|
-
let __result = try self.__implementation.setItem(key: String(key), value: String(value))
|
|
155
|
+
let __result = try self.__implementation.setItem(key: String(key), value: String(value), options: options)
|
|
156
156
|
let __resultCpp = { () -> bridge.std__shared_ptr_Promise_void__ in
|
|
157
157
|
let __promise = bridge.create_std__shared_ptr_Promise_void__()
|
|
158
158
|
let __promiseHolder = bridge.wrap_std__shared_ptr_Promise_void__(__promise)
|
|
@@ -169,9 +169,9 @@ open class HybridOneSecureStoreSpec_cxx {
|
|
|
169
169
|
}
|
|
170
170
|
|
|
171
171
|
@inline(__always)
|
|
172
|
-
public final func deleteItem(key: std.string) -> bridge.Result_std__shared_ptr_Promise_void___ {
|
|
172
|
+
public final func deleteItem(key: std.string, options: SecureStoreOptions) -> bridge.Result_std__shared_ptr_Promise_void___ {
|
|
173
173
|
do {
|
|
174
|
-
let __result = try self.__implementation.deleteItem(key: String(key))
|
|
174
|
+
let __result = try self.__implementation.deleteItem(key: String(key), options: options)
|
|
175
175
|
let __resultCpp = { () -> bridge.std__shared_ptr_Promise_void__ in
|
|
176
176
|
let __promise = bridge.create_std__shared_ptr_Promise_void__()
|
|
177
177
|
let __promiseHolder = bridge.wrap_std__shared_ptr_Promise_void__(__promise)
|
|
@@ -188,9 +188,9 @@ open class HybridOneSecureStoreSpec_cxx {
|
|
|
188
188
|
}
|
|
189
189
|
|
|
190
190
|
@inline(__always)
|
|
191
|
-
public final func getItemSync(key: std.string) -> bridge.Result_std__optional_std__string__ {
|
|
191
|
+
public final func getItemSync(key: std.string, options: SecureStoreOptions) -> bridge.Result_std__optional_std__string__ {
|
|
192
192
|
do {
|
|
193
|
-
let __result = try self.__implementation.getItemSync(key: String(key))
|
|
193
|
+
let __result = try self.__implementation.getItemSync(key: String(key), options: options)
|
|
194
194
|
let __resultCpp = { () -> bridge.std__optional_std__string_ in
|
|
195
195
|
if let __unwrappedValue = __result {
|
|
196
196
|
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
@@ -206,9 +206,9 @@ open class HybridOneSecureStoreSpec_cxx {
|
|
|
206
206
|
}
|
|
207
207
|
|
|
208
208
|
@inline(__always)
|
|
209
|
-
public final func setItemSync(key: std.string, value: std.string) -> bridge.Result_void_ {
|
|
209
|
+
public final func setItemSync(key: std.string, value: std.string, options: SecureStoreOptions) -> bridge.Result_void_ {
|
|
210
210
|
do {
|
|
211
|
-
try self.__implementation.setItemSync(key: String(key), value: String(value))
|
|
211
|
+
try self.__implementation.setItemSync(key: String(key), value: String(value), options: options)
|
|
212
212
|
return bridge.create_Result_void_()
|
|
213
213
|
} catch (let __error) {
|
|
214
214
|
let __exceptionPtr = __error.toCpp()
|
|
@@ -217,9 +217,9 @@ open class HybridOneSecureStoreSpec_cxx {
|
|
|
217
217
|
}
|
|
218
218
|
|
|
219
219
|
@inline(__always)
|
|
220
|
-
public final func deleteItemSync(key: std.string) -> bridge.Result_void_ {
|
|
220
|
+
public final func deleteItemSync(key: std.string, options: SecureStoreOptions) -> bridge.Result_void_ {
|
|
221
221
|
do {
|
|
222
|
-
try self.__implementation.deleteItemSync(key: String(key))
|
|
222
|
+
try self.__implementation.deleteItemSync(key: String(key), options: options)
|
|
223
223
|
return bridge.create_Result_void_()
|
|
224
224
|
} catch (let __error) {
|
|
225
225
|
let __exceptionPtr = __error.toCpp()
|
|
@@ -18,7 +18,7 @@ public extension ImageTransformOptions {
|
|
|
18
18
|
/**
|
|
19
19
|
* Create a new instance of `ImageTransformOptions`.
|
|
20
20
|
*/
|
|
21
|
-
init(crop: ImageCrop?, resize: ImageResize?, rotate: Double?, format: OneImageFormat, quality: Double?) {
|
|
21
|
+
init(crop: ImageCrop?, resize: ImageResize?, rotate: Double?, flip: OneImageFlip?, format: OneImageFormat, quality: Double?) {
|
|
22
22
|
self.init({ () -> bridge.std__optional_ImageCrop_ in
|
|
23
23
|
if let __unwrappedValue = crop {
|
|
24
24
|
return bridge.create_std__optional_ImageCrop_(__unwrappedValue)
|
|
@@ -37,6 +37,12 @@ public extension ImageTransformOptions {
|
|
|
37
37
|
} else {
|
|
38
38
|
return .init()
|
|
39
39
|
}
|
|
40
|
+
}(), { () -> bridge.std__optional_OneImageFlip_ in
|
|
41
|
+
if let __unwrappedValue = flip {
|
|
42
|
+
return bridge.create_std__optional_OneImageFlip_(__unwrappedValue)
|
|
43
|
+
} else {
|
|
44
|
+
return .init()
|
|
45
|
+
}
|
|
40
46
|
}(), format, { () -> bridge.std__optional_double_ in
|
|
41
47
|
if let __unwrappedValue = quality {
|
|
42
48
|
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
@@ -50,12 +56,12 @@ public extension ImageTransformOptions {
|
|
|
50
56
|
var crop: ImageCrop? {
|
|
51
57
|
return self.__crop.value
|
|
52
58
|
}
|
|
53
|
-
|
|
59
|
+
|
|
54
60
|
@inline(__always)
|
|
55
61
|
var resize: ImageResize? {
|
|
56
62
|
return self.__resize.value
|
|
57
63
|
}
|
|
58
|
-
|
|
64
|
+
|
|
59
65
|
@inline(__always)
|
|
60
66
|
var rotate: Double? {
|
|
61
67
|
return { () -> Double? in
|
|
@@ -67,12 +73,17 @@ public extension ImageTransformOptions {
|
|
|
67
73
|
}
|
|
68
74
|
}()
|
|
69
75
|
}
|
|
70
|
-
|
|
76
|
+
|
|
77
|
+
@inline(__always)
|
|
78
|
+
var flip: OneImageFlip? {
|
|
79
|
+
return self.__flip.value
|
|
80
|
+
}
|
|
81
|
+
|
|
71
82
|
@inline(__always)
|
|
72
83
|
var format: OneImageFormat {
|
|
73
84
|
return self.__format
|
|
74
85
|
}
|
|
75
|
-
|
|
86
|
+
|
|
76
87
|
@inline(__always)
|
|
77
88
|
var quality: Double? {
|
|
78
89
|
return { () -> Double? in
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// LocaleInfo.swift
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
import NitroModules
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Represents an instance of `LocaleInfo`, backed by a C++ struct.
|
|
12
|
+
*/
|
|
13
|
+
public typealias LocaleInfo = margelo.nitro.one.LocaleInfo
|
|
14
|
+
|
|
15
|
+
public extension LocaleInfo {
|
|
16
|
+
private typealias bridge = margelo.nitro.one.bridge.swift
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Create a new instance of `LocaleInfo`.
|
|
20
|
+
*/
|
|
21
|
+
init(languageTag: String, languageCode: String?, languageScriptCode: String?, regionCode: String?, languageRegionCode: String?, currencyCode: String?, currencySymbol: String?, languageCurrencyCode: String?, languageCurrencySymbol: String?, decimalSeparator: String?, digitGroupingSeparator: String?, textDirection: String, measurementSystem: String?, temperatureUnit: String?) {
|
|
22
|
+
self.init(std.string(languageTag), { () -> bridge.std__optional_std__string_ in
|
|
23
|
+
if let __unwrappedValue = languageCode {
|
|
24
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
25
|
+
} else {
|
|
26
|
+
return .init()
|
|
27
|
+
}
|
|
28
|
+
}(), { () -> bridge.std__optional_std__string_ in
|
|
29
|
+
if let __unwrappedValue = languageScriptCode {
|
|
30
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
31
|
+
} else {
|
|
32
|
+
return .init()
|
|
33
|
+
}
|
|
34
|
+
}(), { () -> bridge.std__optional_std__string_ in
|
|
35
|
+
if let __unwrappedValue = regionCode {
|
|
36
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
37
|
+
} else {
|
|
38
|
+
return .init()
|
|
39
|
+
}
|
|
40
|
+
}(), { () -> bridge.std__optional_std__string_ in
|
|
41
|
+
if let __unwrappedValue = languageRegionCode {
|
|
42
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
43
|
+
} else {
|
|
44
|
+
return .init()
|
|
45
|
+
}
|
|
46
|
+
}(), { () -> bridge.std__optional_std__string_ in
|
|
47
|
+
if let __unwrappedValue = currencyCode {
|
|
48
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
49
|
+
} else {
|
|
50
|
+
return .init()
|
|
51
|
+
}
|
|
52
|
+
}(), { () -> bridge.std__optional_std__string_ in
|
|
53
|
+
if let __unwrappedValue = currencySymbol {
|
|
54
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
55
|
+
} else {
|
|
56
|
+
return .init()
|
|
57
|
+
}
|
|
58
|
+
}(), { () -> bridge.std__optional_std__string_ in
|
|
59
|
+
if let __unwrappedValue = languageCurrencyCode {
|
|
60
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
61
|
+
} else {
|
|
62
|
+
return .init()
|
|
63
|
+
}
|
|
64
|
+
}(), { () -> bridge.std__optional_std__string_ in
|
|
65
|
+
if let __unwrappedValue = languageCurrencySymbol {
|
|
66
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
67
|
+
} else {
|
|
68
|
+
return .init()
|
|
69
|
+
}
|
|
70
|
+
}(), { () -> bridge.std__optional_std__string_ in
|
|
71
|
+
if let __unwrappedValue = decimalSeparator {
|
|
72
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
73
|
+
} else {
|
|
74
|
+
return .init()
|
|
75
|
+
}
|
|
76
|
+
}(), { () -> bridge.std__optional_std__string_ in
|
|
77
|
+
if let __unwrappedValue = digitGroupingSeparator {
|
|
78
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
79
|
+
} else {
|
|
80
|
+
return .init()
|
|
81
|
+
}
|
|
82
|
+
}(), std.string(textDirection), { () -> bridge.std__optional_std__string_ in
|
|
83
|
+
if let __unwrappedValue = measurementSystem {
|
|
84
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
85
|
+
} else {
|
|
86
|
+
return .init()
|
|
87
|
+
}
|
|
88
|
+
}(), { () -> bridge.std__optional_std__string_ in
|
|
89
|
+
if let __unwrappedValue = temperatureUnit {
|
|
90
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
91
|
+
} else {
|
|
92
|
+
return .init()
|
|
93
|
+
}
|
|
94
|
+
}())
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
@inline(__always)
|
|
98
|
+
var languageTag: String {
|
|
99
|
+
return String(self.__languageTag)
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
@inline(__always)
|
|
103
|
+
var languageCode: String? {
|
|
104
|
+
return { () -> String? in
|
|
105
|
+
if bridge.has_value_std__optional_std__string_(self.__languageCode) {
|
|
106
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__languageCode)
|
|
107
|
+
return String(__unwrapped)
|
|
108
|
+
} else {
|
|
109
|
+
return nil
|
|
110
|
+
}
|
|
111
|
+
}()
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
@inline(__always)
|
|
115
|
+
var languageScriptCode: String? {
|
|
116
|
+
return { () -> String? in
|
|
117
|
+
if bridge.has_value_std__optional_std__string_(self.__languageScriptCode) {
|
|
118
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__languageScriptCode)
|
|
119
|
+
return String(__unwrapped)
|
|
120
|
+
} else {
|
|
121
|
+
return nil
|
|
122
|
+
}
|
|
123
|
+
}()
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
@inline(__always)
|
|
127
|
+
var regionCode: String? {
|
|
128
|
+
return { () -> String? in
|
|
129
|
+
if bridge.has_value_std__optional_std__string_(self.__regionCode) {
|
|
130
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__regionCode)
|
|
131
|
+
return String(__unwrapped)
|
|
132
|
+
} else {
|
|
133
|
+
return nil
|
|
134
|
+
}
|
|
135
|
+
}()
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
@inline(__always)
|
|
139
|
+
var languageRegionCode: String? {
|
|
140
|
+
return { () -> String? in
|
|
141
|
+
if bridge.has_value_std__optional_std__string_(self.__languageRegionCode) {
|
|
142
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__languageRegionCode)
|
|
143
|
+
return String(__unwrapped)
|
|
144
|
+
} else {
|
|
145
|
+
return nil
|
|
146
|
+
}
|
|
147
|
+
}()
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
@inline(__always)
|
|
151
|
+
var currencyCode: String? {
|
|
152
|
+
return { () -> String? in
|
|
153
|
+
if bridge.has_value_std__optional_std__string_(self.__currencyCode) {
|
|
154
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__currencyCode)
|
|
155
|
+
return String(__unwrapped)
|
|
156
|
+
} else {
|
|
157
|
+
return nil
|
|
158
|
+
}
|
|
159
|
+
}()
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
@inline(__always)
|
|
163
|
+
var currencySymbol: String? {
|
|
164
|
+
return { () -> String? in
|
|
165
|
+
if bridge.has_value_std__optional_std__string_(self.__currencySymbol) {
|
|
166
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__currencySymbol)
|
|
167
|
+
return String(__unwrapped)
|
|
168
|
+
} else {
|
|
169
|
+
return nil
|
|
170
|
+
}
|
|
171
|
+
}()
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
@inline(__always)
|
|
175
|
+
var languageCurrencyCode: String? {
|
|
176
|
+
return { () -> String? in
|
|
177
|
+
if bridge.has_value_std__optional_std__string_(self.__languageCurrencyCode) {
|
|
178
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__languageCurrencyCode)
|
|
179
|
+
return String(__unwrapped)
|
|
180
|
+
} else {
|
|
181
|
+
return nil
|
|
182
|
+
}
|
|
183
|
+
}()
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
@inline(__always)
|
|
187
|
+
var languageCurrencySymbol: String? {
|
|
188
|
+
return { () -> String? in
|
|
189
|
+
if bridge.has_value_std__optional_std__string_(self.__languageCurrencySymbol) {
|
|
190
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__languageCurrencySymbol)
|
|
191
|
+
return String(__unwrapped)
|
|
192
|
+
} else {
|
|
193
|
+
return nil
|
|
194
|
+
}
|
|
195
|
+
}()
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
@inline(__always)
|
|
199
|
+
var decimalSeparator: String? {
|
|
200
|
+
return { () -> String? in
|
|
201
|
+
if bridge.has_value_std__optional_std__string_(self.__decimalSeparator) {
|
|
202
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__decimalSeparator)
|
|
203
|
+
return String(__unwrapped)
|
|
204
|
+
} else {
|
|
205
|
+
return nil
|
|
206
|
+
}
|
|
207
|
+
}()
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
@inline(__always)
|
|
211
|
+
var digitGroupingSeparator: String? {
|
|
212
|
+
return { () -> String? in
|
|
213
|
+
if bridge.has_value_std__optional_std__string_(self.__digitGroupingSeparator) {
|
|
214
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__digitGroupingSeparator)
|
|
215
|
+
return String(__unwrapped)
|
|
216
|
+
} else {
|
|
217
|
+
return nil
|
|
218
|
+
}
|
|
219
|
+
}()
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
@inline(__always)
|
|
223
|
+
var textDirection: String {
|
|
224
|
+
return String(self.__textDirection)
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
@inline(__always)
|
|
228
|
+
var measurementSystem: String? {
|
|
229
|
+
return { () -> String? in
|
|
230
|
+
if bridge.has_value_std__optional_std__string_(self.__measurementSystem) {
|
|
231
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__measurementSystem)
|
|
232
|
+
return String(__unwrapped)
|
|
233
|
+
} else {
|
|
234
|
+
return nil
|
|
235
|
+
}
|
|
236
|
+
}()
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
@inline(__always)
|
|
240
|
+
var temperatureUnit: String? {
|
|
241
|
+
return { () -> String? in
|
|
242
|
+
if bridge.has_value_std__optional_std__string_(self.__temperatureUnit) {
|
|
243
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__temperatureUnit)
|
|
244
|
+
return String(__unwrapped)
|
|
245
|
+
} else {
|
|
246
|
+
return nil
|
|
247
|
+
}
|
|
248
|
+
}()
|
|
249
|
+
}
|
|
250
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// OneImageFlip.swift
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Represents the JS union `OneImageFlip`, backed by a C++ enum.
|
|
10
|
+
*/
|
|
11
|
+
public typealias OneImageFlip = margelo.nitro.one.OneImageFlip
|
|
12
|
+
|
|
13
|
+
public extension OneImageFlip {
|
|
14
|
+
/**
|
|
15
|
+
* Get a OneImageFlip for the given String value, or
|
|
16
|
+
* return `nil` if the given value was invalid/unknown.
|
|
17
|
+
*/
|
|
18
|
+
init?(fromString string: String) {
|
|
19
|
+
switch string {
|
|
20
|
+
case "horizontal":
|
|
21
|
+
self = .horizontal
|
|
22
|
+
case "vertical":
|
|
23
|
+
self = .vertical
|
|
24
|
+
default:
|
|
25
|
+
return nil
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Get the String value this OneImageFlip represents.
|
|
31
|
+
*/
|
|
32
|
+
var stringValue: String {
|
|
33
|
+
switch self {
|
|
34
|
+
case .horizontal:
|
|
35
|
+
return "horizontal"
|
|
36
|
+
case .vertical:
|
|
37
|
+
return "vertical"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -21,6 +21,8 @@ public extension OneImageFormat {
|
|
|
21
21
|
self = .jpeg
|
|
22
22
|
case "png":
|
|
23
23
|
self = .png
|
|
24
|
+
case "webp":
|
|
25
|
+
self = .webp
|
|
24
26
|
default:
|
|
25
27
|
return nil
|
|
26
28
|
}
|
|
@@ -35,6 +37,8 @@ public extension OneImageFormat {
|
|
|
35
37
|
return "jpeg"
|
|
36
38
|
case .png:
|
|
37
39
|
return "png"
|
|
40
|
+
case .webp:
|
|
41
|
+
return "webp"
|
|
38
42
|
}
|
|
39
43
|
}
|
|
40
44
|
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// SecureStoreAccessibility.swift
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Represents the JS union `SecureStoreAccessibility`, backed by a C++ enum.
|
|
10
|
+
*/
|
|
11
|
+
public typealias SecureStoreAccessibility = margelo.nitro.one.SecureStoreAccessibility
|
|
12
|
+
|
|
13
|
+
public extension SecureStoreAccessibility {
|
|
14
|
+
/**
|
|
15
|
+
* Get a SecureStoreAccessibility for the given String value, or
|
|
16
|
+
* return `nil` if the given value was invalid/unknown.
|
|
17
|
+
*/
|
|
18
|
+
init?(fromString string: String) {
|
|
19
|
+
switch string {
|
|
20
|
+
case "always":
|
|
21
|
+
self = .always
|
|
22
|
+
case "afterFirstUnlock":
|
|
23
|
+
self = .afterfirstunlock
|
|
24
|
+
case "afterFirstUnlockThisDeviceOnly":
|
|
25
|
+
self = .afterfirstunlockthisdeviceonly
|
|
26
|
+
case "alwaysThisDeviceOnly":
|
|
27
|
+
self = .alwaysthisdeviceonly
|
|
28
|
+
case "whenPasscodeSetThisDeviceOnly":
|
|
29
|
+
self = .whenpasscodesetthisdeviceonly
|
|
30
|
+
case "whenUnlocked":
|
|
31
|
+
self = .whenunlocked
|
|
32
|
+
case "whenUnlockedThisDeviceOnly":
|
|
33
|
+
self = .whenunlockedthisdeviceonly
|
|
34
|
+
default:
|
|
35
|
+
return nil
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Get the String value this SecureStoreAccessibility represents.
|
|
41
|
+
*/
|
|
42
|
+
var stringValue: String {
|
|
43
|
+
switch self {
|
|
44
|
+
case .always:
|
|
45
|
+
return "always"
|
|
46
|
+
case .afterfirstunlock:
|
|
47
|
+
return "afterFirstUnlock"
|
|
48
|
+
case .afterfirstunlockthisdeviceonly:
|
|
49
|
+
return "afterFirstUnlockThisDeviceOnly"
|
|
50
|
+
case .alwaysthisdeviceonly:
|
|
51
|
+
return "alwaysThisDeviceOnly"
|
|
52
|
+
case .whenpasscodesetthisdeviceonly:
|
|
53
|
+
return "whenPasscodeSetThisDeviceOnly"
|
|
54
|
+
case .whenunlocked:
|
|
55
|
+
return "whenUnlocked"
|
|
56
|
+
case .whenunlockedthisdeviceonly:
|
|
57
|
+
return "whenUnlockedThisDeviceOnly"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// SecureStoreOptions.swift
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
import NitroModules
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Represents an instance of `SecureStoreOptions`, backed by a C++ struct.
|
|
12
|
+
*/
|
|
13
|
+
public typealias SecureStoreOptions = margelo.nitro.one.SecureStoreOptions
|
|
14
|
+
|
|
15
|
+
public extension SecureStoreOptions {
|
|
16
|
+
private typealias bridge = margelo.nitro.one.bridge.swift
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Create a new instance of `SecureStoreOptions`.
|
|
20
|
+
*/
|
|
21
|
+
init(keychainService: String?, keychainAccessible: SecureStoreAccessibility?, requireAuthentication: Bool?, authenticationPrompt: String?, accessGroup: String?) {
|
|
22
|
+
self.init({ () -> bridge.std__optional_std__string_ in
|
|
23
|
+
if let __unwrappedValue = keychainService {
|
|
24
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
25
|
+
} else {
|
|
26
|
+
return .init()
|
|
27
|
+
}
|
|
28
|
+
}(), { () -> bridge.std__optional_SecureStoreAccessibility_ in
|
|
29
|
+
if let __unwrappedValue = keychainAccessible {
|
|
30
|
+
return bridge.create_std__optional_SecureStoreAccessibility_(__unwrappedValue)
|
|
31
|
+
} else {
|
|
32
|
+
return .init()
|
|
33
|
+
}
|
|
34
|
+
}(), { () -> bridge.std__optional_bool_ in
|
|
35
|
+
if let __unwrappedValue = requireAuthentication {
|
|
36
|
+
return bridge.create_std__optional_bool_(__unwrappedValue)
|
|
37
|
+
} else {
|
|
38
|
+
return .init()
|
|
39
|
+
}
|
|
40
|
+
}(), { () -> bridge.std__optional_std__string_ in
|
|
41
|
+
if let __unwrappedValue = authenticationPrompt {
|
|
42
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
43
|
+
} else {
|
|
44
|
+
return .init()
|
|
45
|
+
}
|
|
46
|
+
}(), { () -> bridge.std__optional_std__string_ in
|
|
47
|
+
if let __unwrappedValue = accessGroup {
|
|
48
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
49
|
+
} else {
|
|
50
|
+
return .init()
|
|
51
|
+
}
|
|
52
|
+
}())
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@inline(__always)
|
|
56
|
+
var keychainService: String? {
|
|
57
|
+
return { () -> String? in
|
|
58
|
+
if bridge.has_value_std__optional_std__string_(self.__keychainService) {
|
|
59
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__keychainService)
|
|
60
|
+
return String(__unwrapped)
|
|
61
|
+
} else {
|
|
62
|
+
return nil
|
|
63
|
+
}
|
|
64
|
+
}()
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
@inline(__always)
|
|
68
|
+
var keychainAccessible: SecureStoreAccessibility? {
|
|
69
|
+
return self.__keychainAccessible.value
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
@inline(__always)
|
|
73
|
+
var requireAuthentication: Bool? {
|
|
74
|
+
return { () -> Bool? in
|
|
75
|
+
if bridge.has_value_std__optional_bool_(self.__requireAuthentication) {
|
|
76
|
+
let __unwrapped = bridge.get_std__optional_bool_(self.__requireAuthentication)
|
|
77
|
+
return __unwrapped
|
|
78
|
+
} else {
|
|
79
|
+
return nil
|
|
80
|
+
}
|
|
81
|
+
}()
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
@inline(__always)
|
|
85
|
+
var authenticationPrompt: String? {
|
|
86
|
+
return { () -> String? in
|
|
87
|
+
if bridge.has_value_std__optional_std__string_(self.__authenticationPrompt) {
|
|
88
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__authenticationPrompt)
|
|
89
|
+
return String(__unwrapped)
|
|
90
|
+
} else {
|
|
91
|
+
return nil
|
|
92
|
+
}
|
|
93
|
+
}()
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
@inline(__always)
|
|
97
|
+
var accessGroup: String? {
|
|
98
|
+
return { () -> String? in
|
|
99
|
+
if bridge.has_value_std__optional_std__string_(self.__accessGroup) {
|
|
100
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__accessGroup)
|
|
101
|
+
return String(__unwrapped)
|
|
102
|
+
} else {
|
|
103
|
+
return nil
|
|
104
|
+
}
|
|
105
|
+
}()
|
|
106
|
+
}
|
|
107
|
+
}
|