@quesmed/types 2.6.90 → 2.6.92

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.
Files changed (67) hide show
  1. package/dist/cjs/index.d.ts +3 -1
  2. package/dist/cjs/index.js +2 -0
  3. package/dist/cjs/models/Concept.d.ts +2 -3
  4. package/dist/cjs/models/Condition.d.ts +1 -0
  5. package/dist/cjs/models/Content.d.ts +120 -0
  6. package/dist/cjs/models/Content.js +17 -0
  7. package/dist/cjs/models/OsceStation.d.ts +1 -0
  8. package/dist/cjs/models/Presentation.d.ts +1 -0
  9. package/dist/cjs/models/Product.d.ts +1 -0
  10. package/dist/cjs/models/Product.js +1 -0
  11. package/dist/cjs/models/UkmlaTopic.d.ts +1 -0
  12. package/dist/cjs/models/User.d.ts +5 -3
  13. package/dist/cjs/models/User.js +2 -0
  14. package/dist/cjs/models/index.d.ts +1 -0
  15. package/dist/cjs/models/index.js +1 -0
  16. package/dist/cjs/resolvers/mutation/admin/algoliaSync.d.ts +13 -12
  17. package/dist/cjs/resolvers/mutation/admin/algoliaSync.js +13 -25
  18. package/dist/cjs/resolvers/mutation/admin/content.d.ts +86 -0
  19. package/dist/cjs/resolvers/mutation/admin/content.js +170 -0
  20. package/dist/cjs/resolvers/mutation/admin/database.d.ts +12 -0
  21. package/dist/cjs/resolvers/mutation/admin/database.js +25 -0
  22. package/dist/cjs/resolvers/mutation/admin/index.d.ts +2 -0
  23. package/dist/cjs/resolvers/mutation/admin/index.js +2 -0
  24. package/dist/cjs/resolvers/mutation/admin/notification.d.ts +3 -0
  25. package/dist/cjs/resolvers/mutation/admin/notification.js +26 -0
  26. package/dist/cjs/resolvers/mutation/restricted/users.d.ts +2 -2
  27. package/dist/cjs/resolvers/mutation/restricted/users.js +3 -2
  28. package/dist/cjs/resolvers/mutation/users.d.ts +7 -0
  29. package/dist/cjs/resolvers/mutation/users.js +6 -1
  30. package/dist/cjs/resolvers/query/admin/database.d.ts +9 -0
  31. package/dist/cjs/resolvers/query/admin/database.js +15 -0
  32. package/dist/cjs/resolvers/query/admin/index.d.ts +1 -0
  33. package/dist/cjs/resolvers/query/admin/index.js +1 -0
  34. package/dist/mjs/index.d.ts +3 -1
  35. package/dist/mjs/index.js +2 -0
  36. package/dist/mjs/models/Concept.d.ts +2 -3
  37. package/dist/mjs/models/Condition.d.ts +1 -0
  38. package/dist/mjs/models/Content.d.ts +120 -0
  39. package/dist/mjs/models/Content.js +14 -0
  40. package/dist/mjs/models/OsceStation.d.ts +1 -0
  41. package/dist/mjs/models/Presentation.d.ts +1 -0
  42. package/dist/mjs/models/Product.d.ts +1 -0
  43. package/dist/mjs/models/Product.js +1 -0
  44. package/dist/mjs/models/UkmlaTopic.d.ts +1 -0
  45. package/dist/mjs/models/User.d.ts +5 -3
  46. package/dist/mjs/models/User.js +2 -0
  47. package/dist/mjs/models/index.d.ts +1 -0
  48. package/dist/mjs/models/index.js +1 -0
  49. package/dist/mjs/resolvers/mutation/admin/algoliaSync.d.ts +13 -12
  50. package/dist/mjs/resolvers/mutation/admin/algoliaSync.js +12 -24
  51. package/dist/mjs/resolvers/mutation/admin/content.d.ts +86 -0
  52. package/dist/mjs/resolvers/mutation/admin/content.js +167 -0
  53. package/dist/mjs/resolvers/mutation/admin/database.d.ts +12 -0
  54. package/dist/mjs/resolvers/mutation/admin/database.js +22 -0
  55. package/dist/mjs/resolvers/mutation/admin/index.d.ts +2 -0
  56. package/dist/mjs/resolvers/mutation/admin/index.js +2 -0
  57. package/dist/mjs/resolvers/mutation/admin/notification.d.ts +3 -0
  58. package/dist/mjs/resolvers/mutation/admin/notification.js +25 -1
  59. package/dist/mjs/resolvers/mutation/restricted/users.d.ts +2 -2
  60. package/dist/mjs/resolvers/mutation/restricted/users.js +3 -2
  61. package/dist/mjs/resolvers/mutation/users.d.ts +7 -0
  62. package/dist/mjs/resolvers/mutation/users.js +5 -0
  63. package/dist/mjs/resolvers/query/admin/database.d.ts +9 -0
  64. package/dist/mjs/resolvers/query/admin/database.js +12 -0
  65. package/dist/mjs/resolvers/query/admin/index.d.ts +1 -0
  66. package/dist/mjs/resolvers/query/admin/index.js +1 -0
  67. package/package.json +1 -1
