@quesmed/types 2.5.75 → 2.5.76

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/User.d.ts +1 -7
  2. package/dist/cjs/models/User.js +1 -9
  3. package/dist/cjs/resolvers/index.d.ts +0 -1
  4. package/dist/cjs/resolvers/index.js +0 -1
  5. package/dist/cjs/resolvers/mutation/restricted/preset.js +6 -35
  6. package/dist/cjs/resolvers/query/restricted/marksheet.d.ts +5 -10
  7. package/dist/cjs/resolvers/query/restricted/marksheet.js +11 -14
  8. package/dist/cjs/resolvers/query/restricted/osce.d.ts +2 -7
  9. package/dist/cjs/resolvers/query/restricted/osce.js +8 -11
  10. package/dist/cjs/resolvers/query/restricted/qBank.js +2 -2
  11. package/dist/cjs/resolvers/query/restricted/topics.d.ts +0 -2
  12. package/dist/cjs/resolvers/query/restricted/topics.js +2 -3
  13. package/dist/cjs/resolvers/query/restricted/user.d.ts +1 -0
  14. package/dist/cjs/resolvers/query/restricted/user.js +22 -1
  15. package/dist/cjs/resolvers/query/university.d.ts +1 -2
  16. package/dist/cjs/resolvers/query/university.js +1 -1
  17. package/dist/mjs/models/User.d.ts +1 -7
  18. package/dist/mjs/models/User.js +0 -8
  19. package/dist/mjs/resolvers/index.d.ts +0 -1
  20. package/dist/mjs/resolvers/index.js +0 -1
  21. package/dist/mjs/resolvers/mutation/restricted/preset.js +6 -35
  22. package/dist/mjs/resolvers/query/restricted/marksheet.d.ts +5 -10
  23. package/dist/mjs/resolvers/query/restricted/marksheet.js +11 -14
  24. package/dist/mjs/resolvers/query/restricted/osce.d.ts +2 -7
  25. package/dist/mjs/resolvers/query/restricted/osce.js +8 -11
  26. package/dist/mjs/resolvers/query/restricted/qBank.js +2 -2
  27. package/dist/mjs/resolvers/query/restricted/topics.d.ts +0 -2
  28. package/dist/mjs/resolvers/query/restricted/topics.js +2 -3
  29. package/dist/mjs/resolvers/query/restricted/user.d.ts +1 -0
  30. package/dist/mjs/resolvers/query/restricted/user.js +21 -0
  31. package/dist/mjs/resolvers/query/university.d.ts +1 -2
  32. package/dist/mjs/resolvers/query/university.js +1 -1
  33. package/package.json +1 -1
  34. package/dist/cjs/resolvers/enums.d.ts +0 -4
  35. package/dist/cjs/resolvers/enums.js +0 -8
  36. package/dist/mjs/resolvers/enums.d.ts +0 -4
  37. package/dist/mjs/resolvers/enums.js +0 -5
@@ -9,13 +9,7 @@ import { ITodo } from './Todo';
9
9
  import { Id } from './Type';
10
10
  import { IUniversity } from './University';
11
11
  import { IVideo } from './Video';
12
- export declare enum IAccessLevel {
13
- SUBSCRIBER = "subscriber",
14
- ADMINISTRATOR = "administrator",
15
- TUTOR = "tutor",
16
- DEMO = "demo",
17
- EXPIRED = "expired"
18
- }
12
+ export type IAccessLevel = 'subscriber' | 'administrator' | 'tutor';
19
13
  export type IClassYear = 'Year 1' | 'Year 2' | 'Year 3' | 'Year 4' | 'Year 5' | 'Graduated' | 'PhD' | 'BSc' | 'MSc' | 'Beta Tester';
20
14
  export declare const classYears: IClassYear[];
