prelude-sdk 0.7.0 → 0.8.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.
Files changed (118) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/README.md +3 -5
  4. data/lib/prelude_sdk/client.rb +4 -0
  5. data/lib/prelude_sdk/internal/type/base_model.rb +5 -5
  6. data/lib/prelude_sdk/models/intel/kyc_match_params.rb +96 -0
  7. data/lib/prelude_sdk/models/intel/kyc_match_response.rb +305 -0
  8. data/lib/prelude_sdk/models/notify_reply_params.rb +60 -0
  9. data/lib/prelude_sdk/models/notify_reply_response.rb +65 -0
  10. data/lib/prelude_sdk/models/signals.rb +125 -0
  11. data/lib/prelude_sdk/models/target.rb +39 -0
  12. data/lib/prelude_sdk/models/verification/phone/history_list_params.rb +177 -0
  13. data/lib/prelude_sdk/models/verification/phone/history_list_response.rb +286 -0
  14. data/lib/prelude_sdk/models/verification/phone/history_retrieve_params.rb +24 -0
  15. data/lib/prelude_sdk/models/verification/phone/history_retrieve_response.rb +890 -0
  16. data/lib/prelude_sdk/models/verification/phone/phone_verification_carrier.rb +29 -0
  17. data/lib/prelude_sdk/models/verification/phone/phone_verification_money.rb +35 -0
  18. data/lib/prelude_sdk/models/verification/phone/phone_verification_psd2_transaction.rb +29 -0
  19. data/lib/prelude_sdk/models/verification_check_params.rb +3 -38
  20. data/lib/prelude_sdk/models/verification_create_params.rb +6 -161
  21. data/lib/prelude_sdk/models/verification_management/sandbox_add_phone_number_params.rb +37 -0
  22. data/lib/prelude_sdk/models/verification_management/sandbox_add_phone_number_response.rb +27 -0
  23. data/lib/prelude_sdk/models/verification_management/sandbox_delete_phone_number_params.rb +22 -0
  24. data/lib/prelude_sdk/models/verification_management/sandbox_delete_phone_number_response.rb +19 -0
  25. data/lib/prelude_sdk/models/verification_management/sandbox_list_phone_numbers_params.rb +16 -0
  26. data/lib/prelude_sdk/models/verification_management/sandbox_list_phone_numbers_response.rb +47 -0
  27. data/lib/prelude_sdk/models/watch_evaluate_params.rb +68 -0
  28. data/lib/prelude_sdk/models/watch_evaluate_response.rb +266 -0
  29. data/lib/prelude_sdk/models/watch_predict_params.rb +6 -160
  30. data/lib/prelude_sdk/models/watch_send_events_params.rb +3 -38
  31. data/lib/prelude_sdk/models/watch_send_feedbacks_params.rb +3 -38
  32. data/lib/prelude_sdk/models.rb +14 -0
  33. data/lib/prelude_sdk/resources/intel/kyc.rb +62 -0
  34. data/lib/prelude_sdk/resources/intel.rb +20 -0
  35. data/lib/prelude_sdk/resources/notify.rb +35 -0
  36. data/lib/prelude_sdk/resources/verification/phone/history.rb +104 -0
  37. data/lib/prelude_sdk/resources/verification/phone.rb +21 -0
  38. data/lib/prelude_sdk/resources/verification.rb +7 -3
  39. data/lib/prelude_sdk/resources/verification_management/sandbox.rb +99 -0
  40. data/lib/prelude_sdk/resources/verification_management.rb +5 -0
  41. data/lib/prelude_sdk/resources/watch.rb +45 -2
  42. data/lib/prelude_sdk/version.rb +1 -1
  43. data/lib/prelude_sdk.rb +26 -0
  44. data/rbi/prelude_sdk/client.rbi +3 -0
  45. data/rbi/prelude_sdk/models/intel/kyc_match_params.rbi +147 -0
  46. data/rbi/prelude_sdk/models/intel/kyc_match_response.rbi +736 -0
  47. data/rbi/prelude_sdk/models/notify_reply_params.rbi +87 -0
  48. data/rbi/prelude_sdk/models/notify_reply_response.rbi +94 -0
  49. data/rbi/prelude_sdk/models/signals.rbi +200 -0
  50. data/rbi/prelude_sdk/models/target.rbi +61 -0
  51. data/rbi/prelude_sdk/models/verification/phone/history_list_params.rbi +436 -0
  52. data/rbi/prelude_sdk/models/verification/phone/history_list_response.rbi +661 -0
  53. data/rbi/prelude_sdk/models/verification/phone/history_retrieve_params.rbi +42 -0
  54. data/rbi/prelude_sdk/models/verification/phone/history_retrieve_response.rbi +2229 -0
  55. data/rbi/prelude_sdk/models/verification/phone/phone_verification_carrier.rbi +39 -0
  56. data/rbi/prelude_sdk/models/verification/phone/phone_verification_money.rbi +46 -0
  57. data/rbi/prelude_sdk/models/verification/phone/phone_verification_psd2_transaction.rbi +68 -0
  58. data/rbi/prelude_sdk/models/verification_check_params.rbi +4 -85
  59. data/rbi/prelude_sdk/models/verification_create_params.rbi +8 -328
  60. data/rbi/prelude_sdk/models/verification_management/sandbox_add_phone_number_params.rbi +58 -0
  61. data/rbi/prelude_sdk/models/verification_management/sandbox_add_phone_number_response.rbi +42 -0
  62. data/rbi/prelude_sdk/models/verification_management/sandbox_delete_phone_number_params.rbi +43 -0
  63. data/rbi/prelude_sdk/models/verification_management/sandbox_delete_phone_number_response.rbi +32 -0
  64. data/rbi/prelude_sdk/models/verification_management/sandbox_list_phone_numbers_params.rbi +34 -0
  65. data/rbi/prelude_sdk/models/verification_management/sandbox_list_phone_numbers_response.rbi +101 -0
  66. data/rbi/prelude_sdk/models/watch_evaluate_params.rbi +109 -0
  67. data/rbi/prelude_sdk/models/watch_evaluate_response.rbi +496 -0
  68. data/rbi/prelude_sdk/models/watch_predict_params.rbi +8 -320
  69. data/rbi/prelude_sdk/models/watch_send_events_params.rbi +4 -93
  70. data/rbi/prelude_sdk/models/watch_send_feedbacks_params.rbi +4 -95
  71. data/rbi/prelude_sdk/models.rbi +14 -0
  72. data/rbi/prelude_sdk/resources/intel/kyc.rbi +61 -0
  73. data/rbi/prelude_sdk/resources/intel.rbi +17 -0
  74. data/rbi/prelude_sdk/resources/notify.rbi +31 -0
  75. data/rbi/prelude_sdk/resources/verification/phone/history.rbi +112 -0
  76. data/rbi/prelude_sdk/resources/verification/phone.rbi +18 -0
  77. data/rbi/prelude_sdk/resources/verification.rbi +6 -3
  78. data/rbi/prelude_sdk/resources/verification_management/sandbox.rbi +76 -0
  79. data/rbi/prelude_sdk/resources/verification_management.rbi +4 -0
  80. data/rbi/prelude_sdk/resources/watch.rbi +49 -2
  81. data/sig/prelude_sdk/client.rbs +2 -0
  82. data/sig/prelude_sdk/models/intel/kyc_match_params.rbs +91 -0
  83. data/sig/prelude_sdk/models/intel/kyc_match_response.rbs +276 -0
  84. data/sig/prelude_sdk/models/notify_reply_params.rbs +50 -0
  85. data/sig/prelude_sdk/models/notify_reply_response.rbs +54 -0
  86. data/sig/prelude_sdk/models/signals.rbs +101 -0
  87. data/sig/prelude_sdk/models/target.rbs +29 -0
  88. data/sig/prelude_sdk/models/verification/phone/history_list_params.rbs +187 -0
  89. data/sig/prelude_sdk/models/verification/phone/history_list_response.rbs +241 -0
  90. data/sig/prelude_sdk/models/verification/phone/history_retrieve_params.rbs +27 -0
  91. data/sig/prelude_sdk/models/verification/phone/history_retrieve_response.rbs +873 -0
  92. data/sig/prelude_sdk/models/verification/phone/phone_verification_carrier.rbs +23 -0
  93. data/sig/prelude_sdk/models/verification/phone/phone_verification_money.rbs +21 -0
  94. data/sig/prelude_sdk/models/verification/phone/phone_verification_psd2_transaction.rbs +37 -0
  95. data/sig/prelude_sdk/models/verification_check_params.rbs +4 -37
  96. data/sig/prelude_sdk/models/verification_create_params.rbs +9 -142
  97. data/sig/prelude_sdk/models/verification_management/sandbox_add_phone_number_params.rbs +30 -0
  98. data/sig/prelude_sdk/models/verification_management/sandbox_add_phone_number_response.rbs +18 -0
  99. data/sig/prelude_sdk/models/verification_management/sandbox_delete_phone_number_params.rbs +26 -0
  100. data/sig/prelude_sdk/models/verification_management/sandbox_delete_phone_number_response.rbs +15 -0
  101. data/sig/prelude_sdk/models/verification_management/sandbox_list_phone_numbers_params.rbs +17 -0
  102. data/sig/prelude_sdk/models/verification_management/sandbox_list_phone_numbers_response.rbs +45 -0
  103. data/sig/prelude_sdk/models/watch_evaluate_params.rbs +52 -0
  104. data/sig/prelude_sdk/models/watch_evaluate_response.rbs +178 -0
  105. data/sig/prelude_sdk/models/watch_predict_params.rbs +9 -142
  106. data/sig/prelude_sdk/models/watch_send_events_params.rbs +4 -37
  107. data/sig/prelude_sdk/models/watch_send_feedbacks_params.rbs +4 -37
  108. data/sig/prelude_sdk/models.rbs +14 -0
  109. data/sig/prelude_sdk/resources/intel/kyc.rbs +23 -0
  110. data/sig/prelude_sdk/resources/intel.rbs +9 -0
  111. data/sig/prelude_sdk/resources/notify.rbs +9 -0
  112. data/sig/prelude_sdk/resources/verification/phone/history.rbs +32 -0
  113. data/sig/prelude_sdk/resources/verification/phone.rbs +11 -0
  114. data/sig/prelude_sdk/resources/verification.rbs +5 -3
  115. data/sig/prelude_sdk/resources/verification_management/sandbox.rbs +24 -0
  116. data/sig/prelude_sdk/resources/verification_management.rbs +2 -0
  117. data/sig/prelude_sdk/resources/watch.rbs +11 -2
  118. metadata +79 -1
