diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 8c91f64..8390413 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,18 +1,18 @@ lockVersion: 2.0.0 id: 5a2dd83e-da98-455b-8ef9-0100a914efdf management: - docChecksum: eae1ba18bcf69b50e7b53142f6625750 + docChecksum: 756dac9e9f7f9954fef9635bbe0c7ca8 docVersion: 0.0.1 - speakeasyVersion: 1.448.0 - generationVersion: 2.466.0 - releaseVersion: 0.2.2-alpha.40 - configChecksum: 18973e9636a0a08bf1ffdf9643bcdc83 + speakeasyVersion: 1.448.2 + generationVersion: 2.467.4 + releaseVersion: 0.2.2-alpha.41 + configChecksum: 8febf46035f281e35336d2fc3115c94f repoURL: https://github.com/dubinc/dub-ruby.git installationURL: https://github.com/dubinc/dub-ruby published: true features: ruby: - core: 3.4.0 + core: 3.4.1 deprecations: 2.81.1 examples: 2.81.3 flattening: 2.81.1 @@ -41,6 +41,9 @@ generatedFiles: - docs/models/operations/createcustomerresponsebody.md - docs/models/operations/createdomainrequestbody.md - docs/models/operations/createdomainresponse.md + - docs/models/operations/createembedtokenrequestbody.md + - docs/models/operations/createembedtokenresponse.md + - docs/models/operations/createembedtokenresponsebody.md - docs/models/operations/createlinkrequestbody.md - docs/models/operations/createlinkresponse.md - docs/models/operations/createtagrequestbody.md @@ -178,6 +181,7 @@ generatedFiles: - docs/sdks/customers/README.md - docs/sdks/domains/README.md - docs/sdks/dub/README.md + - docs/sdks/embedtokens/README.md - docs/sdks/events/README.md - docs/sdks/links/README.md - docs/sdks/metatags/README.md @@ -191,6 +195,7 @@ generatedFiles: - lib/open_api_sdk/customers.rb - lib/open_api_sdk/domains.rb - lib/open_api_sdk/dub.rb + - lib/open_api_sdk/embed_tokens.rb - lib/open_api_sdk/events.rb - lib/open_api_sdk/links.rb - lib/open_api_sdk/metatags.rb @@ -208,6 +213,9 @@ generatedFiles: - lib/open_api_sdk/models/operations/createcustomer_responsebody.rb - lib/open_api_sdk/models/operations/createdomain_requestbody.rb - lib/open_api_sdk/models/operations/createdomain_response.rb + - lib/open_api_sdk/models/operations/createembedtoken_requestbody.rb + - lib/open_api_sdk/models/operations/createembedtoken_response.rb + - lib/open_api_sdk/models/operations/createembedtoken_responsebody.rb - lib/open_api_sdk/models/operations/createlink_requestbody.rb - lib/open_api_sdk/models/operations/createlink_response.rb - lib/open_api_sdk/models/operations/createtag_requestbody.rb @@ -1199,4 +1207,27 @@ examples: application/json: {"error": {"code": "rate_limit_exceeded", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#rate-limit_exceeded"}} "500": application/json: {"error": {"code": "internal_server_error", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#internal-server_error"}} + createEmbedToken: + speakeasy-default-create-embed-token: + responses: + "201": + application/json: {"publicToken": "", "expires": ""} + "400": + application/json: {"error": {"code": "bad_request", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#bad-request"}} + "401": + application/json: {"error": {"code": "unauthorized", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#unauthorized"}} + "403": + application/json: {"error": {"code": "forbidden", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#forbidden"}} + "404": + application/json: {"error": {"code": "not_found", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#not-found"}} + "409": + application/json: {"error": {"code": "conflict", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#conflict"}} + "410": + application/json: {"error": {"code": "invite_expired", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#invite-expired"}} + "422": + application/json: {"error": {"code": "unprocessable_entity", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#unprocessable-entity"}} + "429": + application/json: {"error": {"code": "rate_limit_exceeded", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#rate-limit_exceeded"}} + "500": + application/json: {"error": {"code": "internal_server_error", "message": "The requested resource was not found.", "doc_url": "https://dub.co/docs/api-reference/errors#internal-server_error"}} generatedTests: {} diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 70b7737..b8f7c3d 100755 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -13,7 +13,7 @@ generation: oAuth2ClientCredentialsEnabled: true oAuth2PasswordEnabled: false ruby: - version: 0.2.2-alpha.40 + version: 0.2.2-alpha.41 author: Dub description: Ruby Client SDK Generated by Speakeasy imports: diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 5cd9155..9f2a4f8 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,21 +1,21 @@ -speakeasyVersion: 1.448.0 +speakeasyVersion: 1.448.2 sources: dub: sourceNamespace: dub - sourceRevisionDigest: sha256:9c09b6ce035b4a246fb3d43a50db2ecb08170cd03e2a36cb19088ec44c5d5d1e - sourceBlobDigest: sha256:ded098bc753361ce90e62a9e6c8b20e9dd63c36aadafdae666cb20ff2a1c8d02 + sourceRevisionDigest: sha256:a303b510bfedc7ab90214b679b4b82a5173c3f0ddd42f5384eb739f5c19ff2b8 + sourceBlobDigest: sha256:6d8e8227e33c26bdbfb30855e2034fd298b39c324e01ed923c57f3f9b34a0c02 tags: - latest - - speakeasy-sdk-regen-1732667295 + - speakeasy-sdk-regen-1732753692 - 0.0.1 targets: my-first-target: source: dub sourceNamespace: dub - sourceRevisionDigest: sha256:9c09b6ce035b4a246fb3d43a50db2ecb08170cd03e2a36cb19088ec44c5d5d1e - sourceBlobDigest: sha256:ded098bc753361ce90e62a9e6c8b20e9dd63c36aadafdae666cb20ff2a1c8d02 + sourceRevisionDigest: sha256:a303b510bfedc7ab90214b679b4b82a5173c3f0ddd42f5384eb739f5c19ff2b8 + sourceBlobDigest: sha256:6d8e8227e33c26bdbfb30855e2034fd298b39c324e01ed923c57f3f9b34a0c02 codeSamplesNamespace: code-samples-ruby-my-first-target - codeSamplesRevisionDigest: sha256:dc6607f2689cbefb15a57992d85b9c8ed0e1d745363067b7d162acc36cc4af1f + codeSamplesRevisionDigest: sha256:ee13fa0e19aef7ffd2ceeebb5f98d39a9c9a724ff9d4a838758f60f30e1bd9c3 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/Gemfile.lock b/Gemfile.lock index 7e0c1ed..a707484 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - dub (0.2.2.pre.alpha.40) + dub (0.2.2.pre.alpha.41) faraday faraday-multipart rack @@ -90,6 +90,7 @@ GEM PLATFORMS aarch64-linux + arm64-darwin-23 arm64-darwin-24 x86_64-linux diff --git a/README.md b/README.md index fa28fbd..b7435df 100644 --- a/README.md +++ b/README.md @@ -19,11 +19,14 @@ Dub.co API: Dub is link management infrastructure for companies to create market ## Table of Contents + + * [SDK Installation](#sdk-installation) + * [SDK Example Usage](#sdk-example-usage) + * [Available Resources and Operations](#available-resources-and-operations) + * [Server Selection](#server-selection) +* [Development](#development) + * [Contributions](#contributions) -* [SDK Installation](#sdk-installation) -* [SDK Example Usage](#sdk-example-usage) -* [Available Resources and Operations](#available-resources-and-operations) -* [Server Selection](#server-selection) @@ -126,6 +129,10 @@ end * [delete](docs/sdks/domains/README.md#delete) - Delete a domain +### [embed_tokens](docs/sdks/embedtokens/README.md) + +* [create](docs/sdks/embedtokens/README.md#create) - Create a new embed token + ### [events](docs/sdks/events/README.md) * [list](docs/sdks/events/README.md#list) - Retrieve a list of events diff --git a/RELEASES.md b/RELEASES.md index 25d3f99..5982816 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -548,4 +548,14 @@ Based on: ### Generated - [ruby v0.2.2-alpha.40] . ### Releases -- [Ruby Gems v0.2.2-alpha.40] https://rubygems.org/gems/dub/versions/0.2.2-alpha.40 - . \ No newline at end of file +- [Ruby Gems v0.2.2-alpha.40] https://rubygems.org/gems/dub/versions/0.2.2-alpha.40 - . + +## 2024-11-28 00:28:09 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.448.2 (2.467.4) https://github.com/speakeasy-api/speakeasy +### Generated +- [ruby v0.2.2-alpha.41] . +### Releases +- [Ruby Gems v0.2.2-alpha.41] https://rubygems.org/gems/dub/versions/0.2.2-alpha.41 - . \ No newline at end of file diff --git a/codeSamples.yaml b/codeSamples.yaml index 0cb9b63..3de83ec 100644 --- a/codeSamples.yaml +++ b/codeSamples.yaml @@ -165,6 +165,12 @@ actions: - "lang": "ruby" "label": "updateTag" "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n \nres = s.tags.update(id=\"\", request_body=::OpenApiSDK::Operations::UpdateTagRequestBody.new())\n\nif ! res.tag_schema.nil?\n # handle response\nend" + - target: $["paths"]["/tokens/embed"]["post"] + update: + "x-codeSamples": + - "lang": "ruby" + "label": "createEmbedToken" + "source": "require 'dub'\n\n\ns = ::OpenApiSDK::Dub.new\ns.config_security(\n ::OpenApiSDK::Shared::Security.new(\n token: \"DUB_API_KEY\",\n )\n)\n\n\nreq = ::OpenApiSDK::Operations::CreateEmbedTokenRequestBody.new(\n link_id: \"\",\n)\n \nres = s.embed_tokens.create(req)\n\nif ! res.object.nil?\n # handle response\nend" - target: $["paths"]["/track/lead"]["post"] update: "x-codeSamples": diff --git a/docs/models/operations/createembedtokenrequestbody.md b/docs/models/operations/createembedtokenrequestbody.md new file mode 100644 index 0000000..9d05206 --- /dev/null +++ b/docs/models/operations/createembedtokenrequestbody.md @@ -0,0 +1,8 @@ +# CreateEmbedTokenRequestBody + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `link_id` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createembedtokenresponse.md b/docs/models/operations/createembedtokenresponse.md new file mode 100644 index 0000000..e3975ad --- /dev/null +++ b/docs/models/operations/createembedtokenresponse.md @@ -0,0 +1,20 @@ +# CreateEmbedTokenResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation | +| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [T.nilable(::OpenApiSDK::Operations::CreateEmbedTokenResponseBody)](../../models/operations/createembedtokenresponsebody.md) | :heavy_minus_sign: | The created public embed token. | +| `bad_request` | [T.nilable(::OpenApiSDK::Shared::BadRequest)](../../models/shared/badrequest.md) | :heavy_minus_sign: | The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). | +| `unauthorized` | [T.nilable(::OpenApiSDK::Shared::Unauthorized)](../../models/shared/unauthorized.md) | :heavy_minus_sign: | Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. | +| `forbidden` | [T.nilable(::OpenApiSDK::Shared::Forbidden)](../../models/shared/forbidden.md) | :heavy_minus_sign: | The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server. | +| `not_found` | [T.nilable(::OpenApiSDK::Shared::NotFound)](../../models/shared/notfound.md) | :heavy_minus_sign: | The server cannot find the requested resource. | +| `conflict` | [T.nilable(::OpenApiSDK::Shared::Conflict)](../../models/shared/conflict.md) | :heavy_minus_sign: | This response is sent when a request conflicts with the current state of the server. | +| `invite_expired` | [T.nilable(::OpenApiSDK::Shared::InviteExpired)](../../models/shared/inviteexpired.md) | :heavy_minus_sign: | This response is sent when the requested content has been permanently deleted from server, with no forwarding address. | +| `unprocessable_entity` | [T.nilable(::OpenApiSDK::Shared::UnprocessableEntity)](../../models/shared/unprocessableentity.md) | :heavy_minus_sign: | The request was well-formed but was unable to be followed due to semantic errors. | +| `rate_limit_exceeded` | [T.nilable(::OpenApiSDK::Shared::RateLimitExceeded)](../../models/shared/ratelimitexceeded.md) | :heavy_minus_sign: | The user has sent too many requests in a given amount of time ("rate limiting") | +| `internal_server_error` | [T.nilable(::OpenApiSDK::Shared::InternalServerError)](../../models/shared/internalservererror.md) | :heavy_minus_sign: | The server has encountered a situation it does not know how to handle. | \ No newline at end of file diff --git a/docs/models/operations/createembedtokenresponsebody.md b/docs/models/operations/createembedtokenresponsebody.md new file mode 100644 index 0000000..98ce485 --- /dev/null +++ b/docs/models/operations/createembedtokenresponsebody.md @@ -0,0 +1,11 @@ +# CreateEmbedTokenResponseBody + +The created public embed token. + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `public_token` | *::String* | :heavy_check_mark: | N/A | +| `expires` | *::String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdks/embedtokens/README.md b/docs/sdks/embedtokens/README.md new file mode 100644 index 0000000..bdca4f8 --- /dev/null +++ b/docs/sdks/embedtokens/README.md @@ -0,0 +1,49 @@ +# EmbedTokens +(*embed_tokens*) + +## Overview + +### Available Operations + +* [create](#create) - Create a new embed token + +## create + +Create a new embed token for the referral link. + +### Example Usage + +```ruby +require 'dub' + + +s = ::OpenApiSDK::Dub.new +s.config_security( + ::OpenApiSDK::Shared::Security.new( + token: "DUB_API_KEY", + ) +) + + +req = ::OpenApiSDK::Operations::CreateEmbedTokenRequestBody.new( + link_id: "", +) + +res = s.embed_tokens.create(req) + +if ! res.object.nil? + # handle response +end + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| `request` | [::OpenApiSDK::Operations::CreateEmbedTokenRequestBody](../../models/operations/createembedtokenrequestbody.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[T.nilable(::OpenApiSDK::Operations::CreateEmbedTokenResponse)](../../models/operations/createembedtokenresponse.md)** + diff --git a/dub.gemspec b/dub.gemspec index 6c04d5b..c16f3bf 100644 --- a/dub.gemspec +++ b/dub.gemspec @@ -4,7 +4,7 @@ $LOAD_PATH.push File.expand_path('lib', __dir__) Gem::Specification.new do |s| s.name = 'dub' - s.version = '0.2.2-alpha.40' + s.version = '0.2.2-alpha.41' s.platform = Gem::Platform::RUBY s.licenses = ['Apache-2.0'] s.summary = '' diff --git a/lib/dub.rb b/lib/dub.rb index 53cc344..4ba264c 100644 --- a/lib/dub.rb +++ b/lib/dub.rb @@ -15,6 +15,7 @@ module OpenApiSDK autoload :Track, 'open_api_sdk/track' autoload :Customers, 'open_api_sdk/customers' autoload :Workspaces, 'open_api_sdk/workspaces' + autoload :EmbedTokens, 'open_api_sdk/embed_tokens' autoload :QRCodes, 'open_api_sdk/qr_codes' autoload :Metatags, 'open_api_sdk/metatags' end diff --git a/lib/open_api_sdk/analytics.rb b/lib/open_api_sdk/analytics.rb index 91fe3a1..25255b9 100644 --- a/lib/open_api_sdk/analytics.rb +++ b/lib/open_api_sdk/analytics.rb @@ -93,6 +93,7 @@ def retrieve(request) res.internal_server_error = out end end + res end end diff --git a/lib/open_api_sdk/customers.rb b/lib/open_api_sdk/customers.rb index eb80171..4341580 100644 --- a/lib/open_api_sdk/customers.rb +++ b/lib/open_api_sdk/customers.rb @@ -91,6 +91,7 @@ def list res.internal_server_error = out end end + res end @@ -176,6 +177,7 @@ def create(request) res.internal_server_error = out end end + res end @@ -257,6 +259,7 @@ def get(request) res.internal_server_error = out end end + res end @@ -347,6 +350,7 @@ def update(request) res.internal_server_error = out end end + res end @@ -428,6 +432,7 @@ def delete(request) res.internal_server_error = out end end + res end end diff --git a/lib/open_api_sdk/domains.rb b/lib/open_api_sdk/domains.rb index 17294fe..91943cf 100644 --- a/lib/open_api_sdk/domains.rb +++ b/lib/open_api_sdk/domains.rb @@ -100,6 +100,7 @@ def create(request) res.internal_server_error = out end end + res end @@ -178,6 +179,7 @@ def list(request) res.internal_server_error = out end end + res end @@ -268,6 +270,7 @@ def update(request) res.internal_server_error = out end end + res end @@ -349,6 +352,7 @@ def delete(request) res.internal_server_error = out end end + res end end diff --git a/lib/open_api_sdk/dub.rb b/lib/open_api_sdk/dub.rb index 4c7db8f..ad85754 100644 --- a/lib/open_api_sdk/dub.rb +++ b/lib/open_api_sdk/dub.rb @@ -13,7 +13,7 @@ module OpenApiSDK class Dub extend T::Sig - attr_accessor :links, :analytics, :events, :tags, :domains, :track, :customers, :workspaces, :qr_codes, :metatags + attr_accessor :links, :analytics, :events, :tags, :domains, :track, :customers, :workspaces, :embed_tokens, :qr_codes, :metatags sig do params(client: Faraday::Request, @@ -83,6 +83,7 @@ def init_sdks @track = Track.new(@sdk_configuration) @customers = Customers.new(@sdk_configuration) @workspaces = Workspaces.new(@sdk_configuration) + @embed_tokens = EmbedTokens.new(@sdk_configuration) @qr_codes = QRCodes.new(@sdk_configuration) @metatags = Metatags.new(@sdk_configuration) end diff --git a/lib/open_api_sdk/embed_tokens.rb b/lib/open_api_sdk/embed_tokens.rb new file mode 100644 index 0000000..9760f2e --- /dev/null +++ b/lib/open_api_sdk/embed_tokens.rb @@ -0,0 +1,107 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + +require 'faraday' +require 'faraday/multipart' +require 'sorbet-runtime' + +module OpenApiSDK + extend T::Sig + class EmbedTokens + extend T::Sig + + + sig { params(sdk_config: SDKConfiguration).void } + def initialize(sdk_config) + @sdk_configuration = sdk_config + end + + + sig { params(request: T.nilable(::OpenApiSDK::Operations::CreateEmbedTokenRequestBody)).returns(::OpenApiSDK::Operations::CreateEmbedTokenResponse) } + def create(request) + # create - Create a new embed token + # Create a new embed token for the referral link. + url, params = @sdk_configuration.get_server_details + base_url = Utils.template_url(url, params) + url = "#{base_url}/tokens/embed" + headers = {} + req_content_type, data, form = Utils.serialize_request_body(request, :request, :json) + headers['content-type'] = req_content_type + headers['Accept'] = 'application/json' + headers['user-agent'] = @sdk_configuration.user_agent + + r = @sdk_configuration.client.post(url) do |req| + req.headers = headers + Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil? + if form + req.body = Utils.encode_form(form) + elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') + req.body = URI.encode_www_form(data) + else + req.body = data + end + end + + content_type = r.headers.fetch('Content-Type', 'application/octet-stream') + + res = ::OpenApiSDK::Operations::CreateEmbedTokenResponse.new( + status_code: r.status, content_type: content_type, raw_response: r + ) + if r.status == 201 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Operations::CreateEmbedTokenResponseBody) + res.object = out + end + elsif r.status == 400 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::BadRequest) + res.bad_request = out + end + elsif r.status == 401 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Unauthorized) + res.unauthorized = out + end + elsif r.status == 403 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Forbidden) + res.forbidden = out + end + elsif r.status == 404 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::NotFound) + res.not_found = out + end + elsif r.status == 409 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Conflict) + res.conflict = out + end + elsif r.status == 410 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InviteExpired) + res.invite_expired = out + end + elsif r.status == 422 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::UnprocessableEntity) + res.unprocessable_entity = out + end + elsif r.status == 429 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::RateLimitExceeded) + res.rate_limit_exceeded = out + end + elsif r.status == 500 + if Utils.match_content_type(content_type, 'application/json') + out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InternalServerError) + res.internal_server_error = out + end + end + + res + end + end +end diff --git a/lib/open_api_sdk/events.rb b/lib/open_api_sdk/events.rb index 0cf45f7..fbf0f38 100644 --- a/lib/open_api_sdk/events.rb +++ b/lib/open_api_sdk/events.rb @@ -93,6 +93,7 @@ def list(request) res.internal_server_error = out end end + res end end diff --git a/lib/open_api_sdk/links.rb b/lib/open_api_sdk/links.rb index 8c51428..b9bf3fb 100644 --- a/lib/open_api_sdk/links.rb +++ b/lib/open_api_sdk/links.rb @@ -100,6 +100,7 @@ def create(request) res.internal_server_error = out end end + res end @@ -178,6 +179,7 @@ def list(request) res.internal_server_error = out end end + res end @@ -256,6 +258,7 @@ def count(request) res.internal_server_error = out end end + res end @@ -334,6 +337,7 @@ def get(request) res.internal_server_error = out end end + res end @@ -424,6 +428,7 @@ def update(request) res.internal_server_error = out end end + res end @@ -505,6 +510,7 @@ def delete(request) res.internal_server_error = out end end + res end @@ -590,6 +596,7 @@ def create_many(request) res.internal_server_error = out end end + res end @@ -675,6 +682,7 @@ def update_many(request) res.internal_server_error = out end end + res end @@ -753,6 +761,7 @@ def delete_many(request) res.internal_server_error = out end end + res end @@ -838,6 +847,7 @@ def upsert(request) res.internal_server_error = out end end + res end end diff --git a/lib/open_api_sdk/metatags.rb b/lib/open_api_sdk/metatags.rb index 31030c0..c31faef 100644 --- a/lib/open_api_sdk/metatags.rb +++ b/lib/open_api_sdk/metatags.rb @@ -48,6 +48,7 @@ def get(request) res.object = out end end + res end end diff --git a/lib/open_api_sdk/models/operations.rb b/lib/open_api_sdk/models/operations.rb index ad83d72..5bac9a9 100644 --- a/lib/open_api_sdk/models/operations.rb +++ b/lib/open_api_sdk/models/operations.rb @@ -98,6 +98,9 @@ module Operations autoload :UpdateWorkspaceRequestBody, 'open_api_sdk/models/operations/updateworkspace_requestbody.rb' autoload :UpdateWorkspaceRequest, 'open_api_sdk/models/operations/updateworkspace_request.rb' autoload :UpdateWorkspaceResponse, 'open_api_sdk/models/operations/updateworkspace_response.rb' + autoload :CreateEmbedTokenRequestBody, 'open_api_sdk/models/operations/createembedtoken_requestbody.rb' + autoload :CreateEmbedTokenResponseBody, 'open_api_sdk/models/operations/createembedtoken_responsebody.rb' + autoload :CreateEmbedTokenResponse, 'open_api_sdk/models/operations/createembedtoken_response.rb' autoload :Level, 'open_api_sdk/models/operations/level.rb' autoload :GetQRCodeRequest, 'open_api_sdk/models/operations/getqrcode_request.rb' autoload :GetQRCodeResponse, 'open_api_sdk/models/operations/getqrcode_response.rb' diff --git a/lib/open_api_sdk/models/operations/createembedtoken_requestbody.rb b/lib/open_api_sdk/models/operations/createembedtoken_requestbody.rb new file mode 100644 index 0000000..30b1314 --- /dev/null +++ b/lib/open_api_sdk/models/operations/createembedtoken_requestbody.rb @@ -0,0 +1,24 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Operations + + + class CreateEmbedTokenRequestBody < ::OpenApiSDK::Utils::FieldAugmented + extend T::Sig + + + field :link_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('linkId') } } + + + sig { params(link_id: ::String).void } + def initialize(link_id: nil) + @link_id = link_id + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/createembedtoken_response.rb b/lib/open_api_sdk/models/operations/createembedtoken_response.rb new file mode 100644 index 0000000..9cc07b8 --- /dev/null +++ b/lib/open_api_sdk/models/operations/createembedtoken_response.rb @@ -0,0 +1,60 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Operations + + + class CreateEmbedTokenResponse < ::OpenApiSDK::Utils::FieldAugmented + extend T::Sig + + # HTTP response content type for this operation + field :content_type, ::String + # Raw HTTP response; suitable for custom response parsing + field :raw_response, ::Faraday::Response + # HTTP response status code for this operation + field :status_code, ::Integer + # The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). + field :bad_request, T.nilable(::OpenApiSDK::Shared::BadRequest) + # This response is sent when a request conflicts with the current state of the server. + field :conflict, T.nilable(::OpenApiSDK::Shared::Conflict) + # The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server. + field :forbidden, T.nilable(::OpenApiSDK::Shared::Forbidden) + # The server has encountered a situation it does not know how to handle. + field :internal_server_error, T.nilable(::OpenApiSDK::Shared::InternalServerError) + # This response is sent when the requested content has been permanently deleted from server, with no forwarding address. + field :invite_expired, T.nilable(::OpenApiSDK::Shared::InviteExpired) + # The server cannot find the requested resource. + field :not_found, T.nilable(::OpenApiSDK::Shared::NotFound) + # The created public embed token. + field :object, T.nilable(::OpenApiSDK::Operations::CreateEmbedTokenResponseBody) + # The user has sent too many requests in a given amount of time ("rate limiting") + field :rate_limit_exceeded, T.nilable(::OpenApiSDK::Shared::RateLimitExceeded) + # Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. + field :unauthorized, T.nilable(::OpenApiSDK::Shared::Unauthorized) + # The request was well-formed but was unable to be followed due to semantic errors. + field :unprocessable_entity, T.nilable(::OpenApiSDK::Shared::UnprocessableEntity) + + + sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, bad_request: T.nilable(::OpenApiSDK::Shared::BadRequest), conflict: T.nilable(::OpenApiSDK::Shared::Conflict), forbidden: T.nilable(::OpenApiSDK::Shared::Forbidden), internal_server_error: T.nilable(::OpenApiSDK::Shared::InternalServerError), invite_expired: T.nilable(::OpenApiSDK::Shared::InviteExpired), not_found: T.nilable(::OpenApiSDK::Shared::NotFound), object: T.nilable(::OpenApiSDK::Operations::CreateEmbedTokenResponseBody), rate_limit_exceeded: T.nilable(::OpenApiSDK::Shared::RateLimitExceeded), unauthorized: T.nilable(::OpenApiSDK::Shared::Unauthorized), unprocessable_entity: T.nilable(::OpenApiSDK::Shared::UnprocessableEntity)).void } + def initialize(content_type: nil, raw_response: nil, status_code: nil, bad_request: nil, conflict: nil, forbidden: nil, internal_server_error: nil, invite_expired: nil, not_found: nil, object: nil, rate_limit_exceeded: nil, unauthorized: nil, unprocessable_entity: nil) + @content_type = content_type + @raw_response = raw_response + @status_code = status_code + @bad_request = bad_request + @conflict = conflict + @forbidden = forbidden + @internal_server_error = internal_server_error + @invite_expired = invite_expired + @not_found = not_found + @object = object + @rate_limit_exceeded = rate_limit_exceeded + @unauthorized = unauthorized + @unprocessable_entity = unprocessable_entity + end + end + end +end diff --git a/lib/open_api_sdk/models/operations/createembedtoken_responsebody.rb b/lib/open_api_sdk/models/operations/createembedtoken_responsebody.rb new file mode 100644 index 0000000..cb51163 --- /dev/null +++ b/lib/open_api_sdk/models/operations/createembedtoken_responsebody.rb @@ -0,0 +1,27 @@ +# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +# typed: true +# frozen_string_literal: true + + +module OpenApiSDK + module Operations + + # The created public embed token. + class CreateEmbedTokenResponseBody < ::OpenApiSDK::Utils::FieldAugmented + extend T::Sig + + + field :expires, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('expires') } } + + field :public_token, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('publicToken') } } + + + sig { params(expires: ::String, public_token: ::String).void } + def initialize(expires: nil, public_token: nil) + @expires = expires + @public_token = public_token + end + end + end +end diff --git a/lib/open_api_sdk/qr_codes.rb b/lib/open_api_sdk/qr_codes.rb index 6d14bbe..e17581c 100644 --- a/lib/open_api_sdk/qr_codes.rb +++ b/lib/open_api_sdk/qr_codes.rb @@ -44,7 +44,6 @@ def get(request) ) if r.status == 200 res.res = r.env.response_body if Utils.match_content_type(content_type, 'image/png') - elsif r.status == 400 if Utils.match_content_type(content_type, 'application/json') out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::BadRequest) @@ -91,6 +90,7 @@ def get(request) res.internal_server_error = out end end + res end end diff --git a/lib/open_api_sdk/sdkconfiguration.rb b/lib/open_api_sdk/sdkconfiguration.rb index 26e73c5..84ba38d 100644 --- a/lib/open_api_sdk/sdkconfiguration.rb +++ b/lib/open_api_sdk/sdkconfiguration.rb @@ -38,9 +38,9 @@ def initialize(client, security, server_url, server_idx) @security = security @language = 'ruby' @openapi_doc_version = '0.0.1' - @sdk_version = '0.2.2-alpha.40' - @gen_version = '2.466.0' - @user_agent = 'speakeasy-sdk/ruby 0.2.2-alpha.40 2.466.0 0.0.1 dub' + @sdk_version = '0.2.2-alpha.41' + @gen_version = '2.467.4' + @user_agent = 'speakeasy-sdk/ruby 0.2.2-alpha.41 2.467.4 0.0.1 dub' end sig { returns([String, T::Hash[Symbol, String]]) } diff --git a/lib/open_api_sdk/tags.rb b/lib/open_api_sdk/tags.rb index 0ce5e35..96a0e45 100644 --- a/lib/open_api_sdk/tags.rb +++ b/lib/open_api_sdk/tags.rb @@ -100,6 +100,7 @@ def create(request) res.internal_server_error = out end end + res end @@ -176,6 +177,7 @@ def list res.internal_server_error = out end end + res end @@ -266,6 +268,7 @@ def update(request) res.internal_server_error = out end end + res end @@ -347,6 +350,7 @@ def delete(request) res.internal_server_error = out end end + res end end diff --git a/lib/open_api_sdk/track.rb b/lib/open_api_sdk/track.rb index 2169c96..0feac98 100644 --- a/lib/open_api_sdk/track.rb +++ b/lib/open_api_sdk/track.rb @@ -100,6 +100,7 @@ def lead(request) res.internal_server_error = out end end + res end @@ -185,6 +186,7 @@ def sale(request) res.internal_server_error = out end end + res end @@ -272,6 +274,7 @@ def customer(request) res.internal_server_error = out end end + res end end diff --git a/lib/open_api_sdk/workspaces.rb b/lib/open_api_sdk/workspaces.rb index 6718d3a..3d5bdf2 100644 --- a/lib/open_api_sdk/workspaces.rb +++ b/lib/open_api_sdk/workspaces.rb @@ -96,6 +96,7 @@ def get(request) res.internal_server_error = out end end + res end @@ -186,6 +187,7 @@ def update(request) res.internal_server_error = out end end + res end end