@fleetless/sdk 4.2.0-next.1 → 4.3.0
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/CHANGELOG.md +18 -1
- package/dist/index.cjs +1139 -414
- package/dist/index.d.cts +223 -27
- package/dist/index.d.ts +223 -27
- package/dist/index.js +1139 -414
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,7 +4,24 @@ All notable changes to `@fleetless/sdk`. The format follows Keep a Changelog; th
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## [4.3.0] — 2026-10-02
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- **`client.auth.requestLoginCode(email)` / `verifyLoginCode(email, code)`** — the password-free sign-in: a six-digit code mailed to `email`, valid ten minutes, spent against `verifyLoginCode` for a `SignInResult` exactly like `login`. `requestLoginCode` resolves on the policy-allowed `202` whether or not the address names an account, same enumeration discipline as `register`/`resendVerification`/`requestPasswordReset`.
|
|
12
|
+
- **`client.auth.verifyTwoFactor({ challenge, code?, recoveryCode? })`** — answers the second-factor challenge a sign-in step can now return (see `SignInResult` below); saves the session unconditionally and resolves `void`.
|
|
13
|
+
- **`client.auth.beginTwoFactorSetup(input?)` / `confirmTwoFactorSetup(input)`** — sets a TOTP authenticator up, either mid sign-in (pass the `challenge` a `two_factor_setup_required` result carried) or from the app's own account settings (no `challenge`, the current session is the credential). `confirmTwoFactorSetup` resolves the ten one-time recovery codes.
|
|
14
|
+
- **`client.auth.disableTwoFactor(code)`** — turns the signed-in app user's authenticator off; a current code proves the person still holds it before it and every recovery code are removed.
|
|
15
|
+
- **`client.auth.signInMethods()`** — which credential-based sign-in methods (`password`, `emailCode`) the app has on, for drawing the right fields on your own login screen; the federated buttons stay `listProviders()`'s own answer. Public and unauthenticated, same route as `listProviders()`.
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- **`login`, `verifyEmail`, `confirmPasswordReset` and `acceptInvitation` now resolve a `SignInResult`** (`{ status: 'signed_in' }` or a two-factor challenge: `{ status: 'two_factor_required' | 'two_factor_setup_required', challenge }`), not `void`. An app without two-factor on at all always sees `signed_in`, and code that ignored the previous `void` still compiles — but a caller that wants to *handle* a second factor now has to look at `status` rather than assuming the session was always stored. The session is saved only for `signed_in`; for either challenge status nothing is stored yet, and `me()` called in that window rejects the SDK's own `no_session`, client-side, before any request.
|
|
20
|
+
- **`register`'s and `acceptInvitation`'s `password` is now optional** (`password?: string`) — an app whose `sign_in_methods` is email-code only has no password to set, and the key is genuinely omitted from the wire body, not sent as `password: undefined`.
|
|
21
|
+
|
|
22
|
+
## [4.2.0] — 2026-09-30
|
|
23
|
+
|
|
24
|
+
Built against `@fleetless/contracts` 5.1.0.
|
|
8
25
|
|
|
9
26
|
### Added
|
|
10
27
|
|