speakeasy_client_sdk_ruby 4.0.15 → 4.0.16

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 87aa522236b7a6c89cdfdcaf1064dae2febd1ed4223dc233e898429bee42db60
4
- data.tar.gz: 3f41a0b4299e78539d54869ac6787ffe0ab9aa5059e9b299731953e1c9630725
3
+ metadata.gz: 6d6e582fc6b31c9620eb02acd4ed82fae45b5ede8b78260b0c07903029ca59de
4
+ data.tar.gz: 1480dde517d7009e3e3a59e97b63a4a58d4907e37186c5660190627615dcbdff
5
5
  SHA512:
6
- metadata.gz: 2c42920a793b34da29a818ece3e10e973cf97057890343f2f9eb908bea8445c7f5bf79c371d9c984dc9ab47482854b0491a073dd4b0adb84c6c3a71af28e67b2
7
- data.tar.gz: 284df19a17b588c62bf802791a2a9cd60406cec6cd6ee4736a3d9efd8ee169f2dcddd9577321c339a92b964366c05971ae231d1e64f4cb333ce03ebbbe5a57c8
6
+ metadata.gz: 658995bf369f076e62ecf32ee65f7ac9e914ac2cabe64c80dfff48c656527d88307b54414885cf98e7527fdd1f466f1a72265b9456236a8b38f15bc725b70c87
7
+ data.tar.gz: cab17545aa543e023e8ded2eed55a33638d4ae7631edb6b3da80617e11c83bb7f8af0f2d3b32e262892de35382fb122302960fb6f4f3a44b1b04a6565dd9fb01
@@ -56,6 +56,42 @@ module SpeakeasyClientSDK
56
56
  end
57
57
 
58
58
 
59
+ sig { returns(::SpeakeasyClientSDK::Operations::GetUserResponse) }
60
+ def get_user
61
+ # get_user - Get information about the current user.
62
+ url, params = @sdk_configuration.get_server_details
63
+ base_url = Utils.template_url(url, params)
64
+ url = "#{base_url}/v1/user"
65
+ headers = {}
66
+ headers['Accept'] = 'application/json'
67
+ headers['user-agent'] = @sdk_configuration.user_agent
68
+
69
+ r = @sdk_configuration.client.get(url) do |req|
70
+ req.headers = headers
71
+ Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
72
+ end
73
+
74
+ content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
75
+
76
+ res = ::SpeakeasyClientSDK::Operations::GetUserResponse.new(
77
+ status_code: r.status, content_type: content_type, raw_response: r
78
+ )
79
+ if r.status == 200
80
+ if Utils.match_content_type(content_type, 'application/json')
81
+ out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::User)
82
+ res.user = out
83
+ end
84
+ else
85
+
86
+ if Utils.match_content_type(content_type, 'application/json')
87
+ out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::Error)
88
+ res.error = out
89
+ end
90
+ end
91
+ res
92
+ end
93
+
94
+
59
95
  sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GetWorkspaceAccessRequest)).returns(::SpeakeasyClientSDK::Operations::GetWorkspaceAccessResponse) }
60
96
  def get_workspace_access(request)
61
97
  # get_workspace_access - Get access allowances for a particular workspace
