@sendmux/management 0.0.0-bootstrap.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.
Files changed (53) hide show
  1. package/README.md +26 -0
  2. package/dist/generated/client/client.gen.d.ts +3 -0
  3. package/dist/generated/client/client.gen.d.ts.map +1 -0
  4. package/dist/generated/client/client.gen.js +216 -0
  5. package/dist/generated/client/index.d.ts +9 -0
  6. package/dist/generated/client/index.d.ts.map +1 -0
  7. package/dist/generated/client/index.js +6 -0
  8. package/dist/generated/client/types.gen.d.ts +121 -0
  9. package/dist/generated/client/types.gen.d.ts.map +1 -0
  10. package/dist/generated/client/types.gen.js +2 -0
  11. package/dist/generated/client/utils.gen.d.ts +38 -0
  12. package/dist/generated/client/utils.gen.d.ts.map +1 -0
  13. package/dist/generated/client/utils.gen.js +228 -0
  14. package/dist/generated/client.gen.d.ts +13 -0
  15. package/dist/generated/client.gen.d.ts.map +1 -0
  16. package/dist/generated/client.gen.js +3 -0
  17. package/dist/generated/core/auth.gen.d.ts +19 -0
  18. package/dist/generated/core/auth.gen.d.ts.map +1 -0
  19. package/dist/generated/core/auth.gen.js +14 -0
  20. package/dist/generated/core/bodySerializer.gen.d.ts +26 -0
  21. package/dist/generated/core/bodySerializer.gen.d.ts.map +1 -0
  22. package/dist/generated/core/bodySerializer.gen.js +57 -0
  23. package/dist/generated/core/params.gen.d.ts +44 -0
  24. package/dist/generated/core/params.gen.d.ts.map +1 -0
  25. package/dist/generated/core/params.gen.js +100 -0
  26. package/dist/generated/core/pathSerializer.gen.d.ts +34 -0
  27. package/dist/generated/core/pathSerializer.gen.d.ts.map +1 -0
  28. package/dist/generated/core/pathSerializer.gen.js +106 -0
  29. package/dist/generated/core/queryKeySerializer.gen.d.ts +19 -0
  30. package/dist/generated/core/queryKeySerializer.gen.d.ts.map +1 -0
  31. package/dist/generated/core/queryKeySerializer.gen.js +92 -0
  32. package/dist/generated/core/serverSentEvents.gen.d.ts +72 -0
  33. package/dist/generated/core/serverSentEvents.gen.d.ts.map +1 -0
  34. package/dist/generated/core/serverSentEvents.gen.js +132 -0
  35. package/dist/generated/core/types.gen.d.ts +79 -0
  36. package/dist/generated/core/types.gen.d.ts.map +1 -0
  37. package/dist/generated/core/types.gen.js +2 -0
  38. package/dist/generated/core/utils.gen.d.ts +20 -0
  39. package/dist/generated/core/utils.gen.d.ts.map +1 -0
  40. package/dist/generated/core/utils.gen.js +87 -0
  41. package/dist/generated/index.d.ts +3 -0
  42. package/dist/generated/index.d.ts.map +1 -0
  43. package/dist/generated/index.js +2 -0
  44. package/dist/generated/sdk.gen.d.ts +340 -0
  45. package/dist/generated/sdk.gen.d.ts.map +1 -0
  46. package/dist/generated/sdk.gen.js +566 -0
  47. package/dist/generated/types.gen.d.ts +2927 -0
  48. package/dist/generated/types.gen.d.ts.map +1 -0
  49. package/dist/generated/types.gen.js +2 -0
  50. package/dist/index.d.ts +7 -0
  51. package/dist/index.d.ts.map +1 -0
  52. package/dist/index.js +9 -0
  53. package/package.json +27 -0
