@quesmed/types 1.3.21 → 1.4.0
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/package.json +3 -2
- package/resolvers/fragments/chapter.d.ts +2 -0
- package/resolvers/fragments/chapter.js +31 -0
- package/resolvers/fragments/chapter.mjs +28 -0
- package/resolvers/fragments/concept.d.ts +3 -0
- package/resolvers/fragments/concept.js +79 -0
- package/resolvers/fragments/concept.mjs +76 -0
- package/resolvers/fragments/osce.d.ts +10 -0
- package/resolvers/fragments/osce.js +171 -0
- package/resolvers/fragments/osce.mjs +168 -0
- package/resolvers/fragments/picture.d.ts +3 -0
- package/resolvers/fragments/picture.js +44 -0
- package/resolvers/fragments/picture.mjs +41 -0
- package/resolvers/fragments/user.d.ts +1 -0
- package/resolvers/fragments/user.js +26 -0
- package/resolvers/fragments/user.mjs +23 -0
- package/resolvers/fragments/video.d.ts +2 -0
- package/resolvers/fragments/video.js +49 -0
- package/resolvers/fragments/video.mjs +46 -0
- package/resolvers/mutation/restricted/osce.d.ts +36 -8
- package/resolvers/mutation/restricted/osce.js +200 -0
- package/resolvers/mutation/restricted/osce.mjs +198 -1
- package/resolvers/query/restricted/index.d.ts +1 -0
- package/resolvers/query/restricted/index.js +1 -0
- package/resolvers/query/restricted/index.mjs +1 -0
- package/resolvers/query/restricted/osce.d.ts +20 -12
- package/resolvers/query/restricted/osce.js +91 -0
- package/resolvers/query/restricted/osce.mjs +90 -1
- package/resolvers/query/restricted/quesBook.d.ts +1 -0
- package/resolvers/query/restricted/quesBook.js +13 -0
- package/resolvers/query/restricted/quesBook.mjs +12 -1
- package/resolvers/query/restricted/replication.d.ts +33 -0
- package/resolvers/query/restricted/replication.js +184 -0
- package/resolvers/query/restricted/replication.mjs +178 -0
- package/resolvers/subscription/osce.d.ts +12 -6
- package/resolvers/subscription/osce.js +36 -5
- package/resolvers/subscription/osce.mjs +35 -4
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { gql } from '@apollo/client';
|
|
2
|
+
export const USER_FIELDS = gql `
|
|
3
|
+
fragment UserFields on User {
|
|
4
|
+
id
|
|
5
|
+
username
|
|
6
|
+
firstName
|
|
7
|
+
lastName
|
|
8
|
+
classYear
|
|
9
|
+
graduationYear
|
|
10
|
+
universityId
|
|
11
|
+
examDate
|
|
12
|
+
stripeCustomerId
|
|
13
|
+
stripeQBankSubscriptionId
|
|
14
|
+
stripeQBankSubscriptionEndDate
|
|
15
|
+
stripeOsceSubscriptionId
|
|
16
|
+
stripeOsceSubscriptionEndDate
|
|
17
|
+
stripeBundleSubscriptionId
|
|
18
|
+
stripeBundleSubscriptionEndDate
|
|
19
|
+
# TODO: Remove this from backwards compatibility
|
|
20
|
+
stripePriceNickname
|
|
21
|
+
stripeSubscriptionEndDate
|
|
22
|
+
}
|
|
23
|
+
`;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VIDEO_FIELDS = exports.VIDEO_FILE_FIELDS = void 0;
|
|
4
|
+
const client_1 = require("@apollo/client");
|
|
5
|
+
const chapter_1 = require("./chapter");
|
|
6
|
+
const concept_1 = require("./concept");
|
|
7
|
+
exports.VIDEO_FILE_FIELDS = (0, client_1.gql) `
|
|
8
|
+
fragment VideoFileFields on File {
|
|
9
|
+
id
|
|
10
|
+
title
|
|
11
|
+
url
|
|
12
|
+
videoId
|
|
13
|
+
conceptId
|
|
14
|
+
}
|
|
15
|
+
`;
|
|
16
|
+
exports.VIDEO_FIELDS = (0, client_1.gql) `
|
|
17
|
+
${exports.VIDEO_FILE_FIELDS}
|
|
18
|
+
${chapter_1.CHAPTER_FIELDS}
|
|
19
|
+
${concept_1.CONCEPT_TOPIC_FIELDS}
|
|
20
|
+
fragment VideoFields on Video {
|
|
21
|
+
id
|
|
22
|
+
title
|
|
23
|
+
museId
|
|
24
|
+
thumbnail
|
|
25
|
+
views
|
|
26
|
+
concepts {
|
|
27
|
+
id
|
|
28
|
+
createdAt
|
|
29
|
+
updatedAt
|
|
30
|
+
name
|
|
31
|
+
chapterId
|
|
32
|
+
chapter {
|
|
33
|
+
...ChapterFields
|
|
34
|
+
}
|
|
35
|
+
topicId
|
|
36
|
+
topic {
|
|
37
|
+
...ConceptTopicFields
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
live
|
|
41
|
+
description
|
|
42
|
+
duration
|
|
43
|
+
startTime
|
|
44
|
+
endTime
|
|
45
|
+
files {
|
|
46
|
+
...VideoFileFields
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
`;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { gql } from '@apollo/client';
|
|
2
|
+
import { CHAPTER_FIELDS } from './chapter';
|
|
3
|
+
import { CONCEPT_TOPIC_FIELDS } from './concept';
|
|
4
|
+
export const VIDEO_FILE_FIELDS = gql `
|
|
5
|
+
fragment VideoFileFields on File {
|
|
6
|
+
id
|
|
7
|
+
title
|
|
8
|
+
url
|
|
9
|
+
videoId
|
|
10
|
+
conceptId
|
|
11
|
+
}
|
|
12
|
+
`;
|
|
13
|
+
export const VIDEO_FIELDS = gql `
|
|
14
|
+
${VIDEO_FILE_FIELDS}
|
|
15
|
+
${CHAPTER_FIELDS}
|
|
16
|
+
${CONCEPT_TOPIC_FIELDS}
|
|
17
|
+
fragment VideoFields on Video {
|
|
18
|
+
id
|
|
19
|
+
title
|
|
20
|
+
museId
|
|
21
|
+
thumbnail
|
|
22
|
+
views
|
|
23
|
+
concepts {
|
|
24
|
+
id
|
|
25
|
+
createdAt
|
|
26
|
+
updatedAt
|
|
27
|
+
name
|
|
28
|
+
chapterId
|
|
29
|
+
chapter {
|
|
30
|
+
...ChapterFields
|
|
31
|
+
}
|
|
32
|
+
topicId
|
|
33
|
+
topic {
|
|
34
|
+
...ConceptTopicFields
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
live
|
|
38
|
+
description
|
|
39
|
+
duration
|
|
40
|
+
startTime
|
|
41
|
+
endTime
|
|
42
|
+
files {
|
|
43
|
+
...VideoFileFields
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
`;
|
|
@@ -1,49 +1,69 @@
|
|
|
1
1
|
import { EOsceMarksheetAction, EOsceRoles, Id, IOsceMarksheet, IOsceMarksheetMark } from '../../../models';
|
|
2
2
|
import { IOsceMatchmakingAction } from '../../subscription/osce';
|
|
3
|
+
export declare const START_OSCE_MATCHMAKING: import("@apollo/client").DocumentNode;
|
|
3
4
|
export interface IStartOsceMatchmakingVar {
|
|
4
5
|
agoraId: string;
|
|
5
6
|
}
|
|
6
7
|
export declare type IStartOsceMatchmakingData = boolean;
|
|
8
|
+
export declare const ACCEPT_OSCE_MATCHMAKING: import("@apollo/client").DocumentNode;
|
|
7
9
|
export interface IAcceptOsceMatchmakingVar {
|
|
8
10
|
agoraId: string;
|
|
9
11
|
}
|
|
10
12
|
export declare type IAcceptOsceMatchmakingData = boolean;
|
|
13
|
+
export declare const CHECK_OSCE_MATCHMAKING: import("@apollo/client").DocumentNode;
|
|
11
14
|
export declare type ICheckOsceMatchmakingVar = null;
|
|
12
15
|
export interface ICheckOsceMatchmakingData extends IOsceMatchmakingAction {
|
|
13
16
|
}
|
|
17
|
+
export declare const CANCEL_OSCE_MATCHMAKING: import("@apollo/client").DocumentNode;
|
|
14
18
|
export interface ICancelOsceMatchmakingVar {
|
|
15
19
|
agoraId: string;
|
|
16
20
|
}
|
|
17
21
|
export declare type ICancelOsceMatchmakingData = boolean;
|
|
22
|
+
export declare const BUILD_OSCE_MARKSHEET: import("@apollo/client").DocumentNode;
|
|
18
23
|
export interface IBuildOsceMarksheetVar {
|
|
19
24
|
osceStationId?: Id;
|
|
20
|
-
solo?: boolean;
|
|
21
25
|
agoraId?: string;
|
|
26
|
+
solo?: boolean;
|
|
22
27
|
}
|
|
23
28
|
export interface IBuildOsceMarksheetData extends IOsceMarksheet {
|
|
24
29
|
}
|
|
30
|
+
export declare const CHANGE_OSCE_ROLE: import("@apollo/client").DocumentNode;
|
|
25
31
|
export interface IChangeOsceRoleVar {
|
|
26
32
|
osceMarksheetId: Id;
|
|
27
33
|
role: EOsceRoles;
|
|
28
34
|
}
|
|
29
|
-
export
|
|
35
|
+
export interface IChangeOsceRoleData extends IOsceMarksheet {
|
|
36
|
+
}
|
|
37
|
+
export declare const MARK_OSCE_MARKSHEET_MARK: import("@apollo/client").DocumentNode;
|
|
30
38
|
export interface IMarkOsceMarksheetMarkVar {
|
|
31
39
|
osceStationMarkId: Id;
|
|
32
40
|
mark: boolean;
|
|
33
41
|
}
|
|
34
42
|
export interface IMarkOsceMarksheetMarkData extends IOsceMarksheetMark {
|
|
35
43
|
}
|
|
36
|
-
export
|
|
37
|
-
|
|
38
|
-
|
|
44
|
+
export declare const optimisticMarkOsceMarksheetMark: (variables: IMarkOsceMarksheetMarkVar) => {
|
|
45
|
+
restricted: {
|
|
46
|
+
markOsceMarksheetMark: {
|
|
47
|
+
id: number;
|
|
48
|
+
mark: boolean;
|
|
49
|
+
__typename: string;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
export declare const SELECT_OSCE_STATION: import("@apollo/client").DocumentNode;
|
|
39
54
|
export interface ISelectOsceMarksheetStationVar {
|
|
40
55
|
osceMarksheetId: Id;
|
|
41
56
|
osceStationId: Id;
|
|
42
57
|
}
|
|
43
58
|
export interface ISelectOsceMarksheetStationData extends IOsceMarksheet {
|
|
44
59
|
}
|
|
60
|
+
export declare const START_OSCE_MARKSHEET: import("@apollo/client").DocumentNode;
|
|
61
|
+
export interface IStartOsceMarksheetVar {
|
|
62
|
+
osceMarksheetId: Id;
|
|
63
|
+
}
|
|
45
64
|
export interface IStartOsceMarksheetData extends IOsceMarksheet {
|
|
46
65
|
}
|
|
66
|
+
export declare const PRESTART_OSCE_MARKSHEET: import("@apollo/client").DocumentNode;
|
|
47
67
|
export interface IPrestartOsceMarksheetVar {
|
|
48
68
|
osceMarksheetId: Id;
|
|
49
69
|
readingTime: number;
|
|
@@ -52,23 +72,31 @@ export interface IPrestartOsceMarksheetVar {
|
|
|
52
72
|
}
|
|
53
73
|
export interface IPrestartOsceMarksheetData extends IOsceMarksheet {
|
|
54
74
|
}
|
|
75
|
+
export declare const SAVE_OSCE_MARKSHEET: import("@apollo/client").DocumentNode;
|
|
55
76
|
export interface ISaveOsceMarksheetVar {
|
|
56
77
|
osceMarksheetId: Id;
|
|
57
78
|
globalScore?: number;
|
|
58
79
|
timeTaken?: number;
|
|
59
80
|
feedback?: string;
|
|
60
81
|
}
|
|
61
|
-
export
|
|
82
|
+
export interface ISaveOsceMarksheetData extends IOsceMarksheet {
|
|
83
|
+
}
|
|
84
|
+
export declare const OSCE_MARKSHEET_ACTIONS: import("@apollo/client").DocumentNode;
|
|
62
85
|
export interface IOsceMarksheetActionsVar {
|
|
63
86
|
osceMarksheetId: Id;
|
|
87
|
+
agoraId: string;
|
|
64
88
|
timeRemaining?: number;
|
|
65
89
|
action: EOsceMarksheetAction;
|
|
66
90
|
}
|
|
67
91
|
export declare type IOsceMarksheetActionsData = number;
|
|
92
|
+
export declare const END_OSCE_MARKSHEET: import("@apollo/client").DocumentNode;
|
|
68
93
|
export interface IEndOsceMarksheetVar extends ISaveOsceMarksheetVar {
|
|
69
94
|
}
|
|
70
|
-
export
|
|
95
|
+
export interface IEndOsceMarksheetData extends IOsceMarksheet {
|
|
96
|
+
}
|
|
97
|
+
export declare const LEAVE_OSCE_MARKSHEET: import("@apollo/client").DocumentNode;
|
|
71
98
|
export interface ILeaveOsceMarksheetVar {
|
|
72
99
|
osceMarksheetId: Id;
|
|
73
100
|
}
|
|
74
|
-
export
|
|
101
|
+
export interface ILeaveOsceMarksheetData extends IOsceMarksheet {
|
|
102
|
+
}
|
|
@@ -1,2 +1,202 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LEAVE_OSCE_MARKSHEET = exports.END_OSCE_MARKSHEET = exports.OSCE_MARKSHEET_ACTIONS = exports.SAVE_OSCE_MARKSHEET = exports.PRESTART_OSCE_MARKSHEET = exports.START_OSCE_MARKSHEET = exports.SELECT_OSCE_STATION = exports.optimisticMarkOsceMarksheetMark = exports.MARK_OSCE_MARKSHEET_MARK = exports.CHANGE_OSCE_ROLE = exports.BUILD_OSCE_MARKSHEET = exports.CANCEL_OSCE_MATCHMAKING = exports.CHECK_OSCE_MATCHMAKING = exports.ACCEPT_OSCE_MATCHMAKING = exports.START_OSCE_MATCHMAKING = void 0;
|
|
4
|
+
const client_1 = require("@apollo/client");
|
|
5
|
+
const osce_1 = require("../../fragments/osce");
|
|
6
|
+
exports.START_OSCE_MATCHMAKING = (0, client_1.gql) `
|
|
7
|
+
mutation StartOsceMatchmaking($agoraId: String!) {
|
|
8
|
+
restricted {
|
|
9
|
+
startOsceMatchmaking(agoraId: $agoraId)
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
`;
|
|
13
|
+
exports.ACCEPT_OSCE_MATCHMAKING = (0, client_1.gql) `
|
|
14
|
+
mutation AcceptOsceMatchmaking($agoraId: String!) {
|
|
15
|
+
restricted {
|
|
16
|
+
acceptOsceMatchmaking(agoraId: $agoraId)
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
`;
|
|
20
|
+
exports.CHECK_OSCE_MATCHMAKING = (0, client_1.gql) `
|
|
21
|
+
${osce_1.OSCE_MATCHMAKING_ACTION_FIELDS}
|
|
22
|
+
mutation CheckOsceMatchmaking {
|
|
23
|
+
restricted {
|
|
24
|
+
checkOsceMatchmaking {
|
|
25
|
+
...OsceMatchmakingActionFields
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
`;
|
|
30
|
+
exports.CANCEL_OSCE_MATCHMAKING = (0, client_1.gql) `
|
|
31
|
+
mutation CancelOsceMatchmaking($agoraId: String!) {
|
|
32
|
+
restricted {
|
|
33
|
+
cancelOsceMatchmaking(agoraId: $agoraId)
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
`;
|
|
37
|
+
exports.BUILD_OSCE_MARKSHEET = (0, client_1.gql) `
|
|
38
|
+
${osce_1.OSCE_MARKSHEET_FIELDS}
|
|
39
|
+
mutation BuildOsceMarksheet(
|
|
40
|
+
$osceStationId: Int
|
|
41
|
+
$agoraId: String
|
|
42
|
+
$solo: Boolean
|
|
43
|
+
) {
|
|
44
|
+
restricted {
|
|
45
|
+
buildOsceMarksheet(
|
|
46
|
+
osceStationId: $osceStationId
|
|
47
|
+
agoraId: $agoraId
|
|
48
|
+
solo: $solo
|
|
49
|
+
) {
|
|
50
|
+
...OsceMarksheetFields
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
`;
|
|
55
|
+
exports.CHANGE_OSCE_ROLE = (0, client_1.gql) `
|
|
56
|
+
${osce_1.OSCE_MARKSHEET_FIELDS}
|
|
57
|
+
mutation ChangeOsceRole($osceMarksheetId: Int!, $role: Int!) {
|
|
58
|
+
restricted {
|
|
59
|
+
changeOsceRole(osceMarksheetId: $osceMarksheetId, role: $role) {
|
|
60
|
+
...OsceMarksheetFields
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
`;
|
|
65
|
+
exports.MARK_OSCE_MARKSHEET_MARK = (0, client_1.gql) `
|
|
66
|
+
${osce_1.OSCE_MARKSHEET_MARK_FIELDS}
|
|
67
|
+
mutation MarkOsceMarksheetMark($osceStationMarkId: Int!, $mark: Boolean!) {
|
|
68
|
+
restricted {
|
|
69
|
+
markOsceMarksheetMark(
|
|
70
|
+
osceStationMarkId: $osceStationMarkId
|
|
71
|
+
mark: $mark
|
|
72
|
+
) {
|
|
73
|
+
...OsceMarksheetMarkFields
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
`;
|
|
78
|
+
const optimisticMarkOsceMarksheetMark = (variables) => {
|
|
79
|
+
return {
|
|
80
|
+
restricted: {
|
|
81
|
+
markOsceMarksheetMark: {
|
|
82
|
+
id: variables.osceStationMarkId,
|
|
83
|
+
mark: variables.mark,
|
|
84
|
+
__typename: 'OsceMarksheetMark',
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
exports.optimisticMarkOsceMarksheetMark = optimisticMarkOsceMarksheetMark;
|
|
90
|
+
exports.SELECT_OSCE_STATION = (0, client_1.gql) `
|
|
91
|
+
${osce_1.OSCE_MARKSHEET_FIELDS}
|
|
92
|
+
mutation SelectOsceMarksheetStation(
|
|
93
|
+
$osceMarksheetId: Int!
|
|
94
|
+
$osceStationId: Int!
|
|
95
|
+
) {
|
|
96
|
+
restricted {
|
|
97
|
+
selectOsceMarksheetStation(
|
|
98
|
+
osceMarksheetId: $osceMarksheetId
|
|
99
|
+
osceStationId: $osceStationId
|
|
100
|
+
) {
|
|
101
|
+
...OsceMarksheetFields
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
`;
|
|
106
|
+
exports.START_OSCE_MARKSHEET = (0, client_1.gql) `
|
|
107
|
+
${osce_1.OSCE_MARKSHEET_FIELDS}
|
|
108
|
+
mutation StartOsceMarksheet($osceMarksheetId: Int!) {
|
|
109
|
+
restricted {
|
|
110
|
+
startOsceMarksheet(osceMarksheetId: $osceMarksheetId) {
|
|
111
|
+
...OsceMarksheetFields
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
`;
|
|
116
|
+
exports.PRESTART_OSCE_MARKSHEET = (0, client_1.gql) `
|
|
117
|
+
${osce_1.OSCE_MARKSHEET_FIELDS}
|
|
118
|
+
mutation PrestartOsceMarksheet(
|
|
119
|
+
$osceMarksheetId: Int!
|
|
120
|
+
$readingTime: Int!
|
|
121
|
+
$stationTime: Int!
|
|
122
|
+
$feedbackTime: Int!
|
|
123
|
+
) {
|
|
124
|
+
restricted {
|
|
125
|
+
prestartOsceMarksheet(
|
|
126
|
+
osceMarksheetId: $osceMarksheetId
|
|
127
|
+
readingTime: $readingTime
|
|
128
|
+
stationTime: $stationTime
|
|
129
|
+
feedbackTime: $feedbackTime
|
|
130
|
+
) {
|
|
131
|
+
...OsceMarksheetFields
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
`;
|
|
136
|
+
exports.SAVE_OSCE_MARKSHEET = (0, client_1.gql) `
|
|
137
|
+
${osce_1.OSCE_MARKSHEET_FIELDS}
|
|
138
|
+
mutation SaveOsceMarksheet(
|
|
139
|
+
$osceMarksheetId: Int!
|
|
140
|
+
$feedback: String
|
|
141
|
+
$globalScore: Int
|
|
142
|
+
$timeTaken: Int
|
|
143
|
+
) {
|
|
144
|
+
restricted {
|
|
145
|
+
saveOsceMarksheet(
|
|
146
|
+
osceMarksheetId: $osceMarksheetId
|
|
147
|
+
feedback: $feedback
|
|
148
|
+
globalScore: $globalScore
|
|
149
|
+
timeTaken: $timeTaken
|
|
150
|
+
) {
|
|
151
|
+
...OsceMarksheetFields
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
`;
|
|
156
|
+
exports.OSCE_MARKSHEET_ACTIONS = (0, client_1.gql) `
|
|
157
|
+
mutation OsceMarksheetActions(
|
|
158
|
+
$osceMarksheetId: Int!
|
|
159
|
+
$agoraId: String!
|
|
160
|
+
$timeRemaining: Int
|
|
161
|
+
$action: Int!
|
|
162
|
+
) {
|
|
163
|
+
restricted {
|
|
164
|
+
osceMarksheetActions(
|
|
165
|
+
osceMarksheetId: $osceMarksheetId
|
|
166
|
+
agoraId: $agoraId
|
|
167
|
+
timeRemaining: $timeRemaining
|
|
168
|
+
action: $action
|
|
169
|
+
)
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
`;
|
|
173
|
+
exports.END_OSCE_MARKSHEET = (0, client_1.gql) `
|
|
174
|
+
${osce_1.OSCE_MARKSHEET_FIELDS}
|
|
175
|
+
mutation EndOsceMarksheet(
|
|
176
|
+
$osceMarksheetId: Int!
|
|
177
|
+
$feedback: String
|
|
178
|
+
$globalScore: Int
|
|
179
|
+
$timeTaken: Int
|
|
180
|
+
) {
|
|
181
|
+
restricted {
|
|
182
|
+
endOsceMarksheet(
|
|
183
|
+
osceMarksheetId: $osceMarksheetId
|
|
184
|
+
feedback: $feedback
|
|
185
|
+
globalScore: $globalScore
|
|
186
|
+
timeTaken: $timeTaken
|
|
187
|
+
) {
|
|
188
|
+
...OsceMarksheetFields
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
`;
|
|
193
|
+
exports.LEAVE_OSCE_MARKSHEET = (0, client_1.gql) `
|
|
194
|
+
${osce_1.OSCE_MARKSHEET_FIELDS}
|
|
195
|
+
mutation LeaveOsceMarksheet($osceMarksheetId: Int!) {
|
|
196
|
+
restricted {
|
|
197
|
+
leaveOsceMarksheet(osceMarksheetId: $osceMarksheetId) {
|
|
198
|
+
...OsceMarksheetFields
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
`;
|
|
@@ -1 +1,198 @@
|
|
|
1
|
-
|
|
1
|
+
import { gql } from '@apollo/client';
|
|
2
|
+
import { OSCE_MARKSHEET_FIELDS, OSCE_MARKSHEET_MARK_FIELDS, OSCE_MATCHMAKING_ACTION_FIELDS, } from '../../fragments/osce';
|
|
3
|
+
export const START_OSCE_MATCHMAKING = gql `
|
|
4
|
+
mutation StartOsceMatchmaking($agoraId: String!) {
|
|
5
|
+
restricted {
|
|
6
|
+
startOsceMatchmaking(agoraId: $agoraId)
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
`;
|
|
10
|
+
export const ACCEPT_OSCE_MATCHMAKING = gql `
|
|
11
|
+
mutation AcceptOsceMatchmaking($agoraId: String!) {
|
|
12
|
+
restricted {
|
|
13
|
+
acceptOsceMatchmaking(agoraId: $agoraId)
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
`;
|
|
17
|
+
export const CHECK_OSCE_MATCHMAKING = gql `
|
|
18
|
+
${OSCE_MATCHMAKING_ACTION_FIELDS}
|
|
19
|
+
mutation CheckOsceMatchmaking {
|
|
20
|
+
restricted {
|
|
21
|
+
checkOsceMatchmaking {
|
|
22
|
+
...OsceMatchmakingActionFields
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
`;
|
|
27
|
+
export const CANCEL_OSCE_MATCHMAKING = gql `
|
|
28
|
+
mutation CancelOsceMatchmaking($agoraId: String!) {
|
|
29
|
+
restricted {
|
|
30
|
+
cancelOsceMatchmaking(agoraId: $agoraId)
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
`;
|
|
34
|
+
export const BUILD_OSCE_MARKSHEET = gql `
|
|
35
|
+
${OSCE_MARKSHEET_FIELDS}
|
|
36
|
+
mutation BuildOsceMarksheet(
|
|
37
|
+
$osceStationId: Int
|
|
38
|
+
$agoraId: String
|
|
39
|
+
$solo: Boolean
|
|
40
|
+
) {
|
|
41
|
+
restricted {
|
|
42
|
+
buildOsceMarksheet(
|
|
43
|
+
osceStationId: $osceStationId
|
|
44
|
+
agoraId: $agoraId
|
|
45
|
+
solo: $solo
|
|
46
|
+
) {
|
|
47
|
+
...OsceMarksheetFields
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
`;
|
|
52
|
+
export const CHANGE_OSCE_ROLE = gql `
|
|
53
|
+
${OSCE_MARKSHEET_FIELDS}
|
|
54
|
+
mutation ChangeOsceRole($osceMarksheetId: Int!, $role: Int!) {
|
|
55
|
+
restricted {
|
|
56
|
+
changeOsceRole(osceMarksheetId: $osceMarksheetId, role: $role) {
|
|
57
|
+
...OsceMarksheetFields
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
`;
|
|
62
|
+
export const MARK_OSCE_MARKSHEET_MARK = gql `
|
|
63
|
+
${OSCE_MARKSHEET_MARK_FIELDS}
|
|
64
|
+
mutation MarkOsceMarksheetMark($osceStationMarkId: Int!, $mark: Boolean!) {
|
|
65
|
+
restricted {
|
|
66
|
+
markOsceMarksheetMark(
|
|
67
|
+
osceStationMarkId: $osceStationMarkId
|
|
68
|
+
mark: $mark
|
|
69
|
+
) {
|
|
70
|
+
...OsceMarksheetMarkFields
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
`;
|
|
75
|
+
export const optimisticMarkOsceMarksheetMark = (variables) => {
|
|
76
|
+
return {
|
|
77
|
+
restricted: {
|
|
78
|
+
markOsceMarksheetMark: {
|
|
79
|
+
id: variables.osceStationMarkId,
|
|
80
|
+
mark: variables.mark,
|
|
81
|
+
__typename: 'OsceMarksheetMark',
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
export const SELECT_OSCE_STATION = gql `
|
|
87
|
+
${OSCE_MARKSHEET_FIELDS}
|
|
88
|
+
mutation SelectOsceMarksheetStation(
|
|
89
|
+
$osceMarksheetId: Int!
|
|
90
|
+
$osceStationId: Int!
|
|
91
|
+
) {
|
|
92
|
+
restricted {
|
|
93
|
+
selectOsceMarksheetStation(
|
|
94
|
+
osceMarksheetId: $osceMarksheetId
|
|
95
|
+
osceStationId: $osceStationId
|
|
96
|
+
) {
|
|
97
|
+
...OsceMarksheetFields
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
`;
|
|
102
|
+
export const START_OSCE_MARKSHEET = gql `
|
|
103
|
+
${OSCE_MARKSHEET_FIELDS}
|
|
104
|
+
mutation StartOsceMarksheet($osceMarksheetId: Int!) {
|
|
105
|
+
restricted {
|
|
106
|
+
startOsceMarksheet(osceMarksheetId: $osceMarksheetId) {
|
|
107
|
+
...OsceMarksheetFields
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
`;
|
|
112
|
+
export const PRESTART_OSCE_MARKSHEET = gql `
|
|
113
|
+
${OSCE_MARKSHEET_FIELDS}
|
|
114
|
+
mutation PrestartOsceMarksheet(
|
|
115
|
+
$osceMarksheetId: Int!
|
|
116
|
+
$readingTime: Int!
|
|
117
|
+
$stationTime: Int!
|
|
118
|
+
$feedbackTime: Int!
|
|
119
|
+
) {
|
|
120
|
+
restricted {
|
|
121
|
+
prestartOsceMarksheet(
|
|
122
|
+
osceMarksheetId: $osceMarksheetId
|
|
123
|
+
readingTime: $readingTime
|
|
124
|
+
stationTime: $stationTime
|
|
125
|
+
feedbackTime: $feedbackTime
|
|
126
|
+
) {
|
|
127
|
+
...OsceMarksheetFields
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
`;
|
|
132
|
+
export const SAVE_OSCE_MARKSHEET = gql `
|
|
133
|
+
${OSCE_MARKSHEET_FIELDS}
|
|
134
|
+
mutation SaveOsceMarksheet(
|
|
135
|
+
$osceMarksheetId: Int!
|
|
136
|
+
$feedback: String
|
|
137
|
+
$globalScore: Int
|
|
138
|
+
$timeTaken: Int
|
|
139
|
+
) {
|
|
140
|
+
restricted {
|
|
141
|
+
saveOsceMarksheet(
|
|
142
|
+
osceMarksheetId: $osceMarksheetId
|
|
143
|
+
feedback: $feedback
|
|
144
|
+
globalScore: $globalScore
|
|
145
|
+
timeTaken: $timeTaken
|
|
146
|
+
) {
|
|
147
|
+
...OsceMarksheetFields
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
`;
|
|
152
|
+
export const OSCE_MARKSHEET_ACTIONS = gql `
|
|
153
|
+
mutation OsceMarksheetActions(
|
|
154
|
+
$osceMarksheetId: Int!
|
|
155
|
+
$agoraId: String!
|
|
156
|
+
$timeRemaining: Int
|
|
157
|
+
$action: Int!
|
|
158
|
+
) {
|
|
159
|
+
restricted {
|
|
160
|
+
osceMarksheetActions(
|
|
161
|
+
osceMarksheetId: $osceMarksheetId
|
|
162
|
+
agoraId: $agoraId
|
|
163
|
+
timeRemaining: $timeRemaining
|
|
164
|
+
action: $action
|
|
165
|
+
)
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
`;
|
|
169
|
+
export const END_OSCE_MARKSHEET = gql `
|
|
170
|
+
${OSCE_MARKSHEET_FIELDS}
|
|
171
|
+
mutation EndOsceMarksheet(
|
|
172
|
+
$osceMarksheetId: Int!
|
|
173
|
+
$feedback: String
|
|
174
|
+
$globalScore: Int
|
|
175
|
+
$timeTaken: Int
|
|
176
|
+
) {
|
|
177
|
+
restricted {
|
|
178
|
+
endOsceMarksheet(
|
|
179
|
+
osceMarksheetId: $osceMarksheetId
|
|
180
|
+
feedback: $feedback
|
|
181
|
+
globalScore: $globalScore
|
|
182
|
+
timeTaken: $timeTaken
|
|
183
|
+
) {
|
|
184
|
+
...OsceMarksheetFields
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
`;
|
|
189
|
+
export const LEAVE_OSCE_MARKSHEET = gql `
|
|
190
|
+
${OSCE_MARKSHEET_FIELDS}
|
|
191
|
+
mutation LeaveOsceMarksheet($osceMarksheetId: Int!) {
|
|
192
|
+
restricted {
|
|
193
|
+
leaveOsceMarksheet(osceMarksheetId: $osceMarksheetId) {
|
|
194
|
+
...OsceMarksheetFields
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
`;
|
|
@@ -15,6 +15,7 @@ __exportStar(require("./marksheet"), exports);
|
|
|
15
15
|
__exportStar(require("./mockTests"), exports);
|
|
16
16
|
__exportStar(require("./osce"), exports);
|
|
17
17
|
__exportStar(require("./quesBook"), exports);
|
|
18
|
+
__exportStar(require("./replication"), exports);
|
|
18
19
|
__exportStar(require("./todos"), exports);
|
|
19
20
|
__exportStar(require("./topics"), exports);
|
|
20
21
|
__exportStar(require("./university"), exports);
|