diff options
author | Sebastian <sebasjm@gmail.com> | 2024-02-28 22:41:41 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2024-02-28 22:41:41 -0300 |
commit | 74b9ee559fc57f48a591140eb342cc8e2bbd3dd3 (patch) | |
tree | c26fb1cf465edc41ba625ce790eed2c71f308f77 /packages/taler-util/src | |
parent | 83c5a50f6c95a9ddde0db6ae1eeb6039550375e5 (diff) | |
download | wallet-core-74b9ee559fc57f48a591140eb342cc8e2bbd3dd3.tar.gz wallet-core-74b9ee559fc57f48a591140eb342cc8e2bbd3dd3.tar.bz2 wallet-core-74b9ee559fc57f48a591140eb342cc8e2bbd3dd3.zip |
get activity
Diffstat (limited to 'packages/taler-util/src')
-rw-r--r-- | packages/taler-util/src/wallet-types.ts | 38 |
1 files changed, 33 insertions, 5 deletions
diff --git a/packages/taler-util/src/wallet-types.ts b/packages/taler-util/src/wallet-types.ts index c336752a4..19bebfb19 100644 --- a/packages/taler-util/src/wallet-types.ts +++ b/packages/taler-util/src/wallet-types.ts @@ -580,11 +580,11 @@ export interface CoinDumpJson { withdrawal_reserve_pub: string | undefined; coin_status: CoinStatus; spend_allocation: - | { - id: string; - amount: AmountString; - } - | undefined; + | { + id: string; + amount: AmountString; + } + | undefined; /** * Information about the age restriction */ @@ -2518,6 +2518,34 @@ export const codecForWithdrawFakebankRequest = .property("exchange", codecForString()) .build("WithdrawFakebankRequest"); +export interface ActiveTask { + id: string; + transaction: TransactionIdStr | undefined; + firstTry: AbsoluteTime | undefined; + nextTry: AbsoluteTime | undefined; + counter: number | undefined; + lastError: TalerErrorDetail | undefined; +} + +export interface GetActiveTasks { + tasks: ActiveTask[]; +} + +export const codecForActiveTask = (): Codec<ActiveTask> => + buildCodecForObject<ActiveTask>() + .property("id", codecForString()) + .property("transaction", codecOptional(codecForTransactionIdStr())) + .property("counter", codecForNumber()) + .property("firstTry", (codecForAbsoluteTime)) + .property("nextTry", (codecForAbsoluteTime)) + .property("lastError", codecForTalerErrorDetail()) + .build("ActiveTask") + +export const codecForGetActiveTasks = (): Codec<GetActiveTasks> => + buildCodecForObject<GetActiveTasks>() + .property("tasks", codecForList(codecForActiveTask())) + .build("GetActiveTasks") + export interface ImportDbRequest { dump: any; } |