@@ -0,0 +1,36 @@
1
+ # Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
2
+
3
+ # typed: true
4
+ # frozen_string_literal: true
5
+
6
+
7
+ module SpeakeasyClientSDK
8
+ module Operations
9
+
10
+
11
+ class GetUserResponse < ::SpeakeasyClientSDK::Utils::FieldAugmented
12
+ extend T::Sig
13
+
14
+ # HTTP response content type for this operation
15
+ field :content_type, ::String
16
+ # Raw HTTP response; suitable for custom response parsing
17
+ field :raw_response, ::Faraday::Response
18
+ # HTTP response status code for this operation
19
+ field :status_code, ::Integer
20
+ # Default error response
21
+ field :error, T.nilable(::SpeakeasyClientSDK::Shared::Error)
22
+ # OK
23
+ field :user, T.nilable(::SpeakeasyClientSDK::Shared::User)
24
+
25
+
26
+ sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error: T.nilable(::SpeakeasyClientSDK::Shared::Error), user: T.nilable(::SpeakeasyClientSDK::Shared::User)).void }
27
+ def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil, user: nil)
28
+ @content_type = content_type
29
+ @raw_response = raw_response
30
+ @status_code = status_code
31
+ @error = error
32
+ @user = user
33
+ end
34
+ end
35
+ end
36
+ end
@@ -61,6 +61,7 @@ module SpeakeasyClientSDK
61
61
  autoload :RegisterSchemaResponse, 'speakeasy_client_sdk/models/operations/registerschema_response.rb'
62
62
  autoload :GetAccessTokenRequest, 'speakeasy_client_sdk/models/operations/getaccesstoken_request.rb'
63
63
  autoload :GetAccessTokenResponse, 'speakeasy_client_sdk/models/operations/getaccesstoken_response.rb'
64
+ autoload :GetUserResponse, 'speakeasy_client_sdk/models/operations/getuser_response.rb'
64
65
  autoload :GetWorkspaceAccessRequest, 'speakeasy_client_sdk/models/operations/getworkspaceaccess_request.rb'
65
66
  autoload :GetWorkspaceAccessResponse, 'speakeasy_client_sdk/models/operations/getworkspaceaccess_response.rb'
66
67
  autoload :ValidateApiKeyResponse, 'speakeasy_client_sdk/models/operations/validateapikey_response.rb'
@@ -16,12 +16,12 @@ module SpeakeasyClientSDK
16
16
 
17
17
  field :claims, ::SpeakeasyClientSDK::Shared::Claims, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('claims') } }
18
18
 
19
- field :user, ::SpeakeasyClientSDK::Shared::User, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('user') } }
19
+ field :user, ::SpeakeasyClientSDK::Shared::AccessTokenUser, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('user') } }
20
20
 
21
21
  field :workspaces, T.nilable(T::Array[::SpeakeasyClientSDK::Shared::Workspaces]), { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('workspaces') } }
22
22
 
23
23
 
24
- sig { params(access_token: ::String, claims: ::SpeakeasyClientSDK::Shared::Claims, user: ::SpeakeasyClientSDK::Shared::User, workspaces: T.nilable(T::Array[::SpeakeasyClientSDK::Shared::Workspaces])).void }
24
+ sig { params(access_token: ::String, claims: ::SpeakeasyClientSDK::Shared::Claims, user: ::SpeakeasyClientSDK::Shared::AccessTokenUser, workspaces: T.nilable(T::Array[::SpeakeasyClientSDK::Shared::Workspaces])).void }
25
25
  def initialize(access_token: nil, claims: nil, user: nil, workspaces: nil)
26
26
  @access_token = access_token
27
27
  @claims = claims
@@ -0,0 +1,39 @@
1
+ # Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
2
+
3
+ # typed: true
4
+ # frozen_string_literal: true
5
+
6
+
7
+ module SpeakeasyClientSDK
8
+ module Shared
9
+
10
+
11
+ class AccessTokenUser < ::SpeakeasyClientSDK::Utils::FieldAugmented
12
+ extend T::Sig
13
+
14
+
15
+ field :admin, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('admin') } }
16
+
17
+ field :created_at, T.nilable(::DateTime), { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(true) } }
18
+
19
+ field :display_name, T.nilable(::String), { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('display_name') } }
20
+
21
+ field :email, T.nilable(::String), { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('email') } }
22
+
23
+ field :email_verified, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('email_verified') } }
24
+
25
+ field :id, T.nilable(::String), { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('id') } }
26
+
27
+
28
+ sig { params(admin: T.nilable(T::Boolean), created_at: T.nilable(::DateTime), display_name: T.nilable(::String), email: T.nilable(::String), email_verified: T.nilable(T::Boolean), id: T.nilable(::String)).void }
29
+ def initialize(admin: nil, created_at: nil, display_name: nil, email: nil, email_verified: nil, id: nil)
30
+ @admin = admin
31
+ @created_at = created_at
32
+ @display_name = display_name
33
+ @email = email
34
+ @email_verified = email_verified
35
+ @id = id
36
+ end
37
+ end
38
+ end
39
+ end
@@ -11,28 +11,49 @@ module SpeakeasyClientSDK
11
11
  class User < ::SpeakeasyClientSDK::Utils::FieldAugmented
