@quesmed/types 2.6.302 → 2.6.305

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.
Files changed (49) hide show
  1. package/dist/cjs/models/StudyGroup.d.ts +138 -0
  2. package/dist/cjs/models/StudyGroup.js +50 -0
  3. package/dist/cjs/models/index.d.ts +1 -0
  4. package/dist/cjs/models/index.js +1 -0
  5. package/dist/cjs/resolvers/fragments/index.d.ts +1 -0
  6. package/dist/cjs/resolvers/fragments/index.js +1 -0
  7. package/dist/cjs/resolvers/fragments/studyGroup.d.ts +3 -0
  8. package/dist/cjs/resolvers/fragments/studyGroup.js +80 -0
  9. package/dist/cjs/resolvers/mutation/restricted/index.d.ts +1 -0
  10. package/dist/cjs/resolvers/mutation/restricted/index.js +1 -0
  11. package/dist/cjs/resolvers/mutation/restricted/studyGroup.d.ts +7 -0
  12. package/dist/cjs/resolvers/mutation/restricted/studyGroup.js +15 -0
  13. package/dist/cjs/resolvers/mutation/validUserToken/index.d.ts +1 -0
  14. package/dist/cjs/resolvers/mutation/validUserToken/index.js +1 -0
  15. package/dist/cjs/resolvers/mutation/validUserToken/studyGroup.d.ts +12 -0
  16. package/dist/cjs/resolvers/mutation/validUserToken/studyGroup.js +23 -0
  17. package/dist/cjs/resolvers/query/index.d.ts +1 -0
  18. package/dist/cjs/resolvers/query/index.js +1 -0
  19. package/dist/cjs/resolvers/query/restricted/index.d.ts +1 -0
  20. package/dist/cjs/resolvers/query/restricted/index.js +1 -0
  21. package/dist/cjs/resolvers/query/restricted/studyGroup.d.ts +12 -0
  22. package/dist/cjs/resolvers/query/restricted/studyGroup.js +29 -0
  23. package/dist/cjs/resolvers/query/studyGroup.d.ts +12 -0
  24. package/dist/cjs/resolvers/query/studyGroup.js +45 -0
  25. package/dist/mjs/models/StudyGroup.d.ts +138 -0
  26. package/dist/mjs/models/StudyGroup.js +47 -0
  27. package/dist/mjs/models/index.d.ts +1 -0
  28. package/dist/mjs/models/index.js +1 -0
  29. package/dist/mjs/resolvers/fragments/index.d.ts +1 -0
  30. package/dist/mjs/resolvers/fragments/index.js +1 -0
  31. package/dist/mjs/resolvers/fragments/studyGroup.d.ts +3 -0
  32. package/dist/mjs/resolvers/fragments/studyGroup.js +77 -0
  33. package/dist/mjs/resolvers/mutation/restricted/index.d.ts +1 -0
  34. package/dist/mjs/resolvers/mutation/restricted/index.js +1 -0
  35. package/dist/mjs/resolvers/mutation/restricted/studyGroup.d.ts +7 -0
  36. package/dist/mjs/resolvers/mutation/restricted/studyGroup.js +12 -0
  37. package/dist/mjs/resolvers/mutation/validUserToken/index.d.ts +1 -0
  38. package/dist/mjs/resolvers/mutation/validUserToken/index.js +1 -0
  39. package/dist/mjs/resolvers/mutation/validUserToken/studyGroup.d.ts +12 -0
  40. package/dist/mjs/resolvers/mutation/validUserToken/studyGroup.js +20 -0
  41. package/dist/mjs/resolvers/query/index.d.ts +1 -0
  42. package/dist/mjs/resolvers/query/index.js +1 -0
  43. package/dist/mjs/resolvers/query/restricted/index.d.ts +1 -0
  44. package/dist/mjs/resolvers/query/restricted/index.js +1 -0
  45. package/dist/mjs/resolvers/query/restricted/studyGroup.d.ts +12 -0
  46. package/dist/mjs/resolvers/query/restricted/studyGroup.js +26 -0
  47. package/dist/mjs/resolvers/query/studyGroup.d.ts +12 -0
  48. package/dist/mjs/resolvers/query/studyGroup.js +42 -0
  49. package/package.json +1 -1
