@quesmed/types 2.6.301 → 2.6.303

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 (53) hide show
  1. package/dist/cjs/models/StudyGroup.d.ts +126 -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 +76 -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 +11 -0
  16. package/dist/cjs/resolvers/mutation/validUserToken/studyGroup.js +21 -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/marksheet.d.ts +1 -0
  22. package/dist/cjs/resolvers/query/restricted/marksheet.js +9 -2
  23. package/dist/cjs/resolvers/query/restricted/studyGroup.d.ts +12 -0
  24. package/dist/cjs/resolvers/query/restricted/studyGroup.js +29 -0
  25. package/dist/cjs/resolvers/query/studyGroup.d.ts +12 -0
  26. package/dist/cjs/resolvers/query/studyGroup.js +43 -0
  27. package/dist/mjs/models/StudyGroup.d.ts +126 -0
  28. package/dist/mjs/models/StudyGroup.js +47 -0
  29. package/dist/mjs/models/index.d.ts +1 -0
  30. package/dist/mjs/models/index.js +1 -0
  31. package/dist/mjs/resolvers/fragments/index.d.ts +1 -0
  32. package/dist/mjs/resolvers/fragments/index.js +1 -0
  33. package/dist/mjs/resolvers/fragments/studyGroup.d.ts +3 -0
  34. package/dist/mjs/resolvers/fragments/studyGroup.js +73 -0
  35. package/dist/mjs/resolvers/mutation/restricted/index.d.ts +1 -0
  36. package/dist/mjs/resolvers/mutation/restricted/index.js +1 -0
  37. package/dist/mjs/resolvers/mutation/restricted/studyGroup.d.ts +7 -0
  38. package/dist/mjs/resolvers/mutation/restricted/studyGroup.js +12 -0
  39. package/dist/mjs/resolvers/mutation/validUserToken/index.d.ts +1 -0
  40. package/dist/mjs/resolvers/mutation/validUserToken/index.js +1 -0
  41. package/dist/mjs/resolvers/mutation/validUserToken/studyGroup.d.ts +11 -0
  42. package/dist/mjs/resolvers/mutation/validUserToken/studyGroup.js +18 -0
  43. package/dist/mjs/resolvers/query/index.d.ts +1 -0
  44. package/dist/mjs/resolvers/query/index.js +1 -0
  45. package/dist/mjs/resolvers/query/restricted/index.d.ts +1 -0
  46. package/dist/mjs/resolvers/query/restricted/index.js +1 -0
  47. package/dist/mjs/resolvers/query/restricted/marksheet.d.ts +1 -0
  48. package/dist/mjs/resolvers/query/restricted/marksheet.js +9 -2
  49. package/dist/mjs/resolvers/query/restricted/studyGroup.d.ts +12 -0
  50. package/dist/mjs/resolvers/query/restricted/studyGroup.js +26 -0
  51. package/dist/mjs/resolvers/query/studyGroup.d.ts +12 -0
  52. package/dist/mjs/resolvers/query/studyGroup.js +40 -0
  53. package/package.json +1 -1
