@quesmed/types 2.6.303 → 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.
- package/dist/cjs/models/StudyGroup.d.ts +15 -3
- package/dist/cjs/resolvers/fragments/studyGroup.js +6 -2
- package/dist/cjs/resolvers/mutation/validUserToken/studyGroup.d.ts +1 -0
- package/dist/cjs/resolvers/mutation/validUserToken/studyGroup.js +3 -1
- package/dist/cjs/resolvers/query/studyGroup.d.ts +3 -3
- package/dist/cjs/resolvers/query/studyGroup.js +7 -5
- package/dist/mjs/models/StudyGroup.d.ts +15 -3
- package/dist/mjs/resolvers/fragments/studyGroup.js +6 -2
- package/dist/mjs/resolvers/mutation/validUserToken/studyGroup.d.ts +1 -0
- package/dist/mjs/resolvers/mutation/validUserToken/studyGroup.js +3 -1
- package/dist/mjs/resolvers/query/studyGroup.d.ts +3 -3
- package/dist/mjs/resolvers/query/studyGroup.js +6 -4
- package/package.json +1 -1
|
@@ -51,7 +51,11 @@ export interface IStudyGroupProduct {
|
|
|
51
51
|
stripePriceId: string;
|
|
52
52
|
}
|
|
53
53
|
export interface IGroupDiscountOffer {
|
|
54
|
-
|
|
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[];
|
|
55
59
|
tiers: IGroupDiscountTier[];
|
|
56
60
|
maxMembers: number;
|
|
57
61
|
windowDays: number;
|
|
@@ -76,7 +80,11 @@ export interface IStudyGroupInvite {
|
|
|
76
80
|
closesAt: number | Date;
|
|
77
81
|
state: EStudyGroupInviteState;
|
|
78
82
|
viewerState: EStudyGroupViewerState;
|
|
79
|
-
|
|
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[];
|
|
80
88
|
}
|
|
81
89
|
export interface IStudyGroupMember {
|
|
82
90
|
id: number;
|
|
@@ -109,7 +117,11 @@ export interface IStudyGroup {
|
|
|
109
117
|
opensAt: number | Date;
|
|
110
118
|
closesAt: number | Date;
|
|
111
119
|
closedAt: number | Date | null;
|
|
112
|
-
|
|
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[];
|
|
113
125
|
tiers: IGroupDiscountTier[];
|
|
114
126
|
maxMembers: number;
|
|
115
127
|
memberCount: number;
|
|
@@ -16,7 +16,9 @@ exports.STUDY_GROUP_PRODUCT_FIELDS = (0, client_1.gql) `
|
|
|
16
16
|
exports.GROUP_DISCOUNT_OFFER_FIELDS = (0, client_1.gql) `
|
|
17
17
|
${exports.STUDY_GROUP_PRODUCT_FIELDS}
|
|
18
18
|
fragment GroupDiscountOfferFields on GroupDiscountOffer {
|
|
19
|
-
|
|
19
|
+
productTypeId
|
|
20
|
+
productName
|
|
21
|
+
plans {
|
|
20
22
|
...StudyGroupProductFields
|
|
21
23
|
}
|
|
22
24
|
tiers {
|
|
@@ -38,7 +40,9 @@ exports.STUDY_GROUP_FIELDS = (0, client_1.gql) `
|
|
|
38
40
|
opensAt
|
|
39
41
|
closesAt
|
|
40
42
|
closedAt
|
|
41
|
-
|
|
43
|
+
productTypeId
|
|
44
|
+
productName
|
|
45
|
+
plans {
|
|
42
46
|
...StudyGroupProductFields
|
|
43
47
|
}
|
|
44
48
|
tiers {
|
|
@@ -3,16 +3,18 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.CREATE_STUDY_GROUP_CHECKOUT_SESSION = void 0;
|
|
4
4
|
const client_1 = require("@apollo/client");
|
|
5
5
|
// Returns the Stripe Checkout session id (same as CREATE_NEW_SUBSCRIPTION_CHECKOUT_SESSION).
|
|
6
|
-
// Promo codes are disabled on this session.
|
|
6
|
+
// productId is any plan from the group's `plans`. Promo codes are disabled on this session.
|
|
7
7
|
exports.CREATE_STUDY_GROUP_CHECKOUT_SESSION = (0, client_1.gql) `
|
|
8
8
|
mutation CreateStudyGroupCheckoutSession(
|
|
9
9
|
$code: String!
|
|
10
|
+
$productId: Int!
|
|
10
11
|
$successUrl: String
|
|
11
12
|
$cancelUrl: String
|
|
12
13
|
) {
|
|
13
14
|
validUserToken {
|
|
14
15
|
createStudyGroupCheckoutSession(
|
|
15
16
|
code: $code
|
|
17
|
+
productId: $productId
|
|
16
18
|
successUrl: $successUrl
|
|
17
19
|
cancelUrl: $cancelUrl
|
|
18
20
|
)
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { EProductType, IGroupDiscountOffer, IStudyGroupInvite } from '../../models';
|
|
2
2
|
import { RootData, graphqlNormalize } from '../types';
|
|
3
|
-
export type
|
|
4
|
-
export interface
|
|
3
|
+
export type IGroupDiscountOfferData = RootData<(graphqlNormalize & IGroupDiscountOffer) | null, 'groupDiscountOffer'>;
|
|
4
|
+
export interface IGroupDiscountOfferVar {
|
|
5
5
|
productTypeId: EProductType;
|
|
6
6
|
}
|
|
7
|
-
export declare const
|
|
7
|
+
export declare const GROUP_DISCOUNT_OFFER: import("@apollo/client").DocumentNode;
|
|
8
8
|
export type IStudyGroupInviteData = RootData<(graphqlNormalize & IStudyGroupInvite) | null, 'studyGroupInvite'>;
|
|
9
9
|
export interface IStudyGroupInviteVar {
|
|
10
10
|
code: string;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.STUDY_GROUP_INVITE = exports.
|
|
3
|
+
exports.STUDY_GROUP_INVITE = exports.GROUP_DISCOUNT_OFFER = void 0;
|
|
4
4
|
const client_1 = require("@apollo/client");
|
|
5
5
|
const fragments_1 = require("../fragments");
|
|
6
|
-
exports.
|
|
6
|
+
exports.GROUP_DISCOUNT_OFFER = (0, client_1.gql) `
|
|
7
7
|
${fragments_1.GROUP_DISCOUNT_OFFER_FIELDS}
|
|
8
|
-
query
|
|
9
|
-
|
|
8
|
+
query GroupDiscountOffer($productTypeId: Int!) {
|
|
9
|
+
groupDiscountOffer(productTypeId: $productTypeId) {
|
|
10
10
|
...GroupDiscountOfferFields
|
|
11
11
|
}
|
|
12
12
|
}
|
|
@@ -35,7 +35,9 @@ exports.STUDY_GROUP_INVITE = (0, client_1.gql) `
|
|
|
35
35
|
closesAt
|
|
36
36
|
state
|
|
37
37
|
viewerState
|
|
38
|
-
|
|
38
|
+
productTypeId
|
|
39
|
+
productName
|
|
40
|
+
plans {
|
|
39
41
|
...StudyGroupProductFields
|
|
40
42
|
}
|
|
41
43
|
}
|
|
@@ -51,7 +51,11 @@ export interface IStudyGroupProduct {
|
|
|
51
51
|
stripePriceId: string;
|
|
52
52
|
}
|
|
53
53
|
export interface IGroupDiscountOffer {
|
|
54
|
-
|
|
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[];
|
|
55
59
|
tiers: IGroupDiscountTier[];
|
|
56
60
|
maxMembers: number;
|
|
57
61
|
windowDays: number;
|
|
@@ -76,7 +80,11 @@ export interface IStudyGroupInvite {
|
|
|
76
80
|
closesAt: number | Date;
|
|
77
81
|
state: EStudyGroupInviteState;
|
|
78
82
|
viewerState: EStudyGroupViewerState;
|
|
79
|
-
|
|
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[];
|
|
80
88
|
}
|
|
81
89
|
export interface IStudyGroupMember {
|
|
82
90
|
id: number;
|
|
@@ -109,7 +117,11 @@ export interface IStudyGroup {
|
|
|
109
117
|
opensAt: number | Date;
|
|
110
118
|
closesAt: number | Date;
|
|
111
119
|
closedAt: number | Date | null;
|
|
112
|
-
|
|
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[];
|
|
113
125
|
tiers: IGroupDiscountTier[];
|
|
114
126
|
maxMembers: number;
|
|
115
127
|
memberCount: number;
|
|
@@ -13,7 +13,9 @@ export const STUDY_GROUP_PRODUCT_FIELDS = gql `
|
|
|
13
13
|
export const GROUP_DISCOUNT_OFFER_FIELDS = gql `
|
|
14
14
|
${STUDY_GROUP_PRODUCT_FIELDS}
|
|
15
15
|
fragment GroupDiscountOfferFields on GroupDiscountOffer {
|
|
16
|
-
|
|
16
|
+
productTypeId
|
|
17
|
+
productName
|
|
18
|
+
plans {
|
|
17
19
|
...StudyGroupProductFields
|
|
18
20
|
}
|
|
19
21
|
tiers {
|
|
@@ -35,7 +37,9 @@ export const STUDY_GROUP_FIELDS = gql `
|
|
|
35
37
|
opensAt
|
|
36
38
|
closesAt
|
|
37
39
|
closedAt
|
|
38
|
-
|
|
40
|
+
productTypeId
|
|
41
|
+
productName
|
|
42
|
+
plans {
|
|
39
43
|
...StudyGroupProductFields
|
|
40
44
|
}
|
|
41
45
|
tiers {
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import { gql } from '@apollo/client';
|
|
2
2
|
// Returns the Stripe Checkout session id (same as CREATE_NEW_SUBSCRIPTION_CHECKOUT_SESSION).
|
|
3
|
-
// Promo codes are disabled on this session.
|
|
3
|
+
// productId is any plan from the group's `plans`. Promo codes are disabled on this session.
|
|
4
4
|
export const CREATE_STUDY_GROUP_CHECKOUT_SESSION = gql `
|
|
5
5
|
mutation CreateStudyGroupCheckoutSession(
|
|
6
6
|
$code: String!
|
|
7
|
+
$productId: Int!
|
|
7
8
|
$successUrl: String
|
|
8
9
|
$cancelUrl: String
|
|
9
10
|
) {
|
|
10
11
|
validUserToken {
|
|
11
12
|
createStudyGroupCheckoutSession(
|
|
12
13
|
code: $code
|
|
14
|
+
productId: $productId
|
|
13
15
|
successUrl: $successUrl
|
|
14
16
|
cancelUrl: $cancelUrl
|
|
15
17
|
)
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { EProductType, IGroupDiscountOffer, IStudyGroupInvite } from '../../models';
|
|
2
2
|
import { RootData, graphqlNormalize } from '../types';
|
|
3
|
-
export type
|
|
4
|
-
export interface
|
|
3
|
+
export type IGroupDiscountOfferData = RootData<(graphqlNormalize & IGroupDiscountOffer) | null, 'groupDiscountOffer'>;
|
|
4
|
+
export interface IGroupDiscountOfferVar {
|
|
5
5
|
productTypeId: EProductType;
|
|
6
6
|
}
|
|
7
|
-
export declare const
|
|
7
|
+
export declare const GROUP_DISCOUNT_OFFER: import("@apollo/client").DocumentNode;
|
|
8
8
|
export type IStudyGroupInviteData = RootData<(graphqlNormalize & IStudyGroupInvite) | null, 'studyGroupInvite'>;
|
|
9
9
|
export interface IStudyGroupInviteVar {
|
|
10
10
|
code: string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { gql } from '@apollo/client';
|
|
2
2
|
import { GROUP_DISCOUNT_OFFER_FIELDS, STUDY_GROUP_PRODUCT_FIELDS, } from '../fragments';
|
|
3
|
-
export const
|
|
3
|
+
export const GROUP_DISCOUNT_OFFER = gql `
|
|
4
4
|
${GROUP_DISCOUNT_OFFER_FIELDS}
|
|
5
|
-
query
|
|
6
|
-
|
|
5
|
+
query GroupDiscountOffer($productTypeId: Int!) {
|
|
6
|
+
groupDiscountOffer(productTypeId: $productTypeId) {
|
|
7
7
|
...GroupDiscountOfferFields
|
|
8
8
|
}
|
|
9
9
|
}
|
|
@@ -32,7 +32,9 @@ export const STUDY_GROUP_INVITE = gql `
|
|
|
32
32
|
closesAt
|
|
33
33
|
state
|
|
34
34
|
viewerState
|
|
35
|
-
|
|
35
|
+
productTypeId
|
|
36
|
+
productName
|
|
37
|
+
plans {
|
|
36
38
|
...StudyGroupProductFields
|
|
37
39
|
}
|
|
38
40
|
}
|