@faable/auth-sdk 2.7.106 → 2.7.107

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.
@@ -502,22 +502,7 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
502
502
  } | undefined;
503
503
  profile_fields?: {
504
504
  key: string;
505
- type: "string" | "enum"; /**
506
- * `POST /user/{user_id}/passkey-prompt/reset` — operationId: `user/resetPasskeyPrompt`
507
- *
508
- * Reset a user's passkey offer counter
509
- *
510
- * The post-login "create a passkey" offer stops after `login_methods.passkey_promotion_max_prompts` times and snoozes between them. This clears both, so the user is offered a passkey again on their next login — for "why does it keep asking" and "please ask me again" alike.
511
- *
512
- * @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
513
- * @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
514
- * @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
515
- * @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
516
- * @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
517
- * @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
518
- * @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
519
- * @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
520
- */
505
+ type: "string" | "enum";
521
506
  options?: string[] | undefined;
522
507
  max_length?: number | undefined;
523
508
  }[] | null | undefined;
@@ -587,22 +572,7 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
587
572
  } | undefined;
588
573
  profile_fields?: {
589
574
  key: string;
590
- type: "string" | "enum"; /**
591
- * `POST /user/{user_id}/passkey-prompt/reset` — operationId: `user/resetPasskeyPrompt`
592
- *
593
- * Reset a user's passkey offer counter
594
- *
595
- * The post-login "create a passkey" offer stops after `login_methods.passkey_promotion_max_prompts` times and snoozes between them. This clears both, so the user is offered a passkey again on their next login — for "why does it keep asking" and "please ask me again" alike.
596
- *
597
- * @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
598
- * @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
599
- * @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
600
- * @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
601
- * @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
602
- * @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
603
- * @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
604
- * @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
605
- */
575
+ type: "string" | "enum";
606
576
  options?: string[] | undefined;
607
577
  max_length?: number | undefined;
608
578
  }[] | null | undefined;
@@ -675,22 +645,7 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
675
645
  } | undefined;
676
646
  profile_fields?: {
677
647
  key: string;
678
- type: "string" | "enum"; /**
679
- * `POST /user/{user_id}/passkey-prompt/reset` — operationId: `user/resetPasskeyPrompt`
680
- *
681
- * Reset a user's passkey offer counter
682
- *
683
- * The post-login "create a passkey" offer stops after `login_methods.passkey_promotion_max_prompts` times and snoozes between them. This clears both, so the user is offered a passkey again on their next login — for "why does it keep asking" and "please ask me again" alike.
684
- *
685
- * @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
686
- * @throws {FaableApiError} `unauthorized` (401) — The request carries no valid credentials.
687
- * @throws {FaableApiError} `forbidden` (403) — The credentials are valid but do not allow this operation.
688
- * @throws {FaableApiError} `insufficient_scope` (403) — The token lacks a scope this operation requires. `message` names it.
689
- * @throws {FaableApiError} `user_suspended` (403) — The user is suspended and cannot sign in or be modified.
690
- * @throws {FaableApiError} `account_not_found` (404) — No Auth Account matches the request (domain, header or token).
691
- * @throws {FaableApiError} `too_many_requests` (429) — Rate limit exceeded. Honour the `Retry-After` header.
692
- * @throws {FaableApiError} `internal_error` (500) — Unexpected server error. Retry later; the request id is logged.
693
- */
648
+ type: "string" | "enum";
694
649
  options?: string[] | undefined;
695
650
  max_length?: number | undefined;
696
651
  }[] | null | undefined;