@@ -0,0 +1,266 @@
1
+ # frozen_string_literal: true
2
+
3
+ module PreludeSDK
4
+ module Models
5
+ # @see PreludeSDK::Resources::Watch#evaluate
6
+ class WatchEvaluateResponse < PreludeSDK::Internal::Type::BaseModel
7
+ # @!attribute id
8
+ # The evaluation identifier.
9
+ #
10
+ # @return [String]
11
+ required :id, String
12
+
13
+ # @!attribute action
14
+ # What the evaluation suggests you do, being the most severe action across the
15
+ # recipes that ran. Advisory: enforcement is yours.
16
+ #
17
+ # - `ALLOW` - Let the request through.
18
+ # - `BLOCK` - Refuse the request.
19
+ # - `CHALLENGE` - Let the request through behind an additional check.
20
+ #
21
+ # @return [Symbol, PreludeSDK::Models::WatchEvaluateResponse::Action]
22
+ required :action, enum: -> { PreludeSDK::Models::WatchEvaluateResponse::Action }
23
+
24
+ # @!attribute recipes
25
+ # One result per recipe that ran. A recipe the flow names but that is not in
26
+ # service is absent rather than reported as having passed.
27
+ #
28
+ # @return [Array<PreludeSDK::Models::WatchEvaluateResponse::Recipe>]
29
+ required :recipes,
30
+ -> { PreludeSDK::Internal::Type::ArrayOf[PreludeSDK::Models::WatchEvaluateResponse::Recipe] }
31
+
32
+ # @!attribute verdict
33
+ # The evaluation-level verdict, being the most severe verdict across the recipes
34
+ # that ran.
35
+ #
36
+ # - `PASS` - No recipe flagged.
37
+ # - `FLAG` - At least one recipe flagged.
38
+ #
39
+ # @return [Symbol, PreludeSDK::Models::WatchEvaluateResponse::Verdict]
40
+ required :verdict, enum: -> { PreludeSDK::Models::WatchEvaluateResponse::Verdict }
41
+
42
+ # @!method initialize(id:, action:, recipes:, verdict:)
43
+ # Some parameter documentations has been truncated, see
44
+ # {PreludeSDK::Models::WatchEvaluateResponse} for more details.
45
+ #
46
+ # @param id [String] The evaluation identifier.
47
+ #
48
+ # @param action [Symbol, PreludeSDK::Models::WatchEvaluateResponse::Action] What the evaluation suggests you do, being the most severe action across the rec
49
+ #
50
+ # @param recipes [Array<PreludeSDK::Models::WatchEvaluateResponse::Recipe>] One result per recipe that ran. A recipe the flow names but that is not in servi
51
+ #
52
+ # @param verdict [Symbol, PreludeSDK::Models::WatchEvaluateResponse::Verdict] The evaluation-level verdict, being the most severe verdict across the recipes t
53
+
54
+ # What the evaluation suggests you do, being the most severe action across the
55
+ # recipes that ran. Advisory: enforcement is yours.
56
+ #
57
+ # - `ALLOW` - Let the request through.
58
+ # - `BLOCK` - Refuse the request.
59
+ # - `CHALLENGE` - Let the request through behind an additional check.
60
+ #
61
+ # @see PreludeSDK::Models::WatchEvaluateResponse#action
62
+ module Action
63
+ extend PreludeSDK::Internal::Type::Enum
64
+
65
+ ALLOW = :ALLOW
66
+ BLOCK = :BLOCK
67
+ CHALLENGE = :CHALLENGE
68
+
69
+ # @!method self.values
70
+ # @return [Array<Symbol>]
71
+ end
72
+
73
+ class Recipe < PreludeSDK::Internal::Type::BaseModel
74
+ # @!attribute partial_evidence
75
+ # At least one rule could not be evaluated, so the score rests on less than the
76
+ # whole recipe. The score is still returned — a partial verdict is more useful
77
+ # than none — but it is labeled rather than passed off as whole.
78
+ #
79
+ # @return [Boolean]
80
+ required :partial_evidence, PreludeSDK::Internal::Type::Boolean
81
+
82
+ # @!attribute recipe_id
83
+ # The recipe that produced this result.
84
+ #
85
+ # @return [String]
86
+ required :recipe_id, String
87
+
88
+ # @!attribute rules
89
+ # One result per rule in the recipe, in membership order. Every rule runs — a
90
+ # score is only meaningful when complete, so there is no short-circuit on the
91
+ # first trigger.
92
+ #
93
+ # @return [Array<PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule>]
94
+ required :rules,
95
+ -> { PreludeSDK::Internal::Type::ArrayOf[PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule] }
96
+
97
+ # @!attribute score
98
+ # The sum of the weights of the rules that triggered, clamped to the range -100
99
+ # to 100. Two scores at a bound are not comparable.
100
+ #
101
+ # @return [Integer]
102
+ required :score, Integer
103
+
104
+ # @!attribute threshold
105
+ # The score at or above which this recipe flags.
106
+ #
107
+ # @return [Integer]
108
+ required :threshold, Integer
109
+
110
+ # @!attribute verdict
111
+ # This recipe's own verdict. Normally the score against the threshold, unless a
112
+ # preempting rule fired — see `determined_by`.
113
+ #
114
+ # @return [Symbol, PreludeSDK::Models::WatchEvaluateResponse::Recipe::Verdict]
115
+ required :verdict, enum: -> { PreludeSDK::Models::WatchEvaluateResponse::Recipe::Verdict }
116
+
117
+ # @!attribute determined_by
118
+ # The preempting rule that set `verdict`, present only when a rule rather than the
119
+ # score decided it. Without it a recipe can report a score under its threshold and
120
+ # still flag, with nothing in the payload accounting for the difference.
121
+ #
122
+ # @return [String, nil]
123
+ optional :determined_by, String
124
+
125
+ # @!method initialize(partial_evidence:, recipe_id:, rules:, score:, threshold:, verdict:, determined_by: nil)
126
+ # Some parameter documentations has been truncated, see
127
+ # {PreludeSDK::Models::WatchEvaluateResponse::Recipe} for more details.
128
+ #
129
+ # @param partial_evidence [Boolean] At least one rule could not be evaluated, so the score rests on less than the wh
130
+ #
131
+ # @param recipe_id [String] The recipe that produced this result.
132
+ #
133
+ # @param rules [Array<PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule>] One result per rule in the recipe, in membership order. Every rule runs — a scor
134
+ #
135
+ # @param score [Integer] The sum of the weights of the rules that triggered, clamped to the range -100 to
136
+ #
137
+ # @param threshold [Integer] The score at or above which this recipe flags.
138
+ #
139
+ # @param verdict [Symbol, PreludeSDK::Models::WatchEvaluateResponse::Recipe::Verdict] This recipe's own verdict. Normally the score against the threshold, unless a pr
140
+ #
141
+ # @param determined_by [String] The preempting rule that set `verdict`, present only when a rule rather than the
142
+
143
+ class Rule < PreludeSDK::Internal::Type::BaseModel
144
+ # @!attribute outcome
145
+ # What the rule concluded.
146
+ #
147
+ # - `TRIGGERED` - The condition held; `weight` was added to the score.
148
+ # - `NOT_TRIGGERED` - The condition did not hold.
149
+ # - `NOT_EVALUATED` - The rule could not run, because something it reads never
150
+ # arrived. This is not a quieter `NOT_TRIGGERED`: it contributed nothing either
151
+ # way, and it is why `partial_evidence` is set on the recipe.
152
+ #
153
+ # @return [Symbol, PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule::Outcome]
154
+ required :outcome, enum: -> { PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule::Outcome }
155
+
156
+ # @!attribute rule_id
157
+ # The rule that produced this result. Present whatever the rule's visibility, so a
158
+ # rule you cannot see the condition of is still one you can reweight, switch off,
159
+ # or ask us about.
160
+ #
161
+ # @return [String]
162
+ required :rule_id, String
163
+
164
+ # @!attribute weight
165
+ # What this rule contributes to the recipe's score when it triggers.
166
+ #
167
+ # @return [Integer]
168
+ required :weight, Integer
169
+
170
+ # @!attribute blocked_by
171
+ # Why the rule could not run, set only when `outcome` is `NOT_EVALUATED`.
172
+ #
173
+ # A rule you authored names the signal or attribute it waited on, since you wrote
174
+ # the expression that reads it. A Prelude-managed rule reports `missing_data` and
175
+ # nothing more: the signal it waited on is part of a condition that is not
176
+ # disclosed.
177
+ #
178
+ # @return [String, nil]
179
+ optional :blocked_by, String
180
+
181
+ # @!attribute name
182
+ # The rule's name, present for a rule you authored and omitted for a
183
+ # Prelude-managed one. A managed rule's name describes what it looks for, which is
184
+ # as much of the condition as the expression is.
185
+ #
186
+ # @return [String, nil]
187
+ optional :name, String
188
+
189
+ # @!attribute unavailable
190
+ # The rule could not run for a reason on our side rather than anything about your
191
+ # request. `outcome` is `NOT_EVALUATED` and the failure is ours to fix.
192
+ #
193
+ # @return [Boolean, nil]
194
+ optional :unavailable, PreludeSDK::Internal::Type::Boolean
195
+
196
+ # @!method initialize(outcome:, rule_id:, weight:, blocked_by: nil, name: nil, unavailable: nil)
197
+ # Some parameter documentations has been truncated, see
198
+ # {PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule} for more details.
199
+ #
200
+ # @param outcome [Symbol, PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule::Outcome] What the rule concluded.
201
+ #
202
+ # @param rule_id [String] The rule that produced this result. Present whatever the rule's visibility, so a
203
+ #
204
+ # @param weight [Integer] What this rule contributes to the recipe's score when it triggers.
205
+ #
206
+ # @param blocked_by [String] Why the rule could not run, set only when `outcome` is `NOT_EVALUATED`.
207
+ #
208
+ # @param name [String] The rule's name, present for a rule you authored and omitted for a Prelude-manag
209
+ #
210
+ # @param unavailable [Boolean] The rule could not run for a reason on our side rather than anything about your
211
+
212
+ # What the rule concluded.
213
+ #
214
+ # - `TRIGGERED` - The condition held; `weight` was added to the score.
215
+ # - `NOT_TRIGGERED` - The condition did not hold.
216
+ # - `NOT_EVALUATED` - The rule could not run, because something it reads never
217
+ # arrived. This is not a quieter `NOT_TRIGGERED`: it contributed nothing either
218
+ # way, and it is why `partial_evidence` is set on the recipe.
219
+ #
220
+ # @see PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule#outcome
221
+ module Outcome
222
+ extend PreludeSDK::Internal::Type::Enum
223
+
224
+ TRIGGERED = :TRIGGERED
225
+ NOT_TRIGGERED = :NOT_TRIGGERED
226
+ NOT_EVALUATED = :NOT_EVALUATED
227
+
228
+ # @!method self.values
229
+ # @return [Array<Symbol>]
230
+ end
231
+ end
232
+
233
+ # This recipe's own verdict. Normally the score against the threshold, unless a
234
+ # preempting rule fired — see `determined_by`.
235
+ #
236
+ # @see PreludeSDK::Models::WatchEvaluateResponse::Recipe#verdict
237
+ module Verdict
238
+ extend PreludeSDK::Internal::Type::Enum
239
+
240
+ PASS = :PASS
241
+ FLAG = :FLAG
242
+
243
+ # @!method self.values
244
+ # @return [Array<Symbol>]
245
+ end
246
+ end
247
+
248
+ # The evaluation-level verdict, being the most severe verdict across the recipes
249
+ # that ran.
250
+ #
251
+ # - `PASS` - No recipe flagged.
252
+ # - `FLAG` - At least one recipe flagged.
253
+ #
254
+ # @see PreludeSDK::Models::WatchEvaluateResponse#verdict
255
+ module Verdict
256
+ extend PreludeSDK::Internal::Type::Enum
257
+
258
+ PASS = :PASS
259
+ FLAG = :FLAG
260
+
261
+ # @!method self.values
262
+ # @return [Array<Symbol>]
263
+ end
264
+ end
265
+ end
266
+ end
@@ -10,8 +10,8 @@ module PreludeSDK
10
10
  # @!attribute target
