sendmux-sdk 2.0.0 → 3.0.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: 7dcb0b49df13606f8a0893b33221e3e563f3028673cfdf97edf9f820a994dedd
4
- data.tar.gz: a1c6532322a68eb8e49af0d347b48ab3a221986c2c062875bc99e0e3e2cffb8e
3
+ metadata.gz: 8eae95166a4941032d3e8830d0761c6d14c4c545b1ccb9a331e9f128f96a46c9
4
+ data.tar.gz: aa4445c981ec16106eb2b838fb667bbf6093ffb9e76b78586e4f6dfb803c2a53
5
5
  SHA512:
6
- metadata.gz: 5aad2012a60e96a508071bdb4f6381efc155c9a37a8a15f7a6a4f58a6926a4e5046e73c8f297ab600b225d53ba5d791cdb7e6127225616a25c0cd445b8ed29b1
7
- data.tar.gz: 79f9bc773762d9b138d1d7f7abf15bca4a128572ec6e45486e0f06c0ad634c0f4cd42aab1342e12307f35884eed80b3e1a25df8cfd5a25b1285d90cba8fccbb3
6
+ metadata.gz: c9908886acfd4db1be54d5a6881eac419a325d779d35d8fed4b8b79e78fad03823099f387e524f75ed08c9b6d6555393c81977074287b2ffb95942b3f891f0aa
7
+ data.tar.gz: 4bf2b3d2a265f976c15ef489858f3420b181b06fe89061a974b4bb0557e46cb3a61d053c3c17febe33e6cfd71cdba0681ebceb70ce0cdc2a2b265f2c6f90819c
metadata CHANGED
@@ -1,112 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sendmux-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
- - Sendmux
7
+ - Qubrics
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2026-09-19 00:00:00.000000000 Z
10
+ date: 2026-11-19 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
- name: sendmux-core
13
+ name: qubrics-sdk
14
14
  requirement: !ruby/object:Gem::Requirement
15
15
  requirements:
16
16
  - - ">="
17
17
  - !ruby/object:Gem::Version
18
- version: 1.3.0
18
+ version: 3.0.0
19
19
  - - "<"
20
20
  - !ruby/object:Gem::Version
21
- version: '2.0'
21
+ version: '4.0'
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - ">="
27
27
  - !ruby/object:Gem::Version
28
- version: 1.3.0
28
+ version: 3.0.0
29
29
  - - "<"
30
30
  - !ruby/object:Gem::Version
31
- version: '2.0'
32
- - !ruby/object:Gem::Dependency
33
- name: sendmux-mailbox
34
- requirement: !ruby/object:Gem::Requirement
35
- requirements:
36
- - - ">="
37
- - !ruby/object:Gem::Version
38
- version: 2.0.0
39
- - - "<"
40
- - !ruby/object:Gem::Version
41
- version: '3.0'
42
- type: :runtime
43
- prerelease: false
44
- version_requirements: !ruby/object:Gem::Requirement
45
- requirements:
46
- - - ">="
47
- - !ruby/object:Gem::Version
48
- version: 2.0.0
49
- - - "<"
50
- - !ruby/object:Gem::Version
51
- version: '3.0'
52
- - !ruby/object:Gem::Dependency
53
- name: sendmux-management
54
- requirement: !ruby/object:Gem::Requirement
55
- requirements:
56
- - - ">="
57
- - !ruby/object:Gem::Version
58
- version: 2.0.0
59
- - - "<"
60
- - !ruby/object:Gem::Version
61
- version: '3.0'
62
- type: :runtime
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: 2.0.0
69
- - - "<"
70
- - !ruby/object:Gem::Version
71
- version: '3.0'
72
- - !ruby/object:Gem::Dependency
73
- name: sendmux-sending
74
- requirement: !ruby/object:Gem::Requirement
75
- requirements:
76
- - - ">="
77
- - !ruby/object:Gem::Version
78
- version: 1.5.0
79
- - - "<"
80
- - !ruby/object:Gem::Version
81
- version: '2.0'
82
- type: :runtime
83
- prerelease: false
84
- version_requirements: !ruby/object:Gem::Requirement
85
- requirements:
86
- - - ">="
87
- - !ruby/object:Gem::Version
88
- version: 1.5.0
89
- - - "<"
90
- - !ruby/object:Gem::Version
91
- version: '2.0'
92
- email:
93
- - contact@sendmux.ai
31
+ version: '4.0'
32
+ description: Installs the required dependency.
94
33
  executables: []
