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
@@ -14,7 +14,8 @@ module PreludeSDK
14
14
  )
15
15
  end
16
16
 
17
- # A list of feedbacks to send.
17
+ # A list of feedbacks to send. A maximum of 100 feedbacks can be sent in a single
18
+ # request.
18
19
  sig { returns(T::Array[PreludeSDK::WatchSendFeedbacksParams::Feedback]) }
19
20
  attr_accessor :feedbacks
20
21
 
@@ -26,7 +27,8 @@ module PreludeSDK
26
27
  ).returns(T.attached_class)
27
28
  end
28
29
  def self.new(
29
- # A list of feedbacks to send.
30
+ # A list of feedbacks to send. A maximum of 100 feedbacks can be sent in a single
31
+ # request.
30
32
  feedbacks:,
31
33
  request_options: {}
32
34
  )
@@ -72,13 +74,6 @@ module PreludeSDK
72
74
  end
73
75
  attr_accessor :type
74
76
 
75
- # The identifier of the dispatch that came from the front-end SDK.
76
- sig { returns(T.nilable(String)) }
77
- attr_reader :dispatch_id
78
-
79
- sig { params(dispatch_id: String).void }
80
- attr_writer :dispatch_id
81
-
82
77
  # The metadata for this feedback.
83
78
  sig do
84
79
  returns(
@@ -95,34 +90,14 @@ module PreludeSDK
95
90
  end
96
91
  attr_writer :metadata
97
92
 
98
- # The signals used for anti-fraud. For more details, refer to
99
- # [Signals](/verify/v2/documentation/prevent-fraud#signals).
100
- sig do
101
- returns(
102
- T.nilable(PreludeSDK::WatchSendFeedbacksParams::Feedback::Signals)
103
- )
104
- end
105
- attr_reader :signals
106
-
107
- sig do
108
- params(
109
- signals:
110
- PreludeSDK::WatchSendFeedbacksParams::Feedback::Signals::OrHash
111
- ).void
112
- end
113
- attr_writer :signals
114
-
115
93
  sig do
116
94
  params(
117
95
  target:
118
96
  PreludeSDK::WatchSendFeedbacksParams::Feedback::Target::OrHash,
119
97
  type:
120
98
  PreludeSDK::WatchSendFeedbacksParams::Feedback::Type::OrSymbol,
121
- dispatch_id: String,
122
99
  metadata:
123
- PreludeSDK::WatchSendFeedbacksParams::Feedback::Metadata::OrHash,
124
- signals:
125
- PreludeSDK::WatchSendFeedbacksParams::Feedback::Signals::OrHash
100
+ PreludeSDK::WatchSendFeedbacksParams::Feedback::Metadata::OrHash
126
101
  ).returns(T.attached_class)
127
102
  end
128
103
  def self.new(
@@ -130,13 +105,8 @@ module PreludeSDK
130
105
  target:,
131
106
  # The type of feedback.
132
107
  type:,
133
- # The identifier of the dispatch that came from the front-end SDK.
134
- dispatch_id: nil,
135
108
  # The metadata for this feedback.
136
- metadata: nil,
137
- # The signals used for anti-fraud. For more details, refer to
138
- # [Signals](/verify/v2/documentation/prevent-fraud#signals).
139
- signals: nil
109
+ metadata: nil
140
110
  )
141
111
  end
142
112
 
@@ -146,10 +116,7 @@ module PreludeSDK
146
116
  target: PreludeSDK::WatchSendFeedbacksParams::Feedback::Target,
147
117
  type:
148
118
  PreludeSDK::WatchSendFeedbacksParams::Feedback::Type::OrSymbol,
149
- dispatch_id: String,
150
- metadata:
151
- PreludeSDK::WatchSendFeedbacksParams::Feedback::Metadata,
152
- signals: PreludeSDK::WatchSendFeedbacksParams::Feedback::Signals
119
+ metadata: PreludeSDK::WatchSendFeedbacksParams::Feedback::Metadata
153
120
  }
154
121
  )
155
122
  end
