speakeasy_client_sdk_ruby 4.1.13 → 4.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/speakeasy_client_sdk/github.rb +139 -0
- data/lib/speakeasy_client_sdk/models/operations/getorganizationusage_response.rb +36 -0
- data/lib/speakeasy_client_sdk/models/operations/githubcheckaccess_request.rb +27 -0
- data/lib/speakeasy_client_sdk/models/operations/githubcheckaccess_response.rb +33 -0
- data/lib/speakeasy_client_sdk/models/operations/githubconfiguretarget_response.rb +33 -0
- data/lib/speakeasy_client_sdk/models/operations/githubtriggeraction_response.rb +33 -0
- data/lib/speakeasy_client_sdk/models/operations.rb +5 -0
- data/lib/speakeasy_client_sdk/models/shared/accesstoken.rb +5 -2
- data/lib/speakeasy_client_sdk/models/shared/apikeydetails.rb +6 -3
- data/lib/speakeasy_client_sdk/models/shared/featureflag.rb +27 -0
- data/lib/speakeasy_client_sdk/models/shared/githubconfiguretargetrequest.rb +27 -0
- data/lib/speakeasy_client_sdk/models/shared/githubtriggeractionrequest.rb +33 -0
- data/lib/speakeasy_client_sdk/models/shared/organizationusage.rb +42 -0
- data/lib/speakeasy_client_sdk/models/shared/organizationusageresponse.rb +33 -0
- data/lib/speakeasy_client_sdk/models/shared.rb +5 -0
- data/lib/speakeasy_client_sdk/organizations.rb +37 -0
- data/lib/speakeasy_client_sdk/sdk.rb +2 -1
- data/lib/speakeasy_client_sdk/sdkconfiguration.rb +3 -3
- data/lib/speakeasy_client_sdk_ruby.rb +1 -0
- metadata +13 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aed64ea55ea5f163d699a477383658cb3fae1435a8757bfdeb3219fd0a130ed0
|
4
|
+
data.tar.gz: ee19eb1f099b18fce1ab6e3391e8b6680d937c46078cdb08f9369a1e31c89fe1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 87a91af14382aa5897f1f72d6ee8237d8d97ec0eeef4f71f00ca834c546a00196380089e8a244325189667b7a508aaa537e97c25129c38fd915aaa1247d067a5
|
7
|
+
data.tar.gz: 8f668c12ea18926d76351f38edf5518fad4d510a4d42f8d6e729edc891826c93105b9a1801de7daa19b4c10e8e30d0320e6930891706cdd97a97403d77a1cd30
|
@@ -0,0 +1,139 @@
|
|
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 Github
|
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 { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GithubCheckAccessRequest)).returns(::SpeakeasyClientSDK::Operations::GithubCheckAccessResponse) }
|
23
|
+
def github_check_access(request)
|
24
|
+
|
25
|
+
url, params = @sdk_configuration.get_server_details
|
26
|
+
base_url = Utils.template_url(url, params)
|
27
|
+
url = "#{base_url}/v1/github/check_access"
|
28
|
+
headers = {}
|
29
|
+
query_params = Utils.get_query_params(::SpeakeasyClientSDK::Operations::GithubCheckAccessRequest, 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
|
+
Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
|
37
|
+
end
|
38
|
+
|
39
|
+
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
40
|
+
|
41
|
+
res = ::SpeakeasyClientSDK::Operations::GithubCheckAccessResponse.new(
|
42
|
+
status_code: r.status, content_type: content_type, raw_response: r
|
43
|
+
)
|
44
|
+
if r.status == 200
|
45
|
+
else
|
46
|
+
|
47
|
+
if Utils.match_content_type(content_type, 'application/json')
|
48
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::Error)
|
49
|
+
res.error = out
|
50
|
+
end
|
51
|
+
end
|
52
|
+
res
|
53
|
+
end
|
54
|
+
|
55
|
+
|
56
|
+
sig { params(request: ::SpeakeasyClientSDK::Shared::GithubConfigureTargetRequest).returns(::SpeakeasyClientSDK::Operations::GithubConfigureTargetResponse) }
|
57
|
+
def github_configure_target(request)
|
58
|
+
|
59
|
+
url, params = @sdk_configuration.get_server_details
|
60
|
+
base_url = Utils.template_url(url, params)
|
61
|
+
url = "#{base_url}/v1/github/configure_target"
|
62
|
+
headers = {}
|
63
|
+
req_content_type, data, form = Utils.serialize_request_body(request, :request, :json)
|
64
|
+
headers['content-type'] = req_content_type
|
65
|
+
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
66
|
+
headers['Accept'] = 'application/json'
|
67
|
+
headers['user-agent'] = @sdk_configuration.user_agent
|
68
|
+
|
69
|
+
r = @sdk_configuration.client.post(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
|
+
if form
|
73
|
+
req.body = Utils.encode_form(form)
|
74
|
+
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
75
|
+
req.body = URI.encode_www_form(data)
|
76
|
+
else
|
77
|
+
req.body = data
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
82
|
+
|
83
|
+
res = ::SpeakeasyClientSDK::Operations::GithubConfigureTargetResponse.new(
|
84
|
+
status_code: r.status, content_type: content_type, raw_response: r
|
85
|
+
)
|
86
|
+
if r.status == 200
|
87
|
+
else
|
88
|
+
|
89
|
+
if Utils.match_content_type(content_type, 'application/json')
|
90
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::Error)
|
91
|
+
res.error = out
|
92
|
+
end
|
93
|
+
end
|
94
|
+
res
|
95
|
+
end
|
96
|
+
|
97
|
+
|
98
|
+
sig { params(request: ::SpeakeasyClientSDK::Shared::GithubTriggerActionRequest).returns(::SpeakeasyClientSDK::Operations::GithubTriggerActionResponse) }
|
99
|
+
def github_trigger_action(request)
|
100
|
+
|
101
|
+
url, params = @sdk_configuration.get_server_details
|
102
|
+
base_url = Utils.template_url(url, params)
|
103
|
+
url = "#{base_url}/v1/github/trigger_action"
|
104
|
+
headers = {}
|
105
|
+
req_content_type, data, form = Utils.serialize_request_body(request, :request, :json)
|
106
|
+
headers['content-type'] = req_content_type
|
107
|
+
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
108
|
+
headers['Accept'] = 'application/json'
|
109
|
+
headers['user-agent'] = @sdk_configuration.user_agent
|
110
|
+
|
111
|
+
r = @sdk_configuration.client.post(url) do |req|
|
112
|
+
req.headers = headers
|
113
|
+
Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
|
114
|
+
if form
|
115
|
+
req.body = Utils.encode_form(form)
|
116
|
+
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
117
|
+
req.body = URI.encode_www_form(data)
|
118
|
+
else
|
119
|
+
req.body = data
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
123
|
+
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
124
|
+
|
125
|
+
res = ::SpeakeasyClientSDK::Operations::GithubTriggerActionResponse.new(
|
126
|
+
status_code: r.status, content_type: content_type, raw_response: r
|
127
|
+
)
|
128
|
+
if r.status == 200
|
129
|
+
else
|
130
|
+
|
131
|
+
if Utils.match_content_type(content_type, 'application/json')
|
132
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::Error)
|
133
|
+
res.error = out
|
134
|
+
end
|
135
|
+
end
|
136
|
+
res
|
137
|
+
end
|
138
|
+
end
|
139
|
+
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 GetOrganizationUsageResponse < ::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 :organization_usage_response, T.nilable(::SpeakeasyClientSDK::Shared::OrganizationUsageResponse)
|
24
|
+
|
25
|
+
|
26
|
+
sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error: T.nilable(::SpeakeasyClientSDK::Shared::Error), organization_usage_response: T.nilable(::SpeakeasyClientSDK::Shared::OrganizationUsageResponse)).void }
|
27
|
+
def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil, organization_usage_response: nil)
|
28
|
+
@content_type = content_type
|
29
|
+
@raw_response = raw_response
|
30
|
+
@status_code = status_code
|
31
|
+
@error = error
|
32
|
+
@organization_usage_response = organization_usage_response
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,27 @@
|
|
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 GithubCheckAccessRequest < ::SpeakeasyClientSDK::Utils::FieldAugmented
|
12
|
+
extend T::Sig
|
13
|
+
|
14
|
+
|
15
|
+
field :org, ::String, { 'query_param': { 'field_name': 'org', 'style': 'form', 'explode': true } }
|
16
|
+
|
17
|
+
field :repo, ::String, { 'query_param': { 'field_name': 'repo', 'style': 'form', 'explode': true } }
|
18
|
+
|
19
|
+
|
20
|
+
sig { params(org: ::String, repo: ::String).void }
|
21
|
+
def initialize(org: nil, repo: nil)
|
22
|
+
@org = org
|
23
|
+
@repo = repo
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -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 Operations
|
9
|
+
|
10
|
+
|
11
|
+
class GithubCheckAccessResponse < ::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
|
+
|
23
|
+
|
24
|
+
sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error: T.nilable(::SpeakeasyClientSDK::Shared::Error)).void }
|
25
|
+
def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil)
|
26
|
+
@content_type = content_type
|
27
|
+
@raw_response = raw_response
|
28
|
+
@status_code = status_code
|
29
|
+
@error = error
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -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 Operations
|
9
|
+
|
10
|
+
|
11
|
+
class GithubConfigureTargetResponse < ::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
|
+
|
23
|
+
|
24
|
+
sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error: T.nilable(::SpeakeasyClientSDK::Shared::Error)).void }
|
25
|
+
def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil)
|
26
|
+
@content_type = content_type
|
27
|
+
@raw_response = raw_response
|
28
|
+
@status_code = status_code
|
29
|
+
@error = error
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -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 Operations
|
9
|
+
|
10
|
+
|
11
|
+
class GithubTriggerActionResponse < ::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
|
+
|
23
|
+
|
24
|
+
sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error: T.nilable(::SpeakeasyClientSDK::Shared::Error)).void }
|
25
|
+
def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil)
|
26
|
+
@content_type = content_type
|
27
|
+
@raw_response = raw_response
|
28
|
+
@status_code = status_code
|
29
|
+
@error = error
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -83,6 +83,11 @@ module SpeakeasyClientSDK
|
|
83
83
|
autoload :GetRequestFromEventLogResponse, 'speakeasy_client_sdk/models/operations/getrequestfromeventlog_response.rb'
|
84
84
|
autoload :QueryEventLogRequest, 'speakeasy_client_sdk/models/operations/queryeventlog_request.rb'
|
85
85
|
autoload :QueryEventLogResponse, 'speakeasy_client_sdk/models/operations/queryeventlog_response.rb'
|
86
|
+
autoload :GithubCheckAccessRequest, 'speakeasy_client_sdk/models/operations/githubcheckaccess_request.rb'
|
87
|
+
autoload :GithubCheckAccessResponse, 'speakeasy_client_sdk/models/operations/githubcheckaccess_response.rb'
|
88
|
+
autoload :GithubConfigureTargetResponse, 'speakeasy_client_sdk/models/operations/githubconfiguretarget_response.rb'
|
89
|
+
autoload :GithubTriggerActionResponse, 'speakeasy_client_sdk/models/operations/githubtriggeraction_response.rb'
|
90
|
+
autoload :GetOrganizationUsageResponse, 'speakeasy_client_sdk/models/operations/getorganizationusage_response.rb'
|
86
91
|
autoload :GetOrganizationsResponse, 'speakeasy_client_sdk/models/operations/getorganizations_response.rb'
|
87
92
|
autoload :GetChangesReportSignedUrlRequest, 'speakeasy_client_sdk/models/operations/getchangesreportsignedurl_request.rb'
|
88
93
|
autoload :GetChangesReportSignedUrlSignedAccess, 'speakeasy_client_sdk/models/operations/getchangesreportsignedurl_signedaccess.rb'
|
@@ -18,14 +18,17 @@ module SpeakeasyClientSDK
|
|
18
18
|
|
19
19
|
field :user, ::SpeakeasyClientSDK::Shared::AccessTokenUser, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('user') } }
|
20
20
|
|
21
|
+
field :feature_flags, T.nilable(T::Array[::SpeakeasyClientSDK::Shared::FeatureFlag]), { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('feature_flags') } }
|
22
|
+
|
21
23
|
field :workspaces, T.nilable(T::Array[::SpeakeasyClientSDK::Shared::Workspaces]), { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('workspaces') } }
|
22
24
|
|
23
25
|
|
24
|
-
sig { params(access_token: ::String, claims: ::SpeakeasyClientSDK::Shared::Claims, user: ::SpeakeasyClientSDK::Shared::AccessTokenUser, workspaces: T.nilable(T::Array[::SpeakeasyClientSDK::Shared::Workspaces])).void }
|
25
|
-
def initialize(access_token: nil, claims: nil, user: nil, workspaces: nil)
|
26
|
+
sig { params(access_token: ::String, claims: ::SpeakeasyClientSDK::Shared::Claims, user: ::SpeakeasyClientSDK::Shared::AccessTokenUser, feature_flags: T.nilable(T::Array[::SpeakeasyClientSDK::Shared::FeatureFlag]), workspaces: T.nilable(T::Array[::SpeakeasyClientSDK::Shared::Workspaces])).void }
|
27
|
+
def initialize(access_token: nil, claims: nil, user: nil, feature_flags: nil, workspaces: nil)
|
26
28
|
@access_token = access_token
|
27
29
|
@claims = claims
|
28
30
|
@user = user
|
31
|
+
@feature_flags = feature_flags
|
29
32
|
@workspaces = workspaces
|
30
33
|
end
|
31
34
|
end
|
@@ -14,24 +14,27 @@ module SpeakeasyClientSDK
|
|
14
14
|
|
15
15
|
field :account_type, ::SpeakeasyClientSDK::Shared::AccountType, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('account_type'), 'decoder': Utils.enum_from_string(::SpeakeasyClientSDK::Shared::AccountType, false) } }
|
16
16
|
|
17
|
-
field :enabled_features, T::Array[::
|
17
|
+
field :enabled_features, T::Array[::SpeakeasyClientSDK::Shared::FeatureFlag], { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('enabled_features') } }
|
18
18
|
|
19
19
|
field :org_slug, ::String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('org_slug') } }
|
20
20
|
|
21
21
|
field :workspace_id, ::String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('workspace_id') } }
|
22
22
|
|
23
23
|
field :workspace_slug, ::String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('workspace_slug') } }
|
24
|
+
# @deprecated true: This will be removed in a future release, please migrate away from it as soon as possible.
|
25
|
+
field :feature_flags, T.nilable(T::Array[::String]), { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('feature_flags') } }
|
24
26
|
|
25
27
|
field :generation_access_unlimited, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('generation_access_unlimited') } }
|
26
28
|
|
27
29
|
|
28
|
-
sig { params(account_type: ::SpeakeasyClientSDK::Shared::AccountType, enabled_features: T::Array[::
|
29
|
-
def initialize(account_type: nil, enabled_features: nil, org_slug: nil, workspace_id: nil, workspace_slug: nil, generation_access_unlimited: nil)
|
30
|
+
sig { params(account_type: ::SpeakeasyClientSDK::Shared::AccountType, enabled_features: T::Array[::SpeakeasyClientSDK::Shared::FeatureFlag], org_slug: ::String, workspace_id: ::String, workspace_slug: ::String, feature_flags: T.nilable(T::Array[::String]), generation_access_unlimited: T.nilable(T::Boolean)).void }
|
31
|
+
def initialize(account_type: nil, enabled_features: nil, org_slug: nil, workspace_id: nil, workspace_slug: nil, feature_flags: nil, generation_access_unlimited: nil)
|
30
32
|
@account_type = account_type
|
31
33
|
@enabled_features = enabled_features
|
32
34
|
@org_slug = org_slug
|
33
35
|
@workspace_id = workspace_id
|
34
36
|
@workspace_slug = workspace_slug
|
37
|
+
@feature_flags = feature_flags
|
35
38
|
@generation_access_unlimited = generation_access_unlimited
|
36
39
|
end
|
37
40
|
end
|
@@ -0,0 +1,27 @@
|
|
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 feature flag is a key-value pair that can be used to enable or disable features.
|
11
|
+
class FeatureFlag < ::SpeakeasyClientSDK::Utils::FieldAugmented
|
12
|
+
extend T::Sig
|
13
|
+
|
14
|
+
|
15
|
+
field :feature_flag, ::String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('feature_flag') } }
|
16
|
+
|
17
|
+
field :trial_ends_at, T.nilable(::DateTime), { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('trial_ends_at'), 'decoder': Utils.datetime_from_iso_format(true) } }
|
18
|
+
|
19
|
+
|
20
|
+
sig { params(feature_flag: ::String, trial_ends_at: T.nilable(::DateTime)).void }
|
21
|
+
def initialize(feature_flag: nil, trial_ends_at: nil)
|
22
|
+
@feature_flag = feature_flag
|
23
|
+
@trial_ends_at = trial_ends_at
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,27 @@
|
|
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 request to configure a GitHub target
|
11
|
+
class GithubConfigureTargetRequest < ::SpeakeasyClientSDK::Utils::FieldAugmented
|
12
|
+
extend T::Sig
|
13
|
+
|
14
|
+
# The GitHub organization name
|
15
|
+
field :org, ::String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('org') } }
|
16
|
+
# The GitHub repository name
|
17
|
+
field :repo_name, ::String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('repo_name') } }
|
18
|
+
|
19
|
+
|
20
|
+
sig { params(org: ::String, repo_name: ::String).void }
|
21
|
+
def initialize(org: nil, repo_name: nil)
|
22
|
+
@org = org
|
23
|
+
@repo_name = repo_name
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -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
|
+
# A request to trigger an action on a GitHub target
|
11
|
+
class GithubTriggerActionRequest < ::SpeakeasyClientSDK::Utils::FieldAugmented
|
12
|
+
extend T::Sig
|
13
|
+
|
14
|
+
# The generation lock ID
|
15
|
+
field :gen_lock_id, ::String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('gen_lock_id') } }
|
16
|
+
# The GitHub organization name
|
17
|
+
field :org, ::String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('org') } }
|
18
|
+
# The GitHub repository name
|
19
|
+
field :repo_name, ::String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('repo_name') } }
|
20
|
+
# The target name for the action
|
21
|
+
field :target_name, T.nilable(::String), { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('target_name') } }
|
22
|
+
|
23
|
+
|
24
|
+
sig { params(gen_lock_id: ::String, org: ::String, repo_name: ::String, target_name: T.nilable(::String)).void }
|
25
|
+
def initialize(gen_lock_id: nil, org: nil, repo_name: nil, target_name: nil)
|
26
|
+
@gen_lock_id = gen_lock_id
|
27
|
+
@org = org
|
28
|
+
@repo_name = repo_name
|
29
|
+
@target_name = target_name
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,42 @@
|
|
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 OrganizationUsage < ::SpeakeasyClientSDK::Utils::FieldAugmented
|
12
|
+
extend T::Sig
|
13
|
+
|
14
|
+
# Indicates if the features are accessible
|
15
|
+
field :accessible, T::Boolean, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('accessible') } }
|
16
|
+
# Features that are accessible
|
17
|
+
field :accessible_features, T::Array[::String], { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('accessible_features') } }
|
18
|
+
# List of generation lock IDs
|
19
|
+
field :gen_lock_ids, T::Array[::String], { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('gen_lock_ids') } }
|
20
|
+
# The programming language used
|
21
|
+
field :language, ::String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('language') } }
|
22
|
+
# Number of operations performed
|
23
|
+
field :number_of_operations, ::Integer, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('number_of_operations') } }
|
24
|
+
# Features that have been used
|
25
|
+
field :used_features, T::Array[::String], { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('used_features') } }
|
26
|
+
# List of workspace IDs
|
27
|
+
field :workspaces, T::Array[::String], { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('workspaces') } }
|
28
|
+
|
29
|
+
|
30
|
+
sig { params(accessible: T::Boolean, accessible_features: T::Array[::String], gen_lock_ids: T::Array[::String], language: ::String, number_of_operations: ::Integer, used_features: T::Array[::String], workspaces: T::Array[::String]).void }
|
31
|
+
def initialize(accessible: nil, accessible_features: nil, gen_lock_ids: nil, language: nil, number_of_operations: nil, used_features: nil, workspaces: nil)
|
32
|
+
@accessible = accessible
|
33
|
+
@accessible_features = accessible_features
|
34
|
+
@gen_lock_ids = gen_lock_ids
|
35
|
+
@language = language
|
36
|
+
@number_of_operations = number_of_operations
|
37
|
+
@used_features = used_features
|
38
|
+
@workspaces = workspaces
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -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
|
+
# A billing summary of organization usage
|
11
|
+
class OrganizationUsageResponse < ::SpeakeasyClientSDK::Utils::FieldAugmented
|
12
|
+
extend T::Sig
|
13
|
+
|
14
|
+
# List of allowed languages
|
15
|
+
field :allowed_languages, T::Array[::String], { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('allowed_languages') } }
|
16
|
+
# Total number of allowed languages, -1 if unlimited
|
17
|
+
field :total_allowed_languages, ::Integer, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('total_allowed_languages') } }
|
18
|
+
|
19
|
+
field :usage, T::Array[::SpeakeasyClientSDK::Shared::OrganizationUsage], { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('usage') } }
|
20
|
+
# Expiry date of the free trial, will be null if no trial
|
21
|
+
field :free_trial_expiry, T.nilable(::DateTime), { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('free_trial_expiry'), 'decoder': Utils.datetime_from_iso_format(true) } }
|
22
|
+
|
23
|
+
|
24
|
+
sig { params(allowed_languages: T::Array[::String], total_allowed_languages: ::Integer, usage: T::Array[::SpeakeasyClientSDK::Shared::OrganizationUsage], free_trial_expiry: T.nilable(::DateTime)).void }
|
25
|
+
def initialize(allowed_languages: nil, total_allowed_languages: nil, usage: nil, free_trial_expiry: nil)
|
26
|
+
@allowed_languages = allowed_languages
|
27
|
+
@total_allowed_languages = total_allowed_languages
|
28
|
+
@usage = usage
|
29
|
+
@free_trial_expiry = free_trial_expiry
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -33,6 +33,7 @@ module SpeakeasyClientSDK
|
|
33
33
|
autoload :AccessTokenAccountType, 'speakeasy_client_sdk/models/shared/accesstoken_account_type.rb'
|
34
34
|
autoload :Workspaces, 'speakeasy_client_sdk/models/shared/workspaces.rb'
|
35
35
|
autoload :AccessToken, 'speakeasy_client_sdk/models/shared/accesstoken.rb'
|
36
|
+
autoload :FeatureFlag, 'speakeasy_client_sdk/models/shared/featureflag.rb'
|
36
37
|
autoload :User, 'speakeasy_client_sdk/models/shared/user.rb'
|
37
38
|
autoload :Level, 'speakeasy_client_sdk/models/shared/level.rb'
|
38
39
|
autoload :AccessDetails, 'speakeasy_client_sdk/models/shared/accessdetails.rb'
|
@@ -43,6 +44,10 @@ module SpeakeasyClientSDK
|
|
43
44
|
autoload :RequestMetadata, 'speakeasy_client_sdk/models/shared/requestmetadata.rb'
|
44
45
|
autoload :Filters, 'speakeasy_client_sdk/models/shared/filters.rb'
|
45
46
|
autoload :Filter, 'speakeasy_client_sdk/models/shared/filter.rb'
|
47
|
+
autoload :GithubConfigureTargetRequest, 'speakeasy_client_sdk/models/shared/githubconfiguretargetrequest.rb'
|
48
|
+
autoload :GithubTriggerActionRequest, 'speakeasy_client_sdk/models/shared/githubtriggeractionrequest.rb'
|
49
|
+
autoload :OrganizationUsageResponse, 'speakeasy_client_sdk/models/shared/organizationusageresponse.rb'
|
50
|
+
autoload :OrganizationUsage, 'speakeasy_client_sdk/models/shared/organizationusage.rb'
|
46
51
|
autoload :OrganizationAccountType, 'speakeasy_client_sdk/models/shared/organization_account_type.rb'
|
47
52
|
autoload :Organization, 'speakeasy_client_sdk/models/shared/organization.rb'
|
48
53
|
autoload :Type, 'speakeasy_client_sdk/models/shared/type.rb'
|
@@ -19,6 +19,43 @@ module SpeakeasyClientSDK
|
|
19
19
|
end
|
20
20
|
|
21
21
|
|
22
|
+
sig { returns(::SpeakeasyClientSDK::Operations::GetOrganizationUsageResponse) }
|
23
|
+
def get_organization_usage
|
24
|
+
# get_organization_usage - Get billing usage summary for a particular organization
|
25
|
+
# Returns a billing usage summary by target languages for a particular organization
|
26
|
+
url, params = @sdk_configuration.get_server_details
|
27
|
+
base_url = Utils.template_url(url, params)
|
28
|
+
url = "#{base_url}/v1/organization/usage"
|
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::GetOrganizationUsageResponse.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::OrganizationUsageResponse)
|
46
|
+
res.organization_usage_response = 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 { returns(::SpeakeasyClientSDK::Operations::GetOrganizationsResponse) }
|
23
60
|
def get_organizations
|
24
61
|
# get_organizations - Get organizations for a user
|
@@ -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, :artifacts, :auth, :requests, :organizations, :reports, :embeds, :events
|
16
|
+
attr_accessor :apis, :api_endpoints, :metadata, :schemas, :artifacts, :auth, :requests, :github, :organizations, :reports, :embeds, :events
|
17
17
|
|
18
18
|
sig do
|
19
19
|
params(client: Faraday::Request,
|
@@ -96,6 +96,7 @@ module SpeakeasyClientSDK
|
|
96
96
|
@artifacts = Artifacts.new(@sdk_configuration)
|
97
97
|
@auth = Auth.new(@sdk_configuration)
|
98
98
|
@requests = Requests.new(@sdk_configuration)
|
99
|
+
@github = Github.new(@sdk_configuration)
|
99
100
|
@organizations = Organizations.new(@sdk_configuration)
|
100
101
|
@reports = Reports.new(@sdk_configuration)
|
101
102
|
@embeds = Embeds.new(@sdk_configuration)
|
@@ -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.1
|
45
|
-
@gen_version = '2.
|
46
|
-
@user_agent = 'speakeasy-sdk/ruby 4.1
|
44
|
+
@sdk_version = '4.2.1'
|
45
|
+
@gen_version = '2.333.3'
|
46
|
+
@user_agent = 'speakeasy-sdk/ruby 4.2.1 2.333.3 0.4.0 . speakeasy_client_sdk_ruby'
|
47
47
|
end
|
48
48
|
|
49
49
|
sig { returns([String, T::Hash[Symbol, String]]) }
|
@@ -14,6 +14,7 @@ module SpeakeasyClientSDK
|
|
14
14
|
autoload :Artifacts, 'speakeasy_client_sdk/artifacts'
|
15
15
|
autoload :Auth, 'speakeasy_client_sdk/auth'
|
16
16
|
autoload :Requests, 'speakeasy_client_sdk/requests'
|
17
|
+
autoload :Github, 'speakeasy_client_sdk/github'
|
17
18
|
autoload :Organizations, 'speakeasy_client_sdk/organizations'
|
18
19
|
autoload :Reports, 'speakeasy_client_sdk/reports'
|
19
20
|
autoload :Embeds, 'speakeasy_client_sdk/embeds'
|
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.1
|
4
|
+
version: 4.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Speakeasy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-05-
|
11
|
+
date: 2024-05-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -148,6 +148,7 @@ files:
|
|
148
148
|
- lib/speakeasy_client_sdk/auth.rb
|
149
149
|
- lib/speakeasy_client_sdk/embeds.rb
|
150
150
|
- lib/speakeasy_client_sdk/events.rb
|
151
|
+
- lib/speakeasy_client_sdk/github.rb
|
151
152
|
- lib/speakeasy_client_sdk/metadata.rb
|
152
153
|
- lib/speakeasy_client_sdk/models/operations.rb
|
153
154
|
- lib/speakeasy_client_sdk/models/operations/deleteapi_request.rb
|
@@ -201,6 +202,7 @@ files:
|
|
201
202
|
- lib/speakeasy_client_sdk/models/operations/getmanifest_response.rb
|
202
203
|
- lib/speakeasy_client_sdk/models/operations/getnamespaces_response.rb
|
203
204
|
- lib/speakeasy_client_sdk/models/operations/getorganizations_response.rb
|
205
|
+
- lib/speakeasy_client_sdk/models/operations/getorganizationusage_response.rb
|
204
206
|
- lib/speakeasy_client_sdk/models/operations/getrequestfromeventlog_request.rb
|
205
207
|
- lib/speakeasy_client_sdk/models/operations/getrequestfromeventlog_response.rb
|
206
208
|
- lib/speakeasy_client_sdk/models/operations/getrevisions_request.rb
|
@@ -225,6 +227,10 @@ files:
|
|
225
227
|
- lib/speakeasy_client_sdk/models/operations/getworkspaceeventsbytarget_response.rb
|
226
228
|
- lib/speakeasy_client_sdk/models/operations/getworkspacetargets_request.rb
|
227
229
|
- lib/speakeasy_client_sdk/models/operations/getworkspacetargets_response.rb
|
230
|
+
- lib/speakeasy_client_sdk/models/operations/githubcheckaccess_request.rb
|
231
|
+
- lib/speakeasy_client_sdk/models/operations/githubcheckaccess_response.rb
|
232
|
+
- lib/speakeasy_client_sdk/models/operations/githubconfiguretarget_response.rb
|
233
|
+
- lib/speakeasy_client_sdk/models/operations/githubtriggeraction_response.rb
|
228
234
|
- lib/speakeasy_client_sdk/models/operations/insertversionmetadata_request.rb
|
229
235
|
- lib/speakeasy_client_sdk/models/operations/insertversionmetadata_response.rb
|
230
236
|
- lib/speakeasy_client_sdk/models/operations/op.rb
|
@@ -271,6 +277,7 @@ files:
|
|
271
277
|
- lib/speakeasy_client_sdk/models/shared/embedaccesstokenresponse.rb
|
272
278
|
- lib/speakeasy_client_sdk/models/shared/embedtoken.rb
|
273
279
|
- lib/speakeasy_client_sdk/models/shared/error.rb
|
280
|
+
- lib/speakeasy_client_sdk/models/shared/featureflag.rb
|
274
281
|
- lib/speakeasy_client_sdk/models/shared/filter.rb
|
275
282
|
- lib/speakeasy_client_sdk/models/shared/filters.rb
|
276
283
|
- lib/speakeasy_client_sdk/models/shared/generate_bump_type.rb
|
@@ -278,6 +285,8 @@ files:
|
|
278
285
|
- lib/speakeasy_client_sdk/models/shared/getnamespacesresponse.rb
|
279
286
|
- lib/speakeasy_client_sdk/models/shared/getrevisionsresponse.rb
|
280
287
|
- lib/speakeasy_client_sdk/models/shared/gettagsresponse.rb
|
288
|
+
- lib/speakeasy_client_sdk/models/shared/githubconfiguretargetrequest.rb
|
289
|
+
- lib/speakeasy_client_sdk/models/shared/githubtriggeractionrequest.rb
|
281
290
|
- lib/speakeasy_client_sdk/models/shared/interactiontype.rb
|
282
291
|
- lib/speakeasy_client_sdk/models/shared/level.rb
|
283
292
|
- lib/speakeasy_client_sdk/models/shared/manifest.rb
|
@@ -285,6 +294,8 @@ files:
|
|
285
294
|
- lib/speakeasy_client_sdk/models/shared/openapi_diff_bump_type.rb
|
286
295
|
- lib/speakeasy_client_sdk/models/shared/organization.rb
|
287
296
|
- lib/speakeasy_client_sdk/models/shared/organization_account_type.rb
|
297
|
+
- lib/speakeasy_client_sdk/models/shared/organizationusage.rb
|
298
|
+
- lib/speakeasy_client_sdk/models/shared/organizationusageresponse.rb
|
288
299
|
- lib/speakeasy_client_sdk/models/shared/preflightrequest.rb
|
289
300
|
- lib/speakeasy_client_sdk/models/shared/preflighttoken.rb
|
290
301
|
- lib/speakeasy_client_sdk/models/shared/report.rb
|