12
12
  extend T::Sig
13
13
 
14
-
15
- field :admin, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('admin') } }
16
-
17
- field :created_at, T.nilable(::DateTime), { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(true) } }
18
-
19
- field :display_name, T.nilable(::String), { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('display_name') } }
20
-
21
- field :email, T.nilable(::String), { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('email') } }
22
-
23
- field :email_verified, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('email_verified') } }
24
-
25
- field :id, T.nilable(::String), { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('id') } }
26
-
27
-
28
- sig { params(admin: T.nilable(T::Boolean), created_at: T.nilable(::DateTime), display_name: T.nilable(::String), email: T.nilable(::String), email_verified: T.nilable(T::Boolean), id: T.nilable(::String)).void }
29
- def initialize(admin: nil, created_at: nil, display_name: nil, email: nil, email_verified: nil, id: nil)
14
+ # Indicates whether the user is an admin.
15
+ field :admin, T::Boolean, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('admin') } }
16
+ # Indicates whether the user has been confirmed.
17
+ field :confirmed, T::Boolean, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('confirmed') } }
18
+ # Timestamp of the user's creation.
19
+ field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } }
20
+ # Display name of the user.
21
+ field :display_name, ::String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('display_name') } }
22
+ # Email address of the user.
23
+ field :email, ::String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('email') } }
24
+ # Indicates whether the email address has been verified.
25
+ field :email_verified, T::Boolean, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('email_verified') } }
26
+ # Unique identifier for the user.
27
+ field :id, ::String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('id') } }
28
+ # Timestamp of the last login.
29
+ field :last_login_at, ::DateTime, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('last_login_at'), 'decoder': Utils.datetime_from_iso_format(false) } }
30
+ # Timestamp of the user's last update.
31
+ field :updated_at, ::DateTime, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('updated_at'), 'decoder': Utils.datetime_from_iso_format(false) } }
32
+ # Indicates whether the user has been whitelisted.
33
+ field :whitelisted, T::Boolean, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('whitelisted') } }
34
+ # Identifier of the default workspace.
35
+ field :default_workspace_id, T.nilable(::String), { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('default_workspace_id') } }
36
+ # GitHub handle of the user.
37
+ field :github_handle, T.nilable(::String), { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('github_handle') } }
38
+ # URL of the user's photo.
39
+ field :photo_url, T.nilable(::String), { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('photo_url') } }
40
+
41
+
42
+ sig { params(admin: T::Boolean, confirmed: T::Boolean, created_at: ::DateTime, display_name: ::String, email: ::String, email_verified: T::Boolean, id: ::String, last_login_at: ::DateTime, updated_at: ::DateTime, whitelisted: T::Boolean, default_workspace_id: T.nilable(::String), github_handle: T.nilable(::String), photo_url: T.nilable(::String)).void }
43
+ def initialize(admin: nil, confirmed: nil, created_at: nil, display_name: nil, email: nil, email_verified: nil, id: nil, last_login_at: nil, updated_at: nil, whitelisted: nil, default_workspace_id: nil, github_handle: nil, photo_url: nil)
30
44
  @admin = admin
45
+ @confirmed = confirmed
31
46
  @created_at = created_at
32
47
  @display_name = display_name
33
48
  @email = email
34
49
  @email_verified = email_verified
