@quesmed/types-rn 2.6.168 → 2.6.170

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/Job.d.ts CHANGED
@@ -16,8 +16,8 @@ export declare enum EJobStatus {
16
16
  REJECTED = 4,
17
17
  APPROVED = 5,
18
18
  TESTING = 6,
19
- PUBLISHED = 7,
20
- PARTIAL_TRIALING = 8,
19
+ PARTIAL_TRIALING = 7,
20
+ PUBLISHED = 8,
21
21
  CLOSED = 9
22
22
  }
23
23
  export declare enum EJobType {
@@ -93,6 +93,7 @@ export interface IJobAsset {
93
93
  export interface IJobRecordQuestion {
94
94
  question: string;
95
95
  stem?: string | null;
96
+ stemFromRecordId?: IJobRecord['id'] | null;
96
97
  conceptId?: number | null;
97
98
  explanation?: string | null;
98
99
  learningPoint?: string | null;
@@ -132,6 +133,7 @@ export interface IJobRecord {
132
133
  index: number;
133
134
  jobId: IJob['id'];
134
135
  status: EJobRecordStatus;
136
+ referenceId: string | null;
135
137
  data: IJobRecordQuestion | IJobRecordStation | IJobRecordChapter | IJobRecordMockTest;
136
138
  publishedAt: Date | number | null;
137
139
  createdAt: Date | number;
package/models/Job.js CHANGED
@@ -22,10 +22,10 @@ var EJobStatus;
22
22
  EJobStatus[EJobStatus["APPROVED"] = 5] = "APPROVED";
23
23
  //In QA, testing, or limited release
24
24
  EJobStatus[EJobStatus["TESTING"] = 6] = "TESTING";
25
- // Final version is live and visible
26
- EJobStatus[EJobStatus["PUBLISHED"] = 7] = "PUBLISHED";
27
25
  //Partial batch, some content is live
28
- EJobStatus[EJobStatus["PARTIAL_TRIALING"] = 8] = "PARTIAL_TRIALING";
26
+ EJobStatus[EJobStatus["PARTIAL_TRIALING"] = 7] = "PARTIAL_TRIALING";
27
+ // Final version is live and visible
28
+ EJobStatus[EJobStatus["PUBLISHED"] = 8] = "PUBLISHED";
29
29
  //Closed, revision not allowed
30
30
  EJobStatus[EJobStatus["CLOSED"] = 9] = "CLOSED";
31
31
  })(EJobStatus = exports.EJobStatus || (exports.EJobStatus = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quesmed/types-rn",
3
- "version": "2.6.168",
3
+ "version": "2.6.170",
4
4
  "description": "Typescript types for Quesmed",
5
5
  "keywords": [
6
6
  "quesmed",
@@ -81,6 +81,7 @@ exports.JOB_RECORD_QUESTION_FRAGMENT = (0, client_1.gql) `
81
81
  fragment JobRecordQuestion on JobRecordQuestion {
82
82
  question
83
83
  stem
84
+ stemFromRecordId
84
85
  conceptId
85
86
  typeId
86
87
  answer
@@ -144,6 +145,7 @@ exports.JOB_RECORD_FRAGMENT = (0, client_1.gql) `
144
145
  id
145
146
  jobId
146
147
  index
148
+ referenceId
147
149
  data {
148
150
  ... on JobRecordQuestion {
149
151
  ...JobRecordQuestion
@@ -5,4 +5,5 @@ export * from './database';
5
5
  export * from './job';
6
6
  export * from './notification';
7
7
  export * from './question';
8
+ export * from './record';
8
9
  export * from './token';
@@ -21,4 +21,5 @@ __exportStar(require("./database"), exports);
21
21
  __exportStar(require("./job"), exports);
22
22
  __exportStar(require("./notification"), exports);
23
23
  __exportStar(require("./question"), exports);
24
+ __exportStar(require("./record"), exports);
24
25
  __exportStar(require("./token"), exports);
@@ -1,4 +1,4 @@
1
- import { IJob, IJobChat, IJobMember, IJobRecord, IJobRecordChapter, IJobRecordMockTest, IJobRecordQuestion, IJobRecordStation, IJobRemark } from '../../../models';
1
+ import { IJob, IJobChat, IJobMember, IJobRemark } from '../../../models';
2
2
  import { AdminData } from '../../types';
3
3
  export declare const CREATE_JOB: import("@apollo/client").DocumentNode;
4
4
  export type ICreateJobInput = {
@@ -31,6 +31,7 @@ export declare const UPDATE_JOB_STATUS: import("@apollo/client").DocumentNode;
31
31
  export type IUpdateJobStatusVar = {
32
32
  id: IJob['id'];
33
33
  status: IJob['status'];
34
+ statusOnly?: boolean;
34
35
  };
35
36
  export type IUpdateJobStatusData = AdminData<IJob, 'updateJobStatus'>;
36
37
  export declare const DELETE_JOB: import("@apollo/client").DocumentNode;
@@ -56,52 +57,6 @@ export type IDeleteJobRemarkVar = {
56
57
  id: IJobRemark['id'];
57
58
  };
58
59
  export type IDeleteJobRemarkData = AdminData<boolean, 'deleteJobRemark'>;
59
- export declare const CREATE_JOB_RECORD: import("@apollo/client").DocumentNode;
60
- export type ICreateJobRecordVar = {
61
- input: {
62
- jobId: IJobRecord['jobId'];
63
- data: {
64
- question: IJobRecordQuestion;
65
- } | {
66
- station: IJobRecordStation;
67
- } | {
68
- chapter: IJobRecordChapter;
69
- } | {
70
- mockTest: IJobRecordMockTest;
71
- } | null;
72
- };
73
- };
74
- export type ICreateJobRecordData = AdminData<IJobRecord, 'createJobRecord'>;
75
- export declare const DELETE_JOB_RECORD: import("@apollo/client").DocumentNode;
76
- export type IDeleteJobRecordVar = {
77
- id: IJobRecord['id'];
78
- };
79
- export type IDeleteJobRecordData = AdminData<boolean, 'deleteJobRecord'>;
80
- export declare const UPDATE_JOB_RECORD: import("@apollo/client").DocumentNode;
81
- export type IUpdateJobRecordVar = {
82
- id: IJobRecord['id'];
83
- input: {
84
- question: Partial<IJobRecordQuestion>;
85
- } | {
86
- station: Partial<IJobRecordStation>;
87
- } | {
88
- chapter: Partial<IJobRecordChapter>;
89
- } | {
90
- mockTest: Partial<IJobRecordMockTest>;
91
- } | null;
92
- };
93
- export type IUpdateJobRecordData = AdminData<IJobRecord, 'updateJobRecord'>;
94
- export declare const DUPLICATE_JOB_RECORD: import("@apollo/client").DocumentNode;
95
- export type IDuplicateJobRecordVar = {
96
- id: IJobRecord['id'];
97
- };
98
- export type IDuplicateJobRecordData = AdminData<IJobRecord, 'duplicateJobRecord'>;
99
- export declare const UPDATE_JOB_RECORD_STATUS: import("@apollo/client").DocumentNode;
100
- export type IUpdateJobRecordStatusVar = {
101
- ids: IJobRecord['id'][];
102
- status: IJobRecord['status'];
103
- };
104
- export type IUpdateJobRecordStatusData = AdminData<IJobRecord[], 'updateJobRecordStatus'>;
105
60
  export declare const CREATE_JOB_CHAT: import("@apollo/client").DocumentNode;
106
61
  export type ICreateJobChatVar = {
107
62
  input: Pick<IJobChat, 'jobId' | 'message' | 'userId'>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DELETE_JOB_CHATS = exports.DELETE_JOB_CHAT = exports.CREATE_JOB_CHAT = exports.UPDATE_JOB_RECORD_STATUS = exports.DUPLICATE_JOB_RECORD = exports.UPDATE_JOB_RECORD = exports.DELETE_JOB_RECORD = exports.CREATE_JOB_RECORD = exports.DELETE_JOB_REMARK = exports.UPDATE_JOB_REMARK = exports.CREATE_JOB_REMARK = exports.DELETE_JOB = exports.UPDATE_JOB_STATUS = exports.DUPLICATE_JOB = exports.UPDATE_JOB = exports.CREATE_JOB = void 0;
3
+ exports.DELETE_JOB_CHATS = exports.DELETE_JOB_CHAT = exports.CREATE_JOB_CHAT = exports.DELETE_JOB_REMARK = exports.UPDATE_JOB_REMARK = exports.CREATE_JOB_REMARK = exports.DELETE_JOB = exports.UPDATE_JOB_STATUS = exports.DUPLICATE_JOB = exports.UPDATE_JOB = exports.CREATE_JOB = void 0;
4
4
  const client_1 = require("@apollo/client");
5
5
  const fragments_1 = require("../../fragments");
6
6
  exports.CREATE_JOB = (0, client_1.gql) `
@@ -35,9 +35,9 @@ exports.DUPLICATE_JOB = (0, client_1.gql) `
35
35
  `;
36
36
  exports.UPDATE_JOB_STATUS = (0, client_1.gql) `
37
37
  ${fragments_1.JOB_STATUS_FRAGMENT}
38
- mutation UpdateJobStatus($id: ID!, $status: Int!) {
38
+ mutation UpdateJobStatus($id: ID!, $status: Int!, $statusOnly: Boolean) {
39
39
  admin {
40
- updateJobStatus(id: $id, status: $status) {
40
+ updateJobStatus(id: $id, status: $status, statusOnly: $statusOnly) {
41
41
  ...JobStatus
42
42
  }
43
43
  }
@@ -77,53 +77,6 @@ exports.DELETE_JOB_REMARK = (0, client_1.gql) `
77
77
  }
78
78
  }
79
79
  `;
80
- exports.CREATE_JOB_RECORD = (0, client_1.gql) `
81
- ${fragments_1.JOB_RECORD_FRAGMENT}
82
- mutation CreateJobRecord($input: CreateJobRecordInput!) {
83
- admin {
84
- createJobRecord(input: $input) {
85
- ...JobRecord
86
- }
87
- }
88
- }
89
- `;
90
- exports.DELETE_JOB_RECORD = (0, client_1.gql) `
91
- mutation DeleteJobRecord($id: ID!) {
92
- admin {
93
- deleteJobRecord(id: $id)
94
- }
95
- }
96
- `;
97
- exports.UPDATE_JOB_RECORD = (0, client_1.gql) `
98
- ${fragments_1.JOB_RECORD_FRAGMENT}
99
- mutation UpdateJobRecord($id: ID!, $input: JobRecordDataInput!) {
100
- admin {
101
- updateJobRecord(id: $id, input: $input) {
102
- ...JobRecord
103
- }
104
- }
105
- }
106
- `;
107
- exports.DUPLICATE_JOB_RECORD = (0, client_1.gql) `
108
- ${fragments_1.JOB_RECORD_FRAGMENT}
109
- mutation DuplicateJobRecord($id: ID!) {
110
- admin {
111
- duplicateJobRecord(id: $id) {
112
- ...JobRecord
113
- }
114
- }
115
- }
116
- `;
117
- exports.UPDATE_JOB_RECORD_STATUS = (0, client_1.gql) `
118
- ${fragments_1.JOB_RECORD_STATUS_FRAGMENT}
119
- mutation UpdateJobRecordStatus($ids: [ID!]!, $status: Int!) {
120
- admin {
121
- updateJobRecordStatus(ids: $ids, status: $status) {
122
- ...JobRecordStatus
123
- }
124
- }
125
- }
126
- `;
127
80
  exports.CREATE_JOB_CHAT = (0, client_1.gql) `
128
81
  mutation CreateJobChat($input: CreateJobChatInput!) {
129
82
  admin {
@@ -0,0 +1,50 @@
1
+ import { IJobRecord, IJobRecordChapter, IJobRecordMockTest, IJobRecordQuestion, IJobRecordStation } from '../../../models';
2
+ import { AdminData } from '../../types';
3
+ export declare const CREATE_JOB_RECORD: import("@apollo/client").DocumentNode;
4
+ export type ICreateJobRecordVar = {
5
+ input: {
6
+ jobId: IJobRecord['jobId'];
7
+ referenceId?: IJobRecord['referenceId'];
8
+ data: {
9
+ question: IJobRecordQuestion;
10
+ } | {
11
+ station: IJobRecordStation;
12
+ } | {
13
+ chapter: IJobRecordChapter;
14
+ } | {
15
+ mockTest: IJobRecordMockTest;
16
+ } | null;
17
+ };
18
+ };
19
+ export type ICreateJobRecordData = AdminData<IJobRecord, 'createJobRecord'>;
20
+ export declare const DELETE_JOB_RECORD: import("@apollo/client").DocumentNode;
21
+ export type IDeleteJobRecordVar = {
22
+ id: IJobRecord['id'];
23
+ };
24
+ export type IDeleteJobRecordData = AdminData<boolean, 'deleteJobRecord'>;
25
+ export declare const UPDATE_JOB_RECORD: import("@apollo/client").DocumentNode;
26
+ export type IUpdateJobRecordVar = {
27
+ id: IJobRecord['id'];
28
+ referenceId?: IJobRecord['referenceId'];
29
+ input: {
30
+ question: Partial<IJobRecordQuestion>;
31
+ } | {
32
+ station: Partial<IJobRecordStation>;
33
+ } | {
34
+ chapter: Partial<IJobRecordChapter>;
35
+ } | {
36
+ mockTest: Partial<IJobRecordMockTest>;
37
+ } | null;
38
+ };
39
+ export type IUpdateJobRecordData = AdminData<IJobRecord, 'updateJobRecord'>;
40
+ export declare const DUPLICATE_JOB_RECORD: import("@apollo/client").DocumentNode;
41
+ export type IDuplicateJobRecordVar = {
42
+ id: IJobRecord['id'];
43
+ };
44
+ export type IDuplicateJobRecordData = AdminData<IJobRecord, 'duplicateJobRecord'>;
45
+ export declare const UPDATE_JOB_RECORD_STATUS: import("@apollo/client").DocumentNode;
46
+ export type IUpdateJobRecordStatusVar = {
47
+ ids: IJobRecord['id'][];
48
+ status: IJobRecord['status'];
49
+ };
50
+ export type IUpdateJobRecordStatusData = AdminData<IJobRecord[], 'updateJobRecordStatus'>;
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UPDATE_JOB_RECORD_STATUS = exports.DUPLICATE_JOB_RECORD = exports.UPDATE_JOB_RECORD = exports.DELETE_JOB_RECORD = exports.CREATE_JOB_RECORD = void 0;
4
+ const client_1 = require("@apollo/client");
5
+ const fragments_1 = require("../../fragments");
6
+ exports.CREATE_JOB_RECORD = (0, client_1.gql) `
7
+ ${fragments_1.JOB_RECORD_FRAGMENT}
8
+ mutation CreateJobRecord($input: CreateJobRecordInput!) {
9
+ admin {
10
+ createJobRecord(input: $input) {
11
+ ...JobRecord
12
+ }
13
+ }
14
+ }
15
+ `;
16
+ exports.DELETE_JOB_RECORD = (0, client_1.gql) `
17
+ mutation DeleteJobRecord($id: ID!) {
18
+ admin {
19
+ deleteJobRecord(id: $id)
20
+ }
21
+ }
22
+ `;
23
+ exports.UPDATE_JOB_RECORD = (0, client_1.gql) `
24
+ ${fragments_1.JOB_RECORD_FRAGMENT}
25
+ mutation UpdateJobRecord(
26
+ $id: ID!
27
+ $referenceId: ID
28
+ $input: JobRecordDataInput!
29
+ ) {
30
+ admin {
31
+ updateJobRecord(id: $id, referenceId: $referenceId, input: $input) {
32
+ ...JobRecord
33
+ }
34
+ }
35
+ }
36
+ `;
37
+ exports.DUPLICATE_JOB_RECORD = (0, client_1.gql) `
38
+ ${fragments_1.JOB_RECORD_FRAGMENT}
39
+ mutation DuplicateJobRecord($id: ID!) {
40
+ admin {
41
+ duplicateJobRecord(id: $id) {
42
+ ...JobRecord
43
+ }
44
+ }
45
+ }
46
+ `;
47
+ exports.UPDATE_JOB_RECORD_STATUS = (0, client_1.gql) `
48
+ ${fragments_1.JOB_RECORD_STATUS_FRAGMENT}
49
+ mutation UpdateJobRecordStatus($ids: [ID!]!, $status: Int!) {
50
+ admin {
51
+ updateJobRecordStatus(ids: $ids, status: $status) {
52
+ ...JobRecordStatus
53
+ }
54
+ }
55
+ }
56
+ `;
@@ -3,3 +3,4 @@ export * from './database';
3
3
  export * from './getUserToken';
4
4
  export * from './job';
5
5
  export * from './question';
6
+ export * from './record';
@@ -19,3 +19,4 @@ __exportStar(require("./database"), exports);
19
19
  __exportStar(require("./getUserToken"), exports);
20
20
  __exportStar(require("./job"), exports);
21
21
  __exportStar(require("./question"), exports);
22
+ __exportStar(require("./record"), exports);
@@ -1,4 +1,4 @@
1
- import { EJobStatus, IJob, IJobChat, IJobRecord, IJobRemark, Id } from '../../../models';
1
+ import { EJobStatus, IJob, IJobChat, IJobRemark } from '../../../models';
2
2
  import { AdminData } from '../../types';
3
3
  export declare const GET_JOB: import("@apollo/client").DocumentNode;
4
4
  export type IGetJobVar = {
@@ -29,25 +29,6 @@ export type IGetJobRemarksVar = {
29
29
  jobId: IJob['id'];
30
30
  };
31
31
  export type IGetJobRemarksData = AdminData<IJobRemark[], 'getJobRemarks'>;
32
- export declare const GET_JOB_RECORDS: import("@apollo/client").DocumentNode;
33
- export type IGetJobRecordsVar = {
34
- jobId: IJob['id'];
35
- };
36
- export type IGetJobRecordsData = AdminData<IJobRecord[], 'getJobRecords'>;
37
- export declare const GET_JOB_RECORD: import("@apollo/client").DocumentNode;
38
- export type IGetJobRecordVar = {
39
- id: IJobRecord['id'];
40
- };
41
- export type IGetJobRecordData = AdminData<IJobRecord, 'getJobRecord'>;
42
- export type IGetIdDetailsVar = {
43
- ids: Array<Id>;
44
- table: string;
45
- };
46
- export type IGetIdDetailsData = AdminData<Array<{
47
- id: Id;
48
- name: string;
49
- }>, 'getIdDetails'>;
50
- export declare const GET_ID_DETAILS: import("@apollo/client").DocumentNode;
51
32
  export declare const GET_JOB_CHATS: import("@apollo/client").DocumentNode;
52
33
  export type IGetJobChatsVar = {
53
34
  jobId: IJob['id'];
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GET_JOB_CHATS = exports.GET_ID_DETAILS = exports.GET_JOB_RECORD = exports.GET_JOB_RECORDS = exports.GET_JOB_REMARKS = exports.GET_JOBS = exports.GET_JOB = void 0;
3
+ exports.GET_JOB_CHATS = exports.GET_JOB_REMARKS = exports.GET_JOBS = exports.GET_JOB = void 0;
4
4
  const client_1 = require("@apollo/client");
5
5
  const fragments_1 = require("../../fragments");
6
6
  exports.GET_JOB = (0, client_1.gql) `
@@ -40,36 +40,6 @@ exports.GET_JOB_REMARKS = (0, client_1.gql) `
40
40
  }
41
41
  }
42
42
  `;
43
- exports.GET_JOB_RECORDS = (0, client_1.gql) `
44
- ${fragments_1.JOB_RECORD_FRAGMENT}
45
- query GetJobRecords($jobId: ID!) {
46
- admin {
47
- getJobRecords(jobId: $jobId) {
48
- ...JobRecord
49
- }
50
- }
51
- }
52
- `;
53
- exports.GET_JOB_RECORD = (0, client_1.gql) `
54
- ${fragments_1.JOB_RECORD_FRAGMENT}
55
- query GetJobRecord($id: ID!) {
56
- admin {
57
- getJobRecord(id: $id) {
58
- ...JobRecord
59
- }
60
- }
61
- }
62
- `;
63
- exports.GET_ID_DETAILS = (0, client_1.gql) `
64
- query GetIdDetails($ids: [ID!]!, $table: String!) {
65
- admin {
66
- getIdDetails(ids: $ids, table: $table) {
67
- id
68
- name
69
- }
70
- }
71
- }
72
- `;
73
43
  exports.GET_JOB_CHATS = (0, client_1.gql) `
74
44
  ${fragments_1.JOB_CHAT_FRAGMENT}
75
45
  query GetJobChats($jobId: ID!) {
@@ -0,0 +1,21 @@
1
+ import { IJob, IJobRecord, Id } from '../../../models';
2
+ import { AdminData } from '../../types';
3
+ export declare const GET_JOB_RECORDS: import("@apollo/client").DocumentNode;
4
+ export type IGetJobRecordsVar = {
5
+ jobId: IJob['id'];
6
+ };
7
+ export type IGetJobRecordsData = AdminData<IJobRecord[], 'getJobRecords'>;
8
+ export declare const GET_JOB_RECORD: import("@apollo/client").DocumentNode;
9
+ export type IGetJobRecordVar = {
10
+ id: IJobRecord['id'];
11
+ };
12
+ export type IGetJobRecordData = AdminData<IJobRecord, 'getJobRecord'>;
13
+ export type IGetIdDetailsVar = {
14
+ ids: Array<Id>;
15
+ table: string;
16
+ };
17
+ export type IGetIdDetailsData = AdminData<Array<{
18
+ id: Id;
19
+ name: string;
20
+ }>, 'getIdDetails'>;
21
+ export declare const GET_ID_DETAILS: import("@apollo/client").DocumentNode;
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GET_ID_DETAILS = exports.GET_JOB_RECORD = exports.GET_JOB_RECORDS = void 0;
4
+ const client_1 = require("@apollo/client");
5
+ const fragments_1 = require("../../fragments");
6
+ exports.GET_JOB_RECORDS = (0, client_1.gql) `
7
+ ${fragments_1.JOB_RECORD_FRAGMENT}
8
+ query GetJobRecords($jobId: ID!) {
9
+ admin {
10
+ getJobRecords(jobId: $jobId) {
11
+ ...JobRecord
12
+ }
13
+ }
14
+ }
15
+ `;
16
+ exports.GET_JOB_RECORD = (0, client_1.gql) `
17
+ ${fragments_1.JOB_RECORD_FRAGMENT}
18
+ query GetJobRecord($id: ID!) {
19
+ admin {
20
+ getJobRecord(id: $id) {
21
+ ...JobRecord
22
+ }
23
+ }
24
+ }
25
+ `;
26
+ exports.GET_ID_DETAILS = (0, client_1.gql) `
27
+ query GetIdDetails($ids: [ID!]!, $table: String!) {
28
+ admin {
29
+ getIdDetails(ids: $ids, table: $table) {
30
+ id
31
+ name
32
+ }
33
+ }
34
+ }
35
+ `;