summaryrefslogtreecommitdiff
path: root/src/types/dbTypes.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/types/dbTypes.ts')
-rw-r--r--src/types/dbTypes.ts58
1 files changed, 21 insertions, 37 deletions
diff --git a/src/types/dbTypes.ts b/src/types/dbTypes.ts
index a9344c045..158d438cf 100644
--- a/src/types/dbTypes.ts
+++ b/src/types/dbTypes.ts
@@ -27,7 +27,7 @@ import { AmountJson } from "../util/amounts";
import {
Auditor,
CoinDepositPermission,
- MerchantRefundPermission,
+ MerchantRefundDetails,
PayReq,
TipResponse,
ExchangeSignKeyJson,
@@ -1091,7 +1091,7 @@ export interface RefundEventRecord {
export interface RefundInfo {
refundGroupId: string;
- perm: MerchantRefundPermission;
+ perm: MerchantRefundDetails;
}
export const enum RefundReason {
@@ -1102,7 +1102,7 @@ export const enum RefundReason {
/**
* Refund from an aborted payment.
*/
- AbortRefund = "abort-refund",
+ AbortRefund = "abort-pay-refund",
}
export interface RefundGroupInfo {
@@ -1110,28 +1110,6 @@ export interface RefundGroupInfo {
reason: RefundReason;
}
-export interface PurchaseRefundState {
- /**
- * Information regarding each group of refunds we receive at once.
- */
- refundGroups: RefundGroupInfo[];
-
- /**
- * Pending refunds for the purchase.
- */
- refundsPending: { [refundSig: string]: RefundInfo };
-
- /**
- * Applied refunds for the purchase.
- */
- refundsDone: { [refundSig: string]: RefundInfo };
-
- /**
- * Submitted refunds for the purchase.
- */
- refundsFailed: { [refundSig: string]: RefundInfo };
-}
-
/**
* Record stored for every time we successfully submitted
* a payment to the merchant (both first time and re-play).
@@ -1230,9 +1208,25 @@ export interface PurchaseRecord {
timestampAccept: Timestamp;
/**
- * State of refunds for this proposal.
+ * Information regarding each group of refunds we receive at once.
+ */
+ refundGroups: RefundGroupInfo[];
+
+ /**
+ * Pending refunds for the purchase. A refund is pending
+ * when the merchant reports a transient error from the exchange.
+ */
+ refundsPending: { [refundKey: string]: RefundInfo };
+
+ /**
+ * Applied refunds for the purchase.
+ */
+ refundsDone: { [refundKey: string]: RefundInfo };
+
+ /**
+ * Refunds that permanently failed.
*/
- refundState: PurchaseRefundState;
+ refundsFailed: { [refundKey: string]: RefundInfo };
/**
* When was the last refund made?
@@ -1281,16 +1275,6 @@ export interface PurchaseRecord {
lastRefundStatusError: OperationError | undefined;
/**
- * Retry information for querying the refund status with the merchant.
- */
- refundApplyRetryInfo: RetryInfo;
-
- /**
- * Last error (or undefined) for querying the refund status with the merchant.
- */
- lastRefundApplyError: OperationError | undefined;
-
- /**
* Continue querying the refund status until this deadline has expired.
*/
autoRefundDeadline: Timestamp | undefined;