@quesmed/types 2.6.152 → 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.
@@ -1,4 +1,4 @@
1
- import { IQuestion, IQuestionCase, IQuestionChoice, IQuestionEntitlement, Id } from '../../../models';
1
+ import { EEntitlementType, IQuestion, IQuestionCase, IQuestionChoice, Id } from '../../../models';
2
2
  import { AdminData, graphqlNormalize } from '../../types';
3
3
  export declare const UPDATE_QUESTION: import("@apollo/client").DocumentNode;
4
4
  export interface IUpdateQuestionVar {
@@ -13,7 +13,19 @@ export interface IUpdateQuestionVar {
13
13
  cases?: Partial<IQuestionCase>[];
14
14
  explanation?: string;
15
15
  learningPoint?: string;
16
- entitlements?: Partial<IQuestionEntitlement>[];
16
+ entitlements?: EEntitlementType[];
17
17
  createRevision?: boolean;
18
18
  }
19
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'>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UPDATE_QUESTION = void 0;
3
+ exports.MANAGE_QUESTION_COMMENT = exports.RESET_QUESTION = exports.UPDATE_QUESTION = void 0;
4
4
  const client_1 = require("@apollo/client");
5
5
  exports.UPDATE_QUESTION = (0, client_1.gql) `
6
6
  mutation updateQuestion($input: UpdateQuestionInput!) {
@@ -11,3 +11,17 @@ exports.UPDATE_QUESTION = (0, client_1.gql) `
11
11
  }
12
12
  }
13
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
+ `;
@@ -28,6 +28,9 @@ exports.ADMIN_QUESTION = (0, client_1.gql) `
28
28
  createdAt
29
29
  updatedAt
30
30
  typeId
31
+ likes
32
+ dislikes
33
+ totalVotes
31
34
  entitlements {
32
35
  id
33
36
  entitlementId
@@ -75,6 +78,8 @@ exports.ADMIN_QUESTION = (0, client_1.gql) `
75
78
  explanation
76
79
  label
77
80
  answer
81
+ votes
82
+ updatedAt
78
83
  }
79
84
  topic {
80
85
  id
@@ -1,4 +1,4 @@
1
- import { IQuestion, IQuestionCase, IQuestionChoice, IQuestionEntitlement, Id } from '../../../models';
1
+ import { EEntitlementType, IQuestion, IQuestionCase, IQuestionChoice, Id } from '../../../models';
2
2
  import { AdminData, graphqlNormalize } from '../../types';
3
3
  export declare const UPDATE_QUESTION: import("@apollo/client").DocumentNode;
4
4
  export interface IUpdateQuestionVar {
@@ -13,7 +13,19 @@ export interface IUpdateQuestionVar {
13
13
  cases?: Partial<IQuestionCase>[];
14
14
  explanation?: string;
15
15
  learningPoint?: string;
16
- entitlements?: Partial<IQuestionEntitlement>[];
16
+ entitlements?: EEntitlementType[];
17
17
  createRevision?: boolean;
18
18
  }
19
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'>;
@@ -8,3 +8,17 @@ export const UPDATE_QUESTION = gql `
8
8
  }
9
9
  }
10
10
  `;
11
+ export const RESET_QUESTION = gql `
12
+ mutation ResetQuestion($ids: [ID!]!, $operation: String!) {
13
+ admin {
14
+ resetQuestion(ids: $ids, operation: $operation)
15
+ }
16
+ }
17
+ `;
18
+ export const MANAGE_QUESTION_COMMENT = gql `
19
+ mutation ManageQuestionComment($id: ID!, $operation: String!) {
20
+ admin {
21
+ manageQuestionComment(id: $id, operation: $operation)
22
+ }
23
+ }
24
+ `;
@@ -25,6 +25,9 @@ export const ADMIN_QUESTION = gql `
25
25
  createdAt
26
26
  updatedAt
27
27
  typeId
28
+ likes
29
+ dislikes
30
+ totalVotes
28
31
  entitlements {
29
32
  id
30
33
  entitlementId
@@ -72,6 +75,8 @@ export const ADMIN_QUESTION = gql `
72
75
  explanation
73
76
  label
74
77
  answer
78
+ votes
79
+ updatedAt
75
80
  }
76
81
  topic {
77
82
  id
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quesmed/types",
3
- "version": "2.6.152",
3
+ "version": "2.6.153",
4
4
  "description": "Typescript types for Quesmed",
5
5
  "keywords": [
6
6
  "quesmed",