prelude-sdk 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +81 -0
  3. data/README.md +1 -1
  4. data/lib/prelude_sdk/client.rb +22 -1
  5. data/lib/prelude_sdk/internal/transport/pooled_net_requester.rb +13 -11
  6. data/lib/prelude_sdk/internal/util.rb +61 -10
  7. data/lib/prelude_sdk/models/lookup_lookup_params.rb +9 -1
  8. data/lib/prelude_sdk/models/notify_get_subscription_config_params.rb +7 -1
  9. data/lib/prelude_sdk/models/notify_get_subscription_phone_number_params.rb +7 -1
  10. data/lib/prelude_sdk/models/notify_list_subscription_phone_number_events_params.rb +8 -1
  11. data/lib/prelude_sdk/models/notify_list_subscription_phone_numbers_params.rb +8 -1
  12. data/lib/prelude_sdk/models/notify_send_batch_params.rb +55 -1
  13. data/lib/prelude_sdk/models/notify_send_batch_response.rb +39 -1
  14. data/lib/prelude_sdk/models/notify_send_params.rb +92 -1
  15. data/lib/prelude_sdk/models/notify_send_response.rb +36 -1
  16. data/lib/prelude_sdk/models/transactional_send_params.rb +54 -1
  17. data/lib/prelude_sdk/models/verification_create_params.rb +35 -48
  18. data/lib/prelude_sdk/models/verification_create_response.rb +66 -1
  19. data/lib/prelude_sdk/models/verification_management_delete_phone_number_params.rb +8 -1
  20. data/lib/prelude_sdk/models/verification_management_list_phone_numbers_params.rb +7 -1
  21. data/lib/prelude_sdk/models/verification_management_set_phone_number_params.rb +8 -1
  22. data/lib/prelude_sdk/models/watch_predict_params.rb +16 -12
  23. data/lib/prelude_sdk/models/watch_predict_response.rb +51 -1
  24. data/lib/prelude_sdk/models/watch_send_events_params.rb +6 -2
  25. data/lib/prelude_sdk/models/watch_send_feedbacks_params.rb +7 -130
  26. data/lib/prelude_sdk/resources/lookup.rb +4 -1
  27. data/lib/prelude_sdk/resources/notify.rb +19 -7
  28. data/lib/prelude_sdk/resources/transactional.rb +4 -1
  29. data/lib/prelude_sdk/resources/verification.rb +1 -0
  30. data/lib/prelude_sdk/resources/verification_management.rb +1 -0
  31. data/lib/prelude_sdk/resources/watch.rb +9 -2
  32. data/lib/prelude_sdk/version.rb +1 -1
  33. data/rbi/prelude_sdk/client.rbi +7 -0
  34. data/rbi/prelude_sdk/internal/util.rbi +29 -1
  35. data/rbi/prelude_sdk/models/lookup_lookup_params.rbi +8 -0
  36. data/rbi/prelude_sdk/models/notify_get_subscription_config_params.rbi +13 -5
  37. data/rbi/prelude_sdk/models/notify_get_subscription_phone_number_params.rbi +10 -2
  38. data/rbi/prelude_sdk/models/notify_list_subscription_phone_number_events_params.rbi +6 -0
  39. data/rbi/prelude_sdk/models/notify_list_subscription_phone_numbers_params.rbi +6 -0
  40. data/rbi/prelude_sdk/models/notify_send_batch_params.rbi +88 -0
  41. data/rbi/prelude_sdk/models/notify_send_batch_response.rbi +80 -0
  42. data/rbi/prelude_sdk/models/notify_send_params.rbi +145 -0
  43. data/rbi/prelude_sdk/models/notify_send_response.rbi +75 -0
  44. data/rbi/prelude_sdk/models/transactional_send_params.rbi +83 -0
  45. data/rbi/prelude_sdk/models/verification_create_params.rbi +53 -93
  46. data/rbi/prelude_sdk/models/verification_create_response.rbi +178 -0
  47. data/rbi/prelude_sdk/models/verification_management_delete_phone_number_params.rbi +16 -1
  48. data/rbi/prelude_sdk/models/verification_management_list_phone_numbers_params.rbi +21 -4
  49. data/rbi/prelude_sdk/models/verification_management_set_phone_number_params.rbi +16 -1
  50. data/rbi/prelude_sdk/models/watch_predict_params.rbi +24 -16
  51. data/rbi/prelude_sdk/models/watch_predict_response.rbi +152 -3
  52. data/rbi/prelude_sdk/models/watch_send_events_params.rbi +4 -2
  53. data/rbi/prelude_sdk/models/watch_send_feedbacks_params.rbi +7 -245
  54. data/rbi/prelude_sdk/resources/lookup.rbi +2 -0
  55. data/rbi/prelude_sdk/resources/notify.rbi +36 -2
  56. data/rbi/prelude_sdk/resources/transactional.rbi +13 -0
  57. data/rbi/prelude_sdk/resources/verification.rbi +1 -0
  58. data/rbi/prelude_sdk/resources/verification_management.rbi +1 -0
  59. data/rbi/prelude_sdk/resources/watch.rbi +5 -2
  60. data/sig/prelude_sdk/internal/util.rbs +14 -0
  61. data/sig/prelude_sdk/models/lookup_lookup_params.rbs +8 -1
  62. data/sig/prelude_sdk/models/notify_get_subscription_config_params.rbs +11 -3
  63. data/sig/prelude_sdk/models/notify_get_subscription_phone_number_params.rbs +6 -1
  64. data/sig/prelude_sdk/models/notify_list_subscription_phone_number_events_params.rbs +10 -1
  65. data/sig/prelude_sdk/models/notify_list_subscription_phone_numbers_params.rbs +5 -0
  66. data/sig/prelude_sdk/models/notify_send_batch_params.rbs +25 -1
  67. data/sig/prelude_sdk/models/notify_send_batch_response.rbs +27 -0
  68. data/sig/prelude_sdk/models/notify_send_params.rbs +51 -1
  69. data/sig/prelude_sdk/models/notify_send_response.rbs +27 -0
  70. data/sig/prelude_sdk/models/transactional_send_params.rbs +23 -0
  71. data/sig/prelude_sdk/models/verification_create_params.rbs +2 -21
  72. data/sig/prelude_sdk/models/verification_create_response.rbs +40 -1
  73. data/sig/prelude_sdk/models/verification_management_delete_phone_number_params.rbs +9 -1
  74. data/sig/prelude_sdk/models/verification_management_list_phone_numbers_params.rbs +14 -3
  75. data/sig/prelude_sdk/models/verification_management_set_phone_number_params.rbs +9 -1
  76. data/sig/prelude_sdk/models/watch_predict_response.rbs +41 -3
  77. data/sig/prelude_sdk/models/watch_send_feedbacks_params.rbs +3 -110
  78. data/sig/prelude_sdk/resources/notify.rbs +4 -0
  79. data/sig/prelude_sdk/resources/transactional.rbs +1 -0
  80. 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,26 @@ module PreludeSDK
