diff --git a/packages/public-messages-lib/src/transfers-bc/errors.ts b/packages/public-messages-lib/src/transfers-bc/errors.ts index 2c5ae64..084f774 100644 --- a/packages/public-messages-lib/src/transfers-bc/errors.ts +++ b/packages/public-messages-lib/src/transfers-bc/errors.ts @@ -1250,3 +1250,28 @@ export class TransfersBCOperatorErrorEvent extends DomainErrorEventMsg { // TODO: NOT IMPLEMENTED } } + +export type TransferFulfilmentValidationFailedEvtPayload = { + payerFspId: string; + transferId: string; + errorCode: string; +} +export class TransferFulfilmentValidationFailedEvt extends DomainErrorEventMsg { + boundedContextName: string = TRANSFERS_BOUNDED_CONTEXT_NAME; + aggregateId: string; + aggregateName: string = TRANSFERS_AGGREGATE_NAME; + msgKey: string; + msgTopic: string = TransfersBCTopics.DomainEvents; + payload: TransferFulfilmentValidationFailedEvtPayload; + + constructor (payload: TransferFulfilmentValidationFailedEvtPayload) { + super(); + + this.aggregateId = this.msgKey = payload.transferId; + this.payload = payload; + } + + validatePayload(): void { + // TODO: NOT IMPLEMENTED + } +} \ No newline at end of file diff --git a/packages/public-messages-lib/src/transfers-bc/requests.ts b/packages/public-messages-lib/src/transfers-bc/requests.ts index dc845c2..b662bd8 100644 --- a/packages/public-messages-lib/src/transfers-bc/requests.ts +++ b/packages/public-messages-lib/src/transfers-bc/requests.ts @@ -35,6 +35,8 @@ import { TRANSFERS_BOUNDED_CONTEXT_NAME, TRANSFERS_AGGREGATE_NAME, TransfersBCTo export type TransferPrepareRequestedEvtPayload = { + requesterFspId: string; + destinationFspId: string; transferId: string; payeeFsp: string; payerFsp: string; @@ -44,6 +46,10 @@ export type TransferPrepareRequestedEvtPayload = { payerIdType: string; payeeIdType: string; transferType: string; + extensions: { + key: string; + value: string; + }[]; } export class TransferPrepareRequestedEvt extends DomainEventMsg { @@ -67,9 +73,10 @@ export class TransferPrepareRequestedEvt extends DomainEventMsg { } export type TransferFulfilRequestedEvtPayload = { + requesterFspId: string; + destinationFspId: string; transferId: string; transferState: "PENDING" | "ACCEPTED" | "PROCESSING" | "COMPLETED" | "REJECTED", - fulfilment: string | null, completedTimestamp: number, notifyPayee: boolean; } @@ -95,6 +102,8 @@ export class TransferFulfilRequestedEvt extends DomainEventMsg { } export type TransferRejectRequestedEvtPayload = { + requesterFspId: string; + destinationFspId: string; transferId: string; errorInformation: { errorCode: string; @@ -178,6 +187,7 @@ export type BulkTransferPrepareRequestedEvtPayload = { bulkQuoteId: string; payeeFsp: string; payerFsp: string; + expiration: number; individualTransfers: { transferId: string; transferAmount: { @@ -187,8 +197,11 @@ export type BulkTransferPrepareRequestedEvtPayload = { payerIdType: string; payeeIdType: string; transferType: string; + extensions: { + key: string; + value: string; + }[]; }[]; - expiration: number; } export class BulkTransferPrepareRequestedEvt extends DomainEventMsg { diff --git a/packages/public-messages-lib/src/transfers-bc/responses.ts b/packages/public-messages-lib/src/transfers-bc/responses.ts index dcb0d67..591d5d0 100644 --- a/packages/public-messages-lib/src/transfers-bc/responses.ts +++ b/packages/public-messages-lib/src/transfers-bc/responses.ts @@ -67,7 +67,6 @@ export class TransferPreparedEvt extends DomainEventMsg { export type TransferFulfiledEvtPayload = { transferId: string; - fulfilment: string | null, completedTimestamp: number, // for settlements payeeFspId: string; @@ -162,7 +161,6 @@ export class TransferRejectRequestProcessedEvt extends DomainEventMsg { export type TransferQueryResponseEvtPayload = { transferId: string; transferState: string; - fulfilment: string | null; completedTimestamp: number | null; } @@ -290,7 +288,6 @@ export type BulkTransferQueryResponseEvtPayload = { bulkTransferState: string; individualTransferResults: { transferId: string; - fulfilment: string | null; errorInformation: { errorCode: string; errorDescription: string;