@neutron.co.id/pendidikan-operation 1.1.0 → 1.2.0-beta.1
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/build/index.cjs +41 -0
- package/build/index.d.ts +20 -0
- package/build/index.mjs +41 -0
- package/package.json +2 -2
package/build/index.cjs
CHANGED
|
@@ -224,6 +224,46 @@ const editAnswer = operation.Action.define({
|
|
|
224
224
|
}
|
|
225
225
|
});
|
|
226
226
|
|
|
227
|
+
const syncAllPenilaian = operation.Action.define({
|
|
228
|
+
key: "syncAllPenilaian",
|
|
229
|
+
name: "Sync All Penilaian",
|
|
230
|
+
type: "command",
|
|
231
|
+
category: "domain",
|
|
232
|
+
execute: async ({}, stream) => {
|
|
233
|
+
const models = [
|
|
234
|
+
"neu:penilaian:gradingType",
|
|
235
|
+
"neu:penilaian:gradingContext",
|
|
236
|
+
"neu:penilaian:gradingComparator",
|
|
237
|
+
"neu:penilaian:gradingComponent",
|
|
238
|
+
"neu:penilaian:gradingInsert",
|
|
239
|
+
"neu:penilaian:grading",
|
|
240
|
+
"neu:penilaian:score",
|
|
241
|
+
"neu:penilaian:gradingRasionalization",
|
|
242
|
+
"neu:penilaian:gradingComparisonItem"
|
|
243
|
+
];
|
|
244
|
+
await syncModels(stream, models);
|
|
245
|
+
return core.Result.ok({
|
|
246
|
+
state: "allSynced",
|
|
247
|
+
message: "All penilaian modules have been synced.",
|
|
248
|
+
data: {}
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
});
|
|
252
|
+
async function syncModels(stream, models) {
|
|
253
|
+
for (const model of models) {
|
|
254
|
+
await stream.actions.data.syncMany.execute(
|
|
255
|
+
{
|
|
256
|
+
model,
|
|
257
|
+
useDry: false,
|
|
258
|
+
query: query.Query.define({
|
|
259
|
+
limit: 1e5
|
|
260
|
+
})
|
|
261
|
+
},
|
|
262
|
+
stream
|
|
263
|
+
);
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
|
|
227
267
|
const syncCommitment = operation.Action.define({
|
|
228
268
|
key: "syncCommitment",
|
|
229
269
|
name: "Sync Commitment",
|
|
@@ -347,6 +387,7 @@ const index = {
|
|
|
347
387
|
presenceSessionTeacher: presenceSessionTeacher,
|
|
348
388
|
sendAnswer: sendAnswer,
|
|
349
389
|
setSomething: setSomething,
|
|
390
|
+
syncAllPenilaian: syncAllPenilaian,
|
|
350
391
|
syncCommitment: syncCommitment
|
|
351
392
|
};
|
|
352
393
|
|
package/build/index.d.ts
CHANGED
|
@@ -43,6 +43,16 @@ interface EditAnswerMeta {
|
|
|
43
43
|
declare const editAnswer: Action<"editAnswer", EditAnswerInput, EditAnswerOutput, EditAnswerMeta>;
|
|
44
44
|
type EditAnswerAction = typeof editAnswer;
|
|
45
45
|
|
|
46
|
+
interface syncAllPenilaianInput {
|
|
47
|
+
modules: string[];
|
|
48
|
+
}
|
|
49
|
+
interface syncAllPenilaianOutput {
|
|
50
|
+
}
|
|
51
|
+
interface syncAllPenilaianMeta {
|
|
52
|
+
}
|
|
53
|
+
declare const syncAllPenilaian: Action<"syncAllPenilaian", syncAllPenilaianInput, syncAllPenilaianOutput, syncAllPenilaianMeta>;
|
|
54
|
+
type syncAllPenilaianAction = typeof syncAllPenilaian;
|
|
55
|
+
|
|
46
56
|
interface SyncCommitmentInput {
|
|
47
57
|
teacherId: string;
|
|
48
58
|
}
|
|
@@ -110,6 +120,11 @@ declare const index_presenceSessionStudent: typeof presenceSessionStudent;
|
|
|
110
120
|
declare const index_presenceSessionTeacher: typeof presenceSessionTeacher;
|
|
111
121
|
declare const index_sendAnswer: typeof sendAnswer;
|
|
112
122
|
declare const index_setSomething: typeof setSomething;
|
|
123
|
+
declare const index_syncAllPenilaian: typeof syncAllPenilaian;
|
|
124
|
+
type index_syncAllPenilaianAction = syncAllPenilaianAction;
|
|
125
|
+
type index_syncAllPenilaianInput = syncAllPenilaianInput;
|
|
126
|
+
type index_syncAllPenilaianMeta = syncAllPenilaianMeta;
|
|
127
|
+
type index_syncAllPenilaianOutput = syncAllPenilaianOutput;
|
|
113
128
|
declare const index_syncCommitment: typeof syncCommitment;
|
|
114
129
|
declare namespace index {
|
|
115
130
|
export {
|
|
@@ -147,6 +162,11 @@ declare namespace index {
|
|
|
147
162
|
index_presenceSessionTeacher as presenceSessionTeacher,
|
|
148
163
|
index_sendAnswer as sendAnswer,
|
|
149
164
|
index_setSomething as setSomething,
|
|
165
|
+
index_syncAllPenilaian as syncAllPenilaian,
|
|
166
|
+
index_syncAllPenilaianAction as syncAllPenilaianAction,
|
|
167
|
+
index_syncAllPenilaianInput as syncAllPenilaianInput,
|
|
168
|
+
index_syncAllPenilaianMeta as syncAllPenilaianMeta,
|
|
169
|
+
index_syncAllPenilaianOutput as syncAllPenilaianOutput,
|
|
150
170
|
index_syncCommitment as syncCommitment,
|
|
151
171
|
};
|
|
152
172
|
}
|
package/build/index.mjs
CHANGED
|
@@ -222,6 +222,46 @@ const editAnswer = Action.define({
|
|
|
222
222
|
}
|
|
223
223
|
});
|
|
224
224
|
|
|
225
|
+
const syncAllPenilaian = Action.define({
|
|
226
|
+
key: "syncAllPenilaian",
|
|
227
|
+
name: "Sync All Penilaian",
|
|
228
|
+
type: "command",
|
|
229
|
+
category: "domain",
|
|
230
|
+
execute: async ({}, stream) => {
|
|
231
|
+
const models = [
|
|
232
|
+
"neu:penilaian:gradingType",
|
|
233
|
+
"neu:penilaian:gradingContext",
|
|
234
|
+
"neu:penilaian:gradingComparator",
|
|
235
|
+
"neu:penilaian:gradingComponent",
|
|
236
|
+
"neu:penilaian:gradingInsert",
|
|
237
|
+
"neu:penilaian:grading",
|
|
238
|
+
"neu:penilaian:score",
|
|
239
|
+
"neu:penilaian:gradingRasionalization",
|
|
240
|
+
"neu:penilaian:gradingComparisonItem"
|
|
241
|
+
];
|
|
242
|
+
await syncModels(stream, models);
|
|
243
|
+
return Result.ok({
|
|
244
|
+
state: "allSynced",
|
|
245
|
+
message: "All penilaian modules have been synced.",
|
|
246
|
+
data: {}
|
|
247
|
+
});
|
|
248
|
+
}
|
|
249
|
+
});
|
|
250
|
+
async function syncModels(stream, models) {
|
|
251
|
+
for (const model of models) {
|
|
252
|
+
await stream.actions.data.syncMany.execute(
|
|
253
|
+
{
|
|
254
|
+
model,
|
|
255
|
+
useDry: false,
|
|
256
|
+
query: Query.define({
|
|
257
|
+
limit: 1e5
|
|
258
|
+
})
|
|
259
|
+
},
|
|
260
|
+
stream
|
|
261
|
+
);
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
|
|
225
265
|
const syncCommitment = Action.define({
|
|
226
266
|
key: "syncCommitment",
|
|
227
267
|
name: "Sync Commitment",
|
|
@@ -345,6 +385,7 @@ const index = {
|
|
|
345
385
|
presenceSessionTeacher: presenceSessionTeacher,
|
|
346
386
|
sendAnswer: sendAnswer,
|
|
347
387
|
setSomething: setSomething,
|
|
388
|
+
syncAllPenilaian: syncAllPenilaian,
|
|
348
389
|
syncCommitment: syncCommitment
|
|
349
390
|
};
|
|
350
391
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neutron.co.id/pendidikan-operation",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0-beta.1",
|
|
4
4
|
"description": "Operation package of Neutron Pendidikan.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"contributors": [
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"publishConfig": {
|
|
69
69
|
"access": "public"
|
|
70
70
|
},
|
|
71
|
-
"build":
|
|
71
|
+
"build": 5
|
|
72
72
|
}
|