38
38
  sig { params(correlation_id: String).void }
39
39
  attr_writer :correlation_id
40
40
 
41
+ # A media attachment to include in the message header. Supported on WhatsApp
42
+ # templates registered with a `DOCUMENT`, `IMAGE`, or `VIDEO` header. The media
43
+ # type is determined by the template's registered header format; send the matching
44
+ # file type for each.
45
+ #
46
+ # - `DOCUMENT` headers accept PDF and other document formats; `filename` is
47
+ # required and displayed to the recipient.
48
+ # - `IMAGE` headers accept `.png`, `.jpg`, `.jpeg`, and `.webp` URLs; `filename`
49
+ # is ignored.
50
+ # - `VIDEO` headers accept `.mp4` and `.3gp` URLs; `filename` is ignored.
51
+ sig { returns(T.nilable(PreludeSDK::TransactionalSendParams::Document)) }
52
+ attr_reader :document
53
+
54
+ sig do
55
+ params(
56
+ document: PreludeSDK::TransactionalSendParams::Document::OrHash
57
+ ).void
58
+ end
59
+ attr_writer :document
60
+
41
61
  # The message expiration date.
42
62
  sig { returns(T.nilable(String)) }
43
63
  attr_reader :expires_at
@@ -101,6 +121,7 @@ module PreludeSDK
101
121
  to: String,
102
122
  callback_url: String,
103
123
  correlation_id: String,
124
+ document: PreludeSDK::TransactionalSendParams::Document::OrHash,
104
125
  expires_at: String,
105
126
  from: String,
106
127
  locale: String,
@@ -121,6 +142,17 @@ module PreludeSDK
121
142
  # returned in the response and any webhook events that refer to this
122
143
  # transactionalmessage.
123
144
  correlation_id: nil,
