speakeasy_client_sdk_ruby 2.2.2 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/{sdk → speakeasy_client_sdk}/apiendpoints.rb +48 -39
- data/lib/{sdk → speakeasy_client_sdk}/apis.rb +37 -30
- data/lib/{sdk → speakeasy_client_sdk}/embeds.rb +17 -13
- data/lib/{sdk → speakeasy_client_sdk}/metadata.rb +19 -15
- data/lib/speakeasy_client_sdk/models/operations/deleteapi_request.rb +27 -0
- data/lib/speakeasy_client_sdk/models/operations/deleteapi_response.rb +33 -0
- data/lib/speakeasy_client_sdk/models/operations/deleteapiendpoint_request.rb +30 -0
- data/lib/speakeasy_client_sdk/models/operations/deleteapiendpoint_response.rb +33 -0
- data/lib/speakeasy_client_sdk/models/operations/deleteschema_request.rb +30 -0
- data/lib/speakeasy_client_sdk/models/operations/deleteschema_response.rb +33 -0
- data/lib/speakeasy_client_sdk/models/operations/deleteversionmetadata_request.rb +33 -0
- data/lib/speakeasy_client_sdk/models/operations/deleteversionmetadata_response.rb +33 -0
- data/lib/speakeasy_client_sdk/models/operations/downloadschema_request.rb +27 -0
- data/lib/speakeasy_client_sdk/models/operations/downloadschema_response.rb +39 -0
- data/lib/speakeasy_client_sdk/models/operations/downloadschemarevision_request.rb +30 -0
- data/lib/speakeasy_client_sdk/models/operations/downloadschemarevision_response.rb +39 -0
- data/lib/speakeasy_client_sdk/models/operations/file.rb +27 -0
- data/lib/speakeasy_client_sdk/models/operations/findapiendpoint_request.rb +30 -0
- data/lib/speakeasy_client_sdk/models/operations/findapiendpoint_response.rb +36 -0
- data/lib/speakeasy_client_sdk/models/operations/generateopenapispec_request.rb +27 -0
- data/lib/speakeasy_client_sdk/models/operations/generateopenapispec_response.rb +36 -0
- data/lib/speakeasy_client_sdk/models/operations/generateopenapispecforapiendpoint_request.rb +30 -0
- data/lib/speakeasy_client_sdk/models/operations/generateopenapispecforapiendpoint_response.rb +36 -0
- data/lib/speakeasy_client_sdk/models/operations/generatepostmancollection_request.rb +27 -0
- data/lib/speakeasy_client_sdk/models/operations/generatepostmancollection_response.rb +36 -0
- data/lib/speakeasy_client_sdk/models/operations/generatepostmancollectionforapiendpoint_request.rb +30 -0
- data/lib/speakeasy_client_sdk/models/operations/generatepostmancollectionforapiendpoint_response.rb +36 -0
- data/lib/speakeasy_client_sdk/models/operations/generaterequestpostmancollection_request.rb +24 -0
- data/lib/speakeasy_client_sdk/models/operations/generaterequestpostmancollection_response.rb +36 -0
- data/lib/speakeasy_client_sdk/models/operations/getallapiendpoints_request.rb +24 -0
- data/lib/speakeasy_client_sdk/models/operations/getallapiendpoints_response.rb +36 -0
- data/lib/speakeasy_client_sdk/models/operations/getallapiversions_request.rb +30 -0
- data/lib/speakeasy_client_sdk/models/operations/getallapiversions_response.rb +36 -0
- data/lib/speakeasy_client_sdk/models/operations/getallforversionapiendpoints_request.rb +27 -0
- data/lib/speakeasy_client_sdk/models/operations/getallforversionapiendpoints_response.rb +36 -0
- data/lib/speakeasy_client_sdk/models/operations/getapiendpoint_request.rb +30 -0
- data/lib/speakeasy_client_sdk/models/operations/getapiendpoint_response.rb +36 -0
- data/lib/speakeasy_client_sdk/models/operations/getapis_request.rb +27 -0
- data/lib/speakeasy_client_sdk/models/operations/getapis_response.rb +36 -0
- data/lib/speakeasy_client_sdk/models/operations/getembedaccesstoken_request.rb +30 -0
- data/lib/speakeasy_client_sdk/models/operations/getembedaccesstoken_response.rb +36 -0
- data/lib/{sdk/models/operations/getplugins.rb → speakeasy_client_sdk/models/operations/getplugins_response.rb} +7 -9
- data/lib/speakeasy_client_sdk/models/operations/getrequestfromeventlog_request.rb +24 -0
- data/lib/speakeasy_client_sdk/models/operations/getrequestfromeventlog_response.rb +36 -0
- data/lib/speakeasy_client_sdk/models/operations/getschema_request.rb +27 -0
- data/lib/speakeasy_client_sdk/models/operations/getschema_response.rb +36 -0
- data/lib/speakeasy_client_sdk/models/operations/getschemadiff_request.rb +33 -0
- data/lib/speakeasy_client_sdk/models/operations/getschemadiff_response.rb +36 -0
- data/lib/speakeasy_client_sdk/models/operations/getschemarevision_request.rb +30 -0
- data/lib/speakeasy_client_sdk/models/operations/getschemarevision_response.rb +36 -0
- data/lib/speakeasy_client_sdk/models/operations/getschemas_request.rb +27 -0
- data/lib/speakeasy_client_sdk/models/operations/getschemas_response.rb +36 -0
- data/lib/{sdk/models/operations/getvalidembedaccesstokens.rb → speakeasy_client_sdk/models/operations/getvalidembedaccesstokens_response.rb} +7 -9
- data/lib/speakeasy_client_sdk/models/operations/getversionmetadata_request.rb +27 -0
- data/lib/speakeasy_client_sdk/models/operations/getversionmetadata_response.rb +36 -0
- data/lib/speakeasy_client_sdk/models/operations/insertversionmetadata_request.rb +30 -0
- data/lib/speakeasy_client_sdk/models/operations/insertversionmetadata_response.rb +36 -0
- data/lib/speakeasy_client_sdk/models/operations/op.rb +24 -0
- data/lib/speakeasy_client_sdk/models/operations/queryeventlog_request.rb +24 -0
- data/lib/speakeasy_client_sdk/models/operations/queryeventlog_response.rb +36 -0
- data/lib/speakeasy_client_sdk/models/operations/queryparam_op.rb +24 -0
- data/lib/speakeasy_client_sdk/models/operations/registerschema_request.rb +30 -0
- data/lib/speakeasy_client_sdk/models/operations/registerschema_requestbody.rb +24 -0
- data/lib/speakeasy_client_sdk/models/operations/registerschema_response.rb +33 -0
- data/lib/speakeasy_client_sdk/models/operations/revokeembedaccesstoken_request.rb +24 -0
- data/lib/speakeasy_client_sdk/models/operations/revokeembedaccesstoken_response.rb +33 -0
- data/lib/speakeasy_client_sdk/models/operations/runplugin_request.rb +27 -0
- data/lib/speakeasy_client_sdk/models/operations/runplugin_response.rb +36 -0
- data/lib/speakeasy_client_sdk/models/operations/upsertapi_request.rb +27 -0
- data/lib/speakeasy_client_sdk/models/operations/upsertapi_response.rb +36 -0
- data/lib/speakeasy_client_sdk/models/operations/upsertapiendpoint_request.rb +33 -0
- data/lib/speakeasy_client_sdk/models/operations/upsertapiendpoint_response.rb +36 -0
- data/lib/{sdk/models/operations/upsertplugin.rb → speakeasy_client_sdk/models/operations/upsertplugin_response.rb} +7 -10
- data/lib/{sdk/models/operations/validateapikey.rb → speakeasy_client_sdk/models/operations/validateapikey_response.rb} +6 -8
- data/lib/speakeasy_client_sdk/models/operations.rb +79 -0
- data/lib/{sdk → speakeasy_client_sdk}/models/shared/api.rb +9 -10
- data/lib/{sdk → speakeasy_client_sdk}/models/shared/api_input.rb +6 -7
- data/lib/speakeasy_client_sdk/models/shared/apiendpoint.rb +54 -0
- data/lib/{sdk → speakeasy_client_sdk}/models/shared/apiendpoint_input.rb +8 -9
- data/lib/speakeasy_client_sdk/models/shared/boundedrequest.rb +63 -0
- data/lib/{sdk → speakeasy_client_sdk}/models/shared/embedaccesstokenresponse.rb +3 -4
- data/lib/speakeasy_client_sdk/models/shared/embedtoken.rb +51 -0
- data/lib/{sdk → speakeasy_client_sdk}/models/shared/error.rb +4 -5
- data/lib/{sdk → speakeasy_client_sdk}/models/shared/filter.rb +5 -6
- data/lib/{sdk → speakeasy_client_sdk}/models/shared/filters.rb +6 -7
- data/lib/{sdk → speakeasy_client_sdk}/models/shared/generateopenapispecdiff.rb +4 -5
- data/lib/speakeasy_client_sdk/models/shared/plugin.rb +42 -0
- data/lib/{sdk → speakeasy_client_sdk}/models/shared/requestmetadata.rb +4 -5
- data/lib/speakeasy_client_sdk/models/shared/schema.rb +39 -0
- data/lib/speakeasy_client_sdk/models/shared/schemadiff.rb +30 -0
- data/lib/{sdk → speakeasy_client_sdk}/models/shared/security.rb +3 -4
- data/lib/{sdk → speakeasy_client_sdk}/models/shared/unboundedrequest.rb +7 -8
- data/lib/speakeasy_client_sdk/models/shared/valuechange.rb +27 -0
- data/lib/speakeasy_client_sdk/models/shared/versionmetadata.rb +39 -0
- data/lib/{sdk → speakeasy_client_sdk}/models/shared/versionmetadata_input.rb +4 -5
- data/lib/speakeasy_client_sdk/models/shared.rb +29 -0
- data/lib/{sdk → speakeasy_client_sdk}/plugins.rb +18 -14
- data/lib/{sdk → speakeasy_client_sdk}/requests.rb +19 -15
- data/lib/{sdk → speakeasy_client_sdk}/schemas.rb +46 -37
- data/lib/{sdk → speakeasy_client_sdk}/sdk.rb +3 -3
- data/lib/{sdk → speakeasy_client_sdk}/sdkconfiguration.rb +5 -5
- data/lib/{sdk → speakeasy_client_sdk}/utils/utils.rb +2 -2
- data/lib/speakeasy_client_sdk_ruby.rb +13 -66
- metadata +105 -67
- data/lib/sdk/models/operations/deleteapi.rb +0 -52
- data/lib/sdk/models/operations/deleteapiendpoint.rb +0 -55
- data/lib/sdk/models/operations/deleteschema.rb +0 -55
- data/lib/sdk/models/operations/deleteversionmetadata.rb +0 -58
- data/lib/sdk/models/operations/downloadschema.rb +0 -58
- data/lib/sdk/models/operations/downloadschemarevision.rb +0 -61
- data/lib/sdk/models/operations/findapiendpoint.rb +0 -59
- data/lib/sdk/models/operations/generateopenapispec.rb +0 -56
- data/lib/sdk/models/operations/generateopenapispecforapiendpoint.rb +0 -59
- data/lib/sdk/models/operations/generatepostmancollection.rb +0 -55
- data/lib/sdk/models/operations/generatepostmancollectionforapiendpoint.rb +0 -58
- data/lib/sdk/models/operations/generaterequestpostmancollection.rb +0 -52
- data/lib/sdk/models/operations/getallapiendpoints.rb +0 -52
- data/lib/sdk/models/operations/getallapiversions.rb +0 -72
- data/lib/sdk/models/operations/getallforversionapiendpoints.rb +0 -55
- data/lib/sdk/models/operations/getapiendpoint.rb +0 -59
- data/lib/sdk/models/operations/getapis.rb +0 -69
- data/lib/sdk/models/operations/getembedaccesstoken.rb +0 -60
- data/lib/sdk/models/operations/getrequestfromeventlog.rb +0 -53
- data/lib/sdk/models/operations/getschema.rb +0 -56
- data/lib/sdk/models/operations/getschemadiff.rb +0 -62
- data/lib/sdk/models/operations/getschemarevision.rb +0 -59
- data/lib/sdk/models/operations/getschemas.rb +0 -55
- data/lib/sdk/models/operations/getversionmetadata.rb +0 -55
- data/lib/sdk/models/operations/insertversionmetadata.rb +0 -59
- data/lib/sdk/models/operations/queryeventlog.rb +0 -53
- data/lib/sdk/models/operations/registerschema.rb +0 -86
- data/lib/sdk/models/operations/revokeembedaccesstoken.rb +0 -49
- data/lib/sdk/models/operations/runplugin.rb +0 -56
- data/lib/sdk/models/operations/upsertapi.rb +0 -56
- data/lib/sdk/models/operations/upsertapiendpoint.rb +0 -62
- data/lib/sdk/models/shared/apiendpoint.rb +0 -55
- data/lib/sdk/models/shared/boundedrequest.rb +0 -64
- data/lib/sdk/models/shared/embedtoken.rb +0 -52
- data/lib/sdk/models/shared/plugin.rb +0 -43
- data/lib/sdk/models/shared/schema.rb +0 -40
- data/lib/sdk/models/shared/schemadiff.rb +0 -48
- data/lib/sdk/models/shared/versionmetadata.rb +0 -40
- /data/lib/{sdk → speakeasy_client_sdk}/utils/metadata_fields.rb +0 -0
@@ -3,28 +3,27 @@
|
|
3
3
|
# typed: true
|
4
4
|
# frozen_string_literal: true
|
5
5
|
|
6
|
-
require 'sorbet-runtime'
|
7
|
-
require 'faraday'
|
8
6
|
|
9
7
|
module SpeakeasyClientSDK
|
10
8
|
module Shared
|
9
|
+
|
11
10
|
# An UnboundedRequest represents the HAR content capture by Speakeasy when logging a request.
|
12
11
|
class UnboundedRequest < ::SpeakeasyClientSDK::Utils::FieldAugmented
|
13
12
|
extend T::Sig
|
14
13
|
|
15
14
|
# Creation timestamp.
|
16
|
-
field :created_at, DateTime, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } }
|
15
|
+
field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } }
|
17
16
|
# The HAR content of the request.
|
18
|
-
field :har, String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('har') } }
|
17
|
+
field :har, ::String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('har') } }
|
19
18
|
# The size of the HAR content in bytes.
|
20
|
-
field :har_size_bytes, Integer, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('har_size_bytes') } }
|
19
|
+
field :har_size_bytes, ::Integer, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('har_size_bytes') } }
|
21
20
|
# The ID of this request.
|
22
|
-
field :request_id, String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('request_id') } }
|
21
|
+
field :request_id, ::String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('request_id') } }
|
23
22
|
# The workspace ID this request was made to.
|
24
|
-
field :workspace_id, String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('workspace_id') } }
|
23
|
+
field :workspace_id, ::String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('workspace_id') } }
|
25
24
|
|
26
25
|
|
27
|
-
sig { params(created_at: DateTime, har: String, har_size_bytes: Integer, request_id: String, workspace_id: String).void }
|
26
|
+
sig { params(created_at: ::DateTime, har: ::String, har_size_bytes: ::Integer, request_id: ::String, workspace_id: ::String).void }
|
28
27
|
def initialize(created_at: nil, har: nil, har_size_bytes: nil, request_id: nil, workspace_id: nil)
|
29
28
|
@created_at = created_at
|
30
29
|
@har = har
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
|
7
|
+
module SpeakeasyClientSDK
|
8
|
+
module Shared
|
9
|
+
|
10
|
+
|
11
|
+
class ValueChange < ::SpeakeasyClientSDK::Utils::FieldAugmented
|
12
|
+
extend T::Sig
|
13
|
+
|
14
|
+
# Represents the previous value of the element.
|
15
|
+
field :from, ::String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('From') } }
|
16
|
+
# Represents the current value of the element.
|
17
|
+
field :to, ::String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('To') } }
|
18
|
+
|
19
|
+
|
20
|
+
sig { params(from: ::String, to: ::String).void }
|
21
|
+
def initialize(from: nil, to: nil)
|
22
|
+
@from = from
|
23
|
+
@to = to
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
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
|
+
|
7
|
+
module SpeakeasyClientSDK
|
8
|
+
module Shared
|
9
|
+
|
10
|
+
# A set of keys and associated values, attached to a particular version of an Api.
|
11
|
+
class VersionMetadata < ::SpeakeasyClientSDK::Utils::FieldAugmented
|
12
|
+
extend T::Sig
|
13
|
+
|
14
|
+
# The ID of the Api this Metadata belongs to.
|
15
|
+
field :api_id, ::String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('api_id') } }
|
16
|
+
# Creation timestamp.
|
17
|
+
field :created_at, ::DateTime, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(false) } }
|
18
|
+
# The key for this metadata.
|
19
|
+
field :meta_key, ::String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('meta_key') } }
|
20
|
+
# One of the values for this metadata.
|
21
|
+
field :meta_value, ::String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('meta_value') } }
|
22
|
+
# The version ID of the Api this Metadata belongs to.
|
23
|
+
field :version_id, ::String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('version_id') } }
|
24
|
+
# The workspace ID this Metadata belongs to.
|
25
|
+
field :workspace_id, ::String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('workspace_id') } }
|
26
|
+
|
27
|
+
|
28
|
+
sig { params(api_id: ::String, created_at: ::DateTime, meta_key: ::String, meta_value: ::String, version_id: ::String, workspace_id: ::String).void }
|
29
|
+
def initialize(api_id: nil, created_at: nil, meta_key: nil, meta_value: nil, version_id: nil, workspace_id: nil)
|
30
|
+
@api_id = api_id
|
31
|
+
@created_at = created_at
|
32
|
+
@meta_key = meta_key
|
33
|
+
@meta_value = meta_value
|
34
|
+
@version_id = version_id
|
35
|
+
@workspace_id = workspace_id
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -3,22 +3,21 @@
|
|
3
3
|
# typed: true
|
4
4
|
# frozen_string_literal: true
|
5
5
|
|
6
|
-
require 'sorbet-runtime'
|
7
|
-
require 'faraday'
|
8
6
|
|
9
7
|
module SpeakeasyClientSDK
|
10
8
|
module Shared
|
9
|
+
|
11
10
|
# A set of keys and associated values, attached to a particular version of an Api.
|
12
11
|
class VersionMetadataInput < ::SpeakeasyClientSDK::Utils::FieldAugmented
|
13
12
|
extend T::Sig
|
14
13
|
|
15
14
|
# The key for this metadata.
|
16
|
-
field :meta_key, String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('meta_key') } }
|
15
|
+
field :meta_key, ::String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('meta_key') } }
|
17
16
|
# One of the values for this metadata.
|
18
|
-
field :meta_value, String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('meta_value') } }
|
17
|
+
field :meta_value, ::String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('meta_value') } }
|
19
18
|
|
20
19
|
|
21
|
-
sig { params(meta_key: String, meta_value: String).void }
|
20
|
+
sig { params(meta_key: ::String, meta_value: ::String).void }
|
22
21
|
def initialize(meta_key: nil, meta_value: nil)
|
23
22
|
@meta_key = meta_key
|
24
23
|
@meta_value = meta_value
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
module SpeakeasyClientSDK
|
7
|
+
module Shared
|
8
|
+
autoload :Error, 'speakeasy_client_sdk/models/shared/error.rb'
|
9
|
+
autoload :GenerateOpenApiSpecDiff, 'speakeasy_client_sdk/models/shared/generateopenapispecdiff.rb'
|
10
|
+
autoload :Api, 'speakeasy_client_sdk/models/shared/api.rb'
|
11
|
+
autoload :ApiInput, 'speakeasy_client_sdk/models/shared/api_input.rb'
|
12
|
+
autoload :ApiEndpoint, 'speakeasy_client_sdk/models/shared/apiendpoint.rb'
|
13
|
+
autoload :ApiEndpointInput, 'speakeasy_client_sdk/models/shared/apiendpoint_input.rb'
|
14
|
+
autoload :VersionMetadata, 'speakeasy_client_sdk/models/shared/versionmetadata.rb'
|
15
|
+
autoload :VersionMetadataInput, 'speakeasy_client_sdk/models/shared/versionmetadata_input.rb'
|
16
|
+
autoload :Schema, 'speakeasy_client_sdk/models/shared/schema.rb'
|
17
|
+
autoload :ValueChange, 'speakeasy_client_sdk/models/shared/valuechange.rb'
|
18
|
+
autoload :SchemaDiff, 'speakeasy_client_sdk/models/shared/schemadiff.rb'
|
19
|
+
autoload :UnboundedRequest, 'speakeasy_client_sdk/models/shared/unboundedrequest.rb'
|
20
|
+
autoload :BoundedRequest, 'speakeasy_client_sdk/models/shared/boundedrequest.rb'
|
21
|
+
autoload :RequestMetadata, 'speakeasy_client_sdk/models/shared/requestmetadata.rb'
|
22
|
+
autoload :Filters, 'speakeasy_client_sdk/models/shared/filters.rb'
|
23
|
+
autoload :Filter, 'speakeasy_client_sdk/models/shared/filter.rb'
|
24
|
+
autoload :Plugin, 'speakeasy_client_sdk/models/shared/plugin.rb'
|
25
|
+
autoload :EmbedAccessTokenResponse, 'speakeasy_client_sdk/models/shared/embedaccesstokenresponse.rb'
|
26
|
+
autoload :EmbedToken, 'speakeasy_client_sdk/models/shared/embedtoken.rb'
|
27
|
+
autoload :Security, 'speakeasy_client_sdk/models/shared/security.rb'
|
28
|
+
end
|
29
|
+
end
|
@@ -10,13 +10,15 @@ require 'sorbet-runtime'
|
|
10
10
|
module SpeakeasyClientSDK
|
11
11
|
extend T::Sig
|
12
12
|
class Plugins
|
13
|
-
# REST APIs for managing and running plugins
|
14
13
|
extend T::Sig
|
14
|
+
# REST APIs for managing and running plugins
|
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
|
|
21
|
+
|
20
22
|
sig { returns(::SpeakeasyClientSDK::Utils::FieldAugmented) }
|
21
23
|
def get_plugins
|
22
24
|
# get_plugins - Get all plugins for the current workspace.
|
@@ -34,37 +36,38 @@ module SpeakeasyClientSDK
|
|
34
36
|
|
35
37
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
36
38
|
|
37
|
-
res = Operations::GetPluginsResponse.new(
|
39
|
+
res = ::SpeakeasyClientSDK::Operations::GetPluginsResponse.new(
|
38
40
|
status_code: r.status, content_type: content_type, raw_response: r
|
39
41
|
)
|
40
42
|
if r.status == 200
|
41
43
|
if Utils.match_content_type(content_type, 'application/json')
|
42
|
-
out = Utils.unmarshal_complex(r.env.response_body, T::Array[Shared::Plugin])
|
44
|
+
out = Utils.unmarshal_complex(r.env.response_body, T::Array[::SpeakeasyClientSDK::Shared::Plugin])
|
43
45
|
res.classes = out
|
44
46
|
end
|
45
47
|
else
|
46
48
|
|
47
49
|
if Utils.match_content_type(content_type, 'application/json')
|
48
|
-
out = Utils.unmarshal_complex(r.env.response_body, Shared::Error)
|
50
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::Error)
|
49
51
|
res.error = out
|
50
52
|
end
|
51
53
|
end
|
52
54
|
res
|
53
55
|
end
|
54
56
|
|
55
|
-
|
57
|
+
|
58
|
+
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::RunPluginRequest)).returns(Utils::FieldAugmented) }
|
56
59
|
def run_plugin(request)
|
57
60
|
# run_plugin - Run a plugin
|
58
61
|
url, params = @sdk_configuration.get_server_details
|
59
62
|
base_url = Utils.template_url(url, params)
|
60
63
|
url = Utils.generate_url(
|
61
|
-
Operations::RunPluginRequest,
|
64
|
+
::SpeakeasyClientSDK::Operations::RunPluginRequest,
|
62
65
|
base_url,
|
63
66
|
'/v1/plugins/{pluginID}',
|
64
67
|
request
|
65
68
|
)
|
66
69
|
headers = {}
|
67
|
-
query_params = Utils.get_query_params(Operations::RunPluginRequest, request)
|
70
|
+
query_params = Utils.get_query_params(::SpeakeasyClientSDK::Operations::RunPluginRequest, request)
|
68
71
|
headers['Accept'] = 'application/json'
|
69
72
|
headers['user-agent'] = @sdk_configuration.user_agent
|
70
73
|
|
@@ -76,25 +79,26 @@ module SpeakeasyClientSDK
|
|
76
79
|
|
77
80
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
78
81
|
|
79
|
-
res = Operations::RunPluginResponse.new(
|
82
|
+
res = ::SpeakeasyClientSDK::Operations::RunPluginResponse.new(
|
80
83
|
status_code: r.status, content_type: content_type, raw_response: r
|
81
84
|
)
|
82
85
|
if r.status == 200
|
83
86
|
if Utils.match_content_type(content_type, 'application/json')
|
84
|
-
out = Utils.unmarshal_complex(r.env.response_body, T::Array[Shared::BoundedRequest])
|
87
|
+
out = Utils.unmarshal_complex(r.env.response_body, T::Array[::SpeakeasyClientSDK::Shared::BoundedRequest])
|
85
88
|
res.classes = out
|
86
89
|
end
|
87
90
|
else
|
88
91
|
|
89
92
|
if Utils.match_content_type(content_type, 'application/json')
|
90
|
-
out = Utils.unmarshal_complex(r.env.response_body, Shared::Error)
|
93
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::Error)
|
91
94
|
res.error = out
|
92
95
|
end
|
93
96
|
end
|
94
97
|
res
|
95
98
|
end
|
96
99
|
|
97
|
-
|
100
|
+
|
101
|
+
sig { params(request: ::SpeakeasyClientSDK::Shared::Plugin).returns(Utils::FieldAugmented) }
|
98
102
|
def upsert_plugin(request)
|
99
103
|
# upsert_plugin - Upsert a plugin
|
100
104
|
url, params = @sdk_configuration.get_server_details
|
@@ -121,18 +125,18 @@ module SpeakeasyClientSDK
|
|
121
125
|
|
122
126
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
123
127
|
|
124
|
-
res = Operations::UpsertPluginResponse.new(
|
128
|
+
res = ::SpeakeasyClientSDK::Operations::UpsertPluginResponse.new(
|
125
129
|
status_code: r.status, content_type: content_type, raw_response: r
|
126
130
|
)
|
127
131
|
if r.status == 200
|
128
132
|
if Utils.match_content_type(content_type, 'application/json')
|
129
|
-
out = Utils.unmarshal_complex(r.env.response_body, Shared::Plugin)
|
133
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::Plugin)
|
130
134
|
res.plugin = out
|
131
135
|
end
|
132
136
|
else
|
133
137
|
|
134
138
|
if Utils.match_content_type(content_type, 'application/json')
|
135
|
-
out = Utils.unmarshal_complex(r.env.response_body, Shared::Error)
|
139
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::Error)
|
136
140
|
res.error = out
|
137
141
|
end
|
138
142
|
end
|
@@ -10,14 +10,16 @@ require 'sorbet-runtime'
|
|
10
10
|
module SpeakeasyClientSDK
|
11
11
|
extend T::Sig
|
12
12
|
class Requests
|
13
|
-
# REST APIs for retrieving request information
|
14
13
|
extend T::Sig
|
14
|
+
# REST APIs for retrieving request information
|
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
|
-
|
21
|
+
|
22
|
+
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GenerateRequestPostmanCollectionRequest)).returns(Utils::FieldAugmented) }
|
21
23
|
def generate_request_postman_collection(request)
|
22
24
|
# generate_request_postman_collection - Generate a Postman collection for a particular request.
|
23
25
|
# Generates a Postman collection for a particular request.
|
@@ -25,7 +27,7 @@ module SpeakeasyClientSDK
|
|
25
27
|
url, params = @sdk_configuration.get_server_details
|
26
28
|
base_url = Utils.template_url(url, params)
|
27
29
|
url = Utils.generate_url(
|
28
|
-
Operations::GenerateRequestPostmanCollectionRequest,
|
30
|
+
::SpeakeasyClientSDK::Operations::GenerateRequestPostmanCollectionRequest,
|
29
31
|
base_url,
|
30
32
|
'/v1/eventlog/{requestID}/generate/postman',
|
31
33
|
request
|
@@ -41,7 +43,7 @@ module SpeakeasyClientSDK
|
|
41
43
|
|
42
44
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
43
45
|
|
44
|
-
res = Operations::GenerateRequestPostmanCollectionResponse.new(
|
46
|
+
res = ::SpeakeasyClientSDK::Operations::GenerateRequestPostmanCollectionResponse.new(
|
45
47
|
status_code: r.status, content_type: content_type, raw_response: r
|
46
48
|
)
|
47
49
|
if r.status == 200
|
@@ -50,20 +52,21 @@ module SpeakeasyClientSDK
|
|
50
52
|
else
|
51
53
|
|
52
54
|
if Utils.match_content_type(content_type, 'application/json')
|
53
|
-
out = Utils.unmarshal_complex(r.env.response_body, Shared::Error)
|
55
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::Error)
|
54
56
|
res.error = out
|
55
57
|
end
|
56
58
|
end
|
57
59
|
res
|
58
60
|
end
|
59
61
|
|
60
|
-
|
62
|
+
|
63
|
+
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::GetRequestFromEventLogRequest)).returns(Utils::FieldAugmented) }
|
61
64
|
def get_request_from_event_log(request)
|
62
65
|
# get_request_from_event_log - Get information about a particular request.
|
63
66
|
url, params = @sdk_configuration.get_server_details
|
64
67
|
base_url = Utils.template_url(url, params)
|
65
68
|
url = Utils.generate_url(
|
66
|
-
Operations::GetRequestFromEventLogRequest,
|
69
|
+
::SpeakeasyClientSDK::Operations::GetRequestFromEventLogRequest,
|
67
70
|
base_url,
|
68
71
|
'/v1/eventlog/{requestID}',
|
69
72
|
request
|
@@ -79,25 +82,26 @@ module SpeakeasyClientSDK
|
|
79
82
|
|
80
83
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
81
84
|
|
82
|
-
res = Operations::GetRequestFromEventLogResponse.new(
|
85
|
+
res = ::SpeakeasyClientSDK::Operations::GetRequestFromEventLogResponse.new(
|
83
86
|
status_code: r.status, content_type: content_type, raw_response: r
|
84
87
|
)
|
85
88
|
if r.status == 200
|
86
89
|
if Utils.match_content_type(content_type, 'application/json')
|
87
|
-
out = Utils.unmarshal_complex(r.env.response_body, Shared::UnboundedRequest)
|
90
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::UnboundedRequest)
|
88
91
|
res.unbounded_request = out
|
89
92
|
end
|
90
93
|
else
|
91
94
|
|
92
95
|
if Utils.match_content_type(content_type, 'application/json')
|
93
|
-
out = Utils.unmarshal_complex(r.env.response_body, Shared::Error)
|
96
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::Error)
|
94
97
|
res.error = out
|
95
98
|
end
|
96
99
|
end
|
97
100
|
res
|
98
101
|
end
|
99
102
|
|
100
|
-
|
103
|
+
|
104
|
+
sig { params(request: T.nilable(::SpeakeasyClientSDK::Operations::QueryEventLogRequest)).returns(Utils::FieldAugmented) }
|
101
105
|
def query_event_log(request)
|
102
106
|
# query_event_log - Query the event log to retrieve a list of requests.
|
103
107
|
# Supports retrieving a list of request captured by the SDK for this workspace.
|
@@ -106,7 +110,7 @@ module SpeakeasyClientSDK
|
|
106
110
|
base_url = Utils.template_url(url, params)
|
107
111
|
url = "#{base_url}/v1/eventlog/query"
|
108
112
|
headers = {}
|
109
|
-
query_params = Utils.get_query_params(Operations::QueryEventLogRequest, request)
|
113
|
+
query_params = Utils.get_query_params(::SpeakeasyClientSDK::Operations::QueryEventLogRequest, request)
|
110
114
|
headers['Accept'] = 'application/json'
|
111
115
|
headers['user-agent'] = @sdk_configuration.user_agent
|
112
116
|
|
@@ -118,18 +122,18 @@ module SpeakeasyClientSDK
|
|
118
122
|
|
119
123
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
120
124
|
|
121
|
-
res = Operations::QueryEventLogResponse.new(
|
125
|
+
res = ::SpeakeasyClientSDK::Operations::QueryEventLogResponse.new(
|
122
126
|
status_code: r.status, content_type: content_type, raw_response: r
|
123
127
|
)
|
124
128
|
if r.status == 200
|
125
129
|
if Utils.match_content_type(content_type, 'application/json')
|
126
|
-
out = Utils.unmarshal_complex(r.env.response_body, T::Array[Shared::BoundedRequest])
|
130
|
+
out = Utils.unmarshal_complex(r.env.response_body, T::Array[::SpeakeasyClientSDK::Shared::BoundedRequest])
|
127
131
|
res.classes = out
|
128
132
|
end
|
129
133
|
else
|
130
134
|
|
131
135
|
if Utils.match_content_type(content_type, 'application/json')
|
132
|
-
out = Utils.unmarshal_complex(r.env.response_body, Shared::Error)
|
136
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::Error)
|
133
137
|
res.error = out
|
134
138
|
end
|
135
139
|
end
|