@quesmed/types-rn 2.6.151 → 2.6.153

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quesmed/types-rn",
3
- "version": "2.6.151",
3
+ "version": "2.6.153",
4
4
  "description": "Typescript types for Quesmed",
5
5
  "keywords": [
6
6
  "quesmed",
@@ -2,4 +2,5 @@ export * from './algoliaSync';
2
2
  export * from './content';
3
3
  export * from './database';
4
4
  export * from './notification';
5
+ export * from './question';
5
6
  export * from './token';
@@ -18,4 +18,5 @@ __exportStar(require("./algoliaSync"), exports);
18
18
  __exportStar(require("./content"), exports);
19
19
  __exportStar(require("./database"), exports);
20
20
  __exportStar(require("./notification"), exports);
21
+ __exportStar(require("./question"), exports);
21
22
  __exportStar(require("./token"), exports);
@@ -0,0 +1,31 @@
1
+ import { EEntitlementType, IQuestion, IQuestionCase, IQuestionChoice, Id } from '../../../models';
2
+ import { AdminData, graphqlNormalize } from '../../types';
3
+ export declare const UPDATE_QUESTION: import("@apollo/client").DocumentNode;
4
+ export interface IUpdateQuestionVar {
5
+ id: Id;
6
+ public?: boolean;
7
+ question?: string;
8
+ conceptId?: number;
9
+ difficulty?: number;
10
+ typeId?: number;
11
+ answer?: string;
12
+ choices?: Partial<IQuestionChoice>[];
13
+ cases?: Partial<IQuestionCase>[];
14
+ explanation?: string;
15
+ learningPoint?: string;
16
+ entitlements?: EEntitlementType[];
17
+ createRevision?: boolean;
18
+ }
19
+ export type IUpdateQuestionData = AdminData<graphqlNormalize & IQuestion, 'updateQuestion'>;
20
+ export declare const RESET_QUESTION: import("@apollo/client").DocumentNode;
21
+ export interface IResetQuestionVar {
22
+ ids: Id[];
23
+ operation: 'likes' | 'dislikes' | 'votes';
24
+ }
25
+ export type IResetQuestionData = AdminData<graphqlNormalize & boolean, 'resetQuestion'>;
26
+ export declare const MANAGE_QUESTION_COMMENT: import("@apollo/client").DocumentNode;
27
+ export interface IManageQuestionCommentVar {
28
+ id: Id;
29
+ operation: 'hide' | 'delete';
30
+ }
31
+ export type IManageQuestionCommentData = AdminData<graphqlNormalize & boolean, 'manageQuestionComment'>;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MANAGE_QUESTION_COMMENT = exports.RESET_QUESTION = exports.UPDATE_QUESTION = void 0;
4
+ const client_1 = require("@apollo/client");
5
+ exports.UPDATE_QUESTION = (0, client_1.gql) `
6
+ mutation updateQuestion($input: UpdateQuestionInput!) {
7
+ admin {
8
+ updateQuestion(input: $input) {
9
+ id
10
+ }
11
+ }
12
+ }
13
+ `;
14
+ exports.RESET_QUESTION = (0, client_1.gql) `
15
+ mutation ResetQuestion($ids: [ID!]!, $operation: String!) {
16
+ admin {
17
+ resetQuestion(ids: $ids, operation: $operation)
18
+ }
19
+ }
20
+ `;
21
+ exports.MANAGE_QUESTION_COMMENT = (0, client_1.gql) `
22
+ mutation ManageQuestionComment($id: ID!, $operation: String!) {
23
+ admin {
24
+ manageQuestionComment(id: $id, operation: $operation)
25
+ }
26
+ }
27
+ `;
@@ -1,3 +1,4 @@
1
1
  export * from './dashboard';
2
2
  export * from './database';
3
3
  export * from './getUserToken';
4
+ export * from './question';
@@ -17,3 +17,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./dashboard"), exports);
18
18
  __exportStar(require("./database"), exports);
19
19
  __exportStar(require("./getUserToken"), exports);
20
+ __exportStar(require("./question"), exports);
@@ -0,0 +1,7 @@
1
+ import { IQuestion, Id } from '../../../models';
2
+ import { AdminData, graphqlNormalize } from '../../types';
3
+ export declare const ADMIN_QUESTION: import("@apollo/client").DocumentNode;
4
+ export interface IAdminQuestionVar {
5
+ id: Id;
6
+ }
7
+ export type IAdminQuestionData = AdminData<graphqlNormalize & IQuestion, 'question'>;
@@ -0,0 +1,96 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ADMIN_QUESTION = void 0;
4
+ const client_1 = require("@apollo/client");
5
+ const fragments_1 = require("../../fragments");
6
+ exports.ADMIN_QUESTION = (0, client_1.gql) `
7
+ ${fragments_1.QUESTION_COMMENT_FIELDS}
8
+ ${fragments_1.PICTURE_FIELDS}
9
+ query QuestionData($id: Int!) {
10
+ admin {
11
+ question(id: $id) {
12
+ ... on QuestionEMQ {
13
+ cases {
14
+ id
15
+ questionId
16
+ case
17
+ explanation
18
+ label
19
+ }
20
+ }
21
+ id
22
+ public
23
+ conceptId
24
+ difficulty
25
+ question
26
+ learningPoint
27
+ explanation
28
+ createdAt
29
+ updatedAt
30
+ typeId
31
+ likes
32
+ dislikes
33
+ totalVotes
34
+ entitlements {
35
+ id
36
+ entitlementId
37
+ questionId
38
+ }
39
+ pictures {
40
+ ...PictureFields
41
+ }
42
+ comments {
43
+ ...QuestionCommentFields
44
+ }
45
+ revisions {
46
+ id
47
+ questionId
48
+ createdAt
49
+ updatedAt
50
+ conceptId
51
+ difficulty
52
+ typeId
53
+ question
54
+ explanation
55
+ learningPoint
56
+ answer
57
+ choices {
58
+ id
59
+ name
60
+ explanation
61
+ label
62
+ answer
63
+ votes
64
+ updatedAt
65
+ }
66
+ cases {
67
+ id
68
+ questionId
69
+ case
70
+ explanation
71
+ label
72
+ updatedAt
73
+ }
74
+ }
75
+ choices {
76
+ id
77
+ name
78
+ explanation
79
+ label
80
+ answer
81
+ votes
82
+ updatedAt
83
+ }
84
+ topic {
85
+ id
86
+ name
87
+ }
88
+ concept {
89
+ id
90
+ name
91
+ topicId
92
+ }
93
+ }
94
+ }
95
+ }
96
+ `;
@@ -1,9 +1,7 @@
1
1
  import { Id, IQuestion } from '../../../models';
2
- import { AdminData, graphqlNormalize, RestrictedData } from '../../types';
2
+ import { graphqlNormalize, RestrictedData } from '../../types';
3
3
  export interface IQuestionVar {
4
4
  id: Id;
5
5
  }
6
6
  export type IQuestionData = RestrictedData<graphqlNormalize & IQuestion, 'question'>;
7
7
  export declare const QUESTION: import("@apollo/client").DocumentNode;
8
- export declare const ADMIN_QUESTION: import("@apollo/client").DocumentNode;
9
- export type IAdminQuestionData = AdminData<graphqlNormalize & IQuestion, 'question'>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ADMIN_QUESTION = exports.QUESTION = void 0;
3
+ exports.QUESTION = void 0;
4
4
  const client_1 = require("@apollo/client");
5
5
  const fragments_1 = require("../../fragments");
6
6
  exports.QUESTION = (0, client_1.gql) `
@@ -13,89 +13,3 @@ exports.QUESTION = (0, client_1.gql) `
13
13
  }
