@quesmed/types-rn 2.6.91 → 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.
package/index.d.ts CHANGED
@@ -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/index.js CHANGED
@@ -61,6 +61,8 @@ var EGrammarType;
61
61
  EGrammarType[EGrammarType["EMQ_QUESTION"] = 9] = "EMQ_QUESTION";
62
62
  EGrammarType[EGrammarType["SJT_QUESTION"] = 10] = "SJT_QUESTION";
63
63
  EGrammarType[EGrammarType["RA_QUESTION"] = 11] = "RA_QUESTION";
64
+ EGrammarType[EGrammarType["PACES"] = 12] = "PACES";
65
+ EGrammarType[EGrammarType["PACE_TEMPLATE"] = 13] = "PACE_TEMPLATE";
64
66
  })(EGrammarType = exports.EGrammarType || (exports.EGrammarType = {}));
65
67
  exports.FCM_TOPICS = {
66
68
  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,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EContentType = exports.EBatchType = void 0;
4
+ var EBatchType;
5
+ (function (EBatchType) {
6
+ EBatchType[EBatchType["QUESTION"] = 0] = "QUESTION";
7
+ EBatchType[EBatchType["STATION"] = 1] = "STATION";
8
+ EBatchType[EBatchType["CHAPTER"] = 2] = "CHAPTER";
9
+ EBatchType[EBatchType["VIDEO"] = 3] = "VIDEO";
10
+ EBatchType[EBatchType["MOCK_TEST"] = 4] = "MOCK_TEST";
11
+ EBatchType[EBatchType["CONCEPT"] = 5] = "CONCEPT";
12
+ })(EBatchType = exports.EBatchType || (exports.EBatchType = {}));
13
+ var EContentType;
14
+ (function (EContentType) {
15
+ EContentType[EContentType["MARKDOWN"] = 0] = "MARKDOWN";
16
+ EContentType[EContentType["CSV"] = 1] = "CSV";
17
+ })(EContentType = exports.EContentType || (exports.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,
package/models/Product.js CHANGED
@@ -45,6 +45,7 @@ var EProductType;
45
45
  })(EProductType = exports.EProductType || (exports.EProductType = {}));
46
46
  var EEntitlementType;
47
47
  (function (EEntitlementType) {
48
+ EEntitlementType[EEntitlementType["ALL"] = 0] = "ALL";
48
49
  EEntitlementType[EEntitlementType["CLINICAL"] = 15] = "CLINICAL";
49
50
  EEntitlementType[EEntitlementType["DATA_INTERPRETATION"] = 16] = "DATA_INTERPRETATION";
50
51
  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;
package/models/User.d.ts CHANGED
@@ -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,
package/models/User.js CHANGED
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.currentClassGroup = exports.currentClassYear = exports.EPracticeIntensity = exports.classYearGroup = exports.EUserLearningPoint = exports.EUserLearningStatus = exports.EClassYearGroup = exports.dateProductMapping = exports.subscriptionDates = exports.classYears = exports.ETheme = exports.IAccessLevel = void 0;
4
4
  const luxon_1 = require("luxon");
5
5
  const Product_1 = require("./Product");
6
+ /** TODO:: Change to enum int and rename to EAccessLevel */
6
7
  var IAccessLevel;
7
8
  (function (IAccessLevel) {
8
9
  IAccessLevel["SUBSCRIBER"] = "subscriber";
@@ -10,6 +11,7 @@ var IAccessLevel;
10
11
  IAccessLevel["TUTOR"] = "tutor";
11
12
  IAccessLevel["DEMO"] = "demo";
12
13
  IAccessLevel["EXPIRED"] = "expired";
14
+ IAccessLevel["EDITOR"] = "editor";
13
15
  })(IAccessLevel = exports.IAccessLevel || (exports.IAccessLevel = {}));
14
16
  var ETheme;
15
17
  (function (ETheme) {
package/models/index.d.ts CHANGED
@@ -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';
package/models/index.js CHANGED
@@ -21,6 +21,7 @@ __exportStar(require("./Card"), exports);
21
21
  __exportStar(require("./Chapter"), exports);
22
22
  __exportStar(require("./Concept"), exports);
23
23
  __exportStar(require("./Condition"), exports);
24
+ __exportStar(require("./Content"), exports);
24
25
  __exportStar(require("./Difficulty"), exports);
25
26
  __exportStar(require("./Feedback"), exports);
26
27
  __exportStar(require("./File"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quesmed/types-rn",
3
- "version": "2.6.91",
3
+ "version": "2.6.92",
4
4
  "description": "Typescript types for Quesmed",
5
5
  "keywords": [
6
6
  "quesmed",
@@ -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,32 +1,20 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UPDATE_VIDEO_DATA_IN_ALGOLIA = exports.UPDATE_QUES_BOOK_DATA_IN_ALGOLIA = exports.UPDATE_QUESTIONS_DATA_IN_ALGOLIA = exports.UPDATE_CARDS_DATA_IN_ALGOLIA = void 0;
3
+ exports.ALGOLIA_SYNC = exports.ALGOLIA_INDEX = void 0;
4
4
  const client_1 = require("@apollo/client");
5
- exports.UPDATE_CARDS_DATA_IN_ALGOLIA = (0, client_1.gql) `
6
- mutation UpdateCardsDataInAlgolia {
5
+ var ALGOLIA_INDEX;
6
+ (function (ALGOLIA_INDEX) {
7
+ ALGOLIA_INDEX["Questions"] = "rebrand_questions";
8
+ ALGOLIA_INDEX["Flashcards"] = "rebrand_cards";
9
+ ALGOLIA_INDEX["Quesbook"] = "rebrand_quesbook";
10
+ ALGOLIA_INDEX["OsceBook"] = "rebrand_oscebook";
11
+ ALGOLIA_INDEX["PaceBook"] = "rebrand_pacebook";
12
+ ALGOLIA_INDEX["Videos"] = "rebrand_videos";
13
+ })(ALGOLIA_INDEX = exports.ALGOLIA_INDEX || (exports.ALGOLIA_INDEX = {}));
14
+ exports.ALGOLIA_SYNC = (0, client_1.gql) `
15
+ mutation AlgoliaSync($index: String!) {
7
16
  admin {
8
- updateCardsDataInAlgolia
9
- }
10
- }
11
- `;
12
- exports.UPDATE_QUESTIONS_DATA_IN_ALGOLIA = (0, client_1.gql) `
13
- mutation UpdateQuestionsDataInAlgolia {
14
- admin {
15
- updateQuestionsDataInAlgolia
16
- }
17
- }
18
- `;
19
- exports.UPDATE_QUES_BOOK_DATA_IN_ALGOLIA = (0, client_1.gql) `
20
- mutation UpdateQuesBookDataInAlgolia {
21
- admin {
22
- updateQuesBookDataInAlgolia
23
- }
24
- }
25
- `;
26
- exports.UPDATE_VIDEO_DATA_IN_ALGOLIA = (0, client_1.gql) `
27
- mutation UpdateVideoDataInAlgolia {
28
- admin {
29
- updateVideoDataInAlgolia
17
+ algoliaSync(index: $index)
30
18
  }
31
19
  }
32
20
  `;
@@ -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;
@@ -0,0 +1,170 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DELETE_IMAGES = exports.QUEUE_STATUS = exports.DELETE_RECORDS = exports.DOWNLOAD_IMAGES = exports.UPLOAD_IMAGES = exports.PUBLIC_BATCH = exports.UPDATE_BATCH = exports.IMPORT_BATCH = exports.VALIDATE_MOCKTEST = exports.VALIDATE_QUESTIONS = exports.VALIDATE_STATIONS = exports.VALIDATE_BOOK = void 0;
4
+ const client_1 = require("@apollo/client");
5
+ exports.VALIDATE_BOOK = (0, client_1.gql) `
6
+ mutation ValidateBook($input: ValidateBookInput!) {
7
+ admin {
8
+ validateBook(input: $input) {
9
+ batchId
10
+ logFile
11
+ status
12
+ message
13
+ errors
14
+ }
15
+ }
16
+ }
17
+ `;
18
+ exports.VALIDATE_STATIONS = (0, client_1.gql) `
19
+ mutation ValidateStations($input: ValidateStationInput!) {
20
+ admin {
21
+ validateStations(input: $input) {
22
+ batchId
23
+ logFile
24
+ status
25
+ message
26
+ errors
27
+ }
28
+ }
29
+ }
30
+ `;
31
+ exports.VALIDATE_QUESTIONS = (0, client_1.gql) `
32
+ mutation ValidateQuestions($input: ValidateQuestionInput!) {
33
+ admin {
34
+ validateQuestions(input: $input) {
35
+ batchId
36
+ logFile
37
+ status
38
+ message
39
+ errors
40
+ }
41
+ }
42
+ }
43
+ `;
44
+ exports.VALIDATE_MOCKTEST = (0, client_1.gql) `
45
+ mutation validateMockTest($input: ValidateMockTestInput!) {
46
+ admin {
47
+ validateMockTest(input: $input) {
48
+ batchId
49
+ logFile
50
+ status
51
+ message
52
+ errors
53
+ }
54
+ }
55
+ }
56
+ `;
57
+ exports.IMPORT_BATCH = (0, client_1.gql) `
58
+ mutation ImportBatch($batchId: String!) {
59
+ admin {
60
+ importBatch(batchId: $batchId) {
61
+ batchId
62
+ logFile
63
+ status
64
+ message
65
+ errors
66
+ }
67
+ }
68
+ }
69
+ `;
70
+ exports.UPDATE_BATCH = (0, client_1.gql) `
71
+ mutation UpdateBatch($batchId: String!) {
72
+ admin {
73
+ updateBatch(batchId: $batchId) {
74
+ batchId
75
+ logFile
76
+ status
77
+ message
78
+ errors
79
+ }
80
+ }
81
+ }
82
+ `;
83
+ exports.PUBLIC_BATCH = (0, client_1.gql) `
84
+ mutation PublicBatch($batchId: String!, $visibility: Boolean!) {
85
+ admin {
86
+ publicBatch(batchId: $batchId, visibility: $visibility) {
87
+ batchId
88
+ logFile
89
+ status
90
+ message
91
+ errors
92
+ }
93
+ }
94
+ }
95
+ `;
96
+ exports.UPLOAD_IMAGES = (0, client_1.gql) `
97
+ mutation UploadImages($file: FileDataInput!) {
98
+ admin {
99
+ uploadImages(file: $file) {
100
+ logFile
101
+ status
102
+ message
103
+ batchId
104
+ data
105
+ recordIds
106
+ errors
107
+ }
108
+ }
109
+ }
110
+ `;
111
+ exports.DOWNLOAD_IMAGES = (0, client_1.gql) `
112
+ mutation DownloadImages($ids: [Int!]!) {
113
+ admin {
114
+ downloadImages(ids: $ids) {
115
+ logFile
116
+ status
117
+ message
118
+ batchId
119
+ data
120
+ recordIds
121
+ errors
122
+ }
123
+ }
124
+ }
125
+ `;
126
+ exports.DELETE_RECORDS = (0, client_1.gql) `
127
+ mutation DeleteRecords($input: DeleteRecordsInput!) {
128
+ admin {
129
+ deleteRecords(input: $input) {
130
+ logFile
131
+ status
132
+ message
133
+ batchId
134
+ data
135
+ recordIds
136
+ errors
137
+ }
138
+ }
139
+ }
140
+ `;
141
+ exports.QUEUE_STATUS = (0, client_1.gql) `
142
+ mutation QueueStatus($ids: [Int!]!) {
143
+ admin {
144
+ queueStatus(ids: $ids) {
145
+ logFile
146
+ status
147
+ message
148
+ data
149
+ batchId
150
+ recordIds
151
+ errors
152
+ }
153
+ }
154
+ }
155
+ `;
156
+ exports.DELETE_IMAGES = (0, client_1.gql) `
157
+ mutation DeleteImages($ids: [Int!]!) {
158
+ admin {
159
+ deleteImages(ids: $ids) {
160
+ logFile
161
+ status
162
+ batchId
163
+ message
164
+ data
165
+ recordIds
166
+ errors
167
+ }
168
+ }
169
+ }
170
+ `;
@@ -0,0 +1,12 @@
1
+ import { AdminData } from '../../types';
2
+ export declare const REFRESH_MTV: import("@apollo/client").DocumentNode;
3
+ export type IRefreshMtvVar = {
4
+ name: string;
5
+ };
6
+ export type IRefreshMtvData = AdminData<boolean, 'refreshMtv'>;
7
+ export declare const REFRESH_WIKI: import("@apollo/client").DocumentNode;
8
+ export type IRefreshWikiVar = null;
9
+ export type IRefreshWikiData = AdminData<boolean, 'refreshWiki'>;
10
+ export declare const RESET_QUES_DIFFICULTY: import("@apollo/client").DocumentNode;
11
+ export type IResetQueDifficultyVar = null;
12
+ export type IResetQueDifficultyData = AdminData<boolean, 'resetQueDifficulty'>;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RESET_QUES_DIFFICULTY = exports.REFRESH_WIKI = exports.REFRESH_MTV = void 0;
4
+ const client_1 = require("@apollo/client");
5
+ exports.REFRESH_MTV = (0, client_1.gql) `
6
+ mutation RefreshMtv($name: String!) {
7
+ admin {
8
+ refreshMtv(name: $name)
9
+ }
10
+ }
11
+ `;
12
+ exports.REFRESH_WIKI = (0, client_1.gql) `
13
+ mutation RefreshWiki {
14
+ admin {
15
+ refreshWiki
16
+ }
17
+ }
18
+ `;
19
+ exports.RESET_QUES_DIFFICULTY = (0, client_1.gql) `
20
+ mutation ResetQueDifficulty {
21
+ admin {
22
+ resetQueDifficulty
23
+ }
24
+ }
25
+ `;
@@ -1,3 +1,5 @@
1
1
  export * from './algoliaSync';
2
+ export * from './content';
3
+ export * from './database';
2
4
  export * from './notification';
3
5
  export * from './token';
@@ -15,5 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./algoliaSync"), exports);
18
+ __exportStar(require("./content"), exports);
19
+ __exportStar(require("./database"), exports);
18
20
  __exportStar(require("./notification"), exports);
19
21
  __exportStar(require("./token"), exports);
@@ -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
+ `;
@@ -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);