speakeasy_client_sdk_ruby 2.2.3 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (148) hide show
  1. checksums.yaml +4 -4
  2. data/lib/{sdk → speakeasy_client_sdk}/apiendpoints.rb +66 -49
  3. data/lib/{sdk → speakeasy_client_sdk}/apis.rb +49 -37
  4. data/lib/speakeasy_client_sdk/auth.rb +57 -0
  5. data/lib/{sdk → speakeasy_client_sdk}/embeds.rb +20 -15
  6. data/lib/speakeasy_client_sdk/events.rb +63 -0
  7. data/lib/{sdk → speakeasy_client_sdk}/metadata.rb +26 -19
  8. data/lib/speakeasy_client_sdk/models/operations/deleteapi_request.rb +27 -0
  9. data/lib/speakeasy_client_sdk/models/operations/deleteapi_response.rb +33 -0
  10. data/lib/speakeasy_client_sdk/models/operations/deleteapiendpoint_request.rb +30 -0
  11. data/lib/speakeasy_client_sdk/models/operations/deleteapiendpoint_response.rb +33 -0
  12. data/lib/speakeasy_client_sdk/models/operations/deleteschema_request.rb +30 -0
  13. data/lib/speakeasy_client_sdk/models/operations/deleteschema_response.rb +33 -0
  14. data/lib/speakeasy_client_sdk/models/operations/deleteversionmetadata_request.rb +33 -0
  15. data/lib/speakeasy_client_sdk/models/operations/deleteversionmetadata_response.rb +33 -0
  16. data/lib/speakeasy_client_sdk/models/operations/downloadschema_request.rb +27 -0
  17. data/lib/speakeasy_client_sdk/models/operations/downloadschema_response.rb +39 -0
  18. data/lib/speakeasy_client_sdk/models/operations/downloadschemarevision_request.rb +30 -0
  19. data/lib/speakeasy_client_sdk/models/operations/downloadschemarevision_response.rb +39 -0
  20. data/lib/speakeasy_client_sdk/models/operations/file.rb +27 -0
  21. data/lib/speakeasy_client_sdk/models/operations/findapiendpoint_request.rb +30 -0
  22. data/lib/speakeasy_client_sdk/models/operations/findapiendpoint_response.rb +36 -0
  23. data/lib/speakeasy_client_sdk/models/operations/generateopenapispec_request.rb +27 -0
  24. data/lib/speakeasy_client_sdk/models/operations/generateopenapispec_response.rb +36 -0
  25. data/lib/speakeasy_client_sdk/models/operations/generateopenapispecforapiendpoint_request.rb +30 -0
  26. data/lib/speakeasy_client_sdk/models/operations/generateopenapispecforapiendpoint_response.rb +36 -0
  27. data/lib/speakeasy_client_sdk/models/operations/generatepostmancollection_request.rb +27 -0
  28. data/lib/speakeasy_client_sdk/models/operations/generatepostmancollection_response.rb +36 -0
  29. data/lib/speakeasy_client_sdk/models/operations/generatepostmancollectionforapiendpoint_request.rb +30 -0
  30. data/lib/speakeasy_client_sdk/models/operations/generatepostmancollectionforapiendpoint_response.rb +36 -0
  31. data/lib/speakeasy_client_sdk/models/operations/generaterequestpostmancollection_request.rb +24 -0
  32. data/lib/speakeasy_client_sdk/models/operations/generaterequestpostmancollection_response.rb +36 -0
  33. data/lib/speakeasy_client_sdk/models/operations/getallapiendpoints_request.rb +24 -0
  34. data/lib/speakeasy_client_sdk/models/operations/getallapiendpoints_response.rb +36 -0
  35. data/lib/speakeasy_client_sdk/models/operations/getallapiversions_request.rb +30 -0
  36. data/lib/speakeasy_client_sdk/models/operations/getallapiversions_response.rb +36 -0
  37. data/lib/speakeasy_client_sdk/models/operations/getallforversionapiendpoints_request.rb +27 -0
  38. data/lib/speakeasy_client_sdk/models/operations/getallforversionapiendpoints_response.rb +36 -0
  39. data/lib/speakeasy_client_sdk/models/operations/getapiendpoint_request.rb +30 -0
  40. data/lib/speakeasy_client_sdk/models/operations/getapiendpoint_response.rb +36 -0
  41. data/lib/speakeasy_client_sdk/models/operations/getapis_request.rb +27 -0
  42. data/lib/speakeasy_client_sdk/models/operations/getapis_response.rb +36 -0
  43. data/lib/speakeasy_client_sdk/models/operations/getembedaccesstoken_request.rb +30 -0
  44. data/lib/speakeasy_client_sdk/models/operations/getembedaccesstoken_response.rb +36 -0
  45. data/lib/speakeasy_client_sdk/models/operations/getrequestfromeventlog_request.rb +24 -0
  46. data/lib/speakeasy_client_sdk/models/operations/getrequestfromeventlog_response.rb +36 -0
  47. data/lib/speakeasy_client_sdk/models/operations/getschema_request.rb +27 -0
  48. data/lib/speakeasy_client_sdk/models/operations/getschema_response.rb +36 -0
  49. data/lib/speakeasy_client_sdk/models/operations/getschemadiff_request.rb +33 -0
  50. data/lib/speakeasy_client_sdk/models/operations/getschemadiff_response.rb +36 -0
  51. data/lib/speakeasy_client_sdk/models/operations/getschemarevision_request.rb +30 -0
  52. data/lib/speakeasy_client_sdk/models/operations/getschemarevision_response.rb +36 -0
  53. data/lib/speakeasy_client_sdk/models/operations/getschemas_request.rb +27 -0
  54. data/lib/{sdk/models/operations/getplugins.rb → speakeasy_client_sdk/models/operations/getschemas_response.rb} +8 -10
  55. data/lib/{sdk/models/operations/getvalidembedaccesstokens.rb → speakeasy_client_sdk/models/operations/getvalidembedaccesstokens_response.rb} +9 -11
  56. data/lib/speakeasy_client_sdk/models/operations/getversionmetadata_request.rb +27 -0
  57. data/lib/speakeasy_client_sdk/models/operations/getversionmetadata_response.rb +36 -0
  58. data/lib/speakeasy_client_sdk/models/operations/insertversionmetadata_request.rb +30 -0
  59. data/lib/speakeasy_client_sdk/models/operations/insertversionmetadata_response.rb +36 -0
  60. data/lib/speakeasy_client_sdk/models/operations/op.rb +24 -0
  61. data/lib/speakeasy_client_sdk/models/operations/postworkspaceevents_request.rb +27 -0
  62. data/lib/speakeasy_client_sdk/models/operations/postworkspaceevents_response.rb +30 -0
  63. data/lib/speakeasy_client_sdk/models/operations/queryeventlog_request.rb +24 -0
  64. data/lib/speakeasy_client_sdk/models/operations/queryeventlog_response.rb +36 -0
  65. data/lib/speakeasy_client_sdk/models/operations/queryparam_op.rb +24 -0
  66. data/lib/speakeasy_client_sdk/models/operations/registerschema_request.rb +30 -0
  67. data/lib/speakeasy_client_sdk/models/operations/registerschema_requestbody.rb +24 -0
  68. data/lib/{sdk/models/operations/validateapikey.rb → speakeasy_client_sdk/models/operations/registerschema_response.rb} +7 -9
  69. data/lib/speakeasy_client_sdk/models/operations/revokeembedaccesstoken_request.rb +24 -0
  70. data/lib/speakeasy_client_sdk/models/operations/revokeembedaccesstoken_response.rb +33 -0
  71. data/lib/speakeasy_client_sdk/models/operations/upsertapi_request.rb +27 -0
  72. data/lib/speakeasy_client_sdk/models/operations/upsertapi_response.rb +36 -0
  73. data/lib/speakeasy_client_sdk/models/operations/upsertapiendpoint_request.rb +33 -0
  74. data/lib/speakeasy_client_sdk/models/operations/upsertapiendpoint_response.rb +36 -0
  75. data/lib/speakeasy_client_sdk/models/operations/validateapikey_response.rb +36 -0
  76. data/lib/speakeasy_client_sdk/models/operations.rb +77 -0
  77. data/lib/{sdk → speakeasy_client_sdk}/models/shared/api.rb +9 -10
  78. data/lib/{sdk → speakeasy_client_sdk}/models/shared/api_input.rb +6 -7
  79. data/lib/speakeasy_client_sdk/models/shared/apiendpoint.rb +54 -0
  80. data/lib/{sdk → speakeasy_client_sdk}/models/shared/apiendpoint_input.rb +8 -9
  81. data/lib/speakeasy_client_sdk/models/shared/apikeydetails.rb +24 -0
  82. data/lib/speakeasy_client_sdk/models/shared/boundedrequest.rb +63 -0
  83. data/lib/speakeasy_client_sdk/models/shared/clievent.rb +156 -0
  84. data/lib/{sdk → speakeasy_client_sdk}/models/shared/embedaccesstokenresponse.rb +3 -4
  85. data/lib/speakeasy_client_sdk/models/shared/embedtoken.rb +51 -0
  86. data/lib/{sdk → speakeasy_client_sdk}/models/shared/error.rb +4 -5
  87. data/lib/{sdk → speakeasy_client_sdk}/models/shared/filter.rb +5 -6
  88. data/lib/{sdk → speakeasy_client_sdk}/models/shared/filters.rb +6 -7
  89. data/lib/speakeasy_client_sdk/models/shared/generate_bump_type.rb +22 -0
  90. data/lib/{sdk → speakeasy_client_sdk}/models/shared/generateopenapispecdiff.rb +4 -5
  91. data/lib/speakeasy_client_sdk/models/shared/interaction_type.rb +19 -0
  92. data/lib/{sdk → speakeasy_client_sdk}/models/shared/requestmetadata.rb +4 -5
  93. data/lib/speakeasy_client_sdk/models/shared/schema.rb +39 -0
  94. data/lib/speakeasy_client_sdk/models/shared/schemadiff.rb +30 -0
  95. data/lib/{sdk → speakeasy_client_sdk}/models/shared/security.rb +3 -4
  96. data/lib/{sdk → speakeasy_client_sdk}/models/shared/unboundedrequest.rb +7 -8
  97. data/lib/speakeasy_client_sdk/models/shared/valuechange.rb +27 -0
  98. data/lib/speakeasy_client_sdk/models/shared/versionmetadata.rb +39 -0
  99. data/lib/{sdk → speakeasy_client_sdk}/models/shared/versionmetadata_input.rb +4 -5
  100. data/lib/speakeasy_client_sdk/models/shared.rb +32 -0
  101. data/lib/{sdk → speakeasy_client_sdk}/requests.rb +24 -18
  102. data/lib/{sdk → speakeasy_client_sdk}/schemas.rb +62 -45
  103. data/lib/{sdk → speakeasy_client_sdk}/sdk.rb +18 -37
  104. data/lib/{sdk → speakeasy_client_sdk}/sdkconfiguration.rb +11 -8
  105. data/lib/{sdk → speakeasy_client_sdk}/utils/utils.rb +2 -2
  106. data/lib/speakeasy_client_sdk_ruby.rb +14 -66
  107. metadata +107 -67
  108. data/lib/sdk/models/operations/deleteapi.rb +0 -52
  109. data/lib/sdk/models/operations/deleteapiendpoint.rb +0 -55
  110. data/lib/sdk/models/operations/deleteschema.rb +0 -55
  111. data/lib/sdk/models/operations/deleteversionmetadata.rb +0 -58
  112. data/lib/sdk/models/operations/downloadschema.rb +0 -58
  113. data/lib/sdk/models/operations/downloadschemarevision.rb +0 -61
  114. data/lib/sdk/models/operations/findapiendpoint.rb +0 -59
  115. data/lib/sdk/models/operations/generateopenapispec.rb +0 -56
  116. data/lib/sdk/models/operations/generateopenapispecforapiendpoint.rb +0 -59
  117. data/lib/sdk/models/operations/generatepostmancollection.rb +0 -55
  118. data/lib/sdk/models/operations/generatepostmancollectionforapiendpoint.rb +0 -58
  119. data/lib/sdk/models/operations/generaterequestpostmancollection.rb +0 -52
  120. data/lib/sdk/models/operations/getallapiendpoints.rb +0 -52
  121. data/lib/sdk/models/operations/getallapiversions.rb +0 -72
  122. data/lib/sdk/models/operations/getallforversionapiendpoints.rb +0 -55
  123. data/lib/sdk/models/operations/getapiendpoint.rb +0 -59
  124. data/lib/sdk/models/operations/getapis.rb +0 -69
  125. data/lib/sdk/models/operations/getembedaccesstoken.rb +0 -60
  126. data/lib/sdk/models/operations/getrequestfromeventlog.rb +0 -53
  127. data/lib/sdk/models/operations/getschema.rb +0 -56
  128. data/lib/sdk/models/operations/getschemadiff.rb +0 -62
  129. data/lib/sdk/models/operations/getschemarevision.rb +0 -59
  130. data/lib/sdk/models/operations/getschemas.rb +0 -55
  131. data/lib/sdk/models/operations/getversionmetadata.rb +0 -55
  132. data/lib/sdk/models/operations/insertversionmetadata.rb +0 -59
  133. data/lib/sdk/models/operations/queryeventlog.rb +0 -53
  134. data/lib/sdk/models/operations/registerschema.rb +0 -86
  135. data/lib/sdk/models/operations/revokeembedaccesstoken.rb +0 -49
  136. data/lib/sdk/models/operations/runplugin.rb +0 -56
  137. data/lib/sdk/models/operations/upsertapi.rb +0 -56
  138. data/lib/sdk/models/operations/upsertapiendpoint.rb +0 -62
  139. data/lib/sdk/models/operations/upsertplugin.rb +0 -39
  140. data/lib/sdk/models/shared/apiendpoint.rb +0 -55
  141. data/lib/sdk/models/shared/boundedrequest.rb +0 -64
  142. data/lib/sdk/models/shared/embedtoken.rb +0 -52
  143. data/lib/sdk/models/shared/plugin.rb +0 -43
  144. data/lib/sdk/models/shared/schema.rb +0 -40
  145. data/lib/sdk/models/shared/schemadiff.rb +0 -48
  146. data/lib/sdk/models/shared/versionmetadata.rb +0 -40
  147. data/lib/sdk/plugins.rb +0 -142
  148. /data/lib/{sdk → speakeasy_client_sdk}/utils/metadata_fields.rb +0 -0
