@oxyhq/contracts 0.5.0 → 0.6.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/dist/cjs/userResponse.js
CHANGED
|
@@ -42,14 +42,16 @@ exports.userNameSchema = zod_1.z
|
|
|
42
42
|
first: zod_1.z.string().optional(),
|
|
43
43
|
last: zod_1.z.string().optional(),
|
|
44
44
|
full: zod_1.z.string().optional(),
|
|
45
|
-
displayName: zod_1.z.string(),
|
|
45
|
+
displayName: zod_1.z.string().optional(),
|
|
46
46
|
})
|
|
47
47
|
.passthrough();
|
|
48
48
|
/**
|
|
49
49
|
* The canonical user object emitted by `formatUserResponse`.
|
|
50
50
|
*
|
|
51
|
-
* `id`
|
|
52
|
-
*
|
|
51
|
+
* `id` is present on formatted user DTOs. `name.displayName` is OPTIONAL on the
|
|
52
|
+
* contract — the API still synthesizes a default today, but consumers must not
|
|
53
|
+
* assume it is present and should fall back to a handle when it is absent. The
|
|
54
|
+
* rest is forwarded from the user document and may be absent depending on the query's
|
|
53
55
|
* `.select(...)`/`.lean()` projection. Both `id` and `_id` are accepted because
|
|
54
56
|
* some raw-document responses carry `_id` instead of `id`; resolve the
|
|
55
57
|
* identifier with {@link resolveUserId}.
|