@quesmed/types-rn 2.6.64 → 2.6.66
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/models/Blog.d.ts
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { IPicture } from './Picture';
|
|
2
2
|
import { Id } from './Type';
|
|
3
|
-
/**
|
|
4
|
-
* This tags will need to be taken from db `blog-tags` after editor create them
|
|
5
|
-
*/
|
|
6
3
|
export declare enum EBlogTags {
|
|
7
|
-
MRCP_PART_1 = "
|
|
8
|
-
MRCP_PART_2 = "
|
|
9
|
-
PACES = "
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
4
|
+
MRCP_PART_1 = "MRCP_Part_1",
|
|
5
|
+
MRCP_PART_2 = "MRCP_Part_2",
|
|
6
|
+
PACES = "MRCP_PACES",
|
|
7
|
+
MEDICAL_FINALS = "Medical_school_finals",
|
|
8
|
+
UKMLA = "UKMLA",
|
|
9
|
+
QUESMED = "Quesmed",
|
|
10
|
+
CLINICAL = "Clinical_placement",
|
|
11
|
+
MEDICAL_LEARNING = "Medical_school_learning",
|
|
12
|
+
UKMLA_AKT = "UKMLA_AKT",
|
|
13
|
+
QUESMED_MRCP = "Quesmed_MRCP",
|
|
14
|
+
MLA_AKT = "MLA_AKT",
|
|
15
|
+
MLA_CSPA = "MLA_CPSA"
|
|
15
16
|
}
|
|
16
17
|
export interface IBlogTag {
|
|
17
18
|
id: Id;
|
package/models/Blog.js
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.EBlogTags = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* This tags will need to be taken from db `blog-tags` after editor create them
|
|
6
|
-
*/
|
|
7
4
|
var EBlogTags;
|
|
8
5
|
(function (EBlogTags) {
|
|
9
|
-
EBlogTags["MRCP_PART_1"] = "
|
|
10
|
-
EBlogTags["MRCP_PART_2"] = "
|
|
11
|
-
EBlogTags["PACES"] = "
|
|
12
|
-
EBlogTags["
|
|
13
|
-
EBlogTags["
|
|
14
|
-
EBlogTags["
|
|
15
|
-
EBlogTags["
|
|
16
|
-
EBlogTags["
|
|
6
|
+
EBlogTags["MRCP_PART_1"] = "MRCP_Part_1";
|
|
7
|
+
EBlogTags["MRCP_PART_2"] = "MRCP_Part_2";
|
|
8
|
+
EBlogTags["PACES"] = "MRCP_PACES";
|
|
9
|
+
EBlogTags["MEDICAL_FINALS"] = "Medical_school_finals";
|
|
10
|
+
EBlogTags["UKMLA"] = "UKMLA";
|
|
11
|
+
EBlogTags["QUESMED"] = "Quesmed";
|
|
12
|
+
EBlogTags["CLINICAL"] = "Clinical_placement";
|
|
13
|
+
EBlogTags["MEDICAL_LEARNING"] = "Medical_school_learning";
|
|
14
|
+
EBlogTags["UKMLA_AKT"] = "UKMLA_AKT";
|
|
15
|
+
EBlogTags["QUESMED_MRCP"] = "Quesmed_MRCP";
|
|
16
|
+
EBlogTags["MLA_AKT"] = "MLA_AKT";
|
|
17
|
+
EBlogTags["MLA_CSPA"] = "MLA_CPSA";
|
|
17
18
|
})(EBlogTags = exports.EBlogTags || (exports.EBlogTags = {}));
|
package/package.json
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export declare const VIDEO_FILE_FIELDS: import("@apollo/client").DocumentNode;
|
|
2
2
|
export declare const VIDEO_FIELDS: import("@apollo/client").DocumentNode;
|
|
3
3
|
export declare const VIDEO_STATUS_FRAGMENT: import("@apollo/client").DocumentNode;
|
|
4
|
+
export declare const VIDEO_USER_VIEWED_FRAGMENT: import("@apollo/client").DocumentNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.VIDEO_STATUS_FRAGMENT = exports.VIDEO_FIELDS = exports.VIDEO_FILE_FIELDS = void 0;
|
|
3
|
+
exports.VIDEO_USER_VIEWED_FRAGMENT = exports.VIDEO_STATUS_FRAGMENT = exports.VIDEO_FIELDS = exports.VIDEO_FILE_FIELDS = void 0;
|
|
4
4
|
const client_1 = require("@apollo/client");
|
|
5
5
|
exports.VIDEO_FILE_FIELDS = (0, client_1.gql) `
|
|
6
6
|
fragment VideoFileFields on File {
|
|
@@ -50,3 +50,8 @@ exports.VIDEO_STATUS_FRAGMENT = (0, client_1.gql) `
|
|
|
50
50
|
status
|
|
51
51
|
}
|
|
52
52
|
`;
|
|
53
|
+
exports.VIDEO_USER_VIEWED_FRAGMENT = (0, client_1.gql) `
|
|
54
|
+
fragment VideoUserViewed on Video {
|
|
55
|
+
userViewed
|
|
56
|
+
}
|
|
57
|
+
`;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ApolloCache } from '@apollo/client';
|
|
2
|
+
import { IVideo, Id } from '../../../models';
|
|
3
|
+
import { ApolloUpdateResultRestricted } from '../../apollo';
|
|
4
|
+
import { RestrictedData, graphqlNormalize } from '../../types';
|
|
3
5
|
export declare const VIDEO_WATCHED: import("@apollo/client").DocumentNode;
|
|
4
6
|
export interface IVideoWatchedVar {
|
|
5
7
|
id: Id;
|
|
6
8
|
}
|
|
7
9
|
export type IVideoWatchedData = RestrictedData<graphqlNormalize & IVideo, 'videoWatched'>;
|
|
10
|
+
export declare const updateCacheOnVideoWatched: (cache: ApolloCache<any>, result: ApolloUpdateResultRestricted<IVideoWatchedData>) => void;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.VIDEO_WATCHED = void 0;
|
|
3
|
+
exports.updateCacheOnVideoWatched = exports.VIDEO_WATCHED = void 0;
|
|
4
4
|
const client_1 = require("@apollo/client");
|
|
5
|
+
const fragments_1 = require("../../fragments");
|
|
5
6
|
exports.VIDEO_WATCHED = (0, client_1.gql) `
|
|
6
7
|
mutation VideoWatched($id: Int!) {
|
|
7
8
|
restricted {
|
|
@@ -13,3 +14,18 @@ exports.VIDEO_WATCHED = (0, client_1.gql) `
|
|
|
13
14
|
}
|
|
14
15
|
}
|
|
15
16
|
`;
|
|
17
|
+
const updateCacheOnVideoWatched = (cache, result) => {
|
|
18
|
+
const { videoWatched } = result?.data?.restricted || {};
|
|
19
|
+
if (!videoWatched) {
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
const { id } = videoWatched;
|
|
23
|
+
cache.writeFragment({
|
|
24
|
+
id: cache.identify({ id, __typename: 'Video' }),
|
|
25
|
+
data: {
|
|
26
|
+
userViewed: true,
|
|
27
|
+
},
|
|
28
|
+
fragment: fragments_1.VIDEO_USER_VIEWED_FRAGMENT,
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
exports.updateCacheOnVideoWatched = updateCacheOnVideoWatched;
|