feat(chat): sync multi-role backend APIs
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
import { z } from "zod";
|
||||
|
||||
import { arrayOrEmpty, booleanOrFalse, numberOrZero } from "../nullable-defaults";
|
||||
|
||||
export const CharacterCapabilitiesResponseSchema = z
|
||||
.object({
|
||||
chat: booleanOrFalse,
|
||||
privateContent: booleanOrFalse,
|
||||
})
|
||||
.readonly();
|
||||
|
||||
export const CharacterListItemSchema = z
|
||||
.object({
|
||||
id: z.string().min(1),
|
||||
displayName: z.string().min(1),
|
||||
isActive: booleanOrFalse,
|
||||
capabilities: CharacterCapabilitiesResponseSchema,
|
||||
sortOrder: numberOrZero,
|
||||
})
|
||||
.readonly();
|
||||
|
||||
export const CharacterListResponseSchema = z
|
||||
.object({
|
||||
items: arrayOrEmpty(CharacterListItemSchema),
|
||||
defaultCharacterId: z.string().min(1),
|
||||
})
|
||||
.readonly();
|
||||
|
||||
export type CharacterListItem = z.output<typeof CharacterListItemSchema>;
|
||||
export type CharacterListResponseInput = z.input<typeof CharacterListResponseSchema>;
|
||||
export type CharacterListResponse = z.output<typeof CharacterListResponseSchema>;
|
||||
@@ -0,0 +1 @@
|
||||
export * from "./character_list_response";
|
||||
Reference in New Issue
Block a user