@pocketprep/types 1.6.45 → 1.7.2

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 CHANGED
@@ -206,6 +206,7 @@ export type SubscriptionExam = Parse.Object<SubscriptionBase & {
206
206
  export type SubscriptionBundle = Parse.Object<SubscriptionBase & {
207
207
  bundle: Bundle | Parse.Pointer
208
208
  guid: string
209
+ referral?: Referral
209
210
  }>
210
211
 
211
212
  export type Subscription = SubscriptionBundle | SubscriptionExam
@@ -410,3 +411,12 @@ export type Bundle = Parse.Object<{
410
411
  }>
411
412
 
412
413
  export type BundleJSON = ReturnType<Bundle['toJSON']>
414
+
415
+ export type Referral = Parse.Object<{
416
+ referrer: User
417
+ referrerBundle: Bundle
418
+ redeemedUsers: User[]
419
+ }>
420
+
421
+ export type ReferralJSON = ReturnType<Referral['toJSON']>
422
+ export type ReferralPayload = Payload<Referral>
package/Study/Cloud.d.ts CHANGED
@@ -20,6 +20,7 @@ import {
20
20
  User,
21
21
  UserPayload,
22
22
  MockExam,
23
+ Referral,
23
24
  } from './Class'
24
25
 
25
26
  // DEPRECATED - previously used answer package for a quiz or qotd
@@ -326,6 +327,7 @@ export type buySubscription = (params: {
326
327
  city?: string
327
328
  paymentMethodId?: string
328
329
  startTrial?: boolean
330
+ referralId?: string
329
331
  }) => SubscriptionBundle
330
332
 
331
333
  export type autorenewSubscription = (params: {
@@ -439,3 +441,5 @@ export type updateStudentInviteEmailStatus = (
439
441
  export type fetchMockExams = () => MockExam[]
440
442
 
441
443
  export type fetchMockExamQuestions = (params: { mockExamId: string }) => ExamData[]
444
+
445
+ export type validateReferral = (params: { referralId: string }) => Referral
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pocketprep/types",
3
- "version": "1.6.45",
3
+ "version": "1.7.2",
4
4
  "description": "Pocket Prep type declarations",
5
5
  "main": "",
6
6
  "repository": {