14
14
  }
15
15
  `;
16
- exports.ADMIN_QUESTION = (0, client_1.gql) `
17
- ${fragments_1.QUESTION_COMMENT_FIELDS}
18
- ${fragments_1.PICTURE_FIELDS}
19
- query QuestionData($id: Int!) {
20
- admin {
21
- question(id: $id) {
22
- ... on QuestionEMQ {
23
- cases {
24
- id
25
- questionId
26
- case
27
- explanation
28
- label
29
- }
30
- }
31
- id
32
- public
33
- conceptId
34
- difficulty
35
- question
36
- learningPoint
37
- explanation
38
- createdAt
39
- updatedAt
40
- typeId
41
- entitlements {
42
- id
43
- entitlementId
44
- questionId
45
- }
46
- pictures {
47
- ...PictureFields
48
- }
49
- comments {
50
- ...QuestionCommentFields
51
- }
52
- revisions {
53
- id
54
- questionId
55
- createdAt
56
- updatedAt
57
- conceptId
58
- difficulty
59
- typeId
60
- question
61
- explanation
62
- learningPoint
63
- answer
64
- choices {
65
- id
66
- name
67
- explanation
68
- label
69
- answer
70
- votes
71
- updatedAt
72
- }
73
- cases {
74
- id
75
- questionId
76
- case
77
- explanation
78
- label
79
- updatedAt
80
- }
81
- }
82
- choices {
83
- id
84
- name
85
- explanation
86
- label
87
- answer
88
- }
89
- topic {
90
- id
91
- name
92
- }
93
- concept {
94
- id
95
- name
96
- topicId
97
- }
98
- }
99
- }
100
- }
101
- `;