speakeasy_client_sdk_ruby 2.2.3 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (144) hide show
  1. checksums.yaml +4 -4
  2. data/lib/{sdk → speakeasy_client_sdk}/apiendpoints.rb +48 -39
  3. data/lib/{sdk → speakeasy_client_sdk}/apis.rb +37 -30
  4. data/lib/{sdk → speakeasy_client_sdk}/embeds.rb +17 -13
  5. data/lib/{sdk → speakeasy_client_sdk}/metadata.rb +19 -15
  6. data/lib/speakeasy_client_sdk/models/operations/deleteapi_request.rb +27 -0
  7. data/lib/speakeasy_client_sdk/models/operations/deleteapi_response.rb +33 -0
  8. data/lib/speakeasy_client_sdk/models/operations/deleteapiendpoint_request.rb +30 -0
  9. data/lib/speakeasy_client_sdk/models/operations/deleteapiendpoint_response.rb +33 -0
  10. data/lib/speakeasy_client_sdk/models/operations/deleteschema_request.rb +30 -0
  11. data/lib/speakeasy_client_sdk/models/operations/deleteschema_response.rb +33 -0
  12. data/lib/speakeasy_client_sdk/models/operations/deleteversionmetadata_request.rb +33 -0
  13. data/lib/speakeasy_client_sdk/models/operations/deleteversionmetadata_response.rb +33 -0
  14. data/lib/speakeasy_client_sdk/models/operations/downloadschema_request.rb +27 -0
  15. data/lib/speakeasy_client_sdk/models/operations/downloadschema_response.rb +39 -0
  16. data/lib/speakeasy_client_sdk/models/operations/downloadschemarevision_request.rb +30 -0
  17. data/lib/speakeasy_client_sdk/models/operations/downloadschemarevision_response.rb +39 -0
  18. data/lib/speakeasy_client_sdk/models/operations/file.rb +27 -0
  19. data/lib/speakeasy_client_sdk/models/operations/findapiendpoint_request.rb +30 -0
  20. data/lib/speakeasy_client_sdk/models/operations/findapiendpoint_response.rb +36 -0
  21. data/lib/speakeasy_client_sdk/models/operations/generateopenapispec_request.rb +27 -0
  22. data/lib/speakeasy_client_sdk/models/operations/generateopenapispec_response.rb +36 -0
  23. data/lib/speakeasy_client_sdk/models/operations/generateopenapispecforapiendpoint_request.rb +30 -0
  24. data/lib/speakeasy_client_sdk/models/operations/generateopenapispecforapiendpoint_response.rb +36 -0
  25. data/lib/speakeasy_client_sdk/models/operations/generatepostmancollection_request.rb +27 -0
  26. data/lib/speakeasy_client_sdk/models/operations/generatepostmancollection_response.rb +36 -0
  27. data/lib/speakeasy_client_sdk/models/operations/generatepostmancollectionforapiendpoint_request.rb +30 -0
  28. data/lib/speakeasy_client_sdk/models/operations/generatepostmancollectionforapiendpoint_response.rb +36 -0
  29. data/lib/speakeasy_client_sdk/models/operations/generaterequestpostmancollection_request.rb +24 -0
  30. data/lib/speakeasy_client_sdk/models/operations/generaterequestpostmancollection_response.rb +36 -0
  31. data/lib/speakeasy_client_sdk/models/operations/getallapiendpoints_request.rb +24 -0
  32. data/lib/speakeasy_client_sdk/models/operations/getallapiendpoints_response.rb +36 -0
  33. data/lib/speakeasy_client_sdk/models/operations/getallapiversions_request.rb +30 -0
  34. data/lib/speakeasy_client_sdk/models/operations/getallapiversions_response.rb +36 -0
  35. data/lib/speakeasy_client_sdk/models/operations/getallforversionapiendpoints_request.rb +27 -0
  36. data/lib/speakeasy_client_sdk/models/operations/getallforversionapiendpoints_response.rb +36 -0
  37. data/lib/speakeasy_client_sdk/models/operations/getapiendpoint_request.rb +30 -0
  38. data/lib/speakeasy_client_sdk/models/operations/getapiendpoint_response.rb +36 -0
  39. data/lib/speakeasy_client_sdk/models/operations/getapis_request.rb +27 -0
  40. data/lib/speakeasy_client_sdk/models/operations/getapis_response.rb +36 -0
  41. data/lib/speakeasy_client_sdk/models/operations/getembedaccesstoken_request.rb +30 -0
  42. data/lib/speakeasy_client_sdk/models/operations/getembedaccesstoken_response.rb +36 -0
  43. data/lib/{sdk/models/operations/getplugins.rb → speakeasy_client_sdk/models/operations/getplugins_response.rb} +7 -9
  44. data/lib/speakeasy_client_sdk/models/operations/getrequestfromeventlog_request.rb +24 -0
  45. data/lib/speakeasy_client_sdk/models/operations/getrequestfromeventlog_response.rb +36 -0
  46. data/lib/speakeasy_client_sdk/models/operations/getschema_request.rb +27 -0
  47. data/lib/speakeasy_client_sdk/models/operations/getschema_response.rb +36 -0
  48. data/lib/speakeasy_client_sdk/models/operations/getschemadiff_request.rb +33 -0
  49. data/lib/speakeasy_client_sdk/models/operations/getschemadiff_response.rb +36 -0
  50. data/lib/speakeasy_client_sdk/models/operations/getschemarevision_request.rb +30 -0
  51. data/lib/speakeasy_client_sdk/models/operations/getschemarevision_response.rb +36 -0
  52. data/lib/speakeasy_client_sdk/models/operations/getschemas_request.rb +27 -0
  53. data/lib/speakeasy_client_sdk/models/operations/getschemas_response.rb +36 -0
  54. data/lib/{sdk/models/operations/getvalidembedaccesstokens.rb → speakeasy_client_sdk/models/operations/getvalidembedaccesstokens_response.rb} +7 -9
  55. data/lib/speakeasy_client_sdk/models/operations/getversionmetadata_request.rb +27 -0
  56. data/lib/speakeasy_client_sdk/models/operations/getversionmetadata_response.rb +36 -0
  57. data/lib/speakeasy_client_sdk/models/operations/insertversionmetadata_request.rb +30 -0
  58. data/lib/speakeasy_client_sdk/models/operations/insertversionmetadata_response.rb +36 -0
  59. data/lib/speakeasy_client_sdk/models/operations/op.rb +24 -0
  60. data/lib/speakeasy_client_sdk/models/operations/queryeventlog_request.rb +24 -0
  61. data/lib/speakeasy_client_sdk/models/operations/queryeventlog_response.rb +36 -0
  62. data/lib/speakeasy_client_sdk/models/operations/queryparam_op.rb +24 -0
  63. data/lib/speakeasy_client_sdk/models/operations/registerschema_request.rb +30 -0
  64. data/lib/speakeasy_client_sdk/models/operations/registerschema_requestbody.rb +24 -0
  65. data/lib/speakeasy_client_sdk/models/operations/registerschema_response.rb +33 -0
  66. data/lib/speakeasy_client_sdk/models/operations/revokeembedaccesstoken_request.rb +24 -0
  67. data/lib/speakeasy_client_sdk/models/operations/revokeembedaccesstoken_response.rb +33 -0
  68. data/lib/speakeasy_client_sdk/models/operations/runplugin_request.rb +27 -0
  69. data/lib/speakeasy_client_sdk/models/operations/runplugin_response.rb +36 -0
  70. data/lib/speakeasy_client_sdk/models/operations/upsertapi_request.rb +27 -0
  71. data/lib/speakeasy_client_sdk/models/operations/upsertapi_response.rb +36 -0
  72. data/lib/speakeasy_client_sdk/models/operations/upsertapiendpoint_request.rb +33 -0
  73. data/lib/speakeasy_client_sdk/models/operations/upsertapiendpoint_response.rb +36 -0
  74. data/lib/{sdk/models/operations/upsertplugin.rb → speakeasy_client_sdk/models/operations/upsertplugin_response.rb} +7 -10
  75. data/lib/{sdk/models/operations/validateapikey.rb → speakeasy_client_sdk/models/operations/validateapikey_response.rb} +6 -8
  76. data/lib/speakeasy_client_sdk/models/operations.rb +79 -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/boundedrequest.rb +63 -0
  82. data/lib/{sdk → speakeasy_client_sdk}/models/shared/embedaccesstokenresponse.rb +3 -4
  83. data/lib/speakeasy_client_sdk/models/shared/embedtoken.rb +51 -0
  84. data/lib/{sdk → speakeasy_client_sdk}/models/shared/error.rb +4 -5
  85. data/lib/{sdk → speakeasy_client_sdk}/models/shared/filter.rb +5 -6
  86. data/lib/{sdk → speakeasy_client_sdk}/models/shared/filters.rb +6 -7
  87. data/lib/{sdk → speakeasy_client_sdk}/models/shared/generateopenapispecdiff.rb +4 -5
  88. data/lib/speakeasy_client_sdk/models/shared/plugin.rb +42 -0
  89. data/lib/{sdk → speakeasy_client_sdk}/models/shared/requestmetadata.rb +4 -5
  90. data/lib/speakeasy_client_sdk/models/shared/schema.rb +39 -0
  91. data/lib/speakeasy_client_sdk/models/shared/schemadiff.rb +30 -0
  92. data/lib/{sdk → speakeasy_client_sdk}/models/shared/security.rb +3 -4
  93. data/lib/{sdk → speakeasy_client_sdk}/models/shared/unboundedrequest.rb +7 -8
  94. data/lib/speakeasy_client_sdk/models/shared/valuechange.rb +27 -0
  95. data/lib/speakeasy_client_sdk/models/shared/versionmetadata.rb +39 -0
  96. data/lib/{sdk → speakeasy_client_sdk}/models/shared/versionmetadata_input.rb +4 -5
  97. data/lib/speakeasy_client_sdk/models/shared.rb +29 -0
  98. data/lib/{sdk → speakeasy_client_sdk}/plugins.rb +18 -14
  99. data/lib/{sdk → speakeasy_client_sdk}/requests.rb +19 -15
  100. data/lib/{sdk → speakeasy_client_sdk}/schemas.rb +46 -37
  101. data/lib/{sdk → speakeasy_client_sdk}/sdk.rb +3 -3
  102. data/lib/{sdk → speakeasy_client_sdk}/sdkconfiguration.rb +5 -5
  103. data/lib/speakeasy_client_sdk_ruby.rb +13 -66
  104. metadata +105 -67
  105. data/lib/sdk/models/operations/deleteapi.rb +0 -52
  106. data/lib/sdk/models/operations/deleteapiendpoint.rb +0 -55
  107. data/lib/sdk/models/operations/deleteschema.rb +0 -55
  108. data/lib/sdk/models/operations/deleteversionmetadata.rb +0 -58
  109. data/lib/sdk/models/operations/downloadschema.rb +0 -58
  110. data/lib/sdk/models/operations/downloadschemarevision.rb +0 -61
  111. data/lib/sdk/models/operations/findapiendpoint.rb +0 -59
  112. data/lib/sdk/models/operations/generateopenapispec.rb +0 -56
  113. data/lib/sdk/models/operations/generateopenapispecforapiendpoint.rb +0 -59
  114. data/lib/sdk/models/operations/generatepostmancollection.rb +0 -55
  115. data/lib/sdk/models/operations/generatepostmancollectionforapiendpoint.rb +0 -58
  116. data/lib/sdk/models/operations/generaterequestpostmancollection.rb +0 -52
  117. data/lib/sdk/models/operations/getallapiendpoints.rb +0 -52
  118. data/lib/sdk/models/operations/getallapiversions.rb +0 -72
  119. data/lib/sdk/models/operations/getallforversionapiendpoints.rb +0 -55
  120. data/lib/sdk/models/operations/getapiendpoint.rb +0 -59
  121. data/lib/sdk/models/operations/getapis.rb +0 -69
  122. data/lib/sdk/models/operations/getembedaccesstoken.rb +0 -60
  123. data/lib/sdk/models/operations/getrequestfromeventlog.rb +0 -53
  124. data/lib/sdk/models/operations/getschema.rb +0 -56
  125. data/lib/sdk/models/operations/getschemadiff.rb +0 -62
  126. data/lib/sdk/models/operations/getschemarevision.rb +0 -59
  127. data/lib/sdk/models/operations/getschemas.rb +0 -55
  128. data/lib/sdk/models/operations/getversionmetadata.rb +0 -55
  129. data/lib/sdk/models/operations/insertversionmetadata.rb +0 -59
  130. data/lib/sdk/models/operations/queryeventlog.rb +0 -53
  131. data/lib/sdk/models/operations/registerschema.rb +0 -86
  132. data/lib/sdk/models/operations/revokeembedaccesstoken.rb +0 -49
  133. data/lib/sdk/models/operations/runplugin.rb +0 -56
  134. data/lib/sdk/models/operations/upsertapi.rb +0 -56
  135. data/lib/sdk/models/operations/upsertapiendpoint.rb +0 -62
  136. data/lib/sdk/models/shared/apiendpoint.rb +0 -55
  137. data/lib/sdk/models/shared/boundedrequest.rb +0 -64
  138. data/lib/sdk/models/shared/embedtoken.rb +0 -52
  139. data/lib/sdk/models/shared/plugin.rb +0 -43
  140. data/lib/sdk/models/shared/schema.rb +0 -40
  141. data/lib/sdk/models/shared/schemadiff.rb +0 -48
  142. data/lib/sdk/models/shared/versionmetadata.rb +0 -40
  143. /data/lib/{sdk → speakeasy_client_sdk}/utils/metadata_fields.rb +0 -0
  144. /data/lib/{sdk → speakeasy_client_sdk}/utils/utils.rb +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e29b19047ef027ff4f9c4668dae723d973fc991446638c66176488fa366ffefc
