prelude-sdk 0.2.0 → 0.3.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 +48 -0
- data/README.md +1 -1
- data/lib/prelude_sdk/client.rb +7 -0
- data/lib/prelude_sdk/internal/transport/pooled_net_requester.rb +13 -11
- data/lib/prelude_sdk/internal/util.rb +39 -3
- data/lib/prelude_sdk/models/lookup_lookup_params.rb +9 -1
- data/lib/prelude_sdk/models/notify_get_subscription_config_params.rb +7 -1
- data/lib/prelude_sdk/models/notify_get_subscription_phone_number_params.rb +7 -1
- data/lib/prelude_sdk/models/notify_list_subscription_phone_number_events_params.rb +8 -1
- data/lib/prelude_sdk/models/notify_list_subscription_phone_numbers_params.rb +8 -1
- data/lib/prelude_sdk/models/notify_send_batch_params.rb +32 -1
- data/lib/prelude_sdk/models/notify_send_batch_response.rb +39 -1
- data/lib/prelude_sdk/models/notify_send_params.rb +32 -1
- data/lib/prelude_sdk/models/notify_send_response.rb +36 -1
- data/lib/prelude_sdk/models/transactional_send_params.rb +32 -1
- data/lib/prelude_sdk/models/verification_create_params.rb +35 -48
- data/lib/prelude_sdk/models/verification_create_response.rb +15 -0
- data/lib/prelude_sdk/models/verification_management_delete_phone_number_params.rb +8 -1
- data/lib/prelude_sdk/models/verification_management_list_phone_numbers_params.rb +7 -1
- data/lib/prelude_sdk/models/verification_management_set_phone_number_params.rb +8 -1
- data/lib/prelude_sdk/models/watch_predict_params.rb +16 -12
- data/lib/prelude_sdk/models/watch_predict_response.rb +51 -1
- data/lib/prelude_sdk/models/watch_send_feedbacks_params.rb +1 -128
- data/lib/prelude_sdk/resources/lookup.rb +4 -1
- data/lib/prelude_sdk/resources/notify.rb +13 -5
- data/lib/prelude_sdk/resources/transactional.rb +4 -1
- data/lib/prelude_sdk/resources/verification.rb +1 -0
- data/lib/prelude_sdk/resources/verification_management.rb +1 -0
- data/lib/prelude_sdk/resources/watch.rb +1 -0
- data/lib/prelude_sdk/version.rb +1 -1
- data/rbi/prelude_sdk/client.rbi +7 -0
- data/rbi/prelude_sdk/internal/util.rbi +21 -1
- data/rbi/prelude_sdk/models/lookup_lookup_params.rbi +8 -0
- data/rbi/prelude_sdk/models/notify_get_subscription_config_params.rbi +13 -5
- data/rbi/prelude_sdk/models/notify_get_subscription_phone_number_params.rbi +10 -2
- data/rbi/prelude_sdk/models/notify_list_subscription_phone_number_events_params.rbi +6 -0
- data/rbi/prelude_sdk/models/notify_list_subscription_phone_numbers_params.rbi +6 -0
- data/rbi/prelude_sdk/models/notify_send_batch_params.rbi +50 -0
- data/rbi/prelude_sdk/models/notify_send_batch_response.rbi +80 -0
- data/rbi/prelude_sdk/models/notify_send_params.rbi +48 -0
- data/rbi/prelude_sdk/models/notify_send_response.rbi +75 -0
- data/rbi/prelude_sdk/models/transactional_send_params.rbi +50 -0
- data/rbi/prelude_sdk/models/verification_create_params.rbi +53 -93
- data/rbi/prelude_sdk/models/verification_create_response.rbi +26 -0
- data/rbi/prelude_sdk/models/verification_management_delete_phone_number_params.rbi +16 -1
- data/rbi/prelude_sdk/models/verification_management_list_phone_numbers_params.rbi +21 -4
- data/rbi/prelude_sdk/models/verification_management_set_phone_number_params.rbi +16 -1
- data/rbi/prelude_sdk/models/watch_predict_params.rbi +24 -16
- data/rbi/prelude_sdk/models/watch_predict_response.rbi +152 -3
- data/rbi/prelude_sdk/models/watch_send_feedbacks_params.rbi +3 -243
- data/rbi/prelude_sdk/resources/lookup.rbi +2 -0
- data/rbi/prelude_sdk/resources/notify.rbi +9 -0
- data/rbi/prelude_sdk/resources/transactional.rbi +5 -0
- data/rbi/prelude_sdk/resources/verification.rbi +1 -0
- data/rbi/prelude_sdk/resources/verification_management.rbi +1 -0
- data/rbi/prelude_sdk/resources/watch.rbi +1 -0
- data/sig/prelude_sdk/internal/util.rbs +10 -0
- data/sig/prelude_sdk/models/lookup_lookup_params.rbs +8 -1
- data/sig/prelude_sdk/models/notify_get_subscription_config_params.rbs +11 -3
- data/sig/prelude_sdk/models/notify_get_subscription_phone_number_params.rbs +6 -1
- data/sig/prelude_sdk/models/notify_list_subscription_phone_number_events_params.rbs +10 -1
- data/sig/prelude_sdk/models/notify_list_subscription_phone_numbers_params.rbs +5 -0
- data/sig/prelude_sdk/models/notify_send_batch_params.rbs +21 -0
- data/sig/prelude_sdk/models/notify_send_batch_response.rbs +27 -0
- data/sig/prelude_sdk/models/notify_send_params.rbs +21 -0
- data/sig/prelude_sdk/models/notify_send_response.rbs +27 -0
- data/sig/prelude_sdk/models/transactional_send_params.rbs +21 -0
- data/sig/prelude_sdk/models/verification_create_params.rbs +2 -21
- data/sig/prelude_sdk/models/verification_create_response.rbs +2 -1
- data/sig/prelude_sdk/models/verification_management_delete_phone_number_params.rbs +9 -1
- data/sig/prelude_sdk/models/verification_management_list_phone_numbers_params.rbs +14 -3
- data/sig/prelude_sdk/models/verification_management_set_phone_number_params.rbs +9 -1
- data/sig/prelude_sdk/models/watch_predict_response.rbs +41 -3
- data/sig/prelude_sdk/models/watch_send_feedbacks_params.rbs +3 -110
- data/sig/prelude_sdk/resources/notify.rbs +2 -0
- data/sig/prelude_sdk/resources/transactional.rbs +1 -0
- metadata +16 -2
|
@@ -49,6 +49,34 @@ module PreludeSDK
|
|
|
49
49
|
sig { params(correlation_id: String).void }
|
|
50
50
|
attr_writer :correlation_id
|
|
51
51
|
|
|
52
|
+
# The SMS encoding type based on message content. GSM-7 supports standard
|
|
53
|
+
# characters (up to 160 chars per segment), while UCS-2 supports Unicode including
|
|
54
|
+
# emoji (up to 70 chars per segment). Only present for SMS messages.
|
|
55
|
+
sig do
|
|
56
|
+
returns(
|
|
57
|
+
T.nilable(
|
|
58
|
+
PreludeSDK::Models::NotifySendResponse::Encoding::TaggedSymbol
|
|
59
|
+
)
|
|
60
|
+
)
|
|
61
|
+
end
|
|
62
|
+
attr_reader :encoding
|
|
63
|
+
|
|
64
|
+
sig do
|
|
65
|
+
params(
|
|
66
|
+
encoding: PreludeSDK::Models::NotifySendResponse::Encoding::OrSymbol
|
|
67
|
+
).void
|
|
68
|
+
end
|
|
69
|
+
attr_writer :encoding
|
|
70
|
+
|
|
71
|
+
# The estimated number of SMS segments for this message. This value is not
|
|
72
|
+
# contractual; the actual segment count will be determined after the SMS is sent
|
|
73
|
+
# by the provider. Only present for SMS messages.
|
|
74
|
+
sig { returns(T.nilable(Integer)) }
|
|
75
|
+
attr_reader :estimated_segment_count
|
|
76
|
+
|
|
77
|
+
sig { params(estimated_segment_count: Integer).void }
|
|
78
|
+
attr_writer :estimated_segment_count
|
|
79
|
+
|
|
52
80
|
# The Sender ID used for this message.
|
|
53
81
|
sig { returns(T.nilable(String)) }
|
|
54
82
|
attr_reader :from
|
|
@@ -75,6 +103,8 @@ module PreludeSDK
|
|
|
75
103
|
variables: T::Hash[Symbol, String],
|
|
76
104
|
callback_url: String,
|
|
77
105
|
correlation_id: String,
|
|
106
|
+
encoding: PreludeSDK::Models::NotifySendResponse::Encoding::OrSymbol,
|
|
107
|
+
estimated_segment_count: Integer,
|
|
78
108
|
from: String,
|
|
79
109
|
schedule_at: Time
|
|
80
110
|
).returns(T.attached_class)
|
|
@@ -96,6 +126,14 @@ module PreludeSDK
|
|
|
96
126
|
callback_url: nil,
|
|
97
127
|
# A user-defined identifier to correlate this message with your internal systems.
|
|
98
128
|
correlation_id: nil,
|
|
129
|
+
# The SMS encoding type based on message content. GSM-7 supports standard
|
|
130
|
+
# characters (up to 160 chars per segment), while UCS-2 supports Unicode including
|
|
131
|
+
# emoji (up to 70 chars per segment). Only present for SMS messages.
|
|
132
|
+
encoding: nil,
|
|
133
|
+
# The estimated number of SMS segments for this message. This value is not
|
|
134
|
+
# contractual; the actual segment count will be determined after the SMS is sent
|
|
135
|
+
# by the provider. Only present for SMS messages.
|
|
136
|
+
estimated_segment_count: nil,
|
|
99
137
|
# The Sender ID used for this message.
|
|
100
138
|
from: nil,
|
|
101
139
|
# When the message will actually be sent in RFC3339 format with timezone offset.
|
|
@@ -116,6 +154,9 @@ module PreludeSDK
|
|
|
116
154
|
variables: T::Hash[Symbol, String],
|
|
117
155
|
callback_url: String,
|
|
118
156
|
correlation_id: String,
|
|
157
|
+
encoding:
|
|
158
|
+
PreludeSDK::Models::NotifySendResponse::Encoding::TaggedSymbol,
|
|
159
|
+
estimated_segment_count: Integer,
|
|
119
160
|
from: String,
|
|
120
161
|
schedule_at: Time
|
|
121
162
|
}
|
|
@@ -123,6 +164,40 @@ module PreludeSDK
|
|
|
123
164
|
end
|
|
124
165
|
def to_hash
|
|
125
166
|
end
|
|
167
|
+
|
|
168
|
+
# The SMS encoding type based on message content. GSM-7 supports standard
|
|
169
|
+
# characters (up to 160 chars per segment), while UCS-2 supports Unicode including
|
|
170
|
+
# emoji (up to 70 chars per segment). Only present for SMS messages.
|
|
171
|
+
module Encoding
|
|
172
|
+
extend PreludeSDK::Internal::Type::Enum
|
|
173
|
+
|
|
174
|
+
TaggedSymbol =
|
|
175
|
+
T.type_alias do
|
|
176
|
+
T.all(Symbol, PreludeSDK::Models::NotifySendResponse::Encoding)
|
|
177
|
+
end
|
|
178
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
179
|
+
|
|
180
|
+
GSM_7 =
|
|
181
|
+
T.let(
|
|
182
|
+
:"GSM-7",
|
|
183
|
+
PreludeSDK::Models::NotifySendResponse::Encoding::TaggedSymbol
|
|
184
|
+
)
|
|
185
|
+
UCS_2 =
|
|
186
|
+
T.let(
|
|
187
|
+
:"UCS-2",
|
|
188
|
+
PreludeSDK::Models::NotifySendResponse::Encoding::TaggedSymbol
|
|
189
|
+
)
|
|
190
|
+
|
|
191
|
+
sig do
|
|
192
|
+
override.returns(
|
|
193
|
+
T::Array[
|
|
194
|
+
PreludeSDK::Models::NotifySendResponse::Encoding::TaggedSymbol
|
|
195
|
+
]
|
|
196
|
+
)
|
|
197
|
+
end
|
|
198
|
+
def self.values
|
|
199
|
+
end
|
|
200
|
+
end
|
|
126
201
|
end
|
|
127
202
|
end
|
|
128
203
|
end
|
|
@@ -38,6 +38,18 @@ module PreludeSDK
|
|
|
38
38
|
sig { params(correlation_id: String).void }
|
|
39
39
|
attr_writer :correlation_id
|
|
40
40
|
|
|
41
|
+
# A document to attach to the message. Only supported on WhatsApp templates that
|
|
42
|
+
# have a document header.
|
|
43
|
+
sig { returns(T.nilable(PreludeSDK::TransactionalSendParams::Document)) }
|
|
44
|
+
attr_reader :document
|
|
45
|
+
|
|
46
|
+
sig do
|
|
47
|
+
params(
|
|
48
|
+
document: PreludeSDK::TransactionalSendParams::Document::OrHash
|
|
49
|
+
).void
|
|
50
|
+
end
|
|
51
|
+
attr_writer :document
|
|
52
|
+
|
|
41
53
|
# The message expiration date.
|
|
42
54
|
sig { returns(T.nilable(String)) }
|
|
43
55
|
attr_reader :expires_at
|
|
@@ -101,6 +113,7 @@ module PreludeSDK
|
|
|
101
113
|
to: String,
|
|
102
114
|
callback_url: String,
|
|
103
115
|
correlation_id: String,
|
|
116
|
+
document: PreludeSDK::TransactionalSendParams::Document::OrHash,
|
|
104
117
|
expires_at: String,
|
|
105
118
|
from: String,
|
|
106
119
|
locale: String,
|
|
@@ -121,6 +134,9 @@ module PreludeSDK
|
|
|
121
134
|
# returned in the response and any webhook events that refer to this
|
|
122
135
|
# transactionalmessage.
|
|
123
136
|
correlation_id: nil,
|
|
137
|
+
# A document to attach to the message. Only supported on WhatsApp templates that
|
|
138
|
+
# have a document header.
|
|
139
|
+
document: nil,
|
|
124
140
|
# The message expiration date.
|
|
125
141
|
expires_at: nil,
|
|
126
142
|
# The Sender ID.
|
|
@@ -153,6 +169,7 @@ module PreludeSDK
|
|
|
153
169
|
to: String,
|
|
154
170
|
callback_url: String,
|
|
155
171
|
correlation_id: String,
|
|
172
|
+
document: PreludeSDK::TransactionalSendParams::Document,
|
|
156
173
|
expires_at: String,
|
|
157
174
|
from: String,
|
|
158
175
|
locale: String,
|
|
@@ -166,6 +183,39 @@ module PreludeSDK
|
|
|
166
183
|
def to_hash
|
|
167
184
|
end
|
|
168
185
|
|
|
186
|
+
class Document < PreludeSDK::Internal::Type::BaseModel
|
|
187
|
+
OrHash =
|
|
188
|
+
T.type_alias do
|
|
189
|
+
T.any(
|
|
190
|
+
PreludeSDK::TransactionalSendParams::Document,
|
|
191
|
+
PreludeSDK::Internal::AnyHash
|
|
192
|
+
)
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
# The filename to display for the document.
|
|
196
|
+
sig { returns(String) }
|
|
197
|
+
attr_accessor :filename
|
|
198
|
+
|
|
199
|
+
# The URL of the document to attach. Must be a valid HTTP or HTTPS URL.
|
|
200
|
+
sig { returns(String) }
|
|
201
|
+
attr_accessor :url
|
|
202
|
+
|
|
203
|
+
# A document to attach to the message. Only supported on WhatsApp templates that
|
|
204
|
+
# have a document header.
|
|
205
|
+
sig { params(filename: String, url: String).returns(T.attached_class) }
|
|
206
|
+
def self.new(
|
|
207
|
+
# The filename to display for the document.
|
|
208
|
+
filename:,
|
|
209
|
+
# The URL of the document to attach. Must be a valid HTTP or HTTPS URL.
|
|
210
|
+
url:
|
|
211
|
+
)
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
sig { override.returns({ filename: String, url: String }) }
|
|
215
|
+
def to_hash
|
|
216
|
+
end
|
|
217
|
+
end
|
|
218
|
+
|
|
169
219
|
# The preferred delivery channel for the message. When specified, the system will
|
|
170
220
|
# prioritize sending via the requested channel if the template is configured for
|
|
171
221
|
# it.
|
|
@@ -232,8 +232,8 @@ module PreludeSDK
|
|
|
232
232
|
)
|
|
233
233
|
end
|
|
234
234
|
|
|
235
|
-
# This allows
|
|
236
|
-
#
|
|
235
|
+
# This allows automatic OTP retrieval on mobile apps and web browsers. Supported
|
|
236
|
+
# platforms are Android (SMS Retriever API) and Web (WebOTP API).
|
|
237
237
|
sig do
|
|
238
238
|
returns(
|
|
239
239
|
T.nilable(PreludeSDK::VerificationCreateParams::Options::AppRealm)
|
|
@@ -275,24 +275,6 @@ module PreludeSDK
|
|
|
275
275
|
sig { params(custom_code: String).void }
|
|
276
276
|
attr_writer :custom_code
|
|
277
277
|
|
|
278
|
-
# The integration that triggered the verification.
|
|
279
|
-
sig do
|
|
280
|
-
returns(
|
|
281
|
-
T.nilable(
|
|
282
|
-
PreludeSDK::VerificationCreateParams::Options::Integration::OrSymbol
|
|
283
|
-
)
|
|
284
|
-
)
|
|
285
|
-
end
|
|
286
|
-
attr_reader :integration
|
|
287
|
-
|
|
288
|
-
sig do
|
|
289
|
-
params(
|
|
290
|
-
integration:
|
|
291
|
-
PreludeSDK::VerificationCreateParams::Options::Integration::OrSymbol
|
|
292
|
-
).void
|
|
293
|
-
end
|
|
294
|
-
attr_writer :integration
|
|
295
|
-
|
|
296
278
|
# A BCP-47 formatted locale string with the language the text message will be sent
|
|
297
279
|
# to. If there's no locale set, the language will be determined by the country
|
|
298
280
|
# code of the phone number. If the language specified doesn't exist, it defaults
|
|
@@ -376,8 +358,6 @@ module PreludeSDK
|
|
|
376
358
|
callback_url: String,
|
|
377
359
|
code_size: Integer,
|
|
378
360
|
custom_code: String,
|
|
379
|
-
integration:
|
|
380
|
-
PreludeSDK::VerificationCreateParams::Options::Integration::OrSymbol,
|
|
381
361
|
locale: String,
|
|
382
362
|
verification_method:
|
|
383
363
|
PreludeSDK::VerificationCreateParams::Options::Method::OrSymbol,
|
|
@@ -389,8 +369,8 @@ module PreludeSDK
|
|
|
389
369
|
).returns(T.attached_class)
|
|
390
370
|
end
|
|
391
371
|
def self.new(
|
|
392
|
-
# This allows
|
|
393
|
-
#
|
|
372
|
+
# This allows automatic OTP retrieval on mobile apps and web browsers. Supported
|
|
373
|
+
# platforms are Android (SMS Retriever API) and Web (WebOTP API).
|
|
394
374
|
app_realm: nil,
|
|
395
375
|
# The URL where webhooks will be sent when verification events occur, including
|
|
396
376
|
# verification creation, attempt creation, and delivery status changes. For more
|
|
@@ -403,8 +383,6 @@ module PreludeSDK
|
|
|
403
383
|
# contact us to enable it for your account. For more details, refer to
|
|
404
384
|
# [Custom Code](/verify/v2/documentation/custom-codes).
|
|
405
385
|
custom_code: nil,
|
|
406
|
-
# The integration that triggered the verification.
|
|
407
|
-
integration: nil,
|
|
408
386
|
# A BCP-47 formatted locale string with the language the text message will be sent
|
|
409
387
|
# to. If there's no locale set, the language will be determined by the country
|
|
410
388
|
# code of the phone number. If the language specified doesn't exist, it defaults
|
|
@@ -439,8 +417,6 @@ module PreludeSDK
|
|
|
439
417
|
callback_url: String,
|
|
440
418
|
code_size: Integer,
|
|
441
419
|
custom_code: String,
|
|
442
|
-
integration:
|
|
443
|
-
PreludeSDK::VerificationCreateParams::Options::Integration::OrSymbol,
|
|
444
420
|
locale: String,
|
|
445
421
|
verification_method:
|
|
446
422
|
PreludeSDK::VerificationCreateParams::Options::Method::OrSymbol,
|
|
@@ -464,8 +440,8 @@ module PreludeSDK
|
|
|
464
440
|
)
|
|
465
441
|
end
|
|
466
442
|
|
|
467
|
-
# The platform
|
|
468
|
-
# "
|
|
443
|
+
# The platform for automatic OTP retrieval. Use "android" for the SMS Retriever
|
|
444
|
+
# API or "web" for the WebOTP API.
|
|
469
445
|
sig do
|
|
470
446
|
returns(
|
|
471
447
|
PreludeSDK::VerificationCreateParams::Options::AppRealm::Platform::OrSymbol
|
|
@@ -473,14 +449,17 @@ module PreludeSDK
|
|
|
473
449
|
end
|
|
474
450
|
attr_accessor :platform
|
|
475
451
|
|
|
476
|
-
# The
|
|
477
|
-
#
|
|
478
|
-
#
|
|
452
|
+
# The value depends on the platform:
|
|
453
|
+
#
|
|
454
|
+
# - For Android: The SMS Retriever API hash code (11 characters). See
|
|
455
|
+
# [Google documentation](https://developers.google.com/identity/sms-retriever/verify#computing_your_apps_hash_string).
|
|
456
|
+
# - For Web: The origin domain (e.g., "example.com" or "www.example.com"). See
|
|
457
|
+
# [WebOTP API documentation](https://developer.mozilla.org/en-US/docs/Web/API/WebOTP_API).
|
|
479
458
|
sig { returns(String) }
|
|
480
459
|
attr_accessor :value
|
|
481
460
|
|
|
482
|
-
# This allows
|
|
483
|
-
#
|
|
461
|
+
# This allows automatic OTP retrieval on mobile apps and web browsers. Supported
|
|
462
|
+
# platforms are Android (SMS Retriever API) and Web (WebOTP API).
|
|
484
463
|
sig do
|
|
485
464
|
params(
|
|
486
465
|
platform:
|
|
@@ -489,12 +468,15 @@ module PreludeSDK
|
|
|
489
468
|
).returns(T.attached_class)
|
|
490
469
|
end
|
|
491
470
|
def self.new(
|
|
492
|
-
# The platform
|
|
493
|
-
# "
|
|
471
|
+
# The platform for automatic OTP retrieval. Use "android" for the SMS Retriever
|
|
472
|
+
# API or "web" for the WebOTP API.
|
|
494
473
|
platform:,
|
|
495
|
-
# The
|
|
496
|
-
#
|
|
497
|
-
#
|
|
474
|
+
# The value depends on the platform:
|
|
475
|
+
#
|
|
476
|
+
# - For Android: The SMS Retriever API hash code (11 characters). See
|
|
477
|
+
# [Google documentation](https://developers.google.com/identity/sms-retriever/verify#computing_your_apps_hash_string).
|
|
478
|
+
# - For Web: The origin domain (e.g., "example.com" or "www.example.com"). See
|
|
479
|
+
# [WebOTP API documentation](https://developer.mozilla.org/en-US/docs/Web/API/WebOTP_API).
|
|
498
480
|
value:
|
|
499
481
|
)
|
|
500
482
|
end
|
|
@@ -511,8 +493,8 @@ module PreludeSDK
|
|
|
511
493
|
def to_hash
|
|
512
494
|
end
|
|
513
495
|
|
|
514
|
-
# The platform
|
|
515
|
-
# "
|
|
496
|
+
# The platform for automatic OTP retrieval. Use "android" for the SMS Retriever
|
|
497
|
+
# API or "web" for the WebOTP API.
|
|
516
498
|
module Platform
|
|
517
499
|
extend PreludeSDK::Internal::Type::Enum
|
|
518
500
|
|
|
@@ -530,6 +512,11 @@ module PreludeSDK
|
|
|
530
512
|
:android,
|
|
531
513
|
PreludeSDK::VerificationCreateParams::Options::AppRealm::Platform::TaggedSymbol
|
|
532
514
|
)
|
|
515
|
+
WEB =
|
|
516
|
+
T.let(
|
|
517
|
+
:web,
|
|
518
|
+
PreludeSDK::VerificationCreateParams::Options::AppRealm::Platform::TaggedSymbol
|
|
519
|
+
)
|
|
533
520
|
|
|
534
521
|
sig do
|
|
535
522
|
override.returns(
|
|
@@ -543,41 +530,6 @@ module PreludeSDK
|
|
|
543
530
|
end
|
|
544
531
|
end
|
|
545
532
|
|
|
546
|
-
# The integration that triggered the verification.
|
|
547
|
-
module Integration
|
|
548
|
-
extend PreludeSDK::Internal::Type::Enum
|
|
549
|
-
|
|
550
|
-
TaggedSymbol =
|
|
551
|
-
T.type_alias do
|
|
552
|
-
T.all(
|
|
553
|
-
Symbol,
|
|
554
|
-
PreludeSDK::VerificationCreateParams::Options::Integration
|
|
555
|
-
)
|
|
556
|
-
end
|
|
557
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
558
|
-
|
|
559
|
-
AUTH0 =
|
|
560
|
-
T.let(
|
|
561
|
-
:auth0,
|
|
562
|
-
PreludeSDK::VerificationCreateParams::Options::Integration::TaggedSymbol
|
|
563
|
-
)
|
|
564
|
-
SUPABASE =
|
|
565
|
-
T.let(
|
|
566
|
-
:supabase,
|
|
567
|
-
PreludeSDK::VerificationCreateParams::Options::Integration::TaggedSymbol
|
|
568
|
-
)
|
|
569
|
-
|
|
570
|
-
sig do
|
|
571
|
-
override.returns(
|
|
572
|
-
T::Array[
|
|
573
|
-
PreludeSDK::VerificationCreateParams::Options::Integration::TaggedSymbol
|
|
574
|
-
]
|
|
575
|
-
)
|
|
576
|
-
end
|
|
577
|
-
def self.values
|
|
578
|
-
end
|
|
579
|
-
end
|
|
580
|
-
|
|
581
533
|
# The method used for verifying this phone number. The 'voice' option provides an
|
|
582
534
|
# accessible alternative for visually impaired users by delivering the
|
|
583
535
|
# verification code through a phone call rather than a text message. It also
|
|
@@ -696,8 +648,9 @@ module PreludeSDK
|
|
|
696
648
|
sig { params(app_version: String).void }
|
|
697
649
|
attr_writer :app_version
|
|
698
650
|
|
|
699
|
-
#
|
|
700
|
-
#
|
|
651
|
+
# A unique ID for the user's device. You should ensure that each user device has a
|
|
652
|
+
# unique `device_id` value. Ideally, for Android, this corresponds to the
|
|
653
|
+
# `ANDROID_ID` and for iOS, this corresponds to the `identifierForVendor`.
|
|
701
654
|
sig { returns(T.nilable(String)) }
|
|
702
655
|
attr_reader :device_id
|
|
703
656
|
|
|
@@ -729,15 +682,18 @@ module PreludeSDK
|
|
|
729
682
|
end
|
|
730
683
|
attr_writer :device_platform
|
|
731
684
|
|
|
732
|
-
# The IP address of the user's device.
|
|
685
|
+
# The public IP v4 or v6 address of the end-user's device. You should collect this
|
|
686
|
+
# from your backend. If your backend is behind a proxy, use the `X-Forwarded-For`,
|
|
687
|
+
# `Forwarded`, `True-Client-IP`, `CF-Connecting-IP` or an equivalent header to get
|
|
688
|
+
# the actual public IP of the end-user's device.
|
|
733
689
|
sig { returns(T.nilable(String)) }
|
|
734
690
|
attr_reader :ip
|
|
735
691
|
|
|
736
692
|
sig { params(ip: String).void }
|
|
737
693
|
attr_writer :ip
|
|
738
694
|
|
|
739
|
-
# This signal should
|
|
740
|
-
# genuine. Contact us to discuss your use case. For more details, refer to
|
|
695
|
+
# This signal should indicate a higher level of trust, explicitly stating that the
|
|
696
|
+
# user is genuine. Contact us to discuss your use case. For more details, refer to
|
|
741
697
|
# [Signals](/verify/v2/documentation/prevent-fraud#signals).
|
|
742
698
|
sig { returns(T.nilable(T::Boolean)) }
|
|
743
699
|
attr_reader :is_trusted_user
|
|
@@ -745,9 +701,9 @@ module PreludeSDK
|
|
|
745
701
|
sig { params(is_trusted_user: T::Boolean).void }
|
|
746
702
|
attr_writer :is_trusted_user
|
|
747
703
|
|
|
748
|
-
# The JA4 fingerprint observed for the connection. Prelude will infer
|
|
749
|
-
# automatically when
|
|
750
|
-
#
|
|
704
|
+
# The JA4 fingerprint observed for the end-user's connection. Prelude will infer
|
|
705
|
+
# it automatically when you use our Frontend SDKs (which use Prelude's edge
|
|
706
|
+
# network), but you can also forward the value if you terminate TLS yourself.
|
|
751
707
|
sig { returns(T.nilable(String)) }
|
|
752
708
|
attr_reader :ja4_fingerprint
|
|
753
709
|
|
|
@@ -789,22 +745,26 @@ module PreludeSDK
|
|
|
789
745
|
def self.new(
|
|
790
746
|
# The version of your application.
|
|
791
747
|
app_version: nil,
|
|
792
|
-
#
|
|
793
|
-
#
|
|
748
|
+
# A unique ID for the user's device. You should ensure that each user device has a
|
|
749
|
+
# unique `device_id` value. Ideally, for Android, this corresponds to the
|
|
750
|
+
# `ANDROID_ID` and for iOS, this corresponds to the `identifierForVendor`.
|
|
794
751
|
device_id: nil,
|
|
795
752
|
# The model of the user's device.
|
|
796
753
|
device_model: nil,
|
|
797
754
|
# The type of the user's device.
|
|
798
755
|
device_platform: nil,
|
|
799
|
-
# The IP address of the user's device.
|
|
756
|
+
# The public IP v4 or v6 address of the end-user's device. You should collect this
|
|
757
|
+
# from your backend. If your backend is behind a proxy, use the `X-Forwarded-For`,
|
|
758
|
+
# `Forwarded`, `True-Client-IP`, `CF-Connecting-IP` or an equivalent header to get
|
|
759
|
+
# the actual public IP of the end-user's device.
|
|
800
760
|
ip: nil,
|
|
801
|
-
# This signal should
|
|
802
|
-
# genuine. Contact us to discuss your use case. For more details, refer to
|
|
761
|
+
# This signal should indicate a higher level of trust, explicitly stating that the
|
|
762
|
+
# user is genuine. Contact us to discuss your use case. For more details, refer to
|
|
803
763
|
# [Signals](/verify/v2/documentation/prevent-fraud#signals).
|
|
804
764
|
is_trusted_user: nil,
|
|
805
|
-
# The JA4 fingerprint observed for the connection. Prelude will infer
|
|
806
|
-
# automatically when
|
|
807
|
-
#
|
|
765
|
+
# The JA4 fingerprint observed for the end-user's connection. Prelude will infer
|
|
766
|
+
# it automatically when you use our Frontend SDKs (which use Prelude's edge
|
|
767
|
+
# network), but you can also forward the value if you terminate TLS yourself.
|
|
808
768
|
ja4_fingerprint: nil,
|
|
809
769
|
# The version of the user's device operating system.
|
|
810
770
|
os_version: nil,
|
|
@@ -24,6 +24,13 @@ module PreludeSDK
|
|
|
24
24
|
attr_accessor :verification_method
|
|
25
25
|
|
|
26
26
|
# The status of the verification.
|
|
27
|
+
#
|
|
28
|
+
# - `success` - A new verification window was created.
|
|
29
|
+
# - `retry` - A new attempt was created for an existing verification window.
|
|
30
|
+
# - `challenged` - The verification is suspicious and is restricted to non-SMS and
|
|
31
|
+
# non-voice channels only. This mode must be enabled for your customer account
|
|
32
|
+
# by Prelude support.
|
|
33
|
+
# - `blocked` - The verification was blocked.
|
|
27
34
|
sig do
|
|
28
35
|
returns(
|
|
29
36
|
PreludeSDK::Models::VerificationCreateResponse::Status::TaggedSymbol
|
|
@@ -147,6 +154,13 @@ module PreludeSDK
|
|
|
147
154
|
# The method used for verifying this phone number.
|
|
148
155
|
verification_method:,
|
|
149
156
|
# The status of the verification.
|
|
157
|
+
#
|
|
158
|
+
# - `success` - A new verification window was created.
|
|
159
|
+
# - `retry` - A new attempt was created for an existing verification window.
|
|
160
|
+
# - `challenged` - The verification is suspicious and is restricted to non-SMS and
|
|
161
|
+
# non-voice channels only. This mode must be enabled for your customer account
|
|
162
|
+
# by Prelude support.
|
|
163
|
+
# - `blocked` - The verification was blocked.
|
|
150
164
|
status:,
|
|
151
165
|
# The ordered sequence of channels to be used for verification
|
|
152
166
|
channels: nil,
|
|
@@ -243,6 +257,13 @@ module PreludeSDK
|
|
|
243
257
|
end
|
|
244
258
|
|
|
245
259
|
# The status of the verification.
|
|
260
|
+
#
|
|
261
|
+
# - `success` - A new verification window was created.
|
|
262
|
+
# - `retry` - A new attempt was created for an existing verification window.
|
|
263
|
+
# - `challenged` - The verification is suspicious and is restricted to non-SMS and
|
|
264
|
+
# non-voice channels only. This mode must be enabled for your customer account
|
|
265
|
+
# by Prelude support.
|
|
266
|
+
# - `blocked` - The verification was blocked.
|
|
246
267
|
module Status
|
|
247
268
|
extend PreludeSDK::Internal::Type::Enum
|
|
248
269
|
|
|
@@ -265,6 +286,11 @@ module PreludeSDK
|
|
|
265
286
|
:retry,
|
|
266
287
|
PreludeSDK::Models::VerificationCreateResponse::Status::TaggedSymbol
|
|
267
288
|
)
|
|
289
|
+
CHALLENGED =
|
|
290
|
+
T.let(
|
|
291
|
+
:challenged,
|
|
292
|
+
PreludeSDK::Models::VerificationCreateResponse::Status::TaggedSymbol
|
|
293
|
+
)
|
|
268
294
|
BLOCKED =
|
|
269
295
|
T.let(
|
|
270
296
|
:blocked,
|
|
@@ -14,17 +14,27 @@ module PreludeSDK
|
|
|
14
14
|
)
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
+
sig do
|
|
18
|
+
returns(
|
|
19
|
+
PreludeSDK::VerificationManagementDeletePhoneNumberParams::Action::OrSymbol
|
|
20
|
+
)
|
|
21
|
+
end
|
|
22
|
+
attr_accessor :action
|
|
23
|
+
|
|
17
24
|
# An E.164 formatted phone number to remove from the list.
|
|
18
25
|
sig { returns(String) }
|
|
19
26
|
attr_accessor :phone_number
|
|
20
27
|
|
|
21
28
|
sig do
|
|
22
29
|
params(
|
|
30
|
+
action:
|
|
31
|
+
PreludeSDK::VerificationManagementDeletePhoneNumberParams::Action::OrSymbol,
|
|
23
32
|
phone_number: String,
|
|
24
33
|
request_options: PreludeSDK::RequestOptions::OrHash
|
|
25
34
|
).returns(T.attached_class)
|
|
26
35
|
end
|
|
27
36
|
def self.new(
|
|
37
|
+
action:,
|
|
28
38
|
# An E.164 formatted phone number to remove from the list.
|
|
29
39
|
phone_number:,
|
|
30
40
|
request_options: {}
|
|
@@ -33,7 +43,12 @@ module PreludeSDK
|
|
|
33
43
|
|
|
34
44
|
sig do
|
|
35
45
|
override.returns(
|
|
36
|
-
{
|
|
46
|
+
{
|
|
47
|
+
action:
|
|
48
|
+
PreludeSDK::VerificationManagementDeletePhoneNumberParams::Action::OrSymbol,
|
|
49
|
+
phone_number: String,
|
|
50
|
+
request_options: PreludeSDK::RequestOptions
|
|
51
|
+
}
|
|
37
52
|
)
|
|
38
53
|
end
|
|
39
54
|
def to_hash
|
|
@@ -15,14 +15,31 @@ module PreludeSDK
|
|
|
15
15
|
end
|
|
16
16
|
|
|
17
17
|
sig do
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
returns(
|
|
19
|
+
PreludeSDK::VerificationManagementListPhoneNumbersParams::Action::OrSymbol
|
|
20
20
|
)
|
|
21
21
|
end
|
|
22
|
-
|
|
22
|
+
attr_accessor :action
|
|
23
|
+
|
|
24
|
+
sig do
|
|
25
|
+
params(
|
|
26
|
+
action:
|
|
27
|
+
PreludeSDK::VerificationManagementListPhoneNumbersParams::Action::OrSymbol,
|
|
28
|
+
request_options: PreludeSDK::RequestOptions::OrHash
|
|
29
|
+
).returns(T.attached_class)
|
|
30
|
+
end
|
|
31
|
+
def self.new(action:, request_options: {})
|
|
23
32
|
end
|
|
24
33
|
|
|
25
|
-
sig
|
|
34
|
+
sig do
|
|
35
|
+
override.returns(
|
|
36
|
+
{
|
|
37
|
+
action:
|
|
38
|
+
PreludeSDK::VerificationManagementListPhoneNumbersParams::Action::OrSymbol,
|
|
39
|
+
request_options: PreludeSDK::RequestOptions
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
end
|
|
26
43
|
def to_hash
|
|
27
44
|
end
|
|
28
45
|
|
|
@@ -14,17 +14,27 @@ module PreludeSDK
|
|
|
14
14
|
)
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
+
sig do
|
|
18
|
+
returns(
|
|
19
|
+
PreludeSDK::VerificationManagementSetPhoneNumberParams::Action::OrSymbol
|
|
20
|
+
)
|
|
21
|
+
end
|
|
22
|
+
attr_accessor :action
|
|
23
|
+
|
|
17
24
|
# An E.164 formatted phone number to add to the list.
|
|
18
25
|
sig { returns(String) }
|
|
19
26
|
attr_accessor :phone_number
|
|
20
27
|
|
|
21
28
|
sig do
|
|
22
29
|
params(
|
|
30
|
+
action:
|
|
31
|
+
PreludeSDK::VerificationManagementSetPhoneNumberParams::Action::OrSymbol,
|
|
23
32
|
phone_number: String,
|
|
24
33
|
request_options: PreludeSDK::RequestOptions::OrHash
|
|
25
34
|
).returns(T.attached_class)
|
|
26
35
|
end
|
|
27
36
|
def self.new(
|
|
37
|
+
action:,
|
|
28
38
|
# An E.164 formatted phone number to add to the list.
|
|
29
39
|
phone_number:,
|
|
30
40
|
request_options: {}
|
|
@@ -33,7 +43,12 @@ module PreludeSDK
|
|
|
33
43
|
|
|
34
44
|
sig do
|
|
35
45
|
override.returns(
|
|
36
|
-
{
|
|
46
|
+
{
|
|
47
|
+
action:
|
|
48
|
+
PreludeSDK::VerificationManagementSetPhoneNumberParams::Action::OrSymbol,
|
|
49
|
+
phone_number: String,
|
|
50
|
+
request_options: PreludeSDK::RequestOptions
|
|
51
|
+
}
|
|
37
52
|
)
|
|
38
53
|
end
|
|
39
54
|
def to_hash
|