@@ -0,0 +1,138 @@
1
+ import { EProductType } from './Product';
2
+ export declare enum EStudyGroupStatus {
3
+ OPEN = "OPEN",
4
+ CLOSED = "CLOSED"
5
+ }
6
+ export declare enum EStudyGroupInviteState {
7
+ OPEN = "OPEN",
8
+ FULL = "FULL",
9
+ CLOSED = "CLOSED"
10
+ }
11
+ export declare enum EStudyGroupViewerState {
12
+ ANONYMOUS = "ANONYMOUS",
13
+ ELIGIBLE = "ELIGIBLE",
14
+ HAS_PRODUCT = "HAS_PRODUCT",
15
+ ALREADY_MEMBER = "ALREADY_MEMBER",
16
+ IN_OTHER_GROUP = "IN_OTHER_GROUP"
17
+ }
18
+ export declare enum EStudyGroupStartBlocker {
19
+ NOT_ENABLED = "NOT_ENABLED",
20
+ NO_ACTIVE_SUBSCRIPTION = "NO_ACTIVE_SUBSCRIPTION",
21
+ APP_STORE_SUBSCRIPTION = "APP_STORE_SUBSCRIPTION",
22
+ UNREFUNDABLE_SUBSCRIPTION = "UNREFUNDABLE_SUBSCRIPTION",
23
+ ALREADY_IN_GROUP = "ALREADY_IN_GROUP"
24
+ }
25
+ export declare enum EStudyGroupRefundStatus {
26
+ NONE = "NONE",
27
+ PENDING = "PENDING",
28
+ SUCCEEDED = "SUCCEEDED",
29
+ FAILED = "FAILED",
30
+ MANUAL = "MANUAL"
31
+ }
32
+ export declare enum EStudyGroupRefundType {
33
+ REFUND = "REFUND",
34
+ CREDIT = "CREDIT"
35
+ }
36
+ export declare enum EStudyGroupMemberRole {
37
+ ORGANISER = "ORGANISER",
38
+ MEMBER = "MEMBER"
39
+ }
40
+ export interface IGroupDiscountTier {
41
+ minMembers: number;
42
+ percent: number;
43
+ }
44
+ export interface IStudyGroupProduct {
45
+ id: number;
46
+ typeId: EProductType;
47
+ name: string;
48
+ duration: number;
49
+ interval: string;
50
+ price: number;
51
+ stripePriceId: string;
52
+ }
53
+ export interface IGroupDiscountOffer {
54
+ productTypeId: EProductType;
55
+ /** Product type name, e.g. "MRCP PACES Video Course" */
56
+ productName: string;
57
+ /** Every public plan of the product, cheapest first; joiners can buy any of them */
58
+ plans: IStudyGroupProduct[];
59
+ tiers: IGroupDiscountTier[];
60
+ maxMembers: number;
61
+ windowDays: number;
62
+ maxPercent: number;
63
+ }
64
+ export interface IStudyGroupInviteMember {
65
+ firstName: string;
66
+ initials: string;
67
+ isOrganiser: boolean;
68
+ }
69
+ export interface IStudyGroupInvite {
70
+ code: string;
71
+ organiserFirstName: string;
72
+ members: IStudyGroupInviteMember[];
73
+ memberCount: number;
74
+ maxMembers: number;
75
+ tiers: IGroupDiscountTier[];
76
+ currentPercent: number;
77
+ percentIfJoin: number;
78
+ refundIfJoin: number;
79
+ opensAt: number | Date;
80
+ closesAt: number | Date;
81
+ state: EStudyGroupInviteState;
82
+ viewerState: EStudyGroupViewerState;
83
+ productTypeId: EProductType;
84
+ /** Product type name, e.g. "MRCP PACES Video Course" */
85
+ productName: string;
86
+ /** Every public plan of the product, cheapest first; joiners can buy any of them */
87
+ plans: IStudyGroupProduct[];
88
+ }
89
+ export interface IStudyGroupMember {
90
+ id: number;
91
+ firstName: string;
92
+ initials: string;
93
+ role: EStudyGroupMemberRole;
94
+ isMe: boolean;
95
+ joinedAt: number | Date;
96
+ amountPaid: number;
97
+ refundEstimate: number;
98
+ }
99
+ export interface IStudyGroupMyMembership {
100
+ role: EStudyGroupMemberRole;
101
+ amountPaid: number;
102
+ currency: string;
103
+ paidAt: number | Date | null;
104
+ refundType: EStudyGroupRefundType;
105
+ refundEstimate: number;
106
+ refundStatus: EStudyGroupRefundStatus;
107
+ refundAmount: number | null;
108
+ refundedAt: number | Date | null;
109
+ /** Stripe-hosted receipt (payment + refund, with PDF download); set once the refund succeeds */
110
+ receiptUrl: string | null;
111
+ }
112
+ export interface IStudyGroup {
113
+ id: number;
114
+ code: string;
115
+ status: EStudyGroupStatus;
116
+ isFinalised: boolean;
117
+ opensAt: number | Date;
118
+ closesAt: number | Date;
119
+ closedAt: number | Date | null;
120
+ productTypeId: EProductType;
121
+ /** Product type name, e.g. "MRCP PACES Video Course" */
122
+ productName: string;
123
+ /** Every public plan of the product, cheapest first; joiners can buy any of them */
124
+ plans: IStudyGroupProduct[];
125
+ tiers: IGroupDiscountTier[];
126
+ maxMembers: number;
127
+ memberCount: number;
128
+ currentPercent: number;
129
+ finalPercent: number | null;
130
+ isOrganiser: boolean;
131
+ members: IStudyGroupMember[];
132
+ me: IStudyGroupMyMembership;
133
+ }
134
+ export interface IStudyGroupStartEligibility {
135
+ canStart: boolean;
136
+ blocker: EStudyGroupStartBlocker | null;
137
+ offer: IGroupDiscountOffer | null;
138
+ }
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EStudyGroupMemberRole = exports.EStudyGroupRefundType = exports.EStudyGroupRefundStatus = exports.EStudyGroupStartBlocker = exports.EStudyGroupViewerState = exports.EStudyGroupInviteState = exports.EStudyGroupStatus = void 0;
4
+ // Group discount ("study groups"). All money fields are in pence.
5
+ var EStudyGroupStatus;
6
+ (function (EStudyGroupStatus) {
7
+ EStudyGroupStatus["OPEN"] = "OPEN";
8
+ EStudyGroupStatus["CLOSED"] = "CLOSED";
9
+ })(EStudyGroupStatus = exports.EStudyGroupStatus || (exports.EStudyGroupStatus = {}));
10
+ var EStudyGroupInviteState;
11
+ (function (EStudyGroupInviteState) {
12
+ EStudyGroupInviteState["OPEN"] = "OPEN";
13
+ EStudyGroupInviteState["FULL"] = "FULL";
14
+ EStudyGroupInviteState["CLOSED"] = "CLOSED";
15
+ })(EStudyGroupInviteState = exports.EStudyGroupInviteState || (exports.EStudyGroupInviteState = {}));
16
+ var EStudyGroupViewerState;
17
+ (function (EStudyGroupViewerState) {
18
+ EStudyGroupViewerState["ANONYMOUS"] = "ANONYMOUS";
19
+ EStudyGroupViewerState["ELIGIBLE"] = "ELIGIBLE";
20
+ EStudyGroupViewerState["HAS_PRODUCT"] = "HAS_PRODUCT";
21
+ EStudyGroupViewerState["ALREADY_MEMBER"] = "ALREADY_MEMBER";
22
+ EStudyGroupViewerState["IN_OTHER_GROUP"] = "IN_OTHER_GROUP";
23
+ })(EStudyGroupViewerState = exports.EStudyGroupViewerState || (exports.EStudyGroupViewerState = {}));
24
+ var EStudyGroupStartBlocker;
25
+ (function (EStudyGroupStartBlocker) {
26
+ EStudyGroupStartBlocker["NOT_ENABLED"] = "NOT_ENABLED";
27
+ EStudyGroupStartBlocker["NO_ACTIVE_SUBSCRIPTION"] = "NO_ACTIVE_SUBSCRIPTION";
28
+ EStudyGroupStartBlocker["APP_STORE_SUBSCRIPTION"] = "APP_STORE_SUBSCRIPTION";
29
+ EStudyGroupStartBlocker["UNREFUNDABLE_SUBSCRIPTION"] = "UNREFUNDABLE_SUBSCRIPTION";
30
+ EStudyGroupStartBlocker["ALREADY_IN_GROUP"] = "ALREADY_IN_GROUP";
31
+ })(EStudyGroupStartBlocker = exports.EStudyGroupStartBlocker || (exports.EStudyGroupStartBlocker = {}));
32
+ var EStudyGroupRefundStatus;
33
+ (function (EStudyGroupRefundStatus) {
34
+ EStudyGroupRefundStatus["NONE"] = "NONE";
35
+ EStudyGroupRefundStatus["PENDING"] = "PENDING";
36
+ EStudyGroupRefundStatus["SUCCEEDED"] = "SUCCEEDED";
37
+ EStudyGroupRefundStatus["FAILED"] = "FAILED";
38
+ EStudyGroupRefundStatus["MANUAL"] = "MANUAL";
39
+ })(EStudyGroupRefundStatus = exports.EStudyGroupRefundStatus || (exports.EStudyGroupRefundStatus = {}));
40
+ var EStudyGroupRefundType;
41
+ (function (EStudyGroupRefundType) {
42
+ EStudyGroupRefundType["REFUND"] = "REFUND";
43
+ // reserved for app-store subscribers; not issued yet
44
+ EStudyGroupRefundType["CREDIT"] = "CREDIT";
45
+ })(EStudyGroupRefundType = exports.EStudyGroupRefundType || (exports.EStudyGroupRefundType = {}));
46
+ var EStudyGroupMemberRole;
47
+ (function (EStudyGroupMemberRole) {
48
+ EStudyGroupMemberRole["ORGANISER"] = "ORGANISER";
49
+ EStudyGroupMemberRole["MEMBER"] = "MEMBER";
50
+ })(EStudyGroupMemberRole = exports.EStudyGroupMemberRole || (exports.EStudyGroupMemberRole = {}));
@@ -31,6 +31,7 @@ export * from './Question';
31
31
  export * from './SampleQuizReport';
