sendmux-mailbox 1.3.0 → 1.4.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 +7 -0
- data/README.md +15 -1
- data/lib/sendmux/mailbox/client.rb +9 -2
- data/lib/sendmux/mailbox/version.rb +1 -1
- data/lib/sendmux_mailbox_generated/api/mailbox_api_api.rb +51 -51
- data/lib/sendmux_mailbox_generated/configuration.rb +7 -0
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c8e1b0e705f607337315096115ace9127a97f01d79aca0c2e5fecc48b4c7ed8e
|
|
4
|
+
data.tar.gz: 3a924f8fc35fd94b028d3a16ca97140e16b29aa2a680d92de07c0b4d7d6a81ab
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5eab57ef617a7d08c59da74bbb0126cc1e30c2ffcb7316cd832e37e6ba6fb5b99658a44a3b7686c2e310722afdbba7988f67d74b1d2cfcf976ace33cb825ac65
|
|
7
|
+
data.tar.gz: cb889b2b515e98b60e826e4f3404effe59593ff0c83950ecd8e91ae2021312691ffe3cad4d86540e2e89b7c8bbfc972ffdaa294a257cc01474ee2c6856cd8fc5
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.4.0](https://github.com/Sendmux/sendmux-sdk/compare/ruby-mailbox/v1.3.0...ruby-mailbox/v1.4.0) (2026-09-10)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add REST OAuth clients and CLI token lifecycle ([cc4a3aa](https://github.com/Sendmux/sendmux-sdk/commit/cc4a3aa6110378641418a94455ed5b9a986e65ff))
|
|
9
|
+
|
|
3
10
|
## [1.3.0](https://github.com/Sendmux/sendmux-sdk/compare/ruby-mailbox/v1.2.0...ruby-mailbox/v1.3.0) (2026-09-08)
|
|
4
11
|
|
|
5
12
|
|
data/README.md
CHANGED
|
@@ -18,6 +18,8 @@ Ruby SDK package for the Sendmux Mailbox API.
|
|
|
18
18
|
- Ruby 3.1 or newer.
|
|
19
19
|
- A mailbox-scoped `smx_mbx_` key or scoped `smx_agent_` token.
|
|
20
20
|
|
|
21
|
+
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).
|
|
22
|
+
|
|
21
23
|
## Installation
|
|
22
24
|
|
|
23
25
|
```sh
|
|
@@ -30,9 +32,21 @@ Or add it to your Gemfile:
|
|
|
30
32
|
gem "sendmux-mailbox", "~> 1.0"
|
|
31
33
|
```
|
|
32
34
|
|
|
35
|
+
## OAuth access tokens
|
|
36
|
+
|
|
37
|
+
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.
|
|
38
|
+
|
|
39
|
+
```ruby
|
|
40
|
+
require "sendmux/mailbox"
|
|
41
|
+
|
|
42
|
+
client = Sendmux::Mailbox::Client.new(
|
|
43
|
+
access_token: -> { ENV.fetch("SENDMUX_ACCESS_TOKEN") }
|
|
44
|
+
)
|
|
45
|
+
```
|
|
46
|
+
|
|
33
47
|
## Usage
|
|
34
48
|
|
|
35
|
-
Create a mailbox client with a mailbox key or scoped agent token
|
|
49
|
+
Create a mailbox client with a mailbox key or scoped agent token for the API-key example below.
|
|
36
50
|
|
|
37
51
|
```ruby
|
|
38
52
|
require "sendmux/mailbox"
|
|
@@ -5,6 +5,12 @@ module Sendmux
|
|
|
5
5
|
DEFAULT_BASE_URL = 'https://app.sendmux.ai/api/v1'
|
|
6
6
|
|
|
7
7
|
class ApiClient < Generated::ApiClient
|
|
8
|
+
def update_params_for_auth!(header_params, query_params, auth_names)
|
|
9
|
+
return super unless config.access_token_getter && !Array(auth_names).empty?
|
|
10
|
+
|
|
11
|
+
header_params['Authorization'] = "Bearer #{config.access_token_with_refresh}"
|
|
12
|
+
end
|
|
13
|
+
|
|
8
14
|
def call_api(...)
|
|
9
15
|
super
|
|
10
16
|
rescue Generated::ApiError => e
|
|
@@ -15,12 +21,13 @@ module Sendmux
|
|
|
15
21
|
class Client
|
|
16
22
|
attr_reader :api_client, :configuration
|
|
17
23
|
|
|
18
|
-
def initialize(api_key
|
|
24
|
+
def initialize(api_key: nil, access_token: nil, base_url: DEFAULT_BASE_URL, retry_options: nil)
|
|
19
25
|
@configuration = Sendmux::Core::Auth.configure_bearer(
|
|
20
26
|
Generated::Configuration.new,
|
|
21
27
|
api_key,
|
|
22
28
|
Sendmux::Core::ApiKeySurface::MAILBOX,
|
|
23
|
-
base_url: base_url
|
|
29
|
+
base_url: base_url,
|
|
30
|
+
access_token: access_token
|
|
24
31
|
)
|
|
25
32
|
Sendmux::Core::Retry.configure(@configuration, retry_options)
|
|
26
33
|
@api_client = ApiClient.new(@configuration)
|
|
@@ -67,7 +67,7 @@ module Sendmux::Mailbox::Generated
|
|
|
67
67
|
return_type = opts[:debug_return_type] || 'MailboxBatchDeleteMessagesResultResponse'
|
|
68
68
|
|
|
69
69
|
# auth_names
|
|
70
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
70
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
71
71
|
|
|
72
72
|
new_options = opts.merge(
|
|
73
73
|
:operation => :"MailboxAPIApi.mailbox_batch_delete_messages",
|
|
@@ -134,7 +134,7 @@ module Sendmux::Mailbox::Generated
|
|
|
134
134
|
return_type = opts[:debug_return_type] || 'MailboxBatchGetResultResponse'
|
|
135
135
|
|
|
136
136
|
# auth_names
|
|
137
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
137
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
138
138
|
|
|
139
139
|
new_options = opts.merge(
|
|
140
140
|
:operation => :"MailboxAPIApi.mailbox_batch_get_messages",
|
|
@@ -201,7 +201,7 @@ module Sendmux::Mailbox::Generated
|
|
|
201
201
|
return_type = opts[:debug_return_type] || 'MailboxBatchUpdateMessagesResultResponse'
|
|
202
202
|
|
|
203
203
|
# auth_names
|
|
204
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
204
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
205
205
|
|
|
206
206
|
new_options = opts.merge(
|
|
207
207
|
:operation => :"MailboxAPIApi.mailbox_batch_update_messages",
|
|
@@ -326,7 +326,7 @@ module Sendmux::Mailbox::Generated
|
|
|
326
326
|
return_type = opts[:debug_return_type] || 'MailboxMessageCountResponse'
|
|
327
327
|
|
|
328
328
|
# auth_names
|
|
329
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
329
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
330
330
|
|
|
331
331
|
new_options = opts.merge(
|
|
332
332
|
:operation => :"MailboxAPIApi.mailbox_count_messages",
|
|
@@ -346,7 +346,7 @@ module Sendmux::Mailbox::Generated
|
|
|
346
346
|
end
|
|
347
347
|
|
|
348
348
|
# Create a presigned mailbox attachment upload
|
|
349
|
-
# Creates a short-lived signed PUT URL for one attachment. The caller must be authenticated to mint the URL; the later PUT uses the signed URL, exact Content-Type, and exact Content-Length without sending
|
|
349
|
+
# Creates a short-lived signed PUT URL for one attachment. The caller must be authenticated to mint the URL; the later PUT uses the signed URL, exact Content-Type, and exact Content-Length without sending a bearer token. The PUT returns a blob ID that can be supplied to `POST /mailbox/messages/send`.
|
|
350
350
|
# @param [Hash] opts the optional parameters
|
|
351
351
|
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
352
352
|
# @option opts [MailboxAttachmentUploadIntentBody] :mailbox_attachment_upload_intent_body
|
|
@@ -357,7 +357,7 @@ module Sendmux::Mailbox::Generated
|
|
|
357
357
|
end
|
|
358
358
|
|
|
359
359
|
# Create a presigned mailbox attachment upload
|
|
360
|
-
# Creates a short-lived signed PUT URL for one attachment. The caller must be authenticated to mint the URL; the later PUT uses the signed URL, exact Content-Type, and exact Content-Length without sending
|
|
360
|
+
# Creates a short-lived signed PUT URL for one attachment. The caller must be authenticated to mint the URL; the later PUT uses the signed URL, exact Content-Type, and exact Content-Length without sending a bearer token. The PUT returns a blob ID that can be supplied to `POST /mailbox/messages/send`.
|
|
361
361
|
# @param [Hash] opts the optional parameters
|
|
362
362
|
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
363
363
|
# @option opts [MailboxAttachmentUploadIntentBody] :mailbox_attachment_upload_intent_body
|
|
@@ -393,7 +393,7 @@ module Sendmux::Mailbox::Generated
|
|
|
393
393
|
return_type = opts[:debug_return_type] || 'MailboxAttachmentUploadIntentResultResponse'
|
|
394
394
|
|
|
395
395
|
# auth_names
|
|
396
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
396
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
397
397
|
|
|
398
398
|
new_options = opts.merge(
|
|
399
399
|
:operation => :"MailboxAPIApi.mailbox_create_attachment_upload",
|
|
@@ -460,7 +460,7 @@ module Sendmux::Mailbox::Generated
|
|
|
460
460
|
return_type = opts[:debug_return_type] || 'MailboxFolderResponse'
|
|
461
461
|
|
|
462
462
|
# auth_names
|
|
463
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
463
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
464
464
|
|
|
465
465
|
new_options = opts.merge(
|
|
466
466
|
:operation => :"MailboxAPIApi.mailbox_create_folder",
|
|
@@ -529,7 +529,7 @@ module Sendmux::Mailbox::Generated
|
|
|
529
529
|
return_type = opts[:debug_return_type] || 'MailboxFolderDeletedResponse'
|
|
530
530
|
|
|
531
531
|
# auth_names
|
|
532
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
532
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
533
533
|
|
|
534
534
|
new_options = opts.merge(
|
|
535
535
|
:operation => :"MailboxAPIApi.mailbox_delete_folder",
|
|
@@ -601,7 +601,7 @@ module Sendmux::Mailbox::Generated
|
|
|
601
601
|
return_type = opts[:debug_return_type] || 'MailboxMessageDeletedResponse'
|
|
602
602
|
|
|
603
603
|
# auth_names
|
|
604
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
604
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
605
605
|
|
|
606
606
|
new_options = opts.merge(
|
|
607
607
|
:operation => :"MailboxAPIApi.mailbox_delete_message",
|
|
@@ -696,7 +696,7 @@ module Sendmux::Mailbox::Generated
|
|
|
696
696
|
return_type = opts[:debug_return_type] || 'MailboxGetChanges200Response'
|
|
697
697
|
|
|
698
698
|
# auth_names
|
|
699
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
699
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
700
700
|
|
|
701
701
|
new_options = opts.merge(
|
|
702
702
|
:operation => :"MailboxAPIApi.mailbox_get_changes",
|
|
@@ -756,7 +756,7 @@ module Sendmux::Mailbox::Generated
|
|
|
756
756
|
return_type = opts[:debug_return_type] || 'ConnectionResponse'
|
|
757
757
|
|
|
758
758
|
# auth_names
|
|
759
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
759
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
760
760
|
|
|
761
761
|
new_options = opts.merge(
|
|
762
762
|
:operation => :"MailboxAPIApi.mailbox_get_connection",
|
|
@@ -825,7 +825,7 @@ module Sendmux::Mailbox::Generated
|
|
|
825
825
|
return_type = opts[:debug_return_type] || 'MailboxFolderResponse'
|
|
826
826
|
|
|
827
827
|
# auth_names
|
|
828
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
828
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
829
829
|
|
|
830
830
|
new_options = opts.merge(
|
|
831
831
|
:operation => :"MailboxAPIApi.mailbox_get_folder",
|
|
@@ -899,7 +899,7 @@ module Sendmux::Mailbox::Generated
|
|
|
899
899
|
return_type = opts[:debug_return_type] || 'MailboxChangesResponse'
|
|
900
900
|
|
|
901
901
|
# auth_names
|
|
902
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
902
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
903
903
|
|
|
904
904
|
new_options = opts.merge(
|
|
905
905
|
:operation => :"MailboxAPIApi.mailbox_get_folder_changes",
|
|
@@ -959,7 +959,7 @@ module Sendmux::Mailbox::Generated
|
|
|
959
959
|
return_type = opts[:debug_return_type] || 'MailboxIdentityResponse'
|
|
960
960
|
|
|
961
961
|
# auth_names
|
|
962
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
962
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
963
963
|
|
|
964
964
|
new_options = opts.merge(
|
|
965
965
|
:operation => :"MailboxAPIApi.mailbox_get_identity",
|
|
@@ -979,7 +979,7 @@ module Sendmux::Mailbox::Generated
|
|
|
979
979
|
end
|
|
980
980
|
|
|
981
981
|
# Self-introspect the calling mailbox
|
|
982
|
-
# Returns the mailbox
|
|
982
|
+
# Returns the selected mailbox, including live storage usage. Requires a mailbox credential or OAuth grant with Mailbox API access. For credential validation without selecting a mailbox or checking storage, use GET /mailbox/connection. Responses carry a weak `ETag` header — send it back as `If-None-Match` on the next request and the server will return `304 Not Modified` (no body) when the mailbox state has not changed.
|
|
983
983
|
# @param [Hash] opts the optional parameters
|
|
984
984
|
# @option opts [String] :if_none_match
|
|
985
985
|
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
@@ -990,7 +990,7 @@ module Sendmux::Mailbox::Generated
|
|
|
990
990
|
end
|
|
991
991
|
|
|
992
992
|
# Self-introspect the calling mailbox
|
|
993
|
-
# Returns the mailbox
|
|
993
|
+
# Returns the selected mailbox, including live storage usage. Requires a mailbox credential or OAuth grant with Mailbox API access. For credential validation without selecting a mailbox or checking storage, use GET /mailbox/connection. Responses carry a weak `ETag` header — send it back as `If-None-Match` on the next request and the server will return `304 Not Modified` (no body) when the mailbox state has not changed.
|
|
994
994
|
# @param [Hash] opts the optional parameters
|
|
995
995
|
# @option opts [String] :if_none_match
|
|
996
996
|
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
@@ -1022,7 +1022,7 @@ module Sendmux::Mailbox::Generated
|
|
|
1022
1022
|
return_type = opts[:debug_return_type] || 'MailboxMeItemResponse'
|
|
1023
1023
|
|
|
1024
1024
|
# auth_names
|
|
1025
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
1025
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
1026
1026
|
|
|
1027
1027
|
new_options = opts.merge(
|
|
1028
1028
|
:operation => :"MailboxAPIApi.mailbox_get_me",
|
|
@@ -1091,7 +1091,7 @@ module Sendmux::Mailbox::Generated
|
|
|
1091
1091
|
return_type = opts[:debug_return_type] || 'MailboxMessageDetailResponse'
|
|
1092
1092
|
|
|
1093
1093
|
# auth_names
|
|
1094
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
1094
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
1095
1095
|
|
|
1096
1096
|
new_options = opts.merge(
|
|
1097
1097
|
:operation => :"MailboxAPIApi.mailbox_get_message",
|
|
@@ -1169,7 +1169,7 @@ module Sendmux::Mailbox::Generated
|
|
|
1169
1169
|
return_type = opts[:debug_return_type]
|
|
1170
1170
|
|
|
1171
1171
|
# auth_names
|
|
1172
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
1172
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
1173
1173
|
|
|
1174
1174
|
new_options = opts.merge(
|
|
1175
1175
|
:operation => :"MailboxAPIApi.mailbox_get_message_attachment",
|
|
@@ -1243,7 +1243,7 @@ module Sendmux::Mailbox::Generated
|
|
|
1243
1243
|
return_type = opts[:debug_return_type] || 'MailboxChangesResponse'
|
|
1244
1244
|
|
|
1245
1245
|
# auth_names
|
|
1246
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
1246
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
1247
1247
|
|
|
1248
1248
|
new_options = opts.merge(
|
|
1249
1249
|
:operation => :"MailboxAPIApi.mailbox_get_quota_changes",
|
|
@@ -1306,7 +1306,7 @@ module Sendmux::Mailbox::Generated
|
|
|
1306
1306
|
return_type = opts[:debug_return_type] || 'MailboxSessionResponse'
|
|
1307
1307
|
|
|
1308
1308
|
# auth_names
|
|
1309
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
1309
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
1310
1310
|
|
|
1311
1311
|
new_options = opts.merge(
|
|
1312
1312
|
:operation => :"MailboxAPIApi.mailbox_get_session",
|
|
@@ -1375,7 +1375,7 @@ module Sendmux::Mailbox::Generated
|
|
|
1375
1375
|
return_type = opts[:debug_return_type] || 'MailboxSubmissionResponse'
|
|
1376
1376
|
|
|
1377
1377
|
# auth_names
|
|
1378
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
1378
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
1379
1379
|
|
|
1380
1380
|
new_options = opts.merge(
|
|
1381
1381
|
:operation => :"MailboxAPIApi.mailbox_get_submission",
|
|
@@ -1449,7 +1449,7 @@ module Sendmux::Mailbox::Generated
|
|
|
1449
1449
|
return_type = opts[:debug_return_type] || 'MailboxChangesResponse'
|
|
1450
1450
|
|
|
1451
1451
|
# auth_names
|
|
1452
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
1452
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
1453
1453
|
|
|
1454
1454
|
new_options = opts.merge(
|
|
1455
1455
|
:operation => :"MailboxAPIApi.mailbox_get_submission_changes",
|
|
@@ -1518,7 +1518,7 @@ module Sendmux::Mailbox::Generated
|
|
|
1518
1518
|
return_type = opts[:debug_return_type] || 'MailboxThreadDetailResponse'
|
|
1519
1519
|
|
|
1520
1520
|
# auth_names
|
|
1521
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
1521
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
1522
1522
|
|
|
1523
1523
|
new_options = opts.merge(
|
|
1524
1524
|
:operation => :"MailboxAPIApi.mailbox_get_thread",
|
|
@@ -1652,7 +1652,7 @@ module Sendmux::Mailbox::Generated
|
|
|
1652
1652
|
return_type = opts[:debug_return_type] || 'MailboxThreadContentResponse'
|
|
1653
1653
|
|
|
1654
1654
|
# auth_names
|
|
1655
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
1655
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
1656
1656
|
|
|
1657
1657
|
new_options = opts.merge(
|
|
1658
1658
|
:operation => :"MailboxAPIApi.mailbox_get_thread_content",
|
|
@@ -1739,7 +1739,7 @@ module Sendmux::Mailbox::Generated
|
|
|
1739
1739
|
return_type = opts[:debug_return_type] || 'MailboxRawBodyResponse'
|
|
1740
1740
|
|
|
1741
1741
|
# auth_names
|
|
1742
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
1742
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
1743
1743
|
|
|
1744
1744
|
new_options = opts.merge(
|
|
1745
1745
|
:operation => :"MailboxAPIApi.mailbox_list_body",
|
|
@@ -1852,7 +1852,7 @@ module Sendmux::Mailbox::Generated
|
|
|
1852
1852
|
return_type = opts[:debug_return_type] || 'MailboxMessageContentResponse'
|
|
1853
1853
|
|
|
1854
1854
|
# auth_names
|
|
1855
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
1855
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
1856
1856
|
|
|
1857
1857
|
new_options = opts.merge(
|
|
1858
1858
|
:operation => :"MailboxAPIApi.mailbox_list_content",
|
|
@@ -1926,7 +1926,7 @@ module Sendmux::Mailbox::Generated
|
|
|
1926
1926
|
return_type = opts[:debug_return_type] || 'MailboxFolderCursorListResponse'
|
|
1927
1927
|
|
|
1928
1928
|
# auth_names
|
|
1929
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
1929
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
1930
1930
|
|
|
1931
1931
|
new_options = opts.merge(
|
|
1932
1932
|
:operation => :"MailboxAPIApi.mailbox_list_folders",
|
|
@@ -2000,7 +2000,7 @@ module Sendmux::Mailbox::Generated
|
|
|
2000
2000
|
return_type = opts[:debug_return_type] || 'GrantedMailboxListResponse'
|
|
2001
2001
|
|
|
2002
2002
|
# auth_names
|
|
2003
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
2003
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
2004
2004
|
|
|
2005
2005
|
new_options = opts.merge(
|
|
2006
2006
|
:operation => :"MailboxAPIApi.mailbox_list_granted_mailboxes",
|
|
@@ -2074,7 +2074,7 @@ module Sendmux::Mailbox::Generated
|
|
|
2074
2074
|
return_type = opts[:debug_return_type] || 'MailboxIdentityCursorListResponse'
|
|
2075
2075
|
|
|
2076
2076
|
# auth_names
|
|
2077
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
2077
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
2078
2078
|
|
|
2079
2079
|
new_options = opts.merge(
|
|
2080
2080
|
:operation => :"MailboxAPIApi.mailbox_list_identities",
|
|
@@ -2094,7 +2094,7 @@ module Sendmux::Mailbox::Generated
|
|
|
2094
2094
|
end
|
|
2095
2095
|
|
|
2096
2096
|
# List mailbox messages
|
|
2097
|
-
# Returns a cursor-paginated list of messages for the authenticated mailbox. Requires
|
|
2097
|
+
# Returns a cursor-paginated list of messages for the authenticated mailbox. Requires Mailbox API access.
|
|
2098
2098
|
# @param [Hash] opts the optional parameters
|
|
2099
2099
|
# @option opts [String] :cursor
|
|
2100
2100
|
# @option opts [Integer] :limit
|
|
@@ -2127,7 +2127,7 @@ module Sendmux::Mailbox::Generated
|
|
|
2127
2127
|
end
|
|
2128
2128
|
|
|
2129
2129
|
# List mailbox messages
|
|
2130
|
-
# Returns a cursor-paginated list of messages for the authenticated mailbox. Requires
|
|
2130
|
+
# Returns a cursor-paginated list of messages for the authenticated mailbox. Requires Mailbox API access.
|
|
2131
2131
|
# @param [Hash] opts the optional parameters
|
|
2132
2132
|
# @option opts [String] :cursor
|
|
2133
2133
|
# @option opts [Integer] :limit
|
|
@@ -2227,7 +2227,7 @@ module Sendmux::Mailbox::Generated
|
|
|
2227
2227
|
return_type = opts[:debug_return_type] || 'MailboxMessageSummaryCursorListResponse'
|
|
2228
2228
|
|
|
2229
2229
|
# auth_names
|
|
2230
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
2230
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
2231
2231
|
|
|
2232
2232
|
new_options = opts.merge(
|
|
2233
2233
|
:operation => :"MailboxAPIApi.mailbox_list_messages",
|
|
@@ -2335,7 +2335,7 @@ module Sendmux::Mailbox::Generated
|
|
|
2335
2335
|
return_type = opts[:debug_return_type] || 'MailboxQuotaCursorListResponse'
|
|
2336
2336
|
|
|
2337
2337
|
# auth_names
|
|
2338
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
2338
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
2339
2339
|
|
|
2340
2340
|
new_options = opts.merge(
|
|
2341
2341
|
:operation => :"MailboxAPIApi.mailbox_list_quotas",
|
|
@@ -2445,7 +2445,7 @@ module Sendmux::Mailbox::Generated
|
|
|
2445
2445
|
return_type = opts[:debug_return_type] || 'MailboxSubmissionCursorListResponse'
|
|
2446
2446
|
|
|
2447
2447
|
# auth_names
|
|
2448
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
2448
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
2449
2449
|
|
|
2450
2450
|
new_options = opts.merge(
|
|
2451
2451
|
:operation => :"MailboxAPIApi.mailbox_list_submissions",
|
|
@@ -2532,7 +2532,7 @@ module Sendmux::Mailbox::Generated
|
|
|
2532
2532
|
return_type = opts[:debug_return_type] || 'MailboxMessageSummaryCursorListResponse'
|
|
2533
2533
|
|
|
2534
2534
|
# auth_names
|
|
2535
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
2535
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
2536
2536
|
|
|
2537
2537
|
new_options = opts.merge(
|
|
2538
2538
|
:operation => :"MailboxAPIApi.mailbox_list_thread_messages",
|
|
@@ -2634,7 +2634,7 @@ module Sendmux::Mailbox::Generated
|
|
|
2634
2634
|
return_type = opts[:debug_return_type] || 'MailboxThreadSummaryCursorListResponse'
|
|
2635
2635
|
|
|
2636
2636
|
# auth_names
|
|
2637
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
2637
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
2638
2638
|
|
|
2639
2639
|
new_options = opts.merge(
|
|
2640
2640
|
:operation => :"MailboxAPIApi.mailbox_list_threads",
|
|
@@ -2697,7 +2697,7 @@ module Sendmux::Mailbox::Generated
|
|
|
2697
2697
|
return_type = opts[:debug_return_type] || 'MailboxUsageResponse'
|
|
2698
2698
|
|
|
2699
2699
|
# auth_names
|
|
2700
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
2700
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
2701
2701
|
|
|
2702
2702
|
new_options = opts.merge(
|
|
2703
2703
|
:operation => :"MailboxAPIApi.mailbox_list_usage",
|
|
@@ -2771,7 +2771,7 @@ module Sendmux::Mailbox::Generated
|
|
|
2771
2771
|
return_type = opts[:debug_return_type] || 'MailboxFolderQueryChangesResponse'
|
|
2772
2772
|
|
|
2773
2773
|
# auth_names
|
|
2774
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
2774
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
2775
2775
|
|
|
2776
2776
|
new_options = opts.merge(
|
|
2777
2777
|
:operation => :"MailboxAPIApi.mailbox_query_folder_changes",
|
|
@@ -2927,7 +2927,7 @@ module Sendmux::Mailbox::Generated
|
|
|
2927
2927
|
return_type = opts[:debug_return_type] || 'MailboxMessageQueryChangesResponse'
|
|
2928
2928
|
|
|
2929
2929
|
# auth_names
|
|
2930
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
2930
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
2931
2931
|
|
|
2932
2932
|
new_options = opts.merge(
|
|
2933
2933
|
:operation => :"MailboxAPIApi.mailbox_query_message_changes",
|
|
@@ -3067,7 +3067,7 @@ module Sendmux::Mailbox::Generated
|
|
|
3067
3067
|
return_type = opts[:debug_return_type] || 'MailboxSearchSnippetsResultResponse'
|
|
3068
3068
|
|
|
3069
3069
|
# auth_names
|
|
3070
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
3070
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
3071
3071
|
|
|
3072
3072
|
new_options = opts.merge(
|
|
3073
3073
|
:operation => :"MailboxAPIApi.mailbox_search_message_snippets",
|
|
@@ -3141,7 +3141,7 @@ module Sendmux::Mailbox::Generated
|
|
|
3141
3141
|
return_type = opts[:debug_return_type] || 'MailboxSendResultResponse'
|
|
3142
3142
|
|
|
3143
3143
|
# auth_names
|
|
3144
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
3144
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
3145
3145
|
|
|
3146
3146
|
new_options = opts.merge(
|
|
3147
3147
|
:operation => :"MailboxAPIApi.mailbox_send_message",
|
|
@@ -3163,12 +3163,12 @@ module Sendmux::Mailbox::Generated
|
|
|
3163
3163
|
# Stream mailbox events
|
|
3164
3164
|
# Streams bounded rich mailbox events for connected clients. Each received-message event includes subject, participants, preview, attachment metadata, and a capped body snapshot; use the message endpoints for full content or attachment bytes.
|
|
3165
3165
|
# @param [Hash] opts the optional parameters
|
|
3166
|
+
# @option opts [String] :mailbox_id
|
|
3166
3167
|
# @option opts [String] :event_types
|
|
3167
3168
|
# @option opts [String] :last_event_id
|
|
3168
3169
|
# @option opts [Integer] :ping
|
|
3169
3170
|
# @option opts [Integer] :close_after
|
|
3170
3171
|
# @option opts [String] :last_event_id2
|
|
3171
|
-
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
3172
3172
|
# @return [MailboxRealtimeEvent]
|
|
3173
3173
|
def mailbox_stream_events(opts = {})
|
|
3174
3174
|
data, _status_code, _headers = mailbox_stream_events_with_http_info(opts)
|
|
@@ -3178,12 +3178,12 @@ module Sendmux::Mailbox::Generated
|
|
|
3178
3178
|
# Stream mailbox events
|
|
3179
3179
|
# Streams bounded rich mailbox events for connected clients. Each received-message event includes subject, participants, preview, attachment metadata, and a capped body snapshot; use the message endpoints for full content or attachment bytes.
|
|
3180
3180
|
# @param [Hash] opts the optional parameters
|
|
3181
|
+
# @option opts [String] :mailbox_id
|
|
3181
3182
|
# @option opts [String] :event_types
|
|
3182
3183
|
# @option opts [String] :last_event_id
|
|
3183
3184
|
# @option opts [Integer] :ping
|
|
3184
3185
|
# @option opts [Integer] :close_after
|
|
3185
3186
|
# @option opts [String] :last_event_id2
|
|
3186
|
-
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
3187
3187
|
# @return [Array<(MailboxRealtimeEvent, Integer, Hash)>] MailboxRealtimeEvent data, response status code and response headers
|
|
3188
3188
|
def mailbox_stream_events_with_http_info(opts = {})
|
|
3189
3189
|
if @api_client.config.debugging
|
|
@@ -3210,11 +3210,11 @@ module Sendmux::Mailbox::Generated
|
|
|
3210
3210
|
|
|
3211
3211
|
# query parameters
|
|
3212
3212
|
query_params = opts[:query_params] || {}
|
|
3213
|
+
query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil?
|
|
3213
3214
|
query_params[:'event_types'] = opts[:'event_types'] if !opts[:'event_types'].nil?
|
|
3214
3215
|
query_params[:'last_event_id'] = opts[:'last_event_id'] if !opts[:'last_event_id'].nil?
|
|
3215
3216
|
query_params[:'ping'] = opts[:'ping'] if !opts[:'ping'].nil?
|
|
3216
3217
|
query_params[:'close_after'] = opts[:'close_after'] if !opts[:'close_after'].nil?
|
|
3217
|
-
query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil?
|
|
3218
3218
|
|
|
3219
3219
|
# header parameters
|
|
3220
3220
|
header_params = opts[:header_params] || {}
|
|
@@ -3232,7 +3232,7 @@ module Sendmux::Mailbox::Generated
|
|
|
3232
3232
|
return_type = opts[:debug_return_type] || 'MailboxRealtimeEvent'
|
|
3233
3233
|
|
|
3234
3234
|
# auth_names
|
|
3235
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
3235
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
3236
3236
|
|
|
3237
3237
|
new_options = opts.merge(
|
|
3238
3238
|
:operation => :"MailboxAPIApi.mailbox_stream_events",
|
|
@@ -3308,7 +3308,7 @@ module Sendmux::Mailbox::Generated
|
|
|
3308
3308
|
return_type = opts[:debug_return_type] || 'MailboxFolderResponse'
|
|
3309
3309
|
|
|
3310
3310
|
# auth_names
|
|
3311
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
3311
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
3312
3312
|
|
|
3313
3313
|
new_options = opts.merge(
|
|
3314
3314
|
:operation => :"MailboxAPIApi.mailbox_update_folder",
|
|
@@ -3375,7 +3375,7 @@ module Sendmux::Mailbox::Generated
|
|
|
3375
3375
|
return_type = opts[:debug_return_type] || 'MailboxIdentityResponse'
|
|
3376
3376
|
|
|
3377
3377
|
# auth_names
|
|
3378
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
3378
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
3379
3379
|
|
|
3380
3380
|
new_options = opts.merge(
|
|
3381
3381
|
:operation => :"MailboxAPIApi.mailbox_update_identity",
|
|
@@ -3451,7 +3451,7 @@ module Sendmux::Mailbox::Generated
|
|
|
3451
3451
|
return_type = opts[:debug_return_type] || 'MailboxMessageDetailResponse'
|
|
3452
3452
|
|
|
3453
3453
|
# auth_names
|
|
3454
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
3454
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
3455
3455
|
|
|
3456
3456
|
new_options = opts.merge(
|
|
3457
3457
|
:operation => :"MailboxAPIApi.mailbox_update_message",
|
|
@@ -3525,7 +3525,7 @@ module Sendmux::Mailbox::Generated
|
|
|
3525
3525
|
return_type = opts[:debug_return_type] || 'MailboxAttachmentUploadResultResponse'
|
|
3526
3526
|
|
|
3527
3527
|
# auth_names
|
|
3528
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
3528
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
3529
3529
|
|
|
3530
3530
|
new_options = opts.merge(
|
|
3531
3531
|
:operation => :"MailboxAPIApi.mailbox_upload_attachment",
|
|
@@ -256,6 +256,13 @@ module Sendmux::Mailbox::Generated
|
|
|
256
256
|
key: 'Authorization',
|
|
257
257
|
value: "Bearer #{access_token_with_refresh}"
|
|
258
258
|
},
|
|
259
|
+
'oauth2' =>
|
|
260
|
+
{
|
|
261
|
+
type: 'oauth2',
|
|
262
|
+
in: 'header',
|
|
263
|
+
key: 'Authorization',
|
|
264
|
+
value: "Bearer #{access_token_with_refresh}"
|
|
265
|
+
},
|
|
259
266
|
}
|
|
260
267
|
end
|
|
261
268
|
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sendmux-mailbox
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.4.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-10 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: faraday
|
|
@@ -77,7 +77,7 @@ dependencies:
|
|
|
77
77
|
requirements:
|
|
78
78
|
- - ">="
|
|
79
79
|
- !ruby/object:Gem::Version
|
|
80
|
-
version: 1.
|
|
80
|
+
version: 1.3.0
|
|
81
81
|
- - "<"
|
|
82
82
|
- !ruby/object:Gem::Version
|
|
83
83
|
version: '2.0'
|
|
@@ -87,7 +87,7 @@ dependencies:
|
|
|
87
87
|
requirements:
|
|
88
88
|
- - ">="
|
|
89
89
|
- !ruby/object:Gem::Version
|
|
90
|
-
version: 1.
|
|
90
|
+
version: 1.3.0
|
|
91
91
|
- - "<"
|
|
92
92
|
- !ruby/object:Gem::Version
|
|
93
93
|
version: '2.0'
|