sendmux-mailbox 1.0.0 → 1.1.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 (28) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +22 -0
  3. data/LICENSE +21 -0
  4. data/README.md +105 -0
  5. data/lib/sendmux/mailbox/version.rb +1 -1
  6. data/lib/sendmux_mailbox_generated/api/mailbox_api_api.rb +275 -14
  7. data/lib/sendmux_mailbox_generated/models/batch_delete_mailbox_messages_body.rb +1 -0
  8. data/lib/sendmux_mailbox_generated/models/batch_update_mailbox_messages_body.rb +3 -0
  9. data/lib/sendmux_mailbox_generated/models/{mailbox_message_summary_from.rb → granted_mailbox.rb} +28 -19
  10. data/lib/sendmux_mailbox_generated/models/granted_mailbox_list_response.rb +251 -0
  11. data/lib/sendmux_mailbox_generated/models/mailbox_attachment.rb +3 -1
  12. data/lib/sendmux_mailbox_generated/models/mailbox_attachment_upload_intent_body.rb +228 -0
  13. data/lib/sendmux_mailbox_generated/models/mailbox_attachment_upload_intent_result.rb +323 -0
  14. data/lib/sendmux_mailbox_generated/models/mailbox_attachment_upload_intent_result_headers.rb +191 -0
  15. data/lib/sendmux_mailbox_generated/models/mailbox_attachment_upload_intent_result_response.rb +223 -0
  16. data/lib/sendmux_mailbox_generated/models/mailbox_batch_get_body.rb +10 -0
  17. data/lib/sendmux_mailbox_generated/models/mailbox_changes.rb +11 -1
  18. data/lib/sendmux_mailbox_generated/models/mailbox_message.rb +14 -45
  19. data/lib/sendmux_mailbox_generated/models/mailbox_message_content_participants.rb +2 -16
  20. data/lib/sendmux_mailbox_generated/models/mailbox_message_summary.rb +15 -17
  21. data/lib/sendmux_mailbox_generated/models/mailbox_realtime_event.rb +1 -15
  22. data/lib/sendmux_mailbox_generated/models/mailbox_realtime_message.rb +14 -45
  23. data/lib/sendmux_mailbox_generated/models/mailbox_thread.rb +2 -16
  24. data/lib/sendmux_mailbox_generated/models/mailbox_thread_summary.rb +2 -16
  25. data/lib/sendmux_mailbox_generated/models/send_mailbox_message_body.rb +10 -0
  26. data/lib/sendmux_mailbox_generated.rb +6 -2
  27. metadata +9 -4
  28. data/lib/sendmux_mailbox_generated/models/mailbox_thread_summary_last_message.rb +0 -463
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 42c53fadc9fe1b36ba261e7939a2e9fc1f705a0fefe445c7baf4eb2b4b51cdb8
4
- data.tar.gz: 449840fed77986203a765ab505552d1a988eff1d6966c575c26cd482e6345216
3
+ metadata.gz: b8ee1ffecb7d9119d8bef0ed5e91e790941357cb92e929aa3e1e9bc340d1e5cd
4
+ data.tar.gz: f96c06177f3a46b62cc6f3c8dc40f594d1a3e8bbe252a7662b86d653ee64298e
5
5
  SHA512:
6
- metadata.gz: 9ae796de7c1e9f7d8057b932a24ef8cf56c6a254121e17f61bdb2eb7f78ee1afc31c32bdff1a277540b8334e8754fd28e93cc21c842fac59c63196327606662d
7
- data.tar.gz: aaf7ceda1872ebb9dc9b69933ed1f19fa99df372f6e5e573634dce7e28d639632250eb30d80e24f1094c5efe74c1683a820f1556de27e0145df0c7c0ab38ef37
6
+ metadata.gz: 80c51ef314d80a71a3ca0c0dd0f21dafe660ba47c1a823c604f5044788b9f98e9c71bad8f44d4bd3d7e0825cc93aac2de25ef25abb8e1ed0568654782efb7345
7
+ data.tar.gz: 2ece2ab37fb008c6bd166b15852377a387c0f64521e56b3292125dbcb669914a9fc27e78cb9bf4900e4e615bdb054b14c32703be5b7c739c020ddf047bca0022
data/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # Changelog
2
2
 
