@pocketprep/types 1.9.2 → 1.9.4
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 +26 -0
- package/Study/Cloud.d.ts +10 -0
- package/package.json +1 -1
package/Study/Class.d.ts
CHANGED
|
@@ -31,6 +31,32 @@ export type Quiz = Parse.Object<{
|
|
|
31
31
|
export type QuizJSON = ReturnType<Quiz['toJSON']>
|
|
32
32
|
export type QuizPayload = Payload<Quiz>
|
|
33
33
|
|
|
34
|
+
export type Platform = 'Android' | 'iOS' | 'Web'
|
|
35
|
+
export type OnboardingResult = 'Free' | 'Monthly' | 'Quarterly' | 'Yearly'
|
|
36
|
+
export type UserConversion = Parse.Object<{
|
|
37
|
+
user: User | Parse.Pointer
|
|
38
|
+
mobileAppId?: string // eg com.pocketprep.app.ems
|
|
39
|
+
firstExamGuid?: string
|
|
40
|
+
firstBundleId?: string
|
|
41
|
+
signedUpOn?: Platform
|
|
42
|
+
onboardingResult?: OnboardingResult
|
|
43
|
+
firstQuizSource?: Platform
|
|
44
|
+
firstSubscriptionSource?: ReceiptSource[keyof ReceiptSource]
|
|
45
|
+
|
|
46
|
+
// dates stored in case future metrics require new calculations
|
|
47
|
+
userCreatedAt: Date
|
|
48
|
+
onboardedAt?: Date
|
|
49
|
+
firstQuizAt?: Date
|
|
50
|
+
firstSubscriptionAt?: Date
|
|
51
|
+
|
|
52
|
+
// computed values included for ELK graphs
|
|
53
|
+
daysToOnboard?: number
|
|
54
|
+
daysToFirstQuiz?: number
|
|
55
|
+
daysToFirstSubscription?: number
|
|
56
|
+
daysFromQuizToSubscription?: number
|
|
57
|
+
}>
|
|
58
|
+
export type UserConversionPayload = Payload<UserConversion>
|
|
59
|
+
|
|
34
60
|
export type UserExamMetadata = Parse.Object<{
|
|
35
61
|
examGuid: string
|
|
36
62
|
user: User | Parse.Pointer
|
package/Study/Cloud.d.ts
CHANGED
|
@@ -23,6 +23,8 @@ import {
|
|
|
23
23
|
Referral,
|
|
24
24
|
QuestionJSON,
|
|
25
25
|
Question,
|
|
26
|
+
Platform,
|
|
27
|
+
OnboardingResult,
|
|
26
28
|
} from './Class'
|
|
27
29
|
|
|
28
30
|
// DEPRECATED - previously used answer package for a quiz or qotd
|
|
@@ -334,6 +336,14 @@ export type fetchUserDataV2 = (params: {
|
|
|
334
336
|
userExamMetadata: UserExamMetadata | undefined
|
|
335
337
|
}
|
|
336
338
|
|
|
339
|
+
export type onboardingCompleted = (params: {
|
|
340
|
+
firstExamGuid: string // examGuid of exam selected during onboarding
|
|
341
|
+
firstBundleId: string // Bundle.objectId of Bundle
|
|
342
|
+
signedUpOn: Platform // Android | iOS | Web
|
|
343
|
+
onboardingResult: OnboardingResult // Free | Monthly | Quarterly | Yearly
|
|
344
|
+
mobileAppId?: string // mobile app id, if applicable. eg com.pocketprep.app.ems
|
|
345
|
+
}) => void
|
|
346
|
+
|
|
337
347
|
export type activateLicense = (params: { licenseKey: string }) => Subscription
|
|
338
348
|
|
|
339
349
|
export type activateLicenseV2 = (params: { licenseKey: string }) => { license: License; subscription: Subscription }[]
|