mailkite 0.2.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.
- checksums.yaml +4 -4
- data/lib/mailkite.rb +33 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 42cf7ba9f50876399828e00154066736c0210841c052f13c985d55fdce4f1d44
|
|
4
|
+
data.tar.gz: 56fc0377973778fd28f55386045df4df9b160813e4f601e86694d5393eef91c5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d9682dccd33207a1fdf67ac6ec85461c897bdf245c1f8bae43c3363c231e431434bd75c433ffa2e8f66ee5619b878e5672af3b598d32732989222173e0105391
|
|
7
|
+
data.tar.gz: cff4c8b4683f22ef86abe586238a6d44367658667f6dded3a7257900760fb202a68e6fec2fc81c8d0b483b657d93004962a2d6162fc3ed23a30f56cba2558002
|
data/lib/mailkite.rb
CHANGED
|
@@ -14,7 +14,7 @@ require "openssl"
|
|
|
14
14
|
require "cgi"
|
|
15
15
|
|
|
16
16
|
module Mailkite
|
|
17
|
-
VERSION = "0.
|
|
17
|
+
VERSION = "0.3.0"
|
|
18
18
|
DEFAULT_BASE_URL = "https://api.mailkite.dev"
|
|
19
19
|
# Reject webhook events older than this (ms) to block replays. Pass 0 to disable.
|
|
20
20
|
DEFAULT_TOLERANCE_MS = 5 * 60 * 1000
|
|
@@ -99,10 +99,25 @@ module Mailkite
|
|
|
99
99
|
end
|
|
100
100
|
|
|
101
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.
|
|
102
105
|
def send(message)
|
|
103
106
|
request("POST", "/v1/send", message)
|
|
104
107
|
end
|
|
105
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
|
+
|
|
106
121
|
# --- Domains --------------------------------------------------------
|
|
107
122
|
def listDomains
|
|
108
123
|
request("GET", "/api/domains")
|
|
@@ -153,6 +168,23 @@ module Mailkite
|
|
|
153
168
|
request("POST", "/api/routes", body)
|
|
154
169
|
end
|
|
155
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
|
+
|
|
156
188
|
# --- Messages & deliveries -----------------------------------------
|
|
157
189
|
def listMessages
|
|
158
190
|
request("GET", "/api/messages")
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: mailkite
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- MailKite
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-06-
|
|
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
14
|
email:
|
|
@@ -21,7 +21,7 @@ homepage: https://mailkite.dev/docs/libraries
|
|
|
21
21
|
licenses:
|
|
22
22
|
- MIT
|
|
23
23
|
metadata:
|
|
24
|
-
source_code_uri: https://github.com/
|
|
24
|
+
source_code_uri: https://github.com/mailkite/mailkite
|
|
25
25
|
post_install_message:
|
|
26
26
|
rdoc_options: []
|
|
27
27
|
require_paths:
|