archastro.platform.types.events

  1# Copyright (c) 2026 ArchAstro Inc. Licensed under the MIT License.
  2# This file is auto-generated by @archastro/sdk-generator. Do not edit.
  3# Content hash: 60b20f07ddae
  4
  5from datetime import datetime
  6from typing import Any, Literal
  7
  8from pydantic import BaseModel
  9
 10from .common import DomainEvent
 11
 12
 13class EventSubscription(BaseModel):
 14    """
 15    An app-scoped subscription to exact domain-event names.
 16    """
 17
 18    agent: str | None = None
 19    available_count: int
 20    created_at: datetime
 21    dropped_events_total: int
 22    dropped_through_position: int
 23    event_names: list[str]
 24    filter: dict[str, Any] | None = None
 25    id: str
 26    last_overflow_at: datetime | None = None
 27    leased_count: int
 28    max_pending_events: int
 29    name: str
 30    org: str | None = None
 31    queue_epoch: int
 32    retention_seconds: int
 33    sandbox: str | None = None
 34    status: Literal["active", "paused"]
 35    team: str | None = None
 36    updated_at: datetime
 37    user: str | None = None
 38    visibility_timeout_seconds: int
 39    watch_key: str | None = None
 40
 41
 42class EventSubscriptionDelivery(BaseModel):
 43    """
 44    A domain event leased from a subscription queue.
 45    """
 46
 47    delivery_id: str
 48    event: DomainEvent
 49    lease_expires_at: datetime
 50    receipt_handle: str
 51    receive_count: int
 52    sequence: int
 53
 54
 55class EventSubscriptionClaim(BaseModel):
 56    """
 57    Result of atomically claiming the head delivery.
 58    """
 59
 60    data: list[EventSubscriptionDelivery]
 61    dropped_events_total: int
 62    dropped_through_position: int
 63    has_more: bool
 64    queue_epoch: int
 65
 66
 67class EventSubscriptionQueueEntry(BaseModel):
 68    """
 69    A non-reserving view of one queued delivery.
 70    """
 71
 72    delivery_id: str
 73    event: DomainEvent
 74    lease_expires_at: datetime | None = None
 75    receive_count: int
 76    sequence: int
 77    state: Literal["available", "leased"]
 78
 79
 80class EventSubscriptionHead(BaseModel):
 81    """
 82    A non-reserving view of the queue head.
 83    """
 84
 85    data: EventSubscriptionQueueEntry | None = None
 86
 87
 88class EventSubscriptionPage(BaseModel):
 89    """
 90    A page of domain-event subscriptions.
 91    """
 92
 93    data: list[EventSubscription]
 94    page: int
 95    per_page: int
 96    total_count: int
 97    total_pages: int
 98
 99
100class EventSubscriptionQueue(BaseModel):
101    """
102    A cursor-paginated non-reserving view of a subscription queue.
103    """
104
105    after_cursor: str | None = None
106    before_cursor: str | None = None
107    data: list[EventSubscriptionQueueEntry]
108    dropped_events_total: int
109    dropped_through_position: int
110    has_more: bool
111    queue_epoch: int
class EventSubscription(pydantic.main.BaseModel):
14class EventSubscription(BaseModel):
15    """
16    An app-scoped subscription to exact domain-event names.
17    """
18
19    agent: str | None = None
20    available_count: int
21    created_at: datetime
22    dropped_events_total: int
23    dropped_through_position: int
24    event_names: list[str]
25    filter: dict[str, Any] | None = None
26    id: str
27    last_overflow_at: datetime | None = None
28    leased_count: int
29    max_pending_events: int
30    name: str
31    org: str | None = None
32    queue_epoch: int
33    retention_seconds: int
34    sandbox: str | None = None
35    status: Literal["active", "paused"]
36    team: str | None = None
37    updated_at: datetime
38    user: str | None = None
39    visibility_timeout_seconds: int
40    watch_key: str | None = None

An app-scoped subscription to exact domain-event names.

