@quesmed/types 2.6.196 → 2.6.197
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/assets.d.ts +19 -1
- package/dist/cjs/resolvers/mutation/admin/assets.js +18 -1
- package/dist/cjs/resolvers/mutation/admin/chapter.d.ts +7 -0
- package/dist/cjs/resolvers/mutation/admin/question.d.ts +5 -0
- package/dist/cjs/resolvers/mutation/admin/question.js +8 -1
- package/dist/cjs/resolvers/query/admin/chapter.js +5 -0
- package/dist/mjs/resolvers/mutation/admin/assets.d.ts +19 -1
- package/dist/mjs/resolvers/mutation/admin/assets.js +18 -1
- package/dist/mjs/resolvers/mutation/admin/chapter.d.ts +7 -0
- package/dist/mjs/resolvers/mutation/admin/question.d.ts +5 -0
- package/dist/mjs/resolvers/mutation/admin/question.js +7 -0
- package/dist/mjs/resolvers/query/admin/chapter.js +5 -0
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ELightGalleryType, FileData, IJob, IJobAsset, IJobRecord, Id } from '../../../models';
|
|
1
|
+
import { ELightGalleryType, FileData, IJob, IJobAsset, IJobRecord, IPicture, Id } from '../../../models';
|
|
2
2
|
import { AdminData, graphqlNormalize } from '../../types';
|
|
3
3
|
export declare const REMOVE_JOB_ASSETS: import("@apollo/client").DocumentNode;
|
|
4
4
|
export type IRemoveJobAssetsVar = {
|
|
@@ -24,3 +24,21 @@ export type ICreateJobAssetsVar = {
|
|
|
24
24
|
inputs: IJobAssetInput[];
|
|
25
25
|
};
|
|
26
26
|
export type ICreateJobAssetsData = AdminData<(IJobAsset & graphqlNormalize)[], 'createJobAssets'>;
|
|
27
|
+
export interface IAssetInput {
|
|
28
|
+
file: File | FileData;
|
|
29
|
+
caption?: string | null;
|
|
30
|
+
name: string;
|
|
31
|
+
topicId?: Id;
|
|
32
|
+
sensitive: boolean;
|
|
33
|
+
overlay?: boolean;
|
|
34
|
+
}
|
|
35
|
+
export declare const CREATE_ASSETS: import("@apollo/client").DocumentNode;
|
|
36
|
+
export type ICreateAssetsVar = {
|
|
37
|
+
inputs: IAssetInput[];
|
|
38
|
+
};
|
|
39
|
+
export type ICreateAssetsData = AdminData<(IPicture & graphqlNormalize)[], 'createAssets'>;
|
|
40
|
+
export declare const REMOVE_ASSETS: import("@apollo/client").DocumentNode;
|
|
41
|
+
export type IRemoveAssetsVar = {
|
|
42
|
+
ids: Id[];
|
|
43
|
+
};
|
|
44
|
+
export type IRemoveAssetsData = AdminData<boolean, 'removeAssets'>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CREATE_JOB_ASSETS = exports.REMOVE_JOB_ASSETS = void 0;
|
|
3
|
+
exports.REMOVE_ASSETS = exports.CREATE_ASSETS = exports.CREATE_JOB_ASSETS = exports.REMOVE_JOB_ASSETS = void 0;
|
|
4
4
|
const client_1 = require("@apollo/client");
|
|
5
5
|
const fragments_1 = require("../../fragments");
|
|
6
6
|
exports.REMOVE_JOB_ASSETS = (0, client_1.gql) `
|
|
@@ -20,3 +20,20 @@ exports.CREATE_JOB_ASSETS = (0, client_1.gql) `
|
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
`;
|
|
23
|
+
exports.CREATE_ASSETS = (0, client_1.gql) `
|
|
24
|
+
${fragments_1.PICTURE_FIELDS}
|
|
25
|
+
mutation CreateAssets($inputs: [CreateAssetsInput!]!) {
|
|
26
|
+
admin {
|
|
27
|
+
createAssets(inputs: $inputs) {
|
|
28
|
+
...PictureFields
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
`;
|
|
33
|
+
exports.REMOVE_ASSETS = (0, client_1.gql) `
|
|
34
|
+
mutation RemoveAssets($ids: [ID!]!) {
|
|
35
|
+
admin {
|
|
36
|
+
removeAssets(ids: $ids)
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
`;
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import { IChapter, Id } from '../../../models';
|
|
2
2
|
import { AdminData, graphqlNormalize } from '../../types';
|
|
3
3
|
export declare const UPDATE_CHAPTER: import("@apollo/client").DocumentNode;
|
|
4
|
+
export interface IAssetBinding {
|
|
5
|
+
id: Id;
|
|
6
|
+
index: number;
|
|
7
|
+
questionChoiceId?: Id;
|
|
8
|
+
deleted: boolean;
|
|
9
|
+
}
|
|
4
10
|
export interface IUpdateChapterVar {
|
|
5
11
|
id: Id;
|
|
6
12
|
explanation?: string;
|
|
7
13
|
summary?: string;
|
|
14
|
+
assets?: IAssetBinding[];
|
|
8
15
|
}
|
|
9
16
|
export type IUpdateChapterData = AdminData<graphqlNormalize & IChapter, 'updateChapter'>;
|
|
@@ -31,3 +31,8 @@ export interface IManageQuestionCommentVar {
|
|
|
31
31
|
operation: 'hide' | 'delete';
|
|
32
32
|
}
|
|
33
33
|
export type IManageQuestionCommentData = AdminData<graphqlNormalize & boolean, 'manageQuestionComment'>;
|
|
34
|
+
export declare const DELETE_QUESTIONS: import("@apollo/client").DocumentNode;
|
|
35
|
+
export interface IDeleteQuestionsVar {
|
|
36
|
+
ids: Id[];
|
|
37
|
+
}
|
|
38
|
+
export type IDeleteQuestionsData = AdminData<graphqlNormalize & boolean, 'deleteQuestions'>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MANAGE_QUESTION_COMMENT = exports.RESET_QUESTION = exports.UPDATE_QUESTION = void 0;
|
|
3
|
+
exports.DELETE_QUESTIONS = 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!) {
|
|
@@ -25,3 +25,10 @@ exports.MANAGE_QUESTION_COMMENT = (0, client_1.gql) `
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
`;
|
|
28
|
+
exports.DELETE_QUESTIONS = (0, client_1.gql) `
|
|
29
|
+
mutation DeleteQuestions($ids: [ID!]!) {
|
|
30
|
+
admin {
|
|
31
|
+
deleteQuestions(ids: $ids)
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
`;
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ADMIN_CHAPTER = void 0;
|
|
4
4
|
const client_1 = require("@apollo/client");
|
|
5
|
+
const fragments_1 = require("../../fragments");
|
|
5
6
|
exports.ADMIN_CHAPTER = (0, client_1.gql) `
|
|
7
|
+
${fragments_1.PICTURE_FIELDS}
|
|
6
8
|
query AdminChapter($id: Int!) {
|
|
7
9
|
admin {
|
|
8
10
|
chapter(id: $id) {
|
|
@@ -11,6 +13,9 @@ exports.ADMIN_CHAPTER = (0, client_1.gql) `
|
|
|
11
13
|
summary
|
|
12
14
|
createdAt
|
|
13
15
|
updatedAt
|
|
16
|
+
pictures {
|
|
17
|
+
...PictureFields
|
|
18
|
+
}
|
|
14
19
|
}
|
|
15
20
|
}
|
|
16
21
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ELightGalleryType, FileData, IJob, IJobAsset, IJobRecord, Id } from '../../../models';
|
|
1
|
+
import { ELightGalleryType, FileData, IJob, IJobAsset, IJobRecord, IPicture, Id } from '../../../models';
|
|
2
2
|
import { AdminData, graphqlNormalize } from '../../types';
|
|
3
3
|
export declare const REMOVE_JOB_ASSETS: import("@apollo/client").DocumentNode;
|
|
4
4
|
export type IRemoveJobAssetsVar = {
|
|
@@ -24,3 +24,21 @@ export type ICreateJobAssetsVar = {
|
|
|
24
24
|
inputs: IJobAssetInput[];
|
|
25
25
|
};
|
|
26
26
|
export type ICreateJobAssetsData = AdminData<(IJobAsset & graphqlNormalize)[], 'createJobAssets'>;
|
|
27
|
+
export interface IAssetInput {
|
|
28
|
+
file: File | FileData;
|
|
29
|
+
caption?: string | null;
|
|
30
|
+
name: string;
|
|
31
|
+
topicId?: Id;
|
|
32
|
+
sensitive: boolean;
|
|
33
|
+
overlay?: boolean;
|
|
34
|
+
}
|
|
35
|
+
export declare const CREATE_ASSETS: import("@apollo/client").DocumentNode;
|
|
36
|
+
export type ICreateAssetsVar = {
|
|
37
|
+
inputs: IAssetInput[];
|
|
38
|
+
};
|
|
39
|
+
export type ICreateAssetsData = AdminData<(IPicture & graphqlNormalize)[], 'createAssets'>;
|
|
40
|
+
export declare const REMOVE_ASSETS: import("@apollo/client").DocumentNode;
|
|
41
|
+
export type IRemoveAssetsVar = {
|
|
42
|
+
ids: Id[];
|
|
43
|
+
};
|
|
44
|
+
export type IRemoveAssetsData = AdminData<boolean, 'removeAssets'>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { gql } from '@apollo/client';
|
|
2
|
-
import { JOB_ASSET_FRAGMENT } from '../../fragments';
|
|
2
|
+
import { JOB_ASSET_FRAGMENT, PICTURE_FIELDS } from '../../fragments';
|
|
3
3
|
export const REMOVE_JOB_ASSETS = gql `
|
|
4
4
|
mutation RemoveJobAssets($unlink: Boolean, $ids: [ID!]!) {
|
|
5
5
|
admin {
|
|
@@ -17,3 +17,20 @@ export const CREATE_JOB_ASSETS = gql `
|
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
`;
|
|
20
|
+
export const CREATE_ASSETS = gql `
|
|
21
|
+
${PICTURE_FIELDS}
|
|
22
|
+
mutation CreateAssets($inputs: [CreateAssetsInput!]!) {
|
|
23
|
+
admin {
|
|
24
|
+
createAssets(inputs: $inputs) {
|
|
25
|
+
...PictureFields
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
`;
|
|
30
|
+
export const REMOVE_ASSETS = gql `
|
|
31
|
+
mutation RemoveAssets($ids: [ID!]!) {
|
|
32
|
+
admin {
|
|
33
|
+
removeAssets(ids: $ids)
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
`;
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import { IChapter, Id } from '../../../models';
|
|
2
2
|
import { AdminData, graphqlNormalize } from '../../types';
|
|
3
3
|
export declare const UPDATE_CHAPTER: import("@apollo/client").DocumentNode;
|
|
4
|
+
export interface IAssetBinding {
|
|
5
|
+
id: Id;
|
|
6
|
+
index: number;
|
|
7
|
+
questionChoiceId?: Id;
|
|
8
|
+
deleted: boolean;
|
|
9
|
+
}
|
|
4
10
|
export interface IUpdateChapterVar {
|
|
5
11
|
id: Id;
|
|
6
12
|
explanation?: string;
|
|
7
13
|
summary?: string;
|
|
14
|
+
assets?: IAssetBinding[];
|
|
8
15
|
}
|
|
9
16
|
export type IUpdateChapterData = AdminData<graphqlNormalize & IChapter, 'updateChapter'>;
|
|
@@ -31,3 +31,8 @@ export interface IManageQuestionCommentVar {
|
|
|
31
31
|
operation: 'hide' | 'delete';
|
|
32
32
|
}
|
|
33
33
|
export type IManageQuestionCommentData = AdminData<graphqlNormalize & boolean, 'manageQuestionComment'>;
|
|
34
|
+
export declare const DELETE_QUESTIONS: import("@apollo/client").DocumentNode;
|
|
35
|
+
export interface IDeleteQuestionsVar {
|
|
36
|
+
ids: Id[];
|
|
37
|
+
}
|
|
38
|
+
export type IDeleteQuestionsData = AdminData<graphqlNormalize & boolean, 'deleteQuestions'>;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { gql } from '@apollo/client';
|
|
2
|
+
import { PICTURE_FIELDS } from '../../fragments';
|
|
2
3
|
export const ADMIN_CHAPTER = gql `
|
|
4
|
+
${PICTURE_FIELDS}
|
|
3
5
|
query AdminChapter($id: Int!) {
|
|
4
6
|
admin {
|
|
5
7
|
chapter(id: $id) {
|
|
@@ -8,6 +10,9 @@ export const ADMIN_CHAPTER = gql `
|
|
|
8
10
|
summary
|
|
9
11
|
createdAt
|
|
10
12
|
updatedAt
|
|
13
|
+
pictures {
|
|
14
|
+
...PictureFields
|
|
15
|
+
}
|
|
11
16
|
}
|
|
12
17
|
}
|
|
13
18
|
}
|