From 14609bb3b47c2673338a4bff34ac7a2035c83a11 Mon Sep 17 00:00:00 2001 From: meriamBenSassi Date: Mon, 15 Mar 2021 10:18:36 +0100 Subject: [PATCH] feat(enums): update the EventName enum --- src/core/ServiceAccount.ts | 27 +++++++++++++++++---------- src/lib/Algoan.enum.ts | 4 ++++ 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/src/core/ServiceAccount.ts b/src/core/ServiceAccount.ts index 4e27d9d..35a2a0d 100644 --- a/src/core/ServiceAccount.ts +++ b/src/core/ServiceAccount.ts @@ -49,18 +49,22 @@ export class ServiceAccount { */ private readonly requestBuilder: RequestBuilder; - constructor(baseUrl: string, params: IServiceAccount, options?: { apiVersion?: number; }) { + constructor(baseUrl: string, params: IServiceAccount, options?: { apiVersion?: number }) { this.id = params.id; this.clientId = params.clientId; this.clientSecret = params.clientSecret; this.createdAt = new Date(params.createdAt); this.subscriptions = []; - this.requestBuilder = new RequestBuilder(baseUrl, { - clientId: params.clientId, - clientSecret: params.clientSecret, - }, { - version: options?.apiVersion, - }); + this.requestBuilder = new RequestBuilder( + baseUrl, + { + clientId: params.clientId, + clientSecret: params.clientSecret, + }, + { + version: options?.apiVersion, + }, + ); this.config = params.config; } @@ -74,9 +78,12 @@ export class ServiceAccount { url: '/v1/service-accounts', }); - return serviceAccounts.map((sa: IServiceAccount) => new ServiceAccount(baseUrl, sa, { - apiVersion: requestBuilder.apiVersion, - })); + return serviceAccounts.map( + (sa: IServiceAccount) => + new ServiceAccount(baseUrl, sa, { + apiVersion: requestBuilder.apiVersion, + }), + ); } /** diff --git a/src/lib/Algoan.enum.ts b/src/lib/Algoan.enum.ts index 7907306..8384a04 100644 --- a/src/lib/Algoan.enum.ts +++ b/src/lib/Algoan.enum.ts @@ -67,6 +67,10 @@ export enum EventName { KYC_OTHERS_LINK_REQUIRED = 'kyc_others_link_required', KYC_OTHERS_COMPLETED = 'kyc_others_completed', KYC_OTHERS_CONFIGURATION_REQUIRED = 'kyc_others_configuration_required', + + // V2 events + AGGREGATOR_LINK_REQUIRED = 'aggregator_link_required', + BANK_DETAILS_REQUIRED = 'bank_details_required', } /**