Skip to content

Commit d42a5dc

Browse files
committed
feat: regenerate models with preauth events and transaction_id fix
Regenerated from OpenAPI spec. Adds PreauthCreatedEvent, PreauthApprovedEvent, PreauthRevokedEvent to the Event discriminated union. Fixes crash when the events API returns preauth events. CreateRequestResponse now includes optional transaction_id from the spec (present when preauth auto-confirms).
1 parent fb3eb75 commit d42a5dc

2 files changed

Lines changed: 208 additions & 130 deletions

File tree

src/stackcoin/client.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
DiscordGuild,
1414
DiscordGuildsResponse,
1515
EventsResponse,
16+
PreauthApprovedEvent,
17+
PreauthCreatedEvent,
18+
PreauthRevokedEvent,
1619
Request,
1720
RequestAcceptedEvent,
1821
RequestActionResponse,
@@ -28,7 +31,15 @@
2831
)
2932

3033
# Union of all concrete event types (unwrapped from Event RootModel)
31-
AnyEvent = TransferCompletedEvent | RequestCreatedEvent | RequestAcceptedEvent | RequestDeniedEvent
34+
AnyEvent = (
35+
TransferCompletedEvent
36+
| RequestCreatedEvent
37+
| RequestAcceptedEvent
38+
| RequestDeniedEvent
39+
| PreauthCreatedEvent
40+
| PreauthApprovedEvent
41+
| PreauthRevokedEvent
42+
)
3243

3344

3445
class Client:

0 commit comments

Comments
 (0)