@quesmed/types 2.1.10 → 2.1.13
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/models/Notification.d.ts +4 -5
- package/dist/cjs/resolvers/mutation/restricted/marksheet.d.ts +1 -1
- package/dist/cjs/resolvers/mutation/restricted/marksheet.js +4 -4
- package/dist/cjs/resolvers/mutation/restricted/notification.d.ts +2 -3
- package/dist/cjs/resolvers/mutation/sample.d.ts +1 -1
- package/dist/cjs/resolvers/mutation/sample.js +3 -3
- package/dist/cjs/resolvers/query/restricted/topics.js +5 -0
- package/dist/mjs/models/Notification.d.ts +4 -5
- package/dist/mjs/resolvers/mutation/restricted/marksheet.d.ts +1 -1
- package/dist/mjs/resolvers/mutation/restricted/marksheet.js +2 -2
- package/dist/mjs/resolvers/mutation/restricted/notification.d.ts +2 -3
- package/dist/mjs/resolvers/mutation/sample.d.ts +1 -1
- package/dist/mjs/resolvers/mutation/sample.js +1 -1
- package/dist/mjs/resolvers/query/restricted/topics.js +5 -0
- package/package.json +1 -1
|
@@ -24,8 +24,8 @@ export interface INotification {
|
|
|
24
24
|
updatedAt: number | Date;
|
|
25
25
|
userId: Id | null;
|
|
26
26
|
user?: IUser;
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
fromUserId: Id | null;
|
|
28
|
+
fromUser?: IUser;
|
|
29
29
|
commentId: Id | null;
|
|
30
30
|
comment?: IQuestionComment;
|
|
31
31
|
conceptId: Id | null;
|
|
@@ -33,7 +33,6 @@ export interface INotification {
|
|
|
33
33
|
description: string;
|
|
34
34
|
actionType: ENotificationActionType;
|
|
35
35
|
type: ENotificationType;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
_deleted: boolean;
|
|
36
|
+
global: boolean;
|
|
37
|
+
read: boolean;
|
|
39
38
|
}
|
|
@@ -32,7 +32,7 @@ export interface IMarksheetInput {
|
|
|
32
32
|
}
|
|
33
33
|
export declare const SAVE_MARKSHEET: import("@apollo/client").DocumentNode;
|
|
34
34
|
export declare const updateMarksheets: (cache: ApolloCache<any>, result: ApolloUpdateResultRestricted<ISaveMarksheetsData>, options: ApolloUpdateOptions) => void;
|
|
35
|
-
export declare const
|
|
35
|
+
export declare const optimisticSaveMarksheets: (client: ApolloClient<any>, marksheetInput: IMarksheetInput, questionIndex: number) => ISaveMarksheetsData;
|
|
36
36
|
export interface ISaveMarksheetsVar {
|
|
37
37
|
marksheetInput: IMarksheetInput[];
|
|
38
38
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.REMOVE_FLAGGED_QUESTION = exports.ADD_FLAGGED_QUESTION = exports.
|
|
3
|
+
exports.REMOVE_FLAGGED_QUESTION = exports.ADD_FLAGGED_QUESTION = exports.optimisticSaveMarksheets = exports.updateMarksheets = exports.SAVE_MARKSHEET = exports.RE_BUILD_MARKSHEET = exports.BUILD_MARKSHEET = void 0;
|
|
4
4
|
const client_1 = require("@apollo/client");
|
|
5
5
|
const marksheet_1 = require("../../fragments/marksheet");
|
|
6
6
|
const restricted_1 = require("../../query/restricted");
|
|
@@ -99,7 +99,7 @@ const updateMarksheets = (cache, result, options) => {
|
|
|
99
99
|
}
|
|
100
100
|
};
|
|
101
101
|
exports.updateMarksheets = updateMarksheets;
|
|
102
|
-
const
|
|
102
|
+
const optimisticSaveMarksheets = (client, marksheetInput, questionIndex) => {
|
|
103
103
|
const { timeTaken, choiceId, mark, marksheetId } = marksheetInput;
|
|
104
104
|
const data = client.readQuery({
|
|
105
105
|
variables: { id: marksheetId },
|
|
@@ -112,7 +112,7 @@ const optimisticSaveMarkseehts = (client, marksheetInput, questionIndex) => {
|
|
|
112
112
|
...marks[questionIndex],
|
|
113
113
|
marksheetId,
|
|
114
114
|
timeTaken,
|
|
115
|
-
questionChoiceId: choiceId
|
|
115
|
+
questionChoiceId: choiceId ?? null,
|
|
116
116
|
mark: mark || null,
|
|
117
117
|
};
|
|
118
118
|
const udatedMarks = [
|
|
@@ -132,7 +132,7 @@ const optimisticSaveMarkseehts = (client, marksheetInput, questionIndex) => {
|
|
|
132
132
|
},
|
|
133
133
|
};
|
|
134
134
|
};
|
|
135
|
-
exports.
|
|
135
|
+
exports.optimisticSaveMarksheets = optimisticSaveMarksheets;
|
|
136
136
|
exports.ADD_FLAGGED_QUESTION = (0, client_1.gql) `
|
|
137
137
|
mutation AddFlaggedQuestion($markId: Int!, $questionId: Int!) {
|
|
138
138
|
restricted {
|
|
@@ -8,9 +8,8 @@ export interface IAddNotificationInput {
|
|
|
8
8
|
description: string;
|
|
9
9
|
actionType: ENotificationActionType;
|
|
10
10
|
type: ENotificationType;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
_deleted: boolean;
|
|
11
|
+
global: boolean;
|
|
12
|
+
read: boolean;
|
|
14
13
|
}
|
|
15
14
|
export declare type IAddNotificationVar = {
|
|
16
15
|
data: IAddNotificationInput;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ApolloClient } from '@apollo/client';
|
|
2
2
|
import { IMarksheetInput } from './restricted';
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const saveSampleMarksheets: (client: ApolloClient<any>, marksheetInput: IMarksheetInput, questionIndex: number) => void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.saveSampleMarksheets = void 0;
|
|
4
4
|
const query_1 = require("../query");
|
|
5
|
-
const
|
|
5
|
+
const saveSampleMarksheets = (client, marksheetInput, questionIndex) => {
|
|
6
6
|
const { timeTaken, choiceId, mark, marksheetId } = marksheetInput;
|
|
7
7
|
const prevData = client.readQuery({
|
|
8
8
|
variables: { marksheetId },
|
|
@@ -33,4 +33,4 @@ const saveSampleMarkseehts = (client, marksheetInput, questionIndex) => {
|
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
|
-
exports.
|
|
36
|
+
exports.saveSampleMarksheets = saveSampleMarksheets;
|
|
@@ -24,8 +24,8 @@ export interface INotification {
|
|
|
24
24
|
updatedAt: number | Date;
|
|
25
25
|
userId: Id | null;
|
|
26
26
|
user?: IUser;
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
fromUserId: Id | null;
|
|
28
|
+
fromUser?: IUser;
|
|
29
29
|
commentId: Id | null;
|
|
30
30
|
comment?: IQuestionComment;
|
|
31
31
|
conceptId: Id | null;
|
|
@@ -33,7 +33,6 @@ export interface INotification {
|
|
|
33
33
|
description: string;
|
|
34
34
|
actionType: ENotificationActionType;
|
|
35
35
|
type: ENotificationType;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
_deleted: boolean;
|
|
36
|
+
global: boolean;
|
|
37
|
+
read: boolean;
|
|
39
38
|
}
|
|
@@ -32,7 +32,7 @@ export interface IMarksheetInput {
|
|
|
32
32
|
}
|
|
33
33
|
export declare const SAVE_MARKSHEET: import("@apollo/client").DocumentNode;
|
|
34
34
|
export declare const updateMarksheets: (cache: ApolloCache<any>, result: ApolloUpdateResultRestricted<ISaveMarksheetsData>, options: ApolloUpdateOptions) => void;
|
|
35
|
-
export declare const
|
|
35
|
+
export declare const optimisticSaveMarksheets: (client: ApolloClient<any>, marksheetInput: IMarksheetInput, questionIndex: number) => ISaveMarksheetsData;
|
|
36
36
|
export interface ISaveMarksheetsVar {
|
|
37
37
|
marksheetInput: IMarksheetInput[];
|
|
38
38
|
}
|
|
@@ -95,7 +95,7 @@ export const updateMarksheets = (cache, result, options) => {
|
|
|
95
95
|
console.error(error);
|
|
96
96
|
}
|
|
97
97
|
};
|
|
98
|
-
export const
|
|
98
|
+
export const optimisticSaveMarksheets = (client, marksheetInput, questionIndex) => {
|
|
99
99
|
const { timeTaken, choiceId, mark, marksheetId } = marksheetInput;
|
|
100
100
|
const data = client.readQuery({
|
|
101
101
|
variables: { id: marksheetId },
|
|
@@ -108,7 +108,7 @@ export const optimisticSaveMarkseehts = (client, marksheetInput, questionIndex)
|
|
|
108
108
|
...marks[questionIndex],
|
|
109
109
|
marksheetId,
|
|
110
110
|
timeTaken,
|
|
111
|
-
questionChoiceId: choiceId
|
|
111
|
+
questionChoiceId: choiceId ?? null,
|
|
112
112
|
mark: mark || null,
|
|
113
113
|
};
|
|
114
114
|
const udatedMarks = [
|
|
@@ -8,9 +8,8 @@ export interface IAddNotificationInput {
|
|
|
8
8
|
description: string;
|
|
9
9
|
actionType: ENotificationActionType;
|
|
10
10
|
type: ENotificationType;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
_deleted: boolean;
|
|
11
|
+
global: boolean;
|
|
12
|
+
read: boolean;
|
|
14
13
|
}
|
|
15
14
|
export declare type IAddNotificationVar = {
|
|
16
15
|
data: IAddNotificationInput;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ApolloClient } from '@apollo/client';
|
|
2
2
|
import { IMarksheetInput } from './restricted';
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const saveSampleMarksheets: (client: ApolloClient<any>, marksheetInput: IMarksheetInput, questionIndex: number) => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SAMPLE_MARKSHEET, } from '../query';
|
|
2
|
-
export const
|
|
2
|
+
export const saveSampleMarksheets = (client, marksheetInput, questionIndex) => {
|
|
3
3
|
const { timeTaken, choiceId, mark, marksheetId } = marksheetInput;
|
|
4
4
|
const prevData = client.readQuery({
|
|
5
5
|
variables: { marksheetId },
|