@quesmed/types 2.6.157 → 2.6.159

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.
@@ -45,7 +45,8 @@ export declare enum EProductType {
45
45
  DECISION_MAKING = 50,
46
46
  QUANTITATIVE_REASONING = 51,
47
47
  SITUATIONAL_JUDGEMENT = 52,
48
- MRCP_VIDEO = 53
48
+ MRCP_VIDEO = 53,
49
+ MRCP_BUNDLE = 54
49
50
  }
50
51
  export declare enum EEntitlementType {
51
52
  ALL = 0,
@@ -49,6 +49,7 @@ var EProductType;
49
49
  EProductType[EProductType["QUANTITATIVE_REASONING"] = 51] = "QUANTITATIVE_REASONING";
50
50
  EProductType[EProductType["SITUATIONAL_JUDGEMENT"] = 52] = "SITUATIONAL_JUDGEMENT";
51
51
  EProductType[EProductType["MRCP_VIDEO"] = 53] = "MRCP_VIDEO";
52
+ EProductType[EProductType["MRCP_BUNDLE"] = 54] = "MRCP_BUNDLE";
52
53
  })(EProductType = exports.EProductType || (exports.EProductType = {}));
53
54
  var EEntitlementType;
54
55
  (function (EEntitlementType) {
@@ -65,6 +65,7 @@ export interface IPayload {
65
65
  anatomySubscriptionEndDate: number | null;
66
66
  medicalSciencesSubscriptionEndDate: number | null;
67
67
  anatomyBundleSubscriptionEndDate: number | null;
68
+ mrcpBundleSubscriptionEndDate: number | null;
68
69
  mrcpPart1SubscriptionEndDate: number | null;
69
70
  mrcpPart2SubscriptionEndDate: number | null;
70
71
  pacesSubscriptionEndDate: number | null;
@@ -174,6 +175,7 @@ export interface IUser {
174
175
  qbankSubscriptionEndDate: number | Date | null;
175
176
  osceSubscriptionEndDate: number | Date | null;
176
177
  bundleSubscriptionEndDate: number | Date | null;
178
+ mrcpBundleSubscriptionEndDate: number | Date | null;
177
179
  mrcpPart1SubscriptionEndDate: number | Date | null;
178
180
  mrcpPart2SubscriptionEndDate: number | Date | null;
179
181
  pacesSubscriptionEndDate: number | Date | null;
@@ -36,6 +36,7 @@ exports.subscriptionDates = [
36
36
  'anatomySubscriptionEndDate',
37
37
  'medicalSciencesSubscriptionEndDate',
38
38
  'anatomyBundleSubscriptionEndDate',
39
+ 'mrcpBundleSubscriptionEndDate',
39
40
  'mrcpPart1SubscriptionEndDate',
40
41
  'mrcpPart2SubscriptionEndDate',
41
42
  'pacesSubscriptionEndDate',
@@ -57,6 +58,7 @@ exports.dateProductMapping = {
57
58
  anatomySubscriptionEndDate: Product_1.EProductType.ANATOMY,
58
59
  medicalSciencesSubscriptionEndDate: Product_1.EProductType.MEDICAL_SCIENCES,
59
60
  anatomyBundleSubscriptionEndDate: Product_1.EProductType.ANATOMY_BUNDLE,
61
+ mrcpBundleSubscriptionEndDate: Product_1.EProductType.MRCP_BUNDLE,
60
62
  mrcpPart1SubscriptionEndDate: Product_1.EProductType.MRCP_PART1,
61
63
  mrcpPart2SubscriptionEndDate: Product_1.EProductType.MRCP_PART2,
62
64
  mrcpVideoSubscriptionEndDate: Product_1.EProductType.MRCP_VIDEO,
@@ -35,6 +35,11 @@ exports.productMapping = {
35
35
  topicType: ALL_TOPIC_TYPE_WITHOUT_ANATOMY,
36
36
  mockType: ALL_MOCKS_WITHOUT_ANATOMY,
37
37
  },
38
+ [models_1.EProductType.MRCP_BUNDLE]: {
39
+ db: enums_1.DB_TYPE.FINALS,
40
+ topicType: [models_1.ETopicType.CLINICAL],
41
+ mockType: [models_1.EMockTestType.MRCP],
42
+ },
38
43
  [models_1.EProductType.ANATOMY]: {
39
44
  db: enums_1.DB_TYPE.FINALS,
40
45
  topicType: [models_1.ETopicType.ANATOMY],
@@ -110,7 +115,7 @@ exports.productMapping = {
110
115
  },
111
116
  [models_1.EProductType.UCAT]: {
112
117
  db: enums_1.DB_TYPE.UCAT,
113
- topicType: [],
118
+ topicType: [models_1.ETopicType.UCAT],
114
119
  mockType: [
115
120
  models_1.EMockTestType.FULL_MOCK,
116
121
  models_1.EMockTestType.VERBAL_REASONING,
@@ -110,6 +110,7 @@ exports.USER_FIELDS = (0, client_1.gql) `
110
110
  anatomyBundleSubscriptionEndDate
111
111
 
112
112
  # post-graduate
113
+ mrcpBundleSubscriptionEndDate
113
114
  mrcpPart1SubscriptionEndDate
114
115
  mrcpPart2SubscriptionEndDate
115
116
  pacesSubscriptionEndDate
@@ -12,3 +12,10 @@ export type IRefreshWikiData = AdminData<boolean, 'refreshWiki'>;
12
12
  export declare const RESET_QUES_DIFFICULTY: import("@apollo/client").DocumentNode;
13
13
  export type IResetQueDifficultyVar = null;
14
14
  export type IResetQueDifficultyData = AdminData<boolean, 'resetQueDifficulty'>;
15
+ export type IManageUserSubsVar = {
16
+ username: string;
17
+ password?: string;
18
+ stripePriceIds: string[];
19
+ };
20
+ export declare const MANAGE_USER_SUBS: import("@apollo/client").DocumentNode;
21
+ export type IManageUserSubsData = AdminData<boolean, 'manageUserSubs'>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RESET_QUES_DIFFICULTY = exports.REFRESH_WIKI = exports.REFRESH_MTV = void 0;
3
+ exports.MANAGE_USER_SUBS = exports.RESET_QUES_DIFFICULTY = exports.REFRESH_WIKI = exports.REFRESH_MTV = void 0;
4
4
  const client_1 = require("@apollo/client");
5
5
  exports.REFRESH_MTV = (0, client_1.gql) `
6
6
  mutation RefreshMtv($name: String!) {
@@ -23,3 +23,18 @@ exports.RESET_QUES_DIFFICULTY = (0, client_1.gql) `
23
23
  }
24
24
  }
25
25
  `;
26
+ exports.MANAGE_USER_SUBS = (0, client_1.gql) `
27
+ mutation ManageUserSubs(
28
+ $username: String!
29
+ $password: String
30
+ $stripePriceIds: [String!]!
31
+ ) {
32
+ admin {
33
+ manageUserSubs(
34
+ username: $username
35
+ password: $password
36
+ stripePriceIds: $stripePriceIds
37
+ )
38
+ }
39
+ }
40
+ `;
@@ -1,6 +1,8 @@
1
1
  import { RootData } from './../types';
2
2
  export declare const CUSTOMER_PORTAL: import("@apollo/client").DocumentNode;
3
- export type ICustomerPortalVar = null;
3
+ export type ICustomerPortalVar = {
4
+ returnUrl?: string;
5
+ };
4
6
  export type ICustomerPortalData = RootData<string, 'customerPortal'>;
5
7
  export interface IStripeLineItem {
6
8
  price: string;
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.STRIPE_HOMEPAGE_CHECKOUT_SESSION = exports.CUSTOMER_PORTAL = void 0;
4
4
  const client_1 = require("@apollo/client");
5
5
  exports.CUSTOMER_PORTAL = (0, client_1.gql) `
6
- mutation CustomerPortal {
7
- customerPortal
6
+ mutation CustomerPortal($returnUrl: String) {
7
+ customerPortal(returnUrl: $returnUrl)
8
8
  }
9
9
  `;
10
10
  exports.STRIPE_HOMEPAGE_CHECKOUT_SESSION = (0, client_1.gql) `
@@ -2,6 +2,8 @@ export declare const CREATE_NEW_SUBSCRIPTION_CHECKOUT_SESSION: import("@apollo/c
2
2
  export interface ICreateNewSubscriptionCheckoutSessionVar {
3
3
  priceId: string;
4
4
  additionalPriceId?: string;
5
+ successUrl?: string;
6
+ cancelUrl?: string;
5
7
  }
6
8
  export type ICreateNewSubscriptionCheckoutSessionData = {
7
9
  validUserToken: {
@@ -12,6 +14,8 @@ export declare const CREATE_NEW_ONE_OFF_CHECKOUT_SESSION: import("@apollo/client
12
14
  export interface ICreateNewOneOffCheckoutSessionVar {
13
15
  priceId: string;
14
16
  additionalPriceId?: string;
17
+ successUrl?: string;
18
+ cancelUrl?: string;
15
19
  }
16
20
  export type ICreateNewOneOffCheckoutSessionData = {
17
21
  validUserToken: {
@@ -6,11 +6,15 @@ exports.CREATE_NEW_SUBSCRIPTION_CHECKOUT_SESSION = (0, client_1.gql) `
6
6
  mutation CreateNewSubscriptionCheckoutSession(
7
7
  $priceId: String!
8
8
  $additionalPriceId: String
9
+ $successUrl: String
10
+ $cancelUrl: String
9
11
  ) {
10
12
  validUserToken {
11
13
  createNewSubscriptionCheckoutSession(
12
14
  priceId: $priceId
13
15
  additionalPriceId: $additionalPriceId
16
+ successUrl: $successUrl
17
+ cancelUrl: $cancelUrl
14
18
  )
15
19
  }
16
20
  }
@@ -19,11 +23,15 @@ exports.CREATE_NEW_ONE_OFF_CHECKOUT_SESSION = (0, client_1.gql) `
19
23
  mutation CreateNewOneOffCheckoutSession(
20
24
  $priceId: String!
21
25
  $additionalPriceId: String
26
+ $successUrl: String
27
+ $cancelUrl: String
22
28
  ) {
23
29
  validUserToken {
24
30
  createNewOneOffCheckoutSession(
25
31
  priceId: $priceId
26
32
  additionalPriceId: $additionalPriceId
33
+ successUrl: $successUrl
34
+ cancelUrl: $cancelUrl
27
35
  )
28
36
  }
29
37
  }
@@ -45,7 +45,8 @@ export declare enum EProductType {
45
45
  DECISION_MAKING = 50,
46
46
  QUANTITATIVE_REASONING = 51,
47
47
  SITUATIONAL_JUDGEMENT = 52,
48
- MRCP_VIDEO = 53
48
+ MRCP_VIDEO = 53,
49
+ MRCP_BUNDLE = 54
49
50
  }
50
51
  export declare enum EEntitlementType {
51
52
  ALL = 0,
@@ -46,6 +46,7 @@ export var EProductType;
46
46
  EProductType[EProductType["QUANTITATIVE_REASONING"] = 51] = "QUANTITATIVE_REASONING";
47
47
  EProductType[EProductType["SITUATIONAL_JUDGEMENT"] = 52] = "SITUATIONAL_JUDGEMENT";
48
48
  EProductType[EProductType["MRCP_VIDEO"] = 53] = "MRCP_VIDEO";
49
+ EProductType[EProductType["MRCP_BUNDLE"] = 54] = "MRCP_BUNDLE";
49
50
  })(EProductType || (EProductType = {}));
50
51
  export var EEntitlementType;
51
52
  (function (EEntitlementType) {
@@ -65,6 +65,7 @@ export interface IPayload {
65
65
  anatomySubscriptionEndDate: number | null;
66
66
  medicalSciencesSubscriptionEndDate: number | null;
67
67
  anatomyBundleSubscriptionEndDate: number | null;
68
+ mrcpBundleSubscriptionEndDate: number | null;
68
69
  mrcpPart1SubscriptionEndDate: number | null;
69
70
  mrcpPart2SubscriptionEndDate: number | null;
70
71
  pacesSubscriptionEndDate: number | null;
@@ -174,6 +175,7 @@ export interface IUser {
174
175
  qbankSubscriptionEndDate: number | Date | null;
175
176
  osceSubscriptionEndDate: number | Date | null;
176
177
  bundleSubscriptionEndDate: number | Date | null;
178
+ mrcpBundleSubscriptionEndDate: number | Date | null;
177
179
  mrcpPart1SubscriptionEndDate: number | Date | null;
178
180
  mrcpPart2SubscriptionEndDate: number | Date | null;
179
181
  pacesSubscriptionEndDate: number | Date | null;
@@ -33,6 +33,7 @@ export const subscriptionDates = [
33
33
  'anatomySubscriptionEndDate',
34
34
  'medicalSciencesSubscriptionEndDate',
35
35
  'anatomyBundleSubscriptionEndDate',
36
+ 'mrcpBundleSubscriptionEndDate',
36
37
  'mrcpPart1SubscriptionEndDate',
37
38
  'mrcpPart2SubscriptionEndDate',
38
39
  'pacesSubscriptionEndDate',
@@ -54,6 +55,7 @@ export const dateProductMapping = {
54
55
  anatomySubscriptionEndDate: EProductType.ANATOMY,
55
56
  medicalSciencesSubscriptionEndDate: EProductType.MEDICAL_SCIENCES,
56
57
  anatomyBundleSubscriptionEndDate: EProductType.ANATOMY_BUNDLE,
58
+ mrcpBundleSubscriptionEndDate: EProductType.MRCP_BUNDLE,
57
59
  mrcpPart1SubscriptionEndDate: EProductType.MRCP_PART1,
58
60
  mrcpPart2SubscriptionEndDate: EProductType.MRCP_PART2,
59
61
  mrcpVideoSubscriptionEndDate: EProductType.MRCP_VIDEO,
@@ -32,6 +32,11 @@ export const productMapping = {
32
32
  topicType: ALL_TOPIC_TYPE_WITHOUT_ANATOMY,
33
33
  mockType: ALL_MOCKS_WITHOUT_ANATOMY,
34
34
  },
35
+ [EProductType.MRCP_BUNDLE]: {
36
+ db: DB_TYPE.FINALS,
37
+ topicType: [ETopicType.CLINICAL],
38
+ mockType: [EMockTestType.MRCP],
39
+ },
35
40
  [EProductType.ANATOMY]: {
36
41
  db: DB_TYPE.FINALS,
37
42
  topicType: [ETopicType.ANATOMY],
@@ -107,7 +112,7 @@ export const productMapping = {
107
112
  },
108
113
  [EProductType.UCAT]: {
109
114
  db: DB_TYPE.UCAT,
110
- topicType: [],
115
+ topicType: [ETopicType.UCAT],
111
116
  mockType: [
112
117
  EMockTestType.FULL_MOCK,
113
118
  EMockTestType.VERBAL_REASONING,
@@ -107,6 +107,7 @@ export const USER_FIELDS = gql `
107
107
  anatomyBundleSubscriptionEndDate
108
108
 
109
109
  # post-graduate
110
+ mrcpBundleSubscriptionEndDate
110
111
  mrcpPart1SubscriptionEndDate
111
112
  mrcpPart2SubscriptionEndDate
112
113
  pacesSubscriptionEndDate
@@ -12,3 +12,10 @@ export type IRefreshWikiData = AdminData<boolean, 'refreshWiki'>;
12
12
  export declare const RESET_QUES_DIFFICULTY: import("@apollo/client").DocumentNode;
13
13
  export type IResetQueDifficultyVar = null;
14
14
  export type IResetQueDifficultyData = AdminData<boolean, 'resetQueDifficulty'>;
15
+ export type IManageUserSubsVar = {
16
+ username: string;
17
+ password?: string;
18
+ stripePriceIds: string[];
19
+ };
20
+ export declare const MANAGE_USER_SUBS: import("@apollo/client").DocumentNode;
21
+ export type IManageUserSubsData = AdminData<boolean, 'manageUserSubs'>;
@@ -20,3 +20,18 @@ export const RESET_QUES_DIFFICULTY = gql `
20
20
  }
21
21
  }
22
22
  `;
23
+ export const MANAGE_USER_SUBS = gql `
24
+ mutation ManageUserSubs(
25
+ $username: String!
26
+ $password: String
27
+ $stripePriceIds: [String!]!
28
+ ) {
29
+ admin {
30
+ manageUserSubs(
31
+ username: $username
32
+ password: $password
33
+ stripePriceIds: $stripePriceIds
34
+ )
35
+ }
36
+ }
37
+ `;
@@ -1,6 +1,8 @@
1
1
  import { RootData } from './../types';
2
2
  export declare const CUSTOMER_PORTAL: import("@apollo/client").DocumentNode;
3
- export type ICustomerPortalVar = null;
3
+ export type ICustomerPortalVar = {
4
+ returnUrl?: string;
5
+ };
4
6
  export type ICustomerPortalData = RootData<string, 'customerPortal'>;
5
7
  export interface IStripeLineItem {
6
8
  price: string;
@@ -1,7 +1,7 @@
1
1
  import { gql } from '@apollo/client';
2
2
  export const CUSTOMER_PORTAL = gql `
3
- mutation CustomerPortal {
4
- customerPortal
3
+ mutation CustomerPortal($returnUrl: String) {
4
+ customerPortal(returnUrl: $returnUrl)
5
5
  }
6
6
  `;
7
7
  export const STRIPE_HOMEPAGE_CHECKOUT_SESSION = gql `
@@ -2,6 +2,8 @@ export declare const CREATE_NEW_SUBSCRIPTION_CHECKOUT_SESSION: import("@apollo/c
2
2
  export interface ICreateNewSubscriptionCheckoutSessionVar {
3
3
  priceId: string;
4
4
  additionalPriceId?: string;
5
+ successUrl?: string;
6
+ cancelUrl?: string;
5
7
  }
6
8
  export type ICreateNewSubscriptionCheckoutSessionData = {
7
9
  validUserToken: {
@@ -12,6 +14,8 @@ export declare const CREATE_NEW_ONE_OFF_CHECKOUT_SESSION: import("@apollo/client
12
14
  export interface ICreateNewOneOffCheckoutSessionVar {
13
15
  priceId: string;
14
16
  additionalPriceId?: string;
17
+ successUrl?: string;
18
+ cancelUrl?: string;
15
19
  }
16
20
  export type ICreateNewOneOffCheckoutSessionData = {
17
21
  validUserToken: {
@@ -3,11 +3,15 @@ export const CREATE_NEW_SUBSCRIPTION_CHECKOUT_SESSION = gql `
3
3
  mutation CreateNewSubscriptionCheckoutSession(
4
4
  $priceId: String!
5
5
  $additionalPriceId: String
6
+ $successUrl: String
7
+ $cancelUrl: String
6
8
  ) {
7
9
  validUserToken {
8
10
  createNewSubscriptionCheckoutSession(
9
11
  priceId: $priceId
10
12
  additionalPriceId: $additionalPriceId
13
+ successUrl: $successUrl
14
+ cancelUrl: $cancelUrl
11
15
  )
12
16
  }
13
17
  }
@@ -16,11 +20,15 @@ export const CREATE_NEW_ONE_OFF_CHECKOUT_SESSION = gql `
16
20
  mutation CreateNewOneOffCheckoutSession(
17
21
  $priceId: String!
18
22
  $additionalPriceId: String
23
+ $successUrl: String
24
+ $cancelUrl: String
19
25
  ) {
20
26
  validUserToken {
21
27
  createNewOneOffCheckoutSession(
22
28
  priceId: $priceId
23
29
  additionalPriceId: $additionalPriceId
30
+ successUrl: $successUrl
31
+ cancelUrl: $cancelUrl
24
32
  )
25
33
  }
26
34
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quesmed/types",
3
- "version": "2.6.157",
3
+ "version": "2.6.159",
4
4
  "description": "Typescript types for Quesmed",
5
5
  "keywords": [
6
6
  "quesmed",