mailkite 0.1.0 → 0.3.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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/mailkite.rb +42 -1
  3. metadata +8 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5c90dce58b0e00df106212cea51814eac48aa3bb8d882ccf40d472d36b383597
4
- data.tar.gz: 1d0c0d768de9751bdbbfe1e90d03053c9b06b9f64a05f93c91f5982f3ade6a1b
3
+ metadata.gz: 42cf7ba9f50876399828e00154066736c0210841c052f13c985d55fdce4f1d44
4
+ data.tar.gz: 56fc0377973778fd28f55386045df4df9b160813e4f601e86694d5393eef91c5
5
5
  SHA512:
6
- metadata.gz: 813a0066f5324b66fbb921c275ce35d59749d65a5c04bd69889e2dbb30f3c5a23906400f3b55143c795838d47ef7f305ac94e430f2313cd64be6225e92b15c15
7
- data.tar.gz: 42ced2df301a792ced60398f3b75d476598dec347ddf180bb0e0c8a66a9863b295910d5ef702b67015d15036f6bb629cff7bb4ef65f4cce1ace9e7a4afbf7cd4
6
+ metadata.gz: d9682dccd33207a1fdf67ac6ec85461c897bdf245c1f8bae43c3363c231e431434bd75c433ffa2e8f66ee5619b878e5672af3b598d32732989222173e0105391
7
+ data.tar.gz: cff4c8b4683f22ef86abe586238a6d44367658667f6dded3a7257900760fb202a68e6fec2fc81c8d0b483b657d93004962a2d6162fc3ed23a30f56cba2558002
data/lib/mailkite.rb CHANGED
@@ -11,9 +11,10 @@ require "net/http"
11
11
  require "uri"
12
12
  require "json"
13
13
  require "openssl"
14
+ require "cgi"
14
15
 
15
16
  module Mailkite
16
- VERSION = "0.1.0"
17
+ VERSION = "0.3.0"
17
18
  DEFAULT_BASE_URL = "https://api.mailkite.dev"
18
19
  # Reject webhook events older than this (ms) to block replays. Pass 0 to disable.
19
20
  DEFAULT_TOLERANCE_MS = 5 * 60 * 1000
@@ -98,10 +99,25 @@ module Mailkite
98
99
  end
99
100
 
100
101
  # --- Sending --------------------------------------------------------
102
+ # message keys: from, to, text/html, etc. `subject` is optional when a
103
+ # template supplies it. Pass `templateId` to render a stored template and
104
+ # `templateData` (a hash) to fill its variables.
101
105
  def send(message)
102
106
  request("POST", "/v1/send", message)
103
107
  end
104
108
 
109
+ # Run an inbound message through an AI agent. message keys: text (required),
110
+ # plus optional subject/from/html/routeId/address/model.
111
+ def agent(message)
112
+ request("POST", "/v1/agent", message)
113
+ end
114
+
115
+ # Route an inbound message to its configured destination. message keys: from
116
+ # (required), plus optional routeId/address/subject/text/html.
117
+ def route(message)
118
+ request("POST", "/v1/route", message)
119
+ end
120
+
105
121
  # --- Domains --------------------------------------------------------
106
122
  def listDomains
107
123
  request("GET", "/api/domains")
@@ -135,6 +151,14 @@ module Mailkite
135
151
  request("POST", "/api/domains/#{id}/webhook/test")
136
152
  end
137
153
 
154
+ def checkDomainAvailability(domain)
155
+ request("GET", "/api/domains/register/check?domain=#{CGI.escape(domain)}")
156
+ end
157
+
158
+ def registerDomain(body)
159
+ request("POST", "/api/domains/register", body)
160
+ end
161
+
138
162
  # --- Routes ---------------------------------------------------------
139
163
  def listRoutes
140
164
  request("GET", "/api/routes")
@@ -144,6 +168,23 @@ module Mailkite
144
168
  request("POST", "/api/routes", body)
145
169
  end
146
170
 
171
+ # --- Templates ------------------------------------------------------
172
+ def listTemplates
173
+ request("GET", "/api/templates")
174
+ end
175
+
176
+ def listBaseTemplates
177
+ request("GET", "/api/templates/base")
178
+ end
179
+
180
+ def getTemplate(id)
181
+ request("GET", "/api/templates/#{id}")
182
+ end
183
+
184
+ def createTemplate(body)
185
+ request("POST", "/api/templates", body)
186
+ end
187
+
147
188
  # --- Messages & deliveries -----------------------------------------
148
189
  def listMessages
149
190
  request("GET", "/api/messages")
metadata CHANGED
@@ -1,17 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mailkite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - MailKite
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-06-22 00:00:00.000000000 Z
11
+ date: 2026-06-24 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Send and manage email over your own authenticated domain with MailKite.
14
- email:
14
+ email:
15
15
  executables: []
16
16
  extensions: []
17
17
  extra_rdoc_files: []
@@ -21,8 +21,8 @@ homepage: https://mailkite.dev/docs/libraries
21
21
  licenses:
22
22
  - MIT
23
23
  metadata:
24
- source_code_uri: https://github.com/fijiwebdesign/mailkite
25
- post_install_message:
24
+ source_code_uri: https://github.com/mailkite/mailkite
25
+ post_install_message:
26
26
  rdoc_options: []
27
27
  require_paths:
28
28
  - lib
@@ -37,8 +37,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
37
37
  - !ruby/object:Gem::Version
38
38
  version: '0'
39
39
  requirements: []
40
- rubygems_version: 3.0.3.1
41
- signing_key:
40
+ rubygems_version: 3.5.22
41
+ signing_key:
42
42
  specification_version: 4
43
43
  summary: Official MailKite SDK for Ruby
44
44
  test_files: []