@loginid/websdk3 1.0.1 → 1.1.0

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/dist/index.d.cts CHANGED
@@ -49,7 +49,7 @@ declare abstract class BaseHttpRequest {
49
49
  abstract request<T>(options: ApiRequestOptions): CancelablePromise<T>;
50
50
  }
51
51
 
52
- type authenticatorAssertionResponseRequestBody = {
52
+ type AuthenticatorAssertionResponse = {
53
53
  /**
54
54
  * This attribute contains the authenticator data returned by the authenticator.
55
55
  */
@@ -76,29 +76,78 @@ type authenticatorAssertionResponseRequestBody = {
76
76
  userHandle?: string;
77
77
  };
78
78
 
79
- type AuthAuthCompleteRequestBody = {
80
- assertionResult: authenticatorAssertionResponseRequestBody;
79
+ type AuthCompleteRequestBody = {
80
+ assertionResult: AuthenticatorAssertionResponse;
81
81
  /**
82
82
  * An opaque object containing session data.
83
83
  */
84
84
  session: string;
85
85
  };
86
86
 
87
- /**
88
- * AuthCompleteResponseBody result type (default view)
89
- */
90
- type AuthAuthCompleteResponseBody = {
87
+ type PubKeyCredentialDescriptor = {
91
88
  /**
92
- * JWT access token
89
+ * Base64 encoded byte array of the public key identifier.
93
90
  */
94
- jwtAccess: string;
91
+ id: string;
92
+ transports?: Array<'usb' | 'nfc' | 'ble' | 'internal' | 'hybrid'>;
93
+ type: 'public-key';
94
+ };
95
+
96
+ type PublicKeyCredentialRequestOptions = {
97
+ /**
98
+ * A list of PublicKeyCredentialDescriptor objects representing public key
99
+ * credentials acceptable to the caller, in descending order of the caller’s
100
+ * preference (the first item in the list is the most preferred credential,
101
+ * and so on down the list).
102
+ */
103
+ allowCredentials?: Array<PubKeyCredentialDescriptor>;
104
+ /**
105
+ * This base64 encoded byte array represents a challenge that the selected
106
+ * authenticator signs, along with other data, when producing an authentication
107
+ * assertion.
108
+ */
109
+ challenge: string;
110
+ /**
111
+ * Additional parameters requesting additional processing by the client and
112
+ * authenticator. For example, if transaction confirmation is sought from the
113
+ * user, then the prompt string might be included as an extension.
114
+ */
115
+ extensions?: Record<string, string>;
116
+ /**
117
+ * The relying party identifier claimed by the caller. If omitted, its value will
118
+ * be the CredentialsContainer object’s relevant settings object's origin's
119
+ * effective domain.
120
+ */
121
+ rpId?: string;
122
+ /**
123
+ * Specifies a time, in milliseconds, that the caller is willing
124
+ * to wait for the call to complete. The value is treated as a
125
+ * hint, and MAY be overridden by the client.
126
+ */
127
+ timeout?: number;
128
+ /**
129
+ * The Relying Party's requirements regarding user verification for the get()
130
+ * operation. The value SHOULD be a member of UserVerificationRequirement but
131
+ * client platforms MUST ignore unknown values, treating an unknown value as if
132
+ * the member does not exist. Eligible authenticators are filtered to only those
133
+ * capable of satisfying this requirement.
134
+ */
135
+ userVerification?: 'required' | 'preferred' | 'discouraged';
136
+ };
137
+
138
+ type AuthInit = {
139
+ assertionOptions: PublicKeyCredentialRequestOptions;
140
+ /**
141
+ * An opaque object containing session data.
142
+ */
143
+ session: string;
95
144
  };
96
145
 
97
146
  /**
98
147
  * Application making the request. It contains additional info about the caller
99
148
  * to distinguish between tenants.
100
149
  */
101
- type applicationRequestBody = {
150
+ type Application = {
102
151
  /**
103
152
  * Unique application id
104
153
  */
@@ -114,7 +163,7 @@ type applicationRequestBody = {
114
163
  * be provided on best effort basis. If provide, they will be taken into
115
164
  * consideration in order to improve user experience.
116
165
  */
117
- type deviceInfoRequestBody = {
166
+ type DeviceInfo = {
118
167
  /**
119
168
  * Client name
120
169
  */
@@ -153,7 +202,7 @@ type deviceInfoRequestBody = {
153
202
  screenWidth?: number;
154
203
  };
155
204
 
156
- type userRequestBody = {
205
+ type User = {
157
206
  /**
158
207
  * Display Name
159
208
  */
@@ -168,72 +217,17 @@ type userRequestBody = {
168
217
  usernameType: 'email' | 'phone';
169
218
  };
170
219
 
171
- type AuthAuthInitRequestBody = {
172
- app: applicationRequestBody;
173
- deviceInfo: deviceInfoRequestBody;
174
- user: userRequestBody;
175
- };
176
-
177
- type pubKeyCredentialDescriptorResponseBody = {
178
- /**
179
- * Base64 encoded byte array of the public key identifier.
180
- */
181
- id: string;
182
- transports?: Array<'usb' | 'nfc' | 'ble' | 'internal'>;
183
- type: 'public-key';
184
- };
185
-
186
- type publicKeyCredentialRequestOptionsResponseBody = {
187
- /**
188
- * A list of PublicKeyCredentialDescriptor objects representing public key
189
- * credentials acceptable to the caller, in descending order of the caller’s
190
- * preference (the first item in the list is the most preferred credential,
191
- * and so on down the list).
192
- */
193
- allowCredentials?: Array<pubKeyCredentialDescriptorResponseBody>;
194
- /**
195
- * This base64 encoded byte array represents a challenge that the selected
196
- * authenticator signs, along with other data, when producing an authentication
197
- * assertion.
198
- */
199
- challenge: string;
200
- /**
201
- * Additional parameters requesting additional processing by the client and
202
- * authenticator. For example, if transaction confirmation is sought from the
203
- * user, then the prompt string might be included as an extension.
204
- */
205
- extensions?: Record<string, string>;
206
- /**
207
- * The relying party identifier claimed by the caller. If omitted, its value will
208
- * be the CredentialsContainer object’s relevant settings object's origin's
209
- * effective domain.
210
- */
211
- rpId?: string;
212
- /**
213
- * Specifies a time, in milliseconds, that the caller is willing
214
- * to wait for the call to complete. The value is treated as a
215
- * hint, and MAY be overridden by the client.
216
- */
217
- timeout?: number;
218
- /**
219
- * The Relying Party's requirements regarding user verification for the get()
220
- * operation. The value SHOULD be a member of UserVerificationRequirement but
221
- * client platforms MUST ignore unknown values, treating an unknown value as if
222
- * the member does not exist. Eligible authenticators are filtered to only those
223
- * capable of satisfying this requirement.
224
- */
225
- userVerification?: 'required' | 'preferred' | 'discouraged';
220
+ type AuthInitRequestBody = {
221
+ app: Application;
222
+ deviceInfo: DeviceInfo;
223
+ user?: User;
226
224
  };
227
225
 
228
- /**
229
- * AuthInitResponseBody result type (default view)
230
- */
231
- type AuthAuthInitResponseBody = {
232
- assertionOptions: publicKeyCredentialRequestOptionsResponseBody;
226
+ type JWT = {
233
227
  /**
234
- * An opaque object containing session data.
228
+ * JWT access token
235
229
  */
236
- session: string;
230
+ jwtAccess: string;
237
231
  };
238
232
 
239
233
  declare class AuthService {
@@ -241,37 +235,27 @@ declare class AuthService {
241
235
  constructor(httpRequest: BaseHttpRequest);
242
236
  /**
243
237
  * Complete WebAuthn registration
244
- * @returns AuthAuthCompleteResponseBody OK response.
238
+ * @returns JWT OK response.
245
239
  * @throws ApiError
246
240
  */
247
- authAuthComplete({ authCompleteRequestBody, }: {
248
- authCompleteRequestBody: AuthAuthCompleteRequestBody;
249
- }): CancelablePromise<AuthAuthCompleteResponseBody>;
241
+ authAuthComplete({ requestBody, }: {
242
+ requestBody: AuthCompleteRequestBody;
243
+ }): CancelablePromise<JWT>;
250
244
  /**
251
245
  * Start WebAuthn registration flow
252
- * @returns AuthAuthInitResponseBody OK response.
246
+ * @returns AuthInit OK response.
253
247
  * @throws ApiError
254
248
  */
255
- authAuthInit({ authInitRequestBody, userAgent, }: {
256
- authInitRequestBody: AuthAuthInitRequestBody;
249
+ authAuthInit({ requestBody, userAgent, }: {
250
+ requestBody: AuthInitRequestBody;
257
251
  /**
258
252
  * Raw user-agent header as set by a browser
259
253
  */
260
254
  userAgent?: string;
261
- }): CancelablePromise<AuthAuthInitResponseBody>;
255
+ }): CancelablePromise<AuthInit>;
262
256
  }
263
257
 
264
- type PasskeysPasskeyRenameRequestBody = {
265
- /**
266
- * Internal passkey identifier
267
- */
268
- name: string;
269
- };
270
-
271
- /**
272
- * PasskeyResponse result type (default view)
273
- */
274
- type PasskeyResponse = {
258
+ type Passkey = {
275
259
  /**
276
260
  * Timestamp in RFC3339 format.
277
261
  */
@@ -290,65 +274,54 @@ type PasskeyResponse = {
290
274
  name: string;
291
275
  };
292
276
 
293
- /**
294
- * PasskeysListResponseBody is the result type for an array of PasskeyResponse (default view)
295
- */
296
- type PasskeysPasskeyResponseCollection = Array<PasskeyResponse>;
277
+ type PasskeyCollection = Array<Passkey>;
278
+
279
+ type PasskeyRenameRequestBody = {
280
+ /**
281
+ * Internal passkey identifier
282
+ */
283
+ name: string;
284
+ };
297
285
 
298
286
  declare class PasskeysService {
299
287
  readonly httpRequest: BaseHttpRequest;
300
288
  constructor(httpRequest: BaseHttpRequest);
301
289
  /**
302
290
  * List passkeys
303
- * **Required security scopes for jwt**:
304
- * * `passkey:read`
305
- * @returns PasskeysPasskeyResponseCollection OK response.
291
+ * @returns PasskeyCollection OK response.
306
292
  * @throws ApiError
307
293
  */
308
- passkeysPasskeysList({ authorization, }: {
309
- /**
310
- * Authorization token
311
- */
312
- authorization?: string;
313
- }): CancelablePromise<PasskeysPasskeyResponseCollection>;
294
+ passkeysPasskeysList({ authorization }: {
295
+ authorization: string;
296
+ }): CancelablePromise<PasskeyCollection>;
314
297
  /**
315
- * Rename passkey
316
- * **Required security scopes for jwt**:
317
- * * `passkey:write`
298
+ * Delete passkey
318
299
  * @returns void
319
300
  * @throws ApiError
320
301
  */
321
- passkeysPasskeyRename({ id, passkeyRenameRequestBody, authorization, }: {
302
+ passkeysPasskeyDelete({ id, authorization, }: {
322
303
  /**
323
304
  * Internal passkey identifier
324
305
  */
325
306
  id: string;
326
- passkeyRenameRequestBody: PasskeysPasskeyRenameRequestBody;
327
- /**
328
- * Authorization token
329
- */
330
- authorization?: string;
307
+ authorization: string;
331
308
  }): CancelablePromise<void>;
332
309
  /**
333
- * Delete passkey
334
- * **Required security scopes for jwt**:
335
- * * `passkey:write`
310
+ * Rename passkey
336
311
  * @returns void
337
312
  * @throws ApiError
338
313
  */
339
- passkeysPasskeyDelete({ id, authorization, }: {
314
+ passkeysPasskeyRename({ id, requestBody, authorization }: {
340
315
  /**
341
316
  * Internal passkey identifier
342
317
  */
343
318
  id: string;
344
- /**
345
- * Authorization token
346
- */
347
- authorization?: string;
319
+ requestBody: PasskeyRenameRequestBody;
320
+ authorization: string;
348
321
  }): CancelablePromise<void>;
349
322
  }
350
323
 
351
- type creationResultRequestBody = {
324
+ type CreationResult = {
352
325
  /**
353
326
  * Base64 encoded byte array containing an attestation object, which is opaque to,
354
327
  * and cryptographically protected against tampering by, the client.
@@ -380,42 +353,18 @@ type creationResultRequestBody = {
380
353
  * These values are the transports that the authenticator is believed to support,
381
354
  * or an empty sequence if the information is unavailable.
382
355
  */
383
- transports?: Array<'usb' | 'nfc' | 'ble' | 'internal'>;
356
+ transports?: Array<'usb' | 'nfc' | 'ble' | 'internal' | 'hybrid'>;
384
357
  };
385
358
 
386
- type RegRegCompleteRequestBody = {
387
- creationResult: creationResultRequestBody;
359
+ type RegCompleteRequestBody = {
360
+ creationResult: CreationResult;
388
361
  /**
389
362
  * An opaque object containing session data.
390
363
  */
391
364
  session: string;
392
365
  };
393
366
 
394
- /**
395
- * RegCompleteResponseBody result type (default view)
396
- */
397
- type RegRegCompleteResponseBody = {
398
- /**
399
- * JWT access token
400
- */
401
- jwtAccess: string;
402
- };
403
-
404
- type RegRegInitRequestBody = {
405
- app: applicationRequestBody;
406
- deviceInfo: deviceInfoRequestBody;
407
- /**
408
- * Set of authentication factors:
409
- * - Single factor: Username (i.e. email or phone) + FIDO2 credential;
410
- * - Two factor: Username + password + FIDO2 credential;
411
- * - Passwordless: FIDO2 discoverable credentials;
412
- * - Passwordless + MFA: FIDO2 discoverable credentials + PIN;
413
- */
414
- mfa?: Array<'fido2' | 'email' | 'phone' | 'password' | 'pin'>;
415
- user: userRequestBody;
416
- };
417
-
418
- type authenticatorSelectionCriteriaResponseBody = {
367
+ type AuthenticatorSelectionCriteria = {
419
368
  /**
420
369
  * Authenticator attachment modality
421
370
  */
@@ -437,7 +386,7 @@ type authenticatorSelectionCriteriaResponseBody = {
437
386
  /**
438
387
  * Additional parameters when creating a new credential.
439
388
  */
440
- type publicKeyCredentialParametersResponseBody = {
389
+ type PublicKeyCredentialParameters = {
441
390
  /**
442
391
  * A cryptographic signature algorithm with which the newly generated credential
443
392
  * will be used, and thus also the type of asymmetric key pair to be generated,
@@ -450,7 +399,7 @@ type publicKeyCredentialParametersResponseBody = {
450
399
  /**
451
400
  * Data about the Relying Party responsible for the request.
452
401
  */
453
- type publicKeyCredentialRpEntityResponseBody = {
402
+ type PublicKeyCredentialRpEntity = {
454
403
  /**
455
404
  * A unique identifier for the Relying Party entity, which sets the RP ID.
456
405
  */
@@ -464,18 +413,18 @@ type publicKeyCredentialRpEntityResponseBody = {
464
413
  /**
465
414
  * Data about the user account for which the Relying Party is requesting attestation
466
415
  */
467
- type publicKeyCredentialUserEntityResponseBody = {
416
+ type PublicKeyCredentialUserEntity = {
468
417
  displayName: string;
469
418
  id: string;
470
419
  name: string;
471
420
  };
472
421
 
473
- type publicKeyCredentialCreationOptionsResponseBody = {
422
+ type PublicKeyCredentialCreationOptions = {
474
423
  /**
475
424
  * A preference for attestation conveyance.
476
425
  */
477
426
  attestation?: 'none' | 'indirect' | 'direct' | 'enterprise';
478
- authenticatorSelection?: authenticatorSelectionCriteriaResponseBody;
427
+ authenticatorSelection?: AuthenticatorSelectionCriteria;
479
428
  /**
480
429
  * This base64 encoded byte array represents a challenge that
481
430
  * the selected authenticator signs, along with other data, when
@@ -488,7 +437,7 @@ type publicKeyCredentialCreationOptionsResponseBody = {
488
437
  * if the new credential would be created on an authenticator that also contains
489
438
  * one of the credentials enumerated in this parameter.
490
439
  */
491
- excludeCredentials?: Array<pubKeyCredentialDescriptorResponseBody>;
440
+ excludeCredentials?: Array<PubKeyCredentialDescriptor>;
492
441
  /**
493
442
  * Additional parameters requesting processing by the client and authenticator.
494
443
  */
@@ -499,57 +448,191 @@ type publicKeyCredentialCreationOptionsResponseBody = {
499
448
  * The client makes a best-effort to create the most preferred credential that it
500
449
  * can.
501
450
  */
502
- pubKeyCredParams: Array<publicKeyCredentialParametersResponseBody>;
503
- rp: publicKeyCredentialRpEntityResponseBody;
451
+ pubKeyCredParams: Array<PublicKeyCredentialParameters>;
452
+ rp: PublicKeyCredentialRpEntity;
504
453
  /**
505
454
  * This OPTIONAL member specifies a time, in milliseconds,
506
455
  * that the caller is willing to wait for the call to complete. The
507
456
  * value is treated as a hint, and MAY be overridden by the client.
508
457
  */
509
458
  timeout?: number;
510
- user: publicKeyCredentialUserEntityResponseBody;
459
+ user: PublicKeyCredentialUserEntity;
511
460
  };
512
461
 
513
- /**
514
- * RegInitResponseBody result type (default view)
515
- */
516
- type RegRegInitResponseBody = {
517
- registrationRequestOptions: publicKeyCredentialCreationOptionsResponseBody;
462
+ type RegInit = {
463
+ registrationRequestOptions: PublicKeyCredentialCreationOptions;
518
464
  /**
519
465
  * An opaque object containing session data.
520
466
  */
521
467
  session: string;
522
468
  };
523
469
 
470
+ type RegInitRequestBody = {
471
+ app: Application;
472
+ deviceInfo: DeviceInfo;
473
+ /**
474
+ * Set of authentication factors:
475
+ * - Single factor: Username (i.e. email or phone) + FIDO2 credential;
476
+ * - Two factor: Username + password + FIDO2 credential;
477
+ * - Passwordless: FIDO2 discoverable credentials;
478
+ * - Passwordless + MFA: FIDO2 discoverable credentials + PIN;
479
+ */
480
+ mfa?: Array<'fido2' | 'email' | 'phone' | 'password' | 'pin'>;
481
+ user: User;
482
+ };
483
+
524
484
  declare class RegService {
525
485
  readonly httpRequest: BaseHttpRequest;
526
486
  constructor(httpRequest: BaseHttpRequest);
527
487
  /**
528
488
  * Complete WebAuthn registration flow
529
- * @returns RegRegCompleteResponseBody OK response.
489
+ * @returns JWT OK response.
530
490
  * @throws ApiError
531
491
  */
532
- regRegComplete({ regCompleteRequestBody, }: {
533
- regCompleteRequestBody: RegRegCompleteRequestBody;
534
- }): CancelablePromise<RegRegCompleteResponseBody>;
492
+ regRegComplete({ requestBody, }: {
493
+ requestBody: RegCompleteRequestBody;
494
+ }): CancelablePromise<JWT>;
535
495
  /**
536
496
  * Start WebAuthn registration flow
537
- * @returns RegRegInitResponseBody OK response.
497
+ * @returns RegInit OK response.
538
498
  * @throws ApiError
539
499
  */
540
- regRegInit({ regInitRequestBody, userAgent, }: {
541
- regInitRequestBody: RegRegInitRequestBody;
500
+ regRegInit({ requestBody, userAgent, }: {
501
+ requestBody: RegInitRequestBody;
542
502
  /**
543
503
  * Raw user-agent header as set by a browser
544
504
  */
545
505
  userAgent?: string;
546
- }): CancelablePromise<RegRegInitResponseBody>;
506
+ }): CancelablePromise<RegInit>;
547
507
  }
548
508
 
549
- /**
550
- * VersionShowResponseBody result type (default view)
551
- */
552
- type VersionVersionShowResponseBody = {
509
+ type TokenVerifyRequestBody = {
510
+ /**
511
+ * JWT access token
512
+ */
513
+ jwtAccess: string;
514
+ };
515
+
516
+ declare class TokenService {
517
+ readonly httpRequest: BaseHttpRequest;
518
+ constructor(httpRequest: BaseHttpRequest);
519
+ /**
520
+ * Validate JWT Access Token
521
+ * @returns void
522
+ * @throws ApiError
523
+ */
524
+ tokenTokenVerify({ requestBody, }: {
525
+ requestBody: TokenVerifyRequestBody;
526
+ }): CancelablePromise<void>;
527
+ }
528
+
529
+ type TxComplete = {
530
+ authCred?: Passkey;
531
+ /**
532
+ * Internal passkey identifier
533
+ */
534
+ credentialId: string;
535
+ /**
536
+ * JWT access token
537
+ */
538
+ jwtAccess: string;
539
+ /**
540
+ * Random string generated by LoginID.
541
+ */
542
+ lNonce: string;
543
+ /**
544
+ * Random string.
545
+ */
546
+ nonce: string;
547
+ /**
548
+ * Computed hash value of the transaction.
549
+ */
550
+ txHash: string;
551
+ /**
552
+ * Internal transaction identifier
553
+ */
554
+ txId: string;
555
+ };
556
+
557
+ type TxCompleteRequestBody = {
558
+ /**
559
+ * This attribute contains the authenticator data returned by the authenticator.
560
+ */
561
+ authenticatorData: string;
562
+ /**
563
+ * Base64 encoded byte array which is a JSON-compatible serialization of client data
564
+ * passed to the authenticator by the client in order to generate this assertion.
565
+ * The exact JSON serialization MUST be preserved, as the hash of the serialized
566
+ * client data has been computed over it.
567
+ */
568
+ clientData: string;
569
+ /**
570
+ * Identified of the passkey credential.
571
+ */
572
+ keyHandle: string;
573
+ /**
574
+ * An opaque object containing session data.
575
+ */
576
+ session: string;
577
+ /**
578
+ * Base64 encoded the raw signature returned from the authenticator.
579
+ */
580
+ signature: string;
581
+ };
582
+
583
+ type TxInit = {
584
+ assertionOptions: PublicKeyCredentialRequestOptions;
585
+ /**
586
+ * An opaque object containing session data.
587
+ */
588
+ session: string;
589
+ /**
590
+ * Internal transaction identifier
591
+ */
592
+ txId: string;
593
+ };
594
+
595
+ type TxInitRequestBody = {
596
+ /**
597
+ * Random string
598
+ */
599
+ nonce: string;
600
+ /**
601
+ * Payload of transaction
602
+ */
603
+ txPayload: string;
604
+ /**
605
+ * Type of transaction
606
+ */
607
+ txType: string;
608
+ /**
609
+ * Username of user
610
+ */
611
+ username: string;
612
+ };
613
+
614
+ declare class TxService {
615
+ readonly httpRequest: BaseHttpRequest;
616
+ constructor(httpRequest: BaseHttpRequest);
617
+ /**
618
+ * Complete transaction confirmation
619
+ * @returns TxComplete OK response.
620
+ * @throws ApiError
621
+ */
622
+ txTxComplete({ requestBody, }: {
623
+ requestBody: TxCompleteRequestBody;
624
+ }): CancelablePromise<TxComplete>;
625
+ /**
626
+ * Start transaction confirmation flow
627
+ * @returns TxInit OK response.
628
+ * @throws ApiError
629
+ */
630
+ txTxInit({ requestBody, }: {
631
+ requestBody: TxInitRequestBody;
632
+ }): CancelablePromise<TxInit>;
633
+ }
634
+
635
+ type Version = {
553
636
  /**
554
637
  * Version hash
555
638
  */
@@ -565,10 +648,10 @@ declare class VersionService {
565
648
  constructor(httpRequest: BaseHttpRequest);
566
649
  /**
567
650
  * Show software version
568
- * @returns VersionVersionShowResponseBody OK response.
651
+ * @returns Version OK response.
569
652
  * @throws ApiError
570
653
  */
571
- versionVersionShow(): CancelablePromise<VersionVersionShowResponseBody>;
654
+ versionVersionShow(): CancelablePromise<Version>;
572
655
  }
573
656
 
574
657
  type HttpRequestConstructor = new (config: OpenAPIConfig) => BaseHttpRequest;
@@ -576,6 +659,8 @@ declare class LoginIDService {
576
659
  readonly auth: AuthService;
577
660
  readonly passkeys: PasskeysService;
578
661
  readonly reg: RegService;
662
+ readonly token: TokenService;
663
+ readonly tx: TxService;
579
664
  readonly version: VersionService;
580
665
  readonly request: BaseHttpRequest;
581
666
  constructor(config?: Partial<OpenAPIConfig>, HttpRequest?: HttpRequestConstructor);
@@ -598,10 +683,10 @@ declare class ApiError extends Error {
598
683
  constructor(request: ApiRequestOptions, response: ApiResult, message: string);
599
684
  }
600
685
 
601
- type UsernameType = userRequestBody['usernameType'];
602
- type DeviceInfoRequestBody = deviceInfoRequestBody;
603
- type MFA = RegRegInitRequestBody['mfa'];
604
- type Transports = creationResultRequestBody['transports'];
686
+ type UsernameType = User['usernameType'];
687
+ type DeviceInfoRequestBody = DeviceInfo;
688
+ type MFA = RegInitRequestBody['mfa'];
689
+ type Transports = CreationResult['transports'];
605
690
  interface LoginIDConfig {
606
691
  baseUrl: string;
607
692
  appId: string;
@@ -618,6 +703,8 @@ interface AuthenticateWithPasskeysOptions extends PasskeyOptions {
618
703
  interface RegisterWithPasskeyOptions extends PasskeyOptions {
619
704
  mfa?: MFA;
620
705
  }
706
+ interface ConfirmTransactionOptions extends Partial<Pick<TxInitRequestBody, 'txType'>> {
707
+ }
621
708
  interface PasskeyResult {
622
709
  jwtAccess: string;
623
710
  }
@@ -654,10 +741,10 @@ declare class Passkeys extends LoginIDBase {
654
741
  constructor(config: LoginIDConfig);
655
742
  /**
656
743
  * Creates a navigator credential using WebAuthn.
657
- * @param {RegRegInitResponseBody} regInitResponseBody The response body from registration initialization.
744
+ * @param {RegInit} regInitResponseBody The response body from registration initialization.
658
745
  * @returns {Promise<RegRegCompleteRequestBody>} Completion request body for registration.
659
746
  */
660
- createNavigatorCredential(regInitResponseBody: RegRegInitResponseBody): Promise<RegRegCompleteRequestBody>;
747
+ createNavigatorCredential(regInitResponseBody: RegInit): Promise<RegCompleteRequestBody>;
661
748
  /**
662
749
  * Registers a user with a passkey.
663
750
  * @param {string} username Username to register.
@@ -667,18 +754,35 @@ declare class Passkeys extends LoginIDBase {
667
754
  registerWithPasskey(username: string, options?: RegisterWithPasskeyOptions): Promise<PasskeyResult>;
668
755
  /**
669
756
  * Retrieves a navigator credential for authentication.
670
- * @param {AuthAuthInitResponseBody} authInitResponseBody The response body from authentication initialization.
757
+ * @param {AuthInit} authInitResponseBody The response body from authentication initialization.
671
758
  * @param {AuthenticateWithPasskeysOptions} options Additional options for authentication.
672
759
  * @returns {Promise<AuthAuthCompleteRequestBody>} Completion request body for authentication.
673
760
  */
674
- getNavigatorCredential(authInitResponseBody: AuthAuthInitResponseBody, options?: AuthenticateWithPasskeysOptions): Promise<AuthAuthCompleteRequestBody>;
761
+ getNavigatorCredential(authInitResponseBody: AuthInit, options?: AuthenticateWithPasskeysOptions): Promise<AuthCompleteRequestBody>;
675
762
  /**
676
763
  * Authenticates a user with a passkey.
677
764
  * @param {string} username Username to authenticate.
678
765
  * @param {AuthenticateWithPasskeysOptions} options Additional authentication options.
679
766
  * @returns {Promise<any>} Result of the authentication operation.
680
767
  */
681
- authenticateWithPasskey(username: string, options?: AuthenticateWithPasskeysOptions): Promise<PasskeyResult>;
768
+ authenticateWithPasskey(username?: string, options?: AuthenticateWithPasskeysOptions): Promise<PasskeyResult>;
769
+ /**
770
+ * Confirms a transaction using a passkey.
771
+ *
772
+ * This method initiates a transaction confirmation process by generating a transaction-specific challenge
773
+ * and then expects the client to provide an assertion response using a passkey.
774
+ * This method is useful for confirming actions such as payments
775
+ * or changes to sensitive account information, ensuring that the transaction is being authorized
776
+ * by the rightful owner of the passkey.
777
+ *
778
+ * @param {string} username The username of the user confirming the transaction.
779
+ * @param {string} txPayload The transaction-specific payload, which could include details
780
+ * such as the transaction amount, recipient, and other metadata necessary for the transaction.
781
+ * @param {ConfirmTransactionOptions} [options={}] Optional parameters for transaction confirmation.
782
+ * @returns {Promise<any>} A promise that resolves with the result of the transaction confirmation operation.
783
+ * The result includes details about the transaction's details and includes a new JWT access token.
784
+ */
785
+ confirmTransaction(username: string, txPayload: string, nonce: string, options?: ConfirmTransactionOptions): Promise<TxComplete>;
682
786
  /**
683
787
  * Retrieves the JWT access token.
684
788
  * @returns {string} The JWT access token.
@@ -700,7 +804,7 @@ declare class PasskeyManager extends LoginIDBase {
700
804
  * @param {string} authToken Authorization token to authenticate the request.
701
805
  * @returns {Promise<PasskeysPasskeyResponseCollection>} A collection of passkeys.
702
806
  */
703
- listPasskeys(authToken: string): Promise<PasskeysPasskeyResponseCollection>;
807
+ listPasskeys(authToken: string): Promise<PasskeyCollection>;
704
808
  /**
705
809
  * Renames a specified passkey.
706
810
  * @param {string} authToken Authorization token to authenticate the request.
@@ -747,7 +851,7 @@ declare class PasskeyError extends Error {
747
851
  * @returns {Promise<PublicKeyCredential>} A promise that resolves to the passkey credential.
748
852
  * @throws {LoginIdError} If any errors occur during credential creation or if the credential type is invalid.
749
853
  */
750
- declare const createPasskeyCredential: (init: publicKeyCredentialCreationOptionsResponseBody) => Promise<PublicKeyCredential>;
854
+ declare const createPasskeyCredential: (init: PublicKeyCredentialCreationOptions) => Promise<PublicKeyCredential>;
751
855
  /**
752
856
  * Asynchronously retrieves a passkey credential for authentication using the provided request options.
753
857
  *
@@ -755,7 +859,7 @@ declare const createPasskeyCredential: (init: publicKeyCredentialCreationOptions
755
859
  * @param {AuthenticateWithPasskeysOptions} options - Additional options for the authentication request.
756
860
  * @returns {Promise<PublicKeyCredential>} A promise that resolves to the passkey credential.
757
861
  */
758
- declare const getPasskeyCredential: (init: publicKeyCredentialRequestOptionsResponseBody, options?: AuthenticateWithPasskeysOptions) => Promise<PublicKeyCredential>;
862
+ declare const getPasskeyCredential: (init: PublicKeyCredentialRequestOptions, options?: AuthenticateWithPasskeysOptions) => Promise<PublicKeyCredential>;
759
863
 
760
864
  /**
761
865
  * Checks if platform authenticator available
@@ -774,4 +878,4 @@ interface DoesDeviceSupportPasskeysResponse {
774
878
  */
775
879
  declare function doesDeviceSupportPasskeys(): Promise<DoesDeviceSupportPasskeysResponse>;
776
880
 
777
- export { ApiError, type AuthenticateWithPasskeysOptions, type DeviceInfoRequestBody, type DoesDeviceSupportPasskeysResponse, type LoginIDConfig, LoginIDWebSDK, type MFA, PasskeyError, type PasskeyOptions, type PasskeyResult, type RegisterWithPasskeyOptions, type Transports, type UsernameType, createPasskeyCredential, LoginIDWebSDK as default, doesDeviceSupportPasskeys, getPasskeyCredential, isConditionalUIAvailable, isPlatformAuthenticatorAvailable };
881
+ export { ApiError, type AuthenticateWithPasskeysOptions, type ConfirmTransactionOptions, type DeviceInfoRequestBody, type DoesDeviceSupportPasskeysResponse, type LoginIDConfig, LoginIDWebSDK, type MFA, PasskeyError, type PasskeyOptions, type PasskeyResult, type RegisterWithPasskeyOptions, type Transports, type UsernameType, createPasskeyCredential, LoginIDWebSDK as default, doesDeviceSupportPasskeys, getPasskeyCredential, isConditionalUIAvailable, isPlatformAuthenticatorAvailable };