@oxyhq/core 3.4.15 → 3.4.16
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/README.md +7 -2
- package/dist/cjs/.tsbuildinfo +1 -1
- package/dist/cjs/utils/accountUtils.js +5 -9
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/utils/accountUtils.js +5 -9
- package/dist/types/.tsbuildinfo +1 -1
- package/dist/types/models/interfaces.d.ts +2 -0
- package/dist/types/utils/accountUtils.d.ts +4 -14
- package/package.json +1 -1
- package/src/models/interfaces.ts +2 -0
- package/src/utils/__tests__/accountUtils.test.ts +10 -22
- package/src/utils/accountUtils.ts +6 -16
- package/src/utils/asyncUtils.ts +1 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
OxyHQ SDK Foundation. Platform-agnostic core library that works in Node.js, browser, and React Native environments. No React dependency.
|
|
4
4
|
|
|
5
|
-
**Current published version: 3.4.
|
|
5
|
+
**Current published version: 3.4.16**
|
|
6
6
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
|
@@ -21,7 +21,7 @@ bun add @oxyhq/core
|
|
|
21
21
|
- **Platform detection utilities**
|
|
22
22
|
- **Device management**
|
|
23
23
|
- **Linked clients** for app backends that need the active Oxy bearer token
|
|
24
|
-
- **User identity and handle normalization** so SDK user payloads expose `id` and apps build local/federated profile handles consistently
|
|
24
|
+
- **User identity contracts and handle normalization** so SDK user payloads expose required `id`/`displayName` fields and apps build local/federated profile handles consistently
|
|
25
25
|
- **Server middleware** for Express request identity and per-user rate limiting
|
|
26
26
|
|
|
27
27
|
## Exports
|
|
@@ -58,6 +58,11 @@ const id = getNormalizedUserId(user);
|
|
|
58
58
|
const normalizedUser = normalizeUserIdentity(user);
|
|
59
59
|
```
|
|
60
60
|
|
|
61
|
+
`User.displayName` is a required API contract. The API composes it server-side
|
|
62
|
+
from the structured name when present, otherwise from the username/server
|
|
63
|
+
fallback. UI consumers should render `displayName` directly instead of rebuilding
|
|
64
|
+
names from `name.first`, `name.last`, `name.full`, or `username`.
|
|
65
|
+
|
|
61
66
|
For profile display/routing, use `getNormalizedUserHandle()`. It strips a
|
|
62
67
|
leading `@`, preserves an existing `user@instance` handle, and appends
|
|
63
68
|
`instance`/`federation.domain` only for federated users:
|