speakeasy_client_sdk_ruby 4.2.11 → 4.2.12

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 89c7c8000d5794af235001cf9f3b2d9111c0b05aa8e04c51e88daa00ef76405f
4
- data.tar.gz: 9dfe7e2de2488f1133cbc198cad62674193b8e90406e38b5671f12613a29d249
3
+ metadata.gz: 1825e17728741f231cd73962a4ecb11c1307d574d20721d49c9c2a7b9797dbca
4
+ data.tar.gz: e1f613f89bbea2319228a46d0de69c81139bcf1c891a1394ae207d87d495aac3
5
5
  SHA512:
6
- metadata.gz: 62d6412d3851663acfd1f925434b7292089f5c48d9619dce59a9266fdd6ce8b89fe165e425dde3a5daea7ba971b394e54263b9f81973362f4c823f45c38aab6f
7
- data.tar.gz: c4e33e6d7be04db1687e93d43746ce6c4b3a3f68678c1e2d4a0b551216f08ab579d3e41ac8b60ff5fdec5134c0a8eab1665f198237fc0f17ffa93822e36e1dc4
6
+ metadata.gz: a54b507eff79c95257c2640367692780fedded3ffe118e0885010f36028a85999e78a28ed05ba4c4b2094028fbbf72e8602e0c0ffb478e981711822f85c336dc
7
+ data.tar.gz: 339b71639a82554287fea6c3b4109905bd28db52a9e0c93b5c884d53f454a24a2f519abca143d96385098c285cf8961a5765d53b22db04306555117dc56af24e
@@ -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 CreateRequestBody < ::SpeakeasyClientSDK::Utils::FieldAugmented
12
+ extend T::Sig
13
+
14
+ # URL to shorten
15
+ field :url, ::String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('url') } }
16
+
17
+
18
+ sig { params(url: ::String).void }
19
+ def initialize(url: nil)
20
+ @url = url
21
+ end
22
+ end
23
+ end
24
+ 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 CreateResponse < ::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 :short_url, T.nilable(::SpeakeasyClientSDK::Shared::ShortURL)
22
+
23
+
24
+ sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, short_url: T.nilable(::SpeakeasyClientSDK::Shared::ShortURL)).void }
25
+ def initialize(content_type: nil, raw_response: nil, status_code: nil, short_url: nil)
26
+ @content_type = content_type
27
+ @raw_response = raw_response
28
+ @status_code = status_code
29
+ @short_url = short_url
30
+ end
31
+ end
32
+ end
33
+ end
@@ -111,6 +111,8 @@ module SpeakeasyClientSDK
111
111
  autoload :UploadReportRequestBody, 'speakeasy_client_sdk/models/operations/uploadreport_requestbody.rb'
112
112
  autoload :UploadReportUploadedReport, 'speakeasy_client_sdk/models/operations/uploadreport_uploadedreport.rb'
113
113
  autoload :UploadReportResponse, 'speakeasy_client_sdk/models/operations/uploadreport_response.rb'
114
+ autoload :CreateRequestBody, 'speakeasy_client_sdk/models/operations/create_requestbody.rb'
115
+ autoload :CreateResponse, 'speakeasy_client_sdk/models/operations/create_response.rb'
114
116
  autoload :ApplyOperationIDsRequestBody, 'speakeasy_client_sdk/models/operations/applyoperationids_requestbody.rb'
115
117
  autoload :ApplyOperationIDsRequest, 'speakeasy_client_sdk/models/operations/applyoperationids_request.rb'
116
118
  autoload :ApplyOperationIDsResponse, 'speakeasy_client_sdk/models/operations/applyoperationids_response.rb'
@@ -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
+
11
+ class ShortURL < ::SpeakeasyClientSDK::Utils::FieldAugmented
12
+ extend T::Sig
13
+
14
+
15
+ field :full_url, ::String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('full_url') } }
16
+
17
+ field :short_url, ::String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('short_url') } }
18
+
19
+
20
+ sig { params(full_url: ::String, short_url: ::String).void }
21
+ def initialize(full_url: nil, short_url: nil)
22
+ @full_url = full_url
23
+ @short_url = short_url
24
+ end
25
+ end
26
+ end
27
+ end
@@ -65,6 +65,7 @@ module SpeakeasyClientSDK
65
65
  autoload :Organization, 'speakeasy_client_sdk/models/shared/organization.rb'
66
66
  autoload :Type, 'speakeasy_client_sdk/models/shared/type.rb'
67
67
  autoload :Report, 'speakeasy_client_sdk/models/shared/report.rb'
68
+ autoload :ShortURL, 'speakeasy_client_sdk/models/shared/shorturl.rb'
68
69
  autoload :SuggestedOperationIDs, 'speakeasy_client_sdk/models/shared/suggestedoperationids.rb'
69
70
  autoload :DepthStyle, 'speakeasy_client_sdk/models/shared/depth_style.rb'
