diff options
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!). * |