@gbl-uzh/platform 0.2.11 → 0.2.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 +11 -9
- package/dist/nexus.d.ts +4 -24
- package/dist/nexus.js +74 -104
- package/dist/ops/FGameData.graphql +7 -0
- package/dist/ops/FLearningElementData.graphql +10 -0
- package/dist/ops/FPeriodData.graphql +14 -0
- package/dist/ops/FPlayerActionData.graphql +9 -0
- package/dist/ops/FPlayerData.graphql +36 -0
- package/dist/ops/FResultData.graphql +17 -0
- package/dist/ops/FSegmentData.graphql +15 -0
- package/dist/ops/MActivateNextPeriod.graphql +11 -0
- package/dist/ops/MActivateNextSegment.graphql +14 -0
- package/dist/ops/MAddGamePeriod.graphql +7 -0
- package/dist/ops/MAddPeriodSegment.graphql +19 -0
- package/dist/ops/MAttemptLearningElement.graphql +18 -0
- package/dist/ops/MCreateGame.graphql +7 -0
- package/dist/ops/MLoginAsTeam.graphql +7 -0
- package/dist/ops/MMarkStoryElement.graphql +6 -0
- package/dist/ops/MPerformAction.graphql +7 -0
- package/dist/ops/MSaveConsolidationDecision.graphql +8 -0
- package/dist/ops/MUpdatePlayerData.graphql +12 -0
- package/dist/ops/MUpdateReadyState.graphql +6 -0
- package/dist/ops/QGame.graphql +37 -0
- package/dist/ops/QGames.graphql +7 -0
- package/dist/ops/QLearningElement.graphql +19 -0
- package/dist/ops/QLearningElements.graphql +7 -0
- package/dist/ops/QPastResults.graphql +40 -0
- package/dist/ops/QResult.graphql +53 -0
- package/dist/ops/QResults.graphql +12 -0
- package/dist/ops/QSelf.graphql +7 -0
- package/dist/ops/SGlobalEvents.graphql +5 -0
- package/dist/ops/SUserEvents.graphql +5 -0
- package/dist/schema.prisma +1 -1
- package/package.json +11 -9
- package/dist/generated/ops.d.ts +0 -1555
- package/dist/generated/ops.js +0 -168
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#import "./FSegmentData.graphql"
|
|
2
|
+
|
|
3
|
+
mutation AddPeriodSegment(
|
|
4
|
+
$gameId: Int!
|
|
5
|
+
$periodIx: Int!
|
|
6
|
+
$facts: PeriodSegmentFactsInput!
|
|
7
|
+
$storyElements: [String]
|
|
8
|
+
$learningElements: [String]
|
|
9
|
+
) {
|
|
10
|
+
addPeriodSegment(
|
|
11
|
+
gameId: $gameId
|
|
12
|
+
periodIx: $periodIx
|
|
13
|
+
facts: $facts
|
|
14
|
+
storyElements: $storyElements
|
|
15
|
+
learningElements: $learningElements
|
|
16
|
+
) {
|
|
17
|
+
...SegmentData
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
mutation AttemptLearningElement($elementId: ID!, $selection: String!) {
|
|
2
|
+
attemptLearningElement(elementId: $elementId, selection: $selection) {
|
|
3
|
+
id
|
|
4
|
+
|
|
5
|
+
pointsAchieved
|
|
6
|
+
pointsMax
|
|
7
|
+
|
|
8
|
+
element {
|
|
9
|
+
id
|
|
10
|
+
feedback
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
player {
|
|
14
|
+
id
|
|
15
|
+
completedLearningElementIds
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
#import "./FGameData.graphql"
|
|
2
|
+
#import "./FPeriodData.graphql"
|
|
3
|
+
#import "./FPlayerData.graphql"
|
|
4
|
+
|
|
5
|
+
query Game($id: Int) {
|
|
6
|
+
game(id: $id) {
|
|
7
|
+
...GameData
|
|
8
|
+
activePeriod {
|
|
9
|
+
id
|
|
10
|
+
activeSegmentIx
|
|
11
|
+
segments {
|
|
12
|
+
id
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
periods {
|
|
16
|
+
...PeriodData
|
|
17
|
+
}
|
|
18
|
+
players {
|
|
19
|
+
id
|
|
20
|
+
|
|
21
|
+
isReady
|
|
22
|
+
|
|
23
|
+
role
|
|
24
|
+
|
|
25
|
+
name
|
|
26
|
+
avatar
|
|
27
|
+
location
|
|
28
|
+
color
|
|
29
|
+
|
|
30
|
+
facts
|
|
31
|
+
|
|
32
|
+
experience
|
|
33
|
+
experienceToNext
|
|
34
|
+
token
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
#import "./FResultData.graphql"
|
|
2
|
+
|
|
3
|
+
query PastResults {
|
|
4
|
+
result {
|
|
5
|
+
currentGame {
|
|
6
|
+
id
|
|
7
|
+
status
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
pastResults {
|
|
11
|
+
...ResultData
|
|
12
|
+
player {
|
|
13
|
+
id
|
|
14
|
+
|
|
15
|
+
role
|
|
16
|
+
|
|
17
|
+
name
|
|
18
|
+
avatar
|
|
19
|
+
color
|
|
20
|
+
|
|
21
|
+
facts
|
|
22
|
+
|
|
23
|
+
experience
|
|
24
|
+
experienceToNext
|
|
25
|
+
|
|
26
|
+
level {
|
|
27
|
+
id
|
|
28
|
+
index
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
completedLearningElementIds
|
|
32
|
+
visitedStoryElementIds
|
|
33
|
+
}
|
|
34
|
+
period {
|
|
35
|
+
id
|
|
36
|
+
index
|
|
37
|
+
facts
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
#import "./FResultData.graphql"
|
|
2
|
+
#import "./FPeriodData.graphql"
|
|
3
|
+
#import "./FPlayerData.graphql"
|
|
4
|
+
#import "./FPlayerActionData.graphql"
|
|
5
|
+
|
|
6
|
+
query Result {
|
|
7
|
+
result {
|
|
8
|
+
playerResult {
|
|
9
|
+
...ResultData
|
|
10
|
+
player {
|
|
11
|
+
id
|
|
12
|
+
completedLearningElementIds
|
|
13
|
+
visitedStoryElementIds
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
previousResults {
|
|
17
|
+
...ResultData
|
|
18
|
+
}
|
|
19
|
+
currentGame {
|
|
20
|
+
id
|
|
21
|
+
status
|
|
22
|
+
periods {
|
|
23
|
+
...PeriodData
|
|
24
|
+
}
|
|
25
|
+
activePeriod {
|
|
26
|
+
...PeriodData
|
|
27
|
+
activeSegment {
|
|
28
|
+
id
|
|
29
|
+
index
|
|
30
|
+
facts
|
|
31
|
+
learningElements {
|
|
32
|
+
id
|
|
33
|
+
title
|
|
34
|
+
}
|
|
35
|
+
storyElements {
|
|
36
|
+
id
|
|
37
|
+
type
|
|
38
|
+
title
|
|
39
|
+
content
|
|
40
|
+
contentRole
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
transactions {
|
|
46
|
+
...PlayerActionData
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
self {
|
|
51
|
+
...PlayerData
|
|
52
|
+
}
|
|
53
|
+
}
|
package/dist/schema.prisma
CHANGED
|
@@ -6,7 +6,7 @@ datasource db {
|
|
|
6
6
|
|
|
7
7
|
generator client {
|
|
8
8
|
provider = "prisma-client-js"
|
|
9
|
-
previewFeatures = ["
|
|
9
|
+
previewFeatures = ["fullTextSearch", "fullTextIndex", "postgresqlExtensions", "fieldReference", "orderByNulls", "extendedWhereUnique"]
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
model Account {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gbl-uzh/platform",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.13",
|
|
4
4
|
"license": "AGPL-3.0",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
"build": "npm-run-all build:nexus build:graphql build:ts build:copy",
|
|
13
13
|
"build:nexus": "ts-node --esm --transpile-only src/nexus.ts",
|
|
14
14
|
"build:graphql": "graphql-codegen --config codegen.ts",
|
|
15
|
-
"build:ts": "NODE_ENV=production tsup",
|
|
15
|
+
"build:ts": "cross-env NODE_ENV=production tsup",
|
|
16
16
|
"build:copy": "ts-node src/lib/copy.ts",
|
|
17
|
-
"dev": "NODE_ENV=development tsup --watch",
|
|
17
|
+
"dev": "cross-env NODE_ENV=development tsup --watch",
|
|
18
18
|
"generate": "prisma generate"
|
|
19
19
|
},
|
|
20
20
|
"engines": {
|
|
@@ -32,23 +32,25 @@
|
|
|
32
32
|
"@tsconfig/recommended": "1.0.1",
|
|
33
33
|
"@types/jest": "^29.2.2",
|
|
34
34
|
"@types/node": "^18.11.9",
|
|
35
|
+
"cross-env": "7.0.3",
|
|
36
|
+
"fs-extra": "11.1.0",
|
|
35
37
|
"jest": "29.3.1",
|
|
36
38
|
"npm-run-all": "4.1.5",
|
|
37
|
-
"prisma": "4.
|
|
39
|
+
"prisma": "4.8.0",
|
|
38
40
|
"rollup-plugin-copy": "3.4.0",
|
|
39
41
|
"ts-jest": "29.0.3",
|
|
40
42
|
"ts-node": "10.9.1",
|
|
41
|
-
"tsup": "6.
|
|
42
|
-
"typescript": "4.
|
|
43
|
+
"tsup": "6.5.0",
|
|
44
|
+
"typescript": "4.9.4"
|
|
43
45
|
},
|
|
44
46
|
"peerDependencies": {
|
|
45
47
|
"@apollo/client": "^3.7.0",
|
|
46
|
-
"@prisma/client": "4.
|
|
48
|
+
"@prisma/client": "^4.8.0",
|
|
47
49
|
"@uzh-bf/design-system": "^0.0.79",
|
|
48
50
|
"graphql": "^16.6.0",
|
|
49
51
|
"graphql-scalars": "^1.19.0",
|
|
50
|
-
"graphql-yoga": "^3.0.0
|
|
51
|
-
"jsonwebtoken": "^
|
|
52
|
+
"graphql-yoga": "^3.0.0",
|
|
53
|
+
"jsonwebtoken": "^9.0.0",
|
|
52
54
|
"next": "^13.0.0",
|
|
53
55
|
"nexus": "^1.3.0",
|
|
54
56
|
"nookies": "^2.5.2",
|