11
11
  # The signup identifier to score — a phone number or email address.
12
12
  #
13
- # @return [PreludeSDK::Models::WatchPredictParams::Target]
14
- required :target, -> { PreludeSDK::WatchPredictParams::Target }
13
+ # @return [PreludeSDK::Models::Target]
14
+ required :target, -> { PreludeSDK::Target }
15
15
 
16
16
  # @!attribute dispatch_id
17
17
  # The identifier of the dispatch that came from the front-end SDK.
@@ -29,57 +29,23 @@ module PreludeSDK
29
29
  # The signals used for anti-fraud. For more details, refer to
30
30
  # [Signals](/verify/v2/documentation/prevent-fraud#signals).
31
31
  #
32
- # @return [PreludeSDK::Models::WatchPredictParams::Signals, nil]
33
- optional :signals, -> { PreludeSDK::WatchPredictParams::Signals }
32
+ # @return [PreludeSDK::Models::Signals, nil]
33
+ optional :signals, -> { PreludeSDK::Signals }
34
34
 
35
35
  # @!method initialize(target:, dispatch_id: nil, metadata: nil, signals: nil, request_options: {})
36
36
  # Some parameter documentations has been truncated, see
37
37
  # {PreludeSDK::Models::WatchPredictParams} for more details.
38
38
  #
