speakeasy_client_sdk_ruby 4.0.9 → 4.0.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/speakeasy_client_sdk/auth.rb +37 -0
- data/lib/speakeasy_client_sdk/models/operations/getaccesstoken_request.rb +24 -0
- data/lib/speakeasy_client_sdk/models/operations/getaccesstoken_response.rb +36 -0
- data/lib/speakeasy_client_sdk/models/operations.rb +2 -0
- data/lib/speakeasy_client_sdk/models/shared/accesstoken.rb +33 -0
- data/lib/speakeasy_client_sdk/models/shared/claims.rb +20 -0
- data/lib/speakeasy_client_sdk/models/shared/targetsdk.rb +5 -2
- data/lib/speakeasy_client_sdk/models/shared/user.rb +39 -0
- data/lib/speakeasy_client_sdk/models/shared/workspaces.rb +20 -0
- data/lib/speakeasy_client_sdk/models/shared.rb +4 -0
- data/lib/speakeasy_client_sdk/sdk.rb +12 -19
- data/lib/speakeasy_client_sdk/sdkconfiguration.rb +11 -13
- data/lib/speakeasy_client_sdk_ruby.rb +5 -4
- metadata +8 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dcab2d299c8fc130040b03ace1ac240fdc2792e57a3e60aea01343e7a342a39f
|
4
|
+
data.tar.gz: acdc3967ad97b8bc1ceccd495f62ffc93dca659c6ed7abd9265ccc4c21034b18
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d8968cb61983501c584de516d7c04b5d4934cc3b617be23f24c379e6fdbf43bbde253b5247f1abf1c677aeb66a5e34a36da219ad8f98ab6209609f936f9c5a3
|
7
|
+
data.tar.gz: f34a013e05b5b903f7480f347fe0f6de0ee29a8efb6154a8dac576bee7cf11bcda9f85d787704510687163036d8771426fd4d4b45c1f5a6c91bea5110c25a158
|
@@ -19,6 +19,43 @@ module SpeakeasyClientSDK
|
|
19
19
|
end
|
20
20
|
|
21
21
|
|
22
|
+
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GetAccessTokenRequest)).returns(::SpeakeasyClientSDK::Operations::GetAccessTokenResponse) }
|
23
|
+
def get_access_token(request)
|
24
|
+
# get_access_token - Get or refresh an access token for the current workspace.
|
25
|
+
url, params = @sdk_configuration.get_server_details
|
26
|
+
base_url = Utils.template_url(url, params)
|
27
|
+
url = "#{base_url}/v1/auth/access_token"
|
28
|
+
headers = {}
|
29
|
+
query_params = Utils.get_query_params(::SpeakeasyClientSDK::Operations::GetAccessTokenRequest, request, @sdk_configuration.globals)
|
30
|
+
headers['Accept'] = 'application/json'
|
31
|
+
headers['user-agent'] = @sdk_configuration.user_agent
|
32
|
+
|
33
|
+
r = @sdk_configuration.client.get(url) do |req|
|
34
|
+
req.headers = headers
|
35
|
+
req.params = query_params
|
36
|
+
end
|
37
|
+
|
38
|
+
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
39
|
+
|
40
|
+
res = ::SpeakeasyClientSDK::Operations::GetAccessTokenResponse.new(
|
41
|
+
status_code: r.status, content_type: content_type, raw_response: r
|
42
|
+
)
|
43
|
+
if r.status == 200
|
44
|
+
if Utils.match_content_type(content_type, 'application/json')
|
45
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::AccessToken)
|
46
|
+
res.access_token = out
|
47
|
+
end
|
48
|
+
else
|
49
|
+
|
50
|
+
if Utils.match_content_type(content_type, 'application/json')
|
51
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::Error)
|
52
|
+
res.error = out
|
53
|
+
end
|
54
|
+
end
|
55
|
+
res
|
56
|
+
end
|
57
|
+
|
58
|
+
|
22
59
|
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GetWorkspaceAccessRequest)).returns(::SpeakeasyClientSDK::Operations::GetWorkspaceAccessResponse) }
|
23
60
|
def get_workspace_access(request)
|
24
61
|
# get_workspace_access - Get access allowances for a particular workspace
|
@@ -0,0 +1,24 @@
|
|
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 GetAccessTokenRequest < ::SpeakeasyClientSDK::Utils::FieldAugmented
|
12
|
+
extend T::Sig
|
13
|
+
|
14
|
+
# The workspace ID
|
15
|
+
field :workspace_id, ::String, { 'query_param': { 'field_name': 'workspace_id', 'style': 'form', 'explode': true } }
|
16
|
+
|
17
|
+
|
18
|
+
sig { params(workspace_id: ::String).void }
|
19
|
+
def initialize(workspace_id: nil)
|
20
|
+
@workspace_id = workspace_id
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -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 GetAccessTokenResponse < ::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
|
+
# OK
|
21
|
+
field :access_token, T.nilable(::SpeakeasyClientSDK::Shared::AccessToken)
|
22
|
+
# Default error response
|
23
|
+
field :error, T.nilable(::SpeakeasyClientSDK::Shared::Error)
|
24
|
+
|
25
|
+
|
26
|
+
sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, access_token: T.nilable(::SpeakeasyClientSDK::Shared::AccessToken), error: T.nilable(::SpeakeasyClientSDK::Shared::Error)).void }
|
27
|
+
def initialize(content_type: nil, raw_response: nil, status_code: nil, access_token: nil, error: nil)
|
28
|
+
@content_type = content_type
|
29
|
+
@raw_response = raw_response
|
30
|
+
@status_code = status_code
|
31
|
+
@access_token = access_token
|
32
|
+
@error = error
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -59,6 +59,8 @@ module SpeakeasyClientSDK
|
|
59
59
|
autoload :RegisterSchemaRequestBody, 'speakeasy_client_sdk/models/operations/registerschema_requestbody.rb'
|
60
60
|
autoload :RegisterSchemaRequest, 'speakeasy_client_sdk/models/operations/registerschema_request.rb'
|
61
61
|
autoload :RegisterSchemaResponse, 'speakeasy_client_sdk/models/operations/registerschema_response.rb'
|
62
|
+
autoload :GetAccessTokenRequest, 'speakeasy_client_sdk/models/operations/getaccesstoken_request.rb'
|
63
|
+
autoload :GetAccessTokenResponse, 'speakeasy_client_sdk/models/operations/getaccesstoken_response.rb'
|
62
64
|
autoload :GetWorkspaceAccessRequest, 'speakeasy_client_sdk/models/operations/getworkspaceaccess_request.rb'
|
63
65
|
autoload :GetWorkspaceAccessResponse, 'speakeasy_client_sdk/models/operations/getworkspaceaccess_response.rb'
|
64
66
|
autoload :ValidateApiKeyResponse, 'speakeasy_client_sdk/models/operations/validateapikey_response.rb'
|
@@ -0,0 +1,33 @@
|
|
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
|
+
# An AccessToken is a token that can be used to authenticate with the Speakeasy API.
|
11
|
+
class AccessToken < ::SpeakeasyClientSDK::Utils::FieldAugmented
|
12
|
+
extend T::Sig
|
13
|
+
|
14
|
+
|
15
|
+
field :access_token, ::String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('access_token') } }
|
16
|
+
|
17
|
+
field :claims, ::SpeakeasyClientSDK::Shared::Claims, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('claims') } }
|
18
|
+
|
19
|
+
field :user, ::SpeakeasyClientSDK::Shared::User, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('user') } }
|
20
|
+
|
21
|
+
field :workspaces, T.nilable(T::Array[::SpeakeasyClientSDK::Shared::Workspaces]), { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('workspaces') } }
|
22
|
+
|
23
|
+
|
24
|
+
sig { params(access_token: ::String, claims: ::SpeakeasyClientSDK::Shared::Claims, user: ::SpeakeasyClientSDK::Shared::User, workspaces: T.nilable(T::Array[::SpeakeasyClientSDK::Shared::Workspaces])).void }
|
25
|
+
def initialize(access_token: nil, claims: nil, user: nil, workspaces: nil)
|
26
|
+
@access_token = access_token
|
27
|
+
@claims = claims
|
28
|
+
@user = user
|
29
|
+
@workspaces = workspaces
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,20 @@
|
|
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 Claims < ::SpeakeasyClientSDK::Utils::FieldAugmented
|
12
|
+
extend T::Sig
|
13
|
+
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
def initialize; end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -21,6 +21,8 @@ module SpeakeasyClientSDK
|
|
21
21
|
field :last_event_created_at, ::DateTime, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('last_event_created_at'), 'decoder': Utils.datetime_from_iso_format(false) } }
|
22
22
|
# Unique identifier of the last event for the target
|
23
23
|
field :last_event_id, ::String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('last_event_id') } }
|
24
|
+
# Total number of events for the target
|
25
|
+
field :total_events, ::Integer, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('total_events') } }
|
24
26
|
# Remote commit ID.
|
25
27
|
field :commit_head, T.nilable(::String), { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('commit_head') } }
|
26
28
|
# Version of the generated target (post generation)
|
@@ -57,13 +59,14 @@ module SpeakeasyClientSDK
|
|
57
59
|
field :success, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('success') } }
|
58
60
|
|
59
61
|
|
60
|
-
sig { params(generate_gen_lock_id: ::String, generate_target: ::String, id: ::String, last_event_created_at: ::DateTime, last_event_id: ::String, commit_head: T.nilable(::String), generate_config_post_version: T.nilable(::String), generate_published: T.nilable(T::Boolean), generate_target_name: T.nilable(::String), generate_target_version: T.nilable(::String), gh_action_organization: T.nilable(::String), gh_action_repository: T.nilable(::String), gh_action_run_link: T.nilable(::String), gh_action_version: T.nilable(::String), git_relative_cwd: T.nilable(::String), git_remote_default_owner: T.nilable(::String), git_remote_default_repo: T.nilable(::String), git_user_email: T.nilable(::String), git_user_name: T.nilable(::String), hostname: T.nilable(::String), repo_label: T.nilable(::String), success: T.nilable(T::Boolean)).void }
|
61
|
-
def initialize(generate_gen_lock_id: nil, generate_target: nil, id: nil, last_event_created_at: nil, last_event_id: nil, commit_head: nil, generate_config_post_version: nil, generate_published: nil, generate_target_name: nil, generate_target_version: nil, gh_action_organization: nil, gh_action_repository: nil, gh_action_run_link: nil, gh_action_version: nil, git_relative_cwd: nil, git_remote_default_owner: nil, git_remote_default_repo: nil, git_user_email: nil, git_user_name: nil, hostname: nil, repo_label: nil, success: nil)
|
62
|
+
sig { params(generate_gen_lock_id: ::String, generate_target: ::String, id: ::String, last_event_created_at: ::DateTime, last_event_id: ::String, total_events: ::Integer, commit_head: T.nilable(::String), generate_config_post_version: T.nilable(::String), generate_published: T.nilable(T::Boolean), generate_target_name: T.nilable(::String), generate_target_version: T.nilable(::String), gh_action_organization: T.nilable(::String), gh_action_repository: T.nilable(::String), gh_action_run_link: T.nilable(::String), gh_action_version: T.nilable(::String), git_relative_cwd: T.nilable(::String), git_remote_default_owner: T.nilable(::String), git_remote_default_repo: T.nilable(::String), git_user_email: T.nilable(::String), git_user_name: T.nilable(::String), hostname: T.nilable(::String), repo_label: T.nilable(::String), success: T.nilable(T::Boolean)).void }
|
63
|
+
def initialize(generate_gen_lock_id: nil, generate_target: nil, id: nil, last_event_created_at: nil, last_event_id: nil, total_events: nil, commit_head: nil, generate_config_post_version: nil, generate_published: nil, generate_target_name: nil, generate_target_version: nil, gh_action_organization: nil, gh_action_repository: nil, gh_action_run_link: nil, gh_action_version: nil, git_relative_cwd: nil, git_remote_default_owner: nil, git_remote_default_repo: nil, git_user_email: nil, git_user_name: nil, hostname: nil, repo_label: nil, success: nil)
|
62
64
|
@generate_gen_lock_id = generate_gen_lock_id
|
63
65
|
@generate_target = generate_target
|
64
66
|
@id = id
|
65
67
|
@last_event_created_at = last_event_created_at
|
66
68
|
@last_event_id = last_event_id
|
69
|
+
@total_events = total_events
|
67
70
|
@commit_head = commit_head
|
68
71
|
@generate_config_post_version = generate_config_post_version
|
69
72
|
@generate_published = generate_published
|
@@ -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 User < ::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
|
@@ -0,0 +1,20 @@
|
|
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 Workspaces < ::SpeakeasyClientSDK::Utils::FieldAugmented
|
12
|
+
extend T::Sig
|
13
|
+
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
def initialize; end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -16,6 +16,10 @@ module SpeakeasyClientSDK
|
|
16
16
|
autoload :Schema, 'speakeasy_client_sdk/models/shared/schema.rb'
|
17
17
|
autoload :ValueChange, 'speakeasy_client_sdk/models/shared/valuechange.rb'
|
18
18
|
autoload :SchemaDiff, 'speakeasy_client_sdk/models/shared/schemadiff.rb'
|
19
|
+
autoload :Claims, 'speakeasy_client_sdk/models/shared/claims.rb'
|
20
|
+
autoload :User, 'speakeasy_client_sdk/models/shared/user.rb'
|
21
|
+
autoload :Workspaces, 'speakeasy_client_sdk/models/shared/workspaces.rb'
|
22
|
+
autoload :AccessToken, 'speakeasy_client_sdk/models/shared/accesstoken.rb'
|
19
23
|
autoload :AccessDetails, 'speakeasy_client_sdk/models/shared/accessdetails.rb'
|
20
24
|
autoload :AccountType, 'speakeasy_client_sdk/models/shared/account_type.rb'
|
21
25
|
autoload :ApiKeyDetails, 'speakeasy_client_sdk/models/shared/apikeydetails.rb'
|
@@ -6,6 +6,7 @@
|
|
6
6
|
require 'faraday'
|
7
7
|
require 'faraday/multipart'
|
8
8
|
require 'sorbet-runtime'
|
9
|
+
|
9
10
|
module SpeakeasyClientSDK
|
10
11
|
extend T::Sig
|
11
12
|
|
@@ -14,13 +15,11 @@ module SpeakeasyClientSDK
|
|
14
15
|
|
15
16
|
attr_accessor :apis, :api_endpoints, :metadata, :schemas, :auth, :requests, :embeds, :events
|
16
17
|
|
17
|
-
attr_accessor :security, :language, :sdk_version, :gen_version
|
18
|
-
|
19
18
|
sig do
|
20
19
|
params(client: Faraday::Request,
|
21
20
|
security: T.nilable(Shared::Security),
|
22
21
|
workspace_id: ::String,
|
23
|
-
server:
|
22
|
+
server: T.nilable(Symbol),
|
24
23
|
server_url: String,
|
25
24
|
url_params: T::Hash[Symbol, String]).void
|
26
25
|
end
|
@@ -35,9 +34,9 @@ module SpeakeasyClientSDK
|
|
35
34
|
# @param [Faraday::Request] client The faraday HTTP client to use for all operations
|
36
35
|
# @param [Shared::Security] security The security details required for authentication
|
37
36
|
# @param [::String] workspace_id: Configures the workspace_id parameter for all supported operations
|
38
|
-
# @param [
|
39
|
-
# @param [String] server_url The server URL to use for all operations
|
40
|
-
# @param [Hash
|
37
|
+
# @param [::Symbol] server The server identifier to use for all operations
|
38
|
+
# @param [::String] server_url The server URL to use for all operations
|
39
|
+
# @param [::Hash<::Symbol, ::String>] url_params Parameters to optionally template the server URL with
|
41
40
|
|
42
41
|
if client.nil?
|
43
42
|
client = Faraday.new(request: {
|
@@ -53,9 +52,7 @@ module SpeakeasyClientSDK
|
|
53
52
|
server_url = Utils.template_url(server_url, url_params)
|
54
53
|
end
|
55
54
|
end
|
56
|
-
server = SERVER_PROD if server.nil?
|
57
55
|
|
58
|
-
|
59
56
|
globals = {
|
60
57
|
'parameters': {
|
61
58
|
'queryParam': {
|
@@ -70,25 +67,21 @@ module SpeakeasyClientSDK
|
|
70
67
|
init_sdks
|
71
68
|
end
|
72
69
|
|
73
|
-
sig { params(
|
74
|
-
def config_server_url(
|
75
|
-
|
76
|
-
@server_url = Utils.template_url(@server_url, params)
|
77
|
-
end
|
70
|
+
sig { params(server_url: String).void }
|
71
|
+
def config_server_url(server_url)
|
72
|
+
@sdk_configuration.server_url = server_url
|
78
73
|
init_sdks
|
79
74
|
end
|
80
75
|
|
81
|
-
sig { params(server:
|
82
|
-
def config_server(
|
83
|
-
raise StandardError,
|
84
|
-
|
85
|
-
config_server_url(params)
|
76
|
+
sig { params(server: Symbol).void }
|
77
|
+
def config_server(server)
|
78
|
+
raise StandardError, "Invalid server \"#{server}\"" if !SERVERS.key?(server)
|
79
|
+
@sdk_configuration.server = server
|
86
80
|
init_sdks
|
87
81
|
end
|
88
82
|
|
89
83
|
sig { params(security: ::SpeakeasyClientSDK::Shared::Security).void }
|
90
84
|
def config_security(security)
|
91
|
-
@security = security
|
92
85
|
@sdk_configuration.security = security
|
93
86
|
end
|
94
87
|
|
@@ -10,20 +10,19 @@ require 'sorbet-runtime'
|
|
10
10
|
module SpeakeasyClientSDK
|
11
11
|
extend T::Sig
|
12
12
|
|
13
|
-
|
14
|
-
SERVER_PROD = 'prod'
|
13
|
+
SERVER_PROD = :prod
|
15
14
|
SERVERS = {
|
16
|
-
|
15
|
+
prod: 'https://api.prod.speakeasyapi.dev',
|
17
16
|
}.freeze
|
18
17
|
# Contains the list of servers available to the SDK
|
19
18
|
|
20
|
-
|
21
19
|
class SDKConfiguration < ::SpeakeasyClientSDK::Utils::FieldAugmented
|
22
20
|
extend T::Sig
|
23
21
|
|
24
22
|
field :client, T.nilable(Faraday::Connection)
|
25
|
-
field :security, Shared::Security
|
23
|
+
field :security, T.nilable(::SpeakeasyClientSDK::Shared::Security)
|
26
24
|
field :server_url, T.nilable(String)
|
25
|
+
field :server, Symbol
|
27
26
|
field :globals, Hash[Symbol, Hash[Symbol, Hash[Symbol, Object]]]
|
28
27
|
field :language, String
|
29
28
|
field :openapi_doc_version, String
|
@@ -32,25 +31,24 @@ module SpeakeasyClientSDK
|
|
32
31
|
field :user_agent, String
|
33
32
|
|
34
33
|
|
35
|
-
sig { params(client: Faraday::Connection, security: T.nilable(Shared::Security), server_url: T.nilable(String),
|
36
|
-
def initialize(client, security, server_url,
|
34
|
+
sig { params(client: Faraday::Connection, security: T.nilable(::SpeakeasyClientSDK::Shared::Security), server_url: T.nilable(String), server: T.nilable(Symbol), globals: T::Hash[Symbol, T::Hash[Symbol, T::Hash[Symbol, Object]]]).void }
|
35
|
+
def initialize(client, security, server_url, server, globals)
|
37
36
|
@client = client
|
38
37
|
@server_url = server_url
|
39
|
-
@server =
|
38
|
+
@server = server.nil? ? SERVER_PROD : server
|
39
|
+
raise StandardError, "Invalid server \"#{server}\"" if !SERVERS.key?(@server)
|
40
40
|
@security = security
|
41
41
|
@globals = globals.nil? ? {} : globals
|
42
42
|
@language = 'ruby'
|
43
43
|
@openapi_doc_version = '0.4.0'
|
44
|
-
@sdk_version = '4.0.
|
45
|
-
@gen_version = '2.
|
46
|
-
@user_agent = 'speakeasy-sdk/ruby 4.0.
|
44
|
+
@sdk_version = '4.0.11'
|
45
|
+
@gen_version = '2.277.0'
|
46
|
+
@user_agent = 'speakeasy-sdk/ruby 4.0.11 2.277.0 0.4.0 speakeasy_client_sdk_ruby'
|
47
47
|
end
|
48
48
|
|
49
49
|
sig { returns([String, T::Hash[Symbol, String]]) }
|
50
50
|
def get_server_details
|
51
51
|
return [@server_url.delete_suffix('/'), {}] if !@server_url.nil?
|
52
|
-
@server = SERVER_PROD if @server.nil?
|
53
|
-
|
54
52
|
[SERVERS[@server], {}]
|
55
53
|
end
|
56
54
|
end
|
@@ -3,12 +3,8 @@
|
|
3
3
|
# typed: true
|
4
4
|
# frozen_string_literal: true
|
5
5
|
|
6
|
-
require_relative 'speakeasy_client_sdk/utils/t'
|
7
|
-
require_relative 'speakeasy_client_sdk/utils/utils'
|
8
|
-
require_relative 'speakeasy_client_sdk/utils/metadata_fields'
|
9
6
|
module SpeakeasyClientSDK
|
10
7
|
autoload :SDK, 'speakeasy_client_sdk/sdk'
|
11
|
-
autoload :SDKConfiguration, 'speakeasy_client_sdk/sdkconfiguration'
|
12
8
|
autoload :Shared, 'speakeasy_client_sdk/models/shared'
|
13
9
|
autoload :Operations, 'speakeasy_client_sdk/models/operations'
|
14
10
|
autoload :Apis, 'speakeasy_client_sdk/apis'
|
@@ -20,3 +16,8 @@ module SpeakeasyClientSDK
|
|
20
16
|
autoload :Embeds, 'speakeasy_client_sdk/embeds'
|
21
17
|
autoload :Events, 'speakeasy_client_sdk/events'
|
22
18
|
end
|
19
|
+
|
20
|
+
require_relative 'speakeasy_client_sdk/utils/t'
|
21
|
+
require_relative 'speakeasy_client_sdk/utils/utils'
|
22
|
+
require_relative 'speakeasy_client_sdk/utils/metadata_fields'
|
23
|
+
require_relative 'speakeasy_client_sdk/sdkconfiguration'
|
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.
|
4
|
+
version: 4.0.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Speakeasy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-02
|
11
|
+
date: 2024-03-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -174,6 +174,8 @@ files:
|
|
174
174
|
- lib/speakeasy_client_sdk/models/operations/generatepostmancollectionforapiendpoint_response.rb
|
175
175
|
- lib/speakeasy_client_sdk/models/operations/generaterequestpostmancollection_request.rb
|
176
176
|
- lib/speakeasy_client_sdk/models/operations/generaterequestpostmancollection_response.rb
|
177
|
+
- lib/speakeasy_client_sdk/models/operations/getaccesstoken_request.rb
|
178
|
+
- lib/speakeasy_client_sdk/models/operations/getaccesstoken_response.rb
|
177
179
|
- lib/speakeasy_client_sdk/models/operations/getallapiendpoints_request.rb
|
178
180
|
- lib/speakeasy_client_sdk/models/operations/getallapiendpoints_response.rb
|
179
181
|
- lib/speakeasy_client_sdk/models/operations/getallapiversions_request.rb
|
@@ -225,6 +227,7 @@ files:
|
|
225
227
|
- lib/speakeasy_client_sdk/models/operations/validateapikey_response.rb
|
226
228
|
- lib/speakeasy_client_sdk/models/shared.rb
|
227
229
|
- lib/speakeasy_client_sdk/models/shared/accessdetails.rb
|
230
|
+
- lib/speakeasy_client_sdk/models/shared/accesstoken.rb
|
228
231
|
- lib/speakeasy_client_sdk/models/shared/account_type.rb
|
229
232
|
- lib/speakeasy_client_sdk/models/shared/api.rb
|
230
233
|
- lib/speakeasy_client_sdk/models/shared/api_input.rb
|
@@ -232,6 +235,7 @@ files:
|
|
232
235
|
- lib/speakeasy_client_sdk/models/shared/apiendpoint_input.rb
|
233
236
|
- lib/speakeasy_client_sdk/models/shared/apikeydetails.rb
|
234
237
|
- lib/speakeasy_client_sdk/models/shared/boundedrequest.rb
|
238
|
+
- lib/speakeasy_client_sdk/models/shared/claims.rb
|
235
239
|
- lib/speakeasy_client_sdk/models/shared/clievent.rb
|
236
240
|
- lib/speakeasy_client_sdk/models/shared/embedaccesstokenresponse.rb
|
237
241
|
- lib/speakeasy_client_sdk/models/shared/embedtoken.rb
|
@@ -247,9 +251,11 @@ files:
|
|
247
251
|
- lib/speakeasy_client_sdk/models/shared/security.rb
|
248
252
|
- lib/speakeasy_client_sdk/models/shared/targetsdk.rb
|
249
253
|
- lib/speakeasy_client_sdk/models/shared/unboundedrequest.rb
|
254
|
+
- lib/speakeasy_client_sdk/models/shared/user.rb
|
250
255
|
- lib/speakeasy_client_sdk/models/shared/valuechange.rb
|
251
256
|
- lib/speakeasy_client_sdk/models/shared/versionmetadata.rb
|
252
257
|
- lib/speakeasy_client_sdk/models/shared/versionmetadata_input.rb
|
258
|
+
- lib/speakeasy_client_sdk/models/shared/workspaces.rb
|
253
259
|
- lib/speakeasy_client_sdk/requests.rb
|
254
260
|
- lib/speakeasy_client_sdk/schemas.rb
|
255
261
|
- lib/speakeasy_client_sdk/sdk.rb
|