noresponse 8.1.2 → 8.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/no_response/accounts.rb +2068 -0
- data/lib/no_response/assessments.rb +890 -0
- data/lib/no_response/lists.rb +2 -2
- data/lib/no_response/models/operations/associatecredential_request.rb +33 -0
- data/lib/no_response/models/operations/associatecredential_request.rbi +20 -0
- data/lib/no_response/models/operations/associatecredential_response.rb +34 -0
- data/lib/no_response/models/operations/associatecredential_response.rbi +20 -0
- data/lib/no_response/models/operations/bindprovisionalaccount_request.rb +37 -0
- data/lib/no_response/models/operations/bindprovisionalaccount_request.rbi +20 -0
- data/lib/no_response/models/operations/bindprovisionalaccount_response.rb +32 -0
- data/lib/no_response/models/operations/bindprovisionalaccount_response.rbi +20 -0
- data/lib/no_response/models/operations/exportaccount_request.rb +37 -0
- data/lib/no_response/models/operations/exportaccount_request.rbi +20 -0
- data/lib/no_response/models/operations/exportaccount_response.rb +32 -0
- data/lib/no_response/models/operations/exportaccount_response.rbi +20 -0
- data/lib/no_response/models/operations/getaccountdecision_request.rb +37 -0
- data/lib/no_response/models/operations/getaccountdecision_request.rbi +20 -0
- data/lib/no_response/models/operations/getaccountdecision_response.rb +34 -0
- data/lib/no_response/models/operations/getaccountdecision_response.rbi +20 -0
- data/lib/no_response/models/operations/getassessmentversion_request.rb +48 -0
- data/lib/no_response/models/operations/getassessmentversion_request.rbi +26 -0
- data/lib/no_response/models/operations/getassessmentversion_response.rb +32 -0
- data/lib/no_response/models/operations/getassessmentversion_response.rbi +20 -0
- data/lib/no_response/models/operations/listaccountcredentials_request.rb +45 -0
- data/lib/no_response/models/operations/listaccountcredentials_request.rbi +26 -0
- data/lib/no_response/models/operations/listaccountcredentials_response.rb +32 -0
- data/lib/no_response/models/operations/listaccountcredentials_response.rbi +20 -0
- data/lib/no_response/models/operations/listaccountoutcomes_request.rb +45 -0
- data/lib/no_response/models/operations/listaccountoutcomes_request.rbi +26 -0
- data/lib/no_response/models/operations/listaccountoutcomes_response.rb +32 -0
- data/lib/no_response/models/operations/listaccountoutcomes_response.rbi +20 -0
- data/lib/no_response/models/operations/listrequestdiagnostics_request.rb +84 -0
- data/lib/no_response/models/operations/listrequestdiagnostics_request.rbi +50 -0
- data/lib/no_response/models/operations/listrequestdiagnostics_response.rb +34 -0
- data/lib/no_response/models/operations/listrequestdiagnostics_response.rbi +20 -0
- data/lib/no_response/models/operations/recordaccountoutcome_request.rb +48 -0
- data/lib/no_response/models/operations/recordaccountoutcome_request.rbi +26 -0
- data/lib/no_response/models/operations/recordaccountoutcome_response.rb +32 -0
- data/lib/no_response/models/operations/recordaccountoutcome_response.rbi +20 -0
- data/lib/no_response/models/operations/retireaccountcredential_request.rb +37 -0
- data/lib/no_response/models/operations/retireaccountcredential_request.rbi +20 -0
- data/lib/no_response/models/operations/retireaccountcredential_response.rb +34 -0
- data/lib/no_response/models/operations/retireaccountcredential_response.rbi +20 -0
- data/lib/no_response/models/operations/searchassessments_response.rb +32 -0
- data/lib/no_response/models/operations/searchassessments_response.rbi +20 -0
- data/lib/no_response/models/operations.rb +21 -0
- data/lib/no_response/models/shared/accountbinding.rb +83 -0
- data/lib/no_response/models/shared/accountbinding.rbi +44 -0
- data/lib/no_response/models/shared/accountbindingactor.rb +40 -0
- data/lib/no_response/models/shared/accountbindingactor.rbi +20 -0
- data/lib/no_response/models/shared/accountbindingrequest.rb +33 -0
- data/lib/no_response/models/shared/accountbindingrequest.rbi +14 -0
- data/lib/no_response/models/shared/accountdecisionsnapshot.rb +94 -0
- data/lib/no_response/models/shared/accountdecisionsnapshot.rbi +44 -0
- data/lib/no_response/models/shared/accountexport.rb +178 -0
- data/lib/no_response/models/shared/accountexport.rbi +92 -0
- data/lib/no_response/models/shared/accountoutcome.rb +152 -0
- data/lib/no_response/models/shared/accountoutcome.rbi +80 -0
- data/lib/no_response/models/shared/accountoutcomeactor.rb +40 -0
- data/lib/no_response/models/shared/accountoutcomeactor.rbi +20 -0
- data/lib/no_response/models/shared/accountoutcomepage.rb +65 -0
- data/lib/no_response/models/shared/accountoutcomepage.rbi +32 -0
- data/lib/no_response/models/shared/accountoutcomerequest.rb +71 -0
- data/lib/no_response/models/shared/accountoutcomerequest.rbi +32 -0
- data/lib/no_response/models/shared/assessmentrevision.rb +101 -0
- data/lib/no_response/models/shared/assessmentrevision.rbi +44 -0
- data/lib/no_response/models/shared/assessmentsearchpage.rb +68 -0
- data/lib/no_response/models/shared/assessmentsearchpage.rbi +32 -0
- data/lib/no_response/models/shared/assessmentsearchrequest.rb +146 -0
- data/lib/no_response/models/shared/assessmentsearchrequest.rbi +68 -0
- data/lib/no_response/models/shared/conflicterrorcode.rb +4 -0
- data/lib/no_response/models/shared/credentialassociation.rb +78 -0
- data/lib/no_response/models/shared/credentialassociation.rbi +44 -0
- data/lib/no_response/models/shared/credentialassociationactor.rb +40 -0
- data/lib/no_response/models/shared/credentialassociationactor.rbi +20 -0
- data/lib/no_response/models/shared/credentialassociationretiredby.rb +40 -0
- data/lib/no_response/models/shared/credentialassociationretiredby.rbi +20 -0
- data/lib/no_response/models/shared/credentialpage.rb +56 -0
- data/lib/no_response/models/shared/credentialpage.rbi +26 -0
- data/lib/no_response/models/shared/credentialrequest.rb +32 -0
- data/lib/no_response/models/shared/credentialrequest.rbi +14 -0
- data/lib/no_response/models/shared/decision.rb +18 -0
- data/lib/no_response/models/shared/decision.rbi +9 -0
- data/lib/no_response/models/shared/decisionreceipt.rb +112 -0
- data/lib/no_response/models/shared/decisionreceipt.rbi +50 -0
- data/lib/no_response/models/shared/exclusion.rb +23 -0
- data/lib/no_response/models/shared/exclusion.rbi +9 -0
- data/lib/no_response/models/shared/exportassessmentoutcome.rb +85 -0
- data/lib/no_response/models/shared/exportassessmentoutcome.rbi +44 -0
- data/lib/no_response/models/shared/reasoncode.rb +1 -0
- data/lib/no_response/models/shared/requestdiagnostic.rb +145 -0
- data/lib/no_response/models/shared/requestdiagnostic.rbi +80 -0
- data/lib/no_response/models/shared/requestdiagnosticpage.rb +40 -0
- data/lib/no_response/models/shared/requestdiagnosticpage.rbi +20 -0
- data/lib/no_response/models/shared.rb +23 -0
- data/lib/no_response/noresponseclient.rb +12 -1
- data/lib/no_response/requests.rb +320 -0
- data/lib/no_response/sdkconfiguration.rb +2 -2
- data/lib/noresponse.rb +1 -0
- metadata +91 -2
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module NoResponse
|
|
5
|
+
module Models
|
|
6
|
+
module Shared
|
|
7
|
+
# Authenticated attempts in a bounded interval, newest first. Keep the same filters when paging.
|
|
8
|
+
class RequestDiagnosticPage
|
|
9
|
+
extend T::Sig
|
|
10
|
+
include Crystalline::MetadataFields
|
|
11
|
+
|
|
12
|
+
field(
|
|
13
|
+
:items,
|
|
14
|
+
Crystalline::Array.new(Models::Shared::RequestDiagnostic),
|
|
15
|
+
{'format_json': {'letter_case': ::NoResponse::Utils.field_name("items"), required: true}}
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
field(
|
|
19
|
+
:next_cursor,
|
|
20
|
+
Crystalline::Nilable.new(::String),
|
|
21
|
+
{'format_json': {'letter_case': ::NoResponse::Utils.field_name("next_cursor")}}
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
sig { params(items: T::Array[Models::Shared::RequestDiagnostic], next_cursor: T.nilable(::String)).void }
|
|
25
|
+
def initialize(items:, next_cursor: nil)
|
|
26
|
+
@items = items
|
|
27
|
+
@next_cursor = next_cursor
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
31
|
+
def ==(other)
|
|
32
|
+
return false unless other.is_a?(self.class)
|
|
33
|
+
return false unless @items == other.items
|
|
34
|
+
return false unless @next_cursor == other.next_cursor
|
|
35
|
+
true
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
class NoResponse::Models::Shared::RequestDiagnosticPage
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class NoResponse::Models::Shared::RequestDiagnosticPage
|
|
9
|
+
def items
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def items=(str_)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def next_cursor
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def next_cursor=(str_)
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -5,12 +5,21 @@ module NoResponse
|
|
|
5
5
|
module Models
|
|
6
6
|
module Shared
|
|
7
7
|
autoload :Account, "no_response/models/shared/account.rb"
|
|
8
|
+
autoload :AccountBinding, "no_response/models/shared/accountbinding.rb"
|
|
9
|
+
autoload :AccountBindingActor, "no_response/models/shared/accountbindingactor.rb"
|
|
10
|
+
autoload :AccountBindingRequest, "no_response/models/shared/accountbindingrequest.rb"
|
|
8
11
|
autoload :AccountDecision, "no_response/models/shared/accountdecision.rb"
|
|
12
|
+
autoload :AccountDecisionSnapshot, "no_response/models/shared/accountdecisionsnapshot.rb"
|
|
9
13
|
autoload :AccountDecisionsByFlow, "no_response/models/shared/accountdecisionsbyflow.rb"
|
|
10
14
|
autoload :AccountDeleted, "no_response/models/shared/accountdeleted.rb"
|
|
11
15
|
autoload :AccountDeletedEvent, "no_response/models/shared/accountdeletedevent.rb"
|
|
12
16
|
autoload :AccountDeletion, "no_response/models/shared/accountdeletion.rb"
|
|
17
|
+
autoload :AccountExport, "no_response/models/shared/accountexport.rb"
|
|
13
18
|
autoload :AccountList, "no_response/models/shared/accountlist.rb"
|
|
19
|
+
autoload :AccountOutcome, "no_response/models/shared/accountoutcome.rb"
|
|
20
|
+
autoload :AccountOutcomeActor, "no_response/models/shared/accountoutcomeactor.rb"
|
|
21
|
+
autoload :AccountOutcomePage, "no_response/models/shared/accountoutcomepage.rb"
|
|
22
|
+
autoload :AccountOutcomeRequest, "no_response/models/shared/accountoutcomerequest.rb"
|
|
14
23
|
autoload :AccountRisk, "no_response/models/shared/accountrisk.rb"
|
|
15
24
|
autoload :AccountRiskChanged, "no_response/models/shared/accountriskchanged.rb"
|
|
16
25
|
autoload :AccountRiskChangedEvent, "no_response/models/shared/accountriskchangedevent.rb"
|
|
@@ -33,6 +42,9 @@ module NoResponse
|
|
|
33
42
|
autoload :AssessmentRequestIdentifiers, "no_response/models/shared/assessmentrequestidentifiers.rb"
|
|
34
43
|
autoload :AssessmentRequestIssuedCredential, "no_response/models/shared/assessmentrequestissuedcredential.rb"
|
|
35
44
|
autoload :AssessmentRequestPolicyContext, "no_response/models/shared/assessmentrequestpolicycontext.rb"
|
|
45
|
+
autoload :AssessmentRevision, "no_response/models/shared/assessmentrevision.rb"
|
|
46
|
+
autoload :AssessmentSearchPage, "no_response/models/shared/assessmentsearchpage.rb"
|
|
47
|
+
autoload :AssessmentSearchRequest, "no_response/models/shared/assessmentsearchrequest.rb"
|
|
36
48
|
autoload :AssessmentUpdatedData, "no_response/models/shared/assessmentupdateddata.rb"
|
|
37
49
|
autoload :AssessmentUpdatedEvent, "no_response/models/shared/assessmentupdatedevent.rb"
|
|
38
50
|
autoload :AssuranceLevel, "no_response/models/shared/assurancelevel.rb"
|
|
@@ -52,6 +64,13 @@ module NoResponse
|
|
|
52
64
|
autoload :Consistency, "no_response/models/shared/consistency.rb"
|
|
53
65
|
autoload :ConsistencyValue, "no_response/models/shared/consistencyvalue.rb"
|
|
54
66
|
autoload :Country, "no_response/models/shared/country.rb"
|
|
67
|
+
autoload :CredentialAssociation, "no_response/models/shared/credentialassociation.rb"
|
|
68
|
+
autoload :CredentialAssociationActor, "no_response/models/shared/credentialassociationactor.rb"
|
|
69
|
+
autoload :CredentialAssociationRetiredBy, "no_response/models/shared/credentialassociationretiredby.rb"
|
|
70
|
+
autoload :CredentialPage, "no_response/models/shared/credentialpage.rb"
|
|
71
|
+
autoload :CredentialRequest, "no_response/models/shared/credentialrequest.rb"
|
|
72
|
+
autoload :Decision, "no_response/models/shared/decision.rb"
|
|
73
|
+
autoload :DecisionReceipt, "no_response/models/shared/decisionreceipt.rb"
|
|
55
74
|
autoload :DefaultDepth, "no_response/models/shared/defaultdepth.rb"
|
|
56
75
|
autoload :Depth, "no_response/models/shared/depth.rb"
|
|
57
76
|
autoload :Direction, "no_response/models/shared/direction.rb"
|
|
@@ -64,6 +83,7 @@ module NoResponse
|
|
|
64
83
|
autoload :EnforcementState, "no_response/models/shared/enforcementstate.rb"
|
|
65
84
|
autoload :EnforcementStatus, "no_response/models/shared/enforcementstatus.rb"
|
|
66
85
|
autoload :Environment, "no_response/models/shared/environment.rb"
|
|
86
|
+
autoload :ExportAssessmentOutcome, "no_response/models/shared/exportassessmentoutcome.rb"
|
|
67
87
|
autoload :Failure, "no_response/models/shared/failure.rb"
|
|
68
88
|
autoload :FailureReason, "no_response/models/shared/failurereason.rb"
|
|
69
89
|
autoload :Flow, "no_response/models/shared/flow.rb"
|
|
@@ -120,6 +140,8 @@ module NoResponse
|
|
|
120
140
|
autoload :ReasonCode, "no_response/models/shared/reasoncode.rb"
|
|
121
141
|
autoload :ReasonIdentifier, "no_response/models/shared/reasonidentifier.rb"
|
|
122
142
|
autoload :Recommendation, "no_response/models/shared/recommendation.rb"
|
|
143
|
+
autoload :RequestDiagnostic, "no_response/models/shared/requestdiagnostic.rb"
|
|
144
|
+
autoload :RequestDiagnosticPage, "no_response/models/shared/requestdiagnosticpage.rb"
|
|
123
145
|
autoload :ResponseMode, "no_response/models/shared/responsemode.rb"
|
|
124
146
|
autoload :Risk, "no_response/models/shared/risk.rb"
|
|
125
147
|
autoload :RiskConfidence, "no_response/models/shared/riskconfidence.rb"
|
|
@@ -171,6 +193,7 @@ module NoResponse
|
|
|
171
193
|
autoload :AlternateNameUnion, "no_response/models/shared/alternate_name_union.rb"
|
|
172
194
|
autoload :Email, "no_response/models/shared/email.rb"
|
|
173
195
|
autoload :EmailUnion, "no_response/models/shared/email_union.rb"
|
|
196
|
+
autoload :Exclusion, "no_response/models/shared/exclusion.rb"
|
|
174
197
|
autoload :Location, "no_response/models/shared/location.rb"
|
|
175
198
|
autoload :LocationUnion, "no_response/models/shared/location_union.rb"
|
|
176
199
|
autoload :NameCandidate, "no_response/models/shared/name_candidate.rb"
|
|
@@ -15,7 +15,17 @@ module NoResponse
|
|
|
15
15
|
class NoResponseClient
|
|
16
16
|
extend T::Sig
|
|
17
17
|
|
|
18
|
-
attr_accessor
|
|
18
|
+
attr_accessor(
|
|
19
|
+
:assessments,
|
|
20
|
+
:accounts,
|
|
21
|
+
:key_usage,
|
|
22
|
+
:keys,
|
|
23
|
+
:integrations,
|
|
24
|
+
:webhook_endpoints,
|
|
25
|
+
:settings,
|
|
26
|
+
:requests,
|
|
27
|
+
:lists
|
|
28
|
+
)
|
|
19
29
|
|
|
20
30
|
# Instantiates the SDK, configuring it with the provided parameters.
|
|
21
31
|
#
|
|
@@ -94,6 +104,7 @@ module NoResponse
|
|
|
94
104
|
@integrations = Integrations.new(@sdk_configuration)
|
|
95
105
|
@webhook_endpoints = WebhookEndpoints.new(@sdk_configuration)
|
|
96
106
|
@settings = Settings.new(@sdk_configuration)
|
|
107
|
+
@requests = Requests.new(@sdk_configuration)
|
|
97
108
|
@lists = Lists.new(@sdk_configuration)
|
|
98
109
|
end
|
|
99
110
|
|
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
require "faraday"
|
|
5
|
+
require "faraday/multipart"
|
|
6
|
+
require "faraday/retry"
|
|
7
|
+
require "sorbet-runtime"
|
|
8
|
+
|
|
9
|
+
require_relative "sdk_hooks/hooks"
|
|
10
|
+
require_relative "utils/retries"
|
|
11
|
+
|
|
12
|
+
module NoResponse
|
|
13
|
+
extend T::Sig
|
|
14
|
+
|
|
15
|
+
class Requests
|
|
16
|
+
extend T::Sig
|
|
17
|
+
|
|
18
|
+
sig { params(sdk_config: SDKConfiguration).void }
|
|
19
|
+
def initialize(sdk_config)
|
|
20
|
+
@sdk_configuration = sdk_config
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
sig { params(base_url: String, url_variables: T.nilable(T::Hash[Symbol, T.any(String, T::Enum)])).returns(String) }
|
|
24
|
+
def get_url(base_url:, url_variables: nil)
|
|
25
|
+
sd_base_url, sd_options = @sdk_configuration.get_server_details
|
|
26
|
+
|
|
27
|
+
if base_url.nil?
|
|
28
|
+
base_url = sd_base_url
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
if url_variables.nil?
|
|
32
|
+
url_variables = sd_options
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
return Utils.template_url(base_url, url_variables)
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
sig {
|
|
39
|
+
params(
|
|
40
|
+
request: Models::Operations::ListRequestDiagnosticsRequest,
|
|
41
|
+
retries: T.nilable(Utils::RetryConfig),
|
|
42
|
+
timeout_ms: T.nilable(Integer),
|
|
43
|
+
http_headers: T.nilable(T::Hash[T.any(String, Symbol), String])
|
|
44
|
+
)
|
|
45
|
+
.returns(Models::Operations::ListRequestDiagnosticsResponse)
|
|
46
|
+
}
|
|
47
|
+
def list(request:, retries: nil, timeout_ms: nil, http_headers: nil)
|
|
48
|
+
# list - Search request diagnostics
|
|
49
|
+
# Search authenticated request attempts by time, route, status or request correlation id. The interval is at most seven days. Each attempt has a unique id and may include the exact served decision. Records are bounded best effort and exclude request bodies, secrets and source payloads. A repeated correlation id does not overwrite another attempt.
|
|
50
|
+
url, params = @sdk_configuration.get_server_details
|
|
51
|
+
base_url = Utils.template_url(url, params)
|
|
52
|
+
url = "#{base_url}/v1/requests"
|
|
53
|
+
headers = {}
|
|
54
|
+
headers = T.cast(headers, T::Hash[String, String])
|
|
55
|
+
query_params = Utils.get_query_params(Models::Operations::ListRequestDiagnosticsRequest, request, nil)
|
|
56
|
+
headers["Accept"] = "application/json"
|
|
57
|
+
headers["user-agent"] = @sdk_configuration.user_agent
|
|
58
|
+
retries ||= @sdk_configuration.retry_config
|
|
59
|
+
retries ||= Utils::RetryConfig.new(
|
|
60
|
+
backoff: Utils::BackoffStrategy.new(
|
|
61
|
+
exponent: 2.0,
|
|
62
|
+
initial_interval: 500,
|
|
63
|
+
max_elapsed_time: 30_000,
|
|
64
|
+
max_interval: 8000
|
|
65
|
+
),
|
|
66
|
+
retry_connection_errors: true,
|
|
67
|
+
strategy: "backoff"
|
|
68
|
+
)
|
|
69
|
+
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
|
70
|
+
retry_options[:retry_statuses] = [408, 429, 500, 501, 502, 503, 504, 505]
|
|
71
|
+
|
|
72
|
+
security = @sdk_configuration.security_source&.call
|
|
73
|
+
|
|
74
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
|
75
|
+
timeout ||= @sdk_configuration.timeout
|
|
76
|
+
|
|
77
|
+
connection = @sdk_configuration.client.dup
|
|
78
|
+
connection.use(Utils::RetryMiddleware, retry_options)
|
|
79
|
+
|
|
80
|
+
hook_ctx = SDKHooks::HookContext.new(
|
|
81
|
+
config: @sdk_configuration,
|
|
82
|
+
base_url: base_url,
|
|
83
|
+
oauth2_scopes: nil,
|
|
84
|
+
operation_id: "listRequestDiagnostics",
|
|
85
|
+
security_source: @sdk_configuration.security_source
|
|
86
|
+
)
|
|
87
|
+
|
|
88
|
+
error = T.let(nil, T.nilable(StandardError))
|
|
89
|
+
http_response = T.let(nil, T.nilable(Faraday::Response))
|
|
90
|
+
|
|
91
|
+
begin
|
|
92
|
+
http_response = T.must(connection).get(url) do |req|
|
|
93
|
+
req.headers.merge!(headers)
|
|
94
|
+
req.options.timeout = timeout unless timeout.nil?
|
|
95
|
+
req.params = query_params
|
|
96
|
+
Utils.configure_request_security(req, security)
|
|
97
|
+
http_headers&.each do |key, value|
|
|
98
|
+
req.headers[key.to_s] = value
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
@sdk_configuration.hooks.before_request(
|
|
102
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
103
|
+
hook_ctx: hook_ctx
|
|
104
|
+
),
|
|
105
|
+
request: req
|
|
106
|
+
)
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
rescue StandardError => e
|
|
110
|
+
error = e
|
|
111
|
+
ensure
|
|
112
|
+
if http_response.nil? || Utils.error_status?(http_response.status)
|
|
113
|
+
http_response = @sdk_configuration.hooks.after_error(
|
|
114
|
+
error: error,
|
|
115
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
|
116
|
+
hook_ctx: hook_ctx
|
|
117
|
+
),
|
|
118
|
+
response: http_response
|
|
119
|
+
)
|
|
120
|
+
else
|
|
121
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
122
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
123
|
+
hook_ctx: hook_ctx
|
|
124
|
+
),
|
|
125
|
+
response: http_response
|
|
126
|
+
)
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
if http_response.nil?
|
|
130
|
+
raise error if !error.nil?
|
|
131
|
+
raise "no response"
|
|
132
|
+
end
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
content_type = http_response.headers.fetch("Content-Type", "application/octet-stream")
|
|
136
|
+
if Utils.match_status_code(http_response.status, ["200"])
|
|
137
|
+
if Utils.match_content_type(content_type, "application/json")
|
|
138
|
+
@sdk_configuration.hooks.after_success(
|
|
139
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
140
|
+
hook_ctx: hook_ctx
|
|
141
|
+
),
|
|
142
|
+
response: http_response
|
|
143
|
+
)
|
|
144
|
+
response_data = http_response.env.response_body
|
|
145
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Shared::RequestDiagnosticPage)
|
|
146
|
+
result = obj
|
|
147
|
+
response = Models::Operations::ListRequestDiagnosticsResponse.new(
|
|
148
|
+
result: result,
|
|
149
|
+
headers: http_response.headers
|
|
150
|
+
)
|
|
151
|
+
|
|
152
|
+
return response
|
|
153
|
+
else
|
|
154
|
+
raise(
|
|
155
|
+
::NoResponse::Models::Errors::APIStatusError.new(
|
|
156
|
+
status_code: http_response.status,
|
|
157
|
+
body: http_response.env.response_body,
|
|
158
|
+
raw_response: http_response
|
|
159
|
+
),
|
|
160
|
+
"Unknown content type received"
|
|
161
|
+
)
|
|
162
|
+
end
|
|
163
|
+
elsif Utils.match_status_code(http_response.status, ["400"])
|
|
164
|
+
if Utils.match_content_type(content_type, "application/problem+json")
|
|
165
|
+
@sdk_configuration.hooks.after_success(
|
|
166
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
167
|
+
hook_ctx: hook_ctx
|
|
168
|
+
),
|
|
169
|
+
response: http_response
|
|
170
|
+
)
|
|
171
|
+
response_data = http_response.env.response_body
|
|
172
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::BadRequestError)
|
|
173
|
+
raise obj
|
|
174
|
+
else
|
|
175
|
+
raise(
|
|
176
|
+
::NoResponse::Models::Errors::APIStatusError.new(
|
|
177
|
+
status_code: http_response.status,
|
|
178
|
+
body: http_response.env.response_body,
|
|
179
|
+
raw_response: http_response
|
|
180
|
+
),
|
|
181
|
+
"Unknown content type received"
|
|
182
|
+
)
|
|
183
|
+
end
|
|
184
|
+
elsif Utils.match_status_code(http_response.status, ["401"])
|
|
185
|
+
if Utils.match_content_type(content_type, "application/problem+json")
|
|
186
|
+
@sdk_configuration.hooks.after_success(
|
|
187
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
188
|
+
hook_ctx: hook_ctx
|
|
189
|
+
),
|
|
190
|
+
response: http_response
|
|
191
|
+
)
|
|
192
|
+
response_data = http_response.env.response_body
|
|
193
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::AuthenticationError)
|
|
194
|
+
raise obj
|
|
195
|
+
else
|
|
196
|
+
raise(
|
|
197
|
+
::NoResponse::Models::Errors::APIStatusError.new(
|
|
198
|
+
status_code: http_response.status,
|
|
199
|
+
body: http_response.env.response_body,
|
|
200
|
+
raw_response: http_response
|
|
201
|
+
),
|
|
202
|
+
"Unknown content type received"
|
|
203
|
+
)
|
|
204
|
+
end
|
|
205
|
+
elsif Utils.match_status_code(http_response.status, ["403"])
|
|
206
|
+
if Utils.match_content_type(content_type, "application/problem+json")
|
|
207
|
+
@sdk_configuration.hooks.after_success(
|
|
208
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
209
|
+
hook_ctx: hook_ctx
|
|
210
|
+
),
|
|
211
|
+
response: http_response
|
|
212
|
+
)
|
|
213
|
+
response_data = http_response.env.response_body
|
|
214
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::PermissionDeniedError)
|
|
215
|
+
raise obj
|
|
216
|
+
else
|
|
217
|
+
raise(
|
|
218
|
+
::NoResponse::Models::Errors::APIStatusError.new(
|
|
219
|
+
status_code: http_response.status,
|
|
220
|
+
body: http_response.env.response_body,
|
|
221
|
+
raw_response: http_response
|
|
222
|
+
),
|
|
223
|
+
"Unknown content type received"
|
|
224
|
+
)
|
|
225
|
+
end
|
|
226
|
+
elsif Utils.match_status_code(http_response.status, ["404"])
|
|
227
|
+
if Utils.match_content_type(content_type, "application/problem+json")
|
|
228
|
+
@sdk_configuration.hooks.after_success(
|
|
229
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
230
|
+
hook_ctx: hook_ctx
|
|
231
|
+
),
|
|
232
|
+
response: http_response
|
|
233
|
+
)
|
|
234
|
+
response_data = http_response.env.response_body
|
|
235
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::NotFoundError)
|
|
236
|
+
raise obj
|
|
237
|
+
else
|
|
238
|
+
raise(
|
|
239
|
+
::NoResponse::Models::Errors::APIStatusError.new(
|
|
240
|
+
status_code: http_response.status,
|
|
241
|
+
body: http_response.env.response_body,
|
|
242
|
+
raw_response: http_response
|
|
243
|
+
),
|
|
244
|
+
"Unknown content type received"
|
|
245
|
+
)
|
|
246
|
+
end
|
|
247
|
+
elsif Utils.match_status_code(http_response.status, ["409"])
|
|
248
|
+
if Utils.match_content_type(content_type, "application/problem+json")
|
|
249
|
+
@sdk_configuration.hooks.after_success(
|
|
250
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
251
|
+
hook_ctx: hook_ctx
|
|
252
|
+
),
|
|
253
|
+
response: http_response
|
|
254
|
+
)
|
|
255
|
+
response_data = http_response.env.response_body
|
|
256
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ConflictError)
|
|
257
|
+
raise obj
|
|
258
|
+
else
|
|
259
|
+
raise(
|
|
260
|
+
::NoResponse::Models::Errors::APIStatusError.new(
|
|
261
|
+
status_code: http_response.status,
|
|
262
|
+
body: http_response.env.response_body,
|
|
263
|
+
raw_response: http_response
|
|
264
|
+
),
|
|
265
|
+
"Unknown content type received"
|
|
266
|
+
)
|
|
267
|
+
end
|
|
268
|
+
elsif Utils.match_status_code(http_response.status, ["429"])
|
|
269
|
+
if Utils.match_content_type(content_type, "application/problem+json")
|
|
270
|
+
@sdk_configuration.hooks.after_success(
|
|
271
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
272
|
+
hook_ctx: hook_ctx
|
|
273
|
+
),
|
|
274
|
+
response: http_response
|
|
275
|
+
)
|
|
276
|
+
response_data = http_response.env.response_body
|
|
277
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::RateLimitError)
|
|
278
|
+
raise obj
|
|
279
|
+
else
|
|
280
|
+
raise(
|
|
281
|
+
::NoResponse::Models::Errors::APIStatusError.new(
|
|
282
|
+
status_code: http_response.status,
|
|
283
|
+
body: http_response.env.response_body,
|
|
284
|
+
raw_response: http_response
|
|
285
|
+
),
|
|
286
|
+
"Unknown content type received"
|
|
287
|
+
)
|
|
288
|
+
end
|
|
289
|
+
elsif Utils.match_status_code(http_response.status, ["4XX"])
|
|
290
|
+
raise(
|
|
291
|
+
::NoResponse::Models::Errors::APIStatusError.new(
|
|
292
|
+
status_code: http_response.status,
|
|
293
|
+
body: http_response.env.response_body,
|
|
294
|
+
raw_response: http_response
|
|
295
|
+
),
|
|
296
|
+
"API error occurred"
|
|
297
|
+
)
|
|
298
|
+
elsif Utils.match_status_code(http_response.status, ["5XX"])
|
|
299
|
+
raise(
|
|
300
|
+
::NoResponse::Models::Errors::APIStatusError.new(
|
|
301
|
+
status_code: http_response.status,
|
|
302
|
+
body: http_response.env.response_body,
|
|
303
|
+
raw_response: http_response
|
|
304
|
+
),
|
|
305
|
+
"API error occurred"
|
|
306
|
+
)
|
|
307
|
+
else
|
|
308
|
+
raise(
|
|
309
|
+
::NoResponse::Models::Errors::APIStatusError.new(
|
|
310
|
+
status_code: http_response.status,
|
|
311
|
+
body: http_response.env.response_body,
|
|
312
|
+
raw_response: http_response
|
|
313
|
+
),
|
|
314
|
+
"Unknown status code received"
|
|
315
|
+
)
|
|
316
|
+
|
|
317
|
+
end
|
|
318
|
+
end
|
|
319
|
+
end
|
|
320
|
+
end
|
|
@@ -95,9 +95,9 @@ module NoResponse
|
|
|
95
95
|
|
|
96
96
|
@language = "ruby"
|
|
97
97
|
@openapi_doc_version = "1"
|
|
98
|
-
@sdk_version = "8.
|
|
98
|
+
@sdk_version = "8.2.0"
|
|
99
99
|
@gen_version = "internal"
|
|
100
|
-
@user_agent = "noresponse-sdk/ruby 8.
|
|
100
|
+
@user_agent = "noresponse-sdk/ruby 8.2.0 internal 1 noresponse"
|
|
101
101
|
end
|
|
102
102
|
|
|
103
103
|
sig { returns([String, T::Hash[Symbol, String]]) }
|
data/lib/noresponse.rb
CHANGED
|
@@ -10,6 +10,7 @@ module NoResponse
|
|
|
10
10
|
autoload :Integrations, "no_response/integrations"
|
|
11
11
|
autoload :WebhookEndpoints, "no_response/webhookendpoints"
|
|
12
12
|
autoload :Settings, "no_response/settings"
|
|
13
|
+
autoload :Requests, "no_response/requests"
|
|
13
14
|
autoload :Lists, "no_response/lists"
|
|
14
15
|
|
|
15
16
|
module Models
|