@@ -306,211 +273,6 @@ module PreludeSDK
306
273
  def to_hash
307
274
  end
308
275
  end
309
-
310
- class Signals < PreludeSDK::Internal::Type::BaseModel
311
- OrHash =
312
- T.type_alias do
313
- T.any(
314
- PreludeSDK::WatchSendFeedbacksParams::Feedback::Signals,
315
- PreludeSDK::Internal::AnyHash
316
- )
317
- end
318
-
319
- # The version of your application.
320
- sig { returns(T.nilable(String)) }
321
- attr_reader :app_version
322
-
323
- sig { params(app_version: String).void }
324
- attr_writer :app_version
325
-
326
- # The unique identifier for the user's device. For Android, this corresponds to
327
- # the `ANDROID_ID` and for iOS, this corresponds to the `identifierForVendor`.
328
- sig { returns(T.nilable(String)) }
329
- attr_reader :device_id
330
-
331
- sig { params(device_id: String).void }
332
- attr_writer :device_id
333
-
334
- # The model of the user's device.
335
- sig { returns(T.nilable(String)) }
336
- attr_reader :device_model
337
-
338
- sig { params(device_model: String).void }
339
- attr_writer :device_model
340
-
341
- # The type of the user's device.
342
- sig do
343
- returns(
344
- T.nilable(
345
- PreludeSDK::WatchSendFeedbacksParams::Feedback::Signals::DevicePlatform::OrSymbol
346
- )
347
- )
348
- end
349
- attr_reader :device_platform
350
-
351
- sig do
352
- params(
353
- device_platform:
354
- PreludeSDK::WatchSendFeedbacksParams::Feedback::Signals::DevicePlatform::OrSymbol
355
- ).void
356
- end
357
- attr_writer :device_platform
358
-
359
- # The IP address of the user's device.
360
- sig { returns(T.nilable(String)) }
361
- attr_reader :ip
362
-
363
- sig { params(ip: String).void }
364
- attr_writer :ip
365
-
366
- # This signal should provide a higher level of trust, indicating that the user is
367
- # genuine. Contact us to discuss your use case. For more details, refer to
368
- # [Signals](/verify/v2/documentation/prevent-fraud#signals).
369
- sig { returns(T.nilable(T::Boolean)) }
370
- attr_reader :is_trusted_user
371
-
372
- sig { params(is_trusted_user: T::Boolean).void }
373
- attr_writer :is_trusted_user
374
-
375
- # The JA4 fingerprint observed for the connection. Prelude will infer it
376
- # automatically when requests go through our client SDK (which uses Prelude's
377
- # edge), but you can also provide it explicitly if you terminate TLS yourself.
378
- sig { returns(T.nilable(String)) }
379
- attr_reader :ja4_fingerprint
380
-
381
- sig { params(ja4_fingerprint: String).void }
382
- attr_writer :ja4_fingerprint
383
-
384
- # The version of the user's device operating system.
385
- sig { returns(T.nilable(String)) }
386
- attr_reader :os_version
387
-
388
- sig { params(os_version: String).void }
389
- attr_writer :os_version
390
-
391
- # The user agent of the user's device. If the individual fields (os_version,
392
- # device_platform, device_model) are provided, we will prioritize those values
393
- # instead of parsing them from the user agent string.
394
- sig { returns(T.nilable(String)) }
395
- attr_reader :user_agent
396
-
397
- sig { params(user_agent: String).void }
398
- attr_writer :user_agent
399
-
400
- # The signals used for anti-fraud. For more details, refer to
401
- # [Signals](/verify/v2/documentation/prevent-fraud#signals).
402
- sig do
403
- params(
404
- app_version: String,
405
- device_id: String,
406
- device_model: String,
407
- device_platform:
408
- PreludeSDK::WatchSendFeedbacksParams::Feedback::Signals::DevicePlatform::OrSymbol,
409
- ip: String,
410
- is_trusted_user: T::Boolean,
411
- ja4_fingerprint: String,
412
- os_version: String,
413
- user_agent: String
414
- ).returns(T.attached_class)
415
- end
416
- def self.new(
417
- # The version of your application.
418
- app_version: nil,
419
- # The unique identifier for the user's device. For Android, this corresponds to
420
- # the `ANDROID_ID` and for iOS, this corresponds to the `identifierForVendor`.
421
- device_id: nil,
422
- # The model of the user's device.
423
- device_model: nil,
424
- # The type of the user's device.
425
- device_platform: nil,
426
- # The IP address of the user's device.
427
- ip: nil,
428
- # This signal should provide a higher level of trust, indicating that the user is
429
- # genuine. Contact us to discuss your use case. For more details, refer to
430
- # [Signals](/verify/v2/documentation/prevent-fraud#signals).
431
- is_trusted_user: nil,
432
- # The JA4 fingerprint observed for the connection. Prelude will infer it
433
- # automatically when requests go through our client SDK (which uses Prelude's
434
- # edge), but you can also provide it explicitly if you terminate TLS yourself.
435
- ja4_fingerprint: nil,
436
- # The version of the user's device operating system.
437
- os_version: nil,
438
- # The user agent of the user's device. If the individual fields (os_version,
439
- # device_platform, device_model) are provided, we will prioritize those values
440
- # instead of parsing them from the user agent string.
441
- user_agent: nil
442
- )
443
- end
444
-
445
- sig do
446
- override.returns(
447
- {
448
- app_version: String,
449
- device_id: String,
450
- device_model: String,
451
- device_platform:
452
- PreludeSDK::WatchSendFeedbacksParams::Feedback::Signals::DevicePlatform::OrSymbol,
453
- ip: String,
454
- is_trusted_user: T::Boolean,
455
- ja4_fingerprint: String,
456
- os_version: String,
457
- user_agent: String
458
- }
459
- )
460
- end
461
- def to_hash
462
- end
463
-
464
- # The type of the user's device.
465
- module DevicePlatform
466
- extend PreludeSDK::Internal::Type::Enum
467
-
468
- TaggedSymbol =
469
- T.type_alias do
470
- T.all(
471
- Symbol,
472
- PreludeSDK::WatchSendFeedbacksParams::Feedback::Signals::DevicePlatform
473
- )
474
- end
475
- OrSymbol = T.type_alias { T.any(Symbol, String) }
476
-
477
- ANDROID =
478
- T.let(
479
- :android,
480
- PreludeSDK::WatchSendFeedbacksParams::Feedback::Signals::DevicePlatform::TaggedSymbol
481
- )
482
- IOS =
483
- T.let(
484
- :ios,
485
- PreludeSDK::WatchSendFeedbacksParams::Feedback::Signals::DevicePlatform::TaggedSymbol
486
- )
487
- IPADOS =
488
- T.let(
489
- :ipados,
490
- PreludeSDK::WatchSendFeedbacksParams::Feedback::Signals::DevicePlatform::TaggedSymbol
491
- )
492
- TVOS =
493
- T.let(
494
- :tvos,
495
- PreludeSDK::WatchSendFeedbacksParams::Feedback::Signals::DevicePlatform::TaggedSymbol
496
- )
497
- WEB =
498
- T.let(
499
- :web,
500
- PreludeSDK::WatchSendFeedbacksParams::Feedback::Signals::DevicePlatform::TaggedSymbol
501
- )
502
-
503
- sig do
504
- override.returns(
505
- T::Array[
506
- PreludeSDK::WatchSendFeedbacksParams::Feedback::Signals::DevicePlatform::TaggedSymbol
507
- ]
508
- )
509
- end
510
- def self.values
511
- end
512
- end
513
- end
514
276
  end