4
- data.tar.gz: b5c2e7dd9962f292ef75ed7391250b5a10b783102c308f5b1e2dc5b2b8723ea5
3
+ metadata.gz: 56eff8992da62014aaade6fee65af6c9b0cd6f3b9864d025555b2b390f7c258e
4
+ data.tar.gz: d9f3f3962e7e21d11cf697098ce74709a2faf99816e26332b6d3b31538531386
5
5
  SHA512:
6
- metadata.gz: 202690f014baa7bef72e383f7a13fc0c7576b33d9cac7d9215820d2c1689673368969dec675e6cf3a10c9373faf98ee7b5f22070df85e0e4ad638ab7a0bf428f
7
- data.tar.gz: b06ff2375733ac12753ee4012e32f4761b43043b330db3d1f07734ce90fd370250b3f5245c13e8f91220698a49162af626b9db901c9c967bd47ed869810adb02
6
+ metadata.gz: 8df73357bd9ca154d6e101c58347455ee3dfdd2d96a6ff3ef937f1bcf2b3ad43fc7829ccab253353492b6a94e018d2530cfa144371f3cc1b02ea315cb9a7d1d0
7
+ data.tar.gz: 42b563898285acc6ca975ffc5792d312a22e146a916b0eb85d36c9e7d40049a490dda18e56cfc816b75cd37807da60b12c56f420b10d89997c9b2ed4fc32b9cf
@@ -10,21 +10,23 @@ require 'sorbet-runtime'
10
10
  module SpeakeasyClientSDK