@@ -0,0 +1,126 @@
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
+ product: IStudyGroupProduct;
55
+ tiers: IGroupDiscountTier[];
56
+ maxMembers: number;
57
+ windowDays: number;
58
+ maxPercent: number;
59
+ }
60
+ export interface IStudyGroupInviteMember {
61
+ firstName: string;
62
+ initials: string;
63
+ isOrganiser: boolean;
64
+ }
65
+ export interface IStudyGroupInvite {
66
+ code: string;
67
+ organiserFirstName: string;
68
+ members: IStudyGroupInviteMember[];
69
+ memberCount: number;
70
+ maxMembers: number;
71
+ tiers: IGroupDiscountTier[];
72
+ currentPercent: number;
73
+ percentIfJoin: number;
74
+ refundIfJoin: number;
75
+ opensAt: number | Date;
76
+ closesAt: number | Date;
77
+ state: EStudyGroupInviteState;
78
+ viewerState: EStudyGroupViewerState;
79
+ product: IStudyGroupProduct;
80
+ }
81
+ export interface IStudyGroupMember {
82
+ id: number;
83
+ firstName: string;
84
+ initials: string;
85
+ role: EStudyGroupMemberRole;
86
+ isMe: boolean;
87
+ joinedAt: number | Date;
88
+ amountPaid: number;
89
+ refundEstimate: number;
90
+ }
91
+ export interface IStudyGroupMyMembership {
92
+ role: EStudyGroupMemberRole;
93
+ amountPaid: number;
94
+ currency: string;
95
+ paidAt: number | Date | null;
96
+ refundType: EStudyGroupRefundType;
97
+ refundEstimate: number;
98
+ refundStatus: EStudyGroupRefundStatus;
99
+ refundAmount: number | null;
100
+ refundedAt: number | Date | null;
101
+ /** Stripe-hosted receipt (payment + refund, with PDF download); set once the refund succeeds */
102
+ receiptUrl: string | null;
103
+ }
104
+ export interface IStudyGroup {
105
+ id: number;
106
+ code: string;
107
+ status: EStudyGroupStatus;
108
+ isFinalised: boolean;
109
+ opensAt: number | Date;
110
+ closesAt: number | Date;
111
+ closedAt: number | Date | null;
112
+ product: IStudyGroupProduct;
113
+ tiers: IGroupDiscountTier[];
114
+ maxMembers: number;
115
+ memberCount: number;
116
+ currentPercent: number;
117
+ finalPercent: number | null;
118
+ isOrganiser: boolean;
119
+ members: IStudyGroupMember[];
120
+ me: IStudyGroupMyMembership;
121
+ }
122
+ export interface IStudyGroupStartEligibility {
123
+ canStart: boolean;
124
+ blocker: EStudyGroupStartBlocker | null;
125
+ offer: IGroupDiscountOffer | null;
126
+ }
@@ -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,76 @@
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
+ product {
20
+ ...StudyGroupProductFields
21
+ }
22
+ tiers {
23
+ minMembers
24
+ percent
25
+ }
26
+ maxMembers
27
+ windowDays
28
+ maxPercent
29
+ }
30
+ `;
31
+ exports.STUDY_GROUP_FIELDS = (0, client_1.gql) `
32
+ ${exports.STUDY_GROUP_PRODUCT_FIELDS}
33
+ fragment StudyGroupFields on StudyGroup {
34
+ id
35
+ code
36
+ status
37
+ isFinalised
38
+ opensAt
39
+ closesAt
40
+ closedAt
41
+ product {
42
+ ...StudyGroupProductFields
43
+ }
44
+ tiers {
45
+ minMembers
46
+ percent
47
+ }
48
+ maxMembers
49
+ memberCount
50
+ currentPercent
51
+ finalPercent
52
+ isOrganiser
53
+ members {
54
+ id
55
+ firstName
56
+ initials
57
+ role
58
+ isMe
59
+ joinedAt
60
+ amountPaid
61
+ refundEstimate
62
+ }
63
+ me {
64
+ role
65
+ amountPaid
66
+ currency
67
+ paidAt
68
+ refundType
69
+ refundEstimate
70
+ refundStatus
71
+ refundAmount
72
+ refundedAt
73
+ receiptUrl
74
+ }
75
+ }
76
+ `;
@@ -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,11 @@
1
+ export declare const CREATE_STUDY_GROUP_CHECKOUT_SESSION: import("@apollo/client").DocumentNode;
2
+ export interface ICreateStudyGroupCheckoutSessionVar {
3
+ code: string;
4
+ successUrl?: string;
5
+ cancelUrl?: string;
6
+ }
7
+ export type ICreateStudyGroupCheckoutSessionData = {
8
+ validUserToken: {
9
+ createStudyGroupCheckoutSession: string | null;
10
+ };
11
+ };
@@ -0,0 +1,21 @@
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
+ // 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
+ $successUrl: String
11
+ $cancelUrl: String
12
+ ) {
13
+ validUserToken {
14
+ createStudyGroupCheckoutSession(
15
+ code: $code
16
+ successUrl: $successUrl
17
+ cancelUrl: $cancelUrl
18
+ )
19
+ }
20
+ }
21
+ `;
@@ -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);
@@ -33,6 +33,7 @@ export interface IMarksheetsVar {
33
33
  lastId?: number;
34
34
  solo?: boolean;
35
35
  mockTestId?: number;
36
+ updatedAfter?: number;
36
37
  };
37
38
  }
