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
@@ -10,23 +10,26 @@ require 'sorbet-runtime'
10
10
  module SpeakeasyClientSDK
11
11
  extend T::Sig
12
12
  class Schemas
13
- # REST APIs for managing Schema entities
14
13
  extend T::Sig
14
+ # REST APIs for managing Schema 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::DeleteSchemaRequest)).returns(Utils::FieldAugmented) }
21
+
22
+ sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::DeleteSchemaRequest)).returns(Utils::FieldAugmented) }
21
23
  def delete_schema(request)
22
24
  # delete_schema - Delete a particular schema revision for an Api.
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::DeleteSchemaRequest,
28
+ ::SpeakeasyClientSDK::Operations::DeleteSchemaRequest,
27
29
  base_url,
28
30
  '/v1/apis/{apiID}/version/{versionID}/schema/{revisionID}',
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::DeleteSchemaResponse.new(
45
+ res = ::SpeakeasyClientSDK::Operations::DeleteSchemaResponse.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::DownloadSchemaRequest)).returns(Utils::FieldAugmented) }
59
+
60
+ sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::DownloadSchemaRequest)).returns(Utils::FieldAugmented) }
57
61
  def download_schema(request)
58
62
  # download_schema - Download the latest schema for a particular apiID.
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::DownloadSchemaRequest,
66
+ ::SpeakeasyClientSDK::Operations::DownloadSchemaRequest,
63
67
  base_url,
64
68
  '/v1/apis/{apiID}/version/{versionID}/schema/download',
65
- request
69
+ request,
70
+ @sdk_configuration.globals
66
71
  )
67
72
  headers = {}
68
73
  headers['Accept'] = 'application/json;q=1, application/x-yaml;q=0'
@@ -75,7 +80,7 @@ module SpeakeasyClientSDK
75
80
 
76
81
  content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
77
82
 
78
- res = Operations::DownloadSchemaResponse.new(
83
+ res = ::SpeakeasyClientSDK::Operations::DownloadSchemaResponse.new(
79
84
  status_code: r.status, content_type: content_type, raw_response: r
80
85
  )
81
86
  if r.status == 200
@@ -86,23 +91,25 @@ module SpeakeasyClientSDK
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: T.nilable(Operations::DownloadSchemaRevisionRequest)).returns(Utils::FieldAugmented) }
101
+
102
+ sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::DownloadSchemaRevisionRequest)).returns(Utils::FieldAugmented) }
97
103
  def download_schema_revision(request)
98
104
  # download_schema_revision - Download a particular schema revision for an Api.
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::DownloadSchemaRevisionRequest,
108
+ ::SpeakeasyClientSDK::Operations::DownloadSchemaRevisionRequest,
103
109
  base_url,
104
110
  '/v1/apis/{apiID}/version/{versionID}/schema/{revisionID}/download',
105
- request
111
+ request,
112
+ @sdk_configuration.globals
106
113
  )
107
114
  headers = {}
108
115
  headers['Accept'] = 'application/json;q=1, application/x-yaml;q=0'
@@ -115,7 +122,7 @@ module SpeakeasyClientSDK
115
122
 
116
123
  content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
117
124
 
118
- res = Operations::DownloadSchemaRevisionResponse.new(
125
+ res = ::SpeakeasyClientSDK::Operations::DownloadSchemaRevisionResponse.new(
119
126
  status_code: r.status, content_type: content_type, raw_response: r
120
127
  )
121
128
  if r.status == 200
@@ -126,14 +133,15 @@ module SpeakeasyClientSDK
126
133
  else
127
134
 
128
135
  if Utils.match_content_type(content_type, 'application/json')
129
- out = Utils.unmarshal_complex(r.env.response_body, Shared::Error)
136
+ out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::Error)
130
137
  res.error = out
131
138
  end
132
139
  end
133
140
  res
134
141
  end
135
142
 
136
- sig { params(request: T.nilable(Operations::GetSchemaRequest)).returns(Utils::FieldAugmented) }
143
+
144
+ sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GetSchemaRequest)).returns(Utils::FieldAugmented) }
137
145
  def get_schema(request)
138
146
  # get_schema - Get information about the latest schema.
139
147
  # Returns information about the last uploaded schema for a particular API version.
@@ -141,10 +149,11 @@ module SpeakeasyClientSDK
141
149
  url, params = @sdk_configuration.get_server_details
142
150
  base_url = Utils.template_url(url, params)
143
151
  url = Utils.generate_url(
144
- Operations::GetSchemaRequest,
152
+ ::SpeakeasyClientSDK::Operations::GetSchemaRequest,
145
153
  base_url,
146
154
  '/v1/apis/{apiID}/version/{versionID}/schema',
147
- request
155
+ request,
156
+ @sdk_configuration.globals
148
157
  )
149
158
  headers = {}
150
159
  headers['Accept'] = 'application/json'
@@ -157,34 +166,36 @@ module SpeakeasyClientSDK
157
166
 
158
167
  content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
159
168
 
160
- res = Operations::GetSchemaResponse.new(
169
+ res = ::SpeakeasyClientSDK::Operations::GetSchemaResponse.new(
161
170
  status_code: r.status, content_type: content_type, raw_response: r
162
171
  )
163
172
  if r.status == 200
164
173
  if Utils.match_content_type(content_type, 'application/json')
165
- out = Utils.unmarshal_complex(r.env.response_body, Shared::Schema)
174
+ out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::Schema)
166
175
  res.schema = out
167
176
  end
168
177
  else
169
178
 
170
179
  if Utils.match_content_type(content_type, 'application/json')
171
- out = Utils.unmarshal_complex(r.env.response_body, Shared::Error)
180
+ out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::Error)
172
181
  res.error = out
173
182
  end
174
183
  end
175
184
  res
176
185
  end
177
186
 
178
- sig { params(request: T.nilable(Operations::GetSchemaDiffRequest)).returns(Utils::FieldAugmented) }
187
+
188
+ sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GetSchemaDiffRequest)).returns(Utils::FieldAugmented) }
179
189
  def get_schema_diff(request)
180
190
  # get_schema_diff - Get a diff of two schema revisions for an Api.
181
191
  url, params = @sdk_configuration.get_server_details
182
192
  base_url = Utils.template_url(url, params)
183
193
  url = Utils.generate_url(
184
- Operations::GetSchemaDiffRequest,
194
+ ::SpeakeasyClientSDK::Operations::GetSchemaDiffRequest,
185
195
  base_url,
186
196
  '/v1/apis/{apiID}/version/{versionID}/schema/{baseRevisionID}/diff/{targetRevisionID}',
187
- request
197
+ request,
198
+ @sdk_configuration.globals
188
199
  )
189
200
  headers = {}
190
201
  headers['Accept'] = 'application/json'
@@ -197,25 +208,26 @@ module SpeakeasyClientSDK
197
208
 
198
209
  content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
199
210
 
200
- res = Operations::GetSchemaDiffResponse.new(
211
+ res = ::SpeakeasyClientSDK::Operations::GetSchemaDiffResponse.new(
201
212
  status_code: r.status, content_type: content_type, raw_response: r
202
213
  )
203
214
  if r.status == 200
204
215
  if Utils.match_content_type(content_type, 'application/json')
205
- out = Utils.unmarshal_complex(r.env.response_body, Shared::SchemaDiff)
216
+ out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::SchemaDiff)
206
217
  res.schema_diff = out
207
218
  end
208
219
  else
209
220
 
210
221
  if Utils.match_content_type(content_type, 'application/json')
211
- out = Utils.unmarshal_complex(r.env.response_body, Shared::Error)
222
+ out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::Error)
212
223
  res.error = out
213
224
  end
214
225
  end
215
226
  res
216
227
  end
217
228
 
218
- sig { params(request: T.nilable(Operations::GetSchemaRevisionRequest)).returns(Utils::FieldAugmented) }
229
+
230
+ sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GetSchemaRevisionRequest)).returns(Utils::FieldAugmented) }
219
231
  def get_schema_revision(request)
220
232
  # get_schema_revision - Get information about a particular schema revision for an Api.
221
233
  # Returns information about the last uploaded schema for a particular schema revision.
@@ -223,10 +235,11 @@ module SpeakeasyClientSDK
223
235
  url, params = @sdk_configuration.get_server_details
224
236
  base_url = Utils.template_url(url, params)
225
237
  url = Utils.generate_url(
226
- Operations::GetSchemaRevisionRequest,
238
+ ::SpeakeasyClientSDK::Operations::GetSchemaRevisionRequest,
227
239
  base_url,
228
240
  '/v1/apis/{apiID}/version/{versionID}/schema/{revisionID}',
229
- request
241
+ request,
242
+ @sdk_configuration.globals
230
243
  )
231
244
  headers = {}
232
245
  headers['Accept'] = 'application/json'
@@ -239,25 +252,26 @@ module SpeakeasyClientSDK
239
252
 
240
253
  content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
241
254
 
242
- res = Operations::GetSchemaRevisionResponse.new(
255
+ res = ::SpeakeasyClientSDK::Operations::GetSchemaRevisionResponse.new(
243
256
  status_code: r.status, content_type: content_type, raw_response: r
244
257
  )
245
258
  if r.status == 200
246
259
  if Utils.match_content_type(content_type, 'application/json')
247
- out = Utils.unmarshal_complex(r.env.response_body, Shared::Schema)
260
+ out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::Schema)
248
261
  res.schema = out
249
262
  end
250
263
  else
251
264
 
252
265
  if Utils.match_content_type(content_type, 'application/json')
253
- out = Utils.unmarshal_complex(r.env.response_body, Shared::Error)
266
+ out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::Error)
254
267
  res.error = out
255
268
  end
256
269
  end
257
270
  res
258
271
  end
259
272
 
260
- sig { params(request: T.nilable(Operations::GetSchemasRequest)).returns(Utils::FieldAugmented) }
273
+
274
+ sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GetSchemasRequest)).returns(Utils::FieldAugmented) }
261
275
  def get_schemas(request)
262
276
  # get_schemas - Get information about all schemas associated with a particular apiID.
263
277
  # Returns information the schemas associated with a particular apiID.
@@ -265,10 +279,11 @@ module SpeakeasyClientSDK
265
279
  url, params = @sdk_configuration.get_server_details
266
280
  base_url = Utils.template_url(url, params)
267
281
  url = Utils.generate_url(
268
- Operations::GetSchemasRequest,
282
+ ::SpeakeasyClientSDK::Operations::GetSchemasRequest,
269
283
  base_url,
270
284
  '/v1/apis/{apiID}/version/{versionID}/schemas',
271
- request
285
+ request,
286
+ @sdk_configuration.globals
272
287
  )
273
288
  headers = {}
274
289
  headers['Accept'] = 'application/json'
@@ -281,25 +296,26 @@ module SpeakeasyClientSDK
281
296
 
282
297
  content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
283
298
 
284
- res = Operations::GetSchemasResponse.new(
299
+ res = ::SpeakeasyClientSDK::Operations::GetSchemasResponse.new(
285
300
  status_code: r.status, content_type: content_type, raw_response: r
286
301
  )
287
302
  if r.status == 200
288
303
  if Utils.match_content_type(content_type, 'application/json')
289
- out = Utils.unmarshal_complex(r.env.response_body, T::Array[Shared::Schema])
304
+ out = Utils.unmarshal_complex(r.env.response_body, T::Array[::SpeakeasyClientSDK::Shared::Schema])
290
305
  res.classes = out
291
306
  end
292
307
  else
293
308
 
294
309
  if Utils.match_content_type(content_type, 'application/json')
295
- out = Utils.unmarshal_complex(r.env.response_body, Shared::Error)
310
+ out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::Error)
296
311
  res.error = out
297
312
  end
298
313
  end
299
314
  res
300
315
  end
301
316
 
302
- sig { params(request: Operations::RegisterSchemaRequest).returns(Utils::FieldAugmented) }
317
+
318
+ sig { params(request: ::SpeakeasyClientSDK::Operations::RegisterSchemaRequest).returns(Utils::FieldAugmented) }
303
319
  def register_schema(request)
304
320
  # register_schema - Register a schema.
305
321
  # Allows uploading a schema for a particular API version.
@@ -307,10 +323,11 @@ module SpeakeasyClientSDK
307
323
  url, params = @sdk_configuration.get_server_details
308
324
  base_url = Utils.template_url(url, params)
309
325
  url = Utils.generate_url(
310
- Operations::RegisterSchemaRequest,
326
+ ::SpeakeasyClientSDK::Operations::RegisterSchemaRequest,
311
327
  base_url,
312
328
  '/v1/apis/{apiID}/version/{versionID}/schema',
313
- request
329
+ request,
330
+ @sdk_configuration.globals
314
331
  )
315
332
  headers = {}
316
333
  req_content_type, data, form = Utils.serialize_request_body(request, :request_body, :multipart)
@@ -333,14 +350,14 @@ module SpeakeasyClientSDK
333
350
 
334
351
  content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
335
352
 
336
- res = Operations::RegisterSchemaResponse.new(
353
+ res = ::SpeakeasyClientSDK::Operations::RegisterSchemaResponse.new(
337
354
  status_code: r.status, content_type: content_type, raw_response: r
338
355
  )
339
356
  if r.status == 200
340
357
  else
341
358
 
342
359
  if Utils.match_content_type(content_type, 'application/json')
343
- out = Utils.unmarshal_complex(r.env.response_body, Shared::Error)
360
+ out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::Error)
344
361
  res.error = out
345
362
  end
346
363
  end
@@ -12,18 +12,20 @@ module SpeakeasyClientSDK
12
12
  class SDK
13
13
  extend T::Sig
14
14
 
15
- attr_accessor :apis, :api_endpoints, :metadata, :schemas, :requests, :plugins, :embeds
15
+ attr_accessor :apis, :api_endpoints, :metadata, :schemas, :auth, :requests, :embeds, :events
16
16
 
17
17
  attr_accessor :security, :language, :sdk_version, :gen_version
18
18
 
19
19
  sig do
20
20
  params(security: T.nilable(Shared::Security),
21
+ workspace_id: ::String,
21
22
  server: String,
22
23
  server_url: String,
23
24
  url_params: T::Hash[Symbol, String],
24
25
  client: Faraday::Request).void
25
26
  end
