feat: port scenario 903 select-pool flow

This commit is contained in:
2026-07-30 23:27:59 +00:00
parent 9bd057456b
commit 115218ded8
80 changed files with 6859 additions and 48 deletions
+4 -1
View File
@@ -24,6 +24,7 @@ export interface GatewayUserInfo {
displayName: string;
roles: string[];
createdAt?: string;
legacyMemberNo?: number;
}
export interface GameSessionTokenPayload {
@@ -82,7 +83,9 @@ const parsePayload = (value: unknown): GameSessionTokenPayload | null => {
typeof user.id !== 'string' ||
typeof user.username !== 'string' ||
typeof user.displayName !== 'string' ||
!Array.isArray(user.roles)
!Array.isArray(user.roles) ||
(user.legacyMemberNo !== undefined &&
(!Number.isSafeInteger(user.legacyMemberNo) || user.legacyMemberNo <= 0))
) {
return null;
}
+38
View File
@@ -204,6 +204,22 @@ export type TurnDaemonCommand =
specialWar?: string;
};
}
| {
type: 'selectPoolCreate';
requestId?: string;
userId: string;
ownerDisplayName: string;
uniqueName: string;
personality: string;
seedOwnerIdentity: string | number;
}
| {
type: 'selectPoolReselect';
requestId?: string;
userId: string;
ownerDisplayName: string;
uniqueName: string;
}
| {
type: 'auctionBid';
requestId?: string;
@@ -460,6 +476,28 @@ export type TurnDaemonCommandResult =
generalId: number;
reason: string;
}
| {
type: 'selectPoolCreate';
ok: true;
generalId: number;
}
| {
type: 'selectPoolCreate';
ok: false;
code: 'BAD_REQUEST' | 'PRECONDITION_FAILED' | 'CONFLICT' | 'INTERNAL_SERVER_ERROR';
reason: string;
}
| {
type: 'selectPoolReselect';
ok: true;
generalId: number;
}
| {
type: 'selectPoolReselect';
ok: false;
code: 'BAD_REQUEST' | 'PRECONDITION_FAILED' | 'CONFLICT' | 'INTERNAL_SERVER_ERROR';
reason: string;
}
| {
type: 'auctionBid';
ok: true;