@bct-app/game-model 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/README.md +14 -10
  2. package/dist/index.d.ts +1172 -30
  3. package/dist/json-schema/ability-execution-timing.schema.json +8 -0
  4. package/dist/json-schema/ability.schema.json +2268 -0
  5. package/dist/json-schema/alignment-enum.schema.json +8 -0
  6. package/dist/json-schema/base-source.schema.json +64 -0
  7. package/dist/{schemas → json-schema}/character-basic-kind.schema.json +1 -1
  8. package/dist/{schemas → json-schema}/character-kind.schema.json +1 -1
  9. package/dist/json-schema/character.schema.json +123 -0
  10. package/dist/json-schema/chat-message-content.schema.json +65 -0
  11. package/dist/json-schema/chat-message-group.schema.json +37 -0
  12. package/dist/json-schema/chat-message-operation.schema.json +30 -0
  13. package/dist/json-schema/chat-message.schema.json +133 -0
  14. package/dist/json-schema/conversation.schema.json +252 -0
  15. package/dist/{schemas → json-schema}/effect.schema.json +375 -133
  16. package/dist/{schemas → json-schema}/game.schema.json +3 -16
  17. package/dist/json-schema/index.json +36 -0
  18. package/dist/{schemas → json-schema}/input.schema.json +108 -89
  19. package/dist/{schemas → json-schema}/message.schema.json +259 -35
  20. package/dist/json-schema/nomination.schema.json +29 -0
  21. package/dist/json-schema/operation.schema.json +28 -0
  22. package/dist/json-schema/player-display-format.schema.json +13 -0
  23. package/dist/json-schema/player-reminder.schema.json +19 -0
  24. package/dist/json-schema/player.schema.json +104 -0
  25. package/dist/json-schema/populated-character.schema.json +2344 -0
  26. package/dist/json-schema/populated-script.schema.json +2397 -0
  27. package/dist/json-schema/reminder.schema.json +24 -0
  28. package/dist/json-schema/room-create.schema.json +23 -0
  29. package/dist/json-schema/room-defaults.schema.json +72 -0
  30. package/dist/json-schema/room.schema.json +24 -0
  31. package/dist/json-schema/runtime-game.schema.json +162 -0
  32. package/dist/json-schema/script.schema.json +57 -0
  33. package/dist/json-schema/seat-side-enum.schema.json +9 -0
  34. package/dist/json-schema/special-message-kind.schema.json +7 -0
  35. package/dist/json-schema/target.schema.json +305 -0
  36. package/dist/json-schema/timeline.schema.json +87 -0
  37. package/dist/{schemas → json-schema}/view.schema.json +68 -42
  38. package/dist/zod.d.mts +4038 -0
  39. package/dist/zod.d.ts +4038 -0
  40. package/dist/zod.js +1129 -0
  41. package/dist/zod.mjs +1058 -0
  42. package/package.json +30 -15
  43. package/dist/schemas/index.json +0 -9
