Skip to content

Commit dfa669c

Browse files
fix!: update onStatusUpdate task related messages titles (#534)
BREAKING CHANGE: - 'CONSUME_TASK' is now 'TASK_EXECUTION' - 'CONSUME_RESULT_DOWNLOAD' is now 'TASK_RESULT_DOWNLOAD' - 'CONSUME_RESULT_DECRYPT' is now 'TASK_RESULT_DECRYPT'
1 parent 4db1403 commit dfa669c

File tree

5 files changed

+16
-17
lines changed

5 files changed

+16
-17
lines changed

packages/sdk/src/lib/dataProtectorCore/getResultFromCompletedTask.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ export const getResultFromCompletedTask = async ({
3636

3737
try {
3838
vOnStatusUpdate({
39-
title: 'CONSUME_RESULT_DOWNLOAD',
39+
title: 'TASK_RESULT_DOWNLOAD',
4040
isDone: false,
4141
});
4242
const taskResult = await iexec.task.fetchResults(vTaskId);
4343
vOnStatusUpdate({
44-
title: 'CONSUME_RESULT_DOWNLOAD',
44+
title: 'TASK_RESULT_DOWNLOAD',
4545
isDone: true,
4646
});
4747

@@ -64,12 +64,12 @@ export const getResultFromCompletedTask = async ({
6464
pemPrivateKey = await privateAsPem(savedKeyPair.keyPair.privateKey);
6565
}
6666
vOnStatusUpdate({
67-
title: 'CONSUME_RESULT_DECRYPT',
67+
title: 'TASK_RESULT_DECRYPT',
6868
isDone: false,
6969
});
7070
resultBuffer = await decryptResult(rawTaskResult, pemPrivateKey);
7171
vOnStatusUpdate({
72-
title: 'CONSUME_RESULT_DECRYPT',
72+
title: 'TASK_RESULT_DECRYPT',
7373
isDone: true,
7474
});
7575
}

packages/sdk/src/lib/dataProtectorCore/processProtectedData.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ export const processProtectedData = async <
399399
}
400400

401401
vOnStatusUpdate({
402-
title: 'CONSUME_TASK',
402+
title: 'TASK_EXECUTION',
403403
isDone: false,
404404
payload: {
405405
taskId: taskId,
@@ -413,7 +413,7 @@ export const processProtectedData = async <
413413
});
414414

415415
vOnStatusUpdate({
416-
title: 'CONSUME_TASK',
416+
title: 'TASK_EXECUTION',
417417
isDone: true,
418418
payload: {
419419
taskId,

packages/sdk/src/lib/dataProtectorSharing/consumeProtectedData.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ export const consumeProtectedData = async ({
200200
const dealId = specificEventForPreviousTx.args?.dealId;
201201
const taskId = await iexec.deal.computeTaskId(dealId, 0);
202202
vOnStatusUpdate({
203-
title: 'CONSUME_TASK',
203+
title: 'TASK_EXECUTION',
204204
isDone: false,
205205
payload: { dealId, taskId },
206206
});
@@ -216,7 +216,7 @@ export const consumeProtectedData = async ({
216216
});
217217

218218
vOnStatusUpdate({
219-
title: 'CONSUME_TASK',
219+
title: 'TASK_EXECUTION',
220220
isDone: true,
221221
payload: { dealId, taskId },
222222
});

packages/sdk/src/lib/types/coreTypes.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,8 @@ export type WaitForTaskCompletionResponse = {
226226
// ---------------------GetResultFromCompletedTask Types------------------------------------
227227

228228
export type GetResultFromCompletedTaskStatuses =
229-
| 'CONSUME_RESULT_DOWNLOAD'
230-
| 'CONSUME_RESULT_DECRYPT';
229+
| 'TASK_RESULT_DOWNLOAD'
230+
| 'TASK_RESULT_DECRYPT';
231231

232232
export type GetResultFromCompletedTaskParams = {
233233
taskId: string;
@@ -299,9 +299,9 @@ export type ProcessProtectedDataStatuses =
299299
| 'GENERATE_ENCRYPTION_KEY'
300300
| 'PUSH_ENCRYPTION_KEY'
301301
| 'REQUEST_TO_PROCESS_PROTECTED_DATA'
302-
| 'CONSUME_TASK'
303-
| 'CONSUME_RESULT_DOWNLOAD'
304-
| 'CONSUME_RESULT_DECRYPT';
302+
| 'TASK_EXECUTION'
303+
| 'TASK_RESULT_DOWNLOAD'
304+
| 'TASK_RESULT_DECRYPT';
305305

306306
export type ProcessProtectedDataParams = {
307307
/**

packages/sdk/src/lib/types/sharingTypes.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,9 @@ export type ConsumeProtectedDataStatuses =
9696
| 'FETCH_WORKERPOOL_ORDERBOOK'
9797
| 'PUSH_ENCRYPTION_KEY'
9898
| 'CONSUME_ORDER_REQUESTED'
99-
| 'CONSUME_TASK'
100-
| 'CONSUME_RESULT_DOWNLOAD'
101-
| 'CONSUME_RESULT_DECRYPT'
102-
| 'CONSUME_RESULT_COMPLETE';
99+
| 'TASK_EXECUTION'
100+
| 'TASK_RESULT_DOWNLOAD'
101+
| 'TASK_RESULT_DECRYPT';
103102

104103
export type ConsumeProtectedDataParams = {
105104
protectedData: AddressOrENS;

0 commit comments

Comments
 (0)