@@ -2820,9 +2775,10 @@ export declare abstract class GeneratedFaableAuthApi extends FaableApi {
2820
2775
  *
2821
2776
  * Set a credential's password
2822
2777
  *
2823
- * Sets or rotates the password for a database credential. Send exactly one of `password` (plaintext, hashed with argon2id) or `password_hash` (a hash exported from another provider: bcrypt, scrypt, Firebase scrypt, PBKDF2 or argon2 — verified on the first login and upgraded to argon2id). The previous password is invalidated immediately. A plaintext password records a `credential.password_changed` audit entry (initiated_by=admin); the confirmation email is only sent when an EXISTING password is rotated. An imported hash records `credential.password_imported` with its algorithm and sends no email. Neither the password nor the hash is ever returned or logged.
2778
+ * Sets or rotates the password for a database credential. Send exactly one of `password` (plaintext, hashed with argon2id) or `password_hash` (a hash exported from another provider: bcrypt, scrypt, Firebase scrypt, PBKDF2 or argon2 — verified on the first login and upgraded to argon2id). A plaintext password must meet the password policy of the connection the credential belongs to (`password_too_weak` lists what is missing); an imported hash cannot be checked and is not. The previous password is invalidated immediately. A plaintext password records a `credential.password_changed` audit entry (initiated_by=admin); the confirmation email is only sent when an EXISTING password is rotated. An imported hash records `credential.password_imported` with its algorithm and sends no email. Neither the password nor the hash is ever returned or logged.
2824
2779
  *
2825
2780
  * @throws {FaableApiError} `bad_request` (400) — The request is malformed. `message` says what is wrong.
2781
+ * @throws {FaableApiError} `password_too_weak` (400) — The password does not meet the connection policy. `message` lists each unmet rule.
2826
2782
  * @throws {FaableApiError} `invalid_password_hash` (400) — The imported password hash cannot be read, or its cost is above what a login can afford. `message` names the field.
2827
2783
  * @throws {FaableApiError} `weak_password_hash` (400) — The imported password hash uses a fast digest (MD5, SHA-1, SHA-2) or a cost below the minimum. `message` says which.
2828
2784
  * @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
@@ -805,9 +805,10 @@ export class GeneratedFaableAuthApi extends FaableApi {
805
805
  *
806
806
  * Set a credential's password
807
807
  *
808
- * Sets or rotates the password for a database credential. Send exactly one of `password` (plaintext, hashed with argon2id) or `password_hash` (a hash exported from another provider: bcrypt, scrypt, Firebase scrypt, PBKDF2 or argon2 — verified on the first login and upgraded to argon2id). The previous password is invalidated immediately. A plaintext password records a `credential.password_changed` audit entry (initiated_by=admin); the confirmation email is only sent when an EXISTING password is rotated. An imported hash records `credential.password_imported` with its algorithm and sends no email. Neither the password nor the hash is ever returned or logged.
808
+ * Sets or rotates the password for a database credential. Send exactly one of `password` (plaintext, hashed with argon2id) or `password_hash` (a hash exported from another provider: bcrypt, scrypt, Firebase scrypt, PBKDF2 or argon2 — verified on the first login and upgraded to argon2id). A plaintext password must meet the password policy of the connection the credential belongs to (`password_too_weak` lists what is missing); an imported hash cannot be checked and is not. The previous password is invalidated immediately. A plaintext password records a `credential.password_changed` audit entry (initiated_by=admin); the confirmation email is only sent when an EXISTING password is rotated. An imported hash records `credential.password_imported` with its algorithm and sends no email. Neither the password nor the hash is ever returned or logged.
809
809
  *
810
810
  * @throws {FaableApiError} `bad_request` (400) — The request is malformed. `message` says what is wrong.
811
+ * @throws {FaableApiError} `password_too_weak` (400) — The password does not meet the connection policy. `message` lists each unmet rule.
811
812
  * @throws {FaableApiError} `invalid_password_hash` (400) — The imported password hash cannot be read, or its cost is above what a login can afford. `message` names the field.
812
813
  * @throws {FaableApiError} `weak_password_hash` (400) — The imported password hash uses a fast digest (MD5, SHA-1, SHA-2) or a cost below the minimum. `message` says which.
813
814
  * @throws {FaableApiError} `validation_error` (400) — The body, query or path failed schema validation. `details.issues` lists each failing field.
@@ -1051,7 +1051,7 @@ export interface paths {
1051
1051
  put?: never;
1052
1052
  /**
1053
1053
  * Set a credential's password
1054
- * @description Sets or rotates the password for a database credential. Send exactly one of `password` (plaintext, hashed with argon2id) or `password_hash` (a hash exported from another provider: bcrypt, scrypt, Firebase scrypt, PBKDF2 or argon2 — verified on the first login and upgraded to argon2id). The previous password is invalidated immediately. A plaintext password records a `credential.password_changed` audit entry (initiated_by=admin); the confirmation email is only sent when an EXISTING password is rotated. An imported hash records `credential.password_imported` with its algorithm and sends no email. Neither the password nor the hash is ever returned or logged.
1054
+ * @description Sets or rotates the password for a database credential. Send exactly one of `password` (plaintext, hashed with argon2id) or `password_hash` (a hash exported from another provider: bcrypt, scrypt, Firebase scrypt, PBKDF2 or argon2 — verified on the first login and upgraded to argon2id). A plaintext password must meet the password policy of the connection the credential belongs to (`password_too_weak` lists what is missing); an imported hash cannot be checked and is not. The previous password is invalidated immediately. A plaintext password records a `credential.password_changed` audit entry (initiated_by=admin); the confirmation email is only sent when an EXISTING password is rotated. An imported hash records `credential.password_imported` with its algorithm and sends no email. Neither the password nor the hash is ever returned or logged.
1055
1055
  */
1056
1056
  post: operations["credentials/setPassword"];
1057
1057
  delete?: never;
@@ -17926,6 +17926,8 @@ export interface operations {
17926
17926
  /**
17927
17927
  * @description `bad_request` — The request is malformed. `message` says what is wrong.
17928
17928
  *
17929
+ * `password_too_weak` — The password does not meet the connection policy. `message` lists each unmet rule.
17930
+ *
17929
17931
  * `invalid_password_hash` — The imported password hash cannot be read, or its cost is above what a login can afford. `message` names the field.
17930
17932
  *
17931
17933
  * `weak_password_hash` — The imported password hash uses a fast digest (MD5, SHA-1, SHA-2) or a cost below the minimum. `message` says which.
@@ -17939,7 +17941,7 @@ export interface operations {
17939
17941
  content: {
17940
17942
  "application/json": components["schemas"]["ErrorResponse"] & {
17941
17943
  /** @enum {string} */
17942
- error_code?: "bad_request" | "invalid_password_hash" | "weak_password_hash" | "validation_error";
17944
+ error_code?: "bad_request" | "password_too_weak" | "invalid_password_hash" | "weak_password_hash" | "validation_error";
17943
17945
  };
17944
17946
  };
17945
17947
  };
package/dist/version.js CHANGED
@@ -9,13 +9,13 @@
9
9
  // login pages could not import the SDK at all. Same pattern as auth-js.
10
10
  //
11
11
  // The sentinels MUST stay byte-identical to the `from` values in `.releaserc`.
12
- export const version = "2.7.106";
12
+ export const version = "2.7.107";
13
13
  // Short git SHA of the released commit. The version dates a build; this names
14
14
  // the exact tree, so a canonical log line or an audit entry leads straight to
15
15
  // `git show <sha>`. Deliberately NOT hex: an unreleased build (dev, a local
16
16
  // link) cannot be mistaken for a real commit — auth only records values that
17
17
  // look like a SHA, and this one never will.
18
- export const commit = "d0c2c06";
18
+ export const commit = "720cd27";
19
19
  // What this SDK writes in `x-faable-client`. Exported for a consumer that
20
20
  // builds a strategy on its own (outside `FaableAuthApi`) and still wants the
21
21
  // token request attributed — a bare `authClientCredentials` stamps only what
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faable/auth-sdk",
3
- "version": "2.7.106",
3
+ "version": "2.7.107",
4
4
  "author": "Marc Pomar <marc@faable.com>",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/spec/openapi.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "info": {
4
4
  "title": "@faablecloud/auth",
5
5
  "description": "Auth Platform made by Faable. Manage Users and Roles",
6
- "version": "2.78.1",
6
+ "version": "2.78.2",
7
7
  "license": {
8
8
  "name": "private",
9
9
  "url": "https://faable.com/docs/platform/privacy-policy"
@@ -33411,7 +33411,7 @@
33411
33411
  "tags": [
33412
33412
  "credentials"
33413
33413
  ],
33414
- "description": "Sets or rotates the password for a database credential. Send exactly one of `password` (plaintext, hashed with argon2id) or `password_hash` (a hash exported from another provider: bcrypt, scrypt, Firebase scrypt, PBKDF2 or argon2 — verified on the first login and upgraded to argon2id). The previous password is invalidated immediately. A plaintext password records a `credential.password_changed` audit entry (initiated_by=admin); the confirmation email is only sent when an EXISTING password is rotated. An imported hash records `credential.password_imported` with its algorithm and sends no email. Neither the password nor the hash is ever returned or logged.",
33414
+ "description": "Sets or rotates the password for a database credential. Send exactly one of `password` (plaintext, hashed with argon2id) or `password_hash` (a hash exported from another provider: bcrypt, scrypt, Firebase scrypt, PBKDF2 or argon2 — verified on the first login and upgraded to argon2id). A plaintext password must meet the password policy of the connection the credential belongs to (`password_too_weak` lists what is missing); an imported hash cannot be checked and is not. The previous password is invalidated immediately. A plaintext password records a `credential.password_changed` audit entry (initiated_by=admin); the confirmation email is only sent when an EXISTING password is rotated. An imported hash records `credential.password_imported` with its algorithm and sends no email. Neither the password nor the hash is ever returned or logged.",
33415
33415
  "requestBody": {
33416
33416
  "required": true,
33417
33417
  "content": {
@@ -33570,7 +33570,7 @@
33570
33570
  }
33571
33571
  },
33572
33572
  "400": {
33573
- "description": "`bad_request` — The request is malformed. `message` says what is wrong.\n\n`invalid_password_hash` — The imported password hash cannot be read, or its cost is above what a login can afford. `message` names the field.\n\n`weak_password_hash` — The imported password hash uses a fast digest (MD5, SHA-1, SHA-2) or a cost below the minimum. `message` says which.\n\n`validation_error` — The body, query or path failed schema validation. `details.issues` lists each failing field.",
33573
+ "description": "`bad_request` — The request is malformed. `message` says what is wrong.\n\n`password_too_weak` — The password does not meet the connection policy. `message` lists each unmet rule.\n\n`invalid_password_hash` — The imported password hash cannot be read, or its cost is above what a login can afford. `message` names the field.\n\n`weak_password_hash` — The imported password hash uses a fast digest (MD5, SHA-1, SHA-2) or a cost below the minimum. `message` says which.\n\n`validation_error` — The body, query or path failed schema validation. `details.issues` lists each failing field.",
33574
33574
  "content": {
33575
33575
  "application/json": {
33576
33576
  "schema": {
@@ -33585,6 +33585,7 @@
33585
33585
  "type": "string",
33586
33586
  "enum": [
33587
33587
  "bad_request",
33588
+ "password_too_weak",
33588
33589
  "invalid_password_hash",
33589
33590
  "weak_password_hash",
33590
33591
  "validation_error"