zavudev 0.4.1 → 0.6.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 +22 -0
- data/README.md +1 -1
- data/lib/zavudev/internal/util.rb +3 -1
- data/lib/zavudev/models/message_send_params.rb +63 -4
- data/lib/zavudev/models/template.rb +33 -5
- data/lib/zavudev/models/template_create_params.rb +27 -2
- data/lib/zavudev/models/webhook_event.rb +6 -0
- data/lib/zavudev/resources/messages.rb +4 -2
- data/lib/zavudev/resources/templates.rb +8 -2
- data/lib/zavudev/version.rb +1 -1
- data/rbi/zavudev/models/message_send_params.rbi +107 -4
- data/rbi/zavudev/models/template.rbi +39 -4
- data/rbi/zavudev/models/template_create_params.rbi +35 -0
- data/rbi/zavudev/models/webhook_event.rbi +7 -0
- data/rbi/zavudev/resources/messages.rbi +7 -3
- data/rbi/zavudev/resources/templates.rbi +10 -0
- data/sig/zavudev/models/message_send_params.rbs +54 -0
- data/sig/zavudev/models/template.rbs +21 -0
- data/sig/zavudev/models/template_create_params.rbs +21 -0
- data/sig/zavudev/models/webhook_event.rbs +2 -0
- data/sig/zavudev/resources/messages.rbs +1 -0
- data/sig/zavudev/resources/templates.rbs +3 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4dbf4d9ec7209d43777007a92d0e1aad8f33cee64ca9989e008984dcd6062e24
|
|
4
|
+
data.tar.gz: 8a1770208c5d4a6ee15e860a666cd24a6c885531807e2cc7181692068e236b4b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f1431108ee40a20b494d97445cfac79fb0291902c23f1ce9ed407eb33d57b92b571ac70df0dbd0de21e1b1af5ba80fa09f9d29b1b0b5703477481da8551931fb
|
|
7
|
+
data.tar.gz: 7042f8c8df6775399db26fdcbcfdf84361df6f6f9546b299c54dcf4aa5394c2aceb228829ff1545f2a5efae45d4c9552e21902e8d31d0e37e9316198f08318b5
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.6.0 (2026-04-12)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.5.0...v0.6.0](https://github.com/zavudev/sdk-ruby/compare/v0.5.0...v0.6.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** api update ([e8f0d51](https://github.com/zavudev/sdk-ruby/commit/e8f0d51ff5eab8b1a35aa443188197929ce80b66))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* multipart encoding for file arrays ([b578a65](https://github.com/zavudev/sdk-ruby/commit/b578a6587fc86e324b69dd9397a719db1b4e9f5a))
|
|
15
|
+
|
|
16
|
+
## 0.5.0 (2026-04-03)
|
|
17
|
+
|
|
18
|
+
Full Changelog: [v0.4.1...v0.5.0](https://github.com/zavudev/sdk-ruby/compare/v0.4.1...v0.5.0)
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* **api:** api update ([c5b49ca](https://github.com/zavudev/sdk-ruby/commit/c5b49ca5d2bf7ad14c267aa0544d929bd6be0ede))
|
|
23
|
+
* **api:** api update ([e08767b](https://github.com/zavudev/sdk-ruby/commit/e08767b2a22bd0597697c7cfc1864e69b9064aed))
|
|
24
|
+
|
|
3
25
|
## 0.4.1 (2026-04-01)
|
|
4
26
|
|
|
5
27
|
Full Changelog: [v0.4.0...v0.4.1](https://github.com/zavudev/sdk-ruby/compare/v0.4.0...v0.4.1)
|
data/README.md
CHANGED
|
@@ -610,6 +610,7 @@ module Zavudev
|
|
|
610
610
|
#
|
|
611
611
|
# @return [Array(String, Enumerable<String>)]
|
|
612
612
|
private def encode_multipart_streaming(body)
|
|
613
|
+
# rubocop:disable Style/CaseEquality
|
|
613
614
|
# RFC 1521 Section 7.2.1 says we should have 70 char maximum for boundary length
|
|
614
615
|
boundary = SecureRandom.urlsafe_base64(46)
|
|
615
616
|
|
|
@@ -619,7 +620,7 @@ module Zavudev
|
|
|
619
620
|
in Hash
|
|
620
621
|
body.each do |key, val|
|
|
621
622
|
case val
|
|
622
|
-
in Array if val.all? { primitive?(_1) }
|
|
623
|
+
in Array if val.all? { primitive?(_1) || Zavudev::Internal::Type::FileInput === _1 }
|
|
623
624
|
val.each do |v|
|
|
624
625
|
write_multipart_chunk(y, boundary: boundary, key: key, val: v, closing: closing)
|
|
625
626
|
end
|
|
@@ -635,6 +636,7 @@ module Zavudev
|
|
|
635
636
|
|
|
636
637
|
fused_io = fused_enum(strio) { closing.each(&:call) }
|
|
637
638
|
[boundary, fused_io]
|
|
639
|
+
# rubocop:enable Style/CaseEquality
|
|
638
640
|
end
|
|
639
641
|
|
|
640
642
|
# @api private
|
|
@@ -14,9 +14,17 @@ module Zavudev
|
|
|
14
14
|
# @return [String]
|
|
15
15
|
required :to, String
|
|
16
16
|
|
|
17
|
+
# @!attribute attachments
|
|
18
|
+
# Email attachments. Only supported when channel is 'email'. Maximum 40MB total
|
|
19
|
+
# size.
|
|
20
|
+
#
|
|
21
|
+
# @return [Array<Zavudev::Models::MessageSendParams::Attachment>, nil]
|
|
22
|
+
optional :attachments, -> { Zavudev::Internal::Type::ArrayOf[Zavudev::MessageSendParams::Attachment] }
|
|
23
|
+
|
|
17
24
|
# @!attribute channel
|
|
18
|
-
# Delivery channel. Use 'auto' for intelligent routing. If omitted
|
|
19
|
-
#
|
|
25
|
+
# Delivery channel. Use 'auto' for intelligent routing. If omitted, channel is
|
|
26
|
+
# auto-selected based on sender capabilities and recipient type. For email
|
|
27
|
+
# recipients, defaults to 'email'.
|
|
20
28
|
#
|
|
21
29
|
# @return [Symbol, Zavudev::Models::Channel, nil]
|
|
22
30
|
optional :channel, enum: -> { Zavudev::Channel }
|
|
@@ -89,13 +97,15 @@ module Zavudev
|
|
|
89
97
|
# @return [String, nil]
|
|
90
98
|
optional :zavu_sender, String
|
|
91
99
|
|
|
92
|
-
# @!method initialize(to:, channel: nil, content: nil, fallback_enabled: nil, html_body: nil, idempotency_key: nil, message_type: nil, metadata: nil, reply_to: nil, subject: nil, text: nil, voice_language: nil, zavu_sender: nil, request_options: {})
|
|
100
|
+
# @!method initialize(to:, attachments: nil, channel: nil, content: nil, fallback_enabled: nil, html_body: nil, idempotency_key: nil, message_type: nil, metadata: nil, reply_to: nil, subject: nil, text: nil, voice_language: nil, zavu_sender: nil, request_options: {})
|
|
93
101
|
# Some parameter documentations has been truncated, see
|
|
94
102
|
# {Zavudev::Models::MessageSendParams} for more details.
|
|
95
103
|
#
|
|
96
104
|
# @param to [String] Recipient phone number in E.164 format, email address, or numeric chat ID (for T
|
|
97
105
|
#
|
|
98
|
-
# @param
|
|
106
|
+
# @param attachments [Array<Zavudev::Models::MessageSendParams::Attachment>] Email attachments. Only supported when channel is 'email'. Maximum 40MB total si
|
|
107
|
+
#
|
|
108
|
+
# @param channel [Symbol, Zavudev::Models::Channel] Delivery channel. Use 'auto' for intelligent routing. If omitted, channel is aut
|
|
99
109
|
#
|
|
100
110
|
# @param content [Zavudev::Models::MessageContent] Additional content for non-text message types.
|
|
101
111
|
#
|
|
@@ -120,6 +130,55 @@ module Zavudev
|
|
|
120
130
|
# @param zavu_sender [String]
|
|
121
131
|
#
|
|
122
132
|
# @param request_options [Zavudev::RequestOptions, Hash{Symbol=>Object}]
|
|
133
|
+
|
|
134
|
+
class Attachment < Zavudev::Internal::Type::BaseModel
|
|
135
|
+
# @!attribute filename
|
|
136
|
+
# Name of the attached file.
|
|
137
|
+
#
|
|
138
|
+
# @return [String]
|
|
139
|
+
required :filename, String
|
|
140
|
+
|
|
141
|
+
# @!attribute content
|
|
142
|
+
# Content of the attached file as a Base64-encoded string.
|
|
143
|
+
#
|
|
144
|
+
# @return [String, nil]
|
|
145
|
+
optional :content, String
|
|
146
|
+
|
|
147
|
+
# @!attribute content_id
|
|
148
|
+
# Content ID for inline images. Reference in HTML as
|
|
149
|
+
# `<img src="cid:your_content_id">`.
|
|
150
|
+
#
|
|
151
|
+
# @return [String, nil]
|
|
152
|
+
optional :content_id, String
|
|
153
|
+
|
|
154
|
+
# @!attribute content_type
|
|
155
|
+
# MIME type of the attachment. If not set, will be derived from the filename.
|
|
156
|
+
#
|
|
157
|
+
# @return [String, nil]
|
|
158
|
+
optional :content_type, String
|
|
159
|
+
|
|
160
|
+
# @!attribute path
|
|
161
|
+
# URL where the attachment file is hosted. The server will fetch the file.
|
|
162
|
+
#
|
|
163
|
+
# @return [String, nil]
|
|
164
|
+
optional :path, String
|
|
165
|
+
|
|
166
|
+
# @!method initialize(filename:, content: nil, content_id: nil, content_type: nil, path: nil)
|
|
167
|
+
# Some parameter documentations has been truncated, see
|
|
168
|
+
# {Zavudev::Models::MessageSendParams::Attachment} for more details.
|
|
169
|
+
#
|
|
170
|
+
# Email attachment. Provide either `content` (base64) or `path` (URL), not both.
|
|
171
|
+
#
|
|
172
|
+
# @param filename [String] Name of the attached file.
|
|
173
|
+
#
|
|
174
|
+
# @param content [String] Content of the attached file as a Base64-encoded string.
|
|
175
|
+
#
|
|
176
|
+
# @param content_id [String] Content ID for inline images. Reference in HTML as `<img src="cid:your_content_i
|
|
177
|
+
#
|
|
178
|
+
# @param content_type [String] MIME type of the attachment. If not set, will be derived from the filename.
|
|
179
|
+
#
|
|
180
|
+
# @param path [String] URL where the attachment file is hosted. The server will fetch the file.
|
|
181
|
+
end
|
|
123
182
|
end
|
|
124
183
|
end
|
|
125
184
|
end
|
|
@@ -10,7 +10,8 @@ module Zavudev
|
|
|
10
10
|
required :id, String
|
|
11
11
|
|
|
12
12
|
# @!attribute body
|
|
13
|
-
#
|
|
13
|
+
# Default template body with variables: {{1}}, {{2}}, or named variables like
|
|
14
|
+
# {{contact.first_name}}. Used when no channel-specific body is set.
|
|
14
15
|
#
|
|
15
16
|
# @return [String]
|
|
16
17
|
required :body, String
|
|
@@ -28,7 +29,7 @@ module Zavudev
|
|
|
28
29
|
required :language, String
|
|
29
30
|
|
|
30
31
|
# @!attribute name
|
|
31
|
-
# Template name
|
|
32
|
+
# Template name. For WhatsApp, must match the approved template name in Meta.
|
|
32
33
|
#
|
|
33
34
|
# @return [String]
|
|
34
35
|
required :name, String
|
|
@@ -76,11 +77,29 @@ module Zavudev
|
|
|
76
77
|
# @return [String, nil]
|
|
77
78
|
optional :header_type, String, api_name: :headerType
|
|
78
79
|
|
|
80
|
+
# @!attribute instagram_body
|
|
81
|
+
# Channel-specific body for Instagram messages. Falls back to `body` if not set.
|
|
82
|
+
#
|
|
83
|
+
# @return [String, nil]
|
|
84
|
+
optional :instagram_body, String, api_name: :instagramBody
|
|
85
|
+
|
|
86
|
+
# @!attribute sms_body
|
|
87
|
+
# Channel-specific body for SMS messages. Falls back to `body` if not set.
|
|
88
|
+
#
|
|
89
|
+
# @return [String, nil]
|
|
90
|
+
optional :sms_body, String, api_name: :smsBody
|
|
91
|
+
|
|
79
92
|
# @!attribute status
|
|
80
93
|
#
|
|
81
94
|
# @return [Symbol, Zavudev::Models::Template::Status, nil]
|
|
82
95
|
optional :status, enum: -> { Zavudev::Template::Status }
|
|
83
96
|
|
|
97
|
+
# @!attribute telegram_body
|
|
98
|
+
# Channel-specific body for Telegram messages. Falls back to `body` if not set.
|
|
99
|
+
#
|
|
100
|
+
# @return [String, nil]
|
|
101
|
+
optional :telegram_body, String, api_name: :telegramBody
|
|
102
|
+
|
|
84
103
|
# @!attribute updated_at
|
|
85
104
|
#
|
|
86
105
|
# @return [Time, nil]
|
|
@@ -98,16 +117,19 @@ module Zavudev
|
|
|
98
117
|
# @return [Zavudev::Models::Template::Whatsapp, nil]
|
|
99
118
|
optional :whatsapp, -> { Zavudev::Template::Whatsapp }
|
|
100
119
|
|
|
101
|
-
# @!method initialize(id:, body:, category:, language:, name:, add_security_recommendation: nil, buttons: nil, code_expiration_minutes: nil, created_at: nil, footer: nil, header_content: nil, header_type: nil, status: nil, updated_at: nil, variables: nil, whatsapp: nil)
|
|
120
|
+
# @!method initialize(id:, body:, category:, language:, name:, add_security_recommendation: nil, buttons: nil, code_expiration_minutes: nil, created_at: nil, footer: nil, header_content: nil, header_type: nil, instagram_body: nil, sms_body: nil, status: nil, telegram_body: nil, updated_at: nil, variables: nil, whatsapp: nil)
|
|
121
|
+
# Some parameter documentations has been truncated, see
|
|
122
|
+
# {Zavudev::Models::Template} for more details.
|
|
123
|
+
#
|
|
102
124
|
# @param id [String]
|
|
103
125
|
#
|
|
104
|
-
# @param body [String]
|
|
126
|
+
# @param body [String] Default template body with variables: {{1}}, {{2}}, or named variables like {{co
|
|
105
127
|
#
|
|
106
128
|
# @param category [Symbol, Zavudev::Models::WhatsappCategory] WhatsApp template category.
|
|
107
129
|
#
|
|
108
130
|
# @param language [String] Language code.
|
|
109
131
|
#
|
|
110
|
-
# @param name [String] Template name
|
|
132
|
+
# @param name [String] Template name. For WhatsApp, must match the approved template name in Meta.
|
|
111
133
|
#
|
|
112
134
|
# @param add_security_recommendation [Boolean] Add 'Do not share this code' disclaimer. Only for AUTHENTICATION templates.
|
|
113
135
|
#
|
|
@@ -123,8 +145,14 @@ module Zavudev
|
|
|
123
145
|
#
|
|
124
146
|
# @param header_type [String] Type of header (text, image, video, document).
|
|
125
147
|
#
|
|
148
|
+
# @param instagram_body [String] Channel-specific body for Instagram messages. Falls back to `body` if not set.
|
|
149
|
+
#
|
|
150
|
+
# @param sms_body [String] Channel-specific body for SMS messages. Falls back to `body` if not set.
|
|
151
|
+
#
|
|
126
152
|
# @param status [Symbol, Zavudev::Models::Template::Status]
|
|
127
153
|
#
|
|
154
|
+
# @param telegram_body [String] Channel-specific body for Telegram messages. Falls back to `body` if not set.
|
|
155
|
+
#
|
|
128
156
|
# @param updated_at [Time]
|
|
129
157
|
#
|
|
130
158
|
# @param variables [Array<String>] List of variable names for documentation.
|
|
@@ -8,6 +8,7 @@ module Zavudev
|
|
|
8
8
|
include Zavudev::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
10
|
# @!attribute body
|
|
11
|
+
# Default template body. Used when no channel-specific body is set.
|
|
11
12
|
#
|
|
12
13
|
# @return [String]
|
|
13
14
|
required :body, String
|
|
@@ -42,6 +43,24 @@ module Zavudev
|
|
|
42
43
|
# @return [Integer, nil]
|
|
43
44
|
optional :code_expiration_minutes, Integer, api_name: :codeExpirationMinutes
|
|
44
45
|
|
|
46
|
+
# @!attribute instagram_body
|
|
47
|
+
# Channel-specific body for Instagram. Falls back to `body` if not set.
|
|
48
|
+
#
|
|
49
|
+
# @return [String, nil]
|
|
50
|
+
optional :instagram_body, String, api_name: :instagramBody
|
|
51
|
+
|
|
52
|
+
# @!attribute sms_body
|
|
53
|
+
# Channel-specific body for SMS. Falls back to `body` if not set.
|
|
54
|
+
#
|
|
55
|
+
# @return [String, nil]
|
|
56
|
+
optional :sms_body, String, api_name: :smsBody
|
|
57
|
+
|
|
58
|
+
# @!attribute telegram_body
|
|
59
|
+
# Channel-specific body for Telegram. Falls back to `body` if not set.
|
|
60
|
+
#
|
|
61
|
+
# @return [String, nil]
|
|
62
|
+
optional :telegram_body, String, api_name: :telegramBody
|
|
63
|
+
|
|
45
64
|
# @!attribute variables
|
|
46
65
|
#
|
|
47
66
|
# @return [Array<String>, nil]
|
|
@@ -53,8 +72,8 @@ module Zavudev
|
|
|
53
72
|
# @return [Symbol, Zavudev::Models::WhatsappCategory, nil]
|
|
54
73
|
optional :whatsapp_category, enum: -> { Zavudev::WhatsappCategory }, api_name: :whatsappCategory
|
|
55
74
|
|
|
56
|
-
# @!method initialize(body:, language:, name:, add_security_recommendation: nil, buttons: nil, code_expiration_minutes: nil, variables: nil, whatsapp_category: nil, request_options: {})
|
|
57
|
-
# @param body [String]
|
|
75
|
+
# @!method initialize(body:, language:, name:, add_security_recommendation: nil, buttons: nil, code_expiration_minutes: nil, instagram_body: nil, sms_body: nil, telegram_body: nil, variables: nil, whatsapp_category: nil, request_options: {})
|
|
76
|
+
# @param body [String] Default template body. Used when no channel-specific body is set.
|
|
58
77
|
#
|
|
59
78
|
# @param language [String]
|
|
60
79
|
#
|
|
@@ -66,6 +85,12 @@ module Zavudev
|
|
|
66
85
|
#
|
|
67
86
|
# @param code_expiration_minutes [Integer] Code expiration time in minutes. Only for AUTHENTICATION templates.
|
|
68
87
|
#
|
|
88
|
+
# @param instagram_body [String] Channel-specific body for Instagram. Falls back to `body` if not set.
|
|
89
|
+
#
|
|
90
|
+
# @param sms_body [String] Channel-specific body for SMS. Falls back to `body` if not set.
|
|
91
|
+
#
|
|
92
|
+
# @param telegram_body [String] Channel-specific body for Telegram. Falls back to `body` if not set.
|
|
93
|
+
#
|
|
69
94
|
# @param variables [Array<String>]
|
|
70
95
|
#
|
|
71
96
|
# @param whatsapp_category [Symbol, Zavudev::Models::WhatsappCategory] WhatsApp template category.
|
|
@@ -30,6 +30,11 @@ module Zavudev
|
|
|
30
30
|
#
|
|
31
31
|
# - `conversation.new`: New conversation started with a contact
|
|
32
32
|
# - `template.status_changed`: WhatsApp template approval status changed
|
|
33
|
+
#
|
|
34
|
+
# **Partner events:**
|
|
35
|
+
#
|
|
36
|
+
# - `invitation.status_changed`: A partner invitation status changed (pending,
|
|
37
|
+
# in_progress, completed, cancelled)
|
|
33
38
|
module WebhookEvent
|
|
34
39
|
extend Zavudev::Internal::Type::Enum
|
|
35
40
|
|
|
@@ -43,6 +48,7 @@ module Zavudev
|
|
|
43
48
|
BROADCAST_STATUS_CHANGED = :"broadcast.status_changed"
|
|
44
49
|
CONVERSATION_NEW = :"conversation.new"
|
|
45
50
|
TEMPLATE_STATUS_CHANGED = :"template.status_changed"
|
|
51
|
+
INVITATION_STATUS_CHANGED = :"invitation.status_changed"
|
|
46
52
|
|
|
47
53
|
# @!method self.values
|
|
48
54
|
# @return [Array<Symbol>]
|
|
@@ -107,11 +107,13 @@ module Zavudev
|
|
|
107
107
|
# - Unverified accounts: 200 messages per channel per day
|
|
108
108
|
# - Complete KYC verification to increase limits to 10,000/day
|
|
109
109
|
#
|
|
110
|
-
# @overload send_(to:, channel: nil, content: nil, fallback_enabled: nil, html_body: nil, idempotency_key: nil, message_type: nil, metadata: nil, reply_to: nil, subject: nil, text: nil, voice_language: nil, zavu_sender: nil, request_options: {})
|
|
110
|
+
# @overload send_(to:, attachments: nil, channel: nil, content: nil, fallback_enabled: nil, html_body: nil, idempotency_key: nil, message_type: nil, metadata: nil, reply_to: nil, subject: nil, text: nil, voice_language: nil, zavu_sender: nil, request_options: {})
|
|
111
111
|
#
|
|
112
112
|
# @param to [String] Body param: Recipient phone number in E.164 format, email address, or numeric ch
|
|
113
113
|
#
|
|
114
|
-
# @param
|
|
114
|
+
# @param attachments [Array<Zavudev::Models::MessageSendParams::Attachment>] Body param: Email attachments. Only supported when channel is 'email'. Maximum 4
|
|
115
|
+
#
|
|
116
|
+
# @param channel [Symbol, Zavudev::Models::Channel] Body param: Delivery channel. Use 'auto' for intelligent routing. If omitted, ch
|
|
115
117
|
#
|
|
116
118
|
# @param content [Zavudev::Models::MessageContent] Body param: Additional content for non-text message types.
|
|
117
119
|
#
|
|
@@ -6,9 +6,9 @@ module Zavudev
|
|
|
6
6
|
# Create a WhatsApp message template. Note: Templates must be approved by Meta
|
|
7
7
|
# before use.
|
|
8
8
|
#
|
|
9
|
-
# @overload create(body:, language:, name:, add_security_recommendation: nil, buttons: nil, code_expiration_minutes: nil, variables: nil, whatsapp_category: nil, request_options: {})
|
|
9
|
+
# @overload create(body:, language:, name:, add_security_recommendation: nil, buttons: nil, code_expiration_minutes: nil, instagram_body: nil, sms_body: nil, telegram_body: nil, variables: nil, whatsapp_category: nil, request_options: {})
|
|
10
10
|
#
|
|
11
|
-
# @param body [String]
|
|
11
|
+
# @param body [String] Default template body. Used when no channel-specific body is set.
|
|
12
12
|
#
|
|
13
13
|
# @param language [String]
|
|
14
14
|
#
|
|
@@ -20,6 +20,12 @@ module Zavudev
|
|
|
20
20
|
#
|
|
21
21
|
# @param code_expiration_minutes [Integer] Code expiration time in minutes. Only for AUTHENTICATION templates.
|
|
22
22
|
#
|
|
23
|
+
# @param instagram_body [String] Channel-specific body for Instagram. Falls back to `body` if not set.
|
|
24
|
+
#
|
|
25
|
+
# @param sms_body [String] Channel-specific body for SMS. Falls back to `body` if not set.
|
|
26
|
+
#
|
|
27
|
+
# @param telegram_body [String] Channel-specific body for Telegram. Falls back to `body` if not set.
|
|
28
|
+
#
|
|
23
29
|
# @param variables [Array<String>]
|
|
24
30
|
#
|
|
25
31
|
# @param whatsapp_category [Symbol, Zavudev::Models::WhatsappCategory] WhatsApp template category.
|
data/lib/zavudev/version.rb
CHANGED
|
@@ -16,8 +16,23 @@ module Zavudev
|
|
|
16
16
|
sig { returns(String) }
|
|
17
17
|
attr_accessor :to
|
|
18
18
|
|
|
19
|
-
#
|
|
20
|
-
#
|
|
19
|
+
# Email attachments. Only supported when channel is 'email'. Maximum 40MB total
|
|
20
|
+
# size.
|
|
21
|
+
sig do
|
|
22
|
+
returns(T.nilable(T::Array[Zavudev::MessageSendParams::Attachment]))
|
|
23
|
+
end
|
|
24
|
+
attr_reader :attachments
|
|
25
|
+
|
|
26
|
+
sig do
|
|
27
|
+
params(
|
|
28
|
+
attachments: T::Array[Zavudev::MessageSendParams::Attachment::OrHash]
|
|
29
|
+
).void
|
|
30
|
+
end
|
|
31
|
+
attr_writer :attachments
|
|
32
|
+
|
|
33
|
+
# Delivery channel. Use 'auto' for intelligent routing. If omitted, channel is
|
|
34
|
+
# auto-selected based on sender capabilities and recipient type. For email
|
|
35
|
+
# recipients, defaults to 'email'.
|
|
21
36
|
sig { returns(T.nilable(Zavudev::Channel::OrSymbol)) }
|
|
22
37
|
attr_reader :channel
|
|
23
38
|
|
|
@@ -106,6 +121,7 @@ module Zavudev
|
|
|
106
121
|
sig do
|
|
107
122
|
params(
|
|
108
123
|
to: String,
|
|
124
|
+
attachments: T::Array[Zavudev::MessageSendParams::Attachment::OrHash],
|
|
109
125
|
channel: Zavudev::Channel::OrSymbol,
|
|
110
126
|
content: Zavudev::MessageContent::OrHash,
|
|
111
127
|
fallback_enabled: T::Boolean,
|
|
@@ -125,8 +141,12 @@ module Zavudev
|
|
|
125
141
|
# Recipient phone number in E.164 format, email address, or numeric chat ID (for
|
|
126
142
|
# Telegram/Instagram).
|
|
127
143
|
to:,
|
|
128
|
-
#
|
|
129
|
-
#
|
|
144
|
+
# Email attachments. Only supported when channel is 'email'. Maximum 40MB total
|
|
145
|
+
# size.
|
|
146
|
+
attachments: nil,
|
|
147
|
+
# Delivery channel. Use 'auto' for intelligent routing. If omitted, channel is
|
|
148
|
+
# auto-selected based on sender capabilities and recipient type. For email
|
|
149
|
+
# recipients, defaults to 'email'.
|
|
130
150
|
channel: nil,
|
|
131
151
|
# Additional content for non-text message types.
|
|
132
152
|
content: nil,
|
|
@@ -160,6 +180,7 @@ module Zavudev
|
|
|
160
180
|
override.returns(
|
|
161
181
|
{
|
|
162
182
|
to: String,
|
|
183
|
+
attachments: T::Array[Zavudev::MessageSendParams::Attachment],
|
|
163
184
|
channel: Zavudev::Channel::OrSymbol,
|
|
164
185
|
content: Zavudev::MessageContent,
|
|
165
186
|
fallback_enabled: T::Boolean,
|
|
@@ -178,6 +199,88 @@ module Zavudev
|
|
|
178
199
|
end
|
|
179
200
|
def to_hash
|
|
180
201
|
end
|
|
202
|
+
|
|
203
|
+
class Attachment < Zavudev::Internal::Type::BaseModel
|
|
204
|
+
OrHash =
|
|
205
|
+
T.type_alias do
|
|
206
|
+
T.any(
|
|
207
|
+
Zavudev::MessageSendParams::Attachment,
|
|
208
|
+
Zavudev::Internal::AnyHash
|
|
209
|
+
)
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
# Name of the attached file.
|
|
213
|
+
sig { returns(String) }
|
|
214
|
+
attr_accessor :filename
|
|
215
|
+
|
|
216
|
+
# Content of the attached file as a Base64-encoded string.
|
|
217
|
+
sig { returns(T.nilable(String)) }
|
|
218
|
+
attr_reader :content
|
|
219
|
+
|
|
220
|
+
sig { params(content: String).void }
|
|
221
|
+
attr_writer :content
|
|
222
|
+
|
|
223
|
+
# Content ID for inline images. Reference in HTML as
|
|
224
|
+
# `<img src="cid:your_content_id">`.
|
|
225
|
+
sig { returns(T.nilable(String)) }
|
|
226
|
+
attr_reader :content_id
|
|
227
|
+
|
|
228
|
+
sig { params(content_id: String).void }
|
|
229
|
+
attr_writer :content_id
|
|
230
|
+
|
|
231
|
+
# MIME type of the attachment. If not set, will be derived from the filename.
|
|
232
|
+
sig { returns(T.nilable(String)) }
|
|
233
|
+
attr_reader :content_type
|
|
234
|
+
|
|
235
|
+
sig { params(content_type: String).void }
|
|
236
|
+
attr_writer :content_type
|
|
237
|
+
|
|
238
|
+
# URL where the attachment file is hosted. The server will fetch the file.
|
|
239
|
+
sig { returns(T.nilable(String)) }
|
|
240
|
+
attr_reader :path
|
|
241
|
+
|
|
242
|
+
sig { params(path: String).void }
|
|
243
|
+
attr_writer :path
|
|
244
|
+
|
|
245
|
+
# Email attachment. Provide either `content` (base64) or `path` (URL), not both.
|
|
246
|
+
sig do
|
|
247
|
+
params(
|
|
248
|
+
filename: String,
|
|
249
|
+
content: String,
|
|
250
|
+
content_id: String,
|
|
251
|
+
content_type: String,
|
|
252
|
+
path: String
|
|
253
|
+
).returns(T.attached_class)
|
|
254
|
+
end
|
|
255
|
+
def self.new(
|
|
256
|
+
# Name of the attached file.
|
|
257
|
+
filename:,
|
|
258
|
+
# Content of the attached file as a Base64-encoded string.
|
|
259
|
+
content: nil,
|
|
260
|
+
# Content ID for inline images. Reference in HTML as
|
|
261
|
+
# `<img src="cid:your_content_id">`.
|
|
262
|
+
content_id: nil,
|
|
263
|
+
# MIME type of the attachment. If not set, will be derived from the filename.
|
|
264
|
+
content_type: nil,
|
|
265
|
+
# URL where the attachment file is hosted. The server will fetch the file.
|
|
266
|
+
path: nil
|
|
267
|
+
)
|
|
268
|
+
end
|
|
269
|
+
|
|
270
|
+
sig do
|
|
271
|
+
override.returns(
|
|
272
|
+
{
|
|
273
|
+
filename: String,
|
|
274
|
+
content: String,
|
|
275
|
+
content_id: String,
|
|
276
|
+
content_type: String,
|
|
277
|
+
path: String
|
|
278
|
+
}
|
|
279
|
+
)
|
|
280
|
+
end
|
|
281
|
+
def to_hash
|
|
282
|
+
end
|
|
283
|
+
end
|
|
181
284
|
end
|
|
182
285
|
end
|
|
183
286
|
end
|
|
@@ -9,7 +9,8 @@ module Zavudev
|
|
|
9
9
|
sig { returns(String) }
|
|
10
10
|
attr_accessor :id
|
|
11
11
|
|
|
12
|
-
#
|
|
12
|
+
# Default template body with variables: {{1}}, {{2}}, or named variables like
|
|
13
|
+
# {{contact.first_name}}. Used when no channel-specific body is set.
|
|
13
14
|
sig { returns(String) }
|
|
14
15
|
attr_accessor :body
|
|
15
16
|
|
|
@@ -21,7 +22,7 @@ module Zavudev
|
|
|
21
22
|
sig { returns(String) }
|
|
22
23
|
attr_accessor :language
|
|
23
24
|
|
|
24
|
-
# Template name
|
|
25
|
+
# Template name. For WhatsApp, must match the approved template name in Meta.
|
|
25
26
|
sig { returns(String) }
|
|
26
27
|
attr_accessor :name
|
|
27
28
|
|
|
@@ -73,12 +74,33 @@ module Zavudev
|
|
|
73
74
|
sig { params(header_type: String).void }
|
|
74
75
|
attr_writer :header_type
|
|
75
76
|
|
|
77
|
+
# Channel-specific body for Instagram messages. Falls back to `body` if not set.
|
|
78
|
+
sig { returns(T.nilable(String)) }
|
|
79
|
+
attr_reader :instagram_body
|
|
80
|
+
|
|
81
|
+
sig { params(instagram_body: String).void }
|
|
82
|
+
attr_writer :instagram_body
|
|
83
|
+
|
|
84
|
+
# Channel-specific body for SMS messages. Falls back to `body` if not set.
|
|
85
|
+
sig { returns(T.nilable(String)) }
|
|
86
|
+
attr_reader :sms_body
|
|
87
|
+
|
|
88
|
+
sig { params(sms_body: String).void }
|
|
89
|
+
attr_writer :sms_body
|
|
90
|
+
|
|
76
91
|
sig { returns(T.nilable(Zavudev::Template::Status::TaggedSymbol)) }
|
|
77
92
|
attr_reader :status
|
|
78
93
|
|
|
79
94
|
sig { params(status: Zavudev::Template::Status::OrSymbol).void }
|
|
80
95
|
attr_writer :status
|
|
81
96
|
|
|
97
|
+
# Channel-specific body for Telegram messages. Falls back to `body` if not set.
|
|
98
|
+
sig { returns(T.nilable(String)) }
|
|
99
|
+
attr_reader :telegram_body
|
|
100
|
+
|
|
101
|
+
sig { params(telegram_body: String).void }
|
|
102
|
+
attr_writer :telegram_body
|
|
103
|
+
|
|
82
104
|
sig { returns(T.nilable(Time)) }
|
|
83
105
|
attr_reader :updated_at
|
|
84
106
|
|
|
@@ -113,7 +135,10 @@ module Zavudev
|
|
|
113
135
|
footer: String,
|
|
114
136
|
header_content: String,
|
|
115
137
|
header_type: String,
|
|
138
|
+
instagram_body: String,
|
|
139
|
+
sms_body: String,
|
|
116
140
|
status: Zavudev::Template::Status::OrSymbol,
|
|
141
|
+
telegram_body: String,
|
|
117
142
|
updated_at: Time,
|
|
118
143
|
variables: T::Array[String],
|
|
119
144
|
whatsapp: Zavudev::Template::Whatsapp::OrHash
|
|
@@ -121,13 +146,14 @@ module Zavudev
|
|
|
121
146
|
end
|
|
122
147
|
def self.new(
|
|
123
148
|
id:,
|
|
124
|
-
#
|
|
149
|
+
# Default template body with variables: {{1}}, {{2}}, or named variables like
|
|
150
|
+
# {{contact.first_name}}. Used when no channel-specific body is set.
|
|
125
151
|
body:,
|
|
126
152
|
# WhatsApp template category.
|
|
127
153
|
category:,
|
|
128
154
|
# Language code.
|
|
129
155
|
language:,
|
|
130
|
-
# Template name
|
|
156
|
+
# Template name. For WhatsApp, must match the approved template name in Meta.
|
|
131
157
|
name:,
|
|
132
158
|
# Add 'Do not share this code' disclaimer. Only for AUTHENTICATION templates.
|
|
133
159
|
add_security_recommendation: nil,
|
|
@@ -142,7 +168,13 @@ module Zavudev
|
|
|
142
168
|
header_content: nil,
|
|
143
169
|
# Type of header (text, image, video, document).
|
|
144
170
|
header_type: nil,
|
|
171
|
+
# Channel-specific body for Instagram messages. Falls back to `body` if not set.
|
|
172
|
+
instagram_body: nil,
|
|
173
|
+
# Channel-specific body for SMS messages. Falls back to `body` if not set.
|
|
174
|
+
sms_body: nil,
|
|
145
175
|
status: nil,
|
|
176
|
+
# Channel-specific body for Telegram messages. Falls back to `body` if not set.
|
|
177
|
+
telegram_body: nil,
|
|
146
178
|
updated_at: nil,
|
|
147
179
|
# List of variable names for documentation.
|
|
148
180
|
variables: nil,
|
|
@@ -166,7 +198,10 @@ module Zavudev
|
|
|
166
198
|
footer: String,
|
|
167
199
|
header_content: String,
|
|
168
200
|
header_type: String,
|
|
201
|
+
instagram_body: String,
|
|
202
|
+
sms_body: String,
|
|
169
203
|
status: Zavudev::Template::Status::TaggedSymbol,
|
|
204
|
+
telegram_body: String,
|
|
170
205
|
updated_at: Time,
|
|
171
206
|
variables: T::Array[String],
|
|
172
207
|
whatsapp: Zavudev::Template::Whatsapp
|
|
@@ -11,6 +11,7 @@ module Zavudev
|
|
|
11
11
|
T.any(Zavudev::TemplateCreateParams, Zavudev::Internal::AnyHash)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
+
# Default template body. Used when no channel-specific body is set.
|
|
14
15
|
sig { returns(String) }
|
|
15
16
|
attr_accessor :body
|
|
16
17
|
|
|
@@ -47,6 +48,27 @@ module Zavudev
|
|
|
47
48
|
sig { params(code_expiration_minutes: Integer).void }
|
|
48
49
|
attr_writer :code_expiration_minutes
|
|
49
50
|
|
|
51
|
+
# Channel-specific body for Instagram. Falls back to `body` if not set.
|
|
52
|
+
sig { returns(T.nilable(String)) }
|
|
53
|
+
attr_reader :instagram_body
|
|
54
|
+
|
|
55
|
+
sig { params(instagram_body: String).void }
|
|
56
|
+
attr_writer :instagram_body
|
|
57
|
+
|
|
58
|
+
# Channel-specific body for SMS. Falls back to `body` if not set.
|
|
59
|
+
sig { returns(T.nilable(String)) }
|
|
60
|
+
attr_reader :sms_body
|
|
61
|
+
|
|
62
|
+
sig { params(sms_body: String).void }
|
|
63
|
+
attr_writer :sms_body
|
|
64
|
+
|
|
65
|
+
# Channel-specific body for Telegram. Falls back to `body` if not set.
|
|
66
|
+
sig { returns(T.nilable(String)) }
|
|
67
|
+
attr_reader :telegram_body
|
|
68
|
+
|
|
69
|
+
sig { params(telegram_body: String).void }
|
|
70
|
+
attr_writer :telegram_body
|
|
71
|
+
|
|
50
72
|
sig { returns(T.nilable(T::Array[String])) }
|
|
51
73
|
attr_reader :variables
|
|
52
74
|
|
|
@@ -70,12 +92,16 @@ module Zavudev
|
|
|
70
92
|
add_security_recommendation: T::Boolean,
|
|
71
93
|
buttons: T::Array[Zavudev::TemplateCreateParams::Button::OrHash],
|
|
72
94
|
code_expiration_minutes: Integer,
|
|
95
|
+
instagram_body: String,
|
|
96
|
+
sms_body: String,
|
|
97
|
+
telegram_body: String,
|
|
73
98
|
variables: T::Array[String],
|
|
74
99
|
whatsapp_category: Zavudev::WhatsappCategory::OrSymbol,
|
|
75
100
|
request_options: Zavudev::RequestOptions::OrHash
|
|
76
101
|
).returns(T.attached_class)
|
|
77
102
|
end
|
|
78
103
|
def self.new(
|
|
104
|
+
# Default template body. Used when no channel-specific body is set.
|
|
79
105
|
body:,
|
|
80
106
|
language:,
|
|
81
107
|
name:,
|
|
@@ -85,6 +111,12 @@ module Zavudev
|
|
|
85
111
|
buttons: nil,
|
|
86
112
|
# Code expiration time in minutes. Only for AUTHENTICATION templates.
|
|
87
113
|
code_expiration_minutes: nil,
|
|
114
|
+
# Channel-specific body for Instagram. Falls back to `body` if not set.
|
|
115
|
+
instagram_body: nil,
|
|
116
|
+
# Channel-specific body for SMS. Falls back to `body` if not set.
|
|
117
|
+
sms_body: nil,
|
|
118
|
+
# Channel-specific body for Telegram. Falls back to `body` if not set.
|
|
119
|
+
telegram_body: nil,
|
|
88
120
|
variables: nil,
|
|
89
121
|
# WhatsApp template category.
|
|
90
122
|
whatsapp_category: nil,
|
|
@@ -101,6 +133,9 @@ module Zavudev
|
|
|
101
133
|
add_security_recommendation: T::Boolean,
|
|
102
134
|
buttons: T::Array[Zavudev::TemplateCreateParams::Button],
|
|
103
135
|
code_expiration_minutes: Integer,
|
|
136
|
+
instagram_body: String,
|
|
137
|
+
sms_body: String,
|
|
138
|
+
telegram_body: String,
|
|
104
139
|
variables: T::Array[String],
|
|
105
140
|
whatsapp_category: Zavudev::WhatsappCategory::OrSymbol,
|
|
106
141
|
request_options: Zavudev::RequestOptions
|
|
@@ -30,6 +30,11 @@ module Zavudev
|
|
|
30
30
|
#
|
|
31
31
|
# - `conversation.new`: New conversation started with a contact
|
|
32
32
|
# - `template.status_changed`: WhatsApp template approval status changed
|
|
33
|
+
#
|
|
34
|
+
# **Partner events:**
|
|
35
|
+
#
|
|
36
|
+
# - `invitation.status_changed`: A partner invitation status changed (pending,
|
|
37
|
+
# in_progress, completed, cancelled)
|
|
33
38
|
module WebhookEvent
|
|
34
39
|
extend Zavudev::Internal::Type::Enum
|
|
35
40
|
|
|
@@ -54,6 +59,8 @@ module Zavudev
|
|
|
54
59
|
T.let(:"conversation.new", Zavudev::WebhookEvent::TaggedSymbol)
|
|
55
60
|
TEMPLATE_STATUS_CHANGED =
|
|
56
61
|
T.let(:"template.status_changed", Zavudev::WebhookEvent::TaggedSymbol)
|
|
62
|
+
INVITATION_STATUS_CHANGED =
|
|
63
|
+
T.let(:"invitation.status_changed", Zavudev::WebhookEvent::TaggedSymbol)
|
|
57
64
|
|
|
58
65
|
sig { override.returns(T::Array[Zavudev::WebhookEvent::TaggedSymbol]) }
|
|
59
66
|
def self.values
|
|
@@ -77,6 +77,7 @@ module Zavudev
|
|
|
77
77
|
sig do
|
|
78
78
|
params(
|
|
79
79
|
to: String,
|
|
80
|
+
attachments: T::Array[Zavudev::MessageSendParams::Attachment::OrHash],
|
|
80
81
|
channel: Zavudev::Channel::OrSymbol,
|
|
81
82
|
content: Zavudev::MessageContent::OrHash,
|
|
82
83
|
fallback_enabled: T::Boolean,
|
|
@@ -96,9 +97,12 @@ module Zavudev
|
|
|
96
97
|
# Body param: Recipient phone number in E.164 format, email address, or numeric
|
|
97
98
|
# chat ID (for Telegram/Instagram).
|
|
98
99
|
to:,
|
|
99
|
-
# Body param:
|
|
100
|
-
#
|
|
101
|
-
|
|
100
|
+
# Body param: Email attachments. Only supported when channel is 'email'. Maximum
|
|
101
|
+
# 40MB total size.
|
|
102
|
+
attachments: nil,
|
|
103
|
+
# Body param: Delivery channel. Use 'auto' for intelligent routing. If omitted,
|
|
104
|
+
# channel is auto-selected based on sender capabilities and recipient type. For
|
|
105
|
+
# email recipients, defaults to 'email'.
|
|
102
106
|
channel: nil,
|
|
103
107
|
# Body param: Additional content for non-text message types.
|
|
104
108
|
content: nil,
|
|
@@ -13,12 +13,16 @@ module Zavudev
|
|
|
13
13
|
add_security_recommendation: T::Boolean,
|
|
14
14
|
buttons: T::Array[Zavudev::TemplateCreateParams::Button::OrHash],
|
|
15
15
|
code_expiration_minutes: Integer,
|
|
16
|
+
instagram_body: String,
|
|
17
|
+
sms_body: String,
|
|
18
|
+
telegram_body: String,
|
|
16
19
|
variables: T::Array[String],
|
|
17
20
|
whatsapp_category: Zavudev::WhatsappCategory::OrSymbol,
|
|
18
21
|
request_options: Zavudev::RequestOptions::OrHash
|
|
19
22
|
).returns(Zavudev::Template)
|
|
20
23
|
end
|
|
21
24
|
def create(
|
|
25
|
+
# Default template body. Used when no channel-specific body is set.
|
|
22
26
|
body:,
|
|
23
27
|
language:,
|
|
24
28
|
name:,
|
|
@@ -28,6 +32,12 @@ module Zavudev
|
|
|
28
32
|
buttons: nil,
|
|
29
33
|
# Code expiration time in minutes. Only for AUTHENTICATION templates.
|
|
30
34
|
code_expiration_minutes: nil,
|
|
35
|
+
# Channel-specific body for Instagram. Falls back to `body` if not set.
|
|
36
|
+
instagram_body: nil,
|
|
37
|
+
# Channel-specific body for SMS. Falls back to `body` if not set.
|
|
38
|
+
sms_body: nil,
|
|
39
|
+
# Channel-specific body for Telegram. Falls back to `body` if not set.
|
|
40
|
+
telegram_body: nil,
|
|
31
41
|
variables: nil,
|
|
32
42
|
# WhatsApp template category.
|
|
33
43
|
whatsapp_category: nil,
|
|
@@ -3,6 +3,7 @@ module Zavudev
|
|
|
3
3
|
type message_send_params =
|
|
4
4
|
{
|
|
5
5
|
to: String,
|
|
6
|
+
attachments: ::Array[Zavudev::MessageSendParams::Attachment],
|
|
6
7
|
channel: Zavudev::Models::channel,
|
|
7
8
|
content: Zavudev::MessageContent,
|
|
8
9
|
fallback_enabled: bool,
|
|
@@ -24,6 +25,12 @@ module Zavudev
|
|
|
24
25
|
|
|
25
26
|
attr_accessor to: String
|
|
26
27
|
|
|
28
|
+
attr_reader attachments: ::Array[Zavudev::MessageSendParams::Attachment]?
|
|
29
|
+
|
|
30
|
+
def attachments=: (
|
|
31
|
+
::Array[Zavudev::MessageSendParams::Attachment]
|
|
32
|
+
) -> ::Array[Zavudev::MessageSendParams::Attachment]
|
|
33
|
+
|
|
27
34
|
attr_reader channel: Zavudev::Models::channel?
|
|
28
35
|
|
|
29
36
|
def channel=: (Zavudev::Models::channel) -> Zavudev::Models::channel
|
|
@@ -76,6 +83,7 @@ module Zavudev
|
|
|
76
83
|
|
|
77
84
|
def initialize: (
|
|
78
85
|
to: String,
|
|
86
|
+
?attachments: ::Array[Zavudev::MessageSendParams::Attachment],
|
|
79
87
|
?channel: Zavudev::Models::channel,
|
|
80
88
|
?content: Zavudev::MessageContent,
|
|
81
89
|
?fallback_enabled: bool,
|
|
@@ -93,6 +101,7 @@ module Zavudev
|
|
|
93
101
|
|
|
94
102
|
def to_hash: -> {
|
|
95
103
|
to: String,
|
|
104
|
+
attachments: ::Array[Zavudev::MessageSendParams::Attachment],
|
|
96
105
|
channel: Zavudev::Models::channel,
|
|
97
106
|
content: Zavudev::MessageContent,
|
|
98
107
|
fallback_enabled: bool,
|
|
@@ -107,6 +116,51 @@ module Zavudev
|
|
|
107
116
|
zavu_sender: String,
|
|
108
117
|
request_options: Zavudev::RequestOptions
|
|
109
118
|
}
|
|
119
|
+
|
|
120
|
+
type attachment =
|
|
121
|
+
{
|
|
122
|
+
filename: String,
|
|
123
|
+
content: String,
|
|
124
|
+
content_id: String,
|
|
125
|
+
content_type: String,
|
|
126
|
+
path: String
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
class Attachment < Zavudev::Internal::Type::BaseModel
|
|
130
|
+
attr_accessor filename: String
|
|
131
|
+
|
|
132
|
+
attr_reader content: String?
|
|
133
|
+
|
|
134
|
+
def content=: (String) -> String
|
|
135
|
+
|
|
136
|
+
attr_reader content_id: String?
|
|
137
|
+
|
|
138
|
+
def content_id=: (String) -> String
|
|
139
|
+
|
|
140
|
+
attr_reader content_type: String?
|
|
141
|
+
|
|
142
|
+
def content_type=: (String) -> String
|
|
143
|
+
|
|
144
|
+
attr_reader path: String?
|
|
145
|
+
|
|
146
|
+
def path=: (String) -> String
|
|
147
|
+
|
|
148
|
+
def initialize: (
|
|
149
|
+
filename: String,
|
|
150
|
+
?content: String,
|
|
151
|
+
?content_id: String,
|
|
152
|
+
?content_type: String,
|
|
153
|
+
?path: String
|
|
154
|
+
) -> void
|
|
155
|
+
|
|
156
|
+
def to_hash: -> {
|
|
157
|
+
filename: String,
|
|
158
|
+
content: String,
|
|
159
|
+
content_id: String,
|
|
160
|
+
content_type: String,
|
|
161
|
+
path: String
|
|
162
|
+
}
|
|
163
|
+
end
|
|
110
164
|
end
|
|
111
165
|
end
|
|
112
166
|
end
|
|
@@ -14,7 +14,10 @@ module Zavudev
|
|
|
14
14
|
footer: String,
|
|
15
15
|
header_content: String,
|
|
16
16
|
header_type: String,
|
|
17
|
+
instagram_body: String,
|
|
18
|
+
sms_body: String,
|
|
17
19
|
status: Zavudev::Models::Template::status,
|
|
20
|
+
telegram_body: String,
|
|
18
21
|
updated_at: Time,
|
|
19
22
|
variables: ::Array[String],
|
|
20
23
|
whatsapp: Zavudev::Template::Whatsapp
|
|
@@ -61,12 +64,24 @@ module Zavudev
|
|
|
61
64
|
|
|
62
65
|
def header_type=: (String) -> String
|
|
63
66
|
|
|
67
|
+
attr_reader instagram_body: String?
|
|
68
|
+
|
|
69
|
+
def instagram_body=: (String) -> String
|
|
70
|
+
|
|
71
|
+
attr_reader sms_body: String?
|
|
72
|
+
|
|
73
|
+
def sms_body=: (String) -> String
|
|
74
|
+
|
|
64
75
|
attr_reader status: Zavudev::Models::Template::status?
|
|
65
76
|
|
|
66
77
|
def status=: (
|
|
67
78
|
Zavudev::Models::Template::status
|
|
68
79
|
) -> Zavudev::Models::Template::status
|
|
69
80
|
|
|
81
|
+
attr_reader telegram_body: String?
|
|
82
|
+
|
|
83
|
+
def telegram_body=: (String) -> String
|
|
84
|
+
|
|
70
85
|
attr_reader updated_at: Time?
|
|
71
86
|
|
|
72
87
|
def updated_at=: (Time) -> Time
|
|
@@ -94,7 +109,10 @@ module Zavudev
|
|
|
94
109
|
?footer: String,
|
|
95
110
|
?header_content: String,
|
|
96
111
|
?header_type: String,
|
|
112
|
+
?instagram_body: String,
|
|
113
|
+
?sms_body: String,
|
|
97
114
|
?status: Zavudev::Models::Template::status,
|
|
115
|
+
?telegram_body: String,
|
|
98
116
|
?updated_at: Time,
|
|
99
117
|
?variables: ::Array[String],
|
|
100
118
|
?whatsapp: Zavudev::Template::Whatsapp
|
|
@@ -113,7 +131,10 @@ module Zavudev
|
|
|
113
131
|
footer: String,
|
|
114
132
|
header_content: String,
|
|
115
133
|
header_type: String,
|
|
134
|
+
instagram_body: String,
|
|
135
|
+
sms_body: String,
|
|
116
136
|
status: Zavudev::Models::Template::status,
|
|
137
|
+
telegram_body: String,
|
|
117
138
|
updated_at: Time,
|
|
118
139
|
variables: ::Array[String],
|
|
119
140
|
whatsapp: Zavudev::Template::Whatsapp
|
|
@@ -8,6 +8,9 @@ module Zavudev
|
|
|
8
8
|
add_security_recommendation: bool,
|
|
9
9
|
buttons: ::Array[Zavudev::TemplateCreateParams::Button],
|
|
10
10
|
code_expiration_minutes: Integer,
|
|
11
|
+
instagram_body: String,
|
|
12
|
+
sms_body: String,
|
|
13
|
+
telegram_body: String,
|
|
11
14
|
variables: ::Array[String],
|
|
12
15
|
whatsapp_category: Zavudev::Models::whatsapp_category
|
|
13
16
|
}
|
|
@@ -37,6 +40,18 @@ module Zavudev
|
|
|
37
40
|
|
|
38
41
|
def code_expiration_minutes=: (Integer) -> Integer
|
|
39
42
|
|
|
43
|
+
attr_reader instagram_body: String?
|
|
44
|
+
|
|
45
|
+
def instagram_body=: (String) -> String
|
|
46
|
+
|
|
47
|
+
attr_reader sms_body: String?
|
|
48
|
+
|
|
49
|
+
def sms_body=: (String) -> String
|
|
50
|
+
|
|
51
|
+
attr_reader telegram_body: String?
|
|
52
|
+
|
|
53
|
+
def telegram_body=: (String) -> String
|
|
54
|
+
|
|
40
55
|
attr_reader variables: ::Array[String]?
|
|
41
56
|
|
|
42
57
|
def variables=: (::Array[String]) -> ::Array[String]
|
|
@@ -54,6 +69,9 @@ module Zavudev
|
|
|
54
69
|
?add_security_recommendation: bool,
|
|
55
70
|
?buttons: ::Array[Zavudev::TemplateCreateParams::Button],
|
|
56
71
|
?code_expiration_minutes: Integer,
|
|
72
|
+
?instagram_body: String,
|
|
73
|
+
?sms_body: String,
|
|
74
|
+
?telegram_body: String,
|
|
57
75
|
?variables: ::Array[String],
|
|
58
76
|
?whatsapp_category: Zavudev::Models::whatsapp_category,
|
|
59
77
|
?request_options: Zavudev::request_opts
|
|
@@ -66,6 +84,9 @@ module Zavudev
|
|
|
66
84
|
add_security_recommendation: bool,
|
|
67
85
|
buttons: ::Array[Zavudev::TemplateCreateParams::Button],
|
|
68
86
|
code_expiration_minutes: Integer,
|
|
87
|
+
instagram_body: String,
|
|
88
|
+
sms_body: String,
|
|
89
|
+
telegram_body: String,
|
|
69
90
|
variables: ::Array[String],
|
|
70
91
|
whatsapp_category: Zavudev::Models::whatsapp_category,
|
|
71
92
|
request_options: Zavudev::RequestOptions
|
|
@@ -11,6 +11,7 @@ module Zavudev
|
|
|
11
11
|
| :"broadcast.status_changed"
|
|
12
12
|
| :"conversation.new"
|
|
13
13
|
| :"template.status_changed"
|
|
14
|
+
| :"invitation.status_changed"
|
|
14
15
|
|
|
15
16
|
module WebhookEvent
|
|
16
17
|
extend Zavudev::Internal::Type::Enum
|
|
@@ -25,6 +26,7 @@ module Zavudev
|
|
|
25
26
|
BROADCAST_STATUS_CHANGED: :"broadcast.status_changed"
|
|
26
27
|
CONVERSATION_NEW: :"conversation.new"
|
|
27
28
|
TEMPLATE_STATUS_CHANGED: :"template.status_changed"
|
|
29
|
+
INVITATION_STATUS_CHANGED: :"invitation.status_changed"
|
|
28
30
|
|
|
29
31
|
def self?.values: -> ::Array[Zavudev::Models::webhook_event]
|
|
30
32
|
end
|
|
@@ -8,6 +8,9 @@ module Zavudev
|
|
|
8
8
|
?add_security_recommendation: bool,
|
|
9
9
|
?buttons: ::Array[Zavudev::TemplateCreateParams::Button],
|
|
10
10
|
?code_expiration_minutes: Integer,
|
|
11
|
+
?instagram_body: String,
|
|
12
|
+
?sms_body: String,
|
|
13
|
+
?telegram_body: String,
|
|
11
14
|
?variables: ::Array[String],
|
|
12
15
|
?whatsapp_category: Zavudev::Models::whatsapp_category,
|
|
13
16
|
?request_options: Zavudev::request_opts
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: zavudev
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.6.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Zavudev
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-04-
|
|
11
|
+
date: 2026-04-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: cgi
|