noresponse 5.1.1 → 6.0.1
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/late_results.rb +10 -8
- 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/accountdeleted.rb +49 -0
- data/lib/no_response/models/shared/accountdeleted.rbi +26 -0
- data/lib/no_response/models/shared/accountdeletedevent.rb +70 -0
- data/lib/no_response/models/shared/accountdeletedevent.rbi +38 -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/accountriskchanged.rb +44 -0
- data/lib/no_response/models/shared/accountriskchanged.rbi +20 -0
- data/lib/no_response/models/shared/accountriskchangedevent.rb +70 -0
- data/lib/no_response/models/shared/accountriskchangedevent.rbi +38 -0
- data/lib/no_response/models/shared/assessmentexpired.rb +82 -0
- data/lib/no_response/models/shared/assessmentexpired.rbi +38 -0
- data/lib/no_response/models/shared/assessmentupdateddata.rb +23 -0
- data/lib/no_response/models/shared/assessmentupdateddata.rbi +9 -0
- data/lib/no_response/models/shared/assessmentupdatedevent.rb +79 -0
- data/lib/no_response/models/shared/assessmentupdatedevent.rbi +38 -0
- data/lib/no_response/models/shared/conflicterrorcode.rb +1 -0
- data/lib/no_response/models/shared/endpointverification.rb +41 -0
- data/lib/no_response/models/shared/endpointverification.rbi +20 -0
- data/lib/no_response/models/shared/endpointverificationevent.rb +70 -0
- data/lib/no_response/models/shared/endpointverificationevent.rbi +38 -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/environment.rb +16 -0
- data/lib/no_response/models/shared/environment.rbi +9 -0
- data/lib/no_response/models/shared/webhookendpointdisabled.rb +49 -0
- data/lib/no_response/models/shared/webhookendpointdisabled.rbi +26 -0
- data/lib/no_response/models/shared/webhookendpointdisabledevent.rb +70 -0
- data/lib/no_response/models/shared/webhookendpointdisabledevent.rbi +38 -0
- data/lib/no_response/models/shared/webhookevent.rb +23 -0
- data/lib/no_response/models/shared/webhookevent.rbi +9 -0
- data/lib/no_response/models/shared/webhookverificationresponse.rb +33 -0
- data/lib/no_response/models/shared/webhookverificationresponse.rbi +14 -0
- data/lib/no_response/models/shared/workspacedeleted.rb +55 -0
- data/lib/no_response/models/shared/workspacedeleted.rbi +26 -0
- data/lib/no_response/models/shared/workspacedeletedevent.rb +70 -0
- data/lib/no_response/models/shared/workspacedeletedevent.rbi +38 -0
- data/lib/no_response/models/shared.rb +23 -0
- data/lib/no_response/sdk_hooks/registration.rb +0 -1
- data/lib/no_response/sdkconfiguration.rb +2 -2
- data/lib/no_response/webhook_verification.rb +170 -0
- data/lib/noresponse.rb +2 -0
- metadata +56 -2
- data/lib/no_response/webhooks.rb +0 -264
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module NoResponse
|
|
5
|
+
module Models
|
|
6
|
+
module Shared
|
|
7
|
+
# The answer of POST /v1/accounts/{account_id}/enforcements: one enforcement of one of the calling workspace's accounts, kept once per (account, risk_version, flow, action). The first report answers 201 with the new record. A repeat answers 200 with the record as first stored, whatever the repeat's state_before, status, provider or error_code. The one exception is a stored failed record followed by an applied report: the record becomes applied, keeps its id and created_at, takes the applied report's state_before and provider, drops error_code and answers 201, so a successful retry after a failure is recorded. Only an applied record at the account's current risk_version takes the account out of GET /v1/accounts?unenforced=true.
|
|
8
|
+
class Enforcement
|
|
9
|
+
extend T::Sig
|
|
10
|
+
include Crystalline::MetadataFields
|
|
11
|
+
|
|
12
|
+
# Opaque, server-assigned id of one recorded enforcement: 'enf_' and 26 Crockford base32 characters. Unique within the workspace.
|
|
13
|
+
field :id, ::String, {'format_json': {'letter_case': ::NoResponse::Utils.field_name("id"), required: true}}
|
|
14
|
+
# The account_id of the request path.
|
|
15
|
+
field(
|
|
16
|
+
:account_id,
|
|
17
|
+
::String,
|
|
18
|
+
{'format_json': {'letter_case': ::NoResponse::Utils.field_name("account_id"), required: true}}
|
|
19
|
+
)
|
|
20
|
+
# The account's risk_version the workspace acted on. It can be older than the account's current risk_version: such a record is kept and does not count for unenforced.
|
|
21
|
+
field(
|
|
22
|
+
:risk_version,
|
|
23
|
+
::Integer,
|
|
24
|
+
{'format_json': {'letter_case': ::NoResponse::Utils.field_name("risk_version"), required: true}}
|
|
25
|
+
)
|
|
26
|
+
# 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.
|
|
27
|
+
field(
|
|
28
|
+
:flow,
|
|
29
|
+
Models::Shared::Flow,
|
|
30
|
+
{
|
|
31
|
+
'format_json': {
|
|
32
|
+
'letter_case': ::NoResponse::Utils.field_name("flow"),
|
|
33
|
+
required: true,
|
|
34
|
+
'decoder': ::NoResponse::Utils.open_enum_from_string(Models::Shared::Flow, false)
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
)
|
|
38
|
+
# 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).
|
|
39
|
+
field(
|
|
40
|
+
:action,
|
|
41
|
+
Models::Shared::EnforcementAction,
|
|
42
|
+
{
|
|
43
|
+
'format_json': {
|
|
44
|
+
'letter_case': ::NoResponse::Utils.field_name("action"),
|
|
45
|
+
required: true,
|
|
46
|
+
'decoder': ::NoResponse::Utils.open_enum_from_string(Models::Shared::EnforcementAction, false)
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
)
|
|
50
|
+
# The account's state in the workspace's identity provider just before the action: onboarding, provisional (created, not yet activated), active, restricted or rejected.
|
|
51
|
+
field(
|
|
52
|
+
:state_before,
|
|
53
|
+
Models::Shared::EnforcementState,
|
|
54
|
+
{
|
|
55
|
+
'format_json': {
|
|
56
|
+
'letter_case': ::NoResponse::Utils.field_name("state_before"),
|
|
57
|
+
required: true,
|
|
58
|
+
'decoder': ::NoResponse::Utils.open_enum_from_string(Models::Shared::EnforcementState, false)
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
)
|
|
62
|
+
# applied when the identity provider accepted the action, failed when it refused it or could not be reached. Only applied counts as enforced.
|
|
63
|
+
field(
|
|
64
|
+
:status,
|
|
65
|
+
Models::Shared::EnforcementStatus,
|
|
66
|
+
{
|
|
67
|
+
'format_json': {
|
|
68
|
+
'letter_case': ::NoResponse::Utils.field_name("status"),
|
|
69
|
+
required: true,
|
|
70
|
+
'decoder': ::NoResponse::Utils.open_enum_from_string(Models::Shared::EnforcementStatus, false)
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
)
|
|
74
|
+
# The identity provider the action ran in; custom for the workspace's own user store.
|
|
75
|
+
field(
|
|
76
|
+
:provider,
|
|
77
|
+
Models::Shared::EnforcementProvider,
|
|
78
|
+
{
|
|
79
|
+
'format_json': {
|
|
80
|
+
'letter_case': ::NoResponse::Utils.field_name("provider"),
|
|
81
|
+
required: true,
|
|
82
|
+
'decoder': ::NoResponse::Utils.open_enum_from_string(Models::Shared::EnforcementProvider, false)
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
)
|
|
86
|
+
# When NoResponse first recorded this enforcement, in UTC. A failed record that becomes applied keeps it.
|
|
87
|
+
field(
|
|
88
|
+
:created_at,
|
|
89
|
+
::String,
|
|
90
|
+
{'format_json': {'letter_case': ::NoResponse::Utils.field_name("created_at"), required: true}}
|
|
91
|
+
)
|
|
92
|
+
# 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.
|
|
93
|
+
field(
|
|
94
|
+
:error_code,
|
|
95
|
+
Crystalline::Nilable.new(::String),
|
|
96
|
+
{'format_json': {'letter_case': ::NoResponse::Utils.field_name("error_code")}}
|
|
97
|
+
)
|
|
98
|
+
|
|
99
|
+
sig {
|
|
100
|
+
params(
|
|
101
|
+
id: ::String,
|
|
102
|
+
account_id: ::String,
|
|
103
|
+
risk_version: ::Integer,
|
|
104
|
+
flow: Models::Shared::Flow,
|
|
105
|
+
action: Models::Shared::EnforcementAction,
|
|
106
|
+
state_before: Models::Shared::EnforcementState,
|
|
107
|
+
status: Models::Shared::EnforcementStatus,
|
|
108
|
+
provider: Models::Shared::EnforcementProvider,
|
|
109
|
+
created_at: ::String,
|
|
110
|
+
error_code: T.nilable(::String)
|
|
111
|
+
)
|
|
112
|
+
.void
|
|
113
|
+
}
|
|
114
|
+
def initialize(
|
|
115
|
+
id:,
|
|
116
|
+
account_id:,
|
|
117
|
+
risk_version:,
|
|
118
|
+
flow:,
|
|
119
|
+
action:,
|
|
120
|
+
state_before:,
|
|
121
|
+
status:,
|
|
122
|
+
provider:,
|
|
123
|
+
created_at:,
|
|
124
|
+
error_code: nil
|
|
125
|
+
)
|
|
126
|
+
@id = id
|
|
127
|
+
@account_id = account_id
|
|
128
|
+
@risk_version = risk_version
|
|
129
|
+
@flow = flow
|
|
130
|
+
@action = action
|
|
131
|
+
@state_before = state_before
|
|
132
|
+
@status = status
|
|
133
|
+
@provider = provider
|
|
134
|
+
@created_at = created_at
|
|
135
|
+
@error_code = error_code
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
139
|
+
def ==(other)
|
|
140
|
+
return false unless other.is_a?(self.class)
|
|
141
|
+
return false unless @id == other.id
|
|
142
|
+
return false unless @account_id == other.account_id
|
|
143
|
+
return false unless @risk_version == other.risk_version
|
|
144
|
+
return false unless @flow == other.flow
|
|
145
|
+
return false unless @action == other.action
|
|
146
|
+
return false unless @state_before == other.state_before
|
|
147
|
+
return false unless @status == other.status
|
|
148
|
+
return false unless @provider == other.provider
|
|
149
|
+
return false unless @created_at == other.created_at
|
|
150
|
+
return false unless @error_code == other.error_code
|
|
151
|
+
true
|
|
152
|
+
end
|
|
153
|
+
end
|
|
154
|
+
end
|
|
155
|
+
end
|
|
156
|
+
end
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
class NoResponse::Models::Shared::Enforcement
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class NoResponse::Models::Shared::Enforcement
|
|
9
|
+
def id
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def id=(str_)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def account_id
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def account_id=(str_)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def risk_version
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def risk_version=(str_)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def flow
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def flow=(str_)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def action
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def action=(str_)
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def state_before
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def state_before=(str_)
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
def status
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def status=(str_)
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def provider
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
def provider=(str_)
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
def created_at
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
def created_at=(str_)
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
def error_code
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
def error_code=(str_)
|
|
67
|
+
end
|
|
68
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module NoResponse
|
|
5
|
+
module Models
|
|
6
|
+
module Shared
|
|
7
|
+
# EnforcementAction - 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).
|
|
8
|
+
class EnforcementAction
|
|
9
|
+
include ::Crystalline::Enum
|
|
10
|
+
enums do
|
|
11
|
+
REVOKE_SESSIONS = new("revoke_sessions")
|
|
12
|
+
RESTRICT = new("restrict")
|
|
13
|
+
UNRESTRICT = new("unrestrict")
|
|
14
|
+
FAIL_ONBOARDING = new("fail_onboarding")
|
|
15
|
+
REJECT_ACTIVATION = new("reject_activation")
|
|
16
|
+
NONE = new("none")
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
open!
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module NoResponse
|
|
5
|
+
module Models
|
|
6
|
+
module Shared
|
|
7
|
+
# EnforcementProvider - The identity provider the action ran in; custom for the workspace's own user store.
|
|
8
|
+
class EnforcementProvider
|
|
9
|
+
include ::Crystalline::Enum
|
|
10
|
+
enums do
|
|
11
|
+
CLERK = new("clerk")
|
|
12
|
+
WORKOS = new("workos")
|
|
13
|
+
AUTH0 = new("auth0")
|
|
14
|
+
CUSTOM = new("custom")
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
open!
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -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
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module NoResponse
|
|
5
|
+
module Models
|
|
6
|
+
module Shared
|
|
7
|
+
# Environment - The environment whose endpoints receive this event: live, or test for the workspace's test environment.
|
|
8
|
+
class Environment < T::Enum
|
|
9
|
+
enums do
|
|
10
|
+
LIVE = new("live")
|
|
11
|
+
TEST = new("test")
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module NoResponse
|
|
5
|
+
module Models
|
|
6
|
+
module Shared
|
|
7
|
+
# One of the environment's endpoints stopped receiving events: every delivery attempt to it failed from failing_since until disabled_at, 72 hours or more. Its queued deliveries are dropped. Fix the receiver and verify it again with POST /v1/webhooks/{endpoint_id}/test (type endpoint.verification) to resume delivery.
|
|
8
|
+
class WebhookEndpointDisabled
|
|
9
|
+
extend T::Sig
|
|
10
|
+
include Crystalline::MetadataFields
|
|
11
|
+
|
|
12
|
+
# The endpoint that was disabled.
|
|
13
|
+
field(
|
|
14
|
+
:endpoint_id,
|
|
15
|
+
::String,
|
|
16
|
+
{'format_json': {'letter_case': ::NoResponse::Utils.field_name("endpoint_id"), required: true}}
|
|
17
|
+
)
|
|
18
|
+
# The first failed attempt of the unbroken failure streak.
|
|
19
|
+
field(
|
|
20
|
+
:failing_since,
|
|
21
|
+
::String,
|
|
22
|
+
{'format_json': {'letter_case': ::NoResponse::Utils.field_name("failing_since"), required: true}}
|
|
23
|
+
)
|
|
24
|
+
# When the endpoint was disabled; equal to the event's created_at.
|
|
25
|
+
field(
|
|
26
|
+
:disabled_at,
|
|
27
|
+
::String,
|
|
28
|
+
{'format_json': {'letter_case': ::NoResponse::Utils.field_name("disabled_at"), required: true}}
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
sig { params(endpoint_id: ::String, failing_since: ::String, disabled_at: ::String).void }
|
|
32
|
+
def initialize(endpoint_id:, failing_since:, disabled_at:)
|
|
33
|
+
@endpoint_id = endpoint_id
|
|
34
|
+
@failing_since = failing_since
|
|
35
|
+
@disabled_at = disabled_at
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
39
|
+
def ==(other)
|
|
40
|
+
return false unless other.is_a?(self.class)
|
|
41
|
+
return false unless @endpoint_id == other.endpoint_id
|
|
42
|
+
return false unless @failing_since == other.failing_since
|
|
43
|
+
return false unless @disabled_at == other.disabled_at
|
|
44
|
+
true
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
class NoResponse::Models::Shared::WebhookEndpointDisabled
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class NoResponse::Models::Shared::WebhookEndpointDisabled
|
|
9
|
+
def endpoint_id
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def endpoint_id=(str_)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def failing_since
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def failing_since=(str_)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def disabled_at
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def disabled_at=(str_)
|
|
25
|
+
end
|
|
26
|
+
end
|