@quesmed/types-rn 2.5.59 → 2.5.60

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.
@@ -1,11 +1,6 @@
1
- import { ETopicType } from './Topic';
1
+ import { ETopicType, ITopic } from './Topic';
2
2
  import { Id } from './Type';
3
3
  import { IUniversity } from './University';
4
- export interface IPresetTopic {
5
- id: Id;
6
- name: string;
7
- concepts: Id[];
8
- }
9
4
  export interface IPreset {
10
5
  id: Id;
11
6
  createdAt: number | Date;
@@ -14,11 +9,11 @@ export interface IPreset {
14
9
  name: string;
15
10
  topicType: ETopicType;
16
11
  likes: number;
17
- university: IUniversity;
18
12
  total: number;
19
13
  correct: number;
20
14
  incorrect: number;
21
- topics: IPresetTopic[];
15
+ university: IUniversity;
16
+ topics: ITopic[];
22
17
  }
23
18
  export interface IPresetConcepts {
24
19
  id: Id;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quesmed/types-rn",
3
- "version": "2.5.59",
3
+ "version": "2.5.60",
4
4
  "description": "Typescript types for Quesmed",
5
5
  "keywords": [
6
6
  "quesmed",
@@ -2,74 +2,74 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CREATE_PRESET = exports.EDIT_PRESET = exports.DUPLICATE_PRESET = exports.DELETE_PRESET = void 0;
4
4
  const client_1 = require("@apollo/client");
5
- exports.DELETE_PRESET = (0, client_1.gql) `
6
- mutation DeletePreset($presetId: Int!) {
7
- restricted {
8
- deletePreset(presetId: $presetId)
9
- }
10
- }
5
+ exports.DELETE_PRESET = (0, client_1.gql) `
6
+ mutation DeletePreset($presetId: Int!) {
7
+ restricted {
8
+ deletePreset(presetId: $presetId)
9
+ }
10
+ }
11
11
  `;
12
- exports.DUPLICATE_PRESET = (0, client_1.gql) `
13
- mutation DuplicatePreset($presetId: Int!) {
14
- restricted {
15
- duplicatePreset(presetId: $presetId) {
16
- id
17
- userId
18
- name
19
- topicType
20
- likes
21
- topics {
22
- id
23
- name
24
- concepts {
25
- id
26
- name
27
- }
28
- }
29
- }
30
- }
31
- }
12
+ exports.DUPLICATE_PRESET = (0, client_1.gql) `
13
+ mutation DuplicatePreset($presetId: Int!) {
14
+ restricted {
15
+ duplicatePreset(presetId: $presetId) {
16
+ id
17
+ userId
18
+ name
19
+ topicType
20
+ likes
21
+ topics {
22
+ id
23
+ name
24
+ concepts {
25
+ id
26
+ name
27
+ }
28
+ }
29
+ }
30
+ }
31
+ }
32
32
  `;
33
- exports.EDIT_PRESET = (0, client_1.gql) `
34
- mutation EditPreset($presetId: Int!, $data: EditPresetInput!) {
35
- restricted {
36
- editPreset(presetId: $presetId, data: $data) {
37
- id
38
- userId
39
- name
40
- topicType
41
- likes
42
- topics {
43
- id
44
- name
45
- concepts {
46
- id
47
- name
48
- }
49
- }
50
- }
51
- }
52
- }
33
+ exports.EDIT_PRESET = (0, client_1.gql) `
34
+ mutation EditPreset($presetId: Int!, $data: EditPresetInput!) {
35
+ restricted {
36
+ editPreset(presetId: $presetId, data: $data) {
37
+ id
38
+ userId
39
+ name
40
+ topicType
41
+ likes
42
+ topics {
43
+ id
44
+ name
45
+ concepts {
46
+ id
47
+ name
48
+ }
49
+ }
50
+ }
51
+ }
52
+ }
53
53
  `;
54
- exports.CREATE_PRESET = (0, client_1.gql) `
55
- mutation CreatePreset($data: CreatePresetInput!) {
56
- restricted {
57
- createPreset(data: $data) {
58
- id
59
- createdAt
60
- userId
61
- name
62
- topicType
63
- likes
64
- topics {
65
- id
66
- name
67
- concepts {
68
- id
69
- name
70
- }
71
- }
72
- }
73
- }
74
- }
54
+ exports.CREATE_PRESET = (0, client_1.gql) `
55
+ mutation CreatePreset($data: CreatePresetInput!) {
56
+ restricted {
57
+ createPreset(data: $data) {
58
+ id
59
+ createdAt
60
+ userId
61
+ name
62
+ topicType
63
+ likes
64
+ topics {
65
+ id
66
+ name
67
+ concepts {
68
+ id
69
+ name
70
+ }
71
+ }
72
+ }
73
+ }
74
+ }
75
75
  `;
@@ -4,6 +4,7 @@ export * from './marksheet';
4
4
  export * from './mockTests';
5
5
  export * from './notification';
6
6
  export * from './osce';
7
+ export * from './preset';
7
8
  export * from './qBank';
8
9
  export * from './quesBook';
9
10
  export * from './question';
@@ -20,6 +20,7 @@ __exportStar(require("./marksheet"), exports);
20
20
  __exportStar(require("./mockTests"), exports);
21
21
  __exportStar(require("./notification"), exports);
22
22
  __exportStar(require("./osce"), exports);
23
+ __exportStar(require("./preset"), exports);
23
24
  __exportStar(require("./qBank"), exports);
24
25
  __exportStar(require("./quesBook"), exports);
25
26
  __exportStar(require("./question"), exports);
@@ -0,0 +1,10 @@
1
+ import { IPreset, Id } from '../../../models';
2
+ import { RestrictedData } from '../../types';
3
+ export interface IPresetsVar {
4
+ userId: Id;
5
+ search: string;
6
+ timestamp: number;
7
+ limit: number;
8
+ }
9
+ export type IPresetsData = RestrictedData<IPreset, 'presets'>;
10
+ export declare const PRESETS: import("@apollo/client").DocumentNode;
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PRESETS = void 0;
4
+ const client_1 = require("@apollo/client");
5
+ exports.PRESETS = (0, client_1.gql) `
6
+ query Presets($userId: Int, $search: String, $timestamp: Int, $limit: Int) {
7
+ restricted {
8
+ presets(
9
+ userId: $userId
10
+ search: $search
11
+ timestamp: $timestamp
12
+ limit: $limit
13
+ ) {
14
+ id
15
+ createdAt
16
+ updatedAt
17
+ name
18
+ likes
19
+ topicType
20
+ total
21
+ correct
22
+ incorrect
23
+ userId
24
+ university {
25
+ id
26
+ name
27
+ country
28
+ }
29
+ topics {
30
+ id
31
+ name
32
+ concepts {
33
+ id
34
+ name
35
+ }
36
+ }
37
+ }
38
+ }
39
+ }
40
+ `;