diff --git a/csharp/Svix/MessageAttempt.cs b/csharp/Svix/MessageAttempt.cs index 973e31a9c..274ef0a03 100644 --- a/csharp/Svix/MessageAttempt.cs +++ b/csharp/Svix/MessageAttempt.cs @@ -144,6 +144,7 @@ public List ListAttemptsByEndpoint(string appId, string endpo options?.Before, options?.After, options?.WithContent, + options?.WithMsg, options?.EventTypes); return lResults?.Data; @@ -175,6 +176,7 @@ public async Task> ListAttemptsByEndpointAsync(string ap options?.Before, options?.After, options?.WithContent, + options?.WithMsg, options?.EventTypes, cancellationToken); diff --git a/csharp/Svix/Models/AttemptsByEndpointListOptions.cs b/csharp/Svix/Models/AttemptsByEndpointListOptions.cs index 0db99572c..597666d0c 100644 --- a/csharp/Svix/Models/AttemptsByEndpointListOptions.cs +++ b/csharp/Svix/Models/AttemptsByEndpointListOptions.cs @@ -18,5 +18,7 @@ public sealed class AttemptsByEndpointListOptions : ListOptions public DateTime? After { get; set; } public bool? WithContent { get; set; } + + public bool? WithMsg { get; set; } } } \ No newline at end of file diff --git a/go/internal/openapi/api_message_attempt.go b/go/internal/openapi/api_message_attempt.go index 3524c708e..98cce9007 100644 --- a/go/internal/openapi/api_message_attempt.go +++ b/go/internal/openapi/api_message_attempt.go @@ -1095,6 +1095,7 @@ type ApiV1MessageAttemptListByEndpointRequest struct { before *time.Time after *time.Time withContent *bool + withMsg *bool eventTypes *[]string } @@ -1130,6 +1131,10 @@ func (r ApiV1MessageAttemptListByEndpointRequest) WithContent(withContent bool) r.withContent = &withContent return r } +func (r ApiV1MessageAttemptListByEndpointRequest) WithMsg(withMsg bool) ApiV1MessageAttemptListByEndpointRequest { + r.withMsg = &withMsg + return r +} func (r ApiV1MessageAttemptListByEndpointRequest) EventTypes(eventTypes []string) ApiV1MessageAttemptListByEndpointRequest { r.eventTypes = &eventTypes return r @@ -1225,6 +1230,9 @@ func (a *MessageAttemptApiService) V1MessageAttemptListByEndpointExecute(r ApiV1 if r.withContent != nil { localVarQueryParams.Add("with_content", parameterToString(*r.withContent, "")) } + if r.withMsg != nil { + localVarQueryParams.Add("with_msg", parameterToString(*r.withMsg, "")) + } if r.eventTypes != nil { t := *r.eventTypes if reflect.TypeOf(t).Kind() == reflect.Slice { diff --git a/java/lib/src/main/java/com/svix/MessageAttempt.java b/java/lib/src/main/java/com/svix/MessageAttempt.java index 8dc060cff..3243847e8 100644 --- a/java/lib/src/main/java/com/svix/MessageAttempt.java +++ b/java/lib/src/main/java/com/svix/MessageAttempt.java @@ -59,6 +59,7 @@ public ListResponseMessageAttemptOut listByEndpoint(final String appId, final St options.getBefore(), options.getAfter(), options.getWithContent(), + options.getWithMsg(), new HashSet<>(options.getEventTypes()) ); } catch (com.svix.internal.ApiException e) { diff --git a/java/lib/src/main/java/com/svix/MessageAttemptListOptions.java b/java/lib/src/main/java/com/svix/MessageAttemptListOptions.java index 58b0ae5ea..4555c5548 100644 --- a/java/lib/src/main/java/com/svix/MessageAttemptListOptions.java +++ b/java/lib/src/main/java/com/svix/MessageAttemptListOptions.java @@ -16,6 +16,7 @@ public class MessageAttemptListOptions extends ListOptions { private String channel; private Boolean withContent; private String endpointId; + private Boolean withMsg; public MessageAttemptListOptions() { super(); @@ -124,4 +125,17 @@ public MessageAttemptListOptions endpointId(final String endpointId) { this.endpointId = endpointId; return this; } + + public Boolean getWithMsg() { + return withMsg; + } + + public void setWithMsg(final Boolean withMsg) { + this.withMsg = withMsg; + } + + public MessageAttemptListOptions withMsg(final Boolean withMsg) { + this.withMsg = withMsg; + return this; + } } diff --git a/kotlin/lib/src/main/kotlin/MessageAttempt.kt b/kotlin/lib/src/main/kotlin/MessageAttempt.kt index 32dcdb3a4..64f196455 100644 --- a/kotlin/lib/src/main/kotlin/MessageAttempt.kt +++ b/kotlin/lib/src/main/kotlin/MessageAttempt.kt @@ -60,6 +60,7 @@ class MessageAttempt internal constructor(token: String, options: SvixOptions) { options.before, options.after, options.withContent, + options.withMsg, HashSet(options.eventTypes) ) } catch (e: Exception) { diff --git a/kotlin/lib/src/main/kotlin/MessageAttemptListOptions.kt b/kotlin/lib/src/main/kotlin/MessageAttemptListOptions.kt index c05276b88..a28fa5efe 100644 --- a/kotlin/lib/src/main/kotlin/MessageAttemptListOptions.kt +++ b/kotlin/lib/src/main/kotlin/MessageAttemptListOptions.kt @@ -4,7 +4,7 @@ import com.svix.kotlin.models.MessageStatus import com.svix.kotlin.models.StatusCodeClass import java.time.OffsetDateTime -class MessageAttemptListOptions(var messageStatus: MessageStatus? = null, var before: OffsetDateTime? = null, var after: OffsetDateTime? = null, var eventTypes: List? = null, var statusCodeClass: StatusCodeClass? = null, var channel: String? = null, var endpointId: String? = null, var withContent: Boolean? = null) : ListOptions() { +class MessageAttemptListOptions(var messageStatus: MessageStatus? = null, var before: OffsetDateTime? = null, var after: OffsetDateTime? = null, var eventTypes: List? = null, var statusCodeClass: StatusCodeClass? = null, var channel: String? = null, var endpointId: String? = null, var withContent: Boolean? = null, var withMsg: Boolean? = null) : ListOptions() { fun messageStatus(messageStatus: MessageStatus) = apply { this.messageStatus = messageStatus } fun before(before: OffsetDateTime) = apply { this.before = before } @@ -20,4 +20,8 @@ class MessageAttemptListOptions(var messageStatus: MessageStatus? = null, var be override fun limit(limit: Int) = apply { super.limit(limit) } fun endpointId(endpointId: String) = apply { this.endpointId = endpointId } + + fun withContent(withContent: Boolean) = apply { this.withContent = withContent } + + fun withMsg(withMsg: Boolean) = apply { this.withMsg = withMsg } } diff --git a/openapi.json b/openapi.json index c3ecd95b3..aa7e9b590 100644 --- a/openapi.json +++ b/openapi.json @@ -5172,6 +5172,15 @@ }, "style": "form" }, + { + "in": "query", + "name": "with_msg", + "schema": { + "default": false, + "type": "boolean" + }, + "style": "form" + }, { "description": "Filter response based on the event type", "in": "query", diff --git a/rust/src/api.rs b/rust/src/api.rs index d9132cd0a..e236fae64 100644 --- a/rust/src/api.rs +++ b/rust/src/api.rs @@ -901,6 +901,24 @@ pub struct MessageAttemptListOptions { pub endpoint_id: Option, } +#[derive(Default)] +pub struct MessageAttemptListByEndpointOptions { + pub iterator: Option, + pub limit: Option, + pub event_types: Option>, + // FIXME: make before and after actual dates + /// RFC3339 date string + pub before: Option, + /// RFC3339 date string + pub after: Option, + pub channel: Option, + pub status: Option, + pub status_code_class: Option, + pub with_content: Option, + pub with_msg: Option, + pub endpoint_id: Option, +} + pub struct MessageAttempt<'a> { cfg: &'a Configuration, } @@ -952,9 +970,9 @@ impl<'a> MessageAttempt<'a> { &self, app_id: String, endpoint_id: String, - options: Option, + options: Option, ) -> Result { - let MessageAttemptListOptions { + let MessageAttemptListByEndpointOptions { iterator, limit, event_types, @@ -965,6 +983,7 @@ impl<'a> MessageAttempt<'a> { status_code_class, endpoint_id: _, with_content, + with_msg, } = options.unwrap_or_default(); Ok(message_attempt_api::v1_message_attempt_list_by_endpoint( self.cfg, @@ -980,6 +999,7 @@ impl<'a> MessageAttempt<'a> { status, status_code_class, with_content, + with_msg, }, ) .await?)