resend 1.8.0 → 1.10.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: e7d757f5905e1dcd2612fe9d14387afa7566101c7ccb9ef8dfe20ffa4d705719
4
- data.tar.gz: 5e097df768670818ba86bda90e1df2bf6ec2c5972b408392a9a48f62fba8f77d
3
+ metadata.gz: f371f1dad3f54dd4be3d53a1a242749f451a2052b87faf8c062a29b001fa9d40
4
+ data.tar.gz: 5acf401dbb4d342126629e4e7f13744cd9569ec4cb872a1e14822f5c1d207ab7
5
5
  SHA512:
6
- metadata.gz: 1236c5c9057b34e7a224a397826d3c7b26ff84a465a6b66492ce10eeaf89def2ca5e78fad346da45a673d8738c675533e9594cb5e7c6490913108cd5ffdf7b34
7
- data.tar.gz: 18090c65d95e34c617bd572144cbb8ce1788b4fe8b6c6f97bc34439f17b9e5f21e5b413bc0249cf2364dd15b3d14b183592264e0180f6ff5bc3a3bca921c33bb
6
+ metadata.gz: 65c023232e15a0a64fe731ab6a5691d29972bc3b2e57a2f25b5ccdfe94d7c92ef80da1d8acb06a1cd9ddb23338767b07c960cb099d74990f46a9f0c8a3e8314d
7
+ data.tar.gz: 88301451135d13c9944062cb08e5b2a59e76e933cdc01cdcabbfc8c944f9cce70fa88eb7fd238cd59f799fd4f22d0b0cfd1bf9e0bc785d5cd03b363dff6177fe
@@ -21,6 +21,12 @@ module Resend
21
21
  path = "api-keys/#{api_key_id}"
22
22
  Resend::Request.new(path, {}, "delete").perform
23
23
  end
24
+
25
+ # https://resend.com/docs/api-reference/api-keys/update-api-key
26
+ def update(params)
27
+ path = "api-keys/#{params[:id]}"
28
+ Resend::Request.new(path, { name: params[:name] }, "patch").perform
29
+ end
24
30
  end
25
31
  end
26
32
  end
@@ -26,6 +26,11 @@ module Resend
26
26
  Resend::Request.new("automations/#{automation_id}", {}, "delete").perform
27
27
  end
28
28
 
29
+ # https://resend.com/docs/api-reference/automations/duplicate-automation
30
+ def duplicate(automation_id = "")
31
+ Resend::Request.new("automations/#{automation_id}/duplicate", {}, "post").perform
32
+ end
33
+
29
34
  # https://resend.com/docs/api-reference/automations/stop-automation
30
35
  def stop(automation_id = "")
31
36
  Resend::Request.new("automations/#{automation_id}/stop", {}, "post").perform
data/lib/resend/emails.rb CHANGED
@@ -32,6 +32,17 @@ module Resend
32
32
  Resend::Request.new(path, {}, "post").perform
33
33
  end
34
34
 
35
+ # Create a shareable link for a sent or received email.
36
+ #
37
+ # @param email_id [String] The email id (sent or received).
38
+ # @param params [Hash] Optional parameters
39
+ # @option params [String] :expires_in Human-readable duration (e.g. "10m", "2 hours",
40
+ # "1 day"). Defaults to "48h" and is capped at 48 hours.
41
+ def share(email_id, params = {})
42
+ path = "emails/#{email_id}/share"
43
+ Resend::Request.new(path, params, "post").perform
44
+ end
45
+
35
46
  # List emails with optional pagination.
36
47
  # see more: https://resend.com/docs/api-reference/emails/list-emails
37
48
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Resend
4
- VERSION = "1.8.0"
4
+ VERSION = "1.10.0"
5
5
  end
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.8.0
4
+ version: 1.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Derich Pacheco
@@ -97,7 +97,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
97
97
  - !ruby/object:Gem::Version
98
98
  version: '0'
99
99
  requirements: []
100
- rubygems_version: 3.6.9
100
+ rubygems_version: 4.0.16
101
101
  specification_version: 4
102
102
  summary: The Ruby and Rails SDK for resend.com
103
103
  test_files: []