11
11
  extend T::Sig
12
12
  class ApiEndpoints
13
- # REST APIs for managing ApiEndpoint entities
14
13
  extend T::Sig
14
+ # REST APIs for managing ApiEndpoint 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::DeleteApiEndpointRequest)).returns(Utils::FieldAugmented) }
21
+
22
+ sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::DeleteApiEndpointRequest)).returns(Utils::FieldAugmented) }
21
23
  def delete_api_endpoint(request)
22
24
  # delete_api_endpoint - Delete an ApiEndpoint.
23
25
  # Delete an ApiEndpoint. This will also delete all associated Request Logs (if using a Postgres datastore).
24
26
  url, params = @sdk_configuration.get_server_details
25
27
  base_url = Utils.template_url(url, params)
26
28
  url = Utils.generate_url(
27
- Operations::DeleteApiEndpointRequest,
29
+ ::SpeakeasyClientSDK::Operations::DeleteApiEndpointRequest,
28
30
  base_url,
29
31
  '/v1/apis/{apiID}/version/{versionID}/api_endpoints/{apiEndpointID}',
30
32
  request
@@ -40,21 +42,22 @@ module SpeakeasyClientSDK
40
42
 
41
43
  content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
42
44
 
43
- res = Operations::DeleteApiEndpointResponse.new(
45
+ res = ::SpeakeasyClientSDK::Operations::DeleteApiEndpointResponse.new(
44
46
  status_code: r.status, content_type: content_type, raw_response: r
45
47
  )
46
48
  if r.status == 200
47
49
  else
48
50
 
49
51
  if Utils.match_content_type(content_type, 'application/json')
50
- out = Utils.unmarshal_complex(r.env.response_body, Shared::Error)
52
+ out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::Error)
51
53
  res.error = out
52
54
  end
53
55
  end
54
56
  res
55
57
  end
56
58
 
57
- sig { params(request: T.nilable(Operations::FindApiEndpointRequest)).returns(Utils::FieldAugmented) }
59
+
60
+ sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::FindApiEndpointRequest)).returns(Utils::FieldAugmented) }
58
61
  def find_api_endpoint(request)
