noresponse 6.0.0 → 7.0.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 +663 -71
- data/lib/no_response/auth.rb +1 -1
- data/lib/no_response/late_results.rb +288 -435
- data/lib/no_response/models/operations/listaccounts_request.rb +52 -0
- data/lib/no_response/models/operations/listaccounts_request.rbi +26 -0
- data/lib/no_response/models/operations/listaccounts_response.rb +32 -0
- data/lib/no_response/models/operations/listaccounts_response.rbi +20 -0
- data/lib/no_response/models/operations/recordenforcement_request.rb +33 -0
- data/lib/no_response/models/operations/recordenforcement_request.rbi +20 -0
- data/lib/no_response/models/operations/recordenforcement_response.rb +32 -0
- data/lib/no_response/models/operations/recordenforcement_response.rbi +20 -0
- data/lib/no_response/models/operations.rb +4 -0
- data/lib/no_response/models/shared/accountlist.rb +40 -0
- data/lib/no_response/models/shared/accountlist.rbi +20 -0
- data/lib/no_response/models/shared/conflicterrorcode.rb +1 -0
- data/lib/no_response/models/shared/enforcement.rb +156 -0
- data/lib/no_response/models/shared/enforcement.rbi +68 -0
- data/lib/no_response/models/shared/enforcementaction.rb +23 -0
- data/lib/no_response/models/shared/enforcementaction.rbi +9 -0
- data/lib/no_response/models/shared/enforcementprovider.rb +21 -0
- data/lib/no_response/models/shared/enforcementprovider.rbi +9 -0
- data/lib/no_response/models/shared/enforcementrequest.rb +122 -0
- data/lib/no_response/models/shared/enforcementrequest.rbi +50 -0
- data/lib/no_response/models/shared/enforcementstate.rb +22 -0
- data/lib/no_response/models/shared/enforcementstate.rbi +9 -0
- data/lib/no_response/models/shared/enforcementstatus.rb +19 -0
- data/lib/no_response/models/shared/enforcementstatus.rbi +9 -0
- data/lib/no_response/models/shared.rb +7 -0
- data/lib/no_response/sdkconfiguration.rb +2 -2
- metadata +23 -1
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module NoResponse
|
|
5
|
+
module Models
|
|
6
|
+
module Shared
|
|
7
|
+
# POST /v1/accounts/{account_id}/enforcements body: what the workspace did to the account in its identity provider after reading the account's risk at risk_version. The account is named by the path and the workspace by the API key, so neither is a body member. An enforcement is the workspace's own action, not an outcome: what the workspace later learned about an assessment goes to POST /v1/assessments/{assessment_id}/outcomes. The record's key is (account, risk_version, flow, action), so a retry of the same report is safe and needs no Idempotency-Key.
|
|
8
|
+
class EnforcementRequest
|
|
9
|
+
extend T::Sig
|
|
10
|
+
include Crystalline::MetadataFields
|
|
11
|
+
|
|
12
|
+
# The account's risk_version the workspace acted on, as read from GET /v1/accounts/{account_id}, GET /v1/accounts, an assessment answer or account.risk_changed. A version older than the account's current one is accepted and stored; a version newer than the current one answers 409 risk_version_ahead.
|
|
13
|
+
field(
|
|
14
|
+
:risk_version,
|
|
15
|
+
::Integer,
|
|
16
|
+
{'format_json': {'letter_case': ::NoResponse::Utils.field_name("risk_version"), required: true}}
|
|
17
|
+
)
|
|
18
|
+
# The event an assessment is made for: account_creation (a user creates an account), login (a user returns to an existing account) or purchase (a payment or a credit grant). The account's risk is reported with the decision for this flow.
|
|
19
|
+
field(
|
|
20
|
+
:flow,
|
|
21
|
+
Models::Shared::Flow,
|
|
22
|
+
{
|
|
23
|
+
'format_json': {
|
|
24
|
+
'letter_case': ::NoResponse::Utils.field_name("flow"),
|
|
25
|
+
required: true,
|
|
26
|
+
'decoder': ::NoResponse::Utils.open_enum_from_string(Models::Shared::Flow, false)
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
)
|
|
30
|
+
# What the workspace did in its identity provider: revoke_sessions (signed the account out everywhere), restrict (limited what the account can do), unrestrict (lifted an earlier restriction), fail_onboarding (stopped an account that was still onboarding), reject_activation (refused to activate a provisional account) or none (decided to take no action).
|
|
31
|
+
field(
|
|
32
|
+
:action,
|
|
33
|
+
Models::Shared::EnforcementAction,
|
|
34
|
+
{
|
|
35
|
+
'format_json': {
|
|
36
|
+
'letter_case': ::NoResponse::Utils.field_name("action"),
|
|
37
|
+
required: true,
|
|
38
|
+
'decoder': ::NoResponse::Utils.open_enum_from_string(Models::Shared::EnforcementAction, false)
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
# The account's state in the workspace's identity provider just before the action: onboarding, provisional (created, not yet activated), active, restricted or rejected.
|
|
43
|
+
field(
|
|
44
|
+
:state_before,
|
|
45
|
+
Models::Shared::EnforcementState,
|
|
46
|
+
{
|
|
47
|
+
'format_json': {
|
|
48
|
+
'letter_case': ::NoResponse::Utils.field_name("state_before"),
|
|
49
|
+
required: true,
|
|
50
|
+
'decoder': ::NoResponse::Utils.open_enum_from_string(Models::Shared::EnforcementState, false)
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
)
|
|
54
|
+
# applied when the identity provider accepted the action, failed when it refused it or could not be reached. Only applied counts as enforced.
|
|
55
|
+
field(
|
|
56
|
+
:status,
|
|
57
|
+
Models::Shared::EnforcementStatus,
|
|
58
|
+
{
|
|
59
|
+
'format_json': {
|
|
60
|
+
'letter_case': ::NoResponse::Utils.field_name("status"),
|
|
61
|
+
required: true,
|
|
62
|
+
'decoder': ::NoResponse::Utils.open_enum_from_string(Models::Shared::EnforcementStatus, false)
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
)
|
|
66
|
+
# The identity provider the action ran in; custom for the workspace's own user store.
|
|
67
|
+
field(
|
|
68
|
+
:provider,
|
|
69
|
+
Models::Shared::EnforcementProvider,
|
|
70
|
+
{
|
|
71
|
+
'format_json': {
|
|
72
|
+
'letter_case': ::NoResponse::Utils.field_name("provider"),
|
|
73
|
+
required: true,
|
|
74
|
+
'decoder': ::NoResponse::Utils.open_enum_from_string(Models::Shared::EnforcementProvider, false)
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
)
|
|
78
|
+
# Why a failed action failed, as a short code of the workspace's choosing (lower-case letters, digits, '_', '.' and '-'), such as the identity provider's error code. Allowed only with status failed: with status applied it answers 400 invalid_request. Keep personal data out of it.
|
|
79
|
+
field(
|
|
80
|
+
:error_code,
|
|
81
|
+
Crystalline::Nilable.new(::String),
|
|
82
|
+
{'format_json': {'letter_case': ::NoResponse::Utils.field_name("error_code")}}
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
sig {
|
|
86
|
+
params(
|
|
87
|
+
risk_version: ::Integer,
|
|
88
|
+
flow: Models::Shared::Flow,
|
|
89
|
+
action: Models::Shared::EnforcementAction,
|
|
90
|
+
state_before: Models::Shared::EnforcementState,
|
|
91
|
+
status: Models::Shared::EnforcementStatus,
|
|
92
|
+
provider: Models::Shared::EnforcementProvider,
|
|
93
|
+
error_code: T.nilable(::String)
|
|
94
|
+
)
|
|
95
|
+
.void
|
|
96
|
+
}
|
|
97
|
+
def initialize(risk_version:, flow:, action:, state_before:, status:, provider:, error_code: nil)
|
|
98
|
+
@risk_version = risk_version
|
|
99
|
+
@flow = flow
|
|
100
|
+
@action = action
|
|
101
|
+
@state_before = state_before
|
|
102
|
+
@status = status
|
|
103
|
+
@provider = provider
|
|
104
|
+
@error_code = error_code
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
108
|
+
def ==(other)
|
|
109
|
+
return false unless other.is_a?(self.class)
|
|
110
|
+
return false unless @risk_version == other.risk_version
|
|
111
|
+
return false unless @flow == other.flow
|
|
112
|
+
return false unless @action == other.action
|
|
113
|
+
return false unless @state_before == other.state_before
|
|
114
|
+
return false unless @status == other.status
|
|
115
|
+
return false unless @provider == other.provider
|
|
116
|
+
return false unless @error_code == other.error_code
|
|
117
|
+
true
|
|
118
|
+
end
|
|
119
|
+
end
|
|
120
|
+
end
|
|
121
|
+
end
|
|
122
|
+
end
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
class NoResponse::Models::Shared::EnforcementRequest
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class NoResponse::Models::Shared::EnforcementRequest
|
|
9
|
+
def risk_version
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def risk_version=(str_)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def flow
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def flow=(str_)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def action
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def action=(str_)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def state_before
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def state_before=(str_)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def status
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def status=(str_)
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def provider
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def provider=(str_)
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
def error_code
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def error_code=(str_)
|
|
49
|
+
end
|
|
50
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module NoResponse
|
|
5
|
+
module Models
|
|
6
|
+
module Shared
|
|
7
|
+
# EnforcementState - The account's state in the workspace's identity provider just before the action: onboarding, provisional (created, not yet activated), active, restricted or rejected.
|
|
8
|
+
class EnforcementState
|
|
9
|
+
include ::Crystalline::Enum
|
|
10
|
+
enums do
|
|
11
|
+
ONBOARDING = new("onboarding")
|
|
12
|
+
PROVISIONAL = new("provisional")
|
|
13
|
+
ACTIVE = new("active")
|
|
14
|
+
RESTRICTED = new("restricted")
|
|
15
|
+
REJECTED = new("rejected")
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
open!
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module NoResponse
|
|
5
|
+
module Models
|
|
6
|
+
module Shared
|
|
7
|
+
# EnforcementStatus - applied when the identity provider accepted the action, failed when it refused it or could not be reached. Only applied counts as enforced.
|
|
8
|
+
class EnforcementStatus
|
|
9
|
+
include ::Crystalline::Enum
|
|
10
|
+
enums do
|
|
11
|
+
APPLIED = new("applied")
|
|
12
|
+
FAILED = new("failed")
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
open!
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -10,6 +10,7 @@ module NoResponse
|
|
|
10
10
|
autoload :AccountDeleted, "no_response/models/shared/accountdeleted.rb"
|
|
11
11
|
autoload :AccountDeletedEvent, "no_response/models/shared/accountdeletedevent.rb"
|
|
12
12
|
autoload :AccountDeletion, "no_response/models/shared/accountdeletion.rb"
|
|
13
|
+
autoload :AccountList, "no_response/models/shared/accountlist.rb"
|
|
13
14
|
autoload :AccountRisk, "no_response/models/shared/accountrisk.rb"
|
|
14
15
|
autoload :AccountRiskChanged, "no_response/models/shared/accountriskchanged.rb"
|
|
15
16
|
autoload :AccountRiskChangedEvent, "no_response/models/shared/accountriskchangedevent.rb"
|
|
@@ -51,6 +52,12 @@ module NoResponse
|
|
|
51
52
|
autoload :Depth, "no_response/models/shared/depth.rb"
|
|
52
53
|
autoload :EndpointVerification, "no_response/models/shared/endpointverification.rb"
|
|
53
54
|
autoload :EndpointVerificationEvent, "no_response/models/shared/endpointverificationevent.rb"
|
|
55
|
+
autoload :Enforcement, "no_response/models/shared/enforcement.rb"
|
|
56
|
+
autoload :EnforcementAction, "no_response/models/shared/enforcementaction.rb"
|
|
57
|
+
autoload :EnforcementProvider, "no_response/models/shared/enforcementprovider.rb"
|
|
58
|
+
autoload :EnforcementRequest, "no_response/models/shared/enforcementrequest.rb"
|
|
59
|
+
autoload :EnforcementState, "no_response/models/shared/enforcementstate.rb"
|
|
60
|
+
autoload :EnforcementStatus, "no_response/models/shared/enforcementstatus.rb"
|
|
54
61
|
autoload :Environment, "no_response/models/shared/environment.rb"
|
|
55
62
|
autoload :Failure, "no_response/models/shared/failure.rb"
|
|
56
63
|
autoload :FailureReason, "no_response/models/shared/failurereason.rb"
|
|
@@ -95,9 +95,9 @@ module NoResponse
|
|
|
95
95
|
|
|
96
96
|
@language = "ruby"
|
|
97
97
|
@openapi_doc_version = "1"
|
|
98
|
-
@sdk_version = "
|
|
98
|
+
@sdk_version = "7.0.0"
|
|
99
99
|
@gen_version = "internal"
|
|
100
|
-
@user_agent = "noresponse-sdk/ruby
|
|
100
|
+
@user_agent = "noresponse-sdk/ruby 7.0.0 internal 1 noresponse"
|
|
101
101
|
end
|
|
102
102
|
|
|
103
103
|
sig { returns([String, T::Hash[Symbol, String]]) }
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: noresponse
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 7.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- NoResponse
|
|
@@ -313,6 +313,10 @@ files:
|
|
|
313
313
|
- lib/no_response/models/operations/listaccountassessments_request.rbi
|
|
314
314
|
- lib/no_response/models/operations/listaccountassessments_response.rb
|
|
315
315
|
- lib/no_response/models/operations/listaccountassessments_response.rbi
|
|
316
|
+
- lib/no_response/models/operations/listaccounts_request.rb
|
|
317
|
+
- lib/no_response/models/operations/listaccounts_request.rbi
|
|
318
|
+
- lib/no_response/models/operations/listaccounts_response.rb
|
|
319
|
+
- lib/no_response/models/operations/listaccounts_response.rbi
|
|
316
320
|
- lib/no_response/models/operations/listintegrations_response.rb
|
|
317
321
|
- lib/no_response/models/operations/listintegrations_response.rbi
|
|
318
322
|
- lib/no_response/models/operations/listwebhookdeliveries_request.rb
|
|
@@ -327,6 +331,10 @@ files:
|
|
|
327
331
|
- lib/no_response/models/operations/recordassessmentoutcome_request.rbi
|
|
328
332
|
- lib/no_response/models/operations/recordassessmentoutcome_response.rb
|
|
329
333
|
- lib/no_response/models/operations/recordassessmentoutcome_response.rbi
|
|
334
|
+
- lib/no_response/models/operations/recordenforcement_request.rb
|
|
335
|
+
- lib/no_response/models/operations/recordenforcement_request.rbi
|
|
336
|
+
- lib/no_response/models/operations/recordenforcement_response.rb
|
|
337
|
+
- lib/no_response/models/operations/recordenforcement_response.rbi
|
|
330
338
|
- lib/no_response/models/operations/recordkeyusage_request.rb
|
|
331
339
|
- lib/no_response/models/operations/recordkeyusage_request.rbi
|
|
332
340
|
- lib/no_response/models/operations/recordkeyusage_response.rb
|
|
@@ -362,6 +370,8 @@ files:
|
|
|
362
370
|
- lib/no_response/models/shared/accountdeletedevent.rbi
|
|
363
371
|
- lib/no_response/models/shared/accountdeletion.rb
|
|
364
372
|
- lib/no_response/models/shared/accountdeletion.rbi
|
|
373
|
+
- lib/no_response/models/shared/accountlist.rb
|
|
374
|
+
- lib/no_response/models/shared/accountlist.rbi
|
|
365
375
|
- lib/no_response/models/shared/accountrisk.rb
|
|
366
376
|
- lib/no_response/models/shared/accountrisk.rbi
|
|
367
377
|
- lib/no_response/models/shared/accountriskchanged.rb
|
|
@@ -452,6 +462,18 @@ files:
|
|
|
452
462
|
- lib/no_response/models/shared/endpointverification.rbi
|
|
453
463
|
- lib/no_response/models/shared/endpointverificationevent.rb
|
|
454
464
|
- lib/no_response/models/shared/endpointverificationevent.rbi
|
|
465
|
+
- lib/no_response/models/shared/enforcement.rb
|
|
466
|
+
- lib/no_response/models/shared/enforcement.rbi
|
|
467
|
+
- lib/no_response/models/shared/enforcementaction.rb
|
|
468
|
+
- lib/no_response/models/shared/enforcementaction.rbi
|
|
469
|
+
- lib/no_response/models/shared/enforcementprovider.rb
|
|
470
|
+
- lib/no_response/models/shared/enforcementprovider.rbi
|
|
471
|
+
- lib/no_response/models/shared/enforcementrequest.rb
|
|
472
|
+
- lib/no_response/models/shared/enforcementrequest.rbi
|
|
473
|
+
- lib/no_response/models/shared/enforcementstate.rb
|
|
474
|
+
- lib/no_response/models/shared/enforcementstate.rbi
|
|
475
|
+
- lib/no_response/models/shared/enforcementstatus.rb
|
|
476
|
+
- lib/no_response/models/shared/enforcementstatus.rbi
|
|
455
477
|
- lib/no_response/models/shared/environment.rb
|
|
456
478
|
- lib/no_response/models/shared/environment.rbi
|
|
457
479
|
- lib/no_response/models/shared/failure.rb
|