From 423f746abdc7d9cfd2dd0609727fc15392763880 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Wed, 10 May 2023 14:57:06 -0700 Subject: [PATCH] Update openapi schema and bump version (#918) --- .version | 2 +- ChangeLog.md | 3 + csharp/Svix/Svix.csproj | 2 +- go/internal/openapi/api_authentication.go | 179 ++++++++++++++++ .../openapi/model_one_time_token_in.go | 4 +- .../openapi/model_one_time_token_out.go | 4 +- go/internal/version/version.go | 2 +- java/README.md | 4 +- java/gradle.properties | 2 +- java/lib/src/main/java/com/svix/Svix.java | 2 +- javascript/package.json | 2 +- javascript/src/index.ts | 2 +- kotlin/README.md | 4 +- kotlin/gradle.properties | 2 +- kotlin/lib/src/main/kotlin/SvixOptions.kt | 2 +- openapi.json | 192 ++++++++++++++++++ python/svix/__init__.py | 2 +- ruby/Gemfile.lock | 2 +- ruby/lib/svix/version.rb | 2 +- rust/Cargo.toml | 2 +- server/Cargo.lock | 2 +- server/svix-server/Cargo.toml | 2 +- 22 files changed, 397 insertions(+), 23 deletions(-) diff --git a/.version b/.version index e3dcb7584..537b9e4b7 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -0.85.0 \ No newline at end of file +0.85.1 \ No newline at end of file diff --git a/ChangeLog.md b/ChangeLog.md index 53fe3b9f7..6988f6ce2 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -3,6 +3,9 @@ ## Next * +## Version 0.85.1 +* Libs: update OpenAPI spec + ## Version 0.85.0 * Server: add a missing migration for operational webhooks event types. * Libs/Ruby: fix the library failing to load due to missing dependency. diff --git a/csharp/Svix/Svix.csproj b/csharp/Svix/Svix.csproj index 3895b764e..49d5c4f9a 100644 --- a/csharp/Svix/Svix.csproj +++ b/csharp/Svix/Svix.csproj @@ -3,7 +3,7 @@ net5.0;netstandard2.0 Svix - 0.85.0 + 0.85.1 Svix Svix true diff --git a/go/internal/openapi/api_authentication.go b/go/internal/openapi/api_authentication.go index 24cb508b8..532860ca3 100644 --- a/go/internal/openapi/api_authentication.go +++ b/go/internal/openapi/api_authentication.go @@ -397,6 +397,185 @@ func (a *AuthenticationApiService) V1AuthenticationDashboardAccessExecute(r ApiV return localVarReturnValue, localVarHTTPResponse, nil } +type ApiV1AuthenticationExchangeOneTimeTokenRequest struct { + ctx _context.Context + ApiService *AuthenticationApiService + oneTimeTokenIn *OneTimeTokenIn + idempotencyKey *string +} + +func (r ApiV1AuthenticationExchangeOneTimeTokenRequest) OneTimeTokenIn(oneTimeTokenIn OneTimeTokenIn) ApiV1AuthenticationExchangeOneTimeTokenRequest { + r.oneTimeTokenIn = &oneTimeTokenIn + return r +} +func (r ApiV1AuthenticationExchangeOneTimeTokenRequest) IdempotencyKey(idempotencyKey string) ApiV1AuthenticationExchangeOneTimeTokenRequest { + r.idempotencyKey = &idempotencyKey + return r +} + +func (r ApiV1AuthenticationExchangeOneTimeTokenRequest) Execute() (OneTimeTokenOut, *_nethttp.Response, error) { + return r.ApiService.V1AuthenticationExchangeOneTimeTokenExecute(r) +} + +/* + * V1AuthenticationExchangeOneTimeToken Exchange One Time Token + * This is a one time token + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @return ApiV1AuthenticationExchangeOneTimeTokenRequest + */ +func (a *AuthenticationApiService) V1AuthenticationExchangeOneTimeToken(ctx _context.Context) ApiV1AuthenticationExchangeOneTimeTokenRequest { + return ApiV1AuthenticationExchangeOneTimeTokenRequest{ + ApiService: a, + ctx: ctx, + } +} + +/* + * Execute executes the request + * @return OneTimeTokenOut + */ +func (a *AuthenticationApiService) V1AuthenticationExchangeOneTimeTokenExecute(r ApiV1AuthenticationExchangeOneTimeTokenRequest) (OneTimeTokenOut, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPost + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue OneTimeTokenOut + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AuthenticationApiService.V1AuthenticationExchangeOneTimeToken") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/auth/one-time-token/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + if r.oneTimeTokenIn == nil { + return localVarReturnValue, nil, reportError("oneTimeTokenIn 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 + } + if r.idempotencyKey != nil { + localVarHeaderParams["idempotency-key"] = parameterToString(*r.idempotencyKey, "") + } + // body params + localVarPostBody = r.oneTimeTokenIn + 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 == 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 +} + type ApiV1AuthenticationExpireAllRequest struct { ctx _context.Context ApiService *AuthenticationApiService diff --git a/go/internal/openapi/model_one_time_token_in.go b/go/internal/openapi/model_one_time_token_in.go index 28316e2a8..8ac28897b 100644 --- a/go/internal/openapi/model_one_time_token_in.go +++ b/go/internal/openapi/model_one_time_token_in.go @@ -1,9 +1,9 @@ /* * Svix API * - * Welcome to the Svix API documentation! Useful links: [Homepage](https://www.svix.com) | [Support email](mailto:support+docs@svix.com) | [Blog](https://www.svix.com/blog/) | [Slack Community](https://www.svix.com/slack/) # Introduction This is the reference documentation and schemas for the [Svix webhook service](https://www.svix.com) API. For tutorials and other documentation please refer to [the documentation](https://docs.svix.com). ## Main concepts In Svix you have four important entities you will be interacting with: - `messages`: these are the webhooks being sent. They can have contents and a few other properties. - `application`: this is where `messages` are sent to. Usually you want to create one application for each user on your platform. - `endpoint`: endpoints are the URLs messages will be sent to. Each application can have multiple `endpoints` and each message sent to that application will be sent to all of them (unless they are not subscribed to the sent event type). - `event-type`: event types are identifiers denoting the type of the message being sent. Event types are primarily used to decide which events are sent to which endpoint. ## Authentication Get your authentication token (`AUTH_TOKEN`) from the [Svix dashboard](https://dashboard.svix.com) and use it as part of the `Authorization` header as such: `Authorization: Bearer ${AUTH_TOKEN}`. ## Code samples The code samples assume you already have the respective libraries installed and you know how to use them. For the latest information on how to do that, please refer to [the documentation](https://docs.svix.com/). ## Idempotency Svix supports [idempotency](https://en.wikipedia.org/wiki/Idempotence) for safely retrying requests without accidentally performing the same operation twice. This is useful when an API call is disrupted in transit and you do not receive a response. To perform an idempotent request, pass the idempotency key in the `Idempotency-Key` header to the request. The idempotency key should be a unique value generated by the client. You can create the key in however way you like, though we suggest using UUID v4, or any other string with enough entropy to avoid collisions. Svix's idempotency works by saving the resulting status code and body of the first request made for any given idempotency key for any successful request. Subsequent requests with the same key return the same result. Please note that idempotency is only supported for `POST` requests. ## Cross-Origin Resource Sharing This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). And that allows cross-domain communication from the browser. All responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site. + * Welcome to the Svix API documentation! Useful links: [Homepage](https://www.svix.com) | [Support email](mailto:support+docs@svix.com) | [Blog](https://www.svix.com/blog/) | [Slack Community](https://www.svix.com/slack/) # Introduction This is the reference documentation and schemas for the [Svix webhook service](https://www.svix.com) API. For tutorials and other documentation please refer to [the documentation](https://docs.svix.com). ## Main concepts In Svix you have four important entities you will be interacting with: - `messages`: these are the webhooks being sent. They can have contents and a few other properties. - `application`: this is where `messages` are sent to. Usually you want to create one application for each user on your platform. - `endpoint`: endpoints are the URLs messages will be sent to. Each application can have multiple `endpoints` and each message sent to that application will be sent to all of them (unless they are not subscribed to the sent event type). - `event-type`: event types are identifiers denoting the type of the message being sent. Event types are primarily used to decide which events are sent to which endpoint. ## Authentication Get your authentication token (`AUTH_TOKEN`) from the [Svix dashboard](https://dashboard.svix.com) and use it as part of the `Authorization` header as such: `Authorization: Bearer ${AUTH_TOKEN}`. For more information on authentication, please refer to the [authentication token docs](https://docs.svix.com/api-keys). ## Code samples The code samples assume you already have the respective libraries installed and you know how to use them. For the latest information on how to do that, please refer to [the documentation](https://docs.svix.com/). ## Idempotency Svix supports [idempotency](https://en.wikipedia.org/wiki/Idempotence) for safely retrying requests without accidentally performing the same operation twice. This is useful when an API call is disrupted in transit and you do not receive a response. To perform an idempotent request, pass the idempotency key in the `Idempotency-Key` header to the request. The idempotency key should be a unique value generated by the client. You can create the key in however way you like, though we suggest using UUID v4, or any other string with enough entropy to avoid collisions. Svix's idempotency works by saving the resulting status code and body of the first request made for any given idempotency key for any successful request. Subsequent requests with the same key return the same result. Please note that idempotency is only supported for `POST` requests. ## Cross-Origin Resource Sharing This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). And that allows cross-domain communication from the browser. All responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site. * - * API version: 1.4 + * API version: 1.4.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/go/internal/openapi/model_one_time_token_out.go b/go/internal/openapi/model_one_time_token_out.go index 74181ee9a..f1ab2016d 100644 --- a/go/internal/openapi/model_one_time_token_out.go +++ b/go/internal/openapi/model_one_time_token_out.go @@ -1,9 +1,9 @@ /* * Svix API * - * Welcome to the Svix API documentation! Useful links: [Homepage](https://www.svix.com) | [Support email](mailto:support+docs@svix.com) | [Blog](https://www.svix.com/blog/) | [Slack Community](https://www.svix.com/slack/) # Introduction This is the reference documentation and schemas for the [Svix webhook service](https://www.svix.com) API. For tutorials and other documentation please refer to [the documentation](https://docs.svix.com). ## Main concepts In Svix you have four important entities you will be interacting with: - `messages`: these are the webhooks being sent. They can have contents and a few other properties. - `application`: this is where `messages` are sent to. Usually you want to create one application for each user on your platform. - `endpoint`: endpoints are the URLs messages will be sent to. Each application can have multiple `endpoints` and each message sent to that application will be sent to all of them (unless they are not subscribed to the sent event type). - `event-type`: event types are identifiers denoting the type of the message being sent. Event types are primarily used to decide which events are sent to which endpoint. ## Authentication Get your authentication token (`AUTH_TOKEN`) from the [Svix dashboard](https://dashboard.svix.com) and use it as part of the `Authorization` header as such: `Authorization: Bearer ${AUTH_TOKEN}`. ## Code samples The code samples assume you already have the respective libraries installed and you know how to use them. For the latest information on how to do that, please refer to [the documentation](https://docs.svix.com/). ## Idempotency Svix supports [idempotency](https://en.wikipedia.org/wiki/Idempotence) for safely retrying requests without accidentally performing the same operation twice. This is useful when an API call is disrupted in transit and you do not receive a response. To perform an idempotent request, pass the idempotency key in the `Idempotency-Key` header to the request. The idempotency key should be a unique value generated by the client. You can create the key in however way you like, though we suggest using UUID v4, or any other string with enough entropy to avoid collisions. Svix's idempotency works by saving the resulting status code and body of the first request made for any given idempotency key for any successful request. Subsequent requests with the same key return the same result. Please note that idempotency is only supported for `POST` requests. ## Cross-Origin Resource Sharing This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). And that allows cross-domain communication from the browser. All responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site. + * Welcome to the Svix API documentation! Useful links: [Homepage](https://www.svix.com) | [Support email](mailto:support+docs@svix.com) | [Blog](https://www.svix.com/blog/) | [Slack Community](https://www.svix.com/slack/) # Introduction This is the reference documentation and schemas for the [Svix webhook service](https://www.svix.com) API. For tutorials and other documentation please refer to [the documentation](https://docs.svix.com). ## Main concepts In Svix you have four important entities you will be interacting with: - `messages`: these are the webhooks being sent. They can have contents and a few other properties. - `application`: this is where `messages` are sent to. Usually you want to create one application for each user on your platform. - `endpoint`: endpoints are the URLs messages will be sent to. Each application can have multiple `endpoints` and each message sent to that application will be sent to all of them (unless they are not subscribed to the sent event type). - `event-type`: event types are identifiers denoting the type of the message being sent. Event types are primarily used to decide which events are sent to which endpoint. ## Authentication Get your authentication token (`AUTH_TOKEN`) from the [Svix dashboard](https://dashboard.svix.com) and use it as part of the `Authorization` header as such: `Authorization: Bearer ${AUTH_TOKEN}`. For more information on authentication, please refer to the [authentication token docs](https://docs.svix.com/api-keys). ## Code samples The code samples assume you already have the respective libraries installed and you know how to use them. For the latest information on how to do that, please refer to [the documentation](https://docs.svix.com/). ## Idempotency Svix supports [idempotency](https://en.wikipedia.org/wiki/Idempotence) for safely retrying requests without accidentally performing the same operation twice. This is useful when an API call is disrupted in transit and you do not receive a response. To perform an idempotent request, pass the idempotency key in the `Idempotency-Key` header to the request. The idempotency key should be a unique value generated by the client. You can create the key in however way you like, though we suggest using UUID v4, or any other string with enough entropy to avoid collisions. Svix's idempotency works by saving the resulting status code and body of the first request made for any given idempotency key for any successful request. Subsequent requests with the same key return the same result. Please note that idempotency is only supported for `POST` requests. ## Cross-Origin Resource Sharing This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). And that allows cross-domain communication from the browser. All responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site. * - * API version: 1.4 + * API version: 1.4.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/go/internal/version/version.go b/go/internal/version/version.go index f9602cc62..201b81ab6 100644 --- a/go/internal/version/version.go +++ b/go/internal/version/version.go @@ -1,3 +1,3 @@ package version -const Version = "0.85.0" +const Version = "0.85.1" diff --git a/java/README.md b/java/README.md index bb3a1b9c9..4c780ee4f 100644 --- a/java/README.md +++ b/java/README.md @@ -51,7 +51,7 @@ Add this dependency to your project's POM: com.svix svix - 0.85.0 + 0.85.1 compile ``` @@ -61,7 +61,7 @@ Add this dependency to your project's POM: Add this dependency to your project's build file: ```groovy -implementation "com.svix:svix:0.85.0" +implementation "com.svix:svix:0.85.1" ``` # Development diff --git a/java/gradle.properties b/java/gradle.properties index e70efbab1..b9e81cddd 100644 --- a/java/gradle.properties +++ b/java/gradle.properties @@ -1,5 +1,5 @@ GROUP=com.svix -VERSION_NAME=0.85.0 +VERSION_NAME=0.85.1 POM_URL=https://github.com/svix/svix-webhooks POM_SCM_URL=git@github.com:svix/svix-webhooks.git diff --git a/java/lib/src/main/java/com/svix/Svix.java b/java/lib/src/main/java/com/svix/Svix.java index a1628ba2d..296abfcf7 100644 --- a/java/lib/src/main/java/com/svix/Svix.java +++ b/java/lib/src/main/java/com/svix/Svix.java @@ -5,7 +5,7 @@ import com.svix.internal.auth.HttpBearerAuth; public final class Svix { - public static final String VERSION = "0.85.0"; + public static final String VERSION = "0.85.1"; private final Application application; private final Authentication authentication; private final Endpoint endpoint; diff --git a/javascript/package.json b/javascript/package.json index c7b6a455e..a2199f0c2 100644 --- a/javascript/package.json +++ b/javascript/package.json @@ -1,6 +1,6 @@ { "name": "svix", - "version": "0.85.0", + "version": "0.85.1", "description": "Svix API client", "author": "svix", "repository": "https://github.com/svix/svix-libs", diff --git a/javascript/src/index.ts b/javascript/src/index.ts index dbc4411c1..4dde92fb6 100644 --- a/javascript/src/index.ts +++ b/javascript/src/index.ts @@ -62,7 +62,7 @@ import * as base64 from "@stablelib/base64"; import * as sha256 from "fast-sha256"; const WEBHOOK_TOLERANCE_IN_SECONDS = 5 * 60; // 5 minutes -const VERSION = "0.85.0"; +const VERSION = "0.85.1"; class UserAgentMiddleware implements Middleware { public pre(context: RequestContext): Promise { diff --git a/kotlin/README.md b/kotlin/README.md index 62a6156a0..af56c0328 100644 --- a/kotlin/README.md +++ b/kotlin/README.md @@ -51,7 +51,7 @@ Add this dependency to your project's POM: com.svix.kotlin svix-kotlin - 0.85.0 + 0.85.1 compile ``` @@ -61,7 +61,7 @@ Add this dependency to your project's POM: Add this dependency to your project's build file: ```groovy -implementation "com.svix.kotlin:svix-kotlin:0.85.0" +implementation "com.svix.kotlin:svix-kotlin:0.85.1" ``` # Development diff --git a/kotlin/gradle.properties b/kotlin/gradle.properties index 41328e3a1..0ab4da85d 100644 --- a/kotlin/gradle.properties +++ b/kotlin/gradle.properties @@ -1,5 +1,5 @@ GROUP=com.svix.kotlin -VERSION_NAME=0.85.0 +VERSION_NAME=0.85.1 POM_URL=https://github.com/svix/svix-webhooks POM_SCM_URL=git@github.com:svix/svix-webhooks.git diff --git a/kotlin/lib/src/main/kotlin/SvixOptions.kt b/kotlin/lib/src/main/kotlin/SvixOptions.kt index 3270b38bc..36bb32376 100644 --- a/kotlin/lib/src/main/kotlin/SvixOptions.kt +++ b/kotlin/lib/src/main/kotlin/SvixOptions.kt @@ -6,7 +6,7 @@ data class SvixOptions( val numRetries: Int? = null ) { - private val version = "0.85.0" + private val version = "0.85.1" var serverUrl: String get() = this.wantedServerUrl ?: DEFAULT_URL diff --git a/openapi.json b/openapi.json index 6bc37954c..61710d5c9 100644 --- a/openapi.json +++ b/openapi.json @@ -2667,6 +2667,28 @@ "Sending" ] }, + "OneTimeTokenIn": { + "properties": { + "oneTimeToken": { + "type": "string" + } + }, + "required": [ + "oneTimeToken" + ], + "type": "object" + }, + "OneTimeTokenOut": { + "properties": { + "token": { + "type": "string" + } + }, + "required": [ + "token" + ], + "type": "object" + }, "Ordering": { "description": "Defines the ordering in a listing of results.", "enum": [ @@ -12783,6 +12805,176 @@ ] } }, + "/api/v1/auth/one-time-token/": { + "post": { + "description": "This is a one time token", + "operationId": "v1.authentication.exchange-one-time-token", + "parameters": [ + { + "description": "The request's idempotency key", + "in": "header", + "name": "idempotency-key", + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OneTimeTokenIn" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OneTimeTokenOut" + } + } + }, + "description": "" + }, + "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": "Exchange One Time Token", + "tags": [ + "Authentication" + ], + "x-codeSamples": [ + { + "label": "JavaScript", + "lang": "JavaScript", + "source": "const oneTimeTokenOut = await svix.authentication.exchangeOneTimeToken(\n});" + }, + { + "label": "TypeScript", + "lang": "JavaScript", + "source": "const oneTimeTokenOut = await svix.authentication.exchangeOneTimeToken(\n});" + }, + { + "label": "Python", + "lang": "Python", + "source": "one_time_token_out = svix.authentication.exchange_one_time_token(OneTimeTokenIn\n), None)" + }, + { + "label": "Python (Async)", + "lang": "Python", + "source": "one_time_token_out = await svix.authentication.exchange_one_time_token(OneTimeTokenIn\n), None)" + }, + { + "label": "Go", + "lang": "Go", + "source": "oneTimeTokenOut, err := svixClient.Authentication.ExchangeOneTimeToken(ctx, &OneTimeTokenIn{\n})" + }, + { + "label": "Kotlin", + "lang": "Kotlin", + "source": "val oneTimeTokenOut = svix.authentication.exchangeOneTimeToken(OneTimeTokenIn()\n)" + }, + { + "label": "Java", + "lang": "Java", + "source": "OneTimeTokenOut oneTimeTokenOut = svix.getAuthentication().exchangeOneTimeToken(new OneTimeTokenIn()\n)" + }, + { + "label": "Ruby", + "lang": "Ruby", + "source": "one_time_token_out = svix.authentication.exchange_one_time_token(Svix::OneTimeTokenIn.new(\n}))" + }, + { + "label": "Rust", + "lang": "Rust", + "source": "let one_time_token_out = svix.authentication().exchange_one_time_token(OneTimeTokenIn {\n}, None).await?;" + }, + { + "label": "C#", + "lang": "C#", + "source": "var oneTimeTokenOut = await svix.Authentication.ExchangeOneTimeTokenAsync(new OneTimeTokenIn\n})" + }, + { + "label": "CLI", + "lang": "Shell", + "source": "svix authentication exchange-one-time-token '\n}'" + }, + { + "label": "cURL", + "lang": "Shell", + "source": "curl -X 'POST' \\\n 'https://api.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/": { "get": { "description": "List background tasks executed in the past 90 days.", diff --git a/python/svix/__init__.py b/python/svix/__init__.py index a7a14f5f0..69f935ad3 100644 --- a/python/svix/__init__.py +++ b/python/svix/__init__.py @@ -37,4 +37,4 @@ "WebhookVerificationError", ] -__version__ = "0.85.0" +__version__ = "0.85.1" diff --git a/ruby/Gemfile.lock b/ruby/Gemfile.lock index c883c7e01..df0b94da8 100644 --- a/ruby/Gemfile.lock +++ b/ruby/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - svix (0.85.0) + svix (0.85.1) typhoeus (~> 1.0, >= 1.0.1) GEM diff --git a/ruby/lib/svix/version.rb b/ruby/lib/svix/version.rb index 43d10ad2f..e4834c1e7 100644 --- a/ruby/lib/svix/version.rb +++ b/ruby/lib/svix/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Svix - VERSION = "0.85.0" + VERSION = "0.85.1" end diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 82fe3f30c..98092b67b 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "svix" -version = "0.85.0" +version = "0.85.1" authors = ["Svix Inc. "] edition = "2021" description="Rust library for interacting with the Svix API and verifying webhook signatures." diff --git a/server/Cargo.lock b/server/Cargo.lock index d69cfffc1..32949c3a2 100644 --- a/server/Cargo.lock +++ b/server/Cargo.lock @@ -3713,7 +3713,7 @@ dependencies = [ [[package]] name = "svix-server" -version = "0.85.0" +version = "0.85.1" dependencies = [ "aide", "anyhow", diff --git a/server/svix-server/Cargo.toml b/server/svix-server/Cargo.toml index e064433df..0d400b7a6 100644 --- a/server/svix-server/Cargo.toml +++ b/server/svix-server/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "svix-server" -version = "0.85.0" +version = "0.85.1" license = "MIT" description = "Svix webhooks server"