@quesmed/types 2.6.38 → 2.6.40
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/Psa.d.ts +1 -2
- package/dist/cjs/models/Psa.js +0 -1
- package/dist/cjs/models/Question.d.ts +0 -3
- package/dist/cjs/resolvers/fragments/question.js +2 -0
- package/dist/cjs/resolvers/fragments/user.js +1 -0
- package/dist/cjs/resolvers/mutation/restricted/questionDiscussion.d.ts +2 -1
- package/dist/cjs/resolvers/mutation/restricted/questionDiscussion.js +2 -2
- package/dist/cjs/resolvers/query/restricted/psa.js +0 -5
- package/dist/cjs/utils/commonFunctions.js +0 -2
- package/dist/mjs/models/Psa.d.ts +1 -2
- package/dist/mjs/models/Psa.js +0 -1
- package/dist/mjs/models/Question.d.ts +0 -3
- package/dist/mjs/resolvers/fragments/question.js +2 -0
- package/dist/mjs/resolvers/fragments/user.js +1 -0
- package/dist/mjs/resolvers/mutation/restricted/questionDiscussion.d.ts +2 -1
- package/dist/mjs/resolvers/mutation/restricted/questionDiscussion.js +2 -2
- package/dist/mjs/resolvers/query/restricted/psa.js +0 -5
- package/dist/mjs/utils/commonFunctions.js +0 -2
- package/package.json +1 -1
package/dist/cjs/models/Psa.d.ts
CHANGED
package/dist/cjs/models/Psa.js
CHANGED
|
@@ -8,5 +8,4 @@ var EPrescriptionType;
|
|
|
8
8
|
EPrescriptionType[EPrescriptionType["Duration"] = 2] = "Duration";
|
|
9
9
|
EPrescriptionType[EPrescriptionType["Frequency"] = 3] = "Frequency";
|
|
10
10
|
EPrescriptionType[EPrescriptionType["Route"] = 4] = "Route";
|
|
11
|
-
EPrescriptionType[EPrescriptionType["Unit"] = 5] = "Unit";
|
|
12
11
|
})(EPrescriptionType = exports.EPrescriptionType || (exports.EPrescriptionType = {}));
|
|
@@ -204,7 +204,6 @@ export type IPrescribeAnswerData = {
|
|
|
204
204
|
export interface IPrescribeAnswer {
|
|
205
205
|
drug: IPrescribeAnswerData;
|
|
206
206
|
dose: IPrescribeAnswerData;
|
|
207
|
-
unit: IPrescribeAnswerData;
|
|
208
207
|
route: IPrescribeAnswerData;
|
|
209
208
|
frequency: IPrescribeAnswerData;
|
|
210
209
|
duration: IPrescribeAnswerData;
|
|
@@ -212,13 +211,11 @@ export interface IPrescribeAnswer {
|
|
|
212
211
|
export interface IPrescribeMark {
|
|
213
212
|
drugId: number;
|
|
214
213
|
doseId: number;
|
|
215
|
-
unitId: number;
|
|
216
214
|
routeId: number;
|
|
217
215
|
frequencyId: number;
|
|
218
216
|
durationId: number;
|
|
219
217
|
drugLabel?: string;
|
|
220
218
|
doseLabel?: string;
|
|
221
|
-
unitLabel?: string;
|
|
222
219
|
routeLabel?: string;
|
|
223
220
|
frequencyLabel?: string;
|
|
224
221
|
durationLabel?: string;
|
|
@@ -14,6 +14,7 @@ exports.QUESTION_COMMENT_FIELDS = (0, client_1.gql) `
|
|
|
14
14
|
user {
|
|
15
15
|
id
|
|
16
16
|
displayName
|
|
17
|
+
accessLevel
|
|
17
18
|
}
|
|
18
19
|
dislikes
|
|
19
20
|
isLikedByMe
|
|
@@ -26,6 +27,7 @@ exports.QUESTION_COMMENT_FIELDS = (0, client_1.gql) `
|
|
|
26
27
|
user {
|
|
27
28
|
id
|
|
28
29
|
displayName
|
|
30
|
+
accessLevel
|
|
29
31
|
}
|
|
30
32
|
likes
|
|
31
33
|
dislikes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ApolloCache } from '@apollo/client';
|
|
2
2
|
import { ApolloUpdateOptions, ApolloUpdateResultRestricted } from '../..';
|
|
3
|
-
import { EQuestionLike, EQuestionType, IHighlight, IQuestion, IQuestionComment, IQuestionHighlights, Id } from '../../../models';
|
|
3
|
+
import { EQuestionLike, EQuestionType, IAccessLevel, IHighlight, IQuestion, IQuestionComment, IQuestionHighlights, Id } from '../../../models';
|
|
4
4
|
import { RestrictedData, graphqlNormalize } from '../../types';
|
|
5
5
|
interface LikeData {
|
|
6
6
|
likes?: number;
|
|
@@ -22,6 +22,7 @@ export declare const updateQuestionComments: (typeId: EQuestionType) => (cache:
|
|
|
22
22
|
export declare const optimisticQuestionComment: (id: number, user: {
|
|
23
23
|
id: number;
|
|
24
24
|
displayName: string;
|
|
25
|
+
accessLevel: IAccessLevel;
|
|
25
26
|
}, input: IQuestionCommentsVar) => IQuestionCommentsData;
|
|
26
27
|
export interface IQuestionCommentsVar {
|
|
27
28
|
marksheetId?: Id;
|
|
@@ -180,7 +180,7 @@ const updateQuestionComments = (typeId) => (cache, result, options) => {
|
|
|
180
180
|
exports.updateQuestionComments = updateQuestionComments;
|
|
181
181
|
const optimisticQuestionComment = (id, user, input) => {
|
|
182
182
|
const { parentId, questionId, comment } = input;
|
|
183
|
-
const { displayName, id: userId } = user || {};
|
|
183
|
+
const { displayName, id: userId, accessLevel } = user || {};
|
|
184
184
|
const newComment = {
|
|
185
185
|
createdAt: new Date(),
|
|
186
186
|
id,
|
|
@@ -188,7 +188,7 @@ const optimisticQuestionComment = (id, user, input) => {
|
|
|
188
188
|
questionId,
|
|
189
189
|
dislikes: 0,
|
|
190
190
|
isLikedByMe: models_1.EQuestionLike.NONE,
|
|
191
|
-
user: { displayName, id: userId },
|
|
191
|
+
user: { displayName, id: userId, accessLevel },
|
|
192
192
|
comment,
|
|
193
193
|
parentId: parentId ? parentId : 0,
|
|
194
194
|
replies: [],
|
|
@@ -23,7 +23,6 @@ function mapPrescribeMarkToAnswer(obj) {
|
|
|
23
23
|
doseId: obj.dose.value,
|
|
24
24
|
durationId: obj.duration.value,
|
|
25
25
|
frequencyId: obj.frequency.value,
|
|
26
|
-
unitId: obj.unit.value,
|
|
27
26
|
routeId: obj.route.value,
|
|
28
27
|
};
|
|
29
28
|
}
|
|
@@ -32,7 +31,6 @@ function mapPrescribeMarkToAnswer(obj) {
|
|
|
32
31
|
doseId: obj.doseId,
|
|
33
32
|
durationId: obj.durationId,
|
|
34
33
|
frequencyId: obj.frequencyId,
|
|
35
|
-
unitId: obj.unitId,
|
|
36
34
|
routeId: obj.routeId,
|
|
37
35
|
};
|
|
38
36
|
}
|
package/dist/mjs/models/Psa.d.ts
CHANGED
package/dist/mjs/models/Psa.js
CHANGED
|
@@ -5,5 +5,4 @@ export var EPrescriptionType;
|
|
|
5
5
|
EPrescriptionType[EPrescriptionType["Duration"] = 2] = "Duration";
|
|
6
6
|
EPrescriptionType[EPrescriptionType["Frequency"] = 3] = "Frequency";
|
|
7
7
|
EPrescriptionType[EPrescriptionType["Route"] = 4] = "Route";
|
|
8
|
-
EPrescriptionType[EPrescriptionType["Unit"] = 5] = "Unit";
|
|
9
8
|
})(EPrescriptionType || (EPrescriptionType = {}));
|
|
@@ -204,7 +204,6 @@ export type IPrescribeAnswerData = {
|
|
|
204
204
|
export interface IPrescribeAnswer {
|
|
205
205
|
drug: IPrescribeAnswerData;
|
|
206
206
|
dose: IPrescribeAnswerData;
|
|
207
|
-
unit: IPrescribeAnswerData;
|
|
208
207
|
route: IPrescribeAnswerData;
|
|
209
208
|
frequency: IPrescribeAnswerData;
|
|
210
209
|
duration: IPrescribeAnswerData;
|
|
@@ -212,13 +211,11 @@ export interface IPrescribeAnswer {
|
|
|
212
211
|
export interface IPrescribeMark {
|
|
213
212
|
drugId: number;
|
|
214
213
|
doseId: number;
|
|
215
|
-
unitId: number;
|
|
216
214
|
routeId: number;
|
|
217
215
|
frequencyId: number;
|
|
218
216
|
durationId: number;
|
|
219
217
|
drugLabel?: string;
|
|
220
218
|
doseLabel?: string;
|
|
221
|
-
unitLabel?: string;
|
|
222
219
|
routeLabel?: string;
|
|
223
220
|
frequencyLabel?: string;
|
|
224
221
|
durationLabel?: string;
|
|
@@ -11,6 +11,7 @@ export const QUESTION_COMMENT_FIELDS = gql `
|
|
|
11
11
|
user {
|
|
12
12
|
id
|
|
13
13
|
displayName
|
|
14
|
+
accessLevel
|
|
14
15
|
}
|
|
15
16
|
dislikes
|
|
16
17
|
isLikedByMe
|
|
@@ -23,6 +24,7 @@ export const QUESTION_COMMENT_FIELDS = gql `
|
|
|
23
24
|
user {
|
|
24
25
|
id
|
|
25
26
|
displayName
|
|
27
|
+
accessLevel
|
|
26
28
|
}
|
|
27
29
|
likes
|
|
28
30
|
dislikes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ApolloCache } from '@apollo/client';
|
|
2
2
|
import { ApolloUpdateOptions, ApolloUpdateResultRestricted } from '../..';
|
|
3
|
-
import { EQuestionLike, EQuestionType, IHighlight, IQuestion, IQuestionComment, IQuestionHighlights, Id } from '../../../models';
|
|
3
|
+
import { EQuestionLike, EQuestionType, IAccessLevel, IHighlight, IQuestion, IQuestionComment, IQuestionHighlights, Id } from '../../../models';
|
|
4
4
|
import { RestrictedData, graphqlNormalize } from '../../types';
|
|
5
5
|
interface LikeData {
|
|
6
6
|
likes?: number;
|
|
@@ -22,6 +22,7 @@ export declare const updateQuestionComments: (typeId: EQuestionType) => (cache:
|
|
|
22
22
|
export declare const optimisticQuestionComment: (id: number, user: {
|
|
23
23
|
id: number;
|
|
24
24
|
displayName: string;
|
|
25
|
+
accessLevel: IAccessLevel;
|
|
25
26
|
}, input: IQuestionCommentsVar) => IQuestionCommentsData;
|
|
26
27
|
export interface IQuestionCommentsVar {
|
|
27
28
|
marksheetId?: Id;
|
|
@@ -173,7 +173,7 @@ export const updateQuestionComments = (typeId) => (cache, result, options) => {
|
|
|
173
173
|
};
|
|
174
174
|
export const optimisticQuestionComment = (id, user, input) => {
|
|
175
175
|
const { parentId, questionId, comment } = input;
|
|
176
|
-
const { displayName, id: userId } = user || {};
|
|
176
|
+
const { displayName, id: userId, accessLevel } = user || {};
|
|
177
177
|
const newComment = {
|
|
178
178
|
createdAt: new Date(),
|
|
179
179
|
id,
|
|
@@ -181,7 +181,7 @@ export const optimisticQuestionComment = (id, user, input) => {
|
|
|
181
181
|
questionId,
|
|
182
182
|
dislikes: 0,
|
|
183
183
|
isLikedByMe: EQuestionLike.NONE,
|
|
184
|
-
user: { displayName, id: userId },
|
|
184
|
+
user: { displayName, id: userId, accessLevel },
|
|
185
185
|
comment,
|
|
186
186
|
parentId: parentId ? parentId : 0,
|
|
187
187
|
replies: [],
|
|
@@ -19,7 +19,6 @@ export function mapPrescribeMarkToAnswer(obj) {
|
|
|
19
19
|
doseId: obj.dose.value,
|
|
20
20
|
durationId: obj.duration.value,
|
|
21
21
|
frequencyId: obj.frequency.value,
|
|
22
|
-
unitId: obj.unit.value,
|
|
23
22
|
routeId: obj.route.value,
|
|
24
23
|
};
|
|
25
24
|
}
|
|
@@ -28,7 +27,6 @@ export function mapPrescribeMarkToAnswer(obj) {
|
|
|
28
27
|
doseId: obj.doseId,
|
|
29
28
|
durationId: obj.durationId,
|
|
30
29
|
frequencyId: obj.frequencyId,
|
|
31
|
-
unitId: obj.unitId,
|
|
32
30
|
routeId: obj.routeId,
|
|
33
31
|
};
|
|
34
32
|
}
|