@gbl-uzh/platform 0.4.12 → 0.4.13
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.
- package/dist/index.d.ts +284 -285
- package/dist/schema.prisma +1 -1
- package/package.json +35 -35
- package/dist/ops-b9a51fd0.d.ts +0 -166
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import winston from 'winston';
|
|
2
2
|
import * as _prisma_client from '.prisma/client';
|
|
3
|
-
import * as _prisma_client_runtime from '@prisma/client/runtime';
|
|
4
3
|
import * as DB from '@prisma/client';
|
|
5
4
|
import { PrismaClient } from '@prisma/client';
|
|
6
5
|
import { NextPageContext } from 'next';
|
|
@@ -91,26 +90,26 @@ interface LoginAsTeamArgs {
|
|
|
91
90
|
token: string;
|
|
92
91
|
}
|
|
93
92
|
declare function loginAsTeam({ token }: LoginAsTeamArgs, ctx: CtxWithPrisma<PrismaClient>): Promise<({
|
|
94
|
-
level:
|
|
93
|
+
level: {
|
|
95
94
|
id: number;
|
|
96
95
|
index: number;
|
|
97
96
|
description: string;
|
|
98
97
|
image: string;
|
|
99
98
|
requiredXP: number;
|
|
100
|
-
}
|
|
99
|
+
};
|
|
101
100
|
achievements: ({
|
|
102
|
-
achievement:
|
|
101
|
+
achievement: {
|
|
103
102
|
id: string;
|
|
104
103
|
name: string;
|
|
105
104
|
description: string;
|
|
106
105
|
image: string | null;
|
|
107
106
|
onEventId: string;
|
|
108
|
-
when: _prisma_client.AchievementFrequency;
|
|
107
|
+
when: _prisma_client.$Enums.AchievementFrequency;
|
|
109
108
|
reward: _prisma_client.Prisma.JsonValue;
|
|
110
109
|
createdAt: Date;
|
|
111
110
|
updatedAt: Date;
|
|
112
|
-
}
|
|
113
|
-
} &
|
|
111
|
+
};
|
|
112
|
+
} & {
|
|
114
113
|
id: number;
|
|
115
114
|
count: number;
|
|
116
115
|
achievementId: string;
|
|
@@ -119,8 +118,8 @@ declare function loginAsTeam({ token }: LoginAsTeamArgs, ctx: CtxWithPrisma<Pris
|
|
|
119
118
|
gameId: number;
|
|
120
119
|
createdAt: Date;
|
|
121
120
|
updatedAt: Date;
|
|
122
|
-
}
|
|
123
|
-
} &
|
|
121
|
+
})[];
|
|
122
|
+
} & {
|
|
124
123
|
id: string;
|
|
125
124
|
number: number;
|
|
126
125
|
name: string;
|
|
@@ -142,7 +141,7 @@ declare function loginAsTeam({ token }: LoginAsTeamArgs, ctx: CtxWithPrisma<Pris
|
|
|
142
141
|
gameId: number;
|
|
143
142
|
createdAt: Date;
|
|
144
143
|
updatedAt: Date;
|
|
145
|
-
}
|
|
144
|
+
}) | null>;
|
|
146
145
|
declare function logoutAsTeam(ctx: CtxWithPrisma<PrismaClient>): Promise<boolean>;
|
|
147
146
|
|
|
148
147
|
declare const AccountService_createLoginToken: typeof createLoginToken;
|
|
@@ -190,7 +189,7 @@ interface CreateGameArgs {
|
|
|
190
189
|
declare function createGame({ name, playerCount }: CreateGameArgs, ctx: Context$1, { roleAssigner }: {
|
|
191
190
|
roleAssigner: (ix: number) => any;
|
|
192
191
|
}): Promise<{
|
|
193
|
-
players:
|
|
192
|
+
players: {
|
|
194
193
|
id: string;
|
|
195
194
|
number: number;
|
|
196
195
|
name: string;
|
|
@@ -212,8 +211,8 @@ declare function createGame({ name, playerCount }: CreateGameArgs, ctx: Context$
|
|
|
212
211
|
gameId: number;
|
|
213
212
|
createdAt: Date;
|
|
214
213
|
updatedAt: Date;
|
|
215
|
-
}
|
|
216
|
-
periods:
|
|
214
|
+
}[];
|
|
215
|
+
periods: {
|
|
217
216
|
id: number;
|
|
218
217
|
index: number;
|
|
219
218
|
facts: DB.Prisma.JsonValue;
|
|
@@ -223,24 +222,24 @@ declare function createGame({ name, playerCount }: CreateGameArgs, ctx: Context$
|
|
|
223
222
|
gameId: number;
|
|
224
223
|
createdAt: Date;
|
|
225
224
|
updatedAt: Date;
|
|
226
|
-
}
|
|
227
|
-
} &
|
|
225
|
+
}[];
|
|
226
|
+
} & {
|
|
228
227
|
id: number;
|
|
229
|
-
status: DB.GameStatus;
|
|
228
|
+
status: DB.$Enums.GameStatus;
|
|
230
229
|
name: string;
|
|
231
230
|
activePeriodIx: number;
|
|
232
231
|
activePeriodId: number | null;
|
|
233
232
|
ownerId: string;
|
|
234
233
|
createdAt: Date;
|
|
235
234
|
updatedAt: Date;
|
|
236
|
-
}
|
|
235
|
+
}>;
|
|
237
236
|
interface AddGamePeriodArgs<T> {
|
|
238
237
|
gameId: number;
|
|
239
238
|
facts: T;
|
|
240
239
|
}
|
|
241
240
|
declare function addGamePeriod<TFacts>({ gameId, facts }: AddGamePeriodArgs<TFacts>, ctx: Context$1, { schema, reducers }: CtxWithFactsAndSchema<TFacts, PrismaClient>): Promise<({
|
|
242
241
|
segments: ({
|
|
243
|
-
learningElements:
|
|
242
|
+
learningElements: {
|
|
244
243
|
id: string;
|
|
245
244
|
title: string;
|
|
246
245
|
question: string;
|
|
@@ -249,18 +248,18 @@ declare function addGamePeriod<TFacts>({ gameId, facts }: AddGamePeriodArgs<TFac
|
|
|
249
248
|
reward: DB.Prisma.JsonValue;
|
|
250
249
|
createdAt: Date;
|
|
251
250
|
updatedAt: Date;
|
|
252
|
-
}
|
|
253
|
-
storyElements:
|
|
251
|
+
}[];
|
|
252
|
+
storyElements: {
|
|
254
253
|
id: string;
|
|
255
254
|
title: string;
|
|
256
|
-
type: DB.StoryElementType;
|
|
255
|
+
type: DB.$Enums.StoryElementType;
|
|
257
256
|
content: string | null;
|
|
258
257
|
contentRole: DB.Prisma.JsonValue;
|
|
259
258
|
reward: DB.Prisma.JsonValue;
|
|
260
259
|
createdAt: Date;
|
|
261
260
|
updatedAt: Date;
|
|
262
|
-
}
|
|
263
|
-
} &
|
|
261
|
+
}[];
|
|
262
|
+
} & {
|
|
264
263
|
id: number;
|
|
265
264
|
index: number;
|
|
266
265
|
facts: DB.Prisma.JsonValue;
|
|
@@ -271,8 +270,8 @@ declare function addGamePeriod<TFacts>({ gameId, facts }: AddGamePeriodArgs<TFac
|
|
|
271
270
|
nextSegmentId: number | null;
|
|
272
271
|
createdAt: Date;
|
|
273
272
|
updatedAt: Date;
|
|
274
|
-
}
|
|
275
|
-
} &
|
|
273
|
+
})[];
|
|
274
|
+
} & {
|
|
276
275
|
id: number;
|
|
277
276
|
index: number;
|
|
278
277
|
facts: DB.Prisma.JsonValue;
|
|
@@ -282,7 +281,7 @@ declare function addGamePeriod<TFacts>({ gameId, facts }: AddGamePeriodArgs<TFac
|
|
|
282
281
|
gameId: number;
|
|
283
282
|
createdAt: Date;
|
|
284
283
|
updatedAt: Date;
|
|
285
|
-
}
|
|
284
|
+
}) | null>;
|
|
286
285
|
interface AddPeriodSegmentArgs<TFacts> {
|
|
287
286
|
gameId: number;
|
|
288
287
|
periodIx: number;
|
|
@@ -291,7 +290,7 @@ interface AddPeriodSegmentArgs<TFacts> {
|
|
|
291
290
|
storyElements?: string[];
|
|
292
291
|
}
|
|
293
292
|
declare function addPeriodSegment<TFacts>({ gameId, periodIx, facts, learningElements, storyElements, }: AddPeriodSegmentArgs<TFacts>, ctx: Context$1, { schema, reducers }: CtxWithFactsAndSchema<TFacts, PrismaClient>): Promise<({
|
|
294
|
-
learningElements:
|
|
293
|
+
learningElements: {
|
|
295
294
|
id: string;
|
|
296
295
|
title: string;
|
|
297
296
|
question: string;
|
|
@@ -300,18 +299,18 @@ declare function addPeriodSegment<TFacts>({ gameId, periodIx, facts, learningEle
|
|
|
300
299
|
reward: DB.Prisma.JsonValue;
|
|
301
300
|
createdAt: Date;
|
|
302
301
|
updatedAt: Date;
|
|
303
|
-
}
|
|
304
|
-
storyElements:
|
|
302
|
+
}[];
|
|
303
|
+
storyElements: {
|
|
305
304
|
id: string;
|
|
306
305
|
title: string;
|
|
307
|
-
type: DB.StoryElementType;
|
|
306
|
+
type: DB.$Enums.StoryElementType;
|
|
308
307
|
content: string | null;
|
|
309
308
|
contentRole: DB.Prisma.JsonValue;
|
|
310
309
|
reward: DB.Prisma.JsonValue;
|
|
311
310
|
createdAt: Date;
|
|
312
311
|
updatedAt: Date;
|
|
313
|
-
}
|
|
314
|
-
} &
|
|
312
|
+
}[];
|
|
313
|
+
} & {
|
|
315
314
|
id: number;
|
|
316
315
|
index: number;
|
|
317
316
|
facts: DB.Prisma.JsonValue;
|
|
@@ -322,13 +321,13 @@ declare function addPeriodSegment<TFacts>({ gameId, periodIx, facts, learningEle
|
|
|
322
321
|
nextSegmentId: number | null;
|
|
323
322
|
createdAt: Date;
|
|
324
323
|
updatedAt: Date;
|
|
325
|
-
}
|
|
324
|
+
}) | null>;
|
|
326
325
|
interface ActivateNextPeriodArgs {
|
|
327
326
|
gameId: number;
|
|
328
327
|
}
|
|
329
328
|
declare function activateNextPeriod({ gameId }: ActivateNextPeriodArgs, ctx: Context$1, { reducers }: CtxWithFacts<any, PrismaClient>): Promise<[{
|
|
330
329
|
periods: ({
|
|
331
|
-
segments:
|
|
330
|
+
segments: {
|
|
332
331
|
id: number;
|
|
333
332
|
index: number;
|
|
334
333
|
facts: DB.Prisma.JsonValue;
|
|
@@ -339,8 +338,8 @@ declare function activateNextPeriod({ gameId }: ActivateNextPeriodArgs, ctx: Con
|
|
|
339
338
|
nextSegmentId: number | null;
|
|
340
339
|
createdAt: Date;
|
|
341
340
|
updatedAt: Date;
|
|
342
|
-
}
|
|
343
|
-
} &
|
|
341
|
+
}[];
|
|
342
|
+
} & {
|
|
344
343
|
id: number;
|
|
345
344
|
index: number;
|
|
346
345
|
facts: DB.Prisma.JsonValue;
|
|
@@ -350,17 +349,17 @@ declare function activateNextPeriod({ gameId }: ActivateNextPeriodArgs, ctx: Con
|
|
|
350
349
|
gameId: number;
|
|
351
350
|
createdAt: Date;
|
|
352
351
|
updatedAt: Date;
|
|
353
|
-
}
|
|
354
|
-
} &
|
|
352
|
+
})[];
|
|
353
|
+
} & {
|
|
355
354
|
id: number;
|
|
356
|
-
status: DB.GameStatus;
|
|
355
|
+
status: DB.$Enums.GameStatus;
|
|
357
356
|
name: string;
|
|
358
357
|
activePeriodIx: number;
|
|
359
358
|
activePeriodId: number | null;
|
|
360
359
|
ownerId: string;
|
|
361
360
|
createdAt: Date;
|
|
362
361
|
updatedAt: Date;
|
|
363
|
-
},
|
|
362
|
+
}, {
|
|
364
363
|
id: number;
|
|
365
364
|
index: number;
|
|
366
365
|
facts: DB.Prisma.JsonValue;
|
|
@@ -370,36 +369,12 @@ declare function activateNextPeriod({ gameId }: ActivateNextPeriodArgs, ctx: Con
|
|
|
370
369
|
gameId: number;
|
|
371
370
|
createdAt: Date;
|
|
372
371
|
updatedAt: Date;
|
|
373
|
-
},
|
|
372
|
+
}, ...any[]] | null>;
|
|
374
373
|
interface ActivateSegmentArgs {
|
|
375
374
|
gameId: number;
|
|
376
375
|
}
|
|
377
376
|
declare function activateNextSegment({ gameId }: ActivateSegmentArgs, ctx: Context$1, { reducers }: CtxWithFacts<any, PrismaClient>): Promise<[{
|
|
378
|
-
|
|
379
|
-
segments: (_prisma_client_runtime.GetResult<{
|
|
380
|
-
id: number;
|
|
381
|
-
index: number;
|
|
382
|
-
facts: DB.Prisma.JsonValue;
|
|
383
|
-
countdownExpiresAt: Date | null;
|
|
384
|
-
periodId: number;
|
|
385
|
-
periodIx: number;
|
|
386
|
-
gameId: number;
|
|
387
|
-
nextSegmentId: number | null;
|
|
388
|
-
createdAt: Date;
|
|
389
|
-
updatedAt: Date;
|
|
390
|
-
}, unknown> & {})[];
|
|
391
|
-
} & _prisma_client_runtime.GetResult<{
|
|
392
|
-
id: number;
|
|
393
|
-
index: number;
|
|
394
|
-
facts: DB.Prisma.JsonValue;
|
|
395
|
-
activeSegmentIx: number;
|
|
396
|
-
activeSegmentId: number | null;
|
|
397
|
-
nextPeriodId: number | null;
|
|
398
|
-
gameId: number;
|
|
399
|
-
createdAt: Date;
|
|
400
|
-
updatedAt: Date;
|
|
401
|
-
}, unknown> & {})[];
|
|
402
|
-
players: (_prisma_client_runtime.GetResult<{
|
|
377
|
+
players: {
|
|
403
378
|
id: string;
|
|
404
379
|
number: number;
|
|
405
380
|
name: string;
|
|
@@ -421,17 +396,41 @@ declare function activateNextSegment({ gameId }: ActivateSegmentArgs, ctx: Conte
|
|
|
421
396
|
gameId: number;
|
|
422
397
|
createdAt: Date;
|
|
423
398
|
updatedAt: Date;
|
|
424
|
-
}
|
|
425
|
-
|
|
399
|
+
}[];
|
|
400
|
+
periods: ({
|
|
401
|
+
segments: {
|
|
402
|
+
id: number;
|
|
403
|
+
index: number;
|
|
404
|
+
facts: DB.Prisma.JsonValue;
|
|
405
|
+
countdownExpiresAt: Date | null;
|
|
406
|
+
periodId: number;
|
|
407
|
+
periodIx: number;
|
|
408
|
+
gameId: number;
|
|
409
|
+
nextSegmentId: number | null;
|
|
410
|
+
createdAt: Date;
|
|
411
|
+
updatedAt: Date;
|
|
412
|
+
}[];
|
|
413
|
+
} & {
|
|
414
|
+
id: number;
|
|
415
|
+
index: number;
|
|
416
|
+
facts: DB.Prisma.JsonValue;
|
|
417
|
+
activeSegmentIx: number;
|
|
418
|
+
activeSegmentId: number | null;
|
|
419
|
+
nextPeriodId: number | null;
|
|
420
|
+
gameId: number;
|
|
421
|
+
createdAt: Date;
|
|
422
|
+
updatedAt: Date;
|
|
423
|
+
})[];
|
|
424
|
+
} & {
|
|
426
425
|
id: number;
|
|
427
|
-
status: DB.GameStatus;
|
|
426
|
+
status: DB.$Enums.GameStatus;
|
|
428
427
|
name: string;
|
|
429
428
|
activePeriodIx: number;
|
|
430
429
|
activePeriodId: number | null;
|
|
431
430
|
ownerId: string;
|
|
432
431
|
createdAt: Date;
|
|
433
432
|
updatedAt: Date;
|
|
434
|
-
},
|
|
433
|
+
}, {
|
|
435
434
|
id: number;
|
|
436
435
|
index: number;
|
|
437
436
|
facts: DB.Prisma.JsonValue;
|
|
@@ -441,7 +440,7 @@ declare function activateNextSegment({ gameId }: ActivateSegmentArgs, ctx: Conte
|
|
|
441
440
|
gameId: number;
|
|
442
441
|
createdAt: Date;
|
|
443
442
|
updatedAt: Date;
|
|
444
|
-
},
|
|
443
|
+
}, {
|
|
445
444
|
id: number;
|
|
446
445
|
index: number;
|
|
447
446
|
facts: DB.Prisma.JsonValue;
|
|
@@ -452,32 +451,8 @@ declare function activateNextSegment({ gameId }: ActivateSegmentArgs, ctx: Conte
|
|
|
452
451
|
nextSegmentId: number | null;
|
|
453
452
|
createdAt: Date;
|
|
454
453
|
updatedAt: Date;
|
|
455
|
-
},
|
|
456
|
-
|
|
457
|
-
segments: (_prisma_client_runtime.GetResult<{
|
|
458
|
-
id: number;
|
|
459
|
-
index: number;
|
|
460
|
-
facts: DB.Prisma.JsonValue;
|
|
461
|
-
countdownExpiresAt: Date | null;
|
|
462
|
-
periodId: number;
|
|
463
|
-
periodIx: number;
|
|
464
|
-
gameId: number;
|
|
465
|
-
nextSegmentId: number | null;
|
|
466
|
-
createdAt: Date;
|
|
467
|
-
updatedAt: Date;
|
|
468
|
-
}, unknown> & {})[];
|
|
469
|
-
} & _prisma_client_runtime.GetResult<{
|
|
470
|
-
id: number;
|
|
471
|
-
index: number;
|
|
472
|
-
facts: DB.Prisma.JsonValue;
|
|
473
|
-
activeSegmentIx: number;
|
|
474
|
-
activeSegmentId: number | null;
|
|
475
|
-
nextPeriodId: number | null;
|
|
476
|
-
gameId: number;
|
|
477
|
-
createdAt: Date;
|
|
478
|
-
updatedAt: Date;
|
|
479
|
-
}, unknown> & {})[];
|
|
480
|
-
players: (_prisma_client_runtime.GetResult<{
|
|
454
|
+
}, ...any[]] | [{
|
|
455
|
+
players: {
|
|
481
456
|
id: string;
|
|
482
457
|
number: number;
|
|
483
458
|
name: string;
|
|
@@ -499,20 +474,44 @@ declare function activateNextSegment({ gameId }: ActivateSegmentArgs, ctx: Conte
|
|
|
499
474
|
gameId: number;
|
|
500
475
|
createdAt: Date;
|
|
501
476
|
updatedAt: Date;
|
|
502
|
-
}
|
|
503
|
-
|
|
477
|
+
}[];
|
|
478
|
+
periods: ({
|
|
479
|
+
segments: {
|
|
480
|
+
id: number;
|
|
481
|
+
index: number;
|
|
482
|
+
facts: DB.Prisma.JsonValue;
|
|
483
|
+
countdownExpiresAt: Date | null;
|
|
484
|
+
periodId: number;
|
|
485
|
+
periodIx: number;
|
|
486
|
+
gameId: number;
|
|
487
|
+
nextSegmentId: number | null;
|
|
488
|
+
createdAt: Date;
|
|
489
|
+
updatedAt: Date;
|
|
490
|
+
}[];
|
|
491
|
+
} & {
|
|
492
|
+
id: number;
|
|
493
|
+
index: number;
|
|
494
|
+
facts: DB.Prisma.JsonValue;
|
|
495
|
+
activeSegmentIx: number;
|
|
496
|
+
activeSegmentId: number | null;
|
|
497
|
+
nextPeriodId: number | null;
|
|
498
|
+
gameId: number;
|
|
499
|
+
createdAt: Date;
|
|
500
|
+
updatedAt: Date;
|
|
501
|
+
})[];
|
|
502
|
+
} & {
|
|
504
503
|
id: number;
|
|
505
|
-
status: DB.GameStatus;
|
|
504
|
+
status: DB.$Enums.GameStatus;
|
|
506
505
|
name: string;
|
|
507
506
|
activePeriodIx: number;
|
|
508
507
|
activePeriodId: number | null;
|
|
509
508
|
ownerId: string;
|
|
510
509
|
createdAt: Date;
|
|
511
510
|
updatedAt: Date;
|
|
512
|
-
},
|
|
513
|
-
results:
|
|
511
|
+
}, {
|
|
512
|
+
results: {
|
|
514
513
|
id: number;
|
|
515
|
-
type: DB.PlayerResultType;
|
|
514
|
+
type: DB.$Enums.PlayerResultType;
|
|
516
515
|
facts: DB.Prisma.JsonValue;
|
|
517
516
|
playerId: string;
|
|
518
517
|
gameId: number;
|
|
@@ -522,8 +521,8 @@ declare function activateNextSegment({ gameId }: ActivateSegmentArgs, ctx: Conte
|
|
|
522
521
|
segmentIx: number | null;
|
|
523
522
|
createdAt: Date;
|
|
524
523
|
updatedAt: Date;
|
|
525
|
-
}
|
|
526
|
-
} &
|
|
524
|
+
}[];
|
|
525
|
+
} & {
|
|
527
526
|
id: number;
|
|
528
527
|
index: number;
|
|
529
528
|
facts: DB.Prisma.JsonValue;
|
|
@@ -534,7 +533,7 @@ declare function activateNextSegment({ gameId }: ActivateSegmentArgs, ctx: Conte
|
|
|
534
533
|
nextSegmentId: number | null;
|
|
535
534
|
createdAt: Date;
|
|
536
535
|
updatedAt: Date;
|
|
537
|
-
},
|
|
536
|
+
}, DB.Prisma.BatchPayload, ...any[]] | null>;
|
|
538
537
|
declare const PlayerFactsSchema: yup.ObjectSchema<{
|
|
539
538
|
location: string;
|
|
540
539
|
}, yup.AnyObject, {
|
|
@@ -549,26 +548,26 @@ interface UpdatePlayerDataArgs {
|
|
|
549
548
|
facts: PlayerFacts;
|
|
550
549
|
}
|
|
551
550
|
declare function updatePlayerData({ name, avatar, color, facts }: UpdatePlayerDataArgs, ctx: Context$1): Promise<({
|
|
552
|
-
level:
|
|
551
|
+
level: {
|
|
553
552
|
id: number;
|
|
554
553
|
index: number;
|
|
555
554
|
description: string;
|
|
556
555
|
image: string;
|
|
557
556
|
requiredXP: number;
|
|
558
|
-
}
|
|
557
|
+
};
|
|
559
558
|
achievements: ({
|
|
560
|
-
achievement:
|
|
559
|
+
achievement: {
|
|
561
560
|
id: string;
|
|
562
561
|
name: string;
|
|
563
562
|
description: string;
|
|
564
563
|
image: string | null;
|
|
565
564
|
onEventId: string;
|
|
566
|
-
when: DB.AchievementFrequency;
|
|
565
|
+
when: DB.$Enums.AchievementFrequency;
|
|
567
566
|
reward: DB.Prisma.JsonValue;
|
|
568
567
|
createdAt: Date;
|
|
569
568
|
updatedAt: Date;
|
|
570
|
-
}
|
|
571
|
-
} &
|
|
569
|
+
};
|
|
570
|
+
} & {
|
|
572
571
|
id: number;
|
|
573
572
|
count: number;
|
|
574
573
|
achievementId: string;
|
|
@@ -577,8 +576,8 @@ declare function updatePlayerData({ name, avatar, color, facts }: UpdatePlayerDa
|
|
|
577
576
|
gameId: number;
|
|
578
577
|
createdAt: Date;
|
|
579
578
|
updatedAt: Date;
|
|
580
|
-
}
|
|
581
|
-
} &
|
|
579
|
+
})[];
|
|
580
|
+
} & {
|
|
582
581
|
id: string;
|
|
583
582
|
number: number;
|
|
584
583
|
name: string;
|
|
@@ -600,27 +599,27 @@ declare function updatePlayerData({ name, avatar, color, facts }: UpdatePlayerDa
|
|
|
600
599
|
gameId: number;
|
|
601
600
|
createdAt: Date;
|
|
602
601
|
updatedAt: Date;
|
|
603
|
-
}
|
|
604
|
-
declare function getGames(args: any, ctx: Context$1): Promise<
|
|
602
|
+
}) | null>;
|
|
603
|
+
declare function getGames(args: any, ctx: Context$1): Promise<{
|
|
605
604
|
id: number;
|
|
606
|
-
status: DB.GameStatus;
|
|
605
|
+
status: DB.$Enums.GameStatus;
|
|
607
606
|
name: string;
|
|
608
607
|
activePeriodIx: number;
|
|
609
608
|
activePeriodId: number | null;
|
|
610
609
|
ownerId: string;
|
|
611
610
|
createdAt: Date;
|
|
612
611
|
updatedAt: Date;
|
|
613
|
-
}
|
|
612
|
+
}[]>;
|
|
614
613
|
declare function getGame(args: any, ctx: Context$1): Promise<({
|
|
615
614
|
players: ({
|
|
616
|
-
level:
|
|
615
|
+
level: {
|
|
617
616
|
id: number;
|
|
618
617
|
index: number;
|
|
619
618
|
description: string;
|
|
620
619
|
image: string;
|
|
621
620
|
requiredXP: number;
|
|
622
|
-
}
|
|
623
|
-
achievements:
|
|
621
|
+
};
|
|
622
|
+
achievements: {
|
|
624
623
|
id: number;
|
|
625
624
|
count: number;
|
|
626
625
|
achievementId: string;
|
|
@@ -629,8 +628,8 @@ declare function getGame(args: any, ctx: Context$1): Promise<({
|
|
|
629
628
|
gameId: number;
|
|
630
629
|
createdAt: Date;
|
|
631
630
|
updatedAt: Date;
|
|
632
|
-
}
|
|
633
|
-
} &
|
|
631
|
+
}[];
|
|
632
|
+
} & {
|
|
634
633
|
id: string;
|
|
635
634
|
number: number;
|
|
636
635
|
name: string;
|
|
@@ -652,10 +651,10 @@ declare function getGame(args: any, ctx: Context$1): Promise<({
|
|
|
652
651
|
gameId: number;
|
|
653
652
|
createdAt: Date;
|
|
654
653
|
updatedAt: Date;
|
|
655
|
-
}
|
|
654
|
+
})[];
|
|
656
655
|
periods: ({
|
|
657
656
|
segments: ({
|
|
658
|
-
learningElements:
|
|
657
|
+
learningElements: {
|
|
659
658
|
id: string;
|
|
660
659
|
title: string;
|
|
661
660
|
question: string;
|
|
@@ -664,18 +663,18 @@ declare function getGame(args: any, ctx: Context$1): Promise<({
|
|
|
664
663
|
reward: DB.Prisma.JsonValue;
|
|
665
664
|
createdAt: Date;
|
|
666
665
|
updatedAt: Date;
|
|
667
|
-
}
|
|
668
|
-
storyElements:
|
|
666
|
+
}[];
|
|
667
|
+
storyElements: {
|
|
669
668
|
id: string;
|
|
670
669
|
title: string;
|
|
671
|
-
type: DB.StoryElementType;
|
|
670
|
+
type: DB.$Enums.StoryElementType;
|
|
672
671
|
content: string | null;
|
|
673
672
|
contentRole: DB.Prisma.JsonValue;
|
|
674
673
|
reward: DB.Prisma.JsonValue;
|
|
675
674
|
createdAt: Date;
|
|
676
675
|
updatedAt: Date;
|
|
677
|
-
}
|
|
678
|
-
} &
|
|
676
|
+
}[];
|
|
677
|
+
} & {
|
|
679
678
|
id: number;
|
|
680
679
|
index: number;
|
|
681
680
|
facts: DB.Prisma.JsonValue;
|
|
@@ -686,8 +685,8 @@ declare function getGame(args: any, ctx: Context$1): Promise<({
|
|
|
686
685
|
nextSegmentId: number | null;
|
|
687
686
|
createdAt: Date;
|
|
688
687
|
updatedAt: Date;
|
|
689
|
-
}
|
|
690
|
-
} &
|
|
688
|
+
})[];
|
|
689
|
+
} & {
|
|
691
690
|
id: number;
|
|
692
691
|
index: number;
|
|
693
692
|
facts: DB.Prisma.JsonValue;
|
|
@@ -697,9 +696,9 @@ declare function getGame(args: any, ctx: Context$1): Promise<({
|
|
|
697
696
|
gameId: number;
|
|
698
697
|
createdAt: Date;
|
|
699
698
|
updatedAt: Date;
|
|
700
|
-
}
|
|
699
|
+
})[];
|
|
701
700
|
activePeriod: ({
|
|
702
|
-
segments:
|
|
701
|
+
segments: {
|
|
703
702
|
id: number;
|
|
704
703
|
index: number;
|
|
705
704
|
facts: DB.Prisma.JsonValue;
|
|
@@ -710,8 +709,8 @@ declare function getGame(args: any, ctx: Context$1): Promise<({
|
|
|
710
709
|
nextSegmentId: number | null;
|
|
711
710
|
createdAt: Date;
|
|
712
711
|
updatedAt: Date;
|
|
713
|
-
}
|
|
714
|
-
activeSegment:
|
|
712
|
+
}[];
|
|
713
|
+
activeSegment: {
|
|
715
714
|
id: number;
|
|
716
715
|
index: number;
|
|
717
716
|
facts: DB.Prisma.JsonValue;
|
|
@@ -722,8 +721,8 @@ declare function getGame(args: any, ctx: Context$1): Promise<({
|
|
|
722
721
|
nextSegmentId: number | null;
|
|
723
722
|
createdAt: Date;
|
|
724
723
|
updatedAt: Date;
|
|
725
|
-
}
|
|
726
|
-
} &
|
|
724
|
+
} | null;
|
|
725
|
+
} & {
|
|
727
726
|
id: number;
|
|
728
727
|
index: number;
|
|
729
728
|
facts: DB.Prisma.JsonValue;
|
|
@@ -733,19 +732,19 @@ declare function getGame(args: any, ctx: Context$1): Promise<({
|
|
|
733
732
|
gameId: number;
|
|
734
733
|
createdAt: Date;
|
|
735
734
|
updatedAt: Date;
|
|
736
|
-
}
|
|
737
|
-
} &
|
|
735
|
+
}) | null;
|
|
736
|
+
} & {
|
|
738
737
|
id: number;
|
|
739
|
-
status: DB.GameStatus;
|
|
738
|
+
status: DB.$Enums.GameStatus;
|
|
740
739
|
name: string;
|
|
741
740
|
activePeriodIx: number;
|
|
742
741
|
activePeriodId: number | null;
|
|
743
742
|
ownerId: string;
|
|
744
743
|
createdAt: Date;
|
|
745
744
|
updatedAt: Date;
|
|
746
|
-
}
|
|
745
|
+
}) | null>;
|
|
747
746
|
declare function getGameFromContext(ctx: Context$1): Promise<({
|
|
748
|
-
activePeriod:
|
|
747
|
+
activePeriod: {
|
|
749
748
|
id: number;
|
|
750
749
|
index: number;
|
|
751
750
|
facts: DB.Prisma.JsonValue;
|
|
@@ -755,26 +754,26 @@ declare function getGameFromContext(ctx: Context$1): Promise<({
|
|
|
755
754
|
gameId: number;
|
|
756
755
|
createdAt: Date;
|
|
757
756
|
updatedAt: Date;
|
|
758
|
-
}
|
|
759
|
-
} &
|
|
757
|
+
} | null;
|
|
758
|
+
} & {
|
|
760
759
|
id: number;
|
|
761
|
-
status: DB.GameStatus;
|
|
760
|
+
status: DB.$Enums.GameStatus;
|
|
762
761
|
name: string;
|
|
763
762
|
activePeriodIx: number;
|
|
764
763
|
activePeriodId: number | null;
|
|
765
764
|
ownerId: string;
|
|
766
765
|
createdAt: Date;
|
|
767
766
|
updatedAt: Date;
|
|
768
|
-
}
|
|
767
|
+
}) | null>;
|
|
769
768
|
declare function getLearningElements(args: any, ctx: Context$1): Promise<({
|
|
770
|
-
options:
|
|
769
|
+
options: {
|
|
771
770
|
id: number;
|
|
772
771
|
content: string;
|
|
773
772
|
correct: boolean;
|
|
774
773
|
feedback: string | null;
|
|
775
774
|
learningElementSlug: string;
|
|
776
|
-
}
|
|
777
|
-
} &
|
|
775
|
+
}[];
|
|
776
|
+
} & {
|
|
778
777
|
id: string;
|
|
779
778
|
title: string;
|
|
780
779
|
question: string;
|
|
@@ -783,7 +782,7 @@ declare function getLearningElements(args: any, ctx: Context$1): Promise<({
|
|
|
783
782
|
reward: DB.Prisma.JsonValue;
|
|
784
783
|
createdAt: Date;
|
|
785
784
|
updatedAt: Date;
|
|
786
|
-
}
|
|
785
|
+
})[]>;
|
|
787
786
|
declare function computePeriodStartResults({ results, players, activePeriodIx, gameId, periodFacts }: {
|
|
788
787
|
results: any;
|
|
789
788
|
players: any;
|
|
@@ -869,7 +868,7 @@ interface PerformActionArgs<ActionTypes> {
|
|
|
869
868
|
facts: any;
|
|
870
869
|
}
|
|
871
870
|
declare function performAction<ActionTypes>(args: PerformActionArgs<ActionTypes>, ctx: Context, { reducers }: any): Promise<({
|
|
872
|
-
period:
|
|
871
|
+
period: {
|
|
873
872
|
id: number;
|
|
874
873
|
index: number;
|
|
875
874
|
facts: DB.Prisma.JsonValue;
|
|
@@ -879,10 +878,10 @@ declare function performAction<ActionTypes>(args: PerformActionArgs<ActionTypes>
|
|
|
879
878
|
gameId: number;
|
|
880
879
|
createdAt: Date;
|
|
881
880
|
updatedAt: Date;
|
|
882
|
-
}
|
|
883
|
-
} &
|
|
881
|
+
};
|
|
882
|
+
} & {
|
|
884
883
|
id: number;
|
|
885
|
-
type: DB.PlayerResultType;
|
|
884
|
+
type: DB.$Enums.PlayerResultType;
|
|
886
885
|
facts: DB.Prisma.JsonValue;
|
|
887
886
|
playerId: string;
|
|
888
887
|
gameId: number;
|
|
@@ -892,14 +891,14 @@ declare function performAction<ActionTypes>(args: PerformActionArgs<ActionTypes>
|
|
|
892
891
|
segmentIx: number | null;
|
|
893
892
|
createdAt: Date;
|
|
894
893
|
updatedAt: Date;
|
|
895
|
-
}
|
|
894
|
+
}) | null>;
|
|
896
895
|
interface SaveDecisionsArgs {
|
|
897
896
|
decisionType: DB.PlayerDecisionType;
|
|
898
897
|
facts: any;
|
|
899
898
|
}
|
|
900
|
-
declare function saveDecisions(args: SaveDecisionsArgs, ctx: Context): Promise<
|
|
899
|
+
declare function saveDecisions(args: SaveDecisionsArgs, ctx: Context): Promise<{
|
|
901
900
|
id: number;
|
|
902
|
-
type: DB.PlayerDecisionType;
|
|
901
|
+
type: DB.$Enums.PlayerDecisionType;
|
|
903
902
|
facts: DB.Prisma.JsonValue;
|
|
904
903
|
gameId: number;
|
|
905
904
|
playerId: string;
|
|
@@ -907,16 +906,16 @@ declare function saveDecisions(args: SaveDecisionsArgs, ctx: Context): Promise<(
|
|
|
907
906
|
periodIx: number;
|
|
908
907
|
createdAt: Date;
|
|
909
908
|
updatedAt: Date;
|
|
910
|
-
}
|
|
909
|
+
} | null>;
|
|
911
910
|
interface GetPlayerResultArgs {
|
|
912
911
|
gameId: number;
|
|
913
912
|
playerId: string;
|
|
914
913
|
}
|
|
915
914
|
declare function getPlayerResult(args: GetPlayerResultArgs, ctx: Context): Promise<{
|
|
916
915
|
currentGame: {
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
learningElements:
|
|
916
|
+
periods: ({
|
|
917
|
+
segments: ({
|
|
918
|
+
learningElements: {
|
|
920
919
|
id: string;
|
|
921
920
|
title: string;
|
|
922
921
|
question: string;
|
|
@@ -925,18 +924,18 @@ declare function getPlayerResult(args: GetPlayerResultArgs, ctx: Context): Promi
|
|
|
925
924
|
reward: DB.Prisma.JsonValue;
|
|
926
925
|
createdAt: Date;
|
|
927
926
|
updatedAt: Date;
|
|
928
|
-
}
|
|
929
|
-
storyElements:
|
|
927
|
+
}[];
|
|
928
|
+
storyElements: {
|
|
930
929
|
id: string;
|
|
931
930
|
title: string;
|
|
932
|
-
type: DB.StoryElementType;
|
|
931
|
+
type: DB.$Enums.StoryElementType;
|
|
933
932
|
content: string | null;
|
|
934
933
|
contentRole: DB.Prisma.JsonValue;
|
|
935
934
|
reward: DB.Prisma.JsonValue;
|
|
936
935
|
createdAt: Date;
|
|
937
936
|
updatedAt: Date;
|
|
938
|
-
}
|
|
939
|
-
} &
|
|
937
|
+
}[];
|
|
938
|
+
} & {
|
|
940
939
|
id: number;
|
|
941
940
|
index: number;
|
|
942
941
|
facts: DB.Prisma.JsonValue;
|
|
@@ -947,9 +946,21 @@ declare function getPlayerResult(args: GetPlayerResultArgs, ctx: Context): Promi
|
|
|
947
946
|
nextSegmentId: number | null;
|
|
948
947
|
createdAt: Date;
|
|
949
948
|
updatedAt: Date;
|
|
950
|
-
}
|
|
949
|
+
})[];
|
|
950
|
+
} & {
|
|
951
|
+
id: number;
|
|
952
|
+
index: number;
|
|
953
|
+
facts: DB.Prisma.JsonValue;
|
|
954
|
+
activeSegmentIx: number;
|
|
955
|
+
activeSegmentId: number | null;
|
|
956
|
+
nextPeriodId: number | null;
|
|
957
|
+
gameId: number;
|
|
958
|
+
createdAt: Date;
|
|
959
|
+
updatedAt: Date;
|
|
960
|
+
})[];
|
|
961
|
+
activePeriod: ({
|
|
951
962
|
segments: ({
|
|
952
|
-
learningElements:
|
|
963
|
+
learningElements: {
|
|
953
964
|
id: string;
|
|
954
965
|
title: string;
|
|
955
966
|
question: string;
|
|
@@ -958,18 +969,18 @@ declare function getPlayerResult(args: GetPlayerResultArgs, ctx: Context): Promi
|
|
|
958
969
|
reward: DB.Prisma.JsonValue;
|
|
959
970
|
createdAt: Date;
|
|
960
971
|
updatedAt: Date;
|
|
961
|
-
}
|
|
962
|
-
storyElements:
|
|
972
|
+
}[];
|
|
973
|
+
storyElements: {
|
|
963
974
|
id: string;
|
|
964
975
|
title: string;
|
|
965
|
-
type: DB.StoryElementType;
|
|
976
|
+
type: DB.$Enums.StoryElementType;
|
|
966
977
|
content: string | null;
|
|
967
978
|
contentRole: DB.Prisma.JsonValue;
|
|
968
979
|
reward: DB.Prisma.JsonValue;
|
|
969
980
|
createdAt: Date;
|
|
970
981
|
updatedAt: Date;
|
|
971
|
-
}
|
|
972
|
-
} &
|
|
982
|
+
}[];
|
|
983
|
+
} & {
|
|
973
984
|
id: number;
|
|
974
985
|
index: number;
|
|
975
986
|
facts: DB.Prisma.JsonValue;
|
|
@@ -980,21 +991,9 @@ declare function getPlayerResult(args: GetPlayerResultArgs, ctx: Context): Promi
|
|
|
980
991
|
nextSegmentId: number | null;
|
|
981
992
|
createdAt: Date;
|
|
982
993
|
updatedAt: Date;
|
|
983
|
-
}
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
index: number;
|
|
987
|
-
facts: DB.Prisma.JsonValue;
|
|
988
|
-
activeSegmentIx: number;
|
|
989
|
-
activeSegmentId: number | null;
|
|
990
|
-
nextPeriodId: number | null;
|
|
991
|
-
gameId: number;
|
|
992
|
-
createdAt: Date;
|
|
993
|
-
updatedAt: Date;
|
|
994
|
-
}, unknown> & {}) | null;
|
|
995
|
-
periods: ({
|
|
996
|
-
segments: ({
|
|
997
|
-
learningElements: (_prisma_client_runtime.GetResult<{
|
|
994
|
+
})[];
|
|
995
|
+
activeSegment: ({
|
|
996
|
+
learningElements: {
|
|
998
997
|
id: string;
|
|
999
998
|
title: string;
|
|
1000
999
|
question: string;
|
|
@@ -1003,18 +1002,18 @@ declare function getPlayerResult(args: GetPlayerResultArgs, ctx: Context): Promi
|
|
|
1003
1002
|
reward: DB.Prisma.JsonValue;
|
|
1004
1003
|
createdAt: Date;
|
|
1005
1004
|
updatedAt: Date;
|
|
1006
|
-
}
|
|
1007
|
-
storyElements:
|
|
1005
|
+
}[];
|
|
1006
|
+
storyElements: {
|
|
1008
1007
|
id: string;
|
|
1009
1008
|
title: string;
|
|
1010
|
-
type: DB.StoryElementType;
|
|
1009
|
+
type: DB.$Enums.StoryElementType;
|
|
1011
1010
|
content: string | null;
|
|
1012
1011
|
contentRole: DB.Prisma.JsonValue;
|
|
1013
1012
|
reward: DB.Prisma.JsonValue;
|
|
1014
1013
|
createdAt: Date;
|
|
1015
1014
|
updatedAt: Date;
|
|
1016
|
-
}
|
|
1017
|
-
} &
|
|
1015
|
+
}[];
|
|
1016
|
+
} & {
|
|
1018
1017
|
id: number;
|
|
1019
1018
|
index: number;
|
|
1020
1019
|
facts: DB.Prisma.JsonValue;
|
|
@@ -1025,8 +1024,8 @@ declare function getPlayerResult(args: GetPlayerResultArgs, ctx: Context): Promi
|
|
|
1025
1024
|
nextSegmentId: number | null;
|
|
1026
1025
|
createdAt: Date;
|
|
1027
1026
|
updatedAt: Date;
|
|
1028
|
-
}
|
|
1029
|
-
} &
|
|
1027
|
+
}) | null;
|
|
1028
|
+
} & {
|
|
1030
1029
|
id: number;
|
|
1031
1030
|
index: number;
|
|
1032
1031
|
facts: DB.Prisma.JsonValue;
|
|
@@ -1036,31 +1035,20 @@ declare function getPlayerResult(args: GetPlayerResultArgs, ctx: Context): Promi
|
|
|
1036
1035
|
gameId: number;
|
|
1037
1036
|
createdAt: Date;
|
|
1038
1037
|
updatedAt: Date;
|
|
1039
|
-
}
|
|
1040
|
-
} &
|
|
1038
|
+
}) | null;
|
|
1039
|
+
} & {
|
|
1041
1040
|
id: number;
|
|
1042
|
-
status: DB.GameStatus;
|
|
1041
|
+
status: DB.$Enums.GameStatus;
|
|
1043
1042
|
name: string;
|
|
1044
1043
|
activePeriodIx: number;
|
|
1045
1044
|
activePeriodId: number | null;
|
|
1046
1045
|
ownerId: string;
|
|
1047
1046
|
createdAt: Date;
|
|
1048
1047
|
updatedAt: Date;
|
|
1049
|
-
}
|
|
1048
|
+
};
|
|
1050
1049
|
playerResult: ({
|
|
1051
|
-
period: _prisma_client_runtime.GetResult<{
|
|
1052
|
-
id: number;
|
|
1053
|
-
index: number;
|
|
1054
|
-
facts: DB.Prisma.JsonValue;
|
|
1055
|
-
activeSegmentIx: number;
|
|
1056
|
-
activeSegmentId: number | null;
|
|
1057
|
-
nextPeriodId: number | null;
|
|
1058
|
-
gameId: number;
|
|
1059
|
-
createdAt: Date;
|
|
1060
|
-
updatedAt: Date;
|
|
1061
|
-
}, unknown> & {};
|
|
1062
1050
|
player: {
|
|
1063
|
-
completedLearningElements:
|
|
1051
|
+
completedLearningElements: {
|
|
1064
1052
|
id: string;
|
|
1065
1053
|
title: string;
|
|
1066
1054
|
question: string;
|
|
@@ -1069,18 +1057,18 @@ declare function getPlayerResult(args: GetPlayerResultArgs, ctx: Context): Promi
|
|
|
1069
1057
|
reward: DB.Prisma.JsonValue;
|
|
1070
1058
|
createdAt: Date;
|
|
1071
1059
|
updatedAt: Date;
|
|
1072
|
-
}
|
|
1073
|
-
visitedStoryElements:
|
|
1060
|
+
}[];
|
|
1061
|
+
visitedStoryElements: {
|
|
1074
1062
|
id: string;
|
|
1075
1063
|
title: string;
|
|
1076
|
-
type: DB.StoryElementType;
|
|
1064
|
+
type: DB.$Enums.StoryElementType;
|
|
1077
1065
|
content: string | null;
|
|
1078
1066
|
contentRole: DB.Prisma.JsonValue;
|
|
1079
1067
|
reward: DB.Prisma.JsonValue;
|
|
1080
1068
|
createdAt: Date;
|
|
1081
1069
|
updatedAt: Date;
|
|
1082
|
-
}
|
|
1083
|
-
} &
|
|
1070
|
+
}[];
|
|
1071
|
+
} & {
|
|
1084
1072
|
id: string;
|
|
1085
1073
|
number: number;
|
|
1086
1074
|
name: string;
|
|
@@ -1102,10 +1090,21 @@ declare function getPlayerResult(args: GetPlayerResultArgs, ctx: Context): Promi
|
|
|
1102
1090
|
gameId: number;
|
|
1103
1091
|
createdAt: Date;
|
|
1104
1092
|
updatedAt: Date;
|
|
1105
|
-
}
|
|
1106
|
-
|
|
1093
|
+
};
|
|
1094
|
+
period: {
|
|
1095
|
+
id: number;
|
|
1096
|
+
index: number;
|
|
1097
|
+
facts: DB.Prisma.JsonValue;
|
|
1098
|
+
activeSegmentIx: number;
|
|
1099
|
+
activeSegmentId: number | null;
|
|
1100
|
+
nextPeriodId: number | null;
|
|
1101
|
+
gameId: number;
|
|
1102
|
+
createdAt: Date;
|
|
1103
|
+
updatedAt: Date;
|
|
1104
|
+
};
|
|
1105
|
+
} & {
|
|
1107
1106
|
id: number;
|
|
1108
|
-
type: DB.PlayerResultType;
|
|
1107
|
+
type: DB.$Enums.PlayerResultType;
|
|
1109
1108
|
facts: DB.Prisma.JsonValue;
|
|
1110
1109
|
playerId: string;
|
|
1111
1110
|
gameId: number;
|
|
@@ -1115,9 +1114,9 @@ declare function getPlayerResult(args: GetPlayerResultArgs, ctx: Context): Promi
|
|
|
1115
1114
|
segmentIx: number | null;
|
|
1116
1115
|
createdAt: Date;
|
|
1117
1116
|
updatedAt: Date;
|
|
1118
|
-
}
|
|
1117
|
+
}) | null;
|
|
1119
1118
|
previousResults: DB.Prisma.PrismaPromise<({
|
|
1120
|
-
period:
|
|
1119
|
+
period: {
|
|
1121
1120
|
id: number;
|
|
1122
1121
|
index: number;
|
|
1123
1122
|
facts: DB.Prisma.JsonValue;
|
|
@@ -1127,8 +1126,8 @@ declare function getPlayerResult(args: GetPlayerResultArgs, ctx: Context): Promi
|
|
|
1127
1126
|
gameId: number;
|
|
1128
1127
|
createdAt: Date;
|
|
1129
1128
|
updatedAt: Date;
|
|
1130
|
-
}
|
|
1131
|
-
segment:
|
|
1129
|
+
};
|
|
1130
|
+
segment: {
|
|
1132
1131
|
id: number;
|
|
1133
1132
|
index: number;
|
|
1134
1133
|
facts: DB.Prisma.JsonValue;
|
|
@@ -1139,10 +1138,10 @@ declare function getPlayerResult(args: GetPlayerResultArgs, ctx: Context): Promi
|
|
|
1139
1138
|
nextSegmentId: number | null;
|
|
1140
1139
|
createdAt: Date;
|
|
1141
1140
|
updatedAt: Date;
|
|
1142
|
-
}
|
|
1143
|
-
} &
|
|
1141
|
+
} | null;
|
|
1142
|
+
} & {
|
|
1144
1143
|
id: number;
|
|
1145
|
-
type: DB.PlayerResultType;
|
|
1144
|
+
type: DB.$Enums.PlayerResultType;
|
|
1146
1145
|
facts: DB.Prisma.JsonValue;
|
|
1147
1146
|
playerId: string;
|
|
1148
1147
|
gameId: number;
|
|
@@ -1152,8 +1151,8 @@ declare function getPlayerResult(args: GetPlayerResultArgs, ctx: Context): Promi
|
|
|
1152
1151
|
segmentIx: number | null;
|
|
1153
1152
|
createdAt: Date;
|
|
1154
1153
|
updatedAt: Date;
|
|
1155
|
-
}
|
|
1156
|
-
transactions: DB.Prisma.PrismaPromise<
|
|
1154
|
+
})[]>;
|
|
1155
|
+
transactions: DB.Prisma.PrismaPromise<{
|
|
1157
1156
|
id: number;
|
|
1158
1157
|
type: string;
|
|
1159
1158
|
facts: DB.Prisma.JsonValue;
|
|
@@ -1164,32 +1163,32 @@ declare function getPlayerResult(args: GetPlayerResultArgs, ctx: Context): Promi
|
|
|
1164
1163
|
segmentId: number | null;
|
|
1165
1164
|
segmentIx: number | null;
|
|
1166
1165
|
createdAt: Date;
|
|
1167
|
-
}
|
|
1166
|
+
}[]>;
|
|
1168
1167
|
} | null>;
|
|
1169
1168
|
interface GetPlayerDataArgs {
|
|
1170
1169
|
playerId: string;
|
|
1171
1170
|
}
|
|
1172
1171
|
declare function getPlayerData(args: GetPlayerDataArgs, ctx: Context): Promise<({
|
|
1173
|
-
level:
|
|
1172
|
+
level: {
|
|
1174
1173
|
id: number;
|
|
1175
1174
|
index: number;
|
|
1176
1175
|
description: string;
|
|
1177
1176
|
image: string;
|
|
1178
1177
|
requiredXP: number;
|
|
1179
|
-
}
|
|
1178
|
+
};
|
|
1180
1179
|
achievements: ({
|
|
1181
|
-
achievement:
|
|
1180
|
+
achievement: {
|
|
1182
1181
|
id: string;
|
|
1183
1182
|
name: string;
|
|
1184
1183
|
description: string;
|
|
1185
1184
|
image: string | null;
|
|
1186
1185
|
onEventId: string;
|
|
1187
|
-
when: DB.AchievementFrequency;
|
|
1186
|
+
when: DB.$Enums.AchievementFrequency;
|
|
1188
1187
|
reward: DB.Prisma.JsonValue;
|
|
1189
1188
|
createdAt: Date;
|
|
1190
1189
|
updatedAt: Date;
|
|
1191
|
-
}
|
|
1192
|
-
} &
|
|
1190
|
+
};
|
|
1191
|
+
} & {
|
|
1193
1192
|
id: number;
|
|
1194
1193
|
count: number;
|
|
1195
1194
|
achievementId: string;
|
|
@@ -1198,8 +1197,8 @@ declare function getPlayerData(args: GetPlayerDataArgs, ctx: Context): Promise<(
|
|
|
1198
1197
|
gameId: number;
|
|
1199
1198
|
createdAt: Date;
|
|
1200
1199
|
updatedAt: Date;
|
|
1201
|
-
}
|
|
1202
|
-
} &
|
|
1200
|
+
})[];
|
|
1201
|
+
} & {
|
|
1203
1202
|
id: string;
|
|
1204
1203
|
number: number;
|
|
1205
1204
|
name: string;
|
|
@@ -1221,7 +1220,7 @@ declare function getPlayerData(args: GetPlayerDataArgs, ctx: Context): Promise<(
|
|
|
1221
1220
|
gameId: number;
|
|
1222
1221
|
createdAt: Date;
|
|
1223
1222
|
updatedAt: Date;
|
|
1224
|
-
}
|
|
1223
|
+
}) | null>;
|
|
1225
1224
|
interface GetLearningElementArgs {
|
|
1226
1225
|
id: string;
|
|
1227
1226
|
}
|
|
@@ -1229,20 +1228,20 @@ declare function getLearningElement(args: GetLearningElementArgs, ctx: Context):
|
|
|
1229
1228
|
id: string;
|
|
1230
1229
|
element: {
|
|
1231
1230
|
feedback: string | null;
|
|
1232
|
-
options:
|
|
1231
|
+
options: {
|
|
1233
1232
|
id: number;
|
|
1234
1233
|
content: string;
|
|
1235
1234
|
correct: boolean;
|
|
1236
1235
|
feedback: string | null;
|
|
1237
1236
|
learningElementSlug: string;
|
|
1238
|
-
}
|
|
1237
|
+
}[];
|
|
1239
1238
|
id: string;
|
|
1240
|
-
createdAt: Date;
|
|
1241
|
-
updatedAt: Date;
|
|
1242
1239
|
title: string;
|
|
1243
1240
|
question: string;
|
|
1244
1241
|
motivation: string | null;
|
|
1245
1242
|
reward: DB.Prisma.JsonValue;
|
|
1243
|
+
createdAt: Date;
|
|
1244
|
+
updatedAt: Date;
|
|
1246
1245
|
};
|
|
1247
1246
|
state: LearningElementState;
|
|
1248
1247
|
solution: string | null;
|
|
@@ -1264,7 +1263,7 @@ declare function attemptLearningElement(args: AttemptLearningElementArgs, ctx: C
|
|
|
1264
1263
|
interface MarkStoryElementArgs {
|
|
1265
1264
|
elementId: string;
|
|
1266
1265
|
}
|
|
1267
|
-
declare function markStoryElement(args: MarkStoryElementArgs, ctx: Context): Promise<
|
|
1266
|
+
declare function markStoryElement(args: MarkStoryElementArgs, ctx: Context): Promise<{
|
|
1268
1267
|
id: string;
|
|
1269
1268
|
number: number;
|
|
1270
1269
|
name: string;
|
|
@@ -1286,10 +1285,10 @@ declare function markStoryElement(args: MarkStoryElementArgs, ctx: Context): Pro
|
|
|
1286
1285
|
gameId: number;
|
|
1287
1286
|
createdAt: Date;
|
|
1288
1287
|
updatedAt: Date;
|
|
1289
|
-
}
|
|
1288
|
+
} | null>;
|
|
1290
1289
|
interface GetPlayerTransactionsArgs {
|
|
1291
1290
|
}
|
|
1292
|
-
declare function getPlayerTransactions(args: GetPlayerTransactionsArgs, ctx: Context): Promise<
|
|
1291
|
+
declare function getPlayerTransactions(args: GetPlayerTransactionsArgs, ctx: Context): Promise<{
|
|
1293
1292
|
id: number;
|
|
1294
1293
|
type: string;
|
|
1295
1294
|
facts: DB.Prisma.JsonValue;
|
|
@@ -1300,20 +1299,9 @@ declare function getPlayerTransactions(args: GetPlayerTransactionsArgs, ctx: Con
|
|
|
1300
1299
|
segmentId: number | null;
|
|
1301
1300
|
segmentIx: number | null;
|
|
1302
1301
|
createdAt: Date;
|
|
1303
|
-
}
|
|
1302
|
+
}[]>;
|
|
1304
1303
|
declare function getPlayerResults(args: any, ctx: Context): Promise<({
|
|
1305
|
-
|
|
1306
|
-
id: number;
|
|
1307
|
-
index: number;
|
|
1308
|
-
facts: DB.Prisma.JsonValue;
|
|
1309
|
-
activeSegmentIx: number;
|
|
1310
|
-
activeSegmentId: number | null;
|
|
1311
|
-
nextPeriodId: number | null;
|
|
1312
|
-
gameId: number;
|
|
1313
|
-
createdAt: Date;
|
|
1314
|
-
updatedAt: Date;
|
|
1315
|
-
}, unknown> & {};
|
|
1316
|
-
player: _prisma_client_runtime.GetResult<{
|
|
1304
|
+
player: {
|
|
1317
1305
|
id: string;
|
|
1318
1306
|
number: number;
|
|
1319
1307
|
name: string;
|
|
@@ -1335,8 +1323,19 @@ declare function getPlayerResults(args: any, ctx: Context): Promise<({
|
|
|
1335
1323
|
gameId: number;
|
|
1336
1324
|
createdAt: Date;
|
|
1337
1325
|
updatedAt: Date;
|
|
1338
|
-
}
|
|
1339
|
-
|
|
1326
|
+
};
|
|
1327
|
+
period: {
|
|
1328
|
+
id: number;
|
|
1329
|
+
index: number;
|
|
1330
|
+
facts: DB.Prisma.JsonValue;
|
|
1331
|
+
activeSegmentIx: number;
|
|
1332
|
+
activeSegmentId: number | null;
|
|
1333
|
+
nextPeriodId: number | null;
|
|
1334
|
+
gameId: number;
|
|
1335
|
+
createdAt: Date;
|
|
1336
|
+
updatedAt: Date;
|
|
1337
|
+
};
|
|
1338
|
+
segment: {
|
|
1340
1339
|
id: number;
|
|
1341
1340
|
index: number;
|
|
1342
1341
|
facts: DB.Prisma.JsonValue;
|
|
@@ -1347,10 +1346,10 @@ declare function getPlayerResults(args: any, ctx: Context): Promise<({
|
|
|
1347
1346
|
nextSegmentId: number | null;
|
|
1348
1347
|
createdAt: Date;
|
|
1349
1348
|
updatedAt: Date;
|
|
1350
|
-
}
|
|
1351
|
-
} &
|
|
1349
|
+
} | null;
|
|
1350
|
+
} & {
|
|
1352
1351
|
id: number;
|
|
1353
|
-
type: DB.PlayerResultType;
|
|
1352
|
+
type: DB.$Enums.PlayerResultType;
|
|
1354
1353
|
facts: DB.Prisma.JsonValue;
|
|
1355
1354
|
playerId: string;
|
|
1356
1355
|
gameId: number;
|
|
@@ -1360,28 +1359,17 @@ declare function getPlayerResults(args: any, ctx: Context): Promise<({
|
|
|
1360
1359
|
segmentIx: number | null;
|
|
1361
1360
|
createdAt: Date;
|
|
1362
1361
|
updatedAt: Date;
|
|
1363
|
-
}
|
|
1362
|
+
})[]>;
|
|
1364
1363
|
declare function getPastResults(args: any, ctx: Context): Promise<({
|
|
1365
|
-
period: _prisma_client_runtime.GetResult<{
|
|
1366
|
-
id: number;
|
|
1367
|
-
index: number;
|
|
1368
|
-
facts: DB.Prisma.JsonValue;
|
|
1369
|
-
activeSegmentIx: number;
|
|
1370
|
-
activeSegmentId: number | null;
|
|
1371
|
-
nextPeriodId: number | null;
|
|
1372
|
-
gameId: number;
|
|
1373
|
-
createdAt: Date;
|
|
1374
|
-
updatedAt: Date;
|
|
1375
|
-
}, unknown> & {};
|
|
1376
1364
|
player: {
|
|
1377
|
-
level:
|
|
1365
|
+
level: {
|
|
1378
1366
|
id: number;
|
|
1379
1367
|
index: number;
|
|
1380
1368
|
description: string;
|
|
1381
1369
|
image: string;
|
|
1382
1370
|
requiredXP: number;
|
|
1383
|
-
}
|
|
1384
|
-
} &
|
|
1371
|
+
};
|
|
1372
|
+
} & {
|
|
1385
1373
|
id: string;
|
|
1386
1374
|
number: number;
|
|
1387
1375
|
name: string;
|
|
@@ -1403,10 +1391,21 @@ declare function getPastResults(args: any, ctx: Context): Promise<({
|
|
|
1403
1391
|
gameId: number;
|
|
1404
1392
|
createdAt: Date;
|
|
1405
1393
|
updatedAt: Date;
|
|
1406
|
-
}
|
|
1407
|
-
|
|
1394
|
+
};
|
|
1395
|
+
period: {
|
|
1396
|
+
id: number;
|
|
1397
|
+
index: number;
|
|
1398
|
+
facts: DB.Prisma.JsonValue;
|
|
1399
|
+
activeSegmentIx: number;
|
|
1400
|
+
activeSegmentId: number | null;
|
|
1401
|
+
nextPeriodId: number | null;
|
|
1402
|
+
gameId: number;
|
|
1403
|
+
createdAt: Date;
|
|
1404
|
+
updatedAt: Date;
|
|
1405
|
+
};
|
|
1406
|
+
} & {
|
|
1408
1407
|
id: number;
|
|
1409
|
-
type: DB.PlayerResultType;
|
|
1408
|
+
type: DB.$Enums.PlayerResultType;
|
|
1410
1409
|
facts: DB.Prisma.JsonValue;
|
|
1411
1410
|
playerId: string;
|
|
1412
1411
|
gameId: number;
|
|
@@ -1416,8 +1415,8 @@ declare function getPastResults(args: any, ctx: Context): Promise<({
|
|
|
1416
1415
|
segmentIx: number | null;
|
|
1417
1416
|
createdAt: Date;
|
|
1418
1417
|
updatedAt: Date;
|
|
1419
|
-
}
|
|
1420
|
-
declare function updateReadyState(args: any, ctx: Context): Promise<
|
|
1418
|
+
})[] | null>;
|
|
1419
|
+
declare function updateReadyState(args: any, ctx: Context): Promise<{
|
|
1421
1420
|
id: string;
|
|
1422
1421
|
number: number;
|
|
1423
1422
|
name: string;
|
|
@@ -1439,7 +1438,7 @@ declare function updateReadyState(args: any, ctx: Context): Promise<_prisma_clie
|
|
|
1439
1438
|
gameId: number;
|
|
1440
1439
|
createdAt: Date;
|
|
1441
1440
|
updatedAt: Date;
|
|
1442
|
-
}
|
|
1441
|
+
}>;
|
|
1443
1442
|
declare function addCountdown(args: any, ctx: Context): Promise<true | null>;
|
|
1444
1443
|
|
|
1445
1444
|
declare const PlayService_addCountdown: typeof addCountdown;
|