authhero 4.76.0 → 4.77.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.
@@ -47321,53 +47321,88 @@ export declare const StrategyType: {
47321
47321
  readonly SOCIAL: "social";
47322
47322
  readonly PASSWORDLESS: "passwordless";
47323
47323
  };
47324
- export declare const mfaEnrollmentTypeSchema: z.ZodEnum<[
47324
+ export declare const authenticationMethodTypeSchema: z.ZodEnum<[
47325
47325
  "phone",
47326
47326
  "totp",
47327
47327
  "email",
47328
47328
  "push",
47329
- "webauthn"
47329
+ "webauthn-roaming",
47330
+ "webauthn-platform",
47331
+ "passkey"
47330
47332
  ]>;
47331
- export type MfaEnrollmentType = z.infer<typeof mfaEnrollmentTypeSchema>;
47332
- export declare const mfaEnrollmentInsertSchema: z.ZodEffects<z.ZodObject<{
47333
+ export type AuthenticationMethodType = z.infer<typeof authenticationMethodTypeSchema>;
47334
+ export declare const authenticationMethodInsertSchema: z.ZodEffects<z.ZodObject<{
47333
47335
  user_id: z.ZodString;
47334
47336
  type: z.ZodEnum<[
47335
47337
  "phone",
47336
47338
  "totp",
47337
47339
  "email",
47338
47340
  "push",
47339
- "webauthn"
47341
+ "webauthn-roaming",
47342
+ "webauthn-platform",
47343
+ "passkey"
47340
47344
  ]>;
47341
47345
  phone_number: z.ZodOptional<z.ZodString>;
47342
47346
  totp_secret: z.ZodOptional<z.ZodString>;
47347
+ credential_id: z.ZodOptional<z.ZodString>;
47348
+ public_key: z.ZodOptional<z.ZodString>;
47349
+ sign_count: z.ZodOptional<z.ZodNumber>;
47350
+ credential_backed_up: z.ZodOptional<z.ZodBoolean>;
47351
+ transports: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
47352
+ friendly_name: z.ZodOptional<z.ZodString>;
47343
47353
  confirmed: z.ZodDefault<z.ZodBoolean>;
47344
47354
  }, "strip", z.ZodTypeAny, {
47345
- type: "push" | "email" | "phone" | "totp" | "webauthn";
47355
+ type: "push" | "email" | "passkey" | "phone" | "totp" | "webauthn-roaming" | "webauthn-platform";
47346
47356
  user_id: string;
47347
47357
  confirmed: boolean;
47348
47358
  phone_number?: string | undefined;
47359
+ friendly_name?: string | undefined;
47349
47360
  totp_secret?: string | undefined;
47361
+ credential_id?: string | undefined;
47362
+ public_key?: string | undefined;
47363
+ sign_count?: number | undefined;
47364
+ credential_backed_up?: boolean | undefined;
47365
+ transports?: string[] | undefined;
47350
47366
  }, {
47351
- type: "push" | "email" | "phone" | "totp" | "webauthn";
47367
+ type: "push" | "email" | "passkey" | "phone" | "totp" | "webauthn-roaming" | "webauthn-platform";
47352
47368
  user_id: string;
47353
47369
  phone_number?: string | undefined;
47370
+ friendly_name?: string | undefined;
47354
47371
  totp_secret?: string | undefined;
47372
+ credential_id?: string | undefined;
47373
+ public_key?: string | undefined;
47374
+ sign_count?: number | undefined;
47375
+ credential_backed_up?: boolean | undefined;
47376
+ transports?: string[] | undefined;
47355
47377
  confirmed?: boolean | undefined;
47356
47378
  }>, {
47357
- type: "push" | "email" | "phone" | "totp" | "webauthn";
47379
+ type: "push" | "email" | "passkey" | "phone" | "totp" | "webauthn-roaming" | "webauthn-platform";
47358
47380
  user_id: string;
47359
47381
  confirmed: boolean;
47360
47382
  phone_number?: string | undefined;
47383
+ friendly_name?: string | undefined;
47361
47384
  totp_secret?: string | undefined;
47385
+ credential_id?: string | undefined;
47386
+ public_key?: string | undefined;
47387
+ sign_count?: number | undefined;
47388
+ credential_backed_up?: boolean | undefined;
47389
+ transports?: string[] | undefined;
47362
47390
  }, {
47363
- type: "push" | "email" | "phone" | "totp" | "webauthn";
47391
+ type: "push" | "email" | "passkey" | "phone" | "totp" | "webauthn-roaming" | "webauthn-platform";
47364
47392
  user_id: string;
47365
47393
  phone_number?: string | undefined;
47394
+ friendly_name?: string | undefined;
47366
47395
  totp_secret?: string | undefined;
47396
+ credential_id?: string | undefined;
47397
+ public_key?: string | undefined;
47398
+ sign_count?: number | undefined;
47399
+ credential_backed_up?: boolean | undefined;
47400
+ transports?: string[] | undefined;
47367
47401
  confirmed?: boolean | undefined;
47368
47402
  }>;
47369
- export type MfaEnrollmentInsert = z.infer<typeof mfaEnrollmentInsertSchema>;
47370
- export declare const mfaEnrollmentSchema: z.ZodEffects<z.ZodObject<{
47403
+ export type AuthenticationMethodInsert = z.infer<typeof authenticationMethodInsertSchema>;
47404
+ export type AuthenticationMethodUpdate = Partial<Omit<AuthenticationMethodInsert, "user_id" | "type">>;
47405
+ export declare const authenticationMethodSchema: z.ZodEffects<z.ZodObject<{
47371
47406
  id: z.ZodString;
47372
47407
  created_at: z.ZodString;
47373
47408
  updated_at: z.ZodString;
@@ -47377,49 +47412,81 @@ export declare const mfaEnrollmentSchema: z.ZodEffects<z.ZodObject<{
47377
47412
  "totp",
47378
47413
  "email",
47379
47414
  "push",
47380
- "webauthn"
47415
+ "webauthn-roaming",
47416
+ "webauthn-platform",
47417
+ "passkey"
47381
47418
  ]>;
47382
47419
  phone_number: z.ZodOptional<z.ZodString>;
47383
47420
  totp_secret: z.ZodOptional<z.ZodString>;
47421
+ credential_id: z.ZodOptional<z.ZodString>;
47422
+ public_key: z.ZodOptional<z.ZodString>;
47423
+ sign_count: z.ZodOptional<z.ZodNumber>;
47424
+ credential_backed_up: z.ZodOptional<z.ZodBoolean>;
47425
+ transports: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
47426
+ friendly_name: z.ZodOptional<z.ZodString>;
47384
47427
  confirmed: z.ZodDefault<z.ZodBoolean>;
47385
47428
  }, "strip", z.ZodTypeAny, {
47386
47429
  created_at: string;
47387
47430
  updated_at: string;
47388
- type: "push" | "email" | "phone" | "totp" | "webauthn";
47431
+ type: "push" | "email" | "passkey" | "phone" | "totp" | "webauthn-roaming" | "webauthn-platform";
47389
47432
  id: string;
47390
47433
  user_id: string;
47391
47434
  confirmed: boolean;
47392
47435
  phone_number?: string | undefined;
47436
+ friendly_name?: string | undefined;
47393
47437
  totp_secret?: string | undefined;
47438
+ credential_id?: string | undefined;
47439
+ public_key?: string | undefined;
47440
+ sign_count?: number | undefined;
47441
+ credential_backed_up?: boolean | undefined;
47442
+ transports?: string[] | undefined;
47394
47443
  }, {
47395
47444
  created_at: string;
47396
47445
  updated_at: string;
47397
- type: "push" | "email" | "phone" | "totp" | "webauthn";
47446
+ type: "push" | "email" | "passkey" | "phone" | "totp" | "webauthn-roaming" | "webauthn-platform";
47398
47447
  id: string;
47399
47448
  user_id: string;
47400
47449
  phone_number?: string | undefined;
47450
+ friendly_name?: string | undefined;
47401
47451
  totp_secret?: string | undefined;
47452
+ credential_id?: string | undefined;
47453
+ public_key?: string | undefined;
47454
+ sign_count?: number | undefined;
47455
+ credential_backed_up?: boolean | undefined;
47456
+ transports?: string[] | undefined;
47402
47457
  confirmed?: boolean | undefined;
47403
47458
  }>, {
47404
47459
  created_at: string;
47405
47460
  updated_at: string;
47406
- type: "push" | "email" | "phone" | "totp" | "webauthn";
47461
+ type: "push" | "email" | "passkey" | "phone" | "totp" | "webauthn-roaming" | "webauthn-platform";
47407
47462
  id: string;
47408
47463
  user_id: string;
47409
47464
  confirmed: boolean;
47410
47465
  phone_number?: string | undefined;
47466
+ friendly_name?: string | undefined;
47411
47467
  totp_secret?: string | undefined;
47468
+ credential_id?: string | undefined;
47469
+ public_key?: string | undefined;
47470
+ sign_count?: number | undefined;
47471
+ credential_backed_up?: boolean | undefined;
47472
+ transports?: string[] | undefined;
47412
47473
  }, {
47413
47474
  created_at: string;
47414
47475
  updated_at: string;
47415
- type: "push" | "email" | "phone" | "totp" | "webauthn";
47476
+ type: "push" | "email" | "passkey" | "phone" | "totp" | "webauthn-roaming" | "webauthn-platform";
47416
47477
  id: string;
47417
47478
  user_id: string;
47418
47479
  phone_number?: string | undefined;
47480
+ friendly_name?: string | undefined;
47419
47481
  totp_secret?: string | undefined;
47482
+ credential_id?: string | undefined;
47483
+ public_key?: string | undefined;
47484
+ sign_count?: number | undefined;
47485
+ credential_backed_up?: boolean | undefined;
47486
+ transports?: string[] | undefined;
47420
47487
  confirmed?: boolean | undefined;
47421
47488
  }>;
47422
- export type MfaEnrollment = z.infer<typeof mfaEnrollmentSchema>;
47489
+ export type AuthenticationMethod = z.infer<typeof authenticationMethodSchema>;
47423
47490
  export declare function parseUserId(user_id: string): {
47424
47491
  connection: string;
47425
47492
  id: string;
@@ -47910,12 +47977,12 @@ export interface GeoAdapter {
47910
47977
  */
47911
47978
  getGeoInfo(headers: Record<string, string>): Promise<GeoInfo | null>;
47912
47979
  }
47913
- export interface MfaEnrollmentsAdapter {
47914
- create: (tenant_id: string, enrollment: MfaEnrollmentInsert) => Promise<MfaEnrollment>;
47915
- get: (tenant_id: string, enrollment_id: string) => Promise<MfaEnrollment | null>;
47916
- list: (tenant_id: string, user_id: string) => Promise<MfaEnrollment[]>;
47917
- update: (tenant_id: string, enrollment_id: string, data: Partial<MfaEnrollmentInsert>) => Promise<MfaEnrollment>;
47918
- remove: (tenant_id: string, enrollment_id: string) => Promise<boolean>;
47980
+ export interface AuthenticationMethodsAdapter {
47981
+ create: (tenant_id: string, method: AuthenticationMethodInsert) => Promise<AuthenticationMethod>;
47982
+ get: (tenant_id: string, method_id: string) => Promise<AuthenticationMethod | null>;
47983
+ list: (tenant_id: string, user_id: string) => Promise<AuthenticationMethod[]>;
47984
+ update: (tenant_id: string, method_id: string, data: AuthenticationMethodUpdate) => Promise<AuthenticationMethod>;
47985
+ remove: (tenant_id: string, method_id: string) => Promise<boolean>;
47919
47986
  }
47920
47987
  export interface StatsListParams {
47921
47988
  from?: string;
@@ -48003,7 +48070,7 @@ export interface DataAdapters {
48003
48070
  users: UserDataAdapter;
48004
48071
  userRoles: UserRolesAdapter;
48005
48072
  organizations: OrganizationsAdapter;
48006
- mfaEnrollments: MfaEnrollmentsAdapter;
48073
+ authenticationMethods: AuthenticationMethodsAdapter;
48007
48074
  userOrganizations: UserOrganizationsAdapter;
48008
48075
  /**
48009
48076
  * Optional session cleanup function.
@@ -51431,6 +51498,12 @@ export declare function init(config: AuthHeroConfig): {
51431
51498
  id: string;
51432
51499
  confirmed: boolean;
51433
51500
  phone_number?: string | undefined;
51501
+ friendly_name?: string | undefined;
51502
+ credential_id?: string | undefined;
51503
+ public_key?: string | undefined;
51504
+ sign_count?: number | undefined;
51505
+ credential_backed_up?: boolean | undefined;
51506
+ transports?: string[] | undefined;
51434
51507
  }[];
51435
51508
  outputFormat: "json";
51436
51509
  status: 200;
@@ -51445,9 +51518,15 @@ export declare function init(config: AuthHeroConfig): {
51445
51518
  };
51446
51519
  } & {
51447
51520
  json: {
51448
- type: "push" | "email" | "phone" | "totp" | "webauthn";
51521
+ type: "push" | "email" | "phone" | "passkey" | "totp" | "webauthn-roaming" | "webauthn-platform";
51449
51522
  phone_number?: string | undefined;
51523
+ friendly_name?: string | undefined;
51450
51524
  confirmed?: boolean | undefined;
51525
+ credential_id?: string | undefined;
51526
+ public_key?: string | undefined;
51527
+ sign_count?: number | undefined;
51528
+ credential_backed_up?: boolean | undefined;
51529
+ transports?: string[] | undefined;
51451
51530
  totp_secret?: string | undefined;
51452
51531
  };
51453
51532
  };
@@ -51457,6 +51536,12 @@ export declare function init(config: AuthHeroConfig): {
51457
51536
  id: string;
51458
51537
  confirmed: boolean;
51459
51538
  phone_number?: string | undefined;
51539
+ friendly_name?: string | undefined;
51540
+ credential_id?: string | undefined;
51541
+ public_key?: string | undefined;
51542
+ sign_count?: number | undefined;
51543
+ credential_backed_up?: boolean | undefined;
51544
+ transports?: string[] | undefined;
51460
51545
  };
51461
51546
  outputFormat: "json";
51462
51547
  status: 201;
@@ -51480,6 +51565,12 @@ export declare function init(config: AuthHeroConfig): {
51480
51565
  id: string;
51481
51566
  confirmed: boolean;
51482
51567
  phone_number?: string | undefined;
51568
+ friendly_name?: string | undefined;
51569
+ credential_id?: string | undefined;
51570
+ public_key?: string | undefined;
51571
+ sign_count?: number | undefined;
51572
+ credential_backed_up?: boolean | undefined;
51573
+ transports?: string[] | undefined;
51483
51574
  };
51484
51575
  outputFormat: "json";
51485
51576
  status: 200;
@@ -51511,7 +51602,7 @@ export declare function init(config: AuthHeroConfig): {
51511
51602
  };
51512
51603
  };
51513
51604
  output: {
51514
- name: "email" | "sms" | "otp" | "duo" | "push-notification" | "webauthn-roaming" | "webauthn-platform" | "recovery-code";
51605
+ name: "email" | "sms" | "otp" | "duo" | "webauthn-roaming" | "webauthn-platform" | "push-notification" | "recovery-code";
51515
51606
  enabled: boolean;
51516
51607
  trial_expired?: boolean | undefined;
51517
51608
  }[];
@@ -51666,7 +51757,7 @@ export declare function init(config: AuthHeroConfig): {
51666
51757
  $get: {
51667
51758
  input: {
51668
51759
  param: {
51669
- factor_name: "email" | "sms" | "otp" | "duo" | "push-notification" | "webauthn-roaming" | "webauthn-platform" | "recovery-code";
51760
+ factor_name: "email" | "sms" | "otp" | "duo" | "webauthn-roaming" | "webauthn-platform" | "push-notification" | "recovery-code";
51670
51761
  };
51671
51762
  } & {
51672
51763
  header: {
@@ -51674,7 +51765,7 @@ export declare function init(config: AuthHeroConfig): {
51674
51765
  };
51675
51766
  };
51676
51767
  output: {
51677
- name: "email" | "sms" | "otp" | "duo" | "push-notification" | "webauthn-roaming" | "webauthn-platform" | "recovery-code";
51768
+ name: "email" | "sms" | "otp" | "duo" | "webauthn-roaming" | "webauthn-platform" | "push-notification" | "recovery-code";
51678
51769
  enabled: boolean;
51679
51770
  trial_expired?: boolean | undefined;
51680
51771
  };
@@ -51687,7 +51778,7 @@ export declare function init(config: AuthHeroConfig): {
51687
51778
  $put: {
51688
51779
  input: {
51689
51780
  param: {
51690
- factor_name: "email" | "sms" | "otp" | "duo" | "push-notification" | "webauthn-roaming" | "webauthn-platform" | "recovery-code";
51781
+ factor_name: "email" | "sms" | "otp" | "duo" | "webauthn-roaming" | "webauthn-platform" | "push-notification" | "recovery-code";
51691
51782
  };
51692
51783
  } & {
51693
51784
  header: {
@@ -51699,7 +51790,7 @@ export declare function init(config: AuthHeroConfig): {
51699
51790
  };
51700
51791
  };
51701
51792
  output: {
51702
- name: "email" | "sms" | "otp" | "duo" | "push-notification" | "webauthn-roaming" | "webauthn-platform" | "recovery-code";
51793
+ name: "email" | "sms" | "otp" | "duo" | "webauthn-roaming" | "webauthn-platform" | "push-notification" | "recovery-code";
51703
51794
  enabled: boolean;
51704
51795
  trial_expired?: boolean | undefined;
51705
51796
  };