95
34
  extensions: []
96
35
  extra_rdoc_files: []
97
- files:
98
- - CHANGELOG.md
99
- - LICENSE
100
- - README.md
101
- - lib/sendmux/sdk.rb
102
- - lib/sendmux/sdk/version.rb
103
- homepage: https://github.com/Sendmux/sendmux-sdk
36
+ files: []
37
+ homepage: https://github.com/qubrics/qubrics-sdk
104
38
  licenses:
105
39
  - MIT
106
- metadata:
107
- homepage_uri: https://github.com/Sendmux/sendmux-sdk
108
- source_code_uri: https://github.com/Sendmux/sendmux-sdk/tree/main/packages/ruby/sdk
109
- changelog_uri: https://github.com/Sendmux/sendmux-sdk/blob/main/packages/ruby/sdk/CHANGELOG.md
40
+ metadata: {}
110
41
  rdoc_options: []
111
42
  require_paths:
112
43
  - lib
@@ -123,5 +54,5 @@ required_rubygems_version: !ruby/object:Gem::Requirement
123
54
  requirements: []
124
55
  rubygems_version: 3.6.2
125
56
  specification_version: 4
126
- summary: Umbrella Ruby SDK for Sendmux.
57
+ summary: Dependency-only package.
127
58
  test_files: []
