@quesmed/types 2.6.152 → 2.6.154

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.
@@ -0,0 +1,22 @@
1
+ import { Id } from '../../../models';
2
+ import { AdminData, graphqlNormalize } from '../../types';
3
+ export interface AISettings {
4
+ maxTokens?: number;
5
+ temperature?: number;
6
+ systemPrompt?: string;
7
+ userPrompt?: string;
8
+ apiKey: string;
9
+ model?: string;
10
+ }
11
+ export interface IHighYieldVar {
12
+ chapterIds: Id[];
13
+ settings: AISettings;
14
+ }
15
+ export type IHighYieldData = AdminData<graphqlNormalize & string, 'highYield'>;
16
+ export declare const HIGH_YIELD: import("@apollo/client").DocumentNode;
17
+ export interface IDownloadBatchVar {
18
+ batchId: string;
19
+ apiKey: string;
20
+ }
21
+ export type IDownloadBatchData = AdminData<graphqlNormalize & string, 'downloadBatch'>;
22
+ export declare const DOWNLOAD_BATCH: import("@apollo/client").DocumentNode;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DOWNLOAD_BATCH = exports.HIGH_YIELD = void 0;
4
+ const client_1 = require("@apollo/client");
5
+ exports.HIGH_YIELD = (0, client_1.gql) `
6
+ mutation HighYield($chapterIds: [Int!]!, $settings: AISettingsInput!) {
7
+ admin {
8
+ highYield(chapterIds: $chapterIds, settings: $settings)
9
+ }
10
+ }
11
+ `;
12
+ exports.DOWNLOAD_BATCH = (0, client_1.gql) `
13
+ mutation downloadBatch($batchId: String!, $apiKey: String!) {
14
+ admin {
15
+ downloadBatch(batchId: $batchId, apiKey: $apiKey)
16
+ }
17
+ }
18
+ `;
@@ -1,3 +1,4 @@
1
+ export * from './ai';
1
2
  export * from './algoliaSync';
2
3
  export * from './content';
3
4
  export * from './database';
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./ai"), exports);
17
18
  __exportStar(require("./algoliaSync"), exports);
18
19
  __exportStar(require("./content"), exports);
19
20
  __exportStar(require("./database"), exports);
@@ -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 {
@@ -10,10 +10,24 @@ export interface IUpdateQuestionVar {
10
10
  typeId?: number;
11
11
  answer?: string;
12
12
  choices?: Partial<IQuestionChoice>[];
13
+ conditionIds?: number[];
14
+ presentationIds?: number[];
13
15
  cases?: Partial<IQuestionCase>[];
14
16
  explanation?: string;
15
17
  learningPoint?: string;
16
- entitlements?: Partial<IQuestionEntitlement>[];
18
+ entitlements?: EEntitlementType[];
17
19
  createRevision?: boolean;
18
20
  }
19
21
  export type IUpdateQuestionData = AdminData<graphqlNormalize & IQuestion, 'updateQuestion'>;
22
+ export declare const RESET_QUESTION: import("@apollo/client").DocumentNode;
23
+ export interface IResetQuestionVar {
24
+ ids: Id[];
25
+ operation: 'likes' | 'dislikes' | 'votes';
26
+ }
27
+ export type IResetQuestionData = AdminData<graphqlNormalize & boolean, 'resetQuestion'>;
28
+ export declare const MANAGE_QUESTION_COMMENT: import("@apollo/client").DocumentNode;
29
+ export interface IManageQuestionCommentVar {
30
+ id: Id;
31
+ operation: 'hide' | 'delete';
32
+ }
33
+ 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
+ `;
@@ -194,5 +194,9 @@ export type IDropdownOptionsVar = {
194
194
  export type IDropdownOptionsData = AdminData<Array<{
195
195
  key: string;
196
196
  value: string | number;
197
+ metaData: {
198
+ key: string;
199
+ value: string;
200
+ };
197
201
  }>, 'dropdownOptions'>;
198
202
  export declare const DROPDOWN_OPTIONS: import("@apollo/client").DocumentNode;
@@ -359,6 +359,10 @@ exports.DROPDOWN_OPTIONS = (0, client_1.gql) `
359
359
  dropdownOptions(force: $force, search: $search, table: $table) {
360
360
  key
361
361
  value
362
+ metaData {
363
+ key
364
+ value
365
+ }
362
366
  }
363
367
  }
364
368
  }
@@ -28,6 +28,27 @@ exports.ADMIN_QUESTION = (0, client_1.gql) `
28
28
  createdAt
29
29
  updatedAt
30
30
  typeId
31
+ likes
32
+ dislikes
33
+ totalVotes
34
+ presentations {
35
+ id
36
+ name
37
+ topicId
38
+ topic {
39
+ id
40
+ name
41
+ }
42
+ }
43
+ conditions {
44
+ id
45
+ name
46
+ topicId
47
+ topic {
48
+ id
49
+ name
50
+ }
51
+ }
31
52
  entitlements {
32
53
  id
33
54
  entitlementId
@@ -75,6 +96,8 @@ exports.ADMIN_QUESTION = (0, client_1.gql) `
75
96
  explanation
76
97
  label
77
98
  answer
99
+ votes
100
+ updatedAt
78
101
  }