38
39
  export type IMarksheetList = RestrictedData<graphqlNormalize & {
@@ -55,14 +55,21 @@ exports.MARKSHEET_LIST = (0, client_1.gql) `
55
55
  marksheetList(options: $options) {
56
56
  results {
57
57
  id
58
+ source
58
59
  endedAt
59
- stats {
60
- ...MarksheetStatsFields
60
+ topicNames
61
+ entitlement {
62
+ id
63
+ name
61
64
  }
62
65
  isTestMarksheet
63
66
  solo
64
67
  completed
68
+ createdAt
65
69
  updatedAt
70
+ stats {
71
+ ...MarksheetStatsFields
72
+ }
66
73
  }
67
74
  total
68
75
  }
@@ -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 IGroupDiscountOffersData = RootData<(graphqlNormalize & IGroupDiscountOffer)[], 'groupDiscountOffers'>;
4
+ export interface IGroupDiscountOffersVar {
5
+ productTypeId: EProductType;
6
+ }
7
+ export declare const GROUP_DISCOUNT_OFFERS: 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,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.STUDY_GROUP_INVITE = exports.GROUP_DISCOUNT_OFFERS = void 0;
4
+ const client_1 = require("@apollo/client");
5
+ const fragments_1 = require("../fragments");
6
+ exports.GROUP_DISCOUNT_OFFERS = (0, client_1.gql) `
7
+ ${fragments_1.GROUP_DISCOUNT_OFFER_FIELDS}
8
+ query GroupDiscountOffers($productTypeId: Int!) {
9
+ groupDiscountOffers(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
+ product {
39
+ ...StudyGroupProductFields
40
+ }
41
+ }
42
+ }
43
+ `;
@@ -0,0 +1,126 @@
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
+ product: IStudyGroupProduct;
55
+ tiers: IGroupDiscountTier[];
56
+ maxMembers: number;
57
+ windowDays: number;
58
+ maxPercent: number;
59
+ }
60
+ export interface IStudyGroupInviteMember {
61
+ firstName: string;
62
+ initials: string;
63
+ isOrganiser: boolean;
64
+ }
65
+ export interface IStudyGroupInvite {
66
+ code: string;
67
+ organiserFirstName: string;
68
+ members: IStudyGroupInviteMember[];
69
+ memberCount: number;
70
+ maxMembers: number;
71
+ tiers: IGroupDiscountTier[];
72
+ currentPercent: number;
73
+ percentIfJoin: number;
74
+ refundIfJoin: number;
75
+ opensAt: number | Date;
76
+ closesAt: number | Date;
77
+ state: EStudyGroupInviteState;
78
+ viewerState: EStudyGroupViewerState;
79
+ product: IStudyGroupProduct;
80
+ }
81
+ export interface IStudyGroupMember {
82
+ id: number;
83
+ firstName: string;
84
+ initials: string;
85
+ role: EStudyGroupMemberRole;
86
+ isMe: boolean;
87
+ joinedAt: number | Date;
88
+ amountPaid: number;
89
+ refundEstimate: number;
90
+ }
91
+ export interface IStudyGroupMyMembership {
92
+ role: EStudyGroupMemberRole;
93
+ amountPaid: number;
94
+ currency: string;
95
+ paidAt: number | Date | null;
96
+ refundType: EStudyGroupRefundType;
97
+ refundEstimate: number;
98
+ refundStatus: EStudyGroupRefundStatus;
99
+ refundAmount: number | null;
100
+ refundedAt: number | Date | null;
101
+ /** Stripe-hosted receipt (payment + refund, with PDF download); set once the refund succeeds */
102
+ receiptUrl: string | null;
103
+ }
104
+ export interface IStudyGroup {
105
+ id: number;
106
+ code: string;
107
+ status: EStudyGroupStatus;
108
+ isFinalised: boolean;
109
+ opensAt: number | Date;
110
+ closesAt: number | Date;
111
+ closedAt: number | Date | null;
112
+ product: IStudyGroupProduct;
113
+ tiers: IGroupDiscountTier[];
114
+ maxMembers: number;
115
+ memberCount: number;
116
+ currentPercent: number;
117
+ finalPercent: number | null;
118
+ isOrganiser: boolean;
119
+ members: IStudyGroupMember[];
120
+ me: IStudyGroupMyMembership;
121
+ }
122
+ export interface IStudyGroupStartEligibility {
123
+ canStart: boolean;
124
+ blocker: EStudyGroupStartBlocker | null;
125
+ offer: IGroupDiscountOffer | null;
126
+ }
@@ -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,73 @@
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
+ product {
17
+ ...StudyGroupProductFields
18
+ }
19
+ tiers {
20
+ minMembers
21
+ percent
22
+ }
23
+ maxMembers
24
+ windowDays
25
+ maxPercent
26
+ }
27
+ `;
28
+ export const STUDY_GROUP_FIELDS = gql `
29
+ ${STUDY_GROUP_PRODUCT_FIELDS}
30
+ fragment StudyGroupFields on StudyGroup {
31
+ id
32
+ code
33
+ status
34
+ isFinalised
35
+ opensAt
36
+ closesAt
37
+ closedAt
38
+ product {
39
+ ...StudyGroupProductFields
40
+ }
41
+ tiers {
42
+ minMembers
43
+ percent
44
+ }
45
+ maxMembers
46
+ memberCount
47
+ currentPercent
48
+ finalPercent
49
+ isOrganiser
50
+ members {
51
+ id
52
+ firstName
53
+ initials
54
+ role
55
+ isMe
56
+ joinedAt
57
+ amountPaid
58
+ refundEstimate
59
+ }
60
+ me {
61
+ role
62
+ amountPaid
63
+ currency
64
+ paidAt
65
+ refundType
66
+ refundEstimate
67
+ refundStatus
68
+ refundAmount
69
+ refundedAt
70
+ receiptUrl
71
+ }
72
+ }
73
+ `;
@@ -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,11 @@
1
+ export declare const CREATE_STUDY_GROUP_CHECKOUT_SESSION: import("@apollo/client").DocumentNode;
2
+ export interface ICreateStudyGroupCheckoutSessionVar {
3
+ code: string;
4
+ successUrl?: string;
5
+ cancelUrl?: string;
6
+ }
7
+ export type ICreateStudyGroupCheckoutSessionData = {
8
+ validUserToken: {
9
+ createStudyGroupCheckoutSession: string | null;
10
+ };
11
+ };
@@ -0,0 +1,18 @@
1
+ import { gql } from '@apollo/client';
2
+ // Returns the Stripe Checkout session id (same as CREATE_NEW_SUBSCRIPTION_CHECKOUT_SESSION).
3
+ // Promo codes are disabled on this session.
4
+ export const CREATE_STUDY_GROUP_CHECKOUT_SESSION = gql `
5
+ mutation CreateStudyGroupCheckoutSession(
6
+ $code: String!
7
+ $successUrl: String
8
+ $cancelUrl: String
9
+ ) {
10
+ validUserToken {
11
+ createStudyGroupCheckoutSession(
12
+ code: $code
13
+ successUrl: $successUrl
14
+ cancelUrl: $cancelUrl
15
+ )
16
+ }
17
+ }
18
+ `;
@@ -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';
@@ -33,6 +33,7 @@ export interface IMarksheetsVar {
33
33
  lastId?: number;
34
34
  solo?: boolean;
35
35
  mockTestId?: number;
36
+ updatedAfter?: number;
36
37
  };
37
38
  }
