@quesmed/types 2.6.61 → 2.6.63
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/Product.d.ts +6 -1
- package/dist/cjs/models/Product.js +5 -0
- package/dist/cjs/models/Subscription.d.ts +12 -0
- package/dist/cjs/models/Subscription.js +13 -0
- package/dist/cjs/resolvers/mutation/restricted/chapter.d.ts +2 -13
- package/dist/cjs/resolvers/mutation/restricted/chapter.js +3 -1
- package/dist/cjs/resolvers/mutation/restricted/osce.d.ts +2 -13
- package/dist/cjs/resolvers/mutation/restricted/osce.js +8 -2
- package/dist/cjs/resolvers/mutation/restricted/stripe.d.ts +2 -0
- package/dist/cjs/resolvers/mutation/restricted/stripe.js +10 -2
- package/dist/cjs/utils/random.d.ts +1 -0
- package/dist/cjs/utils/random.js +5 -1
- package/dist/mjs/models/Product.d.ts +6 -1
- package/dist/mjs/models/Product.js +5 -0
- package/dist/mjs/models/Subscription.d.ts +12 -0
- package/dist/mjs/models/Subscription.js +12 -1
- package/dist/mjs/resolvers/mutation/restricted/chapter.d.ts +2 -13
- package/dist/mjs/resolvers/mutation/restricted/chapter.js +3 -1
- package/dist/mjs/resolvers/mutation/restricted/osce.d.ts +2 -13
- package/dist/mjs/resolvers/mutation/restricted/osce.js +9 -3
- package/dist/mjs/resolvers/mutation/restricted/stripe.d.ts +2 -0
- package/dist/mjs/resolvers/mutation/restricted/stripe.js +10 -2
- package/dist/mjs/utils/random.d.ts +1 -0
- package/dist/mjs/utils/random.js +3 -0
- package/package.json +1 -1
|
@@ -63,7 +63,12 @@ export declare enum EEntitlementType {
|
|
|
63
63
|
ANATOMY = 36,
|
|
64
64
|
PRE_CLINICAL = 37,
|
|
65
65
|
MRCP_PART_1 = 38,
|
|
66
|
-
MRCP_PART_2 = 39
|
|
66
|
+
MRCP_PART_2 = 39,
|
|
67
|
+
INTERVIEW_ANAESTHETICS = 40,
|
|
68
|
+
INTERVIEW_CST = 41,
|
|
69
|
+
INTERVIEW_IMT = 42,
|
|
70
|
+
INTERVIEW_RADIOLOGY = 43,
|
|
71
|
+
PLAB_1 = 44
|
|
67
72
|
}
|
|
68
73
|
export interface IProduct {
|
|
69
74
|
id: Id;
|
|
@@ -68,6 +68,11 @@ var EEntitlementType;
|
|
|
68
68
|
EEntitlementType[EEntitlementType["PRE_CLINICAL"] = 37] = "PRE_CLINICAL";
|
|
69
69
|
EEntitlementType[EEntitlementType["MRCP_PART_1"] = 38] = "MRCP_PART_1";
|
|
70
70
|
EEntitlementType[EEntitlementType["MRCP_PART_2"] = 39] = "MRCP_PART_2";
|
|
71
|
+
EEntitlementType[EEntitlementType["INTERVIEW_ANAESTHETICS"] = 40] = "INTERVIEW_ANAESTHETICS";
|
|
72
|
+
EEntitlementType[EEntitlementType["INTERVIEW_CST"] = 41] = "INTERVIEW_CST";
|
|
73
|
+
EEntitlementType[EEntitlementType["INTERVIEW_IMT"] = 42] = "INTERVIEW_IMT";
|
|
74
|
+
EEntitlementType[EEntitlementType["INTERVIEW_RADIOLOGY"] = 43] = "INTERVIEW_RADIOLOGY";
|
|
75
|
+
EEntitlementType[EEntitlementType["PLAB_1"] = 44] = "PLAB_1";
|
|
71
76
|
})(EEntitlementType = exports.EEntitlementType || (exports.EEntitlementType = {}));
|
|
72
77
|
var EAppType;
|
|
73
78
|
(function (EAppType) {
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import { IProduct } from './Product';
|
|
2
2
|
import { Id } from './Type';
|
|
3
3
|
import { IClassYear, IUser } from './User';
|
|
4
|
+
export declare enum ECancelReasons {
|
|
5
|
+
CUSTOMER_SERVICE = "customer_service",
|
|
6
|
+
LOW_QUALITY = "low_quality",
|
|
7
|
+
MISSING_FEATURES = "missing_features",
|
|
8
|
+
OTHER = "other",
|
|
9
|
+
SWITCHED_SERVICE = "switched_service",
|
|
10
|
+
TOO_COMPLEX = "too_complex",
|
|
11
|
+
TOO_EXPENSIVE = "too_expensive",
|
|
12
|
+
UNUSED = "unused"
|
|
13
|
+
}
|
|
4
14
|
export interface ISubscription {
|
|
5
15
|
id: Id;
|
|
6
16
|
createdAt: number | Date;
|
|
@@ -15,4 +25,6 @@ export interface ISubscription {
|
|
|
15
25
|
product?: IProduct;
|
|
16
26
|
classYear: IClassYear;
|
|
17
27
|
invoiced: number;
|
|
28
|
+
feedback: ECancelReasons | null;
|
|
29
|
+
comment: string;
|
|
18
30
|
}
|
|
@@ -1,2 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ECancelReasons = void 0;
|
|
4
|
+
// These options are only available for feedback in stripe, we cannot modify them
|
|
5
|
+
var ECancelReasons;
|
|
6
|
+
(function (ECancelReasons) {
|
|
7
|
+
ECancelReasons["CUSTOMER_SERVICE"] = "customer_service";
|
|
8
|
+
ECancelReasons["LOW_QUALITY"] = "low_quality";
|
|
9
|
+
ECancelReasons["MISSING_FEATURES"] = "missing_features";
|
|
10
|
+
ECancelReasons["OTHER"] = "other";
|
|
11
|
+
ECancelReasons["SWITCHED_SERVICE"] = "switched_service";
|
|
12
|
+
ECancelReasons["TOO_COMPLEX"] = "too_complex";
|
|
13
|
+
ECancelReasons["TOO_EXPENSIVE"] = "too_expensive";
|
|
14
|
+
ECancelReasons["UNUSED"] = "unused";
|
|
15
|
+
})(ECancelReasons = exports.ECancelReasons || (exports.ECancelReasons = {}));
|
|
@@ -10,22 +10,11 @@ export interface IUpsertChapterNoteVar {
|
|
|
10
10
|
chapterId: number;
|
|
11
11
|
note: string;
|
|
12
12
|
}
|
|
13
|
-
export type IUpsertChapterNoteData = RestrictedData<IUserChapterNote, 'upsertChapterNote'>;
|
|
13
|
+
export type IUpsertChapterNoteData = RestrictedData<graphqlNormalize & Omit<IUserChapterNote, 'chapter'>, 'upsertChapterNote'>;
|
|
14
14
|
export declare const updateCacheOnUpsertChapterNote: (cache: ApolloCache<any>, result: ApolloUpdateResultRestricted<IUpsertChapterNoteData>, options: ApolloUpdateOptions<IUpsertChapterNoteVar>) => void;
|
|
15
15
|
export declare const optimisticUpsertChapterNote: (data: IUpsertChapterNoteVar & {
|
|
16
16
|
userId: number;
|
|
17
|
-
}) =>
|
|
18
|
-
restricted: {
|
|
19
|
-
upsertChapterNote: {
|
|
20
|
-
createdAt: Date;
|
|
21
|
-
updatedAt: Date;
|
|
22
|
-
chapterId: number;
|
|
23
|
-
note: string;
|
|
24
|
-
userId: number;
|
|
25
|
-
__typename: string;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
};
|
|
17
|
+
}) => IUpsertChapterNoteData;
|
|
29
18
|
/**
|
|
30
19
|
* addChapterHighlight
|
|
31
20
|
*/
|
|
@@ -39,16 +39,18 @@ const updateCacheOnUpsertChapterNote = (cache, result, options) => {
|
|
|
39
39
|
};
|
|
40
40
|
exports.updateCacheOnUpsertChapterNote = updateCacheOnUpsertChapterNote;
|
|
41
41
|
const optimisticUpsertChapterNote = (data) => {
|
|
42
|
-
|
|
42
|
+
const payload = {
|
|
43
43
|
restricted: {
|
|
44
44
|
upsertChapterNote: {
|
|
45
45
|
__typename: 'UserChapterNote',
|
|
46
46
|
...data,
|
|
47
|
+
id: Date.now(),
|
|
47
48
|
createdAt: new Date(),
|
|
48
49
|
updatedAt: new Date(),
|
|
49
50
|
},
|
|
50
51
|
},
|
|
51
52
|
};
|
|
53
|
+
return payload;
|
|
52
54
|
};
|
|
53
55
|
exports.optimisticUpsertChapterNote = optimisticUpsertChapterNote;
|
|
54
56
|
exports.ADD_CHAPTER_HIGHLIGHT = (0, client_1.gql) `
|
|
@@ -149,19 +149,8 @@ export interface IUpsertStationNoteVar {
|
|
|
149
149
|
stationId: number;
|
|
150
150
|
note: string;
|
|
151
151
|
}
|
|
152
|
-
export type IUpsertStationNoteData = RestrictedData<IUserStationNote, 'upsertStationNote'>;
|
|
152
|
+
export type IUpsertStationNoteData = RestrictedData<graphqlNormalize & Omit<IUserStationNote, 'station'>, 'upsertStationNote'>;
|
|
153
153
|
export declare const updateCacheOnUpsertStationNote: (cache: ApolloCache<any>, result: ApolloUpdateResultRestricted<IUpsertStationNoteData>, options: ApolloUpdateOptions<IUpsertStationNoteVar>) => void;
|
|
154
154
|
export declare const optimisticUpsertStationNote: (data: IUpsertStationNoteVar & {
|
|
155
155
|
userId: number;
|
|
156
|
-
}) =>
|
|
157
|
-
restricted: {
|
|
158
|
-
upsertStationNote: {
|
|
159
|
-
createdAt: Date;
|
|
160
|
-
updatedAt: Date;
|
|
161
|
-
stationId: number;
|
|
162
|
-
note: string;
|
|
163
|
-
userId: number;
|
|
164
|
-
__typename: string;
|
|
165
|
-
};
|
|
166
|
-
};
|
|
167
|
-
};
|
|
156
|
+
}) => IUpsertStationNoteData;
|
|
@@ -52,7 +52,11 @@ exports.CREATE_OR_JOIN_OSCE_MARKSHEET = (0, client_1.gql) `
|
|
|
52
52
|
exports.BUILD_OSCE_MARKSHEET = (0, client_1.gql) `
|
|
53
53
|
${fragments_1.OSCE_STATION_FIELDS}
|
|
54
54
|
${fragments_1.OSCE_MARKSHEET_FIELDS}
|
|
55
|
-
mutation BuildOsceMarksheet(
|
|
55
|
+
mutation BuildOsceMarksheet(
|
|
56
|
+
$osceStationId: Int!
|
|
57
|
+
$osceMarksheetId: Int
|
|
58
|
+
$entitlementId: Int
|
|
59
|
+
) {
|
|
56
60
|
restricted {
|
|
57
61
|
buildOsceMarksheet(
|
|
58
62
|
osceStationId: $osceStationId
|
|
@@ -332,15 +336,17 @@ const updateCacheOnUpsertStationNote = (cache, result, options) => {
|
|
|
332
336
|
};
|
|
333
337
|
exports.updateCacheOnUpsertStationNote = updateCacheOnUpsertStationNote;
|
|
334
338
|
const optimisticUpsertStationNote = (data) => {
|
|
335
|
-
|
|
339
|
+
const payload = {
|
|
336
340
|
restricted: {
|
|
337
341
|
upsertStationNote: {
|
|
338
342
|
__typename: 'UserStationNote',
|
|
339
343
|
...data,
|
|
344
|
+
id: Date.now(),
|
|
340
345
|
createdAt: new Date(),
|
|
341
346
|
updatedAt: new Date(),
|
|
342
347
|
},
|
|
343
348
|
},
|
|
344
349
|
};
|
|
350
|
+
return payload;
|
|
345
351
|
};
|
|
346
352
|
exports.optimisticUpsertStationNote = optimisticUpsertStationNote;
|
|
@@ -4,6 +4,8 @@ import { ApolloUpdateOptions, ApolloUpdateResultRestricted } from '../../apollo'
|
|
|
4
4
|
import { RestrictedData, graphqlNormalize } from '../../types';
|
|
5
5
|
export interface ICancelSubscriptionVar {
|
|
6
6
|
subscriptionId: number;
|
|
7
|
+
comment?: ISubscription['comment'];
|
|
8
|
+
feedback?: ISubscription['feedback'];
|
|
7
9
|
}
|
|
8
10
|
export type ICancelSubscriptionData = RestrictedData<graphqlNormalize & ISubscription, 'cancelSubscription'>;
|
|
9
11
|
export declare const CANCEL_SUBSCRIPTION: import("@apollo/client").DocumentNode;
|
|
@@ -4,9 +4,17 @@ exports.updateSubscriptionOnCancelOrRenew = exports.CANCEL_SUBSCRIPTION = void 0
|
|
|
4
4
|
const client_1 = require("@apollo/client");
|
|
5
5
|
const restricted_1 = require("../../query/restricted");
|
|
6
6
|
exports.CANCEL_SUBSCRIPTION = (0, client_1.gql) `
|
|
7
|
-
mutation CancelSubscription(
|
|
7
|
+
mutation CancelSubscription(
|
|
8
|
+
$subscriptionId: Int!
|
|
9
|
+
$comment: String
|
|
10
|
+
$feedback: String
|
|
11
|
+
) {
|
|
8
12
|
restricted {
|
|
9
|
-
cancelSubscription(
|
|
13
|
+
cancelSubscription(
|
|
14
|
+
subscriptionId: $subscriptionId
|
|
15
|
+
comment: $comment
|
|
16
|
+
feedback: $feedback
|
|
17
|
+
) {
|
|
10
18
|
id
|
|
11
19
|
endedAt
|
|
12
20
|
periodEndAt
|
package/dist/cjs/utils/random.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getRandom = void 0;
|
|
3
|
+
exports.randomInt = exports.getRandom = void 0;
|
|
4
4
|
function getRandom(arr, n) {
|
|
5
5
|
if (n === undefined || n === null) {
|
|
6
6
|
n = arr.length;
|
|
@@ -18,3 +18,7 @@ function getRandom(arr, n) {
|
|
|
18
18
|
return result;
|
|
19
19
|
}
|
|
20
20
|
exports.getRandom = getRandom;
|
|
21
|
+
function randomInt(min = 1, max = 100) {
|
|
22
|
+
return Math.floor(Math.random() * (max - min + 1)) + min;
|
|
23
|
+
}
|
|
24
|
+
exports.randomInt = randomInt;
|
|
@@ -63,7 +63,12 @@ export declare enum EEntitlementType {
|
|
|
63
63
|
ANATOMY = 36,
|
|
64
64
|
PRE_CLINICAL = 37,
|
|
65
65
|
MRCP_PART_1 = 38,
|
|
66
|
-
MRCP_PART_2 = 39
|
|
66
|
+
MRCP_PART_2 = 39,
|
|
67
|
+
INTERVIEW_ANAESTHETICS = 40,
|
|
68
|
+
INTERVIEW_CST = 41,
|
|
69
|
+
INTERVIEW_IMT = 42,
|
|
70
|
+
INTERVIEW_RADIOLOGY = 43,
|
|
71
|
+
PLAB_1 = 44
|
|
67
72
|
}
|
|
68
73
|
export interface IProduct {
|
|
69
74
|
id: Id;
|
|
@@ -65,6 +65,11 @@ export var EEntitlementType;
|
|
|
65
65
|
EEntitlementType[EEntitlementType["PRE_CLINICAL"] = 37] = "PRE_CLINICAL";
|
|
66
66
|
EEntitlementType[EEntitlementType["MRCP_PART_1"] = 38] = "MRCP_PART_1";
|
|
67
67
|
EEntitlementType[EEntitlementType["MRCP_PART_2"] = 39] = "MRCP_PART_2";
|
|
68
|
+
EEntitlementType[EEntitlementType["INTERVIEW_ANAESTHETICS"] = 40] = "INTERVIEW_ANAESTHETICS";
|
|
69
|
+
EEntitlementType[EEntitlementType["INTERVIEW_CST"] = 41] = "INTERVIEW_CST";
|
|
70
|
+
EEntitlementType[EEntitlementType["INTERVIEW_IMT"] = 42] = "INTERVIEW_IMT";
|
|
71
|
+
EEntitlementType[EEntitlementType["INTERVIEW_RADIOLOGY"] = 43] = "INTERVIEW_RADIOLOGY";
|
|
72
|
+
EEntitlementType[EEntitlementType["PLAB_1"] = 44] = "PLAB_1";
|
|
68
73
|
})(EEntitlementType || (EEntitlementType = {}));
|
|
69
74
|
export var EAppType;
|
|
70
75
|
(function (EAppType) {
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import { IProduct } from './Product';
|
|
2
2
|
import { Id } from './Type';
|
|
3
3
|
import { IClassYear, IUser } from './User';
|
|
4
|
+
export declare enum ECancelReasons {
|
|
5
|
+
CUSTOMER_SERVICE = "customer_service",
|
|
6
|
+
LOW_QUALITY = "low_quality",
|
|
7
|
+
MISSING_FEATURES = "missing_features",
|
|
8
|
+
OTHER = "other",
|
|
9
|
+
SWITCHED_SERVICE = "switched_service",
|
|
10
|
+
TOO_COMPLEX = "too_complex",
|
|
11
|
+
TOO_EXPENSIVE = "too_expensive",
|
|
12
|
+
UNUSED = "unused"
|
|
13
|
+
}
|
|
4
14
|
export interface ISubscription {
|
|
5
15
|
id: Id;
|
|
6
16
|
createdAt: number | Date;
|
|
@@ -15,4 +25,6 @@ export interface ISubscription {
|
|
|
15
25
|
product?: IProduct;
|
|
16
26
|
classYear: IClassYear;
|
|
17
27
|
invoiced: number;
|
|
28
|
+
feedback: ECancelReasons | null;
|
|
29
|
+
comment: string;
|
|
18
30
|
}
|
|
@@ -1 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
// These options are only available for feedback in stripe, we cannot modify them
|
|
2
|
+
export var ECancelReasons;
|
|
3
|
+
(function (ECancelReasons) {
|
|
4
|
+
ECancelReasons["CUSTOMER_SERVICE"] = "customer_service";
|
|
5
|
+
ECancelReasons["LOW_QUALITY"] = "low_quality";
|
|
6
|
+
ECancelReasons["MISSING_FEATURES"] = "missing_features";
|
|
7
|
+
ECancelReasons["OTHER"] = "other";
|
|
8
|
+
ECancelReasons["SWITCHED_SERVICE"] = "switched_service";
|
|
9
|
+
ECancelReasons["TOO_COMPLEX"] = "too_complex";
|
|
10
|
+
ECancelReasons["TOO_EXPENSIVE"] = "too_expensive";
|
|
11
|
+
ECancelReasons["UNUSED"] = "unused";
|
|
12
|
+
})(ECancelReasons || (ECancelReasons = {}));
|
|
@@ -10,22 +10,11 @@ export interface IUpsertChapterNoteVar {
|
|
|
10
10
|
chapterId: number;
|
|
11
11
|
note: string;
|
|
12
12
|
}
|
|
13
|
-
export type IUpsertChapterNoteData = RestrictedData<IUserChapterNote, 'upsertChapterNote'>;
|
|
13
|
+
export type IUpsertChapterNoteData = RestrictedData<graphqlNormalize & Omit<IUserChapterNote, 'chapter'>, 'upsertChapterNote'>;
|
|
14
14
|
export declare const updateCacheOnUpsertChapterNote: (cache: ApolloCache<any>, result: ApolloUpdateResultRestricted<IUpsertChapterNoteData>, options: ApolloUpdateOptions<IUpsertChapterNoteVar>) => void;
|
|
15
15
|
export declare const optimisticUpsertChapterNote: (data: IUpsertChapterNoteVar & {
|
|
16
16
|
userId: number;
|
|
17
|
-
}) =>
|
|
18
|
-
restricted: {
|
|
19
|
-
upsertChapterNote: {
|
|
20
|
-
createdAt: Date;
|
|
21
|
-
updatedAt: Date;
|
|
22
|
-
chapterId: number;
|
|
23
|
-
note: string;
|
|
24
|
-
userId: number;
|
|
25
|
-
__typename: string;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
};
|
|
17
|
+
}) => IUpsertChapterNoteData;
|
|
29
18
|
/**
|
|
30
19
|
* addChapterHighlight
|
|
31
20
|
*/
|
|
@@ -35,16 +35,18 @@ export const updateCacheOnUpsertChapterNote = (cache, result, options) => {
|
|
|
35
35
|
});
|
|
36
36
|
};
|
|
37
37
|
export const optimisticUpsertChapterNote = (data) => {
|
|
38
|
-
|
|
38
|
+
const payload = {
|
|
39
39
|
restricted: {
|
|
40
40
|
upsertChapterNote: {
|
|
41
41
|
__typename: 'UserChapterNote',
|
|
42
42
|
...data,
|
|
43
|
+
id: Date.now(),
|
|
43
44
|
createdAt: new Date(),
|
|
44
45
|
updatedAt: new Date(),
|
|
45
46
|
},
|
|
46
47
|
},
|
|
47
48
|
};
|
|
49
|
+
return payload;
|
|
48
50
|
};
|
|
49
51
|
export const ADD_CHAPTER_HIGHLIGHT = gql `
|
|
50
52
|
${HIGHLIGHT_FIELDS}
|
|
@@ -149,19 +149,8 @@ export interface IUpsertStationNoteVar {
|
|
|
149
149
|
stationId: number;
|
|
150
150
|
note: string;
|
|
151
151
|
}
|
|
152
|
-
export type IUpsertStationNoteData = RestrictedData<IUserStationNote, 'upsertStationNote'>;
|
|
152
|
+
export type IUpsertStationNoteData = RestrictedData<graphqlNormalize & Omit<IUserStationNote, 'station'>, 'upsertStationNote'>;
|
|
153
153
|
export declare const updateCacheOnUpsertStationNote: (cache: ApolloCache<any>, result: ApolloUpdateResultRestricted<IUpsertStationNoteData>, options: ApolloUpdateOptions<IUpsertStationNoteVar>) => void;
|
|
154
154
|
export declare const optimisticUpsertStationNote: (data: IUpsertStationNoteVar & {
|
|
155
155
|
userId: number;
|
|
156
|
-
}) =>
|
|
157
|
-
restricted: {
|
|
158
|
-
upsertStationNote: {
|
|
159
|
-
createdAt: Date;
|
|
160
|
-
updatedAt: Date;
|
|
161
|
-
stationId: number;
|
|
162
|
-
note: string;
|
|
163
|
-
userId: number;
|
|
164
|
-
__typename: string;
|
|
165
|
-
};
|
|
166
|
-
};
|
|
167
|
-
};
|
|
156
|
+
}) => IUpsertStationNoteData;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { gql } from '@apollo/client';
|
|
2
2
|
import { EProductType, } from '../../../models';
|
|
3
|
-
import {
|
|
3
|
+
import { COMPLETED_OSCE_MARKSHEET_FRAGMENT, COMPLETED_OSCE_STATION_FRAGMENT, OSCE_MARKSHEET_FIELDS, OSCE_MATCHMAKING_ACTION_FIELDS, OSCE_STATION_FIELDS, UPSERT_STATION_NOTE_FRAGMENT, } from '../../fragments';
|
|
4
4
|
export const START_OSCE_MATCHMAKING = gql `
|
|
5
5
|
mutation StartOsceMatchmaking($sessionId: String!) {
|
|
6
6
|
restricted {
|
|
@@ -49,7 +49,11 @@ export const CREATE_OR_JOIN_OSCE_MARKSHEET = gql `
|
|
|
49
49
|
export const BUILD_OSCE_MARKSHEET = gql `
|
|
50
50
|
${OSCE_STATION_FIELDS}
|
|
51
51
|
${OSCE_MARKSHEET_FIELDS}
|
|
52
|
-
mutation BuildOsceMarksheet(
|
|
52
|
+
mutation BuildOsceMarksheet(
|
|
53
|
+
$osceStationId: Int!
|
|
54
|
+
$osceMarksheetId: Int
|
|
55
|
+
$entitlementId: Int
|
|
56
|
+
) {
|
|
53
57
|
restricted {
|
|
54
58
|
buildOsceMarksheet(
|
|
55
59
|
osceStationId: $osceStationId
|
|
@@ -325,14 +329,16 @@ export const updateCacheOnUpsertStationNote = (cache, result, options) => {
|
|
|
325
329
|
});
|
|
326
330
|
};
|
|
327
331
|
export const optimisticUpsertStationNote = (data) => {
|
|
328
|
-
|
|
332
|
+
const payload = {
|
|
329
333
|
restricted: {
|
|
330
334
|
upsertStationNote: {
|
|
331
335
|
__typename: 'UserStationNote',
|
|
332
336
|
...data,
|
|
337
|
+
id: Date.now(),
|
|
333
338
|
createdAt: new Date(),
|
|
334
339
|
updatedAt: new Date(),
|
|
335
340
|
},
|
|
336
341
|
},
|
|
337
342
|
};
|
|
343
|
+
return payload;
|
|
338
344
|
};
|
|
@@ -4,6 +4,8 @@ import { ApolloUpdateOptions, ApolloUpdateResultRestricted } from '../../apollo'
|
|
|
4
4
|
import { RestrictedData, graphqlNormalize } from '../../types';
|
|
5
5
|
export interface ICancelSubscriptionVar {
|
|
6
6
|
subscriptionId: number;
|
|
7
|
+
comment?: ISubscription['comment'];
|
|
8
|
+
feedback?: ISubscription['feedback'];
|
|
7
9
|
}
|
|
8
10
|
export type ICancelSubscriptionData = RestrictedData<graphqlNormalize & ISubscription, 'cancelSubscription'>;
|
|
9
11
|
export declare const CANCEL_SUBSCRIPTION: import("@apollo/client").DocumentNode;
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
import { gql } from '@apollo/client';
|
|
2
2
|
import { USER } from '../../query/restricted';
|
|
3
3
|
export const CANCEL_SUBSCRIPTION = gql `
|
|
4
|
-
mutation CancelSubscription(
|
|
4
|
+
mutation CancelSubscription(
|
|
5
|
+
$subscriptionId: Int!
|
|
6
|
+
$comment: String
|
|
7
|
+
$feedback: String
|
|
8
|
+
) {
|
|
5
9
|
restricted {
|
|
6
|
-
cancelSubscription(
|
|
10
|
+
cancelSubscription(
|
|
11
|
+
subscriptionId: $subscriptionId
|
|
12
|
+
comment: $comment
|
|
13
|
+
feedback: $feedback
|
|
14
|
+
) {
|
|
7
15
|
id
|
|
8
16
|
endedAt
|
|
9
17
|
periodEndAt
|
package/dist/mjs/utils/random.js
CHANGED