mailblastr 2.0.0 → 3.0.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: da4eac6f929de305deb6c395655cb2658cc1ac3ee7410355846092ff6b61f66a
4
- data.tar.gz: 05bfee5848400946fef957671b8bf891916bda6b7847988c531f2d5995ecb58a
3
+ metadata.gz: d9de7ff5dac71bd3ba5db1b38369328167f9b2a52b59974201f868299f23d35c
4
+ data.tar.gz: bc48385e4675d1c6ef5163e5fb7a2583b145562bf43e8a4d5d3d33f9797eecea
5
5
  SHA512:
6
- metadata.gz: 1d3cd0f0741e9e55d2b6f24f34f33add0b192d305f5834fb4d481dbd70a0aacbdd8d05d516ba8797aa3201360d491a2a22bd6929a7ffdbd7b9ae57ae45ed4bbb
7
- data.tar.gz: 907b8ec4abe3920ba6e94c04587cfcb72f4692420f461504f391dd6c44bc75cda2e562df73fe05911c1b40fa1e79ea8b581c948c0f64dc1f4fabd86bec489c8b
6
+ metadata.gz: 40472dc57967817c0071973ecb6d7f353f5a927f9261c76f035f13552d47680481caad49fcf01da8a6698996278811f23c6a8b999a6aa8312461e92d88676a0e
7
+ data.tar.gz: 63131860cae2becb8dddc98c36aed13e970433541b81e4c0b93732ca968ab9a7a2db9c6ee7d5630d114a2e46ea3d09c21d7a49193f7e337b98dce95bf42c7057
data/README.md CHANGED
@@ -129,11 +129,11 @@ Mailblastr::Emails.send({
129
129
 
130
130
  ```ruby
131
131
  Mailblastr::Emails::Receiving.list
132
- Mailblastr::Emails::Receiving.addresses # per-address inbound stats
132
+ Mailblastr::Emails::Receiving.list_addresses # per-address inbound stats
133
133
  Mailblastr::Emails::Receiving.get(id)
134
134
  Mailblastr::Emails::Receiving.list_attachments(id)
135
135
  Mailblastr::Emails::Receiving.get_attachment(id, attachment_id) # => raw bytes (String)
136
- Mailblastr::Emails::Receiving.raw(id) # => original RFC822 message
136
+ Mailblastr::Emails::Receiving.get_raw(id) # => original RFC822 message
137
137
  Mailblastr::Emails::Receiving.forward(id, { from: "you@yourdomain.com", to: "team@you.com" })
138
138
  Mailblastr::Emails::Receiving.reply(id, { from: "you@yourdomain.com", html: "<p>Thanks!</p>" })
139
139
  Mailblastr::Emails::Receiving.delete(id)
@@ -182,7 +182,7 @@ Mailblastr::Contacts.batch({ audience_id: aud_id, contacts: [{ email: "a@b.com"
182
182
  Mailblastr::Contacts.import({ audience_id: aud_id, csv: "email,company\na@b.com,Acme" })
183
183
 
184
184
  # CSV too big to inline (5 MB / 10,000 rows)? Upload it directly, then import by key.
185
- slot = Mailblastr::Contacts.import_upload({ audience_id: aud_id, filename: "list.csv", size: bytes })
185
+ slot = Mailblastr::Contacts.create_import_upload({ audience_id: aud_id, filename: "list.csv", size: bytes })
186
186
  # PUT the file to slot["upload_url"], then:
187
187
  Mailblastr::Contacts.import({ audience_id: aud_id, storage_key: slot["storage_key"] })
188
188
 
@@ -330,10 +330,10 @@ warn "test delivery failed: #{result['error']}" unless result["ok"]
330
330
 
331
331
  ### Verifying deliveries
332
332
 
333
- `verify_signature` checks the Svix-style HMAC-SHA256 signature locally (no HTTP request). Pass the **exact raw request body** — re-serializing parsed JSON breaks the signature.
333
+ `verify` checks the Svix-style HMAC-SHA256 signature locally (no HTTP request). Pass the **exact raw request body** — re-serializing parsed JSON breaks the signature.
334
334
 
335
335
  ```ruby
336
- result = Mailblastr::Webhooks.verify_signature(
336
+ result = Mailblastr::Webhooks.verify(
337
337
  request.raw_post, # raw body string
338
338
  {
339
339
  "svix-id" => request.headers["svix-id"],
@@ -104,7 +104,7 @@ module Mailblastr
104
104
  #
105
105
  # Inline CSV text (capped at 5 MB and 10,000 rows):
106
106
  # Contacts.import({ audience_id: "aud_1", csv: "email\na@b.com" })
107
- # Or a file already uploaded via import_upload (no row cap — the
107
+ # Or a file already uploaded via create_import_upload (no row cap — the
108
108
  # overflow past your contact limit comes back as `limit_skipped`):
109
109
  # Contacts.import({ audience_id: "aud_1", storage_key: key })
110
110
  def import(params)
@@ -125,7 +125,7 @@ module Mailblastr
125
125
  # `storage_key` to Contacts.import.
126
126
  # POST /audiences/:id/contacts/import/upload — params: { filename:, size: }
127
127
  # The `upload_url` is a bearer credential — do not log it.
128
- def import_upload(params)
128
+ def create_import_upload(params)
129
129
  audience_id = Client.opt(params, :audience_id)
130
130
  Client.request(
131
131
  :post,
@@ -6,6 +6,13 @@ module Mailblastr
6
6
  class << self
7
7
  # Send a single email. POST /emails
8
8
  # Mailblastr::Emails.send({ from: "...", to: ["..."], subject: "...", html: "..." })
9
+ #
10
+ # Write ordinary links. Anchors, markdown links and bare URLs/domains in
11
+ # BOTH the :html and :text bodies are converted to tracked redirects at
12
+ # send time (when the sending domain has click tracking on), so a click is
13
+ # recorded whichever alternative the recipient's mail client renders.
14
+ # Opt-out links are never wrapped, and the content you send is stored and
15
+ # returned UNCHANGED — only the delivered copy carries the tracking URL.
9
16
  # Pass { idempotency_key: "order-123" } as the second argument to retry safely.
10
17
  def send(params, options = {})
11
18
  Client.request(:post, "/emails", body: params, options: options)
@@ -79,7 +86,7 @@ module Mailblastr
79
86
 
80
87
  # Per-address inbound stats (totals, replies, last received).
81
88
  # Not paginated. GET /emails/receiving/addresses
82
- def addresses
89
+ def list_addresses
83
90
  Client.request(:get, "/emails/receiving/addresses")
84
91
  end
85
92
 
@@ -111,7 +118,7 @@ module Mailblastr
111
118
 
112
119
  # Download the original RFC822/MIME message as raw bytes (binary String).
113
120
  # GET /emails/receiving/:id/raw
114
- def raw(email_id)
121
+ def get_raw(email_id)
115
122
  Client.request(:get, "/emails/receiving/#{Client.path_escape(email_id)}/raw", raw: true)
116
123
  end
117
124
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Mailblastr
4
- VERSION = "2.0.0"
4
+ VERSION = "3.0.1"
5
5
  end
@@ -70,9 +70,9 @@ module Mailblastr
70
70
  #
71
71
  # Returns { valid: true } or { valid: false, reason: "..." }.
72
72
  #
73
- # result = Mailblastr::Webhooks.verify_signature(request.raw_post, request.headers.to_h, secret)
73
+ # result = Mailblastr::Webhooks.verify(request.raw_post, request.headers.to_h, secret)
74
74
  # head :unauthorized unless result[:valid]
75
- def verify_signature(payload, headers, secret, tolerance: 300)
75
+ def verify(payload, headers, secret, tolerance: 300)
76
76
  id = read_header(headers, "svix-id")
77
77
  timestamp = read_header(headers, "svix-timestamp")
78
78
  sig_header = read_header(headers, "svix-signature")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mailblastr
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - MailBlastr
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-08-08 00:00:00.000000000 Z
11
+ date: 2026-08-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest