|
97 | 97 | }, |
98 | 98 | ) |
99 | 99 |
|
| 100 | +MessageRecipientData = TypedDict( |
| 101 | + "MessageRecipientData", |
| 102 | + { |
| 103 | + "email": "Required[str]", |
| 104 | + "name": "Required[str | None]", |
| 105 | + }, |
| 106 | +) |
| 107 | + |
| 108 | +MessageType: TypeAlias = Literal["inbound", "outbound"] |
100 | 109 | SpamSymbol = TypedDict( |
101 | 110 | "SpamSymbol", |
102 | 111 | { |
|
107 | 116 | }, |
108 | 117 | ) |
109 | 118 |
|
110 | | -MessageType: TypeAlias = Literal["inbound", "outbound"] |
111 | | -MessageRecipientData = TypedDict( |
112 | | - "MessageRecipientData", |
113 | | - { |
114 | | - "email": "Required[str]", |
115 | | - "name": "Required[str | None]", |
116 | | - }, |
117 | | -) |
118 | | - |
119 | 119 | MessageData = TypedDict( |
120 | 120 | "MessageData", |
121 | 121 | { |
|
145 | 145 | "processed", |
146 | 146 | "suppressed", |
147 | 147 | "delivered", |
| 148 | + "auto_replied", |
148 | 149 | "soft_bounced", |
149 | 150 | "hard_bounced", |
150 | 151 | "spam_complaint", |
|
199 | 200 | ) |
200 | 201 |
|
201 | 202 | Plan: TypeAlias = Literal["free", "starter", "growth", "pro"] |
202 | | -RouteType: TypeAlias = Literal["transactional", "broadcast", "inbound"] |
| 203 | +UserData = TypedDict( |
| 204 | + "UserData", |
| 205 | + { |
| 206 | + "id": "Required[str]", |
| 207 | + "name": "Required[str]", |
| 208 | + "email": "Required[str]", |
| 209 | + "avatar": "Required[str | None]", |
| 210 | + }, |
| 211 | +) |
| 212 | + |
| 213 | +TeamMemberData = TypedDict( |
| 214 | + "TeamMemberData", |
| 215 | + { |
| 216 | + "id": "Required[str]", |
| 217 | + "user": "NotRequired[UserData]", |
| 218 | + "role": "Required[str | None]", |
| 219 | + "joined_at": "Required[str | None]", |
| 220 | + }, |
| 221 | +) |
| 222 | + |
203 | 223 | RouteStatisticData = TypedDict( |
204 | 224 | "RouteStatisticData", |
205 | 225 | { |
|
217 | 237 | }, |
218 | 238 | ) |
219 | 239 |
|
| 240 | +RouteType: TypeAlias = Literal["transactional", "broadcast", "inbound"] |
220 | 241 | RouteData = TypedDict( |
221 | 242 | "RouteData", |
222 | 243 | { |
|
240 | 261 | }, |
241 | 262 | ) |
242 | 263 |
|
243 | | -UserData = TypedDict( |
244 | | - "UserData", |
245 | | - { |
246 | | - "id": "Required[str]", |
247 | | - "name": "Required[str]", |
248 | | - "email": "Required[str]", |
249 | | - "avatar": "Required[str | None]", |
250 | | - }, |
251 | | -) |
252 | | - |
253 | | -TeamMemberData = TypedDict( |
254 | | - "TeamMemberData", |
255 | | - { |
256 | | - "id": "Required[str]", |
257 | | - "user": "NotRequired[UserData]", |
258 | | - "role": "Required[str | None]", |
259 | | - "joined_at": "Required[str | None]", |
260 | | - }, |
261 | | -) |
262 | | - |
263 | 264 | ProjectData = TypedDict( |
264 | 265 | "ProjectData", |
265 | 266 | { |
266 | 267 | "id": "Required[str]", |
267 | 268 | "name": "Required[str]", |
268 | 269 | "smtp_enabled": "Required[bool]", |
| 270 | + "redact_email_content": "Required[bool]", |
269 | 271 | "default_route_id": "Required[str | None]", |
270 | 272 | "token_generated_at": "Required[str | None]", |
271 | 273 | "token_last_used_at": "Required[str | None]", |
|
312 | 314 | }, |
313 | 315 | ) |
314 | 316 |
|
315 | | -StatsInboundData = TypedDict( |
316 | | - "StatsInboundData", |
317 | | - { |
318 | | - "received": "Required[int]", |
319 | | - }, |
320 | | -) |
321 | | - |
322 | 317 | StatsTypeData = TypedDict( |
323 | 318 | "StatsTypeData", |
324 | 319 | { |
|
328 | 323 | }, |
329 | 324 | ) |
330 | 325 |
|
| 326 | +StatsInboundData = TypedDict( |
| 327 | + "StatsInboundData", |
| 328 | + { |
| 329 | + "received": "Required[int]", |
| 330 | + }, |
| 331 | +) |
| 332 | + |
331 | 333 | StatsDailyData = TypedDict( |
332 | 334 | "StatsDailyData", |
333 | 335 | { |
|
398 | 400 | "name": "Required[str]", |
399 | 401 | "smtp_enabled": "NotRequired[bool]", |
400 | 402 | "initial_routes": "NotRequired[InitialRoutes]", |
| 403 | + "short_token": "NotRequired[bool]", |
401 | 404 | }, |
402 | 405 | ) |
403 | 406 |
|
|
410 | 413 | }, |
411 | 414 | ) |
412 | 415 |
|
| 416 | +SuppressionScope: TypeAlias = Literal["global", "team", "project", "route"] |
413 | 417 | SuppressionReason: TypeAlias = Literal["spam_complaint", "hard_bounce", "unsubscribe", "manual"] |
414 | 418 | StoreSuppressionData = TypedDict( |
415 | 419 | "StoreSuppressionData", |
416 | 420 | { |
417 | 421 | "email": "NotRequired[str | None]", |
418 | 422 | "reason": "Required[SuppressionReason]", |
419 | | - "scope": "Required[Literal['team', 'project', 'route']]", |
| 423 | + "scope": "Required[SuppressionScope]", |
420 | 424 | "route_id": "NotRequired[str | None]", |
421 | 425 | "project_id": "NotRequired[str | None]", |
422 | 426 | "emails": "NotRequired[list[str] | None]", |
|
427 | 431 | "message.created", |
428 | 432 | "message.sent", |
429 | 433 | "message.delivered", |
| 434 | + "message.auto_replied", |
430 | 435 | "message.hard_bounced", |
431 | 436 | "message.soft_bounced", |
432 | 437 | "message.spam_complaint", |
|
451 | 456 | }, |
452 | 457 | ) |
453 | 458 |
|
454 | | -SuppressionScope: TypeAlias = Literal["global", "team", "project", "route"] |
455 | 459 | SuppressionType: TypeAlias = Literal["email", "domain", "extension"] |
456 | 460 | SuppressedRecipientData = TypedDict( |
457 | 461 | "SuppressedRecipientData", |
|
477 | 481 | ) |
478 | 482 |
|
479 | 483 | TeamType: TypeAlias = Literal["personal", "business"] |
480 | | -VolumeTier: TypeAlias = Literal[300, 10000, 50000, 125000, 500000, 750000, 1000000, 1500000] |
| 484 | +VolumeTier: TypeAlias = Literal[300, 10000, 50000, 125000, 300000, 500000, 750000, 1000000, 1500000] |
481 | 485 | TeamData = TypedDict( |
482 | 486 | "TeamData", |
483 | 487 | { |
|
526 | 530 | { |
527 | 531 | "name": "NotRequired[str | None]", |
528 | 532 | "smtp_enabled": "NotRequired[bool | None]", |
| 533 | + "redact_email_content": "NotRequired[bool | None]", |
529 | 534 | "default_route_id": "NotRequired[str | None]", |
530 | 535 | }, |
531 | 536 | ) |
|
537 | 542 | }, |
538 | 543 | ) |
539 | 544 |
|
| 545 | +UpdateRouteInboundSettingsData = TypedDict( |
| 546 | + "UpdateRouteInboundSettingsData", |
| 547 | + { |
| 548 | + "inbound_domain": "NotRequired[str | None]", |
| 549 | + "inbound_spam_threshold": "NotRequired[float | None]", |
| 550 | + "attachment_delivery": "NotRequired[AttachmentDelivery | Any]", |
| 551 | + }, |
| 552 | +) |
| 553 | + |
| 554 | +UpdateRouteSettingsData = TypedDict( |
| 555 | + "UpdateRouteSettingsData", |
| 556 | + { |
| 557 | + "track_opens": "NotRequired[bool | None]", |
| 558 | + "track_clicks": "NotRequired[bool | None]", |
| 559 | + "disable_plaintext_generation": "NotRequired[bool | None]", |
| 560 | + "disable_hosted_unsubscribe": "NotRequired[bool | None]", |
| 561 | + "redact_email_content": "NotRequired[bool | None]", |
| 562 | + }, |
| 563 | +) |
| 564 | + |
540 | 565 | UpdateRouteData = TypedDict( |
541 | 566 | "UpdateRouteData", |
542 | 567 | { |
543 | 568 | "name": "NotRequired[str | None]", |
544 | | - "settings": "NotRequired[dict[str, Any]]", |
545 | | - "inbound_settings": "NotRequired[dict[str, Any]]", |
| 569 | + "settings": "NotRequired[UpdateRouteSettingsData | Any]", |
| 570 | + "inbound_settings": "NotRequired[UpdateRouteInboundSettingsData | Any]", |
546 | 571 | }, |
547 | 572 | ) |
548 | 573 |
|
|
700 | 725 | }, |
701 | 726 | ) |
702 | 727 |
|
| 728 | +BlockedFileTypesResponse = TypedDict( |
| 729 | + "BlockedFileTypesResponse", |
| 730 | + { |
| 731 | + "extensions": "Required[list[str]]", |
| 732 | + "mime_types": "Required[list[str]]", |
| 733 | + }, |
| 734 | +) |
| 735 | + |
703 | 736 | MessageIndexResponse: TypeAlias = Union[dict[str, Any], list[MessageListData]] |
704 | 737 | MessageShowResponse: TypeAlias = MessageData |
705 | 738 | MessageEventsResponse = TypedDict( |
|
760 | 793 | { |
761 | 794 | "data": "Required[ProjectData]", |
762 | 795 | "new_token": "Required[str]", |
763 | | - "message": "Required[Literal['API token rotated successfully. Please update your integrations.']]", |
| 796 | + "message": "Required[Literal['Project API token rotated successfully. Please update your integrations.']]", |
764 | 797 | }, |
765 | 798 | ) |
766 | 799 |
|
|
0 commit comments