21
15
  export declare enum EClassYearGroup {
@@ -1,15 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.currentClassGroup = exports.currentClassYear = exports.EPracticeIntensity = exports.classYearGroup = exports.EUserLearningStatus = exports.EClassYearGroup = exports.classYears = exports.IAccessLevel = void 0;
3
+ exports.currentClassGroup = exports.currentClassYear = exports.EPracticeIntensity = exports.classYearGroup = exports.EUserLearningStatus = exports.EClassYearGroup = exports.classYears = void 0;
4
4
  const luxon_1 = require("luxon");
5
- var IAccessLevel;
6
- (function (IAccessLevel) {
7
- IAccessLevel["SUBSCRIBER"] = "subscriber";
8
- IAccessLevel["ADMINISTRATOR"] = "administrator";
9
- IAccessLevel["TUTOR"] = "tutor";
10
- IAccessLevel["DEMO"] = "demo";
11
- IAccessLevel["EXPIRED"] = "expired";
12
- })(IAccessLevel = exports.IAccessLevel || (exports.IAccessLevel = {}));
13
5
  exports.classYears = [
14
6
  'Year 1',
15
7
  'Year 2',
@@ -4,7 +4,6 @@ import * as query from './query';
4
4
  import * as subscription from './subscription';
5
5
  export * from './apollo';
6
6
  export * from './types';
7
- export * from './enums';
8
7
  export declare namespace Resolvers {
9
8
  export import Fragment = fragment;
10
9
  export import Muation = mutation;
@@ -33,7 +33,6 @@ const query = __importStar(require("./query"));
33
33
  const subscription = __importStar(require("./subscription"));
34
34
  __exportStar(require("./apollo"), exports);
35
35
  __exportStar(require("./types"), exports);
36
- __exportStar(require("./enums"), exports);
37
36
  var Resolvers;
38
37
  (function (Resolvers) {
39
38
  Resolvers.Fragment = fragment;
@@ -14,20 +14,10 @@ exports.DUPLICATE_PRESET = (0, client_1.gql) `
14
14
  restricted {
15
15
  duplicatePreset(presetId: $presetId) {
16
16
  id
17
- createdAt
18
- updatedAt
17
+ userId
19
18
  name
20
- likes
21
19
  topicType
22
- total
23
- correct
24
- incorrect
25
- userId
26
- university {
27
- id
28
- name
29
- country
30
- }
20
+ likes
31
21
  topics {
32
22
  id
33
23
  name
@@ -45,20 +35,10 @@ exports.EDIT_PRESET = (0, client_1.gql) `
45
35
  restricted {
46
36
  editPreset(presetId: $presetId, data: $data) {
47
37
  id
48
- createdAt
49
- updatedAt
38
+ userId
50
39
  name
51
- likes
52
40
  topicType
53
- total
54
- correct
55
- incorrect
56
- userId
57
- university {
58
- id
59
- name
60
- country
61
- }
41
+ likes
62
42
  topics {
63
43
  id
64
44
  name
@@ -77,19 +57,10 @@ exports.CREATE_PRESET = (0, client_1.gql) `
77
57
  createPreset(data: $data) {
78
58
  id
79
59
  createdAt
80
- updatedAt
60
+ userId
81
61
  name
82
- likes
83
62
  topicType
84
- total
85
- correct
86
- incorrect
87
- userId
88
- university {
89
- id
90
- name
91
- country
92
- }
63
+ likes
93
64
  topics {
94
65
  id
95
66
  name
@@ -1,7 +1,6 @@
1
1
  import { EDifficultyType, Id, IMarksheet, IUserFlaggedQuestion } from '../../../models';
2
2
  import { IPreBuildMarksheet } from '../../mutation/restricted';
3
3
  import { graphqlNormalize, RestrictedData } from '../../types';
4
- import { ESortOrder } from '../../enums';
5
4
  export interface IMarksheetVar {
6
5
  id: Id;
7
6
  }
@@ -10,7 +9,7 @@ export declare const MARKSHEET: import("@apollo/client").DocumentNode;
10
9
  export interface IMarksheetsVar {
11
10
  filter: {
12
11
  limit: number;
13
- order?: ESortOrder;
12
+ date?: string;
14
13
  offset?: number;
15
14
  solo?: boolean;
16
15
  period?: number;
@@ -19,7 +18,7 @@ export interface IMarksheetsVar {
19
18
  export interface IMarksheetsWindowVar {
20
19
  filter: {
21
20
  limit: number;
22
- order?: ESortOrder;
21
+ order?: string;
23
22
  updatedAt?: Date | number;
24
23
  solo?: boolean;
25
24
  period?: number;
@@ -30,15 +29,11 @@ export type IMarksheetsData = RestrictedData<{
30
29
  total: number;
31
30
  score: number;
32
31
  }, 'marksheets'>;
33
- export interface IMarksheetsDashboardData {
32
+ export type IMarksheetsWindowData = RestrictedData<{
33
+ results: (graphqlNormalize & IMarksheet)[];
34
34
  total: number;
35
35
  score: number;
36
- results: Array<{
37
- date: Date | number;
38
- result: IMarksheet[];
39
- }>;
40
- }
41
- export type IMarksheetsWindowData = RestrictedData<graphqlNormalize & IMarksheetsDashboardData, 'marksheetsWindow'>;
36
+ }, 'marksheetsWindow'>;
42
37
  export interface PaginatedMarksheets {
43
38
  results: (graphqlNormalize & IMarksheet)[];
44
39
  total: number;
@@ -1022,20 +1022,17 @@ exports.MARKSHEETS_WINDOW = (0, client_1.gql) `
1022
1022
  restricted {
1023
1023
  marksheetsWindow(filter: $filter) {
1024
1024
  results {
1025
- date
1026
- result {
1027
- id
1028
- endedAt
1029
- topicNames
1030
- correct
1031
- incorrect
1032
- totalQuestions
1033
- typeId
1034
- isTestMarksheet
1035
- solo
1036
- completed
1037
- updatedAt
1038
- }
1025
+ id
1026
+ endedAt
1027
+ topicNames
1028
+ correct
1029
+ incorrect
1030
+ totalQuestions
1031
+ typeId
1032
+ isTestMarksheet
1033
+ solo
1034
+ completed
1035
+ updatedAt
1039
1036
  }
1040
1037
  total
1041
1038
  score
@@ -1,7 +1,6 @@
1
1
  import { EDifficultyType, EOsceType, Id, IDashboardOsce, IOsceMarksheet, IOsceStation, IOsceStats } from '../../../models';
2
2
  import { graphqlNormalize, RestrictedData } from '../../types';
3
3
  import { ITopic } from './../../../models/Topic';
4
- import { ESortOrder } from '../../enums';
5
4
  export interface IOsceStatsVar {
6
5
  typeId?: EOsceType[];
7
6
  solo: boolean;
@@ -11,7 +10,6 @@ export declare const OSCE_STATS: import("@apollo/client").DocumentNode;
11
10
  export declare const DASHBOARD_OSCE: import("@apollo/client").DocumentNode;
12
11
  export interface IDashboardOsceVar {
13
12
  solo: boolean;
14
- order?: ESortOrder;
15
13
  }
16
14
  export type IDashboardOsceData = RestrictedData<graphqlNormalize & IDashboardOsce, 'dashboardOsce'>;
17
15
  export declare const OSCE_MARKSHEETS: import("@apollo/client").DocumentNode;
@@ -23,7 +21,7 @@ export type IOsceMarksheetsData = RestrictedData<(graphqlNormalize & IOsceMarksh
23
21
  export interface IOsceMarksheetsWindowVar {
24
22
  filter: {
25
23
  limit: number;
26
- order?: ESortOrder;
24
+ order?: string;
27
25
  updatedAt?: Date | number;
28
26
  solo?: boolean;
29
27
  period?: number;
@@ -33,10 +31,7 @@ export declare const OSCE_MARKSHEET_WINDOW: import("@apollo/client").DocumentNod
33
31
  export interface IOsceMarksheetsDashboardData {
34
32
  total: number;
35
33
  score: number;
36
- results: Array<{
37
- date: Date | number;
38
- result: IOsceMarksheet[];
39
- }>;
34
+ results: IOsceMarksheet[];
40
35
  }
41
36
  export type IOsceMarksheetsWindowData = RestrictedData<graphqlNormalize & IOsceMarksheetsDashboardData, 'osceMarksheetsWindow'>;
42
37
  export declare const OSCE_MARKSHEET: import("@apollo/client").DocumentNode;
@@ -23,9 +23,9 @@ exports.OSCE_STATS = (0, client_1.gql) `
23
23
  }
24
24
  `;
25
25
  exports.DASHBOARD_OSCE = (0, client_1.gql) `
26
- query DashboardOsce($solo: Boolean!, $order: Int) {
26
+ query DashboardOsce($solo: Boolean!) {
27
27
  restricted {
28
- dashboardOsce(solo: $solo, order: $order) {
28
+ dashboardOsce(solo: $solo) {
29
29
  lastSessionId
30
30
  types {
31
31
  id
@@ -63,15 +63,12 @@ exports.OSCE_MARKSHEET_WINDOW = (0, client_1.gql) `
63
63
  restricted {
64
64
  osceMarksheetsWindow(filter: $filter) {
65
65
  results {
66
- date
67
- result {
68
- ...OsceMarksheetFields
69
- correct
70
- total
71
- osceStation {
72
- ...OsceStationFields
73
- __typename
74
- }
66
+ ...OsceMarksheetFields
67
+ correct
68
+ total
69
+ osceStation {
70
+ ...OsceStationFields
71
+ __typename
75
72
  }
76
73
  }
77
74
  score
@@ -125,7 +125,7 @@ exports.DASHBOARD_QBANK = (0, client_1.gql) `
125
125
  `;
126
126
  exports.DASHBOARD = (0, client_1.gql) `
127
127
  ${fragments_1.PICTURE_FIELDS}
128
- query Dashboard($filter: MarksheetFilterInput!, $order: Int) {
128
+ query Dashboard($filter: MarksheetFilterInput!) {
129
129
  restricted {
130
130
  latestPastMarksheetId
131
131
  latestSessionId
@@ -200,7 +200,7 @@ exports.DASHBOARD = (0, client_1.gql) `
200
200
  }
201
201
  total
202
202
  }
203
- topics(filter: 0, order: $order) {
203
+ topics(filter: 0) {
204
204
  id
205
205
  name
206
206
  totalQuestions
@@ -1,6 +1,5 @@
1
1
  import { ETopicType, Id, ITopic, ITopicStats } from '../../../models';
2
2
  import { graphqlNormalize, RestrictedData } from '../../types';
3
- import { ESortOrder } from '../../enums';
4
3
  export interface ITopicStatsVar {
5
4
  typeId?: ETopicType[];
6
5
  }
@@ -13,7 +12,6 @@ export type ITopicData = RestrictedData<graphqlNormalize & ITopic, 'topic'>;
13
12
  export declare const TOPIC: import("@apollo/client").DocumentNode;
14
13
  export interface ITopicsVar {
15
14
  filter: ETopicType;
16
- order?: ESortOrder;
17
15
  }
18
16
  export type ITopicsData = RestrictedData<(graphqlNormalize & ITopic)[], 'topics'>;
19
17
  export declare const TOPICS: import("@apollo/client").DocumentNode;
@@ -54,11 +54,10 @@ exports.TOPIC = (0, client_1.gql) `
54
54
  }
55
55
  }
56
56
  `;
57
- // TODO: rename filter->typeId
58
57
  exports.TOPICS = (0, client_1.gql) `
59
- query Topics($filter: Int!, $order: Int) {
58
+ query Topics($filter: Int!) {
60
59
  restricted {
61
- topics(filter: $filter, order: $order) {
60
+ topics(filter: $filter) {
62
61
  id
63
62
  name
64
63
  totalQuestions
@@ -5,6 +5,7 @@ export type IUserVar = {
5
5
  };
6
6
  export type IUserData = RestrictedData<graphqlNormalize & IUser, 'user'>;
7
7
  export declare const USER: import("@apollo/client").DocumentNode;
8
+ export declare const GET_USER_SUBSCRIPTIONS: import("@apollo/client").DocumentNode;
8
9
  export declare const REFERRALS: import("@apollo/client").DocumentNode;
9
10
  export declare const USER_COMPLETED_DATA: import("@apollo/client").DocumentNode;
10
11
  export type IDailyFeedVar = null;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DAILY_FEED = exports.USER_COMPLETED_DATA = exports.REFERRALS = exports.USER = void 0;
3
+ exports.DAILY_FEED = exports.USER_COMPLETED_DATA = exports.REFERRALS = exports.GET_USER_SUBSCRIPTIONS = exports.USER = void 0;
4
4
  const client_1 = require("@apollo/client");
5
5
  const fragments_1 = require("../../fragments");
6
6
  const user_1 = require("../../fragments/user");
@@ -14,6 +14,27 @@ exports.USER = (0, client_1.gql) `
14
14
  }
15
15
  }
16
16
  `;
17
+ exports.GET_USER_SUBSCRIPTIONS = (0, client_1.gql) `
18
+ query User($active: Boolean) {
19
+ restricted {
20
+ user {
21
+ subscriptions(active: $active) {
22
+ id
23
+ productId
24
+ periodEndAt
25
+ product {
26
+ id
27
+ name
28
+ typeId
29
+ duration
30
+ price
31
+ stripePriceId
32
+ }
33
+ }
34
+ }
35
+ }
36
+ }
37
+ `;
17
38
  exports.REFERRALS = (0, client_1.gql) `
18
39
  query Referrals {
19
40
  restricted {
@@ -1,9 +1,8 @@
1
1
  import { Id, IUniversity } from '../../models';
2
2
  import { graphqlNormalize, RootData } from '../types';
3
- import { ESortOrder } from '../enums';
4
3
  export interface IUniversitiesVar {
5
4
  id?: Id;
6
- order?: ESortOrder;
5
+ order?: string;
7
6
  }
8
7
  export type IUniversitiesData = RootData<graphqlNormalize & IUniversity[], 'universities'>;
9
8
  export declare const UNIVERSITIES: import("@apollo/client").DocumentNode;
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.UNIVERSITIES = void 0;
4
4
  const client_1 = require("@apollo/client");
5
5
  exports.UNIVERSITIES = (0, client_1.gql) `
6
- query universities($id: Int, $order: Int) {
6
+ query universities($id: Int, $order: String) {
7
7
  universities(id: $id, order: $order) {
8
8
  name
9
9
  id
@@ -9,13 +9,7 @@ import { ITodo } from './Todo';
9
9
  import { Id } from './Type';
10
10
  import { IUniversity } from './University';
11
11
  import { IVideo } from './Video';
12
- export declare enum IAccessLevel {
13
- SUBSCRIBER = "subscriber",
14
- ADMINISTRATOR = "administrator",
15
- TUTOR = "tutor",
16
- DEMO = "demo",
17
- EXPIRED = "expired"
18
- }
12
+ export type IAccessLevel = 'subscriber' | 'administrator' | 'tutor';
19
13
  export type IClassYear = 'Year 1' | 'Year 2' | 'Year 3' | 'Year 4' | 'Year 5' | 'Graduated' | 'PhD' | 'BSc' | 'MSc' | 'Beta Tester';
20
14
  export declare const classYears: IClassYear[];
21
15
  export declare enum EClassYearGroup {
@@ -1,12 +1,4 @@
1
1
  import { DateTime } from 'luxon';
2
- export var IAccessLevel;
3
- (function (IAccessLevel) {
4
- IAccessLevel["SUBSCRIBER"] = "subscriber";
5
- IAccessLevel["ADMINISTRATOR"] = "administrator";
6
- IAccessLevel["TUTOR"] = "tutor";
7
- IAccessLevel["DEMO"] = "demo";
8
- IAccessLevel["EXPIRED"] = "expired";
9
- })(IAccessLevel || (IAccessLevel = {}));
10
2
  export const classYears = [
11
3
  'Year 1',
12
4
  'Year 2',
@@ -4,7 +4,6 @@ import * as query from './query';
4
4
  import * as subscription from './subscription';
5
5
  export * from './apollo';
6
6
  export * from './types';
7
- export * from './enums';
8
7
  export declare namespace Resolvers {
9
8
  export import Fragment = fragment;
10
9
  export import Muation = mutation;
@@ -4,7 +4,6 @@ import * as query from './query';
4
4
  import * as subscription from './subscription';
5
5
  export * from './apollo';
6
6
  export * from './types';
7
- export * from './enums';
8
7
  export var Resolvers;
9
8
  (function (Resolvers) {
10
9
  Resolvers.Fragment = fragment;
@@ -11,20 +11,10 @@ export const DUPLICATE_PRESET = gql `
11
11
  restricted {
12
12
  duplicatePreset(presetId: $presetId) {
13
13
  id
14
- createdAt
15
- updatedAt
14
+ userId
16
15
  name
17
- likes
18
16
  topicType
19
- total
20
- correct
21
- incorrect
22
- userId
23
- university {
24
- id
25
- name
26
- country
27
- }
17
+ likes
28
18
  topics {
29
19
  id
30
20
  name
@@ -42,20 +32,10 @@ export const EDIT_PRESET = gql `
42
32
  restricted {
43
33
  editPreset(presetId: $presetId, data: $data) {
44
34
  id
45
- createdAt
46
- updatedAt
35
+ userId
47
36
  name
48
- likes
49
37
  topicType
50
- total
51
- correct
52
- incorrect
53
- userId
54
- university {
55
- id
56
- name
57
- country
58
- }
38
+ likes
59
39
  topics {
60
40
  id
61
41
  name
@@ -74,19 +54,10 @@ export const CREATE_PRESET = gql `
74
54
  createPreset(data: $data) {
75
55
  id
76
56
  createdAt
77
- updatedAt
57
+ userId
78
58
  name
79
- likes
80
59
  topicType
81
- total
82
- correct
83
- incorrect
84
- userId
85
- university {
86
- id
87
- name
88
- country
89
- }
60
+ likes
90
61
  topics {
91
62
  id
92
63
  name
@@ -1,7 +1,6 @@
1
1
  import { EDifficultyType, Id, IMarksheet, IUserFlaggedQuestion } from '../../../models';
2
2
  import { IPreBuildMarksheet } from '../../mutation/restricted';
3
3
  import { graphqlNormalize, RestrictedData } from '../../types';
4
- import { ESortOrder } from '../../enums';
5
4
  export interface IMarksheetVar {
6
5
  id: Id;
7
6
  }
@@ -10,7 +9,7 @@ export declare const MARKSHEET: import("@apollo/client").DocumentNode;
10
9
  export interface IMarksheetsVar {
11
10
  filter: {
12
11
  limit: number;
13
- order?: ESortOrder;
12
+ date?: string;
14
13
  offset?: number;
15
14
  solo?: boolean;
16
15
  period?: number;
@@ -19,7 +18,7 @@ export interface IMarksheetsVar {
19
18
  export interface IMarksheetsWindowVar {
20
19
  filter: {
21
20
  limit: number;
22
- order?: ESortOrder;
21
+ order?: string;
23
22
  updatedAt?: Date | number;
24
23
  solo?: boolean;
25
24
  period?: number;
@@ -30,15 +29,11 @@ export type IMarksheetsData = RestrictedData<{
30
29
  total: number;
31
30
  score: number;
32
31
  }, 'marksheets'>;
33
- export interface IMarksheetsDashboardData {
32
+ export type IMarksheetsWindowData = RestrictedData<{
33
+ results: (graphqlNormalize & IMarksheet)[];
34
34
  total: number;
35
35
  score: number;
36
- results: Array<{
37
- date: Date | number;
38
- result: IMarksheet[];
39
- }>;
40
- }
41
- export type IMarksheetsWindowData = RestrictedData<graphqlNormalize & IMarksheetsDashboardData, 'marksheetsWindow'>;
36
+ }, 'marksheetsWindow'>;
42
37
  export interface PaginatedMarksheets {
43
38
  results: (graphqlNormalize & IMarksheet)[];
44
39
  total: number;
@@ -1019,20 +1019,17 @@ export const MARKSHEETS_WINDOW = gql `
1019
1019
  restricted {
1020
1020
  marksheetsWindow(filter: $filter) {
1021
1021
  results {
1022
- date
1023
- result {
1024
- id
1025
- endedAt
1026
- topicNames
1027
- correct
1028
- incorrect
1029
- totalQuestions
1030
- typeId
1031
- isTestMarksheet
1032
- solo
1033
- completed
1034
- updatedAt
1035
- }
1022
+ id
1023
+ endedAt
1024
+ topicNames
1025
+ correct
1026
+ incorrect
1027
+ totalQuestions
1028
+ typeId
1029
+ isTestMarksheet
1030
+ solo
1031
+ completed
1032
+ updatedAt
1036
1033
  }
1037
1034
  total
1038
1035
  score
@@ -1,7 +1,6 @@
1
1
  import { EDifficultyType, EOsceType, Id, IDashboardOsce, IOsceMarksheet, IOsceStation, IOsceStats } from '../../../models';
2
2
  import { graphqlNormalize, RestrictedData } from '../../types';
3
3
  import { ITopic } from './../../../models/Topic';
4
- import { ESortOrder } from '../../enums';
5
4
  export interface IOsceStatsVar {
6
5
  typeId?: EOsceType[];
7
6
  solo: boolean;
@@ -11,7 +10,6 @@ export declare const OSCE_STATS: import("@apollo/client").DocumentNode;
11
10
  export declare const DASHBOARD_OSCE: import("@apollo/client").DocumentNode;
12
11
  export interface IDashboardOsceVar {
13
12
  solo: boolean;
14
- order?: ESortOrder;
15
13
  }
16
14
  export type IDashboardOsceData = RestrictedData<graphqlNormalize & IDashboardOsce, 'dashboardOsce'>;
17
15
  export declare const OSCE_MARKSHEETS: import("@apollo/client").DocumentNode;
@@ -23,7 +21,7 @@ export type IOsceMarksheetsData = RestrictedData<(graphqlNormalize & IOsceMarksh
23
21
  export interface IOsceMarksheetsWindowVar {
24
22
  filter: {
25
23
  limit: number;
26
- order?: ESortOrder;
24
+ order?: string;
27
25
  updatedAt?: Date | number;
28
26
  solo?: boolean;
29
27
  period?: number;
@@ -33,10 +31,7 @@ export declare const OSCE_MARKSHEET_WINDOW: import("@apollo/client").DocumentNod
33
31
  export interface IOsceMarksheetsDashboardData {
34
32
  total: number;
35
33
  score: number;
36
- results: Array<{
37
- date: Date | number;
38
- result: IOsceMarksheet[];
39
- }>;
34
+ results: IOsceMarksheet[];
40
35
  }
41
36
  export type IOsceMarksheetsWindowData = RestrictedData<graphqlNormalize & IOsceMarksheetsDashboardData, 'osceMarksheetsWindow'>;
42
37
  export declare const OSCE_MARKSHEET: import("@apollo/client").DocumentNode;
@@ -20,9 +20,9 @@ export const OSCE_STATS = gql `
20
20
  }
21
21
  `;
22
22
  export const DASHBOARD_OSCE = gql `
23
- query DashboardOsce($solo: Boolean!, $order: Int) {
23
+ query DashboardOsce($solo: Boolean!) {
24
24
  restricted {
25
- dashboardOsce(solo: $solo, order: $order) {
25
+ dashboardOsce(solo: $solo) {
26
26
  lastSessionId
27
27
  types {
28
28
  id
@@ -60,15 +60,12 @@ export const OSCE_MARKSHEET_WINDOW = gql `
60
60
  restricted {
61
61
  osceMarksheetsWindow(filter: $filter) {
62
62
  results {
63
- date
64
- result {
65
- ...OsceMarksheetFields
66
- correct
67
- total
68
- osceStation {
69
- ...OsceStationFields
70
- __typename
71
- }
63
+ ...OsceMarksheetFields
64
+ correct
65
+ total
66
+ osceStation {
67
+ ...OsceStationFields
68
+ __typename
72
69
  }
73
70
  }
74
71
  score
@@ -122,7 +122,7 @@ export const DASHBOARD_QBANK = gql `
122
122
  `;
123
123
  export const DASHBOARD = gql `
124
124
  ${PICTURE_FIELDS}
125
- query Dashboard($filter: MarksheetFilterInput!, $order: Int) {
125
+ query Dashboard($filter: MarksheetFilterInput!) {
126
126
  restricted {
127
127
  latestPastMarksheetId
128
128
  latestSessionId
@@ -197,7 +197,7 @@ export const DASHBOARD = gql `
197
197
  }
198
198
  total
199
199
  }
200
- topics(filter: 0, order: $order) {
200
+ topics(filter: 0) {
201
201
  id
202
202
  name
203
203
  totalQuestions
@@ -1,6 +1,5 @@
1
1
  import { ETopicType, Id, ITopic, ITopicStats } from '../../../models';
2
2
  import { graphqlNormalize, RestrictedData } from '../../types';
3
- import { ESortOrder } from '../../enums';
4
3
  export interface ITopicStatsVar {
5
4
  typeId?: ETopicType[];
6
5
  }
@@ -13,7 +12,6 @@ export type ITopicData = RestrictedData<graphqlNormalize & ITopic, 'topic'>;
13
12
  export declare const TOPIC: import("@apollo/client").DocumentNode;
14
13
  export interface ITopicsVar {
15
14
  filter: ETopicType;
16
- order?: ESortOrder;
17
15
  }
18
16
  export type ITopicsData = RestrictedData<(graphqlNormalize & ITopic)[], 'topics'>;
19
17
  export declare const TOPICS: import("@apollo/client").DocumentNode;
@@ -51,11 +51,10 @@ export const TOPIC = gql `
51
51
  }
52
52
  }
53
53
  `;
54
- // TODO: rename filter->typeId
55
54
  export const TOPICS = gql `
56
- query Topics($filter: Int!, $order: Int) {
55
+ query Topics($filter: Int!) {
57
56
  restricted {
58
- topics(filter: $filter, order: $order) {
57
+ topics(filter: $filter) {
59
58
  id
60
59
  name
61
60
  totalQuestions
@@ -5,6 +5,7 @@ export type IUserVar = {
5
5
  };
6
6
  export type IUserData = RestrictedData<graphqlNormalize & IUser, 'user'>;
7
7
  export declare const USER: import("@apollo/client").DocumentNode;
8
+ export declare const GET_USER_SUBSCRIPTIONS: import("@apollo/client").DocumentNode;
8
9
  export declare const REFERRALS: import("@apollo/client").DocumentNode;
9
10
  export declare const USER_COMPLETED_DATA: import("@apollo/client").DocumentNode;
10
11
  export type IDailyFeedVar = null;
@@ -11,6 +11,27 @@ export const USER = gql `
11
11
  }
12
12
  }
13
13
  `;
14
+ export const GET_USER_SUBSCRIPTIONS = gql `
15
+ query User($active: Boolean) {
16
+ restricted {
17
+ user {
18
+ subscriptions(active: $active) {
19
+ id
20
+ productId
21
+ periodEndAt
22
+ product {
23
+ id
24
+ name
25
+ typeId
26
+ duration
27
+ price
28
+ stripePriceId
29
+ }
30
+ }
31
+ }
32
+ }
33
+ }
34
+ `;
14
35
  export const REFERRALS = gql `
15
36
  query Referrals {
16
37
  restricted {
@@ -1,9 +1,8 @@
1
1
  import { Id, IUniversity } from '../../models';
2
2
  import { graphqlNormalize, RootData } from '../types';
3
- import { ESortOrder } from '../enums';
4
3
  export interface IUniversitiesVar {
5
4
  id?: Id;
6
- order?: ESortOrder;
5
+ order?: string;
7
6
  }
8
7
  export type IUniversitiesData = RootData<graphqlNormalize & IUniversity[], 'universities'>;
9
8
  export declare const UNIVERSITIES: import("@apollo/client").DocumentNode;
@@ -1,6 +1,6 @@
1
1
  import { gql } from '@apollo/client';
2
2
  export const UNIVERSITIES = gql `
3
- query universities($id: Int, $order: Int) {
3
+ query universities($id: Int, $order: String) {
4
4
  universities(id: $id, order: $order) {
5
5
  name
6
6
  id
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quesmed/types",
3
- "version": "2.5.75",
3
+ "version": "2.5.76",
4
4
  "description": "Typescript types for Quesmed",
5
5
  "keywords": [
6
6
  "quesmed",
@@ -1,4 +0,0 @@
1
- export declare enum ESortOrder {
2
- ASC = 1,
3
- DESC = 0
4
- }
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ESortOrder = void 0;
4
- var ESortOrder;
5
- (function (ESortOrder) {
6
- ESortOrder[ESortOrder["ASC"] = 1] = "ASC";
7
- ESortOrder[ESortOrder["DESC"] = 0] = "DESC";
8
- })(ESortOrder = exports.ESortOrder || (exports.ESortOrder = {}));
@@ -1,4 +0,0 @@
1
- export declare enum ESortOrder {
2
- ASC = 1,
3
- DESC = 0
4
- }
@@ -1,5 +0,0 @@
1
- export var ESortOrder;
2
- (function (ESortOrder) {
3
- ESortOrder[ESortOrder["ASC"] = 1] = "ASC";
4
- ESortOrder[ESortOrder["DESC"] = 0] = "DESC";
5
- })(ESortOrder || (ESortOrder = {}));