32
32
  export * from './Referrals';
33
33
  export * from './Subscription';
34
+ export * from './StudyGroup';
34
35
  export * from './Todo';
35
36
  export * from './Token';
36
37
  export * from './Topic';
@@ -47,6 +47,7 @@ __exportStar(require("./Question"), exports);
47
47
  __exportStar(require("./SampleQuizReport"), exports);
48
48
  __exportStar(require("./Referrals"), exports);
49
49
  __exportStar(require("./Subscription"), exports);
50
+ __exportStar(require("./StudyGroup"), exports);
50
51
  __exportStar(require("./Todo"), exports);
51
52
  __exportStar(require("./Token"), exports);
52
53
  __exportStar(require("./Topic"), exports);
@@ -8,6 +8,7 @@ export * from './mockTest';
8
8
  export * from './osce';
9
9
  export * from './picture';
10
10
  export * from './question';
11
+ export * from './studyGroup';
11
12
  export * from './topic';
12
13
  export * from './tutor';
13
14
  export * from './user';
@@ -24,6 +24,7 @@ __exportStar(require("./mockTest"), exports);
24
24
  __exportStar(require("./osce"), exports);
25
25
  __exportStar(require("./picture"), exports);
26
26
  __exportStar(require("./question"), exports);
27
+ __exportStar(require("./studyGroup"), exports);
27
28
  __exportStar(require("./topic"), exports);
28
29
  __exportStar(require("./tutor"), exports);
29
30
  __exportStar(require("./user"), exports);
@@ -0,0 +1,3 @@
1
+ export declare const STUDY_GROUP_PRODUCT_FIELDS: import("@apollo/client").DocumentNode;
2
+ export declare const GROUP_DISCOUNT_OFFER_FIELDS: import("@apollo/client").DocumentNode;
3
+ export declare const STUDY_GROUP_FIELDS: import("@apollo/client").DocumentNode;
@@ -0,0 +1,80 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.STUDY_GROUP_FIELDS = exports.GROUP_DISCOUNT_OFFER_FIELDS = exports.STUDY_GROUP_PRODUCT_FIELDS = void 0;
4
+ const client_1 = require("@apollo/client");
5
+ exports.STUDY_GROUP_PRODUCT_FIELDS = (0, client_1.gql) `
6
+ fragment StudyGroupProductFields on StudyGroupProduct {
7
+ id
8
+ typeId
9
+ name
10
+ duration
11
+ interval
12
+ price
13
+ stripePriceId
14
+ }
15
+ `;
16
+ exports.GROUP_DISCOUNT_OFFER_FIELDS = (0, client_1.gql) `
17
+ ${exports.STUDY_GROUP_PRODUCT_FIELDS}
18
+ fragment GroupDiscountOfferFields on GroupDiscountOffer {
19
+ productTypeId
20
+ productName
21
+ plans {
22
+ ...StudyGroupProductFields
23
+ }
24
+ tiers {
25
+ minMembers
26
+ percent
27
+ }
28
+ maxMembers
29
+ windowDays
30
+ maxPercent
31
+ }
32
+ `;
33
+ exports.STUDY_GROUP_FIELDS = (0, client_1.gql) `
34
+ ${exports.STUDY_GROUP_PRODUCT_FIELDS}
35
+ fragment StudyGroupFields on StudyGroup {
36
+ id
37
+ code
38
+ status
39
+ isFinalised
40
+ opensAt
41
+ closesAt
42
+ closedAt
43
+ productTypeId
44
+ productName
45
+ plans {
46
+ ...StudyGroupProductFields
47
+ }
48
+ tiers {
49
+ minMembers
50
+ percent
51
+ }
52
+ maxMembers
53
+ memberCount
54
+ currentPercent
55
+ finalPercent
56
+ isOrganiser
57
+ members {
58
+ id
59
+ firstName
60
+ initials
61
+ role
62
+ isMe
63
+ joinedAt
64
+ amountPaid
65
+ refundEstimate
66
+ }
67
+ me {
68
+ role
69
+ amountPaid
70
+ currency
71
+ paidAt
72
+ refundType
73
+ refundEstimate
74
+ refundStatus
75
+ refundAmount
76
+ refundedAt
77
+ receiptUrl
78
+ }
79
+ }
80
+ `;
@@ -12,6 +12,7 @@ export * from './preset';
12
12
  export * from './questionDiscussion';
13
13
  export * from './station';
14
14
  export * from './stripe';
15
+ export * from './studyGroup';
15
16
  export * from './todo';
16
17
  export * from './token';
17
18
  export * from './tutor';
