@pubflow/react 0.4.13 → 0.4.14

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.
@@ -5,7 +5,7 @@
5
5
  * For the LOGIN-TIME 2FA flow use useAuth() which surfaces
6
6
  * twoFactorPending / verifyTwoFactor / startTwoFactor.
7
7
  */
8
- import type { TwoFactorMethod, TwoFactorSetupResult, TwoFactorToggleResult, TwoFactorVerifyResult } from '@pubflow/core';
8
+ import type { TwoFactorMethod, TwoFactorSetupResult, TwoFactorToggleResult, TwoFactorVerifyResult, TwoFactorStartResult } from '@pubflow/core';
9
9
  export interface UseTwoFactorResult {
10
10
  /** Whether the 2FA system is globally enabled on this server */
11
11
  systemEnabled: boolean;
@@ -39,6 +39,11 @@ export interface UseTwoFactorResult {
39
39
  message?: string;
40
40
  error?: string;
41
41
  }>;
42
+ /**
43
+ * Send a verification code to an existing active method (re-auth / sensitive action).
44
+ * Call this BEFORE showing the code input for disable or remove flows.
45
+ */
46
+ sendCode: (methodId: string, method: string, action?: string) => Promise<TwoFactorStartResult>;
42
47
  }
43
48
  /**
44
49
  * Hook for managing 2FA settings.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pubflow/react",
3
- "version": "0.4.13",
3
+ "version": "0.4.14",
4
4
  "description": "React adapter for Pubflow framework with support for TanStack Router and SWR - Now with snake_case support",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.esm.js",
@@ -33,7 +33,7 @@
33
33
  "author": "Pubflow, Inc.",
34
34
  "license": "AGPL-3.0-or-later",
35
35
  "dependencies": {
36
- "@pubflow/core": "^0.4.5",
36
+ "@pubflow/core": "^0.4.6",
37
37
  "@hookform/resolvers": "^3.3.2",
38
38
  "react-hook-form": "^7.48.2",
39
39
  "swr": "^2.2.4"