@quesmed/types-rn 2.5.58 → 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.
- package/models/Preset.d.ts +10 -2
- package/package.json +1 -1
- package/resolvers/mutation/restricted/preset.d.ts +11 -4
- package/resolvers/mutation/restricted/preset.js +69 -31
- package/resolvers/query/restricted/index.d.ts +1 -0
- package/resolvers/query/restricted/index.js +1 -0
- package/resolvers/query/restricted/preset.d.ts +10 -0
- package/resolvers/query/restricted/preset.js +40 -0
package/models/Preset.d.ts
CHANGED
|
@@ -1,11 +1,19 @@
|
|
|
1
|
-
import { ETopicType } from
|
|
2
|
-
import { Id } from
|
|
1
|
+
import { ETopicType, ITopic } from './Topic';
|
|
2
|
+
import { Id } from './Type';
|
|
3
|
+
import { IUniversity } from './University';
|
|
3
4
|
export interface IPreset {
|
|
4
5
|
id: Id;
|
|
6
|
+
createdAt: number | Date;
|
|
7
|
+
updatedAt: number | Date;
|
|
5
8
|
userId: Id;
|
|
6
9
|
name: string;
|
|
7
10
|
topicType: ETopicType;
|
|
8
11
|
likes: number;
|
|
12
|
+
total: number;
|
|
13
|
+
correct: number;
|
|
14
|
+
incorrect: number;
|
|
15
|
+
university: IUniversity;
|
|
16
|
+
topics: ITopic[];
|
|
9
17
|
}
|
|
10
18
|
export interface IPresetConcepts {
|
|
11
19
|
id: Id;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { IPreset } from
|
|
3
|
-
import {
|
|
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?:
|
|
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,37 +1,75 @@
|
|
|
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
|
-
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
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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
|
+
}
|
|
24
32
|
`;
|
|
25
|
-
exports.EDIT_PRESET = (0, client_1.gql) `
|
|
26
|
-
mutation EditPreset($presetId: Int!, $data: EditPresetInput!) {
|
|
27
|
-
restricted {
|
|
28
|
-
editPreset(presetId: $presetId, data: $data) {
|
|
29
|
-
id
|
|
30
|
-
userId
|
|
31
|
-
name
|
|
32
|
-
topicType
|
|
33
|
-
likes
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
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
|
+
`;
|
|
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
|
+
}
|
|
37
75
|
`;
|
|
@@ -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
|
+
`;
|