39
- # @param target [PreludeSDK::Models::WatchPredictParams::Target] The signup identifier to score — a phone number or email address.
39
+ # @param target [PreludeSDK::Models::Target] The signup identifier to score — a phone number or email address.
40
40
  #
41
41
  # @param dispatch_id [String] The identifier of the dispatch that came from the front-end SDK.
42
42
  #
43
43
  # @param metadata [PreludeSDK::Models::WatchPredictParams::Metadata] The metadata for this prediction.
44
44
  #
45
- # @param signals [PreludeSDK::Models::WatchPredictParams::Signals] The signals used for anti-fraud. For more details, refer to [Signals](/verify/v2
45
+ # @param signals [PreludeSDK::Models::Signals] The signals used for anti-fraud. For more details, refer to [Signals](/verify/v2
46
46
  #
47
47
  # @param request_options [PreludeSDK::RequestOptions, Hash{Symbol=>Object}]
48
48
 
49
- class Target < PreludeSDK::Internal::Type::BaseModel
50
- # @!attribute type
51
- # The type of the target. Either "phone_number" or "email_address".
52
- #
53
- # @return [Symbol, PreludeSDK::Models::WatchPredictParams::Target::Type]
54
- required :type, enum: -> { PreludeSDK::WatchPredictParams::Target::Type }
55
-
56
- # @!attribute value
57
- # An E.164 formatted phone number or an email address.
58
- #
59
- # @return [String]
60
- required :value, String
61
-
62
- # @!method initialize(type:, value:)
63
- # The signup identifier to score — a phone number or email address.
64
- #
65
- # @param type [Symbol, PreludeSDK::Models::WatchPredictParams::Target::Type] The type of the target. Either "phone_number" or "email_address".
66
- #
67
- # @param value [String] An E.164 formatted phone number or an email address.
68
-
69
- # The type of the target. Either "phone_number" or "email_address".
70
- #
71
- # @see PreludeSDK::Models::WatchPredictParams::Target#type
72
- module Type
73
- extend PreludeSDK::Internal::Type::Enum
74
-
75
- PHONE_NUMBER = :phone_number
76
- EMAIL_ADDRESS = :email_address
77
-
78
- # @!method self.values
79
- # @return [Array<Symbol>]
80
- end
81
- end
82
-
83
49
  class Metadata < PreludeSDK::Internal::Type::BaseModel
