@quesmed/types 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;
@@ -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
+ `;
@@ -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;
@@ -1,72 +1,72 @@
1
1
  import { gql } from '@apollo/client';
2
- export const DELETE_PRESET = gql `
3
- mutation DeletePreset($presetId: Int!) {
4
- restricted {
5
- deletePreset(presetId: $presetId)
6
- }
7
- }
2
+ export const DELETE_PRESET = gql `
3
+ mutation DeletePreset($presetId: Int!) {
4
+ restricted {
5
+ deletePreset(presetId: $presetId)
6
+ }
7
+ }
8
8
  `;
9
- export const DUPLICATE_PRESET = gql `
10
- mutation DuplicatePreset($presetId: Int!) {
11
- restricted {
12
- duplicatePreset(presetId: $presetId) {
13
- id
14
- userId
15
- name
16
- topicType
17
- likes
18
- topics {
19
- id
20
- name
21
- concepts {
22
- id
23
- name
24
- }
25
- }
26
- }
27
- }
28
- }
9
+ export const DUPLICATE_PRESET = gql `
10
+ mutation DuplicatePreset($presetId: Int!) {
11
+ restricted {
12
+ duplicatePreset(presetId: $presetId) {
13
+ id
14
+ userId
15
+ name
16
+ topicType
17
+ likes
18
+ topics {
19
+ id
20
+ name
21
+ concepts {
22
+ id
23
+ name
24
+ }
25
+ }
26
+ }
27
+ }
28
+ }
29
29
  `;
30
- export const EDIT_PRESET = gql `
31
- mutation EditPreset($presetId: Int!, $data: EditPresetInput!) {
32
- restricted {
33
- editPreset(presetId: $presetId, data: $data) {
34
- id
35
- userId
36
- name
37
- topicType
38
- likes
39
- topics {
40
- id
41
- name
42
- concepts {
43
- id
44
- name
45
- }
46
- }
47
- }
48
- }
49
- }
30
+ export const EDIT_PRESET = gql `
31
+ mutation EditPreset($presetId: Int!, $data: EditPresetInput!) {
32
+ restricted {
33
+ editPreset(presetId: $presetId, data: $data) {
34
+ id
35
+ userId
36
+ name
37
+ topicType
38
+ likes
39
+ topics {
40
+ id
41
+ name
42
+ concepts {
43
+ id
44
+ name
45
+ }
46
+ }
47
+ }
48
+ }
49
+ }
50
50
  `;
51
- export const CREATE_PRESET = gql `
52
- mutation CreatePreset($data: CreatePresetInput!) {
53
- restricted {
54
- createPreset(data: $data) {
55
- id
56
- createdAt
57
- userId
58
- name
59
- topicType
60
- likes
61
- topics {
62
- id
63
- name
64
- concepts {
65
- id
66
- name
67
- }
68
- }
69
- }
70
- }
71
- }
51
+ export const CREATE_PRESET = gql `
52
+ mutation CreatePreset($data: CreatePresetInput!) {
53
+ restricted {
54
+ createPreset(data: $data) {
55
+ id
56
+ createdAt
57
+ userId
58
+ name
59
+ topicType
60
+ likes
61
+ topics {
62
+ id
63
+ name
64
+ concepts {
65
+ id
66
+ name
67
+ }
68
+ }
69
+ }
70
+ }
71
+ }
72
72
  `;
@@ -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';
@@ -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';
@@ -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,37 @@
1
+ import { gql } from '@apollo/client';
2
+ export const PRESETS = gql `
3
+ query Presets($userId: Int, $search: String, $timestamp: Int, $limit: Int) {
4
+ restricted {
5
+ presets(
6
+ userId: $userId
7
+ search: $search
8
+ timestamp: $timestamp
9
+ limit: $limit
10
+ ) {
11
+ id
12
+ createdAt
13
+ updatedAt
14
+ name
15
+ likes
16
+ topicType
17
+ total
18
+ correct
19
+ incorrect
20
+ userId
21
+ university {
22
+ id
23
+ name
24
+ country
25
+ }
26
+ topics {
27
+ id
28
+ name
29
+ concepts {
30
+ id
31
+ name
32
+ }
33
+ }
34
+ }
35
+ }
36
+ }
37
+ `;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quesmed/types",
3
- "version": "2.5.59",
3
+ "version": "2.5.60",
4
4
  "description": "Typescript types for Quesmed",
5
5
  "keywords": [
6
6
  "quesmed",