data/CHANGELOG.md DELETED
@@ -1,62 +0,0 @@
1
- # Changelog
2
-
3
- ## [2.0.0](https://github.com/Sendmux/sendmux-sdk/compare/ruby-sdk/v1.3.0...ruby-sdk/v2.0.0) (2026-09-19)
4
-
5
-
6
- ### Changed
7
-
8
- * **Breaking:** the umbrella now requires `sendmux-management >= 2.0.0, < 3.0` and `sendmux-mailbox >= 2.0.0, < 3.0`, so `Sendmux::SDK.management(...)` and `Sendmux::SDK.mailbox(...)` return the 2.0 result classes: sending-account list entries are `ProviderListItem` (no `variables`) while `management_get_provider` returns `ProviderItem` with a required `variables` hash, and `mailbox_list_thread_messages` returns `MailboxThreadMessageSummaryCursorListResponse` whose `meta.thread_id` is required. Code that only reads results keeps working; class checks and constructed fixtures must follow [Migrate from 1.x to 2.0](README.md#migrate-from-1x-to-20) ([3c4fe75](https://github.com/Sendmux/sendmux-sdk/commit/3c4fe755c8be1b3afcd9b25aeb0aa4bb65be8556), [051a621](https://github.com/Sendmux/sendmux-sdk/commit/051a6215f1ef2a8400696baba9a84d8b8d9d9aae)).
9
-
10
- ### Dependencies
11
-
12
- * `sendmux-mailbox >= 2.0.0, < 3.0` (was `>= 1.4.0, < 2.0`), `sendmux-management >= 2.0.0, < 3.0` (was `>= 1.3.0, < 2.0`), `sendmux-sending >= 1.5.0, < 2.0` (was `>= 1.4.0, < 2.0`; [eaf5a80](https://github.com/Sendmux/sendmux-sdk/commit/eaf5a80d19abaca9db21e9c093a8713ad972d934)); `sendmux-core >= 1.3.0, < 2.0` unchanged.
13
-
14
- ### ⚠ BREAKING CHANGES
15
-
16
- * **ruby-sdk:** adopt Mailbox 2 producer floor
17
- * **ruby-sdk:** adopt Management 2 producer floor
18
-
19
- ### Bug Fixes
20
-
21
- * prepare mailbox SDK major releases ([dc01472](https://github.com/Sendmux/sendmux-sdk/commit/dc014724f7f6eb6b93293e6acbcc1a36c5060ebb))
22
- * **ruby-sdk:** adopt Mailbox 2 producer floor ([051a621](https://github.com/Sendmux/sendmux-sdk/commit/051a6215f1ef2a8400696baba9a84d8b8d9d9aae))
23
- * **ruby-sdk:** adopt Management 2 producer floor ([3c4fe75](https://github.com/Sendmux/sendmux-sdk/commit/3c4fe755c8be1b3afcd9b25aeb0aa4bb65be8556))
24
- * **ruby-sdk:** require released sending 1.5.0 ([eaf5a80](https://github.com/Sendmux/sendmux-sdk/commit/eaf5a80d19abaca9db21e9c093a8713ad972d934))
25
-
26
- ## [1.3.0](https://github.com/Sendmux/sendmux-sdk/compare/ruby-sdk/v1.2.0...ruby-sdk/v1.3.0) (2026-09-10)
27
-
28
-
29
- ### Features
30
-
31
- * add REST OAuth clients and CLI token lifecycle ([cc4a3aa](https://github.com/Sendmux/sendmux-sdk/commit/cc4a3aa6110378641418a94455ed5b9a986e65ff))
32
-
33
- ## [1.2.0](https://github.com/Sendmux/sendmux-sdk/compare/ruby-sdk/v1.1.0...ruby-sdk/v1.2.0) (2026-09-08)
34
-
35
-
36
- ### Features
37
-
38
- * **ruby-sdk:** require connection-capable client versions ([175f89f](https://github.com/Sendmux/sendmux-sdk/commit/175f89f9dbe72bb84a4c65b6db77d0223ce80d3f))
39
-
40
- ## [1.1.0](https://github.com/Sendmux/sendmux-sdk/compare/ruby-sdk/v1.0.0...ruby-sdk/v1.1.0) (2026-07-01)
41
-
42
-
43
- ### Features
44
-
45
- * allow owner-approved agent tokens for sending ([9d1cb7d](https://github.com/Sendmux/sendmux-sdk/commit/9d1cb7df3df5aef1f59a4990dc087178ba3a7b21))
46
-
47
-
48
- ### Bug Fixes
49
-
50
- * **ruby-release:** require current component versions ([0e609e7](https://github.com/Sendmux/sendmux-sdk/commit/0e609e72630e05c29f93121dbac23946d0be7fe3))
51
- * **ruby-release:** require current component versions ([6c4a97f](https://github.com/Sendmux/sendmux-sdk/commit/6c4a97f544aecde91e91e9649ddc9c824081eeb4))
52
-
53
- ## 1.0.0 (2026-06-02)
54
-
55
-
56
- ### Features
57
-
58
- * **ruby:** add generated SDK packages ([f097fdf](https://github.com/Sendmux/sendmux-sdk/commit/f097fdf6afcbc2a048d9fdb1c9a669fff2a7ca4f))
59
-
60
- ## 1.0.0
61
-
62
- - Initial Ruby umbrella package.
data/LICENSE DELETED
@@ -1,21 +0,0 @@
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 DELETED
@@ -1,196 +0,0 @@
1
- # sendmux-sdk
2
-
3
- [![Gem Version](https://badge.fury.io/rb/sendmux-sdk.svg)](https://rubygems.org/gems/sendmux-sdk)
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
-
7
- Umbrella Ruby SDK package for Sendmux.
8
-
9
- ## Documentation
10
-
11
- - Ruby SDK guide: https://sendmux.ai/docs/sdks/ruby
12
- - Source: https://github.com/Sendmux/sendmux-sdk/tree/main/packages/ruby/sdk
13
- - Changelog: https://github.com/Sendmux/sendmux-sdk/blob/main/packages/ruby/sdk/CHANGELOG.md
14
-
15
- ## Requirements
16
-
17
- - Ruby 3.1 or newer.
18
- - A send-capable `smx_mbx_` key or owner-approved Sending-resource `smx_agent_` token for sending clients.
19
- - A mailbox-scoped key beginning with `smx_mbx_` or scoped token beginning with `smx_agent_` for mailbox clients.
20
- - A root key beginning with `smx_root_` for management clients.
21
-
22
- For OAuth, use a REST access token with the scopes and mailbox access required by the operation. See [OAuth for REST APIs](https://sendmux.ai/docs/developer-tools/oauth).
23
-
24
- ## Installation
25
-
26
- ```sh
27
- gem install sendmux-sdk
28
- ```
29
-
30
- Or add it to your Gemfile:
31
-
32
- ```ruby
33
- gem "sendmux-sdk", "~> 2.0"
34
- ```
35
-
36
- ## Migrate from 1.x to 2.0
37
-
38
- `sendmux-sdk` 2.0 requires `sendmux-management >= 2.0.0, < 3.0` and
39
- `sendmux-mailbox >= 2.0.0, < 3.0`, so it carries their two result-class changes;
40
- `sendmux-sending` (now `>= 1.5.0, < 2.0`) and `sendmux-core` carry no breaking
41
- change. The helper methods still return the surface gems' clients, so results
42
- from `Sendmux::SDK.management(...)` and `Sendmux::SDK.mailbox(...)` follow
43
- [the Management migration steps](../management/README.md#migrate-from-1x-to-20)
44
- and [the Mailbox migration steps](../mailbox/README.md#migrate-from-1x-to-20).
45
- If you check sending-account or thread-message result classes, read `variables`
46
- from sending-account list entries, or build thread-message fixtures by hand,
47
- update that code when upgrading to 2.0. Code that only reads other result
48
- fields keeps working.
49
-
50
- 1. `management_list_providers` returns `ProviderListItem` entries instead of
51
- `ProviderItem`. List entries don't expose `variables`; detail results remain
52
- `ProviderItem` and require a variables hash, which is empty when none are
53
- set. Update list-specific class checks to use the class loaded by the
54
- umbrella entry point, and fetch the detail when you need an account's
55
- variables:
56
-
57
- ```ruby
58
- require "sendmux/sdk"
59
-
60
- def provider_list_item?(item)
61
- # Before: item.is_a?(Sendmux::Management::Generated::ProviderItem)
62
- item.is_a?(Sendmux::Management::Generated::ProviderListItem)
63
- end
64
-
65
- def provider_variables(management, public_id)
66
- detail = management.sending_accounts.management_get_provider(public_id).data
67
- detail.variables
68
- end
69
- ```
70
-
71
- Pass the client returned by `Sendmux::SDK.management(...)` as `management`
72
- and the account's `id` as `public_id`. Don't convert a list entry into
73
- `ProviderItem` or substitute an empty variables hash for the account's actual
74
- variables. Update hand-built detail fixtures to include `variables: {}` when
75
- no variables are set.
76
-
77
- 2. `mailbox_list_thread_messages` returns
78
- `MailboxThreadMessageSummaryCursorListResponse` instead of
79
- `MailboxMessageSummaryCursorListResponse`: its `meta` is
80
- `MailboxThreadMessagesMeta`, whose `thread_id` is required and whose
81
- `sync_state` is an optional string. Update thread-message class checks and
82
- add the thread identity to every thread-message result you construct:
83
-
84
- ```ruby
85
- def thread_message_list?(response)
86
- # Before: response.is_a?(Sendmux::Mailbox::Generated::MailboxMessageSummaryCursorListResponse)
87
- response.is_a?(Sendmux::Mailbox::Generated::MailboxThreadMessageSummaryCursorListResponse)
88
- end
89
-
90
- def thread_message_fixture(thread_id)
91
- # Before: meta: { request_id: "req_fixture" }
92
- Sendmux::Mailbox::Generated::MailboxThreadMessageSummaryCursorListResponse.build_from_hash(
93
- ok: true,
94
- meta: { request_id: "req_fixture", thread_id: thread_id },
95
- data: [],
96
- pagination: { has_more: false }
97
- )
98
- end
99
- ```
100
-
101
- Ordinary `mailbox_list_messages` results remain
102
- `MailboxMessageSummaryCursorListResponse` and have no thread identity. The
103
- other Mailbox list families replace the generic `ResponseMeta` with typed
104
- metadata whose `request_id` is unchanged and whose new fields are optional.
105
-
106
- 3. Run your application's tests with the updated bundle. Verify that list
107
- handling accepts `ProviderListItem` and only detail handling reads
108
- `variables`. A constructed thread-message result without `meta.thread_id`
109
- fails with `ArgumentError: thread_id cannot be nil`.
110
-
111
- Update `sendmux-sdk`, `sendmux-mailbox`, `sendmux-management`, the bundle lock,
112
- and affected call sites or fixtures together. To roll back, restore those gem
113
- requirements, lock, and call-site changes together.
114
-
115
- ## OAuth access tokens
116
-
117
- Pass either `api_key:` or `access_token:`. `access_token:` accepts a bare token string or a callable; the callable is evaluated once per authenticated request. Your application owns token storage, expiry checks and refresh coordination.
118
-
119
- ```ruby
120
- require "sendmux/sdk"
121
-
122
- client = Sendmux::SDK.management(
123
- access_token: -> { ENV.fetch("SENDMUX_ACCESS_TOKEN") }
124
- )
125
- ```
126
-
127
- ## Usage
128
-
129
- Use the umbrella gem when you want all Ruby SDK surfaces in one install.
130
-
131
- ```ruby
132
- require "sendmux/sdk"
133
-
134
- sending = Sendmux::SDK.sending(
135
- api_key: ENV.fetch("SENDMUX_MAILBOX_KEY")
136
- )
137
-
138
- mailbox = Sendmux::SDK.mailbox(
139
- api_key: ENV.fetch("SENDMUX_MAILBOX_KEY")
140
- )
141
-
142
- management = Sendmux::SDK.management(
143
- api_key: ENV.fetch("SENDMUX_ROOT_KEY")
144
- )
145
-
146
- puts sending.emails.class
147
- puts mailbox.mailbox_api.class
148
- puts management.mailboxes.class
149
- ```
150
-
151
- `Sendmux::Sdk` is available as an alias for `Sendmux::SDK`.
152
-
153
- ### Surface clients
154
-
155
- The umbrella package installs and re-exports:
156
-
157
- - `sendmux-core`
158
- - `sendmux-sending`
159
- - `sendmux-mailbox`
160
- - `sendmux-management`
161
-
162
- The helper methods return the same clients exposed by the surface gems:
163
-
164
- - `Sendmux::SDK.sending(...)` returns `Sendmux::Sending::Client`.
165
- - `Sendmux::SDK.mailbox(...)` returns `Sendmux::Mailbox::Client`.
166
- - `Sendmux::SDK.management(...)` returns `Sendmux::Management::Client`.
167
-
168
- ### Retries, pagination, and errors
169
-
170
- Pass `Sendmux::Core::RetryOptions` through any umbrella helper. Use `Sendmux::Core.each_cursor` and `Sendmux::Core::Headers` with the generated operation methods exactly as you would with the surface gems.
171
-
172
- ```ruby
173
- retry_options = Sendmux::Core::RetryOptions.new(max_attempts: 4)
174
-
175
- management = Sendmux::SDK.management(
176
- api_key: ENV.fetch("SENDMUX_ROOT_KEY"),
177
- retry_options: retry_options
178
- )
179
-
180
- pager = Sendmux::Core.each_cursor(lambda do |opts|
181
- management.mailboxes.management_list_mailboxes(opts.merge(limit: 50))
182
- end)
183
-
184
- pager.each { |mailbox| puts mailbox.id }
185
- ```
186
-
187
- Generated API errors are mapped to `Sendmux::Core::ApiError`.
188
-
189
- ## Support
190
-
191
- - Documentation: https://sendmux.ai/docs
192
- - Contact: contact@sendmux.ai
193
-
194
- ## Licence
195
-
196
- MIT licence. See https://github.com/Sendmux/sendmux-sdk/blob/main/LICENSE.
@@ -1,7 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Sendmux
4
- module SDK
5
- VERSION = '2.0.0'
6
- end
7
- end
data/lib/sendmux/sdk.rb DELETED
@@ -1,29 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'sendmux/core'
4
- require 'sendmux/mailbox'
5
- require 'sendmux/management'
6
- require 'sendmux/sending'
7
- require 'sendmux/sdk/version'
8
-
9
- module Sendmux
10
- module SDK
11
- def self.sending(api_key: nil, access_token: nil, base_url: Sendmux::Sending::DEFAULT_BASE_URL, retry_options: nil)
12
- Sendmux::Sending::Client.new(api_key: api_key, access_token: access_token,
13
- base_url: base_url, retry_options: retry_options)
14
- end
15
-
16
- def self.mailbox(api_key: nil, access_token: nil, base_url: Sendmux::Mailbox::DEFAULT_BASE_URL, retry_options: nil)
17
- Sendmux::Mailbox::Client.new(api_key: api_key, access_token: access_token,
18
- base_url: base_url, retry_options: retry_options)
19
- end
20
-
21
- def self.management(api_key: nil, access_token: nil, base_url: Sendmux::Management::DEFAULT_BASE_URL,
22
- retry_options: nil)
23
- Sendmux::Management::Client.new(api_key: api_key, access_token: access_token,
24
- base_url: base_url, retry_options: retry_options)
25
- end
26
- end
27
-
28
- Sdk = SDK
29
- end