wallet-core: more info in types

This commit is contained in:
Florian Dold 2022-10-04 18:45:01 +02:00
parent 3cecb7e4b4
commit 21fd8074cd
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B

View File

@ -159,6 +159,7 @@ export type InitWalletOp = {
* Get current wallet balance. * Get current wallet balance.
*/ */
export type GetBalancesOp = { export type GetBalancesOp = {
op: WalletApiOperation.GetBalances;
request: {}; request: {};
response: BalancesResponse; response: BalancesResponse;
}; };
@ -169,6 +170,7 @@ export type GetBalancesOp = {
* Get transactions. * Get transactions.
*/ */
export type GetTransactionsOp = { export type GetTransactionsOp = {
op: WalletApiOperation.GetTransactions;
request: TransactionsRequest; request: TransactionsRequest;
response: TransactionsResponse; response: TransactionsResponse;
}; };
@ -177,6 +179,7 @@ export type GetTransactionsOp = {
* Delete a transaction locally in the wallet. * Delete a transaction locally in the wallet.
*/ */
export type DeleteTransactionOp = { export type DeleteTransactionOp = {
op: WalletApiOperation.DeleteTransaction;
request: DeleteTransactionRequest; request: DeleteTransactionRequest;
response: {}; response: {};
}; };
@ -185,6 +188,7 @@ export type DeleteTransactionOp = {
* Immediately retry a transaction. * Immediately retry a transaction.
*/ */
export type RetryTransactionOp = { export type RetryTransactionOp = {
op: WalletApiOperation.RetryTransaction;
request: RetryTransactionRequest; request: RetryTransactionRequest;
response: {}; response: {};
}; };
@ -195,6 +199,7 @@ export type RetryTransactionOp = {
* Get details for withdrawing a particular amount (manual withdrawal). * Get details for withdrawing a particular amount (manual withdrawal).
*/ */
export type GetWithdrawalDetailsForAmountOp = { export type GetWithdrawalDetailsForAmountOp = {
op: WalletApiOperation.GetWithdrawalDetailsForAmount;
request: GetWithdrawalDetailsForAmountRequest; request: GetWithdrawalDetailsForAmountRequest;
response: ManualWithdrawalDetails; response: ManualWithdrawalDetails;
}; };
@ -203,6 +208,7 @@ export type GetWithdrawalDetailsForAmountOp = {
* Get details for withdrawing via a particular taler:// URI. * Get details for withdrawing via a particular taler:// URI.
*/ */
export type GetWithdrawalDetailsForUriOp = { export type GetWithdrawalDetailsForUriOp = {
op: WalletApiOperation.GetWithdrawalDetailsForUri;
request: GetWithdrawalDetailsForUriRequest; request: GetWithdrawalDetailsForUriRequest;
response: WithdrawUriInfoResponse; response: WithdrawUriInfoResponse;
}; };
@ -211,6 +217,7 @@ export type GetWithdrawalDetailsForUriOp = {
* Accept a bank-integrated withdrawal. * Accept a bank-integrated withdrawal.
*/ */
export type AcceptBankIntegratedWithdrawalOp = { export type AcceptBankIntegratedWithdrawalOp = {
op: WalletApiOperation.AcceptBankIntegratedWithdrawal;
request: AcceptBankIntegratedWithdrawalRequest; request: AcceptBankIntegratedWithdrawalRequest;
response: AcceptWithdrawalResponse; response: AcceptWithdrawalResponse;
}; };
@ -219,6 +226,7 @@ export type AcceptBankIntegratedWithdrawalOp = {
* Create a manual withdrawal. * Create a manual withdrawal.
*/ */
export type AcceptManualWithdrawalOp = { export type AcceptManualWithdrawalOp = {
op: WalletApiOperation.AcceptManualWithdrawal;
request: AcceptManualWithdrawalRequest; request: AcceptManualWithdrawalRequest;
response: AcceptManualWithdrawalResult; response: AcceptManualWithdrawalResult;
}; };
@ -248,6 +256,7 @@ export type ConfirmPayOp = {
* Abort a pending payment with a refund. * Abort a pending payment with a refund.
*/ */
export type AbortPayWithRefundOp = { export type AbortPayWithRefundOp = {
op: WalletApiOperation.AbortFailedPayWithRefund;
request: AbortPayWithRefundRequest; request: AbortPayWithRefundRequest;
response: {}; response: {};
}; };
@ -256,6 +265,7 @@ export type AbortPayWithRefundOp = {
* Check for a refund based on a taler://refund URI. * Check for a refund based on a taler://refund URI.
*/ */
export type ApplyRefundOp = { export type ApplyRefundOp = {
op: WalletApiOperation.ApplyRefund;
request: ApplyRefundRequest; request: ApplyRefundRequest;
response: ApplyRefundResponse; response: ApplyRefundResponse;
}; };
@ -266,6 +276,7 @@ export type ApplyRefundOp = {
* Query and store information about a tip. * Query and store information about a tip.
*/ */
export type PrepareTipOp = { export type PrepareTipOp = {
op: WalletApiOperation.PrepareTip;
request: PrepareTipRequest; request: PrepareTipRequest;
response: PrepareTipResult; response: PrepareTipResult;
}; };
@ -274,6 +285,7 @@ export type PrepareTipOp = {
* Accept a tip. * Accept a tip.
*/ */
export type AcceptTipOp = { export type AcceptTipOp = {
op: WalletApiOperation.AcceptTip;
request: AcceptTipRequest; request: AcceptTipRequest;
response: {}; response: {};
}; };
@ -284,6 +296,7 @@ export type AcceptTipOp = {
* List exchanges known to the wallet. * List exchanges known to the wallet.
*/ */
export type ListExchangesOp = { export type ListExchangesOp = {
op: WalletApiOperation.ListExchanges;
request: {}; request: {};
response: ExchangesListResponse; response: ExchangesListResponse;
}; };
@ -292,6 +305,7 @@ export type ListExchangesOp = {
* Add / force-update an exchange. * Add / force-update an exchange.
*/ */
export type AddExchangeOp = { export type AddExchangeOp = {
op: WalletApiOperation.AddExchange;
request: AddExchangeRequest; request: AddExchangeRequest;
response: {}; response: {};
}; };
@ -300,6 +314,7 @@ export type AddExchangeOp = {
* Accept a particular version of the exchange terms of service. * Accept a particular version of the exchange terms of service.
*/ */
export type SetExchangeTosAcceptedOp = { export type SetExchangeTosAcceptedOp = {
op: WalletApiOperation.SetExchangeTosAccepted;
request: AcceptExchangeTosRequest; request: AcceptExchangeTosRequest;
response: {}; response: {};
}; };
@ -308,6 +323,7 @@ export type SetExchangeTosAcceptedOp = {
* Get the current terms of a service of an exchange. * Get the current terms of a service of an exchange.
*/ */
export type GetExchangeTosOp = { export type GetExchangeTosOp = {
op: WalletApiOperation.GetExchangeTos;
request: GetExchangeTosRequest; request: GetExchangeTosRequest;
response: GetExchangeTosResult; response: GetExchangeTosResult;
}; };
@ -316,6 +332,7 @@ export type GetExchangeTosOp = {
* List currencies known to the wallet. * List currencies known to the wallet.
*/ */
export type ListCurrenciesOp = { export type ListCurrenciesOp = {
op: WalletApiOperation.ListCurrencies;
request: {}; request: {};
response: WalletCurrencyInfo; response: WalletCurrencyInfo;
}; };
@ -329,6 +346,7 @@ export type ListCurrenciesOp = {
* account, usually the wallet user's own bank account. * account, usually the wallet user's own bank account.
*/ */
export type CreateDepositGroupOp = { export type CreateDepositGroupOp = {
op: WalletApiOperation.CreateDepositGroup;
request: CreateDepositGroupRequest; request: CreateDepositGroupRequest;
response: CreateDepositGroupResponse; response: CreateDepositGroupResponse;
}; };
@ -337,6 +355,7 @@ export type CreateDepositGroupOp = {
* Track the status of a deposit group by querying the exchange. * Track the status of a deposit group by querying the exchange.
*/ */
export type TrackDepositGroupOp = { export type TrackDepositGroupOp = {
op: WalletApiOperation.TrackDepositGroup;
request: TrackDepositGroupRequest; request: TrackDepositGroupRequest;
response: TrackDepositGroupResponse; response: TrackDepositGroupResponse;
}; };
@ -347,6 +366,7 @@ export type TrackDepositGroupOp = {
* Export the recovery information for the wallet. * Export the recovery information for the wallet.
*/ */
export type ExportBackupRecoveryOp = { export type ExportBackupRecoveryOp = {
op: WalletApiOperation.ExportBackupRecovery;
request: {}; request: {};
response: BackupRecovery; response: BackupRecovery;
}; };
@ -355,6 +375,7 @@ export type ExportBackupRecoveryOp = {
* Import recovery information into the wallet. * Import recovery information into the wallet.
*/ */
export type ImportBackupRecoveryOp = { export type ImportBackupRecoveryOp = {
op: WalletApiOperation.ImportBackupRecovery;
request: RecoveryLoadRequest; request: RecoveryLoadRequest;
response: {}; response: {};
}; };
@ -363,6 +384,7 @@ export type ImportBackupRecoveryOp = {
* Manually make and upload a backup. * Manually make and upload a backup.
*/ */
export type RunBackupCycleOp = { export type RunBackupCycleOp = {
op: WalletApiOperation.RunBackupCycle;
request: {}; request: {};
response: {}; response: {};
}; };
@ -371,6 +393,7 @@ export type RunBackupCycleOp = {
* Add a new backup provider. * Add a new backup provider.
*/ */
export type AddBackupProviderOp = { export type AddBackupProviderOp = {
op: WalletApiOperation.AddBackupProvider;
request: AddBackupProviderRequest; request: AddBackupProviderRequest;
response: {}; response: {};
}; };
@ -379,6 +402,7 @@ export type AddBackupProviderOp = {
* Get some useful stats about the backup state. * Get some useful stats about the backup state.
*/ */
export type GetBackupInfoOp = { export type GetBackupInfoOp = {
op: WalletApiOperation.GetBackupInfo;
request: {}; request: {};
response: BackupInfo; response: BackupInfo;
}; };
@ -389,6 +413,7 @@ export type GetBackupInfoOp = {
* the backup of another wallet. * the backup of another wallet.
*/ */
export type SetWalletDeviceIdOp = { export type SetWalletDeviceIdOp = {
op: WalletApiOperation.SetWalletDeviceId;
request: SetWalletDeviceIdRequest; request: SetWalletDeviceIdRequest;
response: {}; response: {};
}; };
@ -397,6 +422,7 @@ export type SetWalletDeviceIdOp = {
* Export a backup JSON, mostly useful for testing. * Export a backup JSON, mostly useful for testing.
*/ */
export type ExportBackupPlainOp = { export type ExportBackupPlainOp = {
op: WalletApiOperation.ExportBackupPlain;
request: {}; request: {};
response: WalletBackupContentV1; response: WalletBackupContentV1;
}; };
@ -407,6 +433,7 @@ export type ExportBackupPlainOp = {
* Initiate an outgoing peer push payment. * Initiate an outgoing peer push payment.
*/ */
export type InitiatePeerPushPaymentOp = { export type InitiatePeerPushPaymentOp = {
op: WalletApiOperation.InitiatePeerPushPayment;
request: InitiatePeerPushPaymentRequest; request: InitiatePeerPushPaymentRequest;
response: InitiatePeerPushPaymentResponse; response: InitiatePeerPushPaymentResponse;
}; };
@ -415,6 +442,7 @@ export type InitiatePeerPushPaymentOp = {
* Check an incoming peer push payment. * Check an incoming peer push payment.
*/ */
export type CheckPeerPushPaymentOp = { export type CheckPeerPushPaymentOp = {
op: WalletApiOperation.CheckPeerPushPayment;
request: CheckPeerPushPaymentRequest; request: CheckPeerPushPaymentRequest;
response: CheckPeerPushPaymentResponse; response: CheckPeerPushPaymentResponse;
}; };
@ -423,6 +451,7 @@ export type CheckPeerPushPaymentOp = {
* Accept an incoming peer push payment. * Accept an incoming peer push payment.
*/ */
export type AcceptPeerPushPaymentOp = { export type AcceptPeerPushPaymentOp = {
op: WalletApiOperation.AcceptPeerPushPayment;
request: AcceptPeerPushPaymentRequest; request: AcceptPeerPushPaymentRequest;
response: {}; response: {};
}; };
@ -431,6 +460,7 @@ export type AcceptPeerPushPaymentOp = {
* Initiate an outgoing peer pull payment. * Initiate an outgoing peer pull payment.
*/ */
export type InitiatePeerPullPaymentOp = { export type InitiatePeerPullPaymentOp = {
op: WalletApiOperation.InitiatePeerPullPayment;
request: InitiatePeerPullPaymentRequest; request: InitiatePeerPullPaymentRequest;
response: InitiatePeerPullPaymentResponse; response: InitiatePeerPullPaymentResponse;
}; };
@ -439,6 +469,7 @@ export type InitiatePeerPullPaymentOp = {
* Prepare for an incoming peer pull payment. * Prepare for an incoming peer pull payment.
*/ */
export type CheckPeerPullPaymentOp = { export type CheckPeerPullPaymentOp = {
op: WalletApiOperation.CheckPeerPullPayment;
request: CheckPeerPullPaymentRequest; request: CheckPeerPullPaymentRequest;
response: CheckPeerPullPaymentResponse; response: CheckPeerPullPaymentResponse;
}; };
@ -447,6 +478,7 @@ export type CheckPeerPullPaymentOp = {
* Accept an incoming peer pull payment. * Accept an incoming peer pull payment.
*/ */
export type AcceptPeerPullPaymentOp = { export type AcceptPeerPullPaymentOp = {
op: WalletApiOperation.AcceptPeerPullPayment;
request: AcceptPeerPullPaymentRequest; request: AcceptPeerPullPaymentRequest;
response: {}; response: {};
}; };
@ -457,6 +489,7 @@ export type AcceptPeerPullPaymentOp = {
* Exoport the wallet database's contents to JSON. * Exoport the wallet database's contents to JSON.
*/ */
export type ExportDbOp = { export type ExportDbOp = {
op: WalletApiOperation.ExportDb;
request: {}; request: {};
response: any; response: any;
}; };
@ -465,6 +498,7 @@ export type ExportDbOp = {
* Dangerously clear the whole wallet database. * Dangerously clear the whole wallet database.
*/ */
export type ClearDbOp = { export type ClearDbOp = {
op: WalletApiOperation.ClearDb;
request: {}; request: {};
response: {}; response: {};
}; };
@ -473,6 +507,7 @@ export type ClearDbOp = {
* Export a backup, clear the database and re-import it. * Export a backup, clear the database and re-import it.
*/ */
export type RecycleOp = { export type RecycleOp = {
op: WalletApiOperation.Recycle;
request: {}; request: {};
response: {}; response: {};
}; };
@ -484,6 +519,7 @@ export type RecycleOp = {
* of the exchange and merchant. * of the exchange and merchant.
*/ */
export type RunIntegrationTestOp = { export type RunIntegrationTestOp = {
op: WalletApiOperation.RunIntegrationTest;
request: IntegrationTestArgs; request: IntegrationTestArgs;
response: {}; response: {};
}; };
@ -493,6 +529,7 @@ export type RunIntegrationTestOp = {
* and merchant. * and merchant.
*/ */
export type WithdrawTestBalanceOp = { export type WithdrawTestBalanceOp = {
op: WalletApiOperation.WithdrawTestBalance;
request: WithdrawTestBalanceRequest; request: WithdrawTestBalanceRequest;
response: {}; response: {};
}; };
@ -511,6 +548,7 @@ export type WithdrawTestkudosOp = {
* the exchange and merchant. * the exchange and merchant.
*/ */
export type TestPayOp = { export type TestPayOp = {
op: WalletApiOperation.TestPay;
request: TestPayArgs; request: TestPayArgs;
response: TestPayResult; response: TestPayResult;
}; };
@ -530,6 +568,7 @@ export type WithdrawFakebankOp = {
* Get wallet-internal pending tasks. * Get wallet-internal pending tasks.
*/ */
export type GetPendingTasksOp = { export type GetPendingTasksOp = {
op: WalletApiOperation.GetPendingOperations;
request: {}; request: {};
response: PendingTasksResponse; response: PendingTasksResponse;
}; };
@ -538,6 +577,7 @@ export type GetPendingTasksOp = {
* Dump all coins of the wallet in a simple JSON format. * Dump all coins of the wallet in a simple JSON format.
*/ */
export type DumpCoinsOp = { export type DumpCoinsOp = {
op: WalletApiOperation.DumpCoins;
request: {}; request: {};
response: CoinDumpJson; response: CoinDumpJson;
}; };
@ -547,6 +587,7 @@ export type DumpCoinsOp = {
* Suspended coins won't be used for payments. * Suspended coins won't be used for payments.
*/ */
export type SetCoinSuspendedOp = { export type SetCoinSuspendedOp = {
op: WalletApiOperation.SetCoinSuspended;
request: SetCoinSuspendedRequest; request: SetCoinSuspendedRequest;
response: {}; response: {};
}; };
@ -556,6 +597,7 @@ export type SetCoinSuspendedOp = {
* be necessary. * be necessary.
*/ */
export type ForceRefreshOp = { export type ForceRefreshOp = {
op: WalletApiOperation.ForceRefresh;
request: ForceRefreshRequest; request: ForceRefreshRequest;
response: {}; response: {};
}; };