@oxyhq/contracts 0.13.2 → 0.14.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.
@@ -52,7 +52,7 @@ export const userNameSchema = z
52
52
  *
53
53
  * `.passthrough()` keeps the large tail of profile fields
54
54
  * (`privacySettings`, `locations`, `links`, `linksMetadata`, `bio`,
55
- * `description`, `language`, `verified`, timestamps, …) available to callers
55
+ * `description`, `languages`, `verified`, timestamps, …) available to callers
56
56
  * that need them without enumerating every nested shape here — the load-bearing
57
57
  * identity/display fields are the ones we pin precisely.
58
58
  */
@@ -74,7 +74,13 @@ export const userResponseSchema = z
74
74
  color: z.string().nullable().optional(),
75
75
  name: userNameSchema,
76
76
  verified: z.boolean().optional(),
77
- language: z.string().optional(),
77
+ /**
78
+ * The account's languages as full BCP-47 locales (`language-REGION`,
79
+ * e.g. `es-ES`, `en-US`, `pt-BR`), ordered with the PRIMARY (UI) locale
80
+ * first. `languages[0]` is the primary locale — there is no singular
81
+ * `language` field.
82
+ */
83
+ languages: z.array(z.string()).optional(),
78
84
  /**
79
85
  * The account's self-sovereign identifier
80
86
  * (`did:web:<FEDERATION_DOMAIN>:u:<userId>`). Surfaced as a `User`
@@ -121,7 +127,12 @@ export const userProfileUpdateSchema = z
121
127
  id: z.string().optional(),
122
128
  }))
123
129
  .optional(),
124
- language: z.string().optional(),
130
+ /**
131
+ * Ordered account locales (`language-REGION`), primary first. Replaces
132
+ * the eliminated singular `language`; `languages[0]` is the primary UI
133
+ * locale.
134
+ */
135
+ languages: z.array(z.string()).optional(),
125
136
  accountExpiresAfterInactivityDays: z.number().nullable().optional(),
126
137
  notificationPreferences: z.record(z.unknown()).optional(),
127
138
  userPreferences: z.record(z.unknown()).optional(),