59
62
  # find_api_endpoint - Find an ApiEndpoint via its displayName.
60
63
  # Find an ApiEndpoint via its displayName (set by operationId from a registered OpenAPI schema).
@@ -62,7 +65,7 @@ module SpeakeasyClientSDK
62
65
  url, params = @sdk_configuration.get_server_details
63
66
  base_url = Utils.template_url(url, params)
64
67
  url = Utils.generate_url(
65
- Operations::FindApiEndpointRequest,
68
+ ::SpeakeasyClientSDK::Operations::FindApiEndpointRequest,
66
69
  base_url,
67
70
  '/v1/apis/{apiID}/version/{versionID}/api_endpoints/find/{displayName}',
68
71
  request
@@ -78,25 +81,26 @@ module SpeakeasyClientSDK
78
81
 
79
82
  content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
80
83
 
81
- res = Operations::FindApiEndpointResponse.new(
84
+ res = ::SpeakeasyClientSDK::Operations::FindApiEndpointResponse.new(
82
85
  status_code: r.status, content_type: content_type, raw_response: r
83
86
  )
84
87
  if r.status == 200
85
88
  if Utils.match_content_type(content_type, 'application/json')
86
- out = Utils.unmarshal_complex(r.env.response_body, Shared::ApiEndpoint)
89
+ out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::ApiEndpoint)
87
90
  res.api_endpoint = out
88
91
  end
89
92
  else
90
93
 
91
94
  if Utils.match_content_type(content_type, 'application/json')
92
- out = Utils.unmarshal_complex(r.env.response_body, Shared::Error)
95
+ out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::Error)
93
96
  res.error = out
94
97
  end
95
98
  end
96
99
  res
97
100
  end
98
101
 
99
- sig { params(request: T.nilable(Operations::GenerateOpenApiSpecForApiEndpointRequest)).returns(Utils::FieldAugmented) }
102
+
103
+ sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GenerateOpenApiSpecForApiEndpointRequest)).returns(Utils::FieldAugmented) }
100
104
  def generate_open_api_spec_for_api_endpoint(request)
101
105
  # generate_open_api_spec_for_api_endpoint - Generate an OpenAPI specification for a particular ApiEndpoint.
102
106
  # This endpoint will generate a new operation in any registered OpenAPI document if the operation does not already exist in the document.
@@ -104,7 +108,7 @@ module SpeakeasyClientSDK
104
108
  url, params = @sdk_configuration.get_server_details
105
109
  base_url = Utils.template_url(url, params)
106
110
  url = Utils.generate_url(
107
- Operations::GenerateOpenApiSpecForApiEndpointRequest,
111
+ ::SpeakeasyClientSDK::Operations::GenerateOpenApiSpecForApiEndpointRequest,
108
112
  base_url,
109
113
  '/v1/apis/{apiID}/version/{versionID}/api_endpoints/{apiEndpointID}/generate/openapi',
110
114
  request
@@ -120,32 +124,33 @@ module SpeakeasyClientSDK
120
124
 
121
125
  content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
122
126
 
123
- res = Operations::GenerateOpenApiSpecForApiEndpointResponse.new(
127
+ res = ::SpeakeasyClientSDK::Operations::GenerateOpenApiSpecForApiEndpointResponse.new(
124
128
  status_code: r.status, content_type: content_type, raw_response: r
125
129
  )
126
130
  if r.status == 200
127
131
  if Utils.match_content_type(content_type, 'application/json')
128
- out = Utils.unmarshal_complex(r.env.response_body, Shared::GenerateOpenApiSpecDiff)
132
+ out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::GenerateOpenApiSpecDiff)
129
133
  res.generate_open_api_spec_diff = out
130
134
  end
131
135
  else
132
136
 
133
137
  if Utils.match_content_type(content_type, 'application/json')
134
- out = Utils.unmarshal_complex(r.env.response_body, Shared::Error)
138
+ out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::Error)
135
139
  res.error = out
