From 03c4e96bb0d89ffd781fe85e1499bd553c290582 Mon Sep 17 00:00:00 2001 From: James Lucas Date: Tue, 16 Apr 2024 15:38:43 -0500 Subject: [PATCH 1/3] Update libs --- go/internal/openapi/api_application.go | 16 +- go/internal/openapi/api_authentication.go | 10 +- go/internal/openapi/api_background_tasks.go | 4 +- go/internal/openapi/api_broadcast.go | 2 +- go/internal/openapi/api_endpoint.go | 36 +- go/internal/openapi/api_environment.go | 6 +- .../openapi/api_environment_settings.go | 2 +- go/internal/openapi/api_event_type.go | 22 +- go/internal/openapi/api_events.go | 247 ++++++++ go/internal/openapi/api_health.go | 2 +- go/internal/openapi/api_inbound.go | 4 +- go/internal/openapi/api_integration.go | 22 +- go/internal/openapi/api_message.go | 14 +- go/internal/openapi/api_message_attempt.go | 20 +- go/internal/openapi/api_statistics.go | 8 +- .../openapi/api_transformation_template.go | 4 +- go/internal/openapi/client.go | 3 + .../openapi/model_custom_color_palette.go | 288 ++++++--- .../openapi/model_endpoint_oauth_config_in.go | 195 ++++++ .../openapi/model_environment_settings_out.go | 32 +- .../openapi/model_oauth2_auth_method.go | 169 ++++++ .../model_oauth2_auth_method_one_of.go | 258 ++++++++ .../model_oauth2_auth_method_one_of_1.go | 137 +++++ .../model_oauth2_auth_method_one_of_2.go | 137 +++++ .../openapi/model_oauth2_grant_type.go | 108 ++++ .../model_oauth_jws_signing_algorithm.go | 108 ++++ go/internal/openapi/model_settings_in.go | 32 +- go/internal/openapi/model_settings_out.go | 32 +- openapi.json | 573 +++++++++++++----- 29 files changed, 2112 insertions(+), 379 deletions(-) create mode 100644 go/internal/openapi/api_events.go create mode 100644 go/internal/openapi/model_endpoint_oauth_config_in.go create mode 100644 go/internal/openapi/model_oauth2_auth_method.go create mode 100644 go/internal/openapi/model_oauth2_auth_method_one_of.go create mode 100644 go/internal/openapi/model_oauth2_auth_method_one_of_1.go create mode 100644 go/internal/openapi/model_oauth2_auth_method_one_of_2.go create mode 100644 go/internal/openapi/model_oauth2_grant_type.go create mode 100644 go/internal/openapi/model_oauth_jws_signing_algorithm.go diff --git a/go/internal/openapi/api_application.go b/go/internal/openapi/api_application.go index ce5905bb7..d92d73d18 100644 --- a/go/internal/openapi/api_application.go +++ b/go/internal/openapi/api_application.go @@ -90,7 +90,7 @@ func (a *ApplicationApiService) GetAppUsageStatsApiV1AppStatsUsageGetExecute(r A return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/app/stats/usage/" + localVarPath := localBasePath + "/api/v1/app/stats/usage" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -290,7 +290,7 @@ func (a *ApplicationApiService) V1ApplicationCreateExecute(r ApiV1ApplicationCre return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/app/" + localVarPath := localBasePath + "/api/v1/app" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -473,7 +473,7 @@ func (a *ApplicationApiService) V1ApplicationDeleteExecute(r ApiV1ApplicationDel return nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/app/{app_id}/" + localVarPath := localBasePath + "/api/v1/app/{app_id}" localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", _neturl.PathEscape(parameterToString(r.appId, "")), -1) localVarHeaderParams := make(map[string]string) @@ -645,7 +645,7 @@ func (a *ApplicationApiService) V1ApplicationGetExecute(r ApiV1ApplicationGetReq return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/app/{app_id}/" + localVarPath := localBasePath + "/api/v1/app/{app_id}" localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", _neturl.PathEscape(parameterToString(r.appId, "")), -1) localVarHeaderParams := make(map[string]string) @@ -836,7 +836,7 @@ func (a *ApplicationApiService) V1ApplicationGetStatsExecute(r ApiV1ApplicationG return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/app/{app_id}/stats/" + localVarPath := localBasePath + "/api/v1/app/{app_id}/stats" localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", _neturl.PathEscape(parameterToString(r.appId, "")), -1) localVarHeaderParams := make(map[string]string) @@ -1037,7 +1037,7 @@ func (a *ApplicationApiService) V1ApplicationListExecute(r ApiV1ApplicationListR return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/app/" + localVarPath := localBasePath + "/api/v1/app" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -1225,7 +1225,7 @@ func (a *ApplicationApiService) V1ApplicationPatchExecute(r ApiV1ApplicationPatc return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/app/{app_id}/" + localVarPath := localBasePath + "/api/v1/app/{app_id}" localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", _neturl.PathEscape(parameterToString(r.appId, "")), -1) localVarHeaderParams := make(map[string]string) @@ -1416,7 +1416,7 @@ func (a *ApplicationApiService) V1ApplicationUpdateExecute(r ApiV1ApplicationUpd return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/app/{app_id}/" + localVarPath := localBasePath + "/api/v1/app/{app_id}" localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", _neturl.PathEscape(parameterToString(r.appId, "")), -1) localVarHeaderParams := make(map[string]string) diff --git a/go/internal/openapi/api_authentication.go b/go/internal/openapi/api_authentication.go index bd2611ee7..c8f1c5efc 100644 --- a/go/internal/openapi/api_authentication.go +++ b/go/internal/openapi/api_authentication.go @@ -82,7 +82,7 @@ func (a *AuthenticationApiService) V1AuthenticationAppPortalAccessExecute(r ApiV return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/auth/app-portal-access/{app_id}/" + localVarPath := localBasePath + "/api/v1/auth/app-portal-access/{app_id}" localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", _neturl.PathEscape(parameterToString(r.appId, "")), -1) localVarHeaderParams := make(map[string]string) @@ -278,7 +278,7 @@ func (a *AuthenticationApiService) V1AuthenticationDashboardAccessExecute(r ApiV return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/auth/dashboard-access/{app_id}/" + localVarPath := localBasePath + "/api/v1/auth/dashboard-access/{app_id}" localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", _neturl.PathEscape(parameterToString(r.appId, "")), -1) localVarHeaderParams := make(map[string]string) @@ -469,7 +469,7 @@ func (a *AuthenticationApiService) V1AuthenticationExchangeOneTimeTokenExecute(r return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/auth/one-time-token/" + localVarPath := localBasePath + "/api/v1/auth/one-time-token" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -659,7 +659,7 @@ func (a *AuthenticationApiService) V1AuthenticationExpireAllExecute(r ApiV1Authe return nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/auth/app/{app_id}/expire-all/" + localVarPath := localBasePath + "/api/v1/auth/app/{app_id}/expire-all" localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", _neturl.PathEscape(parameterToString(r.appId, "")), -1) localVarHeaderParams := make(map[string]string) @@ -841,7 +841,7 @@ func (a *AuthenticationApiService) V1AuthenticationLogoutExecute(r ApiV1Authenti return nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/auth/logout/" + localVarPath := localBasePath + "/api/v1/auth/logout" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} diff --git a/go/internal/openapi/api_background_tasks.go b/go/internal/openapi/api_background_tasks.go index aa6c8d8b4..88f9ca31f 100644 --- a/go/internal/openapi/api_background_tasks.go +++ b/go/internal/openapi/api_background_tasks.go @@ -72,7 +72,7 @@ func (a *BackgroundTasksApiService) GetBackgroundTaskExecute(r ApiGetBackgroundT return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/background-task/{task_id}/" + localVarPath := localBasePath + "/api/v1/background-task/{task_id}" localVarPath = strings.Replace(localVarPath, "{"+"task_id"+"}", _neturl.PathEscape(parameterToString(r.taskId, "")), -1) localVarHeaderParams := make(map[string]string) @@ -269,7 +269,7 @@ func (a *BackgroundTasksApiService) ListBackgroundTasksExecute(r ApiListBackgrou return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/background-task/" + localVarPath := localBasePath + "/api/v1/background-task" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} diff --git a/go/internal/openapi/api_broadcast.go b/go/internal/openapi/api_broadcast.go index 95243eba2..e9ac24a94 100644 --- a/go/internal/openapi/api_broadcast.go +++ b/go/internal/openapi/api_broadcast.go @@ -78,7 +78,7 @@ func (a *BroadcastApiService) CreateBroadcastMessageExecute(r ApiCreateBroadcast return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/msg/broadcast/" + localVarPath := localBasePath + "/api/v1/msg/broadcast" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} diff --git a/go/internal/openapi/api_endpoint.go b/go/internal/openapi/api_endpoint.go index 23a7c8086..99c711544 100644 --- a/go/internal/openapi/api_endpoint.go +++ b/go/internal/openapi/api_endpoint.go @@ -85,7 +85,7 @@ func (a *EndpointApiService) V1EndpointCreateExecute(r ApiV1EndpointCreateReques return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/app/{app_id}/endpoint/" + localVarPath := localBasePath + "/api/v1/app/{app_id}/endpoint" localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", _neturl.PathEscape(parameterToString(r.appId, "")), -1) localVarHeaderParams := make(map[string]string) @@ -275,7 +275,7 @@ func (a *EndpointApiService) V1EndpointDeleteExecute(r ApiV1EndpointDeleteReques return nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/app/{app_id}/endpoint/{endpoint_id}/" + localVarPath := localBasePath + "/api/v1/app/{app_id}/endpoint/{endpoint_id}" localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", _neturl.PathEscape(parameterToString(r.appId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"endpoint_id"+"}", _neturl.PathEscape(parameterToString(r.endpointId, "")), -1) @@ -457,7 +457,7 @@ func (a *EndpointApiService) V1EndpointGetExecute(r ApiV1EndpointGetRequest) (En return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/app/{app_id}/endpoint/{endpoint_id}/" + localVarPath := localBasePath + "/api/v1/app/{app_id}/endpoint/{endpoint_id}" localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", _neturl.PathEscape(parameterToString(r.appId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"endpoint_id"+"}", _neturl.PathEscape(parameterToString(r.endpointId, "")), -1) @@ -648,7 +648,7 @@ func (a *EndpointApiService) V1EndpointGetHeadersExecute(r ApiV1EndpointGetHeade return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/app/{app_id}/endpoint/{endpoint_id}/headers/" + localVarPath := localBasePath + "/api/v1/app/{app_id}/endpoint/{endpoint_id}/headers" localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", _neturl.PathEscape(parameterToString(r.appId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"endpoint_id"+"}", _neturl.PathEscape(parameterToString(r.endpointId, "")), -1) @@ -842,7 +842,7 @@ func (a *EndpointApiService) V1EndpointGetSecretExecute(r ApiV1EndpointGetSecret return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/app/{app_id}/endpoint/{endpoint_id}/secret/" + localVarPath := localBasePath + "/api/v1/app/{app_id}/endpoint/{endpoint_id}/secret" localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", _neturl.PathEscape(parameterToString(r.appId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"endpoint_id"+"}", _neturl.PathEscape(parameterToString(r.endpointId, "")), -1) @@ -1043,7 +1043,7 @@ func (a *EndpointApiService) V1EndpointGetStatsExecute(r ApiV1EndpointGetStatsRe return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/app/{app_id}/endpoint/{endpoint_id}/stats/" + localVarPath := localBasePath + "/api/v1/app/{app_id}/endpoint/{endpoint_id}/stats" localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", _neturl.PathEscape(parameterToString(r.appId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"endpoint_id"+"}", _neturl.PathEscape(parameterToString(r.endpointId, "")), -1) @@ -1252,7 +1252,7 @@ func (a *EndpointApiService) V1EndpointListExecute(r ApiV1EndpointListRequest) ( return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/app/{app_id}/endpoint/" + localVarPath := localBasePath + "/api/v1/app/{app_id}/endpoint" localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", _neturl.PathEscape(parameterToString(r.appId, "")), -1) localVarHeaderParams := make(map[string]string) @@ -1450,7 +1450,7 @@ func (a *EndpointApiService) V1EndpointPatchExecute(r ApiV1EndpointPatchRequest) return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/app/{app_id}/endpoint/{endpoint_id}/" + localVarPath := localBasePath + "/api/v1/app/{app_id}/endpoint/{endpoint_id}" localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", _neturl.PathEscape(parameterToString(r.appId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"endpoint_id"+"}", _neturl.PathEscape(parameterToString(r.endpointId, "")), -1) @@ -1649,7 +1649,7 @@ func (a *EndpointApiService) V1EndpointPatchHeadersExecute(r ApiV1EndpointPatchH return nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/app/{app_id}/endpoint/{endpoint_id}/headers/" + localVarPath := localBasePath + "/api/v1/app/{app_id}/endpoint/{endpoint_id}/headers" localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", _neturl.PathEscape(parameterToString(r.appId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"endpoint_id"+"}", _neturl.PathEscape(parameterToString(r.endpointId, "")), -1) @@ -1846,7 +1846,7 @@ func (a *EndpointApiService) V1EndpointRecoverExecute(r ApiV1EndpointRecoverRequ return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/app/{app_id}/endpoint/{endpoint_id}/recover/" + localVarPath := localBasePath + "/api/v1/app/{app_id}/endpoint/{endpoint_id}/recover" localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", _neturl.PathEscape(parameterToString(r.appId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"endpoint_id"+"}", _neturl.PathEscape(parameterToString(r.endpointId, "")), -1) @@ -2055,7 +2055,7 @@ func (a *EndpointApiService) V1EndpointReplayExecute(r ApiV1EndpointReplayReques return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/app/{app_id}/endpoint/{endpoint_id}/replay-missing/" + localVarPath := localBasePath + "/api/v1/app/{app_id}/endpoint/{endpoint_id}/replay-missing" localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", _neturl.PathEscape(parameterToString(r.appId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"endpoint_id"+"}", _neturl.PathEscape(parameterToString(r.endpointId, "")), -1) @@ -2262,7 +2262,7 @@ func (a *EndpointApiService) V1EndpointRotateSecretExecute(r ApiV1EndpointRotate return nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/app/{app_id}/endpoint/{endpoint_id}/secret/rotate/" + localVarPath := localBasePath + "/api/v1/app/{app_id}/endpoint/{endpoint_id}/secret/rotate" localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", _neturl.PathEscape(parameterToString(r.appId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"endpoint_id"+"}", _neturl.PathEscape(parameterToString(r.endpointId, "")), -1) @@ -2462,7 +2462,7 @@ func (a *EndpointApiService) V1EndpointSendExampleExecute(r ApiV1EndpointSendExa return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/app/{app_id}/endpoint/{endpoint_id}/send-example/" + localVarPath := localBasePath + "/api/v1/app/{app_id}/endpoint/{endpoint_id}/send-example" localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", _neturl.PathEscape(parameterToString(r.appId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"endpoint_id"+"}", _neturl.PathEscape(parameterToString(r.endpointId, "")), -1) @@ -2661,7 +2661,7 @@ func (a *EndpointApiService) V1EndpointTransformationGetExecute(r ApiV1EndpointT return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/app/{app_id}/endpoint/{endpoint_id}/transformation/" + localVarPath := localBasePath + "/api/v1/app/{app_id}/endpoint/{endpoint_id}/transformation" localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", _neturl.PathEscape(parameterToString(r.appId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"endpoint_id"+"}", _neturl.PathEscape(parameterToString(r.endpointId, "")), -1) @@ -2855,7 +2855,7 @@ func (a *EndpointApiService) V1EndpointTransformationPartialUpdateExecute(r ApiV return nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/app/{app_id}/endpoint/{endpoint_id}/transformation/" + localVarPath := localBasePath + "/api/v1/app/{app_id}/endpoint/{endpoint_id}/transformation" localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", _neturl.PathEscape(parameterToString(r.appId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"endpoint_id"+"}", _neturl.PathEscape(parameterToString(r.endpointId, "")), -1) @@ -3052,7 +3052,7 @@ func (a *EndpointApiService) V1EndpointTransformationSimulateExecute(r ApiV1Endp return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/app/{app_id}/endpoint/{endpoint_id}/transformation/simulate/" + localVarPath := localBasePath + "/api/v1/app/{app_id}/endpoint/{endpoint_id}/transformation/simulate" localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", _neturl.PathEscape(parameterToString(r.appId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"endpoint_id"+"}", _neturl.PathEscape(parameterToString(r.endpointId, "")), -1) @@ -3256,7 +3256,7 @@ func (a *EndpointApiService) V1EndpointUpdateExecute(r ApiV1EndpointUpdateReques return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/app/{app_id}/endpoint/{endpoint_id}/" + localVarPath := localBasePath + "/api/v1/app/{app_id}/endpoint/{endpoint_id}" localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", _neturl.PathEscape(parameterToString(r.appId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"endpoint_id"+"}", _neturl.PathEscape(parameterToString(r.endpointId, "")), -1) @@ -3455,7 +3455,7 @@ func (a *EndpointApiService) V1EndpointUpdateHeadersExecute(r ApiV1EndpointUpdat return nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/app/{app_id}/endpoint/{endpoint_id}/headers/" + localVarPath := localBasePath + "/api/v1/app/{app_id}/endpoint/{endpoint_id}/headers" localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", _neturl.PathEscape(parameterToString(r.appId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"endpoint_id"+"}", _neturl.PathEscape(parameterToString(r.endpointId, "")), -1) diff --git a/go/internal/openapi/api_environment.go b/go/internal/openapi/api_environment.go index c92e71c0f..854d80add 100644 --- a/go/internal/openapi/api_environment.go +++ b/go/internal/openapi/api_environment.go @@ -73,7 +73,7 @@ func (a *EnvironmentApiService) V1EnvironmentExportExecute(r ApiV1EnvironmentExp return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/environment/export/" + localVarPath := localBasePath + "/api/v1/environment/export" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -247,7 +247,7 @@ func (a *EnvironmentApiService) V1EnvironmentExportGetExecute(r ApiV1Environment return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/environment/export/" + localVarPath := localBasePath + "/api/v1/environment/export" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -427,7 +427,7 @@ func (a *EnvironmentApiService) V1EnvironmentImportExecute(r ApiV1EnvironmentImp return nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/environment/import/" + localVarPath := localBasePath + "/api/v1/environment/import" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} diff --git a/go/internal/openapi/api_environment_settings.go b/go/internal/openapi/api_environment_settings.go index 5f8575325..87336e4d1 100644 --- a/go/internal/openapi/api_environment_settings.go +++ b/go/internal/openapi/api_environment_settings.go @@ -68,7 +68,7 @@ func (a *EnvironmentSettingsApiService) V1EnvironmentGetSettingsExecute(r ApiV1E return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/environment/settings/" + localVarPath := localBasePath + "/api/v1/environment/settings" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} diff --git a/go/internal/openapi/api_event_type.go b/go/internal/openapi/api_event_type.go index 13b984b61..2d036937b 100644 --- a/go/internal/openapi/api_event_type.go +++ b/go/internal/openapi/api_event_type.go @@ -83,7 +83,7 @@ func (a *EventTypeApiService) V1EventTypeCreateExecute(r ApiV1EventTypeCreateReq return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/event-type/" + localVarPath := localBasePath + "/api/v1/event-type" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -273,7 +273,7 @@ func (a *EventTypeApiService) V1EventTypeDeleteExecute(r ApiV1EventTypeDeleteReq return nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/event-type/{event_type_name}/" + localVarPath := localBasePath + "/api/v1/event-type/{event_type_name}" localVarPath = strings.Replace(localVarPath, "{"+"event_type_name"+"}", _neturl.PathEscape(parameterToString(r.eventTypeName, "")), -1) localVarHeaderParams := make(map[string]string) @@ -448,7 +448,7 @@ func (a *EventTypeApiService) V1EventTypeExportOpenapiExecute(r ApiV1EventTypeEx return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/event-type/export/openapi/" + localVarPath := localBasePath + "/api/v1/event-type/export/openapi" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -632,7 +632,7 @@ func (a *EventTypeApiService) V1EventTypeGenerateExampleExecute(r ApiV1EventType return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/event-type/schema/generate-example/" + localVarPath := localBasePath + "/api/v1/event-type/schema/generate-example" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -814,7 +814,7 @@ func (a *EventTypeApiService) V1EventTypeGetExecute(r ApiV1EventTypeGetRequest) return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/event-type/{event_type_name}/" + localVarPath := localBasePath + "/api/v1/event-type/{event_type_name}" localVarPath = strings.Replace(localVarPath, "{"+"event_type_name"+"}", _neturl.PathEscape(parameterToString(r.eventTypeName, "")), -1) localVarHeaderParams := make(map[string]string) @@ -992,7 +992,7 @@ func (a *EventTypeApiService) V1EventTypeGetRetryScheduleExecute(r ApiV1EventTyp return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/event-type/{event_type_name}/retry-schedule/" + localVarPath := localBasePath + "/api/v1/event-type/{event_type_name}/retry-schedule" localVarPath = strings.Replace(localVarPath, "{"+"event_type_name"+"}", _neturl.PathEscape(parameterToString(r.eventTypeName, "")), -1) localVarHeaderParams := make(map[string]string) @@ -1181,7 +1181,7 @@ func (a *EventTypeApiService) V1EventTypeImportOpenapiExecute(r ApiV1EventTypeIm return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/event-type/import/openapi/" + localVarPath := localBasePath + "/api/v1/event-type/import/openapi" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -1385,7 +1385,7 @@ func (a *EventTypeApiService) V1EventTypeListExecute(r ApiV1EventTypeListRequest return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/event-type/" + localVarPath := localBasePath + "/api/v1/event-type" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -1579,7 +1579,7 @@ func (a *EventTypeApiService) V1EventTypePatchExecute(r ApiV1EventTypePatchReque return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/event-type/{event_type_name}/" + localVarPath := localBasePath + "/api/v1/event-type/{event_type_name}" localVarPath = strings.Replace(localVarPath, "{"+"event_type_name"+"}", _neturl.PathEscape(parameterToString(r.eventTypeName, "")), -1) localVarHeaderParams := make(map[string]string) @@ -1767,7 +1767,7 @@ func (a *EventTypeApiService) V1EventTypeUpdateExecute(r ApiV1EventTypeUpdateReq return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/event-type/{event_type_name}/" + localVarPath := localBasePath + "/api/v1/event-type/{event_type_name}" localVarPath = strings.Replace(localVarPath, "{"+"event_type_name"+"}", _neturl.PathEscape(parameterToString(r.eventTypeName, "")), -1) localVarHeaderParams := make(map[string]string) @@ -1955,7 +1955,7 @@ func (a *EventTypeApiService) V1EventTypeUpdateRetryScheduleExecute(r ApiV1Event return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/event-type/{event_type_name}/retry-schedule/" + localVarPath := localBasePath + "/api/v1/event-type/{event_type_name}/retry-schedule" localVarPath = strings.Replace(localVarPath, "{"+"event_type_name"+"}", _neturl.PathEscape(parameterToString(r.eventTypeName, "")), -1) localVarHeaderParams := make(map[string]string) diff --git a/go/internal/openapi/api_events.go b/go/internal/openapi/api_events.go new file mode 100644 index 000000000..75af19104 --- /dev/null +++ b/go/internal/openapi/api_events.go @@ -0,0 +1,247 @@ +/* + * 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 ( + "bytes" + _context "context" + _ioutil "io/ioutil" + _nethttp "net/http" + _neturl "net/url" + "reflect" +) + +// Linger please +var ( + _ _context.Context +) + +// EventsApiService EventsApi service +type EventsApiService service + +type ApiV1EventsRequest struct { + ctx _context.Context + ApiService *EventsApiService + limit *int32 + iterator *string + eventTypes *[]string + channels *[]string +} + +func (r ApiV1EventsRequest) Limit(limit int32) ApiV1EventsRequest { + r.limit = &limit + return r +} +func (r ApiV1EventsRequest) Iterator(iterator string) ApiV1EventsRequest { + r.iterator = &iterator + return r +} +func (r ApiV1EventsRequest) EventTypes(eventTypes []string) ApiV1EventsRequest { + r.eventTypes = &eventTypes + return r +} +func (r ApiV1EventsRequest) Channels(channels []string) ApiV1EventsRequest { + r.channels = &channels + return r +} + +func (r ApiV1EventsRequest) Execute() (MessageStreamOut, *_nethttp.Response, error) { + return r.ApiService.V1EventsExecute(r) +} + +/* + * V1Events Events + * 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 + */ +func (a *EventsApiService) V1Events(ctx _context.Context) ApiV1EventsRequest { + return ApiV1EventsRequest{ + ApiService: a, + ctx: ctx, + } +} + +/* + * Execute executes the request + * @return MessageStreamOut + */ +func (a *EventsApiService) V1EventsExecute(r ApiV1EventsRequest) (MessageStreamOut, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue MessageStreamOut + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EventsApiService.V1Events") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/events" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + if r.limit != nil { + localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) + } + if r.iterator != nil { + localVarQueryParams.Add("iterator", parameterToString(*r.iterator, "")) + } + if r.eventTypes != nil { + t := *r.eventTypes + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + localVarQueryParams.Add("event_types", parameterToString(s.Index(i), "multi")) + } + } else { + localVarQueryParams.Add("event_types", parameterToString(t, "multi")) + } + } + if r.channels != nil { + t := *r.channels + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + localVarQueryParams.Add("channels", parameterToString(s.Index(i), "multi")) + } + } else { + localVarQueryParams.Add("channels", parameterToString(t, "multi")) + } + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v HttpErrorOut + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v HttpErrorOut + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v HttpErrorOut + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v HttpErrorOut + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v HttpErrorOut + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v HttpErrorOut + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/go/internal/openapi/api_health.go b/go/internal/openapi/api_health.go index 02d504cad..1d5db9a02 100644 --- a/go/internal/openapi/api_health.go +++ b/go/internal/openapi/api_health.go @@ -66,7 +66,7 @@ func (a *HealthApiService) V1HealthGetExecute(r ApiV1HealthGetRequest) (*_nethtt return nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/health/" + localVarPath := localBasePath + "/api/v1/health" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} diff --git a/go/internal/openapi/api_inbound.go b/go/internal/openapi/api_inbound.go index faeae00a8..58079299a 100644 --- a/go/internal/openapi/api_inbound.go +++ b/go/internal/openapi/api_inbound.go @@ -90,7 +90,7 @@ func (a *InboundApiService) V1InboundMsgExecute(r ApiV1InboundMsgRequest) (Messa return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/app/{app_id}/inbound/msg/{inbound_token}/" + localVarPath := localBasePath + "/api/v1/app/{app_id}/inbound/msg/{inbound_token}" localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", _neturl.PathEscape(parameterToString(r.appId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"inbound_token"+"}", _neturl.PathEscape(parameterToString(r.inboundToken, "")), -1) @@ -289,7 +289,7 @@ func (a *InboundApiService) V1InboundRotateUrlExecute(r ApiV1InboundRotateUrlReq return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/app/{app_id}/inbound/rotate-url/" + localVarPath := localBasePath + "/api/v1/app/{app_id}/inbound/rotate-url" localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", _neturl.PathEscape(parameterToString(r.appId, "")), -1) localVarHeaderParams := make(map[string]string) diff --git a/go/internal/openapi/api_integration.go b/go/internal/openapi/api_integration.go index 8b526c579..e7ec8cef9 100644 --- a/go/internal/openapi/api_integration.go +++ b/go/internal/openapi/api_integration.go @@ -82,7 +82,7 @@ func (a *IntegrationApiService) V1IntegrationCreateExecute(r ApiV1IntegrationCre return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/app/{app_id}/integration/" + localVarPath := localBasePath + "/api/v1/app/{app_id}/integration" localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", _neturl.PathEscape(parameterToString(r.appId, "")), -1) localVarHeaderParams := make(map[string]string) @@ -272,7 +272,7 @@ func (a *IntegrationApiService) V1IntegrationDeleteExecute(r ApiV1IntegrationDel return nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/app/{app_id}/integration/{integ_id}/" + localVarPath := localBasePath + "/api/v1/app/{app_id}/integration/{integ_id}" localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", _neturl.PathEscape(parameterToString(r.appId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"integ_id"+"}", _neturl.PathEscape(parameterToString(r.integId, "")), -1) @@ -448,7 +448,7 @@ func (a *IntegrationApiService) V1IntegrationGetExecute(r ApiV1IntegrationGetReq return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/app/{app_id}/integration/{integ_id}/" + localVarPath := localBasePath + "/api/v1/app/{app_id}/integration/{integ_id}" localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", _neturl.PathEscape(parameterToString(r.appId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"integ_id"+"}", _neturl.PathEscape(parameterToString(r.integId, "")), -1) @@ -633,7 +633,7 @@ func (a *IntegrationApiService) V1IntegrationGetKeyExecute(r ApiV1IntegrationGet return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/app/{app_id}/integration/{integ_id}/key/" + localVarPath := localBasePath + "/api/v1/app/{app_id}/integration/{integ_id}/key" localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", _neturl.PathEscape(parameterToString(r.appId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"integ_id"+"}", _neturl.PathEscape(parameterToString(r.integId, "")), -1) @@ -776,6 +776,7 @@ type ApiV1IntegrationListRequest struct { appId string limit *int32 iterator *string + order *Ordering } func (r ApiV1IntegrationListRequest) Limit(limit int32) ApiV1IntegrationListRequest { @@ -786,6 +787,10 @@ func (r ApiV1IntegrationListRequest) Iterator(iterator string) ApiV1IntegrationL r.iterator = &iterator return r } +func (r ApiV1IntegrationListRequest) Order(order Ordering) ApiV1IntegrationListRequest { + r.order = &order + return r +} func (r ApiV1IntegrationListRequest) Execute() (ListResponseIntegrationOut, *_nethttp.Response, error) { return r.ApiService.V1IntegrationListExecute(r) @@ -825,7 +830,7 @@ func (a *IntegrationApiService) V1IntegrationListExecute(r ApiV1IntegrationListR return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/app/{app_id}/integration/" + localVarPath := localBasePath + "/api/v1/app/{app_id}/integration" localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", _neturl.PathEscape(parameterToString(r.appId, "")), -1) localVarHeaderParams := make(map[string]string) @@ -844,6 +849,9 @@ func (a *IntegrationApiService) V1IntegrationListExecute(r ApiV1IntegrationListR if r.iterator != nil { localVarQueryParams.Add("iterator", parameterToString(*r.iterator, "")) } + if r.order != nil { + localVarQueryParams.Add("order", parameterToString(*r.order, "")) + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1020,7 +1028,7 @@ func (a *IntegrationApiService) V1IntegrationRotateKeyExecute(r ApiV1Integration return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/app/{app_id}/integration/{integ_id}/key/rotate/" + localVarPath := localBasePath + "/api/v1/app/{app_id}/integration/{integ_id}/key/rotate" localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", _neturl.PathEscape(parameterToString(r.appId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"integ_id"+"}", _neturl.PathEscape(parameterToString(r.integId, "")), -1) @@ -1213,7 +1221,7 @@ func (a *IntegrationApiService) V1IntegrationUpdateExecute(r ApiV1IntegrationUpd return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/app/{app_id}/integration/{integ_id}/" + localVarPath := localBasePath + "/api/v1/app/{app_id}/integration/{integ_id}" localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", _neturl.PathEscape(parameterToString(r.appId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"integ_id"+"}", _neturl.PathEscape(parameterToString(r.integId, "")), -1) diff --git a/go/internal/openapi/api_message.go b/go/internal/openapi/api_message.go index 40eb9a9cd..c81f603a8 100644 --- a/go/internal/openapi/api_message.go +++ b/go/internal/openapi/api_message.go @@ -88,7 +88,7 @@ func (a *MessageApiService) CreateMessageAttemptForEndpointExecute(r ApiCreateMe return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/app/{app_id}/endpoint/{endpoint_id}/msg/test-attempt/" + localVarPath := localBasePath + "/api/v1/app/{app_id}/endpoint/{endpoint_id}/msg/test-attempt" localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", _neturl.PathEscape(parameterToString(r.appId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"endpoint_id"+"}", _neturl.PathEscape(parameterToString(r.endpointId, "")), -1) @@ -307,7 +307,7 @@ func (a *MessageApiService) V1MessageCreateExecute(r ApiV1MessageCreateRequest) return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/app/{app_id}/msg/" + localVarPath := localBasePath + "/api/v1/app/{app_id}/msg" localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", _neturl.PathEscape(parameterToString(r.appId, "")), -1) localVarHeaderParams := make(map[string]string) @@ -512,7 +512,7 @@ func (a *MessageApiService) V1MessageExpungeContentExecute(r ApiV1MessageExpunge return nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/app/{app_id}/msg/{msg_id}/content/" + localVarPath := localBasePath + "/api/v1/app/{app_id}/msg/{msg_id}/content" localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", _neturl.PathEscape(parameterToString(r.appId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"msg_id"+"}", _neturl.PathEscape(parameterToString(r.msgId, "")), -1) @@ -699,7 +699,7 @@ func (a *MessageApiService) V1MessageGetExecute(r ApiV1MessageGetRequest) (Messa return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/app/{app_id}/msg/{msg_id}/" + localVarPath := localBasePath + "/api/v1/app/{app_id}/msg/{msg_id}" localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", _neturl.PathEscape(parameterToString(r.appId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"msg_id"+"}", _neturl.PathEscape(parameterToString(r.msgId, "")), -1) @@ -893,7 +893,7 @@ func (a *MessageApiService) V1MessageGetRawPayloadExecute(r ApiV1MessageGetRawPa return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/app/{app_id}/msg/{msg_id}/raw/" + localVarPath := localBasePath + "/api/v1/app/{app_id}/msg/{msg_id}/raw" localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", _neturl.PathEscape(parameterToString(r.appId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"msg_id"+"}", _neturl.PathEscape(parameterToString(r.msgId, "")), -1) @@ -1130,7 +1130,7 @@ func (a *MessageApiService) V1MessageListExecute(r ApiV1MessageListRequest) (Lis return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/app/{app_id}/msg/" + localVarPath := localBasePath + "/api/v1/app/{app_id}/msg" localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", _neturl.PathEscape(parameterToString(r.appId, "")), -1) localVarHeaderParams := make(map[string]string) @@ -1363,7 +1363,7 @@ func (a *MessageApiService) V1MessageStreamExecute(r ApiV1MessageStreamRequest) return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/app/{app_id}/events/" + localVarPath := localBasePath + "/api/v1/app/{app_id}/events" localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", _neturl.PathEscape(parameterToString(r.appId, "")), -1) localVarHeaderParams := make(map[string]string) diff --git a/go/internal/openapi/api_message_attempt.go b/go/internal/openapi/api_message_attempt.go index 9e755dc12..52b092c76 100644 --- a/go/internal/openapi/api_message_attempt.go +++ b/go/internal/openapi/api_message_attempt.go @@ -78,7 +78,7 @@ func (a *MessageAttemptApiService) V1MessageAttemptExpungeContentExecute(r ApiV1 return nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/app/{app_id}/msg/{msg_id}/attempt/{attempt_id}/content/" + localVarPath := localBasePath + "/api/v1/app/{app_id}/msg/{msg_id}/attempt/{attempt_id}/content" localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", _neturl.PathEscape(parameterToString(r.appId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"msg_id"+"}", _neturl.PathEscape(parameterToString(r.msgId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"attempt_id"+"}", _neturl.PathEscape(parameterToString(r.attemptId, "")), -1) @@ -264,7 +264,7 @@ func (a *MessageAttemptApiService) V1MessageAttemptGetExecute(r ApiV1MessageAtte return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/app/{app_id}/msg/{msg_id}/attempt/{attempt_id}/" + localVarPath := localBasePath + "/api/v1/app/{app_id}/msg/{msg_id}/attempt/{attempt_id}" localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", _neturl.PathEscape(parameterToString(r.appId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"msg_id"+"}", _neturl.PathEscape(parameterToString(r.msgId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"attempt_id"+"}", _neturl.PathEscape(parameterToString(r.attemptId, "")), -1) @@ -459,7 +459,7 @@ func (a *MessageAttemptApiService) V1MessageAttemptGetHeadersExecute(r ApiV1Mess return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/app/{app_id}/msg/{msg_id}/attempt/{attempt_id}/headers/" + localVarPath := localBasePath + "/api/v1/app/{app_id}/msg/{msg_id}/attempt/{attempt_id}/headers" localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", _neturl.PathEscape(parameterToString(r.appId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"msg_id"+"}", _neturl.PathEscape(parameterToString(r.msgId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"attempt_id"+"}", _neturl.PathEscape(parameterToString(r.attemptId, "")), -1) @@ -662,7 +662,7 @@ func (a *MessageAttemptApiService) V1MessageAttemptListAttemptedDestinationsExec return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/app/{app_id}/msg/{msg_id}/endpoint/" + localVarPath := localBasePath + "/api/v1/app/{app_id}/msg/{msg_id}/endpoint" localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", _neturl.PathEscape(parameterToString(r.appId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"msg_id"+"}", _neturl.PathEscape(parameterToString(r.msgId, "")), -1) @@ -912,7 +912,7 @@ func (a *MessageAttemptApiService) V1MessageAttemptListAttemptedMessagesExecute( return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/app/{app_id}/endpoint/{endpoint_id}/msg/" + localVarPath := localBasePath + "/api/v1/app/{app_id}/endpoint/{endpoint_id}/msg" localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", _neturl.PathEscape(parameterToString(r.appId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"endpoint_id"+"}", _neturl.PathEscape(parameterToString(r.endpointId, "")), -1) @@ -1199,7 +1199,7 @@ func (a *MessageAttemptApiService) V1MessageAttemptListByEndpointExecute(r ApiV1 return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/app/{app_id}/attempt/endpoint/{endpoint_id}/" + localVarPath := localBasePath + "/api/v1/app/{app_id}/attempt/endpoint/{endpoint_id}" localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", _neturl.PathEscape(parameterToString(r.appId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"endpoint_id"+"}", _neturl.PathEscape(parameterToString(r.endpointId, "")), -1) @@ -1486,7 +1486,7 @@ func (a *MessageAttemptApiService) V1MessageAttemptListByEndpointDeprecatedExecu return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/app/{app_id}/msg/{msg_id}/endpoint/{endpoint_id}/attempt/" + localVarPath := localBasePath + "/api/v1/app/{app_id}/msg/{msg_id}/endpoint/{endpoint_id}/attempt" localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", _neturl.PathEscape(parameterToString(r.appId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"msg_id"+"}", _neturl.PathEscape(parameterToString(r.msgId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"endpoint_id"+"}", _neturl.PathEscape(parameterToString(r.endpointId, "")), -1) @@ -1777,7 +1777,7 @@ func (a *MessageAttemptApiService) V1MessageAttemptListByMsgExecute(r ApiV1Messa return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/app/{app_id}/attempt/msg/{msg_id}/" + localVarPath := localBasePath + "/api/v1/app/{app_id}/attempt/msg/{msg_id}" localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", _neturl.PathEscape(parameterToString(r.appId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"msg_id"+"}", _neturl.PathEscape(parameterToString(r.msgId, "")), -1) @@ -2066,7 +2066,7 @@ func (a *MessageAttemptApiService) V1MessageAttemptListByMsgDeprecatedExecute(r return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/app/{app_id}/msg/{msg_id}/attempt/" + localVarPath := localBasePath + "/api/v1/app/{app_id}/msg/{msg_id}/attempt" localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", _neturl.PathEscape(parameterToString(r.appId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"msg_id"+"}", _neturl.PathEscape(parameterToString(r.msgId, "")), -1) @@ -2301,7 +2301,7 @@ func (a *MessageAttemptApiService) V1MessageAttemptResendExecute(r ApiV1MessageA return nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/app/{app_id}/msg/{msg_id}/endpoint/{endpoint_id}/resend/" + localVarPath := localBasePath + "/api/v1/app/{app_id}/msg/{msg_id}/endpoint/{endpoint_id}/resend" localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", _neturl.PathEscape(parameterToString(r.appId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"msg_id"+"}", _neturl.PathEscape(parameterToString(r.msgId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"endpoint_id"+"}", _neturl.PathEscape(parameterToString(r.endpointId, "")), -1) diff --git a/go/internal/openapi/api_statistics.go b/go/internal/openapi/api_statistics.go index 6f2d2a3dd..55db4b6d9 100644 --- a/go/internal/openapi/api_statistics.go +++ b/go/internal/openapi/api_statistics.go @@ -83,7 +83,7 @@ func (a *StatisticsApiService) V1StatisticsAggregateAppStatsExecute(r ApiV1Stati return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/stats/usage/app/" + localVarPath := localBasePath + "/api/v1/stats/usage/app" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -265,7 +265,7 @@ func (a *StatisticsApiService) V1StatisticsAggregateEventTypesExecute(r ApiV1Sta return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/stats/usage/event-types/" + localVarPath := localBasePath + "/api/v1/stats/usage/event-types" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -449,7 +449,7 @@ func (a *StatisticsApiService) V1StatsAppAttemptsExecute(r ApiV1StatsAppAttempts return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/stats/app/{app_id}/attempt/" + localVarPath := localBasePath + "/api/v1/stats/app/{app_id}/attempt" localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", _neturl.PathEscape(parameterToString(r.appId, "")), -1) localVarHeaderParams := make(map[string]string) @@ -649,7 +649,7 @@ func (a *StatisticsApiService) V1StatsEndpointAttemptsExecute(r ApiV1StatsEndpoi return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/stats/app/{app_id}/ep/{endpoint_id}/attempt/" + localVarPath := localBasePath + "/api/v1/stats/app/{app_id}/ep/{endpoint_id}/attempt" localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", _neturl.PathEscape(parameterToString(r.appId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"endpoint_id"+"}", _neturl.PathEscape(parameterToString(r.endpointId, "")), -1) diff --git a/go/internal/openapi/api_transformation_template.go b/go/internal/openapi/api_transformation_template.go index 7f1ffde5b..78814eead 100644 --- a/go/internal/openapi/api_transformation_template.go +++ b/go/internal/openapi/api_transformation_template.go @@ -79,7 +79,7 @@ func (a *TransformationTemplateApiService) V1TransformationTemplateCreateExecute return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/transformation-template/" + localVarPath := localBasePath + "/api/v1/transformation-template" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -801,7 +801,7 @@ func (a *TransformationTemplateApiService) V1TransformationTemplateListExecute(r return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/api/v1/transformation-template/" + localVarPath := localBasePath + "/api/v1/transformation-template" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} diff --git a/go/internal/openapi/client.go b/go/internal/openapi/client.go index 044aa4725..c57b31ab7 100644 --- a/go/internal/openapi/client.go +++ b/go/internal/openapi/client.go @@ -68,6 +68,8 @@ type APIClient struct { EventTypeApi *EventTypeApiService + EventsApi *EventsApiService + HealthApi *HealthApiService InboundApi *InboundApiService @@ -107,6 +109,7 @@ func NewAPIClient(cfg *Configuration) *APIClient { c.EnvironmentApi = (*EnvironmentApiService)(&c.common) c.EnvironmentSettingsApi = (*EnvironmentSettingsApiService)(&c.common) c.EventTypeApi = (*EventTypeApiService)(&c.common) + c.EventsApi = (*EventsApiService)(&c.common) c.HealthApi = (*HealthApiService)(&c.common) c.InboundApi = (*InboundApiService)(&c.common) c.IntegrationApi = (*IntegrationApiService)(&c.common) diff --git a/go/internal/openapi/model_custom_color_palette.go b/go/internal/openapi/model_custom_color_palette.go index a256bb9ae..37bb5449c 100644 --- a/go/internal/openapi/model_custom_color_palette.go +++ b/go/internal/openapi/model_custom_color_palette.go @@ -16,15 +16,15 @@ import ( // CustomColorPalette struct for CustomColorPalette type CustomColorPalette struct { - BackgroundHover *string `json:"backgroundHover,omitempty"` - BackgroundPrimary *string `json:"backgroundPrimary,omitempty"` - BackgroundSecondary *string `json:"backgroundSecondary,omitempty"` - ButtonPrimary *string `json:"buttonPrimary,omitempty"` - InteractiveAccent *string `json:"interactiveAccent,omitempty"` - NavigationAccent *string `json:"navigationAccent,omitempty"` - Primary *string `json:"primary,omitempty"` - TextDanger *string `json:"textDanger,omitempty"` - TextPrimary *string `json:"textPrimary,omitempty"` + BackgroundHover NullableString `json:"backgroundHover,omitempty"` + BackgroundPrimary NullableString `json:"backgroundPrimary,omitempty"` + BackgroundSecondary NullableString `json:"backgroundSecondary,omitempty"` + ButtonPrimary NullableString `json:"buttonPrimary,omitempty"` + InteractiveAccent NullableString `json:"interactiveAccent,omitempty"` + NavigationAccent NullableString `json:"navigationAccent,omitempty"` + Primary NullableString `json:"primary,omitempty"` + TextDanger NullableString `json:"textDanger,omitempty"` + TextPrimary NullableString `json:"textPrimary,omitempty"` } // NewCustomColorPalette instantiates a new CustomColorPalette object @@ -44,322 +44,412 @@ func NewCustomColorPaletteWithDefaults() *CustomColorPalette { return &this } -// GetBackgroundHover returns the BackgroundHover field value if set, zero value otherwise. +// GetBackgroundHover returns the BackgroundHover field value if set, zero value otherwise (both if not set or set to explicit null). func (o *CustomColorPalette) GetBackgroundHover() string { - if o == nil || o.BackgroundHover == nil { + if o == nil || o.BackgroundHover.Get() == nil { var ret string return ret } - return *o.BackgroundHover + return *o.BackgroundHover.Get() } // GetBackgroundHoverOk returns a tuple with the BackgroundHover field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *CustomColorPalette) GetBackgroundHoverOk() (*string, bool) { - if o == nil || o.BackgroundHover == nil { + if o == nil { return nil, false } - return o.BackgroundHover, true + return o.BackgroundHover.Get(), o.BackgroundHover.IsSet() } // HasBackgroundHover returns a boolean if a field has been set. func (o *CustomColorPalette) HasBackgroundHover() bool { - if o != nil && o.BackgroundHover != nil { + if o != nil && o.BackgroundHover.IsSet() { return true } return false } -// SetBackgroundHover gets a reference to the given string and assigns it to the BackgroundHover field. +// SetBackgroundHover gets a reference to the given NullableString and assigns it to the BackgroundHover field. func (o *CustomColorPalette) SetBackgroundHover(v string) { - o.BackgroundHover = &v + o.BackgroundHover.Set(&v) +} +// SetBackgroundHoverNil sets the value for BackgroundHover to be an explicit nil +func (o *CustomColorPalette) SetBackgroundHoverNil() { + o.BackgroundHover.Set(nil) +} + +// UnsetBackgroundHover ensures that no value is present for BackgroundHover, not even an explicit nil +func (o *CustomColorPalette) UnsetBackgroundHover() { + o.BackgroundHover.Unset() } -// GetBackgroundPrimary returns the BackgroundPrimary field value if set, zero value otherwise. +// GetBackgroundPrimary returns the BackgroundPrimary field value if set, zero value otherwise (both if not set or set to explicit null). func (o *CustomColorPalette) GetBackgroundPrimary() string { - if o == nil || o.BackgroundPrimary == nil { + if o == nil || o.BackgroundPrimary.Get() == nil { var ret string return ret } - return *o.BackgroundPrimary + return *o.BackgroundPrimary.Get() } // GetBackgroundPrimaryOk returns a tuple with the BackgroundPrimary field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *CustomColorPalette) GetBackgroundPrimaryOk() (*string, bool) { - if o == nil || o.BackgroundPrimary == nil { + if o == nil { return nil, false } - return o.BackgroundPrimary, true + return o.BackgroundPrimary.Get(), o.BackgroundPrimary.IsSet() } // HasBackgroundPrimary returns a boolean if a field has been set. func (o *CustomColorPalette) HasBackgroundPrimary() bool { - if o != nil && o.BackgroundPrimary != nil { + if o != nil && o.BackgroundPrimary.IsSet() { return true } return false } -// SetBackgroundPrimary gets a reference to the given string and assigns it to the BackgroundPrimary field. +// SetBackgroundPrimary gets a reference to the given NullableString and assigns it to the BackgroundPrimary field. func (o *CustomColorPalette) SetBackgroundPrimary(v string) { - o.BackgroundPrimary = &v + o.BackgroundPrimary.Set(&v) +} +// SetBackgroundPrimaryNil sets the value for BackgroundPrimary to be an explicit nil +func (o *CustomColorPalette) SetBackgroundPrimaryNil() { + o.BackgroundPrimary.Set(nil) } -// GetBackgroundSecondary returns the BackgroundSecondary field value if set, zero value otherwise. +// UnsetBackgroundPrimary ensures that no value is present for BackgroundPrimary, not even an explicit nil +func (o *CustomColorPalette) UnsetBackgroundPrimary() { + o.BackgroundPrimary.Unset() +} + +// GetBackgroundSecondary returns the BackgroundSecondary field value if set, zero value otherwise (both if not set or set to explicit null). func (o *CustomColorPalette) GetBackgroundSecondary() string { - if o == nil || o.BackgroundSecondary == nil { + if o == nil || o.BackgroundSecondary.Get() == nil { var ret string return ret } - return *o.BackgroundSecondary + return *o.BackgroundSecondary.Get() } // GetBackgroundSecondaryOk returns a tuple with the BackgroundSecondary field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *CustomColorPalette) GetBackgroundSecondaryOk() (*string, bool) { - if o == nil || o.BackgroundSecondary == nil { + if o == nil { return nil, false } - return o.BackgroundSecondary, true + return o.BackgroundSecondary.Get(), o.BackgroundSecondary.IsSet() } // HasBackgroundSecondary returns a boolean if a field has been set. func (o *CustomColorPalette) HasBackgroundSecondary() bool { - if o != nil && o.BackgroundSecondary != nil { + if o != nil && o.BackgroundSecondary.IsSet() { return true } return false } -// SetBackgroundSecondary gets a reference to the given string and assigns it to the BackgroundSecondary field. +// SetBackgroundSecondary gets a reference to the given NullableString and assigns it to the BackgroundSecondary field. func (o *CustomColorPalette) SetBackgroundSecondary(v string) { - o.BackgroundSecondary = &v + o.BackgroundSecondary.Set(&v) +} +// SetBackgroundSecondaryNil sets the value for BackgroundSecondary to be an explicit nil +func (o *CustomColorPalette) SetBackgroundSecondaryNil() { + o.BackgroundSecondary.Set(nil) } -// GetButtonPrimary returns the ButtonPrimary field value if set, zero value otherwise. +// UnsetBackgroundSecondary ensures that no value is present for BackgroundSecondary, not even an explicit nil +func (o *CustomColorPalette) UnsetBackgroundSecondary() { + o.BackgroundSecondary.Unset() +} + +// GetButtonPrimary returns the ButtonPrimary field value if set, zero value otherwise (both if not set or set to explicit null). func (o *CustomColorPalette) GetButtonPrimary() string { - if o == nil || o.ButtonPrimary == nil { + if o == nil || o.ButtonPrimary.Get() == nil { var ret string return ret } - return *o.ButtonPrimary + return *o.ButtonPrimary.Get() } // GetButtonPrimaryOk returns a tuple with the ButtonPrimary field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *CustomColorPalette) GetButtonPrimaryOk() (*string, bool) { - if o == nil || o.ButtonPrimary == nil { + if o == nil { return nil, false } - return o.ButtonPrimary, true + return o.ButtonPrimary.Get(), o.ButtonPrimary.IsSet() } // HasButtonPrimary returns a boolean if a field has been set. func (o *CustomColorPalette) HasButtonPrimary() bool { - if o != nil && o.ButtonPrimary != nil { + if o != nil && o.ButtonPrimary.IsSet() { return true } return false } -// SetButtonPrimary gets a reference to the given string and assigns it to the ButtonPrimary field. +// SetButtonPrimary gets a reference to the given NullableString and assigns it to the ButtonPrimary field. func (o *CustomColorPalette) SetButtonPrimary(v string) { - o.ButtonPrimary = &v + o.ButtonPrimary.Set(&v) +} +// SetButtonPrimaryNil sets the value for ButtonPrimary to be an explicit nil +func (o *CustomColorPalette) SetButtonPrimaryNil() { + o.ButtonPrimary.Set(nil) } -// GetInteractiveAccent returns the InteractiveAccent field value if set, zero value otherwise. +// UnsetButtonPrimary ensures that no value is present for ButtonPrimary, not even an explicit nil +func (o *CustomColorPalette) UnsetButtonPrimary() { + o.ButtonPrimary.Unset() +} + +// GetInteractiveAccent returns the InteractiveAccent field value if set, zero value otherwise (both if not set or set to explicit null). func (o *CustomColorPalette) GetInteractiveAccent() string { - if o == nil || o.InteractiveAccent == nil { + if o == nil || o.InteractiveAccent.Get() == nil { var ret string return ret } - return *o.InteractiveAccent + return *o.InteractiveAccent.Get() } // GetInteractiveAccentOk returns a tuple with the InteractiveAccent field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *CustomColorPalette) GetInteractiveAccentOk() (*string, bool) { - if o == nil || o.InteractiveAccent == nil { + if o == nil { return nil, false } - return o.InteractiveAccent, true + return o.InteractiveAccent.Get(), o.InteractiveAccent.IsSet() } // HasInteractiveAccent returns a boolean if a field has been set. func (o *CustomColorPalette) HasInteractiveAccent() bool { - if o != nil && o.InteractiveAccent != nil { + if o != nil && o.InteractiveAccent.IsSet() { return true } return false } -// SetInteractiveAccent gets a reference to the given string and assigns it to the InteractiveAccent field. +// SetInteractiveAccent gets a reference to the given NullableString and assigns it to the InteractiveAccent field. func (o *CustomColorPalette) SetInteractiveAccent(v string) { - o.InteractiveAccent = &v + o.InteractiveAccent.Set(&v) +} +// SetInteractiveAccentNil sets the value for InteractiveAccent to be an explicit nil +func (o *CustomColorPalette) SetInteractiveAccentNil() { + o.InteractiveAccent.Set(nil) } -// GetNavigationAccent returns the NavigationAccent field value if set, zero value otherwise. +// UnsetInteractiveAccent ensures that no value is present for InteractiveAccent, not even an explicit nil +func (o *CustomColorPalette) UnsetInteractiveAccent() { + o.InteractiveAccent.Unset() +} + +// GetNavigationAccent returns the NavigationAccent field value if set, zero value otherwise (both if not set or set to explicit null). func (o *CustomColorPalette) GetNavigationAccent() string { - if o == nil || o.NavigationAccent == nil { + if o == nil || o.NavigationAccent.Get() == nil { var ret string return ret } - return *o.NavigationAccent + return *o.NavigationAccent.Get() } // GetNavigationAccentOk returns a tuple with the NavigationAccent field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *CustomColorPalette) GetNavigationAccentOk() (*string, bool) { - if o == nil || o.NavigationAccent == nil { + if o == nil { return nil, false } - return o.NavigationAccent, true + return o.NavigationAccent.Get(), o.NavigationAccent.IsSet() } // HasNavigationAccent returns a boolean if a field has been set. func (o *CustomColorPalette) HasNavigationAccent() bool { - if o != nil && o.NavigationAccent != nil { + if o != nil && o.NavigationAccent.IsSet() { return true } return false } -// SetNavigationAccent gets a reference to the given string and assigns it to the NavigationAccent field. +// SetNavigationAccent gets a reference to the given NullableString and assigns it to the NavigationAccent field. func (o *CustomColorPalette) SetNavigationAccent(v string) { - o.NavigationAccent = &v + o.NavigationAccent.Set(&v) +} +// SetNavigationAccentNil sets the value for NavigationAccent to be an explicit nil +func (o *CustomColorPalette) SetNavigationAccentNil() { + o.NavigationAccent.Set(nil) +} + +// UnsetNavigationAccent ensures that no value is present for NavigationAccent, not even an explicit nil +func (o *CustomColorPalette) UnsetNavigationAccent() { + o.NavigationAccent.Unset() } -// GetPrimary returns the Primary field value if set, zero value otherwise. +// GetPrimary returns the Primary field value if set, zero value otherwise (both if not set or set to explicit null). func (o *CustomColorPalette) GetPrimary() string { - if o == nil || o.Primary == nil { + if o == nil || o.Primary.Get() == nil { var ret string return ret } - return *o.Primary + return *o.Primary.Get() } // GetPrimaryOk returns a tuple with the Primary field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *CustomColorPalette) GetPrimaryOk() (*string, bool) { - if o == nil || o.Primary == nil { + if o == nil { return nil, false } - return o.Primary, true + return o.Primary.Get(), o.Primary.IsSet() } // HasPrimary returns a boolean if a field has been set. func (o *CustomColorPalette) HasPrimary() bool { - if o != nil && o.Primary != nil { + if o != nil && o.Primary.IsSet() { return true } return false } -// SetPrimary gets a reference to the given string and assigns it to the Primary field. +// SetPrimary gets a reference to the given NullableString and assigns it to the Primary field. func (o *CustomColorPalette) SetPrimary(v string) { - o.Primary = &v + o.Primary.Set(&v) +} +// SetPrimaryNil sets the value for Primary to be an explicit nil +func (o *CustomColorPalette) SetPrimaryNil() { + o.Primary.Set(nil) +} + +// UnsetPrimary ensures that no value is present for Primary, not even an explicit nil +func (o *CustomColorPalette) UnsetPrimary() { + o.Primary.Unset() } -// GetTextDanger returns the TextDanger field value if set, zero value otherwise. +// GetTextDanger returns the TextDanger field value if set, zero value otherwise (both if not set or set to explicit null). func (o *CustomColorPalette) GetTextDanger() string { - if o == nil || o.TextDanger == nil { + if o == nil || o.TextDanger.Get() == nil { var ret string return ret } - return *o.TextDanger + return *o.TextDanger.Get() } // GetTextDangerOk returns a tuple with the TextDanger field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *CustomColorPalette) GetTextDangerOk() (*string, bool) { - if o == nil || o.TextDanger == nil { + if o == nil { return nil, false } - return o.TextDanger, true + return o.TextDanger.Get(), o.TextDanger.IsSet() } // HasTextDanger returns a boolean if a field has been set. func (o *CustomColorPalette) HasTextDanger() bool { - if o != nil && o.TextDanger != nil { + if o != nil && o.TextDanger.IsSet() { return true } return false } -// SetTextDanger gets a reference to the given string and assigns it to the TextDanger field. +// SetTextDanger gets a reference to the given NullableString and assigns it to the TextDanger field. func (o *CustomColorPalette) SetTextDanger(v string) { - o.TextDanger = &v + o.TextDanger.Set(&v) +} +// SetTextDangerNil sets the value for TextDanger to be an explicit nil +func (o *CustomColorPalette) SetTextDangerNil() { + o.TextDanger.Set(nil) +} + +// UnsetTextDanger ensures that no value is present for TextDanger, not even an explicit nil +func (o *CustomColorPalette) UnsetTextDanger() { + o.TextDanger.Unset() } -// GetTextPrimary returns the TextPrimary field value if set, zero value otherwise. +// GetTextPrimary returns the TextPrimary field value if set, zero value otherwise (both if not set or set to explicit null). func (o *CustomColorPalette) GetTextPrimary() string { - if o == nil || o.TextPrimary == nil { + if o == nil || o.TextPrimary.Get() == nil { var ret string return ret } - return *o.TextPrimary + return *o.TextPrimary.Get() } // GetTextPrimaryOk returns a tuple with the TextPrimary field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *CustomColorPalette) GetTextPrimaryOk() (*string, bool) { - if o == nil || o.TextPrimary == nil { + if o == nil { return nil, false } - return o.TextPrimary, true + return o.TextPrimary.Get(), o.TextPrimary.IsSet() } // HasTextPrimary returns a boolean if a field has been set. func (o *CustomColorPalette) HasTextPrimary() bool { - if o != nil && o.TextPrimary != nil { + if o != nil && o.TextPrimary.IsSet() { return true } return false } -// SetTextPrimary gets a reference to the given string and assigns it to the TextPrimary field. +// SetTextPrimary gets a reference to the given NullableString and assigns it to the TextPrimary field. func (o *CustomColorPalette) SetTextPrimary(v string) { - o.TextPrimary = &v + o.TextPrimary.Set(&v) +} +// SetTextPrimaryNil sets the value for TextPrimary to be an explicit nil +func (o *CustomColorPalette) SetTextPrimaryNil() { + o.TextPrimary.Set(nil) +} + +// UnsetTextPrimary ensures that no value is present for TextPrimary, not even an explicit nil +func (o *CustomColorPalette) UnsetTextPrimary() { + o.TextPrimary.Unset() } func (o CustomColorPalette) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.BackgroundHover != nil { - toSerialize["backgroundHover"] = o.BackgroundHover + if o.BackgroundHover.IsSet() { + toSerialize["backgroundHover"] = o.BackgroundHover.Get() } - if o.BackgroundPrimary != nil { - toSerialize["backgroundPrimary"] = o.BackgroundPrimary + if o.BackgroundPrimary.IsSet() { + toSerialize["backgroundPrimary"] = o.BackgroundPrimary.Get() } - if o.BackgroundSecondary != nil { - toSerialize["backgroundSecondary"] = o.BackgroundSecondary + if o.BackgroundSecondary.IsSet() { + toSerialize["backgroundSecondary"] = o.BackgroundSecondary.Get() } - if o.ButtonPrimary != nil { - toSerialize["buttonPrimary"] = o.ButtonPrimary + if o.ButtonPrimary.IsSet() { + toSerialize["buttonPrimary"] = o.ButtonPrimary.Get() } - if o.InteractiveAccent != nil { - toSerialize["interactiveAccent"] = o.InteractiveAccent + if o.InteractiveAccent.IsSet() { + toSerialize["interactiveAccent"] = o.InteractiveAccent.Get() } - if o.NavigationAccent != nil { - toSerialize["navigationAccent"] = o.NavigationAccent + if o.NavigationAccent.IsSet() { + toSerialize["navigationAccent"] = o.NavigationAccent.Get() } - if o.Primary != nil { - toSerialize["primary"] = o.Primary + if o.Primary.IsSet() { + toSerialize["primary"] = o.Primary.Get() } - if o.TextDanger != nil { - toSerialize["textDanger"] = o.TextDanger + if o.TextDanger.IsSet() { + toSerialize["textDanger"] = o.TextDanger.Get() } - if o.TextPrimary != nil { - toSerialize["textPrimary"] = o.TextPrimary + if o.TextPrimary.IsSet() { + toSerialize["textPrimary"] = o.TextPrimary.Get() } return json.Marshal(toSerialize) } diff --git a/go/internal/openapi/model_endpoint_oauth_config_in.go b/go/internal/openapi/model_endpoint_oauth_config_in.go new file mode 100644 index 000000000..f8f5c85ce --- /dev/null +++ b/go/internal/openapi/model_endpoint_oauth_config_in.go @@ -0,0 +1,195 @@ +/* + * 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" +) + +// EndpointOauthConfigIn struct for EndpointOauthConfigIn +type EndpointOauthConfigIn struct { + AuthMethod Oauth2AuthMethod `json:"authMethod"` + ClientId string `json:"clientId"` + GrantType Oauth2GrantType `json:"grantType"` + TokenUrl string `json:"tokenUrl"` +} + +// NewEndpointOauthConfigIn instantiates a new EndpointOauthConfigIn 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 NewEndpointOauthConfigIn(authMethod Oauth2AuthMethod, clientId string, grantType Oauth2GrantType, tokenUrl string) *EndpointOauthConfigIn { + this := EndpointOauthConfigIn{} + this.AuthMethod = authMethod + this.ClientId = clientId + this.GrantType = grantType + this.TokenUrl = tokenUrl + return &this +} + +// NewEndpointOauthConfigInWithDefaults instantiates a new EndpointOauthConfigIn 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 NewEndpointOauthConfigInWithDefaults() *EndpointOauthConfigIn { + this := EndpointOauthConfigIn{} + return &this +} + +// GetAuthMethod returns the AuthMethod field value +func (o *EndpointOauthConfigIn) GetAuthMethod() Oauth2AuthMethod { + if o == nil { + var ret Oauth2AuthMethod + return ret + } + + return o.AuthMethod +} + +// GetAuthMethodOk returns a tuple with the AuthMethod field value +// and a boolean to check if the value has been set. +func (o *EndpointOauthConfigIn) GetAuthMethodOk() (*Oauth2AuthMethod, bool) { + if o == nil { + return nil, false + } + return &o.AuthMethod, true +} + +// SetAuthMethod sets field value +func (o *EndpointOauthConfigIn) SetAuthMethod(v Oauth2AuthMethod) { + o.AuthMethod = v +} + +// GetClientId returns the ClientId field value +func (o *EndpointOauthConfigIn) GetClientId() string { + if o == nil { + var ret string + return ret + } + + return o.ClientId +} + +// GetClientIdOk returns a tuple with the ClientId field value +// and a boolean to check if the value has been set. +func (o *EndpointOauthConfigIn) GetClientIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ClientId, true +} + +// SetClientId sets field value +func (o *EndpointOauthConfigIn) SetClientId(v string) { + o.ClientId = v +} + +// GetGrantType returns the GrantType field value +func (o *EndpointOauthConfigIn) GetGrantType() Oauth2GrantType { + if o == nil { + var ret Oauth2GrantType + return ret + } + + return o.GrantType +} + +// GetGrantTypeOk returns a tuple with the GrantType field value +// and a boolean to check if the value has been set. +func (o *EndpointOauthConfigIn) GetGrantTypeOk() (*Oauth2GrantType, bool) { + if o == nil { + return nil, false + } + return &o.GrantType, true +} + +// SetGrantType sets field value +func (o *EndpointOauthConfigIn) SetGrantType(v Oauth2GrantType) { + o.GrantType = v +} + +// GetTokenUrl returns the TokenUrl field value +func (o *EndpointOauthConfigIn) GetTokenUrl() string { + if o == nil { + var ret string + return ret + } + + return o.TokenUrl +} + +// GetTokenUrlOk returns a tuple with the TokenUrl field value +// and a boolean to check if the value has been set. +func (o *EndpointOauthConfigIn) GetTokenUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TokenUrl, true +} + +// SetTokenUrl sets field value +func (o *EndpointOauthConfigIn) SetTokenUrl(v string) { + o.TokenUrl = v +} + +func (o EndpointOauthConfigIn) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["authMethod"] = o.AuthMethod + } + if true { + toSerialize["clientId"] = o.ClientId + } + if true { + toSerialize["grantType"] = o.GrantType + } + if true { + toSerialize["tokenUrl"] = o.TokenUrl + } + return json.Marshal(toSerialize) +} + +type NullableEndpointOauthConfigIn struct { + value *EndpointOauthConfigIn + isSet bool +} + +func (v NullableEndpointOauthConfigIn) Get() *EndpointOauthConfigIn { + return v.value +} + +func (v *NullableEndpointOauthConfigIn) Set(val *EndpointOauthConfigIn) { + v.value = val + v.isSet = true +} + +func (v NullableEndpointOauthConfigIn) IsSet() bool { + return v.isSet +} + +func (v *NullableEndpointOauthConfigIn) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEndpointOauthConfigIn(val *EndpointOauthConfigIn) *NullableEndpointOauthConfigIn { + return &NullableEndpointOauthConfigIn{value: val, isSet: true} +} + +func (v NullableEndpointOauthConfigIn) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEndpointOauthConfigIn) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/internal/openapi/model_environment_settings_out.go b/go/internal/openapi/model_environment_settings_out.go index 2af954682..f76720cb4 100644 --- a/go/internal/openapi/model_environment_settings_out.go +++ b/go/internal/openapi/model_environment_settings_out.go @@ -18,7 +18,7 @@ import ( type EnvironmentSettingsOut struct { ColorPaletteDark *CustomColorPalette `json:"colorPaletteDark,omitempty"` ColorPaletteLight *CustomColorPalette `json:"colorPaletteLight,omitempty"` - CustomColor *string `json:"customColor,omitempty"` + CustomColor NullableString `json:"customColor,omitempty"` CustomFontFamily NullableString `json:"customFontFamily,omitempty"` CustomFontFamilyUrl NullableString `json:"customFontFamilyUrl,omitempty"` CustomLogoUrl NullableString `json:"customLogoUrl,omitempty"` @@ -132,36 +132,46 @@ func (o *EnvironmentSettingsOut) SetColorPaletteLight(v CustomColorPalette) { o.ColorPaletteLight = &v } -// GetCustomColor returns the CustomColor field value if set, zero value otherwise. +// GetCustomColor returns the CustomColor field value if set, zero value otherwise (both if not set or set to explicit null). func (o *EnvironmentSettingsOut) GetCustomColor() string { - if o == nil || o.CustomColor == nil { + if o == nil || o.CustomColor.Get() == nil { var ret string return ret } - return *o.CustomColor + return *o.CustomColor.Get() } // GetCustomColorOk returns a tuple with the CustomColor field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *EnvironmentSettingsOut) GetCustomColorOk() (*string, bool) { - if o == nil || o.CustomColor == nil { + if o == nil { return nil, false } - return o.CustomColor, true + return o.CustomColor.Get(), o.CustomColor.IsSet() } // HasCustomColor returns a boolean if a field has been set. func (o *EnvironmentSettingsOut) HasCustomColor() bool { - if o != nil && o.CustomColor != nil { + if o != nil && o.CustomColor.IsSet() { return true } return false } -// SetCustomColor gets a reference to the given string and assigns it to the CustomColor field. +// SetCustomColor gets a reference to the given NullableString and assigns it to the CustomColor field. func (o *EnvironmentSettingsOut) SetCustomColor(v string) { - o.CustomColor = &v + o.CustomColor.Set(&v) +} +// SetCustomColorNil sets the value for CustomColor to be an explicit nil +func (o *EnvironmentSettingsOut) SetCustomColorNil() { + o.CustomColor.Set(nil) +} + +// UnsetCustomColor ensures that no value is present for CustomColor, not even an explicit nil +func (o *EnvironmentSettingsOut) UnsetCustomColor() { + o.CustomColor.Unset() } // GetCustomFontFamily returns the CustomFontFamily field value if set, zero value otherwise (both if not set or set to explicit null). @@ -532,8 +542,8 @@ func (o EnvironmentSettingsOut) MarshalJSON() ([]byte, error) { if o.ColorPaletteLight != nil { toSerialize["colorPaletteLight"] = o.ColorPaletteLight } - if o.CustomColor != nil { - toSerialize["customColor"] = o.CustomColor + if o.CustomColor.IsSet() { + toSerialize["customColor"] = o.CustomColor.Get() } if o.CustomFontFamily.IsSet() { toSerialize["customFontFamily"] = o.CustomFontFamily.Get() diff --git a/go/internal/openapi/model_oauth2_auth_method.go b/go/internal/openapi/model_oauth2_auth_method.go new file mode 100644 index 000000000..d150c00e2 --- /dev/null +++ b/go/internal/openapi/model_oauth2_auth_method.go @@ -0,0 +1,169 @@ +/* + * 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" + "fmt" +) + +// Oauth2AuthMethod - struct for Oauth2AuthMethod +type Oauth2AuthMethod struct { + Oauth2AuthMethodOneOf *Oauth2AuthMethodOneOf + Oauth2AuthMethodOneOf1 *Oauth2AuthMethodOneOf1 + Oauth2AuthMethodOneOf2 *Oauth2AuthMethodOneOf2 +} + +// Oauth2AuthMethodOneOfAsOauth2AuthMethod is a convenience function that returns Oauth2AuthMethodOneOf wrapped in Oauth2AuthMethod +func Oauth2AuthMethodOneOfAsOauth2AuthMethod(v *Oauth2AuthMethodOneOf) Oauth2AuthMethod { + return Oauth2AuthMethod{ Oauth2AuthMethodOneOf: v} +} + +// Oauth2AuthMethodOneOf1AsOauth2AuthMethod is a convenience function that returns Oauth2AuthMethodOneOf1 wrapped in Oauth2AuthMethod +func Oauth2AuthMethodOneOf1AsOauth2AuthMethod(v *Oauth2AuthMethodOneOf1) Oauth2AuthMethod { + return Oauth2AuthMethod{ Oauth2AuthMethodOneOf1: v} +} + +// Oauth2AuthMethodOneOf2AsOauth2AuthMethod is a convenience function that returns Oauth2AuthMethodOneOf2 wrapped in Oauth2AuthMethod +func Oauth2AuthMethodOneOf2AsOauth2AuthMethod(v *Oauth2AuthMethodOneOf2) Oauth2AuthMethod { + return Oauth2AuthMethod{ Oauth2AuthMethodOneOf2: v} +} + + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *Oauth2AuthMethod) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into Oauth2AuthMethodOneOf + err = json.Unmarshal(data, &dst.Oauth2AuthMethodOneOf) + if err == nil { + jsonOauth2AuthMethodOneOf, _ := json.Marshal(dst.Oauth2AuthMethodOneOf) + if string(jsonOauth2AuthMethodOneOf) == "{}" { // empty struct + dst.Oauth2AuthMethodOneOf = nil + } else { + match++ + } + } else { + dst.Oauth2AuthMethodOneOf = nil + } + + // try to unmarshal data into Oauth2AuthMethodOneOf1 + err = json.Unmarshal(data, &dst.Oauth2AuthMethodOneOf1) + if err == nil { + jsonOauth2AuthMethodOneOf1, _ := json.Marshal(dst.Oauth2AuthMethodOneOf1) + if string(jsonOauth2AuthMethodOneOf1) == "{}" { // empty struct + dst.Oauth2AuthMethodOneOf1 = nil + } else { + match++ + } + } else { + dst.Oauth2AuthMethodOneOf1 = nil + } + + // try to unmarshal data into Oauth2AuthMethodOneOf2 + err = json.Unmarshal(data, &dst.Oauth2AuthMethodOneOf2) + if err == nil { + jsonOauth2AuthMethodOneOf2, _ := json.Marshal(dst.Oauth2AuthMethodOneOf2) + if string(jsonOauth2AuthMethodOneOf2) == "{}" { // empty struct + dst.Oauth2AuthMethodOneOf2 = nil + } else { + match++ + } + } else { + dst.Oauth2AuthMethodOneOf2 = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.Oauth2AuthMethodOneOf = nil + dst.Oauth2AuthMethodOneOf1 = nil + dst.Oauth2AuthMethodOneOf2 = nil + + return fmt.Errorf("Data matches more than one schema in oneOf(Oauth2AuthMethod)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("Data failed to match schemas in oneOf(Oauth2AuthMethod)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src Oauth2AuthMethod) MarshalJSON() ([]byte, error) { + if src.Oauth2AuthMethodOneOf != nil { + return json.Marshal(&src.Oauth2AuthMethodOneOf) + } + + if src.Oauth2AuthMethodOneOf1 != nil { + return json.Marshal(&src.Oauth2AuthMethodOneOf1) + } + + if src.Oauth2AuthMethodOneOf2 != nil { + return json.Marshal(&src.Oauth2AuthMethodOneOf2) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *Oauth2AuthMethod) GetActualInstance() (interface{}) { + if obj.Oauth2AuthMethodOneOf != nil { + return obj.Oauth2AuthMethodOneOf + } + + if obj.Oauth2AuthMethodOneOf1 != nil { + return obj.Oauth2AuthMethodOneOf1 + } + + if obj.Oauth2AuthMethodOneOf2 != nil { + return obj.Oauth2AuthMethodOneOf2 + } + + // all schemas are nil + return nil +} + +type NullableOauth2AuthMethod struct { + value *Oauth2AuthMethod + isSet bool +} + +func (v NullableOauth2AuthMethod) Get() *Oauth2AuthMethod { + return v.value +} + +func (v *NullableOauth2AuthMethod) Set(val *Oauth2AuthMethod) { + v.value = val + v.isSet = true +} + +func (v NullableOauth2AuthMethod) IsSet() bool { + return v.isSet +} + +func (v *NullableOauth2AuthMethod) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOauth2AuthMethod(val *Oauth2AuthMethod) *NullableOauth2AuthMethod { + return &NullableOauth2AuthMethod{value: val, isSet: true} +} + +func (v NullableOauth2AuthMethod) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOauth2AuthMethod) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/internal/openapi/model_oauth2_auth_method_one_of.go b/go/internal/openapi/model_oauth2_auth_method_one_of.go new file mode 100644 index 000000000..7a3f857e2 --- /dev/null +++ b/go/internal/openapi/model_oauth2_auth_method_one_of.go @@ -0,0 +1,258 @@ +/* + * 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" +) + +// Oauth2AuthMethodOneOf struct for Oauth2AuthMethodOneOf +type Oauth2AuthMethodOneOf struct { + JwtSecretBase64 string `json:"jwtSecretBase64"` + JwtSecretId NullableString `json:"jwtSecretId,omitempty"` + SigningAlgorithm OauthJwsSigningAlgorithm `json:"signingAlgorithm"` + TokenExpirySecs NullableInt32 `json:"tokenExpirySecs,omitempty"` + Type string `json:"type"` +} + +// NewOauth2AuthMethodOneOf instantiates a new Oauth2AuthMethodOneOf 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 NewOauth2AuthMethodOneOf(jwtSecretBase64 string, signingAlgorithm OauthJwsSigningAlgorithm, type_ string) *Oauth2AuthMethodOneOf { + this := Oauth2AuthMethodOneOf{} + this.JwtSecretBase64 = jwtSecretBase64 + this.SigningAlgorithm = signingAlgorithm + this.Type = type_ + return &this +} + +// NewOauth2AuthMethodOneOfWithDefaults instantiates a new Oauth2AuthMethodOneOf 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 NewOauth2AuthMethodOneOfWithDefaults() *Oauth2AuthMethodOneOf { + this := Oauth2AuthMethodOneOf{} + return &this +} + +// GetJwtSecretBase64 returns the JwtSecretBase64 field value +func (o *Oauth2AuthMethodOneOf) GetJwtSecretBase64() string { + if o == nil { + var ret string + return ret + } + + return o.JwtSecretBase64 +} + +// GetJwtSecretBase64Ok returns a tuple with the JwtSecretBase64 field value +// and a boolean to check if the value has been set. +func (o *Oauth2AuthMethodOneOf) GetJwtSecretBase64Ok() (*string, bool) { + if o == nil { + return nil, false + } + return &o.JwtSecretBase64, true +} + +// SetJwtSecretBase64 sets field value +func (o *Oauth2AuthMethodOneOf) SetJwtSecretBase64(v string) { + o.JwtSecretBase64 = v +} + +// GetJwtSecretId returns the JwtSecretId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Oauth2AuthMethodOneOf) GetJwtSecretId() string { + if o == nil || o.JwtSecretId.Get() == nil { + var ret string + return ret + } + return *o.JwtSecretId.Get() +} + +// GetJwtSecretIdOk returns a tuple with the JwtSecretId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Oauth2AuthMethodOneOf) GetJwtSecretIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.JwtSecretId.Get(), o.JwtSecretId.IsSet() +} + +// HasJwtSecretId returns a boolean if a field has been set. +func (o *Oauth2AuthMethodOneOf) HasJwtSecretId() bool { + if o != nil && o.JwtSecretId.IsSet() { + return true + } + + return false +} + +// SetJwtSecretId gets a reference to the given NullableString and assigns it to the JwtSecretId field. +func (o *Oauth2AuthMethodOneOf) SetJwtSecretId(v string) { + o.JwtSecretId.Set(&v) +} +// SetJwtSecretIdNil sets the value for JwtSecretId to be an explicit nil +func (o *Oauth2AuthMethodOneOf) SetJwtSecretIdNil() { + o.JwtSecretId.Set(nil) +} + +// UnsetJwtSecretId ensures that no value is present for JwtSecretId, not even an explicit nil +func (o *Oauth2AuthMethodOneOf) UnsetJwtSecretId() { + o.JwtSecretId.Unset() +} + +// GetSigningAlgorithm returns the SigningAlgorithm field value +func (o *Oauth2AuthMethodOneOf) GetSigningAlgorithm() OauthJwsSigningAlgorithm { + if o == nil { + var ret OauthJwsSigningAlgorithm + return ret + } + + return o.SigningAlgorithm +} + +// GetSigningAlgorithmOk returns a tuple with the SigningAlgorithm field value +// and a boolean to check if the value has been set. +func (o *Oauth2AuthMethodOneOf) GetSigningAlgorithmOk() (*OauthJwsSigningAlgorithm, bool) { + if o == nil { + return nil, false + } + return &o.SigningAlgorithm, true +} + +// SetSigningAlgorithm sets field value +func (o *Oauth2AuthMethodOneOf) SetSigningAlgorithm(v OauthJwsSigningAlgorithm) { + o.SigningAlgorithm = v +} + +// GetTokenExpirySecs returns the TokenExpirySecs field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Oauth2AuthMethodOneOf) GetTokenExpirySecs() int32 { + if o == nil || o.TokenExpirySecs.Get() == nil { + var ret int32 + return ret + } + return *o.TokenExpirySecs.Get() +} + +// GetTokenExpirySecsOk returns a tuple with the TokenExpirySecs field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Oauth2AuthMethodOneOf) GetTokenExpirySecsOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.TokenExpirySecs.Get(), o.TokenExpirySecs.IsSet() +} + +// HasTokenExpirySecs returns a boolean if a field has been set. +func (o *Oauth2AuthMethodOneOf) HasTokenExpirySecs() bool { + if o != nil && o.TokenExpirySecs.IsSet() { + return true + } + + return false +} + +// SetTokenExpirySecs gets a reference to the given NullableInt32 and assigns it to the TokenExpirySecs field. +func (o *Oauth2AuthMethodOneOf) SetTokenExpirySecs(v int32) { + o.TokenExpirySecs.Set(&v) +} +// SetTokenExpirySecsNil sets the value for TokenExpirySecs to be an explicit nil +func (o *Oauth2AuthMethodOneOf) SetTokenExpirySecsNil() { + o.TokenExpirySecs.Set(nil) +} + +// UnsetTokenExpirySecs ensures that no value is present for TokenExpirySecs, not even an explicit nil +func (o *Oauth2AuthMethodOneOf) UnsetTokenExpirySecs() { + o.TokenExpirySecs.Unset() +} + +// GetType returns the Type field value +func (o *Oauth2AuthMethodOneOf) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *Oauth2AuthMethodOneOf) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *Oauth2AuthMethodOneOf) SetType(v string) { + o.Type = v +} + +func (o Oauth2AuthMethodOneOf) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["jwtSecretBase64"] = o.JwtSecretBase64 + } + if o.JwtSecretId.IsSet() { + toSerialize["jwtSecretId"] = o.JwtSecretId.Get() + } + if true { + toSerialize["signingAlgorithm"] = o.SigningAlgorithm + } + if o.TokenExpirySecs.IsSet() { + toSerialize["tokenExpirySecs"] = o.TokenExpirySecs.Get() + } + if true { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) +} + +type NullableOauth2AuthMethodOneOf struct { + value *Oauth2AuthMethodOneOf + isSet bool +} + +func (v NullableOauth2AuthMethodOneOf) Get() *Oauth2AuthMethodOneOf { + return v.value +} + +func (v *NullableOauth2AuthMethodOneOf) Set(val *Oauth2AuthMethodOneOf) { + v.value = val + v.isSet = true +} + +func (v NullableOauth2AuthMethodOneOf) IsSet() bool { + return v.isSet +} + +func (v *NullableOauth2AuthMethodOneOf) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOauth2AuthMethodOneOf(val *Oauth2AuthMethodOneOf) *NullableOauth2AuthMethodOneOf { + return &NullableOauth2AuthMethodOneOf{value: val, isSet: true} +} + +func (v NullableOauth2AuthMethodOneOf) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOauth2AuthMethodOneOf) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/internal/openapi/model_oauth2_auth_method_one_of_1.go b/go/internal/openapi/model_oauth2_auth_method_one_of_1.go new file mode 100644 index 000000000..22c869d02 --- /dev/null +++ b/go/internal/openapi/model_oauth2_auth_method_one_of_1.go @@ -0,0 +1,137 @@ +/* + * 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" +) + +// Oauth2AuthMethodOneOf1 struct for Oauth2AuthMethodOneOf1 +type Oauth2AuthMethodOneOf1 struct { + ClientSecret string `json:"clientSecret"` + Type string `json:"type"` +} + +// NewOauth2AuthMethodOneOf1 instantiates a new Oauth2AuthMethodOneOf1 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 NewOauth2AuthMethodOneOf1(clientSecret string, type_ string) *Oauth2AuthMethodOneOf1 { + this := Oauth2AuthMethodOneOf1{} + this.ClientSecret = clientSecret + this.Type = type_ + return &this +} + +// NewOauth2AuthMethodOneOf1WithDefaults instantiates a new Oauth2AuthMethodOneOf1 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 NewOauth2AuthMethodOneOf1WithDefaults() *Oauth2AuthMethodOneOf1 { + this := Oauth2AuthMethodOneOf1{} + return &this +} + +// GetClientSecret returns the ClientSecret field value +func (o *Oauth2AuthMethodOneOf1) GetClientSecret() string { + if o == nil { + var ret string + return ret + } + + return o.ClientSecret +} + +// GetClientSecretOk returns a tuple with the ClientSecret field value +// and a boolean to check if the value has been set. +func (o *Oauth2AuthMethodOneOf1) GetClientSecretOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ClientSecret, true +} + +// SetClientSecret sets field value +func (o *Oauth2AuthMethodOneOf1) SetClientSecret(v string) { + o.ClientSecret = v +} + +// GetType returns the Type field value +func (o *Oauth2AuthMethodOneOf1) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *Oauth2AuthMethodOneOf1) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *Oauth2AuthMethodOneOf1) SetType(v string) { + o.Type = v +} + +func (o Oauth2AuthMethodOneOf1) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["clientSecret"] = o.ClientSecret + } + if true { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) +} + +type NullableOauth2AuthMethodOneOf1 struct { + value *Oauth2AuthMethodOneOf1 + isSet bool +} + +func (v NullableOauth2AuthMethodOneOf1) Get() *Oauth2AuthMethodOneOf1 { + return v.value +} + +func (v *NullableOauth2AuthMethodOneOf1) Set(val *Oauth2AuthMethodOneOf1) { + v.value = val + v.isSet = true +} + +func (v NullableOauth2AuthMethodOneOf1) IsSet() bool { + return v.isSet +} + +func (v *NullableOauth2AuthMethodOneOf1) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOauth2AuthMethodOneOf1(val *Oauth2AuthMethodOneOf1) *NullableOauth2AuthMethodOneOf1 { + return &NullableOauth2AuthMethodOneOf1{value: val, isSet: true} +} + +func (v NullableOauth2AuthMethodOneOf1) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOauth2AuthMethodOneOf1) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/internal/openapi/model_oauth2_auth_method_one_of_2.go b/go/internal/openapi/model_oauth2_auth_method_one_of_2.go new file mode 100644 index 000000000..6eb598516 --- /dev/null +++ b/go/internal/openapi/model_oauth2_auth_method_one_of_2.go @@ -0,0 +1,137 @@ +/* + * 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" +) + +// Oauth2AuthMethodOneOf2 struct for Oauth2AuthMethodOneOf2 +type Oauth2AuthMethodOneOf2 struct { + ClientSecret string `json:"clientSecret"` + Type string `json:"type"` +} + +// NewOauth2AuthMethodOneOf2 instantiates a new Oauth2AuthMethodOneOf2 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 NewOauth2AuthMethodOneOf2(clientSecret string, type_ string) *Oauth2AuthMethodOneOf2 { + this := Oauth2AuthMethodOneOf2{} + this.ClientSecret = clientSecret + this.Type = type_ + return &this +} + +// NewOauth2AuthMethodOneOf2WithDefaults instantiates a new Oauth2AuthMethodOneOf2 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 NewOauth2AuthMethodOneOf2WithDefaults() *Oauth2AuthMethodOneOf2 { + this := Oauth2AuthMethodOneOf2{} + return &this +} + +// GetClientSecret returns the ClientSecret field value +func (o *Oauth2AuthMethodOneOf2) GetClientSecret() string { + if o == nil { + var ret string + return ret + } + + return o.ClientSecret +} + +// GetClientSecretOk returns a tuple with the ClientSecret field value +// and a boolean to check if the value has been set. +func (o *Oauth2AuthMethodOneOf2) GetClientSecretOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ClientSecret, true +} + +// SetClientSecret sets field value +func (o *Oauth2AuthMethodOneOf2) SetClientSecret(v string) { + o.ClientSecret = v +} + +// GetType returns the Type field value +func (o *Oauth2AuthMethodOneOf2) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *Oauth2AuthMethodOneOf2) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *Oauth2AuthMethodOneOf2) SetType(v string) { + o.Type = v +} + +func (o Oauth2AuthMethodOneOf2) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["clientSecret"] = o.ClientSecret + } + if true { + toSerialize["type"] = o.Type + } + return json.Marshal(toSerialize) +} + +type NullableOauth2AuthMethodOneOf2 struct { + value *Oauth2AuthMethodOneOf2 + isSet bool +} + +func (v NullableOauth2AuthMethodOneOf2) Get() *Oauth2AuthMethodOneOf2 { + return v.value +} + +func (v *NullableOauth2AuthMethodOneOf2) Set(val *Oauth2AuthMethodOneOf2) { + v.value = val + v.isSet = true +} + +func (v NullableOauth2AuthMethodOneOf2) IsSet() bool { + return v.isSet +} + +func (v *NullableOauth2AuthMethodOneOf2) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOauth2AuthMethodOneOf2(val *Oauth2AuthMethodOneOf2) *NullableOauth2AuthMethodOneOf2 { + return &NullableOauth2AuthMethodOneOf2{value: val, isSet: true} +} + +func (v NullableOauth2AuthMethodOneOf2) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOauth2AuthMethodOneOf2) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/go/internal/openapi/model_oauth2_grant_type.go b/go/internal/openapi/model_oauth2_grant_type.go new file mode 100644 index 000000000..37c03063f --- /dev/null +++ b/go/internal/openapi/model_oauth2_grant_type.go @@ -0,0 +1,108 @@ +/* + * 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" + "fmt" +) + +// Oauth2GrantType the model 'Oauth2GrantType' +type Oauth2GrantType string + +// List of Oauth2GrantType +const ( + OAUTH2GRANTTYPE_CLIENT_CREDENTIALS Oauth2GrantType = "clientCredentials" +) + +var allowedOauth2GrantTypeEnumValues = []Oauth2GrantType{ + "clientCredentials", +} + +func (v *Oauth2GrantType) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := Oauth2GrantType(value) + for _, existing := range allowedOauth2GrantTypeEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid Oauth2GrantType", value) +} + +// NewOauth2GrantTypeFromValue returns a pointer to a valid Oauth2GrantType +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewOauth2GrantTypeFromValue(v string) (*Oauth2GrantType, error) { + ev := Oauth2GrantType(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for Oauth2GrantType: valid values are %v", v, allowedOauth2GrantTypeEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v Oauth2GrantType) IsValid() bool { + for _, existing := range allowedOauth2GrantTypeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to Oauth2GrantType value +func (v Oauth2GrantType) Ptr() *Oauth2GrantType { + return &v +} + +type NullableOauth2GrantType struct { + value *Oauth2GrantType + isSet bool +} + +func (v NullableOauth2GrantType) Get() *Oauth2GrantType { + return v.value +} + +func (v *NullableOauth2GrantType) Set(val *Oauth2GrantType) { + v.value = val + v.isSet = true +} + +func (v NullableOauth2GrantType) IsSet() bool { + return v.isSet +} + +func (v *NullableOauth2GrantType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOauth2GrantType(val *Oauth2GrantType) *NullableOauth2GrantType { + return &NullableOauth2GrantType{value: val, isSet: true} +} + +func (v NullableOauth2GrantType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOauth2GrantType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/go/internal/openapi/model_oauth_jws_signing_algorithm.go b/go/internal/openapi/model_oauth_jws_signing_algorithm.go new file mode 100644 index 000000000..8959df277 --- /dev/null +++ b/go/internal/openapi/model_oauth_jws_signing_algorithm.go @@ -0,0 +1,108 @@ +/* + * 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" + "fmt" +) + +// OauthJwsSigningAlgorithm the model 'OauthJwsSigningAlgorithm' +type OauthJwsSigningAlgorithm string + +// List of OauthJwsSigningAlgorithm +const ( + OAUTHJWSSIGNINGALGORITHM_RS256 OauthJwsSigningAlgorithm = "RS256" +) + +var allowedOauthJwsSigningAlgorithmEnumValues = []OauthJwsSigningAlgorithm{ + "RS256", +} + +func (v *OauthJwsSigningAlgorithm) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := OauthJwsSigningAlgorithm(value) + for _, existing := range allowedOauthJwsSigningAlgorithmEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid OauthJwsSigningAlgorithm", value) +} + +// NewOauthJwsSigningAlgorithmFromValue returns a pointer to a valid OauthJwsSigningAlgorithm +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewOauthJwsSigningAlgorithmFromValue(v string) (*OauthJwsSigningAlgorithm, error) { + ev := OauthJwsSigningAlgorithm(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for OauthJwsSigningAlgorithm: valid values are %v", v, allowedOauthJwsSigningAlgorithmEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v OauthJwsSigningAlgorithm) IsValid() bool { + for _, existing := range allowedOauthJwsSigningAlgorithmEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to OauthJwsSigningAlgorithm value +func (v OauthJwsSigningAlgorithm) Ptr() *OauthJwsSigningAlgorithm { + return &v +} + +type NullableOauthJwsSigningAlgorithm struct { + value *OauthJwsSigningAlgorithm + isSet bool +} + +func (v NullableOauthJwsSigningAlgorithm) Get() *OauthJwsSigningAlgorithm { + return v.value +} + +func (v *NullableOauthJwsSigningAlgorithm) Set(val *OauthJwsSigningAlgorithm) { + v.value = val + v.isSet = true +} + +func (v NullableOauthJwsSigningAlgorithm) IsSet() bool { + return v.isSet +} + +func (v *NullableOauthJwsSigningAlgorithm) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOauthJwsSigningAlgorithm(val *OauthJwsSigningAlgorithm) *NullableOauthJwsSigningAlgorithm { + return &NullableOauthJwsSigningAlgorithm{value: val, isSet: true} +} + +func (v NullableOauthJwsSigningAlgorithm) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOauthJwsSigningAlgorithm) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/go/internal/openapi/model_settings_in.go b/go/internal/openapi/model_settings_in.go index 06afe639e..7be659cce 100644 --- a/go/internal/openapi/model_settings_in.go +++ b/go/internal/openapi/model_settings_in.go @@ -19,7 +19,7 @@ type SettingsIn struct { ColorPaletteDark *CustomColorPalette `json:"colorPaletteDark,omitempty"` ColorPaletteLight *CustomColorPalette `json:"colorPaletteLight,omitempty"` CustomBaseFontSize NullableInt32 `json:"customBaseFontSize,omitempty"` - CustomColor *string `json:"customColor,omitempty"` + CustomColor NullableString `json:"customColor,omitempty"` CustomFontFamily NullableString `json:"customFontFamily,omitempty"` CustomFontFamilyUrl NullableString `json:"customFontFamilyUrl,omitempty"` CustomLogoUrl NullableString `json:"customLogoUrl,omitempty"` @@ -190,36 +190,46 @@ func (o *SettingsIn) UnsetCustomBaseFontSize() { o.CustomBaseFontSize.Unset() } -// GetCustomColor returns the CustomColor field value if set, zero value otherwise. +// GetCustomColor returns the CustomColor field value if set, zero value otherwise (both if not set or set to explicit null). func (o *SettingsIn) GetCustomColor() string { - if o == nil || o.CustomColor == nil { + if o == nil || o.CustomColor.Get() == nil { var ret string return ret } - return *o.CustomColor + return *o.CustomColor.Get() } // GetCustomColorOk returns a tuple with the CustomColor field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *SettingsIn) GetCustomColorOk() (*string, bool) { - if o == nil || o.CustomColor == nil { + if o == nil { return nil, false } - return o.CustomColor, true + return o.CustomColor.Get(), o.CustomColor.IsSet() } // HasCustomColor returns a boolean if a field has been set. func (o *SettingsIn) HasCustomColor() bool { - if o != nil && o.CustomColor != nil { + if o != nil && o.CustomColor.IsSet() { return true } return false } -// SetCustomColor gets a reference to the given string and assigns it to the CustomColor field. +// SetCustomColor gets a reference to the given NullableString and assigns it to the CustomColor field. func (o *SettingsIn) SetCustomColor(v string) { - o.CustomColor = &v + o.CustomColor.Set(&v) +} +// SetCustomColorNil sets the value for CustomColor to be an explicit nil +func (o *SettingsIn) SetCustomColorNil() { + o.CustomColor.Set(nil) +} + +// UnsetCustomColor ensures that no value is present for CustomColor, not even an explicit nil +func (o *SettingsIn) UnsetCustomColor() { + o.CustomColor.Unset() } // GetCustomFontFamily returns the CustomFontFamily field value if set, zero value otherwise (both if not set or set to explicit null). @@ -689,8 +699,8 @@ func (o SettingsIn) MarshalJSON() ([]byte, error) { if o.CustomBaseFontSize.IsSet() { toSerialize["customBaseFontSize"] = o.CustomBaseFontSize.Get() } - if o.CustomColor != nil { - toSerialize["customColor"] = o.CustomColor + if o.CustomColor.IsSet() { + toSerialize["customColor"] = o.CustomColor.Get() } if o.CustomFontFamily.IsSet() { toSerialize["customFontFamily"] = o.CustomFontFamily.Get() diff --git a/go/internal/openapi/model_settings_out.go b/go/internal/openapi/model_settings_out.go index fe0bfbcc8..cdc697c53 100644 --- a/go/internal/openapi/model_settings_out.go +++ b/go/internal/openapi/model_settings_out.go @@ -19,7 +19,7 @@ type SettingsOut struct { ColorPaletteDark *CustomColorPalette `json:"colorPaletteDark,omitempty"` ColorPaletteLight *CustomColorPalette `json:"colorPaletteLight,omitempty"` CustomBaseFontSize NullableInt32 `json:"customBaseFontSize,omitempty"` - CustomColor *string `json:"customColor,omitempty"` + CustomColor NullableString `json:"customColor,omitempty"` CustomFontFamily NullableString `json:"customFontFamily,omitempty"` CustomFontFamilyUrl NullableString `json:"customFontFamilyUrl,omitempty"` CustomLogoUrl NullableString `json:"customLogoUrl,omitempty"` @@ -190,36 +190,46 @@ func (o *SettingsOut) UnsetCustomBaseFontSize() { o.CustomBaseFontSize.Unset() } -// GetCustomColor returns the CustomColor field value if set, zero value otherwise. +// GetCustomColor returns the CustomColor field value if set, zero value otherwise (both if not set or set to explicit null). func (o *SettingsOut) GetCustomColor() string { - if o == nil || o.CustomColor == nil { + if o == nil || o.CustomColor.Get() == nil { var ret string return ret } - return *o.CustomColor + return *o.CustomColor.Get() } // GetCustomColorOk returns a tuple with the CustomColor field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *SettingsOut) GetCustomColorOk() (*string, bool) { - if o == nil || o.CustomColor == nil { + if o == nil { return nil, false } - return o.CustomColor, true + return o.CustomColor.Get(), o.CustomColor.IsSet() } // HasCustomColor returns a boolean if a field has been set. func (o *SettingsOut) HasCustomColor() bool { - if o != nil && o.CustomColor != nil { + if o != nil && o.CustomColor.IsSet() { return true } return false } -// SetCustomColor gets a reference to the given string and assigns it to the CustomColor field. +// SetCustomColor gets a reference to the given NullableString and assigns it to the CustomColor field. func (o *SettingsOut) SetCustomColor(v string) { - o.CustomColor = &v + o.CustomColor.Set(&v) +} +// SetCustomColorNil sets the value for CustomColor to be an explicit nil +func (o *SettingsOut) SetCustomColorNil() { + o.CustomColor.Set(nil) +} + +// UnsetCustomColor ensures that no value is present for CustomColor, not even an explicit nil +func (o *SettingsOut) UnsetCustomColor() { + o.CustomColor.Unset() } // GetCustomFontFamily returns the CustomFontFamily field value if set, zero value otherwise (both if not set or set to explicit null). @@ -689,8 +699,8 @@ func (o SettingsOut) MarshalJSON() ([]byte, error) { if o.CustomBaseFontSize.IsSet() { toSerialize["customBaseFontSize"] = o.CustomBaseFontSize.Get() } - if o.CustomColor != nil { - toSerialize["customColor"] = o.CustomColor + if o.CustomColor.IsSet() { + toSerialize["customColor"] = o.CustomColor.Get() } if o.CustomFontFamily.IsSet() { toSerialize["customFontFamily"] = o.CustomFontFamily.Get() diff --git a/openapi.json b/openapi.json index c6898a5a1..ed25d0eb5 100644 --- a/openapi.json +++ b/openapi.json @@ -388,9 +388,6 @@ ], "type": "string" }, - "Color": { - "type": "string" - }, "CompletionChoice": { "properties": { "finish_reason": { @@ -429,40 +426,49 @@ "CustomColorPalette": { "properties": { "backgroundHover": { - "$ref": "#/components/schemas/Color", - "nullable": true + "format": "color", + "nullable": true, + "type": "string" }, "backgroundPrimary": { - "$ref": "#/components/schemas/Color", - "nullable": true + "format": "color", + "nullable": true, + "type": "string" }, "backgroundSecondary": { - "$ref": "#/components/schemas/Color", - "nullable": true + "format": "color", + "nullable": true, + "type": "string" }, "buttonPrimary": { - "$ref": "#/components/schemas/Color", - "nullable": true + "format": "color", + "nullable": true, + "type": "string" }, "interactiveAccent": { - "$ref": "#/components/schemas/Color", - "nullable": true + "format": "color", + "nullable": true, + "type": "string" }, "navigationAccent": { - "$ref": "#/components/schemas/Color", - "nullable": true + "format": "color", + "nullable": true, + "type": "string" }, "primary": { - "$ref": "#/components/schemas/Color", - "nullable": true + "format": "color", + "nullable": true, + "type": "string" }, "textDanger": { - "$ref": "#/components/schemas/Color", - "nullable": true + "format": "color", + "nullable": true, + "type": "string" }, "textPrimary": { - "$ref": "#/components/schemas/Color", - "nullable": true + "format": "color", + "nullable": true, + "type": "string" } }, "type": "object" @@ -1479,8 +1485,9 @@ "nullable": true }, "customColor": { - "$ref": "#/components/schemas/Color", - "nullable": true + "format": "color", + "nullable": true, + "type": "string" }, "customFontFamily": { "example": "Open Sans", @@ -3454,8 +3461,9 @@ "type": "integer" }, "customColor": { - "$ref": "#/components/schemas/Color", - "nullable": true + "format": "color", + "nullable": true, + "type": "string" }, "customFontFamily": { "example": "Open Sans", @@ -3536,8 +3544,9 @@ "type": "integer" }, "customColor": { - "$ref": "#/components/schemas/Color", - "nullable": true + "format": "color", + "nullable": true, + "type": "string" }, "customFontFamily": { "example": "Open Sans", @@ -4021,7 +4030,7 @@ }, "openapi": "3.0.2", "paths": { - "/api/v1/app/": { + "/api/v1/app": { "get": { "description": "List of all the organization's applications.", "operationId": "v1.application.list", @@ -4213,7 +4222,7 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" } ] }, @@ -4412,12 +4421,12 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"name\": \"My first application\",\n \"rateLimit\": null,\n \"uid\": \"unique-app-identifier\"\n }'" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"name\": \"My first application\",\n \"rateLimit\": null,\n \"uid\": \"unique-app-identifier\"\n }'" } ] } }, - "/api/v1/app/stats/usage/": { + "/api/v1/app/stats/usage": { "get": { "description": "Get basic statistics for all applications.", "operationId": "get_app_usage_stats_api_v1_app_stats_usage__get", @@ -4623,12 +4632,12 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/stats/usage/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/stats/usage' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" } ] } }, - "/api/v1/app/{app_id}/": { + "/api/v1/app/{app_id}": { "delete": { "description": "Delete an application.", "operationId": "v1.application.delete", @@ -4792,7 +4801,7 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'DELETE' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" + "source": "curl -X 'DELETE' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" } ] }, @@ -4966,7 +4975,7 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" } ] }, @@ -5150,7 +5159,7 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'PATCH' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"rateLimit\": null,\n \"uid\": \"unique-app-identifier\"\n }'" + "source": "curl -X 'PATCH' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"rateLimit\": null,\n \"uid\": \"unique-app-identifier\"\n }'" } ] }, @@ -5344,12 +5353,12 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'PUT' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"name\": \"My first application\",\n \"rateLimit\": null,\n \"uid\": \"unique-app-identifier\"\n }'" + "source": "curl -X 'PUT' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"name\": \"My first application\",\n \"rateLimit\": null,\n \"uid\": \"unique-app-identifier\"\n }'" } ] } }, - "/api/v1/app/{app_id}/attempt/endpoint/{endpoint_id}/": { + "/api/v1/app/{app_id}/attempt/endpoint/{endpoint_id}": { "get": { "description": "List attempts by endpoint 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", "operationId": "v1.message-attempt.list-by-endpoint", @@ -5675,12 +5684,12 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/attempt/endpoint/{endpoint_id}/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/attempt/endpoint/{endpoint_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" } ] } }, - "/api/v1/app/{app_id}/attempt/msg/{msg_id}/": { + "/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", "operationId": "v1.message-attempt.list-by-msg", @@ -6010,12 +6019,12 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/attempt/msg/{msg_id}/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/attempt/msg/{msg_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" } ] } }, - "/api/v1/app/{app_id}/endpoint/": { + "/api/v1/app/{app_id}/endpoint": { "get": { "description": "List the application's endpoints.", "operationId": "v1.endpoint.list", @@ -6222,7 +6231,7 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" } ] }, @@ -6415,12 +6424,12 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"description\": \"An example endpoint name\",\n \"rateLimit\": null,\n \"uid\": \"unique-ep-identifier\",\n \"url\": \"https://example.com/webhook/\",\n \"version\": 1,\n \"disabled\": false,\n \"filterTypes\": [\"user.signup\", \"user.deleted\"],\n \"channels\": [\"project_123\", \"group_2\"],\n \"secret\": \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\"\n }'" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"description\": \"An example endpoint name\",\n \"rateLimit\": null,\n \"uid\": \"unique-ep-identifier\",\n \"url\": \"https://example.com/webhook/\",\n \"version\": 1,\n \"disabled\": false,\n \"filterTypes\": [\"user.signup\", \"user.deleted\"],\n \"channels\": [\"project_123\", \"group_2\"],\n \"secret\": \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\"\n }'" } ] } }, - "/api/v1/app/{app_id}/endpoint/{endpoint_id}/": { + "/api/v1/app/{app_id}/endpoint/{endpoint_id}": { "delete": { "description": "Delete an endpoint.", "operationId": "v1.endpoint.delete", @@ -6599,7 +6608,7 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'DELETE' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" + "source": "curl -X 'DELETE' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" } ] }, @@ -6788,7 +6797,7 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" } ] }, @@ -6987,7 +6996,7 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'PATCH' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"rateLimit\": null,\n \"uid\": \"unique-ep-identifier\",\n \"version\": 1,\n \"filterTypes\": null,\n \"channels\": null,\n \"secret\": \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\"\n }'" + "source": "curl -X 'PATCH' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"rateLimit\": null,\n \"uid\": \"unique-ep-identifier\",\n \"version\": 1,\n \"filterTypes\": null,\n \"channels\": null,\n \"secret\": \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\"\n }'" } ] }, @@ -7196,12 +7205,12 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'PUT' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"description\": \"An example endpoint name\",\n \"rateLimit\": null,\n \"uid\": \"unique-ep-identifier\",\n \"url\": \"https://example.com/webhook/\",\n \"version\": 1,\n \"disabled\": false,\n \"filterTypes\": [\"user.signup\", \"user.deleted\"],\n \"channels\": [\"project_123\", \"group_2\"]\n }'" + "source": "curl -X 'PUT' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"description\": \"An example endpoint name\",\n \"rateLimit\": null,\n \"uid\": \"unique-ep-identifier\",\n \"url\": \"https://example.com/webhook/\",\n \"version\": 1,\n \"disabled\": false,\n \"filterTypes\": [\"user.signup\", \"user.deleted\"],\n \"channels\": [\"project_123\", \"group_2\"]\n }'" } ] } }, - "/api/v1/app/{app_id}/endpoint/{endpoint_id}/headers/": { + "/api/v1/app/{app_id}/endpoint/{endpoint_id}/headers": { "get": { "description": "Get the additional headers to be sent with the webhook", "operationId": "v1.endpoint.get-headers", @@ -7387,7 +7396,7 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/headers/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/headers' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" } ] }, @@ -7579,7 +7588,7 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'PATCH' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/headers/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"headers\": {\"X-Example\":\"123\",\"X-Foobar\":\"Bar\"}\n }'" + "source": "curl -X 'PATCH' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/headers' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"headers\": {\"X-Example\":\"123\",\"X-Foobar\":\"Bar\"}\n }'" } ] }, @@ -7771,12 +7780,12 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'PUT' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/headers/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"headers\": {\"X-Example\":\"123\",\"X-Foobar\":\"Bar\"}\n }'" + "source": "curl -X 'PUT' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/headers' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"headers\": {\"X-Example\":\"123\",\"X-Foobar\":\"Bar\"}\n }'" } ] } }, - "/api/v1/app/{app_id}/endpoint/{endpoint_id}/msg/": { + "/api/v1/app/{app_id}/endpoint/{endpoint_id}/msg": { "get": { "description": "List messages for a particular endpoint. Additionally includes metadata about the latest message attempt.\n\nThe `before` parameter lets you filter all items created before a certain date and is ignored if an iterator is passed.\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", "operationId": "v1.message-attempt.list-attempted-messages", @@ -8080,12 +8089,12 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/msg/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/msg' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" } ] } }, - "/api/v1/app/{app_id}/endpoint/{endpoint_id}/msg/test-attempt/": { + "/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", "operationId": "create_message_attempt_for_endpoint", @@ -8233,7 +8242,7 @@ ] } }, - "/api/v1/app/{app_id}/endpoint/{endpoint_id}/recover/": { + "/api/v1/app/{app_id}/endpoint/{endpoint_id}/recover": { "post": { "description": "Resend all failed messages since a given time.", "operationId": "v1.endpoint.recover", @@ -8438,12 +8447,12 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/recover/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"until\": null\n }'" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/recover' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"until\": null\n }'" } ] } }, - "/api/v1/app/{app_id}/endpoint/{endpoint_id}/replay-missing/": { + "/api/v1/app/{app_id}/endpoint/{endpoint_id}/replay-missing": { "post": { "description": "Replays messages to the endpoint. Only messages that were created after `since` will be sent. Messages that were previously sent to the endpoint are not resent.", "operationId": "v1.endpoint.replay", @@ -8648,12 +8657,12 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/replay-missing/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"until\": null\n }'" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/replay-missing' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"until\": null\n }'" } ] } }, - "/api/v1/app/{app_id}/endpoint/{endpoint_id}/secret/": { + "/api/v1/app/{app_id}/endpoint/{endpoint_id}/secret": { "get": { "description": "Get the endpoint's signing secret.\n\nThis is used to verify the authenticity of the webhook.\nFor more information please refer to [the consuming webhooks docs](https://docs.svix.com/consuming-webhooks/).", "operationId": "v1.endpoint.get-secret", @@ -8839,12 +8848,12 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/secret/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/secret' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" } ] } }, - "/api/v1/app/{app_id}/endpoint/{endpoint_id}/secret/rotate/": { + "/api/v1/app/{app_id}/endpoint/{endpoint_id}/secret/rotate": { "post": { "description": "Rotates the endpoint's signing secret. The previous secret will be valid for the next 24 hours.", "operationId": "v1.endpoint.rotate-secret", @@ -9042,12 +9051,12 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/secret/rotate/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"key\": \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\"\n }'" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/secret/rotate' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"key\": \"whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD\"\n }'" } ] } }, - "/api/v1/app/{app_id}/endpoint/{endpoint_id}/send-example/": { + "/api/v1/app/{app_id}/endpoint/{endpoint_id}/send-example": { "post": { "description": "Send an example message for event", "operationId": "v1.endpoint.send-example", @@ -9252,12 +9261,12 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/send-example/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"eventType\": \"user.signup\"\n }'" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/send-example' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"eventType\": \"user.signup\"\n }'" } ] } }, - "/api/v1/app/{app_id}/endpoint/{endpoint_id}/stats/": { + "/api/v1/app/{app_id}/endpoint/{endpoint_id}/stats": { "get": { "description": "Get basic statistics for the endpoint.", "operationId": "v1.endpoint.get-stats", @@ -9467,12 +9476,12 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/stats/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/stats' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" } ] } }, - "/api/v1/app/{app_id}/endpoint/{endpoint_id}/transformation/": { + "/api/v1/app/{app_id}/endpoint/{endpoint_id}/transformation": { "get": { "description": "Get the transformation code associated with this endpoint", "operationId": "v1.endpoint.transformation-get", @@ -9658,7 +9667,7 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/transformation/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/transformation' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" } ] }, @@ -9850,12 +9859,12 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'PATCH' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/transformation/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"code\": null\n }'" + "source": "curl -X 'PATCH' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/transformation' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"code\": null\n }'" } ] } }, - "/api/v1/app/{app_id}/endpoint/{endpoint_id}/transformation/simulate/": { + "/api/v1/app/{app_id}/endpoint/{endpoint_id}/transformation/simulate": { "post": { "description": "Simulate running the transformation on the payload and code", "operationId": "v1.endpoint.transformation-simulate", @@ -10060,12 +10069,12 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/transformation/simulate/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"eventType\": \"user.signup\",\n \"channels\": null\n }'" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/transformation/simulate' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"eventType\": \"user.signup\",\n \"channels\": null\n }'" } ] } }, - "/api/v1/app/{app_id}/events/": { + "/api/v1/app/{app_id}/events": { "get": { "description": "Reads the stream of created messages for an application", "operationId": "v1.message.stream", @@ -10297,12 +10306,12 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/events/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/events' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" } ] } }, - "/api/v1/app/{app_id}/inbound/msg/{inbound_token}/": { + "/api/v1/app/{app_id}/inbound/msg/{inbound_token}": { "post": { "description": "Handles a raw inbound webhook for the application.", "operationId": "v1.inbound.msg", @@ -10515,12 +10524,12 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/inbound/msg/{inbound_token}/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/inbound/msg/{inbound_token}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" } ] } }, - "/api/v1/app/{app_id}/inbound/rotate-url/": { + "/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", "operationId": "v1.inbound.rotate-url", @@ -10700,12 +10709,12 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/inbound/rotate-url/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/inbound/rotate-url' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" } ] } }, - "/api/v1/app/{app_id}/integration/": { + "/api/v1/app/{app_id}/integration": { "get": { "description": "List the application's integrations.", "operationId": "v1.integration.list", @@ -10749,6 +10758,17 @@ "type": "string" }, "style": "form" + }, + { + "description": "The sorting order of the returned items", + "in": "query", + "name": "order", + "schema": { + "$ref": "#/components/schemas/Ordering", + "description": "The sorting order of the returned items", + "nullable": true + }, + "style": "form" } ], "responses": { @@ -10901,7 +10921,7 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/integration/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/integration' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" } ] }, @@ -11094,12 +11114,12 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/integration/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"name\": \"Example Integration\"\n }'" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/integration' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"name\": \"Example Integration\"\n }'" } ] } }, - "/api/v1/app/{app_id}/integration/{integ_id}/": { + "/api/v1/app/{app_id}/integration/{integ_id}": { "delete": { "description": "Delete an integration.", "operationId": "v1.integration.delete", @@ -11275,7 +11295,7 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'DELETE' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/integration/{integ_id}/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" + "source": "curl -X 'DELETE' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/integration/{integ_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" } ] }, @@ -11461,7 +11481,7 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/integration/{integ_id}/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/integration/{integ_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" } ] }, @@ -11657,13 +11677,14 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'PUT' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/integration/{integ_id}/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"name\": \"Example Integration\"\n }'" + "source": "curl -X 'PUT' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/integration/{integ_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"name\": \"Example Integration\"\n }'" } ] } }, - "/api/v1/app/{app_id}/integration/{integ_id}/key/": { + "/api/v1/app/{app_id}/integration/{integ_id}/key": { "get": { + "deprecated": true, "description": "Get an integration's key.", "operationId": "v1.integration.get-key", "parameters": [ @@ -11845,12 +11866,12 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/integration/{integ_id}/key/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/integration/{integ_id}/key' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" } ] } }, - "/api/v1/app/{app_id}/integration/{integ_id}/key/rotate/": { + "/api/v1/app/{app_id}/integration/{integ_id}/key/rotate": { "post": { "description": "Rotate the integration's key. The previous key will be immediately revoked.", "operationId": "v1.integration.rotate-key", @@ -12042,12 +12063,12 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/integration/{integ_id}/key/rotate/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/integration/{integ_id}/key/rotate' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" } ] } }, - "/api/v1/app/{app_id}/msg/": { + "/api/v1/app/{app_id}/msg": { "get": { "description": "List all of the application's messages.\n\nThe `before` and `after` parameters let you filter all items created before or after a certain date. These can be used alongside an iterator to paginate over results\nwithin a certain window.\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", "operationId": "v1.message.list", @@ -12325,7 +12346,7 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\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'" + "source": "curl -X 'GET' \\\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'" } ] }, @@ -12539,12 +12560,12 @@ { "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 -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 \"payloadRetentionPeriod\": 90,\n \"application\": null,\n \"tags\": [\"my_tag\", \"other\"],\n \"transformationsParams\": null\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 -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 \"payloadRetentionPeriod\": 90,\n \"application\": null,\n \"tags\": [\"my_tag\", \"other\"],\n \"transformationsParams\": null\n }'" } ] } }, - "/api/v1/app/{app_id}/msg/{msg_id}/": { + "/api/v1/app/{app_id}/msg/{msg_id}": { "get": { "description": "Get a message by its ID or eventID.", "operationId": "v1.message.get", @@ -12741,12 +12762,12 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/msg/{msg_id}/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/msg/{msg_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" } ] } }, - "/api/v1/app/{app_id}/msg/{msg_id}/attempt/": { + "/api/v1/app/{app_id}/msg/{msg_id}/attempt": { "get": { "deprecated": true, "description": "Deprecated: Please use \"List Attempts by Endpoint\" and \"List Attempts by Msg\" instead.\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\n`msg_id`: Use a message id or a message `eventId`", @@ -13066,12 +13087,12 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/msg/{msg_id}/attempt/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/msg/{msg_id}/attempt' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" } ] } }, - "/api/v1/app/{app_id}/msg/{msg_id}/attempt/{attempt_id}/": { + "/api/v1/app/{app_id}/msg/{msg_id}/attempt/{attempt_id}": { "get": { "description": "`msg_id`: Use a message id or a message `eventId`", "operationId": "v1.message-attempt.get", @@ -13269,12 +13290,12 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/msg/{msg_id}/attempt/{attempt_id}/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/msg/{msg_id}/attempt/{attempt_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" } ] } }, - "/api/v1/app/{app_id}/msg/{msg_id}/attempt/{attempt_id}/content/": { + "/api/v1/app/{app_id}/msg/{msg_id}/attempt/{attempt_id}/content": { "delete": { "description": "Deletes the given attempt's response body. Useful when an endpoint accidentally returned sensitive content.", "operationId": "v1.message-attempt.expunge-content", @@ -13465,12 +13486,12 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'DELETE' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/msg/{msg_id}/attempt/{attempt_id}/content/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" + "source": "curl -X 'DELETE' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/msg/{msg_id}/attempt/{attempt_id}/content' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" } ] } }, - "/api/v1/app/{app_id}/msg/{msg_id}/attempt/{attempt_id}/headers/": { + "/api/v1/app/{app_id}/msg/{msg_id}/attempt/{attempt_id}/headers": { "get": { "description": "Calculate and return headers used on a given message attempt", "operationId": "v1.message-attempt.get-headers", @@ -13668,12 +13689,12 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/msg/{msg_id}/attempt/{attempt_id}/headers/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/msg/{msg_id}/attempt/{attempt_id}/headers' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" } ] } }, - "/api/v1/app/{app_id}/msg/{msg_id}/content/": { + "/api/v1/app/{app_id}/msg/{msg_id}/content": { "delete": { "description": "Delete the given message's payload. Useful in cases when a message was accidentally sent with sensitive content.\n\nThe message can't be replayed or resent once its payload has been deleted or expired.", "operationId": "v1.message.expunge-content", @@ -13852,12 +13873,12 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'DELETE' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/msg/{msg_id}/content/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" + "source": "curl -X 'DELETE' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/msg/{msg_id}/content' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" } ] } }, - "/api/v1/app/{app_id}/msg/{msg_id}/endpoint/": { + "/api/v1/app/{app_id}/msg/{msg_id}/endpoint": { "get": { "description": "List endpoints attempted by a given message. Additionally includes metadata about the latest message attempt.\nBy default, endpoints are listed in ascending order by ID.", "operationId": "v1.message-attempt.list-attempted-destinations", @@ -14068,12 +14089,12 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/msg/{msg_id}/endpoint/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/msg/{msg_id}/endpoint' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" } ] } }, - "/api/v1/app/{app_id}/msg/{msg_id}/endpoint/{endpoint_id}/attempt/": { + "/api/v1/app/{app_id}/msg/{msg_id}/endpoint/{endpoint_id}/attempt": { "get": { "deprecated": true, "description": "DEPRECATED: please use list_attempts with endpoint_id as a query parameter instead.\n\nList the message attempts for a particular endpoint.\n\nReturning the endpoint.\n\nThe `before` parameter lets you filter all items created before a certain date and is ignored if an iterator is passed.\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", @@ -14382,12 +14403,12 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/msg/{msg_id}/endpoint/{endpoint_id}/attempt/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/msg/{msg_id}/endpoint/{endpoint_id}/attempt' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" } ] } }, - "/api/v1/app/{app_id}/msg/{msg_id}/endpoint/{endpoint_id}/resend/": { + "/api/v1/app/{app_id}/msg/{msg_id}/endpoint/{endpoint_id}/resend": { "post": { "description": "Resend a message to the specified endpoint.", "operationId": "v1.message-attempt.resend", @@ -14590,12 +14611,12 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/msg/{msg_id}/endpoint/{endpoint_id}/resend/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/msg/{msg_id}/endpoint/{endpoint_id}/resend' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" } ] } }, - "/api/v1/app/{app_id}/msg/{msg_id}/raw/": { + "/api/v1/app/{app_id}/msg/{msg_id}/raw": { "get": { "description": "Get a message raw payload by its ID or eventID.", "operationId": "v1.message.get_raw_payload", @@ -14781,12 +14802,12 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/msg/{msg_id}/raw/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/msg/{msg_id}/raw' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" } ] } }, - "/api/v1/app/{app_id}/stats/": { + "/api/v1/app/{app_id}/stats": { "get": { "description": "Get basic statistics for the application", "operationId": "v1.application.get-stats", @@ -14981,12 +15002,12 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/stats/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/stats' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" } ] } }, - "/api/v1/auth/app-portal-access/{app_id}/": { + "/api/v1/auth/app-portal-access/{app_id}": { "post": { "description": "Use this function to get magic links (and authentication codes) for connecting your users to the Consumer Application Portal.", "operationId": "v1.authentication.app-portal-access", @@ -15176,12 +15197,12 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/auth/app-portal-access/{app_id}/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"featureFlags\": [],\n \"expiry\": null\n }'" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/auth/app-portal-access/{app_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"featureFlags\": [],\n \"expiry\": null\n }'" } ] } }, - "/api/v1/auth/app/{app_id}/expire-all/": { + "/api/v1/auth/app/{app_id}/expire-all": { "post": { "description": "Expire all of the tokens associated with a specific Application", "operationId": "v1.authentication.expire-all", @@ -15364,12 +15385,12 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/auth/app/{app_id}/expire-all/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"expiry\": 60\n }'" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/auth/app/{app_id}/expire-all' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"expiry\": 60\n }'" } ] } }, - "/api/v1/auth/dashboard-access/{app_id}/": { + "/api/v1/auth/dashboard-access/{app_id}": { "post": { "deprecated": true, "description": "DEPRECATED: Please use `app-portal-access` instead.\n\nUse this function to get magic links (and authentication codes) for connecting your users to the Consumer Application Portal.", @@ -15550,12 +15571,12 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/auth/dashboard-access/{app_id}/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/auth/dashboard-access/{app_id}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" } ] } }, - "/api/v1/auth/logout/": { + "/api/v1/auth/logout": { "post": { "description": "Logout an app token.\n\nTrying to log out other tokens will fail.", "operationId": "v1.authentication.logout", @@ -15713,12 +15734,12 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/auth/logout/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/auth/logout' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" } ] } }, - "/api/v1/auth/one-time-token/": { + "/api/v1/auth/one-time-token": { "post": { "description": "This is a one time token", "operationId": "v1.authentication.exchange-one-time-token", @@ -15893,12 +15914,12 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/auth/one-time-token/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '\n }'" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/auth/one-time-token' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '\n }'" } ] } }, - "/api/v1/background-task/": { + "/api/v1/background-task": { "get": { "description": "List background tasks executed in the past 90 days.", "operationId": "list_background_tasks", @@ -16054,7 +16075,7 @@ ] } }, - "/api/v1/background-task/{task_id}/": { + "/api/v1/background-task/{task_id}": { "get": { "description": "Get a background task by ID.", "operationId": "get_background_task", @@ -16162,7 +16183,7 @@ ] } }, - "/api/v1/environment/export/": { + "/api/v1/environment/export": { "get": { "description": "Download a JSON file containing all org-settings and event types", "operationId": "v1.environment.export.get", @@ -16316,7 +16337,7 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/environment/export/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/environment/export' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" } ] }, @@ -16484,12 +16505,12 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/environment/export/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/environment/export' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" } ] } }, - "/api/v1/environment/import/": { + "/api/v1/environment/import": { "post": { "description": "Import a configuration into the active organization.\nIt doesn't delete anything, only adds/updates what was passed to it.", "operationId": "v1.environment.import", @@ -16657,12 +16678,12 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/environment/import/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"eventTypes\": null,\n \"settings\": null\n }'" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/environment/import' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"eventTypes\": null,\n \"settings\": null\n }'" } ] } }, - "/api/v1/environment/settings/": { + "/api/v1/environment/settings": { "get": { "description": "Get the environment's settings", "operationId": "v1.environment.get-settings", @@ -16816,12 +16837,12 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/environment/settings/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/environment/settings' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" } ] } }, - "/api/v1/event-type/": { + "/api/v1/event-type": { "get": { "description": "Return the list of event types.", "operationId": "v1.event-type.list", @@ -17037,7 +17058,7 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/event-type/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/event-type' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" } ] }, @@ -17215,12 +17236,12 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/event-type/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"name\": \"user.signup\",\n \"description\": \"A user has signed up\",\n \"archived\": false,\n \"schemas\": {\"1\":{\"description\":\"An invoice was paid by a user\",\"properties\":{\"invoiceId\":{\"description\":\"The invoice id\",\"type\":\"string\"},\"userId\":{\"description\":\"The user id\",\"type\":\"string\"}},\"required\":[\"invoiceId\",\"userId\"],\"title\":\"Invoice Paid Event\",\"type\":\"object\"}},\n \"featureFlag\": \"cool-new-feature\"\n }'" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/event-type' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"name\": \"user.signup\",\n \"description\": \"A user has signed up\",\n \"archived\": false,\n \"schemas\": {\"1\":{\"description\":\"An invoice was paid by a user\",\"properties\":{\"invoiceId\":{\"description\":\"The invoice id\",\"type\":\"string\"},\"userId\":{\"description\":\"The user id\",\"type\":\"string\"}},\"required\":[\"invoiceId\",\"userId\"],\"title\":\"Invoice Paid Event\",\"type\":\"object\"}},\n \"featureFlag\": \"cool-new-feature\"\n }'" } ] } }, - "/api/v1/event-type/export/openapi/": { + "/api/v1/event-type/export/openapi": { "post": { "description": "Exports event type definitions based on the OpenAPI schemas associated\nwith each existing event type", "operationId": "v1.event-type.export-openapi", @@ -17385,12 +17406,12 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/event-type/export/openapi/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/event-type/export/openapi' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" } ] } }, - "/api/v1/event-type/import/openapi/": { + "/api/v1/event-type/import/openapi": { "post": { "description": "Given an OpenAPI spec, create new or update existing event types.\nIf an existing `archived` event type is updated, it will be unarchived.\n\nThe importer will convert all webhooks found in the either the `webhooks` or `x-webhooks`\ntop-level.", "operationId": "v1.event-type.import-openapi", @@ -17566,12 +17587,12 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/event-type/import/openapi/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"spec\": {\"info\":{\"title\":\"Webhook Example\",\"version\":\"1.0.0\"},\"openapi\":\"3.1.0\",\"webhooks\":{\"pet.new\":{\"post\":{\"requestBody\":{\"content\":{\"application/json\":{\"schema\":{\"properties\":{\"id\":{\"format\":\"int64\",\"type\":\"integer\"},\"name\":{\"type\":\"string\"},\"tag\":{\"type\":\"string\"}},\"required\":[\"id\",\"name\"]}}},\"description\":\"Information about a new pet in the system\"},\"responses\":{\"200\":{\"description\":\"Return a 200 status to indicate that the data was received successfully\"}}}}}},\n \"specRaw\": {\"info\":{\"title\":\"Webhook Example\",\"version\":\"1.0.0\"},\"openapi\":\"3.1.0\",\"webhooks\":{\"pet.new\":{\"post\":{\"requestBody\":{\"content\":{\"application/json\":{\"schema\":{\"properties\":{\"id\":{\"format\":\"int64\",\"type\":\"integer\"},\"name\":{\"type\":\"string\"},\"tag\":{\"type\":\"string\"}},\"required\":[\"id\",\"name\"]}}},\"description\":\"Information about a new pet in the system\"},\"responses\":{\"200\":{\"description\":\"Return a 200 status to indicate that the data was received successfully\"}}}}}}\n }'" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/event-type/import/openapi' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"spec\": {\"info\":{\"title\":\"Webhook Example\",\"version\":\"1.0.0\"},\"openapi\":\"3.1.0\",\"webhooks\":{\"pet.new\":{\"post\":{\"requestBody\":{\"content\":{\"application/json\":{\"schema\":{\"properties\":{\"id\":{\"format\":\"int64\",\"type\":\"integer\"},\"name\":{\"type\":\"string\"},\"tag\":{\"type\":\"string\"}},\"required\":[\"id\",\"name\"]}}},\"description\":\"Information about a new pet in the system\"},\"responses\":{\"200\":{\"description\":\"Return a 200 status to indicate that the data was received successfully\"}}}}}},\n \"specRaw\": {\"info\":{\"title\":\"Webhook Example\",\"version\":\"1.0.0\"},\"openapi\":\"3.1.0\",\"webhooks\":{\"pet.new\":{\"post\":{\"requestBody\":{\"content\":{\"application/json\":{\"schema\":{\"properties\":{\"id\":{\"format\":\"int64\",\"type\":\"integer\"},\"name\":{\"type\":\"string\"},\"tag\":{\"type\":\"string\"}},\"required\":[\"id\",\"name\"]}}},\"description\":\"Information about a new pet in the system\"},\"responses\":{\"200\":{\"description\":\"Return a 200 status to indicate that the data was received successfully\"}}}}}}\n }'" } ] } }, - "/api/v1/event-type/schema/generate-example/": { + "/api/v1/event-type/schema/generate-example": { "post": { "description": "Generates a fake example from the given JSONSchema", "operationId": "v1.event-type.generate-example", @@ -17746,12 +17767,12 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/event-type/schema/generate-example/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"schema\": {\"description\":\"An invoice was paid by a user\",\"properties\":{\"invoiceId\":{\"description\":\"The invoice id\",\"type\":\"string\"},\"userId\":{\"description\":\"The user id\",\"type\":\"string\"}},\"required\":[\"invoiceId\",\"userId\"],\"title\":\"Invoice Paid Event\",\"type\":\"object\"}\n }'" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/event-type/schema/generate-example' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"schema\": {\"description\":\"An invoice was paid by a user\",\"properties\":{\"invoiceId\":{\"description\":\"The invoice id\",\"type\":\"string\"},\"userId\":{\"description\":\"The user id\",\"type\":\"string\"}},\"required\":[\"invoiceId\",\"userId\"],\"title\":\"Invoice Paid Event\",\"type\":\"object\"}\n }'" } ] } }, - "/api/v1/event-type/{event_type_name}/": { + "/api/v1/event-type/{event_type_name}": { "delete": { "description": "Archive an event type.\n\nEndpoints already configured to filter on an event type will continue to do so after archival.\nHowever, new messages can not be sent with it and endpoints can not filter on it.\nAn event type can be unarchived with the\n[create operation](#operation/create_event_type_api_v1_event_type__post).", "operationId": "v1.event-type.delete", @@ -17925,7 +17946,7 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'DELETE' \\\n 'https://api.eu.svix.com/api/v1/event-type/{event_type_name}/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" + "source": "curl -X 'DELETE' \\\n 'https://api.eu.svix.com/api/v1/event-type/{event_type_name}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" } ] }, @@ -18098,7 +18119,7 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/event-type/{event_type_name}/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/event-type/{event_type_name}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" } ] }, @@ -18281,7 +18302,7 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'PATCH' \\\n 'https://api.eu.svix.com/api/v1/event-type/{event_type_name}/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"schemas\": {\"description\":\"An invoice was paid by a user\",\"properties\":{\"invoiceId\":{\"description\":\"The invoice id\",\"type\":\"string\"},\"userId\":{\"description\":\"The user id\",\"type\":\"string\"}},\"required\":[\"invoiceId\",\"userId\"],\"title\":\"Invoice Paid Event\",\"type\":\"object\"},\n \"featureFlag\": \"cool-new-feature\"\n }'" + "source": "curl -X 'PATCH' \\\n 'https://api.eu.svix.com/api/v1/event-type/{event_type_name}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"schemas\": {\"description\":\"An invoice was paid by a user\",\"properties\":{\"invoiceId\":{\"description\":\"The invoice id\",\"type\":\"string\"},\"userId\":{\"description\":\"The user id\",\"type\":\"string\"}},\"required\":[\"invoiceId\",\"userId\"],\"title\":\"Invoice Paid Event\",\"type\":\"object\"},\n \"featureFlag\": \"cool-new-feature\"\n }'" } ] }, @@ -18474,12 +18495,12 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'PUT' \\\n 'https://api.eu.svix.com/api/v1/event-type/{event_type_name}/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"description\": \"A user has signed up\",\n \"archived\": false,\n \"schemas\": {\"1\":{\"description\":\"An invoice was paid by a user\",\"properties\":{\"invoiceId\":{\"description\":\"The invoice id\",\"type\":\"string\"},\"userId\":{\"description\":\"The user id\",\"type\":\"string\"}},\"required\":[\"invoiceId\",\"userId\"],\"title\":\"Invoice Paid Event\",\"type\":\"object\"}},\n \"featureFlag\": \"cool-new-feature\"\n }'" + "source": "curl -X 'PUT' \\\n 'https://api.eu.svix.com/api/v1/event-type/{event_type_name}' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"description\": \"A user has signed up\",\n \"archived\": false,\n \"schemas\": {\"1\":{\"description\":\"An invoice was paid by a user\",\"properties\":{\"invoiceId\":{\"description\":\"The invoice id\",\"type\":\"string\"},\"userId\":{\"description\":\"The user id\",\"type\":\"string\"}},\"required\":[\"invoiceId\",\"userId\"],\"title\":\"Invoice Paid Event\",\"type\":\"object\"}},\n \"featureFlag\": \"cool-new-feature\"\n }'" } ] } }, - "/api/v1/event-type/{event_type_name}/retry-schedule/": { + "/api/v1/event-type/{event_type_name}/retry-schedule": { "get": { "description": "Gets the retry schedule for messages using the given event type", "operationId": "v1.event-type.get-retry-schedule", @@ -18649,7 +18670,7 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/event-type/{event_type_name}/retry-schedule/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/event-type/{event_type_name}/retry-schedule' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" } ] }, @@ -18832,12 +18853,234 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'PUT' \\\n 'https://api.eu.svix.com/api/v1/event-type/{event_type_name}/retry-schedule/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"retrySchedule\": null\n }'" + "source": "curl -X 'PUT' \\\n 'https://api.eu.svix.com/api/v1/event-type/{event_type_name}/retry-schedule' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"retrySchedule\": null\n }'" + } + ] + } + }, + "/api/v1/events": { + "get": { + "description": "Reads the stream of operational webhook events for this environment", + "operationId": "v1.events", + "parameters": [ + { + "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": "Filter response based on the event type", + "in": "query", + "name": "event_types", + "schema": { + "description": "Filter response based on the event type", + "items": { + "description": "The event type's name", + "example": "user.signup", + "maxLength": 256, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" + }, + "nullable": true, + "type": "array", + "uniqueItems": true + }, + "style": "form" + }, + { + "description": "Filter response based on the event type", + "in": "query", + "name": "channels", + "schema": { + "description": "Filter response based on the event type", + "items": { + "example": "project_1337", + "maxLength": 128, + "pattern": "^[a-zA-Z0-9\\-_.]+$", + "type": "string" + }, + "nullable": true, + "type": "array", + "uniqueItems": true + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageStreamOut" + } + } + }, + "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": "Events", + "tags": [ + "Events" + ], + "x-codeSamples": [ + { + "label": "JavaScript", + "lang": "JavaScript", + "source": "const messageStreamOut = await svix.even.s();" + }, + { + "label": "TypeScript", + "lang": "JavaScript", + "source": "const messageStreamOut = await svix.even.s();" + }, + { + "label": "Python", + "lang": "Python", + "source": "message_stream_out = svix.even.s()" + }, + { + "label": "Python (Async)", + "lang": "Python", + "source": "message_stream_out = await svix.even.s()" + }, + { + "label": "Go", + "lang": "Go", + "source": "messageStreamOut, err := svixClient.Even.S(ctx)" + }, + { + "label": "Kotlin", + "lang": "Kotlin", + "source": "val messageStreamOut = svix.even.s()" + }, + { + "label": "Java", + "lang": "Java", + "source": "MessageStreamOut messageStreamOut = svix.getEven().s()" + }, + { + "label": "Ruby", + "lang": "Ruby", + "source": "message_stream_out = svix.even.s()" + }, + { + "label": "Rust", + "lang": "Rust", + "source": "let message_stream_out = svix.even().s().await?;" + }, + { + "label": "C#", + "lang": "C#", + "source": "var messageStreamOut = await svix.Even.SAsync()" + }, + { + "label": "CLI", + "lang": "Shell", + "source": "svix even s " + }, + { + "label": "cURL", + "lang": "Shell", + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/events' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" } ] } }, - "/api/v1/health/": { + "/api/v1/health": { "get": { "description": "Verify the API server is up and running.", "operationId": "v1.health.get", @@ -18924,12 +19167,12 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/health/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/health' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" } ] } }, - "/api/v1/msg/broadcast/": { + "/api/v1/msg/broadcast": { "post": { "description": "Creates a background task to send the same message to each application in your organization", "operationId": "create_broadcast_message", @@ -19047,7 +19290,7 @@ ] } }, - "/api/v1/stats/app/{app_id}/attempt/": { + "/api/v1/stats/app/{app_id}/attempt": { "get": { "description": "Returns application-level statistics on message attempts", "operationId": "v1.stats.app-attempts", @@ -19242,12 +19485,12 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/stats/app/{app_id}/attempt/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/stats/app/{app_id}/attempt' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" } ] } }, - "/api/v1/stats/app/{app_id}/ep/{endpoint_id}/attempt/": { + "/api/v1/stats/app/{app_id}/ep/{endpoint_id}/attempt": { "get": { "description": "Returns endpoint-level statistics on message attempts", "operationId": "v1.stats.endpoint-attempts", @@ -19457,12 +19700,12 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/stats/app/{app_id}/ep/{endpoint_id}/attempt/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/stats/app/{app_id}/ep/{endpoint_id}/attempt' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" } ] } }, - "/api/v1/stats/usage/app/": { + "/api/v1/stats/usage/app": { "post": { "description": "Creates a background task to calculate the message destinations for all applications in the environment.\n\nNote that this endpoint is asynchronous. You will need to poll the `Get Background Task` endpoint to\nretrieve the results of the operation.", "operationId": "v1.statistics.aggregate-app-stats", @@ -19637,12 +19880,12 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/stats/usage/app/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"appIds\": null\n }'" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/stats/usage/app' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"appIds\": null\n }'" } ] } }, - "/api/v1/stats/usage/event-types/": { + "/api/v1/stats/usage/event-types": { "put": { "description": "Creates a background task to calculate the listed event types for all apps in the organization.\n\nNote that this endpoint is asynchronous. You will need to poll the `Get Background Task` endpoint to\nretrieve the results of the operation.", "operationId": "v1.statistics.aggregate-event-types", @@ -19796,12 +20039,12 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'PUT' \\\n 'https://api.eu.svix.com/api/v1/stats/usage/event-types/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" + "source": "curl -X 'PUT' \\\n 'https://api.eu.svix.com/api/v1/stats/usage/event-types' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" } ] } }, - "/api/v1/transformation-template/": { + "/api/v1/transformation-template": { "get": { "description": "List all transformation templates for an application", "operationId": "v1.transformation-template.list", @@ -19992,7 +20235,7 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/transformation-template/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" + "source": "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/transformation-template' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" } ] }, @@ -20170,7 +20413,7 @@ { "label": "cURL", "lang": "Shell", - "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/transformation-template/' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"instructionsLink\": null,\n \"filterTypes\": [\"user.signup\", \"user.deleted\"],\n \"featureFlag\": \"cool-new-feature\"\n }'" + "source": "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/transformation-template' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"instructionsLink\": null,\n \"filterTypes\": [\"user.signup\", \"user.deleted\"],\n \"featureFlag\": \"cool-new-feature\"\n }'" } ] } From bddbf716bee1419297c360ce5ee157911c7989bf Mon Sep 17 00:00:00 2001 From: James Lucas Date: Tue, 16 Apr 2024 16:08:32 -0500 Subject: [PATCH 2/3] fixup! Update libs --- go/internal/openapi/api_integration.go | 8 -------- openapi.json | 12 +----------- 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/go/internal/openapi/api_integration.go b/go/internal/openapi/api_integration.go index e7ec8cef9..edbab769c 100644 --- a/go/internal/openapi/api_integration.go +++ b/go/internal/openapi/api_integration.go @@ -776,7 +776,6 @@ type ApiV1IntegrationListRequest struct { appId string limit *int32 iterator *string - order *Ordering } func (r ApiV1IntegrationListRequest) Limit(limit int32) ApiV1IntegrationListRequest { @@ -787,10 +786,6 @@ func (r ApiV1IntegrationListRequest) Iterator(iterator string) ApiV1IntegrationL r.iterator = &iterator return r } -func (r ApiV1IntegrationListRequest) Order(order Ordering) ApiV1IntegrationListRequest { - r.order = &order - return r -} func (r ApiV1IntegrationListRequest) Execute() (ListResponseIntegrationOut, *_nethttp.Response, error) { return r.ApiService.V1IntegrationListExecute(r) @@ -849,9 +844,6 @@ func (a *IntegrationApiService) V1IntegrationListExecute(r ApiV1IntegrationListR if r.iterator != nil { localVarQueryParams.Add("iterator", parameterToString(*r.iterator, "")) } - if r.order != nil { - localVarQueryParams.Add("order", parameterToString(*r.order, "")) - } // to determine the Content-Type header localVarHTTPContentTypes := []string{} diff --git a/openapi.json b/openapi.json index ed25d0eb5..28e7277e8 100644 --- a/openapi.json +++ b/openapi.json @@ -10758,18 +10758,8 @@ "type": "string" }, "style": "form" - }, - { - "description": "The sorting order of the returned items", - "in": "query", - "name": "order", - "schema": { - "$ref": "#/components/schemas/Ordering", - "description": "The sorting order of the returned items", - "nullable": true - }, - "style": "form" } + ], "responses": { "200": { From 5c83383cbc2f4b289c2e5707dc7bffecad0df38e Mon Sep 17 00:00:00 2001 From: James Lucas Date: Tue, 16 Apr 2024 16:17:01 -0500 Subject: [PATCH 3/3] fixup! fixup! Update libs --- go/internal/openapi/api_endpoint.go | 370 +++++++++++++++++++++ openapi.json | 486 +++++++++++++++++++++++++++- 2 files changed, 855 insertions(+), 1 deletion(-) diff --git a/go/internal/openapi/api_endpoint.go b/go/internal/openapi/api_endpoint.go index 99c711544..317914483 100644 --- a/go/internal/openapi/api_endpoint.go +++ b/go/internal/openapi/api_endpoint.go @@ -409,6 +409,186 @@ func (a *EndpointApiService) V1EndpointDeleteExecute(r ApiV1EndpointDeleteReques return localVarHTTPResponse, nil } +type ApiV1EndpointDeleteOauthConfigRequest struct { + ctx _context.Context + ApiService *EndpointApiService + appId string + endpointId string +} + + +func (r ApiV1EndpointDeleteOauthConfigRequest) Execute() (*_nethttp.Response, error) { + return r.ApiService.V1EndpointDeleteOauthConfigExecute(r) +} + +/* + * V1EndpointDeleteOauthConfig Delete Endpoint Oauth Config + * 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 + * @param endpointId The ep's ID or UID + * @return ApiV1EndpointDeleteOauthConfigRequest + */ +func (a *EndpointApiService) V1EndpointDeleteOauthConfig(ctx _context.Context, appId string, endpointId string) ApiV1EndpointDeleteOauthConfigRequest { + return ApiV1EndpointDeleteOauthConfigRequest{ + ApiService: a, + ctx: ctx, + appId: appId, + endpointId: endpointId, + } +} + +/* + * Execute executes the request + */ +func (a *EndpointApiService) V1EndpointDeleteOauthConfigExecute(r ApiV1EndpointDeleteOauthConfigRequest) (*_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodDelete + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EndpointApiService.V1EndpointDeleteOauthConfig") + if err != nil { + return nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/app/{app_id}/endpoint/{endpoint_id}/oauth" + localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", _neturl.PathEscape(parameterToString(r.appId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"endpoint_id"+"}", _neturl.PathEscape(parameterToString(r.endpointId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + if strlen(r.appId) < 1 { + return nil, reportError("appId must have at least 1 elements") + } + if strlen(r.appId) > 256 { + return nil, reportError("appId must have less than 256 elements") + } + if strlen(r.endpointId) < 1 { + return nil, reportError("endpointId must have at least 1 elements") + } + if strlen(r.endpointId) > 256 { + return nil, reportError("endpointId must have less than 256 elements") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v HttpErrorOut + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v HttpErrorOut + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v HttpErrorOut + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v HttpErrorOut + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v HttpErrorOut + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v HttpErrorOut + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + type ApiV1EndpointGetRequest struct { ctx _context.Context ApiService *EndpointApiService @@ -3593,3 +3773,193 @@ func (a *EndpointApiService) V1EndpointUpdateHeadersExecute(r ApiV1EndpointUpdat return localVarHTTPResponse, nil } + +type ApiV1EndpointUpdateOauthConfigRequest struct { + ctx _context.Context + ApiService *EndpointApiService + appId string + endpointId string + endpointOauthConfigIn *EndpointOauthConfigIn +} + +func (r ApiV1EndpointUpdateOauthConfigRequest) EndpointOauthConfigIn(endpointOauthConfigIn EndpointOauthConfigIn) ApiV1EndpointUpdateOauthConfigRequest { + r.endpointOauthConfigIn = &endpointOauthConfigIn + return r +} + +func (r ApiV1EndpointUpdateOauthConfigRequest) Execute() (*_nethttp.Response, error) { + return r.ApiService.V1EndpointUpdateOauthConfigExecute(r) +} + +/* + * V1EndpointUpdateOauthConfig Update Endpoint Oauth Config + * 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 + * @param endpointId The ep's ID or UID + * @return ApiV1EndpointUpdateOauthConfigRequest + */ +func (a *EndpointApiService) V1EndpointUpdateOauthConfig(ctx _context.Context, appId string, endpointId string) ApiV1EndpointUpdateOauthConfigRequest { + return ApiV1EndpointUpdateOauthConfigRequest{ + ApiService: a, + ctx: ctx, + appId: appId, + endpointId: endpointId, + } +} + +/* + * Execute executes the request + */ +func (a *EndpointApiService) V1EndpointUpdateOauthConfigExecute(r ApiV1EndpointUpdateOauthConfigRequest) (*_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPut + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EndpointApiService.V1EndpointUpdateOauthConfig") + if err != nil { + return nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/app/{app_id}/endpoint/{endpoint_id}/oauth" + localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", _neturl.PathEscape(parameterToString(r.appId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"endpoint_id"+"}", _neturl.PathEscape(parameterToString(r.endpointId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + if strlen(r.appId) < 1 { + return nil, reportError("appId must have at least 1 elements") + } + if strlen(r.appId) > 256 { + return nil, reportError("appId must have less than 256 elements") + } + if strlen(r.endpointId) < 1 { + return nil, reportError("endpointId must have at least 1 elements") + } + if strlen(r.endpointId) > 256 { + return nil, reportError("endpointId must have less than 256 elements") + } + if r.endpointOauthConfigIn == nil { + return nil, reportError("endpointOauthConfigIn is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.endpointOauthConfigIn + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v HttpErrorOut + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v HttpErrorOut + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v HttpErrorOut + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v HttpErrorOut + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v HttpErrorOut + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v HTTPValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v HttpErrorOut + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} diff --git a/openapi.json b/openapi.json index 28e7277e8..bf9aa6fb4 100644 --- a/openapi.json +++ b/openapi.json @@ -950,6 +950,30 @@ ], "type": "object" }, + "EndpointOauthConfigIn": { + "properties": { + "authMethod": { + "$ref": "#/components/schemas/Oauth2AuthMethod" + }, + "clientId": { + "type": "string" + }, + "grantType": { + "$ref": "#/components/schemas/Oauth2GrantType" + }, + "tokenUrl": { + "format": "uri", + "type": "string" + } + }, + "required": [ + "authMethod", + "clientId", + "grantType", + "tokenUrl" + ], + "type": "object" + }, "EndpointOut": { "properties": { "channels": { @@ -3284,6 +3308,91 @@ ], "type": "object" }, + "Oauth2AuthMethod": { + "oneOf": [ + { + "properties": { + "jwtSecretBase64": { + "type": "string" + }, + "jwtSecretId": { + "nullable": true, + "type": "string" + }, + "signingAlgorithm": { + "$ref": "#/components/schemas/OauthJwsSigningAlgorithm" + }, + "tokenExpirySecs": { + "format": "uint64", + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "type": { + "enum": [ + "clientSecretJwt" + ], + "type": "string" + } + }, + "required": [ + "jwtSecretBase64", + "signingAlgorithm", + "type" + ], + "type": "object" + }, + { + "properties": { + "clientSecret": { + "type": "string" + }, + "type": { + "enum": [ + "clientSecretBasic" + ], + "type": "string" + } + }, + "required": [ + "clientSecret", + "type" + ], + "type": "object" + }, + { + "properties": { + "clientSecret": { + "type": "string" + }, + "type": { + "enum": [ + "clientSecretPost" + ], + "type": "string" + } + }, + "required": [ + "clientSecret", + "type" + ], + "type": "object" + } + ], + "type": "object" + }, + "Oauth2GrantType": { + "enum": [ + "clientCredentials" + ], + "type": "string" + }, + "OauthJwsSigningAlgorithm": { + "enum": [ + "RS256" + ], + "type": "string" + }, "OauthPayloadIn": { "properties": { "code": { @@ -8242,6 +8351,382 @@ ] } }, + "/api/v1/app/{app_id}/endpoint/{endpoint_id}/oauth": { + "delete": { + "description": "Delete endpoint OAuth configuration", + "operationId": "v1.endpoint.delete-oauth-config", + "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": "endpoint_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" + } + ], + "responses": { + "204": { + "description": "no content" + }, + "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": "Delete Endpoint Oauth Config", + "tags": [ + "Endpoint" + ], + "x-codeSamples": [ + { + "label": "JavaScript", + "lang": "JavaScript", + "source": "await svix.endpoint.deleteOauthConfig(\"app_id\", \"endpoint_id\");" + }, + { + "label": "TypeScript", + "lang": "JavaScript", + "source": "await svix.endpoint.deleteOauthConfig(\"app_id\", \"endpoint_id\");" + }, + { + "label": "Python", + "lang": "Python", + "source": "svix.endpoint.delete_oauth_config(\"app_id\", \"endpoint_id\")" + }, + { + "label": "Python (Async)", + "lang": "Python", + "source": "await svix.endpoint.delete_oauth_config(\"app_id\", \"endpoint_id\")" + }, + { + "label": "Go", + "lang": "Go", + "source": "err := svixClient.Endpoint.DeleteOauthConfig(ctx, \"app_id\", \"endpoint_id\")" + }, + { + "label": "Kotlin", + "lang": "Kotlin", + "source": "svix.endpoint.deleteOauthConfig(\"app_id\", \"endpoint_id\")" + }, + { + "label": "Java", + "lang": "Java", + "source": "svix.getEndpoint().deleteOauthConfig(\"app_id\", \"endpoint_id\")" + }, + { + "label": "Ruby", + "lang": "Ruby", + "source": "svix.endpoint.delete_oauth_config(\"app_id\", \"endpoint_id\")" + }, + { + "label": "Rust", + "lang": "Rust", + "source": "svix.endpoint().delete_oauth_config(\"app_id\", \"endpoint_id\").await?;" + }, + { + "label": "C#", + "lang": "C#", + "source": "await svix.Endpoint.DeleteOauthConfigAsync(\"app_id\", \"endpoint_id\")" + }, + { + "label": "CLI", + "lang": "Shell", + "source": "svix endpoint delete-oauth-config \"app_id\" \"endpoint_id\"" + }, + { + "label": "cURL", + "lang": "Shell", + "source": "curl -X 'DELETE' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/oauth' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'" + } + ] + }, + "put": { + "description": "Create/update endpoint OAuth configuration", + "operationId": "v1.endpoint.update-oauth-config", + "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": "endpoint_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" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EndpointOauthConfigIn" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "no content" + }, + "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": "Update Endpoint Oauth Config", + "tags": [ + "Endpoint" + ], + "x-codeSamples": [ + { + "label": "JavaScript", + "lang": "JavaScript", + "source": "await svix.endpoint.updateOauthConfig(\"app_id\", \"endpoint_id\", \n});" + }, + { + "label": "TypeScript", + "lang": "JavaScript", + "source": "await svix.endpoint.updateOauthConfig(\"app_id\", \"endpoint_id\", \n});" + }, + { + "label": "Python", + "lang": "Python", + "source": "svix.endpoint.update_oauth_config(\"app_id\", \"endpoint_id\", EndpointOauthConfigIn\n))" + }, + { + "label": "Python (Async)", + "lang": "Python", + "source": "await svix.endpoint.update_oauth_config(\"app_id\", \"endpoint_id\", EndpointOauthConfigIn\n))" + }, + { + "label": "Go", + "lang": "Go", + "source": "err := svixClient.Endpoint.UpdateOauthConfig(ctx, \"app_id\", \"endpoint_id\", &EndpointOauthConfigIn{\n})" + }, + { + "label": "Kotlin", + "lang": "Kotlin", + "source": "svix.endpoint.updateOauthConfig(\"app_id\", \"endpoint_id\", EndpointOauthConfigIn()\n)" + }, + { + "label": "Java", + "lang": "Java", + "source": "svix.getEndpoint().updateOauthConfig(\"app_id\", \"endpoint_id\", new EndpointOauthConfigIn()\n)" + }, + { + "label": "Ruby", + "lang": "Ruby", + "source": "svix.endpoint.update_oauth_config(\"app_id\", \"endpoint_id\", Svix::EndpointOauthConfigIn.new(\n}))" + }, + { + "label": "Rust", + "lang": "Rust", + "source": "svix.endpoint().update_oauth_config(\"app_id\", \"endpoint_id\", EndpointOauthConfigIn {\n}).await?;" + }, + { + "label": "C#", + "lang": "C#", + "source": "await svix.Endpoint.UpdateOauthConfigAsync(\"app_id\", \"endpoint_id\", new EndpointOauthConfigIn\n})" + }, + { + "label": "CLI", + "lang": "Shell", + "source": "svix endpoint update-oauth-config \"app_id\" \"endpoint_id\" '\n}'" + }, + { + "label": "cURL", + "lang": "Shell", + "source": "curl -X 'PUT' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/endpoint/{endpoint_id}/oauth' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '\n }'" + } + ] + } + }, "/api/v1/app/{app_id}/endpoint/{endpoint_id}/recover": { "post": { "description": "Resend all failed messages since a given time.", @@ -10759,7 +11244,6 @@ }, "style": "form" } - ], "responses": { "200": {