@@ -0,0 +1,57 @@
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 Auth
13
+ extend T::Sig
14
+ # REST APIs for managing Authentication
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::Utils::FieldAugmented) }
23
+ def validate_api_key
24
+ # validate_api_key - Validate the current api key.
25
+ url, params = @sdk_configuration.get_server_details
26
+ base_url = Utils.template_url(url, params)
27
+ url = "#{base_url}/v1/auth/validate"
28
+ headers = {}
29
+ headers['Accept'] = 'application/json'
30
+ headers['user-agent'] = @sdk_configuration.user_agent
31
+
32
+ r = @sdk_configuration.client.get(url) do |req|
33
+ req.headers = headers
34
+ Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
35
+ end
36
+
37
+ content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
38
+
39
+ res = ::SpeakeasyClientSDK::Operations::ValidateApiKeyResponse.new(
40
+ status_code: r.status, content_type: content_type, raw_response: r
41
+ )
42
+ if r.status == 200
43
+ if Utils.match_content_type(content_type, 'application/json')
44
+ out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::ApiKeyDetails)
45
+ res.api_key_details = out
46
+ end
47
+ else
48
+
49
+ if Utils.match_content_type(content_type, 'application/json')
50
+ out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::Error)
51
+ res.error = out
52
+ end
53
+ end
54
+ res
55
+ end
56
+ end
57
+ end
@@ -10,14 +10,16 @@ require 'sorbet-runtime'
10
10
  module SpeakeasyClientSDK
