@pocketprep/types 1.19.25 → 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.
- package/Study/Class.d.ts +12 -0
- package/Study/Cloud.d.ts +15 -0
- package/package.json +1 -1
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
|