agent: str | None = None
available_count: int = PydanticUndefined
created_at: datetime.datetime = PydanticUndefined
dropped_events_total: int = PydanticUndefined
dropped_through_position: int = PydanticUndefined
event_names: list[str] = PydanticUndefined
filter: dict[str, typing.Any] | None = None
id: str = PydanticUndefined
last_overflow_at: datetime.datetime | None = None
leased_count: int = PydanticUndefined
max_pending_events: int = PydanticUndefined
name: str = PydanticUndefined
org: str | None = None
queue_epoch: int = PydanticUndefined
retention_seconds: int = PydanticUndefined
sandbox: str | None = None
status: Literal['active', 'paused'] = PydanticUndefined
team: str | None = None
updated_at: datetime.datetime = PydanticUndefined
user: str | None = None
visibility_timeout_seconds: int = PydanticUndefined
watch_key: str | None = None
class EventSubscriptionDelivery(pydantic.main.BaseModel):
43class EventSubscriptionDelivery(BaseModel):
44    """
45    A domain event leased from a subscription queue.
46    """
47
48    delivery_id: str
49    event: DomainEvent
50    lease_expires_at: datetime
51    receipt_handle: str
52    receive_count: int
53    sequence: int

A domain event leased from a subscription queue.

delivery_id: str = PydanticUndefined
event: archastro.platform.types.common.DomainEvent = PydanticUndefined
lease_expires_at: datetime.datetime = PydanticUndefined
receipt_handle: str = PydanticUndefined
receive_count: int = PydanticUndefined
sequence: int = PydanticUndefined
class EventSubscriptionClaim(pydantic.main.BaseModel):
56class EventSubscriptionClaim(BaseModel):
57    """
58    Result of atomically claiming the head delivery.
59    """
60
61    data: list[EventSubscriptionDelivery]
62    dropped_events_total: int
63    dropped_through_position: int
64    has_more: bool
65    queue_epoch: int

Result of atomically claiming the head delivery.

data: list[EventSubscriptionDelivery] = PydanticUndefined
dropped_events_total: int = PydanticUndefined
dropped_through_position: int = PydanticUndefined
has_more: bool = PydanticUndefined
queue_epoch: int = PydanticUndefined
class EventSubscriptionQueueEntry(pydantic.main.BaseModel):
68class EventSubscriptionQueueEntry(BaseModel):
69    """
70    A non-reserving view of one queued delivery.
71    """
72
73    delivery_id: str
74    event: DomainEvent
75    lease_expires_at: datetime | None = None
76    receive_count: int
77    sequence: int
78    state: Literal["available", "leased"]

A non-reserving view of one queued delivery.

delivery_id: str = PydanticUndefined
event: archastro.platform.types.common.DomainEvent = PydanticUndefined
lease_expires_at: datetime.datetime | None = None
receive_count: int = PydanticUndefined
sequence: int = PydanticUndefined
state: Literal['available', 'leased'] = PydanticUndefined
class EventSubscriptionHead(pydantic.main.BaseModel):
81class EventSubscriptionHead(BaseModel):
82    """
83    A non-reserving view of the queue head.
84    """
85
86    data: EventSubscriptionQueueEntry | None = None

A non-reserving view of the queue head.

data: EventSubscriptionQueueEntry | None = None
class EventSubscriptionPage(pydantic.main.BaseModel):
89class EventSubscriptionPage(BaseModel):
90    """
91    A page of domain-event subscriptions.
92    """
93
94    data: list[EventSubscription]
95    page: int
96    per_page: int
97    total_count: int
98    total_pages: int

A page of domain-event subscriptions.

data: list[EventSubscription] = PydanticUndefined
page: int = PydanticUndefined
per_page: int = PydanticUndefined
total_count: int = PydanticUndefined
total_pages: int = PydanticUndefined
class EventSubscriptionQueue(pydantic.main.BaseModel):
101class EventSubscriptionQueue(BaseModel):
102    """
103    A cursor-paginated non-reserving view of a subscription queue.
104    """
105
106    after_cursor: str | None = None
107    before_cursor: str | None = None
108    data: list[EventSubscriptionQueueEntry]
109    dropped_events_total: int
110    dropped_through_position: int
111    has_more: bool
112    queue_epoch: int

A cursor-paginated non-reserving view of a subscription queue.

after_cursor: str | None = None
before_cursor: str | None = None
data: list[EventSubscriptionQueueEntry] = PydanticUndefined
dropped_events_total: int = PydanticUndefined
dropped_through_position: int = PydanticUndefined
has_more: bool = PydanticUndefined
queue_epoch: int = PydanticUndefined