11
11
  extend T::Sig
12
12
  class Embeds
13
- # REST APIs for managing embeds
14
13
  extend T::Sig
14
+ # REST APIs for managing embeds
15
+
15
16
  sig { params(sdk_config: SDKConfiguration).void }
16
17
  def initialize(sdk_config)
17
18
  @sdk_configuration = sdk_config
18
19
  end
19
20
 
20
- sig { params(request: T.nilable(Operations::GetEmbedAccessTokenRequest)).returns(Utils::FieldAugmented) }
21
+
22
+ sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GetEmbedAccessTokenRequest)).returns(Utils::FieldAugmented) }
21
23
  def get_embed_access_token(request)
22
24
  # get_embed_access_token - Get an embed access token for the current workspace.
23
25
  # Returns an embed access token for the current workspace. This can be used to authenticate access to externally embedded content.
@@ -26,7 +28,7 @@ module SpeakeasyClientSDK
26
28
  base_url = Utils.template_url(url, params)
27
29
  url = "#{base_url}/v1/workspace/embed-access-token"
28
30
  headers = {}
29
- query_params = Utils.get_query_params(Operations::GetEmbedAccessTokenRequest, request)
31
+ query_params = Utils.get_query_params(::SpeakeasyClientSDK::Operations::GetEmbedAccessTokenRequest, request, @sdk_configuration.globals)
30
32
  headers['Accept'] = 'application/json'
31
33
  headers['user-agent'] = @sdk_configuration.user_agent
32
34
 
@@ -38,24 +40,25 @@ module SpeakeasyClientSDK
38
40
 
39
41
  content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
40
42
 
41
- res = Operations::GetEmbedAccessTokenResponse.new(
43
+ res = ::SpeakeasyClientSDK::Operations::GetEmbedAccessTokenResponse.new(
42
44
  status_code: r.status, content_type: content_type, raw_response: r
43
45
  )
44
46
  if r.status == 200
45
47
  if Utils.match_content_type(content_type, 'application/json')
46
- out = Utils.unmarshal_complex(r.env.response_body, Shared::EmbedAccessTokenResponse)
48
+ out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::EmbedAccessTokenResponse)
47
49
  res.embed_access_token_response = out
48
50
  end
49
51
  else
50
52
 
51
53
  if Utils.match_content_type(content_type, 'application/json')
52
- out = Utils.unmarshal_complex(r.env.response_body, Shared::Error)
54
+ out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::Error)
53
55
  res.error = out
54
56
  end
55
57
  end
56
58
  res
57
59
  end
58
60
 
61
+
59
62
  sig { returns(::SpeakeasyClientSDK::Utils::FieldAugmented) }
60
63
  def get_valid_embed_access_tokens
61
64
  # get_valid_embed_access_tokens - Get all valid embed access tokens for the current workspace.
@@ -73,34 +76,36 @@ module SpeakeasyClientSDK
73
76
 
74
77
  content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
75
78
 
76
- res = Operations::GetValidEmbedAccessTokensResponse.new(
79
+ res = ::SpeakeasyClientSDK::Operations::GetValidEmbedAccessTokensResponse.new(
77
80
  status_code: r.status, content_type: content_type, raw_response: r
78
81
  )
79
82
  if r.status == 200
80
83
  if Utils.match_content_type(content_type, 'application/json')
81
- out = Utils.unmarshal_complex(r.env.response_body, T::Array[Shared::EmbedToken])
82
- res.classes = out
84
+ out = Utils.unmarshal_complex(r.env.response_body, T::Array[::SpeakeasyClientSDK::Shared::EmbedToken])
85
+ res.embed_tokens = out
83
86
  end
84
87
  else
85
88
 
86
89
  if Utils.match_content_type(content_type, 'application/json')
87
- out = Utils.unmarshal_complex(r.env.response_body, Shared::Error)
90
+ out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::Error)
88
91
  res.error = out
89
92
  end
90
93
  end
91
94
  res
92
95
  end
93
96
 
94
- sig { params(request: T.nilable(Operations::RevokeEmbedAccessTokenRequest)).returns(Utils::FieldAugmented) }
97
+
98
+ sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::RevokeEmbedAccessTokenRequest)).returns(Utils::FieldAugmented) }
95
99
  def revoke_embed_access_token(request)
96
100
  # revoke_embed_access_token - Revoke an embed access EmbedToken.
97
101
  url, params = @sdk_configuration.get_server_details
98
102
  base_url = Utils.template_url(url, params)
99
103
  url = Utils.generate_url(
100
- Operations::RevokeEmbedAccessTokenRequest,
104
+ ::SpeakeasyClientSDK::Operations::RevokeEmbedAccessTokenRequest,
101
105
  base_url,
102
106
  '/v1/workspace/embed-access-tokens/{tokenID}',
103
- request
107
+ request,
108
+ @sdk_configuration.globals
104
109
  )
105
110
  headers = {}
106
111
  headers['Accept'] = 'application/json'
@@ -113,14 +118,14 @@ module SpeakeasyClientSDK
113
118
 
114
119
  content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
115
120
 
116
- res = Operations::RevokeEmbedAccessTokenResponse.new(
121
+ res = ::SpeakeasyClientSDK::Operations::RevokeEmbedAccessTokenResponse.new(
117
122
  status_code: r.status, content_type: content_type, raw_response: r
118
123
  )
119
124
  if r.status == 200
120
125
  else
121
126
 
122
127
  if Utils.match_content_type(content_type, 'application/json')
123
- out = Utils.unmarshal_complex(r.env.response_body, Shared::Error)
128
+ out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::Error)
124
129
  res.error = out
125
130
  end
126
131
  end