84
50
  # @!attribute correlation_id
85
51
  # A user-defined identifier to correlate this prediction with. It is returned in
@@ -96,126 +62,6 @@ module PreludeSDK
96
62
  #
97
63
  # @param correlation_id [String] A user-defined identifier to correlate this prediction with. It is returned in t
98
64
  end
99
-
100
- class Signals < PreludeSDK::Internal::Type::BaseModel
101
- # @!attribute app_version
102
- # The version of your application.
103
- #
104
- # @return [String, nil]
105
- optional :app_version, String
106
-
107
- # @!attribute device_id
108
- # A unique ID for the user's device. You should ensure that each user device has a
109
- # unique `device_id` value. Ideally, for Android, this corresponds to the
110
- # `ANDROID_ID` and for iOS, this corresponds to the `identifierForVendor`.
111
- #
112
- # @return [String, nil]
113
- optional :device_id, String
114
-
115
- # @!attribute device_model
116
- # The model of the user's device.
117
- #
118
- # @return [String, nil]
119
- optional :device_model, String
120
-
121
- # @!attribute device_platform
122
- # The type of the user's device.
123
- #
124
- # @return [Symbol, PreludeSDK::Models::WatchPredictParams::Signals::DevicePlatform, nil]
125
- optional :device_platform, enum: -> { PreludeSDK::WatchPredictParams::Signals::DevicePlatform }
126
-
127
- # @!attribute existing_user
128
- # Whether the end-user already exists in your system, for example an existing
129
- # account signing in again rather than a first-time signup. Unlike
130
- # `is_trusted_user`, this signal does not bypass fraud checks; it is taken into
131
- # account as one additional anti-fraud signal. For more details, refer to
132
- # [Signals](/verify/v2/documentation/prevent-fraud#signals).
133
- #
134
- # @return [Boolean, nil]
135
- optional :existing_user, PreludeSDK::Internal::Type::Boolean
136
-
137
- # @!attribute ip
138
- # The public IP v4 or v6 address of the end-user's device. You should collect this
139
- # from your backend. If your backend is behind a proxy, use the `X-Forwarded-For`,
140
- # `Forwarded`, `True-Client-IP`, `CF-Connecting-IP` or an equivalent header to get
141
- # the actual public IP of the end-user's device.
142
- #
143
- # @return [String, nil]
144
- optional :ip, String
145
-
146
- # @!attribute is_trusted_user
147
- # This signal should indicate a higher level of trust, explicitly stating that the
148
- # user is genuine. Contact us to discuss your use case. For more details, refer to
149
- # [Signals](/verify/v2/documentation/prevent-fraud#signals).
150
- #
151
- # @return [Boolean, nil]
152
- optional :is_trusted_user, PreludeSDK::Internal::Type::Boolean
153
-
154
- # @!attribute ja4_fingerprint
155
- # The JA4 fingerprint observed for the end-user's connection. Prelude will infer
156
- # it automatically when you use our Frontend SDKs (which use Prelude's edge
157
- # network), but you can also forward the value if you terminate TLS yourself.
158
- #
159
- # @return [String, nil]
160
- optional :ja4_fingerprint, String
161
-
162
- # @!attribute os_version
163
- # The version of the user's device operating system.
164
- #
165
- # @return [String, nil]
166
- optional :os_version, String
167
-
168
- # @!attribute user_agent
169
- # The user agent of the user's device. If the individual fields (os_version,
170
- # device_platform, device_model) are provided, we will prioritize those values
171
- # instead of parsing them from the user agent string.
172
- #
173
- # @return [String, nil]
174
- optional :user_agent, String
175
-
176
- # @!method initialize(app_version: nil, device_id: nil, device_model: nil, device_platform: nil, existing_user: nil, ip: nil, is_trusted_user: nil, ja4_fingerprint: nil, os_version: nil, user_agent: nil)
177
- # Some parameter documentations has been truncated, see
178
- # {PreludeSDK::Models::WatchPredictParams::Signals} for more details.
179
- #
180
- # The signals used for anti-fraud. For more details, refer to
181
- # [Signals](/verify/v2/documentation/prevent-fraud#signals).
182
- #
183
- # @param app_version [String] The version of your application.
184
- #
185
- # @param device_id [String] A unique ID for the user's device. You should ensure that each user device has a
186
- #
187
- # @param device_model [String] The model of the user's device.
188
- #
189
- # @param device_platform [Symbol, PreludeSDK::Models::WatchPredictParams::Signals::DevicePlatform] The type of the user's device.
190
- #
191
- # @param existing_user [Boolean] Whether the end-user already exists in your system, for example an existing acco
192
- #
193
- # @param ip [String] The public IP v4 or v6 address of the end-user's device. You should collect this
194
- #
195
- # @param is_trusted_user [Boolean] This signal should indicate a higher level of trust, explicitly stating that the
196
- #
197
- # @param ja4_fingerprint [String] The JA4 fingerprint observed for the end-user's connection. Prelude will infer i
198
- #
199
- # @param os_version [String] The version of the user's device operating system.
200
- #
201
- # @param user_agent [String] The user agent of the user's device. If the individual fields (os_version, devic
202
-
203
- # The type of the user's device.
204
- #
205
- # @see PreludeSDK::Models::WatchPredictParams::Signals#device_platform
206
- module DevicePlatform
207
- extend PreludeSDK::Internal::Type::Enum
208
-
209
- ANDROID = :android
210
- IOS = :ios
211
- IPADOS = :ipados
212
- TVOS = :tvos
213
- WEB = :web
214
-
215
- # @!method self.values
216
- # @return [Array<Symbol>]
217
- end
218
- end
219
65
  end
