summaryrefslogtreecommitdiff
path: root/packages/taler-util
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2024-04-30 11:50:59 +0200
committerFlorian Dold <florian@dold.me>2024-04-30 11:51:07 +0200
commit8b5d1276b9d9043e85cba91704c908ff544916e0 (patch)
treebc558f2ec7fb7b77731c5afd3838567e32c7eb4f /packages/taler-util
parent22709ff4e2918a8d0e528539d11d761381920b45 (diff)
downloadwallet-core-8b5d1276b9d9043e85cba91704c908ff544916e0.tar.gz
wallet-core-8b5d1276b9d9043e85cba91704c908ff544916e0.tar.bz2
wallet-core-8b5d1276b9d9043e85cba91704c908ff544916e0.zip
wallet-core: new states for withdrawal, prepare/confirm requests
Diffstat (limited to 'packages/taler-util')
-rw-r--r--packages/taler-util/src/notifications.ts3
-rw-r--r--packages/taler-util/src/transactions-types.ts1
-rw-r--r--packages/taler-util/src/wallet-types.ts30
3 files changed, 34 insertions, 0 deletions
diff --git a/packages/taler-util/src/notifications.ts b/packages/taler-util/src/notifications.ts
index b60fb267c..d4dfe7589 100644
--- a/packages/taler-util/src/notifications.ts
+++ b/packages/taler-util/src/notifications.ts
@@ -30,6 +30,9 @@ export enum NotificationType {
BalanceChange = "balance-change",
BackupOperationError = "backup-error",
TransactionStateTransition = "transaction-state-transition",
+ /**
+ * @deprecated
+ */
WithdrawalOperationTransition = "withdrawal-operation-transition",
ExchangeStateTransition = "exchange-state-transition",
Idle = "idle",
diff --git a/packages/taler-util/src/transactions-types.ts b/packages/taler-util/src/transactions-types.ts
index ac4c3d717..cee3de9fa 100644
--- a/packages/taler-util/src/transactions-types.ts
+++ b/packages/taler-util/src/transactions-types.ts
@@ -151,6 +151,7 @@ export enum TransactionMinorState {
RefundAvailable = "refund-available",
AcceptRefund = "accept-refund",
PaidByOther = "paid-by-other",
+ CompletedByOtherWallet = "completed-by-other-wallet",
}
export enum TransactionAction {
diff --git a/packages/taler-util/src/wallet-types.ts b/packages/taler-util/src/wallet-types.ts
index 9575e6d7d..ccf3c230a 100644
--- a/packages/taler-util/src/wallet-types.ts
+++ b/packages/taler-util/src/wallet-types.ts
@@ -1883,6 +1883,36 @@ export interface GetWithdrawalDetailsForAmountRequest {
clientCancellationId?: string;
}
+export interface PrepareBankIntegratedWithdrawalRequest {
+ talerWithdrawUri: string;
+ exchangeBaseUrl: string;
+ forcedDenomSel?: ForcedDenomSel;
+ restrictAge?: number;
+}
+
+export const codecForPrepareBankIntegratedWithdrawalRequest =
+ (): Codec<PrepareBankIntegratedWithdrawalRequest> =>
+ buildCodecForObject<PrepareBankIntegratedWithdrawalRequest>()
+ .property("exchangeBaseUrl", codecForString())
+ .property("talerWithdrawUri", codecForString())
+ .property("forcedDenomSel", codecForAny())
+ .property("restrictAge", codecOptional(codecForNumber()))
+ .build("PrepareBankIntegratedWithdrawalRequest");
+
+export interface PrepareBankIntegratedWithdrawalResponse {
+ transactionId: string;
+}
+
+export interface ConfirmWithdrawalRequest {
+ transactionId: string;
+}
+
+export const codecForConfirmWithdrawalRequestRequest =
+ (): Codec<ConfirmWithdrawalRequest> =>
+ buildCodecForObject<ConfirmWithdrawalRequest>()
+ .property("transactionId", codecForString())
+ .build("ConfirmWithdrawalRequest");
+
export interface AcceptBankIntegratedWithdrawalRequest {
talerWithdrawUri: string;
exchangeBaseUrl: string;