Skip to content

Commit c95f902

Browse files
author
stlc-bot
committed
fix(axon): keep deleted axons readable and reject writes
Stainless-Generated-From: b33dcdf84a9473642bcb4a3c82ccd2a272683bd6
1 parent a930959 commit c95f902

3 files changed

Lines changed: 30 additions & 15 deletions

File tree

‎scripts/mock‎

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

‎src/runloop_api_client/resources/axons/axons.py‎

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,10 @@ def retrieve(
139139
extra_body: Body | None = None,
140140
timeout: float | httpx.Timeout | None | NotGiven = not_given,
141141
) -> AxonView:
142-
"""
143-
[Beta] Get an axon given ID.
142+
"""[Beta] Get an axon by ID.
143+
144+
Deleted axons remain readable and include their
145+
deletion time.
144146
145147
Args:
146148
extra_headers: Send extra headers
@@ -177,7 +179,8 @@ def update(
177179
"""[Beta] Updates the specified axon fields.
178180
179181
Omitted fields are left unchanged. An
180-
empty metadata map clears the metadata.
182+
empty metadata map clears the metadata. Deleted axons remain readable but cannot
183+
be updated.
181184
182185
Args:
183186
metadata: User defined metadata to replace the axon metadata. Omit or set to null to leave
@@ -226,8 +229,10 @@ def list(
226229
extra_body: Body | None = None,
227230
timeout: float | httpx.Timeout | None | NotGiven = not_given,
228231
) -> SyncAxonsCursorIDPage[AxonView]:
229-
"""
230-
[Beta] List all active axons.
232+
"""[Beta] List axons, including deleted axons.
233+
234+
Deleted axons include their deletion
235+
time.
231236
232237
Args:
233238
id: Filter by axon ID.
@@ -293,8 +298,9 @@ def delete(
293298
timeout: float | httpx.Timeout | None | NotGiven = not_given,
294299
idempotency_key: str | None = None,
295300
) -> object:
296-
"""
297-
[Beta] Mark an axon deleted.
301+
"""[Beta] Delete an axon's event data.
302+
303+
The axon's registry record remains readable.
298304
299305
Args:
300306
extra_headers: Send extra headers
@@ -519,8 +525,10 @@ async def retrieve(
519525
extra_body: Body | None = None,
520526
timeout: float | httpx.Timeout | None | NotGiven = not_given,
521527
) -> AxonView:
522-
"""
523-
[Beta] Get an axon given ID.
528+
"""[Beta] Get an axon by ID.
529+
530+
Deleted axons remain readable and include their
531+
deletion time.
524532
525533
Args:
526534
extra_headers: Send extra headers
@@ -557,7 +565,8 @@ async def update(
557565
"""[Beta] Updates the specified axon fields.
558566
559567
Omitted fields are left unchanged. An
560-
empty metadata map clears the metadata.
568+
empty metadata map clears the metadata. Deleted axons remain readable but cannot
569+
be updated.
561570
562571
Args:
563572
metadata: User defined metadata to replace the axon metadata. Omit or set to null to leave
@@ -606,8 +615,10 @@ def list(
606615
extra_body: Body | None = None,
607616
timeout: float | httpx.Timeout | None | NotGiven = not_given,
608617
) -> AsyncPaginator[AxonView, AsyncAxonsCursorIDPage[AxonView]]:
609-
"""
610-
[Beta] List all active axons.
618+
"""[Beta] List axons, including deleted axons.
619+
620+
Deleted axons include their deletion
621+
time.
611622
612623
Args:
613624
id: Filter by axon ID.
@@ -673,8 +684,9 @@ async def delete(
673684
timeout: float | httpx.Timeout | None | NotGiven = not_given,
674685
idempotency_key: str | None = None,
675686
) -> object:
676-
"""
677-
[Beta] Mark an axon deleted.
687+
"""[Beta] Delete an axon's event data.
688+
689+
The axon's registry record remains readable.
678690
679691
Args:
680692
extra_headers: Send extra headers

‎src/runloop_api_client/types/axon_view.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,8 @@ class AxonView(BaseModel):
1717
metadata: Dict[str, str]
1818
"""The user defined axon metadata."""
1919

20+
deleted_at_ms: Optional[int] = None
21+
"""Deletion time in milliseconds since epoch; null while the axon is active."""
22+
2023
name: Optional[str] = None
2124
"""The name of the axon."""

0 commit comments

Comments
 (0)