noresponse 8.1.3 → 8.2.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.
Files changed (104) hide show
  1. checksums.yaml +4 -4
  2. data/lib/no_response/accounts.rb +2069 -1
  3. data/lib/no_response/assessments.rb +893 -3
  4. data/lib/no_response/models/operations/associatecredential_request.rb +33 -0
  5. data/lib/no_response/models/operations/associatecredential_request.rbi +20 -0
  6. data/lib/no_response/models/operations/associatecredential_response.rb +34 -0
  7. data/lib/no_response/models/operations/associatecredential_response.rbi +20 -0
  8. data/lib/no_response/models/operations/bindprovisionalaccount_request.rb +37 -0
  9. data/lib/no_response/models/operations/bindprovisionalaccount_request.rbi +20 -0
  10. data/lib/no_response/models/operations/bindprovisionalaccount_response.rb +32 -0
  11. data/lib/no_response/models/operations/bindprovisionalaccount_response.rbi +20 -0
  12. data/lib/no_response/models/operations/exportaccount_request.rb +37 -0
  13. data/lib/no_response/models/operations/exportaccount_request.rbi +20 -0
  14. data/lib/no_response/models/operations/exportaccount_response.rb +32 -0
  15. data/lib/no_response/models/operations/exportaccount_response.rbi +20 -0
  16. data/lib/no_response/models/operations/getaccountdecision_request.rb +37 -0
  17. data/lib/no_response/models/operations/getaccountdecision_request.rbi +20 -0
  18. data/lib/no_response/models/operations/getaccountdecision_response.rb +34 -0
  19. data/lib/no_response/models/operations/getaccountdecision_response.rbi +20 -0
  20. data/lib/no_response/models/operations/getassessmentversion_request.rb +48 -0
  21. data/lib/no_response/models/operations/getassessmentversion_request.rbi +26 -0
  22. data/lib/no_response/models/operations/getassessmentversion_response.rb +32 -0
  23. data/lib/no_response/models/operations/getassessmentversion_response.rbi +20 -0
  24. data/lib/no_response/models/operations/listaccountcredentials_request.rb +45 -0
  25. data/lib/no_response/models/operations/listaccountcredentials_request.rbi +26 -0
  26. data/lib/no_response/models/operations/listaccountcredentials_response.rb +32 -0
  27. data/lib/no_response/models/operations/listaccountcredentials_response.rbi +20 -0
  28. data/lib/no_response/models/operations/listaccountoutcomes_request.rb +45 -0
  29. data/lib/no_response/models/operations/listaccountoutcomes_request.rbi +26 -0
  30. data/lib/no_response/models/operations/listaccountoutcomes_response.rb +32 -0
  31. data/lib/no_response/models/operations/listaccountoutcomes_response.rbi +20 -0
  32. data/lib/no_response/models/operations/listrequestdiagnostics_request.rb +84 -0
  33. data/lib/no_response/models/operations/listrequestdiagnostics_request.rbi +50 -0
  34. data/lib/no_response/models/operations/listrequestdiagnostics_response.rb +34 -0
  35. data/lib/no_response/models/operations/listrequestdiagnostics_response.rbi +20 -0
  36. data/lib/no_response/models/operations/recordaccountoutcome_request.rb +48 -0
  37. data/lib/no_response/models/operations/recordaccountoutcome_request.rbi +26 -0
  38. data/lib/no_response/models/operations/recordaccountoutcome_response.rb +32 -0
  39. data/lib/no_response/models/operations/recordaccountoutcome_response.rbi +20 -0
  40. data/lib/no_response/models/operations/retireaccountcredential_request.rb +37 -0
  41. data/lib/no_response/models/operations/retireaccountcredential_request.rbi +20 -0
  42. data/lib/no_response/models/operations/retireaccountcredential_response.rb +34 -0
  43. data/lib/no_response/models/operations/retireaccountcredential_response.rbi +20 -0
  44. data/lib/no_response/models/operations/searchassessments_response.rb +32 -0
  45. data/lib/no_response/models/operations/searchassessments_response.rbi +20 -0
  46. data/lib/no_response/models/operations.rb +21 -0
  47. data/lib/no_response/models/shared/accountbinding.rb +83 -0
  48. data/lib/no_response/models/shared/accountbinding.rbi +44 -0
  49. data/lib/no_response/models/shared/accountbindingactor.rb +40 -0
  50. data/lib/no_response/models/shared/accountbindingactor.rbi +20 -0
  51. data/lib/no_response/models/shared/accountbindingrequest.rb +33 -0
  52. data/lib/no_response/models/shared/accountbindingrequest.rbi +14 -0
  53. data/lib/no_response/models/shared/accountdecisionsnapshot.rb +94 -0
  54. data/lib/no_response/models/shared/accountdecisionsnapshot.rbi +44 -0
  55. data/lib/no_response/models/shared/accountexport.rb +178 -0
  56. data/lib/no_response/models/shared/accountexport.rbi +92 -0
  57. data/lib/no_response/models/shared/accountoutcome.rb +152 -0
  58. data/lib/no_response/models/shared/accountoutcome.rbi +80 -0
  59. data/lib/no_response/models/shared/accountoutcomeactor.rb +40 -0
  60. data/lib/no_response/models/shared/accountoutcomeactor.rbi +20 -0
  61. data/lib/no_response/models/shared/accountoutcomepage.rb +65 -0
  62. data/lib/no_response/models/shared/accountoutcomepage.rbi +32 -0
  63. data/lib/no_response/models/shared/accountoutcomerequest.rb +71 -0
  64. data/lib/no_response/models/shared/accountoutcomerequest.rbi +32 -0
  65. data/lib/no_response/models/shared/assessmentdetail.rb +10 -0
  66. data/lib/no_response/models/shared/assessmentdetail.rbi +6 -0
  67. data/lib/no_response/models/shared/assessmentrevision.rb +101 -0
  68. data/lib/no_response/models/shared/assessmentrevision.rbi +44 -0
  69. data/lib/no_response/models/shared/assessmentsearchpage.rb +68 -0
  70. data/lib/no_response/models/shared/assessmentsearchpage.rbi +32 -0
  71. data/lib/no_response/models/shared/assessmentsearchrequest.rb +146 -0
  72. data/lib/no_response/models/shared/assessmentsearchrequest.rbi +68 -0
  73. data/lib/no_response/models/shared/conflicterrorcode.rb +3 -0
  74. data/lib/no_response/models/shared/credentialassociation.rb +78 -0
  75. data/lib/no_response/models/shared/credentialassociation.rbi +44 -0
  76. data/lib/no_response/models/shared/credentialassociationactor.rb +40 -0
  77. data/lib/no_response/models/shared/credentialassociationactor.rbi +20 -0
  78. data/lib/no_response/models/shared/credentialassociationretiredby.rb +40 -0
  79. data/lib/no_response/models/shared/credentialassociationretiredby.rbi +20 -0
  80. data/lib/no_response/models/shared/credentialpage.rb +56 -0
  81. data/lib/no_response/models/shared/credentialpage.rbi +26 -0
  82. data/lib/no_response/models/shared/credentialrequest.rb +32 -0
  83. data/lib/no_response/models/shared/credentialrequest.rbi +14 -0
  84. data/lib/no_response/models/shared/decision.rb +18 -0
  85. data/lib/no_response/models/shared/decision.rbi +9 -0
  86. data/lib/no_response/models/shared/decisionreceipt.rb +112 -0
  87. data/lib/no_response/models/shared/decisionreceipt.rbi +50 -0
  88. data/lib/no_response/models/shared/exclusion.rb +23 -0
  89. data/lib/no_response/models/shared/exclusion.rbi +9 -0
  90. data/lib/no_response/models/shared/exportassessmentoutcome.rb +85 -0
  91. data/lib/no_response/models/shared/exportassessmentoutcome.rbi +44 -0
  92. data/lib/no_response/models/shared/reasoncode.rb +1 -0
  93. data/lib/no_response/models/shared/requestdiagnostic.rb +145 -0
  94. data/lib/no_response/models/shared/requestdiagnostic.rbi +80 -0
  95. data/lib/no_response/models/shared/requestdiagnosticpage.rb +40 -0
  96. data/lib/no_response/models/shared/requestdiagnosticpage.rbi +20 -0
  97. data/lib/no_response/models/shared/sentidentifiers.rb +74 -0
  98. data/lib/no_response/models/shared/sentidentifiers.rbi +38 -0
  99. data/lib/no_response/models/shared.rb +24 -0
  100. data/lib/no_response/noresponseclient.rb +12 -1
  101. data/lib/no_response/requests.rb +320 -0
  102. data/lib/no_response/sdkconfiguration.rb +2 -2
  103. data/lib/noresponse.rb +1 -0
  104. metadata +92 -1