79
102
  topic {
80
103
  id
@@ -0,0 +1,22 @@
1
+ import { Id } from '../../../models';
2
+ import { AdminData, graphqlNormalize } from '../../types';
3
+ export interface AISettings {
4
+ maxTokens?: number;
5
+ temperature?: number;
6
+ systemPrompt?: string;
7
+ userPrompt?: string;
8
+ apiKey: string;
9
+ model?: string;
10
+ }
11
+ export interface IHighYieldVar {
12
+ chapterIds: Id[];
13
+ settings: AISettings;
14
+ }
15
+ export type IHighYieldData = AdminData<graphqlNormalize & string, 'highYield'>;
16
+ export declare const HIGH_YIELD: import("@apollo/client").DocumentNode;
17
+ export interface IDownloadBatchVar {
18
+ batchId: string;
19
+ apiKey: string;
20
+ }
21
+ export type IDownloadBatchData = AdminData<graphqlNormalize & string, 'downloadBatch'>;
22
+ export declare const DOWNLOAD_BATCH: import("@apollo/client").DocumentNode;
@@ -0,0 +1,15 @@
1
+ import { gql } from '@apollo/client';
2
+ export const HIGH_YIELD = gql `
3
+ mutation HighYield($chapterIds: [Int!]!, $settings: AISettingsInput!) {
4
+ admin {
5
+ highYield(chapterIds: $chapterIds, settings: $settings)
6
+ }
7
+ }
8
+ `;
9
+ export const DOWNLOAD_BATCH = gql `
10
+ mutation downloadBatch($batchId: String!, $apiKey: String!) {
11
+ admin {
12
+ downloadBatch(batchId: $batchId, apiKey: $apiKey)
13
+ }
14
+ }
15
+ `;
@@ -1,3 +1,4 @@
1
+ export * from './ai';
1
2
  export * from './algoliaSync';
2
3
  export * from './content';
3
4
  export * from './database';
@@ -1,3 +1,4 @@
1
+ export * from './ai';
1
2
  export * from './algoliaSync';
2
3
  export * from './content';
3
4
  export * from './database';
@@ -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 {
@@ -10,10 +10,24 @@ export interface IUpdateQuestionVar {
10
10
  typeId?: number;
11
11
  answer?: string;
12
12
  choices?: Partial<IQuestionChoice>[];
13
+ conditionIds?: number[];
14
+ presentationIds?: number[];
13
15
  cases?: Partial<IQuestionCase>[];
14
16
  explanation?: string;
15
17
  learningPoint?: string;
16
- entitlements?: Partial<IQuestionEntitlement>[];
18
+ entitlements?: EEntitlementType[];
17
19
  createRevision?: boolean;
18
20
  }
19
21
  export type IUpdateQuestionData = AdminData<graphqlNormalize & IQuestion, 'updateQuestion'>;
22
+ export declare const RESET_QUESTION: import("@apollo/client").DocumentNode;
23
+ export interface IResetQuestionVar {
24
+ ids: Id[];
25
+ operation: 'likes' | 'dislikes' | 'votes';
26
+ }
27
+ export type IResetQuestionData = AdminData<graphqlNormalize & boolean, 'resetQuestion'>;
28
+ export declare const MANAGE_QUESTION_COMMENT: import("@apollo/client").DocumentNode;
29
+ export interface IManageQuestionCommentVar {
30
+ id: Id;
31
+ operation: 'hide' | 'delete';
32
+ }
33
+ 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
+ `;
@@ -194,5 +194,9 @@ export type IDropdownOptionsVar = {
194
194
  export type IDropdownOptionsData = AdminData<Array<{
195
195
  key: string;
196
196
  value: string | number;
197
+ metaData: {
198
+ key: string;
199
+ value: string;
200
+ };
197
201
  }>, 'dropdownOptions'>;
198
202
  export declare const DROPDOWN_OPTIONS: import("@apollo/client").DocumentNode;
@@ -356,6 +356,10 @@ export const DROPDOWN_OPTIONS = gql `
356
356
  dropdownOptions(force: $force, search: $search, table: $table) {
357
357
  key
358
358
  value
359
+ metaData {
360
+ key
361
+ value
362
+ }
359
363
  }
360
364
  }
361
365
  }
@@ -25,6 +25,27 @@ export const ADMIN_QUESTION = gql `
25
25
  createdAt
26
26
  updatedAt
27
27
  typeId
28
+ likes
29
+ dislikes
30
+ totalVotes
31
+ presentations {
32
+ id
33
+ name
34
+ topicId
35
+ topic {
36
+ id
37
+ name
38
+ }
39
+ }
40
+ conditions {
41
+ id
42
+ name
43
+ topicId
44
+ topic {
45
+ id
46
+ name
47
+ }
48
+ }
28
49
  entitlements {
29
50
  id
30
51
  entitlementId
@@ -72,6 +93,8 @@ export const ADMIN_QUESTION = gql `
72
93
  explanation
73
94
  label
74
95
  answer
96
+ votes
97
+ updatedAt
75
98
  }
76
99
  topic {
77
100
  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.154",
4
4
  "description": "Typescript types for Quesmed",
5
5
  "keywords": [
6
6
  "quesmed",