@quesmed/types 2.6.179 → 2.6.181
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/dist/cjs/models/Job.d.ts +4 -2
- package/dist/cjs/resolvers/fragments/job.js +1 -1
- package/dist/cjs/resolvers/fragments/record.d.ts +1 -0
- package/dist/cjs/resolvers/fragments/record.js +32 -1
- package/dist/cjs/resolvers/mutation/admin/job.d.ts +28 -1
- package/dist/cjs/resolvers/mutation/admin/job.js +35 -1
- package/dist/cjs/resolvers/mutation/admin/record.d.ts +4 -1
- package/dist/cjs/resolvers/mutation/admin/record.js +9 -1
- package/dist/mjs/models/Job.d.ts +4 -2
- package/dist/mjs/resolvers/fragments/job.js +1 -1
- package/dist/mjs/resolvers/fragments/record.d.ts +1 -0
- package/dist/mjs/resolvers/fragments/record.js +31 -0
- package/dist/mjs/resolvers/mutation/admin/job.d.ts +28 -1
- package/dist/mjs/resolvers/mutation/admin/job.js +35 -1
- package/dist/mjs/resolvers/mutation/admin/record.d.ts +4 -1
- package/dist/mjs/resolvers/mutation/admin/record.js +9 -1
- package/package.json +1 -1
package/dist/cjs/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
|
}
|
|
@@ -242,6 +243,7 @@ export interface IJob {
|
|
|
242
243
|
remarkCount: number;
|
|
243
244
|
resolvedCount: number;
|
|
244
245
|
memberCount: number;
|
|
246
|
+
assetCount: number;
|
|
245
247
|
chatCount: number;
|
|
246
248
|
publishedCount: number;
|
|
247
249
|
remarks: IJobRemark[];
|
|
@@ -116,6 +116,7 @@ exports.LIST_JOB_FRAGMENT = (0, client_1.gql) `
|
|
|
116
116
|
resolvedCount
|
|
117
117
|
remarkCount
|
|
118
118
|
memberCount
|
|
119
|
+
assetCount
|
|
119
120
|
chatCount
|
|
120
121
|
createdByUser {
|
|
121
122
|
...JobUser
|
|
@@ -151,7 +152,6 @@ exports.FULL_JOB_FRAGMENT = (0, client_1.gql) `
|
|
|
151
152
|
${record_1.JOB_RECORD_FRAGMENT}
|
|
152
153
|
${record_1.JOB_REMARK_FRAGMENT}
|
|
153
154
|
${exports.JOB_MEMBER_FRAGMENT}
|
|
154
|
-
${exports.JOB_ASSETS_FRAGMENT}
|
|
155
155
|
fragment DetailedJob on Job {
|
|
156
156
|
id
|
|
157
157
|
updatedAt
|
|
@@ -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,30 @@ 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
|
+
unlink?: boolean | null;
|
|
79
|
+
ids: IJobAsset['id'][];
|
|
80
|
+
recordId?: IJobRecord['id'] | null;
|
|
81
|
+
};
|
|
82
|
+
export type IRemoveJobAssetsData = AdminData<(IJobAsset & graphqlNormalize)[], 'removeJobAssets'>;
|
|
83
|
+
export declare const CREATE_JOB_ASSETS: import("@apollo/client").DocumentNode;
|
|
84
|
+
export interface IJobRecordAssetInput {
|
|
85
|
+
file: File | FileData;
|
|
86
|
+
jobId: IJob['id'];
|
|
87
|
+
recordId?: IJobRecord['id'] | null;
|
|
88
|
+
caption?: string | null;
|
|
89
|
+
name: string;
|
|
90
|
+
topicId?: Id;
|
|
91
|
+
sensitive: boolean;
|
|
92
|
+
type: ELightGalleryType;
|
|
93
|
+
choiceIdx?: number | null;
|
|
94
|
+
index: number;
|
|
95
|
+
}
|
|
96
|
+
export type ICreateJobAssetsVar = {
|
|
97
|
+
input: IJobRecordAssetInput;
|
|
98
|
+
recordId?: IJobRecord['id'] | null;
|
|
99
|
+
jobId: IJob['id'];
|
|
100
|
+
};
|
|
101
|
+
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,37 @@ 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(
|
|
106
|
+
$jobId: ID!
|
|
107
|
+
$unlink: Boolean
|
|
108
|
+
$ids: [ID!]!
|
|
109
|
+
$recordId: ID
|
|
110
|
+
) {
|
|
111
|
+
admin {
|
|
112
|
+
removeJobAssets(
|
|
113
|
+
jobId: $jobId
|
|
114
|
+
unlink: $unlink
|
|
115
|
+
ids: $ids
|
|
116
|
+
recordId: $recordId
|
|
117
|
+
) {
|
|
118
|
+
...JobAsset
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
`;
|
|
123
|
+
exports.CREATE_JOB_ASSETS = (0, client_1.gql) `
|
|
124
|
+
${fragments_1.JOB_ASSET_FRAGMENT}
|
|
125
|
+
mutation CreateJobAssets(
|
|
126
|
+
$input: JobRecordAssetInput!
|
|
127
|
+
$recordId: ID
|
|
128
|
+
$jobId: ID!
|
|
129
|
+
) {
|
|
130
|
+
admin {
|
|
131
|
+
createJobAssets(input: $input, recordId: $recordId, jobId: $jobId) {
|
|
132
|
+
...JobAsset
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
`;
|
|
@@ -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,8 @@ export type IUpdateJobRecordVar = {
|
|
|
35
36
|
} | {
|
|
36
37
|
mockTest: Partial<IJobRecordMockTest>;
|
|
37
38
|
} | null;
|
|
39
|
+
createdAssetIds?: IJobAsset['id'][] | null;
|
|
40
|
+
deletedAssetIds?: IJobAsset['id'][] | null;
|
|
38
41
|
};
|
|
39
42
|
export type IUpdateJobRecordData = AdminData<graphqlNormalize & IJobRecord, 'updateJobRecord'>;
|
|
40
43
|
export declare const DUPLICATE_JOB_RECORD: import("@apollo/client").DocumentNode;
|
|
@@ -26,9 +26,17 @@ exports.UPDATE_JOB_RECORD = (0, client_1.gql) `
|
|
|
26
26
|
$id: ID!
|
|
27
27
|
$referenceId: ID
|
|
28
28
|
$input: JobRecordDataInput!
|
|
29
|
+
$createdAssetIds: [ID!]
|
|
30
|
+
$deletedAssetIds: [ID!]
|
|
29
31
|
) {
|
|
30
32
|
admin {
|
|
31
|
-
updateJobRecord(
|
|
33
|
+
updateJobRecord(
|
|
34
|
+
id: $id
|
|
35
|
+
referenceId: $referenceId
|
|
36
|
+
input: $input
|
|
37
|
+
createdAssetIds: $createdAssetIds
|
|
38
|
+
deletedAssetIds: $deletedAssetIds
|
|
39
|
+
) {
|
|
32
40
|
...JobRecord
|
|
33
41
|
}
|
|
34
42
|
}
|
package/dist/mjs/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
|
}
|
|
@@ -242,6 +243,7 @@ export interface IJob {
|
|
|
242
243
|
remarkCount: number;
|
|
243
244
|
resolvedCount: number;
|
|
244
245
|
memberCount: number;
|
|
246
|
+
assetCount: number;
|
|
245
247
|
chatCount: number;
|
|
246
248
|
publishedCount: number;
|
|
247
249
|
remarks: IJobRemark[];
|
|
@@ -113,6 +113,7 @@ export const LIST_JOB_FRAGMENT = gql `
|
|
|
113
113
|
resolvedCount
|
|
114
114
|
remarkCount
|
|
115
115
|
memberCount
|
|
116
|
+
assetCount
|
|
116
117
|
chatCount
|
|
117
118
|
createdByUser {
|
|
118
119
|
...JobUser
|
|
@@ -148,7 +149,6 @@ export const FULL_JOB_FRAGMENT = gql `
|
|
|
148
149
|
${JOB_RECORD_FRAGMENT}
|
|
149
150
|
${JOB_REMARK_FRAGMENT}
|
|
150
151
|
${JOB_MEMBER_FRAGMENT}
|
|
151
|
-
${JOB_ASSETS_FRAGMENT}
|
|
152
152
|
fragment DetailedJob on Job {
|
|
153
153
|
id
|
|
154
154
|
updatedAt
|
|
@@ -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;
|
|
@@ -26,6 +26,33 @@ export const JOB_REMARK_FRAGMENT = gql `
|
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
`;
|
|
29
|
+
export const JOB_ASSET_FRAGMENT = gql `
|
|
30
|
+
fragment JobAsset on JobAsset {
|
|
31
|
+
id
|
|
32
|
+
jobId
|
|
33
|
+
recordId
|
|
34
|
+
pictureId
|
|
35
|
+
index
|
|
36
|
+
type
|
|
37
|
+
choiceIdx
|
|
38
|
+
createdAt
|
|
39
|
+
picture {
|
|
40
|
+
id
|
|
41
|
+
updatedAt
|
|
42
|
+
name
|
|
43
|
+
sensitive
|
|
44
|
+
caption
|
|
45
|
+
path
|
|
46
|
+
path256
|
|
47
|
+
path512
|
|
48
|
+
overlayPath
|
|
49
|
+
overlayPath256
|
|
50
|
+
overlayPath512
|
|
51
|
+
thumbhash
|
|
52
|
+
index
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
`;
|
|
29
56
|
export const JOB_RECORD_METRICS_SUMMARY_FRAGMENT = gql `
|
|
30
57
|
fragment JobRecordMetricsSummary on JobRecordMetricsSummary {
|
|
31
58
|
total
|
|
@@ -124,6 +151,7 @@ export const JOB_RECORD_FRAGMENT = gql `
|
|
|
124
151
|
${JOB_RECORD_STATION_FRAGMENT}
|
|
125
152
|
${JOB_RECORD_MOCK_TEST_FRAGMENT}
|
|
126
153
|
${JOB_RECORD_STATISTICS_FRAGMENT}
|
|
154
|
+
${JOB_ASSET_FRAGMENT}
|
|
127
155
|
fragment JobRecord on JobRecord {
|
|
128
156
|
id
|
|
129
157
|
jobId
|
|
@@ -146,6 +174,9 @@ export const JOB_RECORD_FRAGMENT = gql `
|
|
|
146
174
|
remarks {
|
|
147
175
|
...JobRemark
|
|
148
176
|
}
|
|
177
|
+
assets {
|
|
178
|
+
...JobAsset
|
|
179
|
+
}
|
|
149
180
|
createdByUser {
|
|
150
181
|
...JobUser
|
|
151
182
|
}
|
|
@@ -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,30 @@ 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
|
+
unlink?: boolean | null;
|
|
79
|
+
ids: IJobAsset['id'][];
|
|
80
|
+
recordId?: IJobRecord['id'] | null;
|
|
81
|
+
};
|
|
82
|
+
export type IRemoveJobAssetsData = AdminData<(IJobAsset & graphqlNormalize)[], 'removeJobAssets'>;
|
|
83
|
+
export declare const CREATE_JOB_ASSETS: import("@apollo/client").DocumentNode;
|
|
84
|
+
export interface IJobRecordAssetInput {
|
|
85
|
+
file: File | FileData;
|
|
86
|
+
jobId: IJob['id'];
|
|
87
|
+
recordId?: IJobRecord['id'] | null;
|
|
88
|
+
caption?: string | null;
|
|
89
|
+
name: string;
|
|
90
|
+
topicId?: Id;
|
|
91
|
+
sensitive: boolean;
|
|
92
|
+
type: ELightGalleryType;
|
|
93
|
+
choiceIdx?: number | null;
|
|
94
|
+
index: number;
|
|
95
|
+
}
|
|
96
|
+
export type ICreateJobAssetsVar = {
|
|
97
|
+
input: IJobRecordAssetInput;
|
|
98
|
+
recordId?: IJobRecord['id'] | null;
|
|
99
|
+
jobId: IJob['id'];
|
|
100
|
+
};
|
|
101
|
+
export type ICreateJobAssetsData = AdminData<(IJobAsset & graphqlNormalize)[], 'createJobAssets'>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { gql } from '@apollo/client';
|
|
2
|
-
import { JOB_REMARK_FRAGMENT, JOB_STATUS_FRAGMENT, LIST_JOB_FRAGMENT, } from '../../fragments';
|
|
2
|
+
import { JOB_ASSET_FRAGMENT, JOB_REMARK_FRAGMENT, JOB_STATUS_FRAGMENT, LIST_JOB_FRAGMENT, } from '../../fragments';
|
|
3
3
|
export const CREATE_JOB = gql `
|
|
4
4
|
${LIST_JOB_FRAGMENT}
|
|
5
5
|
mutation CreateJob($input: CreateJobInput!) {
|
|
@@ -97,3 +97,37 @@ export const DELETE_JOB_CHATS = gql `
|
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
`;
|
|
100
|
+
export const REMOVE_JOB_ASSETS = gql `
|
|
101
|
+
${JOB_ASSET_FRAGMENT}
|
|
102
|
+
mutation RemoveJobAssets(
|
|
103
|
+
$jobId: ID!
|
|
104
|
+
$unlink: Boolean
|
|
105
|
+
$ids: [ID!]!
|
|
106
|
+
$recordId: ID
|
|
107
|
+
) {
|
|
108
|
+
admin {
|
|
109
|
+
removeJobAssets(
|
|
110
|
+
jobId: $jobId
|
|
111
|
+
unlink: $unlink
|
|
112
|
+
ids: $ids
|
|
113
|
+
recordId: $recordId
|
|
114
|
+
) {
|
|
115
|
+
...JobAsset
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
`;
|
|
120
|
+
export const CREATE_JOB_ASSETS = gql `
|
|
121
|
+
${JOB_ASSET_FRAGMENT}
|
|
122
|
+
mutation CreateJobAssets(
|
|
123
|
+
$input: JobRecordAssetInput!
|
|
124
|
+
$recordId: ID
|
|
125
|
+
$jobId: ID!
|
|
126
|
+
) {
|
|
127
|
+
admin {
|
|
128
|
+
createJobAssets(input: $input, recordId: $recordId, jobId: $jobId) {
|
|
129
|
+
...JobAsset
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
`;
|
|
@@ -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,8 @@ export type IUpdateJobRecordVar = {
|
|
|
35
36
|
} | {
|
|
36
37
|
mockTest: Partial<IJobRecordMockTest>;
|
|
37
38
|
} | null;
|
|
39
|
+
createdAssetIds?: IJobAsset['id'][] | null;
|
|
40
|
+
deletedAssetIds?: IJobAsset['id'][] | null;
|
|
38
41
|
};
|
|
39
42
|
export type IUpdateJobRecordData = AdminData<graphqlNormalize & IJobRecord, 'updateJobRecord'>;
|
|
40
43
|
export declare const DUPLICATE_JOB_RECORD: import("@apollo/client").DocumentNode;
|
|
@@ -23,9 +23,17 @@ export const UPDATE_JOB_RECORD = gql `
|
|
|
23
23
|
$id: ID!
|
|
24
24
|
$referenceId: ID
|
|
25
25
|
$input: JobRecordDataInput!
|
|
26
|
+
$createdAssetIds: [ID!]
|
|
27
|
+
$deletedAssetIds: [ID!]
|
|
26
28
|
) {
|
|
27
29
|
admin {
|
|
28
|
-
updateJobRecord(
|
|
30
|
+
updateJobRecord(
|
|
31
|
+
id: $id
|
|
32
|
+
referenceId: $referenceId
|
|
33
|
+
input: $input
|
|
34
|
+
createdAssetIds: $createdAssetIds
|
|
35
|
+
deletedAssetIds: $deletedAssetIds
|
|
36
|
+
) {
|
|
29
37
|
...JobRecord
|
|
30
38
|
}
|
|
31
39
|
}
|