@quesmed/types-rn 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.
@@ -51,7 +51,11 @@ export interface IStudyGroupProduct {
51
51
  stripePriceId: string;
52
52
  }
53
53
  export interface IGroupDiscountOffer {
54
- product: IStudyGroupProduct;
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
- product: IStudyGroupProduct;
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
- product: IStudyGroupProduct;
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quesmed/types-rn",
3
- "version": "2.6.303",
3
+ "version": "2.6.305",
4
4
  "description": "Typescript types for Quesmed",
5
5
  "keywords": [
6
6
  "quesmed",
@@ -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
- product {
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
- product {
43
+ productTypeId
44
+ productName
45
+ plans {
42
46
  ...StudyGroupProductFields
43
47
  }
44
48
  tiers {
@@ -1,6 +1,7 @@
1
1
  export declare const CREATE_STUDY_GROUP_CHECKOUT_SESSION: import("@apollo/client").DocumentNode;
2
2
  export interface ICreateStudyGroupCheckoutSessionVar {
3
3
  code: string;
4
+ productId: number;
4
5
  successUrl?: string;
5
6
  cancelUrl?: string;
6
7
  }
@@ -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 IGroupDiscountOffersData = RootData<(graphqlNormalize & IGroupDiscountOffer)[], 'groupDiscountOffers'>;
4
- export interface IGroupDiscountOffersVar {
3
+ export type IGroupDiscountOfferData = RootData<(graphqlNormalize & IGroupDiscountOffer) | null, 'groupDiscountOffer'>;
4
+ export interface IGroupDiscountOfferVar {
5
5
  productTypeId: EProductType;
6
6
  }
7
- export declare const GROUP_DISCOUNT_OFFERS: import("@apollo/client").DocumentNode;
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.GROUP_DISCOUNT_OFFERS = void 0;
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.GROUP_DISCOUNT_OFFERS = (0, client_1.gql) `
6
+ exports.GROUP_DISCOUNT_OFFER = (0, client_1.gql) `
7
7
  ${fragments_1.GROUP_DISCOUNT_OFFER_FIELDS}
8
- query GroupDiscountOffers($productTypeId: Int!) {
9
- groupDiscountOffers(productTypeId: $productTypeId) {
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
- product {
38
+ productTypeId
39
+ productName
40
+ plans {
39
41
  ...StudyGroupProductFields
40
42
  }
41
43
  }