Skip to content

Commit 73cdbe7

Browse files
authored
Merge pull request #309 from neuroglia-io/simplify-management-api
Removed parameterless overloads for query actions and turned the query string paramater optional
2 parents 0751693 + ee049d3 commit 73cdbe7

File tree

1 file changed

+6
-38
lines changed

1 file changed

+6
-38
lines changed

src/apis/management/Synapse.Apis.Management.Core/Services/ISynapseManagementApi.cs

Lines changed: 6 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -77,22 +77,14 @@ public interface ISynapseManagementApi
7777
[OperationContract]
7878
Task<V1Workflow> GetWorkflowByIdAsync(string id, CancellationToken cancellationToken = default);
7979

80-
/// <summary>
81-
/// Lists existing <see cref="V1Workflow"/>s
82-
/// </summary>
83-
/// <param name="cancellationToken">A <see cref="CancellationToken"/></param>
84-
/// <returns>A new <see cref="List{T}"/> containing all existing <see cref="V1Workflow"/>s</returns>
85-
[OperationContract]
86-
Task<List<V1Workflow>> GetWorkflowsAsync(CancellationToken cancellationToken = default);
87-
8880
/// <summary>
8981
/// Lists existing <see cref="V1Workflow"/>s
9082
/// </summary>
9183
/// <param name="query">The OData query string</param>
9284
/// <param name="cancellationToken">A <see cref="CancellationToken"/></param>
9385
/// <returns>A new <see cref="List{T}"/> containing all existing <see cref="V1Workflow"/>s</returns>
9486
[OperationContract]
95-
Task<List<V1Workflow>> GetWorkflowsAsync(string query, CancellationToken cancellationToken = default);
87+
Task<List<V1Workflow>> GetWorkflowsAsync(string? query = null, CancellationToken cancellationToken = default);
9688

9789
/// <summary>
9890
/// Gets the id of the <see cref="V1Workflow"/> to archive
@@ -144,22 +136,14 @@ public interface ISynapseManagementApi
144136
[OperationContract]
145137
Task<V1WorkflowInstance> GetWorkflowInstanceByIdAsync(string id, CancellationToken cancellationToken = default);
146138

147-
/// <summary>
148-
/// Lists existing workflow instances
149-
/// </summary>
150-
/// <param name="cancellationToken">A <see cref="CancellationToken"/></param>
151-
/// <returns>A new <see cref="List{T}"/> containing all existing workflow instances</returns>
152-
[OperationContract]
153-
Task<List<V1WorkflowInstance>> GetWorkflowInstancesAsync(CancellationToken cancellationToken = default);
154-
155139
/// <summary>
156140
/// Lists existing workflow instances
157141
/// </summary>
158142
/// <param name="query">The ODATA query</param>
159143
/// <param name="cancellationToken">A <see cref="CancellationToken"/></param>
160144
/// <returns>A new <see cref="List{T}"/> containing all existing workflow instances</returns>
161145
[OperationContract]
162-
Task<List<V1WorkflowInstance>> GetWorkflowInstancesAsync(string query, CancellationToken cancellationToken = default);
146+
Task<List<V1WorkflowInstance>> GetWorkflowInstancesAsync(string? query = null, CancellationToken cancellationToken = default);
163147

164148
/// <summary>
165149
/// Suspends the execution of the <see cref="V1WorkflowInstance"/> with the specified id
@@ -238,22 +222,14 @@ public interface ISynapseManagementApi
238222
[OperationContract]
239223
Task<V1Correlation> GetCorrelationByIdAsync(string id, CancellationToken cancellationToken = default);
240224

