prelude-sdk 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +48 -0
- data/README.md +1 -1
- data/lib/prelude_sdk/client.rb +7 -0
- data/lib/prelude_sdk/internal/transport/pooled_net_requester.rb +13 -11
- data/lib/prelude_sdk/internal/util.rb +39 -3
- data/lib/prelude_sdk/models/lookup_lookup_params.rb +9 -1
- data/lib/prelude_sdk/models/notify_get_subscription_config_params.rb +7 -1
- data/lib/prelude_sdk/models/notify_get_subscription_phone_number_params.rb +7 -1
- data/lib/prelude_sdk/models/notify_list_subscription_phone_number_events_params.rb +8 -1
- data/lib/prelude_sdk/models/notify_list_subscription_phone_numbers_params.rb +8 -1
- data/lib/prelude_sdk/models/notify_send_batch_params.rb +32 -1
- data/lib/prelude_sdk/models/notify_send_batch_response.rb +39 -1
- data/lib/prelude_sdk/models/notify_send_params.rb +32 -1
- data/lib/prelude_sdk/models/notify_send_response.rb +36 -1
- data/lib/prelude_sdk/models/transactional_send_params.rb +32 -1
- data/lib/prelude_sdk/models/verification_create_params.rb +35 -48
- data/lib/prelude_sdk/models/verification_create_response.rb +15 -0
- data/lib/prelude_sdk/models/verification_management_delete_phone_number_params.rb +8 -1
- data/lib/prelude_sdk/models/verification_management_list_phone_numbers_params.rb +7 -1
- data/lib/prelude_sdk/models/verification_management_set_phone_number_params.rb +8 -1
- data/lib/prelude_sdk/models/watch_predict_params.rb +16 -12
- data/lib/prelude_sdk/models/watch_predict_response.rb +51 -1
- data/lib/prelude_sdk/models/watch_send_feedbacks_params.rb +1 -128
- data/lib/prelude_sdk/resources/lookup.rb +4 -1
- data/lib/prelude_sdk/resources/notify.rb +13 -5
- data/lib/prelude_sdk/resources/transactional.rb +4 -1
- data/lib/prelude_sdk/resources/verification.rb +1 -0
- data/lib/prelude_sdk/resources/verification_management.rb +1 -0
- data/lib/prelude_sdk/resources/watch.rb +1 -0
- data/lib/prelude_sdk/version.rb +1 -1
- data/rbi/prelude_sdk/client.rbi +7 -0
- data/rbi/prelude_sdk/internal/util.rbi +21 -1
- data/rbi/prelude_sdk/models/lookup_lookup_params.rbi +8 -0
- data/rbi/prelude_sdk/models/notify_get_subscription_config_params.rbi +13 -5
- data/rbi/prelude_sdk/models/notify_get_subscription_phone_number_params.rbi +10 -2
- data/rbi/prelude_sdk/models/notify_list_subscription_phone_number_events_params.rbi +6 -0
- data/rbi/prelude_sdk/models/notify_list_subscription_phone_numbers_params.rbi +6 -0
- data/rbi/prelude_sdk/models/notify_send_batch_params.rbi +50 -0
- data/rbi/prelude_sdk/models/notify_send_batch_response.rbi +80 -0
- data/rbi/prelude_sdk/models/notify_send_params.rbi +48 -0
- data/rbi/prelude_sdk/models/notify_send_response.rbi +75 -0
- data/rbi/prelude_sdk/models/transactional_send_params.rbi +50 -0
- data/rbi/prelude_sdk/models/verification_create_params.rbi +53 -93
- data/rbi/prelude_sdk/models/verification_create_response.rbi +26 -0
- data/rbi/prelude_sdk/models/verification_management_delete_phone_number_params.rbi +16 -1
- data/rbi/prelude_sdk/models/verification_management_list_phone_numbers_params.rbi +21 -4
- data/rbi/prelude_sdk/models/verification_management_set_phone_number_params.rbi +16 -1
- data/rbi/prelude_sdk/models/watch_predict_params.rbi +24 -16
- data/rbi/prelude_sdk/models/watch_predict_response.rbi +152 -3
- data/rbi/prelude_sdk/models/watch_send_feedbacks_params.rbi +3 -243
- data/rbi/prelude_sdk/resources/lookup.rbi +2 -0
- data/rbi/prelude_sdk/resources/notify.rbi +9 -0
- data/rbi/prelude_sdk/resources/transactional.rbi +5 -0
- data/rbi/prelude_sdk/resources/verification.rbi +1 -0
- data/rbi/prelude_sdk/resources/verification_management.rbi +1 -0
- data/rbi/prelude_sdk/resources/watch.rbi +1 -0
- data/sig/prelude_sdk/internal/util.rbs +10 -0
- data/sig/prelude_sdk/models/lookup_lookup_params.rbs +8 -1
- data/sig/prelude_sdk/models/notify_get_subscription_config_params.rbs +11 -3
- data/sig/prelude_sdk/models/notify_get_subscription_phone_number_params.rbs +6 -1
- data/sig/prelude_sdk/models/notify_list_subscription_phone_number_events_params.rbs +10 -1
- data/sig/prelude_sdk/models/notify_list_subscription_phone_numbers_params.rbs +5 -0
- data/sig/prelude_sdk/models/notify_send_batch_params.rbs +21 -0
- data/sig/prelude_sdk/models/notify_send_batch_response.rbs +27 -0
- data/sig/prelude_sdk/models/notify_send_params.rbs +21 -0
- data/sig/prelude_sdk/models/notify_send_response.rbs +27 -0
- data/sig/prelude_sdk/models/transactional_send_params.rbs +21 -0
- data/sig/prelude_sdk/models/verification_create_params.rbs +2 -21
- data/sig/prelude_sdk/models/verification_create_response.rbs +2 -1
- data/sig/prelude_sdk/models/verification_management_delete_phone_number_params.rbs +9 -1
- data/sig/prelude_sdk/models/verification_management_list_phone_numbers_params.rbs +14 -3
- data/sig/prelude_sdk/models/verification_management_set_phone_number_params.rbs +9 -1
- data/sig/prelude_sdk/models/watch_predict_response.rbs +41 -3
- data/sig/prelude_sdk/models/watch_send_feedbacks_params.rbs +3 -110
- data/sig/prelude_sdk/resources/notify.rbs +2 -0
- data/sig/prelude_sdk/resources/transactional.rbs +1 -0
- metadata +16 -2
|
@@ -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
|
#
|
|
@@ -70,10 +71,11 @@ module PreludeSDK
|
|
|
70
71
|
# @see PreludeSDK::Models::NotifyListSubscriptionConfigsParams
|
|
71
72
|
def list_subscription_configs(params = {})
|
|
72
73
|
parsed, options = PreludeSDK::NotifyListSubscriptionConfigsParams.dump_request(params)
|
|
74
|
+
query = PreludeSDK::Internal::Util.encode_query_params(parsed)
|
|
73
75
|
@client.request(
|
|
74
76
|
method: :get,
|
|
75
77
|
path: "v2/notify/management/subscriptions",
|
|
76
|
-
query:
|
|
78
|
+
query: query,
|
|
77
79
|
model: PreludeSDK::Models::NotifyListSubscriptionConfigsResponse,
|
|
78
80
|
options: options
|
|
79
81
|
)
|
|
@@ -101,6 +103,7 @@ module PreludeSDK
|
|
|
101
103
|
# @see PreludeSDK::Models::NotifyListSubscriptionPhoneNumberEventsParams
|
|
102
104
|
def list_subscription_phone_number_events(phone_number, params)
|
|
103
105
|
parsed, options = PreludeSDK::NotifyListSubscriptionPhoneNumberEventsParams.dump_request(params)
|
|
106
|
+
query = PreludeSDK::Internal::Util.encode_query_params(parsed)
|
|
104
107
|
config_id =
|
|
105
108
|
parsed.delete(:config_id) do
|
|
106
109
|
raise ArgumentError.new("missing required path argument #{_1}")
|
|
@@ -112,7 +115,7 @@ module PreludeSDK
|
|
|
112
115
|
config_id,
|
|
113
116
|
phone_number
|
|
114
117
|
],
|
|
115
|
-
query:
|
|
118
|
+
query: query,
|
|
116
119
|
model: PreludeSDK::Models::NotifyListSubscriptionPhoneNumberEventsResponse,
|
|
117
120
|
options: options
|
|
118
121
|
)
|
|
@@ -140,10 +143,11 @@ module PreludeSDK
|
|
|
140
143
|
# @see PreludeSDK::Models::NotifyListSubscriptionPhoneNumbersParams
|
|
141
144
|
def list_subscription_phone_numbers(config_id, params = {})
|
|
142
145
|
parsed, options = PreludeSDK::NotifyListSubscriptionPhoneNumbersParams.dump_request(params)
|
|
146
|
+
query = PreludeSDK::Internal::Util.encode_query_params(parsed)
|
|
143
147
|
@client.request(
|
|
144
148
|
method: :get,
|
|
145
149
|
path: ["v2/notify/management/subscriptions/%1$s/phone_numbers", config_id],
|
|
146
|
-
query:
|
|
150
|
+
query: query,
|
|
147
151
|
model: PreludeSDK::Models::NotifyListSubscriptionPhoneNumbersResponse,
|
|
148
152
|
options: options
|
|
149
153
|
)
|
|
@@ -155,7 +159,7 @@ module PreludeSDK
|
|
|
155
159
|
# Send transactional and marketing messages to your users via SMS and WhatsApp
|
|
156
160
|
# with automatic compliance enforcement.
|
|
157
161
|
#
|
|
158
|
-
# @overload send_(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: {})
|
|
162
|
+
# @overload send_(template_id:, to:, callback_url: nil, correlation_id: nil, document: nil, expires_at: nil, from: nil, locale: nil, preferred_channel: nil, schedule_at: nil, variables: nil, request_options: {})
|
|
159
163
|
#
|
|
160
164
|
# @param template_id [String] The template identifier configured by your Customer Success team.
|
|
161
165
|
#
|
|
@@ -165,6 +169,8 @@ module PreludeSDK
|
|
|
165
169
|
#
|
|
166
170
|
# @param correlation_id [String] A user-defined identifier to correlate this message with your internal systems.
|
|
167
171
|
#
|
|
172
|
+
# @param document [PreludeSDK::Models::NotifySendParams::Document] A document to attach to the message. Only supported on WhatsApp templates that h
|
|
173
|
+
#
|
|
168
174
|
# @param expires_at [Time] The message expiration date in RFC3339 format. The message will not be sent if t
|
|
169
175
|
#
|
|
170
176
|
# @param from [String] The Sender ID. Must be approved for your account.
|
|
@@ -198,7 +204,7 @@ module PreludeSDK
|
|
|
198
204
|
#
|
|
199
205
|
# Send the same message to multiple recipients in a single request.
|
|
200
206
|
#
|
|
201
|
-
# @overload send_batch(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: {})
|
|
207
|
+
# @overload send_batch(template_id:, to:, callback_url: nil, correlation_id: nil, document: nil, expires_at: nil, from: nil, locale: nil, preferred_channel: nil, schedule_at: nil, variables: nil, request_options: {})
|
|
202
208
|
#
|
|
203
209
|
# @param template_id [String] The template identifier configured by your Customer Success team.
|
|
204
210
|
#
|
|
@@ -208,6 +214,8 @@ module PreludeSDK
|
|
|
208
214
|
#
|
|
209
215
|
# @param correlation_id [String] A user-defined identifier to correlate this request with your internal systems.
|
|
210
216
|
#
|
|
217
|
+
# @param document [PreludeSDK::Models::NotifySendBatchParams::Document] A document to attach to the message. Only supported on WhatsApp templates that h
|
|
218
|
+
#
|
|
211
219
|
# @param expires_at [Time] The message expiration date in RFC3339 format. Messages will not be sent after t
|
|
212
220
|
#
|
|
213
221
|
# @param from [String] The Sender ID. Must be approved for your account.
|
|
@@ -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
|
# @deprecated
|
|
7
8
|
#
|
|
@@ -11,7 +12,7 @@ module PreludeSDK
|
|
|
11
12
|
# Legacy route maintained for backward compatibility. Migrate to `/v2/notify`
|
|
12
13
|
# instead.
|
|
13
14
|
#
|
|
14
|
-
# @overload send_(template_id:, to:, callback_url: nil, correlation_id: nil, expires_at: nil, from: nil, locale: nil, preferred_channel: nil, variables: nil, request_options: {})
|
|
15
|
+
# @overload send_(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: {})
|
|
15
16
|
#
|
|
16
17
|
# @param template_id [String] The template identifier.
|
|
17
18
|
#
|
|
@@ -21,6 +22,8 @@ module PreludeSDK
|
|
|
21
22
|
#
|
|
22
23
|
# @param correlation_id [String] A user-defined identifier to correlate this transactional message with. It is re
|
|
23
24
|
#
|
|
25
|
+
# @param document [PreludeSDK::Models::TransactionalSendParams::Document] A document to attach to the message. Only supported on WhatsApp templates that h
|
|
26
|
+
#
|
|
24
27
|
# @param expires_at [String] The message expiration date.
|
|
25
28
|
#
|
|
26
29
|
# @param from [String] The Sender ID.
|
data/lib/prelude_sdk/version.rb
CHANGED
data/rbi/prelude_sdk/client.rbi
CHANGED
|
@@ -14,21 +14,28 @@ module PreludeSDK
|
|
|
14
14
|
sig { returns(String) }
|
|
15
15
|
attr_reader :api_token
|
|
16
16
|
|
|
17
|
+
# Retrieve detailed information about a phone number including carrier data, line
|
|
18
|
+
# type, and portability status.
|
|
17
19
|
sig { returns(PreludeSDK::Resources::Lookup) }
|
|
18
20
|
attr_reader :lookup
|
|
19
21
|
|
|
22
|
+
# Send transactional and marketing messages with compliance enforcement.
|
|
20
23
|
sig { returns(PreludeSDK::Resources::Notify) }
|
|
21
24
|
attr_reader :notify
|
|
22
25
|
|
|
26
|
+
# Send transactional messages (deprecated - use Notify API instead).
|
|
23
27
|
sig { returns(PreludeSDK::Resources::Transactional) }
|
|
24
28
|
attr_reader :transactional
|
|
25
29
|
|
|
30
|
+
# Verify phone numbers.
|
|
26
31
|
sig { returns(PreludeSDK::Resources::Verification) }
|
|
27
32
|
attr_reader :verification
|
|
28
33
|
|
|
34
|
+
# Verify phone numbers.
|
|
29
35
|
sig { returns(PreludeSDK::Resources::VerificationManagement) }
|
|
30
36
|
attr_reader :verification_management
|
|
31
37
|
|
|
38
|
+
# Evaluate email addresses and phone numbers for trustworthiness.
|
|
32
39
|
sig { returns(PreludeSDK::Resources::Watch) }
|
|
33
40
|
attr_reader :watch
|
|
34
41
|
|
|
@@ -296,11 +296,31 @@ module PreludeSDK
|
|
|
296
296
|
end
|
|
297
297
|
|
|
298
298
|
JSON_CONTENT =
|
|
299
|
-
T.let(%r{^application/(?:
|
|
299
|
+
T.let(%r{^application/(?:[a-zA-Z0-9.-]+\+)?json(?!l)}, Regexp)
|
|
300
300
|
JSONL_CONTENT =
|
|
301
301
|
T.let(%r{^application/(:?x-(?:n|l)djson)|(:?(?:x-)?jsonl)}, Regexp)
|
|
302
302
|
|
|
303
303
|
class << self
|
|
304
|
+
# @api private
|
|
305
|
+
sig do
|
|
306
|
+
params(query: PreludeSDK::Internal::AnyHash).returns(
|
|
307
|
+
PreludeSDK::Internal::AnyHash
|
|
308
|
+
)
|
|
309
|
+
end
|
|
310
|
+
def encode_query_params(query)
|
|
311
|
+
end
|
|
312
|
+
|
|
313
|
+
# @api private
|
|
314
|
+
sig do
|
|
315
|
+
params(
|
|
316
|
+
collection: PreludeSDK::Internal::AnyHash,
|
|
317
|
+
key: String,
|
|
318
|
+
element: T.anything
|
|
319
|
+
).void
|
|
320
|
+
end
|
|
321
|
+
private def write_query_param_element!(collection, key, element)
|
|
322
|
+
end
|
|
323
|
+
|
|
304
324
|
# @api private
|
|
305
325
|
sig do
|
|
306
326
|
params(
|
|
@@ -11,6 +11,10 @@ module PreludeSDK
|
|
|
11
11
|
T.any(PreludeSDK::LookupLookupParams, PreludeSDK::Internal::AnyHash)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
+
# An E.164 formatted phone number to look up.
|
|
15
|
+
sig { returns(String) }
|
|
16
|
+
attr_accessor :phone_number
|
|
17
|
+
|
|
14
18
|
# Optional features. Possible values are:
|
|
15
19
|
#
|
|
16
20
|
# - `cnam` - Retrieve CNAM (Caller ID Name) along with other information. Contact
|
|
@@ -31,11 +35,14 @@ module PreludeSDK
|
|
|
31
35
|
|
|
32
36
|
sig do
|
|
33
37
|
params(
|
|
38
|
+
phone_number: String,
|
|
34
39
|
type: T::Array[PreludeSDK::LookupLookupParams::Type::OrSymbol],
|
|
35
40
|
request_options: PreludeSDK::RequestOptions::OrHash
|
|
36
41
|
).returns(T.attached_class)
|
|
37
42
|
end
|
|
38
43
|
def self.new(
|
|
44
|
+
# An E.164 formatted phone number to look up.
|
|
45
|
+
phone_number:,
|
|
39
46
|
# Optional features. Possible values are:
|
|
40
47
|
#
|
|
41
48
|
# - `cnam` - Retrieve CNAM (Caller ID Name) along with other information. Contact
|
|
@@ -48,6 +55,7 @@ module PreludeSDK
|
|
|
48
55
|
sig do
|
|
49
56
|
override.returns(
|
|
50
57
|
{
|
|
58
|
+
phone_number: String,
|
|
51
59
|
type: T::Array[PreludeSDK::LookupLookupParams::Type::OrSymbol],
|
|
52
60
|
request_options: PreludeSDK::RequestOptions
|
|
53
61
|
}
|
|
@@ -14,15 +14,23 @@ module PreludeSDK
|
|
|
14
14
|
)
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
+
sig { returns(String) }
|
|
18
|
+
attr_accessor :config_id
|
|
19
|
+
|
|
17
20
|
sig do
|
|
18
|
-
params(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
params(
|
|
22
|
+
config_id: String,
|
|
23
|
+
request_options: PreludeSDK::RequestOptions::OrHash
|
|
24
|
+
).returns(T.attached_class)
|
|
21
25
|
end
|
|
22
|
-
def self.new(request_options: {})
|
|
26
|
+
def self.new(config_id:, request_options: {})
|
|
23
27
|
end
|
|
24
28
|
|
|
25
|
-
sig
|
|
29
|
+
sig do
|
|
30
|
+
override.returns(
|
|
31
|
+
{ config_id: String, request_options: PreludeSDK::RequestOptions }
|
|
32
|
+
)
|
|
33
|
+
end
|
|
26
34
|
def to_hash
|
|
27
35
|
end
|
|
28
36
|
end
|
|
@@ -17,18 +17,26 @@ module PreludeSDK
|
|
|
17
17
|
sig { returns(String) }
|
|
18
18
|
attr_accessor :config_id
|
|
19
19
|
|
|
20
|
+
sig { returns(String) }
|
|
21
|
+
attr_accessor :phone_number
|
|
22
|
+
|
|
20
23
|
sig do
|
|
21
24
|
params(
|
|
22
25
|
config_id: String,
|
|
26
|
+
phone_number: String,
|
|
23
27
|
request_options: PreludeSDK::RequestOptions::OrHash
|
|
24
28
|
).returns(T.attached_class)
|
|
25
29
|
end
|
|
26
|
-
def self.new(config_id:, request_options: {})
|
|
30
|
+
def self.new(config_id:, phone_number:, request_options: {})
|
|
27
31
|
end
|
|
28
32
|
|
|
29
33
|
sig do
|
|
30
34
|
override.returns(
|
|
31
|
-
{
|
|
35
|
+
{
|
|
36
|
+
config_id: String,
|
|
37
|
+
phone_number: String,
|
|
38
|
+
request_options: PreludeSDK::RequestOptions
|
|
39
|
+
}
|
|
32
40
|
)
|
|
33
41
|
end
|
|
34
42
|
def to_hash
|
|
@@ -17,6 +17,9 @@ module PreludeSDK
|
|
|
17
17
|
sig { returns(String) }
|
|
18
18
|
attr_accessor :config_id
|
|
19
19
|
|
|
20
|
+
sig { returns(String) }
|
|
21
|
+
attr_accessor :phone_number
|
|
22
|
+
|
|
20
23
|
# Pagination cursor from the previous response
|
|
21
24
|
sig { returns(T.nilable(String)) }
|
|
22
25
|
attr_reader :cursor
|
|
@@ -34,6 +37,7 @@ module PreludeSDK
|
|
|
34
37
|
sig do
|
|
35
38
|
params(
|
|
36
39
|
config_id: String,
|
|
40
|
+
phone_number: String,
|
|
37
41
|
cursor: String,
|
|
38
42
|
limit: Integer,
|
|
39
43
|
request_options: PreludeSDK::RequestOptions::OrHash
|
|
@@ -41,6 +45,7 @@ module PreludeSDK
|
|
|
41
45
|
end
|
|
42
46
|
def self.new(
|
|
43
47
|
config_id:,
|
|
48
|
+
phone_number:,
|
|
44
49
|
# Pagination cursor from the previous response
|
|
45
50
|
cursor: nil,
|
|
46
51
|
# Maximum number of events to return per page
|
|
@@ -53,6 +58,7 @@ module PreludeSDK
|
|
|
53
58
|
override.returns(
|
|
54
59
|
{
|
|
55
60
|
config_id: String,
|
|
61
|
+
phone_number: String,
|
|
56
62
|
cursor: String,
|
|
57
63
|
limit: Integer,
|
|
58
64
|
request_options: PreludeSDK::RequestOptions
|
|
@@ -14,6 +14,9 @@ module PreludeSDK
|
|
|
14
14
|
)
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
+
sig { returns(String) }
|
|
18
|
+
attr_accessor :config_id
|
|
19
|
+
|
|
17
20
|
# Pagination cursor from the previous response
|
|
18
21
|
sig { returns(T.nilable(String)) }
|
|
19
22
|
attr_reader :cursor
|
|
@@ -48,6 +51,7 @@ module PreludeSDK
|
|
|
48
51
|
|
|
49
52
|
sig do
|
|
50
53
|
params(
|
|
54
|
+
config_id: String,
|
|
51
55
|
cursor: String,
|
|
52
56
|
limit: Integer,
|
|
53
57
|
state:
|
|
@@ -56,6 +60,7 @@ module PreludeSDK
|
|
|
56
60
|
).returns(T.attached_class)
|
|
57
61
|
end
|
|
58
62
|
def self.new(
|
|
63
|
+
config_id:,
|
|
59
64
|
# Pagination cursor from the previous response
|
|
60
65
|
cursor: nil,
|
|
61
66
|
# Maximum number of phone numbers to return per page
|
|
@@ -69,6 +74,7 @@ module PreludeSDK
|
|
|
69
74
|
sig do
|
|
70
75
|
override.returns(
|
|
71
76
|
{
|
|
77
|
+
config_id: String,
|
|
72
78
|
cursor: String,
|
|
73
79
|
limit: Integer,
|
|
74
80
|
state:
|
|
@@ -36,6 +36,18 @@ module PreludeSDK
|
|
|
36
36
|
sig { params(correlation_id: String).void }
|
|
37
37
|
attr_writer :correlation_id
|
|
38
38
|
|
|
39
|
+
# A document to attach to the message. Only supported on WhatsApp templates that
|
|
40
|
+
# have a document header.
|
|
41
|
+
sig { returns(T.nilable(PreludeSDK::NotifySendBatchParams::Document)) }
|
|
42
|
+
attr_reader :document
|
|
43
|
+
|
|
44
|
+
sig do
|
|
45
|
+
params(
|
|
46
|
+
document: PreludeSDK::NotifySendBatchParams::Document::OrHash
|
|
47
|
+
).void
|
|
48
|
+
end
|
|
49
|
+
attr_writer :document
|
|
50
|
+
|
|
39
51
|
# The message expiration date in RFC3339 format. Messages will not be sent after
|
|
40
52
|
# this time.
|
|
41
53
|
sig { returns(T.nilable(Time)) }
|
|
@@ -97,6 +109,7 @@ module PreludeSDK
|
|
|
97
109
|
to: T::Array[String],
|
|
98
110
|
callback_url: String,
|
|
99
111
|
correlation_id: String,
|
|
112
|
+
document: PreludeSDK::NotifySendBatchParams::Document::OrHash,
|
|
100
113
|
expires_at: Time,
|
|
101
114
|
from: String,
|
|
102
115
|
locale: String,
|
|
@@ -116,6 +129,9 @@ module PreludeSDK
|
|
|
116
129
|
callback_url: nil,
|
|
117
130
|
# A user-defined identifier to correlate this request with your internal systems.
|
|
118
131
|
correlation_id: nil,
|
|
132
|
+
# A document to attach to the message. Only supported on WhatsApp templates that
|
|
133
|
+
# have a document header.
|
|
134
|
+
document: nil,
|
|
119
135
|
# The message expiration date in RFC3339 format. Messages will not be sent after
|
|
120
136
|
# this time.
|
|
121
137
|
expires_at: nil,
|
|
@@ -141,6 +157,7 @@ module PreludeSDK
|
|
|
141
157
|
to: T::Array[String],
|
|
142
158
|
callback_url: String,
|
|
143
159
|
correlation_id: String,
|
|
160
|
+
document: PreludeSDK::NotifySendBatchParams::Document,
|
|
144
161
|
expires_at: Time,
|
|
145
162
|
from: String,
|
|
146
163
|
locale: String,
|
|
@@ -155,6 +172,39 @@ module PreludeSDK
|
|
|
155
172
|
def to_hash
|
|
156
173
|
end
|
|
157
174
|
|
|
175
|
+
class Document < PreludeSDK::Internal::Type::BaseModel
|
|
176
|
+
OrHash =
|
|
177
|
+
T.type_alias do
|
|
178
|
+
T.any(
|
|
179
|
+
PreludeSDK::NotifySendBatchParams::Document,
|
|
180
|
+
PreludeSDK::Internal::AnyHash
|
|
181
|
+
)
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
# The filename to display for the document.
|
|
185
|
+
sig { returns(String) }
|
|
186
|
+
attr_accessor :filename
|
|
187
|
+
|
|
188
|
+
# The URL of the document to attach. Must be a valid HTTP or HTTPS URL.
|
|
189
|
+
sig { returns(String) }
|
|
190
|
+
attr_accessor :url
|
|
191
|
+
|
|
192
|
+
# A document to attach to the message. Only supported on WhatsApp templates that
|
|
193
|
+
# have a document header.
|
|
194
|
+
sig { params(filename: String, url: String).returns(T.attached_class) }
|
|
195
|
+
def self.new(
|
|
196
|
+
# The filename to display for the document.
|
|
197
|
+
filename:,
|
|
198
|
+
# The URL of the document to attach. Must be a valid HTTP or HTTPS URL.
|
|
199
|
+
url:
|
|
200
|
+
)
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
sig { override.returns({ filename: String, url: String }) }
|
|
204
|
+
def to_hash
|
|
205
|
+
end
|
|
206
|
+
end
|
|
207
|
+
|
|
158
208
|
# Preferred channel for delivery. If unavailable, automatic fallback applies.
|
|
159
209
|
module PreferredChannel
|
|
160
210
|
extend PreludeSDK::Internal::Type::Enum
|
|
@@ -269,6 +269,35 @@ module PreludeSDK
|
|
|
269
269
|
sig { params(created_at: Time).void }
|
|
270
270
|
attr_writer :created_at
|
|
271
271
|
|
|
272
|
+
# The SMS encoding type based on message content. GSM-7 supports standard
|
|
273
|
+
# characters (up to 160 chars per segment), while UCS-2 supports Unicode including
|
|
274
|
+
# emoji (up to 70 chars per segment). Only present for SMS messages.
|
|
275
|
+
sig do
|
|
276
|
+
returns(
|
|
277
|
+
T.nilable(
|
|
278
|
+
PreludeSDK::Models::NotifySendBatchResponse::Result::Message::Encoding::TaggedSymbol
|
|
279
|
+
)
|
|
280
|
+
)
|
|
281
|
+
end
|
|
282
|
+
attr_reader :encoding
|
|
283
|
+
|
|
284
|
+
sig do
|
|
285
|
+
params(
|
|
286
|
+
encoding:
|
|
287
|
+
PreludeSDK::Models::NotifySendBatchResponse::Result::Message::Encoding::OrSymbol
|
|
288
|
+
).void
|
|
289
|
+
end
|
|
290
|
+
attr_writer :encoding
|
|
291
|
+
|
|
292
|
+
# The estimated number of SMS segments for this message. This value is not
|
|
293
|
+
# contractual; the actual segment count will be determined after the SMS is sent
|
|
294
|
+
# by the provider. Only present for SMS messages.
|
|
295
|
+
sig { returns(T.nilable(Integer)) }
|
|
296
|
+
attr_reader :estimated_segment_count
|
|
297
|
+
|
|
298
|
+
sig { params(estimated_segment_count: Integer).void }
|
|
299
|
+
attr_writer :estimated_segment_count
|
|
300
|
+
|
|
272
301
|
# The message expiration date in RFC3339 format.
|
|
273
302
|
sig { returns(T.nilable(Time)) }
|
|
274
303
|
attr_reader :expires_at
|
|
@@ -310,6 +339,9 @@ module PreludeSDK
|
|
|
310
339
|
id: String,
|
|
311
340
|
correlation_id: String,
|
|
312
341
|
created_at: Time,
|
|
342
|
+
encoding:
|
|
343
|
+
PreludeSDK::Models::NotifySendBatchResponse::Result::Message::Encoding::OrSymbol,
|
|
344
|
+
estimated_segment_count: Integer,
|
|
313
345
|
expires_at: Time,
|
|
314
346
|
from: String,
|
|
315
347
|
locale: String,
|
|
@@ -324,6 +356,14 @@ module PreludeSDK
|
|
|
324
356
|
correlation_id: nil,
|
|
325
357
|
# The message creation date in RFC3339 format.
|
|
326
358
|
created_at: nil,
|
|
359
|
+
# The SMS encoding type based on message content. GSM-7 supports standard
|
|
360
|
+
# characters (up to 160 chars per segment), while UCS-2 supports Unicode including
|
|
361
|
+
# emoji (up to 70 chars per segment). Only present for SMS messages.
|
|
362
|
+
encoding: nil,
|
|
363
|
+
# The estimated number of SMS segments for this message. This value is not
|
|
364
|
+
# contractual; the actual segment count will be determined after the SMS is sent
|
|
365
|
+
# by the provider. Only present for SMS messages.
|
|
366
|
+
estimated_segment_count: nil,
|
|
327
367
|
# The message expiration date in RFC3339 format.
|
|
328
368
|
expires_at: nil,
|
|
329
369
|
# The Sender ID used for this message.
|
|
@@ -343,6 +383,9 @@ module PreludeSDK
|
|
|
343
383
|
id: String,
|
|
344
384
|
correlation_id: String,
|
|
345
385
|
created_at: Time,
|
|
386
|
+
encoding:
|
|
387
|
+
PreludeSDK::Models::NotifySendBatchResponse::Result::Message::Encoding::TaggedSymbol,
|
|
388
|
+
estimated_segment_count: Integer,
|
|
346
389
|
expires_at: Time,
|
|
347
390
|
from: String,
|
|
348
391
|
locale: String,
|
|
@@ -353,6 +396,43 @@ module PreludeSDK
|
|
|
353
396
|
end
|
|
354
397
|
def to_hash
|
|
355
398
|
end
|
|
399
|
+
|
|
400
|
+
# The SMS encoding type based on message content. GSM-7 supports standard
|
|
401
|
+
# characters (up to 160 chars per segment), while UCS-2 supports Unicode including
|
|
402
|
+
# emoji (up to 70 chars per segment). Only present for SMS messages.
|
|
403
|
+
module Encoding
|
|
404
|
+
extend PreludeSDK::Internal::Type::Enum
|
|
405
|
+
|
|
406
|
+
TaggedSymbol =
|
|
407
|
+
T.type_alias do
|
|
408
|
+
T.all(
|
|
409
|
+
Symbol,
|
|
410
|
+
PreludeSDK::Models::NotifySendBatchResponse::Result::Message::Encoding
|
|
411
|
+
)
|
|
412
|
+
end
|
|
413
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
414
|
+
|
|
415
|
+
GSM_7 =
|
|
416
|
+
T.let(
|
|
417
|
+
:"GSM-7",
|
|
418
|
+
PreludeSDK::Models::NotifySendBatchResponse::Result::Message::Encoding::TaggedSymbol
|
|
419
|
+
)
|
|
420
|
+
UCS_2 =
|
|
421
|
+
T.let(
|
|
422
|
+
:"UCS-2",
|
|
423
|
+
PreludeSDK::Models::NotifySendBatchResponse::Result::Message::Encoding::TaggedSymbol
|
|
424
|
+
)
|
|
425
|
+
|
|
426
|
+
sig do
|
|
427
|
+
override.returns(
|
|
428
|
+
T::Array[
|
|
429
|
+
PreludeSDK::Models::NotifySendBatchResponse::Result::Message::Encoding::TaggedSymbol
|
|
430
|
+
]
|
|
431
|
+
)
|
|
432
|
+
end
|
|
433
|
+
def self.values
|
|
434
|
+
end
|
|
435
|
+
end
|
|
356
436
|
end
|
|
357
437
|
end
|
|
358
438
|
end
|
|
@@ -35,6 +35,16 @@ module PreludeSDK
|
|
|
35
35
|
sig { params(correlation_id: String).void }
|
|
36
36
|
attr_writer :correlation_id
|
|
37
37
|
|
|
38
|
+
# A document to attach to the message. Only supported on WhatsApp templates that
|
|
39
|
+
# have a document header.
|
|
40
|
+
sig { returns(T.nilable(PreludeSDK::NotifySendParams::Document)) }
|
|
41
|
+
attr_reader :document
|
|
42
|
+
|
|
43
|
+
sig do
|
|
44
|
+
params(document: PreludeSDK::NotifySendParams::Document::OrHash).void
|
|
45
|
+
end
|
|
46
|
+
attr_writer :document
|
|
47
|
+
|
|
38
48
|
# The message expiration date in RFC3339 format. The message will not be sent if
|
|
39
49
|
# this time is reached.
|
|
40
50
|
sig { returns(T.nilable(Time)) }
|
|
@@ -99,6 +109,7 @@ module PreludeSDK
|
|
|
99
109
|
to: String,
|
|
100
110
|
callback_url: String,
|
|
101
111
|
correlation_id: String,
|
|
112
|
+
document: PreludeSDK::NotifySendParams::Document::OrHash,
|
|
102
113
|
expires_at: Time,
|
|
103
114
|
from: String,
|
|
104
115
|
locale: String,
|
|
@@ -120,6 +131,9 @@ module PreludeSDK
|
|
|
120
131
|
# It is returned in the response and any webhook events that refer to this
|
|
121
132
|
# message.
|
|
122
133
|
correlation_id: nil,
|
|
134
|
+
# A document to attach to the message. Only supported on WhatsApp templates that
|
|
135
|
+
# have a document header.
|
|
136
|
+
document: nil,
|
|
123
137
|
# The message expiration date in RFC3339 format. The message will not be sent if
|
|
124
138
|
# this time is reached.
|
|
125
139
|
expires_at: nil,
|
|
@@ -150,6 +164,7 @@ module PreludeSDK
|
|
|
150
164
|
to: String,
|
|
151
165
|
callback_url: String,
|
|
152
166
|
correlation_id: String,
|
|
167
|
+
document: PreludeSDK::NotifySendParams::Document,
|
|
153
168
|
expires_at: Time,
|
|
154
169
|
from: String,
|
|
155
170
|
locale: String,
|
|
@@ -164,6 +179,39 @@ module PreludeSDK
|
|
|
164
179
|
def to_hash
|
|
165
180
|
end
|
|
166
181
|
|
|
182
|
+
class Document < PreludeSDK::Internal::Type::BaseModel
|
|
183
|
+
OrHash =
|
|
184
|
+
T.type_alias do
|
|
185
|
+
T.any(
|
|
186
|
+
PreludeSDK::NotifySendParams::Document,
|
|
187
|
+
PreludeSDK::Internal::AnyHash
|
|
188
|
+
)
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
# The filename to display for the document.
|
|
192
|
+
sig { returns(String) }
|
|
193
|
+
attr_accessor :filename
|
|
194
|
+
|
|
195
|
+
# The URL of the document to attach. Must be a valid HTTP or HTTPS URL.
|
|
196
|
+
sig { returns(String) }
|
|
197
|
+
attr_accessor :url
|
|
198
|
+
|
|
199
|
+
# A document to attach to the message. Only supported on WhatsApp templates that
|
|
200
|
+
# have a document header.
|
|
201
|
+
sig { params(filename: String, url: String).returns(T.attached_class) }
|
|
202
|
+
def self.new(
|
|
203
|
+
# The filename to display for the document.
|
|
204
|
+
filename:,
|
|
205
|
+
# The URL of the document to attach. Must be a valid HTTP or HTTPS URL.
|
|
206
|
+
url:
|
|
207
|
+
)
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
sig { override.returns({ filename: String, url: String }) }
|
|
211
|
+
def to_hash
|
|
212
|
+
end
|
|
213
|
+
end
|
|
214
|
+
|
|
167
215
|
# The preferred channel to be used in priority for message delivery. If the
|
|
168
216
|
# channel is unavailable, the system will fallback to other available channels.
|
|
169
217
|
module PreferredChannel
|