@tokamakdev/plugin-local-authentication 0.1.0-beta.116 → 0.1.0-beta.117
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/android/Bindings.kt +18 -18
- package/apple/Bindings.swift +83 -81
- package/package.json +2 -2
package/android/Bindings.kt
CHANGED
|
@@ -35,7 +35,7 @@ class Bindings(private val host: TokamakHost) : TokamakPlugin {
|
|
|
35
35
|
"Context.BindServiceFlags" -> callContext_BindServiceFlags(method, b)
|
|
36
36
|
"CancellationSignal" -> callCancellationSignal(method, b)
|
|
37
37
|
"CancellationSignal.OnCancelListener" -> callCancellationSignal_OnCancelListener(method, b)
|
|
38
|
-
else ->
|
|
38
|
+
else -> throw TokamakPluginError.notSupported("$method is not supported")
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
|
|
@@ -60,7 +60,7 @@ class Bindings(private val host: TokamakHost) : TokamakPlugin {
|
|
|
60
60
|
"BiometricManager#canAuthenticate(I)I" -> b.run { if (Build.VERSION.SDK_INT < 30) throw TokamakBinding.unavailable; b.encode(b.target(android.hardware.biometrics.BiometricManager::class.java).canAuthenticate(b.int(b[0]))) }
|
|
61
61
|
"BiometricManager#getStrings(I)Landroid/hardware/biometrics/BiometricManager\$Strings;" -> b.run { if (Build.VERSION.SDK_INT < 31) throw TokamakBinding.unavailable; b.encode(b.target(android.hardware.biometrics.BiometricManager::class.java).getStrings(b.int(b[0]))) }
|
|
62
62
|
"BiometricManager#getLastAuthenticationTime(I)J" -> b.run { if (Build.VERSION.SDK_INT < 35) throw TokamakBinding.unavailable; b.encode(b.target(android.hardware.biometrics.BiometricManager::class.java).getLastAuthenticationTime(b.int(b[0]))) }
|
|
63
|
-
else ->
|
|
63
|
+
else -> throw TokamakPluginError.notSupported("$method is not supported")
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
private fun callBiometricManager_Strings(method: String, b: TokamakBinding): (() -> Unit)? =
|
|
@@ -68,7 +68,7 @@ class Bindings(private val host: TokamakHost) : TokamakPlugin {
|
|
|
68
68
|
"BiometricManager.Strings#getButtonLabel()Ljava/lang/CharSequence;" -> b.run { if (Build.VERSION.SDK_INT < 31) throw TokamakBinding.unavailable; b.encode(b.target(android.hardware.biometrics.BiometricManager.Strings::class.java).getButtonLabel()) }
|
|
69
69
|
"BiometricManager.Strings#getPromptMessage()Ljava/lang/CharSequence;" -> b.run { if (Build.VERSION.SDK_INT < 31) throw TokamakBinding.unavailable; b.encode(b.target(android.hardware.biometrics.BiometricManager.Strings::class.java).getPromptMessage()) }
|
|
70
70
|
"BiometricManager.Strings#getSettingName()Ljava/lang/CharSequence;" -> b.run { if (Build.VERSION.SDK_INT < 31) throw TokamakBinding.unavailable; b.encode(b.target(android.hardware.biometrics.BiometricManager.Strings::class.java).getSettingName()) }
|
|
71
|
-
else ->
|
|
71
|
+
else -> throw TokamakPluginError.notSupported("$method is not supported")
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
private fun callBiometricPrompt(method: String, b: TokamakBinding): (() -> Unit)? =
|
|
@@ -84,7 +84,7 @@ class Bindings(private val host: TokamakHost) : TokamakPlugin {
|
|
|
84
84
|
"BiometricPrompt#getLogoRes()I" -> b.run { if (Build.VERSION.SDK_INT < 35) throw TokamakBinding.unavailable; b.encode(b.target(android.hardware.biometrics.BiometricPrompt::class.java).getLogoRes()) }
|
|
85
85
|
"BiometricPrompt#getLogoDescription()Ljava/lang/String;" -> b.run { if (Build.VERSION.SDK_INT < 35) throw TokamakBinding.unavailable; b.encode(b.target(android.hardware.biometrics.BiometricPrompt::class.java).getLogoDescription()) }
|
|
86
86
|
"BiometricPrompt#getContentView()Landroid/hardware/biometrics/PromptContentView;" -> b.run { if (Build.VERSION.SDK_INT < 35) throw TokamakBinding.unavailable; b.encode(b.target(android.hardware.biometrics.BiometricPrompt::class.java).getContentView()) }
|
|
87
|
-
else ->
|
|
87
|
+
else -> throw TokamakPluginError.notSupported("$method is not supported")
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
private fun callBiometricPrompt_AuthenticationCallback(method: String, b: TokamakBinding): (() -> Unit)? =
|
|
@@ -93,14 +93,14 @@ class Bindings(private val host: TokamakHost) : TokamakPlugin {
|
|
|
93
93
|
"BiometricPrompt.AuthenticationCallback#onAuthenticationHelp(ILjava/lang/CharSequence;)V" -> b.run { if (Build.VERSION.SDK_INT < 28) throw TokamakBinding.unavailable; b.target(android.hardware.biometrics.BiometricPrompt.AuthenticationCallback::class.java).onAuthenticationHelp(b.int(b[0]), b.optional(b[1]) { x1 -> b.string(x1) }); null }
|
|
94
94
|
"BiometricPrompt.AuthenticationCallback#onAuthenticationSucceeded(Landroid/hardware/biometrics/BiometricPrompt\$AuthenticationResult;)V" -> b.run { if (Build.VERSION.SDK_INT < 28) throw TokamakBinding.unavailable; b.target(android.hardware.biometrics.BiometricPrompt.AuthenticationCallback::class.java).onAuthenticationSucceeded(b.optional(b[0]) { x1 -> b.obj(x1, android.hardware.biometrics.BiometricPrompt.AuthenticationResult::class.java) }); null }
|
|
95
95
|
"BiometricPrompt.AuthenticationCallback#onAuthenticationFailed()V" -> b.run { if (Build.VERSION.SDK_INT < 28) throw TokamakBinding.unavailable; b.target(android.hardware.biometrics.BiometricPrompt.AuthenticationCallback::class.java).onAuthenticationFailed(); null }
|
|
96
|
-
else ->
|
|
96
|
+
else -> throw TokamakPluginError.notSupported("$method is not supported")
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
private fun callBiometricPrompt_AuthenticationResult(method: String, b: TokamakBinding): (() -> Unit)? =
|
|
100
100
|
when (method) {
|
|
101
101
|
"BiometricPrompt.AuthenticationResult#getCryptoObject()Landroid/hardware/biometrics/BiometricPrompt\$CryptoObject;" -> b.run { if (Build.VERSION.SDK_INT < 28) throw TokamakBinding.unavailable; b.encode(b.target(android.hardware.biometrics.BiometricPrompt.AuthenticationResult::class.java).getCryptoObject()) }
|
|
102
102
|
"BiometricPrompt.AuthenticationResult#getAuthenticationType()I" -> b.run { if (Build.VERSION.SDK_INT < 30) throw TokamakBinding.unavailable; b.encode(b.target(android.hardware.biometrics.BiometricPrompt.AuthenticationResult::class.java).getAuthenticationType()) }
|
|
103
|
-
else ->
|
|
103
|
+
else -> throw TokamakPluginError.notSupported("$method is not supported")
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
private fun callBiometricPrompt_Builder(method: String, b: TokamakBinding): (() -> Unit)? =
|
|
@@ -116,35 +116,35 @@ class Bindings(private val host: TokamakHost) : TokamakPlugin {
|
|
|
116
116
|
"BiometricPrompt.Builder#setLogoRes(I)Landroid/hardware/biometrics/BiometricPrompt\$Builder;" -> b.run { if (Build.VERSION.SDK_INT < 35) throw TokamakBinding.unavailable; b.encode(b.target(android.hardware.biometrics.BiometricPrompt.Builder::class.java).setLogoRes(b.int(b[0]))) }
|
|
117
117
|
"BiometricPrompt.Builder#setLogoDescription(Ljava/lang/String;)Landroid/hardware/biometrics/BiometricPrompt\$Builder;" -> b.run { if (Build.VERSION.SDK_INT < 35) throw TokamakBinding.unavailable; b.encode(b.target(android.hardware.biometrics.BiometricPrompt.Builder::class.java).setLogoDescription(b.string(b[0]))) }
|
|
118
118
|
"BiometricPrompt.Builder#setContentView(Landroid/hardware/biometrics/PromptContentView;)Landroid/hardware/biometrics/BiometricPrompt\$Builder;" -> b.run { if (Build.VERSION.SDK_INT < 35) throw TokamakBinding.unavailable; b.encode(b.target(android.hardware.biometrics.BiometricPrompt.Builder::class.java).setContentView(b.obj(b[0], android.hardware.biometrics.PromptContentView::class.java))) }
|
|
119
|
-
else ->
|
|
119
|
+
else -> throw TokamakPluginError.notSupported("$method is not supported")
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
private fun callBiometricPrompt_CryptoObject(method: String, b: TokamakBinding): (() -> Unit)? =
|
|
123
123
|
when (method) {
|
|
124
124
|
"BiometricPrompt.CryptoObject#<init>(J)V" -> b.run { if (Build.VERSION.SDK_INT < 35) throw TokamakBinding.unavailable; b.encode(android.hardware.biometrics.BiometricPrompt.CryptoObject(b.long(b[0]))) }
|
|
125
125
|
"BiometricPrompt.CryptoObject#getOperationHandle()J" -> b.run { if (Build.VERSION.SDK_INT < 35) throw TokamakBinding.unavailable; b.encode(b.target(android.hardware.biometrics.BiometricPrompt.CryptoObject::class.java).getOperationHandle()) }
|
|
126
|
-
else ->
|
|
126
|
+
else -> throw TokamakPluginError.notSupported("$method is not supported")
|
|
127
127
|
}
|
|
128
128
|
|
|
129
129
|
private fun callPromptContentItemBulletedText(method: String, b: TokamakBinding): (() -> Unit)? =
|
|
130
130
|
when (method) {
|
|
131
131
|
"PromptContentItemBulletedText#<init>(Ljava/lang/String;)V" -> b.run { if (Build.VERSION.SDK_INT < 35) throw TokamakBinding.unavailable; b.encode(android.hardware.biometrics.PromptContentItemBulletedText(b.string(b[0]))) }
|
|
132
132
|
"PromptContentItemBulletedText#describeContents()I" -> b.run { if (Build.VERSION.SDK_INT < 35) throw TokamakBinding.unavailable; b.encode(b.target(android.hardware.biometrics.PromptContentItemBulletedText::class.java).describeContents()) }
|
|
133
|
-
else ->
|
|
133
|
+
else -> throw TokamakPluginError.notSupported("$method is not supported")
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
private fun callPromptContentItemPlainText(method: String, b: TokamakBinding): (() -> Unit)? =
|
|
137
137
|
when (method) {
|
|
138
138
|
"PromptContentItemPlainText#<init>(Ljava/lang/String;)V" -> b.run { if (Build.VERSION.SDK_INT < 35) throw TokamakBinding.unavailable; b.encode(android.hardware.biometrics.PromptContentItemPlainText(b.string(b[0]))) }
|
|
139
139
|
"PromptContentItemPlainText#describeContents()I" -> b.run { if (Build.VERSION.SDK_INT < 35) throw TokamakBinding.unavailable; b.encode(b.target(android.hardware.biometrics.PromptContentItemPlainText::class.java).describeContents()) }
|
|
140
|
-
else ->
|
|
140
|
+
else -> throw TokamakPluginError.notSupported("$method is not supported")
|
|
141
141
|
}
|
|
142
142
|
|
|
143
143
|
private fun callPromptContentViewWithMoreOptionsButton(method: String, b: TokamakBinding): (() -> Unit)? =
|
|
144
144
|
when (method) {
|
|
145
145
|
"PromptContentViewWithMoreOptionsButton#getDescription()Ljava/lang/String;" -> b.run { if (Build.VERSION.SDK_INT < 35) throw TokamakBinding.unavailable; b.encode(b.target(android.hardware.biometrics.PromptContentViewWithMoreOptionsButton::class.java).getDescription()) }
|
|
146
146
|
"PromptContentViewWithMoreOptionsButton#describeContents()I" -> b.run { if (Build.VERSION.SDK_INT < 35) throw TokamakBinding.unavailable; b.encode(b.target(android.hardware.biometrics.PromptContentViewWithMoreOptionsButton::class.java).describeContents()) }
|
|
147
|
-
else ->
|
|
147
|
+
else -> throw TokamakPluginError.notSupported("$method is not supported")
|
|
148
148
|
}
|
|
149
149
|
|
|
150
150
|
private fun callPromptContentViewWithMoreOptionsButton_Builder(method: String, b: TokamakBinding): (() -> Unit)? =
|
|
@@ -152,7 +152,7 @@ class Bindings(private val host: TokamakHost) : TokamakPlugin {
|
|
|
152
152
|
"PromptContentViewWithMoreOptionsButton.Builder#<init>()V" -> b.run { if (Build.VERSION.SDK_INT < 35) throw TokamakBinding.unavailable; b.encode(android.hardware.biometrics.PromptContentViewWithMoreOptionsButton.Builder()) }
|
|
153
153
|
"PromptContentViewWithMoreOptionsButton.Builder#setDescription(Ljava/lang/String;)Landroid/hardware/biometrics/PromptContentViewWithMoreOptionsButton\$Builder;" -> b.run { if (Build.VERSION.SDK_INT < 35) throw TokamakBinding.unavailable; b.encode(b.target(android.hardware.biometrics.PromptContentViewWithMoreOptionsButton.Builder::class.java).setDescription(b.string(b[0]))) }
|
|
154
154
|
"PromptContentViewWithMoreOptionsButton.Builder#build()Landroid/hardware/biometrics/PromptContentViewWithMoreOptionsButton;" -> b.run { if (Build.VERSION.SDK_INT < 35) throw TokamakBinding.unavailable; b.encode(b.target(android.hardware.biometrics.PromptContentViewWithMoreOptionsButton.Builder::class.java).build()) }
|
|
155
|
-
else ->
|
|
155
|
+
else -> throw TokamakPluginError.notSupported("$method is not supported")
|
|
156
156
|
}
|
|
157
157
|
|
|
158
158
|
private fun callPromptVerticalListContentView(method: String, b: TokamakBinding): (() -> Unit)? =
|
|
@@ -162,7 +162,7 @@ class Bindings(private val host: TokamakHost) : TokamakPlugin {
|
|
|
162
162
|
"PromptVerticalListContentView#getDescription()Ljava/lang/String;" -> b.run { if (Build.VERSION.SDK_INT < 35) throw TokamakBinding.unavailable; b.encode(b.target(android.hardware.biometrics.PromptVerticalListContentView::class.java).getDescription()) }
|
|
163
163
|
"PromptVerticalListContentView#getListItems()Ljava/util/List;" -> b.run { if (Build.VERSION.SDK_INT < 35) throw TokamakBinding.unavailable; b.encode(b.target(android.hardware.biometrics.PromptVerticalListContentView::class.java).getListItems()) }
|
|
164
164
|
"PromptVerticalListContentView#describeContents()I" -> b.run { if (Build.VERSION.SDK_INT < 35) throw TokamakBinding.unavailable; b.encode(b.target(android.hardware.biometrics.PromptVerticalListContentView::class.java).describeContents()) }
|
|
165
|
-
else ->
|
|
165
|
+
else -> throw TokamakPluginError.notSupported("$method is not supported")
|
|
166
166
|
}
|
|
167
167
|
|
|
168
168
|
private fun callPromptVerticalListContentView_Builder(method: String, b: TokamakBinding): (() -> Unit)? =
|
|
@@ -172,7 +172,7 @@ class Bindings(private val host: TokamakHost) : TokamakPlugin {
|
|
|
172
172
|
"PromptVerticalListContentView.Builder#addListItem(Landroid/hardware/biometrics/PromptContentItem;)Landroid/hardware/biometrics/PromptVerticalListContentView\$Builder;" -> b.run { if (Build.VERSION.SDK_INT < 35) throw TokamakBinding.unavailable; b.encode(b.target(android.hardware.biometrics.PromptVerticalListContentView.Builder::class.java).addListItem(b.obj(b[0], android.hardware.biometrics.PromptContentItem::class.java))) }
|
|
173
173
|
"PromptVerticalListContentView.Builder#addListItem(Landroid/hardware/biometrics/PromptContentItem;I)Landroid/hardware/biometrics/PromptVerticalListContentView\$Builder;" -> b.run { if (Build.VERSION.SDK_INT < 35) throw TokamakBinding.unavailable; b.encode(b.target(android.hardware.biometrics.PromptVerticalListContentView.Builder::class.java).addListItem(b.obj(b[0], android.hardware.biometrics.PromptContentItem::class.java), b.int(b[1]))) }
|
|
174
174
|
"PromptVerticalListContentView.Builder#build()Landroid/hardware/biometrics/PromptVerticalListContentView;" -> b.run { if (Build.VERSION.SDK_INT < 35) throw TokamakBinding.unavailable; b.encode(b.target(android.hardware.biometrics.PromptVerticalListContentView.Builder::class.java).build()) }
|
|
175
|
-
else ->
|
|
175
|
+
else -> throw TokamakPluginError.notSupported("$method is not supported")
|
|
176
176
|
}
|
|
177
177
|
|
|
178
178
|
private fun callContext(method: String, b: TokamakBinding): (() -> Unit)? =
|
|
@@ -218,13 +218,13 @@ class Bindings(private val host: TokamakHost) : TokamakPlugin {
|
|
|
218
218
|
"Context#revokeSelfPermissionsOnKill(Ljava/util/Collection;)V" -> b.run { if (Build.VERSION.SDK_INT < 33) throw TokamakBinding.unavailable; b.target(android.content.Context::class.java).revokeSelfPermissionsOnKill(b.list(b[0]) { x1 -> b.optional(x1) { x2 -> b.string(x2) } }); null }
|
|
219
219
|
"Context#createDeviceContext(I)Landroid/content/Context;" -> b.run { if (Build.VERSION.SDK_INT < 34) throw TokamakBinding.unavailable; b.encode(b.target(android.content.Context::class.java).createDeviceContext(b.int(b[0]))) }
|
|
220
220
|
"Context#getDeviceId()I" -> b.run { if (Build.VERSION.SDK_INT < 34) throw TokamakBinding.unavailable; b.encode(b.target(android.content.Context::class.java).getDeviceId()) }
|
|
221
|
-
else ->
|
|
221
|
+
else -> throw TokamakPluginError.notSupported("$method is not supported")
|
|
222
222
|
}
|
|
223
223
|
|
|
224
224
|
private fun callContext_BindServiceFlags(method: String, b: TokamakBinding): (() -> Unit)? =
|
|
225
225
|
when (method) {
|
|
226
226
|
"Context.BindServiceFlags#of(J)Landroid/content/Context\$BindServiceFlags;" -> b.run { if (Build.VERSION.SDK_INT < 34) throw TokamakBinding.unavailable; b.encode(android.content.Context.BindServiceFlags.of(b.long(b[0]))) }
|
|
227
|
-
else ->
|
|
227
|
+
else -> throw TokamakPluginError.notSupported("$method is not supported")
|
|
228
228
|
}
|
|
229
229
|
|
|
230
230
|
private fun callCancellationSignal(method: String, b: TokamakBinding): (() -> Unit)? =
|
|
@@ -234,13 +234,13 @@ class Bindings(private val host: TokamakHost) : TokamakPlugin {
|
|
|
234
234
|
"CancellationSignal#throwIfCanceled()V" -> b.run { if (Build.VERSION.SDK_INT < 16) throw TokamakBinding.unavailable; b.target(android.os.CancellationSignal::class.java).throwIfCanceled(); null }
|
|
235
235
|
"CancellationSignal#cancel()V" -> b.run { if (Build.VERSION.SDK_INT < 16) throw TokamakBinding.unavailable; b.target(android.os.CancellationSignal::class.java).cancel(); null }
|
|
236
236
|
"CancellationSignal#setOnCancelListener(Landroid/os/CancellationSignal\$OnCancelListener;)V" -> b.run { if (Build.VERSION.SDK_INT < 16) throw TokamakBinding.unavailable; b.target(android.os.CancellationSignal::class.java).setOnCancelListener(b.optional(b[0]) { x1 -> b.obj(x1, android.os.CancellationSignal.OnCancelListener::class.java) }); null }
|
|
237
|
-
else ->
|
|
237
|
+
else -> throw TokamakPluginError.notSupported("$method is not supported")
|
|
238
238
|
}
|
|
239
239
|
|
|
240
240
|
private fun callCancellationSignal_OnCancelListener(method: String, b: TokamakBinding): (() -> Unit)? =
|
|
241
241
|
when (method) {
|
|
242
242
|
"CancellationSignal.OnCancelListener#onCancel()V" -> b.run { if (Build.VERSION.SDK_INT < 16) throw TokamakBinding.unavailable; b.target(android.os.CancellationSignal.OnCancelListener::class.java).onCancel(); null }
|
|
243
|
-
else ->
|
|
243
|
+
else -> throw TokamakPluginError.notSupported("$method is not supported")
|
|
244
244
|
}
|
|
245
245
|
|
|
246
246
|
@androidx.annotation.RequiresApi(28)
|
package/apple/Bindings.swift
CHANGED
|
@@ -12,239 +12,241 @@ final class TokamakBindings_local_authentication: TokamakPlugin {
|
|
|
12
12
|
|
|
13
13
|
init(host: TokamakHost) { self.host = host }
|
|
14
14
|
|
|
15
|
-
func callBytes(method: String, payload: Data, reply: @escaping TokamakPluginBytesReply)
|
|
16
|
-
|
|
15
|
+
func callBytes(method: String, payload: Data, reply: @escaping TokamakPluginBytesReply)
|
|
16
|
+
throws(TokamakPluginError) -> (() -> Void)?
|
|
17
|
+
{
|
|
18
|
+
let b = try TokamakBinding(payload, resources: host.resources, reply: reply)
|
|
17
19
|
switch method {
|
|
18
20
|
case "LAAuthenticationRequirement.biometry":
|
|
19
|
-
guard #available(iOS 16.0, macOS 13.0, *) else {
|
|
21
|
+
guard #available(iOS 16.0, macOS 13.0, *) else { throw TokamakBinding.unavailable }
|
|
20
22
|
return b.run { let value = LAAuthenticationRequirement.biometry; return b.encode(object: value) }
|
|
21
23
|
case "LAAuthenticationRequirement.biometryCurrentSet":
|
|
22
|
-
guard #available(iOS 16.0, macOS 13.0, *) else {
|
|
24
|
+
guard #available(iOS 16.0, macOS 13.0, *) else { throw TokamakBinding.unavailable }
|
|
23
25
|
return b.run { let value = LAAuthenticationRequirement.biometryCurrentSet; return b.encode(object: value) }
|
|
24
26
|
case "LAAuthenticationRequirement.default":
|
|
25
|
-
guard #available(iOS 16.0, macOS 13.0, *) else {
|
|
27
|
+
guard #available(iOS 16.0, macOS 13.0, *) else { throw TokamakBinding.unavailable }
|
|
26
28
|
return b.run { let value = LAAuthenticationRequirement.default; return b.encode(object: value) }
|
|
27
29
|
case "LAAuthenticationRequirement.init()":
|
|
28
|
-
guard #available(iOS 16.0, macOS 13.0, *) else {
|
|
30
|
+
guard #available(iOS 16.0, macOS 13.0, *) else { throw TokamakBinding.unavailable }
|
|
29
31
|
return b.run { let value = LAAuthenticationRequirement(); return b.encode(object: value) }
|
|
30
32
|
case "LABiometryFallbackRequirement.default":
|
|
31
|
-
guard #available(iOS 16.0, macOS 13.0, *) else {
|
|
33
|
+
guard #available(iOS 16.0, macOS 13.0, *) else { throw TokamakBinding.unavailable }
|
|
32
34
|
return b.run { let value = LABiometryFallbackRequirement.default; return b.encode(object: value) }
|
|
33
35
|
case "LABiometryFallbackRequirement.devicePasscode":
|
|
34
|
-
guard #available(iOS 16.0, macOS 13.0, *) else {
|
|
36
|
+
guard #available(iOS 16.0, macOS 13.0, *) else { throw TokamakBinding.unavailable }
|
|
35
37
|
return b.run { let value = LABiometryFallbackRequirement.devicePasscode; return b.encode(object: value) }
|
|
36
38
|
case "LABiometryFallbackRequirement.init()":
|
|
37
|
-
guard #available(iOS 16.0, macOS 13.0, *) else {
|
|
39
|
+
guard #available(iOS 16.0, macOS 13.0, *) else { throw TokamakBinding.unavailable }
|
|
38
40
|
return b.run { let value = LABiometryFallbackRequirement(); return b.encode(object: value) }
|
|
39
41
|
case "LAContext.biometryType":
|
|
40
|
-
guard #available(iOS 11.0, macOS 10.13.2, *) else {
|
|
42
|
+
guard #available(iOS 11.0, macOS 10.13.2, *) else { throw TokamakBinding.unavailable }
|
|
41
43
|
return b.run { let value = try b.target(LAContext.self).biometryType; return TokamakBindings_local_authentication.encode(value, b) }
|
|
42
44
|
case "LAContext.canEvaluatePolicy(_:error:)":
|
|
43
|
-
guard #available(iOS 8.0, macOS 10.10, *) else {
|
|
45
|
+
guard #available(iOS 8.0, macOS 10.10, *) else { throw TokamakBinding.unavailable }
|
|
44
46
|
return b.run { var error: NSError?; let value = try b.target(LAContext.self).canEvaluatePolicy(TokamakBindings_local_authentication.decode(b[0], b, as: LAPolicy.self), error: &error); if let error { throw error }; return b.encode(value) }
|
|
45
47
|
case "LAContext.domainState":
|
|
46
|
-
guard #available(iOS 18.0, macOS 15.0, *) else {
|
|
48
|
+
guard #available(iOS 18.0, macOS 15.0, *) else { throw TokamakBinding.unavailable }
|
|
47
49
|
return b.run { let value = try b.target(LAContext.self).domainState; return b.encode(object: value) }
|
|
48
50
|
case "LAContext.evaluatePolicy(_:localizedReason:)":
|
|
49
|
-
guard #available(iOS 8.0, macOS 10.10, *) else {
|
|
51
|
+
guard #available(iOS 8.0, macOS 10.10, *) else { throw TokamakBinding.unavailable }
|
|
50
52
|
return b.task { let value = try await b.target(LAContext.self).evaluatePolicy(TokamakBindings_local_authentication.decode(b[0], b, as: LAPolicy.self), localizedReason: b.decode(b[1], as: String.self)); return b.encode(value) }
|
|
51
53
|
case "LAContext.evaluatedPolicyDomainState":
|
|
52
|
-
guard #available(iOS 9.0, macOS 10.11, *) else {
|
|
54
|
+
guard #available(iOS 9.0, macOS 10.11, *) else { throw TokamakBinding.unavailable }
|
|
53
55
|
return b.run { let value = try b.target(LAContext.self).evaluatedPolicyDomainState; return b.encode(optional: value) { b.encode($0) } }
|
|
54
56
|
case "LAContext.interactionNotAllowed":
|
|
55
|
-
guard #available(iOS 11.0, macOS 10.13, *) else {
|
|
57
|
+
guard #available(iOS 11.0, macOS 10.13, *) else { throw TokamakBinding.unavailable }
|
|
56
58
|
return b.run { let value = try b.target(LAContext.self).interactionNotAllowed; return b.encode(value) }
|
|
57
59
|
case "LAContext.interactionNotAllowed=":
|
|
58
|
-
guard #available(iOS 11.0, macOS 10.13, *) else {
|
|
60
|
+
guard #available(iOS 11.0, macOS 10.13, *) else { throw TokamakBinding.unavailable }
|
|
59
61
|
return b.run { try b.target(LAContext.self).interactionNotAllowed = b.decode(b[0], as: Bool.self); return nil }
|
|
60
62
|
case "LAContext.invalidate()":
|
|
61
|
-
guard #available(iOS 9.0, macOS 10.11, *) else {
|
|
63
|
+
guard #available(iOS 9.0, macOS 10.11, *) else { throw TokamakBinding.unavailable }
|
|
62
64
|
return b.run { try b.target(LAContext.self).invalidate(); return nil }
|
|
63
65
|
case "LAContext.isCredentialSet(_:)":
|
|
64
|
-
guard #available(iOS 9.0, macOS 10.11, *) else {
|
|
66
|
+
guard #available(iOS 9.0, macOS 10.11, *) else { throw TokamakBinding.unavailable }
|
|
65
67
|
return b.run { let value = try b.target(LAContext.self).isCredentialSet(TokamakBindings_local_authentication.decode(b[0], b, as: LACredentialType.self)); return b.encode(value) }
|
|
66
68
|
case "LAContext.localizedCancelTitle":
|
|
67
|
-
guard #available(iOS 10.0, macOS 10.12, *) else {
|
|
69
|
+
guard #available(iOS 10.0, macOS 10.12, *) else { throw TokamakBinding.unavailable }
|
|
68
70
|
return b.run { let value = try b.target(LAContext.self).localizedCancelTitle; return b.encode(optional: value) { b.encode($0) } }
|
|
69
71
|
case "LAContext.localizedCancelTitle=":
|
|
70
|
-
guard #available(iOS 10.0, macOS 10.12, *) else {
|
|
72
|
+
guard #available(iOS 10.0, macOS 10.12, *) else { throw TokamakBinding.unavailable }
|
|
71
73
|
return b.run { try b.target(LAContext.self).localizedCancelTitle = b.optional(b[0]) { try b.decode($0, as: String.self) }; return nil }
|
|
72
74
|
case "LAContext.localizedFallbackTitle":
|
|
73
|
-
guard #available(iOS 8.0, macOS 10.10, *) else {
|
|
75
|
+
guard #available(iOS 8.0, macOS 10.10, *) else { throw TokamakBinding.unavailable }
|
|
74
76
|
return b.run { let value = try b.target(LAContext.self).localizedFallbackTitle; return b.encode(optional: value) { b.encode($0) } }
|
|
75
77
|
case "LAContext.localizedFallbackTitle=":
|
|
76
|
-
guard #available(iOS 8.0, macOS 10.10, *) else {
|
|
78
|
+
guard #available(iOS 8.0, macOS 10.10, *) else { throw TokamakBinding.unavailable }
|
|
77
79
|
return b.run { try b.target(LAContext.self).localizedFallbackTitle = b.optional(b[0]) { try b.decode($0, as: String.self) }; return nil }
|
|
78
80
|
case "LAContext.localizedReason":
|
|
79
|
-
guard #available(iOS 11.0, macOS 10.13, *) else {
|
|
81
|
+
guard #available(iOS 11.0, macOS 10.13, *) else { throw TokamakBinding.unavailable }
|
|
80
82
|
return b.run { let value = try b.target(LAContext.self).localizedReason; return b.encode(value) }
|
|
81
83
|
case "LAContext.localizedReason=":
|
|
82
|
-
guard #available(iOS 11.0, macOS 10.13, *) else {
|
|
84
|
+
guard #available(iOS 11.0, macOS 10.13, *) else { throw TokamakBinding.unavailable }
|
|
83
85
|
return b.run { try b.target(LAContext.self).localizedReason = b.decode(b[0], as: String.self); return nil }
|
|
84
86
|
case "LAContext.maxBiometryFailures":
|
|
85
|
-
guard #available(iOS 8.3, macOS 10.10.3, *) else {
|
|
87
|
+
guard #available(iOS 8.3, macOS 10.10.3, *) else { throw TokamakBinding.unavailable }
|
|
86
88
|
return b.run { let value = try b.target(LAContext.self).maxBiometryFailures; return b.encode(optional: value) { b.encode($0) } }
|
|
87
89
|
case "LAContext.maxBiometryFailures=":
|
|
88
|
-
guard #available(iOS 8.3, macOS 10.10.3, *) else {
|
|
90
|
+
guard #available(iOS 8.3, macOS 10.10.3, *) else { throw TokamakBinding.unavailable }
|
|
89
91
|
return b.run { try b.target(LAContext.self).maxBiometryFailures = b.optional(b[0]) { try b.decode($0, as: NSNumber.self) }; return nil }
|
|
90
92
|
case "LAContext.setCredential(_:type:)":
|
|
91
|
-
guard #available(iOS 9.0, macOS 10.11, *) else {
|
|
93
|
+
guard #available(iOS 9.0, macOS 10.11, *) else { throw TokamakBinding.unavailable }
|
|
92
94
|
return b.run { let value = try b.target(LAContext.self).setCredential(b.optional(b[0]) { try b.decode($0, as: Data.self) }, type: TokamakBindings_local_authentication.decode(b[1], b, as: LACredentialType.self)); return b.encode(value) }
|
|
93
95
|
case "LAContext.touchIDAuthenticationAllowableReuseDuration":
|
|
94
|
-
guard #available(iOS 9.0, macOS 10.12, *) else {
|
|
96
|
+
guard #available(iOS 9.0, macOS 10.12, *) else { throw TokamakBinding.unavailable }
|
|
95
97
|
return b.run { let value = try b.target(LAContext.self).touchIDAuthenticationAllowableReuseDuration; return b.encode(value) }
|
|
96
98
|
case "LAContext.touchIDAuthenticationAllowableReuseDuration=":
|
|
97
|
-
guard #available(iOS 9.0, macOS 10.12, *) else {
|
|
99
|
+
guard #available(iOS 9.0, macOS 10.12, *) else { throw TokamakBinding.unavailable }
|
|
98
100
|
return b.run { try b.target(LAContext.self).touchIDAuthenticationAllowableReuseDuration = b.decode(b[0], as: TimeInterval.self); return nil }
|
|
99
101
|
case "LAContext.init()":
|
|
100
|
-
guard #available(iOS 8.0, macOS 10.10, *) else {
|
|
102
|
+
guard #available(iOS 8.0, macOS 10.10, *) else { throw TokamakBinding.unavailable }
|
|
101
103
|
return b.run { let value = LAContext(); return b.encode(object: value) }
|
|
102
104
|
case "LADomainState.biometry":
|
|
103
|
-
guard #available(iOS 18.0, macOS 15.0, *) else {
|
|
105
|
+
guard #available(iOS 18.0, macOS 15.0, *) else { throw TokamakBinding.unavailable }
|
|
104
106
|
return b.run { let value = try b.target(LADomainState.self).biometry; return b.encode(object: value) }
|
|
105
107
|
case "LADomainState.companion":
|
|
106
|
-
guard #available(iOS 18.0, macOS 15.0, *) else {
|
|
108
|
+
guard #available(iOS 18.0, macOS 15.0, *) else { throw TokamakBinding.unavailable }
|
|
107
109
|
return b.run { let value = try b.target(LADomainState.self).companion; return b.encode(object: value) }
|
|
108
110
|
case "LADomainState.stateHash":
|
|
109
|
-
guard #available(iOS 18.0, macOS 15.0, *) else {
|
|
111
|
+
guard #available(iOS 18.0, macOS 15.0, *) else { throw TokamakBinding.unavailable }
|
|
110
112
|
return b.run { let value = try b.target(LADomainState.self).stateHash; return b.encode(optional: value) { b.encode($0) } }
|
|
111
113
|
case "LADomainStateBiometry.biometryType":
|
|
112
|
-
guard #available(iOS 18.0, macOS 15.0, *) else {
|
|
114
|
+
guard #available(iOS 18.0, macOS 15.0, *) else { throw TokamakBinding.unavailable }
|
|
113
115
|
return b.run { let value = try b.target(LADomainStateBiometry.self).biometryType; return TokamakBindings_local_authentication.encode(value, b) }
|
|
114
116
|
case "LADomainStateBiometry.stateHash":
|
|
115
|
-
guard #available(iOS 18.0, macOS 15.0, *) else {
|
|
117
|
+
guard #available(iOS 18.0, macOS 15.0, *) else { throw TokamakBinding.unavailable }
|
|
116
118
|
return b.run { let value = try b.target(LADomainStateBiometry.self).stateHash; return b.encode(optional: value) { b.encode($0) } }
|
|
117
119
|
case "LADomainStateCompanion.availableCompanionTypes":
|
|
118
|
-
guard #available(iOS 18.0, macOS 15.0, *) else {
|
|
120
|
+
guard #available(iOS 18.0, macOS 15.0, *) else { throw TokamakBinding.unavailable }
|
|
119
121
|
return b.run { let value = try b.target(LADomainStateCompanion.self).availableCompanionTypes; return b.encode(array: value) { TokamakBindings_local_authentication.encode($0, b) } }
|
|
120
122
|
case "LADomainStateCompanion.stateHash":
|
|
121
|
-
guard #available(iOS 18.0, macOS 15.0, *) else {
|
|
123
|
+
guard #available(iOS 18.0, macOS 15.0, *) else { throw TokamakBinding.unavailable }
|
|
122
124
|
return b.run { let value = try b.target(LADomainStateCompanion.self).stateHash; return b.encode(optional: value) { b.encode($0) } }
|
|
123
125
|
case "LADomainStateCompanion.stateHash(for:)":
|
|
124
|
-
guard #available(iOS 18.0, macOS 15.0, *) else {
|
|
126
|
+
guard #available(iOS 18.0, macOS 15.0, *) else { throw TokamakBinding.unavailable }
|
|
125
127
|
return b.run { let value = try b.target(LADomainStateCompanion.self).stateHash(for: TokamakBindings_local_authentication.decode(b[0], b, as: LACompanionType.self)); return b.encode(optional: value) { b.encode($0) } }
|
|
126
128
|
case "LAEnvironment.addObserver(_:)":
|
|
127
|
-
guard #available(iOS 18.0, macOS 15.0, *) else {
|
|
129
|
+
guard #available(iOS 18.0, macOS 15.0, *) else { throw TokamakBinding.unavailable }
|
|
128
130
|
return b.run { try b.target(LAEnvironment.self).addObserver(b.object(b[0], as: (any LAEnvironment.Observer).self)); return nil }
|
|
129
131
|
case "LAEnvironment.currentUser":
|
|
130
|
-
guard #available(iOS 18.0, macOS 15.0, *) else {
|
|
132
|
+
guard #available(iOS 18.0, macOS 15.0, *) else { throw TokamakBinding.unavailable }
|
|
131
133
|
return b.run { let value = LAEnvironment.currentUser; return b.encode(object: value) }
|
|
132
134
|
case "LAEnvironment.removeObserver(_:)":
|
|
133
|
-
guard #available(iOS 18.0, macOS 15.0, *) else {
|
|
135
|
+
guard #available(iOS 18.0, macOS 15.0, *) else { throw TokamakBinding.unavailable }
|
|
134
136
|
return b.run { try b.target(LAEnvironment.self).removeObserver(b.object(b[0], as: (any LAEnvironment.Observer).self)); return nil }
|
|
135
137
|
case "LAEnvironment.state":
|
|
136
|
-
guard #available(iOS 18.0, macOS 15.0, *) else {
|
|
138
|
+
guard #available(iOS 18.0, macOS 15.0, *) else { throw TokamakBinding.unavailable }
|
|
137
139
|
return b.run { let value = try b.target(LAEnvironment.self).state; return b.encode(object: value) }
|
|
138
140
|
case "LAEnvironment.Mechanism.iconSystemName":
|
|
139
|
-
guard #available(iOS 18.0, macOS 15.0, *) else {
|
|
141
|
+
guard #available(iOS 18.0, macOS 15.0, *) else { throw TokamakBinding.unavailable }
|
|
140
142
|
return b.run { let value = try b.target(LAEnvironment.Mechanism.self).iconSystemName; return b.encode(value) }
|
|
141
143
|
case "LAEnvironment.Mechanism.isUsable":
|
|
142
|
-
guard #available(iOS 18.0, macOS 15.0, *) else {
|
|
144
|
+
guard #available(iOS 18.0, macOS 15.0, *) else { throw TokamakBinding.unavailable }
|
|
143
145
|
return b.run { let value = try b.target(LAEnvironment.Mechanism.self).isUsable; return b.encode(value) }
|
|
144
146
|
case "LAEnvironment.Mechanism.localizedName":
|
|
145
|
-
guard #available(iOS 18.0, macOS 15.0, *) else {
|
|
147
|
+
guard #available(iOS 18.0, macOS 15.0, *) else { throw TokamakBinding.unavailable }
|
|
146
148
|
return b.run { let value = try b.target(LAEnvironment.Mechanism.self).localizedName; return b.encode(value) }
|
|
147
149
|
case "LAEnvironment.MechanismBiometry.biometryType":
|
|
148
|
-
guard #available(iOS 18.0, macOS 15.0, *) else {
|
|
150
|
+
guard #available(iOS 18.0, macOS 15.0, *) else { throw TokamakBinding.unavailable }
|
|
149
151
|
return b.run { let value = try b.target(LAEnvironment.MechanismBiometry.self).biometryType; return TokamakBindings_local_authentication.encode(value, b) }
|
|
150
152
|
case "LAEnvironment.MechanismBiometry.builtInSensorInaccessible":
|
|
151
|
-
guard #available(iOS 18.0, macOS 15.0, *) else {
|
|
153
|
+
guard #available(iOS 18.0, macOS 15.0, *) else { throw TokamakBinding.unavailable }
|
|
152
154
|
return b.run { let value = try b.target(LAEnvironment.MechanismBiometry.self).builtInSensorInaccessible; return b.encode(value) }
|
|
153
155
|
case "LAEnvironment.MechanismBiometry.isEnrolled":
|
|
154
|
-
guard #available(iOS 18.0, macOS 15.0, *) else {
|
|
156
|
+
guard #available(iOS 18.0, macOS 15.0, *) else { throw TokamakBinding.unavailable }
|
|
155
157
|
return b.run { let value = try b.target(LAEnvironment.MechanismBiometry.self).isEnrolled; return b.encode(value) }
|
|
156
158
|
case "LAEnvironment.MechanismBiometry.isLockedOut":
|
|
157
|
-
guard #available(iOS 18.0, macOS 15.0, *) else {
|
|
159
|
+
guard #available(iOS 18.0, macOS 15.0, *) else { throw TokamakBinding.unavailable }
|
|
158
160
|
return b.run { let value = try b.target(LAEnvironment.MechanismBiometry.self).isLockedOut; return b.encode(value) }
|
|
159
161
|
case "LAEnvironment.MechanismBiometry.stateHash":
|
|
160
|
-
guard #available(iOS 18.0, macOS 15.0, *) else {
|
|
162
|
+
guard #available(iOS 18.0, macOS 15.0, *) else { throw TokamakBinding.unavailable }
|
|
161
163
|
return b.run { let value = try b.target(LAEnvironment.MechanismBiometry.self).stateHash; return b.encode(value) }
|
|
162
164
|
case "LAEnvironment.MechanismCompanion.stateHash":
|
|
163
|
-
guard #available(iOS 18.0, macOS 15.0, *) else {
|
|
165
|
+
guard #available(iOS 18.0, macOS 15.0, *) else { throw TokamakBinding.unavailable }
|
|
164
166
|
return b.run { let value = try b.target(LAEnvironment.MechanismCompanion.self).stateHash; return b.encode(optional: value) { b.encode($0) } }
|
|
165
167
|
case "LAEnvironment.MechanismCompanion.type":
|
|
166
|
-
guard #available(iOS 18.0, macOS 15.0, *) else {
|
|
168
|
+
guard #available(iOS 18.0, macOS 15.0, *) else { throw TokamakBinding.unavailable }
|
|
167
169
|
return b.run { let value = try b.target(LAEnvironment.MechanismCompanion.self).type; return TokamakBindings_local_authentication.encode(value, b) }
|
|
168
170
|
case "LAEnvironment.MechanismUserPassword.isSet":
|
|
169
|
-
guard #available(iOS 18.0, macOS 15.0, *) else {
|
|
171
|
+
guard #available(iOS 18.0, macOS 15.0, *) else { throw TokamakBinding.unavailable }
|
|
170
172
|
return b.run { let value = try b.target(LAEnvironment.MechanismUserPassword.self).isSet; return b.encode(value) }
|
|
171
173
|
case "LAEnvironment.State.allMechanisms":
|
|
172
|
-
guard #available(iOS 18.0, macOS 15.0, *) else {
|
|
174
|
+
guard #available(iOS 18.0, macOS 15.0, *) else { throw TokamakBinding.unavailable }
|
|
173
175
|
return b.run { let value = try b.target(LAEnvironment.State.self).allMechanisms; return b.encode(array: value) { b.encode(object: $0) } }
|
|
174
176
|
case "LAEnvironment.State.biometry":
|
|
175
|
-
guard #available(iOS 18.0, macOS 15.0, *) else {
|
|
177
|
+
guard #available(iOS 18.0, macOS 15.0, *) else { throw TokamakBinding.unavailable }
|
|
176
178
|
return b.run { let value = try b.target(LAEnvironment.State.self).biometry; return b.encode(optional: value) { b.encode(object: $0) } }
|
|
177
179
|
case "LAEnvironment.State.companions":
|
|
178
|
-
guard #available(iOS 18.0, macOS 15.0, *) else {
|
|
180
|
+
guard #available(iOS 18.0, macOS 15.0, *) else { throw TokamakBinding.unavailable }
|
|
179
181
|
return b.run { let value = try b.target(LAEnvironment.State.self).companions; return b.encode(array: value) { b.encode(object: $0) } }
|
|
180
182
|
case "LAEnvironment.State.userPassword":
|
|
181
|
-
guard #available(iOS 18.0, macOS 15.0, *) else {
|
|
183
|
+
guard #available(iOS 18.0, macOS 15.0, *) else { throw TokamakBinding.unavailable }
|
|
182
184
|
return b.run { let value = try b.target(LAEnvironment.State.self).userPassword; return b.encode(optional: value) { b.encode(object: $0) } }
|
|
183
185
|
case "LAPersistedRight.key":
|
|
184
|
-
guard #available(iOS 16.0, macOS 13.0, *) else {
|
|
186
|
+
guard #available(iOS 16.0, macOS 13.0, *) else { throw TokamakBinding.unavailable }
|
|
185
187
|
return b.run { let value = try b.target(LAPersistedRight.self).key; return b.encode(object: value) }
|
|
186
188
|
case "LAPersistedRight.secret":
|
|
187
|
-
guard #available(iOS 16.0, macOS 13.0, *) else {
|
|
189
|
+
guard #available(iOS 16.0, macOS 13.0, *) else { throw TokamakBinding.unavailable }
|
|
188
190
|
return b.run { let value = try b.target(LAPersistedRight.self).secret; return b.encode(object: value) }
|
|
189
191
|
case "LAPrivateKey.publicKey":
|
|
190
|
-
guard #available(iOS 16.0, macOS 13.0, *) else {
|
|
192
|
+
guard #available(iOS 16.0, macOS 13.0, *) else { throw TokamakBinding.unavailable }
|
|
191
193
|
return b.run { let value = try b.target(LAPrivateKey.self).publicKey; return b.encode(object: value) }
|
|
192
194
|
case "LAPublicKey.bytes":
|
|
193
|
-
guard #available(iOS 16.0, macOS 13.0, *) else {
|
|
195
|
+
guard #available(iOS 16.0, macOS 13.0, *) else { throw TokamakBinding.unavailable }
|
|
194
196
|
return b.task { let value = try await b.target(LAPublicKey.self).bytes; return b.encode(value) }
|
|
195
197
|
case "LARight.authorize(localizedReason:)":
|
|
196
|
-
guard #available(iOS 16.0, macOS 13.0, *) else {
|
|
198
|
+
guard #available(iOS 16.0, macOS 13.0, *) else { throw TokamakBinding.unavailable }
|
|
197
199
|
return b.task { try await b.target(LARight.self).authorize(localizedReason: b.decode(b[0], as: String.self)); return nil }
|
|
198
200
|
case "LARight.checkCanAuthorize()":
|
|
199
|
-
guard #available(iOS 16.0, macOS 13.0, *) else {
|
|
201
|
+
guard #available(iOS 16.0, macOS 13.0, *) else { throw TokamakBinding.unavailable }
|
|
200
202
|
return b.task { try await b.target(LARight.self).checkCanAuthorize(); return nil }
|
|
201
203
|
case "LARight.deauthorize()":
|
|
202
|
-
guard #available(iOS 16.0, macOS 13.0, *) else {
|
|
204
|
+
guard #available(iOS 16.0, macOS 13.0, *) else { throw TokamakBinding.unavailable }
|
|
203
205
|
return b.task { try await b.target(LARight.self).deauthorize(); return nil }
|
|
204
206
|
case "LARight.init()":
|
|
205
|
-
guard #available(iOS 16.0, macOS 13.0, *) else {
|
|
207
|
+
guard #available(iOS 16.0, macOS 13.0, *) else { throw TokamakBinding.unavailable }
|
|
206
208
|
return b.run { let value = LARight(); return b.encode(object: value) }
|
|
207
209
|
case "LARight.init(requirement:)":
|
|
208
|
-
guard #available(iOS 16.0, macOS 13.0, *) else {
|
|
210
|
+
guard #available(iOS 16.0, macOS 13.0, *) else { throw TokamakBinding.unavailable }
|
|
209
211
|
return b.run { let value = try LARight(requirement: b.object(b[0], as: LAAuthenticationRequirement.self)); return b.encode(object: value) }
|
|
210
212
|
case "LARight.state":
|
|
211
|
-
guard #available(iOS 16.0, macOS 13.0, *) else {
|
|
213
|
+
guard #available(iOS 16.0, macOS 13.0, *) else { throw TokamakBinding.unavailable }
|
|
212
214
|
return b.run { let value = try b.target(LARight.self).state; return TokamakBindings_local_authentication.encode(value, b) }
|
|
213
215
|
case "LARight.tag":
|
|
214
|
-
guard #available(iOS 16.0, macOS 13.0, *) else {
|
|
216
|
+
guard #available(iOS 16.0, macOS 13.0, *) else { throw TokamakBinding.unavailable }
|
|
215
217
|
return b.run { let value = try b.target(LARight.self).tag; return b.encode(value) }
|
|
216
218
|
case "LARight.tag=":
|
|
217
|
-
guard #available(iOS 16.0, macOS 13.0, *) else {
|
|
219
|
+
guard #available(iOS 16.0, macOS 13.0, *) else { throw TokamakBinding.unavailable }
|
|
218
220
|
return b.run { try b.target(LARight.self).tag = b.decode(b[0], as: Int.self); return nil }
|
|
219
221
|
case "LARightStore.removeAllRights()":
|
|
220
|
-
guard #available(iOS 16.0, macOS 13.0, *) else {
|
|
222
|
+
guard #available(iOS 16.0, macOS 13.0, *) else { throw TokamakBinding.unavailable }
|
|
221
223
|
return b.task { try await b.target(LARightStore.self).removeAllRights(); return nil }
|
|
222
224
|
case "LARightStore.removeRight(_:)":
|
|
223
|
-
guard #available(iOS 16.0, macOS 13.0, *) else {
|
|
225
|
+
guard #available(iOS 16.0, macOS 13.0, *) else { throw TokamakBinding.unavailable }
|
|
224
226
|
return b.task { try await b.target(LARightStore.self).removeRight(b.object(b[0], as: LAPersistedRight.self)); return nil }
|
|
225
227
|
case "LARightStore.removeRight(forIdentifier:)":
|
|
226
|
-
guard #available(iOS 16.0, macOS 13.0, *) else {
|
|
228
|
+
guard #available(iOS 16.0, macOS 13.0, *) else { throw TokamakBinding.unavailable }
|
|
227
229
|
return b.task { try await b.target(LARightStore.self).removeRight(forIdentifier: b.decode(b[0], as: String.self)); return nil }
|
|
228
230
|
case "LARightStore.right(forIdentifier:)":
|
|
229
|
-
guard #available(iOS 16.0, macOS 13.0, *) else {
|
|
231
|
+
guard #available(iOS 16.0, macOS 13.0, *) else { throw TokamakBinding.unavailable }
|
|
230
232
|
return b.task { let value = try await b.target(LARightStore.self).right(forIdentifier: b.decode(b[0], as: String.self)); return b.encode(object: value) }
|
|
231
233
|
case "LARightStore.saveRight(_:identifier:)":
|
|
232
|
-
guard #available(iOS 16.0, macOS 13.0, *) else {
|
|
234
|
+
guard #available(iOS 16.0, macOS 13.0, *) else { throw TokamakBinding.unavailable }
|
|
233
235
|
return b.task { let value = try await b.target(LARightStore.self).saveRight(b.object(b[0], as: LARight.self), identifier: b.decode(b[1], as: String.self)); return b.encode(object: value) }
|
|
234
236
|
case "LARightStore.saveRight(_:identifier:secret:)":
|
|
235
|
-
guard #available(iOS 16.0, macOS 13.0, *) else {
|
|
237
|
+
guard #available(iOS 16.0, macOS 13.0, *) else { throw TokamakBinding.unavailable }
|
|
236
238
|
return b.task { let value = try await b.target(LARightStore.self).saveRight(b.object(b[0], as: LARight.self), identifier: b.decode(b[1], as: String.self), secret: b.decode(b[2], as: Data.self)); return b.encode(object: value) }
|
|
237
239
|
case "LARightStore.shared":
|
|
238
|
-
guard #available(iOS 16.0, macOS 13.0, *) else {
|
|
240
|
+
guard #available(iOS 16.0, macOS 13.0, *) else { throw TokamakBinding.unavailable }
|
|
239
241
|
return b.run { let value = LARightStore.shared; return b.encode(object: value) }
|
|
240
242
|
case "LASecret.rawData":
|
|
241
|
-
guard #available(iOS 16.0, macOS 13.0, *) else {
|
|
243
|
+
guard #available(iOS 16.0, macOS 13.0, *) else { throw TokamakBinding.unavailable }
|
|
242
244
|
return b.task { let value = try await b.target(LASecret.self).rawData; return b.encode(value) }
|
|
243
245
|
case "LAErrorDomain":
|
|
244
|
-
guard #available(iOS 8.3, macOS 10.11, *) else {
|
|
246
|
+
guard #available(iOS 8.3, macOS 10.11, *) else { throw TokamakBinding.unavailable }
|
|
245
247
|
return b.run { let value = LAErrorDomain; return b.encode(value) }
|
|
246
248
|
case "LATouchIDAuthenticationMaximumAllowableReuseDuration":
|
|
247
|
-
guard #available(iOS 9.0, macOS 10.12, *) else {
|
|
249
|
+
guard #available(iOS 9.0, macOS 10.12, *) else { throw TokamakBinding.unavailable }
|
|
248
250
|
return b.run { let value = LATouchIDAuthenticationMaximumAllowableReuseDuration; return b.encode(value) }
|
|
249
251
|
case "kLAAccessControlOperationCreateItem":
|
|
250
252
|
return b.run { let value = kLAAccessControlOperationCreateItem; return b.encode(value) }
|
|
@@ -333,14 +335,14 @@ final class TokamakBindings_local_authentication: TokamakPlugin {
|
|
|
333
335
|
case "kLAPolicyDeviceOwnerAuthenticationWithWristDetection":
|
|
334
336
|
return b.run { let value = kLAPolicyDeviceOwnerAuthenticationWithWristDetection; return b.encode(value) }
|
|
335
337
|
default:
|
|
336
|
-
|
|
338
|
+
throw .notSupported("\(method) is not supported")
|
|
337
339
|
}
|
|
338
340
|
}
|
|
339
341
|
|
|
340
342
|
func subscribeBytes(method: String, payload: Data, reply: @escaping TokamakPluginBytesReply)
|
|
341
343
|
throws(TokamakPluginError) -> () -> Void
|
|
342
344
|
{
|
|
343
|
-
let b = TokamakBinding(payload, resources: host.resources, reply: reply)
|
|
345
|
+
let b = try TokamakBinding(payload, resources: host.resources, reply: reply)
|
|
344
346
|
switch method {
|
|
345
347
|
case "LAEnvironment.Observer":
|
|
346
348
|
guard #available(iOS 18.0, macOS 15.0, *) else { throw TokamakBinding.unavailable }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tokamakdev/plugin-local-authentication",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.117",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/mantty/tokamak.git",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"./android": "./android/bindings.ts"
|
|
14
14
|
},
|
|
15
15
|
"peerDependencies": {
|
|
16
|
-
"@tokamakdev/plugin": "0.1.0-beta.
|
|
16
|
+
"@tokamakdev/plugin": "0.1.0-beta.117"
|
|
17
17
|
},
|
|
18
18
|
"files": [
|
|
19
19
|
"android",
|