speakeasy_client_sdk_ruby 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. checksums.yaml +7 -0
  2. data/lib/sdk/apiendpoints.rb +338 -0
  3. data/lib/sdk/apis.rb +264 -0
  4. data/lib/sdk/embeds.rb +128 -0
  5. data/lib/sdk/metadata.rb +144 -0
  6. data/lib/sdk/models/operations/deleteapi.rb +52 -0
  7. data/lib/sdk/models/operations/deleteapiendpoint.rb +55 -0
  8. data/lib/sdk/models/operations/deleteschema.rb +55 -0
  9. data/lib/sdk/models/operations/deleteversionmetadata.rb +58 -0
  10. data/lib/sdk/models/operations/downloadschema.rb +55 -0
  11. data/lib/sdk/models/operations/downloadschemarevision.rb +58 -0
  12. data/lib/sdk/models/operations/findapiendpoint.rb +59 -0
  13. data/lib/sdk/models/operations/generateopenapispec.rb +56 -0
  14. data/lib/sdk/models/operations/generateopenapispecforapiendpoint.rb +59 -0
  15. data/lib/sdk/models/operations/generatepostmancollection.rb +55 -0
  16. data/lib/sdk/models/operations/generatepostmancollectionforapiendpoint.rb +58 -0
  17. data/lib/sdk/models/operations/generaterequestpostmancollection.rb +52 -0
  18. data/lib/sdk/models/operations/getallapiendpoints.rb +52 -0
  19. data/lib/sdk/models/operations/getallapiversions.rb +72 -0
  20. data/lib/sdk/models/operations/getallforversionapiendpoints.rb +55 -0
  21. data/lib/sdk/models/operations/getapiendpoint.rb +59 -0
  22. data/lib/sdk/models/operations/getapis.rb +69 -0
  23. data/lib/sdk/models/operations/getembedaccesstoken.rb +60 -0
  24. data/lib/sdk/models/operations/getplugins.rb +38 -0
  25. data/lib/sdk/models/operations/getrequestfromeventlog.rb +53 -0
  26. data/lib/sdk/models/operations/getschema.rb +56 -0
  27. data/lib/sdk/models/operations/getschemadiff.rb +62 -0
  28. data/lib/sdk/models/operations/getschemarevision.rb +59 -0
  29. data/lib/sdk/models/operations/getschemas.rb +55 -0
  30. data/lib/sdk/models/operations/getvalidembedaccesstokens.rb +38 -0
  31. data/lib/sdk/models/operations/getversionmetadata.rb +55 -0
  32. data/lib/sdk/models/operations/insertversionmetadata.rb +60 -0
  33. data/lib/sdk/models/operations/queryeventlog.rb +53 -0
  34. data/lib/sdk/models/operations/registerschema.rb +86 -0
  35. data/lib/sdk/models/operations/revokeembedaccesstoken.rb +49 -0
  36. data/lib/sdk/models/operations/runplugin.rb +56 -0
  37. data/lib/sdk/models/operations/upsertapi.rb +57 -0
  38. data/lib/sdk/models/operations/upsertapiendpoint.rb +63 -0
  39. data/lib/sdk/models/operations/upsertplugin.rb +39 -0
  40. data/lib/sdk/models/operations/validateapikey.rb +35 -0
  41. data/lib/sdk/models/shared/api.rb +69 -0
  42. data/lib/sdk/models/shared/apiendpoint.rb +84 -0
  43. data/lib/sdk/models/shared/boundedrequest.rb +64 -0
  44. data/lib/sdk/models/shared/embedaccesstokenresponse.rb +25 -0
  45. data/lib/sdk/models/shared/embedtoken.rb +52 -0
  46. data/lib/sdk/models/shared/error.rb +28 -0
  47. data/lib/sdk/models/shared/filter.rb +31 -0
  48. data/lib/sdk/models/shared/filters.rb +34 -0
  49. data/lib/sdk/models/shared/generateopenapispecdiff.rb +28 -0
  50. data/lib/sdk/models/shared/plugin.rb +43 -0
  51. data/lib/sdk/models/shared/requestmetadata.rb +28 -0
  52. data/lib/sdk/models/shared/schema.rb +40 -0
  53. data/lib/sdk/models/shared/schemadiff.rb +48 -0
  54. data/lib/sdk/models/shared/security.rb +25 -0
  55. data/lib/sdk/models/shared/unboundedrequest.rb +37 -0
  56. data/lib/sdk/models/shared/versionmetadata.rb +57 -0
  57. data/lib/sdk/plugins.rb +140 -0
  58. data/lib/sdk/requests.rb +136 -0
  59. data/lib/sdk/schemas.rb +334 -0
  60. data/lib/sdk/sdk.rb +173 -0
  61. data/lib/sdk/utils/metadata_fields.rb +154 -0
  62. data/lib/sdk/utils/retries.rb +130 -0
  63. data/lib/sdk/utils/utils.rb +769 -0
  64. data/lib/speakeasy_client_sdk_ruby.rb +70 -0
  65. metadata +206 -0