@@ -28,6 +28,7 @@ __exportStar(require("./preset"), exports);
28
28
  __exportStar(require("./questionDiscussion"), exports);
29
29
  __exportStar(require("./station"), exports);
30
30
  __exportStar(require("./stripe"), exports);
31
+ __exportStar(require("./studyGroup"), exports);
31
32
  __exportStar(require("./todo"), exports);
32
33
  __exportStar(require("./token"), exports);
33
34
  __exportStar(require("./tutor"), exports);
@@ -0,0 +1,7 @@
1
+ import { EProductType, IStudyGroup } from '../../../models';
2
+ import { RestrictedData, graphqlNormalize } from '../../types';
3
+ export type IStartStudyGroupData = RestrictedData<graphqlNormalize & IStudyGroup, 'startStudyGroup'>;
4
+ export interface IStartStudyGroupVar {
5
+ productTypeId: EProductType;
6
+ }
7
+ export declare const START_STUDY_GROUP: import("@apollo/client").DocumentNode;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.START_STUDY_GROUP = void 0;
4
+ const client_1 = require("@apollo/client");
5
+ const fragments_1 = require("../../fragments");
6
+ exports.START_STUDY_GROUP = (0, client_1.gql) `
7
+ ${fragments_1.STUDY_GROUP_FIELDS}
8
+ mutation StartStudyGroup($productTypeId: Int!) {
9
+ restricted {
10
+ startStudyGroup(productTypeId: $productTypeId) {
11
+ ...StudyGroupFields
12
+ }
13
+ }
14
+ }
15
+ `;
@@ -1 +1,2 @@
1
1
  export * from './user';
2
+ export * from './studyGroup';
@@ -15,3 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./user"), exports);
18
+ __exportStar(require("./studyGroup"), exports);
@@ -0,0 +1,12 @@
1
+ export declare const CREATE_STUDY_GROUP_CHECKOUT_SESSION: import("@apollo/client").DocumentNode;
2
+ export interface ICreateStudyGroupCheckoutSessionVar {
3
+ code: string;
4
+ productId: number;
5
+ successUrl?: string;
6
+ cancelUrl?: string;
7
+ }
8
+ export type ICreateStudyGroupCheckoutSessionData = {
9
+ validUserToken: {
10
+ createStudyGroupCheckoutSession: string | null;
11
+ };
12
+ };
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CREATE_STUDY_GROUP_CHECKOUT_SESSION = void 0;
4
+ const client_1 = require("@apollo/client");
5
+ // Returns the Stripe Checkout session id (same as CREATE_NEW_SUBSCRIPTION_CHECKOUT_SESSION).
6
+ // productId is any plan from the group's `plans`. Promo codes are disabled on this session.
7
+ exports.CREATE_STUDY_GROUP_CHECKOUT_SESSION = (0, client_1.gql) `
8
+ mutation CreateStudyGroupCheckoutSession(
9
+ $code: String!
10
+ $productId: Int!
11
+ $successUrl: String
12
+ $cancelUrl: String
13
+ ) {
14
+ validUserToken {
15
+ createStudyGroupCheckoutSession(
16
+ code: $code
17
+ productId: $productId
18
+ successUrl: $successUrl
19
+ cancelUrl: $cancelUrl
20
+ )
21
+ }
22
+ }
23
+ `;
@@ -6,6 +6,7 @@ export * from './feedback';
6
6
  export * from './product';
7
7
  export * as restricted from './restricted';
8
8
  export * from './sample';
9
+ export * from './studyGroup';
9
10
  export * from './university';
10
11
  export * from './user';
11
12
  export * from './video';
@@ -35,6 +35,7 @@ __exportStar(require("./feedback"), exports);
35
35
  __exportStar(require("./product"), exports);
36
36
  exports.restricted = __importStar(require("./restricted"));
37
37
  __exportStar(require("./sample"), exports);
38
+ __exportStar(require("./studyGroup"), exports);
38
39
  __exportStar(require("./university"), exports);
39
40
  __exportStar(require("./user"), exports);
40
41
  __exportStar(require("./video"), exports);
@@ -16,6 +16,7 @@ export * from './quesBook';
16
16
  export * from './question';
17
17
  export * from './replication';
18
18
  export * from './station';
19
+ export * from './studyGroup';
19
20
  export * from './todos';
20
21
  export * from './topics';
21
22
  export * from './tutor';
@@ -32,6 +32,7 @@ __exportStar(require("./quesBook"), exports);
32
32
  __exportStar(require("./question"), exports);
33
33
  __exportStar(require("./replication"), exports);
34
34
  __exportStar(require("./station"), exports);
35
+ __exportStar(require("./studyGroup"), exports);
35
36
  __exportStar(require("./todos"), exports);
36
37
  __exportStar(require("./topics"), exports);
37
38
  __exportStar(require("./tutor"), exports);
