@koolbase/react-native 11.2.0 → 11.4.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 +76 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,82 @@ adheres to [Semantic Versioning][semver].
|
|
|
7
7
|
[kac]: https://keepachangelog.com/en/1.1.0/
|
|
8
8
|
[semver]: https://semver.org/
|
|
9
9
|
|
|
10
|
+
## 11.4.0
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- **`auth.resendVerificationEmailToAddress(email)`** — ask for a new
|
|
15
|
+
verification email with no session.
|
|
16
|
+
|
|
17
|
+
A project requiring verified contact issues no session until the account
|
|
18
|
+
verifies, and refuses login until then. So a user whose verification email
|
|
19
|
+
went to spam, or who waited past the 24-hour link expiry, could not sign in
|
|
20
|
+
to ask for another one — `resendVerificationEmail()` needs the session they
|
|
21
|
+
cannot get. There was no way back except contacting the project's
|
|
22
|
+
developer.
|
|
23
|
+
|
|
24
|
+
Returns nothing and throws only on a malformed request. The server answers
|
|
25
|
+
identically whether the address has an account, has none, or is already
|
|
26
|
+
verified, because anything else would let anyone discover who has signed
|
|
27
|
+
up — so show the same "check your email" either way, and never say "we sent
|
|
28
|
+
it". The per-account cooldown and daily cap still apply; they are simply
|
|
29
|
+
not reported, for the same reason.
|
|
30
|
+
|
|
31
|
+
`resendVerificationEmail()` is unchanged, for a signed-in user who can
|
|
32
|
+
safely be told more.
|
|
33
|
+
|
|
34
|
+
## 11.3.0
|
|
35
|
+
|
|
36
|
+
### Fixed
|
|
37
|
+
|
|
38
|
+
- **Thirty error codes the API emits were not mapped**, so they arrived as
|
|
39
|
+
generic errors and an app's `instanceof` branch silently never ran. The
|
|
40
|
+
worst of them is `revision_mismatch`: the server attaches the current
|
|
41
|
+
record and both revisions to that 409 specifically so a conflict can be
|
|
42
|
+
resolved without a second fetch, and no app could reach any of it.
|
|
43
|
+
`KoolbaseRevisionMismatchError` now carries `expectedRevision`,
|
|
44
|
+
`currentRevision` and `current` as typed fields.
|
|
45
|
+
|
|
46
|
+
Also now catchable: `plan_limit_reached` (as `KoolbasePlanLimitError`,
|
|
47
|
+
shared across database, storage and functions, carrying resource, limit
|
|
48
|
+
and plan), `insufficient_scope`, `idempotency_key_reused` /
|
|
49
|
+
`idempotency_conflict`, `batch_failed`, `duplicate_values`,
|
|
50
|
+
`identity_not_found`, `provider_identity_already_linked`,
|
|
51
|
+
`vector_field_exists`, `field_not_auto_embed`, `invalid_embedding_config`,
|
|
52
|
+
`provider_not_configured`, `provider_invalid`, `upload_url_failed`,
|
|
53
|
+
`slug_taken`, `invitation_invalid`, `project_invalid`, `invalid_body`,
|
|
54
|
+
`no_changes`, the four seed codes, and the generic conflict codes.
|
|
55
|
+
|
|
56
|
+
- **Two mappings were for codes the API does not emit.** `session_expired`
|
|
57
|
+
and `token_revoked` were handled as though the server sent them; it sends
|
|
58
|
+
`invalid_refresh_token`, which already maps to `SessionExpiredError`.
|
|
59
|
+
Removed, along with three message-substring guesses at revocation.
|
|
60
|
+
`TokenRevokedError` stays as a class: explicit revocation is worth
|
|
61
|
+
distinguishing from expiry, but only once the server can establish it —
|
|
62
|
+
a generic 401 cannot, and the SDK must not infer it.
|
|
63
|
+
|
|
64
|
+
- **`restoreSession` no longer clears the stored session on
|
|
65
|
+
`InvalidCredentialsError`.** It means "these credentials are wrong", which
|
|
66
|
+
during a restore points at the project key or the request rather than the
|
|
67
|
+
user's session — and deleting the refresh token on that reading signs
|
|
68
|
+
someone out with no way back. Only a refused refresh clears it now.
|
|
69
|
+
|
|
70
|
+
- **Errors report the code the server sent.**
|
|
71
|
+
`KoolbaseIdempotencyKeyReusedError` hardcoded one code while serving two.
|
|
72
|
+
|
|
73
|
+
### Why these were missing
|
|
74
|
+
|
|
75
|
+
The API wrote error codes through four different helpers, so no single search
|
|
76
|
+
found them all, and the comparison against what these SDKs map took four grep
|
|
77
|
+
patterns and still missed several. The API now declares every code as a
|
|
78
|
+
constant in one file, with a test that fails the build on a literal — so the
|
|
79
|
+
comparison is exact. That is how these thirty were found, and three codes
|
|
80
|
+
nobody had written down anywhere.
|
|
81
|
+
|
|
82
|
+
Every surface here has a test asserting each code maps to its own class and
|
|
83
|
+
reports its own code, so the next one added to the API without a case here
|
|
84
|
+
fails the build rather than a user's upload.
|
|
85
|
+
|
|
10
86
|
## 11.2.0
|
|
11
87
|
|
|
12
88
|
### Fixed
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@koolbase/react-native",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.4.0",
|
|
4
4
|
"description": "React Native SDK for Koolbase \u2014 auth, database, storage, realtime, feature flags, and functions in one package.",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"types": "./dist/esm/index.d.ts",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"url": "https://github.com/koolbase/koolbase-react-native"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@koolbase/core": "11.
|
|
27
|
+
"@koolbase/core": "11.4.0"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"@react-native-async-storage/async-storage": "^3.0.2",
|