38
39
  export type IMarksheetList = RestrictedData<graphqlNormalize & {
@@ -52,14 +52,21 @@ export const MARKSHEET_LIST = gql `
52
52
  marksheetList(options: $options) {
53
53
  results {
54
54
  id
55
+ source
55
56
  endedAt
56
- stats {
57
- ...MarksheetStatsFields
57
+ topicNames
58
+ entitlement {
59
+ id
60
+ name
58
61
  }
59
62
  isTestMarksheet
60
63
  solo
61
64
  completed
65
+ createdAt
62
66
  updatedAt
67
+ stats {
68
+ ...MarksheetStatsFields
69
+ }
63
70
  }
64
71
  total
65
72
  }
@@ -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 IGroupDiscountOffersData = RootData<(graphqlNormalize & IGroupDiscountOffer)[], 'groupDiscountOffers'>;
4
+ export interface IGroupDiscountOffersVar {
5
+ productTypeId: EProductType;
6
+ }
7
+ export declare const GROUP_DISCOUNT_OFFERS: 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,40 @@
1
+ import { gql } from '@apollo/client';
2
+ import { GROUP_DISCOUNT_OFFER_FIELDS, STUDY_GROUP_PRODUCT_FIELDS, } from '../fragments';
3
+ export const GROUP_DISCOUNT_OFFERS = gql `
4
+ ${GROUP_DISCOUNT_OFFER_FIELDS}
5
+ query GroupDiscountOffers($productTypeId: Int!) {
6
+ groupDiscountOffers(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
+ product {
36
+ ...StudyGroupProductFields
37
+ }
38
+ }
39
+ }
40
+ `;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quesmed/types",
3
- "version": "2.6.301",
3
+ "version": "2.6.303",
4
4
  "description": "Typescript types for Quesmed",
5
5
  "keywords": [
6
6
  "quesmed",