@pocketprep/types 1.19.19 → 1.19.20

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/CMS/Class.d.ts CHANGED
@@ -364,6 +364,31 @@ export type ExamExportMockExam = {
364
364
  meLength: number
365
365
  } & ExamExportQuestionTypeCounts
366
366
 
367
+ export type ExportDiff = {
368
+ jobsCount: number
369
+ subjectsCount: {
370
+ oldCount: number
371
+ newCount: number
372
+ }
373
+ subtopicsCount: {
374
+ oldCount: number
375
+ newCount: number
376
+ }
377
+ sqbCount: {
378
+ oldCount: number
379
+ newCount: number
380
+ }
381
+ mockExamsCount: {
382
+ oldCount: number
383
+ newCount: number
384
+ }
385
+ mockExams?: {
386
+ name: string
387
+ oldValue: number | 'isDisabled'
388
+ newValue: number | 'isDisabled'
389
+ }[]
390
+ }
391
+
367
392
  export type ExamExportLog = Parse.Object<{
368
393
  scenarioCount: number
369
394
  examMetadataId: string
@@ -373,10 +398,22 @@ export type ExamExportLog = Parse.Object<{
373
398
  type: 'patch' | 'minor' | 'major'
374
399
  user: User | Parse.Pointer
375
400
  mockExams: ExamExportMockExam[]
401
+ sunsetAt?: Date
402
+ exportDiff?: ExportDiff
376
403
  } & ExamExportQuestionTypeCounts>
377
404
 
378
405
  export type ExamExportLogJSON = ReturnType<ExamExportLog['toJSON']>
379
406
 
407
+ export type HistoricalChange = {
408
+ [K in keyof ExamContentPlanJSON]-?: {
409
+ changedField: K
410
+ oldValue: ExamContentPlanJSON[K]
411
+ newValue: ExamContentPlanJSON[K]
412
+ date: Date
413
+ authorUserId: string,
414
+ }
415
+ }[keyof ExamContentPlanJSON]
416
+
380
417
  export type ExamContentPlan = Parse.Object<{
381
418
  examGuid: string
382
419
  keywordStyling?: 'uppercase' | 'bold' | 'uppercase/bold' | 'none'
@@ -398,6 +435,7 @@ export type ExamContentPlan = Parse.Object<{
398
435
  newExamLinks?: string
399
436
  addingReferences?: boolean
400
437
  removingReferences?: boolean
438
+ historicalChanges?: HistoricalChange[],
401
439
  }>
402
440
 
403
441
  export type ExamContentPlanJSON = ReturnType<ExamContentPlan['toJSON']>
@@ -408,4 +446,17 @@ export type Comment = Parse.Object<{
408
446
  body: string
409
447
  }>
410
448
 
411
- export type CommentJSON = ReturnType<Comment['toJSON']>
449
+ export type CommentJSON = ReturnType<Comment['toJSON']>
450
+
451
+ export type CompletedJobLog = Parse.Object<{
452
+ objective: string
453
+ questionBank: string
454
+ writer?: User
455
+ editor?: User
456
+ startDate: Date
457
+ dueDate?: Date
458
+ summary: string
459
+ questionTypeCounts: ExamExportQuestionTypeCounts
460
+ }>
461
+
462
+ export type CompletedJobLogJSON = ReturnType<CompletedJobLog['toJSON']>
package/CMS/Cloud.d.ts CHANGED
@@ -13,6 +13,7 @@ import {
13
13
  ExamExportLogJSON,
14
14
  ExamContentPlanJSON,
15
15
  CommentJSON,
16
+ CompletedJobLogJSON,
16
17
  } from './Class'
17
18
  import {
18
19
  GlobalQuestionMetricJSON,
@@ -407,9 +408,11 @@ export type ExamContentPlanPayload = Omit<ExamContentPlanJSON, 'objectId' | 'cre
407
408
 
408
409
  export type upsertExamContentPlan = (params: ExamContentPlanPayload) => ExamContentPlanJSON
409
410
 
410
- export type fetchExamContentPlans = () => ExamContentPlanJSON[]
411
+ export type fetchExamContentPlans = (params?: { includeHistoricalChanges?: boolean }) => ExamContentPlanJSON[]
411
412
 
412
- export type fetchExamContentPlanForExamGuid = (params: { examGuid: string }) => ExamContentPlanJSON
413
+ export type fetchExamContentPlanForExamGuid = (
414
+ params: { examGuid: string, includeHistoricalChanges?: boolean }
415
+ ) => ExamContentPlanJSON
413
416
 
414
417
  export type fetchLatestMinorOrMajorExamExportLogIsoDates = () => { [examMetadataId: string]: string }
415
418
 
@@ -421,4 +424,6 @@ export type fetchCommentsByExamGuid = (params: { examGuid: string }) => CommentJ
421
424
 
422
425
  export type updateComment = (params: { objectId: string; body: string }) => CommentJSON
423
426
 
424
- export type deleteComment = (params: { objectId: string }) => true
427
+ export type deleteComment = (params: { objectId: string }) => true
428
+
429
+ export type fetchCompletedJobLogsForExamGuid = (params: { examGuid: string }) => CompletedJobLogJSON[]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pocketprep/types",
3
- "version": "1.19.19",
3
+ "version": "1.19.20",
4
4
  "description": "Pocket Prep type declarations",
5
5
  "repository": {
6
6
  "type": "git",