Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions types/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ import {Relationship, Tags, UnimplementedFields, UnimplementedRelationships} fro

export type UnitEvent =
AccountClosed |
AccountFrozen |
AccountReopened |
AccountUnfrozen |
ApplicationDenied |
ApplicationAwaitingDocuments |
ApplicationPendingReview |
Expand Down Expand Up @@ -41,6 +44,33 @@ export type AccountClosed = BaseEvent & {
}
}

export type AccountFrozen = BaseEvent & {
type: "account.frozen"
attributes: {
freezeReason: string
}
relationships: {
account: Relationship
customer: Relationship
}
}

export type AccountReopened = BaseEvent & {
type: "account.reopened"
relationships: {
account: Relationship
customer: Relationship
}
}

export type AccountUnfrozen = BaseEvent & {
type: "account.unfrozen"
relationships: {
account: Relationship
customer: Relationship
}
}

export type ApplicationDenied = BaseEvent & {
type: "application.denied"
relationships: {
Expand Down