26
27
  def initialize(security: nil,
28
+ workspace_id: nil,
27
29
  server: nil,
28
30
  server_url: nil,
29
31
  url_params: nil,
@@ -31,6 +33,7 @@ module SpeakeasyClientSDK
31
33
 
32
34
  ## Instantiates the SDK configuring it with the provided parameters.
33
35
  # @param [Shared::Security] security The security details required for authentication
36
+ # @param [::String] workspace_id: Configures the workspace_id parameter for all supported operations
34
37
  # @param [String] server The server by name to use for all operations
35
38
  # @param [String] server_url The server URL to use for all operations
36
39
  # @param [Hash<Symbol, String>] url_params Parameters to optionally template the server URL with
@@ -53,8 +56,17 @@ module SpeakeasyClientSDK
53
56
  server = SERVER_PROD if server.nil?
54
57
 
55
58
 
56
-
57
- @sdk_configuration = SDKConfiguration.new(client, security, server_url, server)
59
+ globals = {
60
+ 'parameters': {
61
+ 'queryParam': {
62
+ },
63
+ 'pathParam': {
64
+ 'workspace_id': workspace_id
65
+ }
66
+ }
67
+ }
68
+
69
+ @sdk_configuration = SDKConfiguration.new(client, security, server_url, server, globals)
58
70
  init_sdks
59
71
  end
60
72
 
@@ -74,7 +86,7 @@ module SpeakeasyClientSDK
74
86
  init_sdks
75
87
  end
76
88
 
77
- sig { params(security: Shared::Security).void }
89
+ sig { params(security: ::SpeakeasyClientSDK::Shared::Security).void }
78
90
  def config_security(security)
79
91
  @security = security
80
92
  @sdk_configuration.security = security
@@ -86,41 +98,10 @@ module SpeakeasyClientSDK
86
98
  @api_endpoints = ApiEndpoints.new(@sdk_configuration)
87
99
  @metadata = Metadata.new(@sdk_configuration)
88
100
  @schemas = Schemas.new(@sdk_configuration)
101
+ @auth = Auth.new(@sdk_configuration)
89
102
  @requests = Requests.new(@sdk_configuration)
90
- @plugins = Plugins.new(@sdk_configuration)
91
103
  @embeds = Embeds.new(@sdk_configuration)
92
- end
93
-
94
-
95
- sig { returns(::SpeakeasyClientSDK::Utils::FieldAugmented) }
96
- def validate_api_key
97
- # validate_api_key - Validate the current api key.
98
- url, params = @sdk_configuration.get_server_details
99
- base_url = Utils.template_url(url, params)
100
- url = "#{base_url}/v1/auth/validate"
101
- headers = {}
102
- headers['Accept'] = 'application/json'
103
- headers['user-agent'] = @sdk_configuration.user_agent
104
-
105
- r = @sdk_configuration.client.get(url) do |req|
106
- req.headers = headers
107
- Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
108
- end
109
-
110
- content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
111
-
112
- res = Operations::ValidateApiKeyResponse.new(
113
- status_code: r.status, content_type: content_type, raw_response: r
114
- )
115
- if r.status == 200
116
- else
117
-
118
- if Utils.match_content_type(content_type, 'application/json')
119
- out = Utils.unmarshal_complex(r.env.response_body, Shared::Error)
120
- res.error = out
121
- end
122
- end
123
- res
104
+ @events = Events.new(@sdk_configuration)
124
105
  end
125
106
  end
126
107
  end
@@ -24,7 +24,7 @@ module SpeakeasyClientSDK
24
24
  field :client, T.nilable(Faraday::Connection)
25
25
  field :security, Shared::Security
26
26
  field :server_url, T.nilable(String)
27
- field :server, T.nilable(String)
27
+ field :globals, Hash[Symbol, Hash[Symbol, Hash[Symbol, Object]]]
28
28
  field :language, String
29
29
  field :openapi_doc_version, String
30
30
  field :sdk_version, String
@@ -32,15 +32,18 @@ module SpeakeasyClientSDK
32
32
  field :user_agent, String
33
33
 
34
34
 
35
- sig { params(client: Faraday::Connection, security: T.nilable(Shared::Security), server_url: T.nilable(String), server_idx: T.nilable(Integer)).void }
36
- def initialize(client, security, server_url, server_idx)
35
+ sig { params(client: Faraday::Connection, security: T.nilable(Shared::Security), server_url: T.nilable(String), server_idx: T.nilable(Integer), globals: T::Hash[Symbol, T::Hash[Symbol, T::Hash[Symbol, Object]]]).void }
36
+ def initialize(client, security, server_url, server_idx, globals)
37
37
  @client = client
38
- @server = server_url.nil? ? '' : server_url
38
+ @server_url = server_url
39
+ @server = ''
40
+ @security = security
41
+ @globals = globals.nil? ? {} : globals
39
42
  @language = 'ruby'
40
- @openapi_doc_version = '0.3.0'
41
- @sdk_version = '2.2.3'
42
- @gen_version = '2.237.2'
43
- @user_agent = 'speakeasy-sdk/ruby 2.2.3 2.237.2 0.3.0 speakeasy_client_sdk_ruby'
43
+ @openapi_doc_version = '0.4.0'
44
+ @sdk_version = '4.0.0'
45
+ @gen_version = '2.250.16'
46
+ @user_agent = 'speakeasy-sdk/ruby 4.0.0 2.250.16 0.4.0 speakeasy_client_sdk_ruby'
44
47
  end
45
48
 
46
49
  sig { returns([String, T::Hash[Symbol, String]]) }
@@ -235,8 +235,8 @@ module SpeakeasyClientSDK
235
235
  _populate_form(field_name, metadata.fetch(:explode, true), obj, delimiter, &get_query_param_field_name)
236
236
  end
237
237
 
238
- sig { params(clazz: Class, query_params: FieldAugmented, gbls: T::Hash[Symbol, T::Hash[Symbol, T::Hash[Symbol, Object]]]).returns(T::Hash[Symbol, T::Array[String]]) }
239
- def self.get_query_params(clazz, query_params, gbls)
238
+ sig { params(clazz: Class, query_params: FieldAugmented, gbls: T.nilable(T::Hash[Symbol, T::Hash[Symbol, T::Hash[Symbol, Object]]])).returns(T::Hash[Symbol, T::Array[String]]) }
239
+ def self.get_query_params(clazz, query_params, gbls = nil)
240
240
  params = {}
241
241
  param_fields = clazz.fields
242
242
  param_fields.each do |f|
@@ -3,71 +3,19 @@
3
3
  # typed: true
4
4
  # frozen_string_literal: true
5
5
 
6
- require_relative 'sdk/utils/utils'
7
- require_relative 'sdk/utils/metadata_fields'
8
- require_relative 'sdk/sdk'
9
- require_relative 'sdk/models/shared/error'
10
- require_relative 'sdk/models/shared/generateopenapispecdiff'
11
- require_relative 'sdk/models/shared/api'
12
- require_relative 'sdk/models/shared/api_input'
13
- require_relative 'sdk/models/shared/apiendpoint'
14
- require_relative 'sdk/models/shared/apiendpoint_input'
15
- require_relative 'sdk/models/shared/versionmetadata'
16
- require_relative 'sdk/models/shared/versionmetadata_input'
17
- require_relative 'sdk/models/shared/schema'
18
- require_relative 'sdk/models/shared/schemadiff'
19
- require_relative 'sdk/models/shared/unboundedrequest'
20
- require_relative 'sdk/models/shared/boundedrequest'
21
- require_relative 'sdk/models/shared/requestmetadata'
22
- require_relative 'sdk/models/shared/filters'
23
- require_relative 'sdk/models/shared/filter'
24
- require_relative 'sdk/models/shared/plugin'
25
- require_relative 'sdk/models/shared/embedaccesstokenresponse'
26
- require_relative 'sdk/models/shared/embedtoken'
27
- require_relative 'sdk/models/shared/security'
28
- require_relative 'sdk/models/operations/deleteapi'
29
- require_relative 'sdk/models/operations/deleteapiendpoint'
30
- require_relative 'sdk/models/operations/deleteschema'
31
- require_relative 'sdk/models/operations/deleteversionmetadata'
32
- require_relative 'sdk/models/operations/downloadschema'
33
- require_relative 'sdk/models/operations/downloadschemarevision'
34
- require_relative 'sdk/models/operations/findapiendpoint'
35
- require_relative 'sdk/models/operations/generateopenapispec'
36
- require_relative 'sdk/models/operations/generateopenapispecforapiendpoint'
37
- require_relative 'sdk/models/operations/generatepostmancollection'
38
- require_relative 'sdk/models/operations/generatepostmancollectionforapiendpoint'
39
- require_relative 'sdk/models/operations/generaterequestpostmancollection'
40
- require_relative 'sdk/models/operations/getallapiendpoints'
41
- require_relative 'sdk/models/operations/getallapiversions'
42
- require_relative 'sdk/models/operations/getallforversionapiendpoints'
43
- require_relative 'sdk/models/operations/getapiendpoint'
44
- require_relative 'sdk/models/operations/getapis'
45
- require_relative 'sdk/models/operations/getembedaccesstoken'
46
- require_relative 'sdk/models/operations/getplugins'
47
- require_relative 'sdk/models/operations/getrequestfromeventlog'
48
- require_relative 'sdk/models/operations/getschema'
49
- require_relative 'sdk/models/operations/getschemadiff'
50
- require_relative 'sdk/models/operations/getschemarevision'
51
- require_relative 'sdk/models/operations/getschemas'
52
- require_relative 'sdk/models/operations/getvalidembedaccesstokens'
53
- require_relative 'sdk/models/operations/getversionmetadata'
54
- require_relative 'sdk/models/operations/insertversionmetadata'
55
- require_relative 'sdk/models/operations/queryeventlog'
56
- require_relative 'sdk/models/operations/registerschema'
57
- require_relative 'sdk/models/operations/revokeembedaccesstoken'
58
- require_relative 'sdk/models/operations/runplugin'
59
- require_relative 'sdk/models/operations/upsertapi'
60
- require_relative 'sdk/models/operations/upsertapiendpoint'
61
- require_relative 'sdk/models/operations/upsertplugin'
62
- require_relative 'sdk/models/operations/validateapikey'
63
- require_relative 'sdk/sdkconfiguration'
64
- require_relative 'sdk/apis'
65
- require_relative 'sdk/apiendpoints'
66
- require_relative 'sdk/metadata'
67
- require_relative 'sdk/schemas'
68
- require_relative 'sdk/requests'
69
- require_relative 'sdk/plugins'
70
- require_relative 'sdk/embeds'
71
-
6
+ require_relative 'speakeasy_client_sdk/utils/utils'
7
+ require_relative 'speakeasy_client_sdk/utils/metadata_fields'
72
8
  module SpeakeasyClientSDK
9
+ autoload :SDK, 'speakeasy_client_sdk/sdk'
10
+ autoload :SDKConfiguration, 'speakeasy_client_sdk/sdkconfiguration'
11
+ autoload :Shared, 'speakeasy_client_sdk/models/shared'
12
+ autoload :Operations, 'speakeasy_client_sdk/models/operations'
13
+ autoload :Apis, 'speakeasy_client_sdk/apis'
14
+ autoload :ApiEndpoints, 'speakeasy_client_sdk/apiendpoints'
15
+ autoload :Metadata, 'speakeasy_client_sdk/metadata'
16
+ autoload :Schemas, 'speakeasy_client_sdk/schemas'
17
+ autoload :Auth, 'speakeasy_client_sdk/auth'
18
+ autoload :Requests, 'speakeasy_client_sdk/requests'
19
+ autoload :Embeds, 'speakeasy_client_sdk/embeds'
20
+ autoload :Events, 'speakeasy_client_sdk/events'
73
21
  end