resend 0.27.0.alpha.2 → 0.27.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: 4133247b039437fb66f5b38abbe61c41d9cc85e007ae7ef7a00b865af21f9875
4
- data.tar.gz: ab112b1b77f4f7023fe98c2ab23fa93448d1b1700d7c3ea3dbf68f78ea69e214
3
+ metadata.gz: d14aa64ac124d647f4fb79b7f408e485fb91c67289a6e085fe39bca75e602793
4
+ data.tar.gz: c4302a083a1b6c2ed08ae62825ea1383ee53644967b59e9279d6489863dfdbdd
5
5
  SHA512:
6
- metadata.gz: b525a8dabb6d312585fa59db58e17cf8982f3ac5603502a62046ce24211b3ba59c056361e80ac7a958d6d073cea940fece2493c320b5ac7842eed88e34b329c3
7
- data.tar.gz: 38a6ce6faf1b907ee646bf53f28f8f0b67b7d1174e3a2d7fd075879c24a2399817d820ed8f0a2e19f50251f84a3ad7d2e0327a669f4e368e45f531cc3413b43a
6
+ metadata.gz: e1d6b730a10d67e4643d11b24ab11c9c26007ef874505fa0afd569009e16449c073c978a82d734f108f3f71660762b7591c3c8b95f2fabd15574622b30ff80b7
7
+ data.tar.gz: 8f0bab76e49b940813ce73dc71daebe1a3a3f423d27b4fecfb89db06460949f80c15da300a1d5d82c4768006ba0bff0e7b641b5a0360830751f413932ae886e8
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Resend
4
- VERSION = "0.27.0.alpha.2"
4
+ VERSION = "0.27.0"
5
5
  end
data/lib/resend.rb CHANGED
@@ -20,11 +20,6 @@ require "resend/batch"
20
20
  require "resend/contacts"
21
21
  require "resend/domains"
22
22
  require "resend/emails"
23
- require "resend/templates"
24
- require "resend/emails/receiving"
25
- require "resend/emails/attachments"
26
- require "resend/emails/receiving/attachments"
27
- require "resend/topics"
28
23
  require "resend/webhooks"
29
24
 
30
25
  # Rails
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: resend
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.27.0.alpha.2
4
+ version: 0.27.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Derich Pacheco
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-10-28 00:00:00.000000000 Z
11
+ date: 2025-10-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -54,16 +54,11 @@ files:
54
54
  - lib/resend/contacts.rb
55
55
  - lib/resend/domains.rb
56
56
  - lib/resend/emails.rb
57
- - lib/resend/emails/attachments.rb
58
- - lib/resend/emails/receiving.rb
59
- - lib/resend/emails/receiving/attachments.rb
60
57
  - lib/resend/errors.rb
61
58
  - lib/resend/mailer.rb
62
59
  - lib/resend/pagination_helper.rb
63
60
  - lib/resend/railtie.rb
64
61
  - lib/resend/request.rb
65
- - lib/resend/templates.rb
66
- - lib/resend/topics.rb
67
62
  - lib/resend/version.rb
68
63
  - lib/resend/webhooks.rb
69
64
  homepage: https://github.com/resend/resend-ruby
@@ -81,9 +76,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
81
76
  version: '2.6'
82
77
  required_rubygems_version: !ruby/object:Gem::Requirement
83
78
  requirements:
84
- - - ">"
79
+ - - ">="
85
80
  - !ruby/object:Gem::Version
86
- version: 1.3.1
81
+ version: '0'
87
82
  requirements: []
88
83
  rubygems_version: 3.4.10
89
84
  signing_key:
