Repository: svix/svix-webhooks (language: rust)

Issue:
csharp: List endpoint responses missing pagination data
Our list endpoints, e.g., `Endpoint.List`, `Endpoint.ListAsync`, do not return pagination data, which makes the library unusable if results are paginated. Need to return the full response, and not just the `data` portion of it.


Discussion / hints:

Fix patch:
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<bool> DeleteAsync(string appId, string idempotencyKey = default,
         Task<ApplicationOut> GetAsync(string appId, string idempotencyKey = default,
             CancellationToken cancellationToken = default);
 
-        List<ApplicationOut> List(ListOptions options = null, string idempotencyKey = default);
+        ListResponseApplicationOut List(ListOptions options = null, string idempotencyKey = default);
 
-        Task<List<ApplicationOut>> ListAsync(ListOptions options = null, string idempotencyKey = default, CancellationToken cancellationToken = default);
+        Task<ListResponseApplicationOut> 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<BackgroundTaskOut> GetAsync(string taskId, string idempotencyKey = default,
             CancellationToken cancellationToken = default);
 
-        List<BackgroundTaskOut> List(BackgroundTaskListOptions options = null, string idempotencyKey = default);
+        ListResponseBackgroundTaskOut List(BackgroundTaskListOptions options = null, string idempotencyKey = default);
 
-        Task<List<BackgroundTaskOut>> ListAsync(BackgroundTaskListOptions options = null, string idempotencyKey = default, CancellationToken cancellationToken = default);
+        Task<ListResponseBackgroundTaskOut> 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<EndpointHeadersOut> GetHeadersAsync(string appId, string endpointId, string
         Task<string> GetSecretAsync(string appId, string endpointId, string idempotencyKey = default,
             CancellationToken cancellationToken = default);
 
-        List<EndpointOut> List(string appId, ListOptions options = null, string idempotencyKey = default);
+        ListResponseEndpointOut List(string appId, ListOptions options = null, string idempotencyKey = default);
 
-        Task<List<EndpointOut>> ListAsync(string appId, ListOptions options = null, string idempotencyKey = default,
+        Task<ListResponseEndpointOut> 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<EventTypeOut> CreateAsync(EventTypeIn eventType, string idempotencyKey = de
         Task<EventTypeOut> GetAsync(string eventType, string idempotencyKey = default,
             CancellationToken cancellationToken = default);
 
-        List<EventTypeOut> List(EventTypeListOptions options = null, string idempotencyKey = default);
+        ListResponseEventTypeOut List(EventTypeListOptions options = null, string idempotencyKey = default);
 
-        Task<List<EventTypeOut>> ListAsync(EventTypeListOptions options = null, string idempotencyKey = default,
+        Task<ListResponseEventTypeOut> 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<bool> DeleteAsync(string appId, string integrationId, string idempotencyKey
         Task<string> GetKeyAsync(string appId, string integrationId, string idempotencyKey = default,
             CancellationToken cancellationToken = default);
 
-        List<IntegrationOut> List(string appId, ListOptions options = null, string idempotencyKey = default);
+        ListResponseIntegrationOut List(string appId, ListOptions options = null, string idempotencyKey = default);
 
-        Task<List<IntegrationOut>> ListAsync(string appId, ListOptions options = null, string idempotencyKey = default,
+        Task<ListResponseIntegrationOut> 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<MessageOut> CreateAsync(string appId, MessageIn message, MessageCreateOptio
         Task<MessageOut> GetAsync(string appId, string messageId, string idempotencyKey = default,
             CancellationToken cancellationToken = default);
 
-        List<MessageOut> List(string appId, MessageListOptions options = null, string idempotencyKey = default);
+        ListResponseMessageOut List(string appId, MessageListOptions options = null, string idempotencyKey = default);
 
-        Task<List<MessageOut>> ListAsync(string appId, MessageListOptions options = null, string idempotencyKey = default,
+        Task<ListResponseMessageOut> 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<MessageAttemptOut> GetAttemptAsync(string appId, string attemptId, string messageId, string idempotencyKey = default, CancellationToken cancellationToken = default);
 
-        List<EndpointMessageOut> ListAttemptedMessages(string appId, string endpointId, MessageAttemptListOptions options = null,
+        ListResponseEndpointMessageOut ListAttemptedMessages(string appId, string endpointId, MessageAttemptListOptions options = null,
             string idempotencyKey = default);
 
-        Task<List<EndpointMessageOut>> ListAttemptedMessagesAsync(string appId, string endpointId, MessageAttemptListOptions options = null,
+        Task<ListResponseEndpointMessageOut> ListAttemptedMessagesAsync(string appId, string endpointId, MessageAttemptListOptions options = null,
             string idempotencyKey = default, CancellationToken cancellationToken = default);
 
-        List<MessageAttemptOut> ListAttemptsByEndpoint(string appId, string endpointId, AttemptsByEndpointListOptions options = null, string idempotencyKey = default);
+        ListResponseMessageAttemptOut ListAttemptsByEndpoint(string appId, string endpointId, AttemptsByEndpointListOptions options = null, string idempotencyKey = default);
 
-        Task<List<MessageAttemptOut>> ListAttemptsByEndpointAsync(string appId, string endpointId, AttemptsByEndpointListOptions options = null, string idempotencyKey = default, CancellationToken cancellationToken = default);
+        Task<ListResponseMessageAttemptOut> ListAttemptsByEndpointAsync(string appId, string endpointId, AttemptsByEndpointListOptions options = null, string idempotencyKey = default, CancellationToken cancellationToken = default);
 
-        List<MessageAttemptOut> ListAttemptsByMessage(string appId, string messageId, AttemptsByMessageListOptions options = null, string idempotencyKey = default);
+        ListResponseMessageAttemptOut ListAttemptsByMessage(string appId, string messageId, AttemptsByMessageListOptions options = null, string idempotencyKey = default);
 
-        Task<List<MessageAttemptOut>> ListAttemptsByMessageAsync(string appId, string messageId, AttemptsByMessageListOptions options = null, string idempotencyKey = default, CancellationToken cancellationToken = default);
+        Task<ListResponseMessageAttemptOut> ListAttemptsByMessageAsync(string appId, string messageId, AttemptsByMessageListOptions options = null, string idempotencyKey = default, CancellationToken cancellationToken = default);
 
-        List<MessageAttemptEndpointOut> ListAttemptsForEndpoint(string appId, string messageId, string endpointId,
+        ListResponseMessageAttemptEndpointOut ListAttemptsForEndpoint(string appId, string messageId, string endpointId,
             AttemptsByEndpointListOptions options = null, string idempotencyKey = default);
 
-        Task<List<MessageAttemptEndpointOut>> ListAttemptsForEndpointAsync(string appId, string messageId, string endpointId,
+        Task<ListResponseMessageAttemptEndpointOut> ListAttemptsForEndpointAsync(string appId, string messageId, string endpointId,
             AttemptsByEndpointListOptions options = null, string idempotencyKey = default,
             CancellationToken cancellationToken = default);
 
-        List<MessageAttemptOut> ListAttempts(string appId, string messageId,
+        ListResponseMessageAttemptOut ListAttempts(string appId, string messageId,
             MessageAttemptListOptions options = null, string idempotencyKey = default);
 
-        Task<List<MessageAttemptOut>> ListAttemptsAsync(string appId, string messageId,
+        Task<ListResponseMessageAttemptOut> ListAttemptsAsync(string appId, string messageId,
             MessageAttemptListOptions options = null, string idempotencyKey = default,
             CancellationToken cancellationToken = default);
 
-        List<MessageEndpointOut> ListAttemptedDestinations(string appId, string messageId,
+        ListResponseMessageEndpointOut ListAttemptedDestinations(string appId, string messageId,
             ListOptions options = null, string idempotencyKey = default);
 
-        Task<List<MessageEndpointOut>> ListAttemptedDestinationsAsync(string appId, string messageId,
+        Task<ListResponseMessageEndpointOut> 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<ApplicationOut> GetAsync(string appId, string idempotencyKey =
             }
         }
 
-        public List<ApplicationOut> List(ListOptions options = null, string idempotencyKey = default)
+        public ListResponseApplicationOut List(ListOptions options = null, string idempotencyKey = default)
         {
             try
             {
@@ -158,7 +158,7 @@ public List<ApplicationOut> List(ListOptions options = null, string idempotencyK
                     options?.Iterator,
                     options?.Order);
 
-                return lResponse?.Data;
+                return lResponse;
             }
             catch (ApiException e)
             {
@@ -167,11 +167,11 @@ public List<ApplicationOut> List(ListOptions options = null, string idempotencyK
                 if (Throw)
                     throw;
 
-                return new List<ApplicationOut>();
+                return new ListResponseApplicationOut();
             }
         }
 
-        public async Task<List<ApplicationOut>> ListAsync(ListOptions options = null, string idempotencyKey = default, CancellationToken cancellationToken = default)
+        public async Task<ListResponseApplicationOut> ListAsync(ListOptions options = null, string idempotencyKey = default, CancellationToken cancellationToken = default)
         {
             try
             {
@@ -181,7 +181,7 @@ public async Task<List<ApplicationOut>> ListAsync(ListOptions options = null, st
                     options?.Order,
                     cancellationToken);
 
-                return lResponse?.Data;
+                return lResponse;
             }
             catch (ApiException e)
             {
@@ -190,7 +190,7 @@ public async Task<List<ApplicationOut>> ListAsync(ListOptions options = null, st
                 if (Throw)
                     throw;
 
-                return new List<ApplicationOut>();
+                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<BackgroundTaskOut> GetAsync(string taskId, string idempotencyK
             }
         }
 
-        public List<BackgroundTaskOut> List(BackgroundTaskListOptions options = null, string idempotencyKey = default)
+        public ListResponseBackgroundTaskOut List(BackgroundTaskListOptions options = null, string idempotencyKey = default)
         {
             try
             {
@@ -71,7 +71,7 @@ public List<BackgroundTaskOut> List(BackgroundTaskListOptions options = null, st
                     options?.Iterator,
                     options?.Order);
 
-                return lResponse?.Data;
+                return lResponse;
             }
             catch (ApiException e)
             {
@@ -80,11 +80,11 @@ public List<BackgroundTaskOut> List(BackgroundTaskListOptions options = null, st
                 if (Throw)
                     throw;
 
-                return new List<BackgroundTaskOut>();
+                return new ListResponseBackgroundTaskOut();
             }
         }
 
-        public async Task<List<BackgroundTaskOut>> ListAsync(BackgroundTaskListOptions options = null, string idempotencyKey = default, CancellationToken cancellationToken = default)
+        public async Task<ListResponseBackgroundTaskOut> ListAsync(BackgroundTaskListOptions options = null, string idempotencyKey = default, CancellationToken cancellationToken = default)
         {
             try
             {
@@ -96,7 +96,7 @@ public async Task<List<BackgroundTaskOut>> ListAsync(BackgroundTaskListOptions o
                     options?.Order,
                     cancellationToken);
 
-                return lResponse?.Data;
+                return lResponse;
             }
             catch (ApiException e)
             {
@@ -105,7 +105,7 @@ public async Task<List<BackgroundTaskOut>> ListAsync(BackgroundTaskListOptions o
                 if (Throw)
                     throw;
 
-                return new List<BackgroundTaskOut>();
+                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<string> GetSecretAsync(string appId, string endpointId, string
             }
         }
 
-        public List<EndpointOut> 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<EndpointOut> 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<EndpointOut> List(string appId, ListOptions options = null, string i
                 if (Throw)
                     throw;
 
-                return new List<EndpointOut>();
+                return new ListResponseEndpointOut();
             }
         }
 
-        public async Task<List<EndpointOut>> ListAsync(string appId, ListOptions options = null, string idempotencyKey = default,
+        public async Task<ListResponseEndpointOut> ListAsync(string appId, ListOptions options = null, string idempotencyKey = default,
             CancellationToken cancellationToken = default)
         {
             try
@@ -279,7 +279,7 @@ public async Task<List<EndpointOut>> ListAsync(string appId, ListOptions options
                     options?.Order,
                     cancellationToken);
 
-                return lEndpoints?.Data;
+                return lEndpoints;
             }
             catch (ApiException e)
             {
@@ -288,7 +288,7 @@ public async Task<List<EndpointOut>> ListAsync(string appId, ListOptions options
                 if (Throw)
                     throw;
 
-                return new List<EndpointOut>();
+                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<EventTypeOut> GetAsync(string eventType, string idempotencyKey
             }
         }
 
-        public List<EventTypeOut> List(EventTypeListOptions options = null, string idempotencyKey = default)
+        public ListResponseEventTypeOut List(EventTypeListOptions options = null, string idempotencyKey = default)
         {
             try
             {
@@ -159,7 +159,7 @@ public List<EventTypeOut> List(EventTypeListOptions options = null, string idemp
                     options?.IncludeArchived,
                     options?.WithContent);
 
-                return lResults?.Data;
+                return lResults;
             }
             catch (ApiException e)
             {
@@ -168,11 +168,11 @@ public List<EventTypeOut> List(EventTypeListOptions options = null, string idemp
                 if (Throw)
                     throw;
 
-                return new List<EventTypeOut>();
+                return new ListResponseEventTypeOut();
             }
         }
 
-        public async Task<List<EventTypeOut>> ListAsync(EventTypeListOptions options = null, string idempotencyKey = default,
+        public async Task<ListResponseEventTypeOut> ListAsync(EventTypeListOptions options = null, string idempotencyKey = default,
             CancellationToken cancellationToken = default)
         {
             try
@@ -185,7 +185,7 @@ public async Task<List<EventTypeOut>> ListAsync(EventTypeListOptions options = n
                     options?.WithContent,
                     cancellationToken);
 
-                return lResults?.Data;
+                return lResults;
             }
             catch (ApiException e)
             {
@@ -194,7 +194,7 @@ public async Task<List<EventTypeOut>> ListAsync(EventTypeListOptions options = n
                 if (Throw)
                     throw;
 
-                return new List<EventTypeOut>();
+                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<string> GetKeyAsync(string appId, string integrationId, string
             }
         }
 
-        public List<IntegrationOut> 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<IntegrationOut> 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<IntegrationOut> List(string appId, ListOptions options = null, strin
                 if (Throw)
                     throw;
 
-                return new List<IntegrationOut>();
+                return new ListResponseIntegrationOut();
             }
         }
 
-        public async Task<List<IntegrationOut>> ListAsync(string appId, ListOptions options = null, string idempotencyKey = default,
+        public async Task<ListResponseIntegrationOut> ListAsync(string appId, ListOptions options = null, string idempotencyKey = default,
             CancellationToken cancellationToken = default)
         {
             try
@@ -231,7 +231,7 @@ public async Task<List<IntegrationOut>> ListAsync(string appId, ListOptions opti
                     options?.Iterator,
                     cancellationToken);
 
-                return lResult?.Data;
+                return lResult;
             }
             catch (ApiException e)
             {
@@ -240,7 +240,7 @@ public async Task<List<IntegrationOut>> ListAsync(string appId, ListOptions opti
                 if (Throw)
                     throw;
 
-                return new List<IntegrationOut>();
+                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<MessageOut> GetAsync(string appId, string messageId, string id
             }
         }
 
-        public List<MessageOut> 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<MessageOut> List(string appId, MessageListOptions options = null, st
                     options?.EventTypes
                     );
 
-                return lResponse?.Data;
+                return lResponse;
             }
             catch (ApiException e)
             {
@@ -141,11 +141,11 @@ public List<MessageOut> List(string appId, MessageListOptions options = null, st
                 if (Throw)
                     throw;
 
-                return new List<MessageOut>();
+                return new ListResponseMessageOut();
             }
         }
 
-        public async Task<List<MessageOut>> ListAsync(string appId, MessageListOptions options = null, string idempotencyKey = default, CancellationToken cancellationToken = default)
+        public async Task<ListResponseMessageOut> ListAsync(string appId, MessageListOptions options = null, string idempotencyKey = default, CancellationToken cancellationToken = default)
         {
             try
             {
@@ -161,7 +161,7 @@ public async Task<List<MessageOut>> ListAsync(string appId, MessageListOptions o
                     options?.EventTypes,
                     cancellationToken);
 
-                return lResponse?.Data;
+                return lResponse;
             }
             catch (ApiException e)
             {
@@ -170,7 +170,7 @@ public async Task<List<MessageOut>> ListAsync(string appId, MessageListOptions o
                 if (Throw)
                     throw;
 
-                return new List<MessageOut>();
+                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<MessageAttemptOut> GetAttemptAsync(string appId, string attemp
             }
         }
 
-        public List<EndpointMessageOut> 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<EndpointMessageOut> ListAttemptedMessages(string appId, string endpo
                     options?.Before,
                     options?.After);
 
-                return lResults?.Data;
+                return lResults;
             }
             catch (ApiException e)
             {
@@ -94,11 +94,11 @@ public List<EndpointMessageOut> ListAttemptedMessages(string appId, string endpo
                 if (Throw)
                     throw;
 
-                return new List<EndpointMessageOut>();
+                return new ListResponseEndpointMessageOut();
             }
         }
 
-        public async Task<List<EndpointMessageOut>> ListAttemptedMessagesAsync(string appId, string endpointId, MessageAttemptListOptions options = null,
+        public async Task<ListResponseEndpointMessageOut> ListAttemptedMessagesAsync(string appId, string endpointId, MessageAttemptListOptions options = null,
             string idempotencyKey = default, CancellationToken cancellationToken = default)
         {
             try
@@ -110,14 +110,14 @@ public async Task<List<EndpointMessageOut>> 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<List<EndpointMessageOut>> ListAttemptedMessagesAsync(string ap
                 if (Throw)
                     throw;
 
-                return new List<EndpointMessageOut>();
+                return new ListResponseEndpointMessageOut();
             }
         }
 
-        public List<MessageAttemptOut> 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<MessageAttemptOut> ListAttemptsByEndpoint(string appId, string endpo
                     options?.WithMsg,
                     options?.EventTypes);
 
-                return lResults?.Data;
+                return lResults;
             }
             catch (ApiException e)
             {
@@ -159,11 +159,11 @@ public List<MessageAttemptOut> ListAttemptsByEndpoint(string appId, string endpo
                 if (Throw)
                     throw;
 
-                return new List<MessageAttemptOut>();
+                return new ListResponseMessageAttemptOut();
             }
         }
 
-        public async Task<List<MessageAttemptOut>> ListAttemptsByEndpointAsync(string appId, string endpointId, AttemptsByEndpointListOptions options = null,
+        public async Task<ListResponseMessageAttemptOut> ListAttemptsByEndpointAsync(string appId, string endpointId, AttemptsByEndpointListOptions options = null,
             string idempotencyKey = default, CancellationToken cancellationToken = default)
         {
             try
@@ -184,7 +184,7 @@ public async Task<List<MessageAttemptOut>> ListAttemptsByEndpointAsync(string ap
                     options?.EventTypes,
                     cancellationToken);
 
-                return lResults?.Data;
+                return lResults;
             }
             catch (ApiException e)
             {
@@ -193,11 +193,11 @@ public async Task<List<MessageAttemptOut>> ListAttemptsByEndpointAsync(string ap
                 if (Throw)
                     throw;
 
-                return new List<MessageAttemptOut>();
+                return new ListResponseMessageAttemptOut();
             }
         }
 
-        public List<MessageAttemptOut> 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<MessageAttemptOut> ListAttemptsByMessage(string appId, string messag
                     options?.WithContent,
                     options?.EventTypes);
 
-                return lResults?.Data;
+                return lResults;
             }
             catch (ApiException e)
             {
@@ -226,11 +226,11 @@ public List<MessageAttemptOut> ListAttemptsByMessage(string appId, string messag
                 if (Throw)
                     throw;
 
-                return new List<MessageAttemptOut>();
+                return new ListResponseMessageAttemptOut();
             }
         }
 
-        public async Task<List<MessageAttemptOut>> ListAttemptsByMessageAsync(string appId, string messageId, AttemptsByMessageListOptions options = null,
+        public async Task<ListResponseMessageAttemptOut> ListAttemptsByMessageAsync(string appId, string messageId, AttemptsByMessageListOptions options = null,
             string idempotencyKey = default, CancellationToken cancellationToken = default)
         {
             try
@@ -251,7 +251,7 @@ public async Task<List<MessageAttemptOut>> ListAttemptsByMessageAsync(string app
                     options?.EventTypes,
                     cancellationToken);
 
-                return lResults?.Data;
+                return lResults;
             }
             catch (ApiException e)
             {
@@ -260,12 +260,12 @@ public async Task<List<MessageAttemptOut>> ListAttemptsByMessageAsync(string app
                 if (Throw)
                     throw;
 
-                return new List<MessageAttemptOut>();
+                return new ListResponseMessageAttemptOut();
             }
         }
 
         // Deprecated
-        public List<MessageAttemptEndpointOut> 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<MessageAttemptEndpointOut> ListAttemptsForEndpoint(string appId, str
                     options?.After,
                     options?.EventTypes);
 
-                return lResults?.Data;
+                return lResults;
             }
             catch (ApiException e)
             {
@@ -292,12 +292,12 @@ public List<MessageAttemptEndpointOut> ListAttemptsForEndpoint(string appId, str
                 if (Throw)
                     throw;
 
-                return new List<MessageAttemptEndpointOut>();
+                return new ListResponseMessageAttemptEndpointOut();
             }
         }
 
         // Deprecated
-        public async Task<List<MessageAttemptEndpointOut>> ListAttemptsForEndpointAsync(string appId,
+        public async Task<ListResponseMessageAttemptEndpointOut> ListAttemptsForEndpointAsync(string appId,
             string messageId, string endpointId, AttemptsByEndpointListOptions options = null, string idempotencyKey = default,
             CancellationToken cancellationToken = default)
         {
@@ -317,7 +317,7 @@ public async Task<List<MessageAttemptEndpointOut>> ListAttemptsForEndpointAsync(
                     options?.EventTypes?.ToList(),
                     cancellationToken);
 
-                return lResults?.Data;
+                return lResults;
             }
             catch (ApiException e)
             {
@@ -326,12 +326,12 @@ public async Task<List<MessageAttemptEndpointOut>> ListAttemptsForEndpointAsync(
                 if (Throw)
                     throw;
 
-                return new List<MessageAttemptEndpointOut>();
+                return new ListResponseMessageAttemptEndpointOut();
             }
         }
 
         // Deprecated
-        public List<MessageAttemptOut> 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<MessageAttemptOut> ListAttempts(string appId, string messageId, Mess
                     null,
                     options?.EventTypes);
 
-                return lResults?.Data;
+                return lResults;
             }
             catch (ApiException e)
             {
@@ -359,12 +359,12 @@ public List<MessageAttemptOut> ListAttempts(string appId, string messageId, Mess
                 if (Throw)
                     throw;
 
-                return new List<MessageAttemptOut>();
+                return new ListResponseMessageAttemptOut();
             }
         }
 
         // Deprecated
-        public async Task<List<MessageAttemptOut>> ListAttemptsAsync(string appId, string messageId, MessageAttemptListOptions options = null,
+        public async Task<ListResponseMessageAttemptOut> ListAttemptsAsync(string appId, string messageId, MessageAttemptListOptions options = null,
             string idempotencyKey = default, CancellationToken cancellationToken = default)
         {
             try
@@ -384,7 +384,7 @@ public async Task<List<MessageAttemptOut>> ListAttemptsAsync(string appId, strin
                     options?.EventTypes,
                     cancellationToken);
 
-                return lResults?.Data;
+                return lResults;
             }
             catch (ApiException e)
             {
@@ -393,11 +393,11 @@ public async Task<List<MessageAttemptOut>> ListAttemptsAsync(string appId, strin
                 if (Throw)
                     throw;
 
-                return new List<MessageAttemptOut>();
+                return new ListResponseMessageAttemptOut();
             }
         }
 
-        public List<MessageEndpointOut> 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<MessageEndpointOut> ListAttemptedDestinations(string appId, string m
                     options?.Limit,
                     options?.Iterator);
 
-                return lResults?.Data;
+                return lResults;
             }
             catch (ApiException e)
             {
@@ -417,11 +417,11 @@ public List<MessageEndpointOut> ListAttemptedDestinations(string appId, string m
                 if (Throw)
                     throw;
 
-                return new List<MessageEndpointOut>();
+                return new ListResponseMessageEndpointOut();
             }
         }
 
-        public async Task<List<MessageEndpointOut>> ListAttemptedDestinationsAsync(string appId, string messageId,
+        public async Task<ListResponseMessageEndpointOut> ListAttemptedDestinationsAsync(string appId, string messageId,
             ListOptions options = null, string idempotencyKey = default,
             CancellationToken cancellationToken = default)
         {
@@ -434,7 +434,7 @@ public async Task<List<MessageEndpointOut>> ListAttemptedDestinationsAsync(strin
                     options?.Iterator,
                     cancellationToken);
 
-                return lResults?.Data;
+                return lResults;
             }
             catch (ApiException e)
             {
@@ -443,7 +443,7 @@ public async Task<List<MessageEndpointOut>> ListAttemptedDestinationsAsync(strin
                 if (Throw)
                     throw;
 
-                return new List<MessageEndpointOut>();
+                return new ListResponseMessageEndpointOut();
             }
         }
 


Test patch: