prelude-sdk 0.1.0.pre.alpha.2 → 0.1.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 +74 -0
- data/README.md +29 -1
- data/lib/prelude_sdk/client.rb +4 -0
- data/lib/prelude_sdk/errors.rb +25 -11
- data/lib/prelude_sdk/file_part.rb +10 -7
- data/lib/prelude_sdk/internal/transport/base_client.rb +29 -11
- data/lib/prelude_sdk/internal/transport/pooled_net_requester.rb +41 -42
- data/lib/prelude_sdk/internal/type/array_of.rb +1 -0
- data/lib/prelude_sdk/internal/type/base_model.rb +4 -9
- data/lib/prelude_sdk/internal/type/base_page.rb +1 -1
- data/lib/prelude_sdk/internal/type/converter.rb +27 -0
- data/lib/prelude_sdk/internal/type/file_input.rb +7 -4
- data/lib/prelude_sdk/internal/type/hash_of.rb +1 -0
- data/lib/prelude_sdk/internal/type/union.rb +9 -7
- data/lib/prelude_sdk/internal/util.rb +9 -8
- data/lib/prelude_sdk/models/transactional_send_params.rb +41 -3
- data/lib/prelude_sdk/models/transactional_send_response.rb +7 -2
- data/lib/prelude_sdk/models/verification_check_response.rb +6 -1
- data/lib/prelude_sdk/models/verification_create_params.rb +57 -20
- data/lib/prelude_sdk/models/verification_create_response.rb +65 -12
- data/lib/prelude_sdk/models/verification_management_delete_phone_number_params.rb +32 -0
- data/lib/prelude_sdk/models/verification_management_delete_phone_number_response.rb +17 -0
- data/lib/prelude_sdk/models/verification_management_list_phone_numbers_params.rb +24 -0
- data/lib/prelude_sdk/models/verification_management_list_phone_numbers_response.rb +37 -0
- data/lib/prelude_sdk/models/verification_management_list_sender_ids_params.rb +14 -0
- data/lib/prelude_sdk/models/verification_management_list_sender_ids_response.rb +65 -0
- data/lib/prelude_sdk/models/verification_management_set_phone_number_params.rb +32 -0
- data/lib/prelude_sdk/models/verification_management_set_phone_number_response.rb +17 -0
- data/lib/prelude_sdk/models/verification_management_submit_sender_id_params.rb +22 -0
- data/lib/prelude_sdk/models/verification_management_submit_sender_id_response.rb +59 -0
- data/lib/prelude_sdk/models/watch_predict_params.rb +17 -3
- data/lib/prelude_sdk/models/watch_send_feedbacks_params.rb +18 -3
- data/lib/prelude_sdk/models.rb +14 -0
- data/lib/prelude_sdk/resources/transactional.rb +8 -3
- data/lib/prelude_sdk/resources/verification_management.rb +140 -0
- data/lib/prelude_sdk/version.rb +1 -1
- data/lib/prelude_sdk.rb +12 -0
- data/manifest.yaml +1 -0
- data/rbi/prelude_sdk/client.rbi +3 -0
- data/rbi/prelude_sdk/errors.rbi +31 -4
- data/rbi/prelude_sdk/file_part.rbi +1 -1
- data/rbi/prelude_sdk/internal/transport/base_client.rbi +10 -6
- data/rbi/prelude_sdk/internal/transport/pooled_net_requester.rbi +6 -2
- data/rbi/prelude_sdk/internal/type/base_model.rbi +8 -4
- data/rbi/prelude_sdk/internal/type/base_page.rbi +1 -1
- data/rbi/prelude_sdk/internal/type/converter.rbi +54 -0
- data/rbi/prelude_sdk/internal/type/union.rbi +9 -2
- data/rbi/prelude_sdk/internal/util.rbi +1 -1
- data/rbi/prelude_sdk/models/transactional_send_params.rbi +91 -2
- data/rbi/prelude_sdk/models/transactional_send_response.rbi +6 -2
- data/rbi/prelude_sdk/models/verification_check_response.rbi +7 -1
- data/rbi/prelude_sdk/models/verification_create_params.rbi +107 -23
- data/rbi/prelude_sdk/models/verification_create_response.rbi +160 -15
- data/rbi/prelude_sdk/models/verification_management_delete_phone_number_params.rbi +77 -0
- data/rbi/prelude_sdk/models/verification_management_delete_phone_number_response.rbi +30 -0
- data/rbi/prelude_sdk/models/verification_management_list_phone_numbers_params.rbi +64 -0
- data/rbi/prelude_sdk/models/verification_management_list_phone_numbers_response.rbi +87 -0
- data/rbi/prelude_sdk/models/verification_management_list_sender_ids_params.rbi +30 -0
- data/rbi/prelude_sdk/models/verification_management_list_sender_ids_response.rbi +175 -0
- data/rbi/prelude_sdk/models/verification_management_set_phone_number_params.rbi +77 -0
- data/rbi/prelude_sdk/models/verification_management_set_phone_number_response.rbi +30 -0
- data/rbi/prelude_sdk/models/verification_management_submit_sender_id_params.rbi +43 -0
- data/rbi/prelude_sdk/models/verification_management_submit_sender_id_response.rbi +117 -0
- data/rbi/prelude_sdk/models/watch_predict_params.rbi +19 -2
- data/rbi/prelude_sdk/models/watch_send_feedbacks_params.rbi +19 -2
- data/rbi/prelude_sdk/models.rbi +15 -0
- data/rbi/prelude_sdk/resources/transactional.rbi +17 -2
- data/rbi/prelude_sdk/resources/verification_management.rbi +112 -0
- data/sig/prelude_sdk/client.rbs +2 -0
- data/sig/prelude_sdk/errors.rbs +7 -0
- data/sig/prelude_sdk/file_part.rbs +1 -1
- data/sig/prelude_sdk/internal/transport/base_client.rbs +3 -1
- data/sig/prelude_sdk/internal/transport/pooled_net_requester.rbs +4 -1
- data/sig/prelude_sdk/internal/type/converter.rbs +17 -0
- data/sig/prelude_sdk/internal/type/union.rbs +2 -2
- data/sig/prelude_sdk/models/transactional_send_params.rbs +21 -0
- data/sig/prelude_sdk/models/verification_create_params.rbs +35 -16
- data/sig/prelude_sdk/models/verification_create_response.rbs +41 -16
- data/sig/prelude_sdk/models/verification_management_delete_phone_number_params.rbs +34 -0
- data/sig/prelude_sdk/models/verification_management_delete_phone_number_response.rbs +14 -0
- data/sig/prelude_sdk/models/verification_management_list_phone_numbers_params.rbs +26 -0
- data/sig/prelude_sdk/models/verification_management_list_phone_numbers_response.rbs +32 -0
- data/sig/prelude_sdk/models/verification_management_list_sender_ids_params.rbs +15 -0
- data/sig/prelude_sdk/models/verification_management_list_sender_ids_response.rbs +64 -0
- data/sig/prelude_sdk/models/verification_management_set_phone_number_params.rbs +34 -0
- data/sig/prelude_sdk/models/verification_management_set_phone_number_response.rbs +14 -0
- data/sig/prelude_sdk/models/verification_management_submit_sender_id_params.rbs +23 -0
- data/sig/prelude_sdk/models/verification_management_submit_sender_id_response.rbs +44 -0
- data/sig/prelude_sdk/models/watch_predict_params.rbs +7 -0
- data/sig/prelude_sdk/models/watch_send_feedbacks_params.rbs +7 -0
- data/sig/prelude_sdk/models.rbs +10 -0
- data/sig/prelude_sdk/resources/transactional.rbs +1 -0
- data/sig/prelude_sdk/resources/verification_management.rbs +33 -0
- metadata +37 -4
|
@@ -200,7 +200,8 @@ module PreludeSDK
|
|
|
200
200
|
)
|
|
201
201
|
end
|
|
202
202
|
|
|
203
|
-
# A user-defined identifier to correlate this verification with.
|
|
203
|
+
# A user-defined identifier to correlate this verification with. It is returned in
|
|
204
|
+
# the response and any webhook events that refer to this verification.
|
|
204
205
|
sig { returns(T.nilable(String)) }
|
|
205
206
|
attr_reader :correlation_id
|
|
206
207
|
|
|
@@ -211,7 +212,8 @@ module PreludeSDK
|
|
|
211
212
|
# response or webhook sent that refers to this verification.
|
|
212
213
|
sig { params(correlation_id: String).returns(T.attached_class) }
|
|
213
214
|
def self.new(
|
|
214
|
-
# A user-defined identifier to correlate this verification with.
|
|
215
|
+
# A user-defined identifier to correlate this verification with. It is returned in
|
|
216
|
+
# the response and any webhook events that refer to this verification.
|
|
215
217
|
correlation_id: nil
|
|
216
218
|
)
|
|
217
219
|
end
|
|
@@ -273,6 +275,24 @@ module PreludeSDK
|
|
|
273
275
|
sig { params(custom_code: String).void }
|
|
274
276
|
attr_writer :custom_code
|
|
275
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
|
+
|
|
276
296
|
# A BCP-47 formatted locale string with the language the text message will be sent
|
|
277
297
|
# to. If there's no locale set, the language will be determined by the country
|
|
278
298
|
# code of the phone number. If the language specified doesn't exist, it defaults
|
|
@@ -286,7 +306,10 @@ module PreludeSDK
|
|
|
286
306
|
# The method used for verifying this phone number. The 'voice' option provides an
|
|
287
307
|
# accessible alternative for visually impaired users by delivering the
|
|
288
308
|
# verification code through a phone call rather than a text message. It also
|
|
289
|
-
# allows verification of landline numbers that cannot receive SMS messages.
|
|
309
|
+
# allows verification of landline numbers that cannot receive SMS messages. The
|
|
310
|
+
# 'message' option explicitly requests message delivery (SMS, WhatsApp ...) and
|
|
311
|
+
# skips silent verification, useful for scenarios requiring direct user
|
|
312
|
+
# interaction.
|
|
290
313
|
sig do
|
|
291
314
|
returns(
|
|
292
315
|
T.nilable(
|
|
@@ -294,15 +317,15 @@ module PreludeSDK
|
|
|
294
317
|
)
|
|
295
318
|
)
|
|
296
319
|
end
|
|
297
|
-
attr_reader :
|
|
320
|
+
attr_reader :verification_method
|
|
298
321
|
|
|
299
322
|
sig do
|
|
300
323
|
params(
|
|
301
|
-
|
|
324
|
+
verification_method:
|
|
302
325
|
PreludeSDK::VerificationCreateParams::Options::Method::OrSymbol
|
|
303
326
|
).void
|
|
304
327
|
end
|
|
305
|
-
attr_writer :
|
|
328
|
+
attr_writer :verification_method
|
|
306
329
|
|
|
307
330
|
# The preferred channel to be used in priority for verification.
|
|
308
331
|
sig do
|
|
@@ -353,8 +376,10 @@ module PreludeSDK
|
|
|
353
376
|
callback_url: String,
|
|
354
377
|
code_size: Integer,
|
|
355
378
|
custom_code: String,
|
|
379
|
+
integration:
|
|
380
|
+
PreludeSDK::VerificationCreateParams::Options::Integration::OrSymbol,
|
|
356
381
|
locale: String,
|
|
357
|
-
|
|
382
|
+
verification_method:
|
|
358
383
|
PreludeSDK::VerificationCreateParams::Options::Method::OrSymbol,
|
|
359
384
|
preferred_channel:
|
|
360
385
|
PreludeSDK::VerificationCreateParams::Options::PreferredChannel::OrSymbol,
|
|
@@ -378,6 +403,8 @@ module PreludeSDK
|
|
|
378
403
|
# contact us to enable it for your account. For more details, refer to
|
|
379
404
|
# [Custom Code](/verify/v2/documentation/custom-codes).
|
|
380
405
|
custom_code: nil,
|
|
406
|
+
# The integration that triggered the verification.
|
|
407
|
+
integration: nil,
|
|
381
408
|
# A BCP-47 formatted locale string with the language the text message will be sent
|
|
382
409
|
# to. If there's no locale set, the language will be determined by the country
|
|
383
410
|
# code of the phone number. If the language specified doesn't exist, it defaults
|
|
@@ -386,8 +413,11 @@ module PreludeSDK
|
|
|
386
413
|
# The method used for verifying this phone number. The 'voice' option provides an
|
|
387
414
|
# accessible alternative for visually impaired users by delivering the
|
|
388
415
|
# verification code through a phone call rather than a text message. It also
|
|
389
|
-
# allows verification of landline numbers that cannot receive SMS messages.
|
|
390
|
-
|
|
416
|
+
# allows verification of landline numbers that cannot receive SMS messages. The
|
|
417
|
+
# 'message' option explicitly requests message delivery (SMS, WhatsApp ...) and
|
|
418
|
+
# skips silent verification, useful for scenarios requiring direct user
|
|
419
|
+
# interaction.
|
|
420
|
+
verification_method: nil,
|
|
391
421
|
# The preferred channel to be used in priority for verification.
|
|
392
422
|
preferred_channel: nil,
|
|
393
423
|
# The Sender ID to use for this message. The Sender ID needs to be enabled by
|
|
@@ -409,8 +439,10 @@ module PreludeSDK
|
|
|
409
439
|
callback_url: String,
|
|
410
440
|
code_size: Integer,
|
|
411
441
|
custom_code: String,
|
|
442
|
+
integration:
|
|
443
|
+
PreludeSDK::VerificationCreateParams::Options::Integration::OrSymbol,
|
|
412
444
|
locale: String,
|
|
413
|
-
|
|
445
|
+
verification_method:
|
|
414
446
|
PreludeSDK::VerificationCreateParams::Options::Method::OrSymbol,
|
|
415
447
|
preferred_channel:
|
|
416
448
|
PreludeSDK::VerificationCreateParams::Options::PreferredChannel::OrSymbol,
|
|
@@ -441,7 +473,9 @@ module PreludeSDK
|
|
|
441
473
|
end
|
|
442
474
|
attr_accessor :platform
|
|
443
475
|
|
|
444
|
-
# The Android SMS Retriever API hash code that identifies your app.
|
|
476
|
+
# The Android SMS Retriever API hash code that identifies your app. For more
|
|
477
|
+
# information, see
|
|
478
|
+
# [Google documentation](https://developers.google.com/identity/sms-retriever/verify#computing_your_apps_hash_string).
|
|
445
479
|
sig { returns(String) }
|
|
446
480
|
attr_accessor :value
|
|
447
481
|
|
|
@@ -458,7 +492,9 @@ module PreludeSDK
|
|
|
458
492
|
# The platform the SMS will be sent to. We are currently only supporting
|
|
459
493
|
# "android".
|
|
460
494
|
platform:,
|
|
461
|
-
# The Android SMS Retriever API hash code that identifies your app.
|
|
495
|
+
# The Android SMS Retriever API hash code that identifies your app. For more
|
|
496
|
+
# information, see
|
|
497
|
+
# [Google documentation](https://developers.google.com/identity/sms-retriever/verify#computing_your_apps_hash_string).
|
|
462
498
|
value:
|
|
463
499
|
)
|
|
464
500
|
end
|
|
@@ -507,10 +543,48 @@ module PreludeSDK
|
|
|
507
543
|
end
|
|
508
544
|
end
|
|
509
545
|
|
|
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
|
+
|
|
510
581
|
# The method used for verifying this phone number. The 'voice' option provides an
|
|
511
582
|
# accessible alternative for visually impaired users by delivering the
|
|
512
583
|
# verification code through a phone call rather than a text message. It also
|
|
513
|
-
# allows verification of landline numbers that cannot receive SMS messages.
|
|
584
|
+
# allows verification of landline numbers that cannot receive SMS messages. The
|
|
585
|
+
# 'message' option explicitly requests message delivery (SMS, WhatsApp ...) and
|
|
586
|
+
# skips silent verification, useful for scenarios requiring direct user
|
|
587
|
+
# interaction.
|
|
514
588
|
module Method
|
|
515
589
|
extend PreludeSDK::Internal::Type::Enum
|
|
516
590
|
|
|
@@ -533,6 +607,11 @@ module PreludeSDK
|
|
|
533
607
|
:voice,
|
|
534
608
|
PreludeSDK::VerificationCreateParams::Options::Method::TaggedSymbol
|
|
535
609
|
)
|
|
610
|
+
MESSAGE =
|
|
611
|
+
T.let(
|
|
612
|
+
:message,
|
|
613
|
+
PreludeSDK::VerificationCreateParams::Options::Method::TaggedSymbol
|
|
614
|
+
)
|
|
536
615
|
|
|
537
616
|
sig do
|
|
538
617
|
override.returns(
|
|
@@ -588,16 +667,6 @@ module PreludeSDK
|
|
|
588
667
|
:telegram,
|
|
589
668
|
PreludeSDK::VerificationCreateParams::Options::PreferredChannel::TaggedSymbol
|
|
590
669
|
)
|
|
591
|
-
SILENT =
|
|
592
|
-
T.let(
|
|
593
|
-
:silent,
|
|
594
|
-
PreludeSDK::VerificationCreateParams::Options::PreferredChannel::TaggedSymbol
|
|
595
|
-
)
|
|
596
|
-
VOICE =
|
|
597
|
-
T.let(
|
|
598
|
-
:voice,
|
|
599
|
-
PreludeSDK::VerificationCreateParams::Options::PreferredChannel::TaggedSymbol
|
|
600
|
-
)
|
|
601
670
|
|
|
602
671
|
sig do
|
|
603
672
|
override.returns(
|
|
@@ -676,6 +745,15 @@ module PreludeSDK
|
|
|
676
745
|
sig { params(is_trusted_user: T::Boolean).void }
|
|
677
746
|
attr_writer :is_trusted_user
|
|
678
747
|
|
|
748
|
+
# The JA4 fingerprint observed for the connection. Prelude will infer it
|
|
749
|
+
# automatically when requests go through our client SDK (which uses Prelude's
|
|
750
|
+
# edge), but you can also provide it explicitly if you terminate TLS yourself.
|
|
751
|
+
sig { returns(T.nilable(String)) }
|
|
752
|
+
attr_reader :ja4_fingerprint
|
|
753
|
+
|
|
754
|
+
sig { params(ja4_fingerprint: String).void }
|
|
755
|
+
attr_writer :ja4_fingerprint
|
|
756
|
+
|
|
679
757
|
# The version of the user's device operating system.
|
|
680
758
|
sig { returns(T.nilable(String)) }
|
|
681
759
|
attr_reader :os_version
|
|
@@ -703,6 +781,7 @@ module PreludeSDK
|
|
|
703
781
|
PreludeSDK::VerificationCreateParams::Signals::DevicePlatform::OrSymbol,
|
|
704
782
|
ip: String,
|
|
705
783
|
is_trusted_user: T::Boolean,
|
|
784
|
+
ja4_fingerprint: String,
|
|
706
785
|
os_version: String,
|
|
707
786
|
user_agent: String
|
|
708
787
|
).returns(T.attached_class)
|
|
@@ -723,6 +802,10 @@ module PreludeSDK
|
|
|
723
802
|
# genuine. Contact us to discuss your use case. For more details, refer to
|
|
724
803
|
# [Signals](/verify/v2/documentation/prevent-fraud#signals).
|
|
725
804
|
is_trusted_user: nil,
|
|
805
|
+
# The JA4 fingerprint observed for the connection. Prelude will infer it
|
|
806
|
+
# automatically when requests go through our client SDK (which uses Prelude's
|
|
807
|
+
# edge), but you can also provide it explicitly if you terminate TLS yourself.
|
|
808
|
+
ja4_fingerprint: nil,
|
|
726
809
|
# The version of the user's device operating system.
|
|
727
810
|
os_version: nil,
|
|
728
811
|
# The user agent of the user's device. If the individual fields (os_version,
|
|
@@ -742,6 +825,7 @@ module PreludeSDK
|
|
|
742
825
|
PreludeSDK::VerificationCreateParams::Signals::DevicePlatform::OrSymbol,
|
|
743
826
|
ip: String,
|
|
744
827
|
is_trusted_user: T::Boolean,
|
|
828
|
+
ja4_fingerprint: String,
|
|
745
829
|
os_version: String,
|
|
746
830
|
user_agent: String
|
|
747
831
|
}
|
|
@@ -21,7 +21,7 @@ module PreludeSDK
|
|
|
21
21
|
PreludeSDK::Models::VerificationCreateResponse::Method::TaggedSymbol
|
|
22
22
|
)
|
|
23
23
|
end
|
|
24
|
-
attr_accessor :
|
|
24
|
+
attr_accessor :verification_method
|
|
25
25
|
|
|
26
26
|
# The status of the verification.
|
|
27
27
|
sig do
|
|
@@ -32,10 +32,25 @@ module PreludeSDK
|
|
|
32
32
|
attr_accessor :status
|
|
33
33
|
|
|
34
34
|
# The ordered sequence of channels to be used for verification
|
|
35
|
-
sig
|
|
35
|
+
sig do
|
|
36
|
+
returns(
|
|
37
|
+
T.nilable(
|
|
38
|
+
T::Array[
|
|
39
|
+
PreludeSDK::Models::VerificationCreateResponse::Channel::TaggedSymbol
|
|
40
|
+
]
|
|
41
|
+
)
|
|
42
|
+
)
|
|
43
|
+
end
|
|
36
44
|
attr_reader :channels
|
|
37
45
|
|
|
38
|
-
sig
|
|
46
|
+
sig do
|
|
47
|
+
params(
|
|
48
|
+
channels:
|
|
49
|
+
T::Array[
|
|
50
|
+
PreludeSDK::Models::VerificationCreateResponse::Channel::OrSymbol
|
|
51
|
+
]
|
|
52
|
+
).void
|
|
53
|
+
end
|
|
39
54
|
attr_writer :channels
|
|
40
55
|
|
|
41
56
|
# The metadata for this verification.
|
|
@@ -56,6 +71,19 @@ module PreludeSDK
|
|
|
56
71
|
|
|
57
72
|
# The reason why the verification was blocked. Only present when status is
|
|
58
73
|
# "blocked".
|
|
74
|
+
#
|
|
75
|
+
# - `expired_signature` - The signature of the SDK signals is expired. They should
|
|
76
|
+
# be sent within the hour following their collection.
|
|
77
|
+
# - `in_block_list` - The phone number is part of the configured block list.
|
|
78
|
+
# - `invalid_phone_line` - The phone number is not a valid line number (e.g.
|
|
79
|
+
# landline).
|
|
80
|
+
# - `invalid_phone_number` - The phone number is not a valid phone number (e.g.
|
|
81
|
+
# unallocated range).
|
|
82
|
+
# - `invalid_signature` - The signature of the SDK signals is invalid.
|
|
83
|
+
# - `repeated_attempts` - The phone number has made too many verification
|
|
84
|
+
# attempts.
|
|
85
|
+
# - `suspicious` - The verification attempt was deemed suspicious by the
|
|
86
|
+
# anti-fraud system.
|
|
59
87
|
sig do
|
|
60
88
|
returns(
|
|
61
89
|
T.nilable(
|
|
@@ -97,11 +125,14 @@ module PreludeSDK
|
|
|
97
125
|
sig do
|
|
98
126
|
params(
|
|
99
127
|
id: String,
|
|
100
|
-
|
|
128
|
+
verification_method:
|
|
101
129
|
PreludeSDK::Models::VerificationCreateResponse::Method::OrSymbol,
|
|
102
130
|
status:
|
|
103
131
|
PreludeSDK::Models::VerificationCreateResponse::Status::OrSymbol,
|
|
104
|
-
channels:
|
|
132
|
+
channels:
|
|
133
|
+
T::Array[
|
|
134
|
+
PreludeSDK::Models::VerificationCreateResponse::Channel::OrSymbol
|
|
135
|
+
],
|
|
105
136
|
metadata:
|
|
106
137
|
PreludeSDK::Models::VerificationCreateResponse::Metadata::OrHash,
|
|
107
138
|
reason:
|
|
@@ -114,7 +145,7 @@ module PreludeSDK
|
|
|
114
145
|
# The verification identifier.
|
|
115
146
|
id:,
|
|
116
147
|
# The method used for verifying this phone number.
|
|
117
|
-
|
|
148
|
+
verification_method:,
|
|
118
149
|
# The status of the verification.
|
|
119
150
|
status:,
|
|
120
151
|
# The ordered sequence of channels to be used for verification
|
|
@@ -123,6 +154,19 @@ module PreludeSDK
|
|
|
123
154
|
metadata: nil,
|
|
124
155
|
# The reason why the verification was blocked. Only present when status is
|
|
125
156
|
# "blocked".
|
|
157
|
+
#
|
|
158
|
+
# - `expired_signature` - The signature of the SDK signals is expired. They should
|
|
159
|
+
# be sent within the hour following their collection.
|
|
160
|
+
# - `in_block_list` - The phone number is part of the configured block list.
|
|
161
|
+
# - `invalid_phone_line` - The phone number is not a valid line number (e.g.
|
|
162
|
+
# landline).
|
|
163
|
+
# - `invalid_phone_number` - The phone number is not a valid phone number (e.g.
|
|
164
|
+
# unallocated range).
|
|
165
|
+
# - `invalid_signature` - The signature of the SDK signals is invalid.
|
|
166
|
+
# - `repeated_attempts` - The phone number has made too many verification
|
|
167
|
+
# attempts.
|
|
168
|
+
# - `suspicious` - The verification attempt was deemed suspicious by the
|
|
169
|
+
# anti-fraud system.
|
|
126
170
|
reason: nil,
|
|
127
171
|
request_id: nil,
|
|
128
172
|
# The silent verification specific properties.
|
|
@@ -134,11 +178,14 @@ module PreludeSDK
|
|
|
134
178
|
override.returns(
|
|
135
179
|
{
|
|
136
180
|
id: String,
|
|
137
|
-
|
|
181
|
+
verification_method:
|
|
138
182
|
PreludeSDK::Models::VerificationCreateResponse::Method::TaggedSymbol,
|
|
139
183
|
status:
|
|
140
184
|
PreludeSDK::Models::VerificationCreateResponse::Status::TaggedSymbol,
|
|
141
|
-
channels:
|
|
185
|
+
channels:
|
|
186
|
+
T::Array[
|
|
187
|
+
PreludeSDK::Models::VerificationCreateResponse::Channel::TaggedSymbol
|
|
188
|
+
],
|
|
142
189
|
metadata: PreludeSDK::Models::VerificationCreateResponse::Metadata,
|
|
143
190
|
reason:
|
|
144
191
|
PreludeSDK::Models::VerificationCreateResponse::Reason::TaggedSymbol,
|
|
@@ -163,6 +210,11 @@ module PreludeSDK
|
|
|
163
210
|
end
|
|
164
211
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
165
212
|
|
|
213
|
+
EMAIL =
|
|
214
|
+
T.let(
|
|
215
|
+
:email,
|
|
216
|
+
PreludeSDK::Models::VerificationCreateResponse::Method::TaggedSymbol
|
|
217
|
+
)
|
|
166
218
|
MESSAGE =
|
|
167
219
|
T.let(
|
|
168
220
|
:message,
|
|
@@ -230,6 +282,70 @@ module PreludeSDK
|
|
|
230
282
|
end
|
|
231
283
|
end
|
|
232
284
|
|
|
285
|
+
module Channel
|
|
286
|
+
extend PreludeSDK::Internal::Type::Enum
|
|
287
|
+
|
|
288
|
+
TaggedSymbol =
|
|
289
|
+
T.type_alias do
|
|
290
|
+
T.all(
|
|
291
|
+
Symbol,
|
|
292
|
+
PreludeSDK::Models::VerificationCreateResponse::Channel
|
|
293
|
+
)
|
|
294
|
+
end
|
|
295
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
296
|
+
|
|
297
|
+
RCS =
|
|
298
|
+
T.let(
|
|
299
|
+
:rcs,
|
|
300
|
+
PreludeSDK::Models::VerificationCreateResponse::Channel::TaggedSymbol
|
|
301
|
+
)
|
|
302
|
+
SILENT =
|
|
303
|
+
T.let(
|
|
304
|
+
:silent,
|
|
305
|
+
PreludeSDK::Models::VerificationCreateResponse::Channel::TaggedSymbol
|
|
306
|
+
)
|
|
307
|
+
SMS =
|
|
308
|
+
T.let(
|
|
309
|
+
:sms,
|
|
310
|
+
PreludeSDK::Models::VerificationCreateResponse::Channel::TaggedSymbol
|
|
311
|
+
)
|
|
312
|
+
TELEGRAM =
|
|
313
|
+
T.let(
|
|
314
|
+
:telegram,
|
|
315
|
+
PreludeSDK::Models::VerificationCreateResponse::Channel::TaggedSymbol
|
|
316
|
+
)
|
|
317
|
+
VIBER =
|
|
318
|
+
T.let(
|
|
319
|
+
:viber,
|
|
320
|
+
PreludeSDK::Models::VerificationCreateResponse::Channel::TaggedSymbol
|
|
321
|
+
)
|
|
322
|
+
VOICE =
|
|
323
|
+
T.let(
|
|
324
|
+
:voice,
|
|
325
|
+
PreludeSDK::Models::VerificationCreateResponse::Channel::TaggedSymbol
|
|
326
|
+
)
|
|
327
|
+
WHATSAPP =
|
|
328
|
+
T.let(
|
|
329
|
+
:whatsapp,
|
|
330
|
+
PreludeSDK::Models::VerificationCreateResponse::Channel::TaggedSymbol
|
|
331
|
+
)
|
|
332
|
+
ZALO =
|
|
333
|
+
T.let(
|
|
334
|
+
:zalo,
|
|
335
|
+
PreludeSDK::Models::VerificationCreateResponse::Channel::TaggedSymbol
|
|
336
|
+
)
|
|
337
|
+
|
|
338
|
+
sig do
|
|
339
|
+
override.returns(
|
|
340
|
+
T::Array[
|
|
341
|
+
PreludeSDK::Models::VerificationCreateResponse::Channel::TaggedSymbol
|
|
342
|
+
]
|
|
343
|
+
)
|
|
344
|
+
end
|
|
345
|
+
def self.values
|
|
346
|
+
end
|
|
347
|
+
end
|
|
348
|
+
|
|
233
349
|
class Metadata < PreludeSDK::Internal::Type::BaseModel
|
|
234
350
|
OrHash =
|
|
235
351
|
T.type_alias do
|
|
@@ -239,6 +355,8 @@ module PreludeSDK
|
|
|
239
355
|
)
|
|
240
356
|
end
|
|
241
357
|
|
|
358
|
+
# A user-defined identifier to correlate this verification with. It is returned in
|
|
359
|
+
# the response and any webhook events that refer to this verification.
|
|
242
360
|
sig { returns(T.nilable(String)) }
|
|
243
361
|
attr_reader :correlation_id
|
|
244
362
|
|
|
@@ -247,7 +365,11 @@ module PreludeSDK
|
|
|
247
365
|
|
|
248
366
|
# The metadata for this verification.
|
|
249
367
|
sig { params(correlation_id: String).returns(T.attached_class) }
|
|
250
|
-
def self.new(
|
|
368
|
+
def self.new(
|
|
369
|
+
# A user-defined identifier to correlate this verification with. It is returned in
|
|
370
|
+
# the response and any webhook events that refer to this verification.
|
|
371
|
+
correlation_id: nil
|
|
372
|
+
)
|
|
251
373
|
end
|
|
252
374
|
|
|
253
375
|
sig { override.returns({ correlation_id: String }) }
|
|
@@ -257,6 +379,19 @@ module PreludeSDK
|
|
|
257
379
|
|
|
258
380
|
# The reason why the verification was blocked. Only present when status is
|
|
259
381
|
# "blocked".
|
|
382
|
+
#
|
|
383
|
+
# - `expired_signature` - The signature of the SDK signals is expired. They should
|
|
384
|
+
# be sent within the hour following their collection.
|
|
385
|
+
# - `in_block_list` - The phone number is part of the configured block list.
|
|
386
|
+
# - `invalid_phone_line` - The phone number is not a valid line number (e.g.
|
|
387
|
+
# landline).
|
|
388
|
+
# - `invalid_phone_number` - The phone number is not a valid phone number (e.g.
|
|
389
|
+
# unallocated range).
|
|
390
|
+
# - `invalid_signature` - The signature of the SDK signals is invalid.
|
|
391
|
+
# - `repeated_attempts` - The phone number has made too many verification
|
|
392
|
+
# attempts.
|
|
393
|
+
# - `suspicious` - The verification attempt was deemed suspicious by the
|
|
394
|
+
# anti-fraud system.
|
|
260
395
|
module Reason
|
|
261
396
|
extend PreludeSDK::Internal::Type::Enum
|
|
262
397
|
|
|
@@ -269,14 +404,14 @@ module PreludeSDK
|
|
|
269
404
|
end
|
|
270
405
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
271
406
|
|
|
272
|
-
|
|
407
|
+
EXPIRED_SIGNATURE =
|
|
273
408
|
T.let(
|
|
274
|
-
:
|
|
409
|
+
:expired_signature,
|
|
275
410
|
PreludeSDK::Models::VerificationCreateResponse::Reason::TaggedSymbol
|
|
276
411
|
)
|
|
277
|
-
|
|
412
|
+
IN_BLOCK_LIST =
|
|
278
413
|
T.let(
|
|
279
|
-
:
|
|
414
|
+
:in_block_list,
|
|
280
415
|
PreludeSDK::Models::VerificationCreateResponse::Reason::TaggedSymbol
|
|
281
416
|
)
|
|
282
417
|
INVALID_PHONE_LINE =
|
|
@@ -289,9 +424,19 @@ module PreludeSDK
|
|
|
289
424
|
:invalid_phone_number,
|
|
290
425
|
PreludeSDK::Models::VerificationCreateResponse::Reason::TaggedSymbol
|
|
291
426
|
)
|
|
292
|
-
|
|
427
|
+
INVALID_SIGNATURE =
|
|
293
428
|
T.let(
|
|
294
|
-
:
|
|
429
|
+
:invalid_signature,
|
|
430
|
+
PreludeSDK::Models::VerificationCreateResponse::Reason::TaggedSymbol
|
|
431
|
+
)
|
|
432
|
+
REPEATED_ATTEMPTS =
|
|
433
|
+
T.let(
|
|
434
|
+
:repeated_attempts,
|
|
435
|
+
PreludeSDK::Models::VerificationCreateResponse::Reason::TaggedSymbol
|
|
436
|
+
)
|
|
437
|
+
SUSPICIOUS =
|
|
438
|
+
T.let(
|
|
439
|
+
:suspicious,
|
|
295
440
|
PreludeSDK::Models::VerificationCreateResponse::Reason::TaggedSymbol
|
|
296
441
|
)
|
|
297
442
|
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module PreludeSDK
|
|
4
|
+
module Models
|
|
5
|
+
class VerificationManagementDeletePhoneNumberParams < PreludeSDK::Internal::Type::BaseModel
|
|
6
|
+
extend PreludeSDK::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include PreludeSDK::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(
|
|
12
|
+
PreludeSDK::VerificationManagementDeletePhoneNumberParams,
|
|
13
|
+
PreludeSDK::Internal::AnyHash
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
# An E.164 formatted phone number to remove from the list.
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
attr_accessor :phone_number
|
|
20
|
+
|
|
21
|
+
sig do
|
|
22
|
+
params(
|
|
23
|
+
phone_number: String,
|
|
24
|
+
request_options: PreludeSDK::RequestOptions::OrHash
|
|
25
|
+
).returns(T.attached_class)
|
|
26
|
+
end
|
|
27
|
+
def self.new(
|
|
28
|
+
# An E.164 formatted phone number to remove from the list.
|
|
29
|
+
phone_number:,
|
|
30
|
+
request_options: {}
|
|
31
|
+
)
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
sig do
|
|
35
|
+
override.returns(
|
|
36
|
+
{ phone_number: String, request_options: PreludeSDK::RequestOptions }
|
|
37
|
+
)
|
|
38
|
+
end
|
|
39
|
+
def to_hash
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
module Action
|
|
43
|
+
extend PreludeSDK::Internal::Type::Enum
|
|
44
|
+
|
|
45
|
+
TaggedSymbol =
|
|
46
|
+
T.type_alias do
|
|
47
|
+
T.all(
|
|
48
|
+
Symbol,
|
|
49
|
+
PreludeSDK::VerificationManagementDeletePhoneNumberParams::Action
|
|
50
|
+
)
|
|
51
|
+
end
|
|
52
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
53
|
+
|
|
54
|
+
ALLOW =
|
|
55
|
+
T.let(
|
|
56
|
+
:allow,
|
|
57
|
+
PreludeSDK::VerificationManagementDeletePhoneNumberParams::Action::TaggedSymbol
|
|
58
|
+
)
|
|
59
|
+
BLOCK =
|
|
60
|
+
T.let(
|
|
61
|
+
:block,
|
|
62
|
+
PreludeSDK::VerificationManagementDeletePhoneNumberParams::Action::TaggedSymbol
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
sig do
|
|
66
|
+
override.returns(
|
|
67
|
+
T::Array[
|
|
68
|
+
PreludeSDK::VerificationManagementDeletePhoneNumberParams::Action::TaggedSymbol
|
|
69
|
+
]
|
|
70
|
+
)
|
|
71
|
+
end
|
|
72
|
+
def self.values
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module PreludeSDK
|
|
4
|
+
module Models
|
|
5
|
+
class VerificationManagementDeletePhoneNumberResponse < PreludeSDK::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
PreludeSDK::Models::VerificationManagementDeletePhoneNumberResponse,
|
|
10
|
+
PreludeSDK::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# The E.164 formatted phone number that was removed from the list.
|
|
15
|
+
sig { returns(String) }
|
|
16
|
+
attr_accessor :phone_number
|
|
17
|
+
|
|
18
|
+
sig { params(phone_number: String).returns(T.attached_class) }
|
|
19
|
+
def self.new(
|
|
20
|
+
# The E.164 formatted phone number that was removed from the list.
|
|
21
|
+
phone_number:
|
|
22
|
+
)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
sig { override.returns({ phone_number: String }) }
|
|
26
|
+
def to_hash
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|