@@ -1,67 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Resend
4
- module Emails
5
- # Module for sent email attachments API operations
6
- module Attachments
7
- class << self
8
- # Retrieve a single attachment from a sent email
9
- #
10
- # @param params [Hash] Parameters for retrieving the attachment
11
- # @option params [String] :id The attachment ID (required)
12
- # @option params [String] :email_id The email ID (required)
13
- # @return [Hash] The attachment object
14
- #
15
- # @example
16
- # Resend::Emails::Attachments.get(
17
- # id: "2a0c9ce0-3112-4728-976e-47ddcd16a318",
18
- # email_id: "4ef9a417-02e9-4d39-ad75-9611e0fcc33c"
19
- # )
20
- def get(params = {})
21
- attachment_id = params[:id]
22
- email_id = params[:email_id]
23
-
24
- path = "emails/#{email_id}/attachments/#{attachment_id}"
25
- Resend::Request.new(path, {}, "get").perform
26
- end
27
-
28
- # List attachments from a sent email with optional pagination
29
- #
30
- # @param params [Hash] Parameters for listing attachments
31
- # @option params [String] :email_id The email ID (required)
32
- # @option params [Integer] :limit Maximum number of attachments to return (1-100)
33
- # @option params [String] :after Cursor for pagination (newer attachments)
34
- # @option params [String] :before Cursor for pagination (older attachments)
35
- # @return [Hash] List of attachments with pagination info
36
- #
37
- # @example List all attachments
38
- # Resend::Emails::Attachments.list(
39
- # email_id: "4ef9a417-02e9-4d39-ad75-9611e0fcc33c"
40
- # )
41
- #
42
- # @example List with custom limit
43
- # Resend::Emails::Attachments.list(
44
- # email_id: "4ef9a417-02e9-4d39-ad75-9611e0fcc33c",
45
- # limit: 50
46
- # )
47
- #
48
- # @example List with pagination
49
- # Resend::Emails::Attachments.list(
50
- # email_id: "4ef9a417-02e9-4d39-ad75-9611e0fcc33c",
51
- # limit: 20,
52
- # after: "attachment_id_123"
53
- # )
54
- def list(params = {})
55
- email_id = params[:email_id]
56
- base_path = "emails/#{email_id}/attachments"
57
-
58
- # Extract pagination parameters
59
- pagination_params = params.slice(:limit, :after, :before)
60
-
61
- path = Resend::PaginationHelper.build_paginated_path(base_path, pagination_params)
62
- Resend::Request.new(path, {}, "get").perform
63
- end
64
- end
65
- end
66
- end
67
- end
@@ -1,69 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Resend
4
- module Emails
5
- module Receiving
6
- # Module for received email attachments API operations
7
- module Attachments
8
- class << self
9
- # Retrieve a single attachment from a received email
10
- #
11
- # @param params [Hash] Parameters for retrieving the attachment
12
- # @option params [String] :id The attachment ID (required)
13
- # @option params [String] :email_id The email ID (required)
14
- # @return [Hash] The attachment object
15
- #
16
- # @example
17
- # Resend::Emails::Receiving::Attachments.get(
18
- # id: "2a0c9ce0-3112-4728-976e-47ddcd16a318",
19
- # email_id: "4ef9a417-02e9-4d39-ad75-9611e0fcc33c"
20
- # )
21
- def get(params = {})
22
- attachment_id = params[:id]
23
- email_id = params[:email_id]
24
-
25
- path = "emails/receiving/#{email_id}/attachments/#{attachment_id}"
26
- Resend::Request.new(path, {}, "get").perform
27
- end
28
-
29
- # List attachments from a received email with optional pagination
30
- #
31
- # @param params [Hash] Parameters for listing attachments
32
- # @option params [String] :email_id The email ID (required)
33
- # @option params [Integer] :limit Maximum number of attachments to return (1-100)
34
- # @option params [String] :after Cursor for pagination (newer attachments)
35
- # @option params [String] :before Cursor for pagination (older attachments)
36
- # @return [Hash] List of attachments with pagination info
37
- #
38
- # @example List all attachments
39
- # Resend::Emails::Receiving::Attachments.list(
40
- # email_id: "4ef9a417-02e9-4d39-ad75-9611e0fcc33c"
41
- # )
42
- #
43
- # @example List with custom limit
44
- # Resend::Emails::Receiving::Attachments.list(
45
- # email_id: "4ef9a417-02e9-4d39-ad75-9611e0fcc33c",
46
- # limit: 50
47
- # )
48
- #
49
- # @example List with pagination
50
- # Resend::Emails::Receiving::Attachments.list(
51
- # email_id: "4ef9a417-02e9-4d39-ad75-9611e0fcc33c",
52
- # limit: 20,
53
- # after: "attachment_id_123"
54
- # )
55
- def list(params = {})
56
- email_id = params[:email_id]
57
- base_path = "emails/receiving/#{email_id}/attachments"
58
-
59
- # Extract pagination parameters
60
- pagination_params = params.slice(:limit, :after, :before)
61
-
62
- path = Resend::PaginationHelper.build_paginated_path(base_path, pagination_params)
63
- Resend::Request.new(path, {}, "get").perform
64
- end
65
- end
66
- end
67
- end
68
- end
69
- end
@@ -1,43 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Resend
4
- module Emails
5
- # Module for receiving emails API operations
6
- module Receiving
7
- class << self
8
- # Retrieve a single received email
9
- #
10
- # @param email_id [String] The ID of the received email
11
- # @return [Hash] The received email object
12
- #
13
- # @example
14
- # Resend::Emails::Receiving.get("4ef9a417-02e9-4d39-ad75-9611e0fcc33c")
15
- def get(email_id = "")
16
- path = "emails/receiving/#{email_id}"
17
- Resend::Request.new(path, {}, "get").perform
18
- end
19
-
20
- # List received emails with optional pagination
21
- #
22
- # @param params [Hash] Optional parameters for pagination
23
- # @option params [Integer] :limit Maximum number of emails to return (1-100)
24
- # @option params [String] :after Cursor for pagination (newer emails)
25
- # @option params [String] :before Cursor for pagination (older emails)
26
- # @return [Hash] List of received emails with pagination info
27
- #
28
- # @example List all received emails
29
- # Resend::Emails::Receiving.list
30
- #
31
- # @example List with custom limit
32
- # Resend::Emails::Receiving.list(limit: 50)
33
- #
34
- # @example List with pagination
35
- # Resend::Emails::Receiving.list(limit: 20, after: "email_id_123")
36
- def list(params = {})
37
- path = Resend::PaginationHelper.build_paginated_path("emails/receiving", params)
38
- Resend::Request.new(path, {}, "get").perform
39
- end
40
- end
41
- end
42
- end
43
- end
@@ -1,50 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Resend
4
- # Templates api wrapper
5
- module Templates
6
- class << self
7
- # https://resend.com/docs/api-reference/templates/create-template
8
- def create(params = {})
9
- path = "templates"
10
- Resend::Request.new(path, params, "post").perform
11
- end
12
-
13
- # https://resend.com/docs/api-reference/templates/get-template
14
- def get(template_id = "")
15
- path = "templates/#{template_id}"
16
- Resend::Request.new(path, {}, "get").perform
17
- end
18
-
19
- # https://resend.com/docs/api-reference/templates/update-template
20
- def update(template_id, params = {})
21
- path = "templates/#{template_id}"
22
- Resend::Request.new(path, params, "patch").perform
23
- end
24
-
25
- # https://resend.com/docs/api-reference/templates/publish-template
26
- def publish(template_id = "")
27
- path = "templates/#{template_id}/publish"
28
- Resend::Request.new(path, {}, "post").perform
29
- end
30
-
31
- # https://resend.com/docs/api-reference/templates/duplicate-template
32
- def duplicate(template_id = "")
33
- path = "templates/#{template_id}/duplicate"
34
- Resend::Request.new(path, {}, "post").perform
35
- end
36
-
37
- # https://resend.com/docs/api-reference/templates/list-templates
38
- def list(params = {})
39
- path = Resend::PaginationHelper.build_paginated_path("templates", params)
40
- Resend::Request.new(path, {}, "get").perform
41
- end
42
-
43
- # https://resend.com/docs/api-reference/templates/delete-template
44
- def remove(template_id = "")
45
- path = "templates/#{template_id}"
46
- Resend::Request.new(path, {}, "delete").perform
47
- end
48
- end
49
- end
50
- end
data/lib/resend/topics.rb DELETED
@@ -1,38 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Resend
4
- # Topics api wrapper
5
- module Topics
6
- class << self
7
- # https://resend.com/docs/api-reference/topics/create-topic
8
- def create(params = {})
9
- path = "topics"
10
- Resend::Request.new(path, params, "post").perform
11
- end
12
-
13
- # https://resend.com/docs/api-reference/topics/get-topic
14
- def get(topic_id = "")
15
- path = "topics/#{topic_id}"
16
- Resend::Request.new(path, {}, "get").perform
17
- end
18
-
19
- # https://resend.com/docs/api-reference/topics/update-topic
20
- def update(params = {})
21
- path = "topics/#{params[:topic_id]}"
22
- Resend::Request.new(path, params, "patch").perform
23
- end
24
-
25
- # https://resend.com/docs/api-reference/topics/list-topics
26
- def list(params = {})
27
- path = Resend::PaginationHelper.build_paginated_path("topics", params)
28
- Resend::Request.new(path, {}, "get").perform
29
- end
30
-
31
- # https://resend.com/docs/api-reference/topics/delete-topic
32
- def remove(topic_id = "")
33
- path = "topics/#{topic_id}"
34
- Resend::Request.new(path, {}, "delete").perform
35
- end
36
- end
37
- end
38
- end