diff options
author | Florian Dold <florian.dold@gmail.com> | 2019-12-06 02:52:16 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2019-12-06 02:52:16 +0100 |
commit | 4159367d8c04b96a05da8a5ded043f8296a83174 (patch) | |
tree | 5587538fb13aead06d639a03e96cc09adcd99dd7 /src/walletTypes.ts | |
parent | d8170c815913b4395febc4ce3402fe45ba0d2e87 (diff) | |
download | wallet-core-4159367d8c04b96a05da8a5ded043f8296a83174.tar.xz |
pending ops / history / notification tweaks
Diffstat (limited to 'src/walletTypes.ts')
-rw-r--r-- | src/walletTypes.ts | 81 |
1 files changed, 80 insertions, 1 deletions
diff --git a/src/walletTypes.ts b/src/walletTypes.ts index f27970330..6e246c682 100644 --- a/src/walletTypes.ts +++ b/src/walletTypes.ts @@ -506,6 +506,7 @@ export interface PendingPayOperation { } export const enum NotificationType { + CoinWithdrawn = "coin-withdrawn", ProposalAccepted = "proposal-accepted", ProposalDownloaded = "proposal-downloaded", RefundsSubmitted = "refunds-submitted", @@ -518,9 +519,21 @@ export const enum NotificationType { ReserveUpdated = "reserve-updated", ReserveConfirmed = "reserve-confirmed", ReserveDepleted = "reserve-depleted", + WithdrawSessionCreated = "withdraw-session-created", WithdrawSessionFinished = "withdraw-session-finished", WaitingForRetry = "waiting-for-retry", + RefundStarted = "refund-started", + RefundQueried = "refund-queried", RefundFinished = "refund-finished", + ExchangeOperationError = "exchange-operation-error", + RefreshOperationError = "refresh-operation-error", + RefundApplyOperationError = "refund-apply-error", + RefundStatusOperationError = "refund-status-error", + ProposalOperationError = "proposal-error", + TipOperationError = "tip-error", + PayOperationError = "pay-error", + WithdrawOperationError = "withdraw-error", + ReserveOperationError = "reserve-error", } export interface ProposalAcceptedNotification { @@ -528,6 +541,18 @@ export interface ProposalAcceptedNotification { proposalId: string; } +export interface CoinWithdrawnNotification { + type: NotificationType.CoinWithdrawn; +} + +export interface RefundStartedNotification { + type: NotificationType.RefundStarted; +} + +export interface RefundQueriedNotification { + type: NotificationType.RefundQueried; +} + export interface ProposalDownloadedNotification { type: NotificationType.ProposalDownloaded; proposalId: string; @@ -570,6 +595,11 @@ export interface ReserveConfirmedNotification { type: NotificationType.ReserveConfirmed; } +export interface WithdrawSessionCreatedNotification { + type: NotificationType.WithdrawSessionCreated; + withdrawSessionId: string; +} + export interface WithdrawSessionFinishedNotification { type: NotificationType.WithdrawSessionFinished; withdrawSessionId: string; @@ -590,7 +620,52 @@ export interface RefundFinishedNotification { type: NotificationType.RefundFinished; } +export interface ExchangeOperationErrorNotification { + type: NotificationType.ExchangeOperationError; +} + +export interface RefreshOperationErrorNotification { + type: NotificationType.RefreshOperationError; +} + +export interface RefundStatusOperationErrorNotification { + type: NotificationType.RefundStatusOperationError; +} + +export interface RefundApplyOperationErrorNotification { + type: NotificationType.RefundApplyOperationError; +} + +export interface PayOperationErrorNotification { + type: NotificationType.PayOperationError; +} + +export interface ProposalOperationErrorNotification { + type: NotificationType.ProposalOperationError; +} + +export interface TipOperationErrorNotification { + type: NotificationType.TipOperationError; +} + +export interface WithdrawOperationErrorNotification { + type: NotificationType.WithdrawOperationError; +} + +export interface ReserveOperationErrorNotification { + type: NotificationType.ReserveOperationError; +} + export type WalletNotification = + | WithdrawOperationErrorNotification + | ReserveOperationErrorNotification + | ExchangeOperationErrorNotification + | RefreshOperationErrorNotification + | RefundStatusOperationErrorNotification + | RefundApplyOperationErrorNotification + | ProposalOperationErrorNotification + | PayOperationErrorNotification + | TipOperationErrorNotification | ProposalAcceptedNotification | ProposalDownloadedNotification | RefundsSubmittedNotification @@ -605,7 +680,11 @@ export type WalletNotification = | WithdrawSessionFinishedNotification | ReserveDepletedNotification | WaitingForRetryNotification - | RefundFinishedNotification; + | RefundStartedNotification + | RefundFinishedNotification + | RefundQueriedNotification + | WithdrawSessionCreatedNotification + | CoinWithdrawnNotification; export interface OperationError { type: string; |