@quesmed/types 1.0.16 → 1.0.20

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.
@@ -8,4 +8,10 @@ export interface ISubscription {
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
  }
@@ -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
- subscriptionId: Id;
28
- subscription?: ISubscription;
29
- stripeSubscriptionEndDate: Date | string;
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quesmed/types",
3
- "version": "1.0.16",
3
+ "version": "1.0.20",
4
4
  "description": "Typescript types for Quesmed",
5
5
  "main": "index.js",
6
6
  "types": "dist/index.d.ts",
@@ -44,7 +44,7 @@ export interface ISaveOsceMarksheetVar {
44
44
  }
45
45
  export declare type ISaveOsceMarksheetData = number;
46
46
  export interface IOsceMarksheetActionsVar {
47
- agoraId: string;
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 IDeleteOsceMarksheetVar {
56
+ export interface ILeaveOsceMarksheetVar {
57
57
  osceMarksheetId: Id;
58
58
  }
59
- export declare type IDeleteOsceMarksheetData = boolean;
59
+ export declare type ILeaveOsceMarksheetData = boolean;
@@ -6,21 +6,24 @@ export interface IOsceGroupMember {
6
6
  user: IUser | null;
7
7
  }
8
8
  export interface IOsceGroup {
9
+ osceMarksheetId: Id;
9
10
  agoraId: string;
10
11
  members: IOsceMarksheetUser[];
11
12
  }
12
13
  export declare const OsceGroupInit: (osceMarksheetId: number) => IOsceMarksheetUser[];
13
14
  export interface IRoleChangedVar {
14
- agoraId: string;
15
+ osceMarksheetId: Id;
15
16
  }
16
17
  export interface IRoleChangedData extends IOsceGroup {
17
18
  }
18
19
  export interface IOsceMarksheetActionsVar {
19
- agoraId: string;
20
+ osceMarksheetId: Id;
20
21
  }
21
22
  export interface IOsceMarksheetAction {
23
+ osceMarksheetId: Id;
22
24
  agoraId: string;
23
25
  userId: Id;
26
+ user: IUser;
24
27
  startedAt: Date | null;
25
28
  endedAt: Date | null;
26
29
  action: EOsceMarksheetAction;