aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-util/src
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2024-01-29 21:29:26 +0100
committerFlorian Dold <florian@dold.me>2024-01-29 21:29:35 +0100
commit61e3484d6ce1db846c435d84cbf5b9c3711a30f2 (patch)
tree841e9889c5814c458622904203a46853aa0e2708 /packages/taler-util/src
parent57d988cf4ceffb51e8936bd36eed4aefcdc2d2dc (diff)
downloadwallet-core-61e3484d6ce1db846c435d84cbf5b9c3711a30f2.tar.xz
wallet-core,harness: let runIntegrationTest wait for its own transactions
Diffstat (limited to 'packages/taler-util/src')
-rw-r--r--packages/taler-util/src/transactions-types.ts25
-rw-r--r--packages/taler-util/src/wallet-types.ts13
2 files changed, 32 insertions, 6 deletions
diff --git a/packages/taler-util/src/transactions-types.ts b/packages/taler-util/src/transactions-types.ts
index 00802577a..a0bc2a89d 100644
--- a/packages/taler-util/src/transactions-types.ts
+++ b/packages/taler-util/src/transactions-types.ts
@@ -207,7 +207,8 @@ export type Transaction =
| TransactionPeerPullDebit
| TransactionPeerPushCredit
| TransactionPeerPushDebit
- | TransactionInternalWithdrawal;
+ | TransactionInternalWithdrawal
+ | TransactionRecoup;
export enum TransactionType {
Withdrawal = "withdrawal",
@@ -221,6 +222,7 @@ export enum TransactionType {
PeerPushCredit = "peer-push-credit",
PeerPullDebit = "peer-pull-debit",
PeerPullCredit = "peer-pull-credit",
+ Recoup = "recoup",
}
export enum WithdrawalType {
@@ -446,6 +448,13 @@ export interface TransactionPeerPushCredit extends TransactionCommon {
amountEffective: AmountString;
}
+/**
+ * The exchange revoked a key and the wallet recoups funds.
+ */
+export interface TransactionRecoup extends TransactionCommon {
+ type: TransactionType.Recoup;
+}
+
export enum PaymentStatus {
/**
* Explicitly aborted after timeout / failure
@@ -754,3 +763,17 @@ export const codecForOrderShortInfo = (): Codec<OrderShortInfo> =>
.property("summary", codecForString())
.property("summary_i18n", codecOptional(codecForInternationalizedString()))
.build("OrderShortInfo");
+
+export interface ListAssociatedRefreshesRequest {
+ transactionId: string;
+}
+
+export const codecForListAssociatedRefreshesRequest =
+ (): Codec<ListAssociatedRefreshesRequest> =>
+ buildCodecForObject<ListAssociatedRefreshesRequest>()
+ .property("transactionId", codecForString())
+ .build("ListAssociatedRefreshesRequest");
+
+export interface ListAssociatedRefreshesResponse {
+ transactionIds: string[];
+}
diff --git a/packages/taler-util/src/wallet-types.ts b/packages/taler-util/src/wallet-types.ts
index 806e2f22b..6fcd43fc5 100644
--- a/packages/taler-util/src/wallet-types.ts
+++ b/packages/taler-util/src/wallet-types.ts
@@ -577,11 +577,11 @@ export interface CoinDumpJson {
withdrawal_reserve_pub: string | undefined;
coin_status: CoinStatus;
spend_allocation:
- | {
- id: string;
- amount: AmountString;
- }
- | undefined;
+ | {
+ id: string;
+ amount: AmountString;
+ }
+ | undefined;
/**
* Information about the age restriction
*/
@@ -2095,6 +2095,9 @@ export interface PrepareRefundRequest {
}
export interface StartRefundQueryForUriResponse {
+ /**
+ * Transaction id of the *payment* where the refund query was started.
+ */
transactionId: TransactionIdStr;
}