From 1c286ebb2f1c817f5362517d47466c39826c8699 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Tue, 16 Jan 2024 13:15:40 +0100 Subject: wallet-core: implement remaining DD48 calls, test --- packages/taler-wallet-core/src/wallet-api-types.ts | 37 ++++++++++++++++++---- 1 file changed, 31 insertions(+), 6 deletions(-) (limited to 'packages/taler-wallet-core/src/wallet-api-types.ts') diff --git a/packages/taler-wallet-core/src/wallet-api-types.ts b/packages/taler-wallet-core/src/wallet-api-types.ts index 7d3dc86a3..2cbf693f5 100644 --- a/packages/taler-wallet-core/src/wallet-api-types.ts +++ b/packages/taler-wallet-core/src/wallet-api-types.ts @@ -130,6 +130,9 @@ import { WithdrawUriInfoResponse, WithdrawalTransactionByURIRequest, TransactionWithdrawal, + GetExchangeResourcesRequest, + DeleteExchangeRequest, + GetExchangeResourcesResponse, } from "@gnu-taler/taler-util"; import { AddBackupProviderRequest, @@ -238,6 +241,8 @@ export enum WalletApiOperation { ListExchangesForScopedCurrency = "listExchangesForScopedCurrency", PrepareWithdrawExchange = "prepareWithdrawExchange", TestingInfiniteTransactionLoop = "testingInfiniteTransactionLoop", + GetExchangeResources = "getExchangeResources", + DeleteExchange = "deleteExchange", } // group: Initialization @@ -667,6 +672,24 @@ export type GetExchangeEntryByUrlOp = { response: GetExchangeEntryByUrlResponse; }; +/** + * Get resources associated with an exchange. + */ +export type GetExchangeResourcesOp = { + op: WalletApiOperation.GetExchangeResources; + request: GetExchangeResourcesRequest; + response: GetExchangeResourcesResponse; +}; + +/** + * Get resources associated with an exchange. + */ +export type DeleteExchangeOp = { + op: WalletApiOperation.GetExchangeResources; + request: DeleteExchangeRequest; + response: EmptyObject; +}; + /** * List currencies known to the wallet. */ @@ -1206,6 +1229,8 @@ export type WalletOperations = { [WalletApiOperation.UpdateExchangeEntry]: UpdateExchangeEntryOp; [WalletApiOperation.PrepareWithdrawExchange]: PrepareWithdrawExchangeOp; [WalletApiOperation.TestingInfiniteTransactionLoop]: any; + [WalletApiOperation.DeleteExchange]: DeleteExchangeOp; + [WalletApiOperation.GetExchangeResources]: GetExchangeResourcesOp; }; export type WalletCoreRequestType< @@ -1229,10 +1254,10 @@ type Primitives = string | number | boolean; type RecursivePartial = { [P in keyof T]?: T[P] extends Array - ? Array> - : T[P] extends Array - ? Array - : T[P] extends object - ? RecursivePartial - : T[P]; + ? Array> + : T[P] extends Array + ? Array + : T[P] extends object + ? RecursivePartial + : T[P]; } & object; -- cgit v1.2.3