@@ -0,0 +1,2927 @@
1
+ export type ClientOptions = {
2
+ baseUrl: 'https://app.sendmux.ai/api/v1' | (string & {});
3
+ };
4
+ export type WebhookUpdateBody = {
5
+ /**
6
+ * When toggled from false to true, also clears the `failing` flag — retry deliveries resume on the next matching event.
7
+ */
8
+ enabled?: boolean;
9
+ /**
10
+ * Replaces the full event-type list. At least one must be provided.
11
+ */
12
+ event_types?: Array<'message.delivered' | 'message.bounced' | 'message.complained' | 'message.rejected' | 'message.delivery_delayed' | 'message.received' | 'message.received.spam' | 'sendmux.test'>;
13
+ filters?: WebhookFilters & unknown;
14
+ /**
15
+ * Replace the human-friendly label. Send `null` to clear it; omit to leave unchanged.
16
+ */
17
+ name?: string | null;
18
+ /**
19
+ * New HTTPS endpoint. Must be https://.
20
+ */
21
+ url?: string;
22
+ };
23
+ /**
24
+ * Optional delivery scope. Empty mailbox_ids means all team mailboxes.
25
+ */
26
+ export type WebhookFilters = {
27
+ /**
28
+ * Mailbox public IDs to receive events for. Empty means all mailboxes in the team.
29
+ */
30
+ mailbox_ids: Array<string>;
31
+ };
32
+ export type WebhookTestResponse = {
33
+ /**
34
+ * The event_id attached to the X-Sendmux-Event-Id header of the test delivery.
35
+ */
36
+ event_id: string;
37
+ };
38
+ export type WebhookSubscriptionWithSecretResponse = SuccessEnvelope & {
39
+ data: WebhookSubscriptionWithSecret;
40
+ meta?: ResponseMeta;
41
+ };
42
+ export type ResponseMeta = {
43
+ request_id: string;
44
+ };
45
+ export type WebhookSubscription = {
46
+ /**
47
+ * ISO 8601 creation timestamp
48
+ */
49
+ created_at: string;
50
+ /**
51
+ * When false, no events are delivered to this subscription.
52
+ */
53
+ enabled: boolean;
54
+ /**
55
+ * Event types this subscription receives.
56
+ */
57
+ event_types: Array<'message.delivered' | 'message.bounced' | 'message.complained' | 'message.rejected' | 'message.delivery_delayed' | 'message.received' | 'message.received.spam' | 'sendmux.test'>;
58
+ /**
59
+ * True when the 24-hour retry window has been exhausted for this subscription. Reset by updating the subscription (e.g. fixing the URL) and re-enabling.
60
+ */
61
+ failing: boolean;
62
+ filters: WebhookFilters;
63
+ /**
64
+ * Webhook public ID
65
+ */
66
+ id: string;
67
+ /**
68
+ * Optional human-friendly label used in dashboard list/detail pages. May be `null` for subscriptions created without a name.
69
+ */
70
+ name: string | null;
71
+ /**
72
+ * ISO 8601 last-modified timestamp
73
+ */
74
+ updated_at: string;
75
+ /**
76
+ * HTTPS endpoint that receives signed event POSTs.
77
+ */
78
+ url: string;
79
+ };
80
+ export type WebhookSubscriptionWithSecret = WebhookSubscription & {
81
+ /**
82
+ * Signing secret used to verify the HMAC-SHA256 signature on every event POST. This is the ONLY response containing the raw secret — store it securely; it cannot be retrieved later. Use POST /webhooks/{id}/rotate-secret to issue a new one.
83
+ */
84
+ secret: string;
85
+ };
86
+ export type SuccessEnvelope = {
87
+ meta: {
88
+ [key: string]: unknown;
89
+ };
90
+ ok: true;
91
+ };
92
+ export type WebhookSubscriptionResponse = SuccessEnvelope & {
93
+ data: WebhookSubscription;
94
+ meta?: ResponseMeta;
95
+ };
96
+ export type WebhookSubscriptionCursorListResponse = SuccessEnvelope & {
97
+ data: Array<WebhookSubscription>;
98
+ meta?: ResponseMeta;
99
+ pagination: CursorPagination;
100
+ };
101
+ export type CursorPagination = {
102
+ has_more: boolean;
103
+ next_cursor?: string;
104
+ };
105
+ /**
106
+ * The JSON request body delivered to the webhook endpoint.
107
+ */
108
+ export type WebhookEventPayload = {
109
+ data: WebhookEventData;
110
+ /**
111
+ * Stable per-event identifier. Also sent in the X-Sendmux-Event-Id header.
112
+ */
113
+ id: string;
114
+ /**
115
+ * When the event occurred.
116
+ */
117
+ occurred_at: string;
118
+ /**
119
+ * Team that owns the event.
120
+ */
121
+ team_public_id: string;
122
+ /**
123
+ * Dotted event type. Same value as the X-Sendmux-Event-Type header.
124
+ */
125
+ type: 'message.delivered' | 'message.bounced' | 'message.complained' | 'message.rejected' | 'message.delivery_delayed' | 'message.received' | 'message.received.spam' | 'sendmux.test';
126
+ };
127
+ export type WebhookEventData = {
128
+ /**
129
+ * More specific bounce category when available.
130
+ */
131
+ bounce_subtype: string | null;
132
+ /**
133
+ * Bounce category for `message.bounced` events.
134
+ */
135
+ bounce_type: 'Permanent' | 'Transient' | 'Undetermined';
136
+ /**
137
+ * More specific complaint category when available.
138
+ */
139
+ complaint_subtype: string | null;
140
+ /**
141
+ * Complaint category for `message.complained` events.
142
+ */
143
+ complaint_type: string | null;
144
+ /**
145
+ * When delivery retries are expected to stop, when provided.
146
+ */
147
+ delay_expires_at: string | null;
148
+ /**
149
+ * Delay category for `message.delivery_delayed` events.
150
+ */
151
+ delay_type: string | null;
152
+ /**
153
+ * Only populated for inbound mailbox events.
154
+ */
155
+ is_spam: boolean | null;
156
+ /**
157
+ * Mailbox public ID for inbound mailbox events when resolved.
158
+ */
159
+ mailbox_id: string | null;
160
+ /**
161
+ * Message identifier from the event source.
162
+ */
163
+ message_id: string | null;
164
+ /**
165
+ * `provider` for sending feedback IDs; `rfc5322` for inbound email Message-ID header values.
166
+ */
167
+ message_id_kind: 'provider' | 'rfc5322';
168
+ /**
169
+ * All affected recipients. Empty for synthetic test events.
170
+ */
171
+ recipients: Array<string>;
172
+ /**
173
+ * Reject reason for `message.rejected` events.
174
+ */
175
+ reject_reason: string | null;
176
+ /**
177
+ * Sender/envelope-from address when available.
178
+ */
179
+ sender: string | null;
180
+ /**
181
+ * Sendmux message correlation ID for outbound sending feedback when available.
182
+ */
183
+ sendmux_message_id: string | null;
184
+ /**
185
+ * Target webhook ID for synthetic `sendmux.test` payloads.
186
+ */
187
+ webhook_id: string | null;
188
+ };
189
+ export type WebhookDeliveryPayloadResponse = SuccessEnvelope & {
190
+ data: WebhookDeliveryPayload;
191
+ meta?: ResponseMeta;
192
+ };
193
+ export type WebhookDeliveryPayload = {
194
+ /**
195
+ * ISO 8601 attempt timestamp
196
+ */
197
+ created_at: string;
198
+ /**
199
+ * 1-based retry attempt number.
200
+ */
201
+ delivery_attempt: number;
202
+ /**
203
+ * Webhook event ID
204
+ */
205
+ event_id: string;
206
+ /**
207
+ * Event types a webhook may subscribe to. `sendmux.test` is accepted so you can verify end-to-end delivery via POST /webhooks/{id}/test.
208
+ */
209
+ event_type: 'message.delivered' | 'message.bounced' | 'message.complained' | 'message.rejected' | 'message.delivery_delayed' | 'message.received' | 'message.received.spam' | 'sendmux.test';
210
+ /**
211
+ * Timestamp when this retained payload expires.
212
+ */
213
+ expires_at: string;
214
+ /**
215
+ * Delivery-attempt public ID
216
+ */
217
+ id: string;
218
+ payload: WebhookEventPayload;
219
+ };
220
+ export type WebhookDeliveryAttemptCursorListResponse = SuccessEnvelope & {
221
+ data: Array<WebhookDeliveryAttempt>;
222
+ meta?: ResponseMeta;
223
+ pagination: CursorPagination;
224
+ };
225
+ export type WebhookDeliveryAttempt = {
226
+ /**
227
+ * ISO 8601 attempt timestamp
228
+ */
229
+ created_at: string;
230
+ /**
231
+ * 1-based retry attempt number.
232
+ */
233
+ delivery_attempt: number;
234
+ /**
235
+ * Public-safe network error category when no HTTP response was received.
236
+ */
237
+ error_message: string | null;
238
+ /**
239
+ * Webhook event ID
240
+ */
241
+ event_id: string;
242
+ /**
243
+ * Event types a webhook may subscribe to. `sendmux.test` is accepted so you can verify end-to-end delivery via POST /webhooks/{id}/test.
244
+ */
245
+ event_type: 'message.delivered' | 'message.bounced' | 'message.complained' | 'message.rejected' | 'message.delivery_delayed' | 'message.received' | 'message.received.spam' | 'sendmux.test';
246
+ /**
247
+ * Delivery-attempt public ID
248
+ */
249
+ id: string;
250
+ /**
251
+ * Maximum attempts before the subscription is marked failing.
252
+ */
253
+ max_attempts: number;
254
+ /**
255
+ * Next retry timestamp when result is retrying; otherwise null.
256
+ */
257
+ next_retry_at: string | null;
258
+ /**
259
+ * True while the delivered request payload can still be fetched.
260
+ */
261
+ payload_available: boolean;
262
+ /**
263
+ * Timestamp when the retained request payload expires.
264
+ */
265
+ payload_expires_at: string;
266
+ /**
267
+ * Size of the delivered request payload in bytes.
268
+ */
269
+ request_payload_bytes: number;
270
+ /**
271
+ * SHA-256 digest of the delivered request payload.
272
+ */
273
+ request_payload_sha256: string | null;
274
+ /**
275
+ * Truncated endpoint response preview, if any.
276
+ */
277
+ response_body: string | null;
278
+ /**
279
+ * End-to-end delivery latency in milliseconds.
280
+ */
281
+ response_ms: number;
282
+ /**
283
+ * HTTP status returned by the endpoint, or null for network/timeout failures.
284
+ */
285
+ response_status: number | null;
286
+ /**
287
+ * Delivery result for this attempt.
288
+ */
289
+ result: 'success' | 'retrying' | 'failed' | 'permanent_failure';
290
+ };
291
+ export type WebhookDeletedResponse = SuccessEnvelope & {
292
+ data: {
293
+ deleted: true;
294
+ id: string;
295
+ };
296
+ meta?: ResponseMeta;
297
+ };
298
+ export type WebhookCreateBody = {
299
+ /**
300
+ * Defaults to true.
301
+ */
302
+ enabled?: boolean;
303
+ /**
304
+ * At least one event type must be provided.
305
+ */
306
+ event_types: Array<'message.delivered' | 'message.bounced' | 'message.complained' | 'message.rejected' | 'message.delivery_delayed' | 'message.received' | 'message.received.spam' | 'sendmux.test'>;
307
+ filters?: WebhookFilters & unknown;
308
+ /**
309
+ * Optional human-friendly label (max 255 chars). Surfaced in dashboard list/detail views.
310
+ */
311
+ name?: string;
312
+ /**
313
+ * HTTPS endpoint that will receive event POSTs. Must be https:// — plain HTTP is rejected.
314
+ */
315
+ url: string;
316
+ };
317
+ export type UpdateMailboxBody = {
318
+ display_name?: string | null;
319
+ /**
320
+ * Storage quota in bytes. Allowed values: 1073741824 (1 GB), 5368709120 (5 GB), 53687091200 (50 GB).
321
+ */
322
+ quota_bytes?: number;
323
+ send_scope?: {
324
+ group_public_ids?: Array<string>;
325
+ provider_public_ids?: Array<string>;
326
+ type: 'all' | 'providers' | 'group';
327
+ };
328
+ };
329
+ export type TransactionCursorListResponse = SuccessEnvelope & {
330
+ data: Array<Transaction>;
331
+ meta?: ResponseMeta;
332
+ pagination: CursorPagination;
333
+ };
334
+ export type Transaction = {
335
+ /**
336
+ * DECIMAL(19,6) amount
337
+ */
338
+ amount: string;
339
+ balance_after: string | null;
340
+ balance_before: string | null;
341
+ /**
342
+ * ISO 8601 timestamp
343
+ */
344
+ created_at: string;
345
+ description: string;
346
+ /**
347
+ * Transaction public ID
348
+ */
349
+ id: string;
350
+ /**
351
+ * Item count (for USAGE transactions)
352
+ */
353
+ quantity: number | null;
354
+ type: 'PURCHASE' | 'USAGE' | 'AUTO_TOPUP' | 'REFUND' | 'ADJUSTMENT';
355
+ };
356
+ export type SpendSummaryResponse = SuccessEnvelope & {
357
+ data: SpendSummary;
358
+ meta?: ResponseMeta;
359
+ };
360
+ export type SpendSummary = {
361
+ currency: 'USD';
362
+ period_days: number;
363
+ total_consumed: string;
364
+ total_purchased: string;
365
+ transaction_count: number;
366
+ };
367
+ export type SharedAmazonSesLimitRequestPageResponse = SuccessEnvelope & {
368
+ data: SharedAmazonSesLimitRequestPage;
369
+ meta?: ResponseMeta;
370
+ };
371
+ export type SharedAmazonSesLimitRequest = {
372
+ approved_daily_limit: number | null;
373
+ created_at: string;
374
+ current_daily_limit: number;
375
+ current_daily_sent: number;
376
+ decided_at: string | null;
377
+ decision_note: string | null;
378
+ id: string;
379
+ status: 'pending' | 'approved' | 'denied';
380
+ } | null;
381
+ export type SharedAmazonSesLimit = {
382
+ can_request_increase: boolean;
383
+ daily_limit: number | null;
384
+ is_near_limit: boolean;
385
+ pending_request_id: string | null;
386
+ provider_id: string | null;
387
+ sent_today: number;
388
+ threshold_usage: number | null;
389
+ usage_ratio: number | null;
390
+ };
391
+ export type SharedAmazonSesLimitRequestPage = {
392
+ limit: SharedAmazonSesLimit;
393
+ pending_request: SharedAmazonSesLimitRequest;
394
+ };
395
+ export type SharedAmazonSesLimitRequestCreateResponse = SuccessEnvelope & {
396
+ data: SharedAmazonSesLimitRequestCreate;
397
+ meta?: ResponseMeta;
398
+ };
399
+ export type SharedAmazonSesLimitRequestCreate = {
400
+ limit: SharedAmazonSesLimit;
401
+ request: SharedAmazonSesLimitRequest & {
402
+ [key: string]: unknown;
403
+ };
404
+ };
405
+ export type SetFilterStateBody = {
406
+ mode: 'off' | 'allowlist' | 'denylist';
407
+ /**
408
+ * Replacement rule set. Maximum 1000 rules per request. An empty array is valid (no rules).
409
+ */
410
+ rules: Array<FilterRule>;
411
+ };
412
+ export type FilterRule = {
413
+ /**
414
+ * Free-form caption for the rule (≤255 chars). UI-only metadata — never consulted at match time. `null` when absent.
415
+ */
416
+ note?: string | null;
417
+ /**
418
+ * Email address or bare domain name. Validated against RFC 5321/1035 regexes.
419
+ */
420
+ pattern: string;
421
+ /**
422
+ * Rule type
423
+ */
424
+ type: 'allow' | 'deny';
425
+ };
426
+ export type SendingAccountLimitRequestResponse = SuccessEnvelope & {
427
+ data: SendingAccountLimitRequest;
428
+ meta?: ResponseMeta;
429
+ };
430
+ export type ResourceLimitSnapshot = {
431
+ can_request_increase: boolean;
432
+ is_at_limit: boolean;
433
+ is_near_limit: boolean;
434
+ max_allowed: number;
435
+ pending_request_id: string | null;
436
+ reserved: number;
437
+ resource_type: string;
438
+ threshold_usage: number;
439
+ usage: number;
440
+ usage_ratio: number;
441
+ };
442
+ export type SendingAccountLimitRequest = {
443
+ limit: ResourceLimitSnapshot;
444
+ request_id: string;
445
+ };
446
+ export type ProviderUsageResponse = SuccessEnvelope & {
447
+ data: ProviderUsage;
448
+ meta?: ResponseMeta;
449
+ };
450
+ export type ProviderUsageItem = {
451
+ failed_7d: number;
452
+ pending_7d: number;
453
+ provider_id: string;
454
+ rejected_7d: number;
455
+ sent_7d: number;
456
+ sent_today: number;
457
+ total_7d: number;
458
+ };
459
+ export type ProviderUsage = {
460
+ providers: Array<ProviderUsageItem>;
461
+ window_days: 7;
462
+ };
463
+ export type ProviderUpdateBody = {
464
+ from_email?: string | null;
465
+ from_name?: string | null;
466
+ name?: string;
467
+ percentage?: number;
468
+ quotas?: {
469
+ /**
470
+ * Quota value. Use a number for a fixed cap, a min/max range, or null to clear on PATCH.
471
+ */
472
+ per_day?: number | (ProviderQuotaRange & {
473
+ [key: string]: unknown;
474
+ }) | null;
475
+ /**
476
+ * Quota value. Use a number for a fixed cap, a min/max range, or null to clear on PATCH.
477
+ */
478
+ per_hour?: number | (ProviderQuotaRange & {
479
+ [key: string]: unknown;
480
+ }) | null;
481
+ /**
482
+ * Quota value. Use a number for a fixed cap, a min/max range, or null to clear on PATCH.
483
+ */
484
+ per_minute?: number | (ProviderQuotaRange & {
485
+ [key: string]: unknown;
486
+ }) | null;
487
+ /**
488
+ * Quota value. Use a number for a fixed cap, a min/max range, or null to clear on PATCH.
489
+ */
490
+ per_second?: number | (ProviderQuotaRange & {
491
+ [key: string]: unknown;
492
+ }) | null;
493
+ };
494
+ reply_to_email?: string | null;
495
+ reply_to_name?: string | null;
496
+ smtp_host?: string;
497
+ smtp_password?: string;
498
+ smtp_port?: number;
499
+ smtp_protocol?: 'tls' | 'ssl' | 'none' | 'starttls';
500
+ smtp_username?: string;
501
+ tracking_domain?: string | null;
502
+ };
503
+ export type ProviderQuotaRange = {
504
+ max: number;
505
+ min: number;
506
+ } | null;
507
+ export type ProviderTypeCounts = {
508
+ /**
509
+ * Number of shared Amazon SES accounts
510
+ */
511
+ amazon_ses: number;
512
+ /**
513
+ * Number of Gmail API accounts
514
+ */
515
+ gmail_api: number;
516
+ /**
517
+ * Number of Outlook API accounts
518
+ */
519
+ outlook_api: number;
520
+ /**
521
+ * Number of SMTP accounts
522
+ */
523
+ smtp: number;
524
+ };
525
+ export type ProviderTestResultResponse = SuccessEnvelope & {
526
+ data: ProviderTestResult;
527
+ meta?: ResponseMeta;
528
+ };
529
+ export type ProviderTestResult = {
530
+ latency_ms: number;
531
+ message: string;
532
+ success: boolean;
533
+ tested_at: string;
534
+ };
535
+ export type ProviderStatusCounts = {
536
+ active: number;
537
+ error: number;
538
+ inactive: number;
539
+ pending: number;
540
+ };
541
+ export type ProviderStatsResponse = SuccessEnvelope & {
542
+ data: ProviderStats;
543
+ meta?: ResponseMeta;
544
+ };
545
+ export type ProviderStats = {
546
+ /**
547
+ * Accounts with status 'active'
548
+ */
549
+ active: number;
550
+ by_status: ProviderStatusCounts;
551
+ by_type: ProviderTypeCounts;
552
+ /**
553
+ * Accounts with status 'error'
554
+ */
555
+ error: number;
556
+ /**
557
+ * Accounts with status 'inactive'
558
+ */
559
+ inactive: number;
560
+ /**
561
+ * Accounts with status 'pending'
562
+ */
563
+ pending: number;
564
+ /**
565
+ * Total number of sending accounts
566
+ */
567
+ total: number;
568
+ };
569
+ export type ProviderQuotas = {
570
+ per_day: ProviderQuotaRange;
571
+ per_hour: ProviderQuotaRange;
572
+ per_minute: ProviderQuotaRange;
573
+ per_second: ProviderQuotaRange;
574
+ };
575
+ export type ProviderLimitsResponse = SuccessEnvelope & {
576
+ data: ProviderLimits;
577
+ meta?: ResponseMeta;
578
+ };
579
+ export type ProviderLimits = {
580
+ sending_accounts: ResourceLimitSnapshot;
581
+ shared_amazon_ses: SharedAmazonSesLimit;
582
+ };
583
+ export type ProviderItemResponse = SuccessEnvelope & {
584
+ data: ProviderItem;
585
+ meta?: ResponseMeta;
586
+ };
587
+ export type ProviderAllowedActions = {
588
+ activate: boolean;
589
+ deactivate: boolean;
590
+ delete: boolean;
591
+ test: boolean;
592
+ update: boolean;
593
+ };
594
+ export type ProviderItem = {
595
+ allowed_actions: ProviderAllowedActions;
596
+ /**
597
+ * ISO 8601 creation timestamp
598
+ */
599
+ created_at: string;
600
+ /**
601
+ * Default From email address.
602
+ */
603
+ from_email: string | null;
604
+ /**
605
+ * Default From display name.
606
+ */
607
+ from_name: string | null;
608
+ /**
609
+ * Whether an OAuth account has an active connection token.
610
+ */
611
+ has_refresh_token: boolean;
612
+ /**
613
+ * Whether a custom SMTP password is stored.
614
+ */
615
+ has_smtp_password: boolean;
616
+ /**
617
+ * Sending account public ID
618
+ */
619
+ id: string;
620
+ /**
621
+ * Whether this account is enabled for sending.
622
+ */
623
+ is_active: boolean;
624
+ /**
625
+ * False when the account is platform-managed.
626
+ */
627
+ is_editable: boolean;
628
+ /**
629
+ * True for the team's shared Amazon SES account.
630
+ */
631
+ is_shared: boolean;
632
+ /**
633
+ * Last connection test timestamp.
634
+ */
635
+ last_tested_at: string | null;
636
+ /**
637
+ * Last send timestamp.
638
+ */
639
+ last_used_at: string | null;
640
+ /**
641
+ * Display name
642
+ */
643
+ name: string;
644
+ /**
645
+ * Connected account email for OAuth accounts.
646
+ */
647
+ oauth_email: string | null;
648
+ /**
649
+ * Routing weight percentage.
650
+ */
651
+ percentage: number | null;
652
+ quotas: ProviderQuotas;
653
+ /**
654
+ * Default Reply-To email address.
655
+ */
656
+ reply_to_email: string | null;
657
+ /**
658
+ * Default Reply-To display name.
659
+ */
660
+ reply_to_name: string | null;
661
+ /**
662
+ * SMTP host for custom SMTP accounts.
663
+ */
664
+ smtp_host: string | null;
665
+ /**
666
+ * SMTP port for custom SMTP accounts.
667
+ */
668
+ smtp_port: number | null;
669
+ /**
670
+ * SMTP security mode.
671
+ */
672
+ smtp_protocol: string | null;
673
+ /**
674
+ * SMTP username for custom SMTP accounts.
675
+ */
676
+ smtp_username: string | null;
677
+ /**
678
+ * Current sending account status.
679
+ */
680
+ status: 'active' | 'inactive' | 'error' | 'pending';
681
+ /**
682
+ * Public-safe reason for the current status.
683
+ */
684
+ status_reason: string | null;
685
+ /**
686
+ * Custom tracking hostname.
687
+ */
688
+ tracking_domain: string | null;
689
+ /**
690
+ * Sending account type. `amazon_ses` is the shared managed account.
691
+ */
692
+ type: 'smtp' | 'gmail_api' | 'outlook_api' | 'amazon_ses';
693
+ /**
694
+ * ISO 8601 last update timestamp
695
+ */
696
+ updated_at: string;
697
+ };
698
+ export type ProviderItemCursorListResponse = SuccessEnvelope & {
699
+ data: Array<ProviderItem>;
700
+ meta?: ResponseMeta;
701
+ pagination: CursorPagination;
702
+ };
703
+ export type ProviderDeletedResponse = SuccessEnvelope & {
704
+ data: ProviderDeleted;
705
+ meta?: ResponseMeta;
706
+ };
707
+ export type ProviderDeleted = {
708
+ deleted: true;
709
+ id: string;
710
+ };
711
+ export type ProviderCreateBody = {
712
+ from_email?: string | null;
713
+ from_name?: string | null;
714
+ name: string;
715
+ percentage?: number;
716
+ quotas?: {
717
+ /**
718
+ * Quota value. Use a number for a fixed cap, a min/max range, or null to clear on PATCH.
719
+ */
720
+ per_day?: number | (ProviderQuotaRange & {
721
+ [key: string]: unknown;
722
+ }) | null;
723
+ /**
724
+ * Quota value. Use a number for a fixed cap, a min/max range, or null to clear on PATCH.
725
+ */
726
+ per_hour?: number | (ProviderQuotaRange & {
727
+ [key: string]: unknown;
728
+ }) | null;
729
+ /**
730
+ * Quota value. Use a number for a fixed cap, a min/max range, or null to clear on PATCH.
731
+ */
732
+ per_minute?: number | (ProviderQuotaRange & {
733
+ [key: string]: unknown;
734
+ }) | null;
735
+ /**
736
+ * Quota value. Use a number for a fixed cap, a min/max range, or null to clear on PATCH.
737
+ */
738
+ per_second?: number | (ProviderQuotaRange & {
739
+ [key: string]: unknown;
740
+ }) | null;
741
+ };
742
+ reply_to_email?: string | null;
743
+ reply_to_name?: string | null;
744
+ smtp_host: string;
745
+ smtp_password: string;
746
+ smtp_port: number;
747
+ smtp_protocol: 'tls' | 'ssl' | 'none' | 'starttls';
748
+ smtp_username: string;
749
+ tracking_domain?: string | null;
750
+ };
751
+ export type MailboxSendScope = {
752
+ /**
753
+ * Delivery group public IDs (only when type=group)
754
+ */
755
+ group_public_ids?: Array<string>;
756
+ /**
757
+ * Provider public IDs (only when type=providers)
758
+ */
759
+ provider_public_ids?: Array<string>;
760
+ /**
761
+ * Outbound routing strategy. `all` lets the mailbox use any team-configured provider; `providers` restricts to the listed provider IDs; `group` routes via a delivery group.
762
+ */
763
+ type: 'all' | 'providers' | 'group';
764
+ } | null;
765
+ export type Mailbox = {
766
+ /**
767
+ * ISO 8601 creation timestamp
768
+ */
769
+ created_at: string;
770
+ /**
771
+ * Optional display name shown in outbound From headers
772
+ */
773
+ display_name: string | null;
774
+ /**
775
+ * Mailbox email address (lowercase)
776
+ */
777
+ email: string;
778
+ /**
779
+ * Public ID
780
+ */
781
+ id: string;
782
+ /**
783
+ * Storage quota in bytes. Current writable tiers are 1 GB, 5 GB, and 50 GB.
784
+ */
785
+ quota_bytes: number | null;
786
+ send_scope: MailboxSendScope;
787
+ /**
788
+ * active | suspended | deleted
789
+ */
790
+ status: string;
791
+ };
792
+ export type MailboxKeyDeletedResponse = SuccessEnvelope & {
793
+ data: {
794
+ deleted: true;
795
+ id: string;
796
+ };
797
+ meta?: ResponseMeta;
798
+ };
799
+ export type MailboxItemResponse = SuccessEnvelope & {
800
+ data: Mailbox;
801
+ meta?: ResponseMeta;
802
+ };
803
+ export type MailboxItemCursorListResponse = SuccessEnvelope & {
804
+ data: Array<Mailbox>;
805
+ meta?: ResponseMeta;
806
+ pagination: CursorPagination;
807
+ };
808
+ export type MailboxDomainVerifyResult = {
809
+ checks: MailboxDomainVerifyChecks;
810
+ /**
811
+ * Latest SES DKIM status from AWS
812
+ */
813
+ ses_dkim_status: string;
814
+ /**
815
+ * Post-check verification status
816
+ */
817
+ status: 'verified' | 'pending';
818
+ };
819
+ export type MailboxDomainVerifyChecks = {
820
+ /**
821
+ * DMARC TXT record matches expected value
822
+ */
823
+ dmarc: boolean;
824
+ /**
825
+ * MX record present with priority 10 pointing at mail.sendmux.ai
826
+ */
827
+ mx: boolean;
828
+ /**
829
+ * SPF TXT record matches expected value
830
+ */
831
+ spf: boolean;
832
+ /**
833
+ * Ownership TXT record present with correct value
834
+ */
835
+ verification_txt: boolean;
836
+ };
837
+ /**
838
+ * SPF TXT record covering both SES and Sendmux includes
839
+ */
840
+ export type MailboxDomainNameValueRecord = {
841
+ name: string;
842
+ value: string;
843
+ };
844
+ export type MailboxDomainMxRecord = {
845
+ priority: number;
846
+ target: string;
847
+ };
848
+ export type MailboxDomainDnsRecords = {
849
+ /**
850
+ * Three SES DKIM CNAME records
851
+ */
852
+ dkim: Array<MailboxDomainNameValueRecord>;
853
+ dmarc: MailboxDomainNameValueRecord & unknown;
854
+ /**
855
+ * MX records the customer must place. All point at Sendmux's inbound mail servers.
856
+ */
857
+ mx: Array<MailboxDomainMxRecord>;
858
+ spf: MailboxDomainNameValueRecord;
859
+ verification: MailboxDomainNameValueRecord & unknown;
860
+ };
861
+ export type MailboxDomain = {
862
+ /**
863
+ * ISO 8601 creation timestamp
864
+ */
865
+ created_at: string;
866
+ dns_records: MailboxDomainDnsRecords;
867
+ /**
868
+ * Fully qualified domain name
869
+ */
870
+ domain: string;
871
+ /**
872
+ * Public ID
873
+ */
874
+ id: string;
875
+ /**
876
+ * Active mailboxes currently using this domain
877
+ */
878
+ mailbox_count: number;
879
+ /**
880
+ * SES DKIM status (pending/success/failed/temporary_failure/not_started)
881
+ */
882
+ ses_dkim_status: string | null;
883
+ /**
884
+ * Current verification state
885
+ */
886
+ verification_status: 'pending' | 'verified' | 'failed';
887
+ /**
888
+ * ISO 8601 timestamp of last successful verification
889
+ */
890
+ verified_at: string | null;
891
+ };
892
+ export type MailboxDeletedResponse = SuccessEnvelope & {
893
+ data: {
894
+ deleted: true;
895
+ id: string;
896
+ };
897
+ meta?: ResponseMeta;
898
+ };
899
+ /**
900
+ * Initial credential for the mailbox. `null` if credential generation failed — call POST /mailboxes/{id}/keys to retry.
901
+ */
902
+ export type MailboxCredential = {
903
+ /**
904
+ * IMAP retrieval port
905
+ */
906
+ imap_port: number;
907
+ key_prefix: string;
908
+ key_suffix: string;
909
+ /**
910
+ * Credential public ID
911
+ */
912
+ public_id: string;
913
+ /**
914
+ * Mailbox credential — shown exactly once. Use as a Bearer token on the HTTP API and as the password for IMAP retrieval and SMTP submission.
915
+ */
916
+ secret: string;
917
+ /**
918
+ * Mailbox server name
919
+ */
920
+ server: string;
921
+ /**
922
+ * SMTP submission port
923
+ */
924
+ smtp_port: number;
925
+ /**
926
+ * Mailbox email address used as the login
927
+ */
928
+ username: string;
929
+ } | null;
930
+ export type MailboxCreateResultResponse = SuccessEnvelope & {
931
+ data: MailboxCreateResult;
932
+ meta?: ResponseMeta;
933
+ };
934
+ export type MailboxCreateResult = {
935
+ credential: MailboxCredential;
936
+ mailbox: Mailbox;
937
+ /**
938
+ * Optional warning string when the mailbox was created without an initial credential
939
+ */
940
+ warning: string | null;
941
+ };
942
+ export type MailboxAppPasswordResultResponse = SuccessEnvelope & {
943
+ data: MailboxAppPasswordResult;
944
+ meta?: ResponseMeta;
945
+ };
946
+ export type MailboxAppPasswordResult = {
947
+ credential: MailboxCredential & {
948
+ [key: string]: unknown;
949
+ };
950
+ };
951
+ export type IncomingLogItemResponse = SuccessEnvelope & {
952
+ data: IncomingLogItem;
953
+ meta?: ResponseMeta;
954
+ };
955
+ export type IncomingLogItem = {
956
+ /**
957
+ * Billable amount for this message in USD
958
+ */
959
+ amount: string;
960
+ /**
961
+ * ISO 8601 usage bucket start
962
+ */
963
+ billing_bucket_start: string;
964
+ event_type: 'message.received' | 'message.received.spam';
965
+ from_email: string | null;
966
+ /**
967
+ * Incoming log public ID
968
+ */
969
+ id: string;
970
+ is_spam: boolean;
971
+ /**
972
+ * Mailbox email address
973
+ */
974
+ mailbox_email: string | null;
975
+ /**
976
+ * Mailbox public ID
977
+ */
978
+ mailbox_id: string | null;
979
+ /**
980
+ * Message identifier when available
981
+ */
982
+ message_id: string | null;
983
+ /**
984
+ * Identifier source when available
985
+ */
986
+ message_id_kind: string | null;
987
+ /**
988
+ * ISO 8601 received timestamp
989
+ */
990
+ received_at: string;
991
+ size_bytes: number | null;
992
+ subject: string | null;
993
+ to_emails: Array<string>;
994
+ /**
995
+ * Per-message unit amount in USD
996
+ */
997
+ unit_amount: string;
998
+ };
999
+ export type IncomingLogItemCursorListResponse = SuccessEnvelope & {
1000
+ data: Array<IncomingLogItem>;
1001
+ meta?: ResponseMeta;
1002
+ pagination: CursorPagination;
1003
+ };
1004
+ export type FilterStateResponse = SuccessEnvelope & {
1005
+ data: FilterState;
1006
+ meta?: ResponseMeta;
1007
+ };
1008
+ export type FilterState = {
1009
+ /**
1010
+ * Active filtering mode. `off` disables filtering (all senders accepted). `allowlist` only accepts senders matching a rule. `denylist` blocks senders matching a rule.
1011
+ */
1012
+ mode: 'off' | 'allowlist' | 'denylist';
1013
+ /**
1014
+ * Current rules, sorted by pattern ascending
1015
+ */
1016
+ rules: Array<FilterRule>;
1017
+ };
1018
+ export type EmailMetricsResponse = SuccessEnvelope & {
1019
+ data: EmailMetrics;
1020
+ meta?: ResponseMeta;
1021
+ };
1022
+ export type EmailMetrics = {
1023
+ comparison: {
1024
+ change_pct: {
1025
+ failed: number;
1026
+ pending: number;
1027
+ rejected: number;
1028
+ sent: number;
1029
+ total: number;
1030
+ };
1031
+ failed: number;
1032
+ pending: number;
1033
+ rejected: number;
1034
+ sent: number;
1035
+ total: number;
1036
+ };
1037
+ summary: {
1038
+ failed: number;
1039
+ pending: number;
1040
+ rejected: number;
1041
+ sent: number;
1042
+ total: number;
1043
+ };
1044
+ timeseries: Array<{
1045
+ failed: number;
1046
+ pending: number;
1047
+ rejected: number;
1048
+ sent: number;
1049
+ timestamp: string;
1050
+ total: number;
1051
+ }>;
1052
+ };
1053
+ export type DomainVerifyResponse = SuccessEnvelope & {
1054
+ data: MailboxDomainVerifyResult;
1055
+ meta?: ResponseMeta;
1056
+ };
1057
+ export type DomainItemResponse = SuccessEnvelope & {
1058
+ data: MailboxDomain;
1059
+ meta?: ResponseMeta;
1060
+ };
1061
+ export type DomainItemCursorListResponse = SuccessEnvelope & {
1062
+ data: Array<MailboxDomain>;
1063
+ meta?: ResponseMeta;
1064
+ pagination: CursorPagination;
1065
+ };
1066
+ export type DomainDeletedResponse = SuccessEnvelope & {
1067
+ data: {
1068
+ deleted: true;
1069
+ id: string;
1070
+ };
1071
+ meta?: ResponseMeta;
1072
+ };
1073
+ export type DeliveryLogItemResponse = SuccessEnvelope & {
1074
+ data: DeliveryLogItem;
1075
+ meta?: ResponseMeta;
1076
+ };
1077
+ export type DeliveryLogItem = {
1078
+ attempts: number;
1079
+ /**
1080
+ * ISO 8601 creation timestamp
1081
+ */
1082
+ created_at: string;
1083
+ from_email: string | null;
1084
+ /**
1085
+ * Log public ID
1086
+ */
1087
+ id: string;
1088
+ /**
1089
+ * Email Message-ID header
1090
+ */
1091
+ message_id: string | null;
1092
+ /**
1093
+ * Provider public ID
1094
+ */
1095
+ provider_id: string | null;
1096
+ /**
1097
+ * Provider display name
1098
+ */
1099
+ provider_name: string | null;
1100
+ /**
1101
+ * ISO 8601 timestamp when email was sent
1102
+ */
1103
+ sent_at: string | null;
1104
+ /**
1105
+ * The actual from address used for delivery after transformation. NULL if no transformation occurred or for older log entries.
1106
+ */
1107
+ sent_from_email: string | null;
1108
+ size_bytes: number | null;
1109
+ status: 'pending' | 'sent' | 'failed' | 'rejected';
1110
+ status_reason: string | null;
1111
+ subject: string | null;
1112
+ to_email: string | null;
1113
+ };
1114
+ export type DeliveryLogItemCursorListResponse = SuccessEnvelope & {
1115
+ data: Array<DeliveryLogItem>;
1116
+ meta?: ResponseMeta;
1117
+ pagination: CursorPagination;
1118
+ };
1119
+ export type BalanceResponse = SuccessEnvelope & {
1120
+ data: Balance;
1121
+ meta?: ResponseMeta;
1122
+ };
1123
+ export type Balance = {
1124
+ auto_topup: {
1125
+ amount: string | null;
1126
+ enabled: boolean;
1127
+ monthly_limit: string | null;
1128
+ monthly_used: string;
1129
+ threshold: string | null;
1130
+ };
1131
+ /**
1132
+ * Current balance (purchased - consumed)
1133
+ */
1134
+ balance: string;
1135
+ balance_consumed: string;
1136
+ balance_purchased: string;
1137
+ currency: 'USD';
1138
+ };
1139
+ export type ApiErrorDetail = {
1140
+ /**
1141
+ * Machine-readable issue code from the validator (e.g. zod issue code).
1142
+ */
1143
+ code: string;
1144
+ /**
1145
+ * Dot-path of the offending request field.
1146
+ */
1147
+ field: string;
1148
+ /**
1149
+ * Human-readable issue description.
1150
+ */
1151
+ message: string;
1152
+ };
1153
+ export type ApiError = {
1154
+ error: {
1155
+ /**
1156
+ * Machine-readable error code
1157
+ */
1158
+ code: 'invalid_parameter' | 'missing_parameter' | 'authentication_required' | 'insufficient_permissions' | 'not_found' | 'conflict' | 'limit_exceeded' | 'idempotency_conflict' | 'payload_too_large' | 'validation_error' | 'rate_limit_exceeded' | 'service_unavailable' | 'internal_error';
1159
+ /**
1160
+ * Link to relevant documentation
1161
+ */
1162
+ doc_url?: string;
1163
+ /**
1164
+ * Accumulated per-field issues for validation errors. Only present on 400/422 responses.
1165
+ */
1166
+ errors?: Array<ApiErrorDetail>;
1167
+ /**
1168
+ * Human-readable error description
1169
+ */
1170
+ message: string;
1171
+ /**
1172
+ * The parameter that caused the error
1173
+ */
1174
+ param?: string;
1175
+ /**
1176
+ * Whether the caller may safely retry this request. 4xx are typically false (except 429); 5xx are typically true.
1177
+ */
1178
+ retryable: boolean;
1179
+ };
1180
+ meta: {
1181
+ request_id: string;
1182
+ };
1183
+ ok: false;
1184
+ };
1185
+ export type ManagementListBalanceData = {
1186
+ body?: never;
1187
+ path?: never;
1188
+ query?: never;
1189
+ url: '/billing/balance';
1190
+ };
1191
+ export type ManagementListBalanceErrors = {
1192
+ /**
1193
+ * Authentication required
1194
+ */
1195
+ 401: ApiError;
1196
+ /**
1197
+ * Insufficient permissions
1198
+ */
1199
+ 403: ApiError;
1200
+ };
1201
+ export type ManagementListBalanceError = ManagementListBalanceErrors[keyof ManagementListBalanceErrors];
1202
+ export type ManagementListBalanceResponses = {
1203
+ /**
1204
+ * Current balance
1205
+ */
1206
+ 200: BalanceResponse;
1207
+ };
1208
+ export type ManagementListBalanceResponse = ManagementListBalanceResponses[keyof ManagementListBalanceResponses];
1209
+ export type ManagementGetSpendSummaryData = {
1210
+ body?: never;
1211
+ path?: never;
1212
+ query?: {
1213
+ /**
1214
+ * Lookback period in days (default: 30)
1215
+ */
1216
+ days?: '7' | '30' | '90';
1217
+ };
1218
+ url: '/billing/summary';
1219
+ };
1220
+ export type ManagementGetSpendSummaryErrors = {
1221
+ /**
1222
+ * Authentication required
1223
+ */
1224
+ 401: ApiError;
1225
+ /**
1226
+ * Insufficient permissions
1227
+ */
1228
+ 403: ApiError;
1229
+ };
1230
+ export type ManagementGetSpendSummaryError = ManagementGetSpendSummaryErrors[keyof ManagementGetSpendSummaryErrors];
1231
+ export type ManagementGetSpendSummaryResponses = {
1232
+ /**
1233
+ * Spend summary
1234
+ */
1235
+ 200: SpendSummaryResponse;
1236
+ };
1237
+ export type ManagementGetSpendSummaryResponse = ManagementGetSpendSummaryResponses[keyof ManagementGetSpendSummaryResponses];
1238
+ export type ManagementListTransactionsData = {
1239
+ body?: never;
1240
+ path?: never;
1241
+ query?: {
1242
+ /**
1243
+ * Pagination cursor — the `next_cursor` from the previous response.
1244
+ */
1245
+ cursor?: string;
1246
+ /**
1247
+ * Max results (default 25, max 100)
1248
+ */
1249
+ limit?: number;
1250
+ type?: 'PURCHASE' | 'USAGE' | 'AUTO_TOPUP' | 'REFUND' | 'ADJUSTMENT';
1251
+ };
1252
+ url: '/billing/transactions';
1253
+ };
1254
+ export type ManagementListTransactionsErrors = {
1255
+ /**
1256
+ * Authentication required
1257
+ */
1258
+ 401: ApiError;
1259
+ /**
1260
+ * Insufficient permissions
1261
+ */
1262
+ 403: ApiError;
1263
+ };
1264
+ export type ManagementListTransactionsError = ManagementListTransactionsErrors[keyof ManagementListTransactionsErrors];
1265
+ export type ManagementListTransactionsResponses = {
1266
+ /**
1267
+ * Transaction list
1268
+ */
1269
+ 200: TransactionCursorListResponse;
1270
+ };
1271
+ export type ManagementListTransactionsResponse = ManagementListTransactionsResponses[keyof ManagementListTransactionsResponses];
1272
+ export type ManagementListDomainsData = {
1273
+ body?: never;
1274
+ path?: never;
1275
+ query?: {
1276
+ /**
1277
+ * Pagination cursor — the `next_cursor` from the previous response.
1278
+ */
1279
+ cursor?: string;
1280
+ /**
1281
+ * Maximum results (default 50, max 100)
1282
+ */
1283
+ limit?: number;
1284
+ };
1285
+ url: '/domains';
1286
+ };
1287
+ export type ManagementListDomainsErrors = {
1288
+ /**
1289
+ * Authentication required
1290
+ */
1291
+ 401: ApiError;
1292
+ /**
1293
+ * Insufficient permissions
1294
+ */
1295
+ 403: ApiError;
1296
+ };
1297
+ export type ManagementListDomainsError = ManagementListDomainsErrors[keyof ManagementListDomainsErrors];
1298
+ export type ManagementListDomainsResponses = {
1299
+ /**
1300
+ * Domain list
1301
+ */
1302
+ 200: DomainItemCursorListResponse;
1303
+ };
1304
+ export type ManagementListDomainsResponse = ManagementListDomainsResponses[keyof ManagementListDomainsResponses];
1305
+ export type ManagementCreateDomainData = {
1306
+ body?: {
1307
+ /**
1308
+ * Fully qualified domain name. Must be lowercased and domain-only (no scheme).
1309
+ */
1310
+ domain: string;
1311
+ };
1312
+ headers?: {
1313
+ /**
1314
+ * Client-chosen unique key to safely retry the request. Cached for 24h per (team, endpoint, key). Different body with same key returns 409 idempotency_conflict.
1315
+ */
1316
+ 'Idempotency-Key'?: string;
1317
+ };
1318
+ path?: never;
1319
+ query?: never;
1320
+ url: '/domains';
1321
+ };
1322
+ export type ManagementCreateDomainErrors = {
1323
+ /**
1324
+ * Invalid request body
1325
+ */
1326
+ 400: ApiError;
1327
+ /**
1328
+ * Domain already in use, or `Idempotency-Key` was replayed with a different body.
1329
+ */
1330
+ 409: ApiError;
1331
+ /**
1332
+ * SES tenant not yet provisioned for this team
1333
+ */
1334
+ 503: ApiError;
1335
+ };
1336
+ export type ManagementCreateDomainError = ManagementCreateDomainErrors[keyof ManagementCreateDomainErrors];
1337
+ export type ManagementCreateDomainResponses = {
1338
+ /**
1339
+ * Domain created. The response carries a `Location` header pointing at the canonical GET URL for the new domain.
1340
+ */
1341
+ 201: DomainItemResponse;
1342
+ };
1343
+ export type ManagementCreateDomainResponse = ManagementCreateDomainResponses[keyof ManagementCreateDomainResponses];
1344
+ export type ManagementDeleteDomainData = {
1345
+ body?: never;
1346
+ path: {
1347
+ /**
1348
+ * Domain public ID
1349
+ */
1350
+ public_id: string;
1351
+ };
1352
+ query?: never;
1353
+ url: '/domains/{public_id}';
1354
+ };
1355
+ export type ManagementDeleteDomainErrors = {
1356
+ /**
1357
+ * Domain not found
1358
+ */
1359
+ 404: ApiError;
1360
+ /**
1361
+ * Domain still has active mailboxes (error code `conflict`).
1362
+ */
1363
+ 409: ApiError;
1364
+ };
1365
+ export type ManagementDeleteDomainError = ManagementDeleteDomainErrors[keyof ManagementDeleteDomainErrors];
1366
+ export type ManagementDeleteDomainResponses = {
1367
+ /**
1368
+ * Deletion result
1369
+ */
1370
+ 200: DomainDeletedResponse;
1371
+ };
1372
+ export type ManagementDeleteDomainResponse = ManagementDeleteDomainResponses[keyof ManagementDeleteDomainResponses];
1373
+ export type ManagementGetDomainData = {
1374
+ body?: never;
1375
+ headers?: {
1376
+ /**
1377
+ * Weak ETag from a previous response. Returns 304 when unchanged.
1378
+ */
1379
+ 'If-None-Match'?: string;
1380
+ };
1381
+ path: {
1382
+ /**
1383
+ * Domain public ID
1384
+ */
1385
+ public_id: string;
1386
+ };
1387
+ query?: never;
1388
+ url: '/domains/{public_id}';
1389
+ };
1390
+ export type ManagementGetDomainErrors = {
1391
+ /**
1392
+ * Domain not found
1393
+ */
1394
+ 404: ApiError;
1395
+ };
1396
+ export type ManagementGetDomainError = ManagementGetDomainErrors[keyof ManagementGetDomainErrors];
1397
+ export type ManagementGetDomainResponses = {
1398
+ /**
1399
+ * Domain
1400
+ */
1401
+ 200: DomainItemResponse;
1402
+ };
1403
+ export type ManagementGetDomainResponse = ManagementGetDomainResponses[keyof ManagementGetDomainResponses];
1404
+ export type ManagementGetDomainFiltersData = {
1405
+ body?: never;
1406
+ headers?: {
1407
+ /**
1408
+ * Weak ETag from a previous response. Returns 304 when unchanged.
1409
+ */
1410
+ 'If-None-Match'?: string;
1411
+ };
1412
+ path: {
1413
+ /**
1414
+ * Domain public ID
1415
+ */
1416
+ public_id: string;
1417
+ };
1418
+ query?: never;
1419
+ url: '/domains/{public_id}/filters';
1420
+ };
1421
+ export type ManagementGetDomainFiltersErrors = {
1422
+ /**
1423
+ * Domain not found
1424
+ */
1425
+ 404: ApiError;
1426
+ /**
1427
+ * Filter service temporarily unavailable
1428
+ */
1429
+ 503: ApiError;
1430
+ };
1431
+ export type ManagementGetDomainFiltersError = ManagementGetDomainFiltersErrors[keyof ManagementGetDomainFiltersErrors];
1432
+ export type ManagementGetDomainFiltersResponses = {
1433
+ /**
1434
+ * Filter state
1435
+ */
1436
+ 200: FilterStateResponse;
1437
+ };
1438
+ export type ManagementGetDomainFiltersResponse = ManagementGetDomainFiltersResponses[keyof ManagementGetDomainFiltersResponses];
1439
+ export type ManagementSetDomainFiltersData = {
1440
+ body?: SetFilterStateBody;
1441
+ headers?: {
1442
+ /**
1443
+ * Weak ETag from a prior GET. Reject with 409 conflict when the server's current ETag differs.
1444
+ */
1445
+ 'If-Match'?: string;
1446
+ };
1447
+ path: {
1448
+ /**
1449
+ * Domain public ID
1450
+ */
1451
+ public_id: string;
1452
+ };
1453
+ query?: never;
1454
+ url: '/domains/{public_id}/filters';
1455
+ };
1456
+ export type ManagementSetDomainFiltersErrors = {
1457
+ /**
1458
+ * Invalid request body
1459
+ */
1460
+ 400: ApiError;
1461
+ /**
1462
+ * Domain not found
1463
+ */
1464
+ 404: ApiError;
1465
+ /**
1466
+ * `If-Match` ETag does not match the server's current version.
1467
+ */
1468
+ 409: ApiError;
1469
+ /**
1470
+ * Rule cap exceeded or invalid rule pattern
1471
+ */
1472
+ 422: ApiError;
1473
+ /**
1474
+ * Filter service temporarily unavailable
1475
+ */
1476
+ 503: ApiError;
1477
+ };
1478
+ export type ManagementSetDomainFiltersError = ManagementSetDomainFiltersErrors[keyof ManagementSetDomainFiltersErrors];
1479
+ export type ManagementSetDomainFiltersResponses = {
1480
+ /**
1481
+ * Updated filter state
1482
+ */
1483
+ 200: FilterStateResponse;
1484
+ };
1485
+ export type ManagementSetDomainFiltersResponse = ManagementSetDomainFiltersResponses[keyof ManagementSetDomainFiltersResponses];
1486
+ export type ManagementVerifyDomainData = {
1487
+ body?: never;
1488
+ path: {
1489
+ /**
1490
+ * Domain public ID
1491
+ */
1492
+ public_id: string;
1493
+ };
1494
+ query?: never;
1495
+ url: '/domains/{public_id}/verify';
1496
+ };
1497
+ export type ManagementVerifyDomainErrors = {
1498
+ /**
1499
+ * Domain not found
1500
+ */
1501
+ 404: ApiError;
1502
+ };
1503
+ export type ManagementVerifyDomainError = ManagementVerifyDomainErrors[keyof ManagementVerifyDomainErrors];
1504
+ export type ManagementVerifyDomainResponses = {
1505
+ /**
1506
+ * Verification result
1507
+ */
1508
+ 200: DomainVerifyResponse;
1509
+ };
1510
+ export type ManagementVerifyDomainResponse = ManagementVerifyDomainResponses[keyof ManagementVerifyDomainResponses];
1511
+ export type ManagementGetDomainZoneFileData = {
1512
+ body?: never;
1513
+ path: {
1514
+ /**
1515
+ * Domain public ID
1516
+ */
1517
+ public_id: string;
1518
+ };
1519
+ query?: never;
1520
+ url: '/domains/{public_id}/zone-file';
1521
+ };
1522
+ export type ManagementGetDomainZoneFileErrors = {
1523
+ /**
1524
+ * Domain not found
1525
+ */
1526
+ 404: ApiError;
1527
+ };
1528
+ export type ManagementGetDomainZoneFileError = ManagementGetDomainZoneFileErrors[keyof ManagementGetDomainZoneFileErrors];
1529
+ export type ManagementGetDomainZoneFileResponses = {
1530
+ /**
1531
+ * Zone file (text/plain)
1532
+ */
1533
+ 200: string;
1534
+ };
1535
+ export type ManagementGetDomainZoneFileResponse = ManagementGetDomainZoneFileResponses[keyof ManagementGetDomainZoneFileResponses];
1536
+ export type ManagementListEmailLogsData = {
1537
+ body?: never;
1538
+ path?: never;
1539
+ query?: {
1540
+ /**
1541
+ * Max results (default 25)
1542
+ */
1543
+ limit?: number;
1544
+ /**
1545
+ * Cursor from previous page
1546
+ */
1547
+ cursor?: string;
1548
+ status?: 'pending' | 'sent' | 'failed' | 'rejected';
1549
+ /**
1550
+ * ISO 8601 start date
1551
+ */
1552
+ from_date?: string;
1553
+ /**
1554
+ * ISO 8601 end date
1555
+ */
1556
+ to_date?: string;
1557
+ /**
1558
+ * Filter by provider publicId
1559
+ */
1560
+ provider_id?: string;
1561
+ /**
1562
+ * Search to_email, from_email, sent_from_email, subject, message_id
1563
+ */
1564
+ search?: string;
1565
+ };
1566
+ url: '/emails/logs';
1567
+ };
1568
+ export type ManagementListEmailLogsErrors = {
1569
+ /**
1570
+ * Authentication required
1571
+ */
1572
+ 401: ApiError;
1573
+ /**
1574
+ * Insufficient permissions
1575
+ */
1576
+ 403: ApiError;
1577
+ };
1578
+ export type ManagementListEmailLogsError = ManagementListEmailLogsErrors[keyof ManagementListEmailLogsErrors];
1579
+ export type ManagementListEmailLogsResponses = {
1580
+ /**
1581
+ * Delivery log list
1582
+ */
1583
+ 200: DeliveryLogItemCursorListResponse;
1584
+ };
1585
+ export type ManagementListEmailLogsResponse = ManagementListEmailLogsResponses[keyof ManagementListEmailLogsResponses];
1586
+ export type ManagementGetEmailLogData = {
1587
+ body?: never;
1588
+ headers?: {
1589
+ /**
1590
+ * Weak ETag from a previous response. Returns 304 when unchanged.
1591
+ */
1592
+ 'If-None-Match'?: string;
1593
+ };
1594
+ path: {
1595
+ /**
1596
+ * Delivery log public ID (dlog_...)
1597
+ */
1598
+ public_id: string;
1599
+ };
1600
+ query?: never;
1601
+ url: '/emails/logs/{public_id}';
1602
+ };
1603
+ export type ManagementGetEmailLogErrors = {
1604
+ /**
1605
+ * Authentication required
1606
+ */
1607
+ 401: ApiError;
1608
+ /**
1609
+ * Insufficient permissions
1610
+ */
1611
+ 403: ApiError;
1612
+ /**
1613
+ * Not found
1614
+ */
1615
+ 404: ApiError;
1616
+ };
1617
+ export type ManagementGetEmailLogError = ManagementGetEmailLogErrors[keyof ManagementGetEmailLogErrors];
1618
+ export type ManagementGetEmailLogResponses = {
1619
+ /**
1620
+ * Delivery log detail
1621
+ */
1622
+ 200: DeliveryLogItemResponse;
1623
+ };
1624
+ export type ManagementGetEmailLogResponse = ManagementGetEmailLogResponses[keyof ManagementGetEmailLogResponses];
1625
+ export type ManagementGetEmailMetricsData = {
1626
+ body?: never;
1627
+ path?: never;
1628
+ query?: {
1629
+ /**
1630
+ * Preset time window (default: 24h)
1631
+ */
1632
+ window?: '24h' | '7d' | '30d';
1633
+ /**
1634
+ * ISO 8601 start date (overrides window)
1635
+ */
1636
+ from_date?: string;
1637
+ /**
1638
+ * ISO 8601 end date
1639
+ */
1640
+ to_date?: string;
1641
+ /**
1642
+ * Timeseries granularity (default: daily)
1643
+ */
1644
+ granularity?: 'hourly' | 'daily';
1645
+ /**
1646
+ * Filter by provider publicId
1647
+ */
1648
+ provider_id?: string;
1649
+ };
1650
+ url: '/emails/metrics';
1651
+ };
1652
+ export type ManagementGetEmailMetricsErrors = {
1653
+ /**
1654
+ * Authentication required
1655
+ */
1656
+ 401: ApiError;
1657
+ /**
1658
+ * Insufficient permissions
1659
+ */
1660
+ 403: ApiError;
1661
+ };
1662
+ export type ManagementGetEmailMetricsError = ManagementGetEmailMetricsErrors[keyof ManagementGetEmailMetricsErrors];
1663
+ export type ManagementGetEmailMetricsResponses = {
1664
+ /**
1665
+ * Email metrics with comparison
1666
+ */
1667
+ 200: EmailMetricsResponse;
1668
+ };
1669
+ export type ManagementGetEmailMetricsResponse = ManagementGetEmailMetricsResponses[keyof ManagementGetEmailMetricsResponses];
1670
+ export type ManagementListInboxLogsData = {
1671
+ body?: never;
1672
+ path?: never;
1673
+ query?: {
1674
+ /**
1675
+ * Max results (default 25)
1676
+ */
1677
+ limit?: number;
1678
+ /**
1679
+ * Cursor from previous page
1680
+ */
1681
+ cursor?: string;
1682
+ /**
1683
+ * Filter by mailbox public ID
1684
+ */
1685
+ mailbox_id?: string;
1686
+ event_type?: 'message.received' | 'message.received.spam';
1687
+ /**
1688
+ * ISO 8601 start date
1689
+ */
1690
+ from_date?: string;
1691
+ /**
1692
+ * ISO 8601 end date
1693
+ */
1694
+ to_date?: string;
1695
+ /**
1696
+ * Search mailbox, sender, recipient, subject, or message ID
1697
+ */
1698
+ search?: string;
1699
+ };
1700
+ url: '/inboxes/logs';
1701
+ };
1702
+ export type ManagementListInboxLogsErrors = {
1703
+ /**
1704
+ * Authentication required
1705
+ */
1706
+ 401: ApiError;
1707
+ /**
1708
+ * Insufficient permissions
1709
+ */
1710
+ 403: ApiError;
1711
+ };
1712
+ export type ManagementListInboxLogsError = ManagementListInboxLogsErrors[keyof ManagementListInboxLogsErrors];
1713
+ export type ManagementListInboxLogsResponses = {
1714
+ /**
1715
+ * Incoming log list
1716
+ */
1717
+ 200: IncomingLogItemCursorListResponse;
1718
+ };
1719
+ export type ManagementListInboxLogsResponse = ManagementListInboxLogsResponses[keyof ManagementListInboxLogsResponses];
1720
+ export type ManagementGetInboxLogData = {
1721
+ body?: never;
1722
+ path: {
1723
+ /**
1724
+ * Incoming log public ID (ilog_...)
1725
+ */
1726
+ public_id: string;
1727
+ };
1728
+ query?: never;
1729
+ url: '/inboxes/logs/{public_id}';
1730
+ };
1731
+ export type ManagementGetInboxLogErrors = {
1732
+ /**
1733
+ * Authentication required
1734
+ */
1735
+ 401: ApiError;
1736
+ /**
1737
+ * Insufficient permissions
1738
+ */
1739
+ 403: ApiError;
1740
+ /**
1741
+ * Not found
1742
+ */
1743
+ 404: ApiError;
1744
+ };
1745
+ export type ManagementGetInboxLogError = ManagementGetInboxLogErrors[keyof ManagementGetInboxLogErrors];
1746
+ export type ManagementGetInboxLogResponses = {
1747
+ /**
1748
+ * Incoming log detail
1749
+ */
1750
+ 200: IncomingLogItemResponse;
1751
+ };
1752
+ export type ManagementGetInboxLogResponse = ManagementGetInboxLogResponses[keyof ManagementGetInboxLogResponses];
1753
+ export type ManagementListMailboxesData = {
1754
+ body?: never;
1755
+ path?: never;
1756
+ query?: {
1757
+ /**
1758
+ * Pagination cursor — the `next_cursor` from the previous response.
1759
+ */
1760
+ cursor?: string;
1761
+ /**
1762
+ * Max results (default 50, max 100)
1763
+ */
1764
+ limit?: number;
1765
+ /**
1766
+ * Set to `true` to include soft-deleted mailboxes (status `deleted`) in the response. Default `false`. Soft-deleted mailboxes are retained for tenant-isolation references in delivery logs and API keys.
1767
+ */
1768
+ include_deleted?: 'true';
1769
+ };
1770
+ url: '/mailboxes';
1771
+ };
1772
+ export type ManagementListMailboxesErrors = {
1773
+ /**
1774
+ * Authentication required
1775
+ */
1776
+ 401: ApiError;
1777
+ /**
1778
+ * Insufficient permissions
1779
+ */
1780
+ 403: ApiError;
1781
+ };
1782
+ export type ManagementListMailboxesError = ManagementListMailboxesErrors[keyof ManagementListMailboxesErrors];
1783
+ export type ManagementListMailboxesResponses = {
1784
+ /**
1785
+ * Mailbox list
1786
+ */
1787
+ 200: MailboxItemCursorListResponse;
1788
+ };
1789
+ export type ManagementListMailboxesResponse = ManagementListMailboxesResponses[keyof ManagementListMailboxesResponses];
1790
+ export type ManagementCreateMailboxData = {
1791
+ body?: {
1792
+ display_name?: string;
1793
+ email: string;
1794
+ /**
1795
+ * Storage quota in bytes. Allowed values: 1073741824 (1 GB), 5368709120 (5 GB), 53687091200 (50 GB).
1796
+ */
1797
+ quota_bytes?: number;
1798
+ send_scope?: {
1799
+ group_public_ids?: Array<string>;
1800
+ provider_public_ids?: Array<string>;
1801
+ type: 'all' | 'providers' | 'group';
1802
+ };
1803
+ };
1804
+ headers?: {
1805
+ /**
1806
+ * Client-chosen unique key to safely retry the request. Cached for 24h per (team, endpoint, key). Different body with same key returns 409 idempotency_conflict.
1807
+ */
1808
+ 'Idempotency-Key'?: string;
1809
+ };
1810
+ path?: never;
1811
+ query?: never;
1812
+ url: '/mailboxes';
1813
+ };
1814
+ export type ManagementCreateMailboxErrors = {
1815
+ /**
1816
+ * Invalid request body
1817
+ */
1818
+ 400: ApiError;
1819
+ /**
1820
+ * Email already in use (error code `conflict`), or `Idempotency-Key` was replayed with a different body (`idempotency_conflict`).
1821
+ */
1822
+ 409: ApiError;
1823
+ /**
1824
+ * Domain not yet verified or semantic validation failure
1825
+ */
1826
+ 422: ApiError;
1827
+ /**
1828
+ * Team is not yet provisioned for sending
1829
+ */
1830
+ 503: ApiError;
1831
+ };
1832
+ export type ManagementCreateMailboxError = ManagementCreateMailboxErrors[keyof ManagementCreateMailboxErrors];
1833
+ export type ManagementCreateMailboxResponses = {
1834
+ /**
1835
+ * Mailbox created. The response carries a `Location` header pointing at the canonical GET URL for the new mailbox.
1836
+ */
1837
+ 201: MailboxCreateResultResponse;
1838
+ };
1839
+ export type ManagementCreateMailboxResponse = ManagementCreateMailboxResponses[keyof ManagementCreateMailboxResponses];
1840
+ export type ManagementDeleteMailboxData = {
1841
+ body?: never;
1842
+ path: {
1843
+ /**
1844
+ * Mailbox public ID
1845
+ */
1846
+ public_id: string;
1847
+ };
1848
+ query?: never;
1849
+ url: '/mailboxes/{public_id}';
1850
+ };
1851
+ export type ManagementDeleteMailboxErrors = {
1852
+ /**
1853
+ * Mailbox not found
1854
+ */
1855
+ 404: ApiError;
1856
+ };
1857
+ export type ManagementDeleteMailboxError = ManagementDeleteMailboxErrors[keyof ManagementDeleteMailboxErrors];
1858
+ export type ManagementDeleteMailboxResponses = {
1859
+ /**
1860
+ * Deletion result
1861
+ */
1862
+ 200: MailboxDeletedResponse;
1863
+ };
1864
+ export type ManagementDeleteMailboxResponse = ManagementDeleteMailboxResponses[keyof ManagementDeleteMailboxResponses];
1865
+ export type ManagementGetMailboxData = {
1866
+ body?: never;
1867
+ headers?: {
1868
+ /**
1869
+ * Weak ETag from a previous response. Returns 304 when unchanged.
1870
+ */
1871
+ 'If-None-Match'?: string;
1872
+ };
1873
+ path: {
1874
+ /**
1875
+ * Mailbox public ID
1876
+ */
1877
+ public_id: string;
1878
+ };
1879
+ query?: never;
1880
+ url: '/mailboxes/{public_id}';
1881
+ };
1882
+ export type ManagementGetMailboxErrors = {
1883
+ /**
1884
+ * Mailbox not found
1885
+ */
1886
+ 404: ApiError;
1887
+ };
1888
+ export type ManagementGetMailboxError = ManagementGetMailboxErrors[keyof ManagementGetMailboxErrors];
1889
+ export type ManagementGetMailboxResponses = {
1890
+ /**
1891
+ * Mailbox
1892
+ */
1893
+ 200: MailboxItemResponse;
1894
+ };
1895
+ export type ManagementGetMailboxResponse = ManagementGetMailboxResponses[keyof ManagementGetMailboxResponses];
1896
+ export type ManagementUpdateMailboxData = {
1897
+ body?: UpdateMailboxBody;
1898
+ headers?: {
1899
+ /**
1900
+ * Weak ETag from a prior GET. Reject with 409 conflict when the server's current ETag differs.
1901
+ */
1902
+ 'If-Match'?: string;
1903
+ };
1904
+ path: {
1905
+ /**
1906
+ * Mailbox public ID
1907
+ */
1908
+ public_id: string;
1909
+ };
1910
+ query?: never;
1911
+ url: '/mailboxes/{public_id}';
1912
+ };
1913
+ export type ManagementUpdateMailboxErrors = {
1914
+ /**
1915
+ * Invalid request body
1916
+ */
1917
+ 400: ApiError;
1918
+ /**
1919
+ * Mailbox not found
1920
+ */
1921
+ 404: ApiError;
1922
+ /**
1923
+ * `If-Match` ETag does not match the server's current version.
1924
+ */
1925
+ 409: ApiError;
1926
+ /**
1927
+ * Validation error — unsupported quota tier, quota below current usage, or cross-tenant send_scope reference
1928
+ */
1929
+ 422: ApiError;
1930
+ };
1931
+ export type ManagementUpdateMailboxError = ManagementUpdateMailboxErrors[keyof ManagementUpdateMailboxErrors];
1932
+ export type ManagementUpdateMailboxResponses = {
1933
+ /**
1934
+ * Updated mailbox
1935
+ */
1936
+ 200: MailboxItemResponse;
1937
+ };
1938
+ export type ManagementUpdateMailboxResponse = ManagementUpdateMailboxResponses[keyof ManagementUpdateMailboxResponses];
1939
+ export type ManagementGetMailboxFiltersData = {
1940
+ body?: never;
1941
+ headers?: {
1942
+ /**
1943
+ * Weak ETag from a previous response. Returns 304 when unchanged.
1944
+ */
1945
+ 'If-None-Match'?: string;
1946
+ };
1947
+ path: {
1948
+ /**
1949
+ * Mailbox public ID
1950
+ */
1951
+ public_id: string;
1952
+ };
1953
+ query?: never;
1954
+ url: '/mailboxes/{public_id}/filters';
1955
+ };
1956
+ export type ManagementGetMailboxFiltersErrors = {
1957
+ /**
1958
+ * Mailbox not found
1959
+ */
1960
+ 404: ApiError;
1961
+ /**
1962
+ * Filter service temporarily unavailable
1963
+ */
1964
+ 503: ApiError;
1965
+ };
1966
+ export type ManagementGetMailboxFiltersError = ManagementGetMailboxFiltersErrors[keyof ManagementGetMailboxFiltersErrors];
1967
+ export type ManagementGetMailboxFiltersResponses = {
1968
+ /**
1969
+ * Filter state
1970
+ */
1971
+ 200: FilterStateResponse;
1972
+ };
1973
+ export type ManagementGetMailboxFiltersResponse = ManagementGetMailboxFiltersResponses[keyof ManagementGetMailboxFiltersResponses];
1974
+ export type ManagementSetMailboxFiltersData = {
1975
+ body?: SetFilterStateBody;
1976
+ headers?: {
1977
+ /**
1978
+ * Weak ETag from a prior GET. Reject with 409 conflict when the server's current ETag differs.
1979
+ */
1980
+ 'If-Match'?: string;
1981
+ };
1982
+ path: {
1983
+ /**
1984
+ * Mailbox public ID
1985
+ */
1986
+ public_id: string;
1987
+ };
1988
+ query?: never;
1989
+ url: '/mailboxes/{public_id}/filters';
1990
+ };
1991
+ export type ManagementSetMailboxFiltersErrors = {
1992
+ /**
1993
+ * Invalid request body
1994
+ */
1995
+ 400: ApiError;
1996
+ /**
1997
+ * Mailbox not found
1998
+ */
1999
+ 404: ApiError;
2000
+ /**
2001
+ * `If-Match` ETag does not match the server's current version.
2002
+ */
2003
+ 409: ApiError;
2004
+ /**
2005
+ * Rule cap exceeded or invalid rule pattern
2006
+ */
2007
+ 422: ApiError;
2008
+ /**
2009
+ * Filter service temporarily unavailable
2010
+ */
2011
+ 503: ApiError;
2012
+ };
2013
+ export type ManagementSetMailboxFiltersError = ManagementSetMailboxFiltersErrors[keyof ManagementSetMailboxFiltersErrors];
2014
+ export type ManagementSetMailboxFiltersResponses = {
2015
+ /**
2016
+ * Updated filter state
2017
+ */
2018
+ 200: FilterStateResponse;
2019
+ };
2020
+ export type ManagementSetMailboxFiltersResponse = ManagementSetMailboxFiltersResponses[keyof ManagementSetMailboxFiltersResponses];
2021
+ export type ManagementCreateMailboxKeyData = {
2022
+ body?: {
2023
+ app_name: string;
2024
+ };
2025
+ headers?: {
2026
+ /**
2027
+ * Client-chosen unique key to safely retry the request. Cached for 24h per (team, endpoint, key). Different body with same key returns 409 idempotency_conflict.
2028
+ */
2029
+ 'Idempotency-Key'?: string;
2030
+ };
2031
+ path: {
2032
+ /**
2033
+ * Mailbox public ID
2034
+ */
2035
+ public_id: string;
2036
+ };
2037
+ query?: never;
2038
+ url: '/mailboxes/{public_id}/keys';
2039
+ };
2040
+ export type ManagementCreateMailboxKeyErrors = {
2041
+ /**
2042
+ * Invalid request body
2043
+ */
2044
+ 400: ApiError;
2045
+ /**
2046
+ * Mailbox not found
2047
+ */
2048
+ 404: ApiError;
2049
+ /**
2050
+ * API key limit reached (`limit_exceeded`) or idempotency key conflict (`idempotency_conflict`).
2051
+ */
2052
+ 409: ApiError;
2053
+ /**
2054
+ * Mailbox is not active
2055
+ */
2056
+ 422: ApiError;
2057
+ };
2058
+ export type ManagementCreateMailboxKeyError = ManagementCreateMailboxKeyErrors[keyof ManagementCreateMailboxKeyErrors];
2059
+ export type ManagementCreateMailboxKeyResponses = {
2060
+ /**
2061
+ * Mailbox API key created. The response carries a `Location` header pointing at the canonical URL for the new key.
2062
+ */
2063
+ 201: MailboxAppPasswordResultResponse;
2064
+ };
2065
+ export type ManagementCreateMailboxKeyResponse = ManagementCreateMailboxKeyResponses[keyof ManagementCreateMailboxKeyResponses];
2066
+ export type ManagementDeleteMailboxKeyData = {
2067
+ body?: never;
2068
+ path: {
2069
+ /**
2070
+ * Mailbox public ID
2071
+ */
2072
+ public_id: string;
2073
+ /**
2074
+ * API key public ID
2075
+ */
2076
+ key_id: string;
2077
+ };
2078
+ query?: never;
2079
+ url: '/mailboxes/{public_id}/keys/{key_id}';
2080
+ };
2081
+ export type ManagementDeleteMailboxKeyErrors = {
2082
+ /**
2083
+ * Mailbox or key not found
2084
+ */
2085
+ 404: ApiError;
2086
+ };
2087
+ export type ManagementDeleteMailboxKeyError = ManagementDeleteMailboxKeyErrors[keyof ManagementDeleteMailboxKeyErrors];
2088
+ export type ManagementDeleteMailboxKeyResponses = {
2089
+ /**
2090
+ * Deletion result
2091
+ */
2092
+ 200: MailboxKeyDeletedResponse;
2093
+ };
2094
+ export type ManagementDeleteMailboxKeyResponse = ManagementDeleteMailboxKeyResponses[keyof ManagementDeleteMailboxKeyResponses];
2095
+ export type ManagementResumeMailboxData = {
2096
+ body?: never;
2097
+ headers?: {
2098
+ /**
2099
+ * Client-chosen unique key to safely retry the request. Cached for 24h per (team, endpoint, key).
2100
+ */
2101
+ 'Idempotency-Key'?: string;
2102
+ };
2103
+ path: {
2104
+ /**
2105
+ * Mailbox public ID
2106
+ */
2107
+ public_id: string;
2108
+ };
2109
+ query?: never;
2110
+ url: '/mailboxes/{public_id}/resume';
2111
+ };
2112
+ export type ManagementResumeMailboxErrors = {
2113
+ /**
2114
+ * Root API key required
2115
+ */
2116
+ 403: ApiError;
2117
+ /**
2118
+ * Mailbox not found
2119
+ */
2120
+ 404: ApiError;
2121
+ /**
2122
+ * Mailbox is deleted, or `Idempotency-Key` was replayed with a different request body.
2123
+ */
2124
+ 409: ApiError;
2125
+ /**
2126
+ * Mailbox service temporarily unavailable
2127
+ */
2128
+ 503: ApiError;
2129
+ };
2130
+ export type ManagementResumeMailboxError = ManagementResumeMailboxErrors[keyof ManagementResumeMailboxErrors];
2131
+ export type ManagementResumeMailboxResponses = {
2132
+ /**
2133
+ * Resumed mailbox
2134
+ */
2135
+ 200: MailboxItemResponse;
2136
+ };
2137
+ export type ManagementResumeMailboxResponse = ManagementResumeMailboxResponses[keyof ManagementResumeMailboxResponses];
2138
+ export type ManagementSuspendMailboxData = {
2139
+ body?: never;
2140
+ headers?: {
2141
+ /**
2142
+ * Client-chosen unique key to safely retry the request. Cached for 24h per (team, endpoint, key).
2143
+ */
2144
+ 'Idempotency-Key'?: string;
2145
+ };
2146
+ path: {
2147
+ /**
2148
+ * Mailbox public ID
2149
+ */
2150
+ public_id: string;
2151
+ };
2152
+ query?: never;
2153
+ url: '/mailboxes/{public_id}/suspend';
2154
+ };
2155
+ export type ManagementSuspendMailboxErrors = {
2156
+ /**
2157
+ * Root API key required
2158
+ */
2159
+ 403: ApiError;
2160
+ /**
2161
+ * Mailbox not found
2162
+ */
2163
+ 404: ApiError;
2164
+ /**
2165
+ * Mailbox is deleted, or `Idempotency-Key` was replayed with a different request body.
2166
+ */
2167
+ 409: ApiError;
2168
+ /**
2169
+ * Mailbox service temporarily unavailable
2170
+ */
2171
+ 503: ApiError;
2172
+ };
2173
+ export type ManagementSuspendMailboxError = ManagementSuspendMailboxErrors[keyof ManagementSuspendMailboxErrors];
2174
+ export type ManagementSuspendMailboxResponses = {
2175
+ /**
2176
+ * Suspended mailbox
2177
+ */
2178
+ 200: MailboxItemResponse;
2179
+ };
2180
+ export type ManagementSuspendMailboxResponse = ManagementSuspendMailboxResponses[keyof ManagementSuspendMailboxResponses];
2181
+ export type ManagementListProvidersData = {
2182
+ body?: never;
2183
+ path?: never;
2184
+ query?: {
2185
+ /**
2186
+ * Pagination cursor — the `next_cursor` from the previous response.
2187
+ */
2188
+ cursor?: string;
2189
+ status?: 'active' | 'inactive' | 'error' | 'pending';
2190
+ type?: 'smtp' | 'gmail_api' | 'outlook_api' | 'amazon_ses';
2191
+ /**
2192
+ * Maximum results (default 50, max 100)
2193
+ */
2194
+ limit?: number;
2195
+ };
2196
+ url: '/providers';
2197
+ };
2198
+ export type ManagementListProvidersErrors = {
2199
+ /**
2200
+ * Authentication required
2201
+ */
2202
+ 401: ApiError;
2203
+ /**
2204
+ * Insufficient permissions
2205
+ */
2206
+ 403: ApiError;
2207
+ };
2208
+ export type ManagementListProvidersError = ManagementListProvidersErrors[keyof ManagementListProvidersErrors];
2209
+ export type ManagementListProvidersResponses = {
2210
+ /**
2211
+ * Sending account list
2212
+ */
2213
+ 200: ProviderItemCursorListResponse;
2214
+ };
2215
+ export type ManagementListProvidersResponse = ManagementListProvidersResponses[keyof ManagementListProvidersResponses];
2216
+ export type ManagementCreateProviderData = {
2217
+ body?: ProviderCreateBody;
2218
+ headers?: {
2219
+ /**
2220
+ * Client-chosen unique key to safely retry the request. Cached for 24h per (team, endpoint, key). Different body with same key returns 409 idempotency_conflict.
2221
+ */
2222
+ 'Idempotency-Key'?: string;
2223
+ };
2224
+ path?: never;
2225
+ query?: never;
2226
+ url: '/providers';
2227
+ };
2228
+ export type ManagementCreateProviderErrors = {
2229
+ /**
2230
+ * Invalid request body
2231
+ */
2232
+ 400: ApiError;
2233
+ /**
2234
+ * Limit reached or idempotency conflict
2235
+ */
2236
+ 409: ApiError;
2237
+ };
2238
+ export type ManagementCreateProviderError = ManagementCreateProviderErrors[keyof ManagementCreateProviderErrors];
2239
+ export type ManagementCreateProviderResponses = {
2240
+ /**
2241
+ * Sending account created
2242
+ */
2243
+ 201: ProviderItemResponse;
2244
+ };
2245
+ export type ManagementCreateProviderResponse = ManagementCreateProviderResponses[keyof ManagementCreateProviderResponses];
2246
+ export type ManagementDeleteProviderData = {
2247
+ body?: never;
2248
+ path: {
2249
+ /**
2250
+ * Sending account public ID
2251
+ */
2252
+ public_id: string;
2253
+ };
2254
+ query?: never;
2255
+ url: '/providers/{public_id}';
2256
+ };
2257
+ export type ManagementDeleteProviderErrors = {
2258
+ /**
2259
+ * Sending account not found
2260
+ */
2261
+ 404: ApiError;
2262
+ /**
2263
+ * Shared account cannot be deleted
2264
+ */
2265
+ 422: ApiError;
2266
+ };
2267
+ export type ManagementDeleteProviderError = ManagementDeleteProviderErrors[keyof ManagementDeleteProviderErrors];
2268
+ export type ManagementDeleteProviderResponses = {
2269
+ /**
2270
+ * Deletion result
2271
+ */
2272
+ 200: ProviderDeletedResponse;
2273
+ };
2274
+ export type ManagementDeleteProviderResponse = ManagementDeleteProviderResponses[keyof ManagementDeleteProviderResponses];
2275
+ export type ManagementGetProviderData = {
2276
+ body?: never;
2277
+ headers?: {
2278
+ /**
2279
+ * Weak ETag from a previous response. Returns 304 when unchanged.
2280
+ */
2281
+ 'If-None-Match'?: string;
2282
+ };
2283
+ path: {
2284
+ /**
2285
+ * Sending account public ID
2286
+ */
2287
+ public_id: string;
2288
+ };
2289
+ query?: never;
2290
+ url: '/providers/{public_id}';
2291
+ };
2292
+ export type ManagementGetProviderErrors = {
2293
+ /**
2294
+ * Sending account not found
2295
+ */
2296
+ 404: ApiError;
2297
+ };
2298
+ export type ManagementGetProviderError = ManagementGetProviderErrors[keyof ManagementGetProviderErrors];
2299
+ export type ManagementGetProviderResponses = {
2300
+ /**
2301
+ * Sending account
2302
+ */
2303
+ 200: ProviderItemResponse;
2304
+ };
2305
+ export type ManagementGetProviderResponse = ManagementGetProviderResponses[keyof ManagementGetProviderResponses];
2306
+ export type ManagementUpdateProviderData = {
2307
+ body?: ProviderUpdateBody;
2308
+ headers?: {
2309
+ /**
2310
+ * Weak ETag from a prior GET. Reject with 409 conflict when the server's current ETag differs.
2311
+ */
2312
+ 'If-Match'?: string;
2313
+ };
2314
+ path: {
2315
+ /**
2316
+ * Sending account public ID
2317
+ */
2318
+ public_id: string;
2319
+ };
2320
+ query?: never;
2321
+ url: '/providers/{public_id}';
2322
+ };
2323
+ export type ManagementUpdateProviderErrors = {
2324
+ /**
2325
+ * Invalid request body
2326
+ */
2327
+ 400: ApiError;
2328
+ /**
2329
+ * Sending account not found
2330
+ */
2331
+ 404: ApiError;
2332
+ /**
2333
+ * ETag conflict
2334
+ */
2335
+ 409: ApiError;
2336
+ /**
2337
+ * Shared-account lock or unsupported field
2338
+ */
2339
+ 422: ApiError;
2340
+ };
2341
+ export type ManagementUpdateProviderError = ManagementUpdateProviderErrors[keyof ManagementUpdateProviderErrors];
2342
+ export type ManagementUpdateProviderResponses = {
2343
+ /**
2344
+ * Updated sending account
2345
+ */
2346
+ 200: ProviderItemResponse;
2347
+ };
2348
+ export type ManagementUpdateProviderResponse = ManagementUpdateProviderResponses[keyof ManagementUpdateProviderResponses];
2349
+ export type ManagementActivateProviderData = {
2350
+ body?: never;
2351
+ headers?: {
2352
+ /**
2353
+ * Client-chosen unique key to safely retry the request. Cached for 24h per (team, endpoint, key). Different body with same key returns 409 idempotency_conflict.
2354
+ */
2355
+ 'Idempotency-Key'?: string;
2356
+ };
2357
+ path: {
2358
+ /**
2359
+ * Sending account public ID
2360
+ */
2361
+ public_id: string;
2362
+ };
2363
+ query?: never;
2364
+ url: '/providers/{public_id}/activate';
2365
+ };
2366
+ export type ManagementActivateProviderErrors = {
2367
+ /**
2368
+ * Sending account not found
2369
+ */
2370
+ 404: ApiError;
2371
+ /**
2372
+ * Idempotency conflict
2373
+ */
2374
+ 409: ApiError;
2375
+ };
2376
+ export type ManagementActivateProviderError = ManagementActivateProviderErrors[keyof ManagementActivateProviderErrors];
2377
+ export type ManagementActivateProviderResponses = {
2378
+ /**
2379
+ * Updated sending account
2380
+ */
2381
+ 200: ProviderItemResponse;
2382
+ };
2383
+ export type ManagementActivateProviderResponse = ManagementActivateProviderResponses[keyof ManagementActivateProviderResponses];
2384
+ export type ManagementDeactivateProviderData = {
2385
+ body?: never;
2386
+ headers?: {
2387
+ /**
2388
+ * Client-chosen unique key to safely retry the request. Cached for 24h per (team, endpoint, key). Different body with same key returns 409 idempotency_conflict.
2389
+ */
2390
+ 'Idempotency-Key'?: string;
2391
+ };
2392
+ path: {
2393
+ /**
2394
+ * Sending account public ID
2395
+ */
2396
+ public_id: string;
2397
+ };
2398
+ query?: never;
2399
+ url: '/providers/{public_id}/deactivate';
2400
+ };
2401
+ export type ManagementDeactivateProviderErrors = {
2402
+ /**
2403
+ * Sending account not found
2404
+ */
2405
+ 404: ApiError;
2406
+ /**
2407
+ * Idempotency conflict
2408
+ */
2409
+ 409: ApiError;
2410
+ };
2411
+ export type ManagementDeactivateProviderError = ManagementDeactivateProviderErrors[keyof ManagementDeactivateProviderErrors];
2412
+ export type ManagementDeactivateProviderResponses = {
2413
+ /**
2414
+ * Updated sending account
2415
+ */
2416
+ 200: ProviderItemResponse;
2417
+ };
2418
+ export type ManagementDeactivateProviderResponse = ManagementDeactivateProviderResponses[keyof ManagementDeactivateProviderResponses];
2419
+ export type ManagementTestProviderData = {
2420
+ body?: never;
2421
+ headers?: {
2422
+ /**
2423
+ * Client-chosen unique key to safely retry the request. Cached for 24h per (team, endpoint, key). Different body with same key returns 409 idempotency_conflict.
2424
+ */
2425
+ 'Idempotency-Key'?: string;
2426
+ };
2427
+ path: {
2428
+ /**
2429
+ * Sending account public ID
2430
+ */
2431
+ public_id: string;
2432
+ };
2433
+ query?: never;
2434
+ url: '/providers/{public_id}/test';
2435
+ };
2436
+ export type ManagementTestProviderErrors = {
2437
+ /**
2438
+ * Sending account not found
2439
+ */
2440
+ 404: ApiError;
2441
+ /**
2442
+ * Account cannot be tested
2443
+ */
2444
+ 422: ApiError;
2445
+ /**
2446
+ * Connection testing unavailable
2447
+ */
2448
+ 503: ApiError;
2449
+ };
2450
+ export type ManagementTestProviderError = ManagementTestProviderErrors[keyof ManagementTestProviderErrors];
2451
+ export type ManagementTestProviderResponses = {
2452
+ /**
2453
+ * Connection test result
2454
+ */
2455
+ 200: ProviderTestResultResponse;
2456
+ };
2457
+ export type ManagementTestProviderResponse = ManagementTestProviderResponses[keyof ManagementTestProviderResponses];
2458
+ export type ManagementGetProviderLimitsData = {
2459
+ body?: never;
2460
+ path?: never;
2461
+ query?: never;
2462
+ url: '/providers/limits';
2463
+ };
2464
+ export type ManagementGetProviderLimitsResponses = {
2465
+ /**
2466
+ * Limit state
2467
+ */
2468
+ 200: ProviderLimitsResponse;
2469
+ };
2470
+ export type ManagementGetProviderLimitsResponse = ManagementGetProviderLimitsResponses[keyof ManagementGetProviderLimitsResponses];
2471
+ export type ManagementRequestSendingAccountLimitIncreaseData = {
2472
+ body?: never;
2473
+ headers?: {
2474
+ /**
2475
+ * Client-chosen unique key to safely retry the request. Cached for 24h per (team, endpoint, key). Different body with same key returns 409 idempotency_conflict.
2476
+ */
2477
+ 'Idempotency-Key'?: string;
2478
+ };
2479
+ path?: never;
2480
+ query?: never;
2481
+ url: '/providers/limits/sending-accounts/request-increase';
2482
+ };
2483
+ export type ManagementRequestSendingAccountLimitIncreaseErrors = {
2484
+ /**
2485
+ * A request is already pending
2486
+ */
2487
+ 409: ApiError;
2488
+ /**
2489
+ * Increase request is not available yet
2490
+ */
2491
+ 422: ApiError;
2492
+ };
2493
+ export type ManagementRequestSendingAccountLimitIncreaseError = ManagementRequestSendingAccountLimitIncreaseErrors[keyof ManagementRequestSendingAccountLimitIncreaseErrors];
2494
+ export type ManagementRequestSendingAccountLimitIncreaseResponses = {
2495
+ /**
2496
+ * Request submitted
2497
+ */
2498
+ 200: SendingAccountLimitRequestResponse;
2499
+ };
2500
+ export type ManagementRequestSendingAccountLimitIncreaseResponse = ManagementRequestSendingAccountLimitIncreaseResponses[keyof ManagementRequestSendingAccountLimitIncreaseResponses];
2501
+ export type ManagementGetSharedAmazonSesLimitRequestData = {
2502
+ body?: never;
2503
+ path?: never;
2504
+ query?: never;
2505
+ url: '/providers/shared-amazon-ses-limit-request';
2506
+ };
2507
+ export type ManagementGetSharedAmazonSesLimitRequestResponses = {
2508
+ /**
2509
+ * Shared Amazon SES limit request state
2510
+ */
2511
+ 200: SharedAmazonSesLimitRequestPageResponse;
2512
+ };
2513
+ export type ManagementGetSharedAmazonSesLimitRequestResponse = ManagementGetSharedAmazonSesLimitRequestResponses[keyof ManagementGetSharedAmazonSesLimitRequestResponses];
2514
+ export type ManagementCreateSharedAmazonSesLimitRequestData = {
2515
+ body?: never;
2516
+ headers?: {
2517
+ /**
2518
+ * Client-chosen unique key to safely retry the request. Cached for 24h per (team, endpoint, key). Different body with same key returns 409 idempotency_conflict.
2519
+ */
2520
+ 'Idempotency-Key'?: string;
2521
+ };
2522
+ path?: never;
2523
+ query?: never;
2524
+ url: '/providers/shared-amazon-ses-limit-request';
2525
+ };
2526
+ export type ManagementCreateSharedAmazonSesLimitRequestErrors = {
2527
+ /**
2528
+ * Shared Amazon SES account not found
2529
+ */
2530
+ 404: ApiError;
2531
+ /**
2532
+ * A request is already pending
2533
+ */
2534
+ 409: ApiError;
2535
+ /**
2536
+ * Increase request is not available yet
2537
+ */
2538
+ 422: ApiError;
2539
+ };
2540
+ export type ManagementCreateSharedAmazonSesLimitRequestError = ManagementCreateSharedAmazonSesLimitRequestErrors[keyof ManagementCreateSharedAmazonSesLimitRequestErrors];
2541
+ export type ManagementCreateSharedAmazonSesLimitRequestResponses = {
2542
+ /**
2543
+ * Request submitted
2544
+ */
2545
+ 200: SharedAmazonSesLimitRequestCreateResponse;
2546
+ };
2547
+ export type ManagementCreateSharedAmazonSesLimitRequestResponse = ManagementCreateSharedAmazonSesLimitRequestResponses[keyof ManagementCreateSharedAmazonSesLimitRequestResponses];
2548
+ export type ManagementGetProviderStatsData = {
2549
+ body?: never;
2550
+ path?: never;
2551
+ query?: never;
2552
+ url: '/providers/stats';
2553
+ };
2554
+ export type ManagementGetProviderStatsErrors = {
2555
+ /**
2556
+ * Authentication required
2557
+ */
2558
+ 401: ApiError;
2559
+ /**
2560
+ * Insufficient permissions
2561
+ */
2562
+ 403: ApiError;
2563
+ };
2564
+ export type ManagementGetProviderStatsError = ManagementGetProviderStatsErrors[keyof ManagementGetProviderStatsErrors];
2565
+ export type ManagementGetProviderStatsResponses = {
2566
+ /**
2567
+ * Sending account statistics
2568
+ */
2569
+ 200: ProviderStatsResponse;
2570
+ };
2571
+ export type ManagementGetProviderStatsResponse = ManagementGetProviderStatsResponses[keyof ManagementGetProviderStatsResponses];
2572
+ export type ManagementGetProviderUsageData = {
2573
+ body?: never;
2574
+ path?: never;
2575
+ query?: never;
2576
+ url: '/providers/usage';
2577
+ };
2578
+ export type ManagementGetProviderUsageResponses = {
2579
+ /**
2580
+ * Usage summary
2581
+ */
2582
+ 200: ProviderUsageResponse;
2583
+ };
2584
+ export type ManagementGetProviderUsageResponse = ManagementGetProviderUsageResponses[keyof ManagementGetProviderUsageResponses];
2585
+ export type ManagementListWebhooksData = {
2586
+ body?: never;
2587
+ path?: never;
2588
+ query?: {
2589
+ /**
2590
+ * Pagination cursor — the `next_cursor` from the previous response.
2591
+ */
2592
+ cursor?: string;
2593
+ /**
2594
+ * Maximum results (default 50, max 100)
2595
+ */
2596
+ limit?: number;
2597
+ };
2598
+ url: '/webhooks';
2599
+ };
2600
+ export type ManagementListWebhooksErrors = {
2601
+ /**
2602
+ * Authentication required
2603
+ */
2604
+ 401: ApiError;
2605
+ /**
2606
+ * Insufficient permissions
2607
+ */
2608
+ 403: ApiError;
2609
+ };
2610
+ export type ManagementListWebhooksError = ManagementListWebhooksErrors[keyof ManagementListWebhooksErrors];
2611
+ export type ManagementListWebhooksResponses = {
2612
+ /**
2613
+ * Subscription list
2614
+ */
2615
+ 200: WebhookSubscriptionCursorListResponse;
2616
+ };
2617
+ export type ManagementListWebhooksResponse = ManagementListWebhooksResponses[keyof ManagementListWebhooksResponses];
2618
+ export type ManagementCreateWebhookData = {
2619
+ body?: WebhookCreateBody;
2620
+ headers?: {
2621
+ /**
2622
+ * Client-chosen unique key to safely retry the request. Cached for 24h per (team, endpoint, key). Different body with same key returns 409 idempotency_conflict.
2623
+ */
2624
+ 'Idempotency-Key'?: string;
2625
+ };
2626
+ path?: never;
2627
+ query?: never;
2628
+ url: '/webhooks';
2629
+ };
2630
+ export type ManagementCreateWebhookErrors = {
2631
+ /**
2632
+ * Invalid request body
2633
+ */
2634
+ 400: ApiError;
2635
+ /**
2636
+ * Authentication required
2637
+ */
2638
+ 401: ApiError;
2639
+ /**
2640
+ * Insufficient permissions
2641
+ */
2642
+ 403: ApiError;
2643
+ /**
2644
+ * `Idempotency-Key` was replayed with a different body (`idempotency_conflict`).
2645
+ */
2646
+ 409: ApiError;
2647
+ /**
2648
+ * Validation failed (e.g. non-https URL, unknown event type)
2649
+ */
2650
+ 422: ApiError;
2651
+ };
2652
+ export type ManagementCreateWebhookError = ManagementCreateWebhookErrors[keyof ManagementCreateWebhookErrors];
2653
+ export type ManagementCreateWebhookResponses = {
2654
+ /**
2655
+ * Subscription created, including the signing secret. The response carries a `Location` header pointing at the canonical GET URL for the new subscription.
2656
+ */
2657
+ 201: WebhookSubscriptionWithSecretResponse;
2658
+ };
2659
+ export type ManagementCreateWebhookResponse = ManagementCreateWebhookResponses[keyof ManagementCreateWebhookResponses];
2660
+ export type ManagementDeleteWebhookData = {
2661
+ body?: never;
2662
+ path: {
2663
+ /**
2664
+ * Webhook public ID
2665
+ */
2666
+ public_id: string;
2667
+ };
2668
+ query?: never;
2669
+ url: '/webhooks/{public_id}';
2670
+ };
2671
+ export type ManagementDeleteWebhookErrors = {
2672
+ /**
2673
+ * Subscription not found
2674
+ */
2675
+ 404: ApiError;
2676
+ };
2677
+ export type ManagementDeleteWebhookError = ManagementDeleteWebhookErrors[keyof ManagementDeleteWebhookErrors];
2678
+ export type ManagementDeleteWebhookResponses = {
2679
+ /**
2680
+ * Deletion result
2681
+ */
2682
+ 200: WebhookDeletedResponse;
2683
+ };
2684
+ export type ManagementDeleteWebhookResponse = ManagementDeleteWebhookResponses[keyof ManagementDeleteWebhookResponses];
2685
+ export type ManagementGetWebhookData = {
2686
+ body?: never;
2687
+ headers?: {
2688
+ /**
2689
+ * Weak ETag from a previous response. Returns 304 when unchanged.
2690
+ */
2691
+ 'If-None-Match'?: string;
2692
+ };
2693
+ path: {
2694
+ /**
2695
+ * Webhook public ID
2696
+ */
2697
+ public_id: string;
2698
+ };
2699
+ query?: never;
2700
+ url: '/webhooks/{public_id}';
2701
+ };
2702
+ export type ManagementGetWebhookErrors = {
2703
+ /**
2704
+ * Subscription not found
2705
+ */
2706
+ 404: ApiError;
2707
+ };
2708
+ export type ManagementGetWebhookError = ManagementGetWebhookErrors[keyof ManagementGetWebhookErrors];
2709
+ export type ManagementGetWebhookResponses = {
2710
+ /**
2711
+ * Subscription
2712
+ */
2713
+ 200: WebhookSubscriptionResponse;
2714
+ };
2715
+ export type ManagementGetWebhookResponse = ManagementGetWebhookResponses[keyof ManagementGetWebhookResponses];
2716
+ export type ManagementUpdateWebhookData = {
2717
+ body?: WebhookUpdateBody;
2718
+ headers?: {
2719
+ /**
2720
+ * Weak ETag from a prior GET. Reject with 409 conflict when the server's current ETag differs.
2721
+ */
2722
+ 'If-Match'?: string;
2723
+ };
2724
+ path: {
2725
+ /**
2726
+ * Webhook public ID
2727
+ */
2728
+ public_id: string;
2729
+ };
2730
+ query?: never;
2731
+ url: '/webhooks/{public_id}';
2732
+ };
2733
+ export type ManagementUpdateWebhookErrors = {
2734
+ /**
2735
+ * Invalid request body
2736
+ */
2737
+ 400: ApiError;
2738
+ /**
2739
+ * Subscription not found
2740
+ */
2741
+ 404: ApiError;
2742
+ /**
2743
+ * `If-Match` ETag does not match the server's current version.
2744
+ */
2745
+ 409: ApiError;
2746
+ /**
2747
+ * Validation failed (e.g. non-https URL, unknown event type, empty event list)
2748
+ */
2749
+ 422: ApiError;
2750
+ };
2751
+ export type ManagementUpdateWebhookError = ManagementUpdateWebhookErrors[keyof ManagementUpdateWebhookErrors];
2752
+ export type ManagementUpdateWebhookResponses = {
2753
+ /**
2754
+ * Updated subscription
2755
+ */
2756
+ 200: WebhookSubscriptionResponse;
2757
+ };
2758
+ export type ManagementUpdateWebhookResponse = ManagementUpdateWebhookResponses[keyof ManagementUpdateWebhookResponses];
2759
+ export type ManagementListDeliveryData = {
2760
+ body?: never;
2761
+ path: {
2762
+ /**
2763
+ * Webhook public ID
2764
+ */
2765
+ public_id: string;
2766
+ };
2767
+ query?: {
2768
+ /**
2769
+ * Pagination cursor — the `next_cursor` from the previous response.
2770
+ */
2771
+ cursor?: string;
2772
+ /**
2773
+ * Maximum results (default 25, max 100)
2774
+ */
2775
+ limit?: number;
2776
+ /**
2777
+ * Filter by event type.
2778
+ */
2779
+ event_type?: 'message.delivered' | 'message.bounced' | 'message.complained' | 'message.rejected' | 'message.delivery_delayed' | 'message.received' | 'message.received.spam' | 'sendmux.test';
2780
+ /**
2781
+ * Filter by delivery result.
2782
+ */
2783
+ result?: 'success' | 'retrying' | 'failed' | 'permanent_failure';
2784
+ };
2785
+ url: '/webhooks/{public_id}/deliveries';
2786
+ };
2787
+ export type ManagementListDeliveryErrors = {
2788
+ /**
2789
+ * Invalid query parameter
2790
+ */
2791
+ 400: ApiError;
2792
+ /**
2793
+ * Authentication required
2794
+ */
2795
+ 401: ApiError;
2796
+ /**
2797
+ * Insufficient permissions
2798
+ */
2799
+ 403: ApiError;
2800
+ /**
2801
+ * Subscription not found
2802
+ */
2803
+ 404: ApiError;
2804
+ };
2805
+ export type ManagementListDeliveryError = ManagementListDeliveryErrors[keyof ManagementListDeliveryErrors];
2806
+ export type ManagementListDeliveryResponses = {
2807
+ /**
2808
+ * Delivery-attempt list
2809
+ */
2810
+ 200: WebhookDeliveryAttemptCursorListResponse;
2811
+ };
2812
+ export type ManagementListDeliveryResponse = ManagementListDeliveryResponses[keyof ManagementListDeliveryResponses];
2813
+ export type ManagementGetDeliveryPayloadData = {
2814
+ body?: never;
2815
+ path: {
2816
+ /**
2817
+ * Webhook public ID
2818
+ */
2819
+ public_id: string;
2820
+ /**
2821
+ * Delivery-attempt public ID
2822
+ */
2823
+ delivery_id: string;
2824
+ };
2825
+ query?: never;
2826
+ url: '/webhooks/{public_id}/deliveries/{delivery_id}/payload';
2827
+ };
2828
+ export type ManagementGetDeliveryPayloadErrors = {
2829
+ /**
2830
+ * Authentication required
2831
+ */
2832
+ 401: ApiError;
2833
+ /**
2834
+ * Insufficient permissions
2835
+ */
2836
+ 403: ApiError;
2837
+ /**
2838
+ * Delivery not found or payload no longer available
2839
+ */
2840
+ 404: ApiError;
2841
+ };
2842
+ export type ManagementGetDeliveryPayloadError = ManagementGetDeliveryPayloadErrors[keyof ManagementGetDeliveryPayloadErrors];
2843
+ export type ManagementGetDeliveryPayloadResponses = {
2844
+ /**
2845
+ * Delivery payload
2846
+ */
2847
+ 200: WebhookDeliveryPayloadResponse;
2848
+ };
2849
+ export type ManagementGetDeliveryPayloadResponse = ManagementGetDeliveryPayloadResponses[keyof ManagementGetDeliveryPayloadResponses];
2850
+ export type ManagementRotateWebhookSecretData = {
2851
+ body?: never;
2852
+ headers?: {
2853
+ /**
2854
+ * Client-chosen unique key to safely retry the request. Cached for 24h per (team, endpoint, key). Different target `public_id` under the same key returns 409 idempotency_conflict.
2855
+ */
2856
+ 'Idempotency-Key'?: string;
2857
+ };
2858
+ path: {
2859
+ /**
2860
+ * Webhook public ID
2861
+ */
2862
+ public_id: string;
2863
+ };
2864
+ query?: never;
2865
+ url: '/webhooks/{public_id}/rotate-secret';
2866
+ };
2867
+ export type ManagementRotateWebhookSecretErrors = {
2868
+ /**
2869
+ * Subscription not found
2870
+ */
2871
+ 404: ApiError;
2872
+ /**
2873
+ * `Idempotency-Key` was replayed against a different webhook (`idempotency_conflict`).
2874
+ */
2875
+ 409: ApiError;
2876
+ };
2877
+ export type ManagementRotateWebhookSecretError = ManagementRotateWebhookSecretErrors[keyof ManagementRotateWebhookSecretErrors];
2878
+ export type ManagementRotateWebhookSecretResponses = {
2879
+ /**
2880
+ * Subscription with new signing secret
2881
+ */
2882
+ 200: WebhookSubscriptionWithSecretResponse;
2883
+ };
2884
+ export type ManagementRotateWebhookSecretResponse = ManagementRotateWebhookSecretResponses[keyof ManagementRotateWebhookSecretResponses];
2885
+ export type ManagementTestWebhookData = {
2886
+ body?: never;
2887
+ headers?: {
2888
+ /**
2889
+ * Client-chosen unique key to safely retry the request. Cached for 24h per (team, endpoint, key). Different target `public_id` under the same key returns 409 idempotency_conflict.
2890
+ */
2891
+ 'Idempotency-Key'?: string;
2892
+ };
2893
+ path: {
2894
+ /**
2895
+ * Webhook public ID
2896
+ */
2897
+ public_id: string;
2898
+ };
2899
+ query?: never;
2900
+ url: '/webhooks/{public_id}/test';
2901
+ };
2902
+ export type ManagementTestWebhookErrors = {
2903
+ /**
2904
+ * Subscription not found
2905
+ */
2906
+ 404: ApiError;
2907
+ /**
2908
+ * `Idempotency-Key` was replayed against a different webhook (`idempotency_conflict`) or the webhook is not subscribed to `sendmux.test` (`conflict`).
2909
+ */
2910
+ 409: ApiError;
2911
+ /**
2912
+ * Event publish service is unavailable.
2913
+ */
2914
+ 503: ApiError;
2915
+ };
2916
+ export type ManagementTestWebhookError = ManagementTestWebhookErrors[keyof ManagementTestWebhookErrors];
2917
+ export type ManagementTestWebhookResponses = {
2918
+ /**
2919
+ * Test event published
2920
+ */
2921
+ 200: SuccessEnvelope & {
2922
+ data: WebhookTestResponse;
2923
+ meta?: ResponseMeta;
2924
+ };
2925
+ };
2926
+ export type ManagementTestWebhookResponse = ManagementTestWebhookResponses[keyof ManagementTestWebhookResponses];
2927
+ //# sourceMappingURL=types.gen.d.ts.map