@quesmed/types 2.2.55 → 2.2.58

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.
Files changed (35) hide show
  1. package/dist/cjs/models/Product.d.ts +17 -0
  2. package/dist/cjs/models/Product.js +9 -0
  3. package/dist/cjs/models/Promo.d.ts +1 -1
  4. package/dist/cjs/models/Subscription.d.ts +13 -12
  5. package/dist/cjs/models/Subscription.js +0 -7
  6. package/dist/cjs/models/User.d.ts +8 -16
  7. package/dist/cjs/models/User.js +5 -5
  8. package/dist/cjs/models/index.d.ts +2 -1
  9. package/dist/cjs/models/index.js +2 -1
  10. package/dist/cjs/resolvers/fragments/user.js +3 -6
  11. package/dist/cjs/resolvers/mutation/restricted/marksheet.d.ts +1 -1
  12. package/dist/cjs/resolvers/mutation/restricted/marksheet.js +8 -3
  13. package/dist/cjs/resolvers/query/index.d.ts +1 -1
  14. package/dist/cjs/resolvers/query/index.js +1 -1
  15. package/dist/cjs/resolvers/query/product.d.ts +4 -0
  16. package/dist/cjs/resolvers/query/{subscription.js → product.js} +4 -4
  17. package/dist/mjs/models/Product.d.ts +17 -0
  18. package/dist/mjs/models/Product.js +6 -0
  19. package/dist/mjs/models/Promo.d.ts +1 -1
  20. package/dist/mjs/models/Subscription.d.ts +13 -12
  21. package/dist/mjs/models/Subscription.js +1 -6
  22. package/dist/mjs/models/User.d.ts +8 -16
  23. package/dist/mjs/models/User.js +5 -5
  24. package/dist/mjs/models/index.d.ts +2 -1
  25. package/dist/mjs/models/index.js +2 -1
  26. package/dist/mjs/resolvers/fragments/user.js +3 -6
  27. package/dist/mjs/resolvers/mutation/restricted/marksheet.d.ts +1 -1
  28. package/dist/mjs/resolvers/mutation/restricted/marksheet.js +8 -3
  29. package/dist/mjs/resolvers/query/index.d.ts +1 -1
  30. package/dist/mjs/resolvers/query/index.js +1 -1
  31. package/dist/mjs/resolvers/query/product.d.ts +4 -0
  32. package/dist/mjs/resolvers/query/{subscription.js → product.js} +3 -3
  33. package/package.json +1 -1
  34. package/dist/cjs/resolvers/query/subscription.d.ts +0 -4
  35. package/dist/mjs/resolvers/query/subscription.d.ts +0 -4
@@ -0,0 +1,17 @@
1
+ import { Id } from './Type';
2
+ export declare enum EProductType {
3
+ QBANK = 1,
4
+ OSCE = 2,
5
+ BUNDLE = 3
6
+ }
7
+ export interface IProduct {
8
+ id: Id;
9
+ createdAt: number | Date;
10
+ name: string;
11
+ description: string | null;
12
+ price: number;
13
+ stripePriceId: string;
14
+ duration: number;
15
+ public: boolean;
16
+ typeId: EProductType;
17
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EProductType = void 0;
4
+ var EProductType;
5
+ (function (EProductType) {
6
+ EProductType[EProductType["QBANK"] = 1] = "QBANK";
7
+ EProductType[EProductType["OSCE"] = 2] = "OSCE";
8
+ EProductType[EProductType["BUNDLE"] = 3] = "BUNDLE";
9
+ })(EProductType = exports.EProductType || (exports.EProductType = {}));
@@ -10,5 +10,5 @@ export interface IPromoReport {
10
10
  date: number | Date;
11
11
  couponId: Id;
12
12
  userId: Id;
13
- subscriptionId: Id;
13
+ productId: Id;
14
14
  }
@@ -1,17 +1,18 @@
1
+ import { IProduct } from './Product';
1
2
  import { Id } from './Type';
3
+ import { IClassYear, IUser } from './User';
2
4
  export interface ISubscription {
3
5
  id: Id;
4
6
  createdAt: number | Date;
5
- name: string;
6
- description: string | null;
7
- price: number;
8
- stripePriceId: string;
9
- duration: number;
10
- public: boolean;
11
- typeId: Id;
12
- }
13
- export declare enum ESubscriptionType {
14
- QBANK = 1,
15
- OSCE = 2,
16
- BUNDLE = 3
7
+ updatedAt: number | Date;
8
+ startedAt: number | Date;
9
+ endedAt: number | Date;
10
+ periodEndAt: number | Date;
11
+ stripeSubscriptionId: string;
12
+ userId: Id;
13
+ user?: IUser;
14
+ productId: Id;
15
+ product?: IProduct;
16
+ classYear: IClassYear;
17
+ invoiced: number;
17
18
  }
@@ -1,9 +1,2 @@
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 = {}));
@@ -26,9 +26,9 @@ export interface IPayload {
26
26
  accessLevel: IAccessLevel;
27
27
  tocAccepted: boolean;
28
28
  exp: number;
29
- stripeQBankSubscriptionEndDate: number | null;
30
- stripeOsceSubscriptionEndDate: number | null;
31
- stripeBundleSubscriptionEndDate: number | null;
29
+ qbankSubscriptionEndDate: number | null;
30
+ osceSubscriptionEndDate: number | null;
31
+ bundleSubscriptionEndDate: number | null;
32
32
  }
