@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
@@ -0,0 +1,252 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "oneOf": [
4
+ {
5
+ "type": "object",
6
+ "properties": {
7
+ "targetId": {
8
+ "$ref": "#/$defs/__schema0"
9
+ },
10
+ "lastMessage": {
11
+ "$ref": "#/$defs/__schema1"
12
+ },
13
+ "lastMessageTime": {
14
+ "$ref": "#/$defs/__schema2"
15
+ },
16
+ "type": {
17
+ "type": "string",
18
+ "const": "DIRECT"
19
+ },
20
+ "role": {
21
+ "type": "string",
22
+ "enum": [
23
+ "PLAYER",
24
+ "STORYTELLER"
25
+ ]
26
+ },
27
+ "userIds": {
28
+ "type": "array",
29
+ "prefixItems": [
30
+ {
31
+ "type": "string"
32
+ },
33
+ {
34
+ "type": "string"
35
+ }
36
+ ]
37
+ }
38
+ },
39
+ "required": [
40
+ "targetId",
41
+ "type",
42
+ "role",
43
+ "userIds"
44
+ ],
45
+ "additionalProperties": false
46
+ },
47
+ {
48
+ "type": "object",
49
+ "properties": {
50
+ "targetId": {
51
+ "$ref": "#/$defs/__schema0"
52
+ },
53
+ "lastMessage": {
54
+ "$ref": "#/$defs/__schema1"
55
+ },
56
+ "lastMessageTime": {
57
+ "$ref": "#/$defs/__schema2"
58
+ },
59
+ "type": {
60
+ "type": "string",
61
+ "const": "GROUP"
62
+ },
63
+ "targetName": {
64
+ "type": "string"
65
+ },
66
+ "groupData": {
67
+ "type": "object",
68
+ "properties": {
69
+ "groupId": {
70
+ "type": "string"
71
+ },
72
+ "name": {
73
+ "type": "string"
74
+ },
75
+ "userIds": {
76
+ "minItems": 2,
77
+ "type": "array",
78
+ "items": {
79
+ "$ref": "#/$defs/__schema3"
80
+ }
81
+ },
82
+ "createdAt": {
83
+ "default": "2026-04-11T23:19:10.186Z",
84
+ "type": "string",
85
+ "format": "date-time",
86
+ "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))$"
87
+ }
88
+ },
89
+ "required": [
90
+ "groupId",
91
+ "name",
92
+ "userIds",
93
+ "createdAt"
94
+ ],
95
+ "additionalProperties": false
96
+ }
97
+ },
98
+ "required": [
99
+ "targetId",
100
+ "type",
101
+ "targetName",
102
+ "groupData"
103
+ ],
104
+ "additionalProperties": false
105
+ }
106
+ ],
107
+ "$defs": {
108
+ "__schema0": {
109
+ "type": "string"
110
+ },
111
+ "__schema1": {
112
+ "type": "object",
113
+ "properties": {
114
+ "id": {
115
+ "type": "string"
116
+ },
117
+ "roomId": {
118
+ "type": "string"
119
+ },
120
+ "sender": {
121
+ "type": "string"
122
+ },
123
+ "target": {
124
+ "type": "object",
125
+ "properties": {
126
+ "type": {
127
+ "type": "string",
128
+ "enum": [
129
+ "DIRECT",
130
+ "GROUP"
131
+ ]
132
+ },
133
+ "id": {
134
+ "type": "string"
135
+ }
136
+ },
137
+ "required": [
138
+ "type",
139
+ "id"
140
+ ],
141
+ "additionalProperties": false
142
+ },
143
+ "content": {
144
+ "anyOf": [
145
+ {
146
+ "type": "object",
147
+ "properties": {
148
+ "type": {
149
+ "type": "string",
150
+ "const": "text"
151
+ },
152
+ "text": {
153
+ "type": "string"
154
+ }
155
+ },
156
+ "required": [
157
+ "type",
158
+ "text"
159
+ ],
160
+ "additionalProperties": false
161
+ },
162
+ {
163
+ "type": "object",
164
+ "properties": {
165
+ "type": {
166
+ "type": "string",
167
+ "const": "operation"
168
+ },
169
+ "operation": {
170
+ "type": "object",
171
+ "properties": {
172
+ "type": {
173
+ "type": "string",
174
+ "minLength": 1
175
+ },
176
+ "payload": {
177
+ "default": {},
178
+ "type": "object",
179
+ "propertyNames": {
180
+ "type": "string"
181
+ },
182
+ "additionalProperties": {}
183
+ },
184
+ "meta": {
185
+ "type": "object",
186
+ "propertyNames": {
187
+ "type": "string"
188
+ },
189
+ "additionalProperties": {}
190
+ }
191
+ },
192
+ "required": [
193
+ "type",
194
+ "payload"
195
+ ],
196
+ "additionalProperties": false
197
+ }
198
+ },
199
+ "required": [
200
+ "type",
201
+ "operation"
202
+ ],
203
+ "additionalProperties": false
204
+ }
205
+ ]
206
+ },
207
+ "createdAt": {
208
+ "default": "2026-04-11T23:19:10.186Z",
209
+ "type": "string",
210
+ "format": "date-time",
211
+ "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))$"
212
+ },
213
+ "updatedAt": {
214
+ "type": "string",
215
+ "format": "date-time",
216
+ "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))$"
217
+ },
218
+ "version": {
219
+ "default": 1,
220
+ "type": "integer",
221
+ "minimum": 1,
222
+ "maximum": 9007199254740991
223
+ },
224
+ "metadata": {
225
+ "type": "object",
226
+ "propertyNames": {
227
+ "type": "string"
228
+ },
229
+ "additionalProperties": {}
230
+ }
231
+ },
232
+ "required": [
233
+ "id",
234
+ "roomId",
235
+ "sender",
236
+ "target",
237
+ "content",
238
+ "createdAt",
239
+ "version"
240
+ ],
241
+ "additionalProperties": false
242
+ },
243
+ "__schema2": {
244
+ "type": "string",
245
+ "format": "date-time",
246
+ "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))$"
247
+ },
248
+ "__schema3": {
249
+ "type": "string"
250
+ }
251
+ }
252
+ }