sendmux-management 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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/LICENSE +21 -0
- data/README.md +103 -0
- data/lib/sendmux/management/version.rb +1 -1
- data/lib/sendmux_management_generated/api/domain_filters_api.rb +4 -4
- data/lib/sendmux_management_generated/api/domains_api.rb +77 -4
- data/lib/sendmux_management_generated/api/mailboxes_api.rb +64 -0
- data/lib/sendmux_management_generated/api/sending_accounts_api.rb +63 -0
- data/lib/sendmux_management_generated/api_client.rb +7 -1
- data/lib/sendmux_management_generated/models/filter_rule.rb +1 -1
- data/lib/sendmux_management_generated/models/mailbox_availability_reason.rb +45 -0
- data/lib/sendmux_management_generated/models/mailbox_availability_response.rb +223 -0
- data/lib/sendmux_management_generated/models/mailbox_availability_result.rb +240 -0
- data/lib/sendmux_management_generated/models/mailbox_domain.rb +44 -2
- data/lib/sendmux_management_generated/models/mailbox_domain_dns_records.rb +29 -2
- data/lib/sendmux_management_generated/models/mailbox_domain_mail_from_records.rb +191 -0
- data/lib/sendmux_management_generated/models/mailbox_domain_name_value_record.rb +1 -1
- data/lib/sendmux_management_generated/models/mailbox_domain_named_mx_record.rb +217 -0
- data/lib/sendmux_management_generated/models/mailbox_domain_verify_checks.rb +56 -2
- data/lib/sendmux_management_generated/models/mailbox_domain_verify_result.rb +29 -2
- data/lib/sendmux_management_generated/models/management_create_domain_request.rb +48 -4
- data/lib/sendmux_management_generated/models/management_create_mailbox_key_request.rb +1 -0
- data/lib/sendmux_management_generated/models/management_create_mailbox_request.rb +2 -0
- data/lib/sendmux_management_generated/models/management_create_mailbox_request_send_scope.rb +4 -0
- data/lib/sendmux_management_generated/models/management_update_domain_request.rb +189 -0
- data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request.rb +2 -2
- data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request_cancel.rb +190 -0
- data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request_cancel_response.rb +223 -0
- data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request_create.rb +1 -1
- data/lib/sendmux_management_generated/models/update_mailbox_body.rb +2 -1
- data/lib/sendmux_management_generated/models/update_mailbox_body_send_scope.rb +214 -0
- data/lib/sendmux_management_generated.rb +9 -1
- metadata +12 -3
- data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request_create_request.rb +0 -368
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 65ad082b72b81cf64a4ee46f47bb171f90a45ab5402c8d6f32ff403e1f566013
|
|
4
|
+
data.tar.gz: 8f35d39991a60a367896399b256462a8d0b51267dbf1155a06b874ec67657876
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 371e1183563e5c29d632b6a33c752bc347d9807156ef98a455bbcad72b3a312e043f266ddd3134c70cc06e3b7c0677a39576ed7ffdbb987f5d1f64f5402f3027
|
|
7
|
+
data.tar.gz: 7097e6b724abb711489561b2a65fe8eb1a40aff375ec56530f87819896382121b7c3ff2595f01fc0ecfd5258851f971b53195c45777bd185d590a85372a2fe28
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.1.0](https://github.com/Sendmux/sendmux-sdk/compare/ruby-management/v1.0.0...ruby-management/v1.1.0) (2026-07-08)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **sdk:** add sending attachment upload surfaces ([#96](https://github.com/Sendmux/sendmux-sdk/issues/96)) ([b8f9d5f](https://github.com/Sendmux/sendmux-sdk/commit/b8f9d5fe3c1ae510db82ce05c55cbcad92b43b44))
|
|
9
|
+
|
|
3
10
|
## 1.0.0 (2026-06-02)
|
|
4
11
|
|
|
5
12
|
|
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,106 @@
|
|
|
1
1
|
# sendmux-management
|
|
2
2
|
|
|
3
|
+
[](https://rubygems.org/gems/sendmux-management)
|
|
4
|
+
[](https://github.com/Sendmux/sendmux-sdk/actions/workflows/ci.yml)
|
|
5
|
+
[](https://github.com/Sendmux/sendmux-sdk/blob/main/LICENSE)
|
|
6
|
+
|
|
3
7
|
Ruby SDK package for the Sendmux Management API.
|
|
8
|
+
|
|
9
|
+
## Documentation
|
|
10
|
+
|
|
11
|
+
- Ruby SDK guide: https://sendmux.ai/docs/sdks/ruby
|
|
12
|
+
- Management API reference: https://sendmux.ai/docs/api
|
|
13
|
+
- Source: https://github.com/Sendmux/sendmux-sdk/tree/main/packages/ruby/management
|
|
14
|
+
- Changelog: https://github.com/Sendmux/sendmux-sdk/blob/main/packages/ruby/management/CHANGELOG.md
|
|
15
|
+
|
|
16
|
+
## Requirements
|
|
17
|
+
|
|
18
|
+
- Ruby 3.1 or newer.
|
|
19
|
+
- A root Sendmux API key beginning with `smx_root_`.
|
|
20
|
+
|
|
21
|
+
## Installation
|
|
22
|
+
|
|
23
|
+
```sh
|
|
24
|
+
gem install sendmux-management
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Or add it to your Gemfile:
|
|
28
|
+
|
|
29
|
+
```ruby
|
|
30
|
+
gem "sendmux-management", "~> 1.0"
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Usage
|
|
34
|
+
|
|
35
|
+
Create a management client with a root key before calling generated operations.
|
|
36
|
+
|
|
37
|
+
```ruby
|
|
38
|
+
require "sendmux/management"
|
|
39
|
+
|
|
40
|
+
client = Sendmux::Management::Client.new(
|
|
41
|
+
api_key: ENV.fetch("SENDMUX_ROOT_KEY")
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
mailboxes = client.mailboxes.management_list_mailboxes(limit: 25)
|
|
45
|
+
domains = client.domains.management_list_domains(limit: 25)
|
|
46
|
+
|
|
47
|
+
puts mailboxes.data.length
|
|
48
|
+
puts domains.data.length
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Client surface
|
|
52
|
+
|
|
53
|
+
`Sendmux::Management::Client` exposes generated API groups:
|
|
54
|
+
|
|
55
|
+
- `client.billing`
|
|
56
|
+
- `client.domain_filters`
|
|
57
|
+
- `client.domains`
|
|
58
|
+
- `client.emails`
|
|
59
|
+
- `client.inboxes`
|
|
60
|
+
- `client.mailbox_filters`
|
|
61
|
+
- `client.mailboxes`
|
|
62
|
+
- `client.sending_accounts`
|
|
63
|
+
- `client.webhooks`
|
|
64
|
+
|
|
65
|
+
Each group exposes generated operation methods using the `management_` prefix, such as `management_list_mailboxes`, `management_create_mailbox`, `management_list_domains`, and `management_create_webhook`.
|
|
66
|
+
|
|
67
|
+
### Idempotency and conditional requests
|
|
68
|
+
|
|
69
|
+
Mutating generated operations accept option hashes. Use the core header helpers for idempotency and ETag preconditions.
|
|
70
|
+
|
|
71
|
+
```ruby
|
|
72
|
+
client.webhooks.management_create_webhook(
|
|
73
|
+
Sendmux::Core::Headers.idempotency_key("create-webhook-001").merge(
|
|
74
|
+
webhook_create_body: Sendmux::Management::Generated::WebhookCreateBody.new(
|
|
75
|
+
url: "https://example.com/webhook",
|
|
76
|
+
event_types: ["sendmux.test"]
|
|
77
|
+
)
|
|
78
|
+
)
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
client.domains.management_update_domain(
|
|
82
|
+
"mdom_123",
|
|
83
|
+
Sendmux::Core::Headers.if_match('W/"etag"')
|
|
84
|
+
)
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Pagination and errors
|
|
88
|
+
|
|
89
|
+
Use `Sendmux::Core.each_cursor` for list operations that return cursor pagination. Generated API errors are mapped to `Sendmux::Core::ApiError`.
|
|
90
|
+
|
|
91
|
+
```ruby
|
|
92
|
+
pager = Sendmux::Core.each_cursor(lambda do |opts|
|
|
93
|
+
client.mailboxes.management_list_mailboxes(opts.merge(limit: 50))
|
|
94
|
+
end)
|
|
95
|
+
|
|
96
|
+
pager.each { |mailbox| puts mailbox.id }
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## Support
|
|
100
|
+
|
|
101
|
+
- Documentation: https://sendmux.ai/docs
|
|
102
|
+
- Contact: contact@sendmux.ai
|
|
103
|
+
|
|
104
|
+
## Licence
|
|
105
|
+
|
|
106
|
+
MIT licence. See https://github.com/Sendmux/sendmux-sdk/blob/main/LICENSE.
|
|
@@ -20,7 +20,7 @@ module Sendmux::Management::Generated
|
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
22
|
# Get domain-wide sender filters
|
|
23
|
-
# Returns the current sender-filter mode and rule set applied to every mailbox under this domain. Per-mailbox rules take precedence at match time. Responses carry a weak `ETag` — send it as `If-None-Match` to skip the body when the filter set has not changed (returns `304 Not Modified`). The same ETag is the value to use in `If-Match` on the corresponding PUT for optimistic concurrency.
|
|
23
|
+
# Returns the current sender-filter mode and rule set applied to every mailbox under this domain. Only sending and receiving domains support domain-wide filters. Per-mailbox rules take precedence at match time. Responses carry a weak `ETag` — send it as `If-None-Match` to skip the body when the filter set has not changed (returns `304 Not Modified`). The same ETag is the value to use in `If-Match` on the corresponding PUT for optimistic concurrency.
|
|
24
24
|
# @param public_id [String]
|
|
25
25
|
# @param [Hash] opts the optional parameters
|
|
26
26
|
# @option opts [String] :if_none_match
|
|
@@ -31,7 +31,7 @@ module Sendmux::Management::Generated
|
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
# Get domain-wide sender filters
|
|
34
|
-
# Returns the current sender-filter mode and rule set applied to every mailbox under this domain. Per-mailbox rules take precedence at match time. Responses carry a weak `ETag` — send it as `If-None-Match` to skip the body when the filter set has not changed (returns `304 Not Modified`). The same ETag is the value to use in `If-Match` on the corresponding PUT for optimistic concurrency.
|
|
34
|
+
# Returns the current sender-filter mode and rule set applied to every mailbox under this domain. Only sending and receiving domains support domain-wide filters. Per-mailbox rules take precedence at match time. Responses carry a weak `ETag` — send it as `If-None-Match` to skip the body when the filter set has not changed (returns `304 Not Modified`). The same ETag is the value to use in `If-Match` on the corresponding PUT for optimistic concurrency.
|
|
35
35
|
# @param public_id [String]
|
|
36
36
|
# @param [Hash] opts the optional parameters
|
|
37
37
|
# @option opts [String] :if_none_match
|
|
@@ -86,7 +86,7 @@ module Sendmux::Management::Generated
|
|
|
86
86
|
end
|
|
87
87
|
|
|
88
88
|
# Replace domain-wide sender filters
|
|
89
|
-
# Atomically replaces the sender-filter mode and rule set for an entire domain. Applies to every mailbox under the domain unless that mailbox has its own per-mailbox rules (which take precedence). Maximum 1000 rules per request. For optimistic concurrency, send `If-Match: <etag>` using the ETag from a prior GET. A mismatched `If-Match` returns `409 conflict` (the server's ETag is echoed back so you can decide whether to re-fetch). Responses carry the new ETag so chained edits can pipeline without a re-GET.
|
|
89
|
+
# Atomically replaces the sender-filter mode and rule set for an entire sending and receiving domain. Applies to every mailbox under the domain unless that mailbox has its own per-mailbox rules (which take precedence). Maximum 1000 rules per request. For optimistic concurrency, send `If-Match: <etag>` using the ETag from a prior GET. A mismatched `If-Match` returns `409 conflict` (the server's ETag is echoed back so you can decide whether to re-fetch). Responses carry the new ETag so chained edits can pipeline without a re-GET.
|
|
90
90
|
# @param public_id [String]
|
|
91
91
|
# @param [Hash] opts the optional parameters
|
|
92
92
|
# @option opts [String] :if_match
|
|
@@ -98,7 +98,7 @@ module Sendmux::Management::Generated
|
|
|
98
98
|
end
|
|
99
99
|
|
|
100
100
|
# Replace domain-wide sender filters
|
|
101
|
-
# Atomically replaces the sender-filter mode and rule set for an entire domain. Applies to every mailbox under the domain unless that mailbox has its own per-mailbox rules (which take precedence). Maximum 1000 rules per request. For optimistic concurrency, send `If-Match: <etag>` using the ETag from a prior GET. A mismatched `If-Match` returns `409 conflict` (the server's ETag is echoed back so you can decide whether to re-fetch). Responses carry the new ETag so chained edits can pipeline without a re-GET.
|
|
101
|
+
# Atomically replaces the sender-filter mode and rule set for an entire sending and receiving domain. Applies to every mailbox under the domain unless that mailbox has its own per-mailbox rules (which take precedence). Maximum 1000 rules per request. For optimistic concurrency, send `If-Match: <etag>` using the ETag from a prior GET. A mismatched `If-Match` returns `409 conflict` (the server's ETag is echoed back so you can decide whether to re-fetch). Responses carry the new ETag so chained edits can pipeline without a re-GET.
|
|
102
102
|
# @param public_id [String]
|
|
103
103
|
# @param [Hash] opts the optional parameters
|
|
104
104
|
# @option opts [String] :if_match
|
|
@@ -20,7 +20,7 @@ module Sendmux::Management::Generated
|
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
22
|
# Add a mailbox domain
|
|
23
|
-
# Creates a new
|
|
23
|
+
# Creates a new domain and returns the DNS records the customer must place before verification can succeed. `send_only` configures outbound sending without changing MX records. `send_receive` also configures the domain for hosted mailboxes. Provisioning touches our email platform and Amazon SES; on any failure the partial state is automatically rolled back. Supply an `Idempotency-Key` header (any unique string, max 255 chars) to safely retry on network errors. Replays with the same key return the original response; replays with a different body return `409 idempotency_conflict`.
|
|
24
24
|
# @param [Hash] opts the optional parameters
|
|
25
25
|
# @option opts [String] :idempotency_key
|
|
26
26
|
# @option opts [ManagementCreateDomainRequest] :management_create_domain_request
|
|
@@ -31,7 +31,7 @@ module Sendmux::Management::Generated
|
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
# Add a mailbox domain
|
|
34
|
-
# Creates a new
|
|
34
|
+
# Creates a new domain and returns the DNS records the customer must place before verification can succeed. `send_only` configures outbound sending without changing MX records. `send_receive` also configures the domain for hosted mailboxes. Provisioning touches our email platform and Amazon SES; on any failure the partial state is automatically rolled back. Supply an `Idempotency-Key` header (any unique string, max 255 chars) to safely retry on network errors. Replays with the same key return the original response; replays with a different body return `409 idempotency_conflict`.
|
|
35
35
|
# @param [Hash] opts the optional parameters
|
|
36
36
|
# @option opts [String] :idempotency_key
|
|
37
37
|
# @option opts [ManagementCreateDomainRequest] :management_create_domain_request
|
|
@@ -353,8 +353,81 @@ module Sendmux::Management::Generated
|
|
|
353
353
|
return data, status_code, headers
|
|
354
354
|
end
|
|
355
355
|
|
|
356
|
+
# Update a mailbox domain
|
|
357
|
+
# Upgrades a send-only domain to sending and receiving. Downgrades are rejected. After upgrade, the domain returns to `pending` until the required MX record verifies.
|
|
358
|
+
# @param public_id [String]
|
|
359
|
+
# @param [Hash] opts the optional parameters
|
|
360
|
+
# @option opts [String] :if_match
|
|
361
|
+
# @option opts [ManagementUpdateDomainRequest] :management_update_domain_request
|
|
362
|
+
# @return [DomainItemResponse]
|
|
363
|
+
def management_update_domain(public_id, opts = {})
|
|
364
|
+
data, _status_code, _headers = management_update_domain_with_http_info(public_id, opts)
|
|
365
|
+
data
|
|
366
|
+
end
|
|
367
|
+
|
|
368
|
+
# Update a mailbox domain
|
|
369
|
+
# Upgrades a send-only domain to sending and receiving. Downgrades are rejected. After upgrade, the domain returns to `pending` until the required MX record verifies.
|
|
370
|
+
# @param public_id [String]
|
|
371
|
+
# @param [Hash] opts the optional parameters
|
|
372
|
+
# @option opts [String] :if_match
|
|
373
|
+
# @option opts [ManagementUpdateDomainRequest] :management_update_domain_request
|
|
374
|
+
# @return [Array<(DomainItemResponse, Integer, Hash)>] DomainItemResponse data, response status code and response headers
|
|
375
|
+
def management_update_domain_with_http_info(public_id, opts = {})
|
|
376
|
+
if @api_client.config.debugging
|
|
377
|
+
@api_client.config.logger.debug 'Calling API: DomainsApi.management_update_domain ...'
|
|
378
|
+
end
|
|
379
|
+
# verify the required parameter 'public_id' is set
|
|
380
|
+
if @api_client.config.client_side_validation && public_id.nil?
|
|
381
|
+
fail ArgumentError, "Missing the required parameter 'public_id' when calling DomainsApi.management_update_domain"
|
|
382
|
+
end
|
|
383
|
+
# resource path
|
|
384
|
+
local_var_path = '/domains/{public_id}'.sub('{public_id}', CGI.escape(public_id.to_s))
|
|
385
|
+
|
|
386
|
+
# query parameters
|
|
387
|
+
query_params = opts[:query_params] || {}
|
|
388
|
+
|
|
389
|
+
# header parameters
|
|
390
|
+
header_params = opts[:header_params] || {}
|
|
391
|
+
# HTTP header 'Accept' (if needed)
|
|
392
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
393
|
+
# HTTP header 'Content-Type'
|
|
394
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
395
|
+
if !content_type.nil?
|
|
396
|
+
header_params['Content-Type'] = content_type
|
|
397
|
+
end
|
|
398
|
+
header_params[:'If-Match'] = opts[:'if_match'] if !opts[:'if_match'].nil?
|
|
399
|
+
|
|
400
|
+
# form parameters
|
|
401
|
+
form_params = opts[:form_params] || {}
|
|
402
|
+
|
|
403
|
+
# http body (model)
|
|
404
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'management_update_domain_request'])
|
|
405
|
+
|
|
406
|
+
# return_type
|
|
407
|
+
return_type = opts[:debug_return_type] || 'DomainItemResponse'
|
|
408
|
+
|
|
409
|
+
# auth_names
|
|
410
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
411
|
+
|
|
412
|
+
new_options = opts.merge(
|
|
413
|
+
:operation => :"DomainsApi.management_update_domain",
|
|
414
|
+
:header_params => header_params,
|
|
415
|
+
:query_params => query_params,
|
|
416
|
+
:form_params => form_params,
|
|
417
|
+
:body => post_body,
|
|
418
|
+
:auth_names => auth_names,
|
|
419
|
+
:return_type => return_type
|
|
420
|
+
)
|
|
421
|
+
|
|
422
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
423
|
+
if @api_client.config.debugging
|
|
424
|
+
@api_client.config.logger.debug "API called: DomainsApi#management_update_domain\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
425
|
+
end
|
|
426
|
+
return data, status_code, headers
|
|
427
|
+
end
|
|
428
|
+
|
|
356
429
|
# Verify a mailbox domain
|
|
357
|
-
# Runs an immediate DNS-over-HTTPS check of the domain's
|
|
430
|
+
# Runs an immediate DNS-over-HTTPS check of the domain's required DNS records, enables Amazon SES MAIL FROM after its DNS records are present, then asks Amazon SES for the latest DKIM and MAIL FROM statuses. If every required check passes the domain is marked verified. Domains automatically re-verify every 6 hours — this endpoint is only needed to trigger a check on demand.
|
|
358
431
|
# @param public_id [String]
|
|
359
432
|
# @param [Hash] opts the optional parameters
|
|
360
433
|
# @return [DomainVerifyResponse]
|
|
@@ -364,7 +437,7 @@ module Sendmux::Management::Generated
|
|
|
364
437
|
end
|
|
365
438
|
|
|
366
439
|
# Verify a mailbox domain
|
|
367
|
-
# Runs an immediate DNS-over-HTTPS check of the domain's
|
|
440
|
+
# Runs an immediate DNS-over-HTTPS check of the domain's required DNS records, enables Amazon SES MAIL FROM after its DNS records are present, then asks Amazon SES for the latest DKIM and MAIL FROM statuses. If every required check passes the domain is marked verified. Domains automatically re-verify every 6 hours — this endpoint is only needed to trigger a check on demand.
|
|
368
441
|
# @param public_id [String]
|
|
369
442
|
# @param [Hash] opts the optional parameters
|
|
370
443
|
# @return [Array<(DomainVerifyResponse, Integer, Hash)>] DomainVerifyResponse data, response status code and response headers
|
|
@@ -19,6 +19,70 @@ module Sendmux::Management::Generated
|
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
|
+
# Check mailbox address availability
|
|
23
|
+
# Checks whether an email address can be reserved for mailbox creation. `@myagent.mx` availability is global across all teams; custom-domain availability is scoped to the caller's team and requires a verified send/receive mailbox domain.
|
|
24
|
+
# @param email [String]
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @return [MailboxAvailabilityResponse]
|
|
27
|
+
def management_check_mailbox_availability(email, opts = {})
|
|
28
|
+
data, _status_code, _headers = management_check_mailbox_availability_with_http_info(email, opts)
|
|
29
|
+
data
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Check mailbox address availability
|
|
33
|
+
# Checks whether an email address can be reserved for mailbox creation. `@myagent.mx` availability is global across all teams; custom-domain availability is scoped to the caller's team and requires a verified send/receive mailbox domain.
|
|
34
|
+
# @param email [String]
|
|
35
|
+
# @param [Hash] opts the optional parameters
|
|
36
|
+
# @return [Array<(MailboxAvailabilityResponse, Integer, Hash)>] MailboxAvailabilityResponse data, response status code and response headers
|
|
37
|
+
def management_check_mailbox_availability_with_http_info(email, opts = {})
|
|
38
|
+
if @api_client.config.debugging
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: MailboxesApi.management_check_mailbox_availability ...'
|
|
40
|
+
end
|
|
41
|
+
# verify the required parameter 'email' is set
|
|
42
|
+
if @api_client.config.client_side_validation && email.nil?
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'email' when calling MailboxesApi.management_check_mailbox_availability"
|
|
44
|
+
end
|
|
45
|
+
# resource path
|
|
46
|
+
local_var_path = '/mailboxes/availability'
|
|
47
|
+
|
|
48
|
+
# query parameters
|
|
49
|
+
query_params = opts[:query_params] || {}
|
|
50
|
+
query_params[:'email'] = email
|
|
51
|
+
|
|
52
|
+
# header parameters
|
|
53
|
+
header_params = opts[:header_params] || {}
|
|
54
|
+
# HTTP header 'Accept' (if needed)
|
|
55
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
56
|
+
|
|
57
|
+
# form parameters
|
|
58
|
+
form_params = opts[:form_params] || {}
|
|
59
|
+
|
|
60
|
+
# http body (model)
|
|
61
|
+
post_body = opts[:debug_body]
|
|
62
|
+
|
|
63
|
+
# return_type
|
|
64
|
+
return_type = opts[:debug_return_type] || 'MailboxAvailabilityResponse'
|
|
65
|
+
|
|
66
|
+
# auth_names
|
|
67
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
68
|
+
|
|
69
|
+
new_options = opts.merge(
|
|
70
|
+
:operation => :"MailboxesApi.management_check_mailbox_availability",
|
|
71
|
+
:header_params => header_params,
|
|
72
|
+
:query_params => query_params,
|
|
73
|
+
:form_params => form_params,
|
|
74
|
+
:body => post_body,
|
|
75
|
+
:auth_names => auth_names,
|
|
76
|
+
:return_type => return_type
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
80
|
+
if @api_client.config.debugging
|
|
81
|
+
@api_client.config.logger.debug "API called: MailboxesApi#management_check_mailbox_availability\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
82
|
+
end
|
|
83
|
+
return data, status_code, headers
|
|
84
|
+
end
|
|
85
|
+
|
|
22
86
|
# Create a mailbox
|
|
23
87
|
# Provisions a new mailbox plus an initial bearer token and matching IMAP/SMTP mailbox password. The domain portion of the email must already be verified via POST /domains. If supplied, `quota_bytes` must be one of the current storage tiers: 1073741824 (1 GB), 5368709120 (5 GB), or 53687091200 (50 GB). Creation provisions resources on our mail platform and, for `@myagent.mx` addresses, on Amazon SES — any failure rolls the partial state back automatically. Supply an `Idempotency-Key` header (any unique string, max 255 chars) to safely retry on network errors. Replays with the same key return the original response; replays with a different body return `409 idempotency_conflict`.
|
|
24
88
|
# @param [Hash] opts the optional parameters
|
|
@@ -89,6 +89,69 @@ module Sendmux::Management::Generated
|
|
|
89
89
|
return data, status_code, headers
|
|
90
90
|
end
|
|
91
91
|
|
|
92
|
+
# Cancel a shared Amazon SES daily limit request
|
|
93
|
+
# Cancels a pending shared Amazon SES daily limit increase request for the caller's team. Approved or denied requests cannot be cancelled.
|
|
94
|
+
# @param request_id [String]
|
|
95
|
+
# @param [Hash] opts the optional parameters
|
|
96
|
+
# @return [SharedAmazonSesLimitRequestCancelResponse]
|
|
97
|
+
def management_cancel_shared_amazon_ses_limit_request(request_id, opts = {})
|
|
98
|
+
data, _status_code, _headers = management_cancel_shared_amazon_ses_limit_request_with_http_info(request_id, opts)
|
|
99
|
+
data
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Cancel a shared Amazon SES daily limit request
|
|
103
|
+
# Cancels a pending shared Amazon SES daily limit increase request for the caller's team. Approved or denied requests cannot be cancelled.
|
|
104
|
+
# @param request_id [String]
|
|
105
|
+
# @param [Hash] opts the optional parameters
|
|
106
|
+
# @return [Array<(SharedAmazonSesLimitRequestCancelResponse, Integer, Hash)>] SharedAmazonSesLimitRequestCancelResponse data, response status code and response headers
|
|
107
|
+
def management_cancel_shared_amazon_ses_limit_request_with_http_info(request_id, opts = {})
|
|
108
|
+
if @api_client.config.debugging
|
|
109
|
+
@api_client.config.logger.debug 'Calling API: SendingAccountsApi.management_cancel_shared_amazon_ses_limit_request ...'
|
|
110
|
+
end
|
|
111
|
+
# verify the required parameter 'request_id' is set
|
|
112
|
+
if @api_client.config.client_side_validation && request_id.nil?
|
|
113
|
+
fail ArgumentError, "Missing the required parameter 'request_id' when calling SendingAccountsApi.management_cancel_shared_amazon_ses_limit_request"
|
|
114
|
+
end
|
|
115
|
+
# resource path
|
|
116
|
+
local_var_path = '/providers/shared-amazon-ses-limit-request/{request_id}'.sub('{request_id}', CGI.escape(request_id.to_s))
|
|
117
|
+
|
|
118
|
+
# query parameters
|
|
119
|
+
query_params = opts[:query_params] || {}
|
|
120
|
+
|
|
121
|
+
# header parameters
|
|
122
|
+
header_params = opts[:header_params] || {}
|
|
123
|
+
# HTTP header 'Accept' (if needed)
|
|
124
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
125
|
+
|
|
126
|
+
# form parameters
|
|
127
|
+
form_params = opts[:form_params] || {}
|
|
128
|
+
|
|
129
|
+
# http body (model)
|
|
130
|
+
post_body = opts[:debug_body]
|
|
131
|
+
|
|
132
|
+
# return_type
|
|
133
|
+
return_type = opts[:debug_return_type] || 'SharedAmazonSesLimitRequestCancelResponse'
|
|
134
|
+
|
|
135
|
+
# auth_names
|
|
136
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
137
|
+
|
|
138
|
+
new_options = opts.merge(
|
|
139
|
+
:operation => :"SendingAccountsApi.management_cancel_shared_amazon_ses_limit_request",
|
|
140
|
+
:header_params => header_params,
|
|
141
|
+
:query_params => query_params,
|
|
142
|
+
:form_params => form_params,
|
|
143
|
+
:body => post_body,
|
|
144
|
+
:auth_names => auth_names,
|
|
145
|
+
:return_type => return_type
|
|
146
|
+
)
|
|
147
|
+
|
|
148
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
149
|
+
if @api_client.config.debugging
|
|
150
|
+
@api_client.config.logger.debug "API called: SendingAccountsApi#management_cancel_shared_amazon_ses_limit_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
151
|
+
end
|
|
152
|
+
return data, status_code, headers
|
|
153
|
+
end
|
|
154
|
+
|
|
92
155
|
# Create an SMTP sending account
|
|
93
156
|
# Creates a custom SMTP sending account. Supply an `Idempotency-Key` header to safely retry on network errors. The SMTP password is stored securely and is never returned.
|
|
94
157
|
# @param [Hash] opts the optional parameters
|
|
@@ -114,7 +114,7 @@ module Sendmux::Management::Generated
|
|
|
114
114
|
config.logger.debug "HTTP request body param ~BEGIN~\n#{req_body}\n~END~\n"
|
|
115
115
|
end
|
|
116
116
|
end
|
|
117
|
-
request.headers = header_params
|
|
117
|
+
request.headers = stringify_header_params(header_params)
|
|
118
118
|
request.body = req_body
|
|
119
119
|
|
|
120
120
|
# Overload default options only if provided
|
|
@@ -126,6 +126,12 @@ module Sendmux::Management::Generated
|
|
|
126
126
|
request
|
|
127
127
|
end
|
|
128
128
|
|
|
129
|
+
def stringify_header_params(header_params)
|
|
130
|
+
header_params.each_with_object({}) do |(key, value), result|
|
|
131
|
+
result[key] = value.nil? ? value : value.to_s
|
|
132
|
+
end
|
|
133
|
+
end
|
|
134
|
+
|
|
129
135
|
# Builds the HTTP request body
|
|
130
136
|
#
|
|
131
137
|
# @param [Hash] header_params Header parameters
|
|
@@ -18,7 +18,7 @@ module Sendmux::Management::Generated
|
|
|
18
18
|
# Free-form caption for the rule (≤255 chars). UI-only metadata — never consulted at match time. `null` when absent.
|
|
19
19
|
attr_accessor :note
|
|
20
20
|
|
|
21
|
-
# Email address or bare domain name. Validated against RFC 5321/1035 regexes.
|
|
21
|
+
# Email address or bare domain name. Validated against RFC 5321/1035 regexes. The `*@domain` wildcard spelling is accepted and normalised to the bare domain (matching is by exact address or sender domain).
|
|
22
22
|
attr_accessor :pattern
|
|
23
23
|
|
|
24
24
|
# Rule type
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Sendmux API
|
|
3
|
+
|
|
4
|
+
#Programmatic access to your Sendmux email infrastructure.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Sendmux::Management::Generated
|
|
17
|
+
class MailboxAvailabilityReason
|
|
18
|
+
AVAILABLE = "available".freeze
|
|
19
|
+
INVALID_EMAIL = "invalid_email".freeze
|
|
20
|
+
DOMAIN_NOT_AVAILABLE = "domain_not_available".freeze
|
|
21
|
+
TAKEN = "taken".freeze
|
|
22
|
+
RESERVED = "reserved".freeze
|
|
23
|
+
CLEANUP_PENDING = "cleanup_pending".freeze
|
|
24
|
+
UNKNOWN_DEFAULT_OPEN_API = "unknown_default_open_api".freeze
|
|
25
|
+
|
|
26
|
+
def self.all_vars
|
|
27
|
+
@all_vars ||= [AVAILABLE, INVALID_EMAIL, DOMAIN_NOT_AVAILABLE, TAKEN, RESERVED, CLEANUP_PENDING, UNKNOWN_DEFAULT_OPEN_API].freeze
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Builds the enum from string
|
|
31
|
+
# @param [String] The enum value in the form of the string
|
|
32
|
+
# @return [String] The enum value
|
|
33
|
+
def self.build_from_hash(value)
|
|
34
|
+
new.build_from_hash(value)
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Builds the enum from string
|
|
38
|
+
# @param [String] The enum value in the form of the string
|
|
39
|
+
# @return [String] The enum value
|
|
40
|
+
def build_from_hash(value)
|
|
41
|
+
return value if MailboxAvailabilityReason.all_vars.include?(value)
|
|
42
|
+
raise "Invalid ENUM value #{value} for class #MailboxAvailabilityReason"
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|