Skip to content

Commit 2916f8a

Browse files
author
Jörgen Thudén
authored
add typing for account events (#137)
1 parent 58df605 commit 2916f8a

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

types/events.ts

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ import {Relationship, Tags, UnimplementedFields, UnimplementedRelationships} fro
22

33
export type UnitEvent =
44
AccountClosed |
5+
AccountFrozen |
6+
AccountReopened |
7+
AccountUnfrozen |
58
ApplicationDenied |
69
ApplicationAwaitingDocuments |
710
ApplicationPendingReview |
@@ -41,6 +44,33 @@ export type AccountClosed = BaseEvent & {
4144
}
4245
}
4346

47+
export type AccountFrozen = BaseEvent & {
48+
type: "account.frozen"
49+
attributes: {
50+
freezeReason: string
51+
}
52+
relationships: {
53+
account: Relationship
54+
customer: Relationship
55+
}
56+
}
57+
58+
export type AccountReopened = BaseEvent & {
59+
type: "account.reopened"
60+
relationships: {
61+
account: Relationship
62+
customer: Relationship
63+
}
64+
}
65+
66+
export type AccountUnfrozen = BaseEvent & {
67+
type: "account.unfrozen"
68+
relationships: {
69+
account: Relationship
70+
customer: Relationship
71+
}
72+
}
73+
4474
export type ApplicationDenied = BaseEvent & {
4575
type: "application.denied"
4676
relationships: {

0 commit comments

Comments
 (0)