-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoas_server_gen.go
More file actions
455 lines (450 loc) · 26.6 KB
/
Copy pathoas_server_gen.go
File metadata and controls
455 lines (450 loc) · 26.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
// Code generated by ogen, DO NOT EDIT.
package management
import (
"context"
)
// Handler handles operations described by OpenAPI v3 specification.
type Handler interface {
// ManagementActivateProvider implements managementActivateProvider operation.
//
// Enables a sending account. OAuth accounts without an active connection are moved to pending until
// reconnected in the dashboard. The shared Amazon SES account can be activated.
//
// POST /providers/{public_id}/activate
ManagementActivateProvider(ctx context.Context, params ManagementActivateProviderParams) (ManagementActivateProviderRes, error)
// ManagementCancelSharedAmazonSesLimitRequest implements managementCancelSharedAmazonSesLimitRequest operation.
//
// Cancels a pending shared Amazon SES daily limit increase request for the caller's team. Approved
// or denied requests cannot be cancelled.
//
// DELETE /providers/shared-amazon-ses-limit-request/{request_id}
ManagementCancelSharedAmazonSesLimitRequest(ctx context.Context, params ManagementCancelSharedAmazonSesLimitRequestParams) (ManagementCancelSharedAmazonSesLimitRequestRes, error)
// ManagementCheckMailboxAvailability implements managementCheckMailboxAvailability operation.
//
// 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.
//
// GET /mailboxes/availability
ManagementCheckMailboxAvailability(ctx context.Context, params ManagementCheckMailboxAvailabilityParams) (ManagementCheckMailboxAvailabilityRes, error)
// ManagementCreateDomain implements managementCreateDomain operation.
//
// 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`.
//
// POST /domains
ManagementCreateDomain(ctx context.Context, req OptManagementCreateDomainReq, params ManagementCreateDomainParams) (ManagementCreateDomainRes, error)
// ManagementCreateMailbox implements managementCreateMailbox operation.
//
// 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`.
//
// POST /mailboxes
ManagementCreateMailbox(ctx context.Context, req OptManagementCreateMailboxReq, params ManagementCreateMailboxParams) (ManagementCreateMailboxRes, error)
// ManagementCreateMailboxKey implements managementCreateMailboxKey operation.
//
// Mints an additional bearer token plus IMAP/SMTP mailbox password for an existing mailbox. The
// plaintext key and password are shown exactly once — store them immediately.
// 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`.
//
// POST /mailboxes/{public_id}/keys
ManagementCreateMailboxKey(ctx context.Context, req OptManagementCreateMailboxKeyReq, params ManagementCreateMailboxKeyParams) (ManagementCreateMailboxKeyRes, error)
// ManagementCreateProvider implements managementCreateProvider operation.
//
// 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.
//
// POST /providers
ManagementCreateProvider(ctx context.Context, req OptProviderCreateBody, params ManagementCreateProviderParams) (ManagementCreateProviderRes, error)
// ManagementCreateSharedAmazonSesLimitRequest implements managementCreateSharedAmazonSesLimitRequest operation.
//
// Creates a review request for the shared Amazon SES daily sending limit. This does not modify the
// limit directly.
//
// POST /providers/shared-amazon-ses-limit-request
ManagementCreateSharedAmazonSesLimitRequest(ctx context.Context, params ManagementCreateSharedAmazonSesLimitRequestParams) (ManagementCreateSharedAmazonSesLimitRequestRes, error)
// ManagementCreateWebhook implements managementCreateWebhook operation.
//
// Creates a new webhook subscription and returns the signing secret ONCE in the response body. Store
// it securely — it cannot be retrieved later. Use `POST /webhooks/{id}/rotate-secret` to issue a
// new one.
// 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`.
//
// POST /webhooks
ManagementCreateWebhook(ctx context.Context, req OptWebhookCreateBody, params ManagementCreateWebhookParams) (ManagementCreateWebhookRes, error)
// ManagementDeactivateProvider implements managementDeactivateProvider operation.
//
// Disables a sending account. The shared Amazon SES account can be deactivated.
//
// POST /providers/{public_id}/deactivate
ManagementDeactivateProvider(ctx context.Context, params ManagementDeactivateProviderParams) (ManagementDeactivateProviderRes, error)
// ManagementDeleteDomain implements managementDeleteDomain operation.
//
// Removes a domain from our mail platform, Amazon SES, and Sendmux. Blocked if any active mailbox
// still uses the domain — delete those mailboxes first.
//
// DELETE /domains/{public_id}
ManagementDeleteDomain(ctx context.Context, params ManagementDeleteDomainParams) (ManagementDeleteDomainRes, error)
// ManagementDeleteMailbox implements managementDeleteMailbox operation.
//
// Removes a mailbox from our mail platform, Amazon SES (for `@myagent.mx` addresses), and Sendmux.
// All associated API keys are revoked.
//
// DELETE /mailboxes/{public_id}
ManagementDeleteMailbox(ctx context.Context, params ManagementDeleteMailboxParams) (ManagementDeleteMailboxRes, error)
// ManagementDeleteMailboxKey implements managementDeleteMailboxKey operation.
//
// Revokes a specific bearer token + matching mailbox password. Idempotent on already-revoked keys.
//
// DELETE /mailboxes/{public_id}/keys/{key_id}
ManagementDeleteMailboxKey(ctx context.Context, params ManagementDeleteMailboxKeyParams) (ManagementDeleteMailboxKeyRes, error)
// ManagementDeleteProvider implements managementDeleteProvider operation.
//
// Deletes a custom or connected sending account. The shared Amazon SES account cannot be deleted.
//
// DELETE /providers/{public_id}
ManagementDeleteProvider(ctx context.Context, params ManagementDeleteProviderParams) (ManagementDeleteProviderRes, error)
// ManagementDeleteWebhook implements managementDeleteWebhook operation.
//
// Permanently removes the subscription. In-flight retries are dropped.
//
// DELETE /webhooks/{public_id}
ManagementDeleteWebhook(ctx context.Context, params ManagementDeleteWebhookParams) (ManagementDeleteWebhookRes, error)
// ManagementGetDeliveryPayload implements managementGetDeliveryPayload operation.
//
// Returns the retained JSON request body for one delivery attempt. Payloads are retained for 7 days
// and may no longer be available after `payload_expires_at`.
//
// GET /webhooks/{public_id}/deliveries/{delivery_id}/payload
ManagementGetDeliveryPayload(ctx context.Context, params ManagementGetDeliveryPayloadParams) (ManagementGetDeliveryPayloadRes, error)
// ManagementGetDomain implements managementGetDomain operation.
//
// Returns a single domain including its DNS records and latest verification state. 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 resource has not changed.
//
// GET /domains/{public_id}
ManagementGetDomain(ctx context.Context, params ManagementGetDomainParams) (ManagementGetDomainRes, error)
// ManagementGetDomainFilters implements managementGetDomainFilters operation.
//
// 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.
//
// GET /domains/{public_id}/filters
ManagementGetDomainFilters(ctx context.Context, params ManagementGetDomainFiltersParams) (ManagementGetDomainFiltersRes, error)
// ManagementGetDomainZoneFile implements managementGetDomainZoneFile operation.
//
// Returns the domain's DNS records formatted as a BIND-style zone file fragment. Suitable for direct
// paste into a DNS provider that accepts zone-file imports.
//
// GET /domains/{public_id}/zone-file
ManagementGetDomainZoneFile(ctx context.Context, params ManagementGetDomainZoneFileParams) (ManagementGetDomainZoneFileRes, error)
// ManagementGetEmailLog implements managementGetEmailLog operation.
//
// Returns a single delivery log by its public ID. 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 log has not changed. Logs in a terminal status (sent/failed/rejected) stop changing,
// so 304 replay is a real bandwidth win on repeated polls.
//
// GET /emails/logs/{public_id}
ManagementGetEmailLog(ctx context.Context, params ManagementGetEmailLogParams) (ManagementGetEmailLogRes, error)
// ManagementGetEmailMetrics implements managementGetEmailMetrics operation.
//
// Returns aggregated email delivery counts with flexible time windowing and comparison period.
//
// GET /emails/metrics
ManagementGetEmailMetrics(ctx context.Context, params ManagementGetEmailMetricsParams) (ManagementGetEmailMetricsRes, error)
// ManagementGetInboxLog implements managementGetInboxLog operation.
//
// Returns one incoming message log by public ID.
//
// GET /inboxes/logs/{public_id}
ManagementGetInboxLog(ctx context.Context, params ManagementGetInboxLogParams) (ManagementGetInboxLogRes, error)
// ManagementGetMailbox implements managementGetMailbox operation.
//
// Returns a single mailbox, tenant-scoped to the caller's team. 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 resource has not changed. The same ETag is the value to use in
// `If-Match` on PATCH for optimistic concurrency.
//
// GET /mailboxes/{public_id}
ManagementGetMailbox(ctx context.Context, params ManagementGetMailboxParams) (ManagementGetMailboxRes, error)
// ManagementGetMailboxFilters implements managementGetMailboxFilters operation.
//
// Returns the current sender-filter mode and rule set for a mailbox. Mailbox-scoped rules override
// any domain-wide rules set on the parent domain.
// 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.
//
// GET /mailboxes/{public_id}/filters
ManagementGetMailboxFilters(ctx context.Context, params ManagementGetMailboxFiltersParams) (ManagementGetMailboxFiltersRes, error)
// ManagementGetProvider implements managementGetProvider operation.
//
// Returns one sending account. Responses include an ETag for conditional GET and optimistic PATCH.
//
// GET /providers/{public_id}
ManagementGetProvider(ctx context.Context, params ManagementGetProviderParams) (ManagementGetProviderRes, error)
// ManagementGetProviderLimits implements managementGetProviderLimits operation.
//
// Returns custom-account capacity and shared Amazon SES daily sending limit state.
//
// GET /providers/limits
ManagementGetProviderLimits(ctx context.Context) (*ProviderLimitsResponse, error)
// ManagementGetProviderStats implements managementGetProviderStats operation.
//
// Returns aggregate counts of configured sending accounts with breakdowns by type and status.
//
// GET /providers/stats
ManagementGetProviderStats(ctx context.Context) (ManagementGetProviderStatsRes, error)
// ManagementGetProviderUsage implements managementGetProviderUsage operation.
//
// Returns per-account delivery-log counts for today and the trailing 7-day window.
//
// GET /providers/usage
ManagementGetProviderUsage(ctx context.Context) (*ProviderUsageResponse, error)
// ManagementGetSharedAmazonSesLimitRequest implements managementGetSharedAmazonSesLimitRequest operation.
//
// Returns the shared Amazon SES daily limit state and any pending increase request.
//
// GET /providers/shared-amazon-ses-limit-request
ManagementGetSharedAmazonSesLimitRequest(ctx context.Context) (*SharedAmazonSesLimitRequestPageResponse, error)
// ManagementGetSpendSummary implements managementGetSpendSummary operation.
//
// Returns a spend summary over a configurable lookback period.
//
// GET /billing/summary
ManagementGetSpendSummary(ctx context.Context, params ManagementGetSpendSummaryParams) (ManagementGetSpendSummaryRes, error)
// ManagementGetWebhook implements managementGetWebhook operation.
//
// Returns a single webhook subscription. The signing secret is never included. 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 resource has not changed. The same ETag is the value
// to use in `If-Match` on PATCH for optimistic concurrency.
//
// GET /webhooks/{public_id}
ManagementGetWebhook(ctx context.Context, params ManagementGetWebhookParams) (ManagementGetWebhookRes, error)
// ManagementListBalance implements managementListBalance operation.
//
// Returns the current team balance and auto top-up configuration.
//
// GET /billing/balance
ManagementListBalance(ctx context.Context) (ManagementListBalanceRes, error)
// ManagementListDelivery implements managementListDelivery operation.
//
// Returns recent delivery attempts for one webhook subscription, ordered by `created_at` descending.
// Delivery metadata is retained for 7 days. Use the payload endpoint while `payload_available` is
// true to inspect the exact JSON request body that was delivered.
//
// GET /webhooks/{public_id}/deliveries
ManagementListDelivery(ctx context.Context, params ManagementListDeliveryParams) (ManagementListDeliveryRes, error)
// ManagementListDomains implements managementListDomains operation.
//
// Returns a cursor-paginated list of sending domains configured for the team, ordered by
// `created_at` descending. Each entry includes the DNS records the customer must place, the current
// verification status, and the SES DKIM state. Pass `cursor=<next_cursor>` from the previous
// response to fetch the next page.
//
// GET /domains
ManagementListDomains(ctx context.Context, params ManagementListDomainsParams) (ManagementListDomainsRes, error)
// ManagementListEmailLogs implements managementListEmailLogs operation.
//
// Returns paginated delivery logs with cursor-based pagination and filters.
//
// GET /emails/logs
ManagementListEmailLogs(ctx context.Context, params ManagementListEmailLogsParams) (ManagementListEmailLogsRes, error)
// ManagementListInboxLogs implements managementListInboxLogs operation.
//
// Returns paginated incoming message logs for billing accountability.
//
// GET /inboxes/logs
ManagementListInboxLogs(ctx context.Context, params ManagementListInboxLogsParams) (ManagementListInboxLogsRes, error)
// ManagementListMailboxes implements managementListMailboxes operation.
//
// Returns a cursor-paginated list of mailboxes configured for the team, ordered by `created_at`
// descending. Pass `cursor=<next_cursor>` from the previous response to fetch the next page.
//
// GET /mailboxes
ManagementListMailboxes(ctx context.Context, params ManagementListMailboxesParams) (ManagementListMailboxesRes, error)
// ManagementListProviders implements managementListProviders operation.
//
// Returns a cursor-paginated list of sending accounts. Credentials are never returned. The shared
// Amazon SES account is included and marked with `is_shared: true`.
//
// GET /providers
ManagementListProviders(ctx context.Context, params ManagementListProvidersParams) (ManagementListProvidersRes, error)
// ManagementListTransactions implements managementListTransactions operation.
//
// Returns paginated credit transaction history with optional type filter. Uses cursor-based
// pagination ordered by created_at descending — pass `cursor=<next_cursor>` from the previous
// response to fetch the next page.
//
// GET /billing/transactions
ManagementListTransactions(ctx context.Context, params ManagementListTransactionsParams) (ManagementListTransactionsRes, error)
// ManagementListWebhooks implements managementListWebhooks operation.
//
// Returns a cursor-paginated list of webhook subscriptions configured for the team, ordered by
// `created_at` descending. The signing secret is never included. Pass `cursor=<next_cursor>` from
// the previous response to fetch the next page.
//
// GET /webhooks
ManagementListWebhooks(ctx context.Context, params ManagementListWebhooksParams) (ManagementListWebhooksRes, error)
// ManagementRequestSendingAccountLimitIncrease implements managementRequestSendingAccountLimitIncrease operation.
//
// Creates a request to increase the number of custom or connected sending accounts allowed for the
// team.
//
// POST /providers/limits/sending-accounts/request-increase
ManagementRequestSendingAccountLimitIncrease(ctx context.Context, params ManagementRequestSendingAccountLimitIncreaseParams) (ManagementRequestSendingAccountLimitIncreaseRes, error)
// ManagementResumeMailbox implements managementResumeMailbox operation.
//
// Restores a suspended mailbox so it can authenticate, receive mail, and send from the mailbox
// address again. The operation is idempotent and accepts `Idempotency-Key` for safe retries.
//
// POST /mailboxes/{public_id}/resume
ManagementResumeMailbox(ctx context.Context, params ManagementResumeMailboxParams) (ManagementResumeMailboxRes, error)
// ManagementRotateWebhookSecret implements managementRotateWebhookSecret operation.
//
// Generates a fresh signing secret and returns it ONCE. The old secret is immediately invalidated
// — the next event delivery is signed with the new secret. Store the new value securely; it cannot
// be retrieved later.
// Supply an `Idempotency-Key` header to safely retry on network errors — replays under the same
// key return the original rotation response rather than minting a fresh secret. Replays against a
// different `public_id` under the same key return `409 idempotency_conflict`.
//
// POST /webhooks/{public_id}/rotate-secret
ManagementRotateWebhookSecret(ctx context.Context, params ManagementRotateWebhookSecretParams) (ManagementRotateWebhookSecretRes, error)
// ManagementSetDomainFilters implements managementSetDomainFilters operation.
//
// 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.
//
// PUT /domains/{public_id}/filters
ManagementSetDomainFilters(ctx context.Context, req OptSetFilterStateBody, params ManagementSetDomainFiltersParams) (ManagementSetDomainFiltersRes, error)
// ManagementSetMailboxFilters implements managementSetMailboxFilters operation.
//
// Atomically replaces the sender-filter mode and rule set for a mailbox. The entire rule set is
// swapped in a single operation — there is no intermediate state where the mailbox has a partial
// ruleset. A maximum of 1000 rules per request is enforced.
// 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.
//
// PUT /mailboxes/{public_id}/filters
ManagementSetMailboxFilters(ctx context.Context, req OptSetFilterStateBody, params ManagementSetMailboxFiltersParams) (ManagementSetMailboxFiltersRes, error)
// ManagementSuspendMailbox implements managementSuspendMailbox operation.
//
// Suspends a mailbox without deleting messages, credentials, or settings. Suspended mailboxes cannot
// receive mail, authenticate to mailbox protocols, or send from the mailbox address. The operation
// is idempotent and accepts `Idempotency-Key` for safe retries.
//
// POST /mailboxes/{public_id}/suspend
ManagementSuspendMailbox(ctx context.Context, params ManagementSuspendMailboxParams) (ManagementSuspendMailboxRes, error)
// ManagementTestProvider implements managementTestProvider operation.
//
// Runs a connection test for a custom SMTP account. The shared Amazon SES account and OAuth accounts
// cannot be tested through this endpoint.
//
// POST /providers/{public_id}/test
ManagementTestProvider(ctx context.Context, params ManagementTestProviderParams) (ManagementTestProviderRes, error)
// ManagementTestWebhook implements managementTestWebhook operation.
//
// Publishes a synthetic `sendmux.test` event to this webhook subscription. The subscription must
// include `"sendmux.test"` in `event_types`, and mailbox filters do not block the test delivery.
// Returns the generated `event_id` so you can correlate the `X-Sendmux-Event-Id` header on your
// endpoint.
// Supply an `Idempotency-Key` header to safely retry on network errors — replays under the same
// key return the original `event_id` rather than publishing a second test event.
//
// POST /webhooks/{public_id}/test
ManagementTestWebhook(ctx context.Context, params ManagementTestWebhookParams) (ManagementTestWebhookRes, error)
// ManagementUpdateDomain implements managementUpdateDomain operation.
//
// 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.
//
// PATCH /domains/{public_id}
ManagementUpdateDomain(ctx context.Context, req OptManagementUpdateDomainReq, params ManagementUpdateDomainParams) (ManagementUpdateDomainRes, error)
// ManagementUpdateMailbox implements managementUpdateMailbox operation.
//
// Updates any combination of display_name, quota_bytes, and send_scope on a mailbox. The
// display_name and send_scope changes land in a single transaction; quota_bytes is applied
// afterwards because it also updates external state on our mail platform. Quota can only be set to
// 1073741824 (1 GB), 5368709120 (5 GB), or 53687091200 (50 GB), and cannot be shrunk below the
// mailbox's current usage.
// 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.
//
// PATCH /mailboxes/{public_id}
ManagementUpdateMailbox(ctx context.Context, req OptUpdateMailboxBody, params ManagementUpdateMailboxParams) (ManagementUpdateMailboxRes, error)
// ManagementUpdateProvider implements managementUpdateProvider operation.
//
// Updates a custom sending account. The shared Amazon SES account cannot be edited here; use
// activate/deactivate and the limit-request endpoint for the allowed shared-account actions.
//
// PATCH /providers/{public_id}
ManagementUpdateProvider(ctx context.Context, req OptProviderUpdateBody, params ManagementUpdateProviderParams) (ManagementUpdateProviderRes, error)
// ManagementUpdateWebhook implements managementUpdateWebhook operation.
//
// Updates the URL, event types, or enabled flag. Any field omitted from the request body is left
// unchanged. The signing secret is unaffected — use `POST /webhooks/{id}/rotate-secret` to rotate
// it.
// 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.
//
// PATCH /webhooks/{public_id}
ManagementUpdateWebhook(ctx context.Context, req OptWebhookUpdateBody, params ManagementUpdateWebhookParams) (ManagementUpdateWebhookRes, error)
// ManagementVerifyDomain implements managementVerifyDomain operation.
//
// Checks the domain's published DNS records and latest Amazon SES DKIM and MAIL FROM statuses. If
// every required check passes, the domain is marked verified. A previously failed domain remains
// failed until a complete check succeeds. Domains automatically re-verify every 6 hours — this
// endpoint is only needed to trigger a check on demand.
//
// POST /domains/{public_id}/verify
ManagementVerifyDomain(ctx context.Context, params ManagementVerifyDomainParams) (ManagementVerifyDomainRes, error)
}
// Server implements http server based on OpenAPI v3 specification and
// calls Handler to handle requests.
type Server struct {
h Handler
sec SecurityHandler
baseServer
}
// NewServer creates new Server.
func NewServer(h Handler, sec SecurityHandler, opts ...ServerOption) (*Server, error) {
s, err := newServerConfig(opts...).baseServer()
if err != nil {
return nil, err
}
return &Server{
h: h,
sec: sec,
baseServer: s,
}, nil
}