@quesmed/types 2.2.54 → 2.2.57

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 (37) 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 +7 -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/cjs/resolvers/query/restricted/marksheet.js +1 -0
  18. package/dist/mjs/models/Product.d.ts +17 -0
  19. package/dist/mjs/models/Product.js +6 -0
  20. package/dist/mjs/models/Promo.d.ts +1 -1
  21. package/dist/mjs/models/Subscription.d.ts +13 -12
  22. package/dist/mjs/models/Subscription.js +1 -6
  23. package/dist/mjs/models/User.d.ts +8 -16
  24. package/dist/mjs/models/User.js +5 -5
  25. package/dist/mjs/models/index.d.ts +2 -1
  26. package/dist/mjs/models/index.js +2 -1
  27. package/dist/mjs/resolvers/fragments/user.js +3 -6
  28. package/dist/mjs/resolvers/mutation/restricted/marksheet.d.ts +1 -1
  29. package/dist/mjs/resolvers/mutation/restricted/marksheet.js +7 -3
  30. package/dist/mjs/resolvers/query/index.d.ts +1 -1
  31. package/dist/mjs/resolvers/query/index.js +1 -1
  32. package/dist/mjs/resolvers/query/product.d.ts +4 -0
  33. package/dist/mjs/resolvers/query/{subscription.js → product.js} +3 -3
  34. package/dist/mjs/resolvers/query/restricted/marksheet.js +1 -0
  35. package/package.json +1 -1
  36. package/dist/cjs/resolvers/query/subscription.d.ts +0 -4
  37. 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
@@ -2487,8 +2487,8 @@ exports.START_OR_JOIN_MARKSHEET = (0, client_1.gql) `
2487
2487
  questionChoiceId
2488
2488
  marksheetId
2489
2489
  timeTaken
2490
- isAnswered
2491
2490
  striked
2491
+ isAnswered
2492
2492
  mark
2493
2493
  question {
2494
2494
  ... on QuestionSBA {
@@ -3063,8 +3063,8 @@ exports.MODIFY_MARKSHEET_INFO = (0, client_1.gql) `
3063
3063
  questionChoiceId
3064
3064
  marksheetId
3065
3065
  timeTaken
3066
- isAnswered
3067
3066
  striked
3067
+ isAnswered
3068
3068
  mark
3069
3069
  question {
3070
3070
  ... on QuestionSBA {
@@ -3586,7 +3586,11 @@ exports.LEAVE_MARKSHEET = (0, client_1.gql) `
3586
3586
  exports.END_MARKSHEET = (0, client_1.gql) `
3587
3587
  mutation EndMarksheet($marksheetId: Int!) {
3588
3588
  restricted {
3589
- endMarksheet(marksheetId: $marksheetId)
3589
+ endMarksheet(marksheetId: $marksheetId){
3590
+ id
3591
+ timeTaken
3592
+ endedAt
3593
+ }
3590
3594
  }
3591
3595
  }
3592
3596
  `;
@@ -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
@@ -10,6 +10,7 @@ exports.MARKSHEET = (0, client_1.gql) `
10
10
  topicConceptData
11
11
  currentMarkId
12
12
  completed
13
+ timeTaken
13
14
  topicIds
14
15
  topicNames
15
16
  mockTestId
@@ -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
@@ -2482,8 +2482,8 @@ export const START_OR_JOIN_MARKSHEET = gql `
2482
2482
  questionChoiceId
2483
2483
  marksheetId
2484
2484
  timeTaken
2485
- isAnswered
2486
2485
  striked
2486
+ isAnswered
2487
2487
  mark
2488
2488
  question {
2489
2489
  ... on QuestionSBA {
@@ -3057,8 +3057,8 @@ export const MODIFY_MARKSHEET_INFO = gql `
3057
3057
  questionChoiceId
3058
3058
  marksheetId
3059
3059
  timeTaken
3060
- isAnswered
3061
3060
  striked
3061
+ isAnswered
3062
3062
  mark
3063
3063
  question {
3064
3064
  ... on QuestionSBA {
@@ -3580,7 +3580,11 @@ export const LEAVE_MARKSHEET = gql `
3580
3580
  export const END_MARKSHEET = gql `
3581
3581
  mutation EndMarksheet($marksheetId: Int!) {
3582
3582
  restricted {
3583
- endMarksheet(marksheetId: $marksheetId)
3583
+ endMarksheet(marksheetId: $marksheetId){
3584
+ id
3585
+ timeTaken
3586
+ endedAt
3587
+ }
3584
3588
  }
3585
3589
  }
3586
3590
  `;
@@ -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
@@ -7,6 +7,7 @@ export const MARKSHEET = gql `
7
7
  topicConceptData
8
8
  currentMarkId
9
9
  completed
10
+ timeTaken
10
11
  topicIds
11
12
  topicNames
12
13
  mockTestId
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quesmed/types",
3
- "version": "2.2.54",
3
+ "version": "2.2.57",
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;