136
140
  end
137
141
  end
138
142
  res
139
143
  end
140
144
 
141
- sig { params(request: T.nilable(Operations::GeneratePostmanCollectionForApiEndpointRequest)).returns(Utils::FieldAugmented) }
145
+
146
+ sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GeneratePostmanCollectionForApiEndpointRequest)).returns(Utils::FieldAugmented) }
142
147
  def generate_postman_collection_for_api_endpoint(request)
143
148
  # generate_postman_collection_for_api_endpoint - Generate a Postman collection for a particular ApiEndpoint.
144
149
  # Generates a postman collection that allows the endpoint to be called from postman variables produced for any path/query/header parameters included in the OpenAPI document.
145
150
  url, params = @sdk_configuration.get_server_details
146
151
  base_url = Utils.template_url(url, params)
147
152
  url = Utils.generate_url(
148
- Operations::GeneratePostmanCollectionForApiEndpointRequest,
153
+ ::SpeakeasyClientSDK::Operations::GeneratePostmanCollectionForApiEndpointRequest,
149
154
  base_url,
150
155
  '/v1/apis/{apiID}/version/{versionID}/api_endpoints/{apiEndpointID}/generate/postman',
151
156
  request
@@ -161,7 +166,7 @@ module SpeakeasyClientSDK
161
166
 
162
167
  content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
163
168
 
164
- res = Operations::GeneratePostmanCollectionForApiEndpointResponse.new(
169
+ res = ::SpeakeasyClientSDK::Operations::GeneratePostmanCollectionForApiEndpointResponse.new(
165
170
  status_code: r.status, content_type: content_type, raw_response: r
166
171
  )
167
172
  if r.status == 200
@@ -170,20 +175,21 @@ module SpeakeasyClientSDK
170
175
  else
171
176
 
172
177
  if Utils.match_content_type(content_type, 'application/json')
173
- out = Utils.unmarshal_complex(r.env.response_body, Shared::Error)
178
+ out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::Error)
174
179
  res.error = out
175
180
  end
176
181
  end
177
182
  res
178
183
  end
179
184
 
180
- sig { params(request: T.nilable(Operations::GetAllApiEndpointsRequest)).returns(Utils::FieldAugmented) }
185
+
186
+ sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GetAllApiEndpointsRequest)).returns(Utils::FieldAugmented) }
181
187
  def get_all_api_endpoints(request)
182
188
  # get_all_api_endpoints - Get all Api endpoints for a particular apiID.
183
189
  url, params = @sdk_configuration.get_server_details
184
190
  base_url = Utils.template_url(url, params)
185
191
  url = Utils.generate_url(
186
- Operations::GetAllApiEndpointsRequest,
192
+ ::SpeakeasyClientSDK::Operations::GetAllApiEndpointsRequest,
187
193
  base_url,
188
194
  '/v1/apis/{apiID}/api_endpoints',
189
195
  request
@@ -199,31 +205,32 @@ module SpeakeasyClientSDK
199
205
 
200
206
  content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
201
207
 
202
- res = Operations::GetAllApiEndpointsResponse.new(
208
+ res = ::SpeakeasyClientSDK::Operations::GetAllApiEndpointsResponse.new(
203
209
  status_code: r.status, content_type: content_type, raw_response: r
204
210
  )
205
211
  if r.status == 200
206
212
  if Utils.match_content_type(content_type, 'application/json')
207
- out = Utils.unmarshal_complex(r.env.response_body, T::Array[Shared::ApiEndpoint])
213
+ out = Utils.unmarshal_complex(r.env.response_body, T::Array[::SpeakeasyClientSDK::Shared::ApiEndpoint])
208
214
  res.classes = out
209
215
  end
210
216
  else
211
217
 
212
218
  if Utils.match_content_type(content_type, 'application/json')
213
- out = Utils.unmarshal_complex(r.env.response_body, Shared::Error)
219
+ out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::Error)
214
220
  res.error = out
215
221
  end
216
222
  end
217
223
  res
218
224
  end
219
225
 
220
- sig { params(request: T.nilable(Operations::GetAllForVersionApiEndpointsRequest)).returns(Utils::FieldAugmented) }
226
+
227
+ sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GetAllForVersionApiEndpointsRequest)).returns(Utils::FieldAugmented) }
221
228
  def get_all_for_version_api_endpoints(request)
222
229
  # get_all_for_version_api_endpoints - Get all ApiEndpoints for a particular apiID and versionID.
223
230
  url, params = @sdk_configuration.get_server_details
224
231
  base_url = Utils.template_url(url, params)