515
277
  end
516
278
  end
@@ -2,6 +2,8 @@
2
2
 
3
3
  module PreludeSDK
4
4
  module Resources
5
+ # Retrieve detailed information about a phone number including carrier data, line
6
+ # type, and portability status.
5
7
  class Lookup
6
8
  # Retrieve detailed information about a phone number including carrier data, line
7
9
  # type, and portability status.
@@ -2,6 +2,7 @@
2
2
 
3
3
  module PreludeSDK
4
4
  module Resources
5
+ # Send transactional and marketing messages with compliance enforcement.
5
6
  class Notify
6
7
  # Retrieve a specific subscription management configuration by its ID.
7
8
  sig do
@@ -113,20 +114,23 @@ module PreludeSDK
113
114
  )
114
115
  end
115
116
 
116
- # Send transactional and marketing messages to your users via SMS and WhatsApp
117
- # with automatic compliance enforcement.
117
+ # Send transactional and marketing messages to your users via SMS, RCS and
118
+ # WhatsApp with automatic compliance enforcement.
118
119
  sig do
119
120
  params(
120
121
  template_id: String,
121
122
  to: String,
122
123
  callback_url: String,
124
+ context: PreludeSDK::NotifySendParams::Context::OrHash,
123
125
  correlation_id: String,
126
+ document: PreludeSDK::NotifySendParams::Document::OrHash,
124
127
  expires_at: Time,
125
128
  from: String,
126
129
  locale: String,
127
130
  preferred_channel:
128
131
  PreludeSDK::NotifySendParams::PreferredChannel::OrSymbol,
129
132
  schedule_at: Time,
133
+ text: String,
130
134
  variables: T::Hash[Symbol, String],
131
135
  request_options: PreludeSDK::RequestOptions::OrHash
132
136
  ).returns(PreludeSDK::Models::NotifySendResponse)
