@quesmed/types 2.6.153 → 2.6.155
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/dist/cjs/resolvers/mutation/admin/ai.d.ts +22 -0
- package/dist/cjs/resolvers/mutation/admin/ai.js +18 -0
- package/dist/cjs/resolvers/mutation/admin/index.d.ts +1 -0
- package/dist/cjs/resolvers/mutation/admin/index.js +1 -0
- package/dist/cjs/resolvers/mutation/admin/question.d.ts +2 -0
- package/dist/cjs/resolvers/query/admin/dashboard.d.ts +6 -0
- package/dist/cjs/resolvers/query/admin/dashboard.js +8 -0
- package/dist/cjs/resolvers/query/admin/question.js +18 -0
- package/dist/mjs/resolvers/mutation/admin/ai.d.ts +22 -0
- package/dist/mjs/resolvers/mutation/admin/ai.js +15 -0
- package/dist/mjs/resolvers/mutation/admin/index.d.ts +1 -0
- package/dist/mjs/resolvers/mutation/admin/index.js +1 -0
- package/dist/mjs/resolvers/mutation/admin/question.d.ts +2 -0
- package/dist/mjs/resolvers/query/admin/dashboard.d.ts +6 -0
- package/dist/mjs/resolvers/query/admin/dashboard.js +8 -0
- package/dist/mjs/resolvers/query/admin/question.js +18 -0
- package/package.json +1 -1
|
@@ -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
|
+
`;
|
|
@@ -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);
|
|
@@ -10,6 +10,8 @@ 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;
|
|
@@ -40,6 +40,8 @@ export type IEarningsVar = {
|
|
|
40
40
|
countryName: string | null;
|
|
41
41
|
useNetEarning: boolean;
|
|
42
42
|
productIds?: EProductType[];
|
|
43
|
+
graduationYear?: number;
|
|
44
|
+
classYear?: string;
|
|
43
45
|
};
|
|
44
46
|
export type IEarningsData = AdminData<IRevenue[], 'earnings'>;
|
|
45
47
|
export declare const USER_STATUS: import("@apollo/client").DocumentNode;
|
|
@@ -194,5 +196,9 @@ export type IDropdownOptionsVar = {
|
|
|
194
196
|
export type IDropdownOptionsData = AdminData<Array<{
|
|
195
197
|
key: string;
|
|
196
198
|
value: string | number;
|
|
199
|
+
metaData: {
|
|
200
|
+
key: string;
|
|
201
|
+
value: string;
|
|
202
|
+
};
|
|
197
203
|
}>, 'dropdownOptions'>;
|
|
198
204
|
export declare const DROPDOWN_OPTIONS: import("@apollo/client").DocumentNode;
|
|
@@ -27,6 +27,8 @@ exports.EARNINGS = (0, client_1.gql) `
|
|
|
27
27
|
$useNetEarning: Boolean
|
|
28
28
|
$productIds: [Int]
|
|
29
29
|
$countryName: String
|
|
30
|
+
$graduationYear: Int
|
|
31
|
+
$classYear: String
|
|
30
32
|
) {
|
|
31
33
|
admin {
|
|
32
34
|
earnings(
|
|
@@ -40,6 +42,8 @@ exports.EARNINGS = (0, client_1.gql) `
|
|
|
40
42
|
useNetEarning: $useNetEarning
|
|
41
43
|
productIds: $productIds
|
|
42
44
|
countryName: $countryName
|
|
45
|
+
graduationYear: $graduationYear
|
|
46
|
+
classYear: $classYear
|
|
43
47
|
) {
|
|
44
48
|
entitlement {
|
|
45
49
|
id
|
|
@@ -359,6 +363,10 @@ exports.DROPDOWN_OPTIONS = (0, client_1.gql) `
|
|
|
359
363
|
dropdownOptions(force: $force, search: $search, table: $table) {
|
|
360
364
|
key
|
|
361
365
|
value
|
|
366
|
+
metaData {
|
|
367
|
+
key
|
|
368
|
+
value
|
|
369
|
+
}
|
|
362
370
|
}
|
|
363
371
|
}
|
|
364
372
|
}
|
|
@@ -31,6 +31,24 @@ exports.ADMIN_QUESTION = (0, client_1.gql) `
|
|
|
31
31
|
likes
|
|
32
32
|
dislikes
|
|
33
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
|
+
}
|
|
34
52
|
entitlements {
|
|
35
53
|
id
|
|
36
54
|
entitlementId
|
|
@@ -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
|
+
`;
|
|
@@ -10,6 +10,8 @@ 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;
|
|
@@ -40,6 +40,8 @@ export type IEarningsVar = {
|
|
|
40
40
|
countryName: string | null;
|
|
41
41
|
useNetEarning: boolean;
|
|
42
42
|
productIds?: EProductType[];
|
|
43
|
+
graduationYear?: number;
|
|
44
|
+
classYear?: string;
|
|
43
45
|
};
|
|
44
46
|
export type IEarningsData = AdminData<IRevenue[], 'earnings'>;
|
|
45
47
|
export declare const USER_STATUS: import("@apollo/client").DocumentNode;
|
|
@@ -194,5 +196,9 @@ export type IDropdownOptionsVar = {
|
|
|
194
196
|
export type IDropdownOptionsData = AdminData<Array<{
|
|
195
197
|
key: string;
|
|
196
198
|
value: string | number;
|
|
199
|
+
metaData: {
|
|
200
|
+
key: string;
|
|
201
|
+
value: string;
|
|
202
|
+
};
|
|
197
203
|
}>, 'dropdownOptions'>;
|
|
198
204
|
export declare const DROPDOWN_OPTIONS: import("@apollo/client").DocumentNode;
|
|
@@ -24,6 +24,8 @@ export const EARNINGS = gql `
|
|
|
24
24
|
$useNetEarning: Boolean
|
|
25
25
|
$productIds: [Int]
|
|
26
26
|
$countryName: String
|
|
27
|
+
$graduationYear: Int
|
|
28
|
+
$classYear: String
|
|
27
29
|
) {
|
|
28
30
|
admin {
|
|
29
31
|
earnings(
|
|
@@ -37,6 +39,8 @@ export const EARNINGS = gql `
|
|
|
37
39
|
useNetEarning: $useNetEarning
|
|
38
40
|
productIds: $productIds
|
|
39
41
|
countryName: $countryName
|
|
42
|
+
graduationYear: $graduationYear
|
|
43
|
+
classYear: $classYear
|
|
40
44
|
) {
|
|
41
45
|
entitlement {
|
|
42
46
|
id
|
|
@@ -356,6 +360,10 @@ export const DROPDOWN_OPTIONS = gql `
|
|
|
356
360
|
dropdownOptions(force: $force, search: $search, table: $table) {
|
|
357
361
|
key
|
|
358
362
|
value
|
|
363
|
+
metaData {
|
|
364
|
+
key
|
|
365
|
+
value
|
|
366
|
+
}
|
|
359
367
|
}
|
|
360
368
|
}
|
|
361
369
|
}
|
|
@@ -28,6 +28,24 @@ export const ADMIN_QUESTION = gql `
|
|
|
28
28
|
likes
|
|
29
29
|
dislikes
|
|
30
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
|
+
}
|
|
31
49
|
entitlements {
|
|
32
50
|
id
|
|
33
51
|
entitlementId
|