145
+ # A media attachment to include in the message header. Supported on WhatsApp
146
+ # templates registered with a `DOCUMENT`, `IMAGE`, or `VIDEO` header. The media
147
+ # type is determined by the template's registered header format; send the matching
148
+ # file type for each.
149
+ #
150
+ # - `DOCUMENT` headers accept PDF and other document formats; `filename` is
151
+ # required and displayed to the recipient.
152
+ # - `IMAGE` headers accept `.png`, `.jpg`, `.jpeg`, and `.webp` URLs; `filename`
153
+ # is ignored.
154
+ # - `VIDEO` headers accept `.mp4` and `.3gp` URLs; `filename` is ignored.
155
+ document: nil,
124
156
  # The message expiration date.
125
157
  expires_at: nil,
126
158
  # The Sender ID.
@@ -153,6 +185,7 @@ module PreludeSDK
153
185
  to: String,
154
186
  callback_url: String,
155
187
  correlation_id: String,
188
+ document: PreludeSDK::TransactionalSendParams::Document,
156
189
  expires_at: String,
157
190
  from: String,
158
191
  locale: String,
@@ -166,6 +199,56 @@ module PreludeSDK
166
199
  def to_hash
167
200
  end
168
201
 
202
+ class Document < PreludeSDK::Internal::Type::BaseModel
203
+ OrHash =
204
+ T.type_alias do
205
+ T.any(
206
+ PreludeSDK::TransactionalSendParams::Document,
207
+ PreludeSDK::Internal::AnyHash
208
+ )
209
+ end
210
+
211
+ # HTTPS URL of the media file. The file extension must match the template's
212
+ # registered header format (PDF for DOCUMENT; PNG/JPG/JPEG/WEBP for IMAGE; MP4/3GP
213
+ # for VIDEO).
214
+ sig { returns(String) }
215
+ attr_accessor :url
216
+
217
+ # Filename displayed to the recipient. Required for templates with a `DOCUMENT`
218
+ # header; ignored for `IMAGE` and `VIDEO` headers.
219
+ sig { returns(T.nilable(String)) }
220
+ attr_reader :filename
221
+
222
+ sig { params(filename: String).void }
223
+ attr_writer :filename
224
+
225
+ # A media attachment to include in the message header. Supported on WhatsApp
226
+ # templates registered with a `DOCUMENT`, `IMAGE`, or `VIDEO` header. The media
227
+ # type is determined by the template's registered header format; send the matching
228
+ # file type for each.
229
+ #
230
+ # - `DOCUMENT` headers accept PDF and other document formats; `filename` is
231
+ # required and displayed to the recipient.
232
+ # - `IMAGE` headers accept `.png`, `.jpg`, `.jpeg`, and `.webp` URLs; `filename`
233
+ # is ignored.
234
+ # - `VIDEO` headers accept `.mp4` and `.3gp` URLs; `filename` is ignored.
235
+ sig { params(url: String, filename: String).returns(T.attached_class) }
236
+ def self.new(
237
+ # HTTPS URL of the media file. The file extension must match the template's
238
+ # registered header format (PDF for DOCUMENT; PNG/JPG/JPEG/WEBP for IMAGE; MP4/3GP
239
+ # for VIDEO).
240
+ url:,
241
+ # Filename displayed to the recipient. Required for templates with a `DOCUMENT`
242
+ # header; ignored for `IMAGE` and `VIDEO` headers.
243
+ filename: nil
244
+ )
245
+ end
246
+
247
+ sig { override.returns({ url: String, filename: String }) }
248
+ def to_hash
249
+ end
250
+ end
251
+
169
252
  # The preferred delivery channel for the message. When specified, the system will
170
253
  # prioritize sending via the requested channel if the template is configured for
171
254
  # it.
@@ -232,8 +232,8 @@ module PreludeSDK
232
232
  )
233
233
  end
234
234
 
235
- # This allows you to automatically retrieve and fill the OTP code on mobile apps.
236
- # Currently only Android devices are supported.
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 you to automatically retrieve and fill the OTP code on mobile apps.
393
- # Currently only Android devices are supported.
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 the SMS will be sent to. We are currently only supporting
468
- # "android".
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 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).
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 you to automatically retrieve and fill the OTP code on mobile apps.
483
- # Currently only Android devices are supported.
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 the SMS will be sent to. We are currently only supporting
493
- # "android".
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 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).
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 the SMS will be sent to. We are currently only supporting
515
- # "android".
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
- # The unique identifier for the user's device. For Android, this corresponds to
700
- # the `ANDROID_ID` and for iOS, this corresponds to the `identifierForVendor`.
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 provide a higher level of trust, indicating that the user is
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 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.
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
- # The unique identifier for the user's device. For Android, this corresponds to
793
- # the `ANDROID_ID` and for iOS, this corresponds to the `identifierForVendor`.
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 provide a higher level of trust, indicating that the user is
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 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.
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,