@@ -0,0 +1,12 @@
1
+ import { EProductType, IStudyGroup, IStudyGroupStartEligibility } from '../../../models';
2
+ import { RestrictedData, graphqlNormalize } from '../../types';
3
+ export type IMyStudyGroupData = RestrictedData<(graphqlNormalize & IStudyGroup) | null, 'myStudyGroup'>;
4
+ export interface IMyStudyGroupVar {
5
+ productTypeId: EProductType;
6
+ }
7
+ export declare const MY_STUDY_GROUP: import("@apollo/client").DocumentNode;
8
+ export type IStudyGroupStartEligibilityData = RestrictedData<graphqlNormalize & IStudyGroupStartEligibility, 'studyGroupStartEligibility'>;
9
+ export interface IStudyGroupStartEligibilityVar {
10
+ productTypeId: EProductType;
11
+ }
12
+ export declare const STUDY_GROUP_START_ELIGIBILITY: import("@apollo/client").DocumentNode;
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.STUDY_GROUP_START_ELIGIBILITY = exports.MY_STUDY_GROUP = void 0;
4
+ const client_1 = require("@apollo/client");
5
+ const fragments_1 = require("../../fragments");
6
+ exports.MY_STUDY_GROUP = (0, client_1.gql) `
7
+ ${fragments_1.STUDY_GROUP_FIELDS}
8
+ query MyStudyGroup($productTypeId: Int!) {
9
+ restricted {
10
+ myStudyGroup(productTypeId: $productTypeId) {
11
+ ...StudyGroupFields
12
+ }
13
+ }
14
+ }
15
+ `;
16
+ exports.STUDY_GROUP_START_ELIGIBILITY = (0, client_1.gql) `
17
+ ${fragments_1.GROUP_DISCOUNT_OFFER_FIELDS}
18
+ query StudyGroupStartEligibility($productTypeId: Int!) {
19
+ restricted {
20
+ studyGroupStartEligibility(productTypeId: $productTypeId) {
21
+ canStart
22
+ blocker
23
+ offer {
24
+ ...GroupDiscountOfferFields
25
+ }
26
+ }
27
+ }
28
+ }
29
+ `;
@@ -0,0 +1,12 @@
1
+ import { EProductType, IGroupDiscountOffer, IStudyGroupInvite } from '../../models';
2
+ import { RootData, graphqlNormalize } from '../types';
3
+ export type IGroupDiscountOfferData = RootData<(graphqlNormalize & IGroupDiscountOffer) | null, 'groupDiscountOffer'>;
4
+ export interface IGroupDiscountOfferVar {
5
+ productTypeId: EProductType;
6
+ }
7
+ export declare const GROUP_DISCOUNT_OFFER: import("@apollo/client").DocumentNode;
8
+ export type IStudyGroupInviteData = RootData<(graphqlNormalize & IStudyGroupInvite) | null, 'studyGroupInvite'>;
9
+ export interface IStudyGroupInviteVar {
10
+ code: string;
11
+ }
12
+ export declare const STUDY_GROUP_INVITE: import("@apollo/client").DocumentNode;
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.STUDY_GROUP_INVITE = exports.GROUP_DISCOUNT_OFFER = void 0;
4
+ const client_1 = require("@apollo/client");
5
+ const fragments_1 = require("../fragments");
6
+ exports.GROUP_DISCOUNT_OFFER = (0, client_1.gql) `
7
+ ${fragments_1.GROUP_DISCOUNT_OFFER_FIELDS}
8
+ query GroupDiscountOffer($productTypeId: Int!) {
9
+ groupDiscountOffer(productTypeId: $productTypeId) {
10
+ ...GroupDiscountOfferFields
11
+ }
12
+ }
13
+ `;
14
+ exports.STUDY_GROUP_INVITE = (0, client_1.gql) `
15
+ ${fragments_1.STUDY_GROUP_PRODUCT_FIELDS}
16
+ query StudyGroupInvite($code: String!) {
17
+ studyGroupInvite(code: $code) {
18
+ code
19
+ organiserFirstName
20
+ members {
21
+ firstName
22
+ initials
23
+ isOrganiser
24
+ }
25
+ memberCount
26
+ maxMembers
27
+ tiers {
28
+ minMembers
29
+ percent
30
+ }
31
+ currentPercent
32
+ percentIfJoin
33
+ refundIfJoin
34
+ opensAt
35
+ closesAt
36
+ state
37
+ viewerState
38
+ productTypeId
39
+ productName
40
+ plans {
41
+ ...StudyGroupProductFields
42
+ }
43
+ }
44
+ }
45
+ `;
@@ -0,0 +1,138 @@
1
+ import { EProductType } from './Product';
2
+ export declare enum EStudyGroupStatus {
3
+ OPEN = "OPEN",
4
+ CLOSED = "CLOSED"
5
+ }
6
+ export declare enum EStudyGroupInviteState {
7
+ OPEN = "OPEN",
8
+ FULL = "FULL",
9
+ CLOSED = "CLOSED"
10
+ }
11
+ export declare enum EStudyGroupViewerState {
12
+ ANONYMOUS = "ANONYMOUS",
13
+ ELIGIBLE = "ELIGIBLE",
14
+ HAS_PRODUCT = "HAS_PRODUCT",
15
+ ALREADY_MEMBER = "ALREADY_MEMBER",
16
+ IN_OTHER_GROUP = "IN_OTHER_GROUP"
17
+ }
18
+ export declare enum EStudyGroupStartBlocker {
19
+ NOT_ENABLED = "NOT_ENABLED",
20
+ NO_ACTIVE_SUBSCRIPTION = "NO_ACTIVE_SUBSCRIPTION",
21
+ APP_STORE_SUBSCRIPTION = "APP_STORE_SUBSCRIPTION",
22
+ UNREFUNDABLE_SUBSCRIPTION = "UNREFUNDABLE_SUBSCRIPTION",
23
+ ALREADY_IN_GROUP = "ALREADY_IN_GROUP"
24
+ }
25
+ export declare enum EStudyGroupRefundStatus {
26
+ NONE = "NONE",
27
+ PENDING = "PENDING",
28
+ SUCCEEDED = "SUCCEEDED",
29
+ FAILED = "FAILED",
30
+ MANUAL = "MANUAL"
31
+ }
32
+ export declare enum EStudyGroupRefundType {
33
+ REFUND = "REFUND",
34
+ CREDIT = "CREDIT"
35
+ }
36
+ export declare enum EStudyGroupMemberRole {
37
+ ORGANISER = "ORGANISER",
38
+ MEMBER = "MEMBER"
39
+ }
40
+ export interface IGroupDiscountTier {
41
+ minMembers: number;
42
+ percent: number;
43
+ }
44
+ export interface IStudyGroupProduct {
45
+ id: number;
46
+ typeId: EProductType;
47
+ name: string;
48
+ duration: number;
49
+ interval: string;
50
+ price: number;
51
+ stripePriceId: string;
52
+ }
53
+ export interface IGroupDiscountOffer {
54
+ productTypeId: EProductType;
55
+ /** Product type name, e.g. "MRCP PACES Video Course" */
56
+ productName: string;
57
+ /** Every public plan of the product, cheapest first; joiners can buy any of them */
58
+ plans: IStudyGroupProduct[];
59
+ tiers: IGroupDiscountTier[];
60
+ maxMembers: number;
61
+ windowDays: number;
62
+ maxPercent: number;
63
+ }
64
+ export interface IStudyGroupInviteMember {
65
+ firstName: string;
66
+ initials: string;
67
+ isOrganiser: boolean;
68
+ }
69
+ export interface IStudyGroupInvite {
70
+ code: string;
71
+ organiserFirstName: string;
72
+ members: IStudyGroupInviteMember[];
73
+ memberCount: number;
74
+ maxMembers: number;
75
+ tiers: IGroupDiscountTier[];
76
+ currentPercent: number;
77
+ percentIfJoin: number;
78
+ refundIfJoin: number;
79
+ opensAt: number | Date;
80
+ closesAt: number | Date;
81
+ state: EStudyGroupInviteState;
82
+ viewerState: EStudyGroupViewerState;
83
+ productTypeId: EProductType;
84
+ /** Product type name, e.g. "MRCP PACES Video Course" */
85
+ productName: string;
86
+ /** Every public plan of the product, cheapest first; joiners can buy any of them */
87
+ plans: IStudyGroupProduct[];
88
+ }
89
+ export interface IStudyGroupMember {
90
+ id: number;
91
+ firstName: string;
92
+ initials: string;
93
+ role: EStudyGroupMemberRole;
94
+ isMe: boolean;
95
+ joinedAt: number | Date;
96
+ amountPaid: number;
97
+ refundEstimate: number;
98
+ }
99
+ export interface IStudyGroupMyMembership {
100
+ role: EStudyGroupMemberRole;
101
+ amountPaid: number;
102
+ currency: string;
103
+ paidAt: number | Date | null;
104
+ refundType: EStudyGroupRefundType;
105
+ refundEstimate: number;
106
+ refundStatus: EStudyGroupRefundStatus;
107
+ refundAmount: number | null;
108
+ refundedAt: number | Date | null;
109
+ /** Stripe-hosted receipt (payment + refund, with PDF download); set once the refund succeeds */
110
+ receiptUrl: string | null;
111
+ }
112
+ export interface IStudyGroup {
113
+ id: number;
114
+ code: string;
115
+ status: EStudyGroupStatus;
116
+ isFinalised: boolean;
117
+ opensAt: number | Date;
118
+ closesAt: number | Date;
119
+ closedAt: number | Date | null;
120
+ productTypeId: EProductType;
121
+ /** Product type name, e.g. "MRCP PACES Video Course" */
122
+ productName: string;
123
+ /** Every public plan of the product, cheapest first; joiners can buy any of them */
124
+ plans: IStudyGroupProduct[];
125
+ tiers: IGroupDiscountTier[];
126
+ maxMembers: number;
127
+ memberCount: number;
128
+ currentPercent: number;
129
+ finalPercent: number | null;
130
+ isOrganiser: boolean;
131
+ members: IStudyGroupMember[];
132
+ me: IStudyGroupMyMembership;
133
+ }
134
+ export interface IStudyGroupStartEligibility {
135
+ canStart: boolean;
136
+ blocker: EStudyGroupStartBlocker | null;
137
+ offer: IGroupDiscountOffer | null;
138
+ }
@@ -0,0 +1,47 @@
1
+ // Group discount ("study groups"). All money fields are in pence.
2
+ export var EStudyGroupStatus;
3
+ (function (EStudyGroupStatus) {
4
+ EStudyGroupStatus["OPEN"] = "OPEN";
5
+ EStudyGroupStatus["CLOSED"] = "CLOSED";
6
+ })(EStudyGroupStatus || (EStudyGroupStatus = {}));
7
+ export var EStudyGroupInviteState;
8
+ (function (EStudyGroupInviteState) {
9
+ EStudyGroupInviteState["OPEN"] = "OPEN";
10
+ EStudyGroupInviteState["FULL"] = "FULL";
11
+ EStudyGroupInviteState["CLOSED"] = "CLOSED";
12
+ })(EStudyGroupInviteState || (EStudyGroupInviteState = {}));
13
+ export var EStudyGroupViewerState;
14
+ (function (EStudyGroupViewerState) {
15
+ EStudyGroupViewerState["ANONYMOUS"] = "ANONYMOUS";
16
+ EStudyGroupViewerState["ELIGIBLE"] = "ELIGIBLE";
17
+ EStudyGroupViewerState["HAS_PRODUCT"] = "HAS_PRODUCT";
18
+ EStudyGroupViewerState["ALREADY_MEMBER"] = "ALREADY_MEMBER";
19
+ EStudyGroupViewerState["IN_OTHER_GROUP"] = "IN_OTHER_GROUP";
20
+ })(EStudyGroupViewerState || (EStudyGroupViewerState = {}));
21
+ export var EStudyGroupStartBlocker;
22
+ (function (EStudyGroupStartBlocker) {
23
+ EStudyGroupStartBlocker["NOT_ENABLED"] = "NOT_ENABLED";
24
+ EStudyGroupStartBlocker["NO_ACTIVE_SUBSCRIPTION"] = "NO_ACTIVE_SUBSCRIPTION";
25
+ EStudyGroupStartBlocker["APP_STORE_SUBSCRIPTION"] = "APP_STORE_SUBSCRIPTION";
26
+ EStudyGroupStartBlocker["UNREFUNDABLE_SUBSCRIPTION"] = "UNREFUNDABLE_SUBSCRIPTION";
27
+ EStudyGroupStartBlocker["ALREADY_IN_GROUP"] = "ALREADY_IN_GROUP";
28
+ })(EStudyGroupStartBlocker || (EStudyGroupStartBlocker = {}));
29
+ export var EStudyGroupRefundStatus;
30
+ (function (EStudyGroupRefundStatus) {
31
+ EStudyGroupRefundStatus["NONE"] = "NONE";
32
+ EStudyGroupRefundStatus["PENDING"] = "PENDING";
33
+ EStudyGroupRefundStatus["SUCCEEDED"] = "SUCCEEDED";
34
+ EStudyGroupRefundStatus["FAILED"] = "FAILED";
35
+ EStudyGroupRefundStatus["MANUAL"] = "MANUAL";
36
+ })(EStudyGroupRefundStatus || (EStudyGroupRefundStatus = {}));
37
+ export var EStudyGroupRefundType;
38
+ (function (EStudyGroupRefundType) {
39
+ EStudyGroupRefundType["REFUND"] = "REFUND";
40
+ // reserved for app-store subscribers; not issued yet
41
+ EStudyGroupRefundType["CREDIT"] = "CREDIT";
42
+ })(EStudyGroupRefundType || (EStudyGroupRefundType = {}));
43
+ export var EStudyGroupMemberRole;
44
+ (function (EStudyGroupMemberRole) {
45
+ EStudyGroupMemberRole["ORGANISER"] = "ORGANISER";
46
+ EStudyGroupMemberRole["MEMBER"] = "MEMBER";
47
+ })(EStudyGroupMemberRole || (EStudyGroupMemberRole = {}));
@@ -31,6 +31,7 @@ export * from './Question';
31
31
  export * from './SampleQuizReport';
