From 145c36e9ba549b7ccc72a29eaf102879011060a4 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Wed, 13 Dec 2023 14:24:33 -0300 Subject: up to date with latest libeufin api --- packages/taler-util/src/http-client/bank-core.ts | 3 ++- packages/taler-util/src/http-client/types.ts | 17 +++++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) (limited to 'packages/taler-util/src/http-client') diff --git a/packages/taler-util/src/http-client/bank-core.ts b/packages/taler-util/src/http-client/bank-core.ts index 2b67fc638..51d6d7c96 100644 --- a/packages/taler-util/src/http-client/bank-core.ts +++ b/packages/taler-util/src/http-client/bank-core.ts @@ -160,9 +160,10 @@ export class TalerCoreBankHttpClient { const body = await resp.json() const details = codecForTalerErrorDetail().decode(body) switch (details.code) { - case TalerErrorCode.BANK_PATCH_ADMIN_EXCHANGE: return opKnownFailure("admin-cant-be-exchange", resp); case TalerErrorCode.BANK_NON_ADMIN_PATCH_LEGAL_NAME: return opKnownFailure("user-cant-change-name", resp); case TalerErrorCode.BANK_NON_ADMIN_PATCH_DEBT_LIMIT: return opKnownFailure("user-cant-change-debt", resp); + case TalerErrorCode.BANK_NON_ADMIN_PATCH_CASHOUT: return opKnownFailure("user-cant-change-cashout", resp); + case TalerErrorCode.BANK_NON_ADMIN_PATCH_CONTACT: return opKnownFailure("user-cant-change-contact", resp); default: return opUnknownFailure(resp, body) } } diff --git a/packages/taler-util/src/http-client/types.ts b/packages/taler-util/src/http-client/types.ts index efff7bb0a..b0d4deca1 100644 --- a/packages/taler-util/src/http-client/types.ts +++ b/packages/taler-util/src/http-client/types.ts @@ -1477,22 +1477,23 @@ export namespace TalerCorebankApi { // If missing, cashouts will fail. // In the future, might be used for other transactions // as well. + // Only admin can change this property. contact_data?: ChallengeContactData; - // 'payto' address pointing a bank account - // external to the libeufin-bank. + // 'payto' URI of a fiat bank account. // Payments will be sent to this bank account - // when the user wants to convert the local currency - // back to fiat currency outside libeufin-bank. + // when the user wants to convert the regional currency + // back to fiat currency outside bank. + // Only admin can change this property if not allowed in config cashout_payto_uri?: PaytoString; + // If present, change the legal name associated with $username. + // Only admin can change this property if not allowed in config + name?: string; + // Make this account visible to anyone? is_public?: boolean; - // Legal name associated with $username. - // When missing, the old name is kept. - name?: string; - // If present, change the max debit allowed for this user // Only admin can change this property. debit_threshold?: AmountString; -- cgit v1.2.3