@@ -0,0 +1,56 @@
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/filters'
9
+ require_relative '../shared/error'
10
+
11
+ module SpeakeasyClientSDK
12
+ module Operations
13
+
14
+ class RunPluginRequest < SpeakeasyClientSDK::Utils::FieldAugmented
15
+ extend T::Sig
16
+
17
+ # The ID of the plugin to run.
18
+ field :plugin_id, String, { 'path_param': { 'field_name': 'pluginID', 'style': 'simple', 'explode': false } }
19
+ # The filter to apply to the query.
20
+ field :filters, T.nilable(Shared::Filters), { 'query_param': { 'field_name': 'filters', 'serialization': 'json' } }
21
+
22
+
23
+ sig { params(plugin_id: String, filters: T.nilable(Shared::Filters)).void }
24
+ def initialize(plugin_id: nil, filters: nil)
25
+ @plugin_id = plugin_id
26
+ @filters = filters
27
+ end
28
+ end
29
+
30
+
31
+ class RunPluginResponse < SpeakeasyClientSDK::Utils::FieldAugmented
32
+ extend T::Sig
33
+
34
+
35
+ field :content_type, String
36
+
37
+ field :status_code, Integer
38
+ # OK
39
+ field :bounded_requests, T.nilable(T::Array[Shared::BoundedRequest])
40
+ # Default error response
41
+ field :error, T.nilable(Shared::Error)
42
+
43
+ field :raw_response, T.nilable(Faraday::Response)
44
+
45
+
46
+ sig { params(content_type: String, status_code: Integer, bounded_requests: T.nilable(T::Array[Shared::BoundedRequest]), error: T.nilable(Shared::Error), raw_response: T.nilable(Faraday::Response)).void }
47
+ def initialize(content_type: nil, status_code: nil, bounded_requests: nil, error: nil, raw_response: nil)
48
+ @content_type = content_type
49
+ @status_code = status_code
50
+ @bounded_requests = bounded_requests
51
+ @error = error
52
+ @raw_response = raw_response
53
+ end
54
+ end
55
+ end
56
+ end
@@ -0,0 +1,57 @@
1
+ # Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
2
+
3
+ # typed: true
4
+ # frozen_string_literal: true
5
+
6
+ require 'sorbet-runtime'
7
+ require 'faraday'
8
+ require_relative '../shared/apiinput'
9
+ require_relative '../shared/api'
10
+ require_relative '../shared/error'
11
+
12
+ module SpeakeasyClientSDK
13
+ module Operations
14
+
15
+ class UpsertApiRequest < SpeakeasyClientSDK::Utils::FieldAugmented
16
+ extend T::Sig
17
+
18
+ # The ID of the Api to upsert.
19
+ field :api_id, String, { 'path_param': { 'field_name': 'apiID', 'style': 'simple', 'explode': false } }
20
+ # A JSON representation of the Api to upsert
21
+ field :api_input, Shared::ApiInput, { 'request': { 'media_type': 'application/json' } }
22
+
23
+
24
+ sig { params(api_id: String, api_input: Shared::ApiInput).void }
25
+ def initialize(api_id: nil, api_input: nil)
26
+ @api_id = api_id
27
+ @api_input = api_input
28
+ end
29
+ end
30
+
31
+
32
+ class UpsertApiResponse < SpeakeasyClientSDK::Utils::FieldAugmented
33
+ extend T::Sig
34
+
35
+
36
+ field :content_type, String
37
+
38
+ field :status_code, Integer
39
+ # OK
40
+ field :api, T.nilable(Shared::Api)
41
+ # Default error response
42
+ field :error, T.nilable(Shared::Error)
43
+
44
+ field :raw_response, T.nilable(Faraday::Response)
45
+
46
+
47
+ sig { params(content_type: String, status_code: Integer, api: T.nilable(Shared::Api), error: T.nilable(Shared::Error), raw_response: T.nilable(Faraday::Response)).void }
48
+ def initialize(content_type: nil, status_code: nil, api: nil, error: nil, raw_response: nil)
49
+ @content_type = content_type
50
+ @status_code = status_code
51
+ @api = api
52
+ @error = error
53
+ @raw_response = raw_response
54
+ end
55
+ end
56
+ end
57
+ end
@@ -0,0 +1,63 @@
1
+ # Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
2
+
3
+ # typed: true
4
+ # frozen_string_literal: true
5
+
6
+ require 'sorbet-runtime'
7
+ require 'faraday'
8
+ require_relative '../shared/apiendpointinput'
9
+ require_relative '../shared/apiendpoint'
10
+ require_relative '../shared/error'
11
+
12
+ module SpeakeasyClientSDK
13
+ module Operations
14
+
15
+ class UpsertApiEndpointRequest < SpeakeasyClientSDK::Utils::FieldAugmented
16
+ extend T::Sig
17
+
18
+ # The ID of the ApiEndpoint to upsert.
19
+ field :api_endpoint_id, String, { 'path_param': { 'field_name': 'apiEndpointID', 'style': 'simple', 'explode': false } }
20
+ # A JSON representation of the ApiEndpoint to upsert.
21
+ field :api_endpoint_input, Shared::ApiEndpointInput, { 'request': { 'media_type': 'application/json' } }
22
+ # The ID of the Api the ApiEndpoint belongs to.
23
+ field :api_id, String, { 'path_param': { 'field_name': 'apiID', 'style': 'simple', 'explode': false } }
24
+ # The version ID of the Api the ApiEndpoint belongs to.
25
+ field :version_id, String, { 'path_param': { 'field_name': 'versionID', 'style': 'simple', 'explode': false } }
26
+
27
+
28
+ sig { params(api_endpoint_id: String, api_endpoint_input: Shared::ApiEndpointInput, api_id: String, version_id: String).void }
29
+ def initialize(api_endpoint_id: nil, api_endpoint_input: nil, api_id: nil, version_id: nil)
30
+ @api_endpoint_id = api_endpoint_id
31
+ @api_endpoint_input = api_endpoint_input
32
+ @api_id = api_id
33
+ @version_id = version_id
34
+ end
35
+ end
36
+
37
+
38
+ class UpsertApiEndpointResponse < SpeakeasyClientSDK::Utils::FieldAugmented
39
+ extend T::Sig
40
+
41
+
42
+ field :content_type, String
43
+
44
+ field :status_code, Integer
45
+ # OK
46
+ field :api_endpoint, T.nilable(Shared::ApiEndpoint)
47
+ # Default error response
48
+ field :error, T.nilable(Shared::Error)
49
+
50
+ field :raw_response, T.nilable(Faraday::Response)
51
+
52
+
53
+ sig { params(content_type: String, status_code: Integer, api_endpoint: T.nilable(Shared::ApiEndpoint), error: T.nilable(Shared::Error), raw_response: T.nilable(Faraday::Response)).void }
54
+ def initialize(content_type: nil, status_code: nil, api_endpoint: nil, error: nil, raw_response: nil)
55
+ @content_type = content_type
56
+ @status_code = status_code
57
+ @api_endpoint = api_endpoint
58
+ @error = error
59
+ @raw_response = raw_response
60
+ end
61
+ end
62
+ end
63
+ end
@@ -0,0 +1,39 @@
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
+
18
+ field :content_type, String
19
+
20
+ field :status_code, Integer
21
+ # Default error response
22
+ field :error, T.nilable(Shared::Error)
23
+ # OK
24
+ field :plugin, T.nilable(Shared::Plugin)
25
+
26
+ field :raw_response, T.nilable(Faraday::Response)
27
+
28
+
29
+ sig { params(content_type: String, status_code: Integer, error: T.nilable(Shared::Error), plugin: T.nilable(Shared::Plugin), raw_response: T.nilable(Faraday::Response)).void }
30
+ def initialize(content_type: nil, status_code: nil, error: nil, plugin: nil, raw_response: nil)
31
+ @content_type = content_type
32
+ @status_code = status_code
33
+ @error = error
34
+ @plugin = plugin
35
+ @raw_response = raw_response
36
+ end
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,35 @@
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
+
10
+ module SpeakeasyClientSDK
11
+ module Operations
12
+
13
+ class ValidateApiKeyResponse < SpeakeasyClientSDK::Utils::FieldAugmented
14
+ extend T::Sig
15
+
16
+
17
+ field :content_type, String
18
+
19
+ field :status_code, Integer
20
+ # Default error response
21
+ field :error, T.nilable(Shared::Error)
22
+
23
+ field :raw_response, T.nilable(Faraday::Response)
24
+
25
+
26
+ sig { params(content_type: String, status_code: Integer, error: T.nilable(Shared::Error), raw_response: T.nilable(Faraday::Response)).void }
27
+ def initialize(content_type: nil, status_code: nil, error: nil, raw_response: nil)
28
+ @content_type = content_type
29
+ @status_code = status_code
30
+ @error = error
31
+ @raw_response = raw_response
32
+ end
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,69 @@
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 Api is representation of a API (a collection of API Endpoints) within the Speakeasy Platform.
12
+ class ApiInput < SpeakeasyClientSDK::Utils::FieldAugmented
13
+ extend T::Sig
14
+
15
+ # The ID of this Api. This is a human-readable name (subject to change).
16
+ field :api_id, String, { 'format_json': { 'letter_case': OpenApiSDK::Utils.field_name('api_id') } }
17
+ # A detailed description of the Api.
18
+ field :description, String, { 'format_json': { 'letter_case': OpenApiSDK::Utils.field_name('description') } }
19
+ # The version ID of this Api. This is semantic version identifier.
20
+ field :version_id, String, { 'format_json': { 'letter_case': OpenApiSDK::Utils.field_name('version_id') } }
21
+ # A set of values associated with a meta_data key. This field is only set on get requests.
22
+ field :meta_data, T.nilable(T::Hash[Symbol, T::Array[String]]), { 'format_json': { 'letter_case': OpenApiSDK::Utils.field_name('meta_data') } }
23
+
24
+
25
+ sig { params(api_id: String, description: String, version_id: String, meta_data: T.nilable(T::Hash[Symbol, T::Array[String]])).void }
26
+ def initialize(api_id: nil, description: nil, version_id: nil, meta_data: nil)
27
+ @api_id = api_id
28
+ @description = description
29
+ @version_id = version_id
30
+ @meta_data = meta_data
31
+ end
32
+ end
33
+
34
+ # An Api is representation of a API (a collection of API Endpoints) within the Speakeasy Platform.
35
+ class Api < SpeakeasyClientSDK::Utils::FieldAugmented
36
+ extend T::Sig
37
+
38
+ # The ID of this Api. This is a human-readable name (subject to change).
39
+ field :api_id, String, { 'format_json': { 'letter_case': OpenApiSDK::Utils.field_name('api_id') } }
40
+ # Creation timestamp.
41
+ field :created_at, DateTime, { 'format_json': { 'letter_case': OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } }
42
+ # A detailed description of the Api.
43
+ field :description, String, { 'format_json': { 'letter_case': OpenApiSDK::Utils.field_name('description') } }
44
+ # Last update timestamp.
45
+ field :updated_at, DateTime, { 'format_json': { 'letter_case': OpenApiSDK::Utils.field_name('updated_at'), 'decoder': Utils.datetime_from_iso_format(false) } }
46
+ # The version ID of this Api. This is semantic version identifier.
47
+ field :version_id, String, { 'format_json': { 'letter_case': OpenApiSDK::Utils.field_name('version_id') } }
48
+ # The workspace ID this Api belongs to.
49
+ field :workspace_id, String, { 'format_json': { 'letter_case': OpenApiSDK::Utils.field_name('workspace_id') } }
50
+ # Determines if all the endpoints within the Api are found in the OpenAPI spec associated with the Api.
51
+ field :matched, T.nilable(T::Boolean), { 'format_json': { 'letter_case': OpenApiSDK::Utils.field_name('matched') } }
52
+ # A set of values associated with a meta_data key. This field is only set on get requests.
53
+ field :meta_data, T.nilable(T::Hash[Symbol, T::Array[String]]), { 'format_json': { 'letter_case': OpenApiSDK::Utils.field_name('meta_data') } }
54
+
55
+
56
+ sig { params(api_id: String, created_at: DateTime, description: String, updated_at: DateTime, version_id: String, workspace_id: String, matched: T.nilable(T::Boolean), meta_data: T.nilable(T::Hash[Symbol, T::Array[String]])).void }
57
+ def initialize(api_id: nil, created_at: nil, description: nil, updated_at: nil, version_id: nil, workspace_id: nil, matched: nil, meta_data: nil)
58
+ @api_id = api_id
59
+ @created_at = created_at
60
+ @description = description
61
+ @updated_at = updated_at
62
+ @version_id = version_id
63
+ @workspace_id = workspace_id
64
+ @matched = matched
65
+ @meta_data = meta_data
66
+ end
67
+ end
68
+ end
69
+ end
@@ -0,0 +1,84 @@
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 ApiEndpointInput < 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': OpenApiSDK::Utils.field_name('api_endpoint_id') } }
17
+ # A detailed description of the ApiEndpoint.
18
+ field :description, String, { 'format_json': { 'letter_case': OpenApiSDK::Utils.field_name('description') } }
19
+ # A human-readable name for the ApiEndpoint.
20
+ field :display_name, String, { 'format_json': { 'letter_case': OpenApiSDK::Utils.field_name('display_name') } }
21
+ # HTTP verb.
22
+ field :method, String, { 'format_json': { 'letter_case': OpenApiSDK::Utils.field_name('method') } }
23
+ # Path that handles this Api.
24
+ field :path, String, { 'format_json': { 'letter_case': OpenApiSDK::Utils.field_name('path') } }
25
+ # The version ID of the Api this ApiEndpoint belongs to.
26
+ field :version_id, String, { 'format_json': { 'letter_case': OpenApiSDK::Utils.field_name('version_id') } }
27
+
28
+
29
+ sig { params(api_endpoint_id: String, description: String, display_name: String, method: String, path: String, version_id: String).void }
30
+ def initialize(api_endpoint_id: nil, description: nil, display_name: nil, method: nil, path: nil, version_id: nil)
31
+ @api_endpoint_id = api_endpoint_id
32
+ @description = description
33
+ @display_name = display_name
34
+ @method = method
35
+ @path = path
36
+ @version_id = version_id
37
+ end
38
+ end
39
+
40
+ # An ApiEndpoint is a description of an Endpoint for an API.
41
+ class ApiEndpoint < SpeakeasyClientSDK::Utils::FieldAugmented
42
+ extend T::Sig
43
+
44
+ # The ID of this ApiEndpoint. This is a hash of the method and path.
45
+ field :api_endpoint_id, String, { 'format_json': { 'letter_case': OpenApiSDK::Utils.field_name('api_endpoint_id') } }
46
+ # The ID of the Api this ApiEndpoint belongs to.
47
+ field :api_id, String, { 'format_json': { 'letter_case': OpenApiSDK::Utils.field_name('api_id') } }
48
+ # Creation timestamp.
49
+ field :created_at, DateTime, { 'format_json': { 'letter_case': OpenApiSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } }
50
+ # A detailed description of the ApiEndpoint.
51
+ field :description, String, { 'format_json': { 'letter_case': OpenApiSDK::Utils.field_name('description') } }
52
+ # A human-readable name for the ApiEndpoint.
53
+ field :display_name, String, { 'format_json': { 'letter_case': OpenApiSDK::Utils.field_name('display_name') } }
54
+ # HTTP verb.
55
+ field :method, String, { 'format_json': { 'letter_case': OpenApiSDK::Utils.field_name('method') } }
56
+ # Path that handles this Api.
57
+ field :path, String, { 'format_json': { 'letter_case': OpenApiSDK::Utils.field_name('path') } }
58
+ # Last update timestamp.
59
+ field :updated_at, DateTime, { 'format_json': { 'letter_case': OpenApiSDK::Utils.field_name('updated_at'), 'decoder': Utils.datetime_from_iso_format(false) } }
60
+ # The version ID of the Api this ApiEndpoint belongs to.
61
+ field :version_id, String, { 'format_json': { 'letter_case': OpenApiSDK::Utils.field_name('version_id') } }
62
+ # The workspace ID this ApiEndpoint belongs to.
63
+ field :workspace_id, String, { 'format_json': { 'letter_case': OpenApiSDK::Utils.field_name('workspace_id') } }
64
+ # Determines if the endpoint was found in the OpenAPI spec associated with the parent Api.
65
+ field :matched, T.nilable(T::Boolean), { 'format_json': { 'letter_case': OpenApiSDK::Utils.field_name('matched') } }
66
+
67
+
68
+ 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 }
69
+ 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)
70
+ @api_endpoint_id = api_endpoint_id
71
+ @api_id = api_id
72
+ @created_at = created_at
73
+ @description = description
74
+ @display_name = display_name
75
+ @method = method
76
+ @path = path
77
+ @updated_at = updated_at
78
+ @version_id = version_id
79
+ @workspace_id = workspace_id
80
+ @matched = matched
81
+ end
82
+ end
83
+ end
84
+ end
@@ -0,0 +1,64 @@
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': OpenApiSDK::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': OpenApiSDK::Utils.field_name('api_id') } }
19
+ # Creation timestamp.
20
+ field :created_at, DateTime, { 'format_json': { 'letter_case': OpenApiSDK::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': OpenApiSDK::Utils.field_name('customer_id') } }
23
+ # The latency of the request.
24
+ field :latency, Integer, { 'format_json': { 'letter_case': OpenApiSDK::Utils.field_name('latency') } }
25
+ # HTTP verb.
26
+ field :method, String, { 'format_json': { 'letter_case': OpenApiSDK::Utils.field_name('method') } }
27
+ # The path of the request.
28
+ field :path, String, { 'format_json': { 'letter_case': OpenApiSDK::Utils.field_name('path') } }
29
+ # The time the request finished.
30
+ field :request_finish_time, DateTime, { 'format_json': { 'letter_case': OpenApiSDK::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': OpenApiSDK::Utils.field_name('request_id') } }
33
+ # The time the request was made.
34
+ field :request_start_time, DateTime, { 'format_json': { 'letter_case': OpenApiSDK::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': OpenApiSDK::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': OpenApiSDK::Utils.field_name('version_id') } }
39
+ # The workspace ID this request was made to.
40
+ field :workspace_id, String, { 'format_json': { 'letter_case': OpenApiSDK::Utils.field_name('workspace_id') } }
41
+ # Metadata associated with this request
42
+ field :metadata, T.nilable(T::Array[Shared::RequestMetadata]), { 'format_json': { 'letter_case': OpenApiSDK::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
@@ -0,0 +1,25 @@
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 EmbedAccessTokenResponse contains a token that can be used to embed a Speakeasy dashboard.
12
+ class EmbedAccessTokenResponse < SpeakeasyClientSDK::Utils::FieldAugmented
13
+ extend T::Sig
14
+
15
+
16
+ field :access_token, String, { 'format_json': { 'letter_case': OpenApiSDK::Utils.field_name('access_token') } }
17
+
18
+
19
+ sig { params(access_token: String).void }
20
+ def initialize(access_token: nil)
21
+ @access_token = access_token
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,52 @@
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': OpenApiSDK::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': OpenApiSDK::Utils.field_name('created_by') } }
19
+ # A detailed description of the EmbedToken.
20
+ field :description, String, { 'format_json': { 'letter_case': OpenApiSDK::Utils.field_name('description') } }
21
+ # The time this token expires.
22
+ field :expires_at, DateTime, { 'format_json': { 'letter_case': OpenApiSDK::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': OpenApiSDK::Utils.field_name('filters') } }
25
+ # The ID of this EmbedToken.
26
+ field :id, String, { 'format_json': { 'letter_case': OpenApiSDK::Utils.field_name('id') } }
27
+ # The workspace ID this token belongs to.
28
+ field :workspace_id, String, { 'format_json': { 'letter_case': OpenApiSDK::Utils.field_name('workspace_id') } }
29
+ # The last time this token was used.
30
+ field :last_used, T.nilable(DateTime), { 'format_json': { 'letter_case': OpenApiSDK::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': OpenApiSDK::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': OpenApiSDK::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
@@ -0,0 +1,28 @@
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
+ # The `Status` type defines a logical error model
12
+ class Error < SpeakeasyClientSDK::Utils::FieldAugmented
13
+ extend T::Sig
14
+
15
+ # A developer-facing error message.
16
+ field :message, String, { 'format_json': { 'letter_case': OpenApiSDK::Utils.field_name('message') } }
17
+ # The HTTP status code
18
+ field :status_code, Integer, { 'format_json': { 'letter_case': OpenApiSDK::Utils.field_name('status_code') } }
19
+
20
+
21
+ sig { params(message: String, status_code: Integer).void }
22
+ def initialize(message: nil, status_code: nil)
23
+ @message = message
24
+ @status_code = status_code
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,31 @@
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 filter is a key-value pair that can be used to filter a list of requests.
12
+ class Filter < SpeakeasyClientSDK::Utils::FieldAugmented
13
+ extend T::Sig
14
+
15
+ # The key of the filter.
16
+ field :key, String, { 'format_json': { 'letter_case': OpenApiSDK::Utils.field_name('key') } }
17
+ # The operator of the filter.
18
+ field :operator, String, { 'format_json': { 'letter_case': OpenApiSDK::Utils.field_name('operator') } }
19
+ # The value of the filter.
20
+ field :value, String, { 'format_json': { 'letter_case': OpenApiSDK::Utils.field_name('value') } }
21
+
22
+
23
+ sig { params(key: String, operator: String, value: String).void }
24
+ def initialize(key: nil, operator: nil, value: nil)
25
+ @key = key
26
+ @operator = operator
27
+ @value = value
28
+ end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,34 @@
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
+ # Filters are used to query requests.
12
+ class Filters < SpeakeasyClientSDK::Utils::FieldAugmented
13
+ extend T::Sig
14
+
15
+ # A list of filters to apply to the query.
16
+ field :filters, T::Array[Shared::Filter], { 'format_json': { 'letter_case': OpenApiSDK::Utils.field_name('filters') } }
17
+ # The maximum number of results to return.
18
+ field :limit, Integer, { 'format_json': { 'letter_case': OpenApiSDK::Utils.field_name('limit') } }
19
+ # The offset to start the query from.
20
+ field :offset, Integer, { 'format_json': { 'letter_case': OpenApiSDK::Utils.field_name('offset') } }
21
+ # The operator to use when combining filters.
22
+ field :operator, String, { 'format_json': { 'letter_case': OpenApiSDK::Utils.field_name('operator') } }
23
+
24
+
25
+ sig { params(filters: T::Array[Shared::Filter], limit: Integer, offset: Integer, operator: String).void }
26
+ def initialize(filters: nil, limit: nil, offset: nil, operator: nil)
27
+ @filters = filters
28
+ @limit = limit
29
+ @offset = offset
30
+ @operator = operator
31
+ end
32
+ end
33
+ end
34
+ end