@@ -1,5 +1,5 @@
1
1
  {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "type": "object",
4
4
  "properties": {
5
5
  "owner": {
@@ -52,21 +52,7 @@
52
52
  "items": {
53
53
  "anyOf": [
54
54
  {
55
- "type": "object",
56
- "properties": {
57
- "userId": {
58
- "type": "string"
59
- },
60
- "ready": {
61
- "default": false,
62
- "type": "boolean"
63
- }
64
- },
65
- "required": [
66
- "userId",
67
- "ready"
68
- ],
69
- "additionalProperties": false
55
+ "type": "string"
70
56
  },
71
57
  {
72
58
  "type": "null"
@@ -82,6 +68,7 @@
82
68
  ]
83
69
  },
84
70
  "createdAt": {
71
+ "default": "2026-04-11T23:19:10.189Z",
85
72
  "type": "string",
86
73
  "format": "date-time",
87
74
  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
@@ -0,0 +1,36 @@
1
+ {
2
+ "ability": "./ability.schema.json",
3
+ "ability-execution-timing": "./ability-execution-timing.schema.json",
4
+ "alignment-enum": "./alignment-enum.schema.json",
5
+ "base-source": "./base-source.schema.json",
6
+ "character": "./character.schema.json",
7
+ "character-basic-kind": "./character-basic-kind.schema.json",
8
+ "character-kind": "./character-kind.schema.json",
9
+ "chat-message-content": "./chat-message-content.schema.json",
10
+ "chat-message": "./chat-message.schema.json",
11
+ "chat-message-group": "./chat-message-group.schema.json",
12
+ "chat-message-operation": "./chat-message-operation.schema.json",
13
+ "conversation": "./conversation.schema.json",
14
+ "effect": "./effect.schema.json",
15
+ "game": "./game.schema.json",
16
+ "input": "./input.schema.json",
17
+ "message": "./message.schema.json",
18
+ "nomination": "./nomination.schema.json",
19
+ "operation": "./operation.schema.json",
20
+ "player": "./player.schema.json",
21
+ "player-display-format": "./player-display-format.schema.json",
22
+ "player-reminder": "./player-reminder.schema.json",
23
+ "populated-character": "./populated-character.schema.json",
24
+ "populated-script": "./populated-script.schema.json",
25
+ "reminder": "./reminder.schema.json",
26
+ "room-create": "./room-create.schema.json",
27
+ "room": "./room.schema.json",
28
+ "room-defaults": "./room-defaults.schema.json",
29
+ "runtime-game": "./runtime-game.schema.json",
30
+ "script": "./script.schema.json",
31
+ "seat-side-enum": "./seat-side-enum.schema.json",
32
+ "special-message-kind": "./special-message-kind.schema.json",
33
+ "target": "./target.schema.json",
34
+ "timeline": "./timeline.schema.json",
35
+ "view": "./view.schema.json"
36
+ }
@@ -1,64 +1,67 @@
1
1
  {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "oneOf": [
4
4
  {
5
- "$ref": "#/definitions/PlayerInput"
5
+ "$ref": "#/$defs/PlayerInput"
6
6
  },
7
7
  {
8
- "$ref": "#/definitions/CharacterInput"
8
+ "$ref": "#/$defs/CharacterInput"
9
9
  },
10
10
  {
11
- "$ref": "#/definitions/AlignmentInput"
11
+ "$ref": "#/$defs/AlignmentInput"
12
12
  },
13
13
  {
14
- "$ref": "#/definitions/CharacterKindInput"
14
+ "$ref": "#/$defs/CharacterKindInput"
15
15
  },
16
16
  {
17
- "$ref": "#/definitions/BooleanInput"
17
+ "$ref": "#/$defs/BooleanInput"
18
18
  },
19
19
  {
20
- "$ref": "#/definitions/NumberInput"
20
+ "$ref": "#/$defs/NumberInput"
21
21
  },
22
22
  {
23
- "$ref": "#/definitions/TextInput"
23
+ "$ref": "#/$defs/TextInput"
24
24
  },
25
25
  {
26
- "$ref": "#/definitions/StatusInput"
26
+ "$ref": "#/$defs/StatusInput"
27
27
  },
28
28
  {
29
- "$ref": "#/definitions/ReminderInput"
29
+ "$ref": "#/$defs/ReminderInput"
30
30
  },
31
31
  {
32
- "$ref": "#/definitions/PlayerReminderInput"
32
+ "$ref": "#/$defs/PlayerReminderInput"
33
+ },
34
+ {
35
+ "$ref": "#/$defs/SeatSideInput"
33
36
  }
34
37
  ],
35
- "definitions": {
38
+ "$defs": {
36
39
  "PlayerInput": {
37
40
  "type": "object",
38
41
  "properties": {
39
42
  "title": {
40
- "$ref": "#/definitions/__schema0"
43
+ "$ref": "#/$defs/__schema0"
41
44
  },
42
45
  "footer": {
43
- "$ref": "#/definitions/__schema1"
46
+ "$ref": "#/$defs/__schema1"
44
47
  },
45
48
  "readonly": {
46
- "$ref": "#/definitions/__schema2"
49
+ "$ref": "#/$defs/__schema2"
47
50
  },
48
51
  "type": {
49
- "$ref": "#/definitions/__schema3"
52
+ "$ref": "#/$defs/__schema3"
50
53
  },
51
54
  "layout": {
52
- "$ref": "#/definitions/__schema4"
55
+ "$ref": "#/$defs/__schema4"
53
56
  },
54
57
  "kinds": {
55
- "$ref": "#/definitions/__schema5"
58
+ "$ref": "#/$defs/__schema5"
56
59
  },
57
60
  "filterToken": {
58
- "$ref": "#/definitions/__schema6"
61
+ "$ref": "#/$defs/__schema6"
59
62
  },
60
63
  "range": {
61
- "$ref": "#/definitions/__schema7"
64
+ "$ref": "#/$defs/__schema7"
62
65
  }
63
66
  },
64
67
  "required": [
@@ -101,7 +104,7 @@
101
104
  ],
102
105
  "type": "array",
103
106
  "items": {
104
- "$ref": "#/definitions/CharacterBasicKind"
107
+ "$ref": "#/$defs/CharacterBasicKind"
105
108
  }
106
109
  },
107
110
  "CharacterBasicKind": {
@@ -120,19 +123,15 @@
120
123
  "type": "string"
121
124
  },
122
125
  "__schema7": {
123
- "allOf": [
124
- {
125
- "$ref": "#/definitions/Range"
126
- }
127
- ]
126
+ "$ref": "#/$defs/Range"
128
127
  },
129
128
  "Range": {
130
129
  "anyOf": [
131
130
  {
132
- "$ref": "#/definitions/__schema8"
131
+ "$ref": "#/$defs/__schema8"
133
132
  },
134
133
  {
135
- "$ref": "#/definitions/__schema11"
134
+ "$ref": "#/$defs/__schema11"
136
135
  }
137
136
  ],
138
137
  "id": "Range",
@@ -141,12 +140,12 @@
141
140
  },
142
141
  "__schema8": {
143
142
  "type": "array",
144
- "items": [
143
+ "prefixItems": [
145
144
  {
146
- "$ref": "#/definitions/__schema9"
145
+ "$ref": "#/$defs/__schema9"
147
146
  },
148
147
  {
149
- "$ref": "#/definitions/__schema10"
148
+ "$ref": "#/$defs/__schema10"
150
149
  }
151
150
  ]
152
151
  },
@@ -158,7 +157,7 @@
158
157
  },
159
158
  "__schema11": {
160
159
  "type": "array",
161
- "items": [
160
+ "prefixItems": [
162
161
  {
163
162
  "type": "number"
164
163
  }
@@ -168,25 +167,25 @@
168
167
  "type": "object",
169
168
  "properties": {
170
169
  "title": {
171
- "$ref": "#/definitions/__schema0"
170
+ "$ref": "#/$defs/__schema0"
172
171
  },
173
172
  "footer": {
174
- "$ref": "#/definitions/__schema1"
173
+ "$ref": "#/$defs/__schema1"
175
174
  },
176
175
  "readonly": {
177
- "$ref": "#/definitions/__schema2"
176
+ "$ref": "#/$defs/__schema2"
178
177
  },
179
178
  "type": {
180
- "$ref": "#/definitions/__schema12"
179
+ "$ref": "#/$defs/__schema12"
181
180
  },
182
181
  "kinds": {
183
- "$ref": "#/definitions/__schema13"
182
+ "$ref": "#/$defs/__schema13"
184
183
  },
185
184
  "filterToken": {
186
- "$ref": "#/definitions/__schema14"
185
+ "$ref": "#/$defs/__schema14"
187
186
  },
188
187
  "range": {
189
- "$ref": "#/definitions/__schema15"
188
+ "$ref": "#/$defs/__schema15"
190
189
  }
191
190
  },
192
191
  "required": [
@@ -211,33 +210,29 @@
211
210
  ],
212
211
  "type": "array",
213
212
  "items": {
214
- "$ref": "#/definitions/CharacterBasicKind"
213
+ "$ref": "#/$defs/CharacterBasicKind"
215
214
  }
216
215
  },
217
216
  "__schema14": {
218
217
  "type": "string"
219
218
  },
220
219
  "__schema15": {
221
- "allOf": [
222
- {
223
- "$ref": "#/definitions/Range"
224
- }
225
- ]
220
+ "$ref": "#/$defs/Range"
226
221
  },
227
222
  "AlignmentInput": {
228
223
  "type": "object",
229
224
  "properties": {
230
225
  "title": {
231
- "$ref": "#/definitions/__schema0"
226
+ "$ref": "#/$defs/__schema0"
232
227
  },
233
228
  "footer": {
234
- "$ref": "#/definitions/__schema1"
229
+ "$ref": "#/$defs/__schema1"
235
230
  },
236
231
  "readonly": {
237
- "$ref": "#/definitions/__schema2"
232
+ "$ref": "#/$defs/__schema2"
238
233
  },
239
234
  "type": {
240
- "$ref": "#/definitions/__schema16"
235
+ "$ref": "#/$defs/__schema16"
241
236
  }
242
237
  },
243
238
  "required": [
@@ -256,16 +251,16 @@
256
251
  "type": "object",
257
252
  "properties": {
258
253
  "title": {
259
- "$ref": "#/definitions/__schema0"
254
+ "$ref": "#/$defs/__schema0"
260
255
  },
261
256
  "footer": {
262
- "$ref": "#/definitions/__schema1"
257
+ "$ref": "#/$defs/__schema1"
263
258
  },
264
259
  "readonly": {
265
- "$ref": "#/definitions/__schema2"
260
+ "$ref": "#/$defs/__schema2"
266
261
  },
267
262
  "type": {
268
- "$ref": "#/definitions/__schema17"
263
+ "$ref": "#/$defs/__schema17"
269
264
  }
270
265
  },
271
266
  "required": [
@@ -284,28 +279,28 @@
284
279
  "type": "object",
285
280
  "properties": {
286
281
  "title": {
287
- "$ref": "#/definitions/__schema0"
282
+ "$ref": "#/$defs/__schema0"
288
283
  },
289
284
  "footer": {
290
- "$ref": "#/definitions/__schema1"
285
+ "$ref": "#/$defs/__schema1"
291
286
  },
292
287
  "readonly": {
293
- "$ref": "#/definitions/__schema2"
288
+ "$ref": "#/$defs/__schema2"
294
289
  },
295
290
  "type": {
296
- "$ref": "#/definitions/__schema18"
291
+ "$ref": "#/$defs/__schema18"
297
292
  },
298
293
  "prompt": {
299
- "$ref": "#/definitions/__schema19"
294
+ "$ref": "#/$defs/__schema19"
300
295
  },
301
296
  "style": {
302
- "$ref": "#/definitions/__schema20"
297
+ "$ref": "#/$defs/__schema20"
303
298
  },
304
299
  "defaultValue": {
305
- "$ref": "#/definitions/__schema21"
300
+ "$ref": "#/$defs/__schema21"
306
301
  },
307
302
  "texts": {
308
- "$ref": "#/definitions/__schema22"
303
+ "$ref": "#/$defs/__schema22"
309
304
  }
310
305
  },
311
306
  "required": [
@@ -344,7 +339,7 @@
344
339
  "是"
345
340
  ],
346
341
  "type": "array",
347
- "items": [
342
+ "prefixItems": [
348
343
  {
349
344
  "type": "string"
350
345
  },
@@ -357,22 +352,22 @@
357
352
  "type": "object",
358
353
  "properties": {
359
354
  "title": {
360
- "$ref": "#/definitions/__schema0"
355
+ "$ref": "#/$defs/__schema0"
361
356
  },
362
357
  "footer": {
363
- "$ref": "#/definitions/__schema1"
358
+ "$ref": "#/$defs/__schema1"
364
359
  },
365
360
  "readonly": {
366
- "$ref": "#/definitions/__schema2"
361
+ "$ref": "#/$defs/__schema2"
367
362
  },
368
363
  "type": {
369
- "$ref": "#/definitions/__schema23"
364
+ "$ref": "#/$defs/__schema23"
370
365
  },
371
366
  "range": {
372
- "$ref": "#/definitions/__schema24"
367
+ "$ref": "#/$defs/__schema24"
373
368
  },
374
369
  "style": {
375
- "$ref": "#/definitions/__schema25"
370
+ "$ref": "#/$defs/__schema25"
376
371
  }
377
372
  },
378
373
  "required": [
@@ -393,11 +388,7 @@
393
388
  "default": [
394
389
  1
395
390
  ],
396
- "allOf": [
397
- {
398
- "$ref": "#/definitions/Range"
399
- }
400
- ]
391
+ "$ref": "#/$defs/Range"
401
392
  },
402
393
  "__schema25": {
403
394
  "default": "SELECTION",
@@ -411,16 +402,16 @@
411
402
  "type": "object",
412
403
  "properties": {
413
404
  "title": {
414
- "$ref": "#/definitions/__schema0"
405
+ "$ref": "#/$defs/__schema0"
415
406
  },
416
407
  "footer": {
417
- "$ref": "#/definitions/__schema1"
408
+ "$ref": "#/$defs/__schema1"
418
409
  },
419
410
  "readonly": {
420
- "$ref": "#/definitions/__schema2"
411
+ "$ref": "#/$defs/__schema2"
421
412
  },
422
413
  "type": {
423
- "$ref": "#/definitions/__schema26"
414
+ "$ref": "#/$defs/__schema26"
424
415
  }
425
416
  },
426
417
  "required": [
@@ -439,16 +430,16 @@
439
430
  "type": "object",
440
431
  "properties": {
441
432
  "title": {
442
- "$ref": "#/definitions/__schema0"
433
+ "$ref": "#/$defs/__schema0"
443
434
  },
444
435
  "footer": {
445
- "$ref": "#/definitions/__schema1"
436
+ "$ref": "#/$defs/__schema1"
446
437
  },
447
438
  "readonly": {
448
- "$ref": "#/definitions/__schema2"
439
+ "$ref": "#/$defs/__schema2"
449
440
  },
450
441
  "type": {
451
- "$ref": "#/definitions/__schema27"
442
+ "$ref": "#/$defs/__schema27"
452
443
  }
453
444
  },
454
445
  "required": [
@@ -467,16 +458,16 @@
467
458
  "type": "object",
468
459
  "properties": {
469
460
  "title": {
470
- "$ref": "#/definitions/__schema0"
461
+ "$ref": "#/$defs/__schema0"
471
462
  },
472
463
  "footer": {
473
- "$ref": "#/definitions/__schema1"
464
+ "$ref": "#/$defs/__schema1"
474
465
  },
475
466
  "readonly": {
476
- "$ref": "#/definitions/__schema2"
467
+ "$ref": "#/$defs/__schema2"
477
468
  },
478
469
  "type": {
479
- "$ref": "#/definitions/__schema28"
470
+ "$ref": "#/$defs/__schema28"
480
471
  }
481
472
  },
482
473
  "required": [
@@ -495,16 +486,16 @@
495
486
  "type": "object",
496
487
  "properties": {
497
488
  "title": {
498
- "$ref": "#/definitions/__schema0"
489
+ "$ref": "#/$defs/__schema0"
499
490
  },
500
491
  "footer": {
501
- "$ref": "#/definitions/__schema1"
492
+ "$ref": "#/$defs/__schema1"
502
493
  },
503
494
  "readonly": {
504
- "$ref": "#/definitions/__schema2"
495
+ "$ref": "#/$defs/__schema2"
505
496
  },
506
497
  "type": {
507
- "$ref": "#/definitions/__schema29"
498
+ "$ref": "#/$defs/__schema29"
508
499
  }
509
500
  },
510
501
  "required": [
@@ -518,6 +509,34 @@
518
509
  "__schema29": {
519
510
  "type": "string",
520
511
  "const": "PLAYER_REMINDER"
512
+ },
513
+ "SeatSideInput": {
514
+ "type": "object",
515
+ "properties": {
516
+ "title": {
517
+ "$ref": "#/$defs/__schema0"
518
+ },
519
+ "footer": {
520
+ "$ref": "#/$defs/__schema1"
521
+ },
522
+ "readonly": {
523
+ "$ref": "#/$defs/__schema2"
524
+ },
525
+ "type": {
526
+ "$ref": "#/$defs/__schema30"
527
+ }
528
+ },
529
+ "required": [
530
+ "type"
531
+ ],
532
+ "additionalProperties": false,
533
+ "id": "SeatSideInput",
534
+ "title": "座位选择",
535
+ "description": "提供一个座位的选择,通常用于需要指定座位的技能选项"
536
+ },
537
+ "__schema30": {
538
+ "type": "string",
539
+ "const": "SEAT_SIDE"
521
540
  }
522
541
  }
523
542
  }