241-
/// <summary>
242-
/// Lists existing <see cref="V1Correlation"/>s
243-
/// </summary>
244-
/// <param name="cancellationToken">A <see cref="CancellationToken"/></param>
245-
/// <returns>A new <see cref="List{T}"/> containing all existing <see cref="V1Correlation"/>s</returns>
246-
[OperationContract]
247-
Task<List<V1Correlation>> GetCorrelationsAsync(CancellationToken cancellationToken = default);
248-
249225
/// <summary>
250226
/// Lists existing <see cref="V1Correlation"/>s
251227
/// </summary>
252228
/// <param name="query">The OData query string</param>
253229
/// <param name="cancellationToken">A <see cref="CancellationToken"/></param>
254230
/// <returns>A new <see cref="List{T}"/> containing all existing <see cref="V1Correlation"/>s</returns>
255231
[OperationContract]
256-
Task<List<V1Correlation>> GetCorrelationsAsync(string query, CancellationToken cancellationToken = default);
232+
Task<List<V1Correlation>> GetCorrelationsAsync(string? query = null, CancellationToken cancellationToken = default);
257233

258234
/// <summary>
259235
/// Deletes the <see cref="V1Correlation"/> with the specified id
@@ -294,7 +270,7 @@ public interface ISynapseManagementApi
294270
/// <param name="cancellationToken">A <see cref="CancellationToken"/></param>
295271
/// <returns>A new <see cref="List{T}"/> containing all existing <see cref="V1AuthenticationDefinitionCollection"/>s</returns>
296272
[OperationContract]
297-
Task<List<V1AuthenticationDefinitionCollection>> GetAuthenticationDefinitionCollectionsAsync(string? query, CancellationToken cancellationToken = default);
273+
Task<List<V1AuthenticationDefinitionCollection>> GetAuthenticationDefinitionCollectionsAsync(string? query = null, CancellationToken cancellationToken = default);
298274

299275
/// <summary>
300276
/// Deletes the <see cref="V1AuthenticationDefinitionCollection"/> with the specified id
@@ -335,7 +311,7 @@ public interface ISynapseManagementApi
335311
/// <param name="cancellationToken">A <see cref="CancellationToken"/></param>
336312
/// <returns>A new <see cref="List{T}"/> containing all existing <see cref="V1EventDefinitionCollection"/>s</returns>
337313
[OperationContract]
338-
Task<List<V1EventDefinitionCollection>> GetEventDefinitionCollectionsAsync(string? query, CancellationToken cancellationToken = default);
314+
Task<List<V1EventDefinitionCollection>> GetEventDefinitionCollectionsAsync(string? query = null, CancellationToken cancellationToken = default);
339315

340316
/// <summary>
341317
/// Deletes the <see cref="V1EventDefinitionCollection"/> with the specified id
@@ -376,7 +352,7 @@ public interface ISynapseManagementApi
376352
/// <param name="cancellationToken">A <see cref="CancellationToken"/></param>
377353
/// <returns>A new <see cref="List{T}"/> containing all existing <see cref="V1FunctionDefinitionCollection"/>s</returns>
378354
[OperationContract]
379-
Task<List<V1FunctionDefinitionCollection>> GetFunctionDefinitionCollectionsAsync(string? query, CancellationToken cancellationToken = default);
355+
Task<List<V1FunctionDefinitionCollection>> GetFunctionDefinitionCollectionsAsync(string? query = null, CancellationToken cancellationToken = default);
380356

381357
/// <summary>
382358
/// Deletes the <see cref="V1FunctionDefinitionCollection"/> with the specified id
@@ -423,14 +399,6 @@ public interface ISynapseManagementApi
423399
[OperationContract]
424400
Task<V1Schedule> GetScheduleByIdAsync(string id, CancellationToken cancellationToken = default);
425401

426-
/// <summary>
427-
/// Lists existing <see cref="V1Schedule"/>s
428-
/// </summary>
429-
/// <param name="cancellationToken">A <see cref="CancellationToken"/></param>
430-
/// <returns>A new <see cref="List{T}"/> containing all existing <see cref="V1Schedule"/>s</returns>
431-
[OperationContract]
432-
Task<List<V1Schedule>> GetSchedulesAsync(CancellationToken cancellationToken = default);
433-
434402
/// <summary>
435403
/// Lists existing <see cref="V1Schedule"/>s
436404
/// </summary>

0 commit comments

Comments
 (0)