@tokamakdev/plugin-local-authentication 0.1.0-beta.107 → 0.1.0-beta.114
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/README.md +13 -1
- package/android/Bindings.kt +271 -0
- package/android/LocalAuthenticationPlugin.kt +5 -4
- package/android/bindings.ts +1144 -0
- package/apple/Bindings.swift +530 -0
- package/apple/LocalAuthenticationPlugin.swift +5 -3
- package/apple/bindings.ts +721 -0
- package/package.json +5 -3
- package/src/index.ts +4 -4
- package/tokamak-plugin.json +39 -4
|
@@ -0,0 +1,721 @@
|
|
|
1
|
+
// Generated by `tok bindings` from the iOS and macOS 26.2 SDKs: LocalAuthentication. Do not edit.
|
|
2
|
+
import { Bindings, NativeObject, type Classes, type TokamakContext } from "@tokamakdev/plugin/bindings";
|
|
3
|
+
|
|
4
|
+
const bindings = new Bindings("local-authentication/apple", () => classes);
|
|
5
|
+
|
|
6
|
+
/** iOS 9.0+, macOS 10.11+ */
|
|
7
|
+
export type LAAccessControlOperation = "createItem" | "createKey" | "useItem" | "useKeyDecrypt" | "useKeyKeyExchange" | "useKeySign";
|
|
8
|
+
|
|
9
|
+
/** iOS 16.0+, macOS 13.0+ */
|
|
10
|
+
export class LAAuthenticationRequirement extends NativeObject {
|
|
11
|
+
/** iOS 16.0+, macOS 13.0+ */
|
|
12
|
+
static biometry(ctx: TokamakContext): Promise<LAAuthenticationRequirement> {
|
|
13
|
+
return bindings.call(ctx, "LAAuthenticationRequirement.biometry", []);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/** iOS 16.0+, macOS 13.0+ */
|
|
17
|
+
static biometryCurrentSet(ctx: TokamakContext): Promise<LAAuthenticationRequirement> {
|
|
18
|
+
return bindings.call(ctx, "LAAuthenticationRequirement.biometryCurrentSet", []);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/** iOS 16.0+, macOS 13.0+ */
|
|
22
|
+
static default(ctx: TokamakContext): Promise<LAAuthenticationRequirement> {
|
|
23
|
+
return bindings.call(ctx, "LAAuthenticationRequirement.default", []);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/** iOS 16.0+, macOS 13.0+ */
|
|
27
|
+
static init(ctx: TokamakContext): Promise<LAAuthenticationRequirement> {
|
|
28
|
+
return bindings.call(ctx, "LAAuthenticationRequirement.init()", []);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/** iOS 16.0+, macOS 13.0+ */
|
|
33
|
+
export class LABiometryFallbackRequirement extends NativeObject {
|
|
34
|
+
/** iOS 16.0+, macOS 13.0+ */
|
|
35
|
+
static default(ctx: TokamakContext): Promise<LABiometryFallbackRequirement> {
|
|
36
|
+
return bindings.call(ctx, "LABiometryFallbackRequirement.default", []);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** iOS 16.0+, macOS 13.0+ */
|
|
40
|
+
static devicePasscode(ctx: TokamakContext): Promise<LABiometryFallbackRequirement> {
|
|
41
|
+
return bindings.call(ctx, "LABiometryFallbackRequirement.devicePasscode", []);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/** iOS 16.0+, macOS 13.0+ */
|
|
45
|
+
static init(ctx: TokamakContext): Promise<LABiometryFallbackRequirement> {
|
|
46
|
+
return bindings.call(ctx, "LABiometryFallbackRequirement.init()", []);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/** iOS 11.0+, macOS 10.13.2+ */
|
|
51
|
+
export type LABiometryType = "faceID" | "none" | "opticID" | "touchID";
|
|
52
|
+
|
|
53
|
+
/** iOS 18.0+, macOS 15.0+ */
|
|
54
|
+
export type LACompanionType = "mac" | "vision" | "watch";
|
|
55
|
+
|
|
56
|
+
/** iOS 8.0+, macOS 10.10+ */
|
|
57
|
+
export class LAContext extends NativeObject {
|
|
58
|
+
/** iOS 11.0+, macOS 10.13.2+ */
|
|
59
|
+
biometryType(): Promise<LABiometryType> {
|
|
60
|
+
return bindings.call(this, "LAContext.biometryType", []);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/** iOS 8.0+, macOS 10.10+ */
|
|
64
|
+
canEvaluatePolicyError(policy: LAPolicy): Promise<boolean> {
|
|
65
|
+
return bindings.call(this, "LAContext.canEvaluatePolicy(_:error:)", [policy]);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/** iOS 18.0+, macOS 15.0+ */
|
|
69
|
+
domainState(): Promise<LADomainState> {
|
|
70
|
+
return bindings.call(this, "LAContext.domainState", []);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/** iOS 8.0+, macOS 10.10+ */
|
|
74
|
+
evaluatePolicyLocalizedReason(policy: LAPolicy, localizedReason: string, options?: { signal?: AbortSignal }): Promise<boolean> {
|
|
75
|
+
return bindings.call(this, "LAContext.evaluatePolicy(_:localizedReason:)", [policy, localizedReason], options?.signal);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* iOS 9.0+, macOS 10.11+
|
|
80
|
+
* @deprecated
|
|
81
|
+
*/
|
|
82
|
+
evaluatedPolicyDomainState(): Promise<Uint8Array | null> {
|
|
83
|
+
return bindings.call(this, "LAContext.evaluatedPolicyDomainState", []);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/** iOS 11.0+, macOS 10.13+ */
|
|
87
|
+
interactionNotAllowed(): Promise<boolean> {
|
|
88
|
+
return bindings.call(this, "LAContext.interactionNotAllowed", []);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/** iOS 11.0+, macOS 10.13+ */
|
|
92
|
+
setInteractionNotAllowed(value: boolean): Promise<void> {
|
|
93
|
+
return bindings.call(this, "LAContext.interactionNotAllowed=", [value]);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/** iOS 9.0+, macOS 10.11+ */
|
|
97
|
+
invalidate(): Promise<void> {
|
|
98
|
+
return bindings.call(this, "LAContext.invalidate()", []);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/** iOS 9.0+, macOS 10.11+ */
|
|
102
|
+
isCredentialSet(type: LACredentialType): Promise<boolean> {
|
|
103
|
+
return bindings.call(this, "LAContext.isCredentialSet(_:)", [type]);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/** iOS 10.0+, macOS 10.12+ */
|
|
107
|
+
localizedCancelTitle(): Promise<string | null> {
|
|
108
|
+
return bindings.call(this, "LAContext.localizedCancelTitle", []);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/** iOS 10.0+, macOS 10.12+ */
|
|
112
|
+
setLocalizedCancelTitle(value: string | null): Promise<void> {
|
|
113
|
+
return bindings.call(this, "LAContext.localizedCancelTitle=", [value]);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/** iOS 8.0+, macOS 10.10+ */
|
|
117
|
+
localizedFallbackTitle(): Promise<string | null> {
|
|
118
|
+
return bindings.call(this, "LAContext.localizedFallbackTitle", []);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/** iOS 8.0+, macOS 10.10+ */
|
|
122
|
+
setLocalizedFallbackTitle(value: string | null): Promise<void> {
|
|
123
|
+
return bindings.call(this, "LAContext.localizedFallbackTitle=", [value]);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/** iOS 11.0+, macOS 10.13+ */
|
|
127
|
+
localizedReason(): Promise<string> {
|
|
128
|
+
return bindings.call(this, "LAContext.localizedReason", []);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/** iOS 11.0+, macOS 10.13+ */
|
|
132
|
+
setLocalizedReason(value: string): Promise<void> {
|
|
133
|
+
return bindings.call(this, "LAContext.localizedReason=", [value]);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* iOS 8.3+, macOS 10.10.3+
|
|
138
|
+
* @deprecated No longer supported
|
|
139
|
+
*/
|
|
140
|
+
maxBiometryFailures(): Promise<number | null> {
|
|
141
|
+
return bindings.call(this, "LAContext.maxBiometryFailures", []);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* iOS 8.3+, macOS 10.10.3+
|
|
146
|
+
* @deprecated No longer supported
|
|
147
|
+
*/
|
|
148
|
+
setMaxBiometryFailures(value: number | null): Promise<void> {
|
|
149
|
+
return bindings.call(this, "LAContext.maxBiometryFailures=", [value]);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/** iOS 9.0+, macOS 10.11+ */
|
|
153
|
+
setCredentialType(credential: Uint8Array | null, type: LACredentialType): Promise<boolean> {
|
|
154
|
+
return bindings.call(this, "LAContext.setCredential(_:type:)", [credential, type]);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/** iOS 9.0+, macOS 10.12+ */
|
|
158
|
+
touchIDAuthenticationAllowableReuseDuration(): Promise<number> {
|
|
159
|
+
return bindings.call(this, "LAContext.touchIDAuthenticationAllowableReuseDuration", []);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/** iOS 9.0+, macOS 10.12+ */
|
|
163
|
+
setTouchIDAuthenticationAllowableReuseDuration(value: number): Promise<void> {
|
|
164
|
+
return bindings.call(this, "LAContext.touchIDAuthenticationAllowableReuseDuration=", [value]);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/** iOS 8.0+, macOS 10.10+ */
|
|
168
|
+
static init(ctx: TokamakContext): Promise<LAContext> {
|
|
169
|
+
return bindings.call(ctx, "LAContext.init()", []);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/** iOS 9.0+, macOS 10.11+ */
|
|
174
|
+
export type LACredentialType = "applicationPassword" | "smartCardPIN";
|
|
175
|
+
|
|
176
|
+
/** iOS 18.0+, macOS 15.0+ */
|
|
177
|
+
export class LADomainState extends NativeObject {
|
|
178
|
+
/** iOS 18.0+, macOS 15.0+ */
|
|
179
|
+
biometry(): Promise<LADomainStateBiometry> {
|
|
180
|
+
return bindings.call(this, "LADomainState.biometry", []);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/** iOS 18.0+, macOS 15.0+ */
|
|
184
|
+
companion(): Promise<LADomainStateCompanion> {
|
|
185
|
+
return bindings.call(this, "LADomainState.companion", []);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/** iOS 18.0+, macOS 15.0+ */
|
|
189
|
+
stateHash(): Promise<Uint8Array | null> {
|
|
190
|
+
return bindings.call(this, "LADomainState.stateHash", []);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/** iOS 18.0+, macOS 15.0+ */
|
|
195
|
+
export class LADomainStateBiometry extends NativeObject {
|
|
196
|
+
/** iOS 18.0+, macOS 15.0+ */
|
|
197
|
+
biometryType(): Promise<LABiometryType> {
|
|
198
|
+
return bindings.call(this, "LADomainStateBiometry.biometryType", []);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/** iOS 18.0+, macOS 15.0+ */
|
|
202
|
+
stateHash(): Promise<Uint8Array | null> {
|
|
203
|
+
return bindings.call(this, "LADomainStateBiometry.stateHash", []);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/** iOS 18.0+, macOS 15.0+ */
|
|
208
|
+
export class LADomainStateCompanion extends NativeObject {
|
|
209
|
+
/** iOS 18.0+, macOS 15.0+ */
|
|
210
|
+
availableCompanionTypes(): Promise<LACompanionType[]> {
|
|
211
|
+
return bindings.call(this, "LADomainStateCompanion.availableCompanionTypes", []);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/** iOS 18.0+, macOS 15.0+ */
|
|
215
|
+
stateHash(): Promise<Uint8Array | null> {
|
|
216
|
+
return bindings.call(this, "LADomainStateCompanion.stateHash", []);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/** iOS 18.0+, macOS 15.0+ */
|
|
220
|
+
stateHashForCompanionType(companionType: LACompanionType): Promise<Uint8Array | null> {
|
|
221
|
+
return bindings.call(this, "LADomainStateCompanion.stateHash(for:)", [companionType]);
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/** iOS 18.0+, macOS 15.0+ */
|
|
226
|
+
export class LAEnvironment extends NativeObject {
|
|
227
|
+
/** iOS 18.0+, macOS 15.0+ */
|
|
228
|
+
addObserver(observer: LAEnvironment$Observer): Promise<void> {
|
|
229
|
+
return bindings.call(this, "LAEnvironment.addObserver(_:)", [observer]);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/** iOS 18.0+, macOS 15.0+ */
|
|
233
|
+
static currentUser(ctx: TokamakContext): Promise<LAEnvironment> {
|
|
234
|
+
return bindings.call(ctx, "LAEnvironment.currentUser", []);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/** iOS 18.0+, macOS 15.0+ */
|
|
238
|
+
removeObserver(observer: LAEnvironment$Observer): Promise<void> {
|
|
239
|
+
return bindings.call(this, "LAEnvironment.removeObserver(_:)", [observer]);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/** iOS 18.0+, macOS 15.0+ */
|
|
243
|
+
state(): Promise<LAEnvironment$State> {
|
|
244
|
+
return bindings.call(this, "LAEnvironment.state", []);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
/** iOS 18.0+, macOS 15.0+ */
|
|
249
|
+
export class LAEnvironment$Mechanism extends NativeObject {
|
|
250
|
+
/** iOS 18.0+, macOS 15.0+ */
|
|
251
|
+
iconSystemName(): Promise<string> {
|
|
252
|
+
return bindings.call(this, "LAEnvironment.Mechanism.iconSystemName", []);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/** iOS 18.0+, macOS 15.0+ */
|
|
256
|
+
isUsable(): Promise<boolean> {
|
|
257
|
+
return bindings.call(this, "LAEnvironment.Mechanism.isUsable", []);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
/** iOS 18.0+, macOS 15.0+ */
|
|
261
|
+
localizedName(): Promise<string> {
|
|
262
|
+
return bindings.call(this, "LAEnvironment.Mechanism.localizedName", []);
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/** iOS 18.0+, macOS 15.0+ */
|
|
267
|
+
export class LAEnvironment$MechanismBiometry extends LAEnvironment$Mechanism {
|
|
268
|
+
/** iOS 18.0+, macOS 15.0+ */
|
|
269
|
+
biometryType(): Promise<LABiometryType> {
|
|
270
|
+
return bindings.call(this, "LAEnvironment.MechanismBiometry.biometryType", []);
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
/** iOS 18.0+, macOS 15.0+ */
|
|
274
|
+
builtInSensorInaccessible(): Promise<boolean> {
|
|
275
|
+
return bindings.call(this, "LAEnvironment.MechanismBiometry.builtInSensorInaccessible", []);
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
/** iOS 18.0+, macOS 15.0+ */
|
|
279
|
+
isEnrolled(): Promise<boolean> {
|
|
280
|
+
return bindings.call(this, "LAEnvironment.MechanismBiometry.isEnrolled", []);
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
/** iOS 18.0+, macOS 15.0+ */
|
|
284
|
+
isLockedOut(): Promise<boolean> {
|
|
285
|
+
return bindings.call(this, "LAEnvironment.MechanismBiometry.isLockedOut", []);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
/** iOS 18.0+, macOS 15.0+ */
|
|
289
|
+
stateHash(): Promise<Uint8Array> {
|
|
290
|
+
return bindings.call(this, "LAEnvironment.MechanismBiometry.stateHash", []);
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
/** iOS 18.0+, macOS 15.0+ */
|
|
295
|
+
export class LAEnvironment$MechanismCompanion extends LAEnvironment$Mechanism {
|
|
296
|
+
/** iOS 18.0+, macOS 15.0+ */
|
|
297
|
+
stateHash(): Promise<Uint8Array | null> {
|
|
298
|
+
return bindings.call(this, "LAEnvironment.MechanismCompanion.stateHash", []);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
/** iOS 18.0+, macOS 15.0+ */
|
|
302
|
+
type(): Promise<LACompanionType> {
|
|
303
|
+
return bindings.call(this, "LAEnvironment.MechanismCompanion.type", []);
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
/** iOS 18.0+, macOS 15.0+ */
|
|
308
|
+
export class LAEnvironment$MechanismUserPassword extends LAEnvironment$Mechanism {
|
|
309
|
+
/** iOS 18.0+, macOS 15.0+ */
|
|
310
|
+
isSet(): Promise<boolean> {
|
|
311
|
+
return bindings.call(this, "LAEnvironment.MechanismUserPassword.isSet", []);
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
/** iOS 18.0+, macOS 15.0+ */
|
|
316
|
+
export interface LAEnvironment$ObserverMethods {
|
|
317
|
+
/** iOS 18.0+, macOS 15.0+ */
|
|
318
|
+
environmentStateDidChangeFromOldState?(environment: LAEnvironment, oldState: LAEnvironment$State): void | Promise<void>;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
/** iOS 18.0+, macOS 15.0+ */
|
|
322
|
+
export class LAEnvironment$Observer extends NativeObject {
|
|
323
|
+
/** A native object whose methods call `handlers`. */
|
|
324
|
+
static implement(ctx: TokamakContext, handlers: LAEnvironment$ObserverMethods): Promise<LAEnvironment$Observer> {
|
|
325
|
+
return bindings.implement(ctx, LAEnvironment$Observer, "LAEnvironment.Observer", ["environmentStateDidChangeFromOldState"], handlers);
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
/** iOS 18.0+, macOS 15.0+ */
|
|
330
|
+
export class LAEnvironment$State extends NativeObject {
|
|
331
|
+
/** iOS 18.0+, macOS 15.0+ */
|
|
332
|
+
allMechanisms(): Promise<LAEnvironment$Mechanism[]> {
|
|
333
|
+
return bindings.call(this, "LAEnvironment.State.allMechanisms", []);
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
/** iOS 18.0+, macOS 15.0+ */
|
|
337
|
+
biometry(): Promise<LAEnvironment$MechanismBiometry | null> {
|
|
338
|
+
return bindings.call(this, "LAEnvironment.State.biometry", []);
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
/** iOS 18.0+, macOS 15.0+ */
|
|
342
|
+
companions(): Promise<LAEnvironment$MechanismCompanion[]> {
|
|
343
|
+
return bindings.call(this, "LAEnvironment.State.companions", []);
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
/** iOS 18.0+, macOS 15.0+ */
|
|
347
|
+
userPassword(): Promise<LAEnvironment$MechanismUserPassword | null> {
|
|
348
|
+
return bindings.call(this, "LAEnvironment.State.userPassword", []);
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
/** iOS 8.0+, macOS 10.10+ */
|
|
353
|
+
export type LAPolicy = "deviceOwnerAuthentication" | "deviceOwnerAuthenticationWithBiometrics" | "deviceOwnerAuthenticationWithBiometricsOrCompanion" | "deviceOwnerAuthenticationWithCompanion";
|
|
354
|
+
|
|
355
|
+
/** iOS 16.0+, macOS 13.0+ */
|
|
356
|
+
export class LAPrivateKey extends NativeObject {
|
|
357
|
+
/** iOS 16.0+, macOS 13.0+ */
|
|
358
|
+
publicKey(): Promise<LAPublicKey> {
|
|
359
|
+
return bindings.call(this, "LAPrivateKey.publicKey", []);
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
/** iOS 16.0+, macOS 13.0+ */
|
|
364
|
+
export class LAPublicKey extends NativeObject {
|
|
365
|
+
/** iOS 16.0+, macOS 13.0+ */
|
|
366
|
+
bytes(options?: { signal?: AbortSignal }): Promise<Uint8Array> {
|
|
367
|
+
return bindings.call(this, "LAPublicKey.bytes", [], options?.signal);
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
/** iOS 16.0+, macOS 13.0+ */
|
|
372
|
+
export class LARight extends NativeObject {
|
|
373
|
+
/** iOS 16.0+, macOS 13.0+ */
|
|
374
|
+
authorizeLocalizedReason(localizedReason: string, options?: { signal?: AbortSignal }): Promise<void> {
|
|
375
|
+
return bindings.call(this, "LARight.authorize(localizedReason:)", [localizedReason], options?.signal);
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
/** iOS 16.0+, macOS 13.0+ */
|
|
379
|
+
checkCanAuthorize(options?: { signal?: AbortSignal }): Promise<void> {
|
|
380
|
+
return bindings.call(this, "LARight.checkCanAuthorize()", [], options?.signal);
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
/** iOS 16.0+, macOS 13.0+ */
|
|
384
|
+
deauthorize(options?: { signal?: AbortSignal }): Promise<void> {
|
|
385
|
+
return bindings.call(this, "LARight.deauthorize()", [], options?.signal);
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
/** iOS 16.0+, macOS 13.0+ */
|
|
389
|
+
static init(ctx: TokamakContext): Promise<LARight> {
|
|
390
|
+
return bindings.call(ctx, "LARight.init()", []);
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
/** iOS 16.0+, macOS 13.0+ */
|
|
394
|
+
static initWithRequirement(ctx: TokamakContext, requirement: LAAuthenticationRequirement): Promise<LARight> {
|
|
395
|
+
return bindings.call(ctx, "LARight.init(requirement:)", [requirement]);
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
/** iOS 16.0+, macOS 13.0+ */
|
|
399
|
+
state(): Promise<LARight$State> {
|
|
400
|
+
return bindings.call(this, "LARight.state", []);
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
/** iOS 16.0+, macOS 13.0+ */
|
|
404
|
+
tag(): Promise<number> {
|
|
405
|
+
return bindings.call(this, "LARight.tag", []);
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
/** iOS 16.0+, macOS 13.0+ */
|
|
409
|
+
setTag(value: number): Promise<void> {
|
|
410
|
+
return bindings.call(this, "LARight.tag=", [value]);
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
/** iOS 16.0+, macOS 13.0+ */
|
|
415
|
+
export type LARight$State = "authorized" | "authorizing" | "notAuthorized" | "unknown";
|
|
416
|
+
|
|
417
|
+
/** iOS 16.0+, macOS 13.0+ */
|
|
418
|
+
export class LARightStore extends NativeObject {
|
|
419
|
+
/** iOS 16.0+, macOS 13.0+ */
|
|
420
|
+
removeAllRights(options?: { signal?: AbortSignal }): Promise<void> {
|
|
421
|
+
return bindings.call(this, "LARightStore.removeAllRights()", [], options?.signal);
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
/** iOS 16.0+, macOS 13.0+ */
|
|
425
|
+
removeRight(right: LAPersistedRight, options?: { signal?: AbortSignal }): Promise<void> {
|
|
426
|
+
return bindings.call(this, "LARightStore.removeRight(_:)", [right], options?.signal);
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
/** iOS 16.0+, macOS 13.0+ */
|
|
430
|
+
removeRightForIdentifier(identifier: string, options?: { signal?: AbortSignal }): Promise<void> {
|
|
431
|
+
return bindings.call(this, "LARightStore.removeRight(forIdentifier:)", [identifier], options?.signal);
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
/** iOS 16.0+, macOS 13.0+ */
|
|
435
|
+
rightForIdentifier(identifier: string, options?: { signal?: AbortSignal }): Promise<LAPersistedRight> {
|
|
436
|
+
return bindings.call(this, "LARightStore.right(forIdentifier:)", [identifier], options?.signal);
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
/** iOS 16.0+, macOS 13.0+ */
|
|
440
|
+
saveRightIdentifier(right: LARight, identifier: string, options?: { signal?: AbortSignal }): Promise<LAPersistedRight> {
|
|
441
|
+
return bindings.call(this, "LARightStore.saveRight(_:identifier:)", [right, identifier], options?.signal);
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
/** iOS 16.0+, macOS 13.0+ */
|
|
445
|
+
saveRightIdentifierSecret(right: LARight, identifier: string, secret: Uint8Array, options?: { signal?: AbortSignal }): Promise<LAPersistedRight> {
|
|
446
|
+
return bindings.call(this, "LARightStore.saveRight(_:identifier:secret:)", [right, identifier, secret], options?.signal);
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
/** iOS 16.0+, macOS 13.0+ */
|
|
450
|
+
static shared(ctx: TokamakContext): Promise<LARightStore> {
|
|
451
|
+
return bindings.call(ctx, "LARightStore.shared", []);
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
/** iOS 16.0+, macOS 13.0+ */
|
|
456
|
+
export class LASecret extends NativeObject {
|
|
457
|
+
/** iOS 16.0+, macOS 13.0+ */
|
|
458
|
+
rawData(options?: { signal?: AbortSignal }): Promise<Uint8Array> {
|
|
459
|
+
return bindings.call(this, "LASecret.rawData", [], options?.signal);
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
/** iOS 16.0+, macOS 13.0+ */
|
|
464
|
+
export class LAPersistedRight extends LARight {
|
|
465
|
+
/** iOS 16.0+, macOS 13.0+ */
|
|
466
|
+
key(): Promise<LAPrivateKey> {
|
|
467
|
+
return bindings.call(this, "LAPersistedRight.key", []);
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
/** iOS 16.0+, macOS 13.0+ */
|
|
471
|
+
secret(): Promise<LASecret> {
|
|
472
|
+
return bindings.call(this, "LAPersistedRight.secret", []);
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
/** iOS 8.3+, macOS 10.11+ */
|
|
477
|
+
export function LAErrorDomain(ctx: TokamakContext): Promise<string> {
|
|
478
|
+
return bindings.call(ctx, "LAErrorDomain", []);
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
/** iOS 9.0+, macOS 10.12+ */
|
|
482
|
+
export function LATouchIDAuthenticationMaximumAllowableReuseDuration(ctx: TokamakContext): Promise<number> {
|
|
483
|
+
return bindings.call(ctx, "LATouchIDAuthenticationMaximumAllowableReuseDuration", []);
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
/** iOS, macOS */
|
|
487
|
+
export function kLAAccessControlOperationCreateItem(ctx: TokamakContext): Promise<number> {
|
|
488
|
+
return bindings.call(ctx, "kLAAccessControlOperationCreateItem", []);
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
/** iOS, macOS */
|
|
492
|
+
export function kLAAccessControlOperationCreateKey(ctx: TokamakContext): Promise<number> {
|
|
493
|
+
return bindings.call(ctx, "kLAAccessControlOperationCreateKey", []);
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
/** iOS, macOS */
|
|
497
|
+
export function kLAAccessControlOperationUseItem(ctx: TokamakContext): Promise<number> {
|
|
498
|
+
return bindings.call(ctx, "kLAAccessControlOperationUseItem", []);
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
/** iOS, macOS */
|
|
502
|
+
export function kLAAccessControlOperationUseKeyDecrypt(ctx: TokamakContext): Promise<number> {
|
|
503
|
+
return bindings.call(ctx, "kLAAccessControlOperationUseKeyDecrypt", []);
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
/** iOS, macOS */
|
|
507
|
+
export function kLAAccessControlOperationUseKeyKeyExchange(ctx: TokamakContext): Promise<number> {
|
|
508
|
+
return bindings.call(ctx, "kLAAccessControlOperationUseKeyKeyExchange", []);
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
/** iOS, macOS */
|
|
512
|
+
export function kLAAccessControlOperationUseKeySign(ctx: TokamakContext): Promise<number> {
|
|
513
|
+
return bindings.call(ctx, "kLAAccessControlOperationUseKeySign", []);
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
/** iOS, macOS */
|
|
517
|
+
export function kLABiometryTypeFaceID(ctx: TokamakContext): Promise<number> {
|
|
518
|
+
return bindings.call(ctx, "kLABiometryTypeFaceID", []);
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
/** iOS, macOS */
|
|
522
|
+
export function kLABiometryTypeNone(ctx: TokamakContext): Promise<number> {
|
|
523
|
+
return bindings.call(ctx, "kLABiometryTypeNone", []);
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
/** iOS, macOS */
|
|
527
|
+
export function kLABiometryTypeOpticID(ctx: TokamakContext): Promise<number> {
|
|
528
|
+
return bindings.call(ctx, "kLABiometryTypeOpticID", []);
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
/** iOS, macOS */
|
|
532
|
+
export function kLABiometryTypeTouchID(ctx: TokamakContext): Promise<number> {
|
|
533
|
+
return bindings.call(ctx, "kLABiometryTypeTouchID", []);
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
/** iOS, macOS */
|
|
537
|
+
export function kLACompanionTypeMac(ctx: TokamakContext): Promise<number> {
|
|
538
|
+
return bindings.call(ctx, "kLACompanionTypeMac", []);
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
/** iOS, macOS */
|
|
542
|
+
export function kLACompanionTypeNone(ctx: TokamakContext): Promise<number> {
|
|
543
|
+
return bindings.call(ctx, "kLACompanionTypeNone", []);
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
/** iOS, macOS */
|
|
547
|
+
export function kLACompanionTypeVision(ctx: TokamakContext): Promise<number> {
|
|
548
|
+
return bindings.call(ctx, "kLACompanionTypeVision", []);
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
/** iOS, macOS */
|
|
552
|
+
export function kLACompanionTypeWatch(ctx: TokamakContext): Promise<number> {
|
|
553
|
+
return bindings.call(ctx, "kLACompanionTypeWatch", []);
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
/** iOS, macOS */
|
|
557
|
+
export function kLACredentialSmartCardPIN(ctx: TokamakContext): Promise<number> {
|
|
558
|
+
return bindings.call(ctx, "kLACredentialSmartCardPIN", []);
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
/** iOS, macOS */
|
|
562
|
+
export function kLACredentialTypeApplicationPassword(ctx: TokamakContext): Promise<number> {
|
|
563
|
+
return bindings.call(ctx, "kLACredentialTypeApplicationPassword", []);
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
/** iOS, macOS */
|
|
567
|
+
export function kLAErrorAppCancel(ctx: TokamakContext): Promise<number> {
|
|
568
|
+
return bindings.call(ctx, "kLAErrorAppCancel", []);
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
/** iOS, macOS */
|
|
572
|
+
export function kLAErrorAuthenticationFailed(ctx: TokamakContext): Promise<number> {
|
|
573
|
+
return bindings.call(ctx, "kLAErrorAuthenticationFailed", []);
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
/** iOS, macOS */
|
|
577
|
+
export function kLAErrorBiometryDisconnected(ctx: TokamakContext): Promise<number> {
|
|
578
|
+
return bindings.call(ctx, "kLAErrorBiometryDisconnected", []);
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
/** iOS, macOS */
|
|
582
|
+
export function kLAErrorBiometryLockout(ctx: TokamakContext): Promise<number> {
|
|
583
|
+
return bindings.call(ctx, "kLAErrorBiometryLockout", []);
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
/** iOS, macOS */
|
|
587
|
+
export function kLAErrorBiometryNotAvailable(ctx: TokamakContext): Promise<number> {
|
|
588
|
+
return bindings.call(ctx, "kLAErrorBiometryNotAvailable", []);
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
/** iOS, macOS */
|
|
592
|
+
export function kLAErrorBiometryNotEnrolled(ctx: TokamakContext): Promise<number> {
|
|
593
|
+
return bindings.call(ctx, "kLAErrorBiometryNotEnrolled", []);
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
/** iOS, macOS */
|
|
597
|
+
export function kLAErrorBiometryNotPaired(ctx: TokamakContext): Promise<number> {
|
|
598
|
+
return bindings.call(ctx, "kLAErrorBiometryNotPaired", []);
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
/** iOS, macOS */
|
|
602
|
+
export function kLAErrorCompanionNotAvailable(ctx: TokamakContext): Promise<number> {
|
|
603
|
+
return bindings.call(ctx, "kLAErrorCompanionNotAvailable", []);
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
/** iOS, macOS */
|
|
607
|
+
export function kLAErrorDomain(ctx: TokamakContext): Promise<string> {
|
|
608
|
+
return bindings.call(ctx, "kLAErrorDomain", []);
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
/** iOS, macOS */
|
|
612
|
+
export function kLAErrorInvalidContext(ctx: TokamakContext): Promise<number> {
|
|
613
|
+
return bindings.call(ctx, "kLAErrorInvalidContext", []);
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
/** iOS, macOS */
|
|
617
|
+
export function kLAErrorInvalidDimensions(ctx: TokamakContext): Promise<number> {
|
|
618
|
+
return bindings.call(ctx, "kLAErrorInvalidDimensions", []);
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
/** iOS, macOS */
|
|
622
|
+
export function kLAErrorNotInteractive(ctx: TokamakContext): Promise<number> {
|
|
623
|
+
return bindings.call(ctx, "kLAErrorNotInteractive", []);
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
/** iOS, macOS */
|
|
627
|
+
export function kLAErrorPasscodeNotSet(ctx: TokamakContext): Promise<number> {
|
|
628
|
+
return bindings.call(ctx, "kLAErrorPasscodeNotSet", []);
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
/** iOS, macOS */
|
|
632
|
+
export function kLAErrorSystemCancel(ctx: TokamakContext): Promise<number> {
|
|
633
|
+
return bindings.call(ctx, "kLAErrorSystemCancel", []);
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
/** iOS, macOS */
|
|
637
|
+
export function kLAErrorTouchIDLockout(ctx: TokamakContext): Promise<number> {
|
|
638
|
+
return bindings.call(ctx, "kLAErrorTouchIDLockout", []);
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
/** iOS, macOS */
|
|
642
|
+
export function kLAErrorTouchIDNotAvailable(ctx: TokamakContext): Promise<number> {
|
|
643
|
+
return bindings.call(ctx, "kLAErrorTouchIDNotAvailable", []);
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
/** iOS, macOS */
|
|
647
|
+
export function kLAErrorTouchIDNotEnrolled(ctx: TokamakContext): Promise<number> {
|
|
648
|
+
return bindings.call(ctx, "kLAErrorTouchIDNotEnrolled", []);
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
/** iOS, macOS */
|
|
652
|
+
export function kLAErrorUserCancel(ctx: TokamakContext): Promise<number> {
|
|
653
|
+
return bindings.call(ctx, "kLAErrorUserCancel", []);
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
/** iOS, macOS */
|
|
657
|
+
export function kLAErrorUserFallback(ctx: TokamakContext): Promise<number> {
|
|
658
|
+
return bindings.call(ctx, "kLAErrorUserFallback", []);
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
/** iOS, macOS */
|
|
662
|
+
export function kLAErrorWatchNotAvailable(ctx: TokamakContext): Promise<number> {
|
|
663
|
+
return bindings.call(ctx, "kLAErrorWatchNotAvailable", []);
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
/** iOS, macOS */
|
|
667
|
+
export function kLAPolicyDeviceOwnerAuthentication(ctx: TokamakContext): Promise<number> {
|
|
668
|
+
return bindings.call(ctx, "kLAPolicyDeviceOwnerAuthentication", []);
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
/** iOS, macOS */
|
|
672
|
+
export function kLAPolicyDeviceOwnerAuthenticationWithBiometrics(ctx: TokamakContext): Promise<number> {
|
|
673
|
+
return bindings.call(ctx, "kLAPolicyDeviceOwnerAuthenticationWithBiometrics", []);
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
/** iOS, macOS */
|
|
677
|
+
export function kLAPolicyDeviceOwnerAuthenticationWithBiometricsOrCompanion(ctx: TokamakContext): Promise<number> {
|
|
678
|
+
return bindings.call(ctx, "kLAPolicyDeviceOwnerAuthenticationWithBiometricsOrCompanion", []);
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
/** iOS, macOS */
|
|
682
|
+
export function kLAPolicyDeviceOwnerAuthenticationWithBiometricsOrWatch(ctx: TokamakContext): Promise<number> {
|
|
683
|
+
return bindings.call(ctx, "kLAPolicyDeviceOwnerAuthenticationWithBiometricsOrWatch", []);
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
/** iOS, macOS */
|
|
687
|
+
export function kLAPolicyDeviceOwnerAuthenticationWithCompanion(ctx: TokamakContext): Promise<number> {
|
|
688
|
+
return bindings.call(ctx, "kLAPolicyDeviceOwnerAuthenticationWithCompanion", []);
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
/** iOS, macOS */
|
|
692
|
+
export function kLAPolicyDeviceOwnerAuthenticationWithWatch(ctx: TokamakContext): Promise<number> {
|
|
693
|
+
return bindings.call(ctx, "kLAPolicyDeviceOwnerAuthenticationWithWatch", []);
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
/** iOS, macOS */
|
|
697
|
+
export function kLAPolicyDeviceOwnerAuthenticationWithWristDetection(ctx: TokamakContext): Promise<number> {
|
|
698
|
+
return bindings.call(ctx, "kLAPolicyDeviceOwnerAuthenticationWithWristDetection", []);
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
const classes: Classes = {
|
|
702
|
+
"LAAuthenticationRequirement": LAAuthenticationRequirement,
|
|
703
|
+
"LABiometryFallbackRequirement": LABiometryFallbackRequirement,
|
|
704
|
+
"LAContext": LAContext,
|
|
705
|
+
"LADomainState": LADomainState,
|
|
706
|
+
"LADomainStateBiometry": LADomainStateBiometry,
|
|
707
|
+
"LADomainStateCompanion": LADomainStateCompanion,
|
|
708
|
+
"LAEnvironment": LAEnvironment,
|
|
709
|
+
"LAEnvironmentMechanism": LAEnvironment$Mechanism,
|
|
710
|
+
"LAEnvironmentMechanismBiometry": LAEnvironment$MechanismBiometry,
|
|
711
|
+
"LAEnvironmentMechanismCompanion": LAEnvironment$MechanismCompanion,
|
|
712
|
+
"LAEnvironmentMechanismUserPassword": LAEnvironment$MechanismUserPassword,
|
|
713
|
+
"LAEnvironmentObserver": LAEnvironment$Observer,
|
|
714
|
+
"LAEnvironmentState": LAEnvironment$State,
|
|
715
|
+
"LAPersistedRight": LAPersistedRight,
|
|
716
|
+
"LAPrivateKey": LAPrivateKey,
|
|
717
|
+
"LAPublicKey": LAPublicKey,
|
|
718
|
+
"LARight": LARight,
|
|
719
|
+
"LARightStore": LARightStore,
|
|
720
|
+
"LASecret": LASecret,
|
|
721
|
+
};
|