mailkite 0.18.0 → 0.19.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 +44 -1
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a4b8b0706aa98435dc195e58ee8c548e762e5fff84819432b96741de752ef32a
4
- data.tar.gz: b5ab6561c1750cd702b7f4e545001bd25d8a0c75996a930eae70b691e2500bc4
3
+ metadata.gz: aa6c0fe1916c302b913ce3ec7d39ca3b9e78633791fdfaf0d372306bc71bc134
4
+ data.tar.gz: 7795b6f4b60abcaadd6de5167a1326c1b0c5e5d8eb510ab4aeb141220c499459
5
5
  SHA512:
6
- metadata.gz: 6c599c0cc4f9efc6c94e5701d7adca5b508bf6fb94a7cc6c2747ad5c23649c362014664acaa402de2086af7507e757c686959681fdc3ce147f136cdfe515af34
7
- data.tar.gz: 79b945cbac587203ea1c2a9613a9eb76ef98bfc357572ed2767c861c880ffbb341753f58aab10abda130aa65923928d403cbc62a7840c5a8c1ea115b1c7e0360
6
+ metadata.gz: 836d902177a964a2094203c597a857222cef22f6f6d51eefd0ab5ddff1baecd636c5a4fb310aa1c658f84e128c2f9e99ef52b1f963f4d3d5f8d6c825f8f46b92
7
+ data.tar.gz: 438ec7af44244d1cffd79b609dddffcc11cbe9655dc3796a690ac7997d10fe8fc5c229a073dbbcb34cae2ec17640f367ed1659196d4fb3d0ded23e43f2a70015
data/lib/mailkite.rb CHANGED
@@ -15,7 +15,7 @@ require "base64"
15
15
  require "cgi"
16
16
 
17
17
  module Mailkite
18
- VERSION = "0.18.0"
18
+ VERSION = "0.19.0"
19
19
  DEFAULT_BASE_URL = "https://api.mailkite.dev"
20
20
  # Reject webhook events older than this (ms) to block replays. Pass 0 to disable.
21
21
  DEFAULT_TOLERANCE_MS = 5 * 60 * 1000
@@ -540,6 +540,49 @@ module Mailkite
540
540
  request("DELETE", "/api/keys/scoped/#{id}")
541
541
  end
542
542
 
543
+ # List the account's app passwords. Each one opens a mailbox over IMAP
544
+ # and/or the mailbox API, scoped to a domain and an address pattern
545
+ # within it.
546
+ def listAppPasswords
547
+ request("GET", "/api/app-passwords")
548
+ end
549
+
550
+ # Create an app password for one domain and address pattern. +body+ is a
551
+ # hash with "domain" (required) plus optional "address" (default "*"),
552
+ # "protocols" (default ["imap"]) and "label". The secret is returned once
553
+ # and never again.
554
+ def createAppPassword(body)
555
+ request("POST", "/api/app-passwords", body)
556
+ end
557
+
558
+ # Revoke an app password. Takes effect immediately — any IMAP session or
559
+ # API call using it stops authenticating.
560
+ def deleteAppPassword(id)
561
+ request("DELETE", "/api/app-passwords/#{id}")
562
+ end
563
+
564
+ # List a mailbox's messages, newest first. Authenticated with an app
565
+ # password granting "api" — this is how an agent reads its own inbox
566
+ # without an IMAP client. +params+ may carry :limit and :before.
567
+ def listMailboxMessages(address, params = {})
568
+ q = URI.encode_www_form({ "address" => address }.merge(params))
569
+ request("GET", "/api/mailbox/messages?#{q}")
570
+ end
571
+
572
+ # Fetch one message's raw RFC822 bytes from a mailbox. Same app password
573
+ # auth as the list.
574
+ def getMailboxMessageRaw(uid, address)
575
+ q = URI.encode_www_form("address" => address)
576
+ request("GET", "/api/mailbox/messages/#{uid}/raw?#{q}")
577
+ end
578
+
579
+ # Replace a message's IMAP flags (e.g. mark it "Seen"). Flags set here are
580
+ # the same ones an IMAP client sees.
581
+ def setMailboxMessageFlags(uid, address, flags)
582
+ q = URI.encode_www_form("address" => address)
583
+ request("POST", "/api/mailbox/messages/#{uid}/flags?#{q}", { "flags" => flags })
584
+ end
585
+
543
586
  # Current billing-period usage: emails used vs the plan's included bucket
544
587
  # (null = unlimited), AI actions, and the overage state that gates
545
588
  # sending. Powers quota meters in dashboards and integrations.
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.18.0
4
+ version: 0.19.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-08-02 00:00:00.000000000 Z
11
+ date: 2026-08-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mail