@trymellon/js 2.3.0 → 2.3.2
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/angular.cjs +1 -1
- package/dist/angular.cjs.map +1 -1
- package/dist/angular.d.cts +5 -6
- package/dist/angular.d.ts +5 -6
- package/dist/angular.js +1 -1
- package/dist/angular.js.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -11
- package/dist/index.d.ts +11 -11
- package/dist/index.global.js +2 -2
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/react.d.cts +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/{trymellon-DItEFTiv.d.cts → trymellon-BKAS6p95.d.cts} +12 -12
- package/dist/{trymellon-DItEFTiv.d.ts → trymellon-BKAS6p95.d.ts} +12 -12
- package/dist/ui/index.js +5 -5
- package/dist/ui/index.js.map +1 -1
- package/dist/vue.d.cts +1 -1
- package/dist/vue.d.ts +1 -1
- package/package.json +23 -2
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-
|
|
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-BKAS6p95.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-
|
|
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-BKAS6p95.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
|
|
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
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
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,17 +667,18 @@ 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.
|
|
679
674
|
* This constructor will throw errors if configuration is invalid.
|
|
680
675
|
*/
|
|
681
676
|
constructor(config: TryMellonConfig);
|
|
677
|
+
/**
|
|
678
|
+
* DX: warn when sandbox is ON and origin is not localhost/127.0.0.1 (e.g. production).
|
|
679
|
+
* No-op in non-browser (SSR/Node). No exceptions; only console.warn.
|
|
680
|
+
*/
|
|
681
|
+
private warnIfSandboxOnProd;
|
|
682
682
|
/**
|
|
683
683
|
* Bridge (KP-BRIDGE-04): complete enrollment or auth from a second device (e.g. mobile scanning desktop QR).
|
|
684
684
|
* Use kind 'enrollment' for enrollment-bridge sessions, 'auth' for auth-bridge sessions.
|
|
@@ -726,4 +726,4 @@ declare class TryMellon {
|
|
|
726
726
|
};
|
|
727
727
|
}
|
|
728
728
|
|
|
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
|
|
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 };
|
|
@@ -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
|
|
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
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
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,17 +667,18 @@ 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.
|
|
679
674
|
* This constructor will throw errors if configuration is invalid.
|
|
680
675
|
*/
|
|
681
676
|
constructor(config: TryMellonConfig);
|
|
677
|
+
/**
|
|
678
|
+
* DX: warn when sandbox is ON and origin is not localhost/127.0.0.1 (e.g. production).
|
|
679
|
+
* No-op in non-browser (SSR/Node). No exceptions; only console.warn.
|
|
680
|
+
*/
|
|
681
|
+
private warnIfSandboxOnProd;
|
|
682
682
|
/**
|
|
683
683
|
* Bridge (KP-BRIDGE-04): complete enrollment or auth from a second device (e.g. mobile scanning desktop QR).
|
|
684
684
|
* Use kind 'enrollment' for enrollment-bridge sessions, 'auth' for auth-bridge sessions.
|
|
@@ -726,4 +726,4 @@ declare class TryMellon {
|
|
|
726
726
|
};
|
|
727
727
|
}
|
|
728
728
|
|
|
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
|
|
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 };
|