diff --git a/csharp/Svix/Endpoint.cs b/csharp/Svix/Endpoint.cs index 0edd582fb..dd957044f 100644 --- a/csharp/Svix/Endpoint.cs +++ b/csharp/Svix/Endpoint.cs @@ -672,7 +672,7 @@ public bool ReplayMissing(string appId, string endpointId, ReplayIn replayIn, { try { - var response = _endpointApi.V1EndpointReplayWithHttpInfo( + var response = _endpointApi.V1EndpointReplayMissingWithHttpInfo( appId, endpointId, replayIn, @@ -696,7 +696,7 @@ public async Task ReplayMissingAsync(string appId, string endpointId, Repl { try { - var response = await _endpointApi.V1EndpointReplayWithHttpInfoAsync( + var response = await _endpointApi.V1EndpointReplayMissingWithHttpInfoAsync( appId, endpointId, replayIn, diff --git a/go/endpoint.go b/go/endpoint.go index ba72f48d5..f0e0cf584 100644 --- a/go/endpoint.go +++ b/go/endpoint.go @@ -229,7 +229,7 @@ func (e *Endpoint) ReplayMissingWithOptions( replayIn *ReplayIn, options *PostOptions, ) (*ReplayOut, error) { - req := e.api.EndpointAPI.V1EndpointReplay(ctx, appId, endpointId) + req := e.api.EndpointAPI.V1EndpointReplayMissing(ctx, appId, endpointId) req.ReplayIn(*replayIn) if options != nil { if options.IdempotencyKey != nil { diff --git a/go/internal/openapi/api_application.go b/go/internal/openapi/api_application.go index 36ff1d5ba..9be21a298 100644 --- a/go/internal/openapi/api_application.go +++ b/go/internal/openapi/api_application.go @@ -33,25 +33,25 @@ type ApiGetAppUsageStatsApiV1AppStatsUsageGetRequest struct { iterator *string } -// Filter the range to data after this date +// Filter the range to data after this date. func (r ApiGetAppUsageStatsApiV1AppStatsUsageGetRequest) Since(since time.Time) ApiGetAppUsageStatsApiV1AppStatsUsageGetRequest { r.since = &since return r } -// Filter the range to data before this date +// Filter the range to data before this date. func (r ApiGetAppUsageStatsApiV1AppStatsUsageGetRequest) Until(until time.Time) ApiGetAppUsageStatsApiV1AppStatsUsageGetRequest { r.until = &until return r } -// Limit the number of returned items +// Limit the number of returned items. func (r ApiGetAppUsageStatsApiV1AppStatsUsageGetRequest) Limit(limit int32) ApiGetAppUsageStatsApiV1AppStatsUsageGetRequest { r.limit = &limit return r } -// The iterator to use (depends on the chosen ordering) +// The iterator to use (depends on the chosen ordering). func (r ApiGetAppUsageStatsApiV1AppStatsUsageGetRequest) Iterator(iterator string) ApiGetAppUsageStatsApiV1AppStatsUsageGetRequest { r.iterator = &iterator return r @@ -820,13 +820,13 @@ type ApiV1ApplicationGetStatsRequest struct { appId string } -// Filter the range to data starting from this date +// Filter the range to data starting from this date. func (r ApiV1ApplicationGetStatsRequest) Since(since time.Time) ApiV1ApplicationGetStatsRequest { r.since = &since return r } -// Filter the range to data ending by this date +// Filter the range to data ending by this date. func (r ApiV1ApplicationGetStatsRequest) Until(until time.Time) ApiV1ApplicationGetStatsRequest { r.until = &until return r @@ -839,7 +839,7 @@ func (r ApiV1ApplicationGetStatsRequest) Execute() (*ApplicationStats, *http.Res /* V1ApplicationGetStats Get App Stats -Get basic statistics for the application +Get basic statistics for the application. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param appId The app's ID or UID diff --git a/go/internal/openapi/api_authentication.go b/go/internal/openapi/api_authentication.go index 2d344a264..624eaa859 100644 --- a/go/internal/openapi/api_authentication.go +++ b/go/internal/openapi/api_authentication.go @@ -660,7 +660,7 @@ func (r ApiV1AuthenticationExchangeOneTimeTokenRequest) Execute() (*OneTimeToken /* V1AuthenticationExchangeOneTimeToken Exchange One Time Token -This is a one time token +This is a one time token. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiV1AuthenticationExchangeOneTimeTokenRequest @@ -857,7 +857,7 @@ func (r ApiV1AuthenticationExpireAllRequest) Execute() (*http.Response, error) { /* V1AuthenticationExpireAll Expire All -Expire all of the tokens associated with a specific Application +Expire all of the tokens associated with a specific application. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param appId The app's ID or UID diff --git a/go/internal/openapi/api_background_tasks.go b/go/internal/openapi/api_background_tasks.go index 4fe006139..737f2fba9 100644 --- a/go/internal/openapi/api_background_tasks.go +++ b/go/internal/openapi/api_background_tasks.go @@ -212,13 +212,13 @@ type ApiListBackgroundTasksRequest struct { order *Ordering } -// Filter the response based on the status +// Filter the response based on the status. func (r ApiListBackgroundTasksRequest) Status(status BackgroundTaskStatus) ApiListBackgroundTasksRequest { r.status = &status return r } -// Filter the response based on the type +// Filter the response based on the type. func (r ApiListBackgroundTasksRequest) Task(task BackgroundTaskType) ApiListBackgroundTasksRequest { r.task = &task return r diff --git a/go/internal/openapi/api_broadcast.go b/go/internal/openapi/api_broadcast.go index 615980c1f..71b2c8f96 100644 --- a/go/internal/openapi/api_broadcast.go +++ b/go/internal/openapi/api_broadcast.go @@ -47,7 +47,7 @@ func (r ApiCreateBroadcastMessageRequest) Execute() (*MessageBroadcastOut, *http /* CreateBroadcastMessage Create Broadcast Message -Creates a background task to send the same message to each application in your organization +Creates a background task to send the same message to each application in your organization. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiCreateBroadcastMessageRequest diff --git a/go/internal/openapi/api_endpoint.go b/go/internal/openapi/api_endpoint.go index 4c04f4f71..b62e3338f 100644 --- a/go/internal/openapi/api_endpoint.go +++ b/go/internal/openapi/api_endpoint.go @@ -52,7 +52,7 @@ V1EndpointCreate Create Endpoint Create a new endpoint for the application. -When `secret` is `null` the secret is automatically generated (recommended) +When `secret` is `null` the secret is automatically generated (recommended). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param appId The app's ID or UID @@ -430,7 +430,7 @@ func (r ApiV1EndpointDeleteMtlsConfigRequest) Execute() (*http.Response, error) /* V1EndpointDeleteMtlsConfig Delete Endpoint Mtls Config -Delete endpoint mTLS configuration +Delete endpoint mTLS configuration. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param appId The app's ID or UID @@ -614,7 +614,7 @@ func (r ApiV1EndpointDeleteOauthConfigRequest) Execute() (*http.Response, error) /* V1EndpointDeleteOauthConfig Delete Endpoint Oauth Config -Delete endpoint OAuth configuration +Delete endpoint OAuth configuration. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param appId The app's ID or UID @@ -993,7 +993,7 @@ func (r ApiV1EndpointGetHeadersRequest) Execute() (*EndpointHeadersOut, *http.Re /* V1EndpointGetHeaders Get Endpoint Headers -Get the additional headers to be sent with the webhook +Get the additional headers to be sent with the webhook. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param appId The app's ID or UID @@ -1381,13 +1381,13 @@ type ApiV1EndpointGetStatsRequest struct { until *time.Time } -// Filter the range to data starting from this date +// Filter the range to data starting from this date. func (r ApiV1EndpointGetStatsRequest) Since(since time.Time) ApiV1EndpointGetStatsRequest { r.since = &since return r } -// Filter the range to data ending by this date +// Filter the range to data ending by this date. func (r ApiV1EndpointGetStatsRequest) Until(until time.Time) ApiV1EndpointGetStatsRequest { r.until = &until return r @@ -2028,7 +2028,7 @@ func (r ApiV1EndpointPatchHeadersRequest) Execute() (*http.Response, error) { /* V1EndpointPatchHeaders Patch Endpoint Headers -Partially set the additional headers to be sent with the webhook +Partially set the additional headers to be sent with the webhook. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param appId The app's ID or UID @@ -2421,7 +2421,7 @@ func (a *EndpointAPIService) V1EndpointRecoverExecute(r ApiV1EndpointRecoverRequ return localVarReturnValue, localVarHTTPResponse, nil } -type ApiV1EndpointReplayRequest struct { +type ApiV1EndpointReplayMissingRequest struct { ctx context.Context ApiService *EndpointAPIService appId string @@ -2430,23 +2430,23 @@ type ApiV1EndpointReplayRequest struct { idempotencyKey *string } -func (r ApiV1EndpointReplayRequest) ReplayIn(replayIn ReplayIn) ApiV1EndpointReplayRequest { +func (r ApiV1EndpointReplayMissingRequest) ReplayIn(replayIn ReplayIn) ApiV1EndpointReplayMissingRequest { r.replayIn = &replayIn return r } // The request's idempotency key -func (r ApiV1EndpointReplayRequest) IdempotencyKey(idempotencyKey string) ApiV1EndpointReplayRequest { +func (r ApiV1EndpointReplayMissingRequest) IdempotencyKey(idempotencyKey string) ApiV1EndpointReplayMissingRequest { r.idempotencyKey = &idempotencyKey return r } -func (r ApiV1EndpointReplayRequest) Execute() (*ReplayOut, *http.Response, error) { - return r.ApiService.V1EndpointReplayExecute(r) +func (r ApiV1EndpointReplayMissingRequest) Execute() (*ReplayOut, *http.Response, error) { + return r.ApiService.V1EndpointReplayMissingExecute(r) } /* -V1EndpointReplay Replay Missing Webhooks +V1EndpointReplayMissing Replay Missing Webhooks Replays messages to the endpoint. @@ -2456,10 +2456,10 @@ Messages that were previously sent to the endpoint are not resent. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param appId The app's ID or UID @param endpointId The ep's ID or UID - @return ApiV1EndpointReplayRequest + @return ApiV1EndpointReplayMissingRequest */ -func (a *EndpointAPIService) V1EndpointReplay(ctx context.Context, appId string, endpointId string) ApiV1EndpointReplayRequest { - return ApiV1EndpointReplayRequest{ +func (a *EndpointAPIService) V1EndpointReplayMissing(ctx context.Context, appId string, endpointId string) ApiV1EndpointReplayMissingRequest { + return ApiV1EndpointReplayMissingRequest{ ApiService: a, ctx: ctx, appId: appId, @@ -2469,7 +2469,7 @@ func (a *EndpointAPIService) V1EndpointReplay(ctx context.Context, appId string, // Execute executes the request // @return ReplayOut -func (a *EndpointAPIService) V1EndpointReplayExecute(r ApiV1EndpointReplayRequest) (*ReplayOut, *http.Response, error) { +func (a *EndpointAPIService) V1EndpointReplayMissingExecute(r ApiV1EndpointReplayMissingRequest) (*ReplayOut, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -2477,7 +2477,7 @@ func (a *EndpointAPIService) V1EndpointReplayExecute(r ApiV1EndpointReplayReques localVarReturnValue *ReplayOut ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EndpointAPIService.V1EndpointReplay") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EndpointAPIService.V1EndpointReplayMissing") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -2874,7 +2874,7 @@ func (r ApiV1EndpointSendExampleRequest) Execute() (*MessageOut, *http.Response, /* V1EndpointSendExample Send Event Type Example Message -Send an example message for an event +Send an example message for an event. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param appId The app's ID or UID @@ -3077,7 +3077,7 @@ func (r ApiV1EndpointTransformationGetRequest) Execute() (*EndpointTransformatio /* V1EndpointTransformationGet Get Endpoint Transformation -Get the transformation code associated with this endpoint +Get the transformation code associated with this endpoint. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param appId The app's ID or UID @@ -3278,7 +3278,7 @@ func (r ApiV1EndpointTransformationPartialUpdateRequest) Execute() (*http.Respon /* V1EndpointTransformationPartialUpdate Set Endpoint Transformation -Set or unset the transformation code associated with this endpoint +Set or unset the transformation code associated with this endpoint. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param appId The app's ID or UID @@ -3480,7 +3480,7 @@ func (r ApiV1EndpointTransformationSimulateRequest) Execute() (*EndpointTransfor /* V1EndpointTransformationSimulate Simulate -Simulate running the transformation on the payload and code +Simulate running the transformation on the payload and code. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param appId The app's ID or UID @@ -3895,7 +3895,7 @@ func (r ApiV1EndpointUpdateHeadersRequest) Execute() (*http.Response, error) { /* V1EndpointUpdateHeaders Update Endpoint Headers -Set the additional headers to be sent with the webhook +Set the additional headers to be sent with the webhook. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param appId The app's ID or UID @@ -4090,7 +4090,7 @@ func (r ApiV1EndpointUpdateMtlsConfigRequest) Execute() (*http.Response, error) /* V1EndpointUpdateMtlsConfig Update Endpoint Mtls Config -Create/update endpoint mTLS configuration +Create/update endpoint mTLS configuration. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param appId The app's ID or UID @@ -4285,7 +4285,7 @@ func (r ApiV1EndpointUpdateOauthConfigRequest) Execute() (*http.Response, error) /* V1EndpointUpdateOauthConfig Update Endpoint Oauth Config -Create/update endpoint OAuth configuration +Create/update endpoint OAuth configuration. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param appId The app's ID or UID diff --git a/go/internal/openapi/api_environment.go b/go/internal/openapi/api_environment.go index 591918b0a..fe1292306 100644 --- a/go/internal/openapi/api_environment.go +++ b/go/internal/openapi/api_environment.go @@ -41,7 +41,7 @@ func (r ApiV1EnvironmentExportRequest) Execute() (*EnvironmentOut, *http.Respons /* V1EnvironmentExport Export Environment Configuration -Download a JSON file containing all org-settings and event types +Download a JSON file containing all org-settings and event types. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiV1EnvironmentExportRequest diff --git a/go/internal/openapi/api_environment_settings.go b/go/internal/openapi/api_environment_settings.go index c67dadd6d..e70270c50 100644 --- a/go/internal/openapi/api_environment_settings.go +++ b/go/internal/openapi/api_environment_settings.go @@ -34,7 +34,7 @@ func (r ApiV1EnvironmentGetSettingsRequest) Execute() (*EnvironmentSettingsOut, /* V1EnvironmentGetSettings Get Org Settings -Get the environment's settings +Get the environment's settings. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiV1EnvironmentGetSettingsRequest diff --git a/go/internal/openapi/api_event_type.go b/go/internal/openapi/api_event_type.go index c77569095..650f921e8 100644 --- a/go/internal/openapi/api_event_type.go +++ b/go/internal/openapi/api_event_type.go @@ -432,7 +432,7 @@ func (r ApiV1EventTypeExportOpenapiRequest) Execute() (*ExportEventTypeOut, *htt V1EventTypeExportOpenapi Event Type Export From Openapi Exports event type definitions based on the OpenAPI schemas associated -with each existing event type +with each existing event type. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiV1EventTypeExportOpenapiRequest @@ -623,7 +623,7 @@ func (r ApiV1EventTypeGenerateExampleRequest) Execute() (*EventTypeExampleOut, * /* V1EventTypeGenerateExample Generate Schema Example -Generates a fake example from the given JSONSchema +Generates a fake example from the given JSONSchema. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiV1EventTypeGenerateExampleRequest @@ -989,7 +989,7 @@ func (r ApiV1EventTypeGetRetryScheduleRequest) Execute() (*RetryScheduleInOut, * /* V1EventTypeGetRetrySchedule Get Retry Schedule -Gets the retry schedule for messages using the given event type +Gets the retry schedule for messages using the given event type. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param eventTypeName The event type's name @@ -1387,13 +1387,13 @@ func (r ApiV1EventTypeListRequest) Order(order Ordering) ApiV1EventTypeListReque return r } -// When `true` archived (deleted but not expunged) items are included in the response +// When `true` archived (deleted but not expunged) items are included in the response. func (r ApiV1EventTypeListRequest) IncludeArchived(includeArchived bool) ApiV1EventTypeListRequest { r.includeArchived = &includeArchived return r } -// When `true` the full item (including the schema) is included in the response +// When `true` the full item (including the schema) is included in the response. func (r ApiV1EventTypeListRequest) WithContent(withContent bool) ApiV1EventTypeListRequest { r.withContent = &withContent return r @@ -1995,7 +1995,7 @@ func (r ApiV1EventTypeUpdateRetryScheduleRequest) Execute() (*RetryScheduleInOut /* V1EventTypeUpdateRetrySchedule Update Retry Schedule -Sets a retry schedule for all messages using the given event type +Sets a retry schedule for all messages using the given event type. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param eventTypeName The event type's name diff --git a/go/internal/openapi/api_events.go b/go/internal/openapi/api_events.go index 3ee5691be..c2ef7fd2c 100644 --- a/go/internal/openapi/api_events.go +++ b/go/internal/openapi/api_events.go @@ -52,7 +52,7 @@ func (r ApiV1EventsRequest) EventTypes(eventTypes []string) ApiV1EventsRequest { return r } -// Filter response based on the event type +// Filter response based on the event type. func (r ApiV1EventsRequest) Channels(channels []string) ApiV1EventsRequest { r.channels = &channels return r @@ -70,7 +70,7 @@ func (r ApiV1EventsRequest) Execute() (*MessageEventsOut, *http.Response, error) /* V1Events Events -Reads the stream of operational webhook events for this environment +Reads the stream of operational webhook events for this environment. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiV1EventsRequest diff --git a/go/internal/openapi/api_inbound.go b/go/internal/openapi/api_inbound.go index 658617d09..e13e12e72 100644 --- a/go/internal/openapi/api_inbound.go +++ b/go/internal/openapi/api_inbound.go @@ -264,7 +264,7 @@ func (r ApiV1InboundRotateUrlRequest) Execute() (*RotatedUrlOut, *http.Response, V1InboundRotateUrl Rotate Url Invalidates the previous inbound url (if one exists), producing a new inbound -URL for this app +URL for this app. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param appId The app's ID or UID diff --git a/go/internal/openapi/api_message.go b/go/internal/openapi/api_message.go index ba1e30c7b..392c6e24e 100644 --- a/go/internal/openapi/api_message.go +++ b/go/internal/openapi/api_message.go @@ -52,8 +52,9 @@ func (r ApiCreateMessageAttemptForEndpointRequest) Execute() (*MessageAttemptOut /* CreateMessageAttemptForEndpoint Create Message Attempt For Endpoint -Creates and sends a message to the specified endpoint. The message attempt and response from the endpoint is returned. -FIXME: use MessageIn for expediency, even though the `application` parameter is unused. Since this endpoint isn't publicly documented anyway, it should be fine +Creates and sends a message to the specified endpoint. + +The message attempt and response from the endpoint is returned. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param appId The app's ID or UID @@ -293,8 +294,8 @@ V1EventsPublic Public Events Reads the stream of created messages for an application, filtered on the Sink's event types and Channels. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param appId The app's ID - @param sinkId The ep's ID + @param appId The app's ID or UID + @param sinkId The ep's ID or UID @return ApiV1EventsPublicRequest */ func (a *MessageAPIService) V1EventsPublic(ctx context.Context, appId string, sinkId string) ApiV1EventsPublicRequest { @@ -321,13 +322,25 @@ func (a *MessageAPIService) V1EventsPublicExecute(r ApiV1EventsPublicRequest) (* return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/app/{app_id}/events/{sink_id}" + localVarPath := localBasePath + "/api/v1/app/{app_id}/poller/{sink_id}" localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterValueToString(r.appId, "appId")), -1) localVarPath = strings.Replace(localVarPath, "{"+"sink_id"+"}", url.PathEscape(parameterValueToString(r.sinkId, "sinkId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} + if strlen(r.appId) < 1 { + return localVarReturnValue, nil, reportError("appId must have at least 1 elements") + } + if strlen(r.appId) > 256 { + return localVarReturnValue, nil, reportError("appId must have less than 256 elements") + } + if strlen(r.sinkId) < 1 { + return localVarReturnValue, nil, reportError("sinkId must have at least 1 elements") + } + if strlen(r.sinkId) > 256 { + return localVarReturnValue, nil, reportError("sinkId must have less than 256 elements") + } if r.limit != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") @@ -488,7 +501,7 @@ func (r ApiV1MessageCreateRequest) MessageIn(messageIn MessageIn) ApiV1MessageCr return r } -// When `true` message payloads are included in the response +// When `true`, message payloads are included in the response. func (r ApiV1MessageCreateRequest) WithContent(withContent bool) ApiV1MessageCreateRequest { r.withContent = &withContent return r @@ -741,7 +754,7 @@ func (r ApiV1MessageEventsRequest) EventTypes(eventTypes []string) ApiV1MessageE return r } -// Filter response based on the event type +// Filter response based on the event type. func (r ApiV1MessageEventsRequest) Channels(channels []string) ApiV1MessageEventsRequest { r.channels = &channels return r @@ -759,7 +772,7 @@ func (r ApiV1MessageEventsRequest) Execute() (*MessageEventsOut, *http.Response, /* V1MessageEvents Message Events -Reads the stream of created messages for an application +Reads the stream of created messages for an application. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param appId The app's ID or UID @@ -992,7 +1005,7 @@ func (r ApiV1MessageEventsSubscriptionRequest) EventTypes(eventTypes []string) A return r } -// Filter response based on the event type +// Filter response based on the event type. func (r ApiV1MessageEventsSubscriptionRequest) Channels(channels []string) ApiV1MessageEventsSubscriptionRequest { r.channels = &channels return r @@ -1243,7 +1256,7 @@ func (r ApiV1MessageEventsSubscriptionCreateTokenRequest) Execute() (*MessageSub /* V1MessageEventsSubscriptionCreateToken Message Events Create Token -Creates an auth token that can be used with the `v1.message.events-subscription` endpoint +Creates an auth token that can be used with the `v1.message.events-subscription` endpoint. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param appId The app's ID or UID @@ -1621,7 +1634,7 @@ type ApiV1MessageGetRequest struct { withContent *bool } -// When `true` message payloads are included in the response +// When `true` message payloads are included in the response. func (r ApiV1MessageGetRequest) WithContent(withContent bool) ApiV1MessageGetRequest { r.withContent = &withContent return r @@ -2042,31 +2055,31 @@ func (r ApiV1MessageListRequest) Iterator(iterator string) ApiV1MessageListReque return r } -// Filter response based on the channel +// Filter response based on the channel. func (r ApiV1MessageListRequest) Channel(channel string) ApiV1MessageListRequest { r.channel = &channel return r } -// Only include items created before a certain date +// Only include items created before a certain date. func (r ApiV1MessageListRequest) Before(before time.Time) ApiV1MessageListRequest { r.before = &before return r } -// Only include items created after a certain date +// Only include items created after a certain date. func (r ApiV1MessageListRequest) After(after time.Time) ApiV1MessageListRequest { r.after = &after return r } -// When `true` message payloads are included in the response +// When `true` message payloads are included in the response. func (r ApiV1MessageListRequest) WithContent(withContent bool) ApiV1MessageListRequest { r.withContent = &withContent return r } -// Filter messages matching the provided tag +// Filter messages matching the provided tag. func (r ApiV1MessageListRequest) Tag(tag string) ApiV1MessageListRequest { r.tag = &tag return r diff --git a/go/internal/openapi/api_message_attempt.go b/go/internal/openapi/api_message_attempt.go index 231576d40..0a5adb8a4 100644 --- a/go/internal/openapi/api_message_attempt.go +++ b/go/internal/openapi/api_message_attempt.go @@ -2128,14 +2128,13 @@ func (r ApiV1MessageAttemptListByMsgRequest) Execute() (*ListResponseMessageAtte /* V1MessageAttemptListByMsg List Attempts By Msg -List attempts by message id +List attempts by message ID. Note that by default this endpoint is limited to retrieving 90 days' worth of data relative to now or, if an iterator is provided, 90 days before/after the time indicated by the iterator ID. If you require data beyond those time ranges, you will need to explicitly set the `before` or `after` parameter as appropriate. - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param appId The app's ID or UID @param msgId The msg's ID or UID diff --git a/go/internal/openapi/api_statistics.go b/go/internal/openapi/api_statistics.go index c266d2de4..7a0ed9cd7 100644 --- a/go/internal/openapi/api_statistics.go +++ b/go/internal/openapi/api_statistics.go @@ -409,13 +409,13 @@ type ApiV1StatsAppAttemptsRequest struct { endDate *time.Time } -// Filter the range to data starting from this date +// Filter the range to data starting from this date. func (r ApiV1StatsAppAttemptsRequest) StartDate(startDate time.Time) ApiV1StatsAppAttemptsRequest { r.startDate = &startDate return r } -// Filter the range to data ending by this date +// Filter the range to data ending by this date. func (r ApiV1StatsAppAttemptsRequest) EndDate(endDate time.Time) ApiV1StatsAppAttemptsRequest { r.endDate = &endDate return r @@ -615,13 +615,13 @@ type ApiV1StatsEndpointAttemptsRequest struct { endDate *time.Time } -// Filter the range to data starting from this date +// Filter the range to data starting from this date. func (r ApiV1StatsEndpointAttemptsRequest) StartDate(startDate time.Time) ApiV1StatsEndpointAttemptsRequest { r.startDate = &startDate return r } -// Filter the range to data ending by this date +// Filter the range to data ending by this date. func (r ApiV1StatsEndpointAttemptsRequest) EndDate(endDate time.Time) ApiV1StatsEndpointAttemptsRequest { r.endDate = &endDate return r @@ -634,7 +634,7 @@ func (r ApiV1StatsEndpointAttemptsRequest) Execute() (*AttemptStatisticsResponse /* V1StatsEndpointAttempts Get Ep Stats -Returns endpoint-level statistics on message attempts +Returns endpoint-level statistics on message attempts. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param appId The app's ID or UID diff --git a/go/internal/openapi/api_transformation_template.go b/go/internal/openapi/api_transformation_template.go index 178d6e994..dd081d555 100644 --- a/go/internal/openapi/api_transformation_template.go +++ b/go/internal/openapi/api_transformation_template.go @@ -244,7 +244,7 @@ func (r ApiV1TransformationTemplateCreateRequest) Execute() (*TemplateOut, *http /* V1TransformationTemplateCreate Create Transformation Template -Create a new transformation template +Create a new transformation template. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiV1TransformationTemplateCreateRequest @@ -428,7 +428,7 @@ func (r ApiV1TransformationTemplateDeleteRequest) Execute() (*http.Response, err /* V1TransformationTemplateDelete Delete Transformation Template -Delete a transformation template +Delete a transformation template. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param transformationTemplateId @@ -608,7 +608,7 @@ func (r ApiV1TransformationTemplateGenerateRequest) Execute() (*GenerateOut, *ht /* V1TransformationTemplateGenerate Generate -Use OpenAI's Completion API to generate code for a transformation template +Use OpenAI's Completion API to generate code for a transformation template. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiV1TransformationTemplateGenerateRequest @@ -792,7 +792,7 @@ func (r ApiV1TransformationTemplateGetRequest) Execute() (*TemplateOut, *http.Re /* V1TransformationTemplateGet Get Transformation Template -Get a transformation template +Get a transformation template. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param transformationTemplateId @@ -991,7 +991,7 @@ func (r ApiV1TransformationTemplateListRequest) Execute() (*ListResponseTemplate /* V1TransformationTemplateList List Transformation Templates -List all transformation templates for an application +List all transformation templates for an application. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiV1TransformationTemplateListRequest @@ -1188,7 +1188,7 @@ func (r ApiV1TransformationTemplateOauthDiscordRequest) Execute() (*IncomingWebh /* V1TransformationTemplateOauthDiscord Authorize Discord -Get Discord Incoming webhook URL +Get Discord Incoming webhook URL. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiV1TransformationTemplateOauthDiscordRequest @@ -1384,7 +1384,7 @@ func (r ApiV1TransformationTemplateOauthHubspotRequest) Execute() (*OAuthPayload /* V1TransformationTemplateOauthHubspot Authorize Hubspot -Get Hubspot access token using authorization code +Get Hubspot access token using authorization code. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiV1TransformationTemplateOauthHubspotRequest @@ -1580,7 +1580,7 @@ func (r ApiV1TransformationTemplateOauthSlackRequest) Execute() (*IncomingWebhoo /* V1TransformationTemplateOauthSlack Authorize Slack -Get Slack Incoming webhook URL +Get Slack Incoming webhook URL. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiV1TransformationTemplateOauthSlackRequest @@ -1770,7 +1770,7 @@ func (r ApiV1TransformationTemplatePatchRequest) Execute() (*TemplateOut, *http. /* V1TransformationTemplatePatch Patch Transformation Template -Partially update a transformation template +Partially update a transformation template. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param transformationTemplateId @@ -1966,7 +1966,7 @@ func (r ApiV1TransformationTemplateSimulateRequest) Execute() (*TransformationSi /* V1TransformationTemplateSimulate Simulate -Simulate running the transformation on the payload and code +Simulate running the transformation on the payload and code. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiV1TransformationTemplateSimulateRequest @@ -2156,7 +2156,7 @@ func (r ApiV1TransformationTemplateUpdateRequest) Execute() (*TemplateOut, *http /* V1TransformationTemplateUpdate Update Transformation Template -Update a transformation template +Update a transformation template. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param transformationTemplateId diff --git a/go/internal/openapi/model_application_in.go b/go/internal/openapi/model_application_in.go index c3ad28b2f..0ec8b68c1 100644 --- a/go/internal/openapi/model_application_in.go +++ b/go/internal/openapi/model_application_in.go @@ -24,7 +24,7 @@ type ApplicationIn struct { Metadata *map[string]string `json:"metadata,omitempty"` Name string `json:"name"` RateLimit *int32 `json:"rateLimit,omitempty"` - // Optional unique identifier for the application + // Optional unique identifier for the application. Uid *string `json:"uid,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` } diff --git a/go/internal/openapi/model_endpoint_in.go b/go/internal/openapi/model_endpoint_in.go index 8a2ae2ba8..1e66b18f0 100644 --- a/go/internal/openapi/model_endpoint_in.go +++ b/go/internal/openapi/model_endpoint_in.go @@ -21,7 +21,7 @@ var _ MappedNullable = &EndpointIn{} // EndpointIn struct for EndpointIn type EndpointIn struct { - // List of message channels this endpoint listens to (omit for all) + // List of message channels this endpoint listens to (omit for all). Channels []string `json:"channels,omitempty"` Description *string `json:"description,omitempty"` Disabled *bool `json:"disabled,omitempty"` @@ -30,7 +30,7 @@ type EndpointIn struct { RateLimit *int32 `json:"rateLimit,omitempty"` // The endpoint's verification secret. Format: `base64` encoded random bytes optionally prefixed with `whsec_`. It is recommended to not set this and let the server generate the secret. Secret *string `json:"secret,omitempty" validate:"regexp=^(whsec_)?[a-zA-Z0-9+\\/=]{32,100}$"` - // Optional unique identifier for the endpoint + // Optional unique identifier for the endpoint. Uid *string `json:"uid,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` Url string `json:"url"` // Deprecated diff --git a/go/internal/openapi/model_endpoint_oauth_config_in.go b/go/internal/openapi/model_endpoint_oauth_config_in.go index 60b27a036..37648820f 100644 --- a/go/internal/openapi/model_endpoint_oauth_config_in.go +++ b/go/internal/openapi/model_endpoint_oauth_config_in.go @@ -30,7 +30,7 @@ type EndpointOauthConfigIn struct { ExtraParams *map[string]string `json:"extraParams,omitempty"` GrantType Oauth2GrantTypeIn `json:"grantType"` JwtParams *ClientSecretJwtParamsIn `json:"jwtParams,omitempty"` - // For `refreshToken` grant type + // For `refreshToken` grant type. RefreshToken *string `json:"refreshToken,omitempty"` // Optional OAuth scopes added to the request body. Scopes []string `json:"scopes,omitempty"` diff --git a/go/internal/openapi/model_endpoint_out.go b/go/internal/openapi/model_endpoint_out.go index efa6cdd1e..453d7cc76 100644 --- a/go/internal/openapi/model_endpoint_out.go +++ b/go/internal/openapi/model_endpoint_out.go @@ -22,10 +22,10 @@ var _ MappedNullable = &EndpointOut{} // EndpointOut struct for EndpointOut type EndpointOut struct { - // List of message channels this endpoint listens to (omit for all) + // List of message channels this endpoint listens to (omit for all). Channels []string `json:"channels,omitempty"` CreatedAt time.Time `json:"createdAt"` - // An example endpoint name + // An example endpoint name. Description string `json:"description"` Disabled *bool `json:"disabled,omitempty"` FilterTypes []string `json:"filterTypes,omitempty"` @@ -33,7 +33,7 @@ type EndpointOut struct { Id string `json:"id"` Metadata map[string]string `json:"metadata"` RateLimit *int32 `json:"rateLimit,omitempty"` - // Optional unique identifier for the endpoint + // Optional unique identifier for the endpoint. Uid *string `json:"uid,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` UpdatedAt time.Time `json:"updatedAt"` Url string `json:"url"` diff --git a/go/internal/openapi/model_endpoint_update.go b/go/internal/openapi/model_endpoint_update.go index 726bff501..17624ea4e 100644 --- a/go/internal/openapi/model_endpoint_update.go +++ b/go/internal/openapi/model_endpoint_update.go @@ -21,14 +21,14 @@ var _ MappedNullable = &EndpointUpdate{} // EndpointUpdate struct for EndpointUpdate type EndpointUpdate struct { - // List of message channels this endpoint listens to (omit for all) + // List of message channels this endpoint listens to (omit for all). Channels []string `json:"channels,omitempty"` Description *string `json:"description,omitempty"` Disabled *bool `json:"disabled,omitempty"` FilterTypes []string `json:"filterTypes,omitempty"` Metadata *map[string]string `json:"metadata,omitempty"` RateLimit *int32 `json:"rateLimit,omitempty"` - // Optional unique identifier for the endpoint + // Optional unique identifier for the endpoint. Uid *string `json:"uid,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` Url string `json:"url"` // Deprecated diff --git a/go/internal/openapi/model_message_broadcast_in.go b/go/internal/openapi/model_message_broadcast_in.go index 67610bddc..e55298f3f 100644 --- a/go/internal/openapi/model_message_broadcast_in.go +++ b/go/internal/openapi/model_message_broadcast_in.go @@ -21,9 +21,9 @@ var _ MappedNullable = &MessageBroadcastIn{} // MessageBroadcastIn struct for MessageBroadcastIn type MessageBroadcastIn struct { - // List of free-form identifiers that endpoints can filter by + // List of free-form identifiers that endpoints can filter by. Channels []string `json:"channels,omitempty"` - // Optional unique identifier for the message + // Optional unique identifier for the message. EventId *string `json:"eventId,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` // The event type's name EventType string `json:"eventType" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` diff --git a/go/internal/openapi/model_message_endpoint_out.go b/go/internal/openapi/model_message_endpoint_out.go index b8a4d736e..382da4eaf 100644 --- a/go/internal/openapi/model_message_endpoint_out.go +++ b/go/internal/openapi/model_message_endpoint_out.go @@ -22,10 +22,10 @@ var _ MappedNullable = &MessageEndpointOut{} // MessageEndpointOut struct for MessageEndpointOut type MessageEndpointOut struct { - // List of message channels this endpoint listens to (omit for all) + // List of message channels this endpoint listens to (omit for all). Channels []string `json:"channels,omitempty"` CreatedAt time.Time `json:"createdAt"` - // An example endpoint name + // An example endpoint name. Description string `json:"description"` Disabled *bool `json:"disabled,omitempty"` FilterTypes []string `json:"filterTypes,omitempty"` @@ -34,7 +34,7 @@ type MessageEndpointOut struct { NextAttempt *time.Time `json:"nextAttempt,omitempty"` RateLimit *int32 `json:"rateLimit,omitempty"` Status MessageStatus `json:"status"` - // Optional unique identifier for the endpoint + // Optional unique identifier for the endpoint. Uid *string `json:"uid,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` UpdatedAt time.Time `json:"updatedAt"` Url string `json:"url"` diff --git a/go/internal/openapi/model_operational_webhook_endpoint_in.go b/go/internal/openapi/model_operational_webhook_endpoint_in.go index 863109c05..cd620df56 100644 --- a/go/internal/openapi/model_operational_webhook_endpoint_in.go +++ b/go/internal/openapi/model_operational_webhook_endpoint_in.go @@ -28,7 +28,7 @@ type OperationalWebhookEndpointIn struct { RateLimit *int32 `json:"rateLimit,omitempty"` // The endpoint's verification secret. Format: `base64` encoded random bytes optionally prefixed with `whsec_`. It is recommended to not set this and let the server generate the secret. Secret *string `json:"secret,omitempty" validate:"regexp=^(whsec_)?[a-zA-Z0-9+\\/=]{32,100}$"` - // Optional unique identifier for the endpoint + // Optional unique identifier for the endpoint. Uid *string `json:"uid,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` Url string `json:"url"` } diff --git a/go/internal/openapi/model_operational_webhook_endpoint_out.go b/go/internal/openapi/model_operational_webhook_endpoint_out.go index 5871a8ef3..d300e11c9 100644 --- a/go/internal/openapi/model_operational_webhook_endpoint_out.go +++ b/go/internal/openapi/model_operational_webhook_endpoint_out.go @@ -23,7 +23,7 @@ var _ MappedNullable = &OperationalWebhookEndpointOut{} // OperationalWebhookEndpointOut struct for OperationalWebhookEndpointOut type OperationalWebhookEndpointOut struct { CreatedAt time.Time `json:"createdAt"` - // An example endpoint name + // An example endpoint name. Description string `json:"description"` Disabled *bool `json:"disabled,omitempty"` FilterTypes []string `json:"filterTypes,omitempty"` @@ -31,7 +31,7 @@ type OperationalWebhookEndpointOut struct { Id string `json:"id"` Metadata map[string]string `json:"metadata"` RateLimit *int32 `json:"rateLimit,omitempty"` - // Optional unique identifier for the endpoint + // Optional unique identifier for the endpoint. Uid *string `json:"uid,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` UpdatedAt time.Time `json:"updatedAt"` Url string `json:"url"` diff --git a/go/internal/openapi/model_operational_webhook_endpoint_update.go b/go/internal/openapi/model_operational_webhook_endpoint_update.go index f9a4774d6..55941099e 100644 --- a/go/internal/openapi/model_operational_webhook_endpoint_update.go +++ b/go/internal/openapi/model_operational_webhook_endpoint_update.go @@ -26,7 +26,7 @@ type OperationalWebhookEndpointUpdate struct { FilterTypes []string `json:"filterTypes,omitempty"` Metadata *map[string]string `json:"metadata,omitempty"` RateLimit *int32 `json:"rateLimit,omitempty"` - // Optional unique identifier for the endpoint + // Optional unique identifier for the endpoint. Uid *string `json:"uid,omitempty" validate:"regexp=^[a-zA-Z0-9\\\\-_.]+$"` Url string `json:"url"` } diff --git a/go/internal/openapi/model_rotate_poller_token_in.go b/go/internal/openapi/model_rotate_poller_token_in.go new file mode 100644 index 000000000..ceae5aafa --- /dev/null +++ b/go/internal/openapi/model_rotate_poller_token_in.go @@ -0,0 +1,168 @@ +/* +Svix API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 1.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the RotatePollerTokenIn type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RotatePollerTokenIn{} + +// RotatePollerTokenIn struct for RotatePollerTokenIn +type RotatePollerTokenIn struct { + // How long the token will be valid for, in seconds. Can be up to 31,536,000 seconds (1 year). + Expiry *int64 `json:"expiry,omitempty"` + // Updates the previous token's expiration, in seconds. If set to 0, the old token will immediately be revoked. Must be between 0 and 86,400 seconds (1 day). Defaults to 300 seconds (5 minutes). + OldTokenExpiry *int64 `json:"oldTokenExpiry,omitempty"` +} + +// NewRotatePollerTokenIn instantiates a new RotatePollerTokenIn object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRotatePollerTokenIn() *RotatePollerTokenIn { + this := RotatePollerTokenIn{} + var oldTokenExpiry int64 = 300 + this.OldTokenExpiry = &oldTokenExpiry + return &this +} + +// NewRotatePollerTokenInWithDefaults instantiates a new RotatePollerTokenIn object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRotatePollerTokenInWithDefaults() *RotatePollerTokenIn { + this := RotatePollerTokenIn{} + var oldTokenExpiry int64 = 300 + this.OldTokenExpiry = &oldTokenExpiry + return &this +} + +// GetExpiry returns the Expiry field value if set, zero value otherwise. +func (o *RotatePollerTokenIn) GetExpiry() int64 { + if o == nil || IsNil(o.Expiry) { + var ret int64 + return ret + } + return *o.Expiry +} + +// GetExpiryOk returns a tuple with the Expiry field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RotatePollerTokenIn) GetExpiryOk() (*int64, bool) { + if o == nil || IsNil(o.Expiry) { + return nil, false + } + return o.Expiry, true +} + +// HasExpiry returns a boolean if a field has been set. +func (o *RotatePollerTokenIn) HasExpiry() bool { + if o != nil && !IsNil(o.Expiry) { + return true + } + + return false +} + +// SetExpiry gets a reference to the given int64 and assigns it to the Expiry field. +func (o *RotatePollerTokenIn) SetExpiry(v int64) { + o.Expiry = &v +} + +// GetOldTokenExpiry returns the OldTokenExpiry field value if set, zero value otherwise. +func (o *RotatePollerTokenIn) GetOldTokenExpiry() int64 { + if o == nil || IsNil(o.OldTokenExpiry) { + var ret int64 + return ret + } + return *o.OldTokenExpiry +} + +// GetOldTokenExpiryOk returns a tuple with the OldTokenExpiry field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RotatePollerTokenIn) GetOldTokenExpiryOk() (*int64, bool) { + if o == nil || IsNil(o.OldTokenExpiry) { + return nil, false + } + return o.OldTokenExpiry, true +} + +// HasOldTokenExpiry returns a boolean if a field has been set. +func (o *RotatePollerTokenIn) HasOldTokenExpiry() bool { + if o != nil && !IsNil(o.OldTokenExpiry) { + return true + } + + return false +} + +// SetOldTokenExpiry gets a reference to the given int64 and assigns it to the OldTokenExpiry field. +func (o *RotatePollerTokenIn) SetOldTokenExpiry(v int64) { + o.OldTokenExpiry = &v +} + +func (o RotatePollerTokenIn) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RotatePollerTokenIn) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Expiry) { + toSerialize["expiry"] = o.Expiry + } + if !IsNil(o.OldTokenExpiry) { + toSerialize["oldTokenExpiry"] = o.OldTokenExpiry + } + return toSerialize, nil +} + +type NullableRotatePollerTokenIn struct { + value *RotatePollerTokenIn + isSet bool +} + +func (v NullableRotatePollerTokenIn) Get() *RotatePollerTokenIn { + return v.value +} + +func (v *NullableRotatePollerTokenIn) Set(val *RotatePollerTokenIn) { + v.value = val + v.isSet = true +} + +func (v NullableRotatePollerTokenIn) IsSet() bool { + return v.isSet +} + +func (v *NullableRotatePollerTokenIn) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRotatePollerTokenIn(val *RotatePollerTokenIn) *NullableRotatePollerTokenIn { + return &NullableRotatePollerTokenIn{value: val, isSet: true} +} + +func (v NullableRotatePollerTokenIn) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRotatePollerTokenIn) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/internal/openapi/model_statistics_period.go b/go/internal/openapi/model_statistics_period.go index 2a9404b81..c67f17157 100644 --- a/go/internal/openapi/model_statistics_period.go +++ b/go/internal/openapi/model_statistics_period.go @@ -15,7 +15,7 @@ import ( "fmt" ) -// StatisticsPeriod Period length for a statistics data point +// StatisticsPeriod Period length for a statistics data point. type StatisticsPeriod string // List of StatisticsPeriod diff --git a/go/internal/openapi/model_transformation_http_method.go b/go/internal/openapi/model_transformation_http_method.go index 89bc0c128..4e8e94172 100644 --- a/go/internal/openapi/model_transformation_http_method.go +++ b/go/internal/openapi/model_transformation_http_method.go @@ -22,12 +22,14 @@ type TransformationHttpMethod string const ( TRANSFORMATIONHTTPMETHOD_POST TransformationHttpMethod = "POST" TRANSFORMATIONHTTPMETHOD_PUT TransformationHttpMethod = "PUT" + TRANSFORMATIONHTTPMETHOD_PATCH TransformationHttpMethod = "PATCH" ) // All allowed values of TransformationHttpMethod enum var AllowedTransformationHttpMethodEnumValues = []TransformationHttpMethod{ "POST", "PUT", + "PATCH", } func (v *TransformationHttpMethod) UnmarshalJSON(src []byte) error { diff --git a/java/lib/src/main/java/com/svix/Endpoint.java b/java/lib/src/main/java/com/svix/Endpoint.java index cd8a3c646..34dfedd97 100644 --- a/java/lib/src/main/java/com/svix/Endpoint.java +++ b/java/lib/src/main/java/com/svix/Endpoint.java @@ -164,7 +164,7 @@ public void replayMissing(final String appId, final String endpointId, final Rep public void replayMissing(final String appId, final String endpointId, final ReplayIn replayIn, final PostOptions options) throws ApiException { try { - api.v1EndpointReplay(appId, endpointId, replayIn, options.getIdempotencyKey()); + api.v1EndpointReplayMissing(appId, endpointId, replayIn, options.getIdempotencyKey()); } catch (com.svix.internal.ApiException e) { throw Utils.wrapInternalApiException(e); } diff --git a/javascript/src/api/endpoint.ts b/javascript/src/api/endpoint.ts index 422938094..fff07700a 100644 --- a/javascript/src/api/endpoint.ts +++ b/javascript/src/api/endpoint.ts @@ -143,7 +143,7 @@ export class Endpoint { options?: PostOptions ): Promise { return this.api - .v1EndpointReplay({ + .v1EndpointReplayMissing({ appId, endpointId, replayIn, diff --git a/kotlin/lib/src/main/kotlin/Endpoint.kt b/kotlin/lib/src/main/kotlin/Endpoint.kt index 900318dff..e60a9fa9c 100644 --- a/kotlin/lib/src/main/kotlin/Endpoint.kt +++ b/kotlin/lib/src/main/kotlin/Endpoint.kt @@ -182,7 +182,7 @@ class Endpoint internal constructor(token: String, options: SvixOptions) { options: PostOptions = PostOptions(), ) { try { - api.v1EndpointReplay(appId, endpointId, replayIn, options.idempotencyKey) + api.v1EndpointReplayMissing(appId, endpointId, replayIn, options.idempotencyKey) } catch (e: Exception) { throw ApiException.wrap(e) } diff --git a/openapi.json b/openapi.json index 3b9a687b8..00ea46891 100644 --- a/openapi.json +++ b/openapi.json @@ -161,7 +161,7 @@ "type": "integer" }, "uid": { - "description": "Optional unique identifier for the application", + "description": "Optional unique identifier for the application.", "example": "unique-app-identifier", "maxLength": 256, "minLength": 1, @@ -987,7 +987,7 @@ "EndpointIn": { "properties": { "channels": { - "description": "List of message channels this endpoint listens to (omit for all)", + "description": "List of message channels this endpoint listens to (omit for all).", "example": [ "project_123", "group_2" @@ -1052,7 +1052,7 @@ "type": "string" }, "uid": { - "description": "Optional unique identifier for the endpoint", + "description": "Optional unique identifier for the endpoint.", "example": "unique-ep-identifier", "maxLength": 256, "minLength": 1, @@ -1214,7 +1214,7 @@ "nullable": true }, "refreshToken": { - "description": "For `refreshToken` grant type", + "description": "For `refreshToken` grant type.", "nullable": true, "type": "string" }, @@ -1243,7 +1243,7 @@ "EndpointOut": { "properties": { "channels": { - "description": "List of message channels this endpoint listens to (omit for all)", + "description": "List of message channels this endpoint listens to (omit for all).", "example": [ "project_123", "group_2" @@ -1265,7 +1265,7 @@ "type": "string" }, "description": { - "description": "An example endpoint name", + "description": "An example endpoint name.", "type": "string" }, "disabled": { @@ -1308,7 +1308,7 @@ "type": "integer" }, "uid": { - "description": "Optional unique identifier for the endpoint", + "description": "Optional unique identifier for the endpoint.", "example": "unique-ep-identifier", "maxLength": 256, "minLength": 1, @@ -1563,7 +1563,7 @@ "EndpointUpdate": { "properties": { "channels": { - "description": "List of message channels this endpoint listens to (omit for all)", + "description": "List of message channels this endpoint listens to (omit for all).", "example": [ "project_123", "group_2" @@ -1621,7 +1621,7 @@ "type": "integer" }, "uid": { - "description": "Optional unique identifier for the endpoint", + "description": "Optional unique identifier for the endpoint.", "example": "unique-ep-identifier", "maxLength": 256, "minLength": 1, @@ -3592,7 +3592,7 @@ "MessageBroadcastIn": { "properties": { "channels": { - "description": "List of free-form identifiers that endpoints can filter by", + "description": "List of free-form identifiers that endpoints can filter by.", "example": [ "project_123", "group_2" @@ -3610,7 +3610,7 @@ "uniqueItems": true }, "eventId": { - "description": "Optional unique identifier for the message", + "description": "Optional unique identifier for the message.", "example": "unique-msg-identifier", "maxLength": 256, "minLength": 1, @@ -3681,7 +3681,7 @@ "MessageEndpointOut": { "properties": { "channels": { - "description": "List of message channels this endpoint listens to (omit for all)", + "description": "List of message channels this endpoint listens to (omit for all).", "example": [ "project_123", "group_2" @@ -3703,7 +3703,7 @@ "type": "string" }, "description": { - "description": "An example endpoint name", + "description": "An example endpoint name.", "type": "string" }, "disabled": { @@ -3748,7 +3748,7 @@ "$ref": "#/components/schemas/MessageStatus" }, "uid": { - "description": "Optional unique identifier for the endpoint", + "description": "Optional unique identifier for the endpoint.", "example": "unique-ep-identifier", "maxLength": 256, "minLength": 1, @@ -3890,7 +3890,6 @@ "type": "string" }, "maxItems": 5, - "minItems": 1, "nullable": true, "type": "array", "uniqueItems": true @@ -4149,7 +4148,7 @@ "type": "string" }, "uid": { - "description": "Optional unique identifier for the endpoint", + "description": "Optional unique identifier for the endpoint.", "example": "unique-ep-identifier", "maxLength": 256, "minLength": 1, @@ -4177,7 +4176,7 @@ "type": "string" }, "description": { - "description": "An example endpoint name", + "description": "An example endpoint name.", "type": "string" }, "disabled": { @@ -4219,7 +4218,7 @@ "type": "integer" }, "uid": { - "description": "Optional unique identifier for the endpoint", + "description": "Optional unique identifier for the endpoint.", "example": "unique-ep-identifier", "maxLength": 256, "minLength": 1, @@ -4318,7 +4317,7 @@ "type": "integer" }, "uid": { - "description": "Optional unique identifier for the endpoint", + "description": "Optional unique identifier for the endpoint.", "example": "unique-ep-identifier", "maxLength": 256, "minLength": 1, @@ -4475,6 +4474,27 @@ }, "type": "object" }, + "RotatePollerTokenIn": { + "properties": { + "expiry": { + "description": "How long the token will be valid for, in seconds. Can be up to 31,536,000 seconds (1 year).", + "format": "int64", + "maximum": 31536000, + "minimum": 1, + "nullable": true, + "type": "integer" + }, + "oldTokenExpiry": { + "default": 300, + "description": "Updates the previous token's expiration, in seconds. If set to 0, the old token will immediately be revoked. Must be between 0 and 86,400 seconds (1 day).\n\nDefaults to 300 seconds (5 minutes).", + "format": "int64", + "maximum": 86400, + "minimum": 0, + "type": "integer" + } + }, + "type": "object" + }, "RotatedUrlOut": { "properties": { "url": { @@ -4660,7 +4680,7 @@ ], "properties": { "channels": { - "description": "List of message channels this sink listens to (omit for all)", + "description": "List of message channels this sink listens to (omit for all).", "example": [ "project_123", "group_2" @@ -4725,7 +4745,7 @@ "type": "string" }, "uid": { - "description": "Optional unique identifier for the sink", + "description": "Optional unique identifier for the sink.", "example": "unique-ep-identifier", "maxLength": 256, "minLength": 1, @@ -4875,7 +4895,7 @@ ], "properties": { "channels": { - "description": "List of message channels this endpoint listens to (omit for all)", + "description": "List of message channels this endpoint listens to (omit for all).", "example": [ "project_123", "group_2" @@ -4897,7 +4917,7 @@ "type": "string" }, "description": { - "description": "An example endpoint name", + "description": "An example endpoint name.", "type": "string" }, "disabled": { @@ -4940,7 +4960,7 @@ "type": "integer" }, "uid": { - "description": "Optional unique identifier for the endpoint", + "description": "Optional unique identifier for the endpoint.", "example": "unique-ep-identifier", "maxLength": 256, "minLength": 1, @@ -5046,7 +5066,7 @@ "type": "object" }, "StatisticsPeriod": { - "description": "Period length for a statistics data point", + "description": "Period length for a statistics data point.", "enum": [ "OneDay", "FiveMinutes" @@ -5150,7 +5170,7 @@ }, "uid": { "$ref": "#/components/schemas/StreamUid", - "description": "Optional unique identifier for the stream", + "description": "Optional unique identifier for the stream.", "nullable": true } }, @@ -5195,7 +5215,7 @@ }, "uid": { "$ref": "#/components/schemas/StreamUid", - "description": "Optional unique identifier for the stream", + "description": "Optional unique identifier for the stream.", "nullable": true } }, @@ -6064,7 +6084,8 @@ "TransformationHttpMethod": { "enum": [ "POST", - "PUT" + "PUT", + "PATCH" ], "type": "string" }, @@ -6592,36 +6613,36 @@ "operationId": "get_app_usage_stats_api_v1_app_stats_usage__get", "parameters": [ { - "description": "Filter the range to data after this date", + "description": "Filter the range to data after this date.", "in": "query", "name": "since", "required": true, "schema": { - "description": "Filter the range to data after this date", + "description": "Filter the range to data after this date.", "format": "date-time", "type": "string" }, "style": "form" }, { - "description": "Filter the range to data before this date", + "description": "Filter the range to data before this date.", "in": "query", "name": "until", "required": true, "schema": { - "description": "Filter the range to data before this date", + "description": "Filter the range to data before this date.", "format": "date-time", "type": "string" }, "style": "form" }, { - "description": "Limit the number of returned items", + "description": "Limit the number of returned items.", "in": "query", "name": "limit", "schema": { "default": 50, - "description": "Limit the number of returned items", + "description": "Limit the number of returned items.", "format": "int", "maximum": 250, "nullable": true, @@ -6630,11 +6651,11 @@ "style": "form" }, { - "description": "The iterator to use (depends on the chosen ordering)", + "description": "The iterator to use (depends on the chosen ordering).", "in": "query", "name": "iterator", "schema": { - "description": "The iterator to use (depends on the chosen ordering)", + "description": "The iterator to use (depends on the chosen ordering).", "example": "app_1srOrx2ZWZBpBUvZwXKQmoEYga2", "nullable": true, "type": "string" @@ -8084,7 +8105,7 @@ }, "/api/v1/app/{app_id}/attempt/msg/{msg_id}": { "get": { - "description": "List attempts by message id\n\nNote that by default this endpoint is limited to retrieving 90 days' worth of data\nrelative to now or, if an iterator is provided, 90 days before/after the time indicated\nby the iterator ID. If you require data beyond those time ranges, you will need to explicitly\nset the `before` or `after` parameter as appropriate.\n", + "description": "List attempts by message ID.\n\nNote that by default this endpoint is limited to retrieving 90 days' worth of data\nrelative to now or, if an iterator is provided, 90 days before/after the time indicated\nby the iterator ID. If you require data beyond those time ranges, you will need to explicitly\nset the `before` or `after` parameter as appropriate.", "operationId": "v1.message-attempt.list-by-msg", "parameters": [ { @@ -8631,7 +8652,7 @@ ] }, "post": { - "description": "Create a new endpoint for the application.\n\nWhen `secret` is `null` the secret is automatically generated (recommended)", + "description": "Create a new endpoint for the application.\n\nWhen `secret` is `null` the secret is automatically generated (recommended).", "operationId": "v1.endpoint.create", "parameters": [ { @@ -9607,7 +9628,7 @@ }, "/api/v1/app/{app_id}/endpoint/{endpoint_id}/headers": { "get": { - "description": "Get the additional headers to be sent with the webhook", + "description": "Get the additional headers to be sent with the webhook.", "operationId": "v1.endpoint.get-headers", "parameters": [ { @@ -9796,7 +9817,7 @@ ] }, "patch": { - "description": "Partially set the additional headers to be sent with the webhook", + "description": "Partially set the additional headers to be sent with the webhook.", "operationId": "v1.endpoint.patch-headers", "parameters": [ { @@ -9988,7 +10009,7 @@ ] }, "put": { - "description": "Set the additional headers to be sent with the webhook", + "description": "Set the additional headers to be sent with the webhook.", "operationId": "v1.endpoint.update-headers", "parameters": [ { @@ -10492,7 +10513,7 @@ }, "/api/v1/app/{app_id}/endpoint/{endpoint_id}/msg/test-attempt": { "post": { - "description": "Creates and sends a message to the specified endpoint. The message attempt and response from the endpoint is returned.\nFIXME: use MessageIn for expediency, even though the `application` parameter is unused. Since this endpoint isn't publicly documented anyway, it should be fine", + "description": "Creates and sends a message to the specified endpoint.\n\nThe message attempt and response from the endpoint is returned.", "operationId": "create_message_attempt_for_endpoint", "parameters": [ { @@ -10647,7 +10668,7 @@ }, "/api/v1/app/{app_id}/endpoint/{endpoint_id}/mtls": { "delete": { - "description": "Delete endpoint mTLS configuration", + "description": "Delete endpoint mTLS configuration.", "operationId": "v1.endpoint.delete-mtls-config", "parameters": [ { @@ -10829,7 +10850,7 @@ ] }, "put": { - "description": "Create/update endpoint mTLS configuration", + "description": "Create/update endpoint mTLS configuration.", "operationId": "v1.endpoint.update-mtls-config", "parameters": [ { @@ -11023,7 +11044,7 @@ }, "/api/v1/app/{app_id}/endpoint/{endpoint_id}/oauth": { "delete": { - "description": "Delete endpoint OAuth configuration", + "description": "Delete endpoint OAuth configuration.", "operationId": "v1.endpoint.delete-oauth-config", "parameters": [ { @@ -11205,7 +11226,7 @@ ] }, "put": { - "description": "Create/update endpoint OAuth configuration", + "description": "Create/update endpoint OAuth configuration.", "operationId": "v1.endpoint.update-oauth-config", "parameters": [ { @@ -11610,7 +11631,7 @@ "/api/v1/app/{app_id}/endpoint/{endpoint_id}/replay-missing": { "post": { "description": "Replays messages to the endpoint.\n\nOnly messages that were created after `since` will be sent.\nMessages that were previously sent to the endpoint are not resent.", - "operationId": "v1.endpoint.replay", + "operationId": "v1.endpoint.replay-missing", "parameters": [ { "description": "The app's ID or UID", @@ -11757,57 +11778,57 @@ { "label": "JavaScript", "lang": "JavaScript", - "source": "const replayOut = await svix.endpoint.replay(\"app_id\", \"endpoint_id\", {\n until: null\n});" + "source": "const replayOut = await svix.endpoint.replayMissing(\"app_id\", \"endpoint_id\", {\n until: null\n});" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const replayOut = await svix.endpoint.replay(\"app_id\", \"endpoint_id\", {\n until: null\n});" + "source": "const replayOut = await svix.endpoint.replayMissing(\"app_id\", \"endpoint_id\", {\n until: null\n});" }, { "label": "Python", "lang": "Python", - "source": "replay_out = svix.endpoint.replay(\"app_id\", \"endpoint_id\", ReplayIn(\n until=None\n), options=...)" + "source": "replay_out = svix.endpoint.replay_missing(\"app_id\", \"endpoint_id\", ReplayIn(\n until=None\n), options=...)" }, { "label": "Python (Async)", "lang": "Python", - "source": "replay_out = await svix.endpoint.replay(\"app_id\", \"endpoint_id\", ReplayIn(\n until=None\n), options=...)" + "source": "replay_out = await svix.endpoint.replay_missing(\"app_id\", \"endpoint_id\", ReplayIn(\n until=None\n), options=...)" }, { "label": "Go", "lang": "Go", - "source": "replayOut, err := svixClient.Endpoint.Replay(ctx, \"app_id\", \"endpoint_id\", &ReplayIn{\n Until: nil,\n})" + "source": "replayOut, err := svixClient.Endpoint.ReplayMissing(ctx, \"app_id\", \"endpoint_id\", &ReplayIn{\n Until: nil,\n})" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val replayOut = svix.endpoint.replay(\"app_id\", \"endpoint_id\", ReplayIn()\n .until(null)\n)" + "source": "val replayOut = svix.endpoint.replayMissing(\"app_id\", \"endpoint_id\", ReplayIn()\n .until(null)\n)" }, { "label": "Java", "lang": "Java", - "source": "ReplayOut replayOut = svix.getEndpoint().replay(\"app_id\", \"endpoint_id\", new ReplayIn()\n .until(null)\n);" + "source": "ReplayOut replayOut = svix.getEndpoint().replayMissing(\"app_id\", \"endpoint_id\", new ReplayIn()\n .until(null)\n);" }, { "label": "Ruby", "lang": "Ruby", - "source": "replay_out = svix.endpoint.replay(\"app_id\", \"endpoint_id\", Svix::ReplayIn.new({\n \"until\": nil\n}))" + "source": "replay_out = svix.endpoint.replay_missing(\"app_id\", \"endpoint_id\", Svix::ReplayIn.new({\n \"until\": nil\n}))" }, { "label": "Rust", "lang": "Rust", - "source": "let replay_out = svix.endpoint().replay(\"app_id\", \"endpoint_id\", ReplayIn {\n until: None,\n}, None).await?;" + "source": "let replay_out = svix.endpoint().replay_missing(\"app_id\", \"endpoint_id\", ReplayIn {\n until: None,\n}, None).await?;" }, { "label": "C#", "lang": "C#", - "source": "var replayOut = await svix.Endpoint.ReplayAsync(\"app_id\", \"endpoint_id\", new ReplayIn{\n until: null\n});" + "source": "var replayOut = await svix.Endpoint.ReplayMissingAsync(\"app_id\", \"endpoint_id\", new ReplayIn{\n until: null\n});" }, { "label": "CLI", "lang": "Shell", - "source": "svix endpoint replay \"app_id\" \"endpoint_id\" '{\n \"until\": null\n}'" + "source": "svix endpoint replay-missing \"app_id\" \"endpoint_id\" '{\n \"until\": null\n}'" }, { "label": "cURL", @@ -12213,7 +12234,7 @@ }, "/api/v1/app/{app_id}/endpoint/{endpoint_id}/send-example": { "post": { - "description": "Send an example message for an event", + "description": "Send an example message for an event.", "operationId": "v1.endpoint.send-example", "parameters": [ { @@ -12457,11 +12478,11 @@ "style": "simple" }, { - "description": "Filter the range to data starting from this date", + "description": "Filter the range to data starting from this date.", "in": "query", "name": "since", "schema": { - "description": "Filter the range to data starting from this date", + "description": "Filter the range to data starting from this date.", "format": "date-time", "nullable": true, "type": "string" @@ -12469,11 +12490,11 @@ "style": "form" }, { - "description": "Filter the range to data ending by this date", + "description": "Filter the range to data ending by this date.", "in": "query", "name": "until", "schema": { - "description": "Filter the range to data ending by this date", + "description": "Filter the range to data ending by this date.", "format": "date-time", "nullable": true, "type": "string" @@ -12638,7 +12659,7 @@ }, "/api/v1/app/{app_id}/endpoint/{endpoint_id}/transformation": { "get": { - "description": "Get the transformation code associated with this endpoint", + "description": "Get the transformation code associated with this endpoint.", "operationId": "v1.endpoint.transformation-get", "parameters": [ { @@ -12827,7 +12848,7 @@ ] }, "patch": { - "description": "Set or unset the transformation code associated with this endpoint", + "description": "Set or unset the transformation code associated with this endpoint.", "operationId": "v1.endpoint.transformation-partial-update", "parameters": [ { @@ -13215,7 +13236,7 @@ }, "/api/v1/app/{app_id}/endpoint/{endpoint_id}/transformation/simulate": { "post": { - "description": "Simulate running the transformation on the payload and code", + "description": "Simulate running the transformation on the payload and code.", "operationId": "v1.endpoint.transformation-simulate", "parameters": [ { @@ -13425,7 +13446,7 @@ }, "/api/v1/app/{app_id}/events": { "get": { - "description": "Reads the stream of created messages for an application", + "description": "Reads the stream of created messages for an application.", "operationId": "v1.message.events", "parameters": [ { @@ -13487,11 +13508,11 @@ "style": "form" }, { - "description": "Filter response based on the event type", + "description": "Filter response based on the event type.", "in": "query", "name": "channels", "schema": { - "description": "Filter response based on the event type", + "description": "Filter response based on the event type.", "items": { "example": "project_1337", "maxLength": 128, @@ -13749,11 +13770,11 @@ "style": "form" }, { - "description": "Filter response based on the event type", + "description": "Filter response based on the event type.", "in": "query", "name": "channels", "schema": { - "description": "Filter response based on the event type", + "description": "Filter response based on the event type.", "items": { "example": "project_1337", "maxLength": 128, @@ -13934,7 +13955,7 @@ }, "/api/v1/app/{app_id}/events/subscription/{subscription_id}/create-token": { "post": { - "description": "Creates an auth token that can be used with the `v1.message.events-subscription` endpoint", + "description": "Creates an auth token that can be used with the `v1.message.events-subscription` endpoint.", "operationId": "v1.message.events-subscription.create-token", "parameters": [ { @@ -14077,198 +14098,6 @@ ] } }, - "/api/v1/app/{app_id}/events/{sink_id}": { - "get": { - "description": "Reads the stream of created messages for an application, filtered on the Sink's event types and Channels.", - "operationId": "v1.events-public", - "parameters": [ - { - "description": "The app's ID", - "in": "path", - "name": "app_id", - "required": true, - "schema": { - "description": "The app's ID", - "example": "app_1srOrx2ZWZBpBUvZwXKQmoEYga2", - "type": "string" - }, - "style": "simple" - }, - { - "description": "The ep's ID", - "in": "path", - "name": "sink_id", - "required": true, - "schema": { - "description": "The ep's ID", - "example": "ep_1srOrx2ZWZBpBUvZwXKQmoEYga2", - "type": "string" - }, - "style": "simple" - }, - { - "description": "Limit the number of returned items", - "in": "query", - "name": "limit", - "schema": { - "description": "Limit the number of returned items", - "format": "uint64", - "maximum": 250, - "minimum": 1, - "type": "integer" - }, - "style": "form" - }, - { - "description": "The iterator returned from a prior invocation", - "in": "query", - "name": "iterator", - "schema": { - "description": "The iterator returned from a prior invocation", - "nullable": true, - "type": "string" - }, - "style": "form" - }, - { - "description": "Filters messages sent with this event type (optional).", - "in": "query", - "name": "event_type", - "schema": { - "description": "Filters messages sent with this event type (optional).", - "example": "user.signup", - "maxLength": 256, - "nullable": true, - "pattern": "^[a-zA-Z0-9\\-_.]+$", - "type": "string" - }, - "style": "form" - }, - { - "description": "Filters messages sent with this channel (optional).", - "in": "query", - "name": "channel", - "schema": { - "description": "Filters messages sent with this channel (optional).", - "example": "project_1337", - "maxLength": 128, - "nullable": true, - "pattern": "^[a-zA-Z0-9\\-_.:]+$", - "type": "string" - }, - "style": "form" - }, - { - "in": "query", - "name": "after", - "schema": { - "format": "date-time", - "nullable": true, - "type": "string" - }, - "style": "form" - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MessageEventsOut" - } - } - }, - "description": "" - }, - "400": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HttpErrorOut" - } - } - }, - "description": "Bad request" - }, - "401": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HttpErrorOut" - } - } - }, - "description": "Unauthorized" - }, - "403": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HttpErrorOut" - } - } - }, - "description": "Forbidden" - }, - "404": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HttpErrorOut" - } - } - }, - "description": "Not Found" - }, - "409": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HttpErrorOut" - } - } - }, - "description": "Conflict" - }, - "422": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - }, - "description": "Validation Error" - }, - "429": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HttpErrorOut" - } - } - }, - "description": "Too Many Requests" - } - }, - "security": [ - { - "HTTPBearer": [] - } - ], - "summary": "Public Events", - "tags": [ - "Message" - ], - "x-codeSamples": [ - { - "label": "cURL", - "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/events/{sink_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" - } - ] - } - }, "/api/v1/app/{app_id}/inbound/msg/{inbound_token}": { "post": { "description": "Handles a raw inbound webhook for the application.", @@ -14489,7 +14318,7 @@ }, "/api/v1/app/{app_id}/inbound/rotate-url": { "post": { - "description": "Invalidates the previous inbound url (if one exists), producing a new inbound\nURL for this app", + "description": "Invalidates the previous inbound url (if one exists), producing a new inbound\nURL for this app.", "operationId": "v1.inbound.rotate-url", "parameters": [ { @@ -16072,11 +15901,11 @@ "style": "form" }, { - "description": "Filter response based on the channel", + "description": "Filter response based on the channel.", "in": "query", "name": "channel", "schema": { - "description": "Filter response based on the channel", + "description": "Filter response based on the channel.", "example": "project_1337", "maxLength": 128, "nullable": true, @@ -16086,11 +15915,11 @@ "style": "form" }, { - "description": "Only include items created before a certain date", + "description": "Only include items created before a certain date.", "in": "query", "name": "before", "schema": { - "description": "Only include items created before a certain date", + "description": "Only include items created before a certain date.", "format": "date-time", "nullable": true, "type": "string" @@ -16098,11 +15927,11 @@ "style": "form" }, { - "description": "Only include items created after a certain date", + "description": "Only include items created after a certain date.", "in": "query", "name": "after", "schema": { - "description": "Only include items created after a certain date", + "description": "Only include items created after a certain date.", "format": "date-time", "nullable": true, "type": "string" @@ -16110,22 +15939,22 @@ "style": "form" }, { - "description": "When `true` message payloads are included in the response", + "description": "When `true` message payloads are included in the response.", "in": "query", "name": "with_content", "schema": { "default": true, - "description": "When `true` message payloads are included in the response", + "description": "When `true` message payloads are included in the response.", "type": "boolean" }, "style": "form" }, { - "description": "Filter messages matching the provided tag", + "description": "Filter messages matching the provided tag.", "in": "query", "name": "tag", "schema": { - "description": "Filter messages matching the provided tag", + "description": "Filter messages matching the provided tag.", "example": "project_1337", "maxLength": 128, "nullable": true, @@ -16328,12 +16157,12 @@ "style": "simple" }, { - "description": "When `true` message payloads are included in the response", + "description": "When `true`, message payloads are included in the response.", "in": "query", "name": "with_content", "schema": { "default": true, - "description": "When `true` message payloads are included in the response", + "description": "When `true`, message payloads are included in the response.", "type": "boolean" }, "style": "form" @@ -16463,52 +16292,52 @@ { "label": "JavaScript", "lang": "JavaScript", - "source": "const messageOut = await svix.message.create(\"app_id\", {\n eventId: \"unique-msg-identifier\",\n eventType: \"user.signup\",\n payload: {\"email\":\"test@example.com\",\"type\":\"user.created\",\"username\":\"test_user\"},\n channels: [\"project_123\", \"group_2\"],\n application: null,\n tags: [\"my_tag\", \"other\"],\n transformationsParams: null,\n payloadRetentionPeriod: 90,\n payloadRetentionHours: null\n});\n\n// Alternatively, with a pre-serialized payload.\nconst messageOut = await svix.message.create(\n \"app_id\",\n svix.messageInRaw(\"world.hello\", \"Hello, World\", \"text/plain\"),\n);\n" + "source": "const messageOut = await svix.message.create(\"app_id\", {\n eventId: \"unique-msg-identifier\",\n eventType: \"user.signup\",\n payload: {\"email\":\"test@example.com\",\"type\":\"user.created\",\"username\":\"test_user\"},\n channels: [\"project_123\", \"group_2\"],\n application: null,\n tags: [\"my_tag\", \"other\"],\n transformationsParams: null,\n payloadRetentionPeriod: 90,\n payloadRetentionHours: null\n});\n\n// Alternatively, with a raw string payload.\nconst messageOut = await svix.message.create(\n \"app_id\",\n svix.messageInRaw(\"world.hello\", \"Hello, World\", \"text/plain\"),\n);\n" }, { "label": "TypeScript", "lang": "JavaScript", - "source": "const messageOut = await svix.message.create(\"app_id\", {\n eventId: \"unique-msg-identifier\",\n eventType: \"user.signup\",\n payload: {\"email\":\"test@example.com\",\"type\":\"user.created\",\"username\":\"test_user\"},\n channels: [\"project_123\", \"group_2\"],\n application: null,\n tags: [\"my_tag\", \"other\"],\n transformationsParams: null,\n payloadRetentionPeriod: 90,\n payloadRetentionHours: null\n});\n\n// Alternatively, with a pre-serialized payload.\nconst messageOut = await svix.message.create(\n \"app_id\",\n svix.messageInRaw(\"world.hello\", \"Hello, World\", \"text/plain\"),\n);\n" + "source": "const messageOut = await svix.message.create(\"app_id\", {\n eventId: \"unique-msg-identifier\",\n eventType: \"user.signup\",\n payload: {\"email\":\"test@example.com\",\"type\":\"user.created\",\"username\":\"test_user\"},\n channels: [\"project_123\", \"group_2\"],\n application: null,\n tags: [\"my_tag\", \"other\"],\n transformationsParams: null,\n payloadRetentionPeriod: 90,\n payloadRetentionHours: null\n});\n\n// Alternatively, with a raw string payload.\nconst messageOut = await svix.message.create(\n \"app_id\",\n svix.messageInRaw(\"world.hello\", \"Hello, World\", \"text/plain\"),\n);\n" }, { "label": "Python", "lang": "Python", - "source": "message_out = svix.message.create(\"app_id\", MessageIn(\n event_id=\"unique-msg-identifier\",\n event_type=\"user.signup\",\n payload={\"email\": \"test@example.com\", \"type\": \"user.created\", \"username\": \"test_user\"},\n channels=[\"project_123\", \"group_2\"],\n application=None,\n tags=[\"my_tag\", \"other\"],\n transformations_params=None,\n payload_retention_period=90,\n payload_retention_hours=None\n), options=...)\n\n# Alternatively, with a pre-serialized payload.\nmessage_out = svix.message.create(\"app_id\", svix.message_in_raw(\n event_type=\"user.signup\",\n payload=\"Hello, World!\",\n content_type=\"text/plain\",\n), options=...)\n" + "source": "message_out = svix.message.create(\"app_id\", MessageIn(\n event_id=\"unique-msg-identifier\",\n event_type=\"user.signup\",\n payload={\"email\": \"test@example.com\", \"type\": \"user.created\", \"username\": \"test_user\"},\n channels=[\"project_123\", \"group_2\"],\n application=None,\n tags=[\"my_tag\", \"other\"],\n transformations_params=None,\n payload_retention_period=90,\n payload_retention_hours=None\n), options=...)\n\n# Alternatively, with a raw string payload.\nmessage_out = svix.message.create(\"app_id\", svix.message_in_raw(\n event_type=\"user.signup\",\n payload=\"Hello, World!\",\n content_type=\"text/plain\",\n), options=...)\n" }, { "label": "Python (Async)", "lang": "Python", - "source": "message_out = await svix.message.create(\"app_id\", MessageIn(\n event_id=\"unique-msg-identifier\",\n event_type=\"user.signup\",\n payload={\"email\": \"test@example.com\", \"type\": \"user.created\", \"username\": \"test_user\"},\n channels=[\"project_123\", \"group_2\"],\n application=None,\n tags=[\"my_tag\", \"other\"],\n transformations_params=None,\n payload_retention_period=90,\n payload_retention_hours=None\n), options=...)\n\n# Alternatively, with a pre-serialized payload.\nmessage_out = await svix.message.create(\"app_id\", await svix.message_in_raw(\n event_type=\"user.signup\",\n payload=\"Hello, World!\",\n content_type=\"text/plain\",\n), options=...)\n" + "source": "message_out = await svix.message.create(\"app_id\", MessageIn(\n event_id=\"unique-msg-identifier\",\n event_type=\"user.signup\",\n payload={\"email\": \"test@example.com\", \"type\": \"user.created\", \"username\": \"test_user\"},\n channels=[\"project_123\", \"group_2\"],\n application=None,\n tags=[\"my_tag\", \"other\"],\n transformations_params=None,\n payload_retention_period=90,\n payload_retention_hours=None\n), options=...)\n\n# Alternatively, with a raw string payload.\nmessage_out = await svix.message.create(\"app_id\", await svix.message_in_raw(\n event_type=\"user.signup\",\n payload=\"Hello, World!\",\n content_type=\"text/plain\",\n), options=...)\n" }, { "label": "Go", "lang": "Go", - "source": "messageOut, err := svixClient.Message.Create(ctx, \"app_id\", &MessageIn{\n EventId: \"unique-msg-identifier\",\n EventType: \"user.signup\",\n Payload: map[string]interface{}{\"email\": \"test@example.com\", \"type\": \"user.created\", \"username\": \"test_user\"},\n Channels: []string{\"project_123\", \"group_2\"},\n Application: nil,\n Tags: []string{\"my_tag\", \"other\"},\n TransformationsParams: nil,\n PayloadRetentionPeriod: 90,\n PayloadRetentionHours: nil,\n})\n\n// Alternatively, with a pre-serialized payload.\nmessageOut, err := svixClient.Message.Create(ctx, \"app_id\", &svix.NewMessageInRaw(\n \"world.hello\",\n \"Hello, World\",\n svix.StaticNullableString(\"text/plain\"),\n))\n" + "source": "messageOut, err := svixClient.Message.Create(ctx, \"app_id\", &MessageIn{\n EventId: \"unique-msg-identifier\",\n EventType: \"user.signup\",\n Payload: map[string]interface{}{\"email\": \"test@example.com\", \"type\": \"user.created\", \"username\": \"test_user\"},\n Channels: []string{\"project_123\", \"group_2\"},\n Application: nil,\n Tags: []string{\"my_tag\", \"other\"},\n TransformationsParams: nil,\n PayloadRetentionPeriod: 90,\n PayloadRetentionHours: nil,\n})\n\n// Alternatively, with a raw string payload.\nmessageOut, err := svixClient.Message.Create(ctx, \"app_id\", &svix.NewMessageInRaw(\n \"world.hello\",\n \"Hello, World\",\n svix.StaticNullableString(\"text/plain\"),\n))\n" }, { "label": "Kotlin", "lang": "Kotlin", - "source": "val messageOut = svix.message.create(\"app_id\", MessageIn()\n .eventId(\"unique-msg-identifier\")\n .eventType(\"user.signup\")\n .payload(/* ... */)\n .channels(arrayOf(\"project_123\", \"group_2\"))\n .application(null)\n .tags(arrayOf(\"my_tag\", \"other\"))\n .transformationsParams(null)\n .payloadRetentionPeriod(90)\n .payloadRetentionHours(null)\n)\n\n// Alternatively, with a pre-serialized payload.\nval messageOut = svix.message.create(\"app_id\", svix.messageInRaw(\n eventType = \"world.hello\",\n payload = \"Hello, World!\",\n contentType = \"text/plain\",\n))\n" + "source": "val messageOut = svix.message.create(\"app_id\", MessageIn()\n .eventId(\"unique-msg-identifier\")\n .eventType(\"user.signup\")\n .payload(/* ... */)\n .channels(arrayOf(\"project_123\", \"group_2\"))\n .application(null)\n .tags(arrayOf(\"my_tag\", \"other\"))\n .transformationsParams(null)\n .payloadRetentionPeriod(90)\n .payloadRetentionHours(null)\n)\n\n// Alternatively, with a raw string payload.\nval messageOut = svix.message.create(\"app_id\", svix.messageInRaw(\n eventType = \"world.hello\",\n payload = \"Hello, World!\",\n contentType = \"text/plain\",\n))\n" }, { "label": "Java", "lang": "Java", - "source": "MessageOut messageOut = svix.getMessage().create(\"app_id\", new MessageIn()\n .eventId(\"unique-msg-identifier\")\n .eventType(\"user.signup\")\n .payload(/* ... */)\n .channels(new String[]{\"project_123\", \"group_2\"})\n .application(null)\n .tags(new String[]{\"my_tag\", \"other\"})\n .transformationsParams(null)\n .payloadRetentionPeriod(90)\n .payloadRetentionHours(null)\n);\n\n// Alternatively, with a pre-serialized payload.\nMessageOut messageOut = svix.getMessage().create(\n \"app_id\",\n Message.messageInRaw(\"Hello, World!\", \"text/plain\")\n .eventType(\"world.hello\")\n);\n" + "source": "MessageOut messageOut = svix.getMessage().create(\"app_id\", new MessageIn()\n .eventId(\"unique-msg-identifier\")\n .eventType(\"user.signup\")\n .payload(/* ... */)\n .channels(new String[]{\"project_123\", \"group_2\"})\n .application(null)\n .tags(new String[]{\"my_tag\", \"other\"})\n .transformationsParams(null)\n .payloadRetentionPeriod(90)\n .payloadRetentionHours(null)\n);\n\n// Alternatively, with a raw string payload.\nMessageOut messageOut = svix.getMessage().create(\n \"app_id\",\n Message.messageInRaw(\"Hello, World!\", \"text/plain\")\n .eventType(\"world.hello\")\n);\n" }, { "label": "Ruby", "lang": "Ruby", - "source": "message_out = svix.message.create(\"app_id\", Svix::MessageIn.new({\n \"event_id\": \"unique-msg-identifier\",\n \"event_type\": \"user.signup\",\n \"payload\": {\"email\":\"test@example.com\",\"type\":\"user.created\",\"username\":\"test_user\"},\n \"channels\": [\"project_123\", \"group_2\"],\n \"application\": nil,\n \"tags\": [\"my_tag\", \"other\"],\n \"transformations_params\": nil,\n \"payload_retention_period\": 90,\n \"payload_retention_hours\": nil\n}))\n\n# Alternatively, with a pre-serialized payload.\nmessage_out = svix.message.create(\"app_id\", Svix.message_in_raw({\n event_type: \"user.signup\",\n payload: \"Hello, World!\",\n content_type: \"text/plain\",\n}))\n" + "source": "message_out = svix.message.create(\"app_id\", Svix::MessageIn.new({\n \"event_id\": \"unique-msg-identifier\",\n \"event_type\": \"user.signup\",\n \"payload\": {\"email\":\"test@example.com\",\"type\":\"user.created\",\"username\":\"test_user\"},\n \"channels\": [\"project_123\", \"group_2\"],\n \"application\": nil,\n \"tags\": [\"my_tag\", \"other\"],\n \"transformations_params\": nil,\n \"payload_retention_period\": 90,\n \"payload_retention_hours\": nil\n}))\n\n# Alternatively, with a raw string payload.\nmessage_out = svix.message.create(\"app_id\", Svix.message_in_raw({\n event_type: \"user.signup\",\n payload: \"Hello, World!\",\n content_type: \"text/plain\",\n}))\n" }, { "label": "Rust", "lang": "Rust", - "source": "let message_out = svix.message().create(\"app_id\", MessageIn {\n event_id: Some(\"unique-msg-identifier\".to_string()),\n event_type: \"user.signup\".to_string(),\n payload: json!({\"email\":\"test@example.com\",\"type\":\"user.created\",\"username\":\"test_user\"}),\n channels: Some(vec![\"project_123\".to_string(), \"group_2\".to_string()]),\n application: None,\n tags: Some(vec![\"my_tag\".to_string(), \"other\".to_string()]),\n transformations_params: None,\n payload_retention_period: Some(90),\n payload_retention_hours: None,\n}, None).await?;\n\n// Alternatively, with a pre-serialized payload.\nlet message_out = svix.message().create(\n \"app_id\",\n MessageIn::new_raw_payload(\n \"world.hello\".to_string(),\n \"Hello, World!\".to_string(),\n ).with_content_type(\"text/plain\".to_string()),\n None,\n).await?;\n" + "source": "let message_out = svix.message().create(\"app_id\", MessageIn {\n event_id: Some(\"unique-msg-identifier\".to_string()),\n event_type: \"user.signup\".to_string(),\n payload: json!({\"email\":\"test@example.com\",\"type\":\"user.created\",\"username\":\"test_user\"}),\n channels: Some(vec![\"project_123\".to_string(), \"group_2\".to_string()]),\n application: None,\n tags: Some(vec![\"my_tag\".to_string(), \"other\".to_string()]),\n transformations_params: None,\n payload_retention_period: Some(90),\n payload_retention_hours: None,\n}, None).await?;\n\n// Alternatively, with a raw string payload.\nlet message_out = svix.message().create(\n \"app_id\",\n MessageIn::new_raw_payload(\n \"world.hello\".to_string(),\n \"Hello, World!\".to_string(),\n ).with_content_type(\"text/plain\".to_string()),\n None,\n).await?;\n" }, { "label": "C#", "lang": "C#", - "source": "var messageOut = await svix.Message.CreateAsync(\"app_id\", new MessageIn{\n eventId: \"unique-msg-identifier\",\n eventType: \"user.signup\",\n payload: /* ... */,\n channels: new string[] {\"project_123\", \"group_2\"},\n application: null,\n tags: new string[] {\"my_tag\", \"other\"},\n transformationsParams: null,\n payloadRetentionPeriod: 90,\n payloadRetentionHours: null\n});\n\n// Alternatively, with a pre-serialized payload.\nvar messageOut = await svix.Message.CreateAsync(\n \"app_id\",\n svix.Message.messageInRaw(\n eventType: \"world.hello\",\n payload: \"Hello, world!\",\n contentType: \"text/plain\",\n ),\n);\n" + "source": "var messageOut = await svix.Message.CreateAsync(\"app_id\", new MessageIn{\n eventId: \"unique-msg-identifier\",\n eventType: \"user.signup\",\n payload: /* ... */,\n channels: new string[] {\"project_123\", \"group_2\"},\n application: null,\n tags: new string[] {\"my_tag\", \"other\"},\n transformationsParams: null,\n payloadRetentionPeriod: 90,\n payloadRetentionHours: null\n});\n\n// Alternatively, with a raw string payload.\nvar messageOut = await svix.Message.CreateAsync(\n \"app_id\",\n svix.Message.messageInRaw(\n eventType: \"world.hello\",\n payload: \"Hello, world!\",\n contentType: \"text/plain\",\n ),\n);\n" }, { "label": "CLI", @@ -16518,7 +16347,7 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/msg' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"eventId\": \"unique-msg-identifier\",\n \"eventType\": \"user.signup\",\n \"payload\": {\"email\":\"test@example.com\",\"type\":\"user.created\",\"username\":\"test_user\"},\n \"channels\": [\"project_123\", \"group_2\"],\n \"application\": null,\n \"tags\": [\"my_tag\", \"other\"],\n \"transformationsParams\": null,\n \"payloadRetentionPeriod\": 90,\n \"payloadRetentionHours\": null\n }'\n\n# Alternatively, with a pre-serialized payload.\ncurl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/msg' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"eventType\": \"world.hello\",\n \"payload\": {},\n \"transformationsParams\": {\n \"rawPayload\": \"Hello, World!\",\n \"headers\": { \"content-type\": \"text/plain\" }\n }\n }'\n" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/msg' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n \\\n -d '{\n \"eventId\": \"unique-msg-identifier\",\n \"eventType\": \"user.signup\",\n \"payload\": {\"email\":\"test@example.com\",\"type\":\"user.created\",\"username\":\"test_user\"},\n \"channels\": [\"project_123\", \"group_2\"],\n \"application\": null,\n \"tags\": [\"my_tag\", \"other\"],\n \"transformationsParams\": null,\n \"payloadRetentionPeriod\": 90,\n \"payloadRetentionHours\": null\n }'\n\n# Alternatively, with a raw string payload.\ncurl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/msg' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"eventType\": \"world.hello\",\n \"payload\": {},\n \"transformationsParams\": {\n \"rawPayload\": \"Hello, World!\",\n \"headers\": { \"content-type\": \"text/plain\" }\n }\n }'\n" } ] } @@ -16559,12 +16388,12 @@ "style": "simple" }, { - "description": "When `true` message payloads are included in the response", + "description": "When `true` message payloads are included in the response.", "in": "query", "name": "with_content", "schema": { "default": true, - "description": "When `true` message payloads are included in the response", + "description": "When `true` message payloads are included in the response.", "type": "boolean" }, "style": "form" @@ -18768,6 +18597,204 @@ ] } }, + "/api/v1/app/{app_id}/poller/{sink_id}": { + "get": { + "description": "Reads the stream of created messages for an application, filtered on the Sink's event types and Channels.", + "operationId": "v1.events-public", + "parameters": [ + { + "description": "The app's ID or UID", + "in": "path", + "name": "app_id", + "required": true, + "schema": { + "description": "The app's ID or UID", + "example": "unique-app-identifier", + "maxLength": 256, + "minLength": 1, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" + }, + "style": "simple" + }, + { + "description": "The ep's ID or UID", + "in": "path", + "name": "sink_id", + "required": true, + "schema": { + "description": "The ep's ID or UID", + "example": "unique-ep-identifier", + "maxLength": 256, + "minLength": 1, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" + }, + "style": "simple" + }, + { + "description": "Limit the number of returned items", + "in": "query", + "name": "limit", + "schema": { + "description": "Limit the number of returned items", + "format": "uint64", + "maximum": 250, + "minimum": 1, + "type": "integer" + }, + "style": "form" + }, + { + "description": "The iterator returned from a prior invocation", + "in": "query", + "name": "iterator", + "schema": { + "description": "The iterator returned from a prior invocation", + "nullable": true, + "type": "string" + }, + "style": "form" + }, + { + "description": "Filters messages sent with this event type (optional).", + "in": "query", + "name": "event_type", + "schema": { + "description": "Filters messages sent with this event type (optional).", + "example": "user.signup", + "maxLength": 256, + "nullable": true, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" + }, + "style": "form" + }, + { + "description": "Filters messages sent with this channel (optional).", + "in": "query", + "name": "channel", + "schema": { + "description": "Filters messages sent with this channel (optional).", + "example": "project_1337", + "maxLength": 128, + "nullable": true, + "pattern": "^[a-zA-Z0-9\\-_.:]+$", + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "after", + "schema": { + "format": "date-time", + "nullable": true, + "type": "string" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageEventsOut" + } + } + }, + "description": "" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } + } + }, + "description": "Bad request" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } + } + }, + "description": "Unauthorized" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } + } + }, + "description": "Not Found" + }, + "409": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } + } + }, + "description": "Conflict" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + }, + "description": "Validation Error" + }, + "429": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HttpErrorOut" + } + } + }, + "description": "Too Many Requests" + } + }, + "security": [ + { + "HTTPBearer": [] + } + ], + "summary": "Public Events", + "tags": [ + "Message" + ], + "x-codeSamples": [ + { + "label": "cURL", + "lang": "Shell", + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/poller/{sink_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\n" + } + ] + } + }, "/api/v1/app/{app_id}/sink": { "get": { "description": "List the application's sinks.", @@ -19366,28 +19393,28 @@ }, "/api/v1/app/{app_id}/stats": { "get": { - "description": "Get basic statistics for the application", + "description": "Get basic statistics for the application.", "operationId": "v1.application.get-stats", "parameters": [ { - "description": "Filter the range to data starting from this date", + "description": "Filter the range to data starting from this date.", "in": "query", "name": "since", "required": true, "schema": { - "description": "Filter the range to data starting from this date", + "description": "Filter the range to data starting from this date.", "format": "date-time", "type": "string" }, "style": "form" }, { - "description": "Filter the range to data ending by this date", + "description": "Filter the range to data ending by this date.", "in": "query", "name": "until", "required": true, "schema": { - "description": "Filter the range to data ending by this date", + "description": "Filter the range to data ending by this date.", "format": "date-time", "type": "string" }, @@ -19956,7 +19983,7 @@ }, "/api/v1/auth/app/{app_id}/expire-all": { "post": { - "description": "Expire all of the tokens associated with a specific Application", + "description": "Expire all of the tokens associated with a specific application.", "operationId": "v1.authentication.expire-all", "parameters": [ { @@ -20493,7 +20520,7 @@ }, "/api/v1/auth/one-time-token": { "post": { - "description": "This is a one time token", + "description": "This is a one time token.", "operationId": "v1.authentication.exchange-one-time-token", "parameters": [ { @@ -20677,23 +20704,23 @@ "operationId": "list_background_tasks", "parameters": [ { - "description": "Filter the response based on the status", + "description": "Filter the response based on the status.", "in": "query", "name": "status", "schema": { "$ref": "#/components/schemas/BackgroundTaskStatus", - "description": "Filter the response based on the status", + "description": "Filter the response based on the status.", "nullable": true }, "style": "form" }, { - "description": "Filter the response based on the type", + "description": "Filter the response based on the type.", "in": "query", "name": "task", "schema": { "$ref": "#/components/schemas/BackgroundTaskType", - "description": "Filter the response based on the type", + "description": "Filter the response based on the type.", "nullable": true }, "style": "form" @@ -20951,7 +20978,7 @@ }, "/api/v1/environment/export": { "post": { - "description": "Download a JSON file containing all org-settings and event types", + "description": "Download a JSON file containing all org-settings and event types.", "operationId": "v1.environment.export", "parameters": [ { @@ -21294,7 +21321,7 @@ }, "/api/v1/environment/settings": { "get": { - "description": "Get the environment's settings", + "description": "Get the environment's settings.", "operationId": "v1.environment.get-settings", "responses": { "200": { @@ -21495,23 +21522,23 @@ "style": "form" }, { - "description": "When `true` archived (deleted but not expunged) items are included in the response", + "description": "When `true` archived (deleted but not expunged) items are included in the response.", "in": "query", "name": "include_archived", "schema": { "default": false, - "description": "When `true` archived (deleted but not expunged) items are included in the response", + "description": "When `true` archived (deleted but not expunged) items are included in the response.", "type": "boolean" }, "style": "form" }, { - "description": "When `true` the full item (including the schema) is included in the response", + "description": "When `true` the full item (including the schema) is included in the response.", "in": "query", "name": "with_content", "schema": { "default": false, - "description": "When `true` the full item (including the schema) is included in the response", + "description": "When `true` the full item (including the schema) is included in the response.", "type": "boolean" }, "style": "form" @@ -21852,7 +21879,7 @@ }, "/api/v1/event-type/export/openapi": { "post": { - "description": "Exports event type definitions based on the OpenAPI schemas associated\nwith each existing event type", + "description": "Exports event type definitions based on the OpenAPI schemas associated\nwith each existing event type.", "operationId": "v1.event-type.export-openapi", "parameters": [ { @@ -22203,7 +22230,7 @@ }, "/api/v1/event-type/schema/generate-example": { "post": { - "description": "Generates a fake example from the given JSONSchema", + "description": "Generates a fake example from the given JSONSchema.", "operationId": "v1.event-type.generate-example", "parameters": [ { @@ -23111,7 +23138,7 @@ }, "/api/v1/event-type/{event_type_name}/retry-schedule": { "get": { - "description": "Gets the retry schedule for messages using the given event type", + "description": "Gets the retry schedule for messages using the given event type.", "operationId": "v1.event-type.get-retry-schedule", "parameters": [ { @@ -23284,7 +23311,7 @@ ] }, "put": { - "description": "Sets a retry schedule for all messages using the given event type", + "description": "Sets a retry schedule for all messages using the given event type.", "operationId": "v1.event-type.update-retry-schedule", "parameters": [ { @@ -23469,7 +23496,7 @@ }, "/api/v1/events": { "get": { - "description": "Reads the stream of operational webhook events for this environment", + "description": "Reads the stream of operational webhook events for this environment.", "operationId": "v1.events", "parameters": [ { @@ -23516,11 +23543,11 @@ "style": "form" }, { - "description": "Filter response based on the event type", + "description": "Filter response based on the event type.", "in": "query", "name": "channels", "schema": { - "description": "Filter response based on the event type", + "description": "Filter response based on the event type.", "items": { "example": "project_1337", "maxLength": 128, @@ -23738,7 +23765,7 @@ }, "/api/v1/msg/broadcast": { "post": { - "description": "Creates a background task to send the same message to each application in your organization", + "description": "Creates a background task to send the same message to each application in your organization.", "operationId": "create_broadcast_message", "parameters": [ { @@ -24748,11 +24775,11 @@ "operationId": "v1.stats.app-attempts", "parameters": [ { - "description": "Filter the range to data starting from this date", + "description": "Filter the range to data starting from this date.", "in": "query", "name": "startDate", "schema": { - "description": "Filter the range to data starting from this date", + "description": "Filter the range to data starting from this date.", "format": "date-time", "nullable": true, "type": "string" @@ -24760,11 +24787,11 @@ "style": "form" }, { - "description": "Filter the range to data ending by this date", + "description": "Filter the range to data ending by this date.", "in": "query", "name": "endDate", "schema": { - "description": "Filter the range to data ending by this date", + "description": "Filter the range to data ending by this date.", "format": "date-time", "nullable": true, "type": "string" @@ -24944,15 +24971,15 @@ }, "/api/v1/stats/app/{app_id}/ep/{endpoint_id}/attempt": { "get": { - "description": "Returns endpoint-level statistics on message attempts", + "description": "Returns endpoint-level statistics on message attempts.", "operationId": "v1.stats.endpoint-attempts", "parameters": [ { - "description": "Filter the range to data starting from this date", + "description": "Filter the range to data starting from this date.", "in": "query", "name": "startDate", "schema": { - "description": "Filter the range to data starting from this date", + "description": "Filter the range to data starting from this date.", "format": "date-time", "nullable": true, "type": "string" @@ -24960,11 +24987,11 @@ "style": "form" }, { - "description": "Filter the range to data ending by this date", + "description": "Filter the range to data ending by this date.", "in": "query", "name": "endDate", "schema": { - "description": "Filter the range to data ending by this date", + "description": "Filter the range to data ending by this date.", "format": "date-time", "nullable": true, "type": "string" @@ -27734,7 +27761,7 @@ }, "/api/v1/transformation-template": { "get": { - "description": "List all transformation templates for an application", + "description": "List all transformation templates for an application.", "operationId": "v1.transformation-template.list", "parameters": [ { @@ -27928,7 +27955,7 @@ ] }, "post": { - "description": "Create a new transformation template", + "description": "Create a new transformation template.", "operationId": "v1.transformation-template.create", "parameters": [ { @@ -28108,7 +28135,7 @@ }, "/api/v1/transformation-template/generate": { "post": { - "description": "Use OpenAI's Completion API to generate code for a transformation template", + "description": "Use OpenAI's Completion API to generate code for a transformation template.", "operationId": "v1.transformation-template.generate", "parameters": [ { @@ -28288,7 +28315,7 @@ }, "/api/v1/transformation-template/oauth/discord": { "post": { - "description": "Get Discord Incoming webhook URL", + "description": "Get Discord Incoming webhook URL.", "operationId": "v1.transformation-template.oauth.discord", "parameters": [ { @@ -28413,7 +28440,7 @@ }, "/api/v1/transformation-template/oauth/hubspot": { "post": { - "description": "Get Hubspot access token using authorization code", + "description": "Get Hubspot access token using authorization code.", "operationId": "v1.transformation-template.oauth.hubspot", "parameters": [ { @@ -28538,7 +28565,7 @@ }, "/api/v1/transformation-template/oauth/slack": { "post": { - "description": "Get Slack Incoming webhook URL", + "description": "Get Slack Incoming webhook URL.", "operationId": "v1.transformation-template.oauth.slack", "parameters": [ { @@ -28663,7 +28690,7 @@ }, "/api/v1/transformation-template/simulate": { "post": { - "description": "Simulate running the transformation on the payload and code", + "description": "Simulate running the transformation on the payload and code.", "operationId": "v1.transformation-template.simulate", "parameters": [ { @@ -28843,7 +28870,7 @@ }, "/api/v1/transformation-template/{transformation_template_id}": { "delete": { - "description": "Delete a transformation template", + "description": "Delete a transformation template.", "operationId": "v1.transformation-template.delete", "parameters": [ { @@ -29004,7 +29031,7 @@ ] }, "get": { - "description": "Get a transformation template", + "description": "Get a transformation template.", "operationId": "v1.transformation-template.get", "parameters": [ { @@ -29172,7 +29199,7 @@ ] }, "patch": { - "description": "Partially update a transformation template", + "description": "Partially update a transformation template.", "operationId": "v1.transformation-template.patch", "parameters": [ { @@ -29350,7 +29377,7 @@ ] }, "put": { - "description": "Update a transformation template", + "description": "Update a transformation template.", "operationId": "v1.transformation-template.update", "parameters": [ { diff --git a/python/svix/api.py b/python/svix/api.py index 85f384975..6ee073a6b 100644 --- a/python/svix/api.py +++ b/python/svix/api.py @@ -38,7 +38,7 @@ v1_endpoint_patch, v1_endpoint_patch_headers, v1_endpoint_recover, - v1_endpoint_replay, + v1_endpoint_replay_missing, v1_endpoint_rotate_secret, v1_endpoint_send_example, v1_endpoint_transformation_get, @@ -617,7 +617,7 @@ async def replay_missing( replay_in: ReplayIn, options: PostOptions = PostOptions(), ) -> ReplayOut: - return await v1_endpoint_replay.request_asyncio( + return await v1_endpoint_replay_missing.request_asyncio( client=self._client, app_id=app_id, endpoint_id=endpoint_id, @@ -798,7 +798,7 @@ def replay_missing( replay_in: ReplayIn, options: PostOptions = PostOptions(), ) -> ReplayOut: - return v1_endpoint_replay.request_sync( + return v1_endpoint_replay_missing.request_sync( client=self._client, app_id=app_id, endpoint_id=endpoint_id, diff --git a/ruby/lib/svix/endpoint_api.rb b/ruby/lib/svix/endpoint_api.rb index 184ed6fd0..38830aeb8 100644 --- a/ruby/lib/svix/endpoint_api.rb +++ b/ruby/lib/svix/endpoint_api.rb @@ -60,7 +60,7 @@ def get_stats(app_id, endpoint_id, options = {}) end def replay_missing(app_id, endpoint_id, replay_in, options = {}) - @api.v1_endpoint_replay(app_id, endpoint_id, replay_in, options) + @api.v1_endpoint_replay_missing(app_id, endpoint_id, replay_in, options) nil end diff --git a/rust/src/api/endpoint.rs b/rust/src/api/endpoint.rs index 189147909..4d9c7cba5 100644 --- a/rust/src/api/endpoint.rs +++ b/rust/src/api/endpoint.rs @@ -291,9 +291,9 @@ impl<'a> Endpoint<'a> { options: Option, ) -> Result<()> { let PostOptions { idempotency_key } = options.unwrap_or_default(); - endpoint_api::v1_period_endpoint_period_replay( + endpoint_api::v1_period_endpoint_period_replay_missing( self.cfg, - endpoint_api::V1PeriodEndpointPeriodReplayParams { + endpoint_api::V1PeriodEndpointPeriodReplayMissingParams { app_id, endpoint_id, replay_in,