gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-wallet-core] branch master updated: new api for creating account


From: gnunet
Subject: [taler-wallet-core] branch master updated: new api for creating account
Date: Wed, 29 Nov 2023 19:11:14 +0100

This is an automated email from the git hooks/post-receive script.

sebasjm pushed a commit to branch master
in repository wallet-core.

The following commit(s) were added to refs/heads/master by this push:
     new 4324a5c3b new api for creating account
4324a5c3b is described below

commit 4324a5c3bf3ba636b99440c94986420c795dc03a
Author: Sebastian <sebasjm@gmail.com>
AuthorDate: Wed Nov 29 13:41:22 2023 -0300

    new api for creating account
---
 packages/taler-util/src/http-client/bank-core.ts |  4 ++--
 packages/taler-util/src/http-client/types.ts     | 13 +++++++++++++
 2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/packages/taler-util/src/http-client/bank-core.ts 
b/packages/taler-util/src/http-client/bank-core.ts
index 9d1a18e04..83adb6370 100644
--- a/packages/taler-util/src/http-client/bank-core.ts
+++ b/packages/taler-util/src/http-client/bank-core.ts
@@ -31,7 +31,7 @@ import { TalerAuthenticationHttpClient } from 
"./authentication.js";
 import { TalerBankIntegrationHttpClient } from "./bank-integration.js";
 import { TalerRevenueHttpClient } from "./bank-revenue.js";
 import { TalerWireGatewayHttpClient } from "./bank-wire.js";
-import { AccessToken, PaginationParams, TalerCorebankApi, UserAndToken, 
codecForAccountData, codecForBankAccountCreateWithdrawalResponse, 
codecForBankAccountGetWithdrawalResponse, codecForBankAccountTransactionInfo, 
codecForBankAccountTransactionsResponse, codecForCashinConversionResponse, 
codecForCashoutConversionResponse, codecForCashoutPending, 
codecForCashoutStatusResponse, codecForCashouts, codecForCoreBankConfig, 
codecForGlobalCashouts, codecForListBankAccountsResponse, codecForMon [...]
+import { AccessToken, PaginationParams, TalerCorebankApi, UserAndToken, 
codecForAccountData, codecForBankAccountCreateWithdrawalResponse, 
codecForBankAccountGetWithdrawalResponse, codecForBankAccountTransactionInfo, 
codecForBankAccountTransactionsResponse, codecForCashinConversionResponse, 
codecForCashoutConversionResponse, codecForCashoutPending, 
codecForCashoutStatusResponse, codecForCashouts, codecForCoreBankConfig, 
codecForGlobalCashouts, codecForListBankAccountsResponse, codecForMon [...]
 import { addPaginationParams, makeBearerTokenAuthHeader } from "./utils.js";
 import { TalerBankConversionHttpClient } from "./bank-conversion.js";
 
@@ -94,7 +94,7 @@ export class TalerCoreBankHttpClient {
       },
     });
     switch (resp.status) {
-      case HttpStatusCode.Created: return opEmptySuccess()
+      case HttpStatusCode.Ok: return opSuccess(resp, 
codecForRegisterAccountResponse())
       case HttpStatusCode.BadRequest: return 
opKnownFailure("invalid-phone-or-email", resp);
       case HttpStatusCode.Unauthorized: return opKnownFailure("unauthorized", 
resp);
       case HttpStatusCode.Conflict: {
diff --git a/packages/taler-util/src/http-client/types.ts 
b/packages/taler-util/src/http-client/types.ts
index bc9c2bc82..153cb340c 100644
--- a/packages/taler-util/src/http-client/types.ts
+++ b/packages/taler-util/src/http-client/types.ts
@@ -380,6 +380,14 @@ export const codecForBankAccountTransactionInfo =
       .property("date", codecForTimestamp)
       .build("TalerCorebankApi.BankAccountTransactionInfo");
 
+
+export const codecForRegisterAccountResponse =
+  (): Codec<TalerCorebankApi.RegisterAccountResponse> =>
+    buildCodecForObject<TalerCorebankApi.RegisterAccountResponse>()
+      .property("internal_payto_uri", codecForPaytoString())
+      .build("TalerCorebankApi.RegisterAccountResponse");
+
+
 export const codecForBankAccountCreateWithdrawalResponse =
   (): Codec<TalerCorebankApi.BankAccountCreateWithdrawalResponse> =>
     buildCodecForObject<TalerCorebankApi.BankAccountCreateWithdrawalResponse>()
@@ -1283,6 +1291,11 @@ export namespace TalerCorebankApi {
     amount?: AmountString;
   }
 
+  export interface RegisterAccountResponse {
+    // Internal payto URI of this bank account.
+    internal_payto_uri: PaytoString;
+  }
+
   export interface RegisterAccountRequest {
     // Username
     username: string;

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]