@passflow/core 0.43.0 → 0.43.1

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
@@ -2297,17 +2297,35 @@ export type TwoFactorCompletionOptions = {
2297
2297
  trustDevice?: boolean;
2298
2298
  };
2299
2299
  /**
2300
- * A device the user trusted to stand in for their second factor on this app.
2300
+ * A device of the user's on this app: one that holds a grant to stand in for
2301
+ * their second factor, a device key, or both.
2301
2302
  */
2302
2303
  export type TwoFactorTrustedDevice = {
2303
2304
  id: string;
2304
2305
  user_agent?: string;
2306
+ /** True while the device holds a grant that stands in for the second factor. */
2307
+ trusted: boolean;
2305
2308
  created_at: string;
2309
+ /** When the grant ends; absent on a device without one. */
2310
+ expires_at?: string;
2306
2311
  last_used_at?: string;
2307
- expires_at: string;
2312
+ /** Set when the device enrolled a device key. */
2313
+ device_key?: TwoFactorTrustedDeviceKey;
2314
+ /** Set when the device can approve sign-ins by push. */
2315
+ push_approval?: TwoFactorTrustedDevicePush;
2308
2316
  /** True for the device the request came from. */
2309
2317
  current: boolean;
2310
2318
  };
2319
+ /** A device's enrolled device key, as `TwoFactorTrustedDevice.device_key`. */
2320
+ export type TwoFactorTrustedDeviceKey = {
2321
+ key_storage: 'software' | 'hardware';
2322
+ enrolled_at: string;
2323
+ last_proof_at?: string;
2324
+ };
2325
+ /** A device's push approval, as `TwoFactorTrustedDevice.push_approval`. */
2326
+ export type TwoFactorTrustedDevicePush = {
2327
+ registered_at: string;
2328
+ };
2311
2329
  /** GET /v2/user/2fa/trusted-devices */
2312
2330
  export type TwoFactorTrustedDevicesResponse = {
2313
2331
  devices: TwoFactorTrustedDevice[];
@@ -2368,8 +2386,8 @@ export type TwoFactorSetupMagicLinkSession = {
2368
2386
  userId: string;
2369
2387
  appId?: string | null;
2370
2388
  scope: '2fa_setup';
2371
- /** `true` when the link replaces an enrolled authenticator. The SDK always sets it. */
2372
- reset?: boolean;
2389
+ /** `true` when the link replaces an enrolled authenticator. */
2390
+ reset: boolean;
2373
2391
  timestamp: number;
2374
2392
  expiresAt: number;
2375
2393
  };
package/dist/index.d.ts CHANGED
@@ -2297,17 +2297,35 @@ export type TwoFactorCompletionOptions = {
2297
2297
  trustDevice?: boolean;
2298
2298
  };
2299
2299
  /**
2300
- * A device the user trusted to stand in for their second factor on this app.
2300
+ * A device of the user's on this app: one that holds a grant to stand in for
2301
+ * their second factor, a device key, or both.
2301
2302
  */
2302
2303
  export type TwoFactorTrustedDevice = {
2303
2304
  id: string;
2304
2305
  user_agent?: string;
2306
+ /** True while the device holds a grant that stands in for the second factor. */
2307
+ trusted: boolean;
2305
2308
  created_at: string;
2309
+ /** When the grant ends; absent on a device without one. */
2310
+ expires_at?: string;
2306
2311
  last_used_at?: string;
2307
- expires_at: string;
2312
+ /** Set when the device enrolled a device key. */
2313
+ device_key?: TwoFactorTrustedDeviceKey;
2314
+ /** Set when the device can approve sign-ins by push. */
2315
+ push_approval?: TwoFactorTrustedDevicePush;
2308
2316
  /** True for the device the request came from. */
2309
2317
  current: boolean;
2310
2318
  };
2319
+ /** A device's enrolled device key, as `TwoFactorTrustedDevice.device_key`. */
2320
+ export type TwoFactorTrustedDeviceKey = {
2321
+ key_storage: 'software' | 'hardware';
2322
+ enrolled_at: string;
2323
+ last_proof_at?: string;
2324
+ };
2325
+ /** A device's push approval, as `TwoFactorTrustedDevice.push_approval`. */
2326
+ export type TwoFactorTrustedDevicePush = {
2327
+ registered_at: string;
2328
+ };
2311
2329
  /** GET /v2/user/2fa/trusted-devices */
2312
2330
  export type TwoFactorTrustedDevicesResponse = {
2313
2331
  devices: TwoFactorTrustedDevice[];
@@ -2368,8 +2386,8 @@ export type TwoFactorSetupMagicLinkSession = {
2368
2386
  userId: string;
2369
2387
  appId?: string | null;
2370
2388
  scope: '2fa_setup';
2371
- /** `true` when the link replaces an enrolled authenticator. The SDK always sets it. */
2372
- reset?: boolean;
2389
+ /** `true` when the link replaces an enrolled authenticator. */
2390
+ reset: boolean;
2373
2391
  timestamp: number;
2374
2392
  expiresAt: number;
2375
2393
  };
package/dist/index.mjs CHANGED
@@ -11,7 +11,7 @@ var a = "__passflowAntiBot", o = (e, t) => {
11
11
  if (typeof e != "object" || !e) return;
12
12
  let t = e[a];
13
13
  return typeof t == "object" && t ? t : void 0;
14
- }, c = "0.43.0", l = "X-Passflow-Clientid", u = "Authorization", d = "X-Passflow-DeviceId", f = "X-Passflow-DeviceType", p = "X-Passflow-Anti-Bot", m = "X-Passflow-Agent-Tool", h = "X-Passflow-Device-Proof", g = "passflow_auth", _ = c, v = [
14
+ }, c = "0.43.1", l = "X-Passflow-Clientid", u = "Authorization", d = "X-Passflow-DeviceId", f = "X-Passflow-DeviceType", p = "X-Passflow-Anti-Bot", m = "X-Passflow-Agent-Tool", h = "X-Passflow-Device-Proof", g = "passflow_auth", _ = c, v = [
15
15
  "id",
16
16
  "offline",
17
17
  "openid"