ark-email 0.13.0 → 0.14.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 +9 -0
- data/README.md +1 -1
- data/lib/ark_email/client.rb +4 -0
- data/lib/ark_email/models/email_retrieve_params.rb +4 -1
- data/lib/ark_email/models/email_retrieve_response.rb +177 -1
- data/lib/ark_email/models/log_entry.rb +298 -0
- data/lib/ark_email/models/log_entry_detail.rb +102 -0
- data/lib/ark_email/models/log_list_params.rb +106 -0
- data/lib/ark_email/models/log_retrieve_params.rb +14 -0
- data/lib/ark_email/models/log_retrieve_response.rb +33 -0
- data/lib/ark_email/models.rb +8 -0
- data/lib/ark_email/resources/logs.rb +120 -0
- data/lib/ark_email/version.rb +1 -1
- data/lib/ark_email.rb +6 -0
- data/rbi/ark_email/client.rbi +3 -0
- data/rbi/ark_email/models/email_retrieve_params.rbi +8 -2
- data/rbi/ark_email/models/email_retrieve_response.rbi +379 -0
- data/rbi/ark_email/models/log_entry.rbi +431 -0
- data/rbi/ark_email/models/log_entry_detail.rbi +192 -0
- data/rbi/ark_email/models/log_list_params.rbi +163 -0
- data/rbi/ark_email/models/log_retrieve_params.rbi +27 -0
- data/rbi/ark_email/models/log_retrieve_response.rbi +59 -0
- data/rbi/ark_email/models.rbi +8 -0
- data/rbi/ark_email/resources/emails.rbi +4 -1
- data/rbi/ark_email/resources/logs.rbi +104 -0
- data/sig/ark_email/client.rbs +2 -0
- data/sig/ark_email/models/email_retrieve_response.rbs +179 -0
- data/sig/ark_email/models/log_entry.rbs +209 -0
- data/sig/ark_email/models/log_entry_detail.rbs +97 -0
- data/sig/ark_email/models/log_list_params.rbs +97 -0
- data/sig/ark_email/models/log_retrieve_params.rbs +15 -0
- data/sig/ark_email/models/log_retrieve_response.rbs +26 -0
- data/sig/ark_email/models.rbs +8 -0
- data/sig/ark_email/resources/logs.rbs +25 -0
- metadata +20 -2
|
@@ -112,6 +112,44 @@ module ArkEmail
|
|
|
112
112
|
sig { returns(String) }
|
|
113
113
|
attr_accessor :to
|
|
114
114
|
|
|
115
|
+
# Opens and clicks tracking data (included if expand=activity)
|
|
116
|
+
sig do
|
|
117
|
+
returns(
|
|
118
|
+
T.nilable(ArkEmail::Models::EmailRetrieveResponse::Data::Activity)
|
|
119
|
+
)
|
|
120
|
+
end
|
|
121
|
+
attr_reader :activity
|
|
122
|
+
|
|
123
|
+
sig do
|
|
124
|
+
params(
|
|
125
|
+
activity:
|
|
126
|
+
ArkEmail::Models::EmailRetrieveResponse::Data::Activity::OrHash
|
|
127
|
+
).void
|
|
128
|
+
end
|
|
129
|
+
attr_writer :activity
|
|
130
|
+
|
|
131
|
+
# File attachments (included if expand=attachments)
|
|
132
|
+
sig do
|
|
133
|
+
returns(
|
|
134
|
+
T.nilable(
|
|
135
|
+
T::Array[
|
|
136
|
+
ArkEmail::Models::EmailRetrieveResponse::Data::Attachment
|
|
137
|
+
]
|
|
138
|
+
)
|
|
139
|
+
)
|
|
140
|
+
end
|
|
141
|
+
attr_reader :attachments
|
|
142
|
+
|
|
143
|
+
sig do
|
|
144
|
+
params(
|
|
145
|
+
attachments:
|
|
146
|
+
T::Array[
|
|
147
|
+
ArkEmail::Models::EmailRetrieveResponse::Data::Attachment::OrHash
|
|
148
|
+
]
|
|
149
|
+
).void
|
|
150
|
+
end
|
|
151
|
+
attr_writer :attachments
|
|
152
|
+
|
|
115
153
|
# Delivery attempt history (included if expand=deliveries)
|
|
116
154
|
sig do
|
|
117
155
|
returns(
|
|
@@ -160,6 +198,14 @@ module ArkEmail
|
|
|
160
198
|
sig { params(plain_body: String).void }
|
|
161
199
|
attr_writer :plain_body
|
|
162
200
|
|
|
201
|
+
# Complete raw MIME message, base64 encoded (included if expand=raw). Decode this
|
|
202
|
+
# to get the original RFC 2822 formatted email.
|
|
203
|
+
sig { returns(T.nilable(String)) }
|
|
204
|
+
attr_reader :raw_message
|
|
205
|
+
|
|
206
|
+
sig { params(raw_message: String).void }
|
|
207
|
+
attr_writer :raw_message
|
|
208
|
+
|
|
163
209
|
# Whether the message was flagged as spam
|
|
164
210
|
sig { returns(T.nilable(T::Boolean)) }
|
|
165
211
|
attr_reader :spam
|
|
@@ -194,6 +240,12 @@ module ArkEmail
|
|
|
194
240
|
timestamp: Float,
|
|
195
241
|
timestamp_iso: Time,
|
|
196
242
|
to: String,
|
|
243
|
+
activity:
|
|
244
|
+
ArkEmail::Models::EmailRetrieveResponse::Data::Activity::OrHash,
|
|
245
|
+
attachments:
|
|
246
|
+
T::Array[
|
|
247
|
+
ArkEmail::Models::EmailRetrieveResponse::Data::Attachment::OrHash
|
|
248
|
+
],
|
|
197
249
|
deliveries:
|
|
198
250
|
T::Array[
|
|
199
251
|
ArkEmail::Models::EmailRetrieveResponse::Data::Delivery::OrHash
|
|
@@ -202,6 +254,7 @@ module ArkEmail
|
|
|
202
254
|
html_body: String,
|
|
203
255
|
message_id: String,
|
|
204
256
|
plain_body: String,
|
|
257
|
+
raw_message: String,
|
|
205
258
|
spam: T::Boolean,
|
|
206
259
|
spam_score: Float,
|
|
207
260
|
tag: String
|
|
@@ -235,6 +288,10 @@ module ArkEmail
|
|
|
235
288
|
timestamp_iso:,
|
|
236
289
|
# Recipient address
|
|
237
290
|
to:,
|
|
291
|
+
# Opens and clicks tracking data (included if expand=activity)
|
|
292
|
+
activity: nil,
|
|
293
|
+
# File attachments (included if expand=attachments)
|
|
294
|
+
attachments: nil,
|
|
238
295
|
# Delivery attempt history (included if expand=deliveries)
|
|
239
296
|
deliveries: nil,
|
|
240
297
|
# Email headers (included if expand=headers)
|
|
@@ -245,6 +302,9 @@ module ArkEmail
|
|
|
245
302
|
message_id: nil,
|
|
246
303
|
# Plain text body (included if expand=content)
|
|
247
304
|
plain_body: nil,
|
|
305
|
+
# Complete raw MIME message, base64 encoded (included if expand=raw). Decode this
|
|
306
|
+
# to get the original RFC 2822 formatted email.
|
|
307
|
+
raw_message: nil,
|
|
248
308
|
# Whether the message was flagged as spam
|
|
249
309
|
spam: nil,
|
|
250
310
|
# Spam score (if applicable)
|
|
@@ -268,6 +328,11 @@ module ArkEmail
|
|
|
268
328
|
timestamp: Float,
|
|
269
329
|
timestamp_iso: Time,
|
|
270
330
|
to: String,
|
|
331
|
+
activity: ArkEmail::Models::EmailRetrieveResponse::Data::Activity,
|
|
332
|
+
attachments:
|
|
333
|
+
T::Array[
|
|
334
|
+
ArkEmail::Models::EmailRetrieveResponse::Data::Attachment
|
|
335
|
+
],
|
|
271
336
|
deliveries:
|
|
272
337
|
T::Array[
|
|
273
338
|
ArkEmail::Models::EmailRetrieveResponse::Data::Delivery
|
|
@@ -276,6 +341,7 @@ module ArkEmail
|
|
|
276
341
|
html_body: String,
|
|
277
342
|
message_id: String,
|
|
278
343
|
plain_body: String,
|
|
344
|
+
raw_message: String,
|
|
279
345
|
spam: T::Boolean,
|
|
280
346
|
spam_score: Float,
|
|
281
347
|
tag: String
|
|
@@ -382,6 +448,319 @@ module ArkEmail
|
|
|
382
448
|
end
|
|
383
449
|
end
|
|
384
450
|
|
|
451
|
+
class Activity < ArkEmail::Internal::Type::BaseModel
|
|
452
|
+
OrHash =
|
|
453
|
+
T.type_alias do
|
|
454
|
+
T.any(
|
|
455
|
+
ArkEmail::Models::EmailRetrieveResponse::Data::Activity,
|
|
456
|
+
ArkEmail::Internal::AnyHash
|
|
457
|
+
)
|
|
458
|
+
end
|
|
459
|
+
|
|
460
|
+
# List of link click events
|
|
461
|
+
sig do
|
|
462
|
+
returns(
|
|
463
|
+
T.nilable(
|
|
464
|
+
T::Array[
|
|
465
|
+
ArkEmail::Models::EmailRetrieveResponse::Data::Activity::Click
|
|
466
|
+
]
|
|
467
|
+
)
|
|
468
|
+
)
|
|
469
|
+
end
|
|
470
|
+
attr_reader :clicks
|
|
471
|
+
|
|
472
|
+
sig do
|
|
473
|
+
params(
|
|
474
|
+
clicks:
|
|
475
|
+
T::Array[
|
|
476
|
+
ArkEmail::Models::EmailRetrieveResponse::Data::Activity::Click::OrHash
|
|
477
|
+
]
|
|
478
|
+
).void
|
|
479
|
+
end
|
|
480
|
+
attr_writer :clicks
|
|
481
|
+
|
|
482
|
+
# List of email open events
|
|
483
|
+
sig do
|
|
484
|
+
returns(
|
|
485
|
+
T.nilable(
|
|
486
|
+
T::Array[
|
|
487
|
+
ArkEmail::Models::EmailRetrieveResponse::Data::Activity::Open
|
|
488
|
+
]
|
|
489
|
+
)
|
|
490
|
+
)
|
|
491
|
+
end
|
|
492
|
+
attr_reader :opens
|
|
493
|
+
|
|
494
|
+
sig do
|
|
495
|
+
params(
|
|
496
|
+
opens:
|
|
497
|
+
T::Array[
|
|
498
|
+
ArkEmail::Models::EmailRetrieveResponse::Data::Activity::Open::OrHash
|
|
499
|
+
]
|
|
500
|
+
).void
|
|
501
|
+
end
|
|
502
|
+
attr_writer :opens
|
|
503
|
+
|
|
504
|
+
# Opens and clicks tracking data (included if expand=activity)
|
|
505
|
+
sig do
|
|
506
|
+
params(
|
|
507
|
+
clicks:
|
|
508
|
+
T::Array[
|
|
509
|
+
ArkEmail::Models::EmailRetrieveResponse::Data::Activity::Click::OrHash
|
|
510
|
+
],
|
|
511
|
+
opens:
|
|
512
|
+
T::Array[
|
|
513
|
+
ArkEmail::Models::EmailRetrieveResponse::Data::Activity::Open::OrHash
|
|
514
|
+
]
|
|
515
|
+
).returns(T.attached_class)
|
|
516
|
+
end
|
|
517
|
+
def self.new(
|
|
518
|
+
# List of link click events
|
|
519
|
+
clicks: nil,
|
|
520
|
+
# List of email open events
|
|
521
|
+
opens: nil
|
|
522
|
+
)
|
|
523
|
+
end
|
|
524
|
+
|
|
525
|
+
sig do
|
|
526
|
+
override.returns(
|
|
527
|
+
{
|
|
528
|
+
clicks:
|
|
529
|
+
T::Array[
|
|
530
|
+
ArkEmail::Models::EmailRetrieveResponse::Data::Activity::Click
|
|
531
|
+
],
|
|
532
|
+
opens:
|
|
533
|
+
T::Array[
|
|
534
|
+
ArkEmail::Models::EmailRetrieveResponse::Data::Activity::Open
|
|
535
|
+
]
|
|
536
|
+
}
|
|
537
|
+
)
|
|
538
|
+
end
|
|
539
|
+
def to_hash
|
|
540
|
+
end
|
|
541
|
+
|
|
542
|
+
class Click < ArkEmail::Internal::Type::BaseModel
|
|
543
|
+
OrHash =
|
|
544
|
+
T.type_alias do
|
|
545
|
+
T.any(
|
|
546
|
+
ArkEmail::Models::EmailRetrieveResponse::Data::Activity::Click,
|
|
547
|
+
ArkEmail::Internal::AnyHash
|
|
548
|
+
)
|
|
549
|
+
end
|
|
550
|
+
|
|
551
|
+
# IP address of the clicker
|
|
552
|
+
sig { returns(T.nilable(String)) }
|
|
553
|
+
attr_reader :ip_address
|
|
554
|
+
|
|
555
|
+
sig { params(ip_address: String).void }
|
|
556
|
+
attr_writer :ip_address
|
|
557
|
+
|
|
558
|
+
# Unix timestamp of the click event
|
|
559
|
+
sig { returns(T.nilable(Float)) }
|
|
560
|
+
attr_reader :timestamp
|
|
561
|
+
|
|
562
|
+
sig { params(timestamp: Float).void }
|
|
563
|
+
attr_writer :timestamp
|
|
564
|
+
|
|
565
|
+
# ISO 8601 timestamp of the click event
|
|
566
|
+
sig { returns(T.nilable(Time)) }
|
|
567
|
+
attr_reader :timestamp_iso
|
|
568
|
+
|
|
569
|
+
sig { params(timestamp_iso: Time).void }
|
|
570
|
+
attr_writer :timestamp_iso
|
|
571
|
+
|
|
572
|
+
# URL that was clicked
|
|
573
|
+
sig { returns(T.nilable(String)) }
|
|
574
|
+
attr_reader :url
|
|
575
|
+
|
|
576
|
+
sig { params(url: String).void }
|
|
577
|
+
attr_writer :url
|
|
578
|
+
|
|
579
|
+
# User agent of the email client
|
|
580
|
+
sig { returns(T.nilable(String)) }
|
|
581
|
+
attr_reader :user_agent
|
|
582
|
+
|
|
583
|
+
sig { params(user_agent: String).void }
|
|
584
|
+
attr_writer :user_agent
|
|
585
|
+
|
|
586
|
+
sig do
|
|
587
|
+
params(
|
|
588
|
+
ip_address: String,
|
|
589
|
+
timestamp: Float,
|
|
590
|
+
timestamp_iso: Time,
|
|
591
|
+
url: String,
|
|
592
|
+
user_agent: String
|
|
593
|
+
).returns(T.attached_class)
|
|
594
|
+
end
|
|
595
|
+
def self.new(
|
|
596
|
+
# IP address of the clicker
|
|
597
|
+
ip_address: nil,
|
|
598
|
+
# Unix timestamp of the click event
|
|
599
|
+
timestamp: nil,
|
|
600
|
+
# ISO 8601 timestamp of the click event
|
|
601
|
+
timestamp_iso: nil,
|
|
602
|
+
# URL that was clicked
|
|
603
|
+
url: nil,
|
|
604
|
+
# User agent of the email client
|
|
605
|
+
user_agent: nil
|
|
606
|
+
)
|
|
607
|
+
end
|
|
608
|
+
|
|
609
|
+
sig do
|
|
610
|
+
override.returns(
|
|
611
|
+
{
|
|
612
|
+
ip_address: String,
|
|
613
|
+
timestamp: Float,
|
|
614
|
+
timestamp_iso: Time,
|
|
615
|
+
url: String,
|
|
616
|
+
user_agent: String
|
|
617
|
+
}
|
|
618
|
+
)
|
|
619
|
+
end
|
|
620
|
+
def to_hash
|
|
621
|
+
end
|
|
622
|
+
end
|
|
623
|
+
|
|
624
|
+
class Open < ArkEmail::Internal::Type::BaseModel
|
|
625
|
+
OrHash =
|
|
626
|
+
T.type_alias do
|
|
627
|
+
T.any(
|
|
628
|
+
ArkEmail::Models::EmailRetrieveResponse::Data::Activity::Open,
|
|
629
|
+
ArkEmail::Internal::AnyHash
|
|
630
|
+
)
|
|
631
|
+
end
|
|
632
|
+
|
|
633
|
+
# IP address of the opener
|
|
634
|
+
sig { returns(T.nilable(String)) }
|
|
635
|
+
attr_reader :ip_address
|
|
636
|
+
|
|
637
|
+
sig { params(ip_address: String).void }
|
|
638
|
+
attr_writer :ip_address
|
|
639
|
+
|
|
640
|
+
# Unix timestamp of the open event
|
|
641
|
+
sig { returns(T.nilable(Float)) }
|
|
642
|
+
attr_reader :timestamp
|
|
643
|
+
|
|
644
|
+
sig { params(timestamp: Float).void }
|
|
645
|
+
attr_writer :timestamp
|
|
646
|
+
|
|
647
|
+
# ISO 8601 timestamp of the open event
|
|
648
|
+
sig { returns(T.nilable(Time)) }
|
|
649
|
+
attr_reader :timestamp_iso
|
|
650
|
+
|
|
651
|
+
sig { params(timestamp_iso: Time).void }
|
|
652
|
+
attr_writer :timestamp_iso
|
|
653
|
+
|
|
654
|
+
# User agent of the email client
|
|
655
|
+
sig { returns(T.nilable(String)) }
|
|
656
|
+
attr_reader :user_agent
|
|
657
|
+
|
|
658
|
+
sig { params(user_agent: String).void }
|
|
659
|
+
attr_writer :user_agent
|
|
660
|
+
|
|
661
|
+
sig do
|
|
662
|
+
params(
|
|
663
|
+
ip_address: String,
|
|
664
|
+
timestamp: Float,
|
|
665
|
+
timestamp_iso: Time,
|
|
666
|
+
user_agent: String
|
|
667
|
+
).returns(T.attached_class)
|
|
668
|
+
end
|
|
669
|
+
def self.new(
|
|
670
|
+
# IP address of the opener
|
|
671
|
+
ip_address: nil,
|
|
672
|
+
# Unix timestamp of the open event
|
|
673
|
+
timestamp: nil,
|
|
674
|
+
# ISO 8601 timestamp of the open event
|
|
675
|
+
timestamp_iso: nil,
|
|
676
|
+
# User agent of the email client
|
|
677
|
+
user_agent: nil
|
|
678
|
+
)
|
|
679
|
+
end
|
|
680
|
+
|
|
681
|
+
sig do
|
|
682
|
+
override.returns(
|
|
683
|
+
{
|
|
684
|
+
ip_address: String,
|
|
685
|
+
timestamp: Float,
|
|
686
|
+
timestamp_iso: Time,
|
|
687
|
+
user_agent: String
|
|
688
|
+
}
|
|
689
|
+
)
|
|
690
|
+
end
|
|
691
|
+
def to_hash
|
|
692
|
+
end
|
|
693
|
+
end
|
|
694
|
+
end
|
|
695
|
+
|
|
696
|
+
class Attachment < ArkEmail::Internal::Type::BaseModel
|
|
697
|
+
OrHash =
|
|
698
|
+
T.type_alias do
|
|
699
|
+
T.any(
|
|
700
|
+
ArkEmail::Models::EmailRetrieveResponse::Data::Attachment,
|
|
701
|
+
ArkEmail::Internal::AnyHash
|
|
702
|
+
)
|
|
703
|
+
end
|
|
704
|
+
|
|
705
|
+
# MIME type of the attachment
|
|
706
|
+
sig { returns(String) }
|
|
707
|
+
attr_accessor :content_type
|
|
708
|
+
|
|
709
|
+
# Base64 encoded attachment content. Decode this to get the raw file bytes.
|
|
710
|
+
sig { returns(String) }
|
|
711
|
+
attr_accessor :data
|
|
712
|
+
|
|
713
|
+
# Original filename of the attachment
|
|
714
|
+
sig { returns(String) }
|
|
715
|
+
attr_accessor :filename
|
|
716
|
+
|
|
717
|
+
# SHA256 hash of the attachment content for verification
|
|
718
|
+
sig { returns(String) }
|
|
719
|
+
attr_accessor :hash_
|
|
720
|
+
|
|
721
|
+
# Size of the attachment in bytes
|
|
722
|
+
sig { returns(Integer) }
|
|
723
|
+
attr_accessor :size
|
|
724
|
+
|
|
725
|
+
# An email attachment retrieved from a sent message
|
|
726
|
+
sig do
|
|
727
|
+
params(
|
|
728
|
+
content_type: String,
|
|
729
|
+
data: String,
|
|
730
|
+
filename: String,
|
|
731
|
+
hash_: String,
|
|
732
|
+
size: Integer
|
|
733
|
+
).returns(T.attached_class)
|
|
734
|
+
end
|
|
735
|
+
def self.new(
|
|
736
|
+
# MIME type of the attachment
|
|
737
|
+
content_type:,
|
|
738
|
+
# Base64 encoded attachment content. Decode this to get the raw file bytes.
|
|
739
|
+
data:,
|
|
740
|
+
# Original filename of the attachment
|
|
741
|
+
filename:,
|
|
742
|
+
# SHA256 hash of the attachment content for verification
|
|
743
|
+
hash_:,
|
|
744
|
+
# Size of the attachment in bytes
|
|
745
|
+
size:
|
|
746
|
+
)
|
|
747
|
+
end
|
|
748
|
+
|
|
749
|
+
sig do
|
|
750
|
+
override.returns(
|
|
751
|
+
{
|
|
752
|
+
content_type: String,
|
|
753
|
+
data: String,
|
|
754
|
+
filename: String,
|
|
755
|
+
hash_: String,
|
|
756
|
+
size: Integer
|
|
757
|
+
}
|
|
758
|
+
)
|
|
759
|
+
end
|
|
760
|
+
def to_hash
|
|
761
|
+
end
|
|
762
|
+
end
|
|
763
|
+
|
|
385
764
|
class Delivery < ArkEmail::Internal::Type::BaseModel
|
|
386
765
|
OrHash =
|
|
387
766
|
T.type_alias do
|