sendmux-sdk 1.3.0 → 2.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 +4 -4
- data/CHANGELOG.md +23 -0
- data/README.md +80 -1
- data/lib/sendmux/sdk/version.rb +1 -1
- metadata +12 -12
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7dcb0b49df13606f8a0893b33221e3e563f3028673cfdf97edf9f820a994dedd
|
|
4
|
+
data.tar.gz: a1c6532322a68eb8e49af0d347b48ab3a221986c2c062875bc99e0e3e2cffb8e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5aad2012a60e96a508071bdb4f6381efc155c9a37a8a15f7a6a4f58a6926a4e5046e73c8f297ab600b225d53ba5d791cdb7e6127225616a25c0cd445b8ed29b1
|
|
7
|
+
data.tar.gz: 79f9bc773762d9b138d1d7f7abf15bca4a128572ec6e45486e0f06c0ad634c0f4cd42aab1342e12307f35884eed80b3e1a25df8cfd5a25b1285d90cba8fccbb3
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# Changelog
|
|
2
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
|
+
|
|
3
26
|
## [1.3.0](https://github.com/Sendmux/sendmux-sdk/compare/ruby-sdk/v1.2.0...ruby-sdk/v1.3.0) (2026-09-10)
|
|
4
27
|
|
|
5
28
|
|
data/README.md
CHANGED
|
@@ -30,9 +30,88 @@ gem install sendmux-sdk
|
|
|
30
30
|
Or add it to your Gemfile:
|
|
31
31
|
|
|
32
32
|
```ruby
|
|
33
|
-
gem "sendmux-sdk", "~>
|
|
33
|
+
gem "sendmux-sdk", "~> 2.0"
|
|
34
34
|
```
|
|
35
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
|
+
|
|
36
115
|
## OAuth access tokens
|
|
37
116
|
|
|
38
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.
|
data/lib/sendmux/sdk/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sendmux-sdk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 2.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sendmux
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 2026-09-
|
|
10
|
+
date: 2026-09-19 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: sendmux-core
|
|
@@ -35,47 +35,47 @@ dependencies:
|
|
|
35
35
|
requirements:
|
|
36
36
|
- - ">="
|
|
37
37
|
- !ruby/object:Gem::Version
|
|
38
|
-
version:
|
|
38
|
+
version: 2.0.0
|
|
39
39
|
- - "<"
|
|
40
40
|
- !ruby/object:Gem::Version
|
|
41
|
-
version: '
|
|
41
|
+
version: '3.0'
|
|
42
42
|
type: :runtime
|
|
43
43
|
prerelease: false
|
|
44
44
|
version_requirements: !ruby/object:Gem::Requirement
|
|
45
45
|
requirements:
|
|
46
46
|
- - ">="
|
|
47
47
|
- !ruby/object:Gem::Version
|
|
48
|
-
version:
|
|
48
|
+
version: 2.0.0
|
|
49
49
|
- - "<"
|
|
50
50
|
- !ruby/object:Gem::Version
|
|
51
|
-
version: '
|
|
51
|
+
version: '3.0'
|
|
52
52
|
- !ruby/object:Gem::Dependency
|
|
53
53
|
name: sendmux-management
|
|
54
54
|
requirement: !ruby/object:Gem::Requirement
|
|
55
55
|
requirements:
|
|
56
56
|
- - ">="
|
|
57
57
|
- !ruby/object:Gem::Version
|
|
58
|
-
version:
|
|
58
|
+
version: 2.0.0
|
|
59
59
|
- - "<"
|
|
60
60
|
- !ruby/object:Gem::Version
|
|
61
|
-
version: '
|
|
61
|
+
version: '3.0'
|
|
62
62
|
type: :runtime
|
|
63
63
|
prerelease: false
|
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
|
65
65
|
requirements:
|
|
66
66
|
- - ">="
|
|
67
67
|
- !ruby/object:Gem::Version
|
|
68
|
-
version:
|
|
68
|
+
version: 2.0.0
|
|
69
69
|
- - "<"
|
|
70
70
|
- !ruby/object:Gem::Version
|
|
71
|
-
version: '
|
|
71
|
+
version: '3.0'
|
|
72
72
|
- !ruby/object:Gem::Dependency
|
|
73
73
|
name: sendmux-sending
|
|
74
74
|
requirement: !ruby/object:Gem::Requirement
|
|
75
75
|
requirements:
|
|
76
76
|
- - ">="
|
|
77
77
|
- !ruby/object:Gem::Version
|
|
78
|
-
version: 1.
|
|
78
|
+
version: 1.5.0
|
|
79
79
|
- - "<"
|
|
80
80
|
- !ruby/object:Gem::Version
|
|
81
81
|
version: '2.0'
|
|
@@ -85,7 +85,7 @@ dependencies:
|
|
|
85
85
|
requirements:
|
|
86
86
|
- - ">="
|
|
87
87
|
- !ruby/object:Gem::Version
|
|
88
|
-
version: 1.
|
|
88
|
+
version: 1.5.0
|
|
89
89
|
- - "<"
|
|
90
90
|
- !ruby/object:Gem::Version
|
|
91
91
|
version: '2.0'
|