@@ -138,10 +142,24 @@ module PreludeSDK
138
142
  to:,
139
143
  # The URL where webhooks will be sent for message delivery events.
140
144
  callback_url: nil,
145
+ # Context for replying to an inbound message. When provided, the message is sent
146
+ # as a WhatsApp reply within the 24-hour conversation window.
147
+ context: nil,
141
148
  # A user-defined identifier to correlate this message with your internal systems.
142
149
  # It is returned in the response and any webhook events that refer to this
143
150
  # message.
144
151
  correlation_id: nil,
152
+ # A media attachment to include in the message header. Supported on WhatsApp
153
+ # templates registered with a `DOCUMENT`, `IMAGE`, or `VIDEO` header. The media
154
+ # type is determined by the template's registered header format; send the matching
155
+ # file type for each.
156
+ #
157
+ # - `DOCUMENT` headers accept PDF and other document formats; `filename` is
158
+ # required and displayed to the recipient.
159
+ # - `IMAGE` headers accept `.png`, `.jpg`, `.jpeg`, and `.webp` URLs; `filename`
160
+ # is ignored.
161
+ # - `VIDEO` headers accept `.mp4` and `.3gp` URLs; `filename` is ignored.
162
+ document: nil,
145
163
  # The message expiration date in RFC3339 format. The message will not be sent if
146
164
  # this time is reached.
147
165
  expires_at: nil,
@@ -159,6 +177,10 @@ module PreludeSDK
159
177
  # can be scheduled up to 90 days in advance and will be automatically adjusted for
160
178
  # compliance with local time window restrictions.
161
179
  schedule_at: nil,
180
+ # The reply message body. Required when `context.reply_to` is provided. Used for
181
+ # 2-way WhatsApp messaging to send free-form text replies within a conversation
182
+ # window.
183
+ text: nil,
162
184
  # The variables to be replaced in the template.
163
185
  variables: nil,
164
186
  request_options: {}
@@ -172,6 +194,7 @@ module PreludeSDK
172
194
  to: T::Array[String],
173
195
  callback_url: String,
174
196
  correlation_id: String,
197
+ document: PreludeSDK::NotifySendBatchParams::Document::OrHash,
175
198
  expires_at: Time,
176
199
  from: String,
177
200
  locale: String,
@@ -191,6 +214,17 @@ module PreludeSDK
191
214
  callback_url: nil,
192
215
  # A user-defined identifier to correlate this request with your internal systems.
193
216
  correlation_id: nil,