@@ -0,0 +1,63 @@
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 Events
13
+ extend T::Sig
14
+ # REST APIs for capturing event data
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::PostWorkspaceEventsRequest).returns(Utils::FieldAugmented) }
23
+ def post_workspace_events(request)
24
+ # post_workspace_events - Post events for a specific workspace
25
+ # Sends an array of events to be stored for a particular workspace.
26
+ url, params = @sdk_configuration.get_server_details
27
+ base_url = Utils.template_url(url, params)
28
+ url = Utils.generate_url(
29
+ ::SpeakeasyClientSDK::Operations::PostWorkspaceEventsRequest,
30
+ base_url,
31
+ '/v1/workspace/{workspaceID}/events',
32
+ request,
33
+ @sdk_configuration.globals
34
+ )
35
+ headers = {}
36
+ req_content_type, data, form = Utils.serialize_request_body(request, :request_body, :json)
37
+ headers['content-type'] = req_content_type
38
+ raise StandardError, 'request body is required' if data.nil? && form.nil?
39
+ headers['Accept'] = '*/*'
40
+ headers['user-agent'] = @sdk_configuration.user_agent
41
+
42
+ r = @sdk_configuration.client.post(url) do |req|
43
+ req.headers = headers
44
+ Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
45
+ if form
46
+ req.body = Utils.encode_form(form)
47
+ elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
48
+ req.body = URI.encode_www_form(data)
49
+ else
50
+ req.body = data
51
+ end
52
+ end
53
+
54
+ content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
55
+
56
+ res = ::SpeakeasyClientSDK::Operations::PostWorkspaceEventsResponse.new(
57
+ status_code: r.status, content_type: content_type, raw_response: r
58
+ )
59
+
60
+ res
61
+ end
62
+ end
63
+ end
@@ -10,23 +10,26 @@ require 'sorbet-runtime'
10
10
  module SpeakeasyClientSDK
11
11
  extend T::Sig
12
12
  class Metadata
13
- # REST APIs for managing Version Metadata entities
14
13
  extend T::Sig
14
+ # REST APIs for managing Version Metadata entities
15
+
15
16
  sig { params(sdk_config: SDKConfiguration).void }
16
17
  def initialize(sdk_config)
17
18
  @sdk_configuration = sdk_config
18
19
  end
19
20
 
20
- sig { params(request: T.nilable(Operations::DeleteVersionMetadataRequest)).returns(Utils::FieldAugmented) }
21
+
22
+ sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::DeleteVersionMetadataRequest)).returns(Utils::FieldAugmented) }
21
23
  def delete_version_metadata(request)
22
24
  # delete_version_metadata - Delete metadata for a particular apiID and versionID.
23
25
  url, params = @sdk_configuration.get_server_details
24
26
  base_url = Utils.template_url(url, params)
25
27
  url = Utils.generate_url(
26
- Operations::DeleteVersionMetadataRequest,
28
+ ::SpeakeasyClientSDK::Operations::DeleteVersionMetadataRequest,
27
29
  base_url,
28
30
  '/v1/apis/{apiID}/version/{versionID}/metadata/{metaKey}/{metaValue}',
29
- request
31
+ request,
32
+ @sdk_configuration.globals
30
33
  )
31
34
  headers = {}
32
35
  headers['Accept'] = 'application/json'
@@ -39,30 +42,32 @@ module SpeakeasyClientSDK
39
42
 
40
43
  content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
41
44
 
42
- res = Operations::DeleteVersionMetadataResponse.new(
45
+ res = ::SpeakeasyClientSDK::Operations::DeleteVersionMetadataResponse.new(
43
46
  status_code: r.status, content_type: content_type, raw_response: r
44
47
  )
45
48
  if r.status == 200
46
49
  else
47
50
 
48
51
  if Utils.match_content_type(content_type, 'application/json')
49
- out = Utils.unmarshal_complex(r.env.response_body, Shared::Error)
52
+ out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::Error)
50
53
  res.error = out
51
54
  end
52
55
  end
53
56
  res
54
57
  end
55
58
 
56
- sig { params(request: T.nilable(Operations::GetVersionMetadataRequest)).returns(Utils::FieldAugmented) }
59
+
60
+ sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GetVersionMetadataRequest)).returns(Utils::FieldAugmented) }
57
61
  def get_version_metadata(request)
58
62
  # get_version_metadata - Get all metadata for a particular apiID and versionID.
59
63
  url, params = @sdk_configuration.get_server_details
