@pubflow/core 0.4.5 → 0.4.6

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.
@@ -11,7 +11,7 @@ import type { TwoFactorMethod, TwoFactorSystemInfo, TwoFactorStartResult, TwoFac
11
11
  export declare class TwoFactorService {
12
12
  private apiClient;
13
13
  private basePath;
14
- constructor(apiClient: ApiClient, config: PubflowInstanceConfig);
14
+ constructor(apiClient: ApiClient, configOrBasePath: PubflowInstanceConfig | string);
15
15
  /**
16
16
  * GET /auth/two_factor/system
17
17
  * Returns system-level 2FA availability (no auth needed).
@@ -9,9 +9,14 @@
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.TwoFactorService = void 0;
11
11
  class TwoFactorService {
12
- constructor(apiClient, config) {
12
+ constructor(apiClient, configOrBasePath) {
13
13
  this.apiClient = apiClient;
14
- this.basePath = `${config.authBasePath || '/auth'}/two_factor`;
14
+ if (typeof configOrBasePath === 'string') {
15
+ this.basePath = configOrBasePath;
16
+ }
17
+ else {
18
+ this.basePath = `${configOrBasePath.authBasePath || '/auth'}/two_factor`;
19
+ }
15
20
  }
16
21
  // ─── Public (no auth) ──────────────────────────────────────────────────────
17
22
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pubflow/core",
3
- "version": "0.4.5",
3
+ "version": "0.4.6",
4
4
  "description": "Core functionality for Pubflow framework",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",