@passflow/core 0.39.1 → 0.39.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/index.d.cts CHANGED
@@ -1417,13 +1417,26 @@ export declare const TWO_FACTOR_SEND_LIMIT_ERROR_ID = "error.2fa.rate_limit_exce
1417
1417
  export declare const RECOVERY_CODES_STEP_UP_REQUIRED_ERROR_ID = "error.2fa.recovery_codes.step_up_required";
1418
1418
  /** Id of the 403 a profile save answers with when a change of email or phone number needs a proof. */
1419
1419
  export declare const ADDRESS_CHANGE_PROOF_REQUIRED_ERROR_ID = "error.user.address.change.proof.required";
1420
+ /**
1421
+ * What a refused login-code send answers beside the error: the challenge the sign-in goes on with
1422
+ * (the live code, if one was sent before), the method to suggest, and the methods to switch to. The
1423
+ * refused method is never among `alternative_methods`, which is absent when there are none.
1424
+ */
1425
+ export type TwoFactorSendRefusalChallenge = {
1426
+ challenge_id: string;
1427
+ suggested_method?: TwoFactorMethod;
1428
+ alternative_methods?: TwoFactorMethod[];
1429
+ };
1420
1430
  /**
1421
1431
  * No code was sent: the user's monthly text quota is spent (429). Use another method or try again
1422
1432
  * next month.
1423
1433
  */
1424
1434
  export declare class PassflowSmsQuotaExceededError extends PassflowError {
1435
+ /** The sign-in's challenge to go on with; undefined when the answer carried no `challenge_id`. */
1436
+ readonly challenge?: TwoFactorSendRefusalChallenge;
1425
1437
  constructor(error: PassflowResponseError['error'], options?: {
1426
1438
  cause?: unknown;
1439
+ challenge?: TwoFactorSendRefusalChallenge;
1427
1440
  });
1428
1441
  }
1429
1442
  /**
@@ -1433,8 +1446,11 @@ export declare class PassflowSmsQuotaExceededError extends PassflowError {
1433
1446
  export declare class PassflowSendLimitError extends PassflowError {
1434
1447
  /** Seconds to wait, from `Retry-After`; undefined when the server sent none. */
1435
1448
  readonly retryAfter?: number;
1449
+ /** The sign-in's challenge to go on with; undefined when the answer carried no `challenge_id`. */
1450
+ readonly challenge?: TwoFactorSendRefusalChallenge;
1436
1451
  constructor(error: PassflowResponseError['error'], retryAfter?: number, options?: {
1437
1452
  cause?: unknown;
1453
+ challenge?: TwoFactorSendRefusalChallenge;
1438
1454
  });
1439
1455
  }
1440
1456
  /**
package/dist/index.d.ts CHANGED
@@ -1417,13 +1417,26 @@ export declare const TWO_FACTOR_SEND_LIMIT_ERROR_ID = "error.2fa.rate_limit_exce
1417
1417
  export declare const RECOVERY_CODES_STEP_UP_REQUIRED_ERROR_ID = "error.2fa.recovery_codes.step_up_required";
1418
1418
  /** Id of the 403 a profile save answers with when a change of email or phone number needs a proof. */
1419
1419
  export declare const ADDRESS_CHANGE_PROOF_REQUIRED_ERROR_ID = "error.user.address.change.proof.required";
1420
+ /**
1421
+ * What a refused login-code send answers beside the error: the challenge the sign-in goes on with
1422
+ * (the live code, if one was sent before), the method to suggest, and the methods to switch to. The
1423
+ * refused method is never among `alternative_methods`, which is absent when there are none.
1424
+ */
1425
+ export type TwoFactorSendRefusalChallenge = {
1426
+ challenge_id: string;
1427
+ suggested_method?: TwoFactorMethod;
1428
+ alternative_methods?: TwoFactorMethod[];
1429
+ };
1420
1430
  /**
1421
1431
  * No code was sent: the user's monthly text quota is spent (429). Use another method or try again
1422
1432
  * next month.
1423
1433
  */
1424
1434
  export declare class PassflowSmsQuotaExceededError extends PassflowError {
1435
+ /** The sign-in's challenge to go on with; undefined when the answer carried no `challenge_id`. */
1436
+ readonly challenge?: TwoFactorSendRefusalChallenge;
1425
1437
  constructor(error: PassflowResponseError['error'], options?: {
1426
1438
  cause?: unknown;
1439
+ challenge?: TwoFactorSendRefusalChallenge;
1427
1440
  });
1428
1441
  }
1429
1442
  /**
@@ -1433,8 +1446,11 @@ export declare class PassflowSmsQuotaExceededError extends PassflowError {
1433
1446
  export declare class PassflowSendLimitError extends PassflowError {
1434
1447
  /** Seconds to wait, from `Retry-After`; undefined when the server sent none. */
1435
1448
  readonly retryAfter?: number;
1449
+ /** The sign-in's challenge to go on with; undefined when the answer carried no `challenge_id`. */
1450
+ readonly challenge?: TwoFactorSendRefusalChallenge;
1436
1451
  constructor(error: PassflowResponseError['error'], retryAfter?: number, options?: {
1437
1452
  cause?: unknown;
1453
+ challenge?: TwoFactorSendRefusalChallenge;
1438
1454
  });
1439
1455
  }
1440
1456
  /**