@quesmed/types 1.0.15 → 1.0.19
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 +4 -4
- package/models/Subscription.d.ts +7 -1
- package/models/Subscription.js +7 -0
- package/models/User.d.ts +16 -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 -3
- 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
|
@@ -2,11 +2,11 @@ import { IOsceStation, IOsceStationMark, IOsceType } from './OsceStation';
|
|
|
2
2
|
import { Id } from './Type';
|
|
3
3
|
import { IUser } from './User';
|
|
4
4
|
export interface IOsceMarksheetUser {
|
|
5
|
-
id: Id;
|
|
6
|
-
createdAt: Date | string;
|
|
5
|
+
id: Id | null;
|
|
6
|
+
createdAt: Date | string | null;
|
|
7
7
|
osceMarksheetId: Id;
|
|
8
|
-
userId: Id;
|
|
9
|
-
user
|
|
8
|
+
userId: Id | null;
|
|
9
|
+
user: IUser | null;
|
|
10
10
|
role: EOsceRoles;
|
|
11
11
|
}
|
|
12
12
|
export interface IOsceMarksheetMark {
|
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,10 @@ export interface IPayload {
|
|
|
12
12
|
username: string;
|
|
13
13
|
accessLevel: string;
|
|
14
14
|
exp: number;
|
|
15
|
-
stripeSubscriptionEndDate: number;
|
|
15
|
+
stripeSubscriptionEndDate: number | null;
|
|
16
|
+
stripeQBankSubscriptionEndDate: number | null;
|
|
17
|
+
stripeOsceSubscriptionEndDate: number | null;
|
|
18
|
+
stripeBundleSubscriptionEndDate: number | null;
|
|
16
19
|
}
|
|
17
20
|
export interface IUser {
|
|
18
21
|
id: Id;
|
|
@@ -24,9 +27,18 @@ export interface IUser {
|
|
|
24
27
|
universityId: number;
|
|
25
28
|
examDate: Date | string | null;
|
|
26
29
|
stripeCustomerId: string;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
+
qBankSubscriptionId: Id | null;
|
|
31
|
+
qBankSubscription: ISubscription | null;
|
|
32
|
+
stripeQBankSubscriptionEndDate: Date | string | null;
|
|
33
|
+
osceSubscriptionId: Id | null;
|
|
34
|
+
osceSubscription: ISubscription | null;
|
|
35
|
+
stripeOsceSubscriptionEndDate: Date | string | null;
|
|
36
|
+
bundleSubscriptionId: Id | null;
|
|
37
|
+
bundleSubscription: ISubscription | null;
|
|
38
|
+
stripeBundleSubscriptionEndDate: Date | string | null;
|
|
39
|
+
subscriptionId: Id | null;
|
|
40
|
+
subscription?: ISubscription | null;
|
|
41
|
+
stripeSubscriptionEndDate: Date | string | null;
|
|
30
42
|
}
|
|
31
43
|
export interface IUserCompletedQuestions {
|
|
32
44
|
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
|
@@ -44,7 +44,7 @@ export interface ISaveOsceMarksheetVar {
|
|
|
44
44
|
}
|
|
45
45
|
export declare type ISaveOsceMarksheetData = number;
|
|
46
46
|
export interface IOsceMarksheetActionsVar {
|
|
47
|
-
|
|
47
|
+
osceMarksheetId: Id;
|
|
48
48
|
userId: Id;
|
|
49
49
|
timeRemaining?: number;
|
|
50
50
|
action: EOsceMarksheetAction;
|
|
@@ -53,7 +53,7 @@ export declare type IOsceMarksheetActionsData = number;
|
|
|
53
53
|
export interface IEndOsceMarksheetVar extends ISaveOsceMarksheetVar {
|
|
54
54
|
}
|
|
55
55
|
export declare type IEndOsceMarksheetData = number;
|
|
56
|
-
export interface
|
|
56
|
+
export interface ILeaveOsceMarksheetVar {
|
|
57
57
|
osceMarksheetId: Id;
|
|
58
58
|
}
|
|
59
|
-
export declare type
|
|
59
|
+
export declare type ILeaveOsceMarksheetData = boolean;
|
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;
|