@gbl-uzh/platform 0.4.10 → 0.4.11
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 +12 -0
- package/dist/index.js +4 -0
- package/dist/nexus.js +5 -0
- package/dist/ops/QGame.graphql +2 -1
- package/dist/ops-b9a51fd0.d.ts +166 -0
- package/dist/schema.prisma +1 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -122,6 +122,7 @@ declare function loginAsTeam({ token }: LoginAsTeamArgs, ctx: CtxWithPrisma<Pris
|
|
|
122
122
|
}, unknown> & {})[];
|
|
123
123
|
} & _prisma_client_runtime.GetResult<{
|
|
124
124
|
id: string;
|
|
125
|
+
number: number;
|
|
125
126
|
name: string;
|
|
126
127
|
avatar: string;
|
|
127
128
|
location: string;
|
|
@@ -191,6 +192,7 @@ declare function createGame({ name, playerCount }: CreateGameArgs, ctx: Context$
|
|
|
191
192
|
}): Promise<{
|
|
192
193
|
players: (_prisma_client_runtime.GetResult<{
|
|
193
194
|
id: string;
|
|
195
|
+
number: number;
|
|
194
196
|
name: string;
|
|
195
197
|
avatar: string;
|
|
196
198
|
location: string;
|
|
@@ -395,6 +397,7 @@ declare function activateNextSegment({ gameId }: ActivateSegmentArgs, ctx: Conte
|
|
|
395
397
|
}, unknown> & {})[];
|
|
396
398
|
players: (_prisma_client_runtime.GetResult<{
|
|
397
399
|
id: string;
|
|
400
|
+
number: number;
|
|
398
401
|
name: string;
|
|
399
402
|
avatar: string;
|
|
400
403
|
location: string;
|
|
@@ -470,6 +473,7 @@ declare function activateNextSegment({ gameId }: ActivateSegmentArgs, ctx: Conte
|
|
|
470
473
|
}, unknown> & {})[];
|
|
471
474
|
players: (_prisma_client_runtime.GetResult<{
|
|
472
475
|
id: string;
|
|
476
|
+
number: number;
|
|
473
477
|
name: string;
|
|
474
478
|
avatar: string;
|
|
475
479
|
location: string;
|
|
@@ -569,6 +573,7 @@ declare function updatePlayerData({ name, avatar, color, facts }: UpdatePlayerDa
|
|
|
569
573
|
}, unknown> & {})[];
|
|
570
574
|
} & _prisma_client_runtime.GetResult<{
|
|
571
575
|
id: string;
|
|
576
|
+
number: number;
|
|
572
577
|
name: string;
|
|
573
578
|
avatar: string;
|
|
574
579
|
location: string;
|
|
@@ -620,6 +625,7 @@ declare function getGame(args: any, ctx: Context$1): Promise<({
|
|
|
620
625
|
}, unknown> & {})[];
|
|
621
626
|
} & _prisma_client_runtime.GetResult<{
|
|
622
627
|
id: string;
|
|
628
|
+
number: number;
|
|
623
629
|
name: string;
|
|
624
630
|
avatar: string;
|
|
625
631
|
location: string;
|
|
@@ -1063,6 +1069,7 @@ declare function getPlayerResult(args: GetPlayerResultArgs, ctx: Context): Promi
|
|
|
1063
1069
|
}, unknown> & {})[];
|
|
1064
1070
|
} & _prisma_client_runtime.GetResult<{
|
|
1065
1071
|
id: string;
|
|
1072
|
+
number: number;
|
|
1066
1073
|
name: string;
|
|
1067
1074
|
avatar: string;
|
|
1068
1075
|
location: string;
|
|
@@ -1180,6 +1187,7 @@ declare function getPlayerData(args: GetPlayerDataArgs, ctx: Context): Promise<(
|
|
|
1180
1187
|
}, unknown> & {})[];
|
|
1181
1188
|
} & _prisma_client_runtime.GetResult<{
|
|
1182
1189
|
id: string;
|
|
1190
|
+
number: number;
|
|
1183
1191
|
name: string;
|
|
1184
1192
|
avatar: string;
|
|
1185
1193
|
location: string;
|
|
@@ -1244,6 +1252,7 @@ interface MarkStoryElementArgs {
|
|
|
1244
1252
|
}
|
|
1245
1253
|
declare function markStoryElement(args: MarkStoryElementArgs, ctx: Context): Promise<(_prisma_client_runtime.GetResult<{
|
|
1246
1254
|
id: string;
|
|
1255
|
+
number: number;
|
|
1247
1256
|
name: string;
|
|
1248
1257
|
avatar: string;
|
|
1249
1258
|
location: string;
|
|
@@ -1292,6 +1301,7 @@ declare function getPlayerResults(args: any, ctx: Context): Promise<({
|
|
|
1292
1301
|
}, unknown> & {};
|
|
1293
1302
|
player: _prisma_client_runtime.GetResult<{
|
|
1294
1303
|
id: string;
|
|
1304
|
+
number: number;
|
|
1295
1305
|
name: string;
|
|
1296
1306
|
avatar: string;
|
|
1297
1307
|
location: string;
|
|
@@ -1358,6 +1368,7 @@ declare function getPastResults(args: any, ctx: Context): Promise<({
|
|
|
1358
1368
|
}, unknown> & {};
|
|
1359
1369
|
} & _prisma_client_runtime.GetResult<{
|
|
1360
1370
|
id: string;
|
|
1371
|
+
number: number;
|
|
1361
1372
|
name: string;
|
|
1362
1373
|
avatar: string;
|
|
1363
1374
|
location: string;
|
|
@@ -1393,6 +1404,7 @@ declare function getPastResults(args: any, ctx: Context): Promise<({
|
|
|
1393
1404
|
}, unknown> & {})[] | null>;
|
|
1394
1405
|
declare function updateReadyState(args: any, ctx: Context): Promise<_prisma_client_runtime.GetResult<{
|
|
1395
1406
|
id: string;
|
|
1407
|
+
number: number;
|
|
1396
1408
|
name: string;
|
|
1397
1409
|
avatar: string;
|
|
1398
1410
|
location: string;
|
package/dist/index.js
CHANGED
|
@@ -397,6 +397,7 @@ async function createGame({ name, playerCount }, ctx, { roleAssigner }) {
|
|
|
397
397
|
facts: {},
|
|
398
398
|
token: (0, import_nanoid.nanoid)(),
|
|
399
399
|
role: roleAssigner(ix),
|
|
400
|
+
number: playerCount - ix,
|
|
400
401
|
name: `Team ${playerCount - ix}`,
|
|
401
402
|
level: {
|
|
402
403
|
connect: {
|
|
@@ -1087,6 +1088,9 @@ async function getGame(args, ctx) {
|
|
|
1087
1088
|
include: {
|
|
1088
1089
|
level: true,
|
|
1089
1090
|
achievements: true
|
|
1091
|
+
},
|
|
1092
|
+
orderBy: {
|
|
1093
|
+
number: "asc"
|
|
1090
1094
|
}
|
|
1091
1095
|
},
|
|
1092
1096
|
periods: {
|
package/dist/nexus.js
CHANGED
|
@@ -171,6 +171,7 @@ var Player = (0, import_nexus3.objectType)({
|
|
|
171
171
|
definition(t) {
|
|
172
172
|
t.nonNull.id("id");
|
|
173
173
|
t.nonNull.boolean("isReady");
|
|
174
|
+
t.nonNull.int("number");
|
|
174
175
|
t.nonNull.string("name");
|
|
175
176
|
t.nonNull.string("avatar");
|
|
176
177
|
t.nonNull.string("location");
|
|
@@ -688,6 +689,7 @@ async function createGame({ name, playerCount }, ctx, { roleAssigner }) {
|
|
|
688
689
|
facts: {},
|
|
689
690
|
token: (0, import_nanoid.nanoid)(),
|
|
690
691
|
role: roleAssigner(ix),
|
|
692
|
+
number: playerCount - ix,
|
|
691
693
|
name: `Team ${playerCount - ix}`,
|
|
692
694
|
level: {
|
|
693
695
|
connect: {
|
|
@@ -1378,6 +1380,9 @@ async function getGame(args, ctx) {
|
|
|
1378
1380
|
include: {
|
|
1379
1381
|
level: true,
|
|
1380
1382
|
achievements: true
|
|
1383
|
+
},
|
|
1384
|
+
orderBy: {
|
|
1385
|
+
number: "asc"
|
|
1381
1386
|
}
|
|
1382
1387
|
},
|
|
1383
1388
|
periods: {
|
package/dist/ops/QGame.graphql
CHANGED
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
type Maybe<T> = T | null;
|
|
2
|
+
/** All built-in and custom scalars, mapped to their actual values */
|
|
3
|
+
type Scalars = {
|
|
4
|
+
ID: string;
|
|
5
|
+
String: string;
|
|
6
|
+
Boolean: boolean;
|
|
7
|
+
Int: number;
|
|
8
|
+
Float: number;
|
|
9
|
+
/** A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant with the `date-time` format outlined in section 5.6 of the RFC 3339 profile of the ISO 8601 standard for representation of dates and times using the Gregorian calendar. */
|
|
10
|
+
DateTime: any;
|
|
11
|
+
/** The `JSONObject` scalar type represents JSON objects as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf). */
|
|
12
|
+
JSONObject: any;
|
|
13
|
+
};
|
|
14
|
+
type Achievement = {
|
|
15
|
+
__typename?: 'Achievement';
|
|
16
|
+
description: Scalars['String'];
|
|
17
|
+
id: Scalars['ID'];
|
|
18
|
+
image?: Maybe<Scalars['String']>;
|
|
19
|
+
name: Scalars['String'];
|
|
20
|
+
reward?: Maybe<Scalars['JSONObject']>;
|
|
21
|
+
when: AchievementFrequency;
|
|
22
|
+
};
|
|
23
|
+
declare enum AchievementFrequency {
|
|
24
|
+
Each = "EACH",
|
|
25
|
+
First = "FIRST"
|
|
26
|
+
}
|
|
27
|
+
type AchievementInstance = {
|
|
28
|
+
__typename?: 'AchievementInstance';
|
|
29
|
+
achievement: Achievement;
|
|
30
|
+
count: Scalars['Int'];
|
|
31
|
+
id: Scalars['Int'];
|
|
32
|
+
};
|
|
33
|
+
type Game = {
|
|
34
|
+
__typename?: 'Game';
|
|
35
|
+
activePeriod?: Maybe<Period>;
|
|
36
|
+
activePeriodIx?: Maybe<Scalars['Int']>;
|
|
37
|
+
id: Scalars['ID'];
|
|
38
|
+
name: Scalars['String'];
|
|
39
|
+
periods: Array<Period>;
|
|
40
|
+
players: Array<Player>;
|
|
41
|
+
segments: Array<PeriodSegment>;
|
|
42
|
+
status: GameStatus;
|
|
43
|
+
};
|
|
44
|
+
declare enum GameStatus {
|
|
45
|
+
Completed = "COMPLETED",
|
|
46
|
+
Consolidation = "CONSOLIDATION",
|
|
47
|
+
Paused = "PAUSED",
|
|
48
|
+
Preparation = "PREPARATION",
|
|
49
|
+
Results = "RESULTS",
|
|
50
|
+
Running = "RUNNING",
|
|
51
|
+
Scheduled = "SCHEDULED"
|
|
52
|
+
}
|
|
53
|
+
type LearningAnswerOption = {
|
|
54
|
+
__typename?: 'LearningAnswerOption';
|
|
55
|
+
content: Scalars['String'];
|
|
56
|
+
correct: Scalars['Boolean'];
|
|
57
|
+
id: Scalars['ID'];
|
|
58
|
+
};
|
|
59
|
+
type LearningElement = {
|
|
60
|
+
__typename?: 'LearningElement';
|
|
61
|
+
feedback?: Maybe<Scalars['String']>;
|
|
62
|
+
id: Scalars['ID'];
|
|
63
|
+
motivation?: Maybe<Scalars['String']>;
|
|
64
|
+
options: Array<LearningAnswerOption>;
|
|
65
|
+
question: Scalars['String'];
|
|
66
|
+
reward?: Maybe<Scalars['JSONObject']>;
|
|
67
|
+
title: Scalars['String'];
|
|
68
|
+
};
|
|
69
|
+
type Period = {
|
|
70
|
+
__typename?: 'Period';
|
|
71
|
+
actions: Array<PlayerAction>;
|
|
72
|
+
activeSegment?: Maybe<PeriodSegment>;
|
|
73
|
+
activeSegmentIx?: Maybe<Scalars['Int']>;
|
|
74
|
+
facts: Scalars['JSONObject'];
|
|
75
|
+
id: Scalars['ID'];
|
|
76
|
+
index: Scalars['Int'];
|
|
77
|
+
results: Array<PlayerResult>;
|
|
78
|
+
segments: Array<PeriodSegment>;
|
|
79
|
+
};
|
|
80
|
+
type PeriodSegment = {
|
|
81
|
+
__typename?: 'PeriodSegment';
|
|
82
|
+
actions: Array<PlayerAction>;
|
|
83
|
+
facts: Scalars['JSONObject'];
|
|
84
|
+
id: Scalars['ID'];
|
|
85
|
+
index: Scalars['Int'];
|
|
86
|
+
learningElements: Array<LearningElement>;
|
|
87
|
+
periodIx: Scalars['Int'];
|
|
88
|
+
results: Array<PlayerResult>;
|
|
89
|
+
storyElements: Array<StoryElement>;
|
|
90
|
+
};
|
|
91
|
+
type Player = {
|
|
92
|
+
__typename?: 'Player';
|
|
93
|
+
achievementIds: Array<Scalars['String']>;
|
|
94
|
+
achievementKeys: Array<Scalars['String']>;
|
|
95
|
+
achievements: Array<AchievementInstance>;
|
|
96
|
+
avatar: Scalars['String'];
|
|
97
|
+
color: Scalars['String'];
|
|
98
|
+
completedLearningElementIds: Array<Scalars['Int']>;
|
|
99
|
+
completedLearningElements: Array<LearningElement>;
|
|
100
|
+
experience: Scalars['Int'];
|
|
101
|
+
experienceToNext: Scalars['Int'];
|
|
102
|
+
facts: Scalars['JSONObject'];
|
|
103
|
+
id: Scalars['ID'];
|
|
104
|
+
isReady: Scalars['Boolean'];
|
|
105
|
+
level: PlayerLevel;
|
|
106
|
+
levelIx: Scalars['Int'];
|
|
107
|
+
location: Scalars['String'];
|
|
108
|
+
name: Scalars['String'];
|
|
109
|
+
role: Scalars['String'];
|
|
110
|
+
token: Scalars['String'];
|
|
111
|
+
tutorialCompleted: Scalars['Boolean'];
|
|
112
|
+
visitedStoryElementIds: Array<Scalars['Int']>;
|
|
113
|
+
visitedStoryElements: Array<StoryElement>;
|
|
114
|
+
};
|
|
115
|
+
type PlayerAction = {
|
|
116
|
+
__typename?: 'PlayerAction';
|
|
117
|
+
facts?: Maybe<Scalars['JSONObject']>;
|
|
118
|
+
id: Scalars['ID'];
|
|
119
|
+
period: Period;
|
|
120
|
+
periodIx: Scalars['Int'];
|
|
121
|
+
player: Player;
|
|
122
|
+
segment?: Maybe<PeriodSegment>;
|
|
123
|
+
segmentIx?: Maybe<Scalars['Int']>;
|
|
124
|
+
type: Scalars['String'];
|
|
125
|
+
};
|
|
126
|
+
declare enum PlayerDecisionType {
|
|
127
|
+
Consolidation = "CONSOLIDATION",
|
|
128
|
+
Preparation = "PREPARATION"
|
|
129
|
+
}
|
|
130
|
+
type PlayerLevel = {
|
|
131
|
+
__typename?: 'PlayerLevel';
|
|
132
|
+
description: Scalars['String'];
|
|
133
|
+
id: Scalars['ID'];
|
|
134
|
+
index: Scalars['Int'];
|
|
135
|
+
requiredXP: Scalars['Int'];
|
|
136
|
+
};
|
|
137
|
+
type PlayerResult = {
|
|
138
|
+
__typename?: 'PlayerResult';
|
|
139
|
+
facts?: Maybe<Scalars['JSONObject']>;
|
|
140
|
+
id: Scalars['ID'];
|
|
141
|
+
period: Period;
|
|
142
|
+
player: Player;
|
|
143
|
+
segment?: Maybe<PeriodSegment>;
|
|
144
|
+
type?: Maybe<PlayerResultType>;
|
|
145
|
+
};
|
|
146
|
+
declare enum PlayerResultType {
|
|
147
|
+
PeriodEnd = "PERIOD_END",
|
|
148
|
+
PeriodStart = "PERIOD_START",
|
|
149
|
+
SegmentEnd = "SEGMENT_END",
|
|
150
|
+
SegmentStart = "SEGMENT_START"
|
|
151
|
+
}
|
|
152
|
+
type StoryElement = {
|
|
153
|
+
__typename?: 'StoryElement';
|
|
154
|
+
content?: Maybe<Scalars['String']>;
|
|
155
|
+
contentRole?: Maybe<Scalars['String']>;
|
|
156
|
+
id: Scalars['ID'];
|
|
157
|
+
reward?: Maybe<Scalars['JSONObject']>;
|
|
158
|
+
title: Scalars['String'];
|
|
159
|
+
type: StoryElementType;
|
|
160
|
+
};
|
|
161
|
+
declare enum StoryElementType {
|
|
162
|
+
Generic = "GENERIC",
|
|
163
|
+
RoleBased = "ROLE_BASED"
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export { Game as G, PlayerDecisionType as P, Period as a };
|
package/dist/schema.prisma
CHANGED