225
232
  url = Utils.generate_url(
226
- Operations::GetAllForVersionApiEndpointsRequest,
233
+ ::SpeakeasyClientSDK::Operations::GetAllForVersionApiEndpointsRequest,
227
234
  base_url,
228
235
  '/v1/apis/{apiID}/version/{versionID}/api_endpoints',
229
236
  request
@@ -239,31 +246,32 @@ module SpeakeasyClientSDK
239
246
 
240
247
  content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
241
248
 
242
- res = Operations::GetAllForVersionApiEndpointsResponse.new(
249
+ res = ::SpeakeasyClientSDK::Operations::GetAllForVersionApiEndpointsResponse.new(
243
250
  status_code: r.status, content_type: content_type, raw_response: r
244
251
  )
245
252
  if r.status == 200
246
253
  if Utils.match_content_type(content_type, 'application/json')
247
- out = Utils.unmarshal_complex(r.env.response_body, T::Array[Shared::ApiEndpoint])
254
+ out = Utils.unmarshal_complex(r.env.response_body, T::Array[::SpeakeasyClientSDK::Shared::ApiEndpoint])
248
255
  res.classes = out
249
256
  end
250
257
  else
251
258
 
252
259
  if Utils.match_content_type(content_type, 'application/json')
253
- out = Utils.unmarshal_complex(r.env.response_body, Shared::Error)
260
+ out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::Error)
254
261
  res.error = out
255
262
  end
256
263
  end
257
264
  res
258
265
  end
259
266
 
260
- sig { params(request: T.nilable(Operations::GetApiEndpointRequest)).returns(Utils::FieldAugmented) }
267
+
268
+ sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GetApiEndpointRequest)).returns(Utils::FieldAugmented) }
261
269
  def get_api_endpoint(request)
262
270
  # get_api_endpoint - Get an ApiEndpoint.
263
271
  url, params = @sdk_configuration.get_server_details
264
272
  base_url = Utils.template_url(url, params)
265
273
  url = Utils.generate_url(
266
- Operations::GetApiEndpointRequest,
274
+ ::SpeakeasyClientSDK::Operations::GetApiEndpointRequest,
267
275
  base_url,
268
276
  '/v1/apis/{apiID}/version/{versionID}/api_endpoints/{apiEndpointID}',
269
277
  request
@@ -279,32 +287,33 @@ module SpeakeasyClientSDK
279
287
 
280
288
  content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
281
289
 
282
- res = Operations::GetApiEndpointResponse.new(
290
+ res = ::SpeakeasyClientSDK::Operations::GetApiEndpointResponse.new(
283
291
  status_code: r.status, content_type: content_type, raw_response: r
284
292
  )
285
293
  if r.status == 200
286
294
  if Utils.match_content_type(content_type, 'application/json')
287
- out = Utils.unmarshal_complex(r.env.response_body, Shared::ApiEndpoint)
295
+ out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::ApiEndpoint)
288
296
  res.api_endpoint = out
289
297
  end
290
298
  else
291
299
 
292
300
  if Utils.match_content_type(content_type, 'application/json')
293
- out = Utils.unmarshal_complex(r.env.response_body, Shared::Error)
301
+ out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::Error)
294
302
  res.error = out
295
303
  end
296
304
  end
297
305
  res
298
306
  end
299
307
 
300
- sig { params(request: Operations::UpsertApiEndpointRequest).returns(Utils::FieldAugmented) }
308
+
309
+ sig { params(request: ::SpeakeasyClientSDK::Operations::UpsertApiEndpointRequest).returns(Utils::FieldAugmented) }
301
310
  def upsert_api_endpoint(request)
302
311
  # upsert_api_endpoint - Upsert an ApiEndpoint.
303
312
  # Upsert an ApiEndpoint. If the ApiEndpoint does not exist it will be created, otherwise it will be updated.
304
313
  url, params = @sdk_configuration.get_server_details
305
314
  base_url = Utils.template_url(url, params)
306
315
  url = Utils.generate_url(
307
- Operations::UpsertApiEndpointRequest,
316
+ ::SpeakeasyClientSDK::Operations::UpsertApiEndpointRequest,
308
317
  base_url,
309
318
  '/v1/apis/{apiID}/version/{versionID}/api_endpoints/{apiEndpointID}',
310
319
  request
@@ -330,18 +339,18 @@ module SpeakeasyClientSDK
330
339
 
331
340
  content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
332
341
 
333
- res = Operations::UpsertApiEndpointResponse.new(
342
+ res = ::SpeakeasyClientSDK::Operations::UpsertApiEndpointResponse.new(
334
343
  status_code: r.status, content_type: content_type, raw_response: r
335
344
  )
336
345
  if r.status == 200
337
346
  if Utils.match_content_type(content_type, 'application/json')
338
- out = Utils.unmarshal_complex(r.env.response_body, Shared::ApiEndpoint)
347
+ out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::ApiEndpoint)
339
348
  res.api_endpoint = out
340
349
  end
341
350
  else
342
351
 
343
352
  if Utils.match_content_type(content_type, 'application/json')
344
- out = Utils.unmarshal_complex(r.env.response_body, Shared::Error)
353
+ out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::Error)
345
354
  res.error = out
346
355
  end
347
356
  end
@@ -10,21 +10,23 @@ require 'sorbet-runtime'
10
10
  module SpeakeasyClientSDK
11
11
  extend T::Sig
12
12
  class Apis
13
- # REST APIs for managing Api entities
14
13
  extend T::Sig
14
+ # REST APIs for managing Api 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::DeleteApiRequest)).returns(Utils::FieldAugmented) }
21
+
22
+ sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::DeleteApiRequest)).returns(Utils::FieldAugmented) }
21
23
  def delete_api(request)
22
24
  # delete_api - Delete an Api.
23
25
  # Delete a particular version of an Api. The will also delete all associated ApiEndpoints, Metadata, Schemas & Request Logs (if using a Postgres datastore).
24
26
  url, params = @sdk_configuration.get_server_details
25
27
  base_url = Utils.template_url(url, params)