217
+ # A media attachment to include in the message header. Supported on WhatsApp
218
+ # templates registered with a `DOCUMENT`, `IMAGE`, or `VIDEO` header. The media
219
+ # type is determined by the template's registered header format; send the matching
220
+ # file type for each.
221
+ #
222
+ # - `DOCUMENT` headers accept PDF and other document formats; `filename` is
223
+ # required and displayed to the recipient.
224
+ # - `IMAGE` headers accept `.png`, `.jpg`, `.jpeg`, and `.webp` URLs; `filename`
225
+ # is ignored.
226
+ # - `VIDEO` headers accept `.mp4` and `.3gp` URLs; `filename` is ignored.
227
+ document: nil,
194
228
  # The message expiration date in RFC3339 format. Messages will not be sent after
195
229
  # this time.
196
230
  expires_at: nil,
@@ -2,6 +2,7 @@
2
2
 
3
3
  module PreludeSDK
4
4
  module Resources
5
+ # Send transactional messages (deprecated - use Notify API instead).
5
6
  class Transactional
6
7
  # Legacy route maintained for backward compatibility. Migrate to `/v2/notify`
7
8
  # instead.
@@ -11,6 +12,7 @@ module PreludeSDK
11
12
  to: String,
12
13
  callback_url: String,
13
14
  correlation_id: String,
15
+ document: PreludeSDK::TransactionalSendParams::Document::OrHash,
14
16
  expires_at: String,
15
17
  from: String,
16
18
  locale: String,
@@ -31,6 +33,17 @@ module PreludeSDK
31
33
  # returned in the response and any webhook events that refer to this
32
34
  # transactionalmessage.
33
35
  correlation_id: nil,
36
+ # A media attachment to include in the message header. Supported on WhatsApp
37
+ # templates registered with a `DOCUMENT`, `IMAGE`, or `VIDEO` header. The media
38
+ # type is determined by the template's registered header format; send the matching
39
+ # file type for each.
40
+ #
41
+ # - `DOCUMENT` headers accept PDF and other document formats; `filename` is
42
+ # required and displayed to the recipient.
43
+ # - `IMAGE` headers accept `.png`, `.jpg`, `.jpeg`, and `.webp` URLs; `filename`
44
+ # is ignored.
45
+ # - `VIDEO` headers accept `.mp4` and `.3gp` URLs; `filename` is ignored.
46
+ document: nil,
34
47
  # The message expiration date.
35
48
  expires_at: nil,
36
49
  # The Sender ID.
@@ -2,6 +2,7 @@
2
2
 
3
3
  module PreludeSDK
4
4
  module Resources
5
+ # Verify phone numbers.
5
6
  class Verification
6
7
  # Create a new verification for a specific phone number. If another non-expired
7
8
  # verification exists (the request is performed within the verification window),
@@ -2,6 +2,7 @@
2
2
 
3
3
  module PreludeSDK
4
4
  module Resources
5
+ # Verify phone numbers.
5
6
  class VerificationManagement
6
7
  # Remove a phone number from the allow or block list.
7
8
  #
@@ -2,6 +2,7 @@
2
2
 
3
3
  module PreludeSDK
4
4
  module Resources
5
+ # Evaluate email addresses and phone numbers for trustworthiness.
5
6
  class Watch
6
7
  # Predict the outcome of a verification based on Prelude’s anti-fraud system.
7
8
  sig do
@@ -36,7 +37,8 @@ module PreludeSDK
36
37
  ).returns(PreludeSDK::Models::WatchSendEventsResponse)
37
38
  end
38
39
  def send_events(
39
- # A list of events to dispatch.
40
+ # A list of events to dispatch. A maximum of 100 events can be sent in a single
41
+ # request.
40
42
  events:,
41
43
  request_options: {}
42
44
  )
@@ -52,7 +54,8 @@ module PreludeSDK
52
54
  ).returns(PreludeSDK::Models::WatchSendFeedbacksResponse)
53
55
  end
54
56
  def send_feedbacks(
55
- # A list of feedbacks to send.
57
+ # A list of feedbacks to send. A maximum of 100 feedbacks can be sent in a single
58
+ # request.
56
59
  feedbacks:,
57
60
  request_options: {}
58
61
  )
