speakeasy_client_sdk_ruby 4.0.13 → 4.0.14
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/models/operations/getorganizations_response.rb +36 -0
- data/lib/speakeasy_client_sdk/models/operations.rb +1 -0
- data/lib/speakeasy_client_sdk/models/shared/accessdetails.rb +5 -2
- data/lib/speakeasy_client_sdk/models/shared/level.rb +20 -0
- data/lib/speakeasy_client_sdk/models/shared/organization.rb +39 -0
- data/lib/speakeasy_client_sdk/models/shared/organization_account_type.rb +20 -0
- data/lib/speakeasy_client_sdk/models/shared.rb +3 -0
- data/lib/speakeasy_client_sdk/organizations.rb +58 -0
- data/lib/speakeasy_client_sdk/sdk.rb +2 -1
- data/lib/speakeasy_client_sdk/sdkconfiguration.rb +2 -2
- data/lib/speakeasy_client_sdk_ruby.rb +1 -0
- metadata +7 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc96a9c23c72680782b160791f3e5408267c5a4cb74671aa9e424593996add1a
|
4
|
+
data.tar.gz: ebec49df05d894094e718b21d6f0d7aaea3b9e76c917001a07d9b7b13a1e3888
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cee5aee56106d49d1e37a037bbfba0704d563e3e888b58c414d25d6f2ad80e8483a452c6d3d31586676cbcf83accae175005d10eea23a713e9d2ade41b47aff1
|
7
|
+
data.tar.gz: 633b3c39e9af2b6c9c7d56d27ae2644c41367f494c879559881c72372ec7e7ca4af09ef89659be248d2b8bc5e6f30b2af1eae035e82c0b2fc6eb835b2de62628
|
@@ -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 GetOrganizationsResponse < ::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 :organizations, T.nilable(T::Array[::SpeakeasyClientSDK::Shared::Organization])
|
24
|
+
|
25
|
+
|
26
|
+
sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error: T.nilable(::SpeakeasyClientSDK::Shared::Error), organizations: T.nilable(T::Array[::SpeakeasyClientSDK::Shared::Organization])).void }
|
27
|
+
def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil, organizations: nil)
|
28
|
+
@content_type = content_type
|
29
|
+
@raw_response = raw_response
|
30
|
+
@status_code = status_code
|
31
|
+
@error = error
|
32
|
+
@organizations = organizations
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -70,6 +70,7 @@ module SpeakeasyClientSDK
|
|
70
70
|
autoload :GetRequestFromEventLogResponse, 'speakeasy_client_sdk/models/operations/getrequestfromeventlog_response.rb'
|
71
71
|
autoload :QueryEventLogRequest, 'speakeasy_client_sdk/models/operations/queryeventlog_request.rb'
|
72
72
|
autoload :QueryEventLogResponse, 'speakeasy_client_sdk/models/operations/queryeventlog_response.rb'
|
73
|
+
autoload :GetOrganizationsResponse, 'speakeasy_client_sdk/models/operations/getorganizations_response.rb'
|
73
74
|
autoload :GetEmbedAccessTokenRequest, 'speakeasy_client_sdk/models/operations/getembedaccesstoken_request.rb'
|
74
75
|
autoload :GetEmbedAccessTokenResponse, 'speakeasy_client_sdk/models/operations/getembedaccesstoken_response.rb'
|
75
76
|
autoload :GetValidEmbedAccessTokensResponse, 'speakeasy_client_sdk/models/operations/getvalidembedaccesstokens_response.rb'
|
@@ -16,11 +16,14 @@ module SpeakeasyClientSDK
|
|
16
16
|
|
17
17
|
field :message, ::String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('message') } }
|
18
18
|
|
19
|
+
field :level, T.nilable(::SpeakeasyClientSDK::Shared::Level), { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('level'), 'decoder': Utils.enum_from_string(::SpeakeasyClientSDK::Shared::Level, true) } }
|
19
20
|
|
20
|
-
|
21
|
-
|
21
|
+
|
22
|
+
sig { params(generation_allowed: T::Boolean, message: ::String, level: T.nilable(::SpeakeasyClientSDK::Shared::Level)).void }
|
23
|
+
def initialize(generation_allowed: nil, message: nil, level: nil)
|
22
24
|
@generation_allowed = generation_allowed
|
23
25
|
@message = message
|
26
|
+
@level = level
|
24
27
|
end
|
25
28
|
end
|
26
29
|
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 Level < T::Enum
|
12
|
+
enums do
|
13
|
+
ALLOWED = new('allowed')
|
14
|
+
WARNING = new('warning')
|
15
|
+
BLOCKED = new('blocked')
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
end
|
@@ -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
|
+
# A speakeasy organization
|
11
|
+
class Organization < ::SpeakeasyClientSDK::Utils::FieldAugmented
|
12
|
+
extend T::Sig
|
13
|
+
|
14
|
+
|
15
|
+
field :account_type, ::SpeakeasyClientSDK::Shared::OrganizationAccountType, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('account_type'), 'decoder': Utils.enum_from_string(::SpeakeasyClientSDK::Shared::OrganizationAccountType, false) } }
|
16
|
+
|
17
|
+
field :id, ::String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('id') } }
|
18
|
+
|
19
|
+
field :name, ::String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('name') } }
|
20
|
+
|
21
|
+
field :created_at, T.nilable(::DateTime), { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('created)at'), 'decoder': Utils.datetime_from_iso_format(true) } }
|
22
|
+
|
23
|
+
field :slug, T.nilable(::String), { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('slug') } }
|
24
|
+
|
25
|
+
field :updated_at, T.nilable(::DateTime), { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('updated_at'), 'decoder': Utils.datetime_from_iso_format(true) } }
|
26
|
+
|
27
|
+
|
28
|
+
sig { params(account_type: ::SpeakeasyClientSDK::Shared::OrganizationAccountType, id: ::String, name: ::String, created_at: T.nilable(::DateTime), slug: T.nilable(::String), updated_at: T.nilable(::DateTime)).void }
|
29
|
+
def initialize(account_type: nil, id: nil, name: nil, created_at: nil, slug: nil, updated_at: nil)
|
30
|
+
@account_type = account_type
|
31
|
+
@id = id
|
32
|
+
@name = name
|
33
|
+
@created_at = created_at
|
34
|
+
@slug = slug
|
35
|
+
@updated_at = updated_at
|
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 OrganizationAccountType < T::Enum
|
12
|
+
enums do
|
13
|
+
FREE = new('free')
|
14
|
+
SCALE_UP = new('scale-up')
|
15
|
+
ENTERPRISE = new('enterprise')
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
end
|
@@ -20,6 +20,7 @@ module SpeakeasyClientSDK
|
|
20
20
|
autoload :User, 'speakeasy_client_sdk/models/shared/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 :Level, 'speakeasy_client_sdk/models/shared/level.rb'
|
23
24
|
autoload :AccessDetails, 'speakeasy_client_sdk/models/shared/accessdetails.rb'
|
24
25
|
autoload :AccountType, 'speakeasy_client_sdk/models/shared/account_type.rb'
|
25
26
|
autoload :ApiKeyDetails, 'speakeasy_client_sdk/models/shared/apikeydetails.rb'
|
@@ -28,6 +29,8 @@ module SpeakeasyClientSDK
|
|
28
29
|
autoload :RequestMetadata, 'speakeasy_client_sdk/models/shared/requestmetadata.rb'
|
29
30
|
autoload :Filters, 'speakeasy_client_sdk/models/shared/filters.rb'
|
30
31
|
autoload :Filter, 'speakeasy_client_sdk/models/shared/filter.rb'
|
32
|
+
autoload :OrganizationAccountType, 'speakeasy_client_sdk/models/shared/organization_account_type.rb'
|
33
|
+
autoload :Organization, 'speakeasy_client_sdk/models/shared/organization.rb'
|
31
34
|
autoload :EmbedAccessTokenResponse, 'speakeasy_client_sdk/models/shared/embedaccesstokenresponse.rb'
|
32
35
|
autoload :EmbedToken, 'speakeasy_client_sdk/models/shared/embedtoken.rb'
|
33
36
|
autoload :GenerateBumpType, 'speakeasy_client_sdk/models/shared/generate_bump_type.rb'
|
@@ -0,0 +1,58 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
require 'faraday'
|
7
|
+
require 'faraday/multipart'
|
8
|
+
require 'sorbet-runtime'
|
9
|
+
|
10
|
+
module SpeakeasyClientSDK
|
11
|
+
extend T::Sig
|
12
|
+
class Organizations
|
13
|
+
extend T::Sig
|
14
|
+
|
15
|
+
|
16
|
+
sig { params(sdk_config: SDKConfiguration).void }
|
17
|
+
def initialize(sdk_config)
|
18
|
+
@sdk_configuration = sdk_config
|
19
|
+
end
|
20
|
+
|
21
|
+
|
22
|
+
sig { returns(::SpeakeasyClientSDK::Operations::GetOrganizationsResponse) }
|
23
|
+
def get_organizations
|
24
|
+
# get_organizations - Get organizations for a user
|
25
|
+
# Returns a list of organizations a user has access too
|
26
|
+
url, params = @sdk_configuration.get_server_details
|
27
|
+
base_url = Utils.template_url(url, params)
|
28
|
+
url = "#{base_url}/v1/organization"
|
29
|
+
headers = {}
|
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
|
+
Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
|
36
|
+
end
|
37
|
+
|
38
|
+
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
39
|
+
|
40
|
+
res = ::SpeakeasyClientSDK::Operations::GetOrganizationsResponse.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, T::Array[::SpeakeasyClientSDK::Shared::Organization])
|
46
|
+
res.organizations = 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
|
+
end
|
58
|
+
end
|
@@ -13,7 +13,7 @@ module SpeakeasyClientSDK
|
|
13
13
|
class SDK
|
14
14
|
extend T::Sig
|
15
15
|
|
16
|
-
attr_accessor :apis, :api_endpoints, :metadata, :schemas, :auth, :requests, :embeds, :events
|
16
|
+
attr_accessor :apis, :api_endpoints, :metadata, :schemas, :auth, :requests, :organizations, :embeds, :events
|
17
17
|
|
18
18
|
sig do
|
19
19
|
params(client: Faraday::Request,
|
@@ -93,6 +93,7 @@ module SpeakeasyClientSDK
|
|
93
93
|
@schemas = Schemas.new(@sdk_configuration)
|
94
94
|
@auth = Auth.new(@sdk_configuration)
|
95
95
|
@requests = Requests.new(@sdk_configuration)
|
96
|
+
@organizations = Organizations.new(@sdk_configuration)
|
96
97
|
@embeds = Embeds.new(@sdk_configuration)
|
97
98
|
@events = Events.new(@sdk_configuration)
|
98
99
|
end
|
@@ -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.
|
44
|
+
@sdk_version = '4.0.14'
|
45
45
|
@gen_version = '2.279.1'
|
46
|
-
@user_agent = 'speakeasy-sdk/ruby 4.0.
|
46
|
+
@user_agent = 'speakeasy-sdk/ruby 4.0.14 2.279.1 0.4.0 speakeasy_client_sdk_ruby'
|
47
47
|
end
|
48
48
|
|
49
49
|
sig { returns([String, T::Hash[Symbol, String]]) }
|
@@ -13,6 +13,7 @@ module SpeakeasyClientSDK
|
|
13
13
|
autoload :Schemas, 'speakeasy_client_sdk/schemas'
|
14
14
|
autoload :Auth, 'speakeasy_client_sdk/auth'
|
15
15
|
autoload :Requests, 'speakeasy_client_sdk/requests'
|
16
|
+
autoload :Organizations, 'speakeasy_client_sdk/organizations'
|
16
17
|
autoload :Embeds, 'speakeasy_client_sdk/embeds'
|
17
18
|
autoload :Events, 'speakeasy_client_sdk/events'
|
18
19
|
end
|
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.14
|
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-
|
11
|
+
date: 2024-03-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -188,6 +188,7 @@ files:
|
|
188
188
|
- lib/speakeasy_client_sdk/models/operations/getapis_response.rb
|
189
189
|
- lib/speakeasy_client_sdk/models/operations/getembedaccesstoken_request.rb
|
190
190
|
- lib/speakeasy_client_sdk/models/operations/getembedaccesstoken_response.rb
|
191
|
+
- lib/speakeasy_client_sdk/models/operations/getorganizations_response.rb
|
191
192
|
- lib/speakeasy_client_sdk/models/operations/getrequestfromeventlog_request.rb
|
192
193
|
- lib/speakeasy_client_sdk/models/operations/getrequestfromeventlog_response.rb
|
193
194
|
- lib/speakeasy_client_sdk/models/operations/getschema_request.rb
|
@@ -245,6 +246,9 @@ files:
|
|
245
246
|
- lib/speakeasy_client_sdk/models/shared/generate_bump_type.rb
|
246
247
|
- lib/speakeasy_client_sdk/models/shared/generateopenapispecdiff.rb
|
247
248
|
- lib/speakeasy_client_sdk/models/shared/interactiontype.rb
|
249
|
+
- lib/speakeasy_client_sdk/models/shared/level.rb
|
250
|
+
- lib/speakeasy_client_sdk/models/shared/organization.rb
|
251
|
+
- lib/speakeasy_client_sdk/models/shared/organization_account_type.rb
|
248
252
|
- lib/speakeasy_client_sdk/models/shared/requestmetadata.rb
|
249
253
|
- lib/speakeasy_client_sdk/models/shared/schema.rb
|
250
254
|
- lib/speakeasy_client_sdk/models/shared/schemadiff.rb
|
@@ -256,6 +260,7 @@ files:
|
|
256
260
|
- lib/speakeasy_client_sdk/models/shared/versionmetadata.rb
|
257
261
|
- lib/speakeasy_client_sdk/models/shared/versionmetadata_input.rb
|
258
262
|
- lib/speakeasy_client_sdk/models/shared/workspaces.rb
|
263
|
+
- lib/speakeasy_client_sdk/organizations.rb
|
259
264
|
- lib/speakeasy_client_sdk/requests.rb
|
260
265
|
- lib/speakeasy_client_sdk/schemas.rb
|
261
266
|
- lib/speakeasy_client_sdk/sdk.rb
|