26
28
  url = Utils.generate_url(
27
- Operations::DeleteApiRequest,
29
+ ::SpeakeasyClientSDK::Operations::DeleteApiRequest,
28
30
  base_url,
29
31
  '/v1/apis/{apiID}/version/{versionID}',
30
32
  request
@@ -40,21 +42,22 @@ module SpeakeasyClientSDK
40
42
 
41
43
  content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
42
44
 
43
- res = Operations::DeleteApiResponse.new(
45
+ res = ::SpeakeasyClientSDK::Operations::DeleteApiResponse.new(
44
46
  status_code: r.status, content_type: content_type, raw_response: r
45
47
  )
46
48
  if r.status == 200
47
49
  else
48
50
 
49
51
  if Utils.match_content_type(content_type, 'application/json')
50
- out = Utils.unmarshal_complex(r.env.response_body, Shared::Error)
52
+ out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::Error)
51
53
  res.error = out
52
54
  end
53
55
  end
54
56
  res
55
57
  end
56
58
 
57
- sig { params(request: T.nilable(Operations::GenerateOpenApiSpecRequest)).returns(Utils::FieldAugmented) }
59
+
60
+ sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GenerateOpenApiSpecRequest)).returns(Utils::FieldAugmented) }
58
61
  def generate_open_api_spec(request)
59
62
  # generate_open_api_spec - Generate an OpenAPI specification for a particular Api.
60
63
  # This endpoint will generate any missing operations in any registered OpenAPI document if the operation does not already exist in the document.
@@ -62,7 +65,7 @@ module SpeakeasyClientSDK
62
65
  url, params = @sdk_configuration.get_server_details
63
66
  base_url = Utils.template_url(url, params)
64
67
  url = Utils.generate_url(
65
- Operations::GenerateOpenApiSpecRequest,
68
+ ::SpeakeasyClientSDK::Operations::GenerateOpenApiSpecRequest,
66
69
  base_url,
67
70
  '/v1/apis/{apiID}/version/{versionID}/generate/openapi',
68
71
  request
@@ -78,32 +81,33 @@ module SpeakeasyClientSDK
78
81
 
79
82
  content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
80
83
 
81
- res = Operations::GenerateOpenApiSpecResponse.new(
84
+ res = ::SpeakeasyClientSDK::Operations::GenerateOpenApiSpecResponse.new(
82
85
  status_code: r.status, content_type: content_type, raw_response: r
83
86
  )
84
87
  if r.status == 200
85
88
  if Utils.match_content_type(content_type, 'application/json')
86
- out = Utils.unmarshal_complex(r.env.response_body, Shared::GenerateOpenApiSpecDiff)
89
+ out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::GenerateOpenApiSpecDiff)
87
90
  res.generate_open_api_spec_diff = out
88
91
  end
89
92
  else
90
93
 
91
94
  if Utils.match_content_type(content_type, 'application/json')
92
- out = Utils.unmarshal_complex(r.env.response_body, Shared::Error)
95
+ out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::Error)
93
96
  res.error = out
94
97
  end
95
98
  end
96
99
  res
97
100
  end
98
101
 
99
- sig { params(request: T.nilable(Operations::GeneratePostmanCollectionRequest)).returns(Utils::FieldAugmented) }
102
+
103
+ sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GeneratePostmanCollectionRequest)).returns(Utils::FieldAugmented) }
100
104
  def generate_postman_collection(request)
101
105
  # generate_postman_collection - Generate a Postman collection for a particular Api.
102
106
  # Generates a postman collection containing all endpoints for a particular API. Includes variables produced for any path/query/header parameters included in the OpenAPI document.
103
107
  url, params = @sdk_configuration.get_server_details
104
108
  base_url = Utils.template_url(url, params)
105
109
  url = Utils.generate_url(
106
- Operations::GeneratePostmanCollectionRequest,
110
+ ::SpeakeasyClientSDK::Operations::GeneratePostmanCollectionRequest,
107
111
  base_url,
108
112
  '/v1/apis/{apiID}/version/{versionID}/generate/postman',
109
113
  request
@@ -119,7 +123,7 @@ module SpeakeasyClientSDK
119
123
 
120
124
  content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
121
125
 
122
- res = Operations::GeneratePostmanCollectionResponse.new(
126
+ res = ::SpeakeasyClientSDK::Operations::GeneratePostmanCollectionResponse.new(
123
127
  status_code: r.status, content_type: content_type, raw_response: r
124
128
  )
125
129
  if r.status == 200
@@ -128,14 +132,15 @@ module SpeakeasyClientSDK
128
132
  else
129
133
 
130
134
  if Utils.match_content_type(content_type, 'application/json')
131
- out = Utils.unmarshal_complex(r.env.response_body, Shared::Error)
135
+ out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::Error)
132
136
  res.error = out
133
137
  end
134
138
  end
135
139
  res
136
140
  end
137
141
 
138
- sig { params(request: T.nilable(Operations::GetAllApiVersionsRequest)).returns(Utils::FieldAugmented) }
142
+
143
+ sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GetAllApiVersionsRequest)).returns(Utils::FieldAugmented) }
139
144
  def get_all_api_versions(request)
140
145
  # get_all_api_versions - Get all Api versions for a particular ApiEndpoint.
141
146
  # Get all Api versions for a particular ApiEndpoint.
@@ -143,13 +148,13 @@ module SpeakeasyClientSDK
143
148
  url, params = @sdk_configuration.get_server_details
144
149
  base_url = Utils.template_url(url, params)
