@quesmed/types 2.6.227 → 2.6.233

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.
@@ -75,6 +75,7 @@ export interface IMarksheetSection {
75
75
  completed: boolean;
76
76
  name: string;
77
77
  intro: string;
78
+ timeLimitSeconds: number;
78
79
  marks: IMarksheetMark[];
79
80
  }
80
81
  export interface IMarksheet {
@@ -56,6 +56,7 @@ exports.MARKSHEET_SECTION_FIELDS = (0, client_1.gql) `
56
56
  completed
57
57
  name
58
58
  intro
59
+ timeLimitSeconds
59
60
  marks {
60
61
  ...MarksheetMarkFields
61
62
  }
@@ -209,7 +209,24 @@ const updateCacheOnConceptLearningStatusUpdate = (topicId, prevStatus, entitleme
209
209
  return;
210
210
  }
211
211
  const { conceptIds, status } = variables;
212
+ const entitlementIdentity = {
213
+ __ref: cache.identify({
214
+ id: entitlement,
215
+ __typename: 'Entitlement',
216
+ }),
217
+ };
212
218
  conceptIds.forEach((id) => {
219
+ if (entitlement) {
220
+ cache.writeFragment({
221
+ id: cache.identify({
222
+ id: id.toString,
223
+ entitlement: entitlementIdentity,
224
+ __typename: 'Concept',
225
+ }),
226
+ data: { status },
227
+ fragment: STATUS_CONCEPT_FRAGMENT,
228
+ });
229
+ }
213
230
  cache.writeFragment({
214
231
  id: cache.identify({ id, __typename: 'Concept' }),
215
232
  data: { status },
@@ -219,12 +236,7 @@ const updateCacheOnConceptLearningStatusUpdate = (topicId, prevStatus, entitleme
219
236
  const topicFragmentId = cache.identify({
220
237
  id: topicId.toString(),
221
238
  ...(entitlement && {
222
- entitlement: {
223
- __ref: cache.identify({
224
- id: entitlement,
225
- __typename: 'Entitlement',
226
- }),
227
- },
239
+ entitlement: entitlementIdentity,
228
240
  }),
229
241
  __typename: 'Topic',
230
242
  });
@@ -75,6 +75,7 @@ export interface IMarksheetSection {
75
75
  completed: boolean;
76
76
  name: string;
77
77
  intro: string;
78
+ timeLimitSeconds: number;
78
79
  marks: IMarksheetMark[];
79
80
  }
80
81
  export interface IMarksheet {
@@ -53,6 +53,7 @@ export const MARKSHEET_SECTION_FIELDS = gql `
53
53
  completed
54
54
  name
55
55
  intro
56
+ timeLimitSeconds
56
57
  marks {
57
58
  ...MarksheetMarkFields
58
59
  }
@@ -203,7 +203,24 @@ export const updateCacheOnConceptLearningStatusUpdate = (topicId, prevStatus, en
203
203
  return;
204
204
  }
205
205
  const { conceptIds, status } = variables;
206
+ const entitlementIdentity = {
207
+ __ref: cache.identify({
208
+ id: entitlement,
209
+ __typename: 'Entitlement',
210
+ }),
211
+ };
206
212
  conceptIds.forEach((id) => {
213
+ if (entitlement) {
214
+ cache.writeFragment({
215
+ id: cache.identify({
216
+ id: id.toString,
217
+ entitlement: entitlementIdentity,
218
+ __typename: 'Concept',
219
+ }),
220
+ data: { status },
221
+ fragment: STATUS_CONCEPT_FRAGMENT,
222
+ });
223
+ }
207
224
  cache.writeFragment({
208
225
  id: cache.identify({ id, __typename: 'Concept' }),
209
226
  data: { status },
@@ -213,12 +230,7 @@ export const updateCacheOnConceptLearningStatusUpdate = (topicId, prevStatus, en
213
230
  const topicFragmentId = cache.identify({
214
231
  id: topicId.toString(),
215
232
  ...(entitlement && {
216
- entitlement: {
217
- __ref: cache.identify({
218
- id: entitlement,
219
- __typename: 'Entitlement',
220
- }),
221
- },
233
+ entitlement: entitlementIdentity,
222
234
  }),
223
235
  __typename: 'Topic',
224
236
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quesmed/types",
3
- "version": "2.6.227",
3
+ "version": "2.6.233",
4
4
  "description": "Typescript types for Quesmed",
5
5
  "keywords": [
6
6
  "quesmed",