220
66
  end
221
67
  end
@@ -46,8 +46,8 @@ module PreludeSDK
46
46
  # @!attribute target
47
47
  # The event target. Only supports phone numbers for now.
48
48
  #
49
- # @return [PreludeSDK::Models::WatchSendEventsParams::Event::Target]
50
- required :target, -> { PreludeSDK::WatchSendEventsParams::Event::Target }
49
+ # @return [PreludeSDK::Models::Target]
50
+ required :target, -> { PreludeSDK::Target }
51
51
 
52
52
  # @!method initialize(confidence:, label:, target:)
53
53
  # Some parameter documentations has been truncated, see
@@ -57,7 +57,7 @@ module PreludeSDK
57
57
  #
58
58
  # @param label [String] A label to describe what the event refers to.
59
59
  #
60
- # @param target [PreludeSDK::Models::WatchSendEventsParams::Event::Target] The event target. Only supports phone numbers for now.
60
+ # @param target [PreludeSDK::Models::Target] The event target. Only supports phone numbers for now.
61
61
 
62
62
  # How much this event tells us to trust the end-user's legitimacy — not how
63
63
  # certain you are that the event occurred. In increasing order of trust:
@@ -82,41 +82,6 @@ module PreludeSDK
82
82
  # @!method self.values
83
83
  # @return [Array<Symbol>]