60
64
  base_url = Utils.template_url(url, params)
61
65
  url = Utils.generate_url(
62
- Operations::GetVersionMetadataRequest,
66
+ ::SpeakeasyClientSDK::Operations::GetVersionMetadataRequest,
63
67
  base_url,
64
68
  '/v1/apis/{apiID}/version/{versionID}/metadata',
65
- request
69
+ request,
70
+ @sdk_configuration.globals
66
71
  )
67
72
  headers = {}
68
73
  headers['Accept'] = 'application/json'
@@ -75,34 +80,36 @@ module SpeakeasyClientSDK
75
80
 
76
81
  content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
77
82
 
78
- res = Operations::GetVersionMetadataResponse.new(
83
+ res = ::SpeakeasyClientSDK::Operations::GetVersionMetadataResponse.new(
79
84
  status_code: r.status, content_type: content_type, raw_response: r
80
85
  )
81
86
  if r.status == 200
82
87
  if Utils.match_content_type(content_type, 'application/json')
83
- out = Utils.unmarshal_complex(r.env.response_body, T::Array[Shared::VersionMetadata])
84
- res.classes = out
88
+ out = Utils.unmarshal_complex(r.env.response_body, T::Array[::SpeakeasyClientSDK::Shared::VersionMetadata])
89
+ res.version_metadata = out
85
90
  end
86
91
  else
87
92
 
88
93
  if Utils.match_content_type(content_type, 'application/json')
89
- out = Utils.unmarshal_complex(r.env.response_body, Shared::Error)
94
+ out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::Error)
90
95
  res.error = out
91
96
  end
92
97
  end
93
98
  res
94
99
  end
95
100
 
96
- sig { params(request: Operations::InsertVersionMetadataRequest).returns(Utils::FieldAugmented) }
101
+
102
+ sig { params(request: ::SpeakeasyClientSDK::Operations::InsertVersionMetadataRequest).returns(Utils::FieldAugmented) }
97
103
  def insert_version_metadata(request)
98
104
  # insert_version_metadata - Insert metadata for a particular apiID and versionID.
99
105
  url, params = @sdk_configuration.get_server_details
100
106
  base_url = Utils.template_url(url, params)
101
107
  url = Utils.generate_url(
102
- Operations::InsertVersionMetadataRequest,
108
+ ::SpeakeasyClientSDK::Operations::InsertVersionMetadataRequest,
103
109
  base_url,
104
110
  '/v1/apis/{apiID}/version/{versionID}/metadata',
105
- request
111
+ request,
112
+ @sdk_configuration.globals
106
113
  )
107
114
  headers = {}
108
115
  req_content_type, data, form = Utils.serialize_request_body(request, :version_metadata, :json)
@@ -125,18 +132,18 @@ module SpeakeasyClientSDK
125
132
 
126
133
  content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
127
134
 
128
- res = Operations::InsertVersionMetadataResponse.new(
135
+ res = ::SpeakeasyClientSDK::Operations::InsertVersionMetadataResponse.new(
129
136
  status_code: r.status, content_type: content_type, raw_response: r
130
137
  )
131
138
  if r.status == 200
132
139
  if Utils.match_content_type(content_type, 'application/json')
133
- out = Utils.unmarshal_complex(r.env.response_body, Shared::VersionMetadata)
140
+ out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::VersionMetadata)
134
141
  res.version_metadata = out
135
142
  end
136
143
  else
137
144
 
138
145
  if Utils.match_content_type(content_type, 'application/json')
139
- out = Utils.unmarshal_complex(r.env.response_body, Shared::Error)
146
+ out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::Error)
140
147
  res.error = out
141
148
  end
142
149
  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 DeleteApiRequest < ::SpeakeasyClientSDK::Utils::FieldAugmented
