Skip to content

Commit da8cdc0

Browse files
feat(api): api update
1 parent df20d51 commit da8cdc0

File tree

2 files changed

+31
-29
lines changed

2 files changed

+31
-29
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-8d6bb1a0b221b8b9fb9aae94419c46e2e1ca4732281924f24c6539c006d12cb8.yml
3-
openapi_spec_hash: 5dd6c9f3cac4f8cc602c0d1543ec4de4
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/knock%2Fknock-e4ea1ded040ebfa923df0d24ef37ae3c742383828cda85e1489bc2cb5e14da29.yml
3+
openapi_spec_hash: 4cfd1f5f0d42e1b821f70ba12089b606
44
config_hash: 5c872aa99cad9b9602e84668f5b38a8a

src/knockapi/types/message.py

Lines changed: 29 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -25,40 +25,16 @@ class Source(BaseModel):
2525
"""The ID of the version of the workflow that triggered the message."""
2626

2727
step_ref: Optional[str] = None
28-
"""The step reference for the step in the workflow that generated the message."""
28+
"""The step reference for the step in the workflow that generated the message"""
2929

3030

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

35-
api_typename: str = FieldInfo(alias="__typename")
35+
api_typename: Optional[str] = FieldInfo(alias="__typename", default=None)
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-
6238
actors: Optional[List[RecipientReference]] = None
6339
"""One or more actors that are associated with this message.
6440
@@ -69,6 +45,9 @@ class Message(BaseModel):
6945
archived_at: Optional[datetime] = None
7046
"""Timestamp when the message was archived."""
7147

48+
channel_id: Optional[str] = None
49+
"""The ID for the channel the message was sent through."""
50+
7251
clicked_at: Optional[datetime] = None
7352
"""Timestamp when the message was clicked."""
7453

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

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+
8570
interacted_at: Optional[datetime] = None
8671
"""Timestamp when the message was interacted with."""
8772

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

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+
9788
scheduled_at: Optional[datetime] = None
9889
"""Timestamp when the message was scheduled to be sent."""
9990

10091
seen_at: Optional[datetime] = None
10192
"""Timestamp when the message was seen."""
10293

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+
103102
tenant: Optional[str] = None
104103
"""The ID of the `tenant` associated with the message.
105104
106105
Only present when a `tenant` is provided on a workflow trigger request.
107106
"""
108107

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

0 commit comments

Comments
 (0)