@quesmed/types 1.0.14 → 1.0.18
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/models/Feedback.d.ts +8 -0
- package/models/Feedback.js +2 -0
- package/models/MockTest.d.ts +1 -0
- package/models/OsceMarksheet.d.ts +16 -7
- package/models/OsceMarksheet.js +1 -0
- package/models/Subscription.d.ts +7 -1
- package/models/Subscription.js +7 -0
- package/models/User.d.ts +12 -4
- package/models/index.d.ts +2 -1
- package/models/index.js +2 -1
- package/package.json +1 -1
- package/resolvers/mutation/restricted/osce.d.ts +3 -2
- package/resolvers/query/feedback.d.ts +3 -0
- package/resolvers/query/feedback.js +2 -0
- package/resolvers/query/index.d.ts +2 -0
- package/resolvers/query/index.js +2 -0
- package/resolvers/query/subscription.d.ts +3 -0
- package/resolvers/query/subscription.js +2 -0
- package/resolvers/subscription/osce.d.ts +7 -22
- package/resolvers/subscription/osce.js +22 -5
package/models/MockTest.d.ts
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { IOsceStation, IOsceStationMark, IOsceType } from './OsceStation';
|
|
2
|
+
import { Id } from './Type';
|
|
3
|
+
import { IUser } from './User';
|
|
4
|
+
export interface IOsceMarksheetUser {
|
|
5
|
+
id: Id | null;
|
|
6
|
+
createdAt: Date | string | null;
|
|
7
|
+
osceMarksheetId: Id;
|
|
8
|
+
userId: Id | null;
|
|
9
|
+
user: IUser | null;
|
|
10
|
+
role: EOsceRoles;
|
|
11
|
+
}
|
|
4
12
|
export interface IOsceMarksheetMark {
|
|
5
13
|
id: Id;
|
|
6
14
|
mark: boolean;
|
|
@@ -23,7 +31,8 @@ export declare enum EOsceMarksheetAction {
|
|
|
23
31
|
CONTINUE = 4,
|
|
24
32
|
CONNECT = 5,
|
|
25
33
|
DISCONNECT = 6,
|
|
26
|
-
SELECT = 7
|
|
34
|
+
SELECT = 7,
|
|
35
|
+
LEFT = 8
|
|
27
36
|
}
|
|
28
37
|
export interface IOsceMarksheet {
|
|
29
38
|
id: Id;
|
|
@@ -32,9 +41,9 @@ export interface IOsceMarksheet {
|
|
|
32
41
|
timeTaken: number;
|
|
33
42
|
osceStationId: Id;
|
|
34
43
|
osceStation?: IOsceStation;
|
|
35
|
-
userId
|
|
44
|
+
userId?: Id;
|
|
45
|
+
role?: EOsceRoles;
|
|
36
46
|
solo: boolean;
|
|
37
|
-
role: EOsceRoles;
|
|
38
47
|
score: number;
|
|
39
48
|
globalScore: number;
|
|
40
49
|
feedback: string;
|
|
@@ -46,7 +55,7 @@ export interface IOsceMarksheet {
|
|
|
46
55
|
endedAt: Date | string;
|
|
47
56
|
timeRemaining: number;
|
|
48
57
|
marks: IOsceMarksheetMark[];
|
|
49
|
-
users:
|
|
58
|
+
users: IOsceMarksheetUser[];
|
|
50
59
|
completed: boolean;
|
|
51
60
|
}
|
|
52
61
|
export interface IDashboardOsce {
|
package/models/OsceMarksheet.js
CHANGED
|
@@ -18,4 +18,5 @@ var EOsceMarksheetAction;
|
|
|
18
18
|
EOsceMarksheetAction[EOsceMarksheetAction["CONNECT"] = 5] = "CONNECT";
|
|
19
19
|
EOsceMarksheetAction[EOsceMarksheetAction["DISCONNECT"] = 6] = "DISCONNECT";
|
|
20
20
|
EOsceMarksheetAction[EOsceMarksheetAction["SELECT"] = 7] = "SELECT";
|
|
21
|
+
EOsceMarksheetAction[EOsceMarksheetAction["LEFT"] = 8] = "LEFT";
|
|
21
22
|
})(EOsceMarksheetAction = exports.EOsceMarksheetAction || (exports.EOsceMarksheetAction = {}));
|
package/models/Subscription.d.ts
CHANGED
|
@@ -3,9 +3,15 @@ export interface ISubscription {
|
|
|
3
3
|
id: Id;
|
|
4
4
|
createdAt: string | Date;
|
|
5
5
|
name: string;
|
|
6
|
-
description
|
|
6
|
+
description: string | null;
|
|
7
7
|
price: number;
|
|
8
8
|
stripePriceId: string;
|
|
9
9
|
duration: number;
|
|
10
10
|
public: boolean;
|
|
11
|
+
typeId: Id;
|
|
12
|
+
}
|
|
13
|
+
export declare enum ESubscriptionType {
|
|
14
|
+
QBANK = 1,
|
|
15
|
+
OSCE = 2,
|
|
16
|
+
BUNDLE = 3
|
|
11
17
|
}
|
package/models/Subscription.js
CHANGED
|
@@ -1,2 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ESubscriptionType = void 0;
|
|
4
|
+
var ESubscriptionType;
|
|
5
|
+
(function (ESubscriptionType) {
|
|
6
|
+
ESubscriptionType[ESubscriptionType["QBANK"] = 1] = "QBANK";
|
|
7
|
+
ESubscriptionType[ESubscriptionType["OSCE"] = 2] = "OSCE";
|
|
8
|
+
ESubscriptionType[ESubscriptionType["BUNDLE"] = 3] = "BUNDLE";
|
|
9
|
+
})(ESubscriptionType = exports.ESubscriptionType || (exports.ESubscriptionType = {}));
|
package/models/User.d.ts
CHANGED
|
@@ -12,7 +12,9 @@ export interface IPayload {
|
|
|
12
12
|
username: string;
|
|
13
13
|
accessLevel: string;
|
|
14
14
|
exp: number;
|
|
15
|
-
|
|
15
|
+
stripeQBankSubscriptionEndDate: number | null;
|
|
16
|
+
stripeOsceSubscriptionEndDate: number | null;
|
|
17
|
+
stripeBundleSubscriptionEndDate: number | null;
|
|
16
18
|
}
|
|
17
19
|
export interface IUser {
|
|
18
20
|
id: Id;
|
|
@@ -24,9 +26,15 @@ export interface IUser {
|
|
|
24
26
|
universityId: number;
|
|
25
27
|
examDate: Date | string | null;
|
|
26
28
|
stripeCustomerId: string;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
qBankSubscriptionId: Id | null;
|
|
30
|
+
qBankSubscription: ISubscription | null;
|
|
31
|
+
stripeQBankSubscriptionEndDate: Date | string | null;
|
|
32
|
+
osceSubscriptionId: Id | null;
|
|
33
|
+
osceSubscription: ISubscription | null;
|
|
34
|
+
stripeOsceSubscriptionEndDate: Date | string | null;
|
|
35
|
+
bundleSubscriptionId: Id | null;
|
|
36
|
+
bundleSubscription: ISubscription | null;
|
|
37
|
+
stripeBundleSubscriptionEndDate: Date | string | null;
|
|
30
38
|
}
|
|
31
39
|
export interface IUserCompletedQuestions {
|
|
32
40
|
id: Id;
|
package/models/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './Card';
|
|
2
2
|
export * from './Chapter';
|
|
3
3
|
export * from './Concept';
|
|
4
|
+
export * from './Feedback';
|
|
4
5
|
export * from './File';
|
|
5
6
|
export * from './Marksheet';
|
|
6
7
|
export * from './MockTest';
|
|
@@ -14,6 +15,6 @@ export * from './Todo';
|
|
|
14
15
|
export * from './Token';
|
|
15
16
|
export * from './Topic';
|
|
16
17
|
export * from './Type';
|
|
18
|
+
export * from './University';
|
|
17
19
|
export * from './User';
|
|
18
20
|
export * from './Video';
|
|
19
|
-
export * from './University';
|
package/models/index.js
CHANGED
|
@@ -13,6 +13,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
13
13
|
__exportStar(require("./Card"), exports);
|
|
14
14
|
__exportStar(require("./Chapter"), exports);
|
|
15
15
|
__exportStar(require("./Concept"), exports);
|
|
16
|
+
__exportStar(require("./Feedback"), exports);
|
|
16
17
|
__exportStar(require("./File"), exports);
|
|
17
18
|
__exportStar(require("./Marksheet"), exports);
|
|
18
19
|
__exportStar(require("./MockTest"), exports);
|
|
@@ -26,6 +27,6 @@ __exportStar(require("./Todo"), exports);
|
|
|
26
27
|
__exportStar(require("./Token"), exports);
|
|
27
28
|
__exportStar(require("./Topic"), exports);
|
|
28
29
|
__exportStar(require("./Type"), exports);
|
|
30
|
+
__exportStar(require("./University"), exports);
|
|
29
31
|
__exportStar(require("./User"), exports);
|
|
30
32
|
__exportStar(require("./Video"), exports);
|
|
31
|
-
__exportStar(require("./University"), exports);
|
package/package.json
CHANGED
|
@@ -24,7 +24,8 @@ export interface ISelectOsceMarksheetStationVar {
|
|
|
24
24
|
osceMarksheetId: Id;
|
|
25
25
|
osceStationId: Id;
|
|
26
26
|
}
|
|
27
|
-
export
|
|
27
|
+
export interface ISelectOsceMarksheetStationData extends IOsceMarksheet {
|
|
28
|
+
}
|
|
28
29
|
export interface IStartOsceMarksheetData extends IOsceMarksheet {
|
|
29
30
|
}
|
|
30
31
|
export interface IPrestartOsceMarksheetVar {
|
|
@@ -43,7 +44,7 @@ export interface ISaveOsceMarksheetVar {
|
|
|
43
44
|
}
|
|
44
45
|
export declare type ISaveOsceMarksheetData = number;
|
|
45
46
|
export interface IOsceMarksheetActionsVar {
|
|
46
|
-
|
|
47
|
+
osceMarksheetId: Id;
|
|
47
48
|
userId: Id;
|
|
48
49
|
timeRemaining?: number;
|
|
49
50
|
action: EOsceMarksheetAction;
|
package/resolvers/query/index.js
CHANGED
|
@@ -10,8 +10,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
10
10
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./feedback"), exports);
|
|
13
14
|
__exportStar(require("./sampleCards"), exports);
|
|
14
15
|
__exportStar(require("./sampleQuestions"), exports);
|
|
16
|
+
__exportStar(require("./subscription"), exports);
|
|
15
17
|
__exportStar(require("./university"), exports);
|
|
16
18
|
__exportStar(require("./user"), exports);
|
|
17
19
|
__exportStar(require("./video"), exports);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EOsceMarksheetAction, EOsceRoles, Id, IUser } from '../../models';
|
|
1
|
+
import { EOsceMarksheetAction, EOsceRoles, Id, IOsceMarksheetUser, IUser } from '../../models';
|
|
2
2
|
export declare const ROLE_CHANGED = "ROLE_CHANGED";
|
|
3
3
|
export declare const OSCE_MARKSHEET_ACTION = "OSCE_MARKSHEET_ACTION";
|
|
4
4
|
export interface IOsceGroupMember {
|
|
@@ -6,36 +6,21 @@ export interface IOsceGroupMember {
|
|
|
6
6
|
user: IUser | null;
|
|
7
7
|
}
|
|
8
8
|
export interface IOsceGroup {
|
|
9
|
+
osceMarksheetId: Id;
|
|
9
10
|
agoraId: string;
|
|
10
|
-
members: [
|
|
11
|
-
{
|
|
12
|
-
role: EOsceRoles.CANDIDATE;
|
|
13
|
-
user: IUser | null;
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
role: EOsceRoles.EXAMINER;
|
|
17
|
-
user: IUser | null;
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
role: EOsceRoles.ACTOR;
|
|
21
|
-
user: IUser | null;
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
role: EOsceRoles.OBSERVER;
|
|
25
|
-
user: IUser | null;
|
|
26
|
-
}
|
|
27
|
-
];
|
|
11
|
+
members: IOsceMarksheetUser[];
|
|
28
12
|
}
|
|
29
|
-
export declare const OsceGroupInit:
|
|
13
|
+
export declare const OsceGroupInit: (osceMarksheetId: number) => IOsceMarksheetUser[];
|
|
30
14
|
export interface IRoleChangedVar {
|
|
31
|
-
|
|
15
|
+
osceMarksheetId: Id;
|
|
32
16
|
}
|
|
33
17
|
export interface IRoleChangedData extends IOsceGroup {
|
|
34
18
|
}
|
|
35
19
|
export interface IOsceMarksheetActionsVar {
|
|
36
|
-
|
|
20
|
+
osceMarksheetId: Id;
|
|
37
21
|
}
|
|
38
22
|
export interface IOsceMarksheetAction {
|
|
23
|
+
osceMarksheetId: Id;
|
|
39
24
|
agoraId: string;
|
|
40
25
|
userId: Id;
|
|
41
26
|
startedAt: Date | null;
|
|
@@ -4,21 +4,38 @@ exports.OsceGroupInit = exports.OSCE_MARKSHEET_ACTION = exports.ROLE_CHANGED = v
|
|
|
4
4
|
const models_1 = require("../../models");
|
|
5
5
|
exports.ROLE_CHANGED = 'ROLE_CHANGED';
|
|
6
6
|
exports.OSCE_MARKSHEET_ACTION = 'OSCE_MARKSHEET_ACTION';
|
|
7
|
-
|
|
7
|
+
const OsceGroupInit = (osceMarksheetId) => [
|
|
8
8
|
{
|
|
9
|
-
|
|
9
|
+
id: null,
|
|
10
|
+
createdAt: null,
|
|
11
|
+
osceMarksheetId,
|
|
12
|
+
userId: null,
|
|
10
13
|
user: null,
|
|
14
|
+
role: models_1.EOsceRoles.CANDIDATE,
|
|
11
15
|
},
|
|
12
16
|
{
|
|
13
|
-
|
|
17
|
+
id: null,
|
|
18
|
+
createdAt: null,
|
|
19
|
+
osceMarksheetId,
|
|
20
|
+
userId: null,
|
|
14
21
|
user: null,
|
|
22
|
+
role: models_1.EOsceRoles.EXAMINER,
|
|
15
23
|
},
|
|
16
24
|
{
|
|
17
|
-
|
|
25
|
+
id: null,
|
|
26
|
+
createdAt: null,
|
|
27
|
+
osceMarksheetId,
|
|
28
|
+
userId: null,
|
|
18
29
|
user: null,
|
|
30
|
+
role: models_1.EOsceRoles.ACTOR,
|
|
19
31
|
},
|
|
20
32
|
{
|
|
21
|
-
|
|
33
|
+
id: null,
|
|
34
|
+
createdAt: null,
|
|
35
|
+
osceMarksheetId,
|
|
36
|
+
userId: null,
|
|
22
37
|
user: null,
|
|
38
|
+
role: models_1.EOsceRoles.OBSERVER,
|
|
23
39
|
},
|
|
24
40
|
];
|
|
41
|
+
exports.OsceGroupInit = OsceGroupInit;
|