@pocketprep/types 1.19.24 → 1.19.26

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.
@@ -0,0 +1,32 @@
1
+ import { BaseResource } from './BaseResource'
2
+
3
+ /**
4
+ * Per-choice answer statistics. Keys follow Parse's `aX` (answers) / `dX`
5
+ * (distractors) form where X is 1-10; only the choices a question actually has
6
+ * are present.
7
+ */
8
+ export type ChoiceStats = Partial<Record<string, number>>
9
+
10
+ /** Flat, Parse-free global answer statistics for a single question. */
11
+ export interface QuestionMetric extends BaseResource {
12
+ /** Stable exam identifier the metric belongs to. */
13
+ examGuid: string
14
+ /** Serial of the question these stats describe. */
15
+ questionSerial: string
16
+ answeredCorrectlyCount: number
17
+ answeredIncorrectlyCount: number
18
+ choiceStats: ChoiceStats
19
+ /** @deprecated Use examMetadataId instead. */
20
+ examMetadata?: string
21
+ examMetadataId?: string
22
+ }
23
+
24
+ export interface SearchQuestionMetricsParams {
25
+ examMetadataId: string
26
+ /** Omit (or empty) to fetch every metric for the exam. */
27
+ serials?: string[]
28
+ }
29
+
30
+ export interface SearchQuestionMetricsResponse {
31
+ questionMetrics: QuestionMetric[]
32
+ }
package/API/index.d.ts CHANGED
@@ -2,6 +2,7 @@ export * from './BaseResource'
2
2
  export * from './Bundle'
3
3
  export * from './Question'
4
4
  export * from './KeywordDefinition'
5
+ export * from './QuestionMetric'
5
6
  export * from './Session'
6
7
  export * from './User'
7
8
  export * from './LevelUp'
package/CMS/Class.d.ts CHANGED
@@ -421,7 +421,6 @@ export type ExamContentPlan = Parse.Object<{
421
421
  planningStartDate?: Date
422
422
  expectedExportDate?: Date
423
423
  outlineDate?: Date
424
- newOutline?: boolean
425
424
  versionFrequency?: 'annually' | '2years' | '3years' | '4years'
426
425
  | '5years' | '6years' | '7years' | '8years' | '9years'
427
426
  objectives?: ('newExam' | 'newMockExam' | 'newQuestions'
@@ -429,7 +428,6 @@ export type ExamContentPlan = Parse.Object<{
429
428
  | 'memberConcern' | 'referenceUpdate' | 'other')[]
430
429
  upcomingJobSummary?: string
431
430
  expectedExport?: 'major' | 'minor' | 'patch'
432
- examLinks?: string
433
431
  lead?: User | Parse.Pointer
434
432
  expectedJobStartDate?: Date
435
433
  updateToExamLinks?: boolean
package/Study/Class.d.ts CHANGED
@@ -462,6 +462,17 @@ export type UserQuizSettings = {
462
462
  enableKeyboardShortcuts?: boolean
463
463
  }
464
464
 
465
+ /**
466
+ * Config that persists when a user switches between web, iOS and Android. Read it from
467
+ * `User` the same way as `webConfig`, but grouped into per-feature sub-objects so it can be extended.
468
+ */
469
+ export type CrossPlatformConfig = {
470
+ levelUpFreeTrial?: {
471
+ hasSeenLevelUpTrialSuggestion?: boolean
472
+ hasUsedLevelUpTrial?: boolean
473
+ }
474
+ }
475
+
465
476
  export type User = Parse.User<{
466
477
  username: string
467
478
  email: string
@@ -474,6 +485,7 @@ export type User = Parse.User<{
474
485
  sendStudyReminders?: boolean
475
486
  version?: string
476
487
  webConfig?: UserWebConfig
488
+ crossPlatformConfig?: CrossPlatformConfig
477
489
  currentOrganization?: Teach.Class.Organization
478
490
  lastActiveAt?: Date
479
491
  quizSettings?: UserQuizSettings
package/Study/Cloud.d.ts CHANGED
@@ -32,6 +32,7 @@ import {
32
32
  RecommendationTip,
33
33
  ConceptQuizJSON,
34
34
  QuizJSON,
35
+ CrossPlatformConfig,
35
36
  } from './Class'
36
37
 
37
38
  // DEPRECATED - previously used answer package for a quiz or qotd
@@ -473,6 +474,20 @@ export type fetchUserDataV2 = (params: {
473
474
  }
474
475
  }
475
476
 
477
+ /**
478
+ * Update the current user's `crossPlatformConfig`.
479
+ *
480
+ * `levelUpFreeTrial.hasUsedLevelUpTrial` is deliberately absent,
481
+ * it is set by the backend on level completion.
482
+ */
483
+ export type updateCrossPlatformConfig = (params: {
484
+ crossPlatformConfig: {
485
+ levelUpFreeTrial?: {
486
+ hasSeenLevelUpTrialSuggestion?: boolean
487
+ }
488
+ }
489
+ }) => CrossPlatformConfig
490
+
476
491
  export type onboardingCompleted = (params: {
477
492
  firstExamGuid: string // examGuid of exam selected during onboarding
478
493
  firstBundleId: string // Bundle.objectId of Bundle
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pocketprep/types",
3
- "version": "1.19.24",
3
+ "version": "1.19.26",
4
4
  "description": "Pocket Prep type declarations",
5
5
  "repository": {
6
6
  "type": "git",