3
+ ## Unreleased
4
+
5
+ ### Features
6
+
7
+ * regenerate mailbox models for short-lived attachment download URLs and upload intents
8
+
9
+ ## [1.1.0](https://github.com/Sendmux/sendmux-sdk/compare/ruby-mailbox/v1.0.0...ruby-mailbox/v1.1.0) (2026-07-03)
10
+
11
+
12
+ ### Features
13
+
14
+ * **sdk:** add zero-context attachment uploads ([a4352ec](https://github.com/Sendmux/sendmux-sdk/commit/a4352ecfd6f2da37c908387450fea141363d0b81))
15
+ * **sdk:** make mailbox attachments agent-ready ([6a145ab](https://github.com/Sendmux/sendmux-sdk/commit/6a145ab1f2735d77783fb36e84aeeeb9bc747827))
16
+ * **sdk:** make mailbox attachments agent-ready ([457ed62](https://github.com/Sendmux/sendmux-sdk/commit/457ed62cf32c91aeac1cfe230d50f4f0b922e7cb))
17
+
18
+
19
+ ### Bug Fixes
20
+
21
+ * **sdk:** preserve attachment compatibility checks ([e92a1c2](https://github.com/Sendmux/sendmux-sdk/commit/e92a1c250a062f2f39a4f78c166c9e3a743e97ee))
22
+ * **sdk:** regenerate attachment download auth models ([6803890](https://github.com/Sendmux/sendmux-sdk/commit/6803890bad5aba610d5c6ad16ca98d7186ef9347))
23
+ * **sdk:** tolerate realtime events without attachments ([2d2b117](https://github.com/Sendmux/sendmux-sdk/commit/2d2b117945445b0478cf3f1d4f07b1038097f05f))
24
+
3
25
  ## 1.0.0 (2026-06-02)
4
26
 
5
27
 
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Sendmux
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md CHANGED
@@ -1,3 +1,108 @@
1
1
  # sendmux-mailbox
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/sendmux-mailbox.svg)](https://rubygems.org/gems/sendmux-mailbox)
4
+ [![CI](https://github.com/Sendmux/sendmux-sdk/actions/workflows/ci.yml/badge.svg)](https://github.com/Sendmux/sendmux-sdk/actions/workflows/ci.yml)
5
+ [![Licence: MIT](https://img.shields.io/badge/licence-MIT-blue.svg)](https://github.com/Sendmux/sendmux-sdk/blob/main/LICENSE)
6
+
3
7
  Ruby SDK package for the Sendmux Mailbox API.
8
+
9
+ ## Documentation
10
+
11
+ - Ruby SDK guide: https://sendmux.ai/docs/sdks/ruby
12
+ - Mailbox API reference: https://sendmux.ai/docs/mailbox-api
13
+ - Source: https://github.com/Sendmux/sendmux-sdk/tree/main/packages/ruby/mailbox
14
+ - Changelog: https://github.com/Sendmux/sendmux-sdk/blob/main/packages/ruby/mailbox/CHANGELOG.md
15
+
16
+ ## Requirements
17
+
18
+ - Ruby 3.1 or newer.
19
+ - A mailbox-scoped `smx_mbx_` key or scoped `smx_agent_` token.
20
+
21
+ ## Installation
22
+
23
+ ```sh
24
+ gem install sendmux-mailbox
25
+ ```
26
+
27
+ Or add it to your Gemfile:
28
+
29
+ ```ruby
30
+ gem "sendmux-mailbox", "~> 1.0"
31
+ ```
32
+
33
+ ## Usage
34
+
35
+ Create a mailbox client with a mailbox key or scoped agent token before calling generated operations.
36
+
37
+ ```ruby
38
+ require "sendmux/mailbox"
39
+
40
+ client = Sendmux::Mailbox::Client.new(
41
+ api_key: ENV.fetch("SENDMUX_MAILBOX_KEY")
42
+ )
43
+
44
+ me = client.mailbox_api.mailbox_get_me
45
+ messages = client.mailbox_api.mailbox_list_messages(limit: 25)
46
+
47
+ puts me.data.email
48
+ puts messages.data.length
49
+ ```
50
+
51
+ ### Client surface
52
+
53
+ `Sendmux::Mailbox::Client` exposes `client.mailbox_api`, which contains generated mailbox operations such as:
54
+
55
+ - `mailbox_get_me`
56
+ - `mailbox_list_messages`
57
+ - `mailbox_get_message`
58
+ - `mailbox_send_message`
59
+ - `mailbox_list_threads`
60
+ - `mailbox_upload_attachment`
61
+
62
+ When a key grants access to more than one mailbox, pass `mailbox_id:` to operations that accept it.
63
+
64
+ ### Pagination and conditional requests
65
+
66
+ Use `Sendmux::Core.each_cursor` for list operations that return cursor pagination. Use the ETag helpers for generated operations that accept `:if_match` or `:if_none_match`.
67
+
68
+ ```ruby
69
+ pager = Sendmux::Core.each_cursor(lambda do |opts|
70
+ client.mailbox_api.mailbox_list_messages(opts.merge(limit: 50))
71
+ end)
72
+
73
+ pager.each { |message| puts message.id }
74
+
75
+ client.mailbox_api.mailbox_delete_message(
76
+ "msg_123",
77
+ Sendmux::Core::Headers.if_match('W/"etag"')
78
+ )
79
+ ```
80
+
81
+ ### Attachments and events
82
+
83
+ Message and event attachment metadata includes `download_url`, a short-lived presigned URL for that single attachment. Fetch it promptly with a plain HTTP client and no `Authorization` header. If it expires, re-fetch the message or attachment metadata to receive a fresh URL.
84
+
85
+ Use `mailbox_upload_attachment` to upload bytes and pass the returned `blob_id` into `mailbox_send_message` attachments. Inline base64 attachments remain available in the generated send body shape for small payloads.
86
+
87
+ `mailbox_stream_events` exposes the Mailbox SSE endpoint for clients that want live `message.received` events.
88
+
89
+ ### Errors
90
+
91
+ Generated API errors are mapped to `Sendmux::Core::ApiError`.
92
+
93
+ ```ruby
94
+ begin
95
+ client.mailbox_api.mailbox_get_message("msg_123")
96
+ rescue Sendmux::Core::ApiError => error
97
+ warn "#{error.status} #{error.code}: #{error.message}"
98
+ end
99
+ ```
100
+
101
+ ## Support
102
+
103
+ - Documentation: https://sendmux.ai/docs
104
+ - Contact: contact@sendmux.ai
105
+
106
+ ## Licence
107
+
108
+ MIT licence. See https://github.com/Sendmux/sendmux-sdk/blob/main/LICENSE.
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Sendmux
4
4
  module Mailbox
5
- VERSION = '1.0.0'
5
+ VERSION = '1.1.0'
6
6
  end
7
7
  end