33
33
  export interface IDailyProgressInfo {
34
34
  totalCount: number;
@@ -48,18 +48,6 @@ export interface IUser {
48
48
  dailyFeedMax: number;
49
49
  stripeCustomerId: string;
50
50
  stripeLastSyncAt: number | Date | null;
51
- qBankSubscriptionId: Id;
52
- qBankSubscription: ISubscription | null;
53
- stripeQBankSubscriptionId: string;
54
- stripeQBankSubscriptionEndDate: number | Date;
55
- osceSubscriptionId: Id;
56
- osceSubscription: ISubscription | null;
57
- stripeOsceSubscriptionId: string;
58
- stripeOsceSubscriptionEndDate: number | Date;
59
- bundleSubscriptionId: Id;
60
- bundleSubscription: ISubscription | null;
61
- stripeBundleSubscriptionId: string;
62
- stripeBundleSubscriptionEndDate: number | Date;
63
51
  referralCount: number;
64
52
  classYear: IClassYear;
65
53
  graduationYear: number;
@@ -82,8 +70,12 @@ export interface IUser {
82
70
  dailyFeed: ITodo;
83
71
  dailyProgress: IDailyProgressInfo[];
84
72
  notifications: INotification[];
73
+ subscriptions: ISubscription[];
74
+ qbankSubscriptionEndDate: number | Date | null;
75
+ osceSubscriptionEndDate: number | Date | null;
76
+ bundleSubscriptionEndDate: number | Date | null;
85
77
  }
86
- export declare function currentClassYear(createdAtUnix: number, classYear: IClassYear): IClassYear;
78
+ export declare function currentClassYear(createdAtUnix: number, classYear: IClassYear, compareUnix?: number): IClassYear;
87
79
  export declare function currentClassGroup(createdAtUnix: number, classYear: IClassYear): EClassYearGroup;
88
80
  export interface IUserCompletedQuestion {
89
81
  id: Id;
@@ -26,7 +26,7 @@ exports.classYearGroup = {
26
26
  MSc: EClassYearGroup.CLINICAL,
27
27
  'Beta Tester': EClassYearGroup.CLINICAL,
28
28
  };
29
- function currentClassYear(createdAtUnix, classYear) {
29
+ function currentClassYear(createdAtUnix, classYear, compareUnix = new Date().getTime()) {
30
30
  if (createdAtUnix === 0) {
31
31
  throw new Error('createdAt not given in Unix');
32
32
  }
@@ -38,10 +38,10 @@ function currentClassYear(createdAtUnix, classYear) {
38
38
  if (classYearsIdx === -1) {
39
39
  return exports.classYears[lastClassYearIdx];
40
40
  }
41
- const now = new Date();
42
- const currentYear = now.getFullYear();
41
+ const compareDate = new Date(compareUnix * 1000);
42
+ const currentYear = compareDate.getFullYear();
43
43
  const createdAt = new Date(createdAtUnix * 1000);
44
- if (createdAt.getFullYear() > now.getFullYear()) {
44
+ if (createdAt.getFullYear() > compareDate.getFullYear()) {
45
45
  throw new Error('createdAt not given in Unix');
46
46
  }
47
47
  const createdYear = createdAt.getFullYear();
@@ -51,7 +51,7 @@ function currentClassYear(createdAtUnix, classYear) {
51
51
  if (createdAt > createdAcademicYear) {
52
52
  yearsAdded--;
53
53
  }
54
- if (now > nowAcademicYear) {
54
+ if (compareDate > nowAcademicYear) {
55
55
  yearsAdded++;
56
56
  }
57
57
  const newClassYearIdx = classYearsIdx + yearsAdded;
@@ -13,8 +13,10 @@ export * from './Notification';
13
13
  export * from './OsceMarksheet';
14
14
  export * from './OsceStation';
15
15
  export * from './Picture';
16
+ export * from './Product';
16
17
  export * from './Promo';
17
18
  export * from './Question';
19
+ export * from './Referrals';
18
20
  export * from './Subscription';
19
21
  export * from './Todo';
20
22
  export * from './Token';
@@ -23,4 +25,3 @@ export * from './Type';
23
25
  export * from './University';
24
26
  export * from './User';
25
27
  export * from './Video';
26
- export * from './Referrals';
@@ -25,8 +25,10 @@ __exportStar(require("./Notification"), exports);
25
25
  __exportStar(require("./OsceMarksheet"), exports);
26
26
  __exportStar(require("./OsceStation"), exports);
27
27
  __exportStar(require("./Picture"), exports);
28
+ __exportStar(require("./Product"), exports);
28
29
  __exportStar(require("./Promo"), exports);
29
30
  __exportStar(require("./Question"), exports);
31
+ __exportStar(require("./Referrals"), exports);
30
32
  __exportStar(require("./Subscription"), exports);
31
33
  __exportStar(require("./Todo"), exports);
32
34
  __exportStar(require("./Token"), exports);
@@ -35,4 +37,3 @@ __exportStar(require("./Type"), exports);
35
37
  __exportStar(require("./University"), exports);
36
38
  __exportStar(require("./User"), exports);
37
39
  __exportStar(require("./Video"), exports);
38
- __exportStar(require("./Referrals"), exports);
@@ -18,12 +18,9 @@ exports.USER_FIELDS = (0, client_1.gql) `
18
18
  dailyFeedResetTime
19
19
  dailyFeedMax
20
20
  stripeCustomerId
21
- stripeQBankSubscriptionId
22
- stripeQBankSubscriptionEndDate
23
- stripeOsceSubscriptionId
24
- stripeOsceSubscriptionEndDate
25
- stripeBundleSubscriptionId
26
- stripeBundleSubscriptionEndDate
21
+ qbankSubscriptionEndDate
22
+ osceSubscriptionEndDate
23
+ bundleSubscriptionEndDate
27
24
 
28
25
  # user-specific keys
29
26
  # marksheets
@@ -188,7 +188,7 @@ export declare const LEAVE_MARKSHEET: import("@apollo/client").DocumentNode;
188
188
  export interface IEndMarksheetVar {
189
189
  marksheetId: Id;
190
190
  }
191
- export declare type IEndMarksheetData = RestrictedData<graphqlNormalize & boolean, 'endMarksheet'>;
191
+ export declare type IEndMarksheetData = RestrictedData<graphqlNormalize & IMarksheet, 'endMarksheet'>;
192
192
  export declare const END_MARKSHEET: import("@apollo/client").DocumentNode;
193
193
  /**
194
194
  * toggleStrikeOptions
@@ -2427,6 +2427,7 @@ exports.REMOVE_FLAGGED_QUESTION = (0, client_1.gql) `
2427
2427
  restricted {
2428
2428
  removeFlaggedQuestion(questionId: $questionId) {
2429
2429
  id
2430
+ markId
2430
2431
  }
2431
2432
  }
2432
2433
  }
@@ -2487,8 +2488,8 @@ exports.START_OR_JOIN_MARKSHEET = (0, client_1.gql) `
2487
2488
  questionChoiceId
2488
2489
  marksheetId
2489
2490
  timeTaken
2490
- isAnswered
2491
2491
  striked
2492
+ isAnswered
2492
2493
  mark
2493
2494
  question {
2494
2495
  ... on QuestionSBA {
@@ -3063,8 +3064,8 @@ exports.MODIFY_MARKSHEET_INFO = (0, client_1.gql) `
3063
3064
  questionChoiceId
3064
3065
  marksheetId
3065
3066
  timeTaken
3066
- isAnswered
3067
3067
  striked
3068
+ isAnswered
3068
3069
  mark
3069
3070
  question {
3070
3071
  ... on QuestionSBA {
@@ -3586,7 +3587,11 @@ exports.LEAVE_MARKSHEET = (0, client_1.gql) `
3586
3587
  exports.END_MARKSHEET = (0, client_1.gql) `
3587
3588
  mutation EndMarksheet($marksheetId: Int!) {
3588
3589
  restricted {
3589
- endMarksheet(marksheetId: $marksheetId)
3590
+ endMarksheet(marksheetId: $marksheetId) {
3591
+ id
3592
+ timeTaken
3593
+ endedAt
3594
+ }
3590
3595
  }
3591
3596
  }
3592
3597
  `;
@@ -3,9 +3,9 @@ export * from './author';
3
3
  export * from './blog';
4
4
  export * from './book';
5
5
  export * from './feedback';
6
+ export * from './product';
6
7
  export * as restricted from './restricted';
7
8
  export * from './sample';
8
- export * from './subscription';
9
9
  export * from './university';
10
10
  export * from './user';
11
11
  export * from './video';
@@ -28,9 +28,9 @@ __exportStar(require("./author"), exports);
28
28
  __exportStar(require("./blog"), exports);
29
29
  __exportStar(require("./book"), exports);
30
30
  __exportStar(require("./feedback"), exports);
31
+ __exportStar(require("./product"), exports);
31
32
  exports.restricted = __importStar(require("./restricted"));
32
33
  __exportStar(require("./sample"), exports);
33
- __exportStar(require("./subscription"), exports);
34
34
  __exportStar(require("./university"), exports);
35
35
  __exportStar(require("./user"), exports);
36
36
  __exportStar(require("./video"), exports);
@@ -0,0 +1,4 @@
1
+ import { IProduct } from '../../models';
2
+ import { graphqlNormalize, RootData } from '../types';
3
+ export declare type IProductsData = RootData<(graphqlNormalize & IProduct)[], 'products'>;
4
+ export declare const PRODUCTS: import("@apollo/client").DocumentNode;
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SUBSCRIPTIONS = void 0;
3
+ exports.PRODUCTS = void 0;
4
4
  const client_1 = require("@apollo/client");
5
- exports.SUBSCRIPTIONS = (0, client_1.gql) `
6
- query Subscriptions {
7
- subscriptions {
5
+ exports.PRODUCTS = (0, client_1.gql) `
6
+ query Products {
7
+ products {
8
8
  id
9
9
  createdAt
10
10
  description
@@ -0,0 +1,17 @@
1
+ import { Id } from './Type';
2
+ export declare enum EProductType {
3
+ QBANK = 1,
4
+ OSCE = 2,
5
+ BUNDLE = 3
6
+ }
7
+ export interface IProduct {
8
+ id: Id;
9
+ createdAt: number | Date;
10
+ name: string;
11
+ description: string | null;
12
+ price: number;
13
+ stripePriceId: string;
14
+ duration: number;
15
+ public: boolean;
16
+ typeId: EProductType;
17
+ }
@@ -0,0 +1,6 @@
1
+ export var EProductType;
2
+ (function (EProductType) {
3
+ EProductType[EProductType["QBANK"] = 1] = "QBANK";
4
+ EProductType[EProductType["OSCE"] = 2] = "OSCE";
5
+ EProductType[EProductType["BUNDLE"] = 3] = "BUNDLE";
6
+ })(EProductType || (EProductType = {}));
@@ -10,5 +10,5 @@ export interface IPromoReport {
10
10
  date: number | Date;
11
11
  couponId: Id;
12
12
  userId: Id;
13
- subscriptionId: Id;
13
+ productId: Id;
14
14
  }
@@ -1,17 +1,18 @@
1
+ import { IProduct } from './Product';
1
2
  import { Id } from './Type';
3
+ import { IClassYear, IUser } from './User';
2
4
  export interface ISubscription {
3
5
  id: Id;
4
6
  createdAt: number | Date;
5
- name: string;
6
- description: string | null;
7
- price: number;
8
- stripePriceId: string;
9
- duration: number;
10
- public: boolean;
11
- typeId: Id;
12
- }
13
- export declare enum ESubscriptionType {
14
- QBANK = 1,
15
- OSCE = 2,
16
- BUNDLE = 3
7
+ updatedAt: number | Date;
8
+ startedAt: number | Date;
9
+ endedAt: number | Date;
10
+ periodEndAt: number | Date;
11
+ stripeSubscriptionId: string;
12
+ userId: Id;
13
+ user?: IUser;
14
+ productId: Id;
15
+ product?: IProduct;
16
+ classYear: IClassYear;
17
+ invoiced: number;
17
18
  }
@@ -1,6 +1 @@
1
- export var ESubscriptionType;
2
- (function (ESubscriptionType) {
3
- ESubscriptionType[ESubscriptionType["QBANK"] = 1] = "QBANK";
4
- ESubscriptionType[ESubscriptionType["OSCE"] = 2] = "OSCE";
5
- ESubscriptionType[ESubscriptionType["BUNDLE"] = 3] = "BUNDLE";
6
- })(ESubscriptionType || (ESubscriptionType = {}));
1
+ export {};
@@ -26,9 +26,9 @@ export interface IPayload {
26
26
  accessLevel: IAccessLevel;
27
27
  tocAccepted: boolean;
28
28
  exp: number;
29
- stripeQBankSubscriptionEndDate: number | null;
30
- stripeOsceSubscriptionEndDate: number | null;
31
- stripeBundleSubscriptionEndDate: number | null;
29
+ qbankSubscriptionEndDate: number | null;
30
+ osceSubscriptionEndDate: number | null;
31
+ bundleSubscriptionEndDate: number | null;
32
32
  }
33
33
  export interface IDailyProgressInfo {
34
34
  totalCount: number;
@@ -48,18 +48,6 @@ export interface IUser {
48
48
  dailyFeedMax: number;
49
49
  stripeCustomerId: string;
50
50
  stripeLastSyncAt: number | Date | null;
51
- qBankSubscriptionId: Id;
52
- qBankSubscription: ISubscription | null;
53
- stripeQBankSubscriptionId: string;
54
- stripeQBankSubscriptionEndDate: number | Date;
55
- osceSubscriptionId: Id;
56
- osceSubscription: ISubscription | null;
57
- stripeOsceSubscriptionId: string;
58
- stripeOsceSubscriptionEndDate: number | Date;
59
- bundleSubscriptionId: Id;
60
- bundleSubscription: ISubscription | null;
61
- stripeBundleSubscriptionId: string;
62
- stripeBundleSubscriptionEndDate: number | Date;
63
51
  referralCount: number;
64
52
  classYear: IClassYear;
65
53
  graduationYear: number;
@@ -82,8 +70,12 @@ export interface IUser {
82
70
  dailyFeed: ITodo;
83
71
  dailyProgress: IDailyProgressInfo[];
84
72
  notifications: INotification[];
73
+ subscriptions: ISubscription[];
74
+ qbankSubscriptionEndDate: number | Date | null;
75
+ osceSubscriptionEndDate: number | Date | null;
76
+ bundleSubscriptionEndDate: number | Date | null;
85
77
  }
86
- export declare function currentClassYear(createdAtUnix: number, classYear: IClassYear): IClassYear;
78
+ export declare function currentClassYear(createdAtUnix: number, classYear: IClassYear, compareUnix?: number): IClassYear;
87
79
  export declare function currentClassGroup(createdAtUnix: number, classYear: IClassYear): EClassYearGroup;
88
80
  export interface IUserCompletedQuestion {
89
81
  id: Id;
@@ -23,7 +23,7 @@ export const classYearGroup = {
23
23
  MSc: EClassYearGroup.CLINICAL,
24
24
  'Beta Tester': EClassYearGroup.CLINICAL,
25
25
  };
26
- export function currentClassYear(createdAtUnix, classYear) {
26
+ export function currentClassYear(createdAtUnix, classYear, compareUnix = new Date().getTime()) {
27
27
  if (createdAtUnix === 0) {
28
28
  throw new Error('createdAt not given in Unix');
29
29
  }
@@ -35,10 +35,10 @@ export function currentClassYear(createdAtUnix, classYear) {
35
35
  if (classYearsIdx === -1) {
36
36
  return classYears[lastClassYearIdx];
37
37
  }
38
- const now = new Date();
39
- const currentYear = now.getFullYear();
38
+ const compareDate = new Date(compareUnix * 1000);
39
+ const currentYear = compareDate.getFullYear();
40
40
  const createdAt = new Date(createdAtUnix * 1000);
41
- if (createdAt.getFullYear() > now.getFullYear()) {
41
+ if (createdAt.getFullYear() > compareDate.getFullYear()) {
42
42
  throw new Error('createdAt not given in Unix');
43
43
  }
44
44
  const createdYear = createdAt.getFullYear();
@@ -48,7 +48,7 @@ export function currentClassYear(createdAtUnix, classYear) {
48
48
  if (createdAt > createdAcademicYear) {
49
49
  yearsAdded--;
50
50
  }
51
- if (now > nowAcademicYear) {
51
+ if (compareDate > nowAcademicYear) {
52
52
  yearsAdded++;
53
53
  }
54
54
  const newClassYearIdx = classYearsIdx + yearsAdded;
@@ -13,8 +13,10 @@ export * from './Notification';
13
13
  export * from './OsceMarksheet';
14
14
  export * from './OsceStation';
15
15
  export * from './Picture';
16
+ export * from './Product';
16
17
  export * from './Promo';
17
18
  export * from './Question';
19
+ export * from './Referrals';
18
20
  export * from './Subscription';
19
21
  export * from './Todo';
20
22
  export * from './Token';
@@ -23,4 +25,3 @@ export * from './Type';
23
25
  export * from './University';
24
26
  export * from './User';
25
27
  export * from './Video';
26
- export * from './Referrals';
@@ -13,8 +13,10 @@ export * from './Notification';
13
13
  export * from './OsceMarksheet';
14
14
  export * from './OsceStation';
15
15
  export * from './Picture';
16
+ export * from './Product';
16
17
  export * from './Promo';
17
18
  export * from './Question';
19
+ export * from './Referrals';
18
20
  export * from './Subscription';
19
21
  export * from './Todo';
20
22
  export * from './Token';
@@ -23,4 +25,3 @@ export * from './Type';
23
25
  export * from './University';
24
26
  export * from './User';
25
27
  export * from './Video';
26
- export * from './Referrals';
@@ -15,12 +15,9 @@ export const USER_FIELDS = gql `
15
15
  dailyFeedResetTime
16
16
  dailyFeedMax
17
17
  stripeCustomerId
18
- stripeQBankSubscriptionId
19
- stripeQBankSubscriptionEndDate
20
- stripeOsceSubscriptionId
21
- stripeOsceSubscriptionEndDate
22
- stripeBundleSubscriptionId
23
- stripeBundleSubscriptionEndDate
18
+ qbankSubscriptionEndDate
19
+ osceSubscriptionEndDate
20
+ bundleSubscriptionEndDate
24
21
 
25
22
  # user-specific keys
26
23
  # marksheets
@@ -188,7 +188,7 @@ export declare const LEAVE_MARKSHEET: import("@apollo/client").DocumentNode;
188
188
  export interface IEndMarksheetVar {
189
189
  marksheetId: Id;
190
190
  }
191
- export declare type IEndMarksheetData = RestrictedData<graphqlNormalize & boolean, 'endMarksheet'>;
191
+ export declare type IEndMarksheetData = RestrictedData<graphqlNormalize & IMarksheet, 'endMarksheet'>;
192
192
  export declare const END_MARKSHEET: import("@apollo/client").DocumentNode;
193
193
  /**
194
194
  * toggleStrikeOptions
@@ -2422,6 +2422,7 @@ export const REMOVE_FLAGGED_QUESTION = gql `
2422
2422
  restricted {
2423
2423
  removeFlaggedQuestion(questionId: $questionId) {
2424
2424
  id
2425
+ markId
2425
2426
  }
2426
2427
  }
2427
2428
  }
@@ -2482,8 +2483,8 @@ export const START_OR_JOIN_MARKSHEET = gql `
2482
2483
  questionChoiceId
2483
2484
  marksheetId
2484
2485
  timeTaken
2485
- isAnswered
2486
2486
  striked
2487
+ isAnswered
2487
2488
  mark
2488
2489
  question {
2489
2490
  ... on QuestionSBA {
@@ -3057,8 +3058,8 @@ export const MODIFY_MARKSHEET_INFO = gql `
3057
3058
  questionChoiceId
3058
3059
  marksheetId
3059
3060
  timeTaken
3060
- isAnswered
3061
3061
  striked
3062
+ isAnswered
3062
3063
  mark
3063
3064
  question {
3064
3065
  ... on QuestionSBA {
@@ -3580,7 +3581,11 @@ export const LEAVE_MARKSHEET = gql `
3580
3581
  export const END_MARKSHEET = gql `
3581
3582
  mutation EndMarksheet($marksheetId: Int!) {
3582
3583
  restricted {
3583
- endMarksheet(marksheetId: $marksheetId)
3584
+ endMarksheet(marksheetId: $marksheetId) {
3585
+ id
3586
+ timeTaken
3587
+ endedAt
3588
+ }
3584
3589
  }
3585
3590
  }
3586
3591
  `;
@@ -3,9 +3,9 @@ export * from './author';
3
3
  export * from './blog';
4
4
  export * from './book';
5
5
  export * from './feedback';
6
+ export * from './product';
6
7
  export * as restricted from './restricted';
7
8
  export * from './sample';
8
- export * from './subscription';
9
9
  export * from './university';
10
10
  export * from './user';
11
11
  export * from './video';
@@ -3,9 +3,9 @@ export * from './author';
3
3
  export * from './blog';
4
4
  export * from './book';
5
5
  export * from './feedback';
6
+ export * from './product';
6
7
  export * as restricted from './restricted';
7
8
  export * from './sample';
8
- export * from './subscription';
9
9
  export * from './university';
10
10
  export * from './user';
11
11
  export * from './video';
@@ -0,0 +1,4 @@
1
+ import { IProduct } from '../../models';
2
+ import { graphqlNormalize, RootData } from '../types';
3
+ export declare type IProductsData = RootData<(graphqlNormalize & IProduct)[], 'products'>;
4
+ export declare const PRODUCTS: import("@apollo/client").DocumentNode;
@@ -1,7 +1,7 @@
1
1
  import { gql } from '@apollo/client';
2
- export const SUBSCRIPTIONS = gql `
3
- query Subscriptions {
4
- subscriptions {
2
+ export const PRODUCTS = gql `
3
+ query Products {
4
+ products {
5
5
  id
6
6
  createdAt
7
7
  description
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quesmed/types",
3
- "version": "2.2.55",
3
+ "version": "2.2.58",
4
4
  "description": "Typescript types for Quesmed",
5
5
  "keywords": [
6
6
  "quesmed",
@@ -1,4 +0,0 @@
1
- import { ISubscription } from '../../models';
2
- import { graphqlNormalize, RootData } from '../types';
3
- export declare type ISubscriptionsData = RootData<(graphqlNormalize & ISubscription)[], 'subscriptions'>;
4
- export declare const SUBSCRIPTIONS: import("@apollo/client").DocumentNode;
@@ -1,4 +0,0 @@
1
- import { ISubscription } from '../../models';
2
- import { graphqlNormalize, RootData } from '../types';
3
- export declare type ISubscriptionsData = RootData<(graphqlNormalize & ISubscription)[], 'subscriptions'>;
4
- export declare const SUBSCRIPTIONS: import("@apollo/client").DocumentNode;