@trymellon/js 2.3.0 → 2.3.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/react.d.cts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { ReactNode } from 'react';
3
- import { T as TryMellon, R as Result, a as RegisterResult, b as TryMellonError, c as RegisterOptions, A as AuthenticateResult, d as AuthenticateOptions, E as EnrollmentResult, e as EnrollOptions } from './trymellon-DItEFTiv.cjs';
3
+ import { T as TryMellon, R as Result, a as RegisterResult, b as TryMellonError, c as RegisterOptions, A as AuthenticateResult, d as AuthenticateOptions, E as EnrollmentResult, e as EnrollOptions } from './trymellon-CO_2wLZz.cjs';
4
4
 
5
5
  declare function TryMellonProvider(props: {
6
6
  client: TryMellon;
package/dist/react.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { ReactNode } from 'react';
3
- import { T as TryMellon, R as Result, a as RegisterResult, b as TryMellonError, c as RegisterOptions, A as AuthenticateResult, d as AuthenticateOptions, E as EnrollmentResult, e as EnrollOptions } from './trymellon-DItEFTiv.js';
3
+ import { T as TryMellon, R as Result, a as RegisterResult, b as TryMellonError, c as RegisterOptions, A as AuthenticateResult, d as AuthenticateOptions, E as EnrollmentResult, e as EnrollOptions } from './trymellon-CO_2wLZz.js';
4
4
 
5
5
  declare function TryMellonProvider(props: {
6
6
  client: TryMellon;
@@ -26,11 +26,10 @@ interface TelemetrySender {
26
26
  type Branded<T, B> = T & {
27
27
  __brand: B;
28
28
  };
29
- type AppId = Branded<string, 'AppId'>;
30
29
  type ExternalUserId = Branded<string, 'ExternalUserId'>;
31
30
  type TryMellonConfig = {
32
31
  /** Application identifier (tenant). Required for API requests. */
33
- appId: string | AppId;
32
+ appId: string;
34
33
  /** API key for authentication. Required for API requests. */
35
34
  publishableKey: string;
36
35
  apiBaseUrl?: string;
@@ -476,10 +475,10 @@ interface AuthenticateResult {
476
475
  }
477
476
  type SessionValidateResponse = {
478
477
  valid: boolean;
479
- user_id: string;
480
- external_user_id: string;
481
- tenant_id: string;
482
- app_id: string;
478
+ userId: string;
479
+ externalUserId: string;
480
+ tenantId: string;
481
+ appId: string;
483
482
  };
484
483
  type OnboardingStartRequest = {
485
484
  user_role: 'maintainer' | 'app_user';
@@ -668,11 +667,7 @@ declare class TryMellon {
668
667
  private readonly enrollmentManager;
669
668
  private readonly bridgeManager;
670
669
  private readonly contextHashStorage;
671
- /**
672
- * Creates a new TryMellon instance.
673
- * Validates config and returns a Result.
674
- * @param config SDK configuration
675
- */
670
+ private static validateConfig;
676
671
  static create(config: TryMellonConfig): Result<TryMellon, TryMellonError>;
677
672
  /**
678
673
  * @deprecated Use `TryMellon.create(config)` instead to handle validation errors safely.
@@ -726,4 +721,4 @@ declare class TryMellon {
726
721
  };
727
722
  }
728
723
 
729
- export { type AuthenticateResult as A, type EnrollmentResult as E, type Result as R, TryMellon as T, type RegisterResult as a, TryMellonError as b, type RegisterOptions as c, type AuthenticateOptions as d, type EnrollOptions as e, type TryMellonConfig as f };
724
+ export { type AuthenticateResult as A, type EnrollmentResult as E, type Result as R, TryMellon as T, type RegisterResult as a, TryMellonError as b, type RegisterOptions as c, type AuthenticateOptions as d, type EnrollOptions as e };
@@ -26,11 +26,10 @@ interface TelemetrySender {
26
26
  type Branded<T, B> = T & {
27
27
  __brand: B;
28
28
  };
29
- type AppId = Branded<string, 'AppId'>;
30
29
  type ExternalUserId = Branded<string, 'ExternalUserId'>;
31
30
  type TryMellonConfig = {
32
31
  /** Application identifier (tenant). Required for API requests. */
33
- appId: string | AppId;
32
+ appId: string;
34
33
  /** API key for authentication. Required for API requests. */
35
34
  publishableKey: string;
36
35
  apiBaseUrl?: string;
@@ -476,10 +475,10 @@ interface AuthenticateResult {
476
475
  }
477
476
  type SessionValidateResponse = {
478
477
  valid: boolean;
479
- user_id: string;
480
- external_user_id: string;
481
- tenant_id: string;
482
- app_id: string;
478
+ userId: string;
479
+ externalUserId: string;
480
+ tenantId: string;
481
+ appId: string;
483
482
  };
484
483
  type OnboardingStartRequest = {
485
484
  user_role: 'maintainer' | 'app_user';
@@ -668,11 +667,7 @@ declare class TryMellon {
668
667
  private readonly enrollmentManager;
669
668
  private readonly bridgeManager;
670
669
  private readonly contextHashStorage;
671
- /**
672
- * Creates a new TryMellon instance.
673
- * Validates config and returns a Result.
674
- * @param config SDK configuration
675
- */
670
+ private static validateConfig;
676
671
  static create(config: TryMellonConfig): Result<TryMellon, TryMellonError>;
677
672
  /**
678
673
  * @deprecated Use `TryMellon.create(config)` instead to handle validation errors safely.
@@ -726,4 +721,4 @@ declare class TryMellon {
726
721
  };
727
722
  }
728
723
 
729
- export { type AuthenticateResult as A, type EnrollmentResult as E, type Result as R, TryMellon as T, type RegisterResult as a, TryMellonError as b, type RegisterOptions as c, type AuthenticateOptions as d, type EnrollOptions as e, type TryMellonConfig as f };
724
+ export { type AuthenticateResult as A, type EnrollmentResult as E, type Result as R, TryMellon as T, type RegisterResult as a, TryMellonError as b, type RegisterOptions as c, type AuthenticateOptions as d, type EnrollOptions as e };