diff options
author | Florian Dold <florian@dold.me> | 2022-09-16 17:21:54 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2022-09-16 17:21:54 +0200 |
commit | 16e7814445d57c2494ddaf3aaf11d60abb2b036b (patch) | |
tree | 778f4e473b9f4b8665ea4e9c2ccf59b9836e993f /packages/taler-wallet-core/src/db.ts | |
parent | d6c545a0ba68d5fce107779d4b0a2244a137b1aa (diff) | |
download | wallet-core-16e7814445d57c2494ddaf3aaf11d60abb2b036b.tar.xz |
-move declaration
Diffstat (limited to 'packages/taler-wallet-core/src/db.ts')
-rw-r--r-- | packages/taler-wallet-core/src/db.ts | 46 |
1 files changed, 3 insertions, 43 deletions
diff --git a/packages/taler-wallet-core/src/db.ts b/packages/taler-wallet-core/src/db.ts index 6466edf5a..fdb9b668e 100644 --- a/packages/taler-wallet-core/src/db.ts +++ b/packages/taler-wallet-core/src/db.ts @@ -45,7 +45,7 @@ import { Location, WireInfo, } from "@gnu-taler/taler-util"; -import { RetryInfo } from "./util/retries.js"; +import { RetryInfo, RetryTags } from "./util/retries.js"; import { Event, IDBDatabase } from "@gnu-taler/idb-bridge"; import { DenomInfo } from "./internal-wallet-state.js"; @@ -1719,6 +1719,8 @@ export interface OperationRetryRecord { /** * Unique identifier for the operation. Typically of * the format `${opType}-${opUniqueKey}` + * + * @see {@link RetryTags} */ id: string; @@ -1727,48 +1729,6 @@ export interface OperationRetryRecord { retryInfo: RetryInfo; } -export enum OperationAttemptResultType { - Finished = "finished", - Pending = "pending", - Error = "error", - Longpoll = "longpoll", -} - -// FIXME: not part of DB! -export type OperationAttemptResult<TSuccess = unknown, TPending = unknown> = - | OperationAttemptFinishedResult<TSuccess> - | OperationAttemptErrorResult - | OperationAttemptLongpollResult - | OperationAttemptPendingResult<TPending>; - -export namespace OperationAttemptResult { - export function finishedEmpty(): OperationAttemptResult<unknown, unknown> { - return { - type: OperationAttemptResultType.Finished, - result: undefined, - }; - } -} - -export interface OperationAttemptFinishedResult<T> { - type: OperationAttemptResultType.Finished; - result: T; -} - -export interface OperationAttemptPendingResult<T> { - type: OperationAttemptResultType.Pending; - result: T; -} - -export interface OperationAttemptErrorResult { - type: OperationAttemptResultType.Error; - errorDetail: TalerErrorDetail; -} - -export interface OperationAttemptLongpollResult { - type: OperationAttemptResultType.Longpoll; -} - /** * Availability of coins of a given denomination (and age restriction!). * |