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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +81 -0
- data/README.md +1 -1
- data/lib/prelude_sdk/client.rb +22 -1
- data/lib/prelude_sdk/internal/transport/pooled_net_requester.rb +13 -11
- data/lib/prelude_sdk/internal/util.rb +61 -10
- 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 +55 -1
- data/lib/prelude_sdk/models/notify_send_batch_response.rb +39 -1
- data/lib/prelude_sdk/models/notify_send_params.rb +92 -1
- data/lib/prelude_sdk/models/notify_send_response.rb +36 -1
- data/lib/prelude_sdk/models/transactional_send_params.rb +54 -1
- data/lib/prelude_sdk/models/verification_create_params.rb +35 -48
- data/lib/prelude_sdk/models/verification_create_response.rb +66 -1
- 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_events_params.rb +6 -2
- data/lib/prelude_sdk/models/watch_send_feedbacks_params.rb +7 -130
- data/lib/prelude_sdk/resources/lookup.rb +4 -1
- data/lib/prelude_sdk/resources/notify.rb +19 -7
- 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 +9 -2
- data/lib/prelude_sdk/version.rb +1 -1
- data/rbi/prelude_sdk/client.rbi +7 -0
- data/rbi/prelude_sdk/internal/util.rbi +29 -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 +88 -0
- data/rbi/prelude_sdk/models/notify_send_batch_response.rbi +80 -0
- data/rbi/prelude_sdk/models/notify_send_params.rbi +145 -0
- data/rbi/prelude_sdk/models/notify_send_response.rbi +75 -0
- data/rbi/prelude_sdk/models/transactional_send_params.rbi +83 -0
- data/rbi/prelude_sdk/models/verification_create_params.rbi +53 -93
- data/rbi/prelude_sdk/models/verification_create_response.rbi +178 -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_events_params.rbi +4 -2
- data/rbi/prelude_sdk/models/watch_send_feedbacks_params.rbi +7 -245
- data/rbi/prelude_sdk/resources/lookup.rbi +2 -0
- data/rbi/prelude_sdk/resources/notify.rbi +36 -2
- data/rbi/prelude_sdk/resources/transactional.rbi +13 -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 +5 -2
- data/sig/prelude_sdk/internal/util.rbs +14 -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 +25 -1
- data/sig/prelude_sdk/models/notify_send_batch_response.rbs +27 -0
- data/sig/prelude_sdk/models/notify_send_params.rbs +51 -1
- data/sig/prelude_sdk/models/notify_send_response.rbs +27 -0
- data/sig/prelude_sdk/models/transactional_send_params.rbs +23 -0
- data/sig/prelude_sdk/models/verification_create_params.rbs +2 -21
- data/sig/prelude_sdk/models/verification_create_response.rbs +40 -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 +4 -0
- data/sig/prelude_sdk/resources/transactional.rbs +1 -0
- metadata +16 -2
|
@@ -25,6 +25,13 @@ module PreludeSDK
|
|
|
25
25
|
# @return [String, nil]
|
|
26
26
|
optional :callback_url, String
|
|
27
27
|
|
|
28
|
+
# @!attribute context
|
|
29
|
+
# Context for replying to an inbound message. When provided, the message is sent
|
|
30
|
+
# as a WhatsApp reply within the 24-hour conversation window.
|
|
31
|
+
#
|
|
32
|
+
# @return [PreludeSDK::Models::NotifySendParams::Context, nil]
|
|
33
|
+
optional :context, -> { PreludeSDK::NotifySendParams::Context }
|
|
34
|
+
|
|
28
35
|
# @!attribute correlation_id
|
|
29
36
|
# A user-defined identifier to correlate this message with your internal systems.
|
|
30
37
|
# It is returned in the response and any webhook events that refer to this
|
|
@@ -33,6 +40,21 @@ module PreludeSDK
|
|
|
33
40
|
# @return [String, nil]
|
|
34
41
|
optional :correlation_id, String
|
|
35
42
|
|
|
43
|
+
# @!attribute document
|
|
44
|
+
# A media attachment to include in the message header. Supported on WhatsApp
|
|
45
|
+
# templates registered with a `DOCUMENT`, `IMAGE`, or `VIDEO` header. The media
|
|
46
|
+
# type is determined by the template's registered header format; send the matching
|
|
47
|
+
# file type for each.
|
|
48
|
+
#
|
|
49
|
+
# - `DOCUMENT` headers accept PDF and other document formats; `filename` is
|
|
50
|
+
# required and displayed to the recipient.
|
|
51
|
+
# - `IMAGE` headers accept `.png`, `.jpg`, `.jpeg`, and `.webp` URLs; `filename`
|
|
52
|
+
# is ignored.
|
|
53
|
+
# - `VIDEO` headers accept `.mp4` and `.3gp` URLs; `filename` is ignored.
|
|
54
|
+
#
|
|
55
|
+
# @return [PreludeSDK::Models::NotifySendParams::Document, nil]
|
|
56
|
+
optional :document, -> { PreludeSDK::NotifySendParams::Document }
|
|
57
|
+
|
|
36
58
|
# @!attribute expires_at
|
|
37
59
|
# The message expiration date in RFC3339 format. The message will not be sent if
|
|
38
60
|
# this time is reached.
|
|
@@ -70,13 +92,21 @@ module PreludeSDK
|
|
|
70
92
|
# @return [Time, nil]
|
|
71
93
|
optional :schedule_at, Time
|
|
72
94
|
|
|
95
|
+
# @!attribute text
|
|
96
|
+
# The reply message body. Required when `context.reply_to` is provided. Used for
|
|
97
|
+
# 2-way WhatsApp messaging to send free-form text replies within a conversation
|
|
98
|
+
# window.
|
|
99
|
+
#
|
|
100
|
+
# @return [String, nil]
|
|
101
|
+
optional :text, String
|
|
102
|
+
|
|
73
103
|
# @!attribute variables
|
|
74
104
|
# The variables to be replaced in the template.
|
|
75
105
|
#
|
|
76
106
|
# @return [Hash{Symbol=>String}, nil]
|
|
77
107
|
optional :variables, PreludeSDK::Internal::Type::HashOf[String]
|
|
78
108
|
|
|
79
|
-
# @!method initialize(template_id:, to:, callback_url: nil, correlation_id: nil, expires_at: nil, from: nil, locale: nil, preferred_channel: nil, schedule_at: nil, variables: nil, request_options: {})
|
|
109
|
+
# @!method initialize(template_id:, to:, callback_url: nil, context: nil, correlation_id: nil, document: nil, expires_at: nil, from: nil, locale: nil, preferred_channel: nil, schedule_at: nil, text: nil, variables: nil, request_options: {})
|
|
80
110
|
# Some parameter documentations has been truncated, see
|
|
81
111
|
# {PreludeSDK::Models::NotifySendParams} for more details.
|
|
82
112
|
#
|
|
@@ -86,8 +116,12 @@ module PreludeSDK
|
|
|
86
116
|
#
|
|
87
117
|
# @param callback_url [String] The URL where webhooks will be sent for message delivery events.
|
|
88
118
|
#
|
|
119
|
+
# @param context [PreludeSDK::Models::NotifySendParams::Context] Context for replying to an inbound message. When provided, the message is sent a
|
|
120
|
+
#
|
|
89
121
|
# @param correlation_id [String] A user-defined identifier to correlate this message with your internal systems.
|
|
90
122
|
#
|
|
123
|
+
# @param document [PreludeSDK::Models::NotifySendParams::Document] A media attachment to include in the message header. Supported on
|
|
124
|
+
#
|
|
91
125
|
# @param expires_at [Time] The message expiration date in RFC3339 format. The message will not be sent if t
|
|
92
126
|
#
|
|
93
127
|
# @param from [String] The Sender ID. Must be approved for your account.
|
|
@@ -98,16 +132,73 @@ module PreludeSDK
|
|
|
98
132
|
#
|
|
99
133
|
# @param schedule_at [Time] Schedule the message for future delivery in RFC3339 format. Marketing messages c
|
|
100
134
|
#
|
|
135
|
+
# @param text [String] The reply message body. Required when `context.reply_to` is provided. Used for 2
|
|
136
|
+
#
|
|
101
137
|
# @param variables [Hash{Symbol=>String}] The variables to be replaced in the template.
|
|
102
138
|
#
|
|
103
139
|
# @param request_options [PreludeSDK::RequestOptions, Hash{Symbol=>Object}]
|
|
104
140
|
|
|
141
|
+
class Context < PreludeSDK::Internal::Type::BaseModel
|
|
142
|
+
# @!attribute reply_to
|
|
143
|
+
# The inbound message ID (prefixed with `im_`) to reply to. This ID is provided in
|
|
144
|
+
# the `inbound.message.received` webhook event.
|
|
145
|
+
#
|
|
146
|
+
# @return [String]
|
|
147
|
+
required :reply_to, String
|
|
148
|
+
|
|
149
|
+
# @!method initialize(reply_to:)
|
|
150
|
+
# Some parameter documentations has been truncated, see
|
|
151
|
+
# {PreludeSDK::Models::NotifySendParams::Context} for more details.
|
|
152
|
+
#
|
|
153
|
+
# Context for replying to an inbound message. When provided, the message is sent
|
|
154
|
+
# as a WhatsApp reply within the 24-hour conversation window.
|
|
155
|
+
#
|
|
156
|
+
# @param reply_to [String] The inbound message ID (prefixed with `im_`) to reply to. This ID is provided in
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
class Document < PreludeSDK::Internal::Type::BaseModel
|
|
160
|
+
# @!attribute url
|
|
161
|
+
# HTTPS URL of the media file. The file extension must match the template's
|
|
162
|
+
# registered header format (PDF for DOCUMENT; PNG/JPG/JPEG/WEBP for IMAGE; MP4/3GP
|
|
163
|
+
# for VIDEO).
|
|
164
|
+
#
|
|
165
|
+
# @return [String]
|
|
166
|
+
required :url, String
|
|
167
|
+
|
|
168
|
+
# @!attribute filename
|
|
169
|
+
# Filename displayed to the recipient. Required for templates with a `DOCUMENT`
|
|
170
|
+
# header; ignored for `IMAGE` and `VIDEO` headers.
|
|
171
|
+
#
|
|
172
|
+
# @return [String, nil]
|
|
173
|
+
optional :filename, String
|
|
174
|
+
|
|
175
|
+
# @!method initialize(url:, filename: nil)
|
|
176
|
+
# Some parameter documentations has been truncated, see
|
|
177
|
+
# {PreludeSDK::Models::NotifySendParams::Document} for more details.
|
|
178
|
+
#
|
|
179
|
+
# A media attachment to include in the message header. Supported on WhatsApp
|
|
180
|
+
# templates registered with a `DOCUMENT`, `IMAGE`, or `VIDEO` header. The media
|
|
181
|
+
# type is determined by the template's registered header format; send the matching
|
|
182
|
+
# file type for each.
|
|
183
|
+
#
|
|
184
|
+
# - `DOCUMENT` headers accept PDF and other document formats; `filename` is
|
|
185
|
+
# required and displayed to the recipient.
|
|
186
|
+
# - `IMAGE` headers accept `.png`, `.jpg`, `.jpeg`, and `.webp` URLs; `filename`
|
|
187
|
+
# is ignored.
|
|
188
|
+
# - `VIDEO` headers accept `.mp4` and `.3gp` URLs; `filename` is ignored.
|
|
189
|
+
#
|
|
190
|
+
# @param url [String] HTTPS URL of the media file. The file extension must match the template's regist
|
|
191
|
+
#
|
|
192
|
+
# @param filename [String] Filename displayed to the recipient. Required for templates with a `DOCUMENT` he
|
|
193
|
+
end
|
|
194
|
+
|
|
105
195
|
# The preferred channel to be used in priority for message delivery. If the
|
|
106
196
|
# channel is unavailable, the system will fallback to other available channels.
|
|
107
197
|
module PreferredChannel
|
|
108
198
|
extend PreludeSDK::Internal::Type::Enum
|
|
109
199
|
|
|
110
200
|
SMS = :sms
|
|
201
|
+
RCS = :rcs
|
|
111
202
|
WHATSAPP = :whatsapp
|
|
112
203
|
|
|
113
204
|
# @!method self.values
|
|
@@ -52,6 +52,22 @@ module PreludeSDK
|
|
|
52
52
|
# @return [String, nil]
|
|
53
53
|
optional :correlation_id, String
|
|
54
54
|
|
|
55
|
+
# @!attribute encoding
|
|
56
|
+
# The SMS encoding type based on message content. GSM-7 supports standard
|
|
57
|
+
# characters (up to 160 chars per segment), while UCS-2 supports Unicode including
|
|
58
|
+
# emoji (up to 70 chars per segment). Only present for SMS messages.
|
|
59
|
+
#
|
|
60
|
+
# @return [Symbol, PreludeSDK::Models::NotifySendResponse::Encoding, nil]
|
|
61
|
+
optional :encoding, enum: -> { PreludeSDK::Models::NotifySendResponse::Encoding }
|
|
62
|
+
|
|
63
|
+
# @!attribute estimated_segment_count
|
|
64
|
+
# The estimated number of SMS segments for this message. This value is not
|
|
65
|
+
# contractual; the actual segment count will be determined after the SMS is sent
|
|
66
|
+
# by the provider. Only present for SMS messages.
|
|
67
|
+
#
|
|
68
|
+
# @return [Integer, nil]
|
|
69
|
+
optional :estimated_segment_count, Integer
|
|
70
|
+
|
|
55
71
|
# @!attribute from
|
|
56
72
|
# The Sender ID used for this message.
|
|
57
73
|
#
|
|
@@ -66,7 +82,7 @@ module PreludeSDK
|
|
|
66
82
|
# @return [Time, nil]
|
|
67
83
|
optional :schedule_at, Time
|
|
68
84
|
|
|
69
|
-
# @!method initialize(id:, created_at:, expires_at:, template_id:, to:, variables:, callback_url: nil, correlation_id: nil, from: nil, schedule_at: nil)
|
|
85
|
+
# @!method initialize(id:, created_at:, expires_at:, template_id:, to:, variables:, callback_url: nil, correlation_id: nil, encoding: nil, estimated_segment_count: nil, from: nil, schedule_at: nil)
|
|
70
86
|
# Some parameter documentations has been truncated, see
|
|
71
87
|
# {PreludeSDK::Models::NotifySendResponse} for more details.
|
|
72
88
|
#
|
|
@@ -86,9 +102,28 @@ module PreludeSDK
|
|
|
86
102
|
#
|
|
87
103
|
# @param correlation_id [String] A user-defined identifier to correlate this message with your internal systems.
|
|
88
104
|
#
|
|
105
|
+
# @param encoding [Symbol, PreludeSDK::Models::NotifySendResponse::Encoding] The SMS encoding type based on message content. GSM-7 supports standard characte
|
|
106
|
+
#
|
|
107
|
+
# @param estimated_segment_count [Integer] The estimated number of SMS segments for this message. This value is not contrac
|
|
108
|
+
#
|
|
89
109
|
# @param from [String] The Sender ID used for this message.
|
|
90
110
|
#
|
|
91
111
|
# @param schedule_at [Time] When the message will actually be sent in RFC3339 format with timezone offset. F
|
|
112
|
+
|
|
113
|
+
# The SMS encoding type based on message content. GSM-7 supports standard
|
|
114
|
+
# characters (up to 160 chars per segment), while UCS-2 supports Unicode including
|
|
115
|
+
# emoji (up to 70 chars per segment). Only present for SMS messages.
|
|
116
|
+
#
|
|
117
|
+
# @see PreludeSDK::Models::NotifySendResponse#encoding
|
|
118
|
+
module Encoding
|
|
119
|
+
extend PreludeSDK::Internal::Type::Enum
|
|
120
|
+
|
|
121
|
+
GSM_7 = :"GSM-7"
|
|
122
|
+
UCS_2 = :"UCS-2"
|
|
123
|
+
|
|
124
|
+
# @!method self.values
|
|
125
|
+
# @return [Array<Symbol>]
|
|
126
|
+
end
|
|
92
127
|
end
|
|
93
128
|
end
|
|
94
129
|
end
|
|
@@ -33,6 +33,21 @@ module PreludeSDK
|
|
|
33
33
|
# @return [String, nil]
|
|
34
34
|
optional :correlation_id, String
|
|
35
35
|
|
|
36
|
+
# @!attribute document
|
|
37
|
+
# A media attachment to include in the message header. Supported on WhatsApp
|
|
38
|
+
# templates registered with a `DOCUMENT`, `IMAGE`, or `VIDEO` header. The media
|
|
39
|
+
# type is determined by the template's registered header format; send the matching
|
|
40
|
+
# file type for each.
|
|
41
|
+
#
|
|
42
|
+
# - `DOCUMENT` headers accept PDF and other document formats; `filename` is
|
|
43
|
+
# required and displayed to the recipient.
|
|
44
|
+
# - `IMAGE` headers accept `.png`, `.jpg`, `.jpeg`, and `.webp` URLs; `filename`
|
|
45
|
+
# is ignored.
|
|
46
|
+
# - `VIDEO` headers accept `.mp4` and `.3gp` URLs; `filename` is ignored.
|
|
47
|
+
#
|
|
48
|
+
# @return [PreludeSDK::Models::TransactionalSendParams::Document, nil]
|
|
49
|
+
optional :document, -> { PreludeSDK::TransactionalSendParams::Document }
|
|
50
|
+
|
|
36
51
|
# @!attribute expires_at
|
|
37
52
|
# The message expiration date.
|
|
38
53
|
#
|
|
@@ -74,7 +89,7 @@ module PreludeSDK
|
|
|
74
89
|
# @return [Hash{Symbol=>String}, nil]
|
|
75
90
|
optional :variables, PreludeSDK::Internal::Type::HashOf[String]
|
|
76
91
|
|
|
77
|
-
# @!method initialize(template_id:, to:, callback_url: nil, correlation_id: nil, expires_at: nil, from: nil, locale: nil, preferred_channel: nil, variables: nil, request_options: {})
|
|
92
|
+
# @!method initialize(template_id:, to:, callback_url: nil, correlation_id: nil, document: nil, expires_at: nil, from: nil, locale: nil, preferred_channel: nil, variables: nil, request_options: {})
|
|
78
93
|
# Some parameter documentations has been truncated, see
|
|
79
94
|
# {PreludeSDK::Models::TransactionalSendParams} for more details.
|
|
80
95
|
#
|
|
@@ -86,6 +101,8 @@ module PreludeSDK
|
|
|
86
101
|
#
|
|
87
102
|
# @param correlation_id [String] A user-defined identifier to correlate this transactional message with. It is re
|
|
88
103
|
#
|
|
104
|
+
# @param document [PreludeSDK::Models::TransactionalSendParams::Document] A media attachment to include in the message header. Supported on
|
|
105
|
+
#
|
|
89
106
|
# @param expires_at [String] The message expiration date.
|
|
90
107
|
#
|
|
91
108
|
# @param from [String] The Sender ID.
|
|
@@ -98,6 +115,42 @@ module PreludeSDK
|
|
|
98
115
|
#
|
|
99
116
|
# @param request_options [PreludeSDK::RequestOptions, Hash{Symbol=>Object}]
|
|
100
117
|
|
|
118
|
+
class Document < PreludeSDK::Internal::Type::BaseModel
|
|
119
|
+
# @!attribute url
|
|
120
|
+
# HTTPS URL of the media file. The file extension must match the template's
|
|
121
|
+
# registered header format (PDF for DOCUMENT; PNG/JPG/JPEG/WEBP for IMAGE; MP4/3GP
|
|
122
|
+
# for VIDEO).
|
|
123
|
+
#
|
|
124
|
+
# @return [String]
|
|
125
|
+
required :url, String
|
|
126
|
+
|
|
127
|
+
# @!attribute filename
|
|
128
|
+
# Filename displayed to the recipient. Required for templates with a `DOCUMENT`
|
|
129
|
+
# header; ignored for `IMAGE` and `VIDEO` headers.
|
|
130
|
+
#
|
|
131
|
+
# @return [String, nil]
|
|
132
|
+
optional :filename, String
|
|
133
|
+
|
|
134
|
+
# @!method initialize(url:, filename: nil)
|
|
135
|
+
# Some parameter documentations has been truncated, see
|
|
136
|
+
# {PreludeSDK::Models::TransactionalSendParams::Document} for more details.
|
|
137
|
+
#
|
|
138
|
+
# A media attachment to include in the message header. Supported on WhatsApp
|
|
139
|
+
# templates registered with a `DOCUMENT`, `IMAGE`, or `VIDEO` header. The media
|
|
140
|
+
# type is determined by the template's registered header format; send the matching
|
|
141
|
+
# file type for each.
|
|
142
|
+
#
|
|
143
|
+
# - `DOCUMENT` headers accept PDF and other document formats; `filename` is
|
|
144
|
+
# required and displayed to the recipient.
|
|
145
|
+
# - `IMAGE` headers accept `.png`, `.jpg`, `.jpeg`, and `.webp` URLs; `filename`
|
|
146
|
+
# is ignored.
|
|
147
|
+
# - `VIDEO` headers accept `.mp4` and `.3gp` URLs; `filename` is ignored.
|
|
148
|
+
#
|
|
149
|
+
# @param url [String] HTTPS URL of the media file. The file extension must match the template's regist
|
|
150
|
+
#
|
|
151
|
+
# @param filename [String] Filename displayed to the recipient. Required for templates with a `DOCUMENT` he
|
|
152
|
+
end
|
|
153
|
+
|
|
101
154
|
# The preferred delivery channel for the message. When specified, the system will
|
|
102
155
|
# prioritize sending via the requested channel if the template is configured for
|
|
103
156
|
# it.
|
|
@@ -111,8 +111,8 @@ module PreludeSDK
|
|
|
111
111
|
|
|
112
112
|
class Options < PreludeSDK::Internal::Type::BaseModel
|
|
113
113
|
# @!attribute app_realm
|
|
114
|
-
# This allows
|
|
115
|
-
#
|
|
114
|
+
# This allows automatic OTP retrieval on mobile apps and web browsers. Supported
|
|
115
|
+
# platforms are Android (SMS Retriever API) and Web (WebOTP API).
|
|
116
116
|
#
|
|
117
117
|
# @return [PreludeSDK::Models::VerificationCreateParams::Options::AppRealm, nil]
|
|
118
118
|
optional :app_realm, -> { PreludeSDK::VerificationCreateParams::Options::AppRealm }
|
|
@@ -140,12 +140,6 @@ module PreludeSDK
|
|
|
140
140
|
# @return [String, nil]
|
|
141
141
|
optional :custom_code, String
|
|
142
142
|
|
|
143
|
-
# @!attribute integration
|
|
144
|
-
# The integration that triggered the verification.
|
|
145
|
-
#
|
|
146
|
-
# @return [Symbol, PreludeSDK::Models::VerificationCreateParams::Options::Integration, nil]
|
|
147
|
-
optional :integration, enum: -> { PreludeSDK::VerificationCreateParams::Options::Integration }
|
|
148
|
-
|
|
149
143
|
# @!attribute locale
|
|
150
144
|
# A BCP-47 formatted locale string with the language the text message will be sent
|
|
151
145
|
# to. If there's no locale set, the language will be determined by the country
|
|
@@ -195,13 +189,13 @@ module PreludeSDK
|
|
|
195
189
|
# @return [Hash{Symbol=>String}, nil]
|
|
196
190
|
optional :variables, PreludeSDK::Internal::Type::HashOf[String]
|
|
197
191
|
|
|
198
|
-
# @!method initialize(app_realm: nil, callback_url: nil, code_size: nil, custom_code: nil,
|
|
192
|
+
# @!method initialize(app_realm: nil, callback_url: nil, code_size: nil, custom_code: nil, locale: nil, verification_method: nil, preferred_channel: nil, sender_id: nil, template_id: nil, variables: nil)
|
|
199
193
|
# Some parameter documentations has been truncated, see
|
|
200
194
|
# {PreludeSDK::Models::VerificationCreateParams::Options} for more details.
|
|
201
195
|
#
|
|
202
196
|
# Verification options
|
|
203
197
|
#
|
|
204
|
-
# @param app_realm [PreludeSDK::Models::VerificationCreateParams::Options::AppRealm] This allows
|
|
198
|
+
# @param app_realm [PreludeSDK::Models::VerificationCreateParams::Options::AppRealm] This allows automatic OTP retrieval on mobile apps and web browsers. Supported p
|
|
205
199
|
#
|
|
206
200
|
# @param callback_url [String] The URL where webhooks will be sent when verification events occur, including ve
|
|
207
201
|
#
|
|
@@ -209,8 +203,6 @@ module PreludeSDK
|
|
|
209
203
|
#
|
|
210
204
|
# @param custom_code [String] The custom code to use for OTP verification. To use the custom code feature, con
|
|
211
205
|
#
|
|
212
|
-
# @param integration [Symbol, PreludeSDK::Models::VerificationCreateParams::Options::Integration] The integration that triggered the verification.
|
|
213
|
-
#
|
|
214
206
|
# @param locale [String] A BCP-47 formatted locale string with the language the text message will be sent
|
|
215
207
|
#
|
|
216
208
|
# @param verification_method [Symbol, PreludeSDK::Models::VerificationCreateParams::Options::Method] The method used for verifying this phone number. The 'voice' option provides an
|
|
@@ -226,16 +218,19 @@ module PreludeSDK
|
|
|
226
218
|
# @see PreludeSDK::Models::VerificationCreateParams::Options#app_realm
|
|
227
219
|
class AppRealm < PreludeSDK::Internal::Type::BaseModel
|
|
228
220
|
# @!attribute platform
|
|
229
|
-
# The platform
|
|
230
|
-
# "
|
|
221
|
+
# The platform for automatic OTP retrieval. Use "android" for the SMS Retriever
|
|
222
|
+
# API or "web" for the WebOTP API.
|
|
231
223
|
#
|
|
232
224
|
# @return [Symbol, PreludeSDK::Models::VerificationCreateParams::Options::AppRealm::Platform]
|
|
233
225
|
required :platform, enum: -> { PreludeSDK::VerificationCreateParams::Options::AppRealm::Platform }
|
|
234
226
|
|
|
235
227
|
# @!attribute value
|
|
236
|
-
# The
|
|
237
|
-
#
|
|
238
|
-
#
|
|
228
|
+
# The value depends on the platform:
|
|
229
|
+
#
|
|
230
|
+
# - For Android: The SMS Retriever API hash code (11 characters). See
|
|
231
|
+
# [Google documentation](https://developers.google.com/identity/sms-retriever/verify#computing_your_apps_hash_string).
|
|
232
|
+
# - For Web: The origin domain (e.g., "example.com" or "www.example.com"). See
|
|
233
|
+
# [WebOTP API documentation](https://developer.mozilla.org/en-US/docs/Web/API/WebOTP_API).
|
|
239
234
|
#
|
|
240
235
|
# @return [String]
|
|
241
236
|
required :value, String
|
|
@@ -245,40 +240,28 @@ module PreludeSDK
|
|
|
245
240
|
# {PreludeSDK::Models::VerificationCreateParams::Options::AppRealm} for more
|
|
246
241
|
# details.
|
|
247
242
|
#
|
|
248
|
-
# This allows
|
|
249
|
-
#
|
|
243
|
+
# This allows automatic OTP retrieval on mobile apps and web browsers. Supported
|
|
244
|
+
# platforms are Android (SMS Retriever API) and Web (WebOTP API).
|
|
250
245
|
#
|
|
251
|
-
# @param platform [Symbol, PreludeSDK::Models::VerificationCreateParams::Options::AppRealm::Platform] The platform
|
|
246
|
+
# @param platform [Symbol, PreludeSDK::Models::VerificationCreateParams::Options::AppRealm::Platform] The platform for automatic OTP retrieval. Use "android" for the SMS Retriever AP
|
|
252
247
|
#
|
|
253
|
-
# @param value [String] The
|
|
248
|
+
# @param value [String] The value depends on the platform:
|
|
254
249
|
|
|
255
|
-
# The platform
|
|
256
|
-
# "
|
|
250
|
+
# The platform for automatic OTP retrieval. Use "android" for the SMS Retriever
|
|
251
|
+
# API or "web" for the WebOTP API.
|
|
257
252
|
#
|
|
258
253
|
# @see PreludeSDK::Models::VerificationCreateParams::Options::AppRealm#platform
|
|
259
254
|
module Platform
|
|
260
255
|
extend PreludeSDK::Internal::Type::Enum
|
|
261
256
|
|
|
262
257
|
ANDROID = :android
|
|
258
|
+
WEB = :web
|
|
263
259
|
|
|
264
260
|
# @!method self.values
|
|
265
261
|
# @return [Array<Symbol>]
|
|
266
262
|
end
|
|
267
263
|
end
|
|
268
264
|
|
|
269
|
-
# The integration that triggered the verification.
|
|
270
|
-
#
|
|
271
|
-
# @see PreludeSDK::Models::VerificationCreateParams::Options#integration
|
|
272
|
-
module Integration
|
|
273
|
-
extend PreludeSDK::Internal::Type::Enum
|
|
274
|
-
|
|
275
|
-
AUTH0 = :auth0
|
|
276
|
-
SUPABASE = :supabase
|
|
277
|
-
|
|
278
|
-
# @!method self.values
|
|
279
|
-
# @return [Array<Symbol>]
|
|
280
|
-
end
|
|
281
|
-
|
|
282
265
|
# The method used for verifying this phone number. The 'voice' option provides an
|
|
283
266
|
# accessible alternative for visually impaired users by delivering the
|
|
284
267
|
# verification code through a phone call rather than a text message. It also
|
|
@@ -325,8 +308,9 @@ module PreludeSDK
|
|
|
325
308
|
optional :app_version, String
|
|
326
309
|
|
|
327
310
|
# @!attribute device_id
|
|
328
|
-
#
|
|
329
|
-
#
|
|
311
|
+
# A unique ID for the user's device. You should ensure that each user device has a
|
|
312
|
+
# unique `device_id` value. Ideally, for Android, this corresponds to the
|
|
313
|
+
# `ANDROID_ID` and for iOS, this corresponds to the `identifierForVendor`.
|
|
330
314
|
#
|
|
331
315
|
# @return [String, nil]
|
|
332
316
|
optional :device_id, String
|
|
@@ -344,23 +328,26 @@ module PreludeSDK
|
|
|
344
328
|
optional :device_platform, enum: -> { PreludeSDK::VerificationCreateParams::Signals::DevicePlatform }
|
|
345
329
|
|
|
346
330
|
# @!attribute ip
|
|
347
|
-
# The IP address of the user's device.
|
|
331
|
+
# The public IP v4 or v6 address of the end-user's device. You should collect this
|
|
332
|
+
# from your backend. If your backend is behind a proxy, use the `X-Forwarded-For`,
|
|
333
|
+
# `Forwarded`, `True-Client-IP`, `CF-Connecting-IP` or an equivalent header to get
|
|
334
|
+
# the actual public IP of the end-user's device.
|
|
348
335
|
#
|
|
349
336
|
# @return [String, nil]
|
|
350
337
|
optional :ip, String
|
|
351
338
|
|
|
352
339
|
# @!attribute is_trusted_user
|
|
353
|
-
# This signal should
|
|
354
|
-
# genuine. Contact us to discuss your use case. For more details, refer to
|
|
340
|
+
# This signal should indicate a higher level of trust, explicitly stating that the
|
|
341
|
+
# user is genuine. Contact us to discuss your use case. For more details, refer to
|
|
355
342
|
# [Signals](/verify/v2/documentation/prevent-fraud#signals).
|
|
356
343
|
#
|
|
357
344
|
# @return [Boolean, nil]
|
|
358
345
|
optional :is_trusted_user, PreludeSDK::Internal::Type::Boolean
|
|
359
346
|
|
|
360
347
|
# @!attribute ja4_fingerprint
|
|
361
|
-
# The JA4 fingerprint observed for the connection. Prelude will infer
|
|
362
|
-
# automatically when
|
|
363
|
-
#
|
|
348
|
+
# The JA4 fingerprint observed for the end-user's connection. Prelude will infer
|
|
349
|
+
# it automatically when you use our Frontend SDKs (which use Prelude's edge
|
|
350
|
+
# network), but you can also forward the value if you terminate TLS yourself.
|
|
364
351
|
#
|
|
365
352
|
# @return [String, nil]
|
|
366
353
|
optional :ja4_fingerprint, String
|
|
@@ -388,17 +375,17 @@ module PreludeSDK
|
|
|
388
375
|
#
|
|
389
376
|
# @param app_version [String] The version of your application.
|
|
390
377
|
#
|
|
391
|
-
# @param device_id [String]
|
|
378
|
+
# @param device_id [String] A unique ID for the user's device. You should ensure that each user device has a
|
|
392
379
|
#
|
|
393
380
|
# @param device_model [String] The model of the user's device.
|
|
394
381
|
#
|
|
395
382
|
# @param device_platform [Symbol, PreludeSDK::Models::VerificationCreateParams::Signals::DevicePlatform] The type of the user's device.
|
|
396
383
|
#
|
|
397
|
-
# @param ip [String] The IP address of the user's device.
|
|
384
|
+
# @param ip [String] The public IP v4 or v6 address of the end-user's device. You should collect this
|
|
398
385
|
#
|
|
399
|
-
# @param is_trusted_user [Boolean] This signal should
|
|
386
|
+
# @param is_trusted_user [Boolean] This signal should indicate a higher level of trust, explicitly stating that the
|
|
400
387
|
#
|
|
401
|
-
# @param ja4_fingerprint [String] The JA4 fingerprint observed for the connection. Prelude will infer
|
|
388
|
+
# @param ja4_fingerprint [String] The JA4 fingerprint observed for the end-user's connection. Prelude will infer i
|
|
402
389
|
#
|
|
403
390
|
# @param os_version [String] The version of the user's device operating system.
|
|
404
391
|
#
|
|
@@ -21,6 +21,13 @@ module PreludeSDK
|
|
|
21
21
|
# @!attribute status
|
|
22
22
|
# The status of the verification.
|
|
23
23
|
#
|
|
24
|
+
# - `success` - A new verification window was created.
|
|
25
|
+
# - `retry` - A new attempt was created for an existing verification window.
|
|
26
|
+
# - `challenged` - The verification is suspicious and is restricted to non-SMS and
|
|
27
|
+
# non-voice channels only. This mode must be enabled for your customer account
|
|
28
|
+
# by Prelude support.
|
|
29
|
+
# - `blocked` - The verification was blocked.
|
|
30
|
+
#
|
|
24
31
|
# @return [Symbol, PreludeSDK::Models::VerificationCreateResponse::Status]
|
|
25
32
|
required :status, enum: -> { PreludeSDK::Models::VerificationCreateResponse::Status }
|
|
26
33
|
|
|
@@ -62,13 +69,43 @@ module PreludeSDK
|
|
|
62
69
|
# @return [String, nil]
|
|
63
70
|
optional :request_id, String
|
|
64
71
|
|
|
72
|
+
# @!attribute risk_factors
|
|
73
|
+
# The risk factors that contributed to the verification being blocked. Only
|
|
74
|
+
# present when status is "blocked" and the anti-fraud system detected specific
|
|
75
|
+
# risk signals.
|
|
76
|
+
#
|
|
77
|
+
# - `behavioral_pattern` - The phone number past behavior during verification
|
|
78
|
+
# flows exhibits suspicious patterns.
|
|
79
|
+
# - `device_attribute` - The device exhibits characteristics associated with
|
|
80
|
+
# suspicious activity patterns.
|
|
81
|
+
# - `fraud_database` - The phone number has been flagged as suspicious in one or
|
|
82
|
+
# more of our fraud databases.
|
|
83
|
+
# - `location_discrepancy` - The phone number prefix and IP address discrepancy
|
|
84
|
+
# indicates potential fraud.
|
|
85
|
+
# - `network_fingerprint` - The network connection exhibits characteristics
|
|
86
|
+
# associated with suspicious activity patterns.
|
|
87
|
+
# - `poor_conversion_history` - The phone number has a history of poorly
|
|
88
|
+
# converting to a verified phone number.
|
|
89
|
+
# - `prefix_concentration` - The phone number is part of a range known to be
|
|
90
|
+
# associated with suspicious activity patterns.
|
|
91
|
+
# - `suspected_request_tampering` - The SDK signature is invalid and the request
|
|
92
|
+
# is considered to be tampered with.
|
|
93
|
+
# - `suspicious_ip_address` - The IP address is deemed to be associated with
|
|
94
|
+
# suspicious activity patterns.
|
|
95
|
+
# - `temporary_phone_number` - The phone number is known to be a temporary or
|
|
96
|
+
# disposable number.
|
|
97
|
+
#
|
|
98
|
+
# @return [Array<Symbol, PreludeSDK::Models::VerificationCreateResponse::RiskFactor>, nil]
|
|
99
|
+
optional :risk_factors,
|
|
100
|
+
-> { PreludeSDK::Internal::Type::ArrayOf[enum: PreludeSDK::Models::VerificationCreateResponse::RiskFactor] }
|
|
101
|
+
|
|
65
102
|
# @!attribute silent
|
|
66
103
|
# The silent verification specific properties.
|
|
67
104
|
#
|
|
68
105
|
# @return [PreludeSDK::Models::VerificationCreateResponse::Silent, nil]
|
|
69
106
|
optional :silent, -> { PreludeSDK::Models::VerificationCreateResponse::Silent }
|
|
70
107
|
|
|
71
|
-
# @!method initialize(id:, verification_method:, status:, channels: nil, metadata: nil, reason: nil, request_id: nil, silent: nil)
|
|
108
|
+
# @!method initialize(id:, verification_method:, status:, channels: nil, metadata: nil, reason: nil, request_id: nil, risk_factors: nil, silent: nil)
|
|
72
109
|
# Some parameter documentations has been truncated, see
|
|
73
110
|
# {PreludeSDK::Models::VerificationCreateResponse} for more details.
|
|
74
111
|
#
|
|
@@ -86,6 +123,8 @@ module PreludeSDK
|
|
|
86
123
|
#
|
|
87
124
|
# @param request_id [String]
|
|
88
125
|
#
|
|
126
|
+
# @param risk_factors [Array<Symbol, PreludeSDK::Models::VerificationCreateResponse::RiskFactor>] The risk factors that contributed to the verification being blocked. Only presen
|
|
127
|
+
#
|
|
89
128
|
# @param silent [PreludeSDK::Models::VerificationCreateResponse::Silent] The silent verification specific properties.
|
|
90
129
|
|
|
91
130
|
# The method used for verifying this phone number.
|
|
@@ -105,12 +144,20 @@ module PreludeSDK
|
|
|
105
144
|
|
|
106
145
|
# The status of the verification.
|
|
107
146
|
#
|
|
147
|
+
# - `success` - A new verification window was created.
|
|
148
|
+
# - `retry` - A new attempt was created for an existing verification window.
|
|
149
|
+
# - `challenged` - The verification is suspicious and is restricted to non-SMS and
|
|
150
|
+
# non-voice channels only. This mode must be enabled for your customer account
|
|
151
|
+
# by Prelude support.
|
|
152
|
+
# - `blocked` - The verification was blocked.
|
|
153
|
+
#
|
|
108
154
|
# @see PreludeSDK::Models::VerificationCreateResponse#status
|
|
109
155
|
module Status
|
|
110
156
|
extend PreludeSDK::Internal::Type::Enum
|
|
111
157
|
|
|
112
158
|
SUCCESS = :success
|
|
113
159
|
RETRY = :retry
|
|
160
|
+
CHALLENGED = :challenged
|
|
114
161
|
BLOCKED = :blocked
|
|
115
162
|
|
|
116
163
|
# @!method self.values
|
|
@@ -183,6 +230,24 @@ module PreludeSDK
|
|
|
183
230
|
# @return [Array<Symbol>]
|
|
184
231
|
end
|
|
185
232
|
|
|
233
|
+
module RiskFactor
|
|
234
|
+
extend PreludeSDK::Internal::Type::Enum
|
|
235
|
+
|
|
236
|
+
BEHAVIORAL_PATTERN = :behavioral_pattern
|
|
237
|
+
DEVICE_ATTRIBUTE = :device_attribute
|
|
238
|
+
FRAUD_DATABASE = :fraud_database
|
|
239
|
+
LOCATION_DISCREPANCY = :location_discrepancy
|
|
240
|
+
NETWORK_FINGERPRINT = :network_fingerprint
|
|
241
|
+
POOR_CONVERSION_HISTORY = :poor_conversion_history
|
|
242
|
+
PREFIX_CONCENTRATION = :prefix_concentration
|
|
243
|
+
SUSPECTED_REQUEST_TAMPERING = :suspected_request_tampering
|
|
244
|
+
SUSPICIOUS_IP_ADDRESS = :suspicious_ip_address
|
|
245
|
+
TEMPORARY_PHONE_NUMBER = :temporary_phone_number
|
|
246
|
+
|
|
247
|
+
# @!method self.values
|
|
248
|
+
# @return [Array<Symbol>]
|
|
249
|
+
end
|
|
250
|
+
|
|
186
251
|
# @see PreludeSDK::Models::VerificationCreateResponse#silent
|
|
187
252
|
class Silent < PreludeSDK::Internal::Type::BaseModel
|
|
188
253
|
# @!attribute request_url
|
|
@@ -7,13 +7,20 @@ module PreludeSDK
|
|
|
7
7
|
extend PreludeSDK::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include PreludeSDK::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
|
+
# @!attribute action
|
|
11
|
+
#
|
|
12
|
+
# @return [Symbol, PreludeSDK::Models::VerificationManagementDeletePhoneNumberParams::Action]
|
|
13
|
+
required :action, enum: -> { PreludeSDK::VerificationManagementDeletePhoneNumberParams::Action }
|
|
14
|
+
|
|
10
15
|
# @!attribute phone_number
|
|
11
16
|
# An E.164 formatted phone number to remove from the list.
|
|
12
17
|
#
|
|
13
18
|
# @return [String]
|
|
14
19
|
required :phone_number, String
|
|
15
20
|
|
|
16
|
-
# @!method initialize(phone_number:, request_options: {})
|
|
21
|
+
# @!method initialize(action:, phone_number:, request_options: {})
|
|
22
|
+
# @param action [Symbol, PreludeSDK::Models::VerificationManagementDeletePhoneNumberParams::Action]
|
|
23
|
+
#
|
|
17
24
|
# @param phone_number [String] An E.164 formatted phone number to remove from the list.
|
|
18
25
|
#
|
|
19
26
|
# @param request_options [PreludeSDK::RequestOptions, Hash{Symbol=>Object}]
|
|
@@ -7,7 +7,13 @@ module PreludeSDK
|
|
|
7
7
|
extend PreludeSDK::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include PreludeSDK::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
|
-
# @!
|
|
10
|
+
# @!attribute action
|
|
11
|
+
#
|
|
12
|
+
# @return [Symbol, PreludeSDK::Models::VerificationManagementListPhoneNumbersParams::Action]
|
|
13
|
+
required :action, enum: -> { PreludeSDK::VerificationManagementListPhoneNumbersParams::Action }
|
|
14
|
+
|
|
15
|
+
# @!method initialize(action:, request_options: {})
|
|
16
|
+
# @param action [Symbol, PreludeSDK::Models::VerificationManagementListPhoneNumbersParams::Action]
|
|
11
17
|
# @param request_options [PreludeSDK::RequestOptions, Hash{Symbol=>Object}]
|
|
12
18
|
|
|
13
19
|
module Action
|
|
@@ -7,13 +7,20 @@ module PreludeSDK
|
|
|
7
7
|
extend PreludeSDK::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include PreludeSDK::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
|
+
# @!attribute action
|
|
11
|
+
#
|
|
12
|
+
# @return [Symbol, PreludeSDK::Models::VerificationManagementSetPhoneNumberParams::Action]
|
|
13
|
+
required :action, enum: -> { PreludeSDK::VerificationManagementSetPhoneNumberParams::Action }
|
|
14
|
+
|
|
10
15
|
# @!attribute phone_number
|
|
11
16
|
# An E.164 formatted phone number to add to the list.
|
|
12
17
|
#
|
|
13
18
|
# @return [String]
|
|
14
19
|
required :phone_number, String
|
|
15
20
|
|
|
16
|
-
# @!method initialize(phone_number:, request_options: {})
|
|
21
|
+
# @!method initialize(action:, phone_number:, request_options: {})
|
|
22
|
+
# @param action [Symbol, PreludeSDK::Models::VerificationManagementSetPhoneNumberParams::Action]
|
|
23
|
+
#
|
|
17
24
|
# @param phone_number [String] An E.164 formatted phone number to add to the list.
|
|
18
25
|
#
|
|
19
26
|
# @param request_options [PreludeSDK::RequestOptions, Hash{Symbol=>Object}]
|