Skip to content

Commit 913c449

Browse files
committed
Refactoring ExecuteAsync to return object response instead of GUID value
#51
1 parent f0c7a19 commit 913c449

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
namespace FlowSynx.Client.Messages.Responses.Workflows;
2+
3+
public class ExecuteWorkflowResponse
4+
{
5+
public required Guid WorkflowId { get; set; }
6+
public required Guid ExecutionId { get; set; }
7+
public required DateTime StartedAt { get; set; }
8+
}

src/FlowSynx.Client/Services/IWorkflowsService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Task<HttpResult<Result<IEnumerable<WorkflowExecutionListResponse>>>> ExecutionsA
7373
/// <param name="request">The request specifying which workflow to execute and with what parameters.</param>
7474
/// <param name="cancellationToken">Token to cancel the asynchronous operation.</param>
7575
/// <returns>A result indicating the execution status.</returns>
76-
Task<HttpResult<Result<Guid>>> ExecuteAsync(
76+
Task<HttpResult<Result<ExecuteWorkflowResponse>>> ExecuteAsync(
7777
ExecuteWorkflowRequest request,
7878
CancellationToken cancellationToken = default);
7979

src/FlowSynx.Client/Services/WorkflowsService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public async Task<HttpResult<Result<IEnumerable<WorkflowExecutionListResponse>>>
9898
.SendRequestAsync<Result<IEnumerable<WorkflowExecutionListResponse>>>(requestMessage, cancellationToken);
9999
}
100100

101-
public async Task<HttpResult<Result<Guid>>> ExecuteAsync(
101+
public async Task<HttpResult<Result<ExecuteWorkflowResponse>>> ExecuteAsync(
102102
ExecuteWorkflowRequest request,
103103
CancellationToken cancellationToken = default)
104104
{
@@ -109,7 +109,7 @@ public async Task<HttpResult<Result<Guid>>> ExecuteAsync(
109109
};
110110

111111
return await _httpRequestHandler
112-
.SendRequestAsync<Result<Guid>>(requestMessage, cancellationToken);
112+
.SendRequestAsync<Result<ExecuteWorkflowResponse>>(requestMessage, cancellationToken);
113113
}
114114

115115
public async Task<HttpResult<Result<WorkflowExecutionDetailsResponse>>> ExecutionsDetailsAsync(

0 commit comments

Comments
 (0)