@trymellon/js 1.6.2 → 1.7.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/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 } from './trymellon-BkIVfr7x.cjs';
3
+ import { T as TryMellon, R as Result, a as RegisterResult, b as TryMellonError, c as RegisterOptions, A as AuthenticateResult, d as AuthenticateOptions } from './trymellon-NWZ51vgt.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 } from './trymellon-BkIVfr7x.js';
3
+ import { T as TryMellon, R as Result, a as RegisterResult, b as TryMellonError, c as RegisterOptions, A as AuthenticateResult, d as AuthenticateOptions } from './trymellon-NWZ51vgt.js';
4
4
 
5
5
  declare function TryMellonProvider(props: {
6
6
  client: TryMellon;
@@ -180,11 +180,15 @@ type CrossDeviceStatusResult = {
180
180
  type CrossDeviceContextAuth = {
181
181
  type: 'auth';
182
182
  options: AuthStartResponse['challenge'];
183
+ approval_context?: string;
184
+ application_name?: string;
183
185
  };
184
186
  /** Context for registration: creation options (create). */
185
187
  type CrossDeviceContextRegistration = {
186
188
  type: 'registration';
187
189
  options: RegisterStartResponse['challenge'];
190
+ approval_context?: string;
191
+ application_name?: string;
188
192
  };
189
193
  /**
190
194
  * Contract: response of getCrossDeviceContext.
@@ -488,6 +492,11 @@ declare class TryMellon {
488
492
  */
489
493
  constructor(config: TryMellonConfig);
490
494
  static isSupported(): boolean;
495
+ /**
496
+ * Returns a successful Result for sandbox mode (register or authenticate).
497
+ * Single place for sandbox contract; used by register() and authenticate().
498
+ */
499
+ private sandboxAuthResult;
491
500
  register(options: RegisterOptions): Promise<Result<RegisterResult, TryMellonError>>;
492
501
  authenticate(options: AuthenticateOptions): Promise<Result<AuthenticateResult, TryMellonError>>;
493
502
  validateSession(sessionToken: string): Promise<Result<SessionValidateResponse, TryMellonError>>;
@@ -510,6 +519,7 @@ declare class TryMellon {
510
519
  session_token: string;
511
520
  user_id: string;
512
521
  }, TryMellonError>>;
522
+ getContext: (sessionId: string) => Promise<Result<CrossDeviceContextResult, TryMellonError>>;
513
523
  approve: (sessionId: string) => Promise<Result<void, TryMellonError>>;
514
524
  };
515
525
  recoverAccount: (options: RecoverAccountOptions) => Promise<Result<RecoverAccountResult, TryMellonError>>;
@@ -180,11 +180,15 @@ type CrossDeviceStatusResult = {
180
180
  type CrossDeviceContextAuth = {
181
181
  type: 'auth';
182
182
  options: AuthStartResponse['challenge'];
183
+ approval_context?: string;
184
+ application_name?: string;
183
185
  };
184
186
  /** Context for registration: creation options (create). */
185
187
  type CrossDeviceContextRegistration = {
186
188
  type: 'registration';
187
189
  options: RegisterStartResponse['challenge'];
190
+ approval_context?: string;
191
+ application_name?: string;
188
192
  };
189
193
  /**
190
194
  * Contract: response of getCrossDeviceContext.
@@ -488,6 +492,11 @@ declare class TryMellon {
488
492
  */
489
493
  constructor(config: TryMellonConfig);
490
494
  static isSupported(): boolean;
495
+ /**
496
+ * Returns a successful Result for sandbox mode (register or authenticate).
497
+ * Single place for sandbox contract; used by register() and authenticate().
498
+ */
499
+ private sandboxAuthResult;
491
500
  register(options: RegisterOptions): Promise<Result<RegisterResult, TryMellonError>>;
492
501
  authenticate(options: AuthenticateOptions): Promise<Result<AuthenticateResult, TryMellonError>>;
493
502
  validateSession(sessionToken: string): Promise<Result<SessionValidateResponse, TryMellonError>>;
@@ -510,6 +519,7 @@ declare class TryMellon {
510
519
  session_token: string;
511
520
  user_id: string;
512
521
  }, TryMellonError>>;
522
+ getContext: (sessionId: string) => Promise<Result<CrossDeviceContextResult, TryMellonError>>;
513
523
  approve: (sessionId: string) => Promise<Result<void, TryMellonError>>;
514
524
  };
515
525
  recoverAccount: (options: RecoverAccountOptions) => Promise<Result<RecoverAccountResult, TryMellonError>>;
package/dist/vue.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { InjectionKey, Ref } from 'vue';
2
- import { T as TryMellon, R as Result, a as RegisterResult, b as TryMellonError, c as RegisterOptions, A as AuthenticateResult, d as AuthenticateOptions } from './trymellon-BkIVfr7x.cjs';
2
+ import { T as TryMellon, R as Result, a as RegisterResult, b as TryMellonError, c as RegisterOptions, A as AuthenticateResult, d as AuthenticateOptions } from './trymellon-NWZ51vgt.cjs';
3
3
 
4
4
  declare const TryMellonKey: InjectionKey<TryMellon>;
5
5
  declare function provideTryMellon(client: TryMellon): void;
package/dist/vue.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { InjectionKey, Ref } from 'vue';
2
- import { T as TryMellon, R as Result, a as RegisterResult, b as TryMellonError, c as RegisterOptions, A as AuthenticateResult, d as AuthenticateOptions } from './trymellon-BkIVfr7x.js';
2
+ import { T as TryMellon, R as Result, a as RegisterResult, b as TryMellonError, c as RegisterOptions, A as AuthenticateResult, d as AuthenticateOptions } from './trymellon-NWZ51vgt.js';
3
3
 
4
4
  declare const TryMellonKey: InjectionKey<TryMellon>;
5
5
  declare function provideTryMellon(client: TryMellon): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trymellon/js",
3
- "version": "1.6.2",
3
+ "version": "1.7.2",
4
4
  "description": "SDK oficial de TryMellon para integrar autenticación passwordless con Passkeys / WebAuthn",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",