sentdm 0.42.1 → 0.44.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 +14 -0
- data/README.md +5 -5
- data/lib/sentdm/internal/calls_page.rb +25 -1
- data/lib/sentdm/internal/contacts_page.rb +25 -1
- data/lib/sentdm/internal/conversations_page.rb +25 -1
- data/lib/sentdm/internal/templates_page.rb +25 -1
- data/lib/sentdm/internal/voice_agents_page.rb +25 -1
- data/lib/sentdm/internal/webhook_events_page.rb +25 -1
- data/lib/sentdm/internal/webhooks_page.rb +25 -1
- data/lib/sentdm/models/message_resend_params.rb +32 -0
- data/lib/sentdm/models/message_send_response.rb +3 -4
- data/lib/sentdm/models.rb +4 -0
- data/lib/sentdm/resources/messages.rb +62 -1
- data/lib/sentdm/version.rb +1 -1
- data/lib/sentdm.rb +1 -0
- data/rbi/sentdm/internal/calls_page.rbi +51 -3
- data/rbi/sentdm/internal/contacts_page.rbi +51 -3
- data/rbi/sentdm/internal/conversations_page.rbi +51 -3
- data/rbi/sentdm/internal/templates_page.rbi +51 -3
- data/rbi/sentdm/internal/voice_agents_page.rbi +51 -3
- data/rbi/sentdm/internal/webhook_events_page.rbi +51 -3
- data/rbi/sentdm/internal/webhooks_page.rbi +51 -3
- data/rbi/sentdm/models/message_resend_params.rbi +59 -0
- data/rbi/sentdm/models/message_send_response.rbi +11 -22
- data/rbi/sentdm/models.rbi +4 -0
- data/rbi/sentdm/resources/messages.rbi +57 -1
- data/sig/sentdm/internal/calls_page.rbs +38 -3
- data/sig/sentdm/internal/contacts_page.rbs +38 -3
- data/sig/sentdm/internal/conversations_page.rbs +38 -3
- data/sig/sentdm/internal/templates_page.rbs +38 -3
- data/sig/sentdm/internal/voice_agents_page.rbs +38 -3
- data/sig/sentdm/internal/webhook_events_page.rbs +38 -3
- data/sig/sentdm/internal/webhooks_page.rbs +38 -3
- data/sig/sentdm/models/message_resend_params.rbs +38 -0
- data/sig/sentdm/models/message_send_response.rbs +10 -10
- data/sig/sentdm/models.rbs +4 -0
- data/sig/sentdm/resources/messages.rbs +9 -1
- metadata +5 -2
|
@@ -57,11 +57,59 @@ module Sentdm
|
|
|
57
57
|
sig { params(has_more: T::Boolean).void }
|
|
58
58
|
attr_writer :has_more
|
|
59
59
|
|
|
60
|
-
sig {
|
|
61
|
-
|
|
60
|
+
sig { returns(T.nilable(Integer)) }
|
|
61
|
+
attr_reader :page
|
|
62
|
+
|
|
63
|
+
sig { params(page: Integer).void }
|
|
64
|
+
attr_writer :page
|
|
65
|
+
|
|
66
|
+
sig { returns(T.nilable(Integer)) }
|
|
67
|
+
attr_reader :page_size
|
|
68
|
+
|
|
69
|
+
sig { params(page_size: Integer).void }
|
|
70
|
+
attr_writer :page_size
|
|
71
|
+
|
|
72
|
+
sig { returns(T.nilable(Integer)) }
|
|
73
|
+
attr_reader :total_count
|
|
74
|
+
|
|
75
|
+
sig { params(total_count: Integer).void }
|
|
76
|
+
attr_writer :total_count
|
|
77
|
+
|
|
78
|
+
sig { returns(T.nilable(Integer)) }
|
|
79
|
+
attr_reader :total_pages
|
|
80
|
+
|
|
81
|
+
sig { params(total_pages: Integer).void }
|
|
82
|
+
attr_writer :total_pages
|
|
83
|
+
|
|
84
|
+
sig do
|
|
85
|
+
params(
|
|
86
|
+
has_more: T::Boolean,
|
|
87
|
+
page: Integer,
|
|
88
|
+
page_size: Integer,
|
|
89
|
+
total_count: Integer,
|
|
90
|
+
total_pages: Integer
|
|
91
|
+
).returns(T.attached_class)
|
|
92
|
+
end
|
|
93
|
+
def self.new(
|
|
94
|
+
has_more: nil,
|
|
95
|
+
page: nil,
|
|
96
|
+
page_size: nil,
|
|
97
|
+
total_count: nil,
|
|
98
|
+
total_pages: nil
|
|
99
|
+
)
|
|
62
100
|
end
|
|
63
101
|
|
|
64
|
-
sig
|
|
102
|
+
sig do
|
|
103
|
+
override.returns(
|
|
104
|
+
{
|
|
105
|
+
has_more: T::Boolean,
|
|
106
|
+
page: Integer,
|
|
107
|
+
page_size: Integer,
|
|
108
|
+
total_count: Integer,
|
|
109
|
+
total_pages: Integer
|
|
110
|
+
}
|
|
111
|
+
)
|
|
112
|
+
end
|
|
65
113
|
def to_hash
|
|
66
114
|
end
|
|
67
115
|
end
|
|
@@ -57,11 +57,59 @@ module Sentdm
|
|
|
57
57
|
sig { params(has_more: T::Boolean).void }
|
|
58
58
|
attr_writer :has_more
|
|
59
59
|
|
|
60
|
-
sig {
|
|
61
|
-
|
|
60
|
+
sig { returns(T.nilable(Integer)) }
|
|
61
|
+
attr_reader :page
|
|
62
|
+
|
|
63
|
+
sig { params(page: Integer).void }
|
|
64
|
+
attr_writer :page
|
|
65
|
+
|
|
66
|
+
sig { returns(T.nilable(Integer)) }
|
|
67
|
+
attr_reader :page_size
|
|
68
|
+
|
|
69
|
+
sig { params(page_size: Integer).void }
|
|
70
|
+
attr_writer :page_size
|
|
71
|
+
|
|
72
|
+
sig { returns(T.nilable(Integer)) }
|
|
73
|
+
attr_reader :total_count
|
|
74
|
+
|
|
75
|
+
sig { params(total_count: Integer).void }
|
|
76
|
+
attr_writer :total_count
|
|
77
|
+
|
|
78
|
+
sig { returns(T.nilable(Integer)) }
|
|
79
|
+
attr_reader :total_pages
|
|
80
|
+
|
|
81
|
+
sig { params(total_pages: Integer).void }
|
|
82
|
+
attr_writer :total_pages
|
|
83
|
+
|
|
84
|
+
sig do
|
|
85
|
+
params(
|
|
86
|
+
has_more: T::Boolean,
|
|
87
|
+
page: Integer,
|
|
88
|
+
page_size: Integer,
|
|
89
|
+
total_count: Integer,
|
|
90
|
+
total_pages: Integer
|
|
91
|
+
).returns(T.attached_class)
|
|
92
|
+
end
|
|
93
|
+
def self.new(
|
|
94
|
+
has_more: nil,
|
|
95
|
+
page: nil,
|
|
96
|
+
page_size: nil,
|
|
97
|
+
total_count: nil,
|
|
98
|
+
total_pages: nil
|
|
99
|
+
)
|
|
62
100
|
end
|
|
63
101
|
|
|
64
|
-
sig
|
|
102
|
+
sig do
|
|
103
|
+
override.returns(
|
|
104
|
+
{
|
|
105
|
+
has_more: T::Boolean,
|
|
106
|
+
page: Integer,
|
|
107
|
+
page_size: Integer,
|
|
108
|
+
total_count: Integer,
|
|
109
|
+
total_pages: Integer
|
|
110
|
+
}
|
|
111
|
+
)
|
|
112
|
+
end
|
|
65
113
|
def to_hash
|
|
66
114
|
end
|
|
67
115
|
end
|
|
@@ -57,11 +57,59 @@ module Sentdm
|
|
|
57
57
|
sig { params(has_more: T::Boolean).void }
|
|
58
58
|
attr_writer :has_more
|
|
59
59
|
|
|
60
|
-
sig {
|
|
61
|
-
|
|
60
|
+
sig { returns(T.nilable(Integer)) }
|
|
61
|
+
attr_reader :page
|
|
62
|
+
|
|
63
|
+
sig { params(page: Integer).void }
|
|
64
|
+
attr_writer :page
|
|
65
|
+
|
|
66
|
+
sig { returns(T.nilable(Integer)) }
|
|
67
|
+
attr_reader :page_size
|
|
68
|
+
|
|
69
|
+
sig { params(page_size: Integer).void }
|
|
70
|
+
attr_writer :page_size
|
|
71
|
+
|
|
72
|
+
sig { returns(T.nilable(Integer)) }
|
|
73
|
+
attr_reader :total_count
|
|
74
|
+
|
|
75
|
+
sig { params(total_count: Integer).void }
|
|
76
|
+
attr_writer :total_count
|
|
77
|
+
|
|
78
|
+
sig { returns(T.nilable(Integer)) }
|
|
79
|
+
attr_reader :total_pages
|
|
80
|
+
|
|
81
|
+
sig { params(total_pages: Integer).void }
|
|
82
|
+
attr_writer :total_pages
|
|
83
|
+
|
|
84
|
+
sig do
|
|
85
|
+
params(
|
|
86
|
+
has_more: T::Boolean,
|
|
87
|
+
page: Integer,
|
|
88
|
+
page_size: Integer,
|
|
89
|
+
total_count: Integer,
|
|
90
|
+
total_pages: Integer
|
|
91
|
+
).returns(T.attached_class)
|
|
92
|
+
end
|
|
93
|
+
def self.new(
|
|
94
|
+
has_more: nil,
|
|
95
|
+
page: nil,
|
|
96
|
+
page_size: nil,
|
|
97
|
+
total_count: nil,
|
|
98
|
+
total_pages: nil
|
|
99
|
+
)
|
|
62
100
|
end
|
|
63
101
|
|
|
64
|
-
sig
|
|
102
|
+
sig do
|
|
103
|
+
override.returns(
|
|
104
|
+
{
|
|
105
|
+
has_more: T::Boolean,
|
|
106
|
+
page: Integer,
|
|
107
|
+
page_size: Integer,
|
|
108
|
+
total_count: Integer,
|
|
109
|
+
total_pages: Integer
|
|
110
|
+
}
|
|
111
|
+
)
|
|
112
|
+
end
|
|
65
113
|
def to_hash
|
|
66
114
|
end
|
|
67
115
|
end
|
|
@@ -57,11 +57,59 @@ module Sentdm
|
|
|
57
57
|
sig { params(has_more: T::Boolean).void }
|
|
58
58
|
attr_writer :has_more
|
|
59
59
|
|
|
60
|
-
sig {
|
|
61
|
-
|
|
60
|
+
sig { returns(T.nilable(Integer)) }
|
|
61
|
+
attr_reader :page
|
|
62
|
+
|
|
63
|
+
sig { params(page: Integer).void }
|
|
64
|
+
attr_writer :page
|
|
65
|
+
|
|
66
|
+
sig { returns(T.nilable(Integer)) }
|
|
67
|
+
attr_reader :page_size
|
|
68
|
+
|
|
69
|
+
sig { params(page_size: Integer).void }
|
|
70
|
+
attr_writer :page_size
|
|
71
|
+
|
|
72
|
+
sig { returns(T.nilable(Integer)) }
|
|
73
|
+
attr_reader :total_count
|
|
74
|
+
|
|
75
|
+
sig { params(total_count: Integer).void }
|
|
76
|
+
attr_writer :total_count
|
|
77
|
+
|
|
78
|
+
sig { returns(T.nilable(Integer)) }
|
|
79
|
+
attr_reader :total_pages
|
|
80
|
+
|
|
81
|
+
sig { params(total_pages: Integer).void }
|
|
82
|
+
attr_writer :total_pages
|
|
83
|
+
|
|
84
|
+
sig do
|
|
85
|
+
params(
|
|
86
|
+
has_more: T::Boolean,
|
|
87
|
+
page: Integer,
|
|
88
|
+
page_size: Integer,
|
|
89
|
+
total_count: Integer,
|
|
90
|
+
total_pages: Integer
|
|
91
|
+
).returns(T.attached_class)
|
|
92
|
+
end
|
|
93
|
+
def self.new(
|
|
94
|
+
has_more: nil,
|
|
95
|
+
page: nil,
|
|
96
|
+
page_size: nil,
|
|
97
|
+
total_count: nil,
|
|
98
|
+
total_pages: nil
|
|
99
|
+
)
|
|
62
100
|
end
|
|
63
101
|
|
|
64
|
-
sig
|
|
102
|
+
sig do
|
|
103
|
+
override.returns(
|
|
104
|
+
{
|
|
105
|
+
has_more: T::Boolean,
|
|
106
|
+
page: Integer,
|
|
107
|
+
page_size: Integer,
|
|
108
|
+
total_count: Integer,
|
|
109
|
+
total_pages: Integer
|
|
110
|
+
}
|
|
111
|
+
)
|
|
112
|
+
end
|
|
65
113
|
def to_hash
|
|
66
114
|
end
|
|
67
115
|
end
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
class MessageResendParams < Sentdm::Models::MutationRequest
|
|
6
|
+
extend Sentdm::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include Sentdm::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(Sentdm::MessageResendParams, Sentdm::Internal::AnyHash)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
sig { returns(String) }
|
|
15
|
+
attr_accessor :id
|
|
16
|
+
|
|
17
|
+
sig { returns(T.nilable(String)) }
|
|
18
|
+
attr_reader :idempotency_key
|
|
19
|
+
|
|
20
|
+
sig { params(idempotency_key: String).void }
|
|
21
|
+
attr_writer :idempotency_key
|
|
22
|
+
|
|
23
|
+
sig { returns(T.nilable(String)) }
|
|
24
|
+
attr_reader :x_profile_id
|
|
25
|
+
|
|
26
|
+
sig { params(x_profile_id: String).void }
|
|
27
|
+
attr_writer :x_profile_id
|
|
28
|
+
|
|
29
|
+
sig do
|
|
30
|
+
params(
|
|
31
|
+
id: String,
|
|
32
|
+
idempotency_key: String,
|
|
33
|
+
x_profile_id: String,
|
|
34
|
+
request_options: Sentdm::RequestOptions::OrHash
|
|
35
|
+
).returns(T.attached_class)
|
|
36
|
+
end
|
|
37
|
+
def self.new(
|
|
38
|
+
id:,
|
|
39
|
+
idempotency_key: nil,
|
|
40
|
+
x_profile_id: nil,
|
|
41
|
+
request_options: {}
|
|
42
|
+
)
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
sig do
|
|
46
|
+
override.returns(
|
|
47
|
+
{
|
|
48
|
+
id: String,
|
|
49
|
+
idempotency_key: String,
|
|
50
|
+
x_profile_id: String,
|
|
51
|
+
request_options: Sentdm::RequestOptions
|
|
52
|
+
}
|
|
53
|
+
)
|
|
54
|
+
end
|
|
55
|
+
def to_hash
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
@@ -5,7 +5,7 @@ module Sentdm
|
|
|
5
5
|
class MessageSendResponse < Sentdm::Internal::Type::BaseModel
|
|
6
6
|
OrHash =
|
|
7
7
|
T.type_alias do
|
|
8
|
-
T.any(Sentdm::
|
|
8
|
+
T.any(Sentdm::MessageSendResponse, Sentdm::Internal::AnyHash)
|
|
9
9
|
end
|
|
10
10
|
|
|
11
11
|
# The result of a multi-recipient send.
|
|
@@ -20,13 +20,11 @@ module Sentdm
|
|
|
20
20
|
# The shape of an immediate send: it never has a scheduled_at key. A send that
|
|
21
21
|
# carried scheduled_at is a ScheduledSendMessageResponse, and the endpoint decides
|
|
22
22
|
# which of the two to answer with. From always returns this type.
|
|
23
|
-
sig { returns(T.nilable(Sentdm::
|
|
23
|
+
sig { returns(T.nilable(Sentdm::MessageSendResponse::Data)) }
|
|
24
24
|
attr_reader :data
|
|
25
25
|
|
|
26
26
|
sig do
|
|
27
|
-
params(
|
|
28
|
-
data: T.nilable(Sentdm::Models::MessageSendResponse::Data::OrHash)
|
|
29
|
-
).void
|
|
27
|
+
params(data: T.nilable(Sentdm::MessageSendResponse::Data::OrHash)).void
|
|
30
28
|
end
|
|
31
29
|
attr_writer :data
|
|
32
30
|
|
|
@@ -54,7 +52,7 @@ module Sentdm
|
|
|
54
52
|
# Standard API response envelope for all v3 endpoints
|
|
55
53
|
sig do
|
|
56
54
|
params(
|
|
57
|
-
data: T.nilable(Sentdm::
|
|
55
|
+
data: T.nilable(Sentdm::MessageSendResponse::Data::OrHash),
|
|
58
56
|
error: T.nilable(Sentdm::ErrorDetail::OrHash),
|
|
59
57
|
meta: Sentdm::APIMeta::OrHash,
|
|
60
58
|
success: T::Boolean
|
|
@@ -86,7 +84,7 @@ module Sentdm
|
|
|
86
84
|
sig do
|
|
87
85
|
override.returns(
|
|
88
86
|
{
|
|
89
|
-
data: T.nilable(Sentdm::
|
|
87
|
+
data: T.nilable(Sentdm::MessageSendResponse::Data),
|
|
90
88
|
error: T.nilable(Sentdm::ErrorDetail),
|
|
91
89
|
meta: Sentdm::APIMeta,
|
|
92
90
|
success: T::Boolean
|
|
@@ -99,17 +97,12 @@ module Sentdm
|
|
|
99
97
|
class Data < Sentdm::Internal::Type::BaseModel
|
|
100
98
|
OrHash =
|
|
101
99
|
T.type_alias do
|
|
102
|
-
T.any(
|
|
103
|
-
Sentdm::Models::MessageSendResponse::Data,
|
|
104
|
-
Sentdm::Internal::AnyHash
|
|
105
|
-
)
|
|
100
|
+
T.any(Sentdm::MessageSendResponse::Data, Sentdm::Internal::AnyHash)
|
|
106
101
|
end
|
|
107
102
|
|
|
108
103
|
sig do
|
|
109
104
|
returns(
|
|
110
|
-
T.nilable(
|
|
111
|
-
T::Array[Sentdm::Models::MessageSendResponse::Data::Recipient]
|
|
112
|
-
)
|
|
105
|
+
T.nilable(T::Array[Sentdm::MessageSendResponse::Data::Recipient])
|
|
113
106
|
)
|
|
114
107
|
end
|
|
115
108
|
attr_reader :recipients
|
|
@@ -117,9 +110,7 @@ module Sentdm
|
|
|
117
110
|
sig do
|
|
118
111
|
params(
|
|
119
112
|
recipients:
|
|
120
|
-
T::Array[
|
|
121
|
-
Sentdm::Models::MessageSendResponse::Data::Recipient::OrHash
|
|
122
|
-
]
|
|
113
|
+
T::Array[Sentdm::MessageSendResponse::Data::Recipient::OrHash]
|
|
123
114
|
).void
|
|
124
115
|
end
|
|
125
116
|
attr_writer :recipients
|
|
@@ -160,9 +151,7 @@ module Sentdm
|
|
|
160
151
|
sig do
|
|
161
152
|
params(
|
|
162
153
|
recipients:
|
|
163
|
-
T::Array[
|
|
164
|
-
Sentdm::Models::MessageSendResponse::Data::Recipient::OrHash
|
|
165
|
-
],
|
|
154
|
+
T::Array[Sentdm::MessageSendResponse::Data::Recipient::OrHash],
|
|
166
155
|
status: String,
|
|
167
156
|
template_id: String,
|
|
168
157
|
template_name: String
|
|
@@ -183,7 +172,7 @@ module Sentdm
|
|
|
183
172
|
override.returns(
|
|
184
173
|
{
|
|
185
174
|
recipients:
|
|
186
|
-
T::Array[Sentdm::
|
|
175
|
+
T::Array[Sentdm::MessageSendResponse::Data::Recipient],
|
|
187
176
|
status: String,
|
|
188
177
|
template_id: String,
|
|
189
178
|
template_name: String
|
|
@@ -197,7 +186,7 @@ module Sentdm
|
|
|
197
186
|
OrHash =
|
|
198
187
|
T.type_alias do
|
|
199
188
|
T.any(
|
|
200
|
-
Sentdm::
|
|
189
|
+
Sentdm::MessageSendResponse::Data::Recipient,
|
|
201
190
|
Sentdm::Internal::AnyHash
|
|
202
191
|
)
|
|
203
192
|
end
|
data/rbi/sentdm/models.rbi
CHANGED
|
@@ -83,6 +83,8 @@ module Sentdm
|
|
|
83
83
|
|
|
84
84
|
MessageEventPayload = Sentdm::Models::MessageEventPayload
|
|
85
85
|
|
|
86
|
+
MessageResendParams = Sentdm::Models::MessageResendParams
|
|
87
|
+
|
|
86
88
|
MessageRetrieveActivitiesParams =
|
|
87
89
|
Sentdm::Models::MessageRetrieveActivitiesParams
|
|
88
90
|
|
|
@@ -90,6 +92,8 @@ module Sentdm
|
|
|
90
92
|
|
|
91
93
|
MessageSendParams = Sentdm::Models::MessageSendParams
|
|
92
94
|
|
|
95
|
+
MessageSendResponse = Sentdm::Models::MessageSendResponse
|
|
96
|
+
|
|
93
97
|
MutationRequest = Sentdm::Models::MutationRequest
|
|
94
98
|
|
|
95
99
|
NumberLookupParams = Sentdm::Models::NumberLookupParams
|
|
@@ -25,6 +25,62 @@ module Sentdm
|
|
|
25
25
|
# released yet. Cancelling is free, fires `message.cancelled`, and is final — a
|
|
26
26
|
# cancelled message cannot be resent.
|
|
27
27
|
class Messages
|
|
28
|
+
# Resends a message you already sent, on the same message id, without rebuilding
|
|
29
|
+
# the request. The typical use is recovering a BLOCKED message — for example one
|
|
30
|
+
# refused for insufficient balance — after the account has been topped up.
|
|
31
|
+
#
|
|
32
|
+
# **A resend bills again.** Each accepted resend is a new delivery attempt and
|
|
33
|
+
# records a new charge against the same message id; a client that resends on every
|
|
34
|
+
# failure is charged on every loop.
|
|
35
|
+
#
|
|
36
|
+
# **Every policy runs again.** The resend goes back through the full send pipeline
|
|
37
|
+
# — consent, balance, KYC and channel quota, template approval, quiet hours and
|
|
38
|
+
# channel health — so it can land on BLOCKED, FILTERED or SCHEDULED again rather
|
|
39
|
+
# than being sent, exactly as a fresh send would. Status webhooks (message.sent,
|
|
40
|
+
# message.blocked, message.filtered, message.failed) fire again for the same
|
|
41
|
+
# message id, so consumers keyed on the id will see repeated transitions.
|
|
42
|
+
#
|
|
43
|
+
# **What can be resent.** A message in a terminal state — DELIVERED, FAILED, READ
|
|
44
|
+
# or BLOCKED — or one stuck at SENT for more than 15 minutes. A FILTERED message
|
|
45
|
+
# can never be resent: the recipient opted out or a routing rule refused the send.
|
|
46
|
+
# A message still in flight (QUEUED, PROCESSED, ROUTED), held for quiet hours
|
|
47
|
+
# (SCHEDULED), or SENT less than 15 minutes ago returns 409. Two concurrent
|
|
48
|
+
# resends of one id are serialised: one is accepted, the other gets 409.
|
|
49
|
+
#
|
|
50
|
+
# The resend keeps the channel the message was originally requested on; the
|
|
51
|
+
# channel cannot be changed on a resend — send a new message instead.
|
|
52
|
+
# `Idempotency-Key` is honoured, so a retried request replays the first accepted
|
|
53
|
+
# response instead of resending twice.
|
|
54
|
+
#
|
|
55
|
+
# The response has the same shape as `POST /v3/messages`: `recipients` has a
|
|
56
|
+
# single entry whose `message_id` is the id you resent.
|
|
57
|
+
sig do
|
|
58
|
+
params(
|
|
59
|
+
id: String,
|
|
60
|
+
sandbox: T::Boolean,
|
|
61
|
+
idempotency_key: String,
|
|
62
|
+
x_profile_id: String,
|
|
63
|
+
request_options: Sentdm::RequestOptions::OrHash
|
|
64
|
+
).returns(Sentdm::MessageSendResponse)
|
|
65
|
+
end
|
|
66
|
+
def resend(
|
|
67
|
+
# Path param: Message ID
|
|
68
|
+
id,
|
|
69
|
+
# Body param: Sandbox flag - when true, the operation is simulated without side
|
|
70
|
+
# effects Useful for testing integrations without actual execution
|
|
71
|
+
sandbox: nil,
|
|
72
|
+
# Header param: Unique key to ensure idempotent request processing. Must be 1-255
|
|
73
|
+
# alphanumeric characters, hyphens, or underscores. Responses are cached for 24
|
|
74
|
+
# hours per key per customer.
|
|
75
|
+
idempotency_key: nil,
|
|
76
|
+
# Header param: Profile UUID to scope the request to a child profile. Only
|
|
77
|
+
# organization API keys can use this header. The profile must belong to the
|
|
78
|
+
# calling organization.
|
|
79
|
+
x_profile_id: nil,
|
|
80
|
+
request_options: {}
|
|
81
|
+
)
|
|
82
|
+
end
|
|
83
|
+
|
|
28
84
|
# Retrieves the activity log for a specific message. Activities track the message
|
|
29
85
|
# lifecycle including acceptance, processing, sending, delivery, and any errors. A
|
|
30
86
|
# SCHEDULED entry carries scheduled_at, the release instant in UTC as it stood at
|
|
@@ -124,7 +180,7 @@ module Sentdm
|
|
|
124
180
|
idempotency_key: String,
|
|
125
181
|
x_profile_id: String,
|
|
126
182
|
request_options: Sentdm::RequestOptions::OrHash
|
|
127
|
-
).returns(Sentdm::
|
|
183
|
+
).returns(Sentdm::MessageSendResponse)
|
|
128
184
|
end
|
|
129
185
|
def send_(
|
|
130
186
|
# Body param: Channels to broadcast on, e.g. ["whatsapp", "sms"]. Each channel
|
|
@@ -24,16 +24,51 @@ module Sentdm
|
|
|
24
24
|
|
|
25
25
|
def to_hash: -> { calls: ::Array[top], pagination: Data::Pagination }
|
|
26
26
|
|
|
27
|
-
type pagination =
|
|
27
|
+
type pagination =
|
|
28
|
+
{
|
|
29
|
+
has_more: bool,
|
|
30
|
+
page: Integer,
|
|
31
|
+
page_size: Integer,
|
|
32
|
+
total_count: Integer,
|
|
33
|
+
total_pages: Integer
|
|
34
|
+
}
|
|
28
35
|
|
|
29
36
|
class Pagination < Sentdm::Internal::Type::BaseModel
|
|
30
37
|
attr_reader has_more: bool?
|
|
31
38
|
|
|
32
39
|
def has_more=: (bool) -> bool
|
|
33
40
|
|
|
34
|
-
|
|
41
|
+
attr_reader page: Integer?
|
|
35
42
|
|
|
36
|
-
def
|
|
43
|
+
def page=: (Integer) -> Integer
|
|
44
|
+
|
|
45
|
+
attr_reader page_size: Integer?
|
|
46
|
+
|
|
47
|
+
def page_size=: (Integer) -> Integer
|
|
48
|
+
|
|
49
|
+
attr_reader total_count: Integer?
|
|
50
|
+
|
|
51
|
+
def total_count=: (Integer) -> Integer
|
|
52
|
+
|
|
53
|
+
attr_reader total_pages: Integer?
|
|
54
|
+
|
|
55
|
+
def total_pages=: (Integer) -> Integer
|
|
56
|
+
|
|
57
|
+
def initialize: (
|
|
58
|
+
?has_more: bool,
|
|
59
|
+
?page: Integer,
|
|
60
|
+
?page_size: Integer,
|
|
61
|
+
?total_count: Integer,
|
|
62
|
+
?total_pages: Integer
|
|
63
|
+
) -> void
|
|
64
|
+
|
|
65
|
+
def to_hash: -> {
|
|
66
|
+
has_more: bool,
|
|
67
|
+
page: Integer,
|
|
68
|
+
page_size: Integer,
|
|
69
|
+
total_count: Integer,
|
|
70
|
+
total_pages: Integer
|
|
71
|
+
}
|
|
37
72
|
end
|
|
38
73
|
end
|
|
39
74
|
end
|
|
@@ -24,16 +24,51 @@ module Sentdm
|
|
|
24
24
|
|
|
25
25
|
def to_hash: -> { contacts: ::Array[top], pagination: Data::Pagination }
|
|
26
26
|
|
|
27
|
-
type pagination =
|
|
27
|
+
type pagination =
|
|
28
|
+
{
|
|
29
|
+
has_more: bool,
|
|
30
|
+
page: Integer,
|
|
31
|
+
page_size: Integer,
|
|
32
|
+
total_count: Integer,
|
|
33
|
+
total_pages: Integer
|
|
34
|
+
}
|
|
28
35
|
|
|
29
36
|
class Pagination < Sentdm::Internal::Type::BaseModel
|
|
30
37
|
attr_reader has_more: bool?
|
|
31
38
|
|
|
32
39
|
def has_more=: (bool) -> bool
|
|
33
40
|
|
|
34
|
-
|
|
41
|
+
attr_reader page: Integer?
|
|
35
42
|
|
|
36
|
-
def
|
|
43
|
+
def page=: (Integer) -> Integer
|
|
44
|
+
|
|
45
|
+
attr_reader page_size: Integer?
|
|
46
|
+
|
|
47
|
+
def page_size=: (Integer) -> Integer
|
|
48
|
+
|
|
49
|
+
attr_reader total_count: Integer?
|
|
50
|
+
|
|
51
|
+
def total_count=: (Integer) -> Integer
|
|
52
|
+
|
|
53
|
+
attr_reader total_pages: Integer?
|
|
54
|
+
|
|
55
|
+
def total_pages=: (Integer) -> Integer
|
|
56
|
+
|
|
57
|
+
def initialize: (
|
|
58
|
+
?has_more: bool,
|
|
59
|
+
?page: Integer,
|
|
60
|
+
?page_size: Integer,
|
|
61
|
+
?total_count: Integer,
|
|
62
|
+
?total_pages: Integer
|
|
63
|
+
) -> void
|
|
64
|
+
|
|
65
|
+
def to_hash: -> {
|
|
66
|
+
has_more: bool,
|
|
67
|
+
page: Integer,
|
|
68
|
+
page_size: Integer,
|
|
69
|
+
total_count: Integer,
|
|
70
|
+
total_pages: Integer
|
|
71
|
+
}
|
|
37
72
|
end
|
|
38
73
|
end
|
|
39
74
|
end
|
|
@@ -24,16 +24,51 @@ module Sentdm
|
|
|
24
24
|
|
|
25
25
|
def to_hash: -> { messages: ::Array[top], pagination: Data::Pagination }
|
|
26
26
|
|
|
27
|
-
type pagination =
|
|
27
|
+
type pagination =
|
|
28
|
+
{
|
|
29
|
+
has_more: bool,
|
|
30
|
+
page: Integer,
|
|
31
|
+
page_size: Integer,
|
|
32
|
+
total_count: Integer,
|
|
33
|
+
total_pages: Integer
|
|
34
|
+
}
|
|
28
35
|
|
|
29
36
|
class Pagination < Sentdm::Internal::Type::BaseModel
|
|
30
37
|
attr_reader has_more: bool?
|
|
31
38
|
|
|
32
39
|
def has_more=: (bool) -> bool
|
|
33
40
|
|
|
34
|
-
|
|
41
|
+
attr_reader page: Integer?
|
|
35
42
|
|
|
36
|
-
def
|
|
43
|
+
def page=: (Integer) -> Integer
|
|
44
|
+
|
|
45
|
+
attr_reader page_size: Integer?
|
|
46
|
+
|
|
47
|
+
def page_size=: (Integer) -> Integer
|
|
48
|
+
|
|
49
|
+
attr_reader total_count: Integer?
|
|
50
|
+
|
|
51
|
+
def total_count=: (Integer) -> Integer
|
|
52
|
+
|
|
53
|
+
attr_reader total_pages: Integer?
|
|
54
|
+
|
|
55
|
+
def total_pages=: (Integer) -> Integer
|
|
56
|
+
|
|
57
|
+
def initialize: (
|
|
58
|
+
?has_more: bool,
|
|
59
|
+
?page: Integer,
|
|
60
|
+
?page_size: Integer,
|
|
61
|
+
?total_count: Integer,
|
|
62
|
+
?total_pages: Integer
|
|
63
|
+
) -> void
|
|
64
|
+
|
|
65
|
+
def to_hash: -> {
|
|
66
|
+
has_more: bool,
|
|
67
|
+
page: Integer,
|
|
68
|
+
page_size: Integer,
|
|
69
|
+
total_count: Integer,
|
|
70
|
+
total_pages: Integer
|
|
71
|
+
}
|
|
37
72
|
end
|
|
38
73
|
end
|
|
39
74
|
end
|