84
84
  end
85
-
86
- # @see PreludeSDK::Models::WatchSendEventsParams::Event#target
87
- class Target < PreludeSDK::Internal::Type::BaseModel
88
- # @!attribute type
89
- # The type of the target. Either "phone_number" or "email_address".
90
- #
91
- # @return [Symbol, PreludeSDK::Models::WatchSendEventsParams::Event::Target::Type]
92
- required :type, enum: -> { PreludeSDK::WatchSendEventsParams::Event::Target::Type }
93
-
94
- # @!attribute value
95
- # An E.164 formatted phone number or an email address.
96
- #
97
- # @return [String]
98
- required :value, String
99
-
100
- # @!method initialize(type:, value:)
101
- # The event target. Only supports phone numbers for now.
102
- #
103
- # @param type [Symbol, PreludeSDK::Models::WatchSendEventsParams::Event::Target::Type] The type of the target. Either "phone_number" or "email_address".
104
- #
105
- # @param value [String] An E.164 formatted phone number or an email address.
106
-
107
- # The type of the target. Either "phone_number" or "email_address".
108
- #
109
- # @see PreludeSDK::Models::WatchSendEventsParams::Event::Target#type
110
- module Type
111
- extend PreludeSDK::Internal::Type::Enum
112
-
113
- PHONE_NUMBER = :phone_number
114
- EMAIL_ADDRESS = :email_address
115
-
116
- # @!method self.values
117
- # @return [Array<Symbol>]
118
- end
119
- end
120
85
  end
121
86
  end
122
87
  end
@@ -27,8 +27,8 @@ module PreludeSDK
27
27
  # @!attribute target
28
28
  # The feedback target. Only supports phone numbers for now.
29
29
  #
30
- # @return [PreludeSDK::Models::WatchSendFeedbacksParams::Feedback::Target]
31
- required :target, -> { PreludeSDK::WatchSendFeedbacksParams::Feedback::Target }
30
+ # @return [PreludeSDK::Models::Target]
31
+ required :target, -> { PreludeSDK::Target }
32
32
 