145
150
  url = Utils.generate_url(
146
- Operations::GetAllApiVersionsRequest,
151
+ ::SpeakeasyClientSDK::Operations::GetAllApiVersionsRequest,
147
152
  base_url,
148
153
  '/v1/apis/{apiID}',
149
154
  request
150
155
  )
151
156
  headers = {}
152
- query_params = Utils.get_query_params(Operations::GetAllApiVersionsRequest, request)
157
+ query_params = Utils.get_query_params(::SpeakeasyClientSDK::Operations::GetAllApiVersionsRequest, request)
153
158
  headers['Accept'] = 'application/json'
154
159
  headers['user-agent'] = @sdk_configuration.user_agent
155
160
 
@@ -161,25 +166,26 @@ module SpeakeasyClientSDK
161
166
 
162
167
  content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
163
168
 
164
- res = Operations::GetAllApiVersionsResponse.new(
169
+ res = ::SpeakeasyClientSDK::Operations::GetAllApiVersionsResponse.new(
165
170
  status_code: r.status, content_type: content_type, raw_response: r
166
171
  )
167
172
  if r.status == 200
168
173
  if Utils.match_content_type(content_type, 'application/json')
169
- out = Utils.unmarshal_complex(r.env.response_body, T::Array[Shared::Api])
174
+ out = Utils.unmarshal_complex(r.env.response_body, T::Array[::SpeakeasyClientSDK::Shared::Api])
170
175
  res.classes = out
171
176
  end
172
177
  else
173
178
 
174
179
  if Utils.match_content_type(content_type, 'application/json')
175
- out = Utils.unmarshal_complex(r.env.response_body, Shared::Error)
180
+ out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::Error)
176
181
  res.error = out
177
182
  end
178
183
  end
179
184
  res
180
185
  end
181
186
 
182
- sig { params(request: T.nilable(Operations::GetApisRequest)).returns(Utils::FieldAugmented) }
187
+
188
+ sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GetApisRequest)).returns(Utils::FieldAugmented) }
183
189
  def get_apis(request)
184
190
  # get_apis - Get a list of Apis for a given workspace
185
191
  # Get a list of all Apis and their versions for a given workspace.
@@ -188,7 +194,7 @@ module SpeakeasyClientSDK
188
194
  base_url = Utils.template_url(url, params)
189
195
  url = "#{base_url}/v1/apis"
190
196
  headers = {}
191
- query_params = Utils.get_query_params(Operations::GetApisRequest, request)
197
+ query_params = Utils.get_query_params(::SpeakeasyClientSDK::Operations::GetApisRequest, request)
192
198
  headers['Accept'] = 'application/json'
193
199
  headers['user-agent'] = @sdk_configuration.user_agent
194
200
 
@@ -200,25 +206,26 @@ module SpeakeasyClientSDK
200
206
 
201
207
  content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
202
208
 
203
- res = Operations::GetApisResponse.new(
209
+ res = ::SpeakeasyClientSDK::Operations::GetApisResponse.new(
204
210
  status_code: r.status, content_type: content_type, raw_response: r
205
211
  )
206
212
  if r.status == 200
207
213
  if Utils.match_content_type(content_type, 'application/json')
208
- out = Utils.unmarshal_complex(r.env.response_body, T::Array[Shared::Api])
214
+ out = Utils.unmarshal_complex(r.env.response_body, T::Array[::SpeakeasyClientSDK::Shared::Api])
209
215
  res.classes = out
210
216
  end
211
217
  else
212
218
 
213
219
  if Utils.match_content_type(content_type, 'application/json')
214
- out = Utils.unmarshal_complex(r.env.response_body, Shared::Error)
220
+ out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::Error)
215
221
  res.error = out
216
222
  end
217
223
  end
218
224
  res
219
225
  end
220
226
 
221
- sig { params(request: Operations::UpsertApiRequest).returns(Utils::FieldAugmented) }
227
+
228
+ sig { params(request: ::SpeakeasyClientSDK::Operations::UpsertApiRequest).returns(Utils::FieldAugmented) }
222
229
  def upsert_api(request)
223
230
  # upsert_api - Upsert an Api
224
231
  # Upsert an Api. If the Api does not exist, it will be created.
@@ -226,7 +233,7 @@ module SpeakeasyClientSDK
226
233
  url, params = @sdk_configuration.get_server_details
227
234
  base_url = Utils.template_url(url, params)
228
235
  url = Utils.generate_url(
229
- Operations::UpsertApiRequest,
236
+ ::SpeakeasyClientSDK::Operations::UpsertApiRequest,
230
237
  base_url,
231
238
  '/v1/apis/{apiID}',
232
239
  request
@@ -252,18 +259,18 @@ module SpeakeasyClientSDK
252
259
 
253
260
  content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
254
261
 
255
- res = Operations::UpsertApiResponse.new(
262
+ res = ::SpeakeasyClientSDK::Operations::UpsertApiResponse.new(
256
263
  status_code: r.status, content_type: content_type, raw_response: r
257
264
  )
258
265
  if r.status == 200
259
266
  if Utils.match_content_type(content_type, 'application/json')
260
- out = Utils.unmarshal_complex(r.env.response_body, Shared::Api)
267
+ out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::Api)
261
268
  res.api = out
262
269
  end
263
270
  else
264
271
 
265
272
  if Utils.match_content_type(content_type, 'application/json')
266
- out = Utils.unmarshal_complex(r.env.response_body, Shared::Error)
273
+ out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::Error)
267
274
  res.error = out
268
275
  end
269
276
  end