@quesmed/types-rn 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.
package/models/User.d.ts CHANGED
@@ -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 {
package/models/User.js CHANGED
@@ -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',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quesmed/types-rn",
3
- "version": "2.5.75",
3
+ "version": "2.5.76",
4
4
  "description": "Typescript types for Quesmed",
5
5
  "keywords": [
6
6
  "quesmed",
@@ -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
@@ -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 = {}));