33
33
  # @!attribute type
34
34
  # The type of feedback.
@@ -43,47 +43,12 @@ module PreludeSDK
43
43
  optional :metadata, -> { PreludeSDK::WatchSendFeedbacksParams::Feedback::Metadata }
44
44
 
45
45
  # @!method initialize(target:, type:, metadata: nil)
46
- # @param target [PreludeSDK::Models::WatchSendFeedbacksParams::Feedback::Target] The feedback target. Only supports phone numbers for now.
46
+ # @param target [PreludeSDK::Models::Target] The feedback target. Only supports phone numbers for now.
47
47
  #
48
48
  # @param type [Symbol, PreludeSDK::Models::WatchSendFeedbacksParams::Feedback::Type] The type of feedback.
49
49
  #
50
50
  # @param metadata [PreludeSDK::Models::WatchSendFeedbacksParams::Feedback::Metadata] The metadata for this feedback.
51
51
 
52
- # @see PreludeSDK::Models::WatchSendFeedbacksParams::Feedback#target
53
- class Target < PreludeSDK::Internal::Type::BaseModel
54
- # @!attribute type
55
- # The type of the target. Either "phone_number" or "email_address".
56
- #
57
- # @return [Symbol, PreludeSDK::Models::WatchSendFeedbacksParams::Feedback::Target::Type]
58
- required :type, enum: -> { PreludeSDK::WatchSendFeedbacksParams::Feedback::Target::Type }
59
-
60
- # @!attribute value
61
- # An E.164 formatted phone number or an email address.
62
- #
63
- # @return [String]
64
- required :value, String
65
-
66
- # @!method initialize(type:, value:)
67
- # The feedback target. Only supports phone numbers for now.
68
- #
69
- # @param type [Symbol, PreludeSDK::Models::WatchSendFeedbacksParams::Feedback::Target::Type] The type of the target. Either "phone_number" or "email_address".
70
- #
71
- # @param value [String] An E.164 formatted phone number or an email address.
72
-
73
- # The type of the target. Either "phone_number" or "email_address".
74
- #
75
- # @see PreludeSDK::Models::WatchSendFeedbacksParams::Feedback::Target#type
76
- module Type
77
- extend PreludeSDK::Internal::Type::Enum
78
-
79
- PHONE_NUMBER = :phone_number
80
- EMAIL_ADDRESS = :email_address
81
-
82
- # @!method self.values
83
- # @return [Array<Symbol>]
84
- end
85
- end
86
-
87
52
  # The type of feedback.
88
53
  #
89
54
  # @see PreludeSDK::Models::WatchSendFeedbacksParams::Feedback#type
@@ -39,6 +39,8 @@ module PreludeSDK
39
39
  mod.define_sorbet_constant!(const) { T.type_alias { mod.to_sorbet_type } }
40
40
  end
41
41
 
42
+ Intel = PreludeSDK::Models::Intel
43
+
42
44
  LookupLookupParams = PreludeSDK::Models::LookupLookupParams
43
45
 
44
46
  NotifyGetSubscriptionConfigParams = PreludeSDK::Models::NotifyGetSubscriptionConfigParams
@@ -52,16 +54,26 @@ module PreludeSDK
52
54
 
53
55
  NotifyListSubscriptionPhoneNumbersParams = PreludeSDK::Models::NotifyListSubscriptionPhoneNumbersParams
54
56
 
57
+ NotifyReplyParams = PreludeSDK::Models::NotifyReplyParams
58
+
55
59
  NotifySendBatchParams = PreludeSDK::Models::NotifySendBatchParams
56
60
 
57
61
  NotifySendParams = PreludeSDK::Models::NotifySendParams
58
62
 
63
+ Signals = PreludeSDK::Models::Signals
64
+
65
+ Target = PreludeSDK::Models::Target
66
+
59
67
  TransactionalSendParams = PreludeSDK::Models::TransactionalSendParams
60
68
 
69
+ Verification = PreludeSDK::Models::Verification
70
+
61
71
  VerificationCheckParams = PreludeSDK::Models::VerificationCheckParams
62
72
 
63
73
  VerificationCreateParams = PreludeSDK::Models::VerificationCreateParams
64
74
 
75
+ VerificationManagement = PreludeSDK::Models::VerificationManagement
76
+
65
77
  VerificationManagementDeletePhoneNumberParams =
66
78
  PreludeSDK::Models::VerificationManagementDeletePhoneNumberParams
67
79
 
@@ -76,6 +88,8 @@ module PreludeSDK
76
88
  VerificationManagementSubmitSenderIDParams =
77
89
  PreludeSDK::Models::VerificationManagementSubmitSenderIDParams
78
90
 
91
+ WatchEvaluateParams = PreludeSDK::Models::WatchEvaluateParams
92
+
79
93
  WatchPredictParams = PreludeSDK::Models::WatchPredictParams
80
94
 
81
95
  WatchSendEventsParams = PreludeSDK::Models::WatchSendEventsParams