zyphr 0.1.45 → 0.1.47
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/docs/EmailMessage.md +2 -0
- data/lib/zyphr/api/emails_api.rb +1 -1
- data/lib/zyphr/models/email_message.rb +14 -3
- data/lib/zyphr/models/webhook_event_type.rb +2 -1
- data/spec/models/email_message_spec.rb +7 -1
- data/zyphr.gemspec +1 -1
- 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: 1631c8b08187f685f9ba0705937529c10b793216403e569e084b19bbe76eed98
|
|
4
|
+
data.tar.gz: d459bb04c1089992c9c18a2287a5cdf859fdef80e94fe8859a78b659c4b56c4c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dbdbfe7cb026b80ff24bfb3760983f9be06c4aaa2da6bdcd3d1386e29ac838c0ce1a927cfedfa48079ca3aab11dd4c6a4f47e065064c82a382253fdeeb01a14f
|
|
7
|
+
data.tar.gz: befc207eb3218353d296f8b14466fdb9fcf53a008c576381c843c998c8875bad60131e5bdb0b97785eb7bbd9aedc501e09f882ed1d3157f46f6350e771e65a1c
|
data/docs/EmailMessage.md
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
| **to** | [**EmailAddress**](EmailAddress.md) | | [optional] |
|
|
10
10
|
| **subject** | **String** | | [optional] |
|
|
11
11
|
| **status** | **String** | | [optional] |
|
|
12
|
+
| **status_reason** | **String** | Why the message is in its current status, when applicable. For a `suppressed` row this is the suppression reason (e.g. `recipient_not_allowlisted` when blocked by the auth application's test_recipients allowlist). Null for normal sends. | [optional] |
|
|
12
13
|
| **tags** | **Array<String>** | | [optional] |
|
|
13
14
|
| **queued_at** | **Time** | | [optional] |
|
|
14
15
|
| **sent_at** | **Time** | | [optional] |
|
|
@@ -29,6 +30,7 @@ instance = Zyphr::EmailMessage.new(
|
|
|
29
30
|
to: null,
|
|
30
31
|
subject: null,
|
|
31
32
|
status: null,
|
|
33
|
+
status_reason: null,
|
|
32
34
|
tags: null,
|
|
33
35
|
queued_at: null,
|
|
34
36
|
sent_at: null,
|
data/lib/zyphr/api/emails_api.rb
CHANGED
|
@@ -233,7 +233,7 @@ module Zyphr
|
|
|
233
233
|
if @api_client.config.debugging
|
|
234
234
|
@api_client.config.logger.debug 'Calling API: EmailsApi.list_emails ...'
|
|
235
235
|
end
|
|
236
|
-
allowable_values = ["pending", "queued", "sent", "delivered", "failed", "bounced", "rejected"]
|
|
236
|
+
allowable_values = ["pending", "queued", "sent", "delivered", "failed", "bounced", "rejected", "suppressed"]
|
|
237
237
|
if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
|
|
238
238
|
fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
|
|
239
239
|
end
|
|
@@ -25,6 +25,9 @@ module Zyphr
|
|
|
25
25
|
|
|
26
26
|
attr_accessor :status
|
|
27
27
|
|
|
28
|
+
# Why the message is in its current status, when applicable. For a `suppressed` row this is the suppression reason (e.g. `recipient_not_allowlisted` when blocked by the auth application's test_recipients allowlist). Null for normal sends.
|
|
29
|
+
attr_accessor :status_reason
|
|
30
|
+
|
|
28
31
|
attr_accessor :tags
|
|
29
32
|
|
|
30
33
|
attr_accessor :queued_at
|
|
@@ -71,6 +74,7 @@ module Zyphr
|
|
|
71
74
|
:'to' => :'to',
|
|
72
75
|
:'subject' => :'subject',
|
|
73
76
|
:'status' => :'status',
|
|
77
|
+
:'status_reason' => :'status_reason',
|
|
74
78
|
:'tags' => :'tags',
|
|
75
79
|
:'queued_at' => :'queued_at',
|
|
76
80
|
:'sent_at' => :'sent_at',
|
|
@@ -100,6 +104,7 @@ module Zyphr
|
|
|
100
104
|
:'to' => :'EmailAddress',
|
|
101
105
|
:'subject' => :'String',
|
|
102
106
|
:'status' => :'String',
|
|
107
|
+
:'status_reason' => :'String',
|
|
103
108
|
:'tags' => :'Array<String>',
|
|
104
109
|
:'queued_at' => :'Time',
|
|
105
110
|
:'sent_at' => :'Time',
|
|
@@ -114,6 +119,7 @@ module Zyphr
|
|
|
114
119
|
# List of attributes with nullable: true
|
|
115
120
|
def self.openapi_nullable
|
|
116
121
|
Set.new([
|
|
122
|
+
:'status_reason',
|
|
117
123
|
:'sent_at',
|
|
118
124
|
:'delivered_at',
|
|
119
125
|
:'bounced_at',
|
|
@@ -158,6 +164,10 @@ module Zyphr
|
|
|
158
164
|
self.status = attributes[:'status']
|
|
159
165
|
end
|
|
160
166
|
|
|
167
|
+
if attributes.key?(:'status_reason')
|
|
168
|
+
self.status_reason = attributes[:'status_reason']
|
|
169
|
+
end
|
|
170
|
+
|
|
161
171
|
if attributes.key?(:'tags')
|
|
162
172
|
if (value = attributes[:'tags']).is_a?(Array)
|
|
163
173
|
self.tags = value
|
|
@@ -205,7 +215,7 @@ module Zyphr
|
|
|
205
215
|
# @return true if the model is valid
|
|
206
216
|
def valid?
|
|
207
217
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
208
|
-
status_validator = EnumAttributeValidator.new('String', ["pending", "queued", "sent", "delivered", "failed", "bounced", "rejected"])
|
|
218
|
+
status_validator = EnumAttributeValidator.new('String', ["pending", "queued", "sent", "delivered", "failed", "bounced", "rejected", "suppressed"])
|
|
209
219
|
return false unless status_validator.valid?(@status)
|
|
210
220
|
true
|
|
211
221
|
end
|
|
@@ -213,7 +223,7 @@ module Zyphr
|
|
|
213
223
|
# Custom attribute writer method checking allowed values (enum).
|
|
214
224
|
# @param [Object] status Object to be assigned
|
|
215
225
|
def status=(status)
|
|
216
|
-
validator = EnumAttributeValidator.new('String', ["pending", "queued", "sent", "delivered", "failed", "bounced", "rejected"])
|
|
226
|
+
validator = EnumAttributeValidator.new('String', ["pending", "queued", "sent", "delivered", "failed", "bounced", "rejected", "suppressed"])
|
|
217
227
|
unless validator.valid?(status)
|
|
218
228
|
fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
|
|
219
229
|
end
|
|
@@ -230,6 +240,7 @@ module Zyphr
|
|
|
230
240
|
to == o.to &&
|
|
231
241
|
subject == o.subject &&
|
|
232
242
|
status == o.status &&
|
|
243
|
+
status_reason == o.status_reason &&
|
|
233
244
|
tags == o.tags &&
|
|
234
245
|
queued_at == o.queued_at &&
|
|
235
246
|
sent_at == o.sent_at &&
|
|
@@ -249,7 +260,7 @@ module Zyphr
|
|
|
249
260
|
# Calculates hash code according to all attributes.
|
|
250
261
|
# @return [Integer] Hash code
|
|
251
262
|
def hash
|
|
252
|
-
[id, from, to, subject, status, tags, queued_at, sent_at, delivered_at, bounced_at, opened_at, clicked_at, created_at].hash
|
|
263
|
+
[id, from, to, subject, status, status_reason, tags, queued_at, sent_at, delivered_at, bounced_at, opened_at, clicked_at, created_at].hash
|
|
253
264
|
end
|
|
254
265
|
|
|
255
266
|
# Builds the object from hash
|
|
@@ -24,6 +24,7 @@ module Zyphr
|
|
|
24
24
|
EMAIL_OPENED = "email.opened".freeze
|
|
25
25
|
EMAIL_CLICKED = "email.clicked".freeze
|
|
26
26
|
EMAIL_FAILED = "email.failed".freeze
|
|
27
|
+
EMAIL_SUPPRESSED = "email.suppressed".freeze
|
|
27
28
|
EMAIL_RECEIVED = "email.received".freeze
|
|
28
29
|
PUSH_SENT = "push.sent".freeze
|
|
29
30
|
PUSH_DELIVERED = "push.delivered".freeze
|
|
@@ -45,7 +46,7 @@ module Zyphr
|
|
|
45
46
|
DOMAIN_VERIFICATION_FAILED = "domain.verification_failed".freeze
|
|
46
47
|
|
|
47
48
|
def self.all_vars
|
|
48
|
-
@all_vars ||= [EMAIL_QUEUED, EMAIL_SENT, EMAIL_DELIVERED, EMAIL_BOUNCED, EMAIL_SOFT_BOUNCED, EMAIL_COMPLAINED, EMAIL_OPENED, EMAIL_CLICKED, EMAIL_FAILED, EMAIL_RECEIVED, PUSH_SENT, PUSH_DELIVERED, PUSH_FAILED, PUSH_EXPIRED, USER_CREATED, USER_LOGIN, USER_LOGOUT, USER_PASSWORD_CHANGED, USER_PASSWORD_RESET_REQUESTED, USER_EMAIL_VERIFIED, USER_PHONE_VERIFIED, USER_DELETED, USER_SESSION_REVOKED, USER_MFA_ENABLED, USER_MFA_DISABLED, USER_IMPERSONATED, DOMAIN_VERIFIED, DOMAIN_VERIFICATION_FAILED].freeze
|
|
49
|
+
@all_vars ||= [EMAIL_QUEUED, EMAIL_SENT, EMAIL_DELIVERED, EMAIL_BOUNCED, EMAIL_SOFT_BOUNCED, EMAIL_COMPLAINED, EMAIL_OPENED, EMAIL_CLICKED, EMAIL_FAILED, EMAIL_SUPPRESSED, EMAIL_RECEIVED, PUSH_SENT, PUSH_DELIVERED, PUSH_FAILED, PUSH_EXPIRED, USER_CREATED, USER_LOGIN, USER_LOGOUT, USER_PASSWORD_CHANGED, USER_PASSWORD_RESET_REQUESTED, USER_EMAIL_VERIFIED, USER_PHONE_VERIFIED, USER_DELETED, USER_SESSION_REVOKED, USER_MFA_ENABLED, USER_MFA_DISABLED, USER_IMPERSONATED, DOMAIN_VERIFIED, DOMAIN_VERIFICATION_FAILED].freeze
|
|
49
50
|
end
|
|
50
51
|
|
|
51
52
|
# Builds the enum from string
|
|
@@ -54,13 +54,19 @@ describe Zyphr::EmailMessage do
|
|
|
54
54
|
describe 'test attribute "status"' do
|
|
55
55
|
it 'should work' do
|
|
56
56
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
57
|
-
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["pending", "queued", "sent", "delivered", "failed", "bounced", "rejected"])
|
|
57
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["pending", "queued", "sent", "delivered", "failed", "bounced", "rejected", "suppressed"])
|
|
58
58
|
# validator.allowable_values.each do |value|
|
|
59
59
|
# expect { instance.status = value }.not_to raise_error
|
|
60
60
|
# end
|
|
61
61
|
end
|
|
62
62
|
end
|
|
63
63
|
|
|
64
|
+
describe 'test attribute "status_reason"' do
|
|
65
|
+
it 'should work' do
|
|
66
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
|
|
64
70
|
describe 'test attribute "tags"' do
|
|
65
71
|
it 'should work' do
|
|
66
72
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
data/zyphr.gemspec
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: zyphr
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.47
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Zyphr
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-08-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|