aboutsummaryrefslogtreecommitdiff
path: root/src/types/dbTypes.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2019-12-15 21:40:06 +0100
committerFlorian Dold <florian.dold@gmail.com>2019-12-15 21:40:06 +0100
commit1b9c5855a8afb6833ff7a706f5bed5650e1191ad (patch)
treed880c4418fe337ac7dd362466b80edf94296b58e /src/types/dbTypes.ts
parent59bd755f7d6a3451859ca08084df83d465cd8500 (diff)
downloadwallet-core-1b9c5855a8afb6833ff7a706f5bed5650e1191ad.tar.xz
simplify /pay, add pay event
Diffstat (limited to 'src/types/dbTypes.ts')
-rw-r--r--src/types/dbTypes.ts17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/types/dbTypes.ts b/src/types/dbTypes.ts
index 9d2f6fe5d..7447fc546 100644
--- a/src/types/dbTypes.ts
+++ b/src/types/dbTypes.ts
@@ -1060,6 +1060,16 @@ export interface PurchaseRefundState {
}
/**
+ * Record stored for every time we successfully submitted
+ * a payment to the merchant (both first time and re-play).
+ */
+export interface PayEventRecord {
+ proposalId: string;
+ sessionId: string | undefined;
+ timestamp: Timestamp;
+}
+
+/**
* Record that stores status information about one purchase, starting from when
* the customer accepts a proposal. Includes refund status if applicable.
*/
@@ -1432,6 +1442,12 @@ export namespace Stores {
}
}
+ class PayEventsStore extends Store<PayEventRecord> {
+ constructor() {
+ super("payEvents", { keyPath: "proposalId" });
+ }
+ }
+
class BankWithdrawUrisStore extends Store<BankWithdrawUriRecord> {
constructor() {
super("bankWithdrawUris", { keyPath: "talerWithdrawUri" });
@@ -1457,6 +1473,7 @@ export namespace Stores {
export const withdrawalSession = new WithdrawalSessionsStore();
export const bankWithdrawUris = new BankWithdrawUrisStore();
export const refundEvents = new RefundEventsStore();
+ export const payEvents = new PayEventsStore();
}
/* tslint:enable:completed-docs */