@quesmed/types-rn 2.5.58 → 2.5.59

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,24 @@
1
- import { ETopicType } from "./Topic";
2
- import { Id } from "./Type";
1
+ import { ETopicType } from './Topic';
2
+ import { Id } from './Type';
3
+ import { IUniversity } from './University';
4
+ export interface IPresetTopic {
5
+ id: Id;
6
+ name: string;
7
+ concepts: Id[];
8
+ }
3
9
  export interface IPreset {
4
10
  id: Id;
11
+ createdAt: number | Date;
12
+ updatedAt: number | Date;
5
13
  userId: Id;
6
14
  name: string;
7
15
  topicType: ETopicType;
8
16
  likes: number;
17
+ university: IUniversity;
18
+ total: number;
19
+ correct: number;
20
+ incorrect: number;
21
+ topics: IPresetTopic[];
9
22
  }
10
23
  export interface IPresetConcepts {
11
24
  id: Id;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quesmed/types-rn",
3
- "version": "2.5.58",
3
+ "version": "2.5.59",
4
4
  "description": "Typescript types for Quesmed",
5
5
  "keywords": [
6
6
  "quesmed",
@@ -1,6 +1,6 @@
1
- import { RestrictedData } from "../../types";
2
- import { IPreset } from "../../../models/Preset";
3
- import { ETopicType } from "../../../models";
1
+ import { ETopicType, Id } from '../../../models';
2
+ import { IPreset } from '../../../models/Preset';
3
+ import { RestrictedData } from '../../types';
4
4
  export declare const DELETE_PRESET: import("@apollo/client").DocumentNode;
5
5
  export type IDeletePresetData = RestrictedData<boolean, 'deletePreset'>;
6
6
  export interface IDeletePresetVar {
@@ -18,6 +18,13 @@ export interface IEditPresetVar {
18
18
  data: {
19
19
  name?: string;
20
20
  topicType?: ETopicType;
21
- conceptIds?: number[];
21
+ conceptIds?: Id[];
22
22
  };
23
23
  }
24
+ export declare const CREATE_PRESET: import("@apollo/client").DocumentNode;
25
+ export type ICreatePresetData = RestrictedData<IPreset, 'createPreset'>;
26
+ export interface ICreatePresetVar {
27
+ name: string;
28
+ topicType: ETopicType;
29
+ conceptIds: Id[];
30
+ }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EDIT_PRESET = exports.DUPLICATE_PRESET = exports.DELETE_PRESET = void 0;
3
+ exports.CREATE_PRESET = exports.EDIT_PRESET = exports.DUPLICATE_PRESET = exports.DELETE_PRESET = void 0;
4
4
  const client_1 = require("@apollo/client");
5
5
  exports.DELETE_PRESET = (0, client_1.gql) `
6
6
  mutation DeletePreset($presetId: Int!) {
@@ -18,6 +18,14 @@ exports.DUPLICATE_PRESET = (0, client_1.gql) `
18
18
  name
19
19
  topicType
20
20
  likes
21
+ topics {
22
+ id
23
+ name
24
+ concepts {
25
+ id
26
+ name
27
+ }
28
+ }
21
29
  }
22
30
  }
23
31
  }
@@ -31,6 +39,36 @@ exports.EDIT_PRESET = (0, client_1.gql) `
31
39
  name
32
40
  topicType
33
41
  likes
42
+ topics {
43
+ id
44
+ name
45
+ concepts {
46
+ id
47
+ name
48
+ }
49
+ }
50
+ }
51
+ }
52
+ }
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
+ }
34
72
  }
35
73
  }
36
74
  }