Skip to content

Commit b9007c9

Browse files
feat(api): api update
1 parent 40513b5 commit b9007c9

File tree

2 files changed

+28
-30
lines changed

2 files changed

+28
-30
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 89
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-e4ea1ded040ebfa923df0d24ef37ae3c742383828cda85e1489bc2cb5e14da29.yml
3-
openapi_spec_hash: 4cfd1f5f0d42e1b821f70ba12089b606
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-de67f68640a0cbc35fd85134ee7d220975b45873653129e857c2b09bd5a03a4b.yml
3+
openapi_spec_hash: b53d828f85ef1e06c0af004a25a6576c
44
config_hash: 5c872aa99cad9b9602e84668f5b38a8a

src/knockapi/types/message.py

Lines changed: 26 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,36 @@ class Source(BaseModel):
2929

3030

3131
class Message(BaseModel):
32-
id: Optional[str] = None
32+
id: str
3333
"""The unique identifier for the message."""
3434

35-
api_typename: Optional[str] = FieldInfo(alias="__typename", default=None)
35+
api_typename: str = FieldInfo(alias="__typename")
3636
"""The typename of the schema."""
3737

38+
channel_id: str
39+
"""The ID for the channel the message was sent through."""
40+
41+
engagement_statuses: List[Literal["seen", "read", "interacted", "link_clicked", "archived"]]
42+
"""A list of engagement statuses."""
43+
44+
inserted_at: datetime
45+
"""Timestamp when the resource was created."""
46+
47+
recipient: RecipientReference
48+
"""
49+
A reference to a recipient, either a user identifier (string) or an object
50+
reference (ID, collection).
51+
"""
52+
53+
source: Source
54+
"""The workflow that triggered the message."""
55+
56+
status: Literal["queued", "sent", "delivered", "delivery_attempted", "undelivered", "not_sent", "bounced"]
57+
"""The message delivery status."""
58+
59+
updated_at: datetime
60+
"""The timestamp when the resource was last updated."""
61+
3862
actors: Optional[List[RecipientReference]] = None
3963
"""One or more actors that are associated with this message.
4064
@@ -45,9 +69,6 @@ class Message(BaseModel):
4569
archived_at: Optional[datetime] = None
4670
"""Timestamp when the message was archived."""
4771

48-
channel_id: Optional[str] = None
49-
"""The ID for the channel the message was sent through."""
50-
5172
clicked_at: Optional[datetime] = None
5273
"""Timestamp when the message was clicked."""
5374

@@ -61,12 +82,6 @@ class Message(BaseModel):
6182
`data` from the most-recent trigger request (the final `activity` in the batch).
6283
"""
6384

64-
engagement_statuses: Optional[List[Literal["seen", "read", "interacted", "link_clicked", "archived"]]] = None
65-
"""A list of engagement statuses."""
66-
67-
inserted_at: Optional[datetime] = None
68-
"""Timestamp when the resource was created."""
69-
7085
interacted_at: Optional[datetime] = None
7186
"""Timestamp when the message was interacted with."""
7287

@@ -79,34 +94,17 @@ class Message(BaseModel):
7994
read_at: Optional[datetime] = None
8095
"""Timestamp when the message was read."""
8196

82-
recipient: Optional[RecipientReference] = None
83-
"""
84-
A reference to a recipient, either a user identifier (string) or an object
85-
reference (ID, collection).
86-
"""
87-
8897
scheduled_at: Optional[datetime] = None
8998
"""Timestamp when the message was scheduled to be sent."""
9099

91100
seen_at: Optional[datetime] = None
92101
"""Timestamp when the message was seen."""
93102

94-
source: Optional[Source] = None
95-
"""The workflow that triggered the message."""
96-
97-
status: Optional[
98-
Literal["queued", "sent", "delivered", "delivery_attempted", "undelivered", "not_sent", "bounced"]
99-
] = None
100-
"""The message delivery status."""
101-
102103
tenant: Optional[str] = None
103104
"""The ID of the `tenant` associated with the message.
104105
105106
Only present when a `tenant` is provided on a workflow trigger request.
106107
"""
107108

108-
updated_at: Optional[datetime] = None
109-
"""The timestamp when the resource was last updated."""
110-
111109
workflow: Optional[str] = None
112110
"""The key of the workflow that generated the message."""

0 commit comments

Comments
 (0)