resend 1.18.0 → 1.20.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0e024af320af434631fba03fac6574a554874e1a5c43193ed082427000eeaa13
4
- data.tar.gz: b10c3fb1b88e7fbbad8eb7d7b040942696233ef6f4695c45331c9ab8d20de261
3
+ metadata.gz: affe43971dd7a98780846553d195485f10fabfc03ed0b07a1c116eb9c1c53900
4
+ data.tar.gz: 1547e140aa0c32b6eb9033a331a89abf6737ea36dfa3adec8226ff5e66bb4bc5
5
5
  SHA512:
6
- metadata.gz: 1e31ee422985b5a4c3aaee94adde13febd8027b3b44d84e147759190ab60a50b0d1c9c2c8b61842deead2989aef65198a3855ea4911b0ab832203cb118f7ce4e
7
- data.tar.gz: 5f18787f17121aa4653f15a932385b70258894898d9a2fb3e2660f4024aed63531505be301e2433d18baa86e8127fe41e799e66a88f5daba3e292aa4f78eb0ad
6
+ metadata.gz: '08481ada73dbc769b9aed075dfe11a301a5a9551fab2740f4ed39fa83c54ca0d343c627c64a3d4074e5d9dccd9f33f1d25309ae8f0c7b867f3b2a8772249a934'
7
+ data.tar.gz: 2166a5fd68509af30d794821545aa70a5992bdf7d10a61d7255572dd641d8e44f867cbb642e866b13cc400585b65ccb5caed864adcf077c344a8d8efc0f12ff4
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Resend
4
+ module Domains
5
+ # Domain Forge API wrapper
6
+ module Forge
7
+ class << self
8
+ #
9
+ # Activate Forge on a domain. Returns the full domain, in the same shape
10
+ # as Resend::Domains.get. Enabling a domain that is already migrated is
11
+ # idempotent and returns its current state.
12
+ #
13
+ # @param params [Hash] the parameters
14
+ # @option params [String] :id the ID of the domain (required)
15
+ # @option params [String] :custom_return_path subdomain for the Return-Path address,
16
+ # validated like :custom_return_path on Resend::Domains.create. When omitted, the
17
+ # server picks a free DNS label. Set once: it cannot be changed afterwards.
18
+ #
19
+ # https://resend.com/docs/api-reference/domains/enable-forge
20
+ def enable(params)
21
+ path = "domains/#{params[:id]}/forge"
22
+ Resend::Request.new(path, params.slice(:custom_return_path), "post").perform
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
@@ -34,10 +34,13 @@ module Resend
34
34
  Resend::Request.new(path, {}, "delete").perform
35
35
  end
36
36
 
37
+ # Triggers domain verification. Pass `scope: ["forge"]` to re-check only
38
+ # the Forge record; without a scope the whole domain is verified.
39
+ #
37
40
  # https://resend.com/docs/api-reference/domains/verify-domain
38
- def verify(domain_id = "")
41
+ def verify(domain_id = "", params = {})
39
42
  path = "domains/#{domain_id}/verify"
40
- Resend::Request.new(path, {}, "post").perform
43
+ Resend::Request.new(path, params.slice(:scope), "post").perform
41
44
  end
42
45
  end
43
46
  end
@@ -49,9 +49,11 @@ module Resend
49
49
  # @option params [String] :text the plain text body
50
50
  # @option params [String] :thread_id the thread ID to reply in. Must be sent with `reply_to_email_id`
51
51
  # @option params [String] :reply_to_email_id the email ID to reply to. Must be sent with `thread_id`
52
- # @option params [Array<Hash>] :attachments files to store on the draft. Each one needs `content`,
53
- # `filename` and `content_type`. A `path` or `content_id` returns a 422. The files on a draft can
54
- # total at most 25 MB. An empty file or a blocked file type returns a 422
52
+ # @option params [Array<Hash>] :attachments files to store on the draft. Each one needs a `filename`
53
+ # and either `content` with a `content_type`, or a `path` URL that is downloaded when the request
54
+ # is made. With `path`, `content_type` defaults to the type of the downloaded file. A `content_id`
55
+ # returns a 422. The files on a draft, downloaded ones included, can total at most 25 MB. An empty
56
+ # file, a blocked file type, or a `path` that cannot be downloaded returns a 422
55
57
  # @param options [Hash] additional options for the request
56
58
  # @option options [String] :idempotency_key a unique key for the request, so the draft is created
57
59
  # only once. 1 to 256 characters. A retry with the same key within 24 hours replays the first
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Resend
4
- VERSION = "1.18.0"
4
+ VERSION = "1.20.0"
5
5
  end
data/lib/resend.rb CHANGED
@@ -27,6 +27,7 @@ require "resend/contacts/topics"
27
27
  require "resend/contact_properties"
28
28
  require "resend/domains"
29
29
  require "resend/domains/claims"
30
+ require "resend/domains/forge"
30
31
  require "resend/emails"
31
32
  require "resend/templates"
32
33
  require "resend/emails/receiving"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: resend
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.18.0
4
+ version: 1.20.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Derich Pacheco
@@ -62,6 +62,7 @@ files:
62
62
  - lib/resend/contacts/topics.rb
63
63
  - lib/resend/domains.rb
64
64
  - lib/resend/domains/claims.rb
65
+ - lib/resend/domains/forge.rb
65
66
  - lib/resend/emails.rb
66
67
  - lib/resend/emails/attachments.rb
67
68
  - lib/resend/emails/receiving.rb