@@ -0,0 +1,101 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ module NoResponse
5
+ module Models
6
+ module Shared
7
+ # Retrieve a retained assessment version with its original decision, policy, flow and depth. This response excludes the current account decision. Current retention and response-mode permissions still apply.
8
+ class AssessmentRevision
9
+ extend T::Sig
10
+ include Crystalline::MetadataFields
11
+
12
+ # This assessment's id, equal to detail.assessment_id.
13
+ field :id, ::String, {'format_json': {'letter_case': ::NoResponse::Utils.field_name("id"), required: true}}
14
+ # complete: final; nothing is still running. A lane that failed or missed its 10 s deadline stays listed in incomplete_sources, and confidence is lower. partial: a recommendation exists and at least one lane is still running or did not settle (see incomplete_sources). pending: nothing usable before the deadline; no recommendation yet, poll or wait for the webhook.
15
+ field(
16
+ :status,
17
+ Models::Shared::Status,
18
+ {
19
+ 'format_json': {
20
+ 'letter_case': ::NoResponse::Utils.field_name("status"),
21
+ required: true,
22
+ 'decoder': ::NoResponse::Utils.open_enum_from_string(Models::Shared::Status, false)
23
+ }
24
+ }
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
+ # How long the synchronous answer waits for sources. quick waits only for the fast sources, those that answer within 500 ms of ingress (or deadline_ms when lower); full waits for the whole budget, up to 3000 ms. Sources still running at the cut continue asynchronously and update the assessment either way.
39
+ field(
40
+ :depth,
41
+ Models::Shared::Depth,
42
+ {
43
+ 'format_json': {
44
+ 'letter_case': ::NoResponse::Utils.field_name("depth"),
45
+ required: true,
46
+ 'decoder': ::NoResponse::Utils.open_enum_from_string(Models::Shared::Depth, false)
47
+ }
48
+ }
49
+ )
50
+ # One assessment's own facts: its score and recommendation, the signals behind them, the lanes still running and its timing. risk here is this assessment's own score; the account's current risk is the account member of the assessment. risk and recommendation are present for complete and partial; assessment_url is present for pending.
51
+ field(
52
+ :detail,
53
+ Models::Shared::AssessmentDetail,
54
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("detail"), required: true}}
55
+ )
56
+ # Version of the body shape.
57
+ field(
58
+ :schema_version,
59
+ ::String,
60
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("schema_version"), required: true}}
61
+ )
62
+
63
+ sig {
64
+ params(
65
+ id: ::String,
66
+ status: Models::Shared::Status,
67
+ flow: Models::Shared::Flow,
68
+ depth: Models::Shared::Depth,
69
+ detail: Models::Shared::AssessmentDetail,
70
+ schema_version: ::String
71
+ )
72
+ .void
73
+ }
74
+ def initialize(id:, status:, flow:, depth:, detail:, schema_version: "1")
75
+ @id = id
76
+ @status = status
77
+ @flow = flow
78
+ @depth = depth
79
+ @detail = detail
80
+ unless schema_version == "1"
81
+ raise ArgumentError, "Invalid value for schema_version"
82
+ end
83
+
84
+ @schema_version = "1"
85
+ end
86
+
87
+ sig { params(other: T.untyped).returns(T::Boolean) }
88
+ def ==(other)
89
+ return false unless other.is_a?(self.class)
90
+ return false unless @id == other.id
91
+ return false unless @status == other.status
92
+ return false unless @flow == other.flow
93
+ return false unless @depth == other.depth
94
+ return false unless @detail == other.detail
95
+ return false unless @schema_version == other.schema_version
96
+ true
97
+ end
98
+ end
99
+ end
100
+ end
101
+ end
@@ -0,0 +1,44 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ class NoResponse::Models::Shared::AssessmentRevision
5
+ extend ::Crystalline::MetadataFields::ClassMethods
6
+ end
7
+
8
+ class NoResponse::Models::Shared::AssessmentRevision
9
+ def id
10
+ end
11
+
12
+ def id=(str_)
13
+ end
14
+
15
+ def status
16
+ end
17
+
18
+ def status=(str_)
19
+ end
20
+
21
+ def flow
22
+ end
23
+
24
+ def flow=(str_)
25
+ end
26
+
27
+ def depth
28
+ end
29
+
30
+ def depth=(str_)
31
+ end
32
+
33
+ def detail
34
+ end
35
+
36
+ def detail=(str_)
37
+ end
38
+
39
+ def schema_version
40
+ end
41
+
42
+ def schema_version=(str_)
43
+ end
44
+ end
@@ -0,0 +1,68 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ module NoResponse
5
+ module Models
6
+ module Shared
7
+ # A bounded page of latest assessment revisions, newest creation first. Each revision identifies the exact result found; no current account risk is attached.
8
+ class AssessmentSearchPage
9
+ extend T::Sig
10
+ include Crystalline::MetadataFields
11
+
12
+ field(
13
+ :items,
14
+ Crystalline::Array.new(Models::Shared::AssessmentRevision),
15
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("items"), required: true}}
16
+ )
17
+ # Version of the body shape.
18
+ field(
19
+ :schema_version,
20
+ ::String,
21
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("schema_version"), required: true}}
22
+ )
23
+ # Opaque, expiring cursor bound to this environment, operation and every filter. Keep the filters unchanged.
24
+ field(
25
+ :next_cursor,
26
+ Crystalline::Nilable.new(::String),
27
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("next_cursor")}}
28
+ )
29
+ # The calling workspace's configured retention period in days. Default 365 (12 months), which is also the maximum: a workspace may only shorten it, to at least 1 day. Each record expires from its own created_at; see assessment expires_at.
30
+ field(
31
+ :retention_days,
32
+ Crystalline::Nilable.new(::Integer),
33
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("retention_days")}}
34
+ )
35
+
36
+ sig {
37
+ params(
38
+ items: T::Array[Models::Shared::AssessmentRevision],
39
+ schema_version: ::String,
40
+ next_cursor: T.nilable(::String),
41
+ retention_days: T.nilable(::Integer)
42
+ )
43
+ .void
44
+ }
45
+ def initialize(items:, schema_version: "1", next_cursor: nil, retention_days: 365)
46
+ @items = items
47
+ unless schema_version == "1"
48
+ raise ArgumentError, "Invalid value for schema_version"
49
+ end
50
+
51
+ @schema_version = "1"
52
+ @next_cursor = next_cursor
53
+ @retention_days = retention_days
54
+ end
55
+
56
+ sig { params(other: T.untyped).returns(T::Boolean) }
57
+ def ==(other)
58
+ return false unless other.is_a?(self.class)
59
+ return false unless @items == other.items
60
+ return false unless @schema_version == other.schema_version
61
+ return false unless @next_cursor == other.next_cursor
62
+ return false unless @retention_days == other.retention_days
63
+ true
64
+ end
65
+ end
66
+ end
67
+ end
68
+ end
@@ -0,0 +1,32 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ class NoResponse::Models::Shared::AssessmentSearchPage
5
+ extend ::Crystalline::MetadataFields::ClassMethods
6
+ end
7
+
8
+ class NoResponse::Models::Shared::AssessmentSearchPage
9
+ def items
10
+ end
11
+
12
+ def items=(str_)
13
+ end
14
+
15
+ def schema_version
16
+ end
17
+
18
+ def schema_version=(str_)
19
+ end
20
+
21
+ def next_cursor
22
+ end
23
+
24
+ def next_cursor=(str_)
25
+ end
26
+
27
+ def retention_days
28
+ end
29
+
30
+ def retention_days=(str_)
31
+ end
32
+ end
@@ -0,0 +1,146 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ module NoResponse
5
+ module Models
6
+ module Shared
7
+ # Search retained assessments created in [from,to), over at most 366 days. Filters use each assessment decision, rather than the current account decision. Results can change between pages. Keep the assessment version to retrieve the exact decision later. This read does not require an idempotency key.
8
+ class AssessmentSearchRequest
9
+ extend T::Sig
10
+ include Crystalline::MetadataFields
11
+
12
+ field :from, ::String, {'format_json': {'letter_case': ::NoResponse::Utils.field_name("from"), required: true}}
13
+
14
+ field :to, ::String, {'format_json': {'letter_case': ::NoResponse::Utils.field_name("to"), required: true}}
15
+ # Your own opaque identifier for the account being checked, scoped to your workspace. Use an id you mint, with no direct identifier (email, phone, name or national id) in it. '|' is accepted so an Auth0 user id such as 'auth0|64abc' passes unchanged; '@', '+', '$' and whitespace are refused by the pattern, as is an exact-shape JWT; a hex digest such as a SHA-256 is allowed, because hashing an internal id is a common pseudonymous scheme. A value such as '07700900123' or 'jane.doe.gmail.com' cannot be told apart from an opaque id. It travels in bodies, and in a URL only as the path segment of GET /v1/accounts/{account_id} and its /assessments. An assessment requested by a provider hook at pre_registration, which has no account yet, carries the server-issued account_id pre: followed by its assessment_id.
16
+ field(
17
+ :account_id,
18
+ Crystalline::Nilable.new(::String),
19
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("account_id")}}
20
+ )
21
+ # 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.
22
+ field(
23
+ :flow,
24
+ Crystalline::Nilable.new(Models::Shared::Flow),
25
+ {
26
+ 'format_json': {
27
+ 'letter_case': ::NoResponse::Utils.field_name("flow"),
28
+ 'decoder': ::NoResponse::Utils.open_enum_from_string(Models::Shared::Flow, true)
29
+ }
30
+ }
31
+ )
32
+ # complete: final; nothing is still running. A lane that failed or missed its 10 s deadline stays listed in incomplete_sources, and confidence is lower. partial: a recommendation exists and at least one lane is still running or did not settle (see incomplete_sources). pending: nothing usable before the deadline; no recommendation yet, poll or wait for the webhook.
33
+ field(
34
+ :status,
35
+ Crystalline::Nilable.new(Models::Shared::Status),
36
+ {
37
+ 'format_json': {
38
+ 'letter_case': ::NoResponse::Utils.field_name("status"),
39
+ 'decoder': ::NoResponse::Utils.open_enum_from_string(Models::Shared::Status, true)
40
+ }
41
+ }
42
+ )
43
+ # The recommended action: allow, step_up or review. Your application applies it.
44
+ field(
45
+ :recommendation,
46
+ Crystalline::Nilable.new(Models::Shared::Recommendation),
47
+ {
48
+ 'format_json': {
49
+ 'letter_case': ::NoResponse::Utils.field_name("recommendation"),
50
+ 'decoder': ::NoResponse::Utils.open_enum_from_string(Models::Shared::Recommendation, true)
51
+ }
52
+ }
53
+ )
54
+ # Opaque, expiring cursor bound to this environment, operation and every filter. Keep the filters unchanged.
55
+ field(
56
+ :cursor,
57
+ Crystalline::Nilable.new(::String),
58
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("cursor")}}
59
+ )
60
+ # standard returns the consolidated risk response; detailed adds merged provider-neutral facts when the key has detailed scope. There is no raw mode.
61
+ field(
62
+ :response_mode,
63
+ Crystalline::Nilable.new(Models::Shared::ResponseMode),
64
+ {
65
+ 'format_json': {
66
+ 'letter_case': ::NoResponse::Utils.field_name("response_mode"),
67
+ 'decoder': ::NoResponse::Utils.open_enum_from_string(Models::Shared::ResponseMode, true)
68
+ }
69
+ }
70
+ )
71
+ # The decision of the assessment's latest stored revision: block when its stored risk.block is true, otherwise its recommendation. This is not the account's current decision or held-admission state. Combined with recommendation using AND.
72
+ field(
73
+ :decision,
74
+ Crystalline::Nilable.new(Models::Shared::Decision),
75
+ {
76
+ 'format_json': {
77
+ 'letter_case': ::NoResponse::Utils.field_name("decision"),
78
+ 'decoder': ::NoResponse::Utils.enum_from_string(Models::Shared::Decision, true)
79
+ }
80
+ }
81
+ )
82
+
83
+ field(
84
+ :limit,
85
+ Crystalline::Nilable.new(::Integer),
86
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("limit")}}
87
+ )
88
+
89
+ sig {
90
+ params(
91
+ from: ::String,
92
+ to: ::String,
93
+ account_id: T.nilable(::String),
94
+ flow: T.nilable(Models::Shared::Flow),
95
+ status: T.nilable(Models::Shared::Status),
96
+ recommendation: T.nilable(Models::Shared::Recommendation),
97
+ cursor: T.nilable(::String),
98
+ response_mode: T.nilable(Models::Shared::ResponseMode),
99
+ decision: T.nilable(Models::Shared::Decision),
100
+ limit: T.nilable(::Integer)
101
+ )
102
+ .void
103
+ }
104
+ def initialize(
105
+ from:,
106
+ to:,
107
+ account_id: nil,
108
+ flow: nil,
109
+ status: nil,
110
+ recommendation: nil,
111
+ cursor: nil,
112
+ response_mode: nil,
113
+ decision: nil,
114
+ limit: 20
115
+ )
116
+ @from = from
117
+ @to = to
118
+ @account_id = account_id
119
+ @flow = flow
120
+ @status = status
121
+ @recommendation = recommendation
122
+ @cursor = cursor
123
+ @response_mode = response_mode
124
+ @decision = decision
125
+ @limit = limit
126
+ end
127
+
128
+ sig { params(other: T.untyped).returns(T::Boolean) }
129
+ def ==(other)
130
+ return false unless other.is_a?(self.class)
131
+ return false unless @from == other.from
132
+ return false unless @to == other.to
133
+ return false unless @account_id == other.account_id
134
+ return false unless @flow == other.flow
135
+ return false unless @status == other.status
136
+ return false unless @recommendation == other.recommendation
137
+ return false unless @cursor == other.cursor
138
+ return false unless @response_mode == other.response_mode
139
+ return false unless @decision == other.decision
140
+ return false unless @limit == other.limit
141
+ true
142
+ end
143
+ end
144
+ end
145
+ end
146
+ end
@@ -0,0 +1,68 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ class NoResponse::Models::Shared::AssessmentSearchRequest
5
+ extend ::Crystalline::MetadataFields::ClassMethods
6
+ end
7
+
8
+ class NoResponse::Models::Shared::AssessmentSearchRequest
9
+ def from
10
+ end
11
+
12
+ def from=(str_)
13
+ end
14
+
15
+ def to
16
+ end
17
+
18
+ def to=(str_)
19
+ end
20
+
21
+ def account_id
22
+ end
23
+
24
+ def account_id=(str_)
25
+ end
26
+
27
+ def flow
28
+ end
29
+
30
+ def flow=(str_)
31
+ end
32
+
33
+ def status
34
+ end
35
+
36
+ def status=(str_)
37
+ end
38
+
39
+ def recommendation
40
+ end
41
+
42
+ def recommendation=(str_)
43
+ end
44
+
45
+ def cursor
46
+ end
47
+
48
+ def cursor=(str_)
49
+ end
50
+
51
+ def response_mode
52
+ end
53
+
54
+ def response_mode=(str_)
55
+ end
56
+
57
+ def decision
58
+ end
59
+
60
+ def decision=(str_)
61
+ end
62
+
63
+ def limit
64
+ end
65
+
66
+ def limit=(str_)
67
+ end
68
+ end
@@ -16,6 +16,9 @@ module NoResponse
16
16
  RISK_VERSION_AHEAD = new("risk_version_ahead")
