@@ -8,12 +8,6 @@ import type {
88 ActivityUpdateOptionsRequest ,
99 ActivityUpdateOptionsResponse ,
1010} from '$lib/types' ;
11- import type {
12- CompleteActivityTaskRequest ,
13- CompleteActivityTaskResponse ,
14- FailActivityTaskRequest ,
15- FailActivityTaskResponse ,
16- } from '$lib/types/events' ;
1711import { stringifyWithBigInt } from '$lib/utilities/parse-with-big-int' ;
1812import { requestFromAPI } from '$lib/utilities/request-from-api' ;
1913import { routeForApi } from '$lib/utilities/route-for-api' ;
@@ -24,56 +18,6 @@ type WorkflowInformation = {
2418 activityId : string ;
2519} ;
2620
27- export const failActivityTask = async ( {
28- namespace,
29- workflowId,
30- runId,
31- activityId,
32- failure,
33- identity,
34- lastHeartbeatDetails,
35- } : FailActivityTaskRequest &
36- WorkflowInformation ) : Promise < FailActivityTaskResponse > => {
37- const route = routeForApi ( 'activity.fail' , {
38- namespace,
39- } ) ;
40- return requestFromAPI < FailActivityTaskResponse > ( route , {
41- notifyOnError : false ,
42- options : {
43- body : stringifyWithBigInt ( { failure, identity, lastHeartbeatDetails } ) ,
44- } ,
45- params : {
46- workflowId,
47- runId,
48- activityId,
49- } ,
50- } ) ;
51- } ;
52-
53- export const completeActivityTask = async ( {
54- namespace,
55- workflowId,
56- runId,
57- activityId,
58- identity,
59- result,
60- } : CompleteActivityTaskRequest &
61- WorkflowInformation ) : Promise < CompleteActivityTaskResponse > => {
62- const route = routeForApi ( 'activity.complete' , {
63- namespace,
64- } ) ;
65-
66- return requestFromAPI ( route , {
67- notifyOnError : false ,
68- options : { body : stringifyWithBigInt ( { identity, result } ) } ,
69- params : {
70- workflowId,
71- runId,
72- activityId,
73- } ,
74- } ) ;
75- } ;
76-
7721export const pauseActivity = async ( {
7822 namespace,
7923 execution,
0 commit comments