35
50
  @id = id
51
+ @last_login_at = last_login_at
52
+ @updated_at = updated_at
53
+ @whitelisted = whitelisted
54
+ @default_workspace_id = default_workspace_id
55
+ @github_handle = github_handle
56
+ @photo_url = photo_url
36
57
  end
37
58
  end
38
59
  end
@@ -17,9 +17,10 @@ module SpeakeasyClientSDK
17
17
  autoload :ValueChange, 'speakeasy_client_sdk/models/shared/valuechange.rb'
18
18
  autoload :SchemaDiff, 'speakeasy_client_sdk/models/shared/schemadiff.rb'
19
19
  autoload :Claims, 'speakeasy_client_sdk/models/shared/claims.rb'
20
- autoload :User, 'speakeasy_client_sdk/models/shared/user.rb'
20
+ autoload :AccessTokenUser, 'speakeasy_client_sdk/models/shared/accesstoken_user.rb'
21
21
  autoload :Workspaces, 'speakeasy_client_sdk/models/shared/workspaces.rb'
22
22
  autoload :AccessToken, 'speakeasy_client_sdk/models/shared/accesstoken.rb'
23
+ autoload :User, 'speakeasy_client_sdk/models/shared/user.rb'
23
24
  autoload :Level, 'speakeasy_client_sdk/models/shared/level.rb'
24
25
  autoload :AccessDetails, 'speakeasy_client_sdk/models/shared/accessdetails.rb'
25
26
  autoload :AccountType, 'speakeasy_client_sdk/models/shared/account_type.rb'
@@ -41,9 +41,9 @@ module SpeakeasyClientSDK
41
41
  @globals = globals.nil? ? {} : globals
42
42
  @language = 'ruby'
43
43
  @openapi_doc_version = '0.4.0'
44
- @sdk_version = '4.0.15'
45
- @gen_version = '2.283.1'
46
- @user_agent = 'speakeasy-sdk/ruby 4.0.15 2.283.1 0.4.0 speakeasy_client_sdk_ruby'
44
+ @sdk_version = '4.0.16'
45
+ @gen_version = '2.286.7'
46
+ @user_agent = 'speakeasy-sdk/ruby 4.0.16 2.286.7 0.4.0 speakeasy_client_sdk_ruby'
47
47
  end
48
48
 
49
49
  sig { returns([String, T::Hash[Symbol, String]]) }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: speakeasy_client_sdk_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.15
4
+ version: 4.0.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Speakeasy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-03-20 00:00:00.000000000 Z
11
+ date: 2024-03-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -199,6 +199,7 @@ files:
199
199
  - lib/speakeasy_client_sdk/models/operations/getschemarevision_response.rb
200
200
  - lib/speakeasy_client_sdk/models/operations/getschemas_request.rb
201
201
  - lib/speakeasy_client_sdk/models/operations/getschemas_response.rb
202
+ - lib/speakeasy_client_sdk/models/operations/getuser_response.rb
202
203
  - lib/speakeasy_client_sdk/models/operations/getvalidembedaccesstokens_response.rb
203
204
  - lib/speakeasy_client_sdk/models/operations/getversionmetadata_request.rb
204
205
  - lib/speakeasy_client_sdk/models/operations/getversionmetadata_response.rb
@@ -229,6 +230,7 @@ files:
229
230
  - lib/speakeasy_client_sdk/models/shared.rb
230
231
  - lib/speakeasy_client_sdk/models/shared/accessdetails.rb
231
232
  - lib/speakeasy_client_sdk/models/shared/accesstoken.rb
233
+ - lib/speakeasy_client_sdk/models/shared/accesstoken_user.rb
232
234
  - lib/speakeasy_client_sdk/models/shared/account_type.rb
233
235
  - lib/speakeasy_client_sdk/models/shared/api.rb
234
236
  - lib/speakeasy_client_sdk/models/shared/api_input.rb