From e5c9f588e4618d01f6b4c91028e175147a6b5a69 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Mon, 2 May 2022 19:21:13 -0300 Subject: add prepareRefund operation to gather information about the refund before confirm --- packages/taler-util/src/walletTypes.ts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'packages/taler-util') diff --git a/packages/taler-util/src/walletTypes.ts b/packages/taler-util/src/walletTypes.ts index e094bc385..c6367f8ee 100644 --- a/packages/taler-util/src/walletTypes.ts +++ b/packages/taler-util/src/walletTypes.ts @@ -276,6 +276,18 @@ export class ReturnCoinsRequest { static checked: (obj: any) => ReturnCoinsRequest; } +export interface PrepareRefundResult { + proposalId: string; + + applied: number; + failed: number; + total: number; + + amountEffectivePaid: AmountString; + + info: OrderShortInfo; +} + export interface PrepareTipResult { /** * Unique ID for the tip assigned by the wallet. @@ -1003,6 +1015,17 @@ export const codecForForceRefreshRequest = (): Codec => .property("coinPubList", codecForList(codecForString())) .build("ForceRefreshRequest"); + + +export interface PrepareRefundRequest { + talerRefundUri: string; +} + +export const codecForPrepareRefundRequest = (): Codec => + buildCodecForObject() + .property("talerRefundUri", codecForString()) + .build("PrepareRefundRequest"); + export interface PrepareTipRequest { talerTipUri: string; } -- cgit v1.2.3