17
17
  KEY_LIMIT_REACHED = new("key_limit_reached")
18
18
  SELF_REVOCATION = new("self_revocation")
19
+ OUTCOME_CONFLICT = new("outcome_conflict")
20
+ CREDENTIAL_CONFLICT = new("credential_conflict")
21
+ BINDING_CONFLICT = new("binding_conflict")
19
22
  LIST_ENTRY_EXISTS = new("list_entry_exists")
20
23
  LIST_LIMIT_REACHED = new("list_limit_reached")
21
24
  LIST_ENTRY_TOO_BROAD = new("list_entry_too_broad")
@@ -0,0 +1,78 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ module NoResponse
5
+ module Models
6
+ module Shared
7
+ # An association between an account and an issued key. The response excludes the key and its hash. Retirement removes this association from risk calculations; revoke the actual key through your own service.
8
+ class CredentialAssociation
9
+ extend T::Sig
10
+ include Crystalline::MetadataFields
11
+
12
+ field :id, ::String, {'format_json': {'letter_case': ::NoResponse::Utils.field_name("id"), required: true}}
13
+ # Your own opaque identifier for the account being checked, scoped to your workspace. Use an id you mint, with no direct identifier (email, phone, name or national id) in it. '|' is accepted so an Auth0 user id such as 'auth0|64abc' passes unchanged; '@', '+', '$' and whitespace are refused by the pattern, as is an exact-shape JWT; a hex digest such as a SHA-256 is allowed, because hashing an internal id is a common pseudonymous scheme. A value such as '07700900123' or 'jane.doe.gmail.com' cannot be told apart from an opaque id. It travels in bodies, and in a URL only as the path segment of GET /v1/accounts/{account_id} and its /assessments. An assessment requested by a provider hook at pre_registration, which has no account yet, carries the server-issued account_id pre: followed by its assessment_id.
14
+ field(
15
+ :account_id,
16
+ ::String,
17
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("account_id"), required: true}}
18
+ )
19
+
20
+ field(
21
+ :created_at,
22
+ ::String,
23
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("created_at"), required: true}}
24
+ )
25
+
26
+ field(
27
+ :actor,
28
+ Models::Shared::CredentialAssociationActor,
29
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("actor"), required: true}}
30
+ )
31
+
32
+ field(
33
+ :retired_at,
34
+ Crystalline::Nilable.new(::String),
35
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("retired_at")}}
36
+ )
37
+
38
+ field(
39
+ :retired_by,
40
+ Crystalline::Nilable.new(Models::Shared::CredentialAssociationRetiredBy),
41
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("retired_by")}}
42
+ )
43
+
44
+ sig {
45
+ params(
46
+ id: ::String,
47
+ account_id: ::String,
48
+ created_at: ::String,
49
+ actor: Models::Shared::CredentialAssociationActor,
50
+ retired_at: T.nilable(::String),
51
+ retired_by: T.nilable(Models::Shared::CredentialAssociationRetiredBy)
52
+ )
53
+ .void
54
+ }
55
+ def initialize(id:, account_id:, created_at:, actor:, retired_at: nil, retired_by: nil)
56
+ @id = id
57
+ @account_id = account_id
58
+ @created_at = created_at
59
+ @actor = actor
60
+ @retired_at = retired_at
61
+ @retired_by = retired_by
62
+ end
63
+
64
+ sig { params(other: T.untyped).returns(T::Boolean) }
65
+ def ==(other)
66
+ return false unless other.is_a?(self.class)
67
+ return false unless @id == other.id
68
+ return false unless @account_id == other.account_id
69
+ return false unless @created_at == other.created_at
70
+ return false unless @actor == other.actor
71
+ return false unless @retired_at == other.retired_at
72
+ return false unless @retired_by == other.retired_by
73
+ true
74
+ end
75
+ end
76
+ end
77
+ end
78
+ end
@@ -0,0 +1,44 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ class NoResponse::Models::Shared::CredentialAssociation
5
+ extend ::Crystalline::MetadataFields::ClassMethods
6
+ end
7
+
8
+ class NoResponse::Models::Shared::CredentialAssociation
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 created_at
22
+ end
23
+
24
+ def created_at=(str_)
25
+ end
26
+
27
+ def actor
28
+ end
29
+
30
+ def actor=(str_)
31
+ end
32
+
33
+ def retired_at
34
+ end
35
+
36
+ def retired_at=(str_)
37
+ end
38
+
39
+ def retired_by
40
+ end
41
+
42
+ def retired_by=(str_)
43
+ end
44
+ end
@@ -0,0 +1,40 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ module NoResponse
5
+ module Models
6
+ module Shared
7
+
8
+ class CredentialAssociationActor
9
+ extend T::Sig
10
+ include Crystalline::MetadataFields
11
+
12
+ field(
13
+ :key_id,
14
+ ::String,
15
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("key_id"), required: true}}
16
+ )
17
+
18
+ field :type, ::String, {'format_json': {'letter_case': ::NoResponse::Utils.field_name("type"), required: true}}
19
+
20
+ sig { params(key_id: ::String, type: ::String).void }
21
+ def initialize(key_id:, type: "api_key")
22
+ @key_id = key_id
23
+ unless type == "api_key"
24
+ raise ArgumentError, "Invalid value for type"
25
+ end
26
+
27
+ @type = "api_key"
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 @key_id == other.key_id
34
+ return false unless @type == other.type
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::CredentialAssociationActor
5
+ extend ::Crystalline::MetadataFields::ClassMethods
6
+ end
7
+
8
+ class NoResponse::Models::Shared::CredentialAssociationActor
9
+ def key_id
10
+ end
11
+
12
+ def key_id=(str_)
13
+ end
14
+
15
+ def type
16
+ end
17
+
18
+ def type=(str_)
19
+ end
20
+ end