@@ -4,12 +4,15 @@ export interface IAdminAddNotificationInput {
4
4
  description: string;
5
5
  actionType: ENotificationActionType;
6
6
  type: ENotificationType;
7
+ userName: string;
7
8
  }
8
9
  export type IAdminAddNotificationVar = {
9
10
  data: IAdminAddNotificationInput;
10
11
  };
11
12
  export type IAdminAddNotificationData = AdminData<INotification, 'addNotification'>;
13
+ export declare const ADD_NOTIFICATION: import("@apollo/client").DocumentNode;
12
14
  export type IAdminAddNotificationsVar = {
13
15
  data: IAdminAddNotificationInput[];
14
16
  };
15
17
  export type IAdminAddNotificationsData = AdminData<INotification[], 'addNotifications'>;
18
+ export declare const ADD_NOTIFICATIONS: import("@apollo/client").DocumentNode;
@@ -1,2 +1,28 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ADD_NOTIFICATIONS = exports.ADD_NOTIFICATION = void 0;
4
+ const client_1 = require("@apollo/client");
5
+ exports.ADD_NOTIFICATION = (0, client_1.gql) `
6
+ mutation addNotification($data: AddAdminNotificationInput!) {
7
+ admin {
8
+ addNotification(data: $data) {
9
+ id
10
+ description
11
+ actionType
12
+ type
13
+ }
14
+ }
15
+ }
16
+ `;
17
+ exports.ADD_NOTIFICATIONS = (0, client_1.gql) `
18
+ mutation addNotifications($data: [AddAdminNotificationInput!]!) {
19
+ admin {
20
+ addNotifications(data: $data) {
21
+ id
22
+ description
23
+ actionType
24
+ type
25
+ }
26
+ }
27
+ }
28
+ `;
@@ -45,8 +45,8 @@ export type IUpdateUserData = RestrictedData<{
45
45
  }, 'updateUser'>;
46
46
  export declare const UPDATE_USER_SETTINGS: import("@apollo/client").DocumentNode;
47
47
  export interface IAddProductFeedbackVar {
48
- rating: number;
49
- feedback: string;
48
+ rating?: number;
49
+ feedback?: string;
50
50
  }
51
51
  export type IAddProductFeedbackData = RestrictedData<IProductFeedback & graphqlNormalize, 'addProductFeedback'>;
52
52
  export declare const ADD_PRODUCT_FEEDBACK: import("@apollo/client").DocumentNode;
@@ -74,7 +74,7 @@ exports.UPDATE_USER_SETTINGS = (0, client_1.gql) `
74
74
  }
75
75
  `;
