From 0d582ad63b6d6310e1b9a516c03560fed622a657 Mon Sep 17 00:00:00 2001 From: svix-lucho Date: Mon, 12 Feb 2024 16:41:59 -0300 Subject: [PATCH] [lib/c#] Return iterator information in list endpoints --- csharp/Svix/Abstractions/IApplication.cs | 4 +- csharp/Svix/Abstractions/IBackgroundTask.cs | 4 +- csharp/Svix/Abstractions/IEndpoint.cs | 4 +- csharp/Svix/Abstractions/IEventType.cs | 4 +- csharp/Svix/Abstractions/IIntegration.cs | 4 +- csharp/Svix/Abstractions/IMessage.cs | 4 +- csharp/Svix/Abstractions/IMessageAttempt.cs | 24 +++---- csharp/Svix/Application.cs | 12 ++-- csharp/Svix/BackgroundTask.cs | 12 ++-- csharp/Svix/Endpoint.cs | 12 ++-- csharp/Svix/EventType.cs | 12 ++-- csharp/Svix/Integration.cs | 12 ++-- csharp/Svix/Message.cs | 12 ++-- csharp/Svix/MessageAttempt.cs | 74 ++++++++++----------- 14 files changed, 97 insertions(+), 97 deletions(-) diff --git a/csharp/Svix/Abstractions/IApplication.cs b/csharp/Svix/Abstractions/IApplication.cs index 08b485908..b0526f349 100644 --- a/csharp/Svix/Abstractions/IApplication.cs +++ b/csharp/Svix/Abstractions/IApplication.cs @@ -24,9 +24,9 @@ Task DeleteAsync(string appId, string idempotencyKey = default, Task GetAsync(string appId, string idempotencyKey = default, CancellationToken cancellationToken = default); - List List(ListOptions options = null, string idempotencyKey = default); + ListResponseApplicationOut List(ListOptions options = null, string idempotencyKey = default); - Task> ListAsync(ListOptions options = null, string idempotencyKey = default, CancellationToken cancellationToken = default); + Task ListAsync(ListOptions options = null, string idempotencyKey = default, CancellationToken cancellationToken = default); ApplicationOut Update(string appId, ApplicationIn application, string idempotencyKey = default); diff --git a/csharp/Svix/Abstractions/IBackgroundTask.cs b/csharp/Svix/Abstractions/IBackgroundTask.cs index e2121376a..a2148f716 100644 --- a/csharp/Svix/Abstractions/IBackgroundTask.cs +++ b/csharp/Svix/Abstractions/IBackgroundTask.cs @@ -13,8 +13,8 @@ public interface IBackgroundTask Task GetAsync(string taskId, string idempotencyKey = default, CancellationToken cancellationToken = default); - List List(BackgroundTaskListOptions options = null, string idempotencyKey = default); + ListResponseBackgroundTaskOut List(BackgroundTaskListOptions options = null, string idempotencyKey = default); - Task> ListAsync(BackgroundTaskListOptions options = null, string idempotencyKey = default, CancellationToken cancellationToken = default); + Task ListAsync(BackgroundTaskListOptions options = null, string idempotencyKey = default, CancellationToken cancellationToken = default); } } diff --git a/csharp/Svix/Abstractions/IEndpoint.cs b/csharp/Svix/Abstractions/IEndpoint.cs index fba757c25..b627cd79e 100644 --- a/csharp/Svix/Abstractions/IEndpoint.cs +++ b/csharp/Svix/Abstractions/IEndpoint.cs @@ -33,9 +33,9 @@ Task GetHeadersAsync(string appId, string endpointId, string Task GetSecretAsync(string appId, string endpointId, string idempotencyKey = default, CancellationToken cancellationToken = default); - List List(string appId, ListOptions options = null, string idempotencyKey = default); + ListResponseEndpointOut List(string appId, ListOptions options = null, string idempotencyKey = default); - Task> ListAsync(string appId, ListOptions options = null, string idempotencyKey = default, + Task ListAsync(string appId, ListOptions options = null, string idempotencyKey = default, CancellationToken cancellationToken = default); bool PatchHeaders(string appId, string endpointId, EndpointHeadersPatchIn headers, string idempotencyKey = default); diff --git a/csharp/Svix/Abstractions/IEventType.cs b/csharp/Svix/Abstractions/IEventType.cs index 37256f43a..d43b676a9 100644 --- a/csharp/Svix/Abstractions/IEventType.cs +++ b/csharp/Svix/Abstractions/IEventType.cs @@ -23,9 +23,9 @@ Task CreateAsync(EventTypeIn eventType, string idempotencyKey = de Task GetAsync(string eventType, string idempotencyKey = default, CancellationToken cancellationToken = default); - List List(EventTypeListOptions options = null, string idempotencyKey = default); + ListResponseEventTypeOut List(EventTypeListOptions options = null, string idempotencyKey = default); - Task> ListAsync(EventTypeListOptions options = null, string idempotencyKey = default, + Task ListAsync(EventTypeListOptions options = null, string idempotencyKey = default, CancellationToken cancellationToken = default); EventTypeOut Update(string eventType, EventTypeUpdate update, string idempotencyKey = default); diff --git a/csharp/Svix/Abstractions/IIntegration.cs b/csharp/Svix/Abstractions/IIntegration.cs index 9fa450b5a..b68f2c961 100644 --- a/csharp/Svix/Abstractions/IIntegration.cs +++ b/csharp/Svix/Abstractions/IIntegration.cs @@ -27,9 +27,9 @@ Task DeleteAsync(string appId, string integrationId, string idempotencyKey Task GetKeyAsync(string appId, string integrationId, string idempotencyKey = default, CancellationToken cancellationToken = default); - List List(string appId, ListOptions options = null, string idempotencyKey = default); + ListResponseIntegrationOut List(string appId, ListOptions options = null, string idempotencyKey = default); - Task> ListAsync(string appId, ListOptions options = null, string idempotencyKey = default, + Task ListAsync(string appId, ListOptions options = null, string idempotencyKey = default, CancellationToken cancellationToken = default); string RotateKey(string appId, string integrationId, string idempotencyKey = default); diff --git a/csharp/Svix/Abstractions/IMessage.cs b/csharp/Svix/Abstractions/IMessage.cs index e44306766..98c65810d 100644 --- a/csharp/Svix/Abstractions/IMessage.cs +++ b/csharp/Svix/Abstractions/IMessage.cs @@ -19,9 +19,9 @@ Task CreateAsync(string appId, MessageIn message, MessageCreateOptio Task GetAsync(string appId, string messageId, string idempotencyKey = default, CancellationToken cancellationToken = default); - List List(string appId, MessageListOptions options = null, string idempotencyKey = default); + ListResponseMessageOut List(string appId, MessageListOptions options = null, string idempotencyKey = default); - Task> ListAsync(string appId, MessageListOptions options = null, string idempotencyKey = default, + Task ListAsync(string appId, MessageListOptions options = null, string idempotencyKey = default, CancellationToken cancellationToken = default); } } diff --git a/csharp/Svix/Abstractions/IMessageAttempt.cs b/csharp/Svix/Abstractions/IMessageAttempt.cs index 095017953..8995d2146 100644 --- a/csharp/Svix/Abstractions/IMessageAttempt.cs +++ b/csharp/Svix/Abstractions/IMessageAttempt.cs @@ -12,38 +12,38 @@ public interface IMessageAttempt Task GetAttemptAsync(string appId, string attemptId, string messageId, string idempotencyKey = default, CancellationToken cancellationToken = default); - List ListAttemptedMessages(string appId, string endpointId, MessageAttemptListOptions options = null, + ListResponseEndpointMessageOut ListAttemptedMessages(string appId, string endpointId, MessageAttemptListOptions options = null, string idempotencyKey = default); - Task> ListAttemptedMessagesAsync(string appId, string endpointId, MessageAttemptListOptions options = null, + Task ListAttemptedMessagesAsync(string appId, string endpointId, MessageAttemptListOptions options = null, string idempotencyKey = default, CancellationToken cancellationToken = default); - List ListAttemptsByEndpoint(string appId, string endpointId, AttemptsByEndpointListOptions options = null, string idempotencyKey = default); + ListResponseMessageAttemptOut ListAttemptsByEndpoint(string appId, string endpointId, AttemptsByEndpointListOptions options = null, string idempotencyKey = default); - Task> ListAttemptsByEndpointAsync(string appId, string endpointId, AttemptsByEndpointListOptions options = null, string idempotencyKey = default, CancellationToken cancellationToken = default); + Task ListAttemptsByEndpointAsync(string appId, string endpointId, AttemptsByEndpointListOptions options = null, string idempotencyKey = default, CancellationToken cancellationToken = default); - List ListAttemptsByMessage(string appId, string messageId, AttemptsByMessageListOptions options = null, string idempotencyKey = default); + ListResponseMessageAttemptOut ListAttemptsByMessage(string appId, string messageId, AttemptsByMessageListOptions options = null, string idempotencyKey = default); - Task> ListAttemptsByMessageAsync(string appId, string messageId, AttemptsByMessageListOptions options = null, string idempotencyKey = default, CancellationToken cancellationToken = default); + Task ListAttemptsByMessageAsync(string appId, string messageId, AttemptsByMessageListOptions options = null, string idempotencyKey = default, CancellationToken cancellationToken = default); - List ListAttemptsForEndpoint(string appId, string messageId, string endpointId, + ListResponseMessageAttemptEndpointOut ListAttemptsForEndpoint(string appId, string messageId, string endpointId, AttemptsByEndpointListOptions options = null, string idempotencyKey = default); - Task> ListAttemptsForEndpointAsync(string appId, string messageId, string endpointId, + Task ListAttemptsForEndpointAsync(string appId, string messageId, string endpointId, AttemptsByEndpointListOptions options = null, string idempotencyKey = default, CancellationToken cancellationToken = default); - List ListAttempts(string appId, string messageId, + ListResponseMessageAttemptOut ListAttempts(string appId, string messageId, MessageAttemptListOptions options = null, string idempotencyKey = default); - Task> ListAttemptsAsync(string appId, string messageId, + Task ListAttemptsAsync(string appId, string messageId, MessageAttemptListOptions options = null, string idempotencyKey = default, CancellationToken cancellationToken = default); - List ListAttemptedDestinations(string appId, string messageId, + ListResponseMessageEndpointOut ListAttemptedDestinations(string appId, string messageId, ListOptions options = null, string idempotencyKey = default); - Task> ListAttemptedDestinationsAsync(string appId, string messageId, + Task ListAttemptedDestinationsAsync(string appId, string messageId, ListOptions options = null, string idempotencyKey = default, CancellationToken cancellationToken = default); diff --git a/csharp/Svix/Application.cs b/csharp/Svix/Application.cs index ef70d4436..67576953c 100644 --- a/csharp/Svix/Application.cs +++ b/csharp/Svix/Application.cs @@ -149,7 +149,7 @@ public async Task GetAsync(string appId, string idempotencyKey = } } - public List List(ListOptions options = null, string idempotencyKey = default) + public ListResponseApplicationOut List(ListOptions options = null, string idempotencyKey = default) { try { @@ -158,7 +158,7 @@ public List List(ListOptions options = null, string idempotencyK options?.Iterator, options?.Order); - return lResponse?.Data; + return lResponse; } catch (ApiException e) { @@ -167,11 +167,11 @@ public List List(ListOptions options = null, string idempotencyK if (Throw) throw; - return new List(); + return new ListResponseApplicationOut(); } } - public async Task> ListAsync(ListOptions options = null, string idempotencyKey = default, CancellationToken cancellationToken = default) + public async Task ListAsync(ListOptions options = null, string idempotencyKey = default, CancellationToken cancellationToken = default) { try { @@ -181,7 +181,7 @@ public async Task> ListAsync(ListOptions options = null, st options?.Order, cancellationToken); - return lResponse?.Data; + return lResponse; } catch (ApiException e) { @@ -190,7 +190,7 @@ public async Task> ListAsync(ListOptions options = null, st if (Throw) throw; - return new List(); + return new ListResponseApplicationOut(); } } diff --git a/csharp/Svix/BackgroundTask.cs b/csharp/Svix/BackgroundTask.cs index b89fc4d4a..8e8b7ccee 100644 --- a/csharp/Svix/BackgroundTask.cs +++ b/csharp/Svix/BackgroundTask.cs @@ -60,7 +60,7 @@ public async Task GetAsync(string taskId, string idempotencyK } } - public List List(BackgroundTaskListOptions options = null, string idempotencyKey = default) + public ListResponseBackgroundTaskOut List(BackgroundTaskListOptions options = null, string idempotencyKey = default) { try { @@ -71,7 +71,7 @@ public List List(BackgroundTaskListOptions options = null, st options?.Iterator, options?.Order); - return lResponse?.Data; + return lResponse; } catch (ApiException e) { @@ -80,11 +80,11 @@ public List List(BackgroundTaskListOptions options = null, st if (Throw) throw; - return new List(); + return new ListResponseBackgroundTaskOut(); } } - public async Task> ListAsync(BackgroundTaskListOptions options = null, string idempotencyKey = default, CancellationToken cancellationToken = default) + public async Task ListAsync(BackgroundTaskListOptions options = null, string idempotencyKey = default, CancellationToken cancellationToken = default) { try { @@ -96,7 +96,7 @@ public async Task> ListAsync(BackgroundTaskListOptions o options?.Order, cancellationToken); - return lResponse?.Data; + return lResponse; } catch (ApiException e) { @@ -105,7 +105,7 @@ public async Task> ListAsync(BackgroundTaskListOptions o if (Throw) throw; - return new List(); + return new ListResponseBackgroundTaskOut(); } } } diff --git a/csharp/Svix/Endpoint.cs b/csharp/Svix/Endpoint.cs index e3ddcd63d..f4d6b2db1 100644 --- a/csharp/Svix/Endpoint.cs +++ b/csharp/Svix/Endpoint.cs @@ -244,7 +244,7 @@ public async Task GetSecretAsync(string appId, string endpointId, string } } - public List List(string appId, ListOptions options = null, string idempotencyKey = default) + public ListResponseEndpointOut List(string appId, ListOptions options = null, string idempotencyKey = default) { try { @@ -254,7 +254,7 @@ public List List(string appId, ListOptions options = null, string i options?.Iterator, options?.Order); - return lEndpoints?.Data; + return lEndpoints; } catch (ApiException e) { @@ -263,11 +263,11 @@ public List List(string appId, ListOptions options = null, string i if (Throw) throw; - return new List(); + return new ListResponseEndpointOut(); } } - public async Task> ListAsync(string appId, ListOptions options = null, string idempotencyKey = default, + public async Task ListAsync(string appId, ListOptions options = null, string idempotencyKey = default, CancellationToken cancellationToken = default) { try @@ -279,7 +279,7 @@ public async Task> ListAsync(string appId, ListOptions options options?.Order, cancellationToken); - return lEndpoints?.Data; + return lEndpoints; } catch (ApiException e) { @@ -288,7 +288,7 @@ public async Task> ListAsync(string appId, ListOptions options if (Throw) throw; - return new List(); + return new ListResponseEndpointOut(); } } diff --git a/csharp/Svix/EventType.cs b/csharp/Svix/EventType.cs index 659ae0f98..39a60c9f8 100644 --- a/csharp/Svix/EventType.cs +++ b/csharp/Svix/EventType.cs @@ -148,7 +148,7 @@ public async Task GetAsync(string eventType, string idempotencyKey } } - public List List(EventTypeListOptions options = null, string idempotencyKey = default) + public ListResponseEventTypeOut List(EventTypeListOptions options = null, string idempotencyKey = default) { try { @@ -159,7 +159,7 @@ public List List(EventTypeListOptions options = null, string idemp options?.IncludeArchived, options?.WithContent); - return lResults?.Data; + return lResults; } catch (ApiException e) { @@ -168,11 +168,11 @@ public List List(EventTypeListOptions options = null, string idemp if (Throw) throw; - return new List(); + return new ListResponseEventTypeOut(); } } - public async Task> ListAsync(EventTypeListOptions options = null, string idempotencyKey = default, + public async Task ListAsync(EventTypeListOptions options = null, string idempotencyKey = default, CancellationToken cancellationToken = default) { try @@ -185,7 +185,7 @@ public async Task> ListAsync(EventTypeListOptions options = n options?.WithContent, cancellationToken); - return lResults?.Data; + return lResults; } catch (ApiException e) { @@ -194,7 +194,7 @@ public async Task> ListAsync(EventTypeListOptions options = n if (Throw) throw; - return new List(); + return new ListResponseEventTypeOut(); } } diff --git a/csharp/Svix/Integration.cs b/csharp/Svix/Integration.cs index ceda5383d..c34d1b41f 100644 --- a/csharp/Svix/Integration.cs +++ b/csharp/Svix/Integration.cs @@ -198,7 +198,7 @@ public async Task GetKeyAsync(string appId, string integrationId, string } } - public List List(string appId, ListOptions options = null, string idempotencyKey = default) + public ListResponseIntegrationOut List(string appId, ListOptions options = null, string idempotencyKey = default) { try { @@ -207,7 +207,7 @@ public List List(string appId, ListOptions options = null, strin options?.Limit, options?.Iterator); - return lResult?.Data; + return lResult; } catch (ApiException e) { @@ -216,11 +216,11 @@ public List List(string appId, ListOptions options = null, strin if (Throw) throw; - return new List(); + return new ListResponseIntegrationOut(); } } - public async Task> ListAsync(string appId, ListOptions options = null, string idempotencyKey = default, + public async Task ListAsync(string appId, ListOptions options = null, string idempotencyKey = default, CancellationToken cancellationToken = default) { try @@ -231,7 +231,7 @@ public async Task> ListAsync(string appId, ListOptions opti options?.Iterator, cancellationToken); - return lResult?.Data; + return lResult; } catch (ApiException e) { @@ -240,7 +240,7 @@ public async Task> ListAsync(string appId, ListOptions opti if (Throw) throw; - return new List(); + return new ListResponseIntegrationOut(); } } diff --git a/csharp/Svix/Message.cs b/csharp/Svix/Message.cs index 276e24b16..133ce6578 100644 --- a/csharp/Svix/Message.cs +++ b/csharp/Svix/Message.cs @@ -116,7 +116,7 @@ public async Task GetAsync(string appId, string messageId, string id } } - public List List(string appId, MessageListOptions options = null, string idempotencyKey = default) + public ListResponseMessageOut List(string appId, MessageListOptions options = null, string idempotencyKey = default) { try { @@ -132,7 +132,7 @@ public List List(string appId, MessageListOptions options = null, st options?.EventTypes ); - return lResponse?.Data; + return lResponse; } catch (ApiException e) { @@ -141,11 +141,11 @@ public List List(string appId, MessageListOptions options = null, st if (Throw) throw; - return new List(); + return new ListResponseMessageOut(); } } - public async Task> ListAsync(string appId, MessageListOptions options = null, string idempotencyKey = default, CancellationToken cancellationToken = default) + public async Task ListAsync(string appId, MessageListOptions options = null, string idempotencyKey = default, CancellationToken cancellationToken = default) { try { @@ -161,7 +161,7 @@ public async Task> ListAsync(string appId, MessageListOptions o options?.EventTypes, cancellationToken); - return lResponse?.Data; + return lResponse; } catch (ApiException e) { @@ -170,7 +170,7 @@ public async Task> ListAsync(string appId, MessageListOptions o if (Throw) throw; - return new List(); + return new ListResponseMessageOut(); } } diff --git a/csharp/Svix/MessageAttempt.cs b/csharp/Svix/MessageAttempt.cs index e64d200d4..d9a4e2d2c 100644 --- a/csharp/Svix/MessageAttempt.cs +++ b/csharp/Svix/MessageAttempt.cs @@ -69,7 +69,7 @@ public async Task GetAttemptAsync(string appId, string attemp } } - public List ListAttemptedMessages(string appId, string endpointId, MessageAttemptListOptions options = null, + public ListResponseEndpointMessageOut ListAttemptedMessages(string appId, string endpointId, MessageAttemptListOptions options = null, string idempotencyKey = default) { try @@ -85,7 +85,7 @@ public List ListAttemptedMessages(string appId, string endpo options?.Before, options?.After); - return lResults?.Data; + return lResults; } catch (ApiException e) { @@ -94,11 +94,11 @@ public List ListAttemptedMessages(string appId, string endpo if (Throw) throw; - return new List(); + return new ListResponseEndpointMessageOut(); } } - public async Task> ListAttemptedMessagesAsync(string appId, string endpointId, MessageAttemptListOptions options = null, + public async Task ListAttemptedMessagesAsync(string appId, string endpointId, MessageAttemptListOptions options = null, string idempotencyKey = default, CancellationToken cancellationToken = default) { try @@ -110,14 +110,14 @@ public async Task> ListAttemptedMessagesAsync(string ap options?.Iterator, options?.Channel, options?.Tag, - (Svix.Model.MessageStatus?)options?.Status, + (MessageStatus?)options?.Status, options?.Before, options?.After, options?.WithContent, options?.EventTypes, cancellationToken); - return lResults?.Data; + return lResults; } catch (ApiException e) { @@ -126,11 +126,11 @@ public async Task> ListAttemptedMessagesAsync(string ap if (Throw) throw; - return new List(); + return new ListResponseEndpointMessageOut(); } } - public List ListAttemptsByEndpoint(string appId, string endpointId, AttemptsByEndpointListOptions options = null, + public ListResponseMessageAttemptOut ListAttemptsByEndpoint(string appId, string endpointId, AttemptsByEndpointListOptions options = null, string idempotencyKey = default) { try @@ -150,7 +150,7 @@ public List ListAttemptsByEndpoint(string appId, string endpo options?.WithMsg, options?.EventTypes); - return lResults?.Data; + return lResults; } catch (ApiException e) { @@ -159,11 +159,11 @@ public List ListAttemptsByEndpoint(string appId, string endpo if (Throw) throw; - return new List(); + return new ListResponseMessageAttemptOut(); } } - public async Task> ListAttemptsByEndpointAsync(string appId, string endpointId, AttemptsByEndpointListOptions options = null, + public async Task ListAttemptsByEndpointAsync(string appId, string endpointId, AttemptsByEndpointListOptions options = null, string idempotencyKey = default, CancellationToken cancellationToken = default) { try @@ -184,7 +184,7 @@ public async Task> ListAttemptsByEndpointAsync(string ap options?.EventTypes, cancellationToken); - return lResults?.Data; + return lResults; } catch (ApiException e) { @@ -193,11 +193,11 @@ public async Task> ListAttemptsByEndpointAsync(string ap if (Throw) throw; - return new List(); + return new ListResponseMessageAttemptOut(); } } - public List ListAttemptsByMessage(string appId, string messageId, AttemptsByMessageListOptions options = null, + public ListResponseMessageAttemptOut ListAttemptsByMessage(string appId, string messageId, AttemptsByMessageListOptions options = null, string idempotencyKey = default) { try @@ -217,7 +217,7 @@ public List ListAttemptsByMessage(string appId, string messag options?.WithContent, options?.EventTypes); - return lResults?.Data; + return lResults; } catch (ApiException e) { @@ -226,11 +226,11 @@ public List ListAttemptsByMessage(string appId, string messag if (Throw) throw; - return new List(); + return new ListResponseMessageAttemptOut(); } } - public async Task> ListAttemptsByMessageAsync(string appId, string messageId, AttemptsByMessageListOptions options = null, + public async Task ListAttemptsByMessageAsync(string appId, string messageId, AttemptsByMessageListOptions options = null, string idempotencyKey = default, CancellationToken cancellationToken = default) { try @@ -251,7 +251,7 @@ public async Task> ListAttemptsByMessageAsync(string app options?.EventTypes, cancellationToken); - return lResults?.Data; + return lResults; } catch (ApiException e) { @@ -260,12 +260,12 @@ public async Task> ListAttemptsByMessageAsync(string app if (Throw) throw; - return new List(); + return new ListResponseMessageAttemptOut(); } } // Deprecated - public List ListAttemptsForEndpoint(string appId, string messageId, + public ListResponseMessageAttemptEndpointOut ListAttemptsForEndpoint(string appId, string messageId, string endpointId, AttemptsByEndpointListOptions options = null, string idempotencyKey = default) { try @@ -283,7 +283,7 @@ public List ListAttemptsForEndpoint(string appId, str options?.After, options?.EventTypes); - return lResults?.Data; + return lResults; } catch (ApiException e) { @@ -292,12 +292,12 @@ public List ListAttemptsForEndpoint(string appId, str if (Throw) throw; - return new List(); + return new ListResponseMessageAttemptEndpointOut(); } } // Deprecated - public async Task> ListAttemptsForEndpointAsync(string appId, + public async Task ListAttemptsForEndpointAsync(string appId, string messageId, string endpointId, AttemptsByEndpointListOptions options = null, string idempotencyKey = default, CancellationToken cancellationToken = default) { @@ -317,7 +317,7 @@ public async Task> ListAttemptsForEndpointAsync( options?.EventTypes?.ToList(), cancellationToken); - return lResults?.Data; + return lResults; } catch (ApiException e) { @@ -326,12 +326,12 @@ public async Task> ListAttemptsForEndpointAsync( if (Throw) throw; - return new List(); + return new ListResponseMessageAttemptEndpointOut(); } } // Deprecated - public List ListAttempts(string appId, string messageId, MessageAttemptListOptions options = null, + public ListResponseMessageAttemptOut ListAttempts(string appId, string messageId, MessageAttemptListOptions options = null, string idempotencyKey = default) { try @@ -350,7 +350,7 @@ public List ListAttempts(string appId, string messageId, Mess null, options?.EventTypes); - return lResults?.Data; + return lResults; } catch (ApiException e) { @@ -359,12 +359,12 @@ public List ListAttempts(string appId, string messageId, Mess if (Throw) throw; - return new List(); + return new ListResponseMessageAttemptOut(); } } // Deprecated - public async Task> ListAttemptsAsync(string appId, string messageId, MessageAttemptListOptions options = null, + public async Task ListAttemptsAsync(string appId, string messageId, MessageAttemptListOptions options = null, string idempotencyKey = default, CancellationToken cancellationToken = default) { try @@ -384,7 +384,7 @@ public async Task> ListAttemptsAsync(string appId, strin options?.EventTypes, cancellationToken); - return lResults?.Data; + return lResults; } catch (ApiException e) { @@ -393,11 +393,11 @@ public async Task> ListAttemptsAsync(string appId, strin if (Throw) throw; - return new List(); + return new ListResponseMessageAttemptOut(); } } - public List ListAttemptedDestinations(string appId, string messageId, ListOptions options = null, + public ListResponseMessageEndpointOut ListAttemptedDestinations(string appId, string messageId, ListOptions options = null, string idempotencyKey = default) { try @@ -408,7 +408,7 @@ public List ListAttemptedDestinations(string appId, string m options?.Limit, options?.Iterator); - return lResults?.Data; + return lResults; } catch (ApiException e) { @@ -417,11 +417,11 @@ public List ListAttemptedDestinations(string appId, string m if (Throw) throw; - return new List(); + return new ListResponseMessageEndpointOut(); } } - public async Task> ListAttemptedDestinationsAsync(string appId, string messageId, + public async Task ListAttemptedDestinationsAsync(string appId, string messageId, ListOptions options = null, string idempotencyKey = default, CancellationToken cancellationToken = default) { @@ -434,7 +434,7 @@ public async Task> ListAttemptedDestinationsAsync(strin options?.Iterator, cancellationToken); - return lResults?.Data; + return lResults; } catch (ApiException e) { @@ -443,7 +443,7 @@ public async Task> ListAttemptedDestinationsAsync(strin if (Throw) throw; - return new List(); + return new ListResponseMessageEndpointOut(); } }