Skip to content

Commit

Permalink
ci: regenerated with OpenAPI Doc 0.4.0, Speakeasy CLI 1.219.2
Browse files Browse the repository at this point in the history
  • Loading branch information
speakeasybot committed Mar 22, 2024
1 parent 748e868 commit 6c4880c
Show file tree
Hide file tree
Showing 19 changed files with 256 additions and 40 deletions.
18 changes: 11 additions & 7 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
lockVersion: 2.0.0
id: f5719c92-1297-4aa0-bc5f-37116859d1e3
management:
docChecksum: 3d1ffb0cc7307a0362c5389c0fa1fdb5
docChecksum: 17e2e733dfd588a7103c3c70e91b24b5
docVersion: 0.4.0
speakeasyVersion: 1.213.0
generationVersion: 2.283.1
releaseVersion: 4.0.15
configChecksum: 6a034d83dc6e5084ff7634c42dca403b
speakeasyVersion: 1.219.2
generationVersion: 2.286.7
releaseVersion: 4.0.16
configChecksum: 90ea74ca7875e56d7e29361ba69f9f0e
repoURL: https://github.com/speakeasy-api/speakeasy-client-sdk-ruby.git
repoSubDirectory: .
installationURL: https://github.com/speakeasy-api/speakeasy-client-sdk-ruby
Expand Down Expand Up @@ -136,6 +136,7 @@ generatedFiles:
- lib/speakeasy_client_sdk/models/operations/registerschema_response.rb
- lib/speakeasy_client_sdk/models/operations/getaccesstoken_request.rb
- lib/speakeasy_client_sdk/models/operations/getaccesstoken_response.rb
- lib/speakeasy_client_sdk/models/operations/getuser_response.rb
- lib/speakeasy_client_sdk/models/operations/getworkspaceaccess_request.rb
- lib/speakeasy_client_sdk/models/operations/getworkspaceaccess_response.rb
- lib/speakeasy_client_sdk/models/operations/validateapikey_response.rb
Expand Down Expand Up @@ -169,9 +170,10 @@ generatedFiles:
- lib/speakeasy_client_sdk/models/shared/valuechange.rb
- lib/speakeasy_client_sdk/models/shared/schemadiff.rb
- lib/speakeasy_client_sdk/models/shared/claims.rb
- lib/speakeasy_client_sdk/models/shared/user.rb
- lib/speakeasy_client_sdk/models/shared/accesstoken_user.rb
- lib/speakeasy_client_sdk/models/shared/workspaces.rb
- lib/speakeasy_client_sdk/models/shared/accesstoken.rb
- lib/speakeasy_client_sdk/models/shared/user.rb
- lib/speakeasy_client_sdk/models/shared/level.rb
- lib/speakeasy_client_sdk/models/shared/accessdetails.rb
- lib/speakeasy_client_sdk/models/shared/account_type.rb
Expand Down Expand Up @@ -249,6 +251,7 @@ generatedFiles:
- docs/models/operations/registerschemaresponse.md
- docs/models/operations/getaccesstokenrequest.md
- docs/models/operations/getaccesstokenresponse.md
- docs/models/operations/getuserresponse.md
- docs/models/operations/getworkspaceaccessrequest.md
- docs/models/operations/getworkspaceaccessresponse.md
- docs/models/operations/validateapikeyresponse.md
Expand Down Expand Up @@ -282,9 +285,10 @@ generatedFiles:
- docs/models/shared/valuechange.md
- docs/models/shared/schemadiff.md
- docs/models/shared/claims.md
- docs/models/shared/user.md
- docs/models/shared/accesstokenuser.md
- docs/models/shared/workspaces.md
- docs/models/shared/accesstoken.md
- docs/models/shared/user.md
- docs/models/shared/level.md
- docs/models/shared/accessdetails.md
- docs/models/shared/accounttype.md
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
speakeasy_client_sdk_ruby (4.0.15)
speakeasy_client_sdk_ruby (4.0.16)
faraday
faraday-multipart
rack
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ end
### [Auth](docs/sdks/auth/README.md)

