diff options
Diffstat (limited to 'packages/taler-util/src/notifications.ts')
-rw-r--r-- | packages/taler-util/src/notifications.ts | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/packages/taler-util/src/notifications.ts b/packages/taler-util/src/notifications.ts index a8a8c3299..49952295a 100644 --- a/packages/taler-util/src/notifications.ts +++ b/packages/taler-util/src/notifications.ts @@ -24,7 +24,11 @@ */ import { AbsoluteTime } from "./time.js"; import { TransactionState } from "./transactions-types.js"; -import { ExchangeEntryState, TalerErrorDetail } from "./wallet-types.js"; +import { + ExchangeEntryState, + TalerErrorDetail, + TransactionIdStr, +} from "./wallet-types.js"; export enum NotificationType { BalanceChange = "balance-change", @@ -134,6 +138,12 @@ export enum ObservabilityEventType { CryptoFinishSuccess = "crypto-finish-success", CryptoFinishError = "crypto-finish-error", Message = "message", + /** + * Declare that an observability event is relevant to a particular transaction. + * If emitted from a request/task, all past/future events for that request/task + * should be shown for the transaction as well. + */ + DeclareConcernsTransaction = "declare-concerns-transaction", } export type ObservabilityEvent = @@ -217,6 +227,10 @@ export type ObservabilityEvent = | { type: ObservabilityEventType.Message; contents: string; + } + | { + type: ObservabilityEventType.DeclareConcernsTransaction; + transactionId: TransactionIdStr; }; export interface BackupOperationErrorNotification { |