12
+ extend T::Sig
13
+
14
+ # The ID of the Api to delete.
15
+ field :api_id, ::String, { 'path_param': { 'field_name': 'apiID', 'style': 'simple', 'explode': false } }
16
+ # The version ID of the Api to delete.
17
+ field :version_id, ::String, { 'path_param': { 'field_name': 'versionID', 'style': 'simple', 'explode': false } }
18
+
19
+
20
+ sig { params(api_id: ::String, version_id: ::String).void }
21
+ def initialize(api_id: nil, version_id: nil)
22
+ @api_id = api_id
23
+ @version_id = version_id
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 DeleteApiResponse < ::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,30 @@
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 DeleteApiEndpointRequest < ::SpeakeasyClientSDK::Utils::FieldAugmented
12
+ extend T::Sig
13
+
14
+ # The ID of the ApiEndpoint to delete.
15
+ field :api_endpoint_id, ::String, { 'path_param': { 'field_name': 'apiEndpointID', 'style': 'simple', 'explode': false } }
16
+ # The ID of the Api the ApiEndpoint belongs to.
17
+ field :api_id, ::String, { 'path_param': { 'field_name': 'apiID', 'style': 'simple', 'explode': false } }
18
+ # The version ID of the Api the ApiEndpoint belongs to.
19
+ field :version_id, ::String, { 'path_param': { 'field_name': 'versionID', 'style': 'simple', 'explode': false } }
20
+
21
+
22
+ sig { params(api_endpoint_id: ::String, api_id: ::String, version_id: ::String).void }
23
+ def initialize(api_endpoint_id: nil, api_id: nil, version_id: nil)
24
+ @api_endpoint_id = api_endpoint_id
25
+ @api_id = api_id
26
+ @version_id = version_id
27
+ end
28
+ end
29
+ end
30
+ 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 DeleteApiEndpointResponse < ::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,30 @@
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 DeleteSchemaRequest < ::SpeakeasyClientSDK::Utils::FieldAugmented
12
+ extend T::Sig
13
+
14
+ # The ID of the Api to delete schemas for.
15
+ field :api_id, ::String, { 'path_param': { 'field_name': 'apiID', 'style': 'simple', 'explode': false } }
16
+ # The revision ID of the schema to delete.
17
+ field :revision_id, ::String, { 'path_param': { 'field_name': 'revisionID', 'style': 'simple', 'explode': false } }
18
+ # The version ID of the Api to delete metadata for.
19
+ field :version_id, ::String, { 'path_param': { 'field_name': 'versionID', 'style': 'simple', 'explode': false } }
20
+
21
+
22
+ sig { params(api_id: ::String, revision_id: ::String, version_id: ::String).void }
23
+ def initialize(api_id: nil, revision_id: nil, version_id: nil)
24
+ @api_id = api_id
25
+ @revision_id = revision_id
26
+ @version_id = version_id
27
+ end
28
+ end
29
+ end
30
+ 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 DeleteSchemaResponse < ::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 DeleteVersionMetadataRequest < ::SpeakeasyClientSDK::Utils::FieldAugmented
12
+ extend T::Sig
13
+
14
+ # The ID of the Api to delete metadata for.
15
+ field :api_id, ::String, { 'path_param': { 'field_name': 'apiID', 'style': 'simple', 'explode': false } }
16
+ # The key of the metadata to delete.
17
+ field :meta_key, ::String, { 'path_param': { 'field_name': 'metaKey', 'style': 'simple', 'explode': false } }
18
+ # The value of the metadata to delete.
19
+ field :meta_value, ::String, { 'path_param': { 'field_name': 'metaValue', 'style': 'simple', 'explode': false } }
20
+ # The version ID of the Api to delete metadata for.
21
+ field :version_id, ::String, { 'path_param': { 'field_name': 'versionID', 'style': 'simple', 'explode': false } }
22
+
23
+
24
+ sig { params(api_id: ::String, meta_key: ::String, meta_value: ::String, version_id: ::String).void }
25
+ def initialize(api_id: nil, meta_key: nil, meta_value: nil, version_id: nil)
26
+ @api_id = api_id
27
+ @meta_key = meta_key
28
+ @meta_value = meta_value
29
+ @version_id = version_id
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 DeleteVersionMetadataResponse < ::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,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 DownloadSchemaRequest < ::SpeakeasyClientSDK::Utils::FieldAugmented
12
+ extend T::Sig
13
+
14
+ # The ID of the Api to download the schema for.
15
+ field :api_id, ::String, { 'path_param': { 'field_name': 'apiID', 'style': 'simple', 'explode': false } }
16
+ # The version ID of the Api to delete metadata for.
17
+ field :version_id, ::String, { 'path_param': { 'field_name': 'versionID', 'style': 'simple', 'explode': false } }
18
+
19
+
20
+ sig { params(api_id: ::String, version_id: ::String).void }
21
+ def initialize(api_id: nil, version_id: nil)
22
+ @api_id = api_id
23
+ @version_id = version_id
24
+ end
25
+ end
26
+ end
27
+ end