@oxyhq/contracts 0.9.1 → 0.10.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/esm/index.js CHANGED
@@ -11,7 +11,7 @@
11
11
  */
12
12
  export {
13
13
  // Schemas
14
- userNameSchema, userResponseSchema, userProfileUpdateSchema, refreshAllAccountSchema, refreshAllResponseSchema, currentUserResponseSchema, deviceSessionAccountSchema, deviceSessionsResponseSchema,
14
+ userNameSchema, userResponseSchema, userProfileUpdateSchema, currentUserResponseSchema, deviceSessionAccountSchema, deviceSessionsResponseSchema,
15
15
  // Helpers
16
16
  resolveUserId, safeParseContract, } from './userResponse.js';
17
17
  export {
@@ -131,28 +131,6 @@ export const userProfileUpdateSchema = z
131
131
  export function resolveUserId(user) {
132
132
  return user.id ?? user._id;
133
133
  }
134
- /**
135
- * One rotated account entry from `POST /auth/refresh-all`.
136
- *
137
- * `authuser` is the device-local slot index (`0..N-1`). `user` is the canonical
138
- * {@link userResponseSchema} shape (the handler projects a whitelist and runs it
139
- * through `formatUserResponse`).
140
- */
141
- export const refreshAllAccountSchema = z.object({
142
- authuser: z.number().int().nonnegative(),
143
- accessToken: z.string(),
144
- expiresAt: z.string(),
145
- sessionId: z.string(),
146
- user: userResponseSchema,
147
- });
148
- /**
149
- * Wire shape of `POST /auth/refresh-all`: every valid device-local account,
150
- * sorted by `authuser` ascending. An empty `accounts` array means "no signed-in
151
- * accounts on this device" — the IdP must show the sign-in form.
152
- */
153
- export const refreshAllResponseSchema = z.object({
154
- accounts: z.array(refreshAllAccountSchema),
155
- });
156
134
  /**
157
135
  * Wire shape of `GET /users/me` — the API success envelope (`{ data: <user> }`)
158
136
  * wrapping the current-user DTO. Some older producers use `_id` instead of