* [get_access_token](docs/sdks/auth/README.md#get_access_token) - Get or refresh an access token for the current workspace.
* [get_user](docs/sdks/auth/README.md#get_user) - Get information about the current user.
* [get_workspace_access](docs/sdks/auth/README.md#get_workspace_access) - Get access allowances for a particular workspace
* [validate_api_key](docs/sdks/auth/README.md#validate_api_key) - Validate the current api key.

Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -718,4 +718,14 @@ Based on:
### Generated
- [ruby v4.0.15] .
### Releases
- [Ruby Gems v4.0.15] https://rubygems.org/gems/speakeasy_client_sdk_ruby/versions/4.0.15 - .
- [Ruby Gems v4.0.15] https://rubygems.org/gems/speakeasy_client_sdk_ruby/versions/4.0.15 - .

## 2024-03-22 00:03:01
### Changes
Based on:
- OpenAPI Doc 0.4.0 https://docs.speakeasyapi.dev/openapi.yaml
- Speakeasy CLI 1.219.2 (2.286.7) https://github.com/speakeasy-api/speakeasy
### Generated
- [ruby v4.0.16] .
### Releases
- [Ruby Gems v4.0.16] https://rubygems.org/gems/speakeasy_client_sdk_ruby/versions/4.0.16 - .
12 changes: 12 additions & 0 deletions docs/models/operations/getuserresponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# GetUserResponse


## Fields

| Field | Type | Required | Description |
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ |
| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation |
| `error` | [T.nilable(::SpeakeasyClientSDK::Shared::Error)](../../models/shared/error.md) | :heavy_minus_sign: | Default error response |
| `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 |
| `user` | [T.nilable(::SpeakeasyClientSDK::Shared::User)](../../models/shared/user.md) | :heavy_minus_sign: | OK |
2 changes: 1 addition & 1 deletion docs/models/shared/accesstoken.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ An AccessToken is a token that can be used to authenticate with the Speakeasy AP
| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
| `access_token` | *::String* | :heavy_check_mark: | N/A |
| `claims` | [::SpeakeasyClientSDK::Shared::Claims](../../models/shared/claims.md) | :heavy_check_mark: | N/A |
| `user` | [::SpeakeasyClientSDK::Shared::User](../../models/shared/user.md) | :heavy_check_mark: | N/A |
| `user` | [::SpeakeasyClientSDK::Shared::AccessTokenUser](../../models/shared/accesstokenuser.md) | :heavy_check_mark: | N/A |
| `workspaces` | T::Array<[::SpeakeasyClientSDK::Shared::Workspaces](../../models/shared/workspaces.md)> | :heavy_minus_sign: | N/A |
13 changes: 13 additions & 0 deletions docs/models/shared/accesstokenuser.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# AccessTokenUser


## Fields

| Field | Type | Required | Description |
| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- |
| `admin` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | N/A |
| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_minus_sign: | N/A |
| `display_name` | *T.nilable(::String)* | :heavy_minus_sign: | N/A |
| `email` | *T.nilable(::String)* | :heavy_minus_sign: | N/A |
| `email_verified` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | N/A |
| `id` | *T.nilable(::String)* | :heavy_minus_sign: | N/A |
19 changes: 13 additions & 6 deletions docs/models/shared/user.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,16 @@

| Field | Type | Required | Description |
| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- |
| `admin` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | N/A |
| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_minus_sign: | N/A |
| `display_name` | *T.nilable(::String)* | :heavy_minus_sign: | N/A |
| `email` | *T.nilable(::String)* | :heavy_minus_sign: | N/A |
| `email_verified` | *T.nilable(T::Boolean)* | :heavy_minus_sign: | N/A |
| `id` | *T.nilable(::String)* | :heavy_minus_sign: | N/A |
| `admin` | *T::Boolean* | :heavy_check_mark: | Indicates whether the user is an admin. |
| `confirmed` | *T::Boolean* | :heavy_check_mark: | Indicates whether the user has been confirmed. |
| `created_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Timestamp of the user's creation. |
| `default_workspace_id` | *T.nilable(::String)* | :heavy_minus_sign: | Identifier of the default workspace. |
| `display_name` | *::String* | :heavy_check_mark: | Display name of the user. |
| `email` | *::String* | :heavy_check_mark: | Email address of the user. |
| `email_verified` | *T::Boolean* | :heavy_check_mark: | Indicates whether the email address has been verified. |
| `github_handle` | *T.nilable(::String)* | :heavy_minus_sign: | GitHub handle of the user. |
| `id` | *::String* | :heavy_check_mark: | Unique identifier for the user. |
| `last_login_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Timestamp of the last login. |
| `photo_url` | *T.nilable(::String)* | :heavy_minus_sign: | URL of the user's photo. |
| `updated_at` | [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) | :heavy_check_mark: | Timestamp of the user's last update. |
| `whitelisted` | *T::Boolean* | :heavy_check_mark: | Indicates whether the user has been whitelisted. |
35 changes: 35 additions & 0 deletions docs/sdks/auth/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ REST APIs for managing Authentication
### Available Operations

* [get_access_token](#get_access_token) - Get or refresh an access token for the current workspace.
* [get_user](#get_user) - Get information about the current user.
* [get_workspace_access](#get_workspace_access) - Get access allowances for a particular workspace
* [validate_api_key](#validate_api_key) - Validate the current api key.

Expand Down Expand Up @@ -50,6 +51,40 @@ end
**[T.nilable(::SpeakeasyClientSDK::Operations::GetAccessTokenResponse)](../../models/operations/getaccesstokenresponse.md)**


## get_user

Get information about the current user.

### Example Usage

```ruby
require 'speakeasy_client_sdk_ruby'


s = ::SpeakeasyClientSDK::SDK.new(
workspace_id: "<value>",
)
s.config_security(
::SpeakeasyClientSDK::Shared::Security.new(
api_key: "<YOUR_API_KEY_HERE>",
)
)


res = s.auth.get_user()

if ! res.user.nil?
# handle response
end

```


### Response

**[T.nilable(::SpeakeasyClientSDK::Operations::GetUserResponse)](../../models/operations/getuserresponse.md)**


## get_workspace_access

Checks if generation is permitted for a particular run of the CLI
Expand Down
2 changes: 1 addition & 1 deletion gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ generation:
auth:
oAuth2ClientCredentialsEnabled: false
ruby:
version: 4.0.15
version: 4.0.16
author: Speakeasy
description: Ruby Client SDK Generated by Speakeasy
imports:
Expand Down
36 changes: 36 additions & 0 deletions lib/speakeasy_client_sdk/auth.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,42 @@ def get_access_token(request)
end


sig { returns(::SpeakeasyClientSDK::Operations::GetUserResponse) }
def get_user
# get_user - Get information about the current user.
url, params = @sdk_configuration.get_server_details
base_url = Utils.template_url(url, params)
url = "#{base_url}/v1/user"
headers = {}
headers['Accept'] = 'application/json'
headers['user-agent'] = @sdk_configuration.user_agent

r = @sdk_configuration.client.get(url) do |req|
req.headers = headers
Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
end

content_type = r.headers.fetch('Content-Type', 'application/octet-stream')

res = ::SpeakeasyClientSDK::Operations::GetUserResponse.new(
status_code: r.status, content_type: content_type, raw_response: r
)
if r.status == 200
if Utils.match_content_type(content_type, 'application/json')
out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::User)
res.user = out
end
else

if Utils.match_content_type(content_type, 'application/json')
out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::Error)
res.error = out
end
end
res
end


sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GetWorkspaceAccessRequest)).returns(::SpeakeasyClientSDK::Operations::GetWorkspaceAccessResponse) }
def get_workspace_access(request)
# get_workspace_access - Get access allowances for a particular workspace
Expand Down
Loading

0 comments on commit 6c4880c

Please sign in to comment.