prelude-sdk 0.6.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +23 -0
- data/README.md +3 -5
- data/lib/prelude_sdk/client.rb +4 -0
- data/lib/prelude_sdk/internal/type/base_model.rb +5 -5
- data/lib/prelude_sdk/models/intel/kyc_match_params.rb +96 -0
- data/lib/prelude_sdk/models/intel/kyc_match_response.rb +305 -0
- data/lib/prelude_sdk/models/notify_reply_params.rb +60 -0
- data/lib/prelude_sdk/models/notify_reply_response.rb +65 -0
- data/lib/prelude_sdk/models/signals.rb +125 -0
- data/lib/prelude_sdk/models/target.rb +39 -0
- data/lib/prelude_sdk/models/verification/phone/history_list_params.rb +177 -0
- data/lib/prelude_sdk/models/verification/phone/history_list_response.rb +286 -0
- data/lib/prelude_sdk/models/verification/phone/history_retrieve_params.rb +24 -0
- data/lib/prelude_sdk/models/verification/phone/history_retrieve_response.rb +890 -0
- data/lib/prelude_sdk/models/verification/phone/phone_verification_carrier.rb +29 -0
- data/lib/prelude_sdk/models/verification/phone/phone_verification_money.rb +35 -0
- data/lib/prelude_sdk/models/verification/phone/phone_verification_psd2_transaction.rb +29 -0
- data/lib/prelude_sdk/models/verification_check_params.rb +3 -38
- data/lib/prelude_sdk/models/verification_create_params.rb +6 -149
- data/lib/prelude_sdk/models/verification_management/sandbox_add_phone_number_params.rb +37 -0
- data/lib/prelude_sdk/models/verification_management/sandbox_add_phone_number_response.rb +27 -0
- data/lib/prelude_sdk/models/verification_management/sandbox_delete_phone_number_params.rb +22 -0
- data/lib/prelude_sdk/models/verification_management/sandbox_delete_phone_number_response.rb +19 -0
- data/lib/prelude_sdk/models/verification_management/sandbox_list_phone_numbers_params.rb +16 -0
- data/lib/prelude_sdk/models/verification_management/sandbox_list_phone_numbers_response.rb +47 -0
- data/lib/prelude_sdk/models/watch_evaluate_params.rb +68 -0
- data/lib/prelude_sdk/models/watch_evaluate_response.rb +266 -0
- data/lib/prelude_sdk/models/watch_predict_params.rb +6 -148
- data/lib/prelude_sdk/models/watch_predict_response.rb +4 -0
- data/lib/prelude_sdk/models/watch_send_events_params.rb +3 -38
- data/lib/prelude_sdk/models/watch_send_feedbacks_params.rb +3 -38
- data/lib/prelude_sdk/models.rb +14 -0
- data/lib/prelude_sdk/resources/intel/kyc.rb +62 -0
- data/lib/prelude_sdk/resources/intel.rb +20 -0
- data/lib/prelude_sdk/resources/notify.rb +45 -0
- data/lib/prelude_sdk/resources/verification/phone/history.rb +104 -0
- data/lib/prelude_sdk/resources/verification/phone.rb +21 -0
- data/lib/prelude_sdk/resources/verification.rb +7 -3
- data/lib/prelude_sdk/resources/verification_management/sandbox.rb +99 -0
- data/lib/prelude_sdk/resources/verification_management.rb +5 -0
- data/lib/prelude_sdk/resources/watch.rb +45 -2
- data/lib/prelude_sdk/version.rb +1 -1
- data/lib/prelude_sdk.rb +26 -0
- data/rbi/prelude_sdk/client.rbi +3 -0
- data/rbi/prelude_sdk/models/intel/kyc_match_params.rbi +147 -0
- data/rbi/prelude_sdk/models/intel/kyc_match_response.rbi +736 -0
- data/rbi/prelude_sdk/models/notify_reply_params.rbi +87 -0
- data/rbi/prelude_sdk/models/notify_reply_response.rbi +94 -0
- data/rbi/prelude_sdk/models/signals.rbi +200 -0
- data/rbi/prelude_sdk/models/target.rbi +61 -0
- data/rbi/prelude_sdk/models/verification/phone/history_list_params.rbi +436 -0
- data/rbi/prelude_sdk/models/verification/phone/history_list_response.rbi +661 -0
- data/rbi/prelude_sdk/models/verification/phone/history_retrieve_params.rbi +42 -0
- data/rbi/prelude_sdk/models/verification/phone/history_retrieve_response.rbi +2229 -0
- data/rbi/prelude_sdk/models/verification/phone/phone_verification_carrier.rbi +39 -0
- data/rbi/prelude_sdk/models/verification/phone/phone_verification_money.rbi +46 -0
- data/rbi/prelude_sdk/models/verification/phone/phone_verification_psd2_transaction.rbi +68 -0
- data/rbi/prelude_sdk/models/verification_check_params.rbi +4 -85
- data/rbi/prelude_sdk/models/verification_create_params.rbi +8 -309
- data/rbi/prelude_sdk/models/verification_management/sandbox_add_phone_number_params.rbi +58 -0
- data/rbi/prelude_sdk/models/verification_management/sandbox_add_phone_number_response.rbi +42 -0
- data/rbi/prelude_sdk/models/verification_management/sandbox_delete_phone_number_params.rbi +43 -0
- data/rbi/prelude_sdk/models/verification_management/sandbox_delete_phone_number_response.rbi +32 -0
- data/rbi/prelude_sdk/models/verification_management/sandbox_list_phone_numbers_params.rbi +34 -0
- data/rbi/prelude_sdk/models/verification_management/sandbox_list_phone_numbers_response.rbi +101 -0
- data/rbi/prelude_sdk/models/watch_evaluate_params.rbi +109 -0
- data/rbi/prelude_sdk/models/watch_evaluate_response.rbi +496 -0
- data/rbi/prelude_sdk/models/watch_predict_params.rbi +8 -301
- data/rbi/prelude_sdk/models/watch_predict_response.rbi +11 -0
- data/rbi/prelude_sdk/models/watch_send_events_params.rbi +4 -93
- data/rbi/prelude_sdk/models/watch_send_feedbacks_params.rbi +4 -95
- data/rbi/prelude_sdk/models.rbi +14 -0
- data/rbi/prelude_sdk/resources/intel/kyc.rbi +61 -0
- data/rbi/prelude_sdk/resources/intel.rbi +17 -0
- data/rbi/prelude_sdk/resources/notify.rbi +41 -0
- data/rbi/prelude_sdk/resources/verification/phone/history.rbi +112 -0
- data/rbi/prelude_sdk/resources/verification/phone.rbi +18 -0
- data/rbi/prelude_sdk/resources/verification.rbi +6 -3
- data/rbi/prelude_sdk/resources/verification_management/sandbox.rbi +76 -0
- data/rbi/prelude_sdk/resources/verification_management.rbi +4 -0
- data/rbi/prelude_sdk/resources/watch.rbi +49 -2
- data/sig/prelude_sdk/client.rbs +2 -0
- data/sig/prelude_sdk/models/intel/kyc_match_params.rbs +91 -0
- data/sig/prelude_sdk/models/intel/kyc_match_response.rbs +276 -0
- data/sig/prelude_sdk/models/notify_reply_params.rbs +50 -0
- data/sig/prelude_sdk/models/notify_reply_response.rbs +54 -0
- data/sig/prelude_sdk/models/signals.rbs +101 -0
- data/sig/prelude_sdk/models/target.rbs +29 -0
- data/sig/prelude_sdk/models/verification/phone/history_list_params.rbs +187 -0
- data/sig/prelude_sdk/models/verification/phone/history_list_response.rbs +241 -0
- data/sig/prelude_sdk/models/verification/phone/history_retrieve_params.rbs +27 -0
- data/sig/prelude_sdk/models/verification/phone/history_retrieve_response.rbs +873 -0
- data/sig/prelude_sdk/models/verification/phone/phone_verification_carrier.rbs +23 -0
- data/sig/prelude_sdk/models/verification/phone/phone_verification_money.rbs +21 -0
- data/sig/prelude_sdk/models/verification/phone/phone_verification_psd2_transaction.rbs +37 -0
- data/sig/prelude_sdk/models/verification_check_params.rbs +4 -37
- data/sig/prelude_sdk/models/verification_create_params.rbs +9 -135
- data/sig/prelude_sdk/models/verification_management/sandbox_add_phone_number_params.rbs +30 -0
- data/sig/prelude_sdk/models/verification_management/sandbox_add_phone_number_response.rbs +18 -0
- data/sig/prelude_sdk/models/verification_management/sandbox_delete_phone_number_params.rbs +26 -0
- data/sig/prelude_sdk/models/verification_management/sandbox_delete_phone_number_response.rbs +15 -0
- data/sig/prelude_sdk/models/verification_management/sandbox_list_phone_numbers_params.rbs +17 -0
- data/sig/prelude_sdk/models/verification_management/sandbox_list_phone_numbers_response.rbs +45 -0
- data/sig/prelude_sdk/models/watch_evaluate_params.rbs +52 -0
- data/sig/prelude_sdk/models/watch_evaluate_response.rbs +178 -0
- data/sig/prelude_sdk/models/watch_predict_params.rbs +9 -135
- data/sig/prelude_sdk/models/watch_predict_response.rbs +3 -1
- data/sig/prelude_sdk/models/watch_send_events_params.rbs +4 -37
- data/sig/prelude_sdk/models/watch_send_feedbacks_params.rbs +4 -37
- data/sig/prelude_sdk/models.rbs +14 -0
- data/sig/prelude_sdk/resources/intel/kyc.rbs +23 -0
- data/sig/prelude_sdk/resources/intel.rbs +9 -0
- data/sig/prelude_sdk/resources/notify.rbs +9 -0
- data/sig/prelude_sdk/resources/verification/phone/history.rbs +32 -0
- data/sig/prelude_sdk/resources/verification/phone.rbs +11 -0
- data/sig/prelude_sdk/resources/verification.rbs +5 -3
- data/sig/prelude_sdk/resources/verification_management/sandbox.rbs +24 -0
- data/sig/prelude_sdk/resources/verification_management.rbs +2 -0
- data/sig/prelude_sdk/resources/watch.rbs +11 -2
- metadata +80 -2
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module PreludeSDK
|
|
4
|
+
module Resources
|
|
5
|
+
class Intel
|
|
6
|
+
# Retrieve detailed information about a phone number including carrier data, line
|
|
7
|
+
# type, and portability status.
|
|
8
|
+
class KYC
|
|
9
|
+
# Verify identity attributes against the subscriber record held by the end-user's
|
|
10
|
+
# mobile operator. Send a phone number along with the attributes to check; Prelude
|
|
11
|
+
# resolves the operator internally and returns a per-attribute match. Currently
|
|
12
|
+
# available for France only (Orange, SFR, Bouygues) and must be enabled for your
|
|
13
|
+
# account.
|
|
14
|
+
sig do
|
|
15
|
+
params(
|
|
16
|
+
phone: String,
|
|
17
|
+
address: String,
|
|
18
|
+
birthdate: Date,
|
|
19
|
+
country: String,
|
|
20
|
+
email: String,
|
|
21
|
+
family_name: String,
|
|
22
|
+
given_name: String,
|
|
23
|
+
locality: String,
|
|
24
|
+
postal_code: String,
|
|
25
|
+
region: String,
|
|
26
|
+
request_options: PreludeSDK::RequestOptions::OrHash
|
|
27
|
+
).returns(PreludeSDK::Models::Intel::KYCMatchResponse)
|
|
28
|
+
end
|
|
29
|
+
def match(
|
|
30
|
+
# An E.164 formatted phone number whose subscriber identity to match against.
|
|
31
|
+
phone,
|
|
32
|
+
# The street address.
|
|
33
|
+
address: nil,
|
|
34
|
+
# The date of birth in ISO 8601 (`YYYY-MM-DD`) format. Compared exactly.
|
|
35
|
+
birthdate: nil,
|
|
36
|
+
# The ISO 3166-1 alpha-2 country code. Compared exactly.
|
|
37
|
+
country: nil,
|
|
38
|
+
# The email address.
|
|
39
|
+
email: nil,
|
|
40
|
+
# The end-user's family (last) name.
|
|
41
|
+
family_name: nil,
|
|
42
|
+
# The end-user's given (first) name.
|
|
43
|
+
given_name: nil,
|
|
44
|
+
# The locality (city).
|
|
45
|
+
locality: nil,
|
|
46
|
+
# The postal code. Compared exactly.
|
|
47
|
+
postal_code: nil,
|
|
48
|
+
# The region, state, or province.
|
|
49
|
+
region: nil,
|
|
50
|
+
request_options: {}
|
|
51
|
+
)
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# @api private
|
|
55
|
+
sig { params(client: PreludeSDK::Client).returns(T.attached_class) }
|
|
56
|
+
def self.new(client:)
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module PreludeSDK
|
|
4
|
+
module Resources
|
|
5
|
+
class Intel
|
|
6
|
+
# Retrieve detailed information about a phone number including carrier data, line
|
|
7
|
+
# type, and portability status.
|
|
8
|
+
sig { returns(PreludeSDK::Resources::Intel::KYC) }
|
|
9
|
+
attr_reader :kyc
|
|
10
|
+
|
|
11
|
+
# @api private
|
|
12
|
+
sig { params(client: PreludeSDK::Client).returns(T.attached_class) }
|
|
13
|
+
def self.new(client:)
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -5,6 +5,8 @@ module PreludeSDK
|
|
|
5
5
|
# Send transactional and marketing messages with compliance enforcement.
|
|
6
6
|
class Notify
|
|
7
7
|
# Retrieve a specific subscription management configuration by its ID.
|
|
8
|
+
#
|
|
9
|
+
# In order to get access to this endpoint, contact our support team.
|
|
8
10
|
sig do
|
|
9
11
|
params(
|
|
10
12
|
config_id: String,
|
|
@@ -20,6 +22,8 @@ module PreludeSDK
|
|
|
20
22
|
|
|
21
23
|
# Retrieve the current subscription status for a specific phone number within a
|
|
22
24
|
# subscription configuration.
|
|
25
|
+
#
|
|
26
|
+
# In order to get access to this endpoint, contact our support team.
|
|
23
27
|
sig do
|
|
24
28
|
params(
|
|
25
29
|
phone_number: String,
|
|
@@ -41,6 +45,8 @@ module PreludeSDK
|
|
|
41
45
|
#
|
|
42
46
|
# Each configuration represents a subscription management setup with phone numbers
|
|
43
47
|
# for receiving opt-out/opt-in requests and a callback URL for webhook events.
|
|
48
|
+
#
|
|
49
|
+
# In order to get access to this endpoint, contact our support team.
|
|
44
50
|
sig do
|
|
45
51
|
params(
|
|
46
52
|
cursor: String,
|
|
@@ -61,6 +67,8 @@ module PreludeSDK
|
|
|
61
67
|
# phone number within a subscription configuration.
|
|
62
68
|
#
|
|
63
69
|
# Events are ordered by timestamp in descending order (most recent first).
|
|
70
|
+
#
|
|
71
|
+
# In order to get access to this endpoint, contact our support team.
|
|
64
72
|
sig do
|
|
65
73
|
params(
|
|
66
74
|
phone_number: String,
|
|
@@ -89,6 +97,8 @@ module PreludeSDK
|
|
|
89
97
|
# specific subscription configuration.
|
|
90
98
|
#
|
|
91
99
|
# You can optionally filter by subscription state (SUB or UNSUB).
|
|
100
|
+
#
|
|
101
|
+
# In order to get access to this endpoint, contact our support team.
|
|
92
102
|
sig do
|
|
93
103
|
params(
|
|
94
104
|
config_id: String,
|
|
@@ -114,6 +124,37 @@ module PreludeSDK
|
|
|
114
124
|
)
|
|
115
125
|
end
|
|
116
126
|
|
|
127
|
+
# Send a free-form text reply to an inbound WhatsApp message within the 24-hour
|
|
128
|
+
# conversation window. See
|
|
129
|
+
# [WhatsApp 2-Way Messaging](/notify/v2/documentation/whatsapp) for details.
|
|
130
|
+
sig do
|
|
131
|
+
params(
|
|
132
|
+
reply_to: String,
|
|
133
|
+
text: String,
|
|
134
|
+
to: String,
|
|
135
|
+
callback_url: String,
|
|
136
|
+
correlation_id: String,
|
|
137
|
+
request_options: PreludeSDK::RequestOptions::OrHash
|
|
138
|
+
).returns(PreludeSDK::Models::NotifyReplyResponse)
|
|
139
|
+
end
|
|
140
|
+
def reply(
|
|
141
|
+
# The inbound message ID (prefixed with `im_`) to reply to. This ID is provided in
|
|
142
|
+
# the `inbound.message.received` webhook event.
|
|
143
|
+
reply_to:,
|
|
144
|
+
# The reply message body sent as a free-form WhatsApp text.
|
|
145
|
+
text:,
|
|
146
|
+
# The recipient's phone number in E.164 format. Must match the phone number that
|
|
147
|
+
# sent the original inbound message.
|
|
148
|
+
to:,
|
|
149
|
+
# The URL where webhooks will be sent for delivery events of this reply.
|
|
150
|
+
callback_url: nil,
|
|
151
|
+
# A user-defined identifier to correlate this reply with your internal systems. It
|
|
152
|
+
# is returned in the response and any webhook events that refer to this message.
|
|
153
|
+
correlation_id: nil,
|
|
154
|
+
request_options: {}
|
|
155
|
+
)
|
|
156
|
+
end
|
|
157
|
+
|
|
117
158
|
# Send transactional and marketing messages to your users via SMS, RCS and
|
|
118
159
|
# WhatsApp with automatic compliance enforcement.
|
|
119
160
|
sig do
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module PreludeSDK
|
|
4
|
+
module Resources
|
|
5
|
+
class Verification
|
|
6
|
+
class Phone
|
|
7
|
+
# Verify phone numbers.
|
|
8
|
+
class History
|
|
9
|
+
# Retrieve everything Prelude recorded for one phone verification: its outcome and
|
|
10
|
+
# the device, network and anti-fraud context it was created in, the chronological
|
|
11
|
+
# timeline of every message attempt and code check, and the anti-fraud signals you
|
|
12
|
+
# forwarded.
|
|
13
|
+
#
|
|
14
|
+
# The identifier is the `id` returned by
|
|
15
|
+
# [Create or retry a verification](/verify/v2/api-reference/create-or-retry-a-verification)
|
|
16
|
+
# or the `verification_id` of the verification webhooks. Both `lifecycle` and
|
|
17
|
+
# `signals` are optional: a verification can resolve with its top-level fields
|
|
18
|
+
# alone.
|
|
19
|
+
sig do
|
|
20
|
+
params(
|
|
21
|
+
id: String,
|
|
22
|
+
request_options: PreludeSDK::RequestOptions::OrHash
|
|
23
|
+
).returns(
|
|
24
|
+
PreludeSDK::Models::Verification::Phone::HistoryRetrieveResponse
|
|
25
|
+
)
|
|
26
|
+
end
|
|
27
|
+
def retrieve(
|
|
28
|
+
# The verification identifier.
|
|
29
|
+
id,
|
|
30
|
+
request_options: {}
|
|
31
|
+
)
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# List your phone verifications, most recent first, one entry per verification
|
|
35
|
+
# with its outcome, channels, attempts and cost. Every filter is optional and they
|
|
36
|
+
# combine with AND.
|
|
37
|
+
#
|
|
38
|
+
# Use it to find every verification a phone number went through from your support
|
|
39
|
+
# tooling, then
|
|
40
|
+
# [Get a phone verification](/verify/v2/api-reference/history/get-a-phone-verification)
|
|
41
|
+
# for the full timeline of one of them. A cursor is bound to the filters that
|
|
42
|
+
# produced it: pass `next_cursor` back with the exact same query parameters.
|
|
43
|
+
sig do
|
|
44
|
+
params(
|
|
45
|
+
channels:
|
|
46
|
+
T::Array[
|
|
47
|
+
PreludeSDK::Verification::Phone::HistoryListParams::Channel::OrSymbol
|
|
48
|
+
],
|
|
49
|
+
cursor: String,
|
|
50
|
+
device_platform:
|
|
51
|
+
PreludeSDK::Verification::Phone::HistoryListParams::DevicePlatform::OrSymbol,
|
|
52
|
+
from: Time,
|
|
53
|
+
limit: Integer,
|
|
54
|
+
max_attempts: Integer,
|
|
55
|
+
min_attempts: Integer,
|
|
56
|
+
phone_number: String,
|
|
57
|
+
region: String,
|
|
58
|
+
status:
|
|
59
|
+
PreludeSDK::Verification::Phone::HistoryListParams::Status::OrSymbol,
|
|
60
|
+
template_id: String,
|
|
61
|
+
to: Time,
|
|
62
|
+
request_options: PreludeSDK::RequestOptions::OrHash
|
|
63
|
+
).returns(
|
|
64
|
+
PreludeSDK::Models::Verification::Phone::HistoryListResponse
|
|
65
|
+
)
|
|
66
|
+
end
|
|
67
|
+
def list(
|
|
68
|
+
# Only verifications that could use one of these channels. Repeat the parameter
|
|
69
|
+
# for several values.
|
|
70
|
+
channels: nil,
|
|
71
|
+
# Pagination cursor from the previous response.
|
|
72
|
+
cursor: nil,
|
|
73
|
+
# Only verifications created from this device platform.
|
|
74
|
+
device_platform: nil,
|
|
75
|
+
# Only verifications created at or after this RFC 3339 timestamp. Goes with `to`,
|
|
76
|
+
# at most 6 months apart. Without them the whole history is searched.
|
|
77
|
+
from: nil,
|
|
78
|
+
# Maximum number of verifications to return per page.
|
|
79
|
+
limit: nil,
|
|
80
|
+
# Only verifications that sent at most this many messages. `0` keeps the
|
|
81
|
+
# verifications that never sent one.
|
|
82
|
+
max_attempts: nil,
|
|
83
|
+
# Only verifications that sent at least this many messages.
|
|
84
|
+
min_attempts: nil,
|
|
85
|
+
# Only verifications targeting this E.164 phone number. The leading `+` may be
|
|
86
|
+
# omitted.
|
|
87
|
+
phone_number: nil,
|
|
88
|
+
# Only verifications of phone numbers from this region, as an ISO 3166-1 alpha-2
|
|
89
|
+
# code.
|
|
90
|
+
region: nil,
|
|
91
|
+
# Only verifications in this status. `pending_check` cannot be filtered on.
|
|
92
|
+
status: nil,
|
|
93
|
+
# Only verifications sent with this template, as returned in `template_id` by
|
|
94
|
+
# [Get a phone verification](/verify/v2/api-reference/history/get-a-phone-verification).
|
|
95
|
+
# Built-in templates (`prelude:*`) cannot be filtered on.
|
|
96
|
+
template_id: nil,
|
|
97
|
+
# Only verifications created at or before this RFC 3339 timestamp. Goes with
|
|
98
|
+
# `from`.
|
|
99
|
+
to: nil,
|
|
100
|
+
request_options: {}
|
|
101
|
+
)
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# @api private
|
|
105
|
+
sig { params(client: PreludeSDK::Client).returns(T.attached_class) }
|
|
106
|
+
def self.new(client:)
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
end
|
|
111
|
+
end
|
|
112
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module PreludeSDK
|
|
4
|
+
module Resources
|
|
5
|
+
class Verification
|
|
6
|
+
class Phone
|
|
7
|
+
# Verify phone numbers.
|
|
8
|
+
sig { returns(PreludeSDK::Resources::Verification::Phone::History) }
|
|
9
|
+
attr_reader :history
|
|
10
|
+
|
|
11
|
+
# @api private
|
|
12
|
+
sig { params(client: PreludeSDK::Client).returns(T.attached_class) }
|
|
13
|
+
def self.new(client:)
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -4,16 +4,19 @@ module PreludeSDK
|
|
|
4
4
|
module Resources
|
|
5
5
|
# Verify phone numbers.
|
|
6
6
|
class Verification
|
|
7
|
+
sig { returns(PreludeSDK::Resources::Verification::Phone) }
|
|
8
|
+
attr_reader :phone
|
|
9
|
+
|
|
7
10
|
# Create a new verification for a specific phone number. If another non-expired
|
|
8
11
|
# verification exists (the request is performed within the verification window),
|
|
9
12
|
# this endpoint will perform a retry instead.
|
|
10
13
|
sig do
|
|
11
14
|
params(
|
|
12
|
-
target: PreludeSDK::
|
|
15
|
+
target: PreludeSDK::Target::OrHash,
|
|
13
16
|
dispatch_id: String,
|
|
14
17
|
metadata: PreludeSDK::VerificationCreateParams::Metadata::OrHash,
|
|
15
18
|
options: PreludeSDK::VerificationCreateParams::Options::OrHash,
|
|
16
|
-
signals: PreludeSDK::
|
|
19
|
+
signals: PreludeSDK::Signals::OrHash,
|
|
17
20
|
request_options: PreludeSDK::RequestOptions::OrHash
|
|
18
21
|
).returns(PreludeSDK::Models::VerificationCreateResponse)
|
|
19
22
|
end
|
|
@@ -39,7 +42,7 @@ module PreludeSDK
|
|
|
39
42
|
sig do
|
|
40
43
|
params(
|
|
41
44
|
code: String,
|
|
42
|
-
target: PreludeSDK::
|
|
45
|
+
target: PreludeSDK::Target::OrHash,
|
|
43
46
|
psd2: PreludeSDK::VerificationCheckParams::Psd2::OrHash,
|
|
44
47
|
request_options: PreludeSDK::RequestOptions::OrHash
|
|
45
48
|
).returns(PreludeSDK::Models::VerificationCheckResponse)
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module PreludeSDK
|
|
4
|
+
module Resources
|
|
5
|
+
class VerificationManagement
|
|
6
|
+
# Verify phone numbers.
|
|
7
|
+
class Sandbox
|
|
8
|
+
# Register a phone number as a sandbox number and associate it with a fixed
|
|
9
|
+
# attempt code. Subsequent verification attempts against this number will not
|
|
10
|
+
# trigger a real SMS/call and will validate against the configured attempt code.
|
|
11
|
+
#
|
|
12
|
+
# This operation is idempotent - re-adding the same phone number will overwrite
|
|
13
|
+
# the existing attempt code.
|
|
14
|
+
#
|
|
15
|
+
# In order to get access to this endpoint, contact our support team.
|
|
16
|
+
sig do
|
|
17
|
+
params(
|
|
18
|
+
attempt_code: String,
|
|
19
|
+
phone_number: String,
|
|
20
|
+
request_options: PreludeSDK::RequestOptions::OrHash
|
|
21
|
+
).returns(
|
|
22
|
+
PreludeSDK::Models::VerificationManagement::SandboxAddPhoneNumberResponse
|
|
23
|
+
)
|
|
24
|
+
end
|
|
25
|
+
def add_phone_number(
|
|
26
|
+
# The fixed attempt code that will validate verification attempts for this phone
|
|
27
|
+
# number.
|
|
28
|
+
attempt_code:,
|
|
29
|
+
# An E.164 formatted phone number to add to the sandbox list.
|
|
30
|
+
phone_number:,
|
|
31
|
+
request_options: {}
|
|
32
|
+
)
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Remove a phone number from the sandbox list.
|
|
36
|
+
#
|
|
37
|
+
# This operation is idempotent - deleting a phone number that is not in the
|
|
38
|
+
# sandbox list will succeed without making any changes.
|
|
39
|
+
#
|
|
40
|
+
# In order to get access to this endpoint, contact our support team.
|
|
41
|
+
sig do
|
|
42
|
+
params(
|
|
43
|
+
phone_number: String,
|
|
44
|
+
request_options: PreludeSDK::RequestOptions::OrHash
|
|
45
|
+
).returns(
|
|
46
|
+
PreludeSDK::Models::VerificationManagement::SandboxDeletePhoneNumberResponse
|
|
47
|
+
)
|
|
48
|
+
end
|
|
49
|
+
def delete_phone_number(
|
|
50
|
+
# The E.164 formatted phone number to remove from the sandbox list.
|
|
51
|
+
phone_number,
|
|
52
|
+
request_options: {}
|
|
53
|
+
)
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Retrieve the list of sandbox phone numbers for the account. Sandbox numbers are
|
|
57
|
+
# test numbers that bypass the real verification flow and return a fixed attempt
|
|
58
|
+
# code.
|
|
59
|
+
#
|
|
60
|
+
# In order to get access to this endpoint, contact our support team.
|
|
61
|
+
sig do
|
|
62
|
+
params(request_options: PreludeSDK::RequestOptions::OrHash).returns(
|
|
63
|
+
PreludeSDK::Models::VerificationManagement::SandboxListPhoneNumbersResponse
|
|
64
|
+
)
|
|
65
|
+
end
|
|
66
|
+
def list_phone_numbers(request_options: {})
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# @api private
|
|
70
|
+
sig { params(client: PreludeSDK::Client).returns(T.attached_class) }
|
|
71
|
+
def self.new(client:)
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
end
|
|
@@ -4,6 +4,10 @@ module PreludeSDK
|
|
|
4
4
|
module Resources
|
|
5
5
|
# Verify phone numbers.
|
|
6
6
|
class VerificationManagement
|
|
7
|
+
# Verify phone numbers.
|
|
8
|
+
sig { returns(PreludeSDK::Resources::VerificationManagement::Sandbox) }
|
|
9
|
+
attr_reader :sandbox
|
|
10
|
+
|
|
7
11
|
# Remove a phone number from the allow or block list.
|
|
8
12
|
#
|
|
9
13
|
# This operation is idempotent - re-deleting the same phone number will not result
|
|
@@ -4,6 +4,53 @@ module PreludeSDK
|
|
|
4
4
|
module Resources
|
|
5
5
|
# Evaluate email addresses and phone numbers for trustworthiness.
|
|
6
6
|
class Watch
|
|
7
|
+
# **Beta.** The request and response shapes may still change, and flows and
|
|
8
|
+
# recipes are configured by Prelude on your behalf for now. Talk to us before you
|
|
9
|
+
# build against it.
|
|
10
|
+
#
|
|
11
|
+
# Score a target against the rules configured for one moment in your product —
|
|
12
|
+
# signup, checkout, password reset. The flow selects which recipes run; each
|
|
13
|
+
# recipe scores its rules against a threshold and returns its own verdict, and the
|
|
14
|
+
# evaluation answers with the most severe verdict and action across them. Where
|
|
15
|
+
# Predict returns a single model-derived outcome, Eval returns the full breakdown,
|
|
16
|
+
# so you can see which rules fired and which could not run. Scoring-only — it does
|
|
17
|
+
# not update counters by itself.
|
|
18
|
+
sig do
|
|
19
|
+
params(
|
|
20
|
+
flow_id: String,
|
|
21
|
+
target: PreludeSDK::Target::OrHash,
|
|
22
|
+
attributes: T::Hash[Symbol, String],
|
|
23
|
+
dispatch_id: String,
|
|
24
|
+
signals: PreludeSDK::Signals::OrHash,
|
|
25
|
+
request_options: PreludeSDK::RequestOptions::OrHash
|
|
26
|
+
).returns(PreludeSDK::Models::WatchEvaluateResponse)
|
|
27
|
+
end
|
|
28
|
+
def evaluate(
|
|
29
|
+
# The flow to evaluate. A flow names the moment you are guarding and selects the
|
|
30
|
+
# recipes that run.
|
|
31
|
+
flow_id:,
|
|
32
|
+
# The identifier to score — a phone number or email address.
|
|
33
|
+
target:,
|
|
34
|
+
# Values for the attributes the flow's recipes declare, keyed without the `attr.`
|
|
35
|
+
# namespace a rule uses to reference them.
|
|
36
|
+
#
|
|
37
|
+
# An attribute a recipe declares and this request omits is treated as missing
|
|
38
|
+
# evidence, not as an empty value: the rules reading it report `NOT_EVALUATED`
|
|
39
|
+
# rather than being scored as though the condition were false. A key no recipe in
|
|
40
|
+
# the flow declares is ignored rather than rejected, so one payload can serve
|
|
41
|
+
# flows that read different attributes.
|
|
42
|
+
attributes: nil,
|
|
43
|
+
# The identifier of the dispatch that came from the front-end SDK. Signals it
|
|
44
|
+
# carries fill in anything the request did not state; the request wins where both
|
|
45
|
+
# supply a value.
|
|
46
|
+
dispatch_id: nil,
|
|
47
|
+
# The signals used for anti-fraud. For more details, refer to
|
|
48
|
+
# [Signals](/verify/v2/documentation/prevent-fraud#signals).
|
|
49
|
+
signals: nil,
|
|
50
|
+
request_options: {}
|
|
51
|
+
)
|
|
52
|
+
end
|
|
53
|
+
|
|
7
54
|
# At signup, score the user's phone number or email address (target) as legitimate
|
|
8
55
|
# or suspicious. Scoring-only — does not update counters by itself. When using
|
|
9
56
|
# Feedback, call predict before verification.started on the same target (and
|
|
@@ -12,10 +59,10 @@ module PreludeSDK
|
|
|
12
59
|
# verification funnel outside Prelude Verify.
|
|
13
60
|
sig do
|
|
14
61
|
params(
|
|
15
|
-
target: PreludeSDK::
|
|
62
|
+
target: PreludeSDK::Target::OrHash,
|
|
16
63
|
dispatch_id: String,
|
|
17
64
|
metadata: PreludeSDK::WatchPredictParams::Metadata::OrHash,
|
|
18
|
-
signals: PreludeSDK::
|
|
65
|
+
signals: PreludeSDK::Signals::OrHash,
|
|
19
66
|
request_options: PreludeSDK::RequestOptions::OrHash
|
|
20
67
|
).returns(PreludeSDK::Models::WatchPredictResponse)
|
|
21
68
|
end
|
data/sig/prelude_sdk/client.rbs
CHANGED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
module PreludeSDK
|
|
2
|
+
module Models
|
|
3
|
+
module Intel
|
|
4
|
+
type kyc_match_params =
|
|
5
|
+
{
|
|
6
|
+
phone: String,
|
|
7
|
+
address: String,
|
|
8
|
+
birthdate: Date,
|
|
9
|
+
country: String,
|
|
10
|
+
email: String,
|
|
11
|
+
family_name: String,
|
|
12
|
+
given_name: String,
|
|
13
|
+
locality: String,
|
|
14
|
+
postal_code: String,
|
|
15
|
+
region: String
|
|
16
|
+
}
|
|
17
|
+
& PreludeSDK::Internal::Type::request_parameters
|
|
18
|
+
|
|
19
|
+
class KYCMatchParams < PreludeSDK::Internal::Type::BaseModel
|
|
20
|
+
extend PreludeSDK::Internal::Type::RequestParameters::Converter
|
|
21
|
+
include PreludeSDK::Internal::Type::RequestParameters
|
|
22
|
+
|
|
23
|
+
attr_accessor phone: String
|
|
24
|
+
|
|
25
|
+
attr_reader address: String?
|
|
26
|
+
|
|
27
|
+
def address=: (String) -> String
|
|
28
|
+
|
|
29
|
+
attr_reader birthdate: Date?
|
|
30
|
+
|
|
31
|
+
def birthdate=: (Date) -> Date
|
|
32
|
+
|
|
33
|
+
attr_reader country: String?
|
|
34
|
+
|
|
35
|
+
def country=: (String) -> String
|
|
36
|
+
|
|
37
|
+
attr_reader email: String?
|
|
38
|
+
|
|
39
|
+
def email=: (String) -> String
|
|
40
|
+
|
|
41
|
+
attr_reader family_name: String?
|
|
42
|
+
|
|
43
|
+
def family_name=: (String) -> String
|
|
44
|
+
|
|
45
|
+
attr_reader given_name: String?
|
|
46
|
+
|
|
47
|
+
def given_name=: (String) -> String
|
|
48
|
+
|
|
49
|
+
attr_reader locality: String?
|
|
50
|
+
|
|
51
|
+
def locality=: (String) -> String
|
|
52
|
+
|
|
53
|
+
attr_reader postal_code: String?
|
|
54
|
+
|
|
55
|
+
def postal_code=: (String) -> String
|
|
56
|
+
|
|
57
|
+
attr_reader region: String?
|
|
58
|
+
|
|
59
|
+
def region=: (String) -> String
|
|
60
|
+
|
|
61
|
+
def initialize: (
|
|
62
|
+
phone: String,
|
|
63
|
+
?address: String,
|
|
64
|
+
?birthdate: Date,
|
|
65
|
+
?country: String,
|
|
66
|
+
?email: String,
|
|
67
|
+
?family_name: String,
|
|
68
|
+
?given_name: String,
|
|
69
|
+
?locality: String,
|
|
70
|
+
?postal_code: String,
|
|
71
|
+
?region: String,
|
|
72
|
+
?request_options: PreludeSDK::request_opts
|
|
73
|
+
) -> void
|
|
74
|
+
|
|
75
|
+
def to_hash: -> {
|
|
76
|
+
phone: String,
|
|
77
|
+
address: String,
|
|
78
|
+
birthdate: Date,
|
|
79
|
+
country: String,
|
|
80
|
+
email: String,
|
|
81
|
+
family_name: String,
|
|
82
|
+
given_name: String,
|
|
83
|
+
locality: String,
|
|
84
|
+
postal_code: String,
|
|
85
|
+
region: String,
|
|
86
|
+
request_options: PreludeSDK::RequestOptions
|
|
87
|
+
}
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
end
|
|
91
|
+
end
|