@@ -45,8 +45,12 @@ module PreludeSDK
45
45
  -> top?
46
46
  } -> top?
47
47
 
48
+ RFC_3986_NOT_PCHARS: Regexp
49
+
48
50
  def self?.uri_origin: (URI::Generic uri) -> String
49
51
 
52
+ def self?.encode_path: (String | Integer path) -> String
53
+
50
54
  def self?.interpolate_path: (String | ::Array[String] path) -> String
51
55
 
52
56
  def self?.decode_query: (String? query) -> ::Hash[String, ::Array[String]]
@@ -106,6 +110,16 @@ module PreludeSDK
106
110
  JSON_CONTENT: Regexp
107
111
  JSONL_CONTENT: Regexp
108
112
 
113
+ def encode_query_params: (
114
+ ::Hash[Symbol, top] query
115
+ ) -> ::Hash[Symbol, top]
116
+
117
+ private def write_query_param_element!: (
118
+ ::Hash[Symbol, top] collection,
119
+ String key,
120
+ top element
121
+ ) -> nil
122
+
109
123
  def self?.write_multipart_content: (
110
124
  Enumerator::Yielder y,
111
125
  val: top,
@@ -1,13 +1,18 @@
1
1
  module PreludeSDK
2
2
  module Models
3
3
  type lookup_lookup_params =
4
- { type: ::Array[PreludeSDK::Models::LookupLookupParams::type_] }
4
+ {
5
+ phone_number: String,
6
+ type: ::Array[PreludeSDK::Models::LookupLookupParams::type_]
7
+ }
5
8
  & PreludeSDK::Internal::Type::request_parameters
6
9
 
7
10
  class LookupLookupParams < PreludeSDK::Internal::Type::BaseModel
8
11
  extend PreludeSDK::Internal::Type::RequestParameters::Converter
9
12
  include PreludeSDK::Internal::Type::RequestParameters
10
13
 
14
+ attr_accessor phone_number: String
15
+
11
16
  attr_reader type: ::Array[PreludeSDK::Models::LookupLookupParams::type_]?
12
17
 
13
18
  def type=: (
@@ -15,11 +20,13 @@ module PreludeSDK
15
20
  ) -> ::Array[PreludeSDK::Models::LookupLookupParams::type_]
16
21
 
17
22
  def initialize: (
23
+ phone_number: String,
18
24
  ?type: ::Array[PreludeSDK::Models::LookupLookupParams::type_],
19
25
  ?request_options: PreludeSDK::request_opts
20
26
  ) -> void
21
27
 
22
28
  def to_hash: -> {
29
+ phone_number: String,
23
30
  type: ::Array[PreludeSDK::Models::LookupLookupParams::type_],
24
31
  request_options: PreludeSDK::RequestOptions
25
32
  }
@@ -1,15 +1,23 @@
1
1
  module PreludeSDK
2
2
  module Models
3
3
  type notify_get_subscription_config_params =
4
- { } & PreludeSDK::Internal::Type::request_parameters
4
+ { config_id: String } & PreludeSDK::Internal::Type::request_parameters
5
5
 
6
6
  class NotifyGetSubscriptionConfigParams < PreludeSDK::Internal::Type::BaseModel
7
7
  extend PreludeSDK::Internal::Type::RequestParameters::Converter
8
8
  include PreludeSDK::Internal::Type::RequestParameters
9
9
 
10
- def initialize: (?request_options: PreludeSDK::request_opts) -> void
10
+ attr_accessor config_id: String
11
11
 
12
- def to_hash: -> { request_options: PreludeSDK::RequestOptions }
12
+ def initialize: (
13
+ config_id: String,
14
+ ?request_options: PreludeSDK::request_opts
15
+ ) -> void
16
+
17
+ def to_hash: -> {
18
+ config_id: String,
19
+ request_options: PreludeSDK::RequestOptions
20
+ }
13
21
  end
14
22
  end
15
23
  end
@@ -1,7 +1,8 @@
1
1
  module PreludeSDK
2
2
  module Models
3
3
  type notify_get_subscription_phone_number_params =
4
- { config_id: String } & PreludeSDK::Internal::Type::request_parameters
4
+ { config_id: String, phone_number: String }
5
+ & PreludeSDK::Internal::Type::request_parameters
5
6
 
6
7
  class NotifyGetSubscriptionPhoneNumberParams < PreludeSDK::Internal::Type::BaseModel
7
8
  extend PreludeSDK::Internal::Type::RequestParameters::Converter
@@ -9,13 +10,17 @@ module PreludeSDK
9
10
 
10
11
  attr_accessor config_id: String
11
12
 
13
+ attr_accessor phone_number: String
14
+
12
15
  def initialize: (
13
16
  config_id: String,
17
+ phone_number: String,
14
18
  ?request_options: PreludeSDK::request_opts
15
19
  ) -> void
16
20
 
17
21
  def to_hash: -> {
18
22
  config_id: String,
23
+ phone_number: String,
19
24
  request_options: PreludeSDK::RequestOptions
20
25
  }
21
26
  end
@@ -1,7 +1,12 @@
1
1
  module PreludeSDK
2
2
  module Models
3
3
  type notify_list_subscription_phone_number_events_params =
4
- { config_id: String, cursor: String, limit: Integer }
4
+ {
5
+ config_id: String,
6
+ phone_number: String,
7
+ cursor: String,
8
+ limit: Integer
9
+ }
5
10
  & PreludeSDK::Internal::Type::request_parameters
6
11
 
7
12
  class NotifyListSubscriptionPhoneNumberEventsParams < PreludeSDK::Internal::Type::BaseModel
@@ -10,6 +15,8 @@ module PreludeSDK
10
15
 
11
16
  attr_accessor config_id: String
12
17
 
18
+ attr_accessor phone_number: String
19
+
13
20
  attr_reader cursor: String?
14
21
 
15
22
  def cursor=: (String) -> String
@@ -20,6 +27,7 @@ module PreludeSDK
20
27
 
21
28
  def initialize: (
22
29
  config_id: String,
30
+ phone_number: String,
23
31
  ?cursor: String,
24
32
  ?limit: Integer,
25
33
  ?request_options: PreludeSDK::request_opts
@@ -27,6 +35,7 @@ module PreludeSDK
27
35
 
28
36
  def to_hash: -> {
29
37
  config_id: String,
38
+ phone_number: String,
30
39
  cursor: String,
31
40
  limit: Integer,
32
41
  request_options: PreludeSDK::RequestOptions
@@ -2,6 +2,7 @@ module PreludeSDK
2
2
  module Models
3
3
  type notify_list_subscription_phone_numbers_params =
4
4
  {
5
+ config_id: String,
5
6
  cursor: String,
6
7
  limit: Integer,
7
8
  state: PreludeSDK::Models::NotifyListSubscriptionPhoneNumbersParams::state
@@ -12,6 +13,8 @@ module PreludeSDK
12
13
  extend PreludeSDK::Internal::Type::RequestParameters::Converter
13
14
  include PreludeSDK::Internal::Type::RequestParameters
14
15
 
16
+ attr_accessor config_id: String
17
+
15
18
  attr_reader cursor: String?
16
19
 
17
20
  def cursor=: (String) -> String
@@ -27,6 +30,7 @@ module PreludeSDK
27
30
  ) -> PreludeSDK::Models::NotifyListSubscriptionPhoneNumbersParams::state
28
31
 
29
32
  def initialize: (
33
+ config_id: String,
30
34
  ?cursor: String,
31
35
  ?limit: Integer,
32
36
  ?state: PreludeSDK::Models::NotifyListSubscriptionPhoneNumbersParams::state,
@@ -34,6 +38,7 @@ module PreludeSDK
34
38
  ) -> void
35
39
 
36
40
  def to_hash: -> {
41
+ config_id: String,
37
42
  cursor: String,
38
43
  limit: Integer,
39
44
  state: PreludeSDK::Models::NotifyListSubscriptionPhoneNumbersParams::state,