2024-01-19 12:51:49 +01:00
|
|
|
/*
|
2024-02-13 16:59:27 +01:00
|
|
|
* SPDX-FileCopyrightText: syuilo and misskey-project
|
2024-01-19 12:51:49 +01:00
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
*/
|
|
|
|
|
|
|
|
export const packedReversiGameLiteSchema = {
|
|
|
|
type: 'object',
|
|
|
|
properties: {
|
|
|
|
id: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
format: 'id',
|
|
|
|
},
|
|
|
|
createdAt: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
format: 'date-time',
|
|
|
|
},
|
|
|
|
startedAt: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: true,
|
|
|
|
format: 'date-time',
|
|
|
|
},
|
2024-01-21 02:07:43 +01:00
|
|
|
endedAt: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: true,
|
|
|
|
format: 'date-time',
|
|
|
|
},
|
2024-01-19 12:51:49 +01:00
|
|
|
isStarted: {
|
|
|
|
type: 'boolean',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
|
|
|
isEnded: {
|
|
|
|
type: 'boolean',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
|
|
|
user1Id: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
format: 'id',
|
|
|
|
},
|
|
|
|
user2Id: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
format: 'id',
|
|
|
|
},
|
|
|
|
user1: {
|
|
|
|
type: 'object',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
ref: 'User',
|
|
|
|
},
|
|
|
|
user2: {
|
|
|
|
type: 'object',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
ref: 'User',
|
|
|
|
},
|
|
|
|
winnerId: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: true,
|
|
|
|
format: 'id',
|
|
|
|
},
|
|
|
|
winner: {
|
|
|
|
type: 'object',
|
|
|
|
optional: false, nullable: true,
|
|
|
|
ref: 'User',
|
|
|
|
},
|
2024-01-21 02:07:43 +01:00
|
|
|
surrenderedUserId: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: true,
|
|
|
|
format: 'id',
|
|
|
|
},
|
|
|
|
timeoutUserId: {
|
2024-01-19 12:51:49 +01:00
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: true,
|
|
|
|
format: 'id',
|
|
|
|
},
|
|
|
|
black: {
|
|
|
|
type: 'number',
|
|
|
|
optional: false, nullable: true,
|
|
|
|
},
|
|
|
|
bw: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
2024-01-24 08:37:06 +01:00
|
|
|
noIrregularRules: {
|
|
|
|
type: 'boolean',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
2024-01-19 12:51:49 +01:00
|
|
|
isLlotheo: {
|
|
|
|
type: 'boolean',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
|
|
|
canPutEverywhere: {
|
|
|
|
type: 'boolean',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
|
|
|
loopedBoard: {
|
|
|
|
type: 'boolean',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
2024-01-21 02:07:43 +01:00
|
|
|
timeLimitForEachTurn: {
|
|
|
|
type: 'number',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
2024-01-19 12:51:49 +01:00
|
|
|
},
|
|
|
|
} as const;
|
|
|
|
|
|
|
|
export const packedReversiGameDetailedSchema = {
|
|
|
|
type: 'object',
|
|
|
|
properties: {
|
|
|
|
id: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
format: 'id',
|
|
|
|
},
|
|
|
|
createdAt: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
format: 'date-time',
|
|
|
|
},
|
|
|
|
startedAt: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: true,
|
|
|
|
format: 'date-time',
|
|
|
|
},
|
2024-01-21 02:07:43 +01:00
|
|
|
endedAt: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: true,
|
|
|
|
format: 'date-time',
|
|
|
|
},
|
2024-01-19 12:51:49 +01:00
|
|
|
isStarted: {
|
|
|
|
type: 'boolean',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
|
|
|
isEnded: {
|
|
|
|
type: 'boolean',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
|
|
|
form1: {
|
2024-01-22 10:01:54 +01:00
|
|
|
type: 'object',
|
2024-01-19 12:51:49 +01:00
|
|
|
optional: false, nullable: true,
|
|
|
|
},
|
|
|
|
form2: {
|
2024-01-22 10:01:54 +01:00
|
|
|
type: 'object',
|
2024-01-19 12:51:49 +01:00
|
|
|
optional: false, nullable: true,
|
|
|
|
},
|
|
|
|
user1Ready: {
|
|
|
|
type: 'boolean',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
|
|
|
user2Ready: {
|
|
|
|
type: 'boolean',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
|
|
|
user1Id: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
format: 'id',
|
|
|
|
},
|
|
|
|
user2Id: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
format: 'id',
|
|
|
|
},
|
|
|
|
user1: {
|
|
|
|
type: 'object',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
ref: 'User',
|
|
|
|
},
|
|
|
|
user2: {
|
|
|
|
type: 'object',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
ref: 'User',
|
|
|
|
},
|
|
|
|
winnerId: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: true,
|
|
|
|
format: 'id',
|
|
|
|
},
|
|
|
|
winner: {
|
|
|
|
type: 'object',
|
|
|
|
optional: false, nullable: true,
|
|
|
|
ref: 'User',
|
|
|
|
},
|
2024-01-21 02:07:43 +01:00
|
|
|
surrenderedUserId: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: true,
|
|
|
|
format: 'id',
|
|
|
|
},
|
|
|
|
timeoutUserId: {
|
2024-01-19 12:51:49 +01:00
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: true,
|
|
|
|
format: 'id',
|
|
|
|
},
|
|
|
|
black: {
|
|
|
|
type: 'number',
|
|
|
|
optional: false, nullable: true,
|
|
|
|
},
|
|
|
|
bw: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
2024-01-24 08:37:06 +01:00
|
|
|
noIrregularRules: {
|
|
|
|
type: 'boolean',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
2024-01-19 12:51:49 +01:00
|
|
|
isLlotheo: {
|
|
|
|
type: 'boolean',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
|
|
|
canPutEverywhere: {
|
|
|
|
type: 'boolean',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
|
|
|
loopedBoard: {
|
|
|
|
type: 'boolean',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
2024-01-21 02:07:43 +01:00
|
|
|
timeLimitForEachTurn: {
|
|
|
|
type: 'number',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
2024-01-19 12:51:49 +01:00
|
|
|
logs: {
|
|
|
|
type: 'array',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
items: {
|
2024-01-20 05:14:46 +01:00
|
|
|
type: 'array',
|
2024-01-19 12:51:49 +01:00
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
map: {
|
|
|
|
type: 'array',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
items: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
} as const;
|