70
71
  autoload :Style, 'speakeasy_client_sdk/models/shared/style.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, :suggest, :embeds, :events
16
+ attr_accessor :apis, :api_endpoints, :metadata, :schemas, :artifacts, :auth, :requests, :github, :organizations, :reports, :short_ur_ls, :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
+ @short_ur_ls = ShortURLs.new(@sdk_configuration)
102
103
  @suggest = Suggest.new(@sdk_configuration)
103
104
  @embeds = Embeds.new(@sdk_configuration)
104
105
  @events = Events.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.2.11'
45
- @gen_version = '2.365.0'
46
- @user_agent = 'speakeasy-sdk/ruby 4.2.11 2.365.0 0.4.0 . speakeasy_client_sdk_ruby'
44
+ @sdk_version = '4.2.12'
45
+ @gen_version = '2.366.1'
46
+ @user_agent = 'speakeasy-sdk/ruby 4.2.12 2.366.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,61 @@
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 ShortURLs
13
+ extend T::Sig
14
+ # REST APIs for managing short URLs
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::CreateRequestBody).returns(::SpeakeasyClientSDK::Operations::CreateResponse) }
23
+ def create(request)
24
+ # create - Shorten a URL.
25
+ url, params = @sdk_configuration.get_server_details
26
+ base_url = Utils.template_url(url, params)
27
+ url = "#{base_url}/v1/short_urls"
28
+ headers = {}
29
+ req_content_type, data, form = Utils.serialize_request_body(request, :request, :json)
30
+ headers['content-type'] = req_content_type
31
+ raise StandardError, 'request body is required' if data.nil? && form.nil?
32
+ headers['Accept'] = 'application/json'
33
+ headers['user-agent'] = @sdk_configuration.user_agent
34
+
35
+ r = @sdk_configuration.client.post(url) do |req|
36
+ req.headers = headers
37
+ Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
38
+ if form
39
+ req.body = Utils.encode_form(form)
40
+ elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
41
+ req.body = URI.encode_www_form(data)
42
+ else
43
+ req.body = data
44
+ end
45
+ end
46
+
47
+ content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
48
+
49
+ res = ::SpeakeasyClientSDK::Operations::CreateResponse.new(
50
+ status_code: r.status, content_type: content_type, raw_response: r
51
+ )
52
+ if r.status == 200
53
+ if Utils.match_content_type(content_type, 'application/json')
54
+ out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::ShortURL)
55
+ res.short_url = out
56
+ end
57
+ end
58
+ res
59
+ end
60
+ end
61
+ 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 :ShortURLs, 'speakeasy_client_sdk/shorturls'
20
21
  autoload :Suggest, 'speakeasy_client_sdk/suggest'
21
22
  autoload :Embeds, 'speakeasy_client_sdk/embeds'
22
23
  autoload :Events, 'speakeasy_client_sdk/events'
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.11
4
+ version: 4.2.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Speakeasy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-07-11 00:00:00.000000000 Z
11
+ date: 2024-07-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -159,6 +159,8 @@ files:
159
159
  - lib/speakeasy_client_sdk/models/operations/configurecodesamples_response.rb
160
160
  - lib/speakeasy_client_sdk/models/operations/configuremintlifyrepo_response.rb
161
161
  - lib/speakeasy_client_sdk/models/operations/configuretarget_response.rb
162
+ - lib/speakeasy_client_sdk/models/operations/create_requestbody.rb
163
+ - lib/speakeasy_client_sdk/models/operations/create_response.rb
162
164
  - lib/speakeasy_client_sdk/models/operations/createfreetrial_response.rb
163
165
  - lib/speakeasy_client_sdk/models/operations/deleteapi_request.rb
164
166
  - lib/speakeasy_client_sdk/models/operations/deleteapi_response.rb
@@ -338,6 +340,7 @@ files:
338
340
  - lib/speakeasy_client_sdk/models/shared/schema.rb
339
341
  - lib/speakeasy_client_sdk/models/shared/schemadiff.rb
340
342
  - lib/speakeasy_client_sdk/models/shared/security.rb
343
+ - lib/speakeasy_client_sdk/models/shared/shorturl.rb
341
344
  - lib/speakeasy_client_sdk/models/shared/style.rb
342
345
  - lib/speakeasy_client_sdk/models/shared/suggestedoperationids.rb
343
346
  - lib/speakeasy_client_sdk/models/shared/suggestoperationidsopts.rb
@@ -358,6 +361,7 @@ files:
358
361
  - lib/speakeasy_client_sdk/schemas.rb
359
362
  - lib/speakeasy_client_sdk/sdk.rb
360
363
  - lib/speakeasy_client_sdk/sdkconfiguration.rb
364
+ - lib/speakeasy_client_sdk/shorturls.rb
361
365
  - lib/speakeasy_client_sdk/suggest.rb
362
366
  - lib/speakeasy_client_sdk/utils/metadata_fields.rb
363
367
  - lib/speakeasy_client_sdk/utils/t.rb