resend 1.5.0 → 1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a131df322ae7ac448440742ce3cda1487b763a094f1940710236cc1e4f76534d
4
- data.tar.gz: bb824f2076b51bf7eb82dd9a75ba4bd86c2d15162e8a499ef6b6e66555c37b2b
3
+ metadata.gz: 23a4b97089acf88e3b1a768ebb7b9db1c5733ea1b225ca94cdeaae55abe4d0bc
4
+ data.tar.gz: 24e7052354d80707fe5d1d4aafeac46b85926deec93089f853c11c22965501a8
5
5
  SHA512:
6
- metadata.gz: 01efcf455f3b05c468ee1aede05bfeae5d7040b3dae1b2faf6bc38571b422b273a097f1b7eeb41cdc6fcc55f0c2b2f81eb4718814897a982c61915b52aae7a15
7
- data.tar.gz: 4259936777bb6815e5abca38babf4b399efe5e2a0dfa55d87e2b1536b9f85b344683e0e9ee84ef21978630ad4e41dd6bc709d59bb5def667b412a37781af86df
6
+ metadata.gz: df538ce18a8a477d1527a270088691c98c5c2f1f6a793502f6abafd605f04e47a9c23b7366a7ef6c694c90ec4804ac2a909d8288d80c61062af7dc179c7d8d33
7
+ data.tar.gz: 73cbbda1da1cf01ebdb93c5f542481a6e33bebd2ae9d7a2ddbe696fac3d6ff550f2f270e3ce805fb72546a0af72557826dcf9c74509205c14935dfa49f8cb817
data/CHANGELOG.md CHANGED
@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.6.0] - 2026-07-09
9
+
10
+ ### Added
11
+
12
+ - **OAuth grants** - New `Resend::OAuthGrants` module to list (`GET /oauth/grants`) and revoke (`DELETE /oauth/grants/:id`) OAuth grants. `list` supports the standard `limit`/`after`/`before` pagination params. ([#197](https://github.com/resend/resend-ruby/pull/197))
13
+ - **Domain claims** - New `Resend::Domains::Claims` module to claim a domain verified by another account (`create`), retrieve the latest claim (`get`), and trigger verification/ownership transfer (`verify`). ([#194](https://github.com/resend/resend-ruby/pull/194))
14
+
8
15
  ## [1.0.0] - 2025-10-31
9
16
 
10
17
  ### Overview
@@ -0,0 +1,56 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Resend
4
+ module Domains
5
+ # Domain Claims API wrapper
6
+ module Claims
7
+ class << self
8
+ #
9
+ # Start a claim for a domain that another Resend account has already verified.
10
+ # The domain is recreated under your account with fresh DKIM keys, so the
11
+ # previous account's DNS records cannot be reused. Returns a TXT record to add
12
+ # to your DNS to prove ownership. Uses the same request body as creating a domain.
13
+ #
14
+ # @param params [Hash] the parameters
15
+ # @option params [String] :name the name of the domain you want to claim (required)
16
+ # @option params [String] :region the region where emails will be sent from.
17
+ # Possible values: 'us-east-1' | 'eu-west-1' | 'sa-east-1' | 'ap-northeast-1'
18
+ # @option params [String] :custom_return_path subdomain for the Return-Path address (default 'send')
19
+ # @option params [String] :tracking_subdomain the custom subdomain used for click and open tracking links
20
+ # @option params [Boolean] :click_tracking track clicks within the body of each HTML email
21
+ # @option params [Boolean] :open_tracking track the open rate of each email
22
+ #
23
+ # https://resend.com/docs/api-reference/domains/claim-domain
24
+ def create(params)
25
+ path = "domains/claim"
26
+ Resend::Request.new(path, params, "post").perform
27
+ end
28
+
29
+ #
30
+ # Retrieve the latest claim for the placeholder domain created by the claim.
31
+ #
32
+ # @param domain_id [String] the ID of the placeholder domain created by the claim
33
+ #
34
+ # https://resend.com/docs/api-reference/domains/get-domain-claim
35
+ def get(domain_id = "")
36
+ path = "domains/#{domain_id}/claim"
37
+ Resend::Request.new(path, {}, "get").perform
38
+ end
39
+
40
+ #
41
+ # Trigger asynchronous DNS verification and ownership transfer for a domain claim.
42
+ # The claim stays 'pending' while verification runs; poll `get` for status. Once
43
+ # 'completed', the transferred domain has new DKIM records that must be added to
44
+ # DNS and verified via Resend::Domains.verify.
45
+ #
46
+ # @param domain_id [String] the ID of the placeholder domain created by the claim
47
+ #
48
+ # https://resend.com/docs/api-reference/domains/verify-domain-claim
49
+ def verify(domain_id = "")
50
+ path = "domains/#{domain_id}/claim/verify"
51
+ Resend::Request.new(path, {}, "post").perform
52
+ end
53
+ end
54
+ end
55
+ end
56
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Resend
4
+ # oauth grants api wrapper
5
+ module OAuthGrants
6
+ class << self
7
+ # https://resend.com/docs/api-reference/oauth/list-grants
8
+ def list(params = {})
9
+ path = Resend::PaginationHelper.build_paginated_path("oauth/grants", params)
10
+ Resend::Request.new(path, {}, "get").perform
11
+ end
12
+
13
+ # https://resend.com/docs/api-reference/oauth/revoke-grant
14
+ def revoke(oauth_grant_id = "")
15
+ path = "oauth/grants/#{oauth_grant_id}"
16
+ Resend::Request.new(path, {}, "delete").perform
17
+ end
18
+ end
19
+ end
20
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Resend
4
- VERSION = "1.5.0"
4
+ VERSION = "1.6.0"
5
5
  end
data/lib/resend.rb CHANGED
@@ -25,6 +25,7 @@ require "resend/contacts/segments"
25
25
  require "resend/contacts/topics"
26
26
  require "resend/contact_properties"
27
27
  require "resend/domains"
28
+ require "resend/domains/claims"
28
29
  require "resend/emails"
29
30
  require "resend/templates"
30
31
  require "resend/emails/receiving"
@@ -33,6 +34,7 @@ require "resend/emails/receiving/attachments"
33
34
  require "resend/logs"
34
35
  require "resend/topics"
35
36
  require "resend/webhooks"
37
+ require "resend/oauth_grants"
36
38
  require "resend/automations"
37
39
  require "resend/automations/runs"
38
40
  require "resend/events"
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.5.0
4
+ version: 1.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Derich Pacheco
@@ -57,6 +57,7 @@ files:
57
57
  - lib/resend/contacts/segments.rb
58
58
  - lib/resend/contacts/topics.rb
59
59
  - lib/resend/domains.rb
60
+ - lib/resend/domains/claims.rb
60
61
  - lib/resend/emails.rb
61
62
  - lib/resend/emails/attachments.rb
62
63
  - lib/resend/emails/receiving.rb
@@ -66,6 +67,7 @@ files:
66
67
  - lib/resend/logs.rb
67
68
  - lib/resend/mailer.rb
68
69
  - lib/resend/multipart_request.rb
70
+ - lib/resend/oauth_grants.rb
69
71
  - lib/resend/pagination_helper.rb
70
72
  - lib/resend/railtie.rb
71
73
  - lib/resend/request.rb