76
76
  exports.ADD_PRODUCT_FEEDBACK = (0, client_1.gql) `
77
- mutation AddProductFeedback($rating: Int!, $feedback: String!) {
77
+ mutation AddProductFeedback($rating: Int, $feedback: String) {
78
78
  restricted {
79
79
  addProductFeedback(rating: $rating, feedback: $feedback) {
80
80
  id
@@ -90,7 +90,8 @@ exports.ADD_PRODUCT_FEEDBACK = (0, client_1.gql) `
90
90
  const optimisticAddProductFeedback = (input) => ({
91
91
  restricted: {
92
92
  addProductFeedback: {
93
- ...input,
93
+ rating: input.rating || null,
94
+ feedback: input.feedback || null,
94
95
  createdAt: new Date(),
95
96
  userId: 1,
96
97
  productId: 1,
@@ -1,4 +1,11 @@
1
1
  import { RootData } from '../types';
2
+ export declare const LOGIN_ADMIN: import("@apollo/client").DocumentNode;
3
+ export interface ILoginAdminVar {
4
+ username: string;
5
+ password: string;
6
+ days: number;
7
+ }
8
+ export type ILoginAdminData = RootData<string, 'loginAdmin'>;
2
9
  export declare const LOGIN_USER: import("@apollo/client").DocumentNode;
3
10
  export interface ILoginUserVar {
4
11
  username: string;
@@ -1,7 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RESET_PASSWORD = exports.RESET_PASSWORD_PREP = exports.REGISTER_USER = exports.LOGIN_USER = void 0;
3
+ exports.RESET_PASSWORD = exports.RESET_PASSWORD_PREP = exports.REGISTER_USER = exports.LOGIN_USER = exports.LOGIN_ADMIN = void 0;
4
4
  const client_1 = require("@apollo/client");
5
+ exports.LOGIN_ADMIN = (0, client_1.gql) `
6
+ mutation LoginAdmin($username: String!, $password: String!, $days: Int!) {
7
+ loginAdmin(username: $username, password: $password, days: $days)
8
+ }
9
+ `;
5
10
  exports.LOGIN_USER = (0, client_1.gql) `
6
11
  mutation LoginUser($username: String!, $password: String!, $days: Int!) {
7
12
  loginUser(username: $username, password: $password, days: $days)
@@ -0,0 +1,9 @@
1
+ import { AdminData } from '../../types';
2
+ export declare const GET_DATABASE_FMV: import("@apollo/client").DocumentNode;
3
+ export interface IDatabaseFMV {
4
+ functions: string[];
5
+ materializedViews: string[];
6
+ views: string[];
7
+ }
8
+ export type IGetDatabaseFMVVar = null;
9
+ export type IGetDatabaseFMVData = AdminData<IDatabaseFMV, 'database'>;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GET_DATABASE_FMV = void 0;
4
+ const client_1 = require("@apollo/client");
5
+ exports.GET_DATABASE_FMV = (0, client_1.gql) `
6
+ query Database {
7
+ admin {
8
+ database {
9
+ functions
10
+ materializedViews
11
+ views
12
+ }
13
+ }
14
+ }
15
+ `;
@@ -1 +1,2 @@
1
1
  export * from './getUserToken';
2
+ export * from './database';
@@ -15,3 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./getUserToken"), exports);
18
+ __exportStar(require("./database"), exports);
@@ -28,7 +28,9 @@ export declare enum EGrammarType {
28
28
  BOOK = 8,
29
29
  EMQ_QUESTION = 9,
30
30
  SJT_QUESTION = 10,
31
- RA_QUESTION = 11
31
+ RA_QUESTION = 11,
32
+ PACES = 12,
33
+ PACE_TEMPLATE = 13
32
34
  }
33
35
  export declare const FCM_TOPICS: {
34
36
  GLOBAL: string;
package/dist/mjs/index.js CHANGED
@@ -32,6 +32,8 @@ export var EGrammarType;
32
32
  EGrammarType[EGrammarType["EMQ_QUESTION"] = 9] = "EMQ_QUESTION";
33
33
  EGrammarType[EGrammarType["SJT_QUESTION"] = 10] = "SJT_QUESTION";
34
34
  EGrammarType[EGrammarType["RA_QUESTION"] = 11] = "RA_QUESTION";
35
+ EGrammarType[EGrammarType["PACES"] = 12] = "PACES";
36
+ EGrammarType[EGrammarType["PACE_TEMPLATE"] = 13] = "PACE_TEMPLATE";
35
37
  })(EGrammarType || (EGrammarType = {}));
36
38
  export const FCM_TOPICS = {
37
39
  GLOBAL: 'global',
@@ -1,7 +1,6 @@
1
1
  import { IChapter } from './Chapter';
2
+ import { EEntitlementType, IEntitlement } from './Product';
2
3
  import { IUserConceptNote } from './Note';
3
- import { EPaceType } from './Paces';
4
- import { IEntitlement } from './Product';
5
4
  import { ITopic } from './Topic';
6
5
  import { Id } from './Type';
7
6
  import { EUserLearningStatus } from './User';
@@ -18,7 +17,7 @@ export interface IConcept {
18
17
  chapter?: IChapter;
19
18
  videos?: IVideo[];
20
19
  demo?: boolean;
21
- typeId?: EPaceType | null;
20
+ typeId?: EEntitlementType | null;
22
21
  entitlement: IEntitlement | null;
23
22
  totalQuestions?: number | null;
24
23
  correctQuestions?: number | null;
@@ -11,6 +11,7 @@ export interface ICondition {
11
11
  topic: IUkmlaTopic;
12
12
  concepts?: IConcept[];
13
13
  demo?: boolean;
14
+ public: boolean;
14
15
  totalQuestions?: number | null;
15
16
  correctQuestions?: number | null;
16
17
  incorrectQuestions?: number | null;
@@ -0,0 +1,120 @@
1
+ import { EGrammarType } from '..';
2
+ import { EDifficultyType } from './Difficulty';
3
+ import { IQuestion } from './Question';
4
+ import { Id } from './Type';
5
+ export declare enum EBatchType {
6
+ QUESTION = 0,
7
+ STATION = 1,
8
+ CHAPTER = 2,
9
+ VIDEO = 3,
10
+ MOCK_TEST = 4,
11
+ CONCEPT = 5
12
+ }
13
+ export declare enum EContentType {
14
+ MARKDOWN = 0,
15
+ CSV = 1
16
+ }
17
+ export interface IDiscardRecord {
18
+ id: number;
19
+ recordId: number;
20
+ completed: boolean;
21
+ type: EBatchType;
22
+ addedBy: number;
23
+ reason: string;
24
+ createdAt: number | Date;
25
+ updatedAt: number | Date;
26
+ }
27
+ export interface IBatch {
28
+ id: string;
29
+ editorId: Id;
30
+ type: EBatchType;
31
+ comment: string | null;
32
+ createdAt: Date | number;
33
+ updatedAt: Date | number;
34
+ }
35
+ export interface IQuestionBatch {
36
+ id: string;
37
+ batchId: string;
38
+ questionId: Id;
39
+ }
40
+ export interface IChapterBatch {
41
+ id: string;
42
+ batchId: string;
43
+ chapterId: Id;
44
+ }
45
+ export interface IStationBatch {
46
+ id: string;
47
+ batchId: string;
48
+ stationId: Id;
49
+ }
50
+ export interface IQuestionRevision {
51
+ id: Id;
52
+ questionId: Id;
53
+ conceptId: Id;
54
+ difficulty: IQuestion['difficulty'];
55
+ typeId: IQuestion['typeId'];
56
+ question: IQuestion['question'];
57
+ answer: IQuestion['answer'];
58
+ cases: IQuestion['cases'];
59
+ choices: IQuestion['choices'];
60
+ explanation: IQuestion['explanation'];
61
+ elo: IQuestion['elo'];
62
+ psaSectionId: IQuestion['psaSectionId'];
63
+ createdAt: number | Date;
64
+ }
65
+ export interface IContentResult {
66
+ batchId: string;
67
+ logFile: string;
68
+ status: number;
69
+ message: string;
70
+ errors: string | null;
71
+ }
72
+ export interface IResultData extends IContentResult {
73
+ recordIds: number[];
74
+ data: string | null;
75
+ }
76
+ export interface FileData {
77
+ fieldname: string;
78
+ originalname: string;
79
+ encoding: string;
80
+ mimetype: string;
81
+ destination: string;
82
+ filename: string;
83
+ path: string;
84
+ size: number;
85
+ }
86
+ export interface IForcedChecks {
87
+ question: boolean;
88
+ topic: boolean;
89
+ ukmlaTopic: boolean;
90
+ concept: boolean;
91
+ station: boolean;
92
+ presentation: boolean;
93
+ condition: boolean;
94
+ }
95
+ export interface IForcedInserts {
96
+ question: boolean;
97
+ topic: boolean;
98
+ ukmlaTopic: boolean;
99
+ concept: boolean;
100
+ station: boolean;
101
+ presentation: boolean;
102
+ condition: boolean;
103
+ }
104
+ export interface IOverwriteOpts {
105
+ batchId: string | null;
106
+ resetLikes: boolean;
107
+ resetProgress: boolean;
108
+ picture: boolean;
109
+ }
110
+ export interface IContentArgs {
111
+ file: FileData;
112
+ grammarType: EGrammarType;
113
+ difficulty: EDifficultyType;
114
+ folders: string[];
115
+ forcedChecks: IForcedChecks;
116
+ forcedInserts: IForcedInserts;
117
+ comment: string;
118
+ overWrite: IOverwriteOpts | null;
119
+ contentType: EContentType;
120
+ }
@@ -0,0 +1,14 @@
1
+ export var EBatchType;
2
+ (function (EBatchType) {
3
+ EBatchType[EBatchType["QUESTION"] = 0] = "QUESTION";
4
+ EBatchType[EBatchType["STATION"] = 1] = "STATION";
5
+ EBatchType[EBatchType["CHAPTER"] = 2] = "CHAPTER";
6
+ EBatchType[EBatchType["VIDEO"] = 3] = "VIDEO";
7
+ EBatchType[EBatchType["MOCK_TEST"] = 4] = "MOCK_TEST";
8
+ EBatchType[EBatchType["CONCEPT"] = 5] = "CONCEPT";
9
+ })(EBatchType || (EBatchType = {}));
10
+ export var EContentType;
11
+ (function (EContentType) {
12
+ EContentType[EContentType["MARKDOWN"] = 0] = "MARKDOWN";
13
+ EContentType[EContentType["CSV"] = 1] = "CSV";
14
+ })(EContentType || (EContentType = {}));
@@ -72,6 +72,7 @@ export interface IOsceStation {
72
72
  status?: EUserLearningStatus;
73
73
  demo?: boolean;
74
74
  userNote: null | IUserStationNote;
75
+ public: boolean;
75
76
  }
76
77
  export interface IOsceStationTopic {
77
78
  id: Id;
@@ -9,6 +9,7 @@ export interface IPresentation {
9
9
  topicId: Id;
10
10
  topic: IUkmlaTopic;
11
11
  demo?: boolean;
12
+ public: boolean;
12
13
  totalQuestions?: number | null;
13
14
  correctQuestions?: number | null;
14
15
  incorrectQuestions?: number | null;
@@ -41,6 +41,7 @@ export declare enum EProductType {
41
41
  PLAB2 = 35
42
42
  }
43
43
  export declare enum EEntitlementType {
44
+ ALL = 0,
44
45
  CLINICAL = 15,
45
46
  DATA_INTERPRETATION = 16,
46
47
  CLINICAL_SUBSET = 17,
@@ -42,6 +42,7 @@ export var EProductType;
42
42
  })(EProductType || (EProductType = {}));
43
43
  export var EEntitlementType;
44
44
  (function (EEntitlementType) {
45
+ EEntitlementType[EEntitlementType["ALL"] = 0] = "ALL";
45
46
  EEntitlementType[EEntitlementType["CLINICAL"] = 15] = "CLINICAL";
46
47
  EEntitlementType[EEntitlementType["DATA_INTERPRETATION"] = 16] = "DATA_INTERPRETATION";
47
48
  EEntitlementType[EEntitlementType["CLINICAL_SUBSET"] = 17] = "CLINICAL_SUBSET";
@@ -10,6 +10,7 @@ export interface IUkmlaTopic {
10
10
  demo?: boolean;
11
11
  conditions?: ICondition[];
12
12
  presentations?: IPresentation[];
13
+ public: boolean;
13
14
  totalQuestions?: number | null;
14
15
  correctQuestions?: number | null;
15
16
  incorrectQuestions?: number | null;
@@ -12,12 +12,14 @@ import { Id } from './Type';
12
12
  import { IUniversity } from './University';
13
13
  import { IVideo } from './Video';
14
14
  export type IUserSubsriptionDates = keyof ExtractKeysWithPattern<IPayload, 'EndDate'>;
15
+ /** TODO:: Change to enum int and rename to EAccessLevel */
15
16
  export declare enum IAccessLevel {
16
17
  SUBSCRIBER = "subscriber",
17
18
  ADMINISTRATOR = "administrator",
18
19
  TUTOR = "tutor",
19
20
  DEMO = "demo",
20
- EXPIRED = "expired"
21
+ EXPIRED = "expired",
22
+ EDITOR = "editor"
21
23
  }
22
24
  export declare enum ETheme {
23
25
  AUTO = 0,
@@ -119,8 +121,8 @@ export interface IProductFeedback {
119
121
  id: Id;
120
122
  userId: Id;
121
123
  productId: EProductType;
122
- rating: number;
123
- feedback: string;
124
+ rating: number | null;
125
+ feedback: string | null;
124
126
  createdAt: number | Date;
125
127
  }
126
128
  export interface IUser {
@@ -1,5 +1,6 @@
1
1
  import { DateTime } from 'luxon';
2
2
  import { EProductType } from './Product';
3
+ /** TODO:: Change to enum int and rename to EAccessLevel */
3
4
  export var IAccessLevel;
4
5
  (function (IAccessLevel) {
5
6
  IAccessLevel["SUBSCRIBER"] = "subscriber";
@@ -7,6 +8,7 @@ export var IAccessLevel;
7
8
  IAccessLevel["TUTOR"] = "tutor";
8
9
  IAccessLevel["DEMO"] = "demo";
9
10
  IAccessLevel["EXPIRED"] = "expired";
11
+ IAccessLevel["EDITOR"] = "editor";
10
12
  })(IAccessLevel || (IAccessLevel = {}));
11
13
  export var ETheme;
12
14
  (function (ETheme) {
@@ -5,6 +5,7 @@ export * from './Card';
5
5
  export * from './Chapter';
6
6
  export * from './Concept';
7
7
  export * from './Condition';
8
+ export * from './Content';
8
9
  export * from './Difficulty';
9
10
  export * from './Feedback';
10
11
  export * from './File';
@@ -5,6 +5,7 @@ export * from './Card';
5
5
  export * from './Chapter';
6
6
  export * from './Concept';
7
7
  export * from './Condition';
8
+ export * from './Content';
8
9
  export * from './Difficulty';
9
10
  export * from './Feedback';
10
11
  export * from './File';
@@ -1,13 +1,14 @@
1
1
  import { AdminData } from '../../types';
2
- export declare const UPDATE_CARDS_DATA_IN_ALGOLIA: import("@apollo/client").DocumentNode;
3
- export type IUpdateCardsDataInAlgoliaVar = void;
4
- export type IUpdateCardsDataInAlgoliaData = AdminData<string, 'updateCardsDataInAlgolia'>;
5
- export declare const UPDATE_QUESTIONS_DATA_IN_ALGOLIA: import("@apollo/client").DocumentNode;
6
- export type IUpdateQuestionsDataInAlgoliaVar = void;
7
- export type IUpdateQuestionsDataInAlgoliaData = AdminData<string, 'updateQuestionsDataInAlgolia'>;
8
- export declare const UPDATE_QUES_BOOK_DATA_IN_ALGOLIA: import("@apollo/client").DocumentNode;
9
- export type IUpdateQuesBookDataInAlgoliaVar = void;
10
- export type IUpdateQuesBookDataInAlgoliaData = AdminData<string, 'updateDataInAlgolia'>;
11
- export declare const UPDATE_VIDEO_DATA_IN_ALGOLIA: import("@apollo/client").DocumentNode;
12
- export type IUpdateVideoDataInAlgoliaVar = void;
13
- export type IUpdateVideoDataInAlgoliaData = AdminData<string, 'updateVideoDataInAlgolia'>;
2
+ export declare enum ALGOLIA_INDEX {
3
+ Questions = "rebrand_questions",
4
+ Flashcards = "rebrand_cards",
5
+ Quesbook = "rebrand_quesbook",
6
+ OsceBook = "rebrand_oscebook",
7
+ PaceBook = "rebrand_pacebook",
8
+ Videos = "rebrand_videos"
9
+ }
10
+ export declare const ALGOLIA_SYNC: import("@apollo/client").DocumentNode;
11
+ export type IAlgoliaSyncVar = {
12
+ index: ALGOLIA_INDEX;
13
+ };
14
+ export type IAlgoliaSyncData = AdminData<boolean, 'algoliaSync'>;
@@ -1,29 +1,17 @@
1
1
  import { gql } from '@apollo/client';
2
- export const UPDATE_CARDS_DATA_IN_ALGOLIA = gql `
3
- mutation UpdateCardsDataInAlgolia {
2
+ export var ALGOLIA_INDEX;
3
+ (function (ALGOLIA_INDEX) {
4
+ ALGOLIA_INDEX["Questions"] = "rebrand_questions";
5
+ ALGOLIA_INDEX["Flashcards"] = "rebrand_cards";
6
+ ALGOLIA_INDEX["Quesbook"] = "rebrand_quesbook";
7
+ ALGOLIA_INDEX["OsceBook"] = "rebrand_oscebook";
8
+ ALGOLIA_INDEX["PaceBook"] = "rebrand_pacebook";
9
+ ALGOLIA_INDEX["Videos"] = "rebrand_videos";
10
+ })(ALGOLIA_INDEX || (ALGOLIA_INDEX = {}));
11
+ export const ALGOLIA_SYNC = gql `
12
+ mutation AlgoliaSync($index: String!) {
4
13
  admin {
5
- updateCardsDataInAlgolia
6
- }
7
- }
8
- `;
9
- export const UPDATE_QUESTIONS_DATA_IN_ALGOLIA = gql `
10
- mutation UpdateQuestionsDataInAlgolia {
11
- admin {
12
- updateQuestionsDataInAlgolia
13
- }
14
- }
15
- `;
16
- export const UPDATE_QUES_BOOK_DATA_IN_ALGOLIA = gql `
17
- mutation UpdateQuesBookDataInAlgolia {
18
- admin {
19
- updateQuesBookDataInAlgolia
20
- }
21
- }
22
- `;
23
- export const UPDATE_VIDEO_DATA_IN_ALGOLIA = gql `
24
- mutation UpdateVideoDataInAlgolia {
25
- admin {
26
- updateVideoDataInAlgolia
14
+ algoliaSync(index: $index)
27
15
  }
28
16
  }
29
17
  `;
@@ -0,0 +1,86 @@
1
+ import { AdminData } from '../../..';
2
+ import { EBatchType, EEntitlementType, EMockTestType, EOsceType, EPaceType, EProductType, ETopicType, FileData, IContentArgs, IContentResult, IResultData } from '../../../models';
3
+ export interface IBookOptions extends Omit<IContentArgs, 'difficulty'> {
4
+ topicTypeId: ETopicType;
5
+ entitlementId: EEntitlementType;
6
+ }
7
+ export interface IValidateBookVar {
8
+ input: IBookOptions;
9
+ }
10
+ export type IValidateBookData = AdminData<IContentResult, 'validateBook'>;
11
+ export declare const VALIDATE_BOOK: import("@apollo/client").DocumentNode;
12
+ export interface IStationOptions extends IContentArgs {
13
+ stationTypeId: EOsceType | EPaceType;
14
+ entitlementId: EEntitlementType;
15
+ }
16
+ export interface IValidateStationsVar {
17
+ input: IStationOptions;
18
+ }
19
+ export type IValidateStationsData = AdminData<IContentResult, 'validateStations'>;
20
+ export declare const VALIDATE_STATIONS: import("@apollo/client").DocumentNode;
21
+ export interface IQueOptions extends IContentArgs {
22
+ topicTypeId: ETopicType;
23
+ entitlementId: EEntitlementType;
24
+ }
25
+ export interface IValidateQuestionsVar {
26
+ input: IQueOptions;
27
+ }
28
+ export type IValidateQuestionsData = AdminData<IContentResult, 'validateQuestions'>;
29
+ export declare const VALIDATE_QUESTIONS: import("@apollo/client").DocumentNode;
30
+ export interface IMockOptions extends IContentArgs {
31
+ mockTypeId: EMockTestType;
32
+ topicTypeId: ETopicType;
33
+ productId: EProductType;
34
+ title: string;
35
+ passingMark: number;
36
+ }
37
+ export interface IValidateMockTestVar {
38
+ input: IMockOptions;
39
+ }
40
+ export type IValidateMockTestData = AdminData<IContentResult, 'validateMockTest'>;
41
+ export declare const VALIDATE_MOCKTEST: import("@apollo/client").DocumentNode;
42
+ export interface IImportBatchVar {
43
+ batchId: string;
44
+ }
45
+ export type IImportBatchData = AdminData<IContentResult, 'importBatch'>;
46
+ export declare const IMPORT_BATCH: import("@apollo/client").DocumentNode;
47
+ export interface IUpdateBatchVar {
48
+ batchId: string;
49
+ }
50
+ export type IUpdateBatchData = AdminData<IContentResult, 'updateBatch'>;
51
+ export declare const UPDATE_BATCH: import("@apollo/client").DocumentNode;
52
+ export interface IPublicBatchVar {
53
+ batchId: string;
54
+ visibility: boolean;
55
+ }
56
+ export type IPublicBatchData = AdminData<IContentResult, 'publicBatch'>;
57
+ export declare const PUBLIC_BATCH: import("@apollo/client").DocumentNode;
58
+ export interface IUploadImagesVar {
59
+ file: FileData;
60
+ }
61
+ export type IUploadImagesdata = AdminData<IResultData, 'uploadImages'>;
62
+ export declare const UPLOAD_IMAGES: import("@apollo/client").DocumentNode;
63
+ export interface IDownloadImagesVar {
64
+ ids: number[];
65
+ }
66
+ export type IDownloadImagesdata = AdminData<IResultData, 'downloadImages'>;
67
+ export declare const DOWNLOAD_IMAGES: import("@apollo/client").DocumentNode;
68
+ export interface IDeleteRecordsVar {
69
+ input: {
70
+ recordIds: number[];
71
+ type: EBatchType;
72
+ reason: string;
73
+ };
74
+ }
75
+ export type IDeleteRecordsData = AdminData<IResultData, 'deleteRecords'>;
76
+ export declare const DELETE_RECORDS: import("@apollo/client").DocumentNode;
77
+ export interface IQueueStatusVar {
78
+ ids: number[];
79
+ }
80
+ export type IQueueStatusData = AdminData<IResultData, 'queueStatus'>;
81
+ export declare const QUEUE_STATUS: import("@apollo/client").DocumentNode;
82
+ export interface IDeleteImagesVar {
83
+ ids: number[];
84
+ }
85
+ export type IDeleteImagesdata = AdminData<IResultData, 'deleteImages'>;
86
+ export declare const DELETE_IMAGES: import("@apollo/client").DocumentNode;