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
@@ -1,62 +0,0 @@
1
- # Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
2
-
3
- # typed: true
4
- # frozen_string_literal: true
5
-
6
- require 'sorbet-runtime'
7
- require 'faraday'
8
- require_relative '../shared/apiendpoint'
9
- require_relative '../shared/error'
10
-
11
- module SpeakeasyClientSDK
12
- module Operations
13
-
14
- class UpsertApiEndpointRequest < ::SpeakeasyClientSDK::Utils::FieldAugmented
15
- extend T::Sig
16
-
17
- # A JSON representation of the ApiEndpoint to upsert.
18
- field :api_endpoint, Shared::ApiEndpointInput, { 'request': { 'media_type': 'application/json' } }
19
- # The ID of the ApiEndpoint to upsert.
20
- field :api_endpoint_id, String, { 'path_param': { 'field_name': 'apiEndpointID', 'style': 'simple', 'explode': false } }
21
- # The ID of the Api the ApiEndpoint belongs to.
22
- field :api_id, String, { 'path_param': { 'field_name': 'apiID', 'style': 'simple', 'explode': false } }
23
- # The version ID of the Api the ApiEndpoint belongs to.
24
- field :version_id, String, { 'path_param': { 'field_name': 'versionID', 'style': 'simple', 'explode': false } }
25
-
26
-
27
- sig { params(api_endpoint: Shared::ApiEndpointInput, api_endpoint_id: String, api_id: String, version_id: String).void }
28
- def initialize(api_endpoint: nil, api_endpoint_id: nil, api_id: nil, version_id: nil)
29
- @api_endpoint = api_endpoint
30
- @api_endpoint_id = api_endpoint_id
31
- @api_id = api_id
32
- @version_id = version_id
33
- end
34
- end
35
-
36
-
37
- class UpsertApiEndpointResponse < ::SpeakeasyClientSDK::Utils::FieldAugmented
38
- extend T::Sig
39
-
40
- # HTTP response content type for this operation
41
- field :content_type, String
42
- # Raw HTTP response; suitable for custom response parsing
43
- field :raw_response, Faraday::Response
44
- # HTTP response status code for this operation
45
- field :status_code, Integer
46
- # OK
47
- field :api_endpoint, T.nilable(Shared::ApiEndpoint)
48
- # Default error response
49
- field :error, T.nilable(Shared::Error)
50
-
51
-
52
- sig { params(content_type: String, raw_response: Faraday::Response, status_code: Integer, api_endpoint: T.nilable(Shared::ApiEndpoint), error: T.nilable(Shared::Error)).void }
53
- def initialize(content_type: nil, raw_response: nil, status_code: nil, api_endpoint: nil, error: nil)
54
- @content_type = content_type
55
- @raw_response = raw_response
56
- @status_code = status_code
57
- @api_endpoint = api_endpoint
58
- @error = error
59
- end
60
- end
61
- end
62
- end
@@ -1,39 +0,0 @@
1
- # Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
2
-
3
- # typed: true
4
- # frozen_string_literal: true
5
-
6
- require 'sorbet-runtime'
7
- require 'faraday'
8
- require_relative '../shared/error'
9
- require_relative '../shared/plugin'
10
-
11
- module SpeakeasyClientSDK
12
- module Operations
13
-
14
- class UpsertPluginResponse < ::SpeakeasyClientSDK::Utils::FieldAugmented
15
- extend T::Sig
16
-
17
- # HTTP response content type for this operation
18
- field :content_type, String
19
- # Raw HTTP response; suitable for custom response parsing
20
- field :raw_response, Faraday::Response
21
- # HTTP response status code for this operation
22
- field :status_code, Integer
23
- # Default error response
24
- field :error, T.nilable(Shared::Error)
25
- # OK
26
- field :plugin, T.nilable(Shared::Plugin)
27
-
28
-
29
- sig { params(content_type: String, raw_response: Faraday::Response, status_code: Integer, error: T.nilable(Shared::Error), plugin: T.nilable(Shared::Plugin)).void }
30
- def initialize(content_type: nil, raw_response: nil, status_code: nil, error: nil, plugin: nil)
31
- @content_type = content_type
32
- @raw_response = raw_response
33
- @status_code = status_code
34
- @error = error
35
- @plugin = plugin
36
- end
37
- end
38
- end
39
- end
@@ -1,55 +0,0 @@
1
- # Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
2
-
3
- # typed: true
4
- # frozen_string_literal: true
5
-
6
- require 'sorbet-runtime'
7
- require 'faraday'
8
-
9
- module SpeakeasyClientSDK
10
- module Shared
11
- # An ApiEndpoint is a description of an Endpoint for an API.
12
- class ApiEndpoint < ::SpeakeasyClientSDK::Utils::FieldAugmented
13
- extend T::Sig
14
-
15
- # The ID of this ApiEndpoint. This is a hash of the method and path.
16
- field :api_endpoint_id, String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('api_endpoint_id') } }
17
- # The ID of the Api this ApiEndpoint belongs to.
18
- field :api_id, String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('api_id') } }
19
- # Creation timestamp.
20
- field :created_at, DateTime, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } }
21
- # A detailed description of the ApiEndpoint.
22
- field :description, String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('description') } }
23
- # A human-readable name for the ApiEndpoint.
24
- field :display_name, String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('display_name') } }
25
- # HTTP verb.
26
- field :method, String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('method') } }
27
- # Path that handles this Api.
28
- field :path, String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('path') } }
29
- # Last update timestamp.
30
- field :updated_at, DateTime, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('updated_at'), 'decoder': Utils.datetime_from_iso_format(false) } }
31
- # The version ID of the Api this ApiEndpoint belongs to.
32
- field :version_id, String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('version_id') } }
33
- # The workspace ID this ApiEndpoint belongs to.
34
- field :workspace_id, String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('workspace_id') } }
35
- # Determines if the endpoint was found in the OpenAPI spec associated with the parent Api.
36
- field :matched, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('matched') } }
37
-
38
-
39
- sig { params(api_endpoint_id: String, api_id: String, created_at: DateTime, description: String, display_name: String, method: String, path: String, updated_at: DateTime, version_id: String, workspace_id: String, matched: T.nilable(T::Boolean)).void }
40
- def initialize(api_endpoint_id: nil, api_id: nil, created_at: nil, description: nil, display_name: nil, method: nil, path: nil, updated_at: nil, version_id: nil, workspace_id: nil, matched: nil)
41
- @api_endpoint_id = api_endpoint_id
42
- @api_id = api_id
43
- @created_at = created_at
44
- @description = description
45
- @display_name = display_name
46
- @method = method
47
- @path = path
48
- @updated_at = updated_at
49
- @version_id = version_id
50
- @workspace_id = workspace_id
51
- @matched = matched
52
- end
53
- end
54
- end
55
- end
@@ -1,64 +0,0 @@
1
- # Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
2
-
3
- # typed: true
4
- # frozen_string_literal: true
5
-
6
- require 'sorbet-runtime'
7
- require 'faraday'
8
-
9
- module SpeakeasyClientSDK
10
- module Shared
11
- # A BoundedRequest is a request that has been logged by the Speakeasy without the contents of the request.
12
- class BoundedRequest < ::SpeakeasyClientSDK::Utils::FieldAugmented
13
- extend T::Sig
14
-
15
- # The ID of the ApiEndpoint this request was made to.
16
- field :api_endpoint_id, String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('api_endpoint_id') } }
17
- # The ID of the Api this request was made to.
18
- field :api_id, String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('api_id') } }
19
- # Creation timestamp.
20
- field :created_at, DateTime, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } }
21
- # The ID of the customer that made this request.
22
- field :customer_id, String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('customer_id') } }
23
- # The latency of the request.
24
- field :latency, Integer, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('latency') } }
25
- # HTTP verb.
26
- field :method, String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('method') } }
27
- # The path of the request.
28
- field :path, String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('path') } }
29
- # The time the request finished.
30
- field :request_finish_time, DateTime, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('request_finish_time'), 'decoder': Utils.datetime_from_iso_format(false) } }
31
- # The ID of this request.
32
- field :request_id, String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('request_id') } }
33
- # The time the request was made.
34
- field :request_start_time, DateTime, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('request_start_time'), 'decoder': Utils.datetime_from_iso_format(false) } }
35
- # The status code of the request.
36
- field :status, Integer, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('status') } }
37
- # The version ID of the Api this request was made to.
38
- field :version_id, String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('version_id') } }
39
- # The workspace ID this request was made to.
40
- field :workspace_id, String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('workspace_id') } }
41
- # Metadata associated with this request
42
- field :metadata, T.nilable(T::Array[Shared::RequestMetadata]), { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('metadata') } }
43
-
44
-
45
- sig { params(api_endpoint_id: String, api_id: String, created_at: DateTime, customer_id: String, latency: Integer, method: String, path: String, request_finish_time: DateTime, request_id: String, request_start_time: DateTime, status: Integer, version_id: String, workspace_id: String, metadata: T.nilable(T::Array[Shared::RequestMetadata])).void }
46
- def initialize(api_endpoint_id: nil, api_id: nil, created_at: nil, customer_id: nil, latency: nil, method: nil, path: nil, request_finish_time: nil, request_id: nil, request_start_time: nil, status: nil, version_id: nil, workspace_id: nil, metadata: nil)
47
- @api_endpoint_id = api_endpoint_id
48
- @api_id = api_id
49
- @created_at = created_at
50
- @customer_id = customer_id
51
- @latency = latency
52
- @method = method
53
- @path = path
54
- @request_finish_time = request_finish_time
55
- @request_id = request_id
56
- @request_start_time = request_start_time
57
- @status = status
58
- @version_id = version_id
59
- @workspace_id = workspace_id
60
- @metadata = metadata
61
- end
62
- end
63
- end
64
- end
@@ -1,52 +0,0 @@
1
- # Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
2
-
3
- # typed: true
4
- # frozen_string_literal: true
5
-
6
- require 'sorbet-runtime'
7
- require 'faraday'
8
-
9
- module SpeakeasyClientSDK
10
- module Shared
11
- # A representation of an embed token granted for working with Speakeasy components.
12
- class EmbedToken < ::SpeakeasyClientSDK::Utils::FieldAugmented
13
- extend T::Sig
14
-
15
- # Creation timestamp.
16
- field :created_at, DateTime, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } }
17
- # The ID of the user that created this token.
18
- field :created_by, String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('created_by') } }
19
- # A detailed description of the EmbedToken.
20
- field :description, String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('description') } }
21
- # The time this token expires.
22
- field :expires_at, DateTime, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('expires_at'), 'decoder': Utils.datetime_from_iso_format(false) } }
23
- # The filters applied to this token.
24
- field :filters, String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('filters') } }
25
- # The ID of this EmbedToken.
26
- field :id, String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('id') } }
27
- # The workspace ID this token belongs to.
28
- field :workspace_id, String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('workspace_id') } }
29
- # The last time this token was used.
30
- field :last_used, T.nilable(DateTime), { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('last_used'), 'decoder': Utils.datetime_from_iso_format(true) } }
31
- # The time this token was revoked.
32
- field :revoked_at, T.nilable(DateTime), { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('revoked_at'), 'decoder': Utils.datetime_from_iso_format(true) } }
33
- # The ID of the user that revoked this token.
34
- field :revoked_by, T.nilable(String), { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('revoked_by') } }
35
-
36
-
37
- sig { params(created_at: DateTime, created_by: String, description: String, expires_at: DateTime, filters: String, id: String, workspace_id: String, last_used: T.nilable(DateTime), revoked_at: T.nilable(DateTime), revoked_by: T.nilable(String)).void }
38
- def initialize(created_at: nil, created_by: nil, description: nil, expires_at: nil, filters: nil, id: nil, workspace_id: nil, last_used: nil, revoked_at: nil, revoked_by: nil)
39
- @created_at = created_at
40
- @created_by = created_by
41
- @description = description
42
- @expires_at = expires_at
43
- @filters = filters
44
- @id = id
45
- @workspace_id = workspace_id
46
- @last_used = last_used
47
- @revoked_at = revoked_at
48
- @revoked_by = revoked_by
49
- end
50
- end
51
- end
52
- end
@@ -1,43 +0,0 @@
1
- # Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
2
-
3
- # typed: true
4
- # frozen_string_literal: true
5
-
6
- require 'sorbet-runtime'
7
- require 'faraday'
8
-
9
- module SpeakeasyClientSDK
10
- module Shared
11
- # A plugin is a short script that is run against ingested requests
12
- class Plugin < ::SpeakeasyClientSDK::Utils::FieldAugmented
13
- extend T::Sig
14
-
15
-
16
- field :code, String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('code') } }
17
-
18
- field :plugin_id, String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('plugin_id') } }
19
-
20
- field :title, String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('title') } }
21
-
22
- field :workspace_id, String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('workspace_id') } }
23
-
24
- field :created_at, T.nilable(DateTime), { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(true) } }
25
-
26
- field :eval_hash, T.nilable(String), { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('eval_hash') } }
27
-
28
- field :updated_at, T.nilable(DateTime), { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('updated_at'), 'decoder': Utils.datetime_from_iso_format(true) } }
29
-
30
-
31
- sig { params(code: String, plugin_id: String, title: String, workspace_id: String, created_at: T.nilable(DateTime), eval_hash: T.nilable(String), updated_at: T.nilable(DateTime)).void }
32
- def initialize(code: nil, plugin_id: nil, title: nil, workspace_id: nil, created_at: nil, eval_hash: nil, updated_at: nil)
33
- @code = code
34
- @plugin_id = plugin_id
35
- @title = title
36
- @workspace_id = workspace_id
37
- @created_at = created_at
38
- @eval_hash = eval_hash
39
- @updated_at = updated_at
40
- end
41
- end
42
- end
43
- end
@@ -1,40 +0,0 @@
1
- # Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
2
-
3
- # typed: true
4
- # frozen_string_literal: true
5
-
6
- require 'sorbet-runtime'
7
- require 'faraday'
8
-
9
- module SpeakeasyClientSDK
10
- module Shared
11
- # A Schema represents an API schema for a particular Api and Version.
12
- class Schema < ::SpeakeasyClientSDK::Utils::FieldAugmented
13
- extend T::Sig
14
-
15
- # The ID of the Api this Schema belongs to.
16
- field :api_id, String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('api_id') } }
17
- # Creation timestamp.
18
- field :created_at, DateTime, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } }
19
- # A detailed description of the Schema.
20
- field :description, String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('description') } }
21
- # An ID referencing this particular revision of the Schema.
22
- field :revision_id, String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('revision_id') } }
23
- # The version ID of the Api this Schema belongs to.
24
- field :version_id, String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('version_id') } }
25
- # The workspace ID this Schema belongs to.
26
- field :workspace_id, String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('workspace_id') } }
27
-
28
-
29
- sig { params(api_id: String, created_at: DateTime, description: String, revision_id: String, version_id: String, workspace_id: String).void }
30
- def initialize(api_id: nil, created_at: nil, description: nil, revision_id: nil, version_id: nil, workspace_id: nil)
31
- @api_id = api_id
32
- @created_at = created_at
33
- @description = description
34
- @revision_id = revision_id
35
- @version_id = version_id
36
- @workspace_id = workspace_id
37
- end
38
- end
39
- end
40
- end
@@ -1,48 +0,0 @@
1
- # Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
2
-
3
- # typed: true
4
- # frozen_string_literal: true
5
-
6
- require 'sorbet-runtime'
7
- require 'faraday'
8
-
9
- module SpeakeasyClientSDK
10
- module Shared
11
-
12
- class ValueChange < ::SpeakeasyClientSDK::Utils::FieldAugmented
13
- extend T::Sig
14
-
15
- # Represents the previous value of the element.
16
- field :from, String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('From') } }
17
- # Represents the current value of the element.
18
- field :to, String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('To') } }
19
-
20
-
21
- sig { params(from: String, to: String).void }
22
- def initialize(from: nil, to: nil)
23
- @from = from
24
- @to = to
25
- end
26
- end
27
-
28
- # A SchemaDiff represents a diff of two Schemas.
29
- class SchemaDiff < ::SpeakeasyClientSDK::Utils::FieldAugmented
30
- extend T::Sig
31
-
32
- # Holds every addition change in the diff.
33
- field :additions, T::Array[String], { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('additions') } }
34
- # Holds every deletion change in the diff.
35
- field :deletions, T::Array[String], { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('deletions') } }
36
- # Holds every modification change in the diff.
37
- field :modifications, T::Hash[Symbol, Shared::ValueChange], { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('modifications') } }
38
-
39
-
40
- sig { params(additions: T::Array[String], deletions: T::Array[String], modifications: T::Hash[Symbol, Shared::ValueChange]).void }
41
- def initialize(additions: nil, deletions: nil, modifications: nil)
42
- @additions = additions
43
- @deletions = deletions
44
- @modifications = modifications
45
- end
46
- end
47
- end
48
- end
@@ -1,40 +0,0 @@
1
- # Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
2
-
3
- # typed: true
4
- # frozen_string_literal: true
5
-
6
- require 'sorbet-runtime'
7
- require 'faraday'
8
-
9
- module SpeakeasyClientSDK
10
- module Shared
11
- # A set of keys and associated values, attached to a particular version of an Api.
12
- class VersionMetadata < ::SpeakeasyClientSDK::Utils::FieldAugmented
13
- extend T::Sig
14
-
15
- # The ID of the Api this Metadata belongs to.
16
- field :api_id, String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('api_id') } }
17
- # Creation timestamp.
18
- field :created_at, DateTime, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } }
19
- # The key for this metadata.
20
- field :meta_key, String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('meta_key') } }
21
- # One of the values for this metadata.
22
- field :meta_value, String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('meta_value') } }
23
- # The version ID of the Api this Metadata belongs to.
24
- field :version_id, String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('version_id') } }
25
- # The workspace ID this Metadata belongs to.
26
- field :workspace_id, String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('workspace_id') } }
27
-
28
-
29
- sig { params(api_id: String, created_at: DateTime, meta_key: String, meta_value: String, version_id: String, workspace_id: String).void }
30
- def initialize(api_id: nil, created_at: nil, meta_key: nil, meta_value: nil, version_id: nil, workspace_id: nil)
31
- @api_id = api_id
32
- @created_at = created_at
33
- @meta_key = meta_key
34
- @meta_value = meta_value
35
- @version_id = version_id
36
- @workspace_id = workspace_id
37
- end
38
- end
39
- end
40
- end
data/lib/sdk/plugins.rb DELETED
@@ -1,142 +0,0 @@
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 Plugins
13
- # REST APIs for managing and running plugins
14
- extend T::Sig
15
- sig { params(sdk_config: SDKConfiguration).void }
16
- def initialize(sdk_config)
17
- @sdk_configuration = sdk_config
18
- end
19
-
20
- sig { returns(::SpeakeasyClientSDK::Utils::FieldAugmented) }
21
- def get_plugins
22
- # get_plugins - Get all plugins for the current workspace.
23
- url, params = @sdk_configuration.get_server_details
24
- base_url = Utils.template_url(url, params)
25
- url = "#{base_url}/v1/plugins"
26
- headers = {}
27
- headers['Accept'] = 'application/json'
28
- headers['user-agent'] = @sdk_configuration.user_agent
29
-
30
- r = @sdk_configuration.client.get(url) do |req|
31
- req.headers = headers
32
- Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
33
- end
34
-
35
- content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
36
-
37
- res = Operations::GetPluginsResponse.new(
38
- status_code: r.status, content_type: content_type, raw_response: r
39
- )
40
- if r.status == 200
41
- if Utils.match_content_type(content_type, 'application/json')
42
- out = Utils.unmarshal_complex(r.env.response_body, T::Array[Shared::Plugin])
43
- res.classes = out
44
- end
45
- else
46
-
47
- if Utils.match_content_type(content_type, 'application/json')
48
- out = Utils.unmarshal_complex(r.env.response_body, Shared::Error)
49
- res.error = out
50
- end
51
- end
52
- res
53
- end
54
-
55
- sig { params(request: T.nilable(Operations::RunPluginRequest)).returns(Utils::FieldAugmented) }
56
- def run_plugin(request)
57
- # run_plugin - Run a plugin
58
- url, params = @sdk_configuration.get_server_details
59
- base_url = Utils.template_url(url, params)
60
- url = Utils.generate_url(
61
- Operations::RunPluginRequest,
62
- base_url,
63
- '/v1/plugins/{pluginID}',
64
- request
65
- )
66
- headers = {}
67
- query_params = Utils.get_query_params(Operations::RunPluginRequest, request)
68
- headers['Accept'] = 'application/json'
69
- headers['user-agent'] = @sdk_configuration.user_agent
70
-
71
- r = @sdk_configuration.client.post(url) do |req|
72
- req.headers = headers
73
- req.params = query_params
74
- Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
75
- end
76
-
77
- content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
78
-
79
- res = Operations::RunPluginResponse.new(
80
- status_code: r.status, content_type: content_type, raw_response: r
81
- )
82
- if r.status == 200
83
- if Utils.match_content_type(content_type, 'application/json')
84
- out = Utils.unmarshal_complex(r.env.response_body, T::Array[Shared::BoundedRequest])
85
- res.classes = out
86
- end
87
- else
88
-
89
- if Utils.match_content_type(content_type, 'application/json')
90
- out = Utils.unmarshal_complex(r.env.response_body, Shared::Error)
91
- res.error = out
92
- end
93
- end
94
- res
95
- end
96
-
97
- sig { params(request: Shared::Plugin).returns(Utils::FieldAugmented) }
98
- def upsert_plugin(request)
99
- # upsert_plugin - Upsert a plugin
100
- url, params = @sdk_configuration.get_server_details
101
- base_url = Utils.template_url(url, params)
102
- url = "#{base_url}/v1/plugins"
103
- headers = {}
104
- req_content_type, data, form = Utils.serialize_request_body(request, :request, :json)
105
- headers['content-type'] = req_content_type
106
- raise StandardError, 'request body is required' if data.nil? && form.nil?
107
- headers['Accept'] = 'application/json'
108
- headers['user-agent'] = @sdk_configuration.user_agent
109
-
110
- r = @sdk_configuration.client.put(url) do |req|
111
- req.headers = headers
112
- Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
113
- if form
114
- req.body = Utils.encode_form(form)
115
- elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
116
- req.body = URI.encode_www_form(data)
117
- else
118
- req.body = data
119
- end
120
- end
121
-
122
- content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
123
-
124
- res = Operations::UpsertPluginResponse.new(
125
- status_code: r.status, content_type: content_type, raw_response: r
126
- )
127
- if r.status == 200
128
- if Utils.match_content_type(content_type, 'application/json')
129
- out = Utils.unmarshal_complex(r.env.response_body, Shared::Plugin)
130
- res.plugin = out
131
- end
132
- else
133
-
134
- if Utils.match_content_type(content_type, 'application/json')
135
- out = Utils.unmarshal_complex(r.env.response_body, Shared::Error)
136
- res.error = out
137
- end
138
- end
139
- res
140
- end
141
- end
142
- end