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