[Fix] Connections
This commit is contained in:
parent
94f11f60f6
commit
74fb46990e
14 changed files with 950 additions and 507 deletions
|
|
@ -148,7 +148,7 @@ const userFields = {
|
|||
About: z.string().max(255).optional(),
|
||||
Avatar: z.string().optional(),
|
||||
Display: z.string().min(1).max(15),
|
||||
IotaId: z.number(),
|
||||
IotaId: z.number().optional(),
|
||||
OmikronConnections: z.array(z.number()),
|
||||
OmikronId: z.number().optional(),
|
||||
PublicKey: z.base64(),
|
||||
|
|
@ -240,6 +240,27 @@ export const mtp = {
|
|||
}),
|
||||
response: userSchema,
|
||||
},
|
||||
GetIotaData: {
|
||||
request: z
|
||||
.object({
|
||||
IotaId: z.number().int().positive().optional(),
|
||||
UserId: z.number().int().positive().optional(),
|
||||
Username: z.string().min(1).max(15).optional(),
|
||||
})
|
||||
.refine(
|
||||
({ IotaId, UserId, Username }) =>
|
||||
[IotaId, UserId, Username].filter((value) => value !== undefined)
|
||||
.length === 1,
|
||||
"GetIotaData requires exactly one selector",
|
||||
),
|
||||
response: z.object({
|
||||
IotaId: z.number().int().positive(),
|
||||
PublicKey: z.base64(),
|
||||
OmikronConnections: z.array(z.number().int().positive()).optional(),
|
||||
UserId: z.number().int().positive().optional(),
|
||||
Username: z.string().optional(),
|
||||
}),
|
||||
},
|
||||
GetStates: {
|
||||
request: z.object({
|
||||
SessionId: z.number().int().positive(),
|
||||
|
|
|
|||
Loading…
Reference in a new issue