32
32
  export * from './Referrals';
33
33
  export * from './Subscription';
34
+ export * from './StudyGroup';
34
35
  export * from './Todo';
35
36
  export * from './Token';
36
37
  export * from './Topic';
@@ -31,6 +31,7 @@ export * from './Question';
31
31
  export * from './SampleQuizReport';
32
32
  export * from './Referrals';
33
33
  export * from './Subscription';
34
+ export * from './StudyGroup';
34
35
  export * from './Todo';
35
36
  export * from './Token';
36
37
  export * from './Topic';
@@ -8,6 +8,7 @@ export * from './mockTest';
8
8
  export * from './osce';
9
9
  export * from './picture';
10
10
  export * from './question';
11
+ export * from './studyGroup';
11
12
  export * from './topic';
12
13
  export * from './tutor';
13
14
  export * from './user';
@@ -8,6 +8,7 @@ export * from './mockTest';
8
8
  export * from './osce';
9
9
  export * from './picture';
10
10
  export * from './question';
11
+ export * from './studyGroup';
11
12
  export * from './topic';
12
13
  export * from './tutor';
13
14
  export * from './user';
@@ -0,0 +1,3 @@
1
+ export declare const STUDY_GROUP_PRODUCT_FIELDS: import("@apollo/client").DocumentNode;
2
+ export declare const GROUP_DISCOUNT_OFFER_FIELDS: import("@apollo/client").DocumentNode;
3
+ export declare const STUDY_GROUP_FIELDS: import("@apollo/client").DocumentNode;
@@ -0,0 +1,77 @@
1
+ import { gql } from '@apollo/client';
2
+ export const STUDY_GROUP_PRODUCT_FIELDS = gql `
3
+ fragment StudyGroupProductFields on StudyGroupProduct {
4
+ id
5
+ typeId
6
+ name
7
+ duration
8
+ interval
9
+ price
10
+ stripePriceId
11
+ }
12
+ `;
13
+ export const GROUP_DISCOUNT_OFFER_FIELDS = gql `
14
+ ${STUDY_GROUP_PRODUCT_FIELDS}
15
+ fragment GroupDiscountOfferFields on GroupDiscountOffer {
16
+ productTypeId
17
+ productName
18
+ plans {
19
+ ...StudyGroupProductFields
20
+ }
21
+ tiers {
22
+ minMembers
23
+ percent
24
+ }
25
+ maxMembers
26
+ windowDays
27
+ maxPercent
28
+ }
29
+ `;
30
+ export const STUDY_GROUP_FIELDS = gql `
31
+ ${STUDY_GROUP_PRODUCT_FIELDS}
32
+ fragment StudyGroupFields on StudyGroup {
33
+ id
34
+ code
35
+ status
36
+ isFinalised
37
+ opensAt
38
+ closesAt
39
+ closedAt
40
+ productTypeId
41
+ productName
42
+ plans {
43
+ ...StudyGroupProductFields
44
+ }
45
+ tiers {
46
+ minMembers
47
+ percent
48
+ }
49
+ maxMembers
50
+ memberCount
51
+ currentPercent
52
+ finalPercent
53
+ isOrganiser
54
+ members {
55
+ id
56
+ firstName
57
+ initials
58
+ role
59
+ isMe
60
+ joinedAt
61
+ amountPaid
62
+ refundEstimate
63
+ }
64
+ me {
65
+ role
66
+ amountPaid
67
+ currency
68
+ paidAt
69
+ refundType
70
+ refundEstimate
71
+ refundStatus
72
+ refundAmount
73
+ refundedAt
74
+ receiptUrl
75
+ }
76
+ }
77
+ `;
@@ -12,6 +12,7 @@ export * from './preset';
12
12
  export * from './questionDiscussion';
13
13
  export * from './station';
14
14
  export * from './stripe';
15
+ export * from './studyGroup';
15
16
  export * from './todo';
16
17
  export * from './token';
17
18
  export * from './tutor';
@@ -12,6 +12,7 @@ export * from './preset';
12
12
  export * from './questionDiscussion';
13
13
  export * from './station';
14
14
  export * from './stripe';
15
+ export * from './studyGroup';
15
16
  export * from './todo';
16
17
  export * from './token';
17
18
  export * from './tutor';
@@ -0,0 +1,7 @@
1
+ import { EProductType, IStudyGroup } from '../../../models';
2
+ import { RestrictedData, graphqlNormalize } from '../../types';
3
+ export type IStartStudyGroupData = RestrictedData<graphqlNormalize & IStudyGroup, 'startStudyGroup'>;
4
+ export interface IStartStudyGroupVar {
5
+ productTypeId: EProductType;
6
+ }
7
+ export declare const START_STUDY_GROUP: import("@apollo/client").DocumentNode;
@@ -0,0 +1,12 @@
1
+ import { gql } from '@apollo/client';
2
+ import { STUDY_GROUP_FIELDS } from '../../fragments';
3
+ export const START_STUDY_GROUP = gql `
4
+ ${STUDY_GROUP_FIELDS}
5
+ mutation StartStudyGroup($productTypeId: Int!) {
6
+ restricted {
7
+ startStudyGroup(productTypeId: $productTypeId) {
8
+ ...StudyGroupFields
9
+ }
10
+ }
11
+ }
12
+ `;
@@ -1 +1,2 @@
1
1
  export * from './user';
2
+ export * from './studyGroup';
@@ -1 +1,2 @@
1
1
  export * from './user';
2
+ export * from './studyGroup';
@@ -0,0 +1,12 @@
1
+ export declare const CREATE_STUDY_GROUP_CHECKOUT_SESSION: import("@apollo/client").DocumentNode;
2
+ export interface ICreateStudyGroupCheckoutSessionVar {
3
+ code: string;
4
+ productId: number;
5
+ successUrl?: string;
6
+ cancelUrl?: string;
7
+ }
8
+ export type ICreateStudyGroupCheckoutSessionData = {
9
+ validUserToken: {
10
+ createStudyGroupCheckoutSession: string | null;
11
+ };
12
+ };
@@ -0,0 +1,20 @@
1
+ import { gql } from '@apollo/client';
2
+ // Returns the Stripe Checkout session id (same as CREATE_NEW_SUBSCRIPTION_CHECKOUT_SESSION).
3
+ // productId is any plan from the group's `plans`. Promo codes are disabled on this session.
4
+ export const CREATE_STUDY_GROUP_CHECKOUT_SESSION = gql `
5
+ mutation CreateStudyGroupCheckoutSession(
6
+ $code: String!
7
+ $productId: Int!
8
+ $successUrl: String
9
+ $cancelUrl: String
10
+ ) {
11
+ validUserToken {
12
+ createStudyGroupCheckoutSession(
13
+ code: $code
14
+ productId: $productId
15
+ successUrl: $successUrl
16
+ cancelUrl: $cancelUrl
17
+ )
18
+ }
19
+ }
20
+ `;
@@ -6,6 +6,7 @@ export * from './feedback';
6
6
  export * from './product';
7
7
  export * as restricted from './restricted';
8
8
  export * from './sample';
9
+ export * from './studyGroup';
9
10
  export * from './university';
10
11
  export * from './user';
11
12
  export * from './video';
@@ -6,6 +6,7 @@ export * from './feedback';
6
6
  export * from './product';
7
7
  export * as restricted from './restricted';
8
8
  export * from './sample';
9
+ export * from './studyGroup';
9
10
  export * from './university';
10
11
  export * from './user';
11
12
  export * from './video';
@@ -16,6 +16,7 @@ export * from './quesBook';
16
16
  export * from './question';
17
17
  export * from './replication';
18
18
  export * from './station';
19
+ export * from './studyGroup';
19
20
  export * from './todos';
20
21
  export * from './topics';
21
22
  export * from './tutor';
@@ -16,6 +16,7 @@ export * from './quesBook';
16
16
  export * from './question';
17
17
  export * from './replication';
18
18
  export * from './station';
19
+ export * from './studyGroup';
19
20
  export * from './todos';
20
21
  export * from './topics';
21
22
  export * from './tutor';
@@ -0,0 +1,12 @@
1
+ import { EProductType, IStudyGroup, IStudyGroupStartEligibility } from '../../../models';
2
+ import { RestrictedData, graphqlNormalize } from '../../types';
3
+ export type IMyStudyGroupData = RestrictedData<(graphqlNormalize & IStudyGroup) | null, 'myStudyGroup'>;
4
+ export interface IMyStudyGroupVar {
5
+ productTypeId: EProductType;
6
+ }
7
+ export declare const MY_STUDY_GROUP: import("@apollo/client").DocumentNode;
8
+ export type IStudyGroupStartEligibilityData = RestrictedData<graphqlNormalize & IStudyGroupStartEligibility, 'studyGroupStartEligibility'>;
9
+ export interface IStudyGroupStartEligibilityVar {
10
+ productTypeId: EProductType;
11
+ }
12
+ export declare const STUDY_GROUP_START_ELIGIBILITY: import("@apollo/client").DocumentNode;
@@ -0,0 +1,26 @@
1
+ import { gql } from '@apollo/client';
2
+ import { GROUP_DISCOUNT_OFFER_FIELDS, STUDY_GROUP_FIELDS, } from '../../fragments';
3
+ export const MY_STUDY_GROUP = gql `
4
+ ${STUDY_GROUP_FIELDS}
5
+ query MyStudyGroup($productTypeId: Int!) {
6
+ restricted {
7
+ myStudyGroup(productTypeId: $productTypeId) {
8
+ ...StudyGroupFields
9
+ }
10
+ }
11
+ }
12
+ `;
13
+ export const STUDY_GROUP_START_ELIGIBILITY = gql `
14
+ ${GROUP_DISCOUNT_OFFER_FIELDS}
15
+ query StudyGroupStartEligibility($productTypeId: Int!) {
16
+ restricted {
17
+ studyGroupStartEligibility(productTypeId: $productTypeId) {
18
+ canStart
19
+ blocker
20
+ offer {
21
+ ...GroupDiscountOfferFields
22
+ }
23
+ }
24
+ }
25
+ }
26
+ `;
@@ -0,0 +1,12 @@
1
+ import { EProductType, IGroupDiscountOffer, IStudyGroupInvite } from '../../models';
2
+ import { RootData, graphqlNormalize } from '../types';
3
+ export type IGroupDiscountOfferData = RootData<(graphqlNormalize & IGroupDiscountOffer) | null, 'groupDiscountOffer'>;
4
+ export interface IGroupDiscountOfferVar {
5
+ productTypeId: EProductType;
6
+ }
7
+ export declare const GROUP_DISCOUNT_OFFER: import("@apollo/client").DocumentNode;
8
+ export type IStudyGroupInviteData = RootData<(graphqlNormalize & IStudyGroupInvite) | null, 'studyGroupInvite'>;
9
+ export interface IStudyGroupInviteVar {
10
+ code: string;
11
+ }
12
+ export declare const STUDY_GROUP_INVITE: import("@apollo/client").DocumentNode;
@@ -0,0 +1,42 @@
1
+ import { gql } from '@apollo/client';
2
+ import { GROUP_DISCOUNT_OFFER_FIELDS, STUDY_GROUP_PRODUCT_FIELDS, } from '../fragments';
3
+ export const GROUP_DISCOUNT_OFFER = gql `
4
+ ${GROUP_DISCOUNT_OFFER_FIELDS}
5
+ query GroupDiscountOffer($productTypeId: Int!) {
6
+ groupDiscountOffer(productTypeId: $productTypeId) {
7
+ ...GroupDiscountOfferFields
8
+ }
9
+ }
10
+ `;
11
+ export const STUDY_GROUP_INVITE = gql `
12
+ ${STUDY_GROUP_PRODUCT_FIELDS}
13
+ query StudyGroupInvite($code: String!) {
14
+ studyGroupInvite(code: $code) {
15
+ code
16
+ organiserFirstName
17
+ members {
18
+ firstName
19
+ initials
20
+ isOrganiser
21
+ }
22
+ memberCount
23
+ maxMembers
24
+ tiers {
25
+ minMembers
26
+ percent
27
+ }
28
+ currentPercent
29
+ percentIfJoin
30
+ refundIfJoin
31
+ opensAt
32
+ closesAt
33
+ state
34
+ viewerState
35
+ productTypeId
36
+ productName
37
+ plans {
38
+ ...StudyGroupProductFields
39
+ }
40
+ }
41
+ }
42
+ `;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quesmed/types",
3
- "version": "2.6.302",
3
+ "version": "2.6.305",
4
4
  "description": "Typescript types for Quesmed",
5
5
  "keywords": [
6
6
  "quesmed",