speakeasy_client_sdk_ruby 4.2.3 → 4.2.4
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/models/operations/depth_style.rb +21 -0
- data/lib/speakeasy_client_sdk/models/operations/opts.rb +27 -0
- data/lib/speakeasy_client_sdk/models/operations/schema.rb +27 -0
- data/lib/speakeasy_client_sdk/models/operations/style.rb +19 -0
- data/lib/speakeasy_client_sdk/models/operations/suggestoperationids_requestbody.rb +27 -0
- data/lib/speakeasy_client_sdk/models/operations/suggestoperationids_response.rb +33 -0
- data/lib/speakeasy_client_sdk/models/operations/suggestoperationids_suggestion.rb +24 -0
- data/lib/speakeasy_client_sdk/models/operations.rb +7 -0
- data/lib/speakeasy_client_sdk/sdk.rb +2 -1
- data/lib/speakeasy_client_sdk/sdkconfiguration.rb +3 -3
- data/lib/speakeasy_client_sdk/suggest.rb +62 -0
- data/lib/speakeasy_client_sdk_ruby.rb +1 -0
- metadata +10 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 86f8c67af0eb5a6aaef1306fedd444024a258e5e29e734549cd6206782f87403
|
4
|
+
data.tar.gz: f025dbf075db443117f9a16167969374c0edd7612c26d2ac1011f9c9b8765bac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bbfdb50ad95d74174af4e0d22912599c1a9a0642a197656443c8fcd48c98e584dc0078e8e092f603c943f12b4c7b4a9b60f834f4765a498a0b1b35b93673231e
|
7
|
+
data.tar.gz: ed09b7d6524fcc180ccb1e5f9f4ec6127955d4f309af138a541aef2baafdfaf6351193b0a847cd4e39b9e91c66a8b5fa8dee1c64287e22166219f099c61b0c59
|
@@ -0,0 +1,21 @@
|
|
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 DepthStyle < T::Enum
|
12
|
+
enums do
|
13
|
+
ORIGINAL = new('original')
|
14
|
+
FLAT = new('flat')
|
15
|
+
NESTED = new('nested')
|
16
|
+
DEEP = new('deep')
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
21
|
+
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 Opts < ::SpeakeasyClientSDK::Utils::FieldAugmented
|
12
|
+
extend T::Sig
|
13
|
+
|
14
|
+
|
15
|
+
field :depth_style, T.nilable(::SpeakeasyClientSDK::Operations::DepthStyle), { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('depth_style'), 'decoder': Utils.enum_from_string(::SpeakeasyClientSDK::Operations::DepthStyle, true) } }
|
16
|
+
|
17
|
+
field :style, T.nilable(::SpeakeasyClientSDK::Operations::Style), { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('style'), 'decoder': Utils.enum_from_string(::SpeakeasyClientSDK::Operations::Style, true) } }
|
18
|
+
|
19
|
+
|
20
|
+
sig { params(depth_style: T.nilable(::SpeakeasyClientSDK::Operations::DepthStyle), style: T.nilable(::SpeakeasyClientSDK::Operations::Style)).void }
|
21
|
+
def initialize(depth_style: nil, style: nil)
|
22
|
+
@depth_style = depth_style
|
23
|
+
@style = style
|
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 Operations
|
9
|
+
|
10
|
+
|
11
|
+
class Schema < ::SpeakeasyClientSDK::Utils::FieldAugmented
|
12
|
+
extend T::Sig
|
13
|
+
|
14
|
+
|
15
|
+
field :content, ::String, { 'multipart_form': { 'content': true } }
|
16
|
+
|
17
|
+
field :file_name, ::String, { 'multipart_form': { 'field_name': 'schema' } }
|
18
|
+
|
19
|
+
|
20
|
+
sig { params(content: ::String, file_name: ::String).void }
|
21
|
+
def initialize(content: nil, file_name: nil)
|
22
|
+
@content = content
|
23
|
+
@file_name = file_name
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,19 @@
|
|
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 Style < T::Enum
|
12
|
+
enums do
|
13
|
+
STANDARDIZE = new('standardize')
|
14
|
+
RESOURCE = new('resource')
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
19
|
+
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
|
+
# The schema file to upload provided as a multipart/form-data file segment.
|
11
|
+
class SuggestOperationIDsRequestBody < ::SpeakeasyClientSDK::Utils::FieldAugmented
|
12
|
+
extend T::Sig
|
13
|
+
|
14
|
+
|
15
|
+
field :schema, ::SpeakeasyClientSDK::Operations::Schema, { 'multipart_form': { 'file': true } }
|
16
|
+
|
17
|
+
field :opts, T.nilable(::SpeakeasyClientSDK::Operations::Opts), { 'multipart_form': { 'field_name': 'opts', 'json': true } }
|
18
|
+
|
19
|
+
|
20
|
+
sig { params(schema: ::SpeakeasyClientSDK::Operations::Schema, opts: T.nilable(::SpeakeasyClientSDK::Operations::Opts)).void }
|
21
|
+
def initialize(schema: nil, opts: nil)
|
22
|
+
@schema = schema
|
23
|
+
@opts = opts
|
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 SuggestOperationIDsResponse < ::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 :suggestion, T.nilable(::SpeakeasyClientSDK::Operations::SuggestOperationIDsSuggestion)
|
22
|
+
|
23
|
+
|
24
|
+
sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, suggestion: T.nilable(::SpeakeasyClientSDK::Operations::SuggestOperationIDsSuggestion)).void }
|
25
|
+
def initialize(content_type: nil, raw_response: nil, status_code: nil, suggestion: nil)
|
26
|
+
@content_type = content_type
|
27
|
+
@raw_response = raw_response
|
28
|
+
@status_code = status_code
|
29
|
+
@suggestion = suggestion
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -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
|
+
# OK
|
11
|
+
class SuggestOperationIDsSuggestion < ::SpeakeasyClientSDK::Utils::FieldAugmented
|
12
|
+
extend T::Sig
|
13
|
+
|
14
|
+
|
15
|
+
field :operation_ids, T::Hash[Symbol, T::Array[::String]], { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('operation_ids') } }
|
16
|
+
|
17
|
+
|
18
|
+
sig { params(operation_ids: T::Hash[Symbol, T::Array[::String]]).void }
|
19
|
+
def initialize(operation_ids: nil)
|
20
|
+
@operation_ids = operation_ids
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -100,6 +100,13 @@ module SpeakeasyClientSDK
|
|
100
100
|
autoload :UploadReportRequestBody, 'speakeasy_client_sdk/models/operations/uploadreport_requestbody.rb'
|
101
101
|
autoload :UploadReportUploadedReport, 'speakeasy_client_sdk/models/operations/uploadreport_uploadedreport.rb'
|
102
102
|
autoload :UploadReportResponse, 'speakeasy_client_sdk/models/operations/uploadreport_response.rb'
|
103
|
+
autoload :DepthStyle, 'speakeasy_client_sdk/models/operations/depth_style.rb'
|
104
|
+
autoload :Style, 'speakeasy_client_sdk/models/operations/style.rb'
|
105
|
+
autoload :Opts, 'speakeasy_client_sdk/models/operations/opts.rb'
|
106
|
+
autoload :Schema, 'speakeasy_client_sdk/models/operations/schema.rb'
|
107
|
+
autoload :SuggestOperationIDsRequestBody, 'speakeasy_client_sdk/models/operations/suggestoperationids_requestbody.rb'
|
108
|
+
autoload :SuggestOperationIDsSuggestion, 'speakeasy_client_sdk/models/operations/suggestoperationids_suggestion.rb'
|
109
|
+
autoload :SuggestOperationIDsResponse, 'speakeasy_client_sdk/models/operations/suggestoperationids_response.rb'
|
103
110
|
autoload :GetEmbedAccessTokenRequest, 'speakeasy_client_sdk/models/operations/getembedaccesstoken_request.rb'
|
104
111
|
autoload :GetEmbedAccessTokenResponse, 'speakeasy_client_sdk/models/operations/getembedaccesstoken_response.rb'
|
105
112
|
autoload :GetValidEmbedAccessTokensResponse, 'speakeasy_client_sdk/models/operations/getvalidembedaccesstokens_response.rb'
|
@@ -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, :github, :organizations, :reports, :embeds, :events
|
16
|
+
attr_accessor :apis, :api_endpoints, :metadata, :schemas, :artifacts, :auth, :requests, :github, :organizations, :reports, :suggest, :embeds, :events
|
17
17
|
|
18
18
|
sig do
|
19
19
|
params(client: Faraday::Request,
|
@@ -99,6 +99,7 @@ module SpeakeasyClientSDK
|
|
99
99
|
@github = Github.new(@sdk_configuration)
|
100
100
|
@organizations = Organizations.new(@sdk_configuration)
|
101
101
|
@reports = Reports.new(@sdk_configuration)
|
102
|
+
@suggest = Suggest.new(@sdk_configuration)
|
102
103
|
@embeds = Embeds.new(@sdk_configuration)
|
103
104
|
@events = Events.new(@sdk_configuration)
|
104
105
|
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.2.
|
45
|
-
@gen_version = '2.
|
46
|
-
@user_agent = 'speakeasy-sdk/ruby 4.2.
|
44
|
+
@sdk_version = '4.2.4'
|
45
|
+
@gen_version = '2.338.1'
|
46
|
+
@user_agent = 'speakeasy-sdk/ruby 4.2.4 2.338.1 0.4.0 . speakeasy_client_sdk_ruby'
|
47
47
|
end
|
48
48
|
|
49
49
|
sig { returns([String, T::Hash[Symbol, String]]) }
|
@@ -0,0 +1,62 @@
|
|
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 Suggest
|
13
|
+
extend T::Sig
|
14
|
+
# REST APIs for managing LLM OAS suggestions
|
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: ::SpeakeasyClientSDK::Operations::SuggestOperationIDsRequestBody).returns(::SpeakeasyClientSDK::Operations::SuggestOperationIDsResponse) }
|
23
|
+
def suggest_operation_i_ds(request)
|
24
|
+
# suggest_operation_i_ds - Generate operation ID suggestions.
|
25
|
+
# Get suggestions from an LLM model for improving the operationIDs in the provided schema.
|
26
|
+
url, params = @sdk_configuration.get_server_details
|
27
|
+
base_url = Utils.template_url(url, params)
|
28
|
+
url = "#{base_url}/v1/suggest/operation_ids"
|
29
|
+
headers = {}
|
30
|
+
req_content_type, data, form = Utils.serialize_request_body(request, :request, :multipart)
|
31
|
+
headers['content-type'] = req_content_type
|
32
|
+
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
33
|
+
headers['Accept'] = 'application/json'
|
34
|
+
headers['user-agent'] = @sdk_configuration.user_agent
|
35
|
+
|
36
|
+
r = @sdk_configuration.client.post(url) do |req|
|
37
|
+
req.headers = headers
|
38
|
+
Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
|
39
|
+
if form
|
40
|
+
req.body = Utils.encode_form(form)
|
41
|
+
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
42
|
+
req.body = URI.encode_www_form(data)
|
43
|
+
else
|
44
|
+
req.body = data
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
49
|
+
|
50
|
+
res = ::SpeakeasyClientSDK::Operations::SuggestOperationIDsResponse.new(
|
51
|
+
status_code: r.status, content_type: content_type, raw_response: r
|
52
|
+
)
|
53
|
+
if r.status == 200
|
54
|
+
if Utils.match_content_type(content_type, 'application/json')
|
55
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Operations::SuggestOperationIDsSuggestion)
|
56
|
+
res.suggestion = out
|
57
|
+
end
|
58
|
+
end
|
59
|
+
res
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
@@ -17,6 +17,7 @@ module SpeakeasyClientSDK
|
|
17
17
|
autoload :Github, 'speakeasy_client_sdk/github'
|
18
18
|
autoload :Organizations, 'speakeasy_client_sdk/organizations'
|
19
19
|
autoload :Reports, 'speakeasy_client_sdk/reports'
|
20
|
+
autoload :Suggest, 'speakeasy_client_sdk/suggest'
|
20
21
|
autoload :Embeds, 'speakeasy_client_sdk/embeds'
|
21
22
|
autoload :Events, 'speakeasy_client_sdk/events'
|
22
23
|
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.2.
|
4
|
+
version: 4.2.4
|
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-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -160,6 +160,7 @@ files:
|
|
160
160
|
- lib/speakeasy_client_sdk/models/operations/deleteschema_response.rb
|
161
161
|
- lib/speakeasy_client_sdk/models/operations/deleteversionmetadata_request.rb
|
162
162
|
- lib/speakeasy_client_sdk/models/operations/deleteversionmetadata_response.rb
|
163
|
+
- lib/speakeasy_client_sdk/models/operations/depth_style.rb
|
163
164
|
- lib/speakeasy_client_sdk/models/operations/downloadschema_request.rb
|
164
165
|
- lib/speakeasy_client_sdk/models/operations/downloadschema_response.rb
|
165
166
|
- lib/speakeasy_client_sdk/models/operations/downloadschemarevision_request.rb
|
@@ -235,6 +236,7 @@ files:
|
|
235
236
|
- lib/speakeasy_client_sdk/models/operations/insertversionmetadata_request.rb
|
236
237
|
- lib/speakeasy_client_sdk/models/operations/insertversionmetadata_response.rb
|
237
238
|
- lib/speakeasy_client_sdk/models/operations/op.rb
|
239
|
+
- lib/speakeasy_client_sdk/models/operations/opts.rb
|
238
240
|
- lib/speakeasy_client_sdk/models/operations/posttags_request.rb
|
239
241
|
- lib/speakeasy_client_sdk/models/operations/posttags_response.rb
|
240
242
|
- lib/speakeasy_client_sdk/models/operations/postworkspaceevents_request.rb
|
@@ -249,8 +251,13 @@ files:
|
|
249
251
|
- lib/speakeasy_client_sdk/models/operations/registerschema_response.rb
|
250
252
|
- lib/speakeasy_client_sdk/models/operations/revokeembedaccesstoken_request.rb
|
251
253
|
- lib/speakeasy_client_sdk/models/operations/revokeembedaccesstoken_response.rb
|
254
|
+
- lib/speakeasy_client_sdk/models/operations/schema.rb
|
252
255
|
- lib/speakeasy_client_sdk/models/operations/searchworkspaceevents_request.rb
|
253
256
|
- lib/speakeasy_client_sdk/models/operations/searchworkspaceevents_response.rb
|
257
|
+
- lib/speakeasy_client_sdk/models/operations/style.rb
|
258
|
+
- lib/speakeasy_client_sdk/models/operations/suggestoperationids_requestbody.rb
|
259
|
+
- lib/speakeasy_client_sdk/models/operations/suggestoperationids_response.rb
|
260
|
+
- lib/speakeasy_client_sdk/models/operations/suggestoperationids_suggestion.rb
|
254
261
|
- lib/speakeasy_client_sdk/models/operations/uploadreport_requestbody.rb
|
255
262
|
- lib/speakeasy_client_sdk/models/operations/uploadreport_response.rb
|
256
263
|
- lib/speakeasy_client_sdk/models/operations/uploadreport_uploadedreport.rb
|
@@ -321,6 +328,7 @@ files:
|
|
321
328
|
- lib/speakeasy_client_sdk/schemas.rb
|
322
329
|
- lib/speakeasy_client_sdk/sdk.rb
|
323
330
|
- lib/speakeasy_client_sdk/sdkconfiguration.rb
|
331
|
+
- lib/speakeasy_client_sdk/suggest.rb
|
324
332
|
- lib/speakeasy_client_sdk/utils/metadata_fields.rb
|
325
333
|
- lib/speakeasy_client_sdk/utils/t.rb
|
326
334
|
- lib/speakeasy_client_sdk/utils/utils.rb
|