@quesmed/types-rn 2.6.179 → 2.6.180
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 +3 -2
- package/package.json +1 -1
- package/resolvers/fragments/job.js +0 -1
- package/resolvers/fragments/record.d.ts +1 -0
- package/resolvers/fragments/record.js +32 -1
- package/resolvers/mutation/admin/job.d.ts +27 -1
- package/resolvers/mutation/admin/job.js +25 -1
- package/resolvers/mutation/admin/record.d.ts +3 -1
package/models/Job.d.ts
CHANGED
|
@@ -96,10 +96,10 @@ export interface IJobMember {
|
|
|
96
96
|
createdAt: Date | number;
|
|
97
97
|
}
|
|
98
98
|
export interface IJobAsset {
|
|
99
|
-
id:
|
|
99
|
+
id: string;
|
|
100
100
|
jobId: string;
|
|
101
101
|
recordId: string | null;
|
|
102
|
-
pictureId:
|
|
102
|
+
pictureId: number;
|
|
103
103
|
picture: IPicture;
|
|
104
104
|
index: number;
|
|
105
105
|
type: ELightGalleryType;
|
|
@@ -184,6 +184,7 @@ export interface IJobRecord {
|
|
|
184
184
|
stationId: number | null;
|
|
185
185
|
chapterId: number | null;
|
|
186
186
|
remarks: IJobRemark[];
|
|
187
|
+
assets: IJobAsset[];
|
|
187
188
|
metricsSummary: IJobRecordMetricsSummary | null;
|
|
188
189
|
choiceSummary: IJobRecordChoiceSummary[] | null;
|
|
189
190
|
}
|
package/package.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare const JOB_USER_FRAGMENT: import("@apollo/client").DocumentNode;
|
|
2
2
|
export declare const JOB_REMARK_FRAGMENT: import("@apollo/client").DocumentNode;
|
|
3
|
+
export declare const JOB_ASSET_FRAGMENT: import("@apollo/client").DocumentNode;
|
|
3
4
|
export declare const JOB_RECORD_METRICS_SUMMARY_FRAGMENT: import("@apollo/client").DocumentNode;
|
|
4
5
|
export declare const JOB_RECORD_CHOICE_SUMMARY_FRAGMENT: import("@apollo/client").DocumentNode;
|
|
5
6
|
export declare const JOB_RECORD_STATISTICS_FRAGMENT: import("@apollo/client").DocumentNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.JOB_RECORD_FRAGMENT = exports.JOB_RECORD_STATUS_FRAGMENT = exports.JOB_RECORD_MOCK_TEST_FRAGMENT = exports.JOB_RECORD_STATION_FRAGMENT = exports.JOB_RECORD_CHAPTER_FRAGMENT = exports.JOB_RECORD_QUESTION_FRAGMENT = exports.JOB_RECORD_STATISTICS_FRAGMENT = exports.JOB_RECORD_CHOICE_SUMMARY_FRAGMENT = exports.JOB_RECORD_METRICS_SUMMARY_FRAGMENT = exports.JOB_REMARK_FRAGMENT = exports.JOB_USER_FRAGMENT = void 0;
|
|
3
|
+
exports.JOB_RECORD_FRAGMENT = exports.JOB_RECORD_STATUS_FRAGMENT = exports.JOB_RECORD_MOCK_TEST_FRAGMENT = exports.JOB_RECORD_STATION_FRAGMENT = exports.JOB_RECORD_CHAPTER_FRAGMENT = exports.JOB_RECORD_QUESTION_FRAGMENT = exports.JOB_RECORD_STATISTICS_FRAGMENT = exports.JOB_RECORD_CHOICE_SUMMARY_FRAGMENT = exports.JOB_RECORD_METRICS_SUMMARY_FRAGMENT = exports.JOB_ASSET_FRAGMENT = exports.JOB_REMARK_FRAGMENT = exports.JOB_USER_FRAGMENT = void 0;
|
|
4
4
|
const client_1 = require("@apollo/client");
|
|
5
5
|
exports.JOB_USER_FRAGMENT = (0, client_1.gql) `
|
|
6
6
|
fragment JobUser on User {
|
|
@@ -29,6 +29,33 @@ exports.JOB_REMARK_FRAGMENT = (0, client_1.gql) `
|
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
`;
|
|
32
|
+
exports.JOB_ASSET_FRAGMENT = (0, client_1.gql) `
|
|
33
|
+
fragment JobAsset on JobAsset {
|
|
34
|
+
id
|
|
35
|
+
jobId
|
|
36
|
+
recordId
|
|
37
|
+
pictureId
|
|
38
|
+
index
|
|
39
|
+
type
|
|
40
|
+
choiceIdx
|
|
41
|
+
createdAt
|
|
42
|
+
picture {
|
|
43
|
+
id
|
|
44
|
+
updatedAt
|
|
45
|
+
name
|
|
46
|
+
sensitive
|
|
47
|
+
caption
|
|
48
|
+
path
|
|
49
|
+
path256
|
|
50
|
+
path512
|
|
51
|
+
overlayPath
|
|
52
|
+
overlayPath256
|
|
53
|
+
overlayPath512
|
|
54
|
+
thumbhash
|
|
55
|
+
index
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
`;
|
|
32
59
|
exports.JOB_RECORD_METRICS_SUMMARY_FRAGMENT = (0, client_1.gql) `
|
|
33
60
|
fragment JobRecordMetricsSummary on JobRecordMetricsSummary {
|
|
34
61
|
total
|
|
@@ -127,6 +154,7 @@ exports.JOB_RECORD_FRAGMENT = (0, client_1.gql) `
|
|
|
127
154
|
${exports.JOB_RECORD_STATION_FRAGMENT}
|
|
128
155
|
${exports.JOB_RECORD_MOCK_TEST_FRAGMENT}
|
|
129
156
|
${exports.JOB_RECORD_STATISTICS_FRAGMENT}
|
|
157
|
+
${exports.JOB_ASSET_FRAGMENT}
|
|
130
158
|
fragment JobRecord on JobRecord {
|
|
131
159
|
id
|
|
132
160
|
jobId
|
|
@@ -149,6 +177,9 @@ exports.JOB_RECORD_FRAGMENT = (0, client_1.gql) `
|
|
|
149
177
|
remarks {
|
|
150
178
|
...JobRemark
|
|
151
179
|
}
|
|
180
|
+
assets {
|
|
181
|
+
...JobAsset
|
|
182
|
+
}
|
|
152
183
|
createdByUser {
|
|
153
184
|
...JobUser
|
|
154
185
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IJob, IJobChat, IJobMember, IJobRemark } from '../../../models';
|
|
1
|
+
import { ELightGalleryType, FileData, IJob, IJobAsset, IJobChat, IJobMember, IJobRecord, IJobRemark, Id } from '../../../models';
|
|
2
2
|
import { AdminData, graphqlNormalize } from '../../types';
|
|
3
3
|
export declare const CREATE_JOB: import("@apollo/client").DocumentNode;
|
|
4
4
|
export type ICreateJobInput = {
|
|
@@ -72,3 +72,29 @@ export type IDeleteJobChatsVar = {
|
|
|
72
72
|
jobId: IJobChat['jobId'];
|
|
73
73
|
};
|
|
74
74
|
export type IDeleteJobChatsData = AdminData<boolean, 'deleteJobChats'>;
|
|
75
|
+
export declare const REMOVE_JOB_ASSETS: import("@apollo/client").DocumentNode;
|
|
76
|
+
export type IRemoveJobAssetsVar = {
|
|
77
|
+
jobId: IJobAsset['jobId'];
|
|
78
|
+
recordId?: IJobRecord['id'] | null;
|
|
79
|
+
ids: IJobAsset['id'][];
|
|
80
|
+
};
|
|
81
|
+
export type IRemoveJobAssetsData = AdminData<(IJobAsset & graphqlNormalize)[], 'removeJobAssets'>;
|
|
82
|
+
export declare const CREATE_JOB_ASSETS: import("@apollo/client").DocumentNode;
|
|
83
|
+
export interface IJobRecordAssetInput {
|
|
84
|
+
file: File | FileData;
|
|
85
|
+
jobId: IJob['id'];
|
|
86
|
+
recordId?: IJobRecord['id'] | null;
|
|
87
|
+
caption?: string | null;
|
|
88
|
+
name: string;
|
|
89
|
+
topicId?: Id;
|
|
90
|
+
sensitive: boolean;
|
|
91
|
+
type: ELightGalleryType;
|
|
92
|
+
choiceIdx?: number | null;
|
|
93
|
+
index: number;
|
|
94
|
+
}
|
|
95
|
+
export type ICreateJobAssetsVar = {
|
|
96
|
+
input: IJobRecordAssetInput;
|
|
97
|
+
recordId?: IJobRecord['id'] | null;
|
|
98
|
+
jobId: IJob['id'];
|
|
99
|
+
};
|
|
100
|
+
export type ICreateJobAssetsData = AdminData<(IJobAsset & graphqlNormalize)[], 'createJobAssets'>;
|
|
@@ -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.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.CREATE_JOB_ASSETS = exports.REMOVE_JOB_ASSETS = 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) `
|
|
@@ -100,3 +100,27 @@ exports.DELETE_JOB_CHATS = (0, client_1.gql) `
|
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
`;
|
|
103
|
+
exports.REMOVE_JOB_ASSETS = (0, client_1.gql) `
|
|
104
|
+
${fragments_1.JOB_ASSET_FRAGMENT}
|
|
105
|
+
mutation RemoveJobAssets($jobId: ID!, $recordId: ID, $ids: [ID!]!) {
|
|
106
|
+
admin {
|
|
107
|
+
removeJobAssets(jobId: $jobId, recordId: $recordId, ids: $ids) {
|
|
108
|
+
...JobAsset
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
`;
|
|
113
|
+
exports.CREATE_JOB_ASSETS = (0, client_1.gql) `
|
|
114
|
+
${fragments_1.JOB_ASSET_FRAGMENT}
|
|
115
|
+
mutation CreateJobAssets(
|
|
116
|
+
$input: JobRecordAssetInput!
|
|
117
|
+
$recordId: ID
|
|
118
|
+
$jobId: ID!
|
|
119
|
+
) {
|
|
120
|
+
admin {
|
|
121
|
+
createJobAssets(input: $input, recordId: $recordId, jobId: $jobId) {
|
|
122
|
+
...JobAsset
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
`;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IJobRecord, IJobRecordChapter, IJobRecordMockTest, IJobRecordQuestion, IJobRecordStation } from '../../../models';
|
|
1
|
+
import { IJobAsset, IJobRecord, IJobRecordChapter, IJobRecordMockTest, IJobRecordQuestion, IJobRecordStation } from '../../../models';
|
|
2
2
|
import { AdminData, graphqlNormalize } from '../../types';
|
|
3
3
|
export declare const CREATE_JOB_RECORD: import("@apollo/client").DocumentNode;
|
|
4
4
|
export type ICreateJobRecordVar = {
|
|
@@ -14,6 +14,7 @@ export type ICreateJobRecordVar = {
|
|
|
14
14
|
} | {
|
|
15
15
|
mockTest: IJobRecordMockTest;
|
|
16
16
|
} | null;
|
|
17
|
+
assetIds?: IJobAsset['id'][] | null;
|
|
17
18
|
};
|
|
18
19
|
};
|
|
19
20
|
export type ICreateJobRecordData = AdminData<graphqlNormalize & IJobRecord, 'createJobRecord'>;
|
|
@@ -35,6 +36,7 @@ export type IUpdateJobRecordVar = {
|
|
|
35
36
|
} | {
|
|
36
37
|
mockTest: Partial<IJobRecordMockTest>;
|
|
37
38
|
} | null;
|
|
39
|
+
assetIds?: IJobAsset['id'][] | null;
|
|
38
40
|
};
|
|
39
41
|
export type IUpdateJobRecordData = AdminData<graphqlNormalize & IJobRecord, 'updateJobRecord'>;
|
|
40
42
|
export declare const DUPLICATE_JOB_RECORD: import("@apollo/client").DocumentNode;
|