refactor(schemas): group network schemas by direction
Move request and response schemas into matching subdirectories, extract the shared chat lock type, and update barrels and imports without changing wire formats.
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* Facebook PSID 登录响应
|
||||
*/
|
||||
import { z } from "zod";
|
||||
|
||||
import {
|
||||
booleanOrFalse,
|
||||
schemaOrNull,
|
||||
stringOrEmpty,
|
||||
} from "../../nullable-defaults";
|
||||
import { UserSchema } from "../../user/user";
|
||||
|
||||
export const FacebookPsidLoginResponseSchema = z.object({
|
||||
token: z.string(),
|
||||
refreshToken: stringOrEmpty,
|
||||
matchedBy: stringOrEmpty,
|
||||
fbAsid: stringOrEmpty,
|
||||
fbPsid: stringOrEmpty,
|
||||
hasCompleteFacebookIdentity: booleanOrFalse,
|
||||
isGuest: booleanOrFalse,
|
||||
user: schemaOrNull(UserSchema),
|
||||
userId: stringOrEmpty,
|
||||
});
|
||||
|
||||
export type FacebookPsidLoginResponseInput = z.input<
|
||||
typeof FacebookPsidLoginResponseSchema
|
||||
>;
|
||||
export type FacebookPsidLoginResponseData = z.output<
|
||||
